已修改38个文件
已添加5个文件
已重命名1个文件
| | |
| | | <artifactId>aliyun-java-sdk-core</artifactId> |
| | | <version>[4.3.2,5.0.0)</version> |
| | | </dependency> |
| | | <!-- é¿énlpèªç¶è¯è¨å¤ç--> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-alinlp</artifactId> |
| | | <version>1.0.20</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.jayway.jsonpath</groupId> |
| | | <artifactId>json-path</artifactId> |
| | |
| | | @Bean |
| | | fun runner() = ApplicationRunner { |
| | | webSocketServer.start() |
| | | // taskController.run() |
| | | taskController.run() |
| | | wxTokenManager.run() |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.common.nlp |
| | | |
| | | import cn.flightfeather.supervision.infrastructure.utils.GsonUtils |
| | | import com.aliyuncs.DefaultAcsClient |
| | | import com.aliyuncs.alinlp.model.v20200629.GetPosChGeneralRequest |
| | | import com.aliyuncs.profile.DefaultProfile |
| | | import com.google.gson.JsonParser |
| | | import org.springframework.stereotype.Component |
| | | |
| | | /** |
| | | * nlpèªç¶è¯è¨å¤ç |
| | | */ |
| | | @Component |
| | | class NlpController { |
| | | |
| | | private val client: DefaultAcsClient |
| | | |
| | | companion object { |
| | | const val accessKeyId = "LTAI4FvmhG97saKL33tDqUV8" |
| | | const val accessKeySecret = "3PyluVDS97GTGVmm1p3s6vbLkyqZMf" |
| | | |
| | | private const val TAG = "NlpController" |
| | | } |
| | | |
| | | init { |
| | | val defaultProfile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret) |
| | | client = DefaultAcsClient(defaultProfile) |
| | | } |
| | | |
| | | fun execute(str: String): List<String> { |
| | | val result = mutableListOf<String>() |
| | | |
| | | val request = GetPosChGeneralRequest().apply { |
| | | setSysEndpoint("alinlp.cn-hangzhou.aliyuncs.com") |
| | | serviceCode = "alinlp" |
| | | tokenizerId = "GENERAL_CHN" |
| | | text = str |
| | | } |
| | | |
| | | val start = System.currentTimeMillis() |
| | | val response = client.getAcsResponse(request) |
| | | |
| | | println(response.hashCode()) |
| | | println(response.requestId + "\n" + response.data + "\n" + "cost:" + (System.currentTimeMillis() - start)) |
| | | |
| | | val json = JsonParser.parseString(response.data).asJsonObject |
| | | if (json["success"].asBoolean) { |
| | | val r = json["result"].toString() |
| | | val list = GsonUtils.parserJsonToArrayBeans(r, NlpWord::class.java) |
| | | list.forEach { |
| | | if (it.pos in listOf("VV", "NR", "NN", "LC", "FW")) { |
| | | result.add(it.word) |
| | | } |
| | | } |
| | | } else { |
| | | throw IllegalStateException("${TAG}: è¯æ§æ 注æ¥å£è¯·æ±å¤±è´¥ï¼é误å¦ä¸ï¼\n$json") |
| | | } |
| | | |
| | | return result |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.common.nlp |
| | | |
| | | /** |
| | | * é¿éèªç¶è¯è¨å¤ç-ä¸æè¯æ§æ æ³¨ç»æ |
| | | */ |
| | | data class NlpWord( |
| | | //è¯æ§ |
| | | val pos: String, |
| | | //è¯ |
| | | val word: String, |
| | | ) |
| | |
| | | |
| | | @Throws(Exception::class) |
| | | fun generateContract(param: DynamicParam): List<String> { |
| | | // çæhtmlåå |
| | | // çæhtml |
| | | generateHTML(param.templatePath, param.templateName, param.param) |
| | | // æ ¹æ®htmlååçæpdfåå |
| | | // æ ¹æ®htmlçæpdf |
| | | generatePDF(param.outPath + param.outName) |
| | | // æ ¹æ®pdfçæå¾ç |
| | | val picPaths = generatePic(param.outPath + param.outName) |
| | | // å é¤ä¸´æ¶htmlæ ¼å¼åå |
| | | // å é¤ä¸´æ¶html |
| | | removeFile(TEMPORARY_CONTRACT_HTML) |
| | | return picPaths |
| | | } |
| ÎļþÃû´Ó src/main/kotlin/cn/flightfeather/supervision/push/PushService.kt ÐÞ¸Ä |
| | |
| | | package cn.flightfeather.supervision.push |
| | | package cn.flightfeather.supervision.common.push |
| | | |
| | | import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getRequestId |
| | | import com.aliyuncs.push.model.v20160801.PushResponse |
| | | import com.aliyuncs.utils.ParameterHelper |
| | | import com.aliyuncs.push.model.v20160801.PushRequest |
| | | import com.aliyuncs.DefaultAcsClient |
| | | import com.aliyuncs.profile.DefaultProfile |
| | | import com.aliyuncs.profile.IClientProfile |
| | | import java.util.* |
| | | |
| | | |
| | |
| | | |
| | | fun go(_year: Int? = null, _month: Int? = null) { |
| | | val fileName = "${SCENE_TYPE.des}èªå¨è¯å-${DateUtil.DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls" |
| | | val filePath = "E:\\å·¥ä½\\å¼å\\é£ç¾½ç¯å¢app\\èªå¨è¯å\\${SCENE_TYPE.des}\\$fileName" |
| | | // val filePath = "E:\\å·¥ä½\\å¼å\\é£ç¾½ç¯å¢app\\èªå¨è¯å\\${SCENE_TYPE.des}\\$fileName" |
| | | val filePath = "C:\\work\\å·¥ä½\\ç¬¬ä¸æ¹ç管\\èªå¨è¯å\\${SCENE_TYPE.des}\\$fileName" |
| | | val out = FileOutputStream(File(filePath)) |
| | | |
| | | getScoreItem() |
| | |
| | | * å£åº¦å
å
¨æ èªè¯ç -10å |
| | | */ |
| | | private fun condition2(): Boolean { |
| | | // val period = "${info.year}/$sMonth-$eMonth" |
| | | // val e = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { |
| | | // createCriteria().andEqualTo("iguid", info.userId) |
| | | // .andEqualTo("ertype", 0) |
| | | // .andEqualTo("scensename", period) |
| | | // }) |
| | | // return e.isEmpty() |
| | | val periods = mutableListOf<String>() |
| | | for (i in sMonth..eMonth) { |
| | | periods.add("${info.year}/$i-$i") |
| | | } |
| | | val e = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { |
| | | createCriteria().andEqualTo("iguid", info.userId) |
| | | .andEqualTo("ertype", 0) |
| | | .andIn("scensename", periods) |
| | | }) |
| | | return e.isEmpty() |
| | | // FIXME: 2021/4/26 èªè¯ææ¶ä¸æ£å |
| | | return false |
| | | // return false |
| | | } |
| | | |
| | | /** |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.stereotype.Component |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.LocalDate |
| | | import java.time.LocalDateTime |
| | | import java.time.ZoneId |
| | | import java.util.* |
| | |
| | | * 线ä¸å¹è®æªç¾å°æç¾æ¶æä»¶ -3å |
| | | */ |
| | | private fun condition1(): Boolean { |
| | | val startTime = LocalDate.of(info.year, sMonth, 1).atStartOfDay(ZoneId.systemDefault()) |
| | | val lastTime = LocalDate.of(info.year, eMonth, 1).plusMonths(1).atStartOfDay(ZoneId.systemDefault()) |
| | | val signs = signatureMapper.selectByExample(Example(Signature::class.java).apply { |
| | | createCriteria().andEqualTo("msParticipantid", info.userId) |
| | | .andEqualTo("msIssignin", false) |
| | | .andBetween("msCreatedate", startTime, lastTime) |
| | | }) |
| | | return signs.isNotEmpty() |
| | | } |
| | |
| | | private Integer lrResourcelevel; |
| | | |
| | | /** |
| | | * 1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | */ |
| | | @Column(name = "LR_ResourceTypeId") |
| | | private Integer lrResourcetypeid; |
| | | |
| | | /** |
| | | * 1.ææ¡£ Word/PDF/Excel/PPT |
| | | 2.ç½é¡µ |
| | | 3.å¾ç |
| | | 4.è§é¢ãVRãå
¶ä» |
| | | */ |
| | | @Column(name = "LR_ResourceFileType") |
| | | private Integer lrResourcefiletype; |
| | | |
| | | /** |
| | | * èµè®¯å°é¢å¾çurl |
| | | */ |
| | | @Column(name = "LR_PicUrl") |
| | |
| | | private Boolean lrIsforeign; |
| | | |
| | | /** |
| | | * 1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | */ |
| | | @Column(name = "LR_ResourceTypeId") |
| | | private Integer lrResourcetypeid; |
| | | |
| | | /** |
| | | * æ¯å¦å¼æ¾,为åç»å¢å¼æå¡é¢çè®¿é®æ§å¶ï¼é»è®¤å¼æ¾1 |
| | | */ |
| | | @Column(name = "LR_IsOpen") |
| | |
| | | |
| | | @Column(name = "LR_IsUse") |
| | | private Boolean lrIsuse; |
| | | |
| | | /** |
| | | * Word/PDF/Excel/PPTãå¾çãè¯é³ãè§é¢ãVRãå
¶ä» |
| | | */ |
| | | @Column(name = "LR_ResourceFileType") |
| | | private Integer lrResourcefiletype; |
| | | |
| | | /** |
| | | * æ¯å¦ç¦ç¨å¤é¨é¾æ¥,å½å¤é¨èµæºéæ³ææ¶åç¥è¯äº§æçº 纷æ¶ä¸æ¶æ§å¶ |
| | |
| | | @Column(name = "LR_Version") |
| | | private String lrVersion; |
| | | |
| | | @Column(name = "BI_Province_Code") |
| | | private String biProvinceCode; |
| | | |
| | | @Column(name = "BI_Province_Name") |
| | | private String biProvinceName; |
| | | |
| | | @Column(name = "BI_City_Code") |
| | | private String biCityCode; |
| | | |
| | | @Column(name = "BI_City_Name") |
| | | private String biCityName; |
| | | |
| | | @Column(name = "BI_District_Code") |
| | | private String biDistrictCode; |
| | | |
| | | @Column(name = "BI_District_Name") |
| | | private String biDistrictName; |
| | | |
| | | @Column(name = "BI_Town_Code") |
| | | private String biTownCode; |
| | | |
| | | @Column(name = "BI_Town_Name") |
| | | private String biTownName; |
| | | |
| | | @Column(name = "LR_Extension1") |
| | | private String lrExtension1; |
| | | |
| | |
| | | @Column(name = "LR_Remark") |
| | | private String lrRemark; |
| | | |
| | | @Column(name = "LR_ResourceDesc") |
| | | private String lrResourcedesc; |
| | | |
| | | /** |
| | | * å¯ä»¥å¤ä¸ªï¼âãâåå²ï¼ç¨äºç³»ç»å
å¿«éæºè½æ£ç´¢ï¼å¦åºåºãå±åºãVOCsç |
| | | */ |
| | | @Column(name = "LR_Keywords") |
| | | private String lrKeywords; |
| | | |
| | | @Column(name = "LR_ResourceDesc") |
| | | private String lrResourcedesc; |
| | | |
| | | /** |
| | | * @return LR_GUID |
| | |
| | | */ |
| | | public void setLrResourcelevel(Integer lrResourcelevel) { |
| | | this.lrResourcelevel = lrResourcelevel; |
| | | } |
| | | |
| | | /** |
| | | * è·å1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | * |
| | | * @return LR_ResourceTypeId - 1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | */ |
| | | public Integer getLrResourcetypeid() { |
| | | return lrResourcetypeid; |
| | | } |
| | | |
| | | /** |
| | | * 设置1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | * |
| | | * @param lrResourcetypeid 1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | */ |
| | | public void setLrResourcetypeid(Integer lrResourcetypeid) { |
| | | this.lrResourcetypeid = lrResourcetypeid; |
| | | } |
| | | |
| | | /** |
| | | * è·å1.ææ¡£ Word/PDF/Excel/PPT |
| | | 2.ç½é¡µ |
| | | 3.å¾ç |
| | | 4.è§é¢ãVRãå
¶ä» |
| | | * |
| | | * @return LR_ResourceFileType - 1.ææ¡£ Word/PDF/Excel/PPT |
| | | 2.ç½é¡µ |
| | | 3.å¾ç |
| | | 4.è§é¢ãVRãå
¶ä» |
| | | */ |
| | | public Integer getLrResourcefiletype() { |
| | | return lrResourcefiletype; |
| | | } |
| | | |
| | | /** |
| | | * 设置1.ææ¡£ Word/PDF/Excel/PPT |
| | | 2.ç½é¡µ |
| | | 3.å¾ç |
| | | 4.è§é¢ãVRãå
¶ä» |
| | | * |
| | | * @param lrResourcefiletype 1.ææ¡£ Word/PDF/Excel/PPT |
| | | 2.ç½é¡µ |
| | | 3.å¾ç |
| | | 4.è§é¢ãVRãå
¶ä» |
| | | */ |
| | | public void setLrResourcefiletype(Integer lrResourcefiletype) { |
| | | this.lrResourcefiletype = lrResourcefiletype; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·å1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | * |
| | | * @return LR_ResourceTypeId - 1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | */ |
| | | public Integer getLrResourcetypeid() { |
| | | return lrResourcetypeid; |
| | | } |
| | | |
| | | /** |
| | | * 设置1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | * |
| | | * @param lrResourcetypeid 1æ³å¾æ³è§ï¼2éç¥è¦æ±ï¼3æ åè§èï¼4å¹è®ææï¼5ãç¤ºèæ¡ä¾ï¼6ãå
¶ä» |
| | | */ |
| | | public void setLrResourcetypeid(Integer lrResourcetypeid) { |
| | | this.lrResourcetypeid = lrResourcetypeid; |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¯å¦å¼æ¾,为åç»å¢å¼æå¡é¢çè®¿é®æ§å¶ï¼é»è®¤å¼æ¾1 |
| | | * |
| | | * @return LR_IsOpen - æ¯å¦å¼æ¾,为åç»å¢å¼æå¡é¢çè®¿é®æ§å¶ï¼é»è®¤å¼æ¾1 |
| | |
| | | */ |
| | | public void setLrIsuse(Boolean lrIsuse) { |
| | | this.lrIsuse = lrIsuse; |
| | | } |
| | | |
| | | /** |
| | | * è·åWord/PDF/Excel/PPTãå¾çãè¯é³ãè§é¢ãVRãå
¶ä» |
| | | * |
| | | * @return LR_ResourceFileType - Word/PDF/Excel/PPTãå¾çãè¯é³ãè§é¢ãVRãå
¶ä» |
| | | */ |
| | | public Integer getLrResourcefiletype() { |
| | | return lrResourcefiletype; |
| | | } |
| | | |
| | | /** |
| | | * 设置Word/PDF/Excel/PPTãå¾çãè¯é³ãè§é¢ãVRãå
¶ä» |
| | | * |
| | | * @param lrResourcefiletype Word/PDF/Excel/PPTãå¾çãè¯é³ãè§é¢ãVRãå
¶ä» |
| | | */ |
| | | public void setLrResourcefiletype(Integer lrResourcefiletype) { |
| | | this.lrResourcefiletype = lrResourcefiletype; |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * @return BI_Province_Code |
| | | */ |
| | | public String getBiProvinceCode() { |
| | | return biProvinceCode; |
| | | } |
| | | |
| | | /** |
| | | * @param biProvinceCode |
| | | */ |
| | | public void setBiProvinceCode(String biProvinceCode) { |
| | | this.biProvinceCode = biProvinceCode == null ? null : biProvinceCode.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_Province_Name |
| | | */ |
| | | public String getBiProvinceName() { |
| | | return biProvinceName; |
| | | } |
| | | |
| | | /** |
| | | * @param biProvinceName |
| | | */ |
| | | public void setBiProvinceName(String biProvinceName) { |
| | | this.biProvinceName = biProvinceName == null ? null : biProvinceName.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_City_Code |
| | | */ |
| | | public String getBiCityCode() { |
| | | return biCityCode; |
| | | } |
| | | |
| | | /** |
| | | * @param biCityCode |
| | | */ |
| | | public void setBiCityCode(String biCityCode) { |
| | | this.biCityCode = biCityCode == null ? null : biCityCode.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_City_Name |
| | | */ |
| | | public String getBiCityName() { |
| | | return biCityName; |
| | | } |
| | | |
| | | /** |
| | | * @param biCityName |
| | | */ |
| | | public void setBiCityName(String biCityName) { |
| | | this.biCityName = biCityName == null ? null : biCityName.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_District_Code |
| | | */ |
| | | public String getBiDistrictCode() { |
| | | return biDistrictCode; |
| | | } |
| | | |
| | | /** |
| | | * @param biDistrictCode |
| | | */ |
| | | public void setBiDistrictCode(String biDistrictCode) { |
| | | this.biDistrictCode = biDistrictCode == null ? null : biDistrictCode.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_District_Name |
| | | */ |
| | | public String getBiDistrictName() { |
| | | return biDistrictName; |
| | | } |
| | | |
| | | /** |
| | | * @param biDistrictName |
| | | */ |
| | | public void setBiDistrictName(String biDistrictName) { |
| | | this.biDistrictName = biDistrictName == null ? null : biDistrictName.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_Town_Code |
| | | */ |
| | | public String getBiTownCode() { |
| | | return biTownCode; |
| | | } |
| | | |
| | | /** |
| | | * @param biTownCode |
| | | */ |
| | | public void setBiTownCode(String biTownCode) { |
| | | this.biTownCode = biTownCode == null ? null : biTownCode.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return BI_Town_Name |
| | | */ |
| | | public String getBiTownName() { |
| | | return biTownName; |
| | | } |
| | | |
| | | /** |
| | | * @param biTownName |
| | | */ |
| | | public void setBiTownName(String biTownName) { |
| | | this.biTownName = biTownName == null ? null : biTownName.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return LR_Extension1 |
| | | */ |
| | | public String getLrExtension1() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @return LR_ResourceDesc |
| | | */ |
| | | public String getLrResourcedesc() { |
| | | return lrResourcedesc; |
| | | } |
| | | |
| | | /** |
| | | * @param lrResourcedesc |
| | | */ |
| | | public void setLrResourcedesc(String lrResourcedesc) { |
| | | this.lrResourcedesc = lrResourcedesc == null ? null : lrResourcedesc.trim(); |
| | | } |
| | | |
| | | /** |
| | | * è·åå¯ä»¥å¤ä¸ªï¼âãâåå²ï¼ç¨äºç³»ç»å
å¿«éæºè½æ£ç´¢ï¼å¦åºåºãå±åºãVOCsç |
| | | * |
| | | * @return LR_ Keywords - å¯ä»¥å¤ä¸ªï¼âãâåå²ï¼ç¨äºç³»ç»å
å¿«éæºè½æ£ç´¢ï¼å¦åºåºãå±åºãVOCsç |
| | | * @return LR_Keywords - å¯ä»¥å¤ä¸ªï¼âãâåå²ï¼ç¨äºç³»ç»å
å¿«éæºè½æ£ç´¢ï¼å¦åºåºãå±åºãVOCsç |
| | | */ |
| | | public String getLrKeywords() { |
| | | return lrKeywords; |
| | |
| | | */ |
| | | public void setLrKeywords(String lrKeywords) { |
| | | this.lrKeywords = lrKeywords == null ? null : lrKeywords.trim(); |
| | | } |
| | | |
| | | /** |
| | | * @return LR_ResourceDesc |
| | | */ |
| | | public String getLrResourcedesc() { |
| | | return lrResourcedesc; |
| | | } |
| | | |
| | | /** |
| | | * @param lrResourcedesc |
| | | */ |
| | | public void setLrResourcedesc(String lrResourcedesc) { |
| | | this.lrResourcedesc = lrResourcedesc == null ? null : lrResourcedesc.trim(); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.flightfeather.supervision.domain.entity.LedgerRecord |
| | | import cn.flightfeather.supervision.domain.util.MyMapper |
| | | import org.apache.ibatis.annotations.Delete |
| | | import org.apache.ibatis.annotations.Select |
| | | import tk.mybatis.mapper.common.Mapper |
| | | |
| | |
| | | fun selectByUser(userId: String, year: Int, month: Byte, subTypeId: Int?, sceneType: String, startIndex: Int?, perPage: Int): MutableList<LedgerRecord> |
| | | |
| | | fun getLedgerImgs(userId: String, ledgerType: List<Int>):List<LedgerRecord> |
| | | |
| | | @Select("set @row_number:=0;") |
| | | fun setRowNumber() |
| | | |
| | | @Select("set @median_group:='';") |
| | | fun setGroup() |
| | | /** |
| | | * è·åæ¯ä¸ªæ¿æ´»ç¶æçç¨æ·éè¦å¤å¶çæ¯ç§å°è´¦çææ°ä¸æ¡è®°å½ |
| | | */ |
| | | fun getNeedCopyLedgers(): List<LedgerRecord> |
| | | } |
| | |
| | | |
| | | fun getTotalPoints(userId: String, evaluatorType: Int, startTime: String, endTime: String, sceneTypeId: Int? = null, erGuid: String? = null, eId: String? = null): List<Evaluation> |
| | | |
| | | fun getHistoryPoint(userId: String, page: Int, per_page: Int, response: HttpServletResponse): List<AssessmentGradeVo> |
| | | fun getHistoryPoint(userId: String, page: Int, per_page: Int, platform:String?, response: HttpServletResponse): List<AssessmentGradeVo> |
| | | |
| | | fun getCreditInfo(userId: String): CreditInfoVo |
| | | |
| | |
| | | |
| | | fun findByRuleId(erguid: String): List<Evaluationsubrule> |
| | | |
| | | fun getScore(userId:String, time: String):List<EvaluationVo> |
| | | fun getScore(userId:String, time: String, platform:String?):List<EvaluationVo> |
| | | |
| | | } |
| | |
| | | |
| | | import cn.flightfeather.supervision.common.pdf.DynamicParam |
| | | import cn.flightfeather.supervision.common.pdf.GeneratePdfUtil |
| | | import cn.flightfeather.supervision.common.pdf.PdfUtil |
| | | import cn.flightfeather.supervision.domain.entity.Commitment |
| | | import cn.flightfeather.supervision.domain.enumeration.SceneType |
| | | import cn.flightfeather.supervision.domain.enumeration.UserType |
| | | import cn.flightfeather.supervision.domain.mapper.CommitmentMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserinfoMapper |
| | | import cn.flightfeather.supervision.infrastructure.utils.DateUtil |
| | |
| | | import com.fasterxml.jackson.module.kotlin.readValue |
| | | import com.github.pagehelper.PageHelper |
| | | import com.google.gson.Gson |
| | | import net.coobird.thumbnailator.tasks.io.InputStreamImageSource |
| | | import org.springframework.beans.factory.annotation.Value |
| | | import org.springframework.stereotype.Service |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.awt.Image |
| | | import java.io.File |
| | | import java.time.LocalDate |
| | | import java.time.format.DateTimeFormatter |
| | | import java.util.* |
| | | import javax.imageio.ImageReader |
| | | import javax.imageio.stream.ImageInputStream |
| | | import javax.servlet.http.HttpServletResponse |
| | | |
| | | /** |
| | |
| | | import com.github.pagehelper.PageHelper |
| | | import org.springframework.stereotype.Service |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.LocalDateTime |
| | | import java.util.* |
| | | import javax.servlet.http.HttpServletResponse |
| | | |
| | |
| | | return evaluationMapper.selectByExample(example) |
| | | } |
| | | |
| | | override fun getHistoryPoint(userId: String, page: Int, per_page: Int, response: HttpServletResponse): List<AssessmentGradeVo> { |
| | | override fun getHistoryPoint(userId: String, page: Int, per_page: Int, platform:String?, response: HttpServletResponse): List<AssessmentGradeVo> { |
| | | val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: return emptyList() |
| | | |
| | | // FIXME: 2022/11/8 ä¸´æ¶æ·»å è¿åº¦åè½ï¼æä¾å¾®ä¿¡å°ç¨åºå端汽修类åçåºæ¯åç¬çè¯ä¼°æ¸
å ï¼åºæ¯ç±»å为 -7 |
| | | var sceneType = userInfo.extension2 |
| | | if (platform == "weixin" && sceneType == SceneType.VehicleRepair.value.toString()) { |
| | | sceneType = "-7" |
| | | } |
| | | //è¯åè§åä¸çå级ãç级é¢è²åç级è¯è¯ |
| | | val pointLevel = mutableListOf<Pair<Int, Int>>() |
| | | val evaluateLevel = mutableListOf<String>() |
| | | val creditTexts = mutableListOf<String>() |
| | | val levelColors = mutableListOf<String>() |
| | | val rule = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | | createCriteria().andEqualTo("scensetypeid", userInfo.extension2) |
| | | createCriteria().andEqualTo("scensetypeid", sceneType) |
| | | .andEqualTo("ruletype", "0") |
| | | }) |
| | | if (rule.isNotEmpty()) { |
| | |
| | | resultList.add(AssessmentGradeVo().apply { |
| | | this.userId = userId |
| | | userRealName = userInfo.realname |
| | | sceneType = userInfo.extension2?.toIntOrNull() ?: SceneType.NoType.value |
| | | this.sceneType = userInfo.extension2?.toIntOrNull() ?: SceneType.NoType.value |
| | | tPGuid = it.guid |
| | | tPRuleGuid = it.stguid |
| | | totalPoint = it.resultscorebef?.toInt() ?: 0 |
| | |
| | | override fun getCreditInfo(userId: String): CreditInfoVo { |
| | | val userinfo = userinfoMapper.selectByPrimaryKey(userId) |
| | | val baseInfo = baseInfoMapper.selectByPrimaryKey(userId) |
| | | ?: return CreditInfoVo( |
| | | userId, userinfo.realname,userinfo.extension2?.toIntOrNull() ?: SceneType.NoType.value) |
| | | val company = companyMapper.selectByPrimaryKey(baseInfo.ciGuid) |
| | | |
| | | |
| | | val result = CreditInfoVo( |
| | | userId, |
| | | baseInfo.biName, |
| | | baseInfo?.biName, |
| | | userinfo.extension2?.toIntOrNull() ?: SceneType.NoType.value, |
| | | baseInfo.ciName, |
| | | baseInfo.biManagementCompany, |
| | | baseInfo.biContact, |
| | | baseInfo.biTelephone, |
| | | baseInfo.biAddress, |
| | | district = company.ciDistrictName, |
| | | town = company.ciTownName |
| | | baseInfo?.ciName, |
| | | baseInfo?.biManagementCompany, |
| | | baseInfo?.biContact, |
| | | baseInfo?.biTelephone, |
| | | baseInfo?.biAddress, |
| | | district = company?.ciDistrictName, |
| | | town = company?.ciTownName |
| | | ) |
| | | |
| | | val rule = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | |
| | | }).takeIf { it.isNotEmpty() }?.get(0) ?: return result |
| | | |
| | | val overallEvaluation = overallEvaluationMapper.selectByExample(Example(OverallEvaluation::class.java).apply { |
| | | createCriteria().andEqualTo("biGuid", baseInfo.biGuid) |
| | | createCriteria().andEqualTo("biGuid", baseInfo?.biGuid) |
| | | orderBy("oePublishTime").desc() |
| | | }).takeIf { it.isNotEmpty() }?.get(0) ?: return result |
| | | |
| | |
| | | |
| | | override fun uploadScore(userId: String, period: String, ruleId: String?, itemList: List<Pair<String, String>>): Boolean { |
| | | val userinfo = userinfoMapper.selectByPrimaryKey(userId) ?: return false |
| | | var sceneType = userinfo.extension2 |
| | | |
| | | // FIXME: 2022/11/8 ä¸´æ¶æ·»å è¿åº¦åè½ï¼æä¾å¾®ä¿¡å°ç¨åºå端汽修类åçåºæ¯åç¬çè¯ä¼°æ¸
å ï¼åºæ¯ç±»å为 -7 |
| | | if (sceneType == SceneType.VehicleRepair.value.toString()) { |
| | | sceneType = "-7" |
| | | } |
| | | |
| | | //è¯¥åºæ¯ç±»åä¸çæ»å¾åè§å |
| | | val tRule = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | | createCriteria().andEqualTo("scensetypeid", userinfo.extension2) |
| | | createCriteria().andEqualTo("scensetypeid", sceneType) |
| | | .andEqualTo("ruletype", AssessmentRuleType.Total.value) |
| | | .andIsNull("tasktypeid") |
| | | }).takeIf { it.isNotEmpty() }?.get(0) |
| | |
| | | // } |
| | | |
| | | val ruleList = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | | createCriteria().andEqualTo("scensetypeid", userinfo.extension2) |
| | | createCriteria().andEqualTo("scensetypeid", sceneType) |
| | | .andNotEqualTo("ruletype", AssessmentRuleType.Total.value) |
| | | .andIsNull("tasktypeid") |
| | | }).forEach {rule-> |
| | |
| | | //æ»å¾å |
| | | var totalScore = 0 |
| | | |
| | | //æ ¹æ®ä¸ä¼ çéæ©çæ¡ç®ï¼çæå¯¹åºçè¯åè®°å½ |
| | | itemList.forEach { |
| | | for (s in subRules) { |
| | | if (s.guid == it.first) { |
| | |
| | | } |
| | | } |
| | | } while (fatherId?.isNotBlank() == true) |
| | | |
| | | totalScore += it.second.toInt() |
| | | break |
| | | } |
| | | } |
| | |
| | | //æ»å |
| | | var maxScore = 0 |
| | | subRules.forEach subRules@{s -> |
| | | if (s.ertype == 2) { |
| | | //计ç®åºå¾æ»åï¼basic_scoreï¼è¡¨ç¤ºåºç¡åï¼è®¡ç®å¨åºå¾æ»åå
ï¼addition_score表示å åï¼ä¸è®¡ç®å¨å
|
| | | if (s.ertype == 2 && s.extension1 != "addition_score") { |
| | | maxScore += s.maxscore ?: 0 |
| | | } |
| | | //è§åå·²ç»æå宿¯ï¼åè·³è¿ |
| | | itemEvaluationList.forEach {i -> |
| | | if (i.esrguid == s.guid) { |
| | | //å¦ææ¯æå¤§ç2级è¯ä¼°è§åï¼è®¡ç®å·²è·å¾çæ»å |
| | | if (s.ertype == 2) { |
| | | totalScore += i.value?.toInt() ?: 0 |
| | | } |
| | | return@subRules |
| | | } |
| | | } |
| | | //å¦åæ°å¢ä¸æ¡æªæ£åçè®°å½ |
| | | //å¦å妿å端å
许ä¸ç¨å
¨é¨è¯åï¼æ°å¢ä¸æ¡æªè¯åçè®°å½ |
| | | itemEvaluationList.add(Itemevaluation().apply { |
| | | ieguid = UUIDGenerator.generate16ShortUUID() |
| | | iguid = userId |
| | |
| | | } |
| | | |
| | | override fun getDetail(userId: String, period: String): GradeDetailVo { |
| | | val list = period.split("-") |
| | | val endM = list[1].toInt() |
| | | val list2 = list[0].split("/") |
| | | val year = list2[0].toInt() |
| | | val startM = list2[1].toInt() |
| | | val st = LocalDateTime.of(year, startM, 1, 0, 0, 0, 0) |
| | | val et = LocalDateTime.of(year, endM, 1, 0, 0, 0, 0).plusMonths(1) |
| | | |
| | | val result = GradeDetailVo() |
| | | |
| | | val userinfo = userinfoMapper.selectByPrimaryKey(userId) ?: return result |
| | | var sceneType = userinfo.extension2 |
| | | // FIXME: 2022/11/8 ä¸´æ¶æ·»å è¿åº¦åè½ï¼æä¾å¾®ä¿¡å°ç¨åºå端汽修类åçåºæ¯åç¬çè¯ä¼°æ¸
å ï¼åºæ¯ç±»å为 -7 |
| | | if (sceneType == SceneType.VehicleRepair.value.toString()) { |
| | | sceneType = "-7" |
| | | } |
| | | |
| | | //è¯¥åºæ¯ç±»åä¸çææå¾åè§å |
| | | var rule0: Evaluationrule? = null |
| | | val rule1List = mutableListOf<Evaluationrule>() |
| | | evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | | createCriteria().andEqualTo("scensetypeid", userinfo.extension2) |
| | | and(createCriteria().orIsNull("tasktypeid").orNotEqualTo("tasktypeid", 1)) |
| | | }).forEach { |
| | | if (it.ruletype == AssessmentRuleType.Total.value.toString()) { |
| | | rule0 = it |
| | | } else { |
| | | rule1List.add(it) |
| | | } |
| | | } |
| | | if (rule0 == null) return result |
| | | // var rule0: Evaluationrule? = null |
| | | // val rule1List = mutableListOf<Evaluationrule>() |
| | | // evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | | // createCriteria().andEqualTo("scensetypeid", sceneType) |
| | | // and(createCriteria().orIsNull("tasktypeid").orNotEqualTo("tasktypeid", 1)) |
| | | // }).forEach { |
| | | // if (it.ruletype == AssessmentRuleType.Total.value.toString()) { |
| | | // rule0 = it |
| | | // } else { |
| | | // rule1List.add(it) |
| | | // } |
| | | // } |
| | | // if (rule0 == null) return result |
| | | //å¾å解读åå¾å详æ
|
| | | evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { |
| | | createCriteria().andEqualTo("iguid", userId) |
| | | .andEqualTo("ertype", AssessmentRuleType.Total.value.toByte()) |
| | | .andEqualTo("scensename", period) |
| | | }).takeIf { it.isNotEmpty() }?.get(0)?.let { |
| | | rule0?.apply { |
| | | val pointLevel = mutableListOf<Pair<Int, Int>>() |
| | | val evaluateLevel = mutableListOf<String>() |
| | | val creditTexts = mutableListOf<String>() |
| | | val levelColors = mutableListOf<String>() |
| | | extension1?.split("#")?.forEach { |
| | | val pStr = it.split(",") |
| | | pointLevel.add(Pair(pStr[0].toInt(), pStr[1].toInt())) |
| | | } |
| | | extension2?.split("#")?.forEach { |
| | | evaluateLevel.add(it) |
| | | } |
| | | extension3?.split("#")?.forEach { |
| | | creditTexts.add(it) |
| | | } |
| | | remark?.split(";")?.forEach { |
| | | levelColors.add(it) |
| | | } |
| | | // .andEqualTo("ertype", AssessmentRuleType.Total.value.toByte()) |
| | | and( |
| | | createCriteria().orEqualTo("scensename", period) |
| | | .orBetween("createdate", st, et) |
| | | ) |
| | | }).forEach {e -> |
| | | val rule = evaluationruleMapper.selectByPrimaryKey(e.stguid) |
| | | //æ»åè§åï¼çææ»ä½è¯ä»· |
| | | if (rule.ruletype == AssessmentRuleType.Total.value.toString()) { |
| | | rule?.apply { |
| | | val pointLevel = mutableListOf<Pair<Int, Int>>() |
| | | val evaluateLevel = mutableListOf<String>() |
| | | val creditTexts = mutableListOf<String>() |
| | | val levelColors = mutableListOf<String>() |
| | | extension1?.split("#")?.forEach { |
| | | val pStr = it.split(",") |
| | | pointLevel.add(Pair(pStr[0].toInt(), pStr[1].toInt())) |
| | | } |
| | | extension2?.split("#")?.forEach { |
| | | evaluateLevel.add(it) |
| | | } |
| | | extension3?.split("#")?.forEach { |
| | | creditTexts.add(it) |
| | | } |
| | | remark?.split(";")?.forEach { |
| | | levelColors.add(it) |
| | | } |
| | | |
| | | val l = getEvaluationLevel(it.resultscorebef?.toInt() |
| | | ?: 0, pointLevel, evaluateLevel, creditTexts, levelColors) |
| | | result.apply { |
| | | creditText = l["creditText"] |
| | | |
| | | score = it.resultscorebef?.toInt() ?: 0 |
| | | rank = it.promissednum |
| | | level = l["evaluateLevel"] |
| | | this.period = it.scensename |
| | | time = it.createdate |
| | | val l = getEvaluationLevel(e.resultscorebef?.toInt() |
| | | ?: 0, pointLevel, evaluateLevel, creditTexts, levelColors) |
| | | result.apply { |
| | | creditText = l["creditText"] |
| | | score = e.resultscorebef?.toInt() ?: 0 |
| | | rank = e.promissednum |
| | | level = l["evaluateLevel"] |
| | | this.period = period |
| | | time = e.createdate |
| | | // color = l["color"] |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //åç±»å«çå¾å(æ¯ä¸ªè¯å表çè¯å大项çå¾å)åå¤±åæ¡ç® |
| | | val ruleMap = result.loseScore |
| | | rule1List.forEach { |
| | | val evaluation = evaluationMapper.selectByExample(Example(Evaluation::class.java).apply { |
| | | createCriteria().andEqualTo("iguid", userId) |
| | | .andEqualTo("ertype", it.ruletype) |
| | | .andEqualTo("scensename", period) |
| | | }).takeIf { it.isNotEmpty() }?.get(0)?.let {e -> |
| | | //å
·ä½è¯ä¼°è¡¨ |
| | | else { |
| | | val subRules = evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule::class.java).apply { |
| | | createCriteria().andEqualTo("erguid", it.guid) |
| | | createCriteria().andEqualTo("erguid", rule.guid) |
| | | }) |
| | | val itemEvaluations = itemevaluationService.getItemEvaluationList(e.guid!!) |
| | | |
| | | val ruleMap = result.loseScore |
| | | //åç±»å«çå¾å(æ¯ä¸ªè¯å表çè¯å大项çå¾å)åå¤±åæ¡ç® |
| | | itemEvaluations.sortedBy { it.ertype }.forEach {item -> |
| | | when (item.ertype) { |
| | | //åç±»å«çå¾å |
| | |
| | | for (s in subRules) { |
| | | if (s.guid == item.esrguid) { |
| | | val d = |
| | | Triple( |
| | | item.name ?: "", |
| | | if ((item.value?.toInt() ?: 0) < 0) { |
| | | item . value ?: "0" |
| | | } else { |
| | | (item.value?.toInt() ?: 0).minus(s.maxscore ?: 0).toString() |
| | | }, |
| | | s.remark ?: "" |
| | | ) |
| | | Triple( |
| | | item.name ?: "", |
| | | // if ((item.value?.toInt() ?: 0) < 0) { |
| | | // item.value ?: "0" |
| | | // } else { |
| | | // (item.value?.toInt() ?: 0).minus(s.maxscore ?: 0).toString() |
| | | // }, |
| | | item.value ?: "0", |
| | | s.remark ?: "" |
| | | ) |
| | | val rule3Name = s.fathername |
| | | for (s1 in subRules) { |
| | | if (s1.itemname == rule3Name) { |
| | | val rule2Name = s1.fathername |
| | | val rule2Name = |
| | | //ç¶id为空ï¼è¯´ææ¤4级è¯ä¼°é¡¹ç´æ¥éå±äº2级è¯ä¼°é¡¹ |
| | | if (s1.fathername.isNullOrBlank()) { |
| | | ruleMap[rule3Name]?.put(rule3Name, mutableListOf()) |
| | | rule3Name |
| | | } else { |
| | | s1.fathername |
| | | } |
| | | ruleMap[rule2Name]?.get(rule3Name)?.add(d) |
| | | break |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | return result |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸ä¼ çåè§åæ£åæ
åµï¼ç产å项å¾åè®°å½ |
| | | * æ ¹æ®ä¸ä¼ çåè§åæ£åæ
åµï¼çæå项å¾åè®°å½ |
| | | * @param rule æ»è§å |
| | | * @param eGuid æ»åè®°å½id |
| | | * @param userId ç¨æ·id |
| | |
| | | var result: Pair<String?, String?> = Pair(null, null) |
| | | var exist = false |
| | | for (i in itemEvaluationList) { |
| | | //è®°å½å·²åå¨ï¼è¯´ææ¯ç¶é¡¹çè¯åè§åä¸çæä¸ªå项çä¸é¨åæ£åï¼æ£åç´¯å |
| | | //è®°å½å·²åå¨ï¼è¯´ææ¯ç¶é¡¹çè¯åè§åä¸çæä¸ªå项çä¸é¨åæ£åï¼æ£åç´¯å ,å¹¶ä¸ä¸è½è¶
è¿ç¶é¡¹çä¸é |
| | | if (subRule.guid == i.esrguid) { |
| | | i.value = i.value?.toInt()?.plus(score.toInt())?.toString() |
| | | val s = i.value?.toInt()?.plus(score.toInt()) ?: 0 |
| | | //å 忍¡å¼ |
| | | if (subRule.extension2 == "add_mode") { |
| | | if (s > (subRule.maxscore ?: 0)) { |
| | | i.value = subRule.maxscore?.toString() ?: "0" |
| | | } else { |
| | | i.value = s.toString() |
| | | } |
| | | } |
| | | //é»è®¤æ
åµä¸ºå忍¡å¼ |
| | | else { |
| | | //å
许æ£é¤çåæ°æå°å¼ï¼è´æ°ï¼ |
| | | val min = subRule.minscore?.minus(subRule.maxscore ?: 0) ?: 0 |
| | | if (s < min) { |
| | | i.value = min.toString() |
| | | } else { |
| | | i.value = s.toString() |
| | | } |
| | | } |
| | | result = Pair(subRule.fatherid, i.value) |
| | | exist = true |
| | | break |
| | |
| | | } |
| | | } else { |
| | | for (i in pointLevel.indices) { |
| | | if (score in pointLevel[i].first..pointLevel[i].second) { |
| | | if (score in pointLevel[i].first..pointLevel[i].second || |
| | | (i == pointLevel.size - 1 && score > pointLevel[i].second)) { |
| | | result["color"] = levelColors[i % levelColors.size] |
| | | result["creditText"] = creditTexts[i % creditTexts.size] |
| | | result["evaluateLevel"] = evaluateLevel[i % evaluateLevel.size] |
| | |
| | | import cn.flightfeather.supervision.domain.entity.Evaluationrule |
| | | import cn.flightfeather.supervision.domain.entity.Evaluationsubrule |
| | | import cn.flightfeather.supervision.domain.entity.Itemevaluation |
| | | import cn.flightfeather.supervision.domain.enumeration.SceneType |
| | | import cn.flightfeather.supervision.domain.mapper.* |
| | | import cn.flightfeather.supervision.lightshare.service.EvaluationsubruleService |
| | | import cn.flightfeather.supervision.lightshare.vo.EvaluationVo |
| | |
| | | return evaluationsubruleMapper.selectByExample(example) |
| | | } |
| | | |
| | | override fun getScore(userId: String, time: String): List<EvaluationVo> { |
| | | override fun getScore(userId: String, time: String, platform:String?): List<EvaluationVo> { |
| | | val userinfo = userinfoMapper.selectByPrimaryKey(userId) ?: return emptyList() |
| | | val sceneType = userinfo.extension2 |
| | | var sceneType = userinfo.extension2 |
| | | // FIXME: 2022/11/8 ä¸´æ¶æ·»å è¿åº¦åè½ï¼æä¾å¾®ä¿¡å°ç¨åºå端汽修类åçåºæ¯åç¬çè¯ä¼°æ¸
å ï¼åºæ¯ç±»å为 -7 |
| | | if (platform == "weixin" && sceneType == SceneType.VehicleRepair.value.toString()) { |
| | | sceneType = "-7" |
| | | } |
| | | //è¯åæ»è§å |
| | | val rules = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply { |
| | | createCriteria().andEqualTo("scensetypeid", sceneType) |
| | |
| | | 2 -> resultList.add(EvaluationVo().apply { |
| | | id = it.guid |
| | | title1 = it.itemname |
| | | score = it.minscore?.minus(it.maxscore ?: 0) ?: 0 |
| | | scoreMode = it.extension1 |
| | | gradeMode = it.extension2 |
| | | score = when (gradeMode) { |
| | | "minus_mode" -> it.minscore?.minus(it.maxscore ?: 0) ?: 0 |
| | | "add_mode" -> it.maxscore ?: 0 |
| | | else -> it.minscore?.minus(it.maxscore ?: 0) ?: 0 |
| | | } |
| | | selectMode = it.extension3 |
| | | |
| | | //妿æå¾åè®°å½ï¼åæ¹åç¶æä¸ºéä¸ |
| | | for (s in subRuleScores) { |
| | |
| | | r.sub1.add(SubEvaluationVo().apply { |
| | | id = it.guid |
| | | title2 = it.itemname |
| | | score = it.minscore?.minus(it.maxscore ?: 0) ?: 0 |
| | | gradeMode = it.extension2 |
| | | selectMode = it.extension3 |
| | | score = when (gradeMode) { |
| | | "minus_mode" -> it.minscore?.minus(it.maxscore ?: 0) ?: 0 |
| | | "add_mode" -> it.maxscore ?: 0 |
| | | else -> it.minscore?.minus(it.maxscore ?: 0) ?: 0 |
| | | } |
| | | group = _group++ |
| | | |
| | | //妿æå¾åè®°å½ï¼åæ¹åç¶æä¸ºéä¸ |
| | |
| | | } |
| | | 4 -> { |
| | | resultList.forEach{ r -> |
| | | //4级çè¯ä¼°é¡¹ç´æ¥éå±äº2级è¯ä¼°é¡¹ |
| | | if (r.id == it.fatherid) { |
| | | if (r.sub1.isEmpty()) { |
| | | r.sub1.add(SubEvaluationVo().apply { |
| | |
| | | id = it.guid |
| | | title2 = r.title1 |
| | | score = r.score |
| | | gradeMode = r.gradeMode |
| | | selectMode = r.selectMode |
| | | group = _group++ |
| | | }) |
| | | } |
| | | r.sub1[0].sub2.add(ThirdEvaluationVo().apply { |
| | | id = it.guid |
| | | content = it.itemname |
| | | score = r.score.plus(it.maxscore ?: 0) |
| | | score = when (r.sub1[0].gradeMode) { |
| | | "minus_mode" -> r.score.plus(it.maxscore ?: 0) |
| | | "add_mode" -> it.maxscore ?: 0 |
| | | else -> r.score.plus(it.maxscore ?: 0) |
| | | } |
| | | //妿æå¾åè®°å½ï¼åæ¹åç¶æä¸ºéä¸ |
| | | for (s in subRuleScores) { |
| | | if (it.guid == s.esrguid) { |
| | |
| | | sr.sub2.add(ThirdEvaluationVo().apply { |
| | | id = it.guid |
| | | content = it.itemname |
| | | score = sr.score.plus(it.maxscore ?: 0) |
| | | score = when (sr.gradeMode) { |
| | | "minus_mode" -> sr.score.plus(it.maxscore ?: 0) |
| | | "add_mode" -> it.maxscore ?: 0 |
| | | else -> sr.score.plus(it.maxscore ?: 0) |
| | | } |
| | | //妿æå¾åè®°å½ï¼åæ¹åç¶æä¸ºéä¸ |
| | | for (s in subRuleScores) { |
| | | if (it.guid == s.esrguid) { |
| | |
| | | import cn.flightfeather.supervision.domain.entity.Law |
| | | import cn.flightfeather.supervision.domain.entity.LawsRegulations |
| | | import cn.flightfeather.supervision.domain.enumeration.SceneType |
| | | import cn.flightfeather.supervision.domain.mapper.BaseInfoMapper |
| | | import cn.flightfeather.supervision.domain.mapper.LawMapper |
| | | import cn.flightfeather.supervision.domain.mapper.LawsRegulationsMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserinfoMapper |
| | | import cn.flightfeather.supervision.lightshare.service.LawService |
| | | import cn.flightfeather.supervision.lightshare.vo.LawVo |
| | | import cn.flightfeather.supervision.lightshare.vo.LawsRegulationsCondition |
| | |
| | | import javax.servlet.http.HttpServletResponse |
| | | |
| | | @Service |
| | | class LawServiceImpl(val lawMapper: LawMapper, val lawsRegulationsMapper: LawsRegulationsMapper) : LawService { |
| | | class LawServiceImpl( |
| | | val lawMapper: LawMapper, |
| | | val lawsRegulationsMapper: LawsRegulationsMapper, |
| | | val userinfoMapper: UserinfoMapper, |
| | | val baseInfoMapper: BaseInfoMapper |
| | | ) : LawService { |
| | | |
| | | override fun getLaws(page: Int, per_page: Int, response: HttpServletResponse): ArrayList<LawVo> { |
| | | val counts = lawMapper.selectCountByExample(Example(Law::class.java)) |
| | |
| | | return law.laText |
| | | } |
| | | |
| | | override fun getLawsRegulations( |
| | | condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations> { |
| | | override fun getLawsRegulations(userId: String, |
| | | condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations> { |
| | | // val userInfo = userinfoMapper.selectByPrimaryKey(userId) |
| | | val baseInfo = baseInfoMapper.selectByPrimaryKey(userId) |
| | | val example = Example(LawsRegulations::class.java).apply { |
| | | createCriteria().apply { |
| | | condition.apply { |
| | |
| | | andEqualTo("lrResourcefiletype", it) |
| | | } |
| | | } |
| | | // baseInfo?.biDistrictCode?.let { |
| | | // andEqualTo("biDistrictCode", it) |
| | | // } |
| | | } |
| | | condition.sceneTypeId?.let { |
| | | if (it != SceneType.NoType.value) { |
| | |
| | | return emptyList() |
| | | } |
| | | |
| | | private fun getLedgerRecords(userId: String, ledgerSubTypeId: Int?, sceneType: Int, time: String): List<LedgerRecord> { |
| | | override fun getLedgerRecords(userId: String, ledgerSubTypeId: Int?, sceneType: Int, time: String): List<LedgerRecord> { |
| | | val ledgerSubTypes = ledgerSubTypeMapper.selectByExample(Example(LedgerSubType::class.java).apply { |
| | | if (ledgerSubTypeId != null) { |
| | | createCriteria().andEqualTo("lsSubtypeid", ledgerSubTypeId) |
| | |
| | | package cn.flightfeather.supervision.lightshare.service.Impl |
| | | |
| | | import cn.flightfeather.supervision.common.net.WXHttpService |
| | | import cn.flightfeather.supervision.common.wx.MessageWxVo |
| | | import cn.flightfeather.supervision.common.wx.TemplateManager |
| | | import cn.flightfeather.supervision.common.wx.WxTokenManager |
| | | import cn.flightfeather.supervision.domain.entity.* |
| | | import cn.flightfeather.supervision.domain.enumeration.DistrictType |
| | | import cn.flightfeather.supervision.domain.enumeration.UserType |
| | |
| | | import cn.flightfeather.supervision.lightshare.service.NotificationService |
| | | import cn.flightfeather.supervision.lightshare.vo.NoticeReadStateVo |
| | | import cn.flightfeather.supervision.lightshare.vo.NotificationVo |
| | | import cn.flightfeather.supervision.push.PushService |
| | | import cn.flightfeather.supervision.common.push.PushService |
| | | import cn.flightfeather.supervision.domain.enumeration.ParticipantType |
| | | import cn.flightfeather.supervision.domain.enumeration.SceneType |
| | | import cn.flightfeather.supervision.domain.mapper.* |
| | | import cn.flightfeather.supervision.infrastructure.utils.UUIDGenerator |
| | | import com.alibaba.fastjson.JSON |
| | | import com.flightfeather.taizhang.model.enumeration.NotificationType |
| | | import com.flightfeather.taizhang.model.enumeration.WorkSubType |
| | | import com.github.pagehelper.PageHelper |
| | |
| | | package cn.flightfeather.supervision.lightshare.service.Impl |
| | | |
| | | import cn.flightfeather.supervision.common.nlp.NlpController |
| | | import cn.flightfeather.supervision.domain.entity.* |
| | | import cn.flightfeather.supervision.domain.enumeration.* |
| | | import cn.flightfeather.supervision.domain.mapper.* |
| | |
| | | private val userinfoMapper: UserinfoMapper, |
| | | private val cstQuestionMapper: CstQuestionMapper, |
| | | private val settingAnswerMapper: SettingAnswerMapper, |
| | | private val enforceCaseMapper: EnforceCaseMapper |
| | | private val enforceCaseMapper: EnforceCaseMapper, |
| | | private val nlpController: NlpController |
| | | ) : OnLineQuestionService { |
| | | @Resource |
| | | private val onLineQuestionMapper: OnLineQuestionMapper? = null |
| | |
| | | } |
| | | |
| | | override fun searchLaw(userId: String, keyword: String, type: Byte?, page: Int, perPage: Int): BaseResponse<List<ConsultResultVo>> { |
| | | val keywordList = if (keyword.isBlank()) { |
| | | emptyList() |
| | | } else { |
| | | nlpController.execute(keyword) |
| | | } |
| | | val userInfo = userinfoMapper.selectByPrimaryKey(userId) ?: return BaseResponse(false) |
| | | val response = BaseResponse<List<ConsultResultVo>>(false, head = DataHead(page, perPage)) |
| | | val result = mutableListOf<ConsultResultVo>() |
| | |
| | | if (type == null || type == ConsultResultType.TYPE1.value) { |
| | | val p = PageHelper.startPage<MgtFile>(_page, _perPage) |
| | | val example = Example(MgtFile::class.java).apply { |
| | | if (keyword.isNotBlank()) { |
| | | createCriteria().orLike("mfName", "%${keyword}%") |
| | | .orLike("mfShortName", "%${keyword}%") |
| | | .orLike("mfSummary", "%${keyword}%") |
| | | .orLike("mfKeywordLv1", "%${keyword}%") |
| | | .orLike("mfKeywordLv2", "%${keyword}%") |
| | | .orLike("mfKeywordLv3", "%${keyword}%") |
| | | .orLike("mfKeywordLv4", "%${keyword}%") |
| | | if (keywordList.isNotEmpty()) { |
| | | createCriteria().apply { |
| | | keywordList.forEach { k -> |
| | | orLike("mfName", "%${k}%") |
| | | orLike("mfShortName", "%${k}%") |
| | | orLike("mfSummary", "%${k}%") |
| | | orLike("mfKeywordLv1", "%${k}%") |
| | | orLike("mfKeywordLv2", "%${k}%") |
| | | orLike("mfKeywordLv3", "%${k}%") |
| | | orLike("mfKeywordLv4", "%${k}%") |
| | | } |
| | | } |
| | | and(createCriteria().orLike("mfExtension1", "%${userInfo.extension2}%") |
| | | .orEqualTo("mfExtension1", "") |
| | | .orIsNull("mfExtension1")) |
| | | } else { |
| | | // TODO: 2022/9/8 没æå
³é®åæ¶ï¼æç
§çé¨è·åæºå¶è·å |
| | | createCriteria().orLike("mfExtension1", "%${userInfo.extension2}%") |
| | |
| | | val map = mutableMapOf<String, MgtFile>() |
| | | val p = PageHelper.startPage<MgtItem>(_page, _perPage) |
| | | val example = Example(MgtItem::class.java).apply { |
| | | if (keyword.isNotBlank()) { |
| | | createCriteria().orLike("miChapterKeyword", "%${keyword}%") |
| | | .orLike("miKeyword", "%${keyword}%") |
| | | if (keywordList.isNotEmpty()) { |
| | | createCriteria().apply { |
| | | keywordList.forEach { k -> |
| | | orLike("miChapterKeyword", "%${k}%") |
| | | orLike("miKeyword", "%${k}%") |
| | | } |
| | | } |
| | | } else { |
| | | // TODO: 2022/9/8 没æå
³é®åæ¶ï¼æç
§çé¨è·åæºå¶è·åæ¡ç® |
| | | } |
| | | } |
| | | mgtItemMapper.selectByExample(example).forEach { |
| | | |
| | | if (!map.containsKey(it.mfGuid)) { |
| | | map[it.mfGuid] = mgtFileMapper.selectByPrimaryKey(it.mfGuid) |
| | | } |
| | |
| | | if (type == null || type == ConsultResultType.TYPE4.value) { |
| | | val p = PageHelper.startPage<CstQuestion>(_page, _perPage) |
| | | val example = Example(CstQuestion::class.java).apply { |
| | | if (keyword.isNotBlank()) { |
| | | if (keywordList.isNotEmpty()) { |
| | | createCriteria().orLike("cqScenes", "%${userInfo.extension2}%") |
| | | .orEqualTo("cqScenes", "") |
| | | .orIsNull("cqScenes") |
| | | and( |
| | | createCriteria().orLike("cqContent", "%${keyword}%") |
| | | .orLike("cqKeywords", "%${keyword}%") |
| | | createCriteria().apply { |
| | | keywordList.forEach { k -> |
| | | orLike("cqContent", "%${k}%") |
| | | orLike("cqKeywords", "%${k}%") |
| | | } |
| | | } |
| | | ) |
| | | } else { |
| | | // TODO: 2022/9/8 没æå
³é®åæ¶ï¼æç
§çé¨è·åæºå¶è·å |
| | |
| | | if (type == null || type == ConsultResultType.TYPE3.value) { |
| | | val p = PageHelper.startPage<EnforceCase>(_page, _perPage) |
| | | val example = Example(EnforceCase::class.java).apply { |
| | | if (keyword.isNotBlank()) { |
| | | if (keywordList.isNotEmpty()) { |
| | | createCriteria().orLike("ecScenes", "%${userInfo.extension2}%") |
| | | .orEqualTo("ecScenes", "") |
| | | .orIsNull("ecScenes") |
| | | and( |
| | | createCriteria().orLike("ecTitle", "%${keyword}%") |
| | | .orLike("ecKeywords", "%${keyword}%") |
| | | createCriteria().apply { |
| | | keywordList.forEach { k -> |
| | | orLike("ecTitle", "%${k}%") |
| | | orLike("ecKeywords", "%${k}%") |
| | | } |
| | | } |
| | | ) |
| | | } else { |
| | | // TODO: 2022/9/8 没æå
³é®åæ¶ï¼æç
§çé¨è·åæºå¶è·å |
| | |
| | | //ç¨æ·openid |
| | | val openId = (json["FromUserName"] as String?) ?: throw NullPointerException("微信æå¡å¨åéç订é
è¿åæ¶æ¯FromUserNameåæ®µä¸ºnull") |
| | | //æ¶é´æ³ |
| | | val createTime = (json["CreateTime"] as Int?) ?: throw NullPointerException("微信æå¡å¨åéç订é
è¿åæ¶æ¯CreateTimeåæ®µä¸ºnull") |
| | | var createTime = (json["CreateTime"] as Int?)?.toLong() ?: throw NullPointerException("微信æå¡å¨åéç订é
è¿åæ¶æ¯CreateTimeåæ®µä¸ºnull") |
| | | createTime = createTime.times(1000)//æ¤å¤ä¼ è¿æ¥çæ¶é´æ³åªç²¾ç¡®å°ç§ï¼è½¬æ¢ä¸ºæ¯«ç§ |
| | | //äºä»¶ç±»åï¼æ¤å¤åºè¯¥é½æ¯event |
| | | val msgType = json["MsgType"] as String? |
| | | |
| | |
| | | val templateId = it["TemplateId"] as String? |
| | | val sStatus = it["SubscribeStatusString"] as String? |
| | | //æ ¹æ®æ¶é´åç¨æ·openIdï¼å¤ææ¤æ¬¡æä½æ¯å¦éå¤ |
| | | val time = Date(createTime.toLong() * 1000) |
| | | val time = Date(createTime.toLong()) |
| | | val records = msgSubscribeWxMapper.selectByExample(Example(MsgSubscribeWx::class.java).apply { |
| | | createCriteria().andEqualTo("msOpenId", openId) |
| | | .andEqualTo("msTemplateId", templateId) |
| | |
| | | |
| | | fun getLawText(lawId: String): String |
| | | |
| | | fun getLawsRegulations(condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations> |
| | | fun getLawsRegulations(userId: String, condition: LawsRegulationsCondition, page: Int, per_page: Int, response: HttpServletResponse): List<LawsRegulations> |
| | | |
| | | fun getLawsRegulationsWithEachType(condition: LawsRegulationsCondition): List<LawsRegulations> |
| | | |
| | |
| | | package cn.flightfeather.supervision.lightshare.service |
| | | |
| | | import cn.flightfeather.supervision.domain.entity.LedgerRecord |
| | | import cn.flightfeather.supervision.lightshare.vo.* |
| | | import org.springframework.http.client.MultipartBodyBuilder |
| | | import org.springframework.web.multipart.MultipartFile |
| | |
| | | |
| | | fun getLedgerImgs(userId: String, ledgerType: List<Int>): List<LedgerVo> |
| | | |
| | | fun getLedgerRecords(userId: String, ledgerSubTypeId: Int?, sceneType: Int, time: String): List<LedgerRecord> |
| | | |
| | | fun copyLedger(userId: String, time: String, copyLedgerList: List<CopyLedgerVo>): BaseResponse<String> |
| | | |
| | | fun checkLedger(verifierId: String, remark: String?, recordList: List<LedgerCheckVo>):BaseResponse<Boolean> |
| | |
| | | var score: Int = 0 |
| | | //æ¯å¦éä¸ |
| | | var select: Boolean = false |
| | | //basic_score: åºç¡åï¼å¿
éï¼addition_scoreï¼éå åï¼å¯éï¼nullï¼é»è®¤åºç¡å |
| | | var scoreMode: String? = "basic_score" |
| | | //minus_mode: å忍¡å¼ï¼add_modeï¼å 忍¡å¼ï¼nullï¼ä¸å设å®ï¼è¯´æå
¶å项䏿¯å
·ä½çè¯ä¼°ç»å |
| | | var gradeMode: String? = "minus_mode" |
| | | //single_mode: å鿍¡å¼ï¼multi_modeï¼å¤é模å¼ï¼nullï¼ä¸å设å®ï¼è¯´æå
¶å项䏿¯å
·ä½çè¯ä¼°ç»å |
| | | var selectMode: String? = "single_mode" |
| | | //äºçº§åè§å |
| | | var sub1: MutableList<SubEvaluationVo> = mutableListOf() |
| | | } |
| | |
| | | var score: Int = 0 |
| | | //æ¯å¦éä¸ |
| | | var select: Boolean = false |
| | | //minus_mode: å忍¡å¼ï¼add_modeï¼å 忍¡å¼ï¼ |
| | | var gradeMode: String? = "minus_mode" |
| | | //single_mode: å鿍¡å¼ï¼multi_modeï¼å¤é模å¼ï¼ |
| | | var selectMode: String? = "single_mode" |
| | | //äºçº§è§ååç» |
| | | var group: Int? = null |
| | | //ä¸çº§åè§å |
| | |
| | | @ApiParam(value = "ç¨æ·id") @PathVariable("userId") userId: String, |
| | | @ApiParam(value = "页ç ") @RequestParam(value = "page") page: Int, |
| | | @ApiParam(value = "åé¡µæ°æ®é") @RequestParam(value = "per_page") perPage: Int, |
| | | @ApiParam(value = "å端平å°") @RequestParam("platform", required = false) platform:String?, |
| | | response: HttpServletResponse |
| | | ) = evaluationService.getHistoryPoint(userId, page, perPage, response) |
| | | ) = evaluationService.getHistoryPoint(userId, page, perPage, platform, response) |
| | | |
| | | @ApiOperation(value = "è·åä¿¡ç¨è¯ä¼°ç»æ") |
| | | @GetMapping("/creditInfo") |
| | |
| | | @ApiParam(value = "ç¨æ·id") @RequestParam("userId") userId: String, |
| | | @ApiParam(value = "è¯å卿") @RequestParam("period") period: String, |
| | | @ApiParam(value = "è¯åè§åid") @RequestParam(value = "ruleId", required = false) ruleId: String?, |
| | | @ApiParam(value = "å
·ä½æ£åæ¡ç®") @RequestBody itemList: List<Pair<String, String>>, |
| | | @ApiParam(value = "å
·ä½æ£åæ¡ç®ï¼åªä¼ æå°çº§å«çè¯ä¼°é¡¹ï¼") @RequestBody itemList: List<Pair<String, String>>, |
| | | ) = evaluationService.uploadScore(userId, period, ruleId, itemList) |
| | | |
| | | @ApiOperation(value = "è·åæµè¯è¯¦æ
") |
| | |
| | | fun getScore( |
| | | @ApiParam(value = "ç¨æ·id") @RequestParam("userId") userId:String, |
| | | @ApiParam(value = "è¯ä¼°å¨æ", example = "yyyy/M-M") @RequestParam("time") time:String, |
| | | ) = evaluationsubruleService.getScore(userId, time) |
| | | @ApiParam(value = "å端平å°") @RequestParam("platform", required = false) platform:String?, |
| | | ) = evaluationsubruleService.getScore(userId, time, platform) |
| | | } |
| | |
| | | @ApiParam(value = "页ç ") @RequestParam(value = "page") page: Int, |
| | | @ApiParam(value = "åé¡µæ°æ®é") @RequestParam(value = "per_page") perPage: Int, |
| | | response: HttpServletResponse |
| | | ) = lawService.getLawsRegulations(condition, page, perPage, response) |
| | | ) = lawService.getLawsRegulations(userId, condition, page, perPage, response) |
| | | |
| | | @ApiOperation(value = "æ ¹æ®è¡ä¸ç±»åæ¥æ¾ç¸å
³æ³å¾æ³è§") |
| | | @PostMapping("/eachType/{userId}") |
| | |
| | | */ |
| | | @Component |
| | | class TaskController( |
| | | fetchVOC: TaskFetchVOC, pushFume: TaskPushFume |
| | | fetchVOC: TaskFetchVOC, pushFume: TaskPushFume, ledgerCopy: TaskLedgerCopy |
| | | ) { |
| | | |
| | | companion object { |
| | |
| | | init { |
| | | LOGGER.info("æ·»å 宿¶ä»»å¡") |
| | | timeTask.clear() |
| | | //é£ç¾½ç¯å¢ï¼è·åvocæ°æ®ãæ¨éæ²¹çæ°æ® |
| | | // timeTask.add(fetchVOC) |
| | | // timeTask.add(pushFume) |
| | | |
| | | //微信å°ç¨åºï¼ä¸å°ä¼ä¸å®æ³èªå©ï¼ï¼å°è´¦å¤å¶ã宿¶ä»»å¡æ¨éç |
| | | timeTask.add(ledgerCopy) |
| | | LOGGER.info("æ·»å 宿¶ä»»å¡å®æï¼ä»»å¡æ»è®¡${timeTask.size}个") |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | val localtime = LocalDateTime.now() |
| | | LOGGER.info("宿¶ä»»å¡æ§è¡ï¼å®æ¶ä»»å¡æ°ï¼${timeTask.size}") |
| | | // LOGGER.info("宿¶ä»»å¡æ§è¡ï¼å®æ¶ä»»å¡æ°ï¼${timeTask.size}") |
| | | timeTask.forEach { |
| | | LOGGER.info("宿¶ä»»å¡ï¼${it.javaClass.name}") |
| | | // LOGGER.info("宿¶ä»»å¡ï¼${it.javaClass.name}") |
| | | it.execute(localtime) |
| | | } |
| | | // localtime = localtime.plusMinutes(1) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.timingtask |
| | | |
| | | import cn.flightfeather.supervision.domain.entity.LedgerMediaFile |
| | | import cn.flightfeather.supervision.domain.entity.LedgerRecord |
| | | import cn.flightfeather.supervision.domain.mapper.LedgerMediaFileMapper |
| | | import cn.flightfeather.supervision.domain.mapper.LedgerRecordMapper |
| | | import cn.flightfeather.supervision.infrastructure.utils.UUIDGenerator |
| | | import org.slf4j.Logger |
| | | import org.slf4j.LoggerFactory |
| | | import org.springframework.stereotype.Component |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.LocalDateTime |
| | | import java.time.ZoneId |
| | | import java.util.* |
| | | |
| | | /** |
| | | * å°è´¦èªå¨å¤å¶ä»»å¡ |
| | | */ |
| | | @Component |
| | | class TaskLedgerCopy( |
| | | private val ledgerRecordMapper: LedgerRecordMapper, |
| | | private val ledgerMediaFileMapper: LedgerMediaFileMapper |
| | | ) : BaseTimingTask() { |
| | | |
| | | private val LOGGER: Logger? = LoggerFactory.getLogger(TaskLedgerCopy::class.java) |
| | | |
| | | //å°è´¦å¤å¶çæ¥æ |
| | | var copyDay = 11 |
| | | |
| | | override val period: Long |
| | | get() = 1440L |
| | | |
| | | override fun doTask(localtime: LocalDateTime) { |
| | | //1. æ¥è¯¢æ¯ä¸ªæ¿æ´»ç¶æçç¨æ·éè¦å¤å¶çæ¯ç§å°è´¦çææ°ä¸æ¡è®°å½ï¼ |
| | | ledgerRecordMapper.setRowNumber() |
| | | ledgerRecordMapper.setGroup() |
| | | val records = ledgerRecordMapper.getNeedCopyLedgers() |
| | | if (records.isEmpty()) return |
| | | |
| | | LOGGER?.info("===========å¼å§æ§è¡å°è´¦å¤å¶ä»»å¡===============") |
| | | LOGGER?.info("=> éå¤å¶çå°è´¦æ»æ°ä¸ºï¼${records.size}") |
| | | var count = 0 |
| | | val year = localtime.year |
| | | val month = localtime.monthValue |
| | | val day = localtime.dayOfMonth |
| | | records.forEach { lr -> |
| | | //å°è´¦å»é夿 |
| | | val r = ledgerRecordMapper.selectByExample(Example(LedgerRecord::class.java).apply { |
| | | createCriteria().andEqualTo("lrYear", year) |
| | | .andEqualTo("lrMonth", month) |
| | | .andEqualTo("lsSubtypeid", lr.lsSubtypeid) |
| | | .andEqualTo("lrSubmitid", lr.lrSubmitid) |
| | | }) |
| | | if (r.isNotEmpty()) return@forEach |
| | | |
| | | //è·åè®°å½å¯¹åºçæä»¶ä¿¡æ¯ |
| | | val fileList = ledgerMediaFileMapper.selectByExample(Example(LedgerMediaFile::class.java).apply { |
| | | createCriteria().andEqualTo("lrGuid", lr.lrGuid) |
| | | }) |
| | | if (fileList.size == 0) return@forEach |
| | | val file = fileList[0] ?: return@forEach |
| | | |
| | | //ä¿®æ¹è®°å½ä¿¡æ¯ï¼å¤å¶ä¸ºæ°çå°è´¦ |
| | | lr.lrGuid = UUIDGenerator.generate16ShortUUID() |
| | | lr.lrYear = year |
| | | lr.lrMonth = month.toByte() |
| | | lr.lrDay = day.toByte() |
| | | lr.lrIssubmitontime = true |
| | | lr.lrSubmitdate = Date.from(localtime.atZone(ZoneId.systemDefault()).toInstant()) |
| | | lr.lrExtension2 = "copy"//è¡¨ææ¯å¤å¶çå°è´¦ |
| | | ledgerRecordMapper.insert(lr) |
| | | |
| | | //ä¿®æ¹å¯¹åºçæä»¶ä¿¡æ¯ |
| | | file.apply { |
| | | mfGuid = UUIDGenerator.generate16ShortUUID() |
| | | lrGuid = lr.lrGuid |
| | | mfSavetime = Date() |
| | | } |
| | | count += ledgerMediaFileMapper.insert(file) |
| | | } |
| | | |
| | | LOGGER?.info("=> æåå¤å¶çå°è´¦æ°ï¼${count}") |
| | | LOGGER?.info("===========å°è´¦å¤å¶ä»»å¡å®æ===============") |
| | | } |
| | | |
| | | /** |
| | | * å°è´¦èªå¨å¤å¶ä»»å¡å®ä¸ºæ¯æ11å·æ©ä¸1ç¹ï¼ï¼æ¯æç10å·ä¸ºå°è´¦åæ¶æäº¤çæåæéï¼ |
| | | */ |
| | | override fun execute(localtime: LocalDateTime) { |
| | | if (localtime.dayOfMonth == copyDay && localtime.hour == 1) { |
| | | doTask(localtime) |
| | | } |
| | | } |
| | | } |
| | |
| | | package cn.flightfeather.supervision.timingtask |
| | | |
| | | import cn.flightfeather.supervision.common.wx.TemplateManager |
| | | import cn.flightfeather.supervision.domain.entity.LedgerSubType |
| | | import cn.flightfeather.supervision.domain.entity.MsgSubscribeWx |
| | | import cn.flightfeather.supervision.domain.enumeration.SceneType |
| | | import cn.flightfeather.supervision.domain.mapper.LedgerSubTypeMapper |
| | | import cn.flightfeather.supervision.domain.mapper.MsgSubscribeWxMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserInfoWxMapper |
| | | import cn.flightfeather.supervision.domain.mapper.UserinfoMapper |
| | | import cn.flightfeather.supervision.lightshare.service.LedgerService |
| | | import org.slf4j.Logger |
| | | import org.slf4j.LoggerFactory |
| | | import org.springframework.stereotype.Component |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.LocalDateTime |
| | | import java.time.format.DateTimeFormatter |
| | | |
| | | /** |
| | | * å°è´¦ä¸ä¼ åè®¡æ¶æé |
| | | */ |
| | | @Component |
| | | class TaskLedgerRemind( |
| | | private val msgSubscribeWxMapper: MsgSubscribeWxMapper |
| | | private val msgSubscribeWxMapper: MsgSubscribeWxMapper, |
| | | private val userInfoWxMapper: UserInfoWxMapper, |
| | | private val userinfoMapper: UserinfoMapper, |
| | | private val ledgerSubTypeMapper: LedgerSubTypeMapper, |
| | | private val ledgerService: LedgerService, |
| | | private val templateManager: TemplateManager |
| | | ) : BaseTimingTask() { |
| | | |
| | | private val LOGGER: Logger? = LoggerFactory.getLogger(TaskLedgerRemind::class.java) |
| | | |
| | | //åºæ¯å对åºçå°è´¦ç±»å |
| | | private val ledgerTypeMap = mutableMapOf<String, MutableList<LedgerSubType>>() |
| | | |
| | | override val period: Long |
| | | get() = 1440L |
| | | |
| | | override fun doTask(localtime: LocalDateTime) { |
| | | LOGGER?.info("===========å¼å§æ§è¡å°è´¦æéæ¨éä»»å¡===============") |
| | | //1.éæ©å·²è®¢é
äºè¯¥æ¡æéçå¾®ä¿¡ç¨æ· |
| | | val ms = msgSubscribeWxMapper.selectByExample(Example(MsgSubscribeWx::class.java).apply { |
| | | createCriteria().andEqualTo("msTemplateId", TemplateManager.TEMPLATE_1) |
| | | .andGreaterThan("msCount", 0) |
| | | .andEqualTo("msAccept", true) |
| | | }) |
| | | //2.æ¥æ¾å¾®ä¿¡ç¨æ·ç»å®çåºæ¯å°è´¦ä¸ä¼ æ
åµ |
| | | //3.æ ¹æ®ç»è®¡ç»æå³å®æ¯å¦åéæéæ¨é |
| | | LOGGER?.info("=> 坿¥æ¶æ¨éçå¾®ä¿¡ç¨æ·æ»æ°ä¸ºï¼${ms.size}") |
| | | var count = 0 |
| | | ms.forEach { |
| | | //2.æ¥æ¾å¾®ä¿¡ç¨æ·ç»å®çåºæ¯å°è´¦ä¸ä¼ æ
åµ |
| | | val uInfoWx = userInfoWxMapper.selectByPrimaryKey(it?.msOpenId) ?: return@forEach |
| | | val userinfo = userinfoMapper.selectByPrimaryKey(uInfoWx.uiGuid) ?: return@forEach |
| | | if (userinfo.extension2 == null) { |
| | | LOGGER?.error("ç¨æ·[${userinfo.acountname}]çåºæ¯ç±»ååæ®µä¸ºç©º") |
| | | return@forEach |
| | | } |
| | | |
| | | //2.1 è·åç¨æ·å¯¹åºçå°è´¦ç±»å |
| | | val ledgerSubTypes = if (ledgerTypeMap.containsKey(userinfo.extension2)) { |
| | | ledgerTypeMap[userinfo.extension2] |
| | | } else { |
| | | ledgerSubTypeMapper.selectByExample(Example(LedgerSubType::class.java).apply { |
| | | createCriteria().andEqualTo("lScenetype", userinfo.extension2) |
| | | orderBy("lTypeid") |
| | | }) |
| | | } |
| | | //2.2 è·åç¨æ·å½åæä»½çæäº¤è®°å½ |
| | | val records = ledgerService.getLedgerRecords(uInfoWx.uiGuid, null, userinfo.extension2!!.toInt(), localtime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))) |
| | | var mustTotal = 0//å¿
å¡«é¡¹æ»æ° |
| | | var mustCount = 0//å¿
填项ä¸ä¼ æ° |
| | | ledgerSubTypes?.forEach { t -> |
| | | if (t.getlNeedupdate()) mustTotal++ |
| | | |
| | | for (r in records) { |
| | | if (t.lsSubtypeid == r.lsSubtypeid) { |
| | | mustCount++ |
| | | break |
| | | } |
| | | } |
| | | } |
| | | //3.æ ¹æ®ç»è®¡ç»æå³å®æ¯å¦åéæéæ¨é |
| | | if (mustCount < mustTotal) { |
| | | val leftDay = 10 - localtime.dayOfMonth |
| | | templateManager.sendMsg(0, it!!.msOpenId, |
| | | listOf("å°è´¦ä¸ä¼ ", "${localtime.year}å¹´${localtime.monthValue}æ10æ¥", leftDay.toString(), "请éç¹å
³æ³¨ç°åºèªå¯»æ¥é¨å")) |
| | | count++ |
| | | } |
| | | } |
| | | LOGGER?.info("=> å®é
æ¨éçå¾®ä¿¡ç¨æ·æ°ä¸ºï¼${count}") |
| | | LOGGER?.info("===========å°è´¦æéæ¨éä»»å¡ç»æ===============") |
| | | } |
| | | |
| | | /** |
| | | * å°è´¦æéä»»å¡å®ä¸ºæ¯æ5å·æ©ä¸10ç¹æé彿10å·ä¹åæäº¤å°è´¦ |
| | | * å°è´¦æéä»»å¡å®ä¸ºæ¯æ5å·æ9å·æ©ä¸10ç¹æé彿10å·ä¹åæäº¤å°è´¦ |
| | | */ |
| | | override fun execute(localtime: LocalDateTime) { |
| | | if (localtime.dayOfMonth == 5) { |
| | | if (localtime.dayOfMonth == 5 || localtime.dayOfMonth == 9) { |
| | | doTask(localtime) |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | get() = 1L |
| | | |
| | | override fun doTask(localtime: LocalDateTime) { |
| | | LOGGER.info("===========å¼å§æ§è¡æ²¹çæ°æ®ä¸ä¼ ä»»å¡===============") |
| | | // å·æ°çæµç¹ç¼å· |
| | | refreshDeviceCode() |
| | | |
| | | //æ¯10åé计ç®ä¸æ¬¡å¹³åå¼å¹¶ä¸ä¼ |
| | | // FIXME: 2021/4/8 åå¼ç计ç®é»è¾ä¹ååºè¯¥æ¾å°å
¶ä»æ¨¡å |
| | | val min = localtime.minute |
| | | if (min != 0 && min != 10 && min != 20 && min != 30 && min != 40 && min != 50) return |
| | | |
| | | LOGGER.info("===========å¼å§æ§è¡æ²¹çæ°æ®ä¸ä¼ ä»»å¡===============") |
| | | // å·æ°çæµç¹ç¼å· |
| | | refreshDeviceCode() |
| | | |
| | | //计ç®å弿¶é´ |
| | | val endTime = Date.from(localtime.minusMinutes(1).withSecond(59).atZone(ZoneId.systemDefault()).toInstant()) |
| | | val startTime = Date.from(localtime.minusMinutes(10).withSecond(0).atZone(ZoneId.systemDefault()).toInstant()) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.timingtask |
| | | |
| | | import cn.flightfeather.supervision.common.wx.TemplateManager |
| | | import cn.flightfeather.supervision.domain.entity.MsgSubscribeWx |
| | | import cn.flightfeather.supervision.domain.mapper.MsgSubscribeWxMapper |
| | | import org.springframework.stereotype.Component |
| | | import tk.mybatis.mapper.entity.Example |
| | | import java.time.LocalDateTime |
| | | |
| | | /** |
| | | * æ¯æèªè¯åè®¡æ¶æé |
| | | */ |
| | | @Component |
| | | class TaskScoreRemind( |
| | | private val msgSubscribeWxMapper: MsgSubscribeWxMapper |
| | | ) : BaseTimingTask() { |
| | | |
| | | override val period: Long |
| | | get() = 1440L |
| | | |
| | | override fun doTask(localtime: LocalDateTime) { |
| | | //1.éæ©å·²è®¢é
äºè¯¥æ¡æéçå¾®ä¿¡ç¨æ· |
| | | val ms = msgSubscribeWxMapper.selectByExample(Example(MsgSubscribeWx::class.java).apply { |
| | | createCriteria().andEqualTo("msTemplateId", TemplateManager.TEMPLATE_1) |
| | | .andGreaterThan("msCount", 0) |
| | | }) |
| | | //2.æ¥æ¾å¾®ä¿¡ç¨æ·ç»å®çåºæ¯å°è´¦ä¸ä¼ æ
åµ |
| | | //3.æ ¹æ®ç»è®¡ç»æå³å®æ¯å¦åéæéæ¨é |
| | | } |
| | | |
| | | /** |
| | | * å°è´¦æéä»»å¡å®ä¸ºæ¯æ5å·æ©ä¸10ç¹æé彿10å·ä¹åæäº¤å°è´¦ |
| | | */ |
| | | override fun execute(localtime: LocalDateTime) { |
| | | if (localtime.dayOfMonth == 5) { |
| | | doTask(localtime) |
| | | } |
| | | } |
| | | } |
| | |
| | | # password: 123456 |
| | | #-TestEnd- |
| | | |
| | | url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false |
| | | url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&allowMultiQueries=true&useSSL=false |
| | | username: ledger |
| | | password: ledger_fxxchackxr |
| | | |
| | | # å¼åè¿ç¨æå¡å¨ |
| | | # url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false |
| | | # url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&allowMultiQueries=true&useSSL=false |
| | | # username: remoteU1 |
| | | # password: eSoF8DnzfGTlhAjE |
| | | |
| | |
| | | <!--<table tableName="tc_t_vmroom" domainObjectName="VMRoom" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | | <!--<table tableName="ea_companyinfo" domainObjectName="Company" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | | <!--<table tableName="tc_t_m_materials_sign_state" domainObjectName="MaterialSignState" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | | <!--<table tableName="ec_t_lawsregulations" domainObjectName="LawsRegulations" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | | <table tableName="ec_t_lawsregulations" domainObjectName="LawsRegulations" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table> |
| | | <!--<table tableName="ea_t_baseinfo" domainObjectName="BaseInfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | | <!--<table tableName="ea_t_evaluation" domainObjectName="Evaluation2" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | | <!--<table tableName="ea_t_fumepurifydevice" domainObjectName="FumePurifyDevice" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>--> |
| | |
| | | <!-- <table tableName="sys_log_msg_subscribe_wx" domainObjectName="LogMsgSubscribeWx" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"--> |
| | | <!-- enableSelectByExample="false"--> |
| | | <!-- selectByExampleQueryId="false"/>--> |
| | | <table tableName="sm_t_userinfo" domainObjectName="Userinfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" |
| | | selectByExampleQueryId="false"/> |
| | | <!-- <table tableName="sm_t_userinfo" domainObjectName="Userinfo" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/>--> |
| | | </context> |
| | | </generatorConfiguration> |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="cn.flightfeather.supervision.domain.mapper.LawsRegulationsMapper" > |
| | | <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.LawsRegulations" > |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="cn.flightfeather.supervision.domain.mapper.LawsRegulationsMapper"> |
| | | <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.LawsRegulations"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | <id column="LR_GUID" property="lrGuid" jdbcType="VARCHAR" /> |
| | | <result column="LR_ResourceTitle" property="lrResourcetitle" jdbcType="VARCHAR" /> |
| | | <result column="LR_ResourceLevel" property="lrResourcelevel" jdbcType="INTEGER" /> |
| | | <result column="LR_PicUrl" property="lrPicurl" jdbcType="VARCHAR" /> |
| | | <result column="LR_BodyUrl" property="lrBodyurl" jdbcType="VARCHAR" /> |
| | | <result column="LR_IsForeign" property="lrIsforeign" jdbcType="BIT" /> |
| | | <result column="LR_ResourceTypeId" property="lrResourcetypeid" jdbcType="INTEGER" /> |
| | | <result column="LR_IsOpen" property="lrIsopen" jdbcType="BIT" /> |
| | | <result column="LR_IsUse" property="lrIsuse" jdbcType="BIT" /> |
| | | <result column="LR_ResourceFileType" property="lrResourcefiletype" jdbcType="INTEGER" /> |
| | | <result column="LR_IsUseOutUrls" property="lrIsuseouturls" jdbcType="BIT" /> |
| | | <result column="LR_ResourceOutUrls" property="lrResourceouturls" jdbcType="VARCHAR" /> |
| | | <result column="LR_ResourceUrls" property="lrResourceurls" jdbcType="VARCHAR" /> |
| | | <result column="LR_CreatorId" property="lrCreatorid" jdbcType="VARCHAR" /> |
| | | <result column="LR_Creator" property="lrCreator" jdbcType="VARCHAR" /> |
| | | <result column="LR_CreateDate" property="lrCreatedate" jdbcType="TIMESTAMP" /> |
| | | <result column="LR_ModifierId" property="lrModifierid" jdbcType="VARCHAR" /> |
| | | <result column="LR_Modifier" property="lrModifier" jdbcType="VARCHAR" /> |
| | | <result column="LR_UpdateDate" property="lrUpdatedate" jdbcType="TIMESTAMP" /> |
| | | <result column="LR_PublishId" property="lrPublishid" jdbcType="VARCHAR" /> |
| | | <result column="LR_Publish" property="lrPublish" jdbcType="VARCHAR" /> |
| | | <result column="LR_PublishDate" property="lrPublishdate" jdbcType="TIMESTAMP" /> |
| | | <result column="LR_Version" property="lrVersion" jdbcType="VARCHAR" /> |
| | | <result column="LR_Extension1" property="lrExtension1" jdbcType="VARCHAR" /> |
| | | <result column="LR_Extension2" property="lrExtension2" jdbcType="VARCHAR" /> |
| | | <result column="LR_Extension3" property="lrExtension3" jdbcType="VARCHAR" /> |
| | | <result column="LR_Remark" property="lrRemark" jdbcType="VARCHAR" /> |
| | | <id column="LR_GUID" jdbcType="VARCHAR" property="lrGuid" /> |
| | | <result column="LR_ResourceTitle" jdbcType="VARCHAR" property="lrResourcetitle" /> |
| | | <result column="LR_ResourceLevel" jdbcType="INTEGER" property="lrResourcelevel" /> |
| | | <result column="LR_ResourceTypeId" jdbcType="INTEGER" property="lrResourcetypeid" /> |
| | | <result column="LR_ResourceFileType" jdbcType="INTEGER" property="lrResourcefiletype" /> |
| | | <result column="LR_PicUrl" jdbcType="VARCHAR" property="lrPicurl" /> |
| | | <result column="LR_BodyUrl" jdbcType="VARCHAR" property="lrBodyurl" /> |
| | | <result column="LR_IsForeign" jdbcType="BIT" property="lrIsforeign" /> |
| | | <result column="LR_IsOpen" jdbcType="BIT" property="lrIsopen" /> |
| | | <result column="LR_IsUse" jdbcType="BIT" property="lrIsuse" /> |
| | | <result column="LR_IsUseOutUrls" jdbcType="BIT" property="lrIsuseouturls" /> |
| | | <result column="LR_ResourceOutUrls" jdbcType="VARCHAR" property="lrResourceouturls" /> |
| | | <result column="LR_ResourceUrls" jdbcType="VARCHAR" property="lrResourceurls" /> |
| | | <result column="LR_CreatorId" jdbcType="VARCHAR" property="lrCreatorid" /> |
| | | <result column="LR_Creator" jdbcType="VARCHAR" property="lrCreator" /> |
| | | <result column="LR_CreateDate" jdbcType="TIMESTAMP" property="lrCreatedate" /> |
| | | <result column="LR_ModifierId" jdbcType="VARCHAR" property="lrModifierid" /> |
| | | <result column="LR_Modifier" jdbcType="VARCHAR" property="lrModifier" /> |
| | | <result column="LR_UpdateDate" jdbcType="TIMESTAMP" property="lrUpdatedate" /> |
| | | <result column="LR_PublishId" jdbcType="VARCHAR" property="lrPublishid" /> |
| | | <result column="LR_Publish" jdbcType="VARCHAR" property="lrPublish" /> |
| | | <result column="LR_PublishDate" jdbcType="TIMESTAMP" property="lrPublishdate" /> |
| | | <result column="LR_Version" jdbcType="VARCHAR" property="lrVersion" /> |
| | | <result column="BI_Province_Code" jdbcType="VARCHAR" property="biProvinceCode" /> |
| | | <result column="BI_Province_Name" jdbcType="VARCHAR" property="biProvinceName" /> |
| | | <result column="BI_City_Code" jdbcType="VARCHAR" property="biCityCode" /> |
| | | <result column="BI_City_Name" jdbcType="VARCHAR" property="biCityName" /> |
| | | <result column="BI_District_Code" jdbcType="VARCHAR" property="biDistrictCode" /> |
| | | <result column="BI_District_Name" jdbcType="VARCHAR" property="biDistrictName" /> |
| | | <result column="BI_Town_Code" jdbcType="VARCHAR" property="biTownCode" /> |
| | | <result column="BI_Town_Name" jdbcType="VARCHAR" property="biTownName" /> |
| | | <result column="LR_Extension1" jdbcType="VARCHAR" property="lrExtension1" /> |
| | | <result column="LR_Extension2" jdbcType="VARCHAR" property="lrExtension2" /> |
| | | <result column="LR_Extension3" jdbcType="VARCHAR" property="lrExtension3" /> |
| | | <result column="LR_Remark" jdbcType="VARCHAR" property="lrRemark" /> |
| | | </resultMap> |
| | | <resultMap id="ResultMapWithBLOBs" type="cn.flightfeather.supervision.domain.entity.LawsRegulations" extends="BaseResultMap" > |
| | | <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.flightfeather.supervision.domain.entity.LawsRegulations"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | <result column="LR_Keywords" property="lrKeywords" jdbcType="LONGVARCHAR" /> |
| | | <result column="LR_ResourceDesc" property="lrResourcedesc" jdbcType="LONGVARCHAR" /> |
| | | <result column="LR_ResourceDesc" jdbcType="LONGVARCHAR" property="lrResourcedesc" /> |
| | | <result column="LR_Keywords" jdbcType="LONGVARCHAR" property="lrKeywords" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <sql id="Base_Column_List"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | LR_GUID, LR_ResourceTitle, LR_ResourceLevel, LR_PicUrl, LR_BodyUrl, LR_IsForeign, |
| | | LR_ResourceTypeId, LR_IsOpen, LR_IsUse, LR_ResourceFileType, LR_IsUseOutUrls, LR_ResourceOutUrls, |
| | | LR_GUID, LR_ResourceTitle, LR_ResourceLevel, LR_ResourceTypeId, LR_ResourceFileType, |
| | | LR_PicUrl, LR_BodyUrl, LR_IsForeign, LR_IsOpen, LR_IsUse, LR_IsUseOutUrls, LR_ResourceOutUrls, |
| | | LR_ResourceUrls, LR_CreatorId, LR_Creator, LR_CreateDate, LR_ModifierId, LR_Modifier, |
| | | LR_UpdateDate, LR_PublishId, LR_Publish, LR_PublishDate, LR_Version, LR_Extension1, |
| | | LR_Extension2, LR_Extension3, LR_Remark |
| | | LR_UpdateDate, LR_PublishId, LR_Publish, LR_PublishDate, LR_Version, BI_Province_Code, |
| | | BI_Province_Name, BI_City_Code, BI_City_Name, BI_District_Code, BI_District_Name, |
| | | BI_Town_Code, BI_Town_Name, LR_Extension1, LR_Extension2, LR_Extension3, LR_Remark |
| | | </sql> |
| | | <sql id="Blob_Column_List" > |
| | | <sql id="Blob_Column_List"> |
| | | <!-- |
| | | WARNING - @mbg.generated |
| | | --> |
| | | LR_Keywords, LR_ResourceDesc |
| | | LR_ResourceDesc, LR_Keywords |
| | | </sql> |
| | | |
| | | <select id="getLawsRegulations" resultMap="BaseResultMap"> |
| | |
| | | and (select count(*) + 1 |
| | | from ec_t_lawsregulations t2 |
| | | where t2.LR_ResourceTypeId = t1.LR_ResourceTypeId |
| | | AND t2.LR_PublishDate > t1.LR_PublishDate |
| | | AND t2.LR_PublishDate > t1.LR_PublishDate |
| | | <if test="param1 != null"> |
| | | and t1.LR_ResourceLevel = #{param1} |
| | | </if> |
| | |
| | | limit #{param6}, #{param7} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getNeedCopyLedgers" resultMap="BaseResultMap"> |
| | | SELECT * FROM |
| | | (SELECT |
| | | @row_number:=CASE WHEN @median_group = t_ledger.g THEN @row_number+1 else 1 END AS i, |
| | | @median_group:= t_ledger.g AS median_group, |
| | | t_ledger.* |
| | | FROM |
| | | ( |
| | | SELECT |
| | | a.*, |
| | | STR_TO_DATE(concat(a.LR_Year,'-',a.LR_Month,'-',a.LR_Day),'%Y-%m-%d') as d, |
| | | CONCAT(a.LR_SubmitID, a.LS_SubTypeId) as g |
| | | FROM |
| | | ea_t_ledgerrecord AS a |
| | | ORDER BY LR_SubmitID, LS_SubTypeId, d DESC |
| | | ) as t_ledger |
| | | LEFT JOIN sm_t_userinfo AS b ON t_ledger.LR_SubmitID = b.UI_GUID |
| | | LEFT JOIN ea_t_ledgersubtype AS c ON t_ledger.LS_SubTypeId = c.LS_SubTypeId |
| | | WHERE b.UI_IsEnable = TRUE AND c.L_Auto_Copy = TRUE) as r |
| | | WHERE i = 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | style="font-family:å®ä½; font-size:10pt">${IdNo}</span></p> |
| | | </td> |
| | | </tr> |
| | | <tr style="height:42.7pt"> |
| | | <tr style="height:42.7pt;display:none;"> |
| | | <td colspan="2" |
| | | style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:middle; width:106.85pt"> |
| | | <p style="line-height:20pt; margin:0pt; orphans:0; text-align:center; widows:0"><span |
| | |
| | | <p |
| | | style="line-height:20pt; margin:0pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"> |
| | | <span style="font-family:å®ä½; font-size:10pt">å
ãæ¬å°å¨çº¿çæµè®¾å¤å®è£
å须确ä¿ç¨³å®è¿è¡ï¼å¹¶</span><span |
| | | style="font-family:å®ä½; font-size:10pt">åæ¶ä¸çæç¯å¢é¨é¨æ²¹ççæ§ç³»ç»èç½ï¼</span><span |
| | | style="font-family:å®ä½; font-size:10pt">åæ¶ä¸çæç¯å¢é¨é¨æ¬å°çæ§ç³»ç»èç½ï¼</span><span |
| | | style="font-family:å®ä½; font-size:10pt">便®</span><span |
| | | style="font-family:å®ä½; font-size:10pt">ã</span><span |
| | | style="font-family:å®ä½; font-size:10pt">䏿µ·å¸æ¬å°å¨çº¿çæµæ°æ®æ§æ³åºç¨è§å®</span><span |
| | |
| | | </p> |
| | | <p |
| | | style="line-height:20pt; margin:0pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"> |
| | | <span style="font-family:å®ä½; font-size:10pt">å
«</span><span |
| | | <span style="font-family:å®ä½; font-size:10pt">å
«ãéµå®2022å¹´6æ5æ¥èµ·æ½è¡çãä¸å人æ°å
±åå½åªå£°æ±¡æé²æ²»æ³ãï¼è§èå¼å±å»ºçæ½å·¥åªå£°æ±¡æé²æ²»ï¼ |
| | | æ¶åå¤é´æ½å·¥çï¼åºéµå®ã䏿µ·å¸å»ºè®¾å·¥ç¨å¤é´æ½å·¥è®¸å¯å夿¡å®¡æ¥ç®¡çåæ³ãï¼æ½å·¥è¿ç¨ä¸åºéåææçéåªæªæ½ï¼é¿å
åªå£°æ°æ°ã</span> |
| | | </p> |
| | | <p |
| | | style="line-height:20pt; margin:0pt; orphans:0; text-align:justify; text-indent:21pt; widows:0"> |
| | | <span style="font-family:å®ä½; font-size:10pt">ä¹</span><span |
| | | style="font-family:å®ä½; font-size:10pt">ãåææ¬æ¿è¯ºå社ä¼å
¬å¼ï¼å¹¶èªè§æ¥åæ¿åºãè¡ä¸ç»ç»ã主管é¨é¨å§æç¬¬ä¸æ¹ç管åä½ã社ä¼å
¬ä¼ãæ°é»è论ççç£ã</span> |
| | | </p> |
| | | <p |
| | |
| | | style="font-family:å®ä½; font-size:12pt">VOCs</span><span |
| | | style="font-family:å®ä½; font-size:12pt">å¤ç设æ½</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ï¼</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ææ¾çåç±»å¤§æ°æ±¡æç©åºè¾¾å°ãå¤§æ°æ±¡æç©ç»¼åææ¾æ åãï¼DB31/933-2015ï¼è§å®çææ¾éå¼è¦æ±ã</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ææ¾çåç±»å¤§æ°æ±¡æç©åºè¾¾å°ã汽车维修è¡ä¸å¤§æ°æ±¡æç©ç»¼åææ¾æ åãï¼DB31/1288-2021ï¼è§å®çææ¾éå¼è¦æ±ã</span><span |
| | | style="font-family:å®ä½; font-size:12pt">åºæ°ååè£
ç½®å®</span><span |
| | | style="font-family:å®ä½; font-size:12pt; text-decoration:none">æç»´æ¤</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ï¼å¹¶å®ææ´æ¢ç¸åºèæï¼æ´»æ§çãè¿æ»¤æ£çï¼ï¼</span><span |
| | |
| | | style="font-family:å®ä½; font-size:12pt">ã</span><span |
| | | style="font-family:å®ä½; font-size:12pt">æ¶åå·æ¶ç产çåºæ°ææ¾çï¼</span><span |
| | | style="font-family:å®ä½; font-size:12pt">èªæ¿</span><span |
| | | style="font-family:å®ä½; font-size:12pt">å®è£
符åã䏿µ·å¸åºå®æ±¡ææºéç²ç·æ»çå¨çº¿çæµç³»ç»éªæ¶åè¿è¡ææ¯è¦æ±ï¼è¯è¡ï¼ãç</span><span |
| | | style="font-family:å®ä½; font-size:12pt">å®è£
符åã䏿µ·å¸åºå®æ±¡ææºéç²ç·æ»çå¨çº¿çæµç³»ç»éªæ¶åè¿è¡ææ¯è¦æ±ï¼è¯è¡ï¼ãæçæç¯å¢ä¸»ç®¡é¨é¨è¦æ±ç</span><span |
| | | style="font-family:å®ä½; font-size:12pt">VOCs</span><span |
| | | style="font-family:å®ä½; font-size:12pt">å¨çº¿çæµè£
ç½®</span><span |
| | | style="font-family:å®ä½; font-size:12pt">以åå·¥åµçæµæ¨¡ååè§é¢çæµæ¨¡å</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ï¼å¹¶åæ¶ä¸çæç¯å¢é¨é¨</span><span |
| | | style="font-family:å®ä½; font-size:12pt">以åå·¥åµçæ§æ¨¡å</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ï¼å¹¶åæ¶ä¸çæç¯å¢ä¸»ç®¡é¨é¨</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ç¸å
³çæ§</span><span |
| | | style="font-family:å®ä½; font-size:12pt">ç³»ç»èç½ï¼å§æè§èæå¡åä½å®æè¿ç»´ï¼åæ¶è®°å½ç¸å
³å°è´¦ï¼ç¡®ä¿å
¶æ£å¸¸ä½¿ç¨ï¼ä¸è¶
æ ææ¾ã</span> |
| | | </p> |
| | |
| | | package cn.flightfeather.supervision |
| | | |
| | | import cn.flightfeather.supervision.common.nlp.NlpController |
| | | import cn.flightfeather.supervision.websocket.MsgType |
| | | import cn.flightfeather.supervision.websocket.PersonalServerMsgVo |
| | | import cn.flightfeather.supervision.websocket.WebSocketMsg |
| | | import com.google.gson.Gson |
| | | import org.junit.Test |
| | | import org.springframework.boot.json.GsonJsonParser |
| | | import java.time.LocalDate |
| | | import java.time.LocalDateTime |
| | | import java.time.format.DateTimeFormatter |
| | | import java.util.* |
| | | import java.util.regex.Pattern |
| | | |
| | |
| | | d.time = 1666262747 |
| | | println(d) |
| | | } |
| | | |
| | | @Test |
| | | fun foo5() { |
| | | val n = NlpController() |
| | | n.execute("åè¹æ") |
| | | } |
| | | |
| | | @Test |
| | | fun foo6() { |
| | | var a = 1667377808L |
| | | a*=1000 |
| | | println(a) |
| | | } |
| | | |
| | | @Test |
| | | fun foo7() { |
| | | var s = "2022/10-12" |
| | | val list = s.split("-") |
| | | val endM = list[1].toInt() |
| | | val list2 = list[0].split("/") |
| | | val year = list2[0].toInt() |
| | | val startM = list2[1].toInt() |
| | | // s = s.replace("/", "-") |
| | | val st = LocalDateTime.of(year, startM, 1, 0, 0, 0, 0) |
| | | val et = LocalDateTime.of(year, endM, 1, 0, 0, 0, 0).plusMonths(1) |
| | | println(st) |
| | | println(et) |
| | | } |
| | | } |
| | |
| | | |
| | | @Test |
| | | fun go() { |
| | | autoScore.go(2022, 1) |
| | | autoScore.go(2022, 7) |
| | | } |
| | | } |
| | |
| | | val signImg = File("C:\\work\\vs\\ff-ai-ep\\asset\\mipmap\\boat_driving.png") |
| | | val sign = MockMultipartFile("sign.png", FileInputStream(signImg)) |
| | | val r = commitmentService.createLetterOfCommitment( |
| | | "WIIteekIBxXzespD", Gson().toJson(CommitmentVo( |
| | | "QNhKL9lWOefS5iWn", Gson().toJson(CommitmentVo( |
| | | "䏿µ·å¸", |
| | | "徿±åº", |
| | | "ææä¼ä¸", |
| | |
| | | val r = evaluationService.getTotalPoints("xB32EtpuxU5bOzq5", 2, "2021-01-01", "2021-04-01",7,"3mbioCjN6XAAHveR",null) |
| | | println(r) |
| | | } |
| | | |
| | | @Test |
| | | fun getCreditInfo() { |
| | | val r = evaluationService.getCreditInfo("UwTaWXneBoTby6bH") |
| | | println(r) |
| | | } |
| | | } |
| | |
| | | |
| | | @Test |
| | | fun subscribeResult() { |
| | | val msg = "{\"ToUserName\":\"gh_213453153\", \"List\": [{\"TemplateId\":\"sadaihdfjhsadoaiwhfefe\", \"SubscribeStatusString\":\"accept\"}]}" |
| | | val msg = "{\"ToUserName\":\"gh_c60faa57000f\",\"FromUserName\":\"otZkc5cC55BtV2AFZdXMvBw0oJo8\",\"CreateTime\":1667377808,\"MsgType\":\"event\",\"Event\":\"subscribe_msg_popup_event\",\"List\":[{\"PopupScene\":\"0\",\"SubscribeStatusString\":\"accept\",\"TemplateId\":\"6JQFOJ12yBvKfRg_duSdwKiH5_J3LpICmz3Li-L1Cr8\"},{\"PopupScene\":\"0\",\"SubscribeStatusString\":\"accept\",\"TemplateId\":\"zPNMzF5WsshniJyl83DD-lDZtNvx7JyqLbKgqDl0qvU\"},{\"PopupScene\":\"0\",\"SubscribeStatusString\":\"accept\",\"TemplateId\":\"dqREi7vAd03OOirTgBGcm5aCihZJKBjVpiA8Kbu4B8w\"}]}" |
| | | wxUserService.subscribeResult(msg) |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package cn.flightfeather.supervision.timingtask |
| | | |
| | | import org.junit.Test |
| | | import org.junit.jupiter.api.Assertions.* |
| | | import org.junit.jupiter.api.extension.ExtendWith |
| | | import org.junit.runner.RunWith |
| | | import org.springframework.beans.factory.annotation.Autowired |
| | | import org.springframework.boot.test.context.SpringBootTest |
| | | import org.springframework.test.context.junit.jupiter.SpringExtension |
| | | import org.springframework.test.context.junit4.SpringRunner |
| | | import java.time.LocalDateTime |
| | | |
| | | @RunWith(SpringRunner::class) |
| | | @ExtendWith(SpringExtension::class) |
| | | @SpringBootTest |
| | | class TaskLedgerCopyTest { |
| | | |
| | | @Autowired |
| | | lateinit var taskLedgerCopy: TaskLedgerCopy |
| | | |
| | | @Test |
| | | fun doTask() { |
| | | taskLedgerCopy.doTask(LocalDateTime.now()) |
| | | } |
| | | } |