From 00acb9d6cb8d3455e9a7c2b51722fafeb820a92c Mon Sep 17 00:00:00 2001 From: czt <czt18638530771@163.com> Date: 星期四, 05 六月 2025 20:02:37 +0800 Subject: [PATCH] 增加接口包及解析 --- igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/N2FillingRepository.java | 16 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2002.java | 39 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/N2Filling.java | 199 ++ igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1003.java | 70 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Manager.java | 48 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2006.java | 73 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/InoutDepotRecord.java | 63 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2007.java | 109 + igds-dzhwk-inte/pom.xml | 49 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/AreationDataRepository.java | 31 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2003.java | 100 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1004.java | 70 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ColdValleyRepository.java | 16 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2001.java | 125 + igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/SysConfRepository.java | 25 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/QualityManageRepository.java | 29 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1004.java | 43 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GasRepository.java | 16 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1001.java | 86 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1005.java | 79 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1002.java | 59 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/MAreationData.java | 267 +++ igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/DrugLogRepository.java | 32 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DrugLog.java | 313 ++++ igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2008.java | 139 + igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GrainRepository.java | 30 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2005.java | 61 igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysConfService.java | 88 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2003.java | 62 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/util/ApiV1Utils.java | 148 + igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/SysConf.view.xml | 525 +++++++ igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2008.java | 63 pom.xml | 1 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DicSysConf.java | 114 + igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ColdValley.java | 159 ++ igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1003.java | 62 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Service.java | 23 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2006.java | 142 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1001.java | 60 igds-dzhwk-web/pom.xml | 7 igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/InoutDepotRecordRepository.java | 16 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1RespDto.java | 34 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2004.java | 57 igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/SysConfPR.java | 84 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2007.java | 61 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Server.java | 103 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2001.java | 54 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1ReqDto.java | 26 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2004.java | 36 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2002.java | 182 ++ igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2005.java | 76 + igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1002.java | 62 igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1005.java | 65 53 files changed, 4,497 insertions(+), 0 deletions(-) diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ColdValley.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ColdValley.java new file mode 100644 index 0000000..c043c1e --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/ColdValley.java @@ -0,0 +1,159 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.util.Date; + +/** + * 鎺ュ彛琛�-璋峰喎浣滀笟 + * + */ +@Data +@Entity +@Table(name = "H_COLD_VALLEY") +public class ColdValley implements Serializable { + + @Id + @Column(name = "zydh", length = 40) + @PropertyDef(label = "璋峰喎浣滀笟鍗曞彿") + private String zydh; + + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "DEPT_ID_", length = 40) + @PropertyDef(label = "鎵�灞炲垎搴�") + private String deptId; + + @Column(name = "ajdm", length = 40) + @PropertyDef(label = "寤掗棿浠g爜") + private String ajdm; + + @Column(name = "kssj") + @PropertyDef(label = "閫氶寮�濮嬫椂闂�") + private Date kssj; + + @Column(name = "jssj") + @PropertyDef(label = "閫氶缁撴潫鏃堕棿") + private Date jssj; + + @Column(name = "lspzdm", length = 40) + @PropertyDef(label = "绮鍝佺") + private String lspzdm; + + @Column(name = "lssl", length = 40) + @PropertyDef(label = "绮鏁伴噺") + private Double lssl; + + @Column(name = "lqtfmd", length = 40) + @PropertyDef(label = "鍐峰嵈閫氶鐩殑") + private String lqtfmd; + + @Column(name = "lqsfwd") + @PropertyDef(label = "鍐峰嵈閫侀娓╁害") + private Double lqsfwd; + + @Column(name = "lqsfsd") + @PropertyDef(label = "鍐峰嵈閫侀婀垮害") + private Double lqsfsd; + + @Column(name = "ljtfsj") + @PropertyDef(label = "绱閫氶鏃堕棿") + private Double ljtfsj; + + @Column(name = "wwzgz") + @PropertyDef(label = "閫氶鏈熼棿澶栨俯鏈�楂樺��") + private Double wwzgz; + + @Column(name = "wwzdz") + @PropertyDef(label = "閫氶鏈熼棿澶栨俯鏈�浣庡��") + private Double wwzdz; + + @Column(name = "wwpjz") + @PropertyDef(label = "閫氶鏈熼棿澶栨俯骞冲潎鍊�") + private Double wwpjz; + + @Column(name = "wszgz") + @PropertyDef(label = "閫氶鏈熼棿澶栨箍鏈�楂樺��") + private Double wszgz; + + @Column(name = "wszdz") + @PropertyDef(label = "閫氶鏈熼棿澶栨箍鏈�浣庡��") + private Double wszdz; + + @Column(name = "wspjz") + @PropertyDef(label = "閫氶鏈熼棿澶栨箍骞冲潎鍊�") + private Double wspjz; + + @Column(name = "qlwzgz") + @PropertyDef(label = "閫氶鍓嶇伯娓╂渶楂樺��") + private Double qlwzgz; + + @Column(name = "qlwzdz") + @PropertyDef(label = "閫氶鍓嶇伯娓╂渶浣庡��") + private Double qlwzdz; + + @Column(name = "qlwpjz") + @PropertyDef(label = "閫氶鍓嶇伯娓╁钩鍧囧��") + private Double qlwpjz; + + @Column(name = "hlwzgz") + @PropertyDef(label = "閫氶鍚庣伯娓╂渶楂樺��") + private Double hlwzgz; + + @Column(name = "hlwzdz") + @PropertyDef(label = "閫氶鍚庣伯娓╂渶浣庡��") + private Double hlwzdz; + + @Column(name = "hlwpjz") + @PropertyDef(label = "閫氶鍚庣伯娓╁钩鍧囧��") + private Double hlwpjz; + + @Column(name = "qlszgz") + @PropertyDef(label = "閫氶鍓嶇伯婀垮害鏈�楂樺��") + private Double qlszgz; + + @Column(name = "qlszdz") + @PropertyDef(label = "閫氶鍓嶇伯婀垮害鏈�浣庡��") + private Double qlszdz; + + @Column(name = "qlspjz") + @PropertyDef(label = "閫氶鍓嶇伯婀垮害骞冲潎鍊�") + private Double qlspjz; + + @Column(name = "hlszgz") + @PropertyDef(label = "閫氶鍚庣伯婀垮害鏈�楂樺��") + private Double hlszgz; + + @Column(name = "hlszdz") + @PropertyDef(label = "閫氶鍚庣伯婀垮害鏈�浣庡��") + private Double hlszdz; + + @Column(name = "hlspjz") + @PropertyDef(label = "閫氶鍚庣伯婀垮害骞冲潎鍊�") + private Double hlspjz; + + @Column(name = "zhdl", length = 40) + @PropertyDef(label = "鎬昏�楃數閲�") + private String zhdl; + + @Column(name = "czr", length = 40) + @PropertyDef(label = "鎿嶄綔浜�") + private String czr; + + @Column(name = "bz", length = 40) + @PropertyDef(label = "澶囨敞") + private String bz; + + @Column(name = "zhgxsj") + @PropertyDef(label = "鏇存柊鏃堕棿") + private Date zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DicSysConf.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DicSysConf.java new file mode 100644 index 0000000..8cedc8e --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DicSysConf.java @@ -0,0 +1,114 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import com.fzzy.igds.dzhwk.constant.Constant; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; + +/** + * @author: andy.jia + * @description: + * @version: + * @data:2019骞�12鏈�17鏃� + */ +@Entity +@Table(name = "d_dic_sys_conf") +@Data +public class DicSysConf implements Serializable { + + @Id + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "GRAIN_AUTO_", length = 1) + @PropertyDef(label = "绮儏鑷姩浼樺寲鍔熻兘") + private String grainAuto = Constant.YN_N; + + @Column(name = "GRAIN_ERROR_AUTO_", length = 1) + @PropertyDef(label = "绮儏鑷姩澶勭悊") + private String grainErrorAuto = Constant.YN_N; + + @Column(name = "GRAIN_MAX_AUTO_", length = 1) + @PropertyDef(label = "绮儏楂樻俯浼樺寲") + private String grainMaxAuto = Constant.YN_N; + + @Column(name = "GRAIN_MORE_TAG_", length = 1) + @PropertyDef(label = "涓�鍒嗘満澶氫粨", description = "榛樿鏄惁") + private String grainMoreTag = Constant.YN_N; + + @Column(name = "WARN_TO_WX_TAG_", length = 1) + @PropertyDef(label = "寰俊鎺ㄩ�佽鍛婂惎鐢�", description = "榛樿鏄�") + private String warnToWxTag = Constant.YN_Y; + + @Column(name = "INTERVAL_TIME_") + @PropertyDef(label = "鎵ц闂撮殧鏃堕棿", description = "閽堝鏃犵嚎妯″紡鎯呭喌涓嬶紝鍗曚綅锛氱") + private int intervalTime = 5; + + @Column(name = "INTERVAL_GAS_") + @PropertyDef(label = "姘斾綋閫氶亾妫�娴嬮棿闅�", description = "鍗曚綅锛氱") + private int intervalGas = 15; + + @Column(name = "INTERVAL_PEST_") + @PropertyDef(label = "铏閫氶亾妫�娴嬮棿闅�", description = "鍗曚綅锛氱") + private int intervalPest = 15; + + @Column(name = "QUANTITY_PATH_", length = 50) + @PropertyDef(label = "鏁伴噺鍦ㄧ嚎妫�娴嬪湴鍧�", description = "閽堝鐨勬槸鏈夎嚜鏈夋湇鍔$殑鎯呭喌") + private String quantityPath; + + @Column(name = "THREE_PATH_", length = 50) + @PropertyDef(label = "涓夌淮鍙鍖栬矾寰�") + private String threePath; + + @Column(name = "HWK_API_PATH_", length = 100) + @PropertyDef(label = "鐢靛瓙璐т綅鍗℃帴鍙h矾寰�") + private String hwkApiPath; + + @Column(name = "SYS_NAME_", length = 20) + @PropertyDef(label = "绯荤粺鍚嶇О", description = "绯荤粺鐧诲綍鍚庡乏涓婄郴缁熷悕绉�") + private String sysName = "鏅烘収绮簱绠$悊绯荤粺"; + + @Column(name = "SCREE_NAME_", length = 30) + @PropertyDef(label = "澶у睆鍚嶇О") + private String screeName = "鏅烘収绮簱绠$悊绯荤粺缁煎悎澶у睆"; + + @Column(name = "GRAIN_ADD_POINT_", length = 1) + @PropertyDef(label = "鏄惁淇濆瓨绮儏閲囬泦鐐逛俊鎭�", description = "榛樿涓嶄繚瀛�") + private String grainAddPoint = Constant.YN_N; + + @Column(name = "SUPPORT_", length = 50) + @PropertyDef(label = "鎶�鏈敮鎸�") + private String support = "椋庢鑷磋繙淇℃伅鎶�鏈偂浠芥湁闄愬叕鍙�"; + + @Column(name = "EMAIL_", length = 30) + @PropertyDef(label = "鍏徃閭") + private String email = "business@fzzygf.com"; + + @Column(name = "PHONE_", length = 20) + @PropertyDef(label = "鍏徃鐢佃瘽") + private String phone = "400-627-1116"; + + @Column(name = "WEB_SITE_", length = 30) + @PropertyDef(label = "鍏徃缃戠珯") + private String website = "http://www.fzzygf.com"; + + @Column(name = "ADDRESS_", length = 100) + @PropertyDef(label = "鍏徃鍦板潃") + private String address = "娌冲崡鐪侀儜宸炲競楂樻柊鍖哄浗瀹跺ぇ瀛︾鎶�鍥�1鍙锋ゼ"; + + public DicSysConf() { + super(); + } + + public DicSysConf(String companyId) { + super(); + this.companyId = companyId; + } + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DrugLog.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DrugLog.java new file mode 100644 index 0000000..7b21609 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DrugLog.java @@ -0,0 +1,313 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.util.Date; + +/** + * 鐜祦鐔忚捀-鐔忚捀浣滀笟璁板綍 + * + * @date 2023骞�7鏈�26鏃� + */ +@Data +@Entity +@Table(name = "D_DRUG_LOG") +public class DrugLog implements Serializable { + + public static String SORT_PROP = "id"; + + @Id + @Column(name = "ID_", length = 40) + @PropertyDef(label = "鐔忚捀浣滀笟鍗曞彿", description = "浣滀笟鏃ユ湡 (yyyyMMdd) +3 浣嶉『搴忓彿") + private String id; + + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "DEPT_ID_", length = 40) + @PropertyDef(label = "鎵�灞炲垎搴�") + private String deptId; + + @Column(name = "DEPOT_ID_", length = 50) + @PropertyDef(label = "浠撳簱") + private String depotId; + + @Column(name = "START_") + @PropertyDef(label = "寮�濮嬫椂闂�") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date start; + + @Column(name = "END_") + @PropertyDef(label = "鎴嚦鏃堕棿") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date end; + + @Column(name = "PEST_BATCH_ID_", length = 50) + @PropertyDef(label = "铏妫�娴嬪崟鍙�") + private String pestBatchId; + + @Column(name = "NUM_") + @PropertyDef(label = "绗嚑娆$啅钂�") + private Integer num = 0; + + @Column(name = "MODE_", length = 1) + @PropertyDef(label = "鐔忚捀鏂瑰紡", description = "0:绮潰娼В1:甯冭鍩嬭棌2:鎺㈢3:缁煎悎鏂借嵂") + private String mode; + + @Column(name = "RECIR_MODE_", length = 1) + @PropertyDef(label = "鐜祦鐔忚捀鏂瑰紡", description = "0:鍥哄畾寮忓竷缃舰寮�1:绉诲姩寮忓竷缃舰寮�") + private String recirMode; + + @Column(name = "hlxzynhljsjh", length = 1) + @PropertyDef(label = "鐜祦鐔忚捀涓庡唴鐜祦鎶�鏈粨鍚�", description = "0:鍒嗗埆浣跨敤_鍥哄畾寮�1:鍒嗗埆浣跨敤_绉诲姩寮�2:浜屽悎涓�搴旂敤_鍗曞悜鎺у埗3:浜屽悎涓�搴旂敤_鍙屽悜鎺у埗") + private String hlxzynhljsjh; + + @PropertyDef(label = "鐔忚捀鏂规鍒跺畾") + @Column(name = "xzfazd", length = 128) + private String xzfazd; + + @PropertyDef(label = "鐔忚捀鏂规璧疯崏浜�") + @Column(name = "xzfaqcr", length = 64) + private String xzfaqcr; + + @PropertyDef(label = "鐔忚捀鏂规鎵瑰噯浜�") + @Column(name = "xzfapzr", length = 64) + private String xzfapzr; + + @PropertyDef(label = "鐔忚捀鏂规鎶ュ鎯呭喌") + @Column(name = "xzfabbqk", length = 64) + private String xzfabbqk; + + @PropertyDef(label = "鏂借嵂浜哄憳璧勮川鎯呭喌") + @Column(name = "syryzzqk", length = 64) + private String syryzzqk; + + @PropertyDef(label = "鏂借嵂璧勮川瀹℃牳") + @Column(name = "syzzsh", length = 64) + private String syzzsh; + + @Column(name = "DRUG_NAME_", length = 64) + @PropertyDef(label = "鑽墏鍚嶇О") + private String drugName; + + @PropertyDef(label = "鍓傚瀷") + @Column(name = "jx", length = 64) + private String jx; + + @Column(name = "CONCENTRATION_", length = 50) + @PropertyDef(label = "鑽墏娴撳害", description = "%") + private Double concentration = 0.0; + + @Column(name = "GRAIN_DOSE_") + @PropertyDef(label = "绮爢鍗曚綅鐢ㄨ嵂閲�", description = "g/m鲁") + private Double grainDose = 0.0; + + @Column(name = "SPACE_DOSE_") + @PropertyDef(label = "绌洪棿鍗曚綅鐢ㄨ嵂閲�", description = "g/m鲁") + private Double spaceDose = 0.0; + + @Column(name = "DOSE_") + @PropertyDef(label = "鎬荤敤鑽噺", description = "kg") + private Double dose = 0.0; + + @PropertyDef(label = "鏂借嵂鏂规硶", description = "0:娼В娉�1:浠撳鍙戠敓鍣�2:閽㈢摱姘�") + @Column(name = "syff", length = 1) + private String syff; + + @PropertyDef(label = "杈呭姪鏂借嵂鎺柦") + @Column(name = "fzsycs", length = 128) + private String fzsycs; + + @PropertyDef(label = "绌烘皵鍛煎惛鍣ㄥ強瀹夊叏妫�鏌ユ儏鍐�") + @Column(name = "kqhqjaqjcqk", length = 128) + private String kqhqjaqjcqk; + + @PropertyDef(label = "纾峰寲姘㈡娴嬭缃皟璇曟儏鍐�") + @Column(name = "lhqjczztsqk", length = 128) + private String lhqjczztsqk; + + @PropertyDef(label = "姘ф皵娣卞害妫�娴嬭缃皟璇曟儏鍐�") + @Column(name = "yqsdjczztsqk", length = 128) + private String yqsdjczztsqk; + + @PropertyDef(label = "纾峰寲姘㈡姤璀︿华瀹夊叏妫�鏌�") + @Column(name = "lhqbjyaqjc", length = 128) + private String lhqbjyaqjc; + + @PropertyDef(label = "姘ф皵鎶ヨ浠畨鍏ㄦ鏌�") + @Column(name = "yqbjyaqjc", length = 128) + private String yqbjyaqjc; + + @PropertyDef(label = "琛ヨ嵂鍓嶄粨鍐呯7鍖栨阿娴撳害") + @Column(name = "byqcnlhqnd", precision = 20, scale = 3) + private double byqcnlhqnd; + + @PropertyDef(label = "纾峰寲姘㈡祿搴﹀崟浣�", description = "1锛歡/m鲁(榛樿);2锛歱pm;3:ml/m鲁;4锛�%VOL") + @Column(name = "nlhqnddw", length = 1) + private String nlhqnddw = "1"; + + @PropertyDef(label = "鐩爣娴撳害", description = "鍗曚綅锛歡/m鲁") + @Column(name = "mbnd", precision = 20, scale = 3) + private double mbnd; + + @PropertyDef(label = "璁$畻琛ヨ嵂閲�", description = "鍗曚綅锛歡") + @Column(name = "jsbyl", precision = 20, scale = 3) + private double jsbyl; + + @PropertyDef(label = "瀹為檯琛ヨ嵂閲�", description = "鍗曚綅锛歡") + @Column(name = "sjbyl", precision = 20, scale = 3) + private double sjbyl; + + @PropertyDef(label = "琛ヨ嵂鏂规硶") + @Column(name = "byff", length = 128) + private String byff; + + @PropertyDef(label = "浣滀笟浜烘暟") + @Column(name = "zyrs") + private Integer zyrs; + + @PropertyDef(label = "琛ヨ嵂浣滀笟鎵瑰噯浜�") + @Column(name = "byzypzr", length = 64) + private String byzypzr; + + @PropertyDef(label = "鐜板満鎸囨尌浜�") + @Column(name = "xczhr", length = 64) + private String xczhr; + + @PropertyDef(label = "宄板�兼祿搴�", description = "鍗曚綅锛歡/m鲁") + @Column(name = "fznd", precision = 20, scale = 3) + private double fznd; + + @PropertyDef(label = "鐩爣娴撳害缁存寔澶╂暟", description = "鍗曚綅锛氬ぉ") + @Column(name = "mbndwcts") + private Integer mbndwcts; + + @PropertyDef(label = "婕忔皵浣嶇疆鐩戞祴") + @Column(name = "lswzjc", length = 128) + private String lswzjc; + + @PropertyDef(label = "婕忔皵閮ㄤ綅閲囧彇鐨勮ˉ鏁戞帾鏂�") + @Column(name = "lqbwcqdbjcs", length = 128) + private String lqbwcqdbjcs; + + @PropertyDef(label = "瀵嗛棴鏃堕棿", description = "鍗曚綅锛氬ぉ") + @Column(name = "mbsj") + private Integer mbsj; + + @PropertyDef(label = "CT鍊�") + @Column(name = "ctz", precision = 20, scale = 3) + private double ctz; + + @PropertyDef(label = "鏁f皵鍓嶇7鍖栨阿娴撳害", description = "鍗曚綅锛歡/m鲁") + @Column(name = "sqqlhqnd", precision = 20, scale = 3) + private double sqqlhqnd; + + @Column(name = "VENTILATE_TIME_") + @PropertyDef(label = "鏁f皵鏃堕棿") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date ventilateTime; + + @Column(name = "VENTILATE_METHOD_", length = 100) + @PropertyDef(label = "鏁f皵鏂规硶") + private String ventilateMethod; + + @PropertyDef(label = "鏁f皵鎵瑰噯浜�") + @Column(name = "sqpzr", length = 64) + private String sqpzr; + + @PropertyDef(label = "鏁f皵鎸佺画澶╂暟", description = "鍗曚綅锛氬ぉ") + @Column(name = "sqcsts") + private Integer sqcsts; + + @Column(name = "AFTER_PH3_") + @PropertyDef(label = "鏁f皵鍚庣7鍖栨阿娴撳害", description = "鍗曚綅锛歡/m鲁") + private Double afterPh3; + + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8") + @PropertyDef(label = "娈嬫福鏀堕泦浣滀笟鏃堕棿") + @Column(name = "czsjzysj") + private Date czsjzysj; + + @PropertyDef(label = "娈嬫福鏀堕泦浣滀笟浜烘暟") + @Column(name = "czsjzyrs") + private Integer czsjzyrs; + + @PropertyDef(label = "娈嬫福鏀堕泦鏂规硶") + @Column(name = "czsjff", length = 128) + private String czsjff; + + @PropertyDef(label = "娈嬫福鏀堕泦浣滀笟鎵瑰噯浜�") + @Column(name = "czsjzypzr", length = 64) + private String czsjzypzr; + + @PropertyDef(label = "娈嬫福澶勭悊鎺柦") + @Column(name = "czclcs", length = 128) + private String czclcs; + + @PropertyDef(label = "娈嬫福澶勭悊浣滀笟浜烘暟") + @Column(name = "czclzyrs") + private Integer czclzyrs; + + @PropertyDef(label = "娈嬫福澶勭悊鎵瑰噯浜�") + @Column(name = "czclpzr", length = 64) + private String czclpzr; + + @PropertyDef(label = "鐔忚捀鍚庢椿铏鍑烘儏鍐�") + @Column(name = "xzhhcjcqk", length = 128) + private String xzhhcjcqk; + + @PropertyDef(label = "鐔忚捀鍚庤櫕鍙e瘑搴�", description = "鍗曚綅锛氬ご/kg") + @Column(name = "xzhckmd") + private Integer xzhckmd; + + @PropertyDef(label = "鍩瑰吇15澶╁悗娲昏櫕鏁�", description = "鍗曚綅锛氬ご/kg") + @Column(name = "pyswthhcs") + private Integer pyswthhcs; + + @PropertyDef(label = "鍩瑰吇45澶╁悗娲昏櫕鏁�", description = "鍗曚綅锛氬ご/kg") + @Column(name = "pysswthhcs") + private Integer pysswthhcs; + + + /** + * 0锛氳壇濂� + * 1锛氫竴鑸� + * 2锛氫笉濂� + */ + @Column(name = "EVALUATE_", length = 1) + @PropertyDef(label = "鐔忚捀璇勪环", description = "0锛氳壇濂� 1锛氫竴鑸� 2锛氫笉濂�") + private String evaluate; + + @PropertyDef(label = "鐔忚捀璐熻矗浜�") + @Column(name = "xzfzr", length = 64) + private String xzfzr; + + @PropertyDef(label = "鐔忚捀浣滀笟浜哄憳") + @Column(name = "xzzyry", length = 128) + private String xzzyry; + + @Column(name = "USER_", length = 30) + @PropertyDef(label = "鎿嶄綔浜�") + private String user; + + @PropertyDef(label = "鏇存柊浜�") + @Column(name = "UPDATE_USER_", length = 30) + private String updateUser; + + @PropertyDef(label = "鏇存柊鏃堕棿") + @Column(name = "UPDATE_TIME_") + private Date updateTime; + + @Column(name = "REMARKS_", length = 500) + @PropertyDef(label = "澶囨敞璇存槑") + private String remarks; + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/InoutDepotRecord.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/InoutDepotRecord.java new file mode 100644 index 0000000..d0b165c --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/InoutDepotRecord.java @@ -0,0 +1,63 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.util.Date; + +/** + * 杩涘嚭浠撹褰曞疄浣� + */ +@Data +@Entity +@Table(name = "H_INOUT_DEPOT_RECORD") +public class InoutDepotRecord implements Serializable { + + + @Id + @Column(name = "jccdh", length = 40) + @PropertyDef(label = "鍗曞彿" ) + private String jccdh; + + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "DEPT_ID_", length = 40) + @PropertyDef(label = "鎵�灞炲垎搴�") + private String deptId; + + @Column(name = "ajdm", length = 10) + @PropertyDef(label = "寤掗棿浠g爜" ) + private String ajdm; + + @Column(name = "jcry", length = 10) + @PropertyDef(label = "杩涘嚭浠撲汉鍛�" ) + private String jcry; + + @Column(name = "jcsj", length = 10) + @PropertyDef(label = "杩涗粨鏃堕棿" ) + private Date jcsj; + + @Column(name = "ccsj", length = 10) + @PropertyDef(label = "鍑轰粨鏃堕棿" ) + private Date ccsj; + + @Column(name = "jcmd", length = 10) + @PropertyDef(label = "鍏ヤ粨鐩殑" ) + private String jcmd; + + @Column(name = "jcsm", length = 10) + @PropertyDef(label = "鍏ヤ粨璇存槑" ) + private String jcsm; + + @Column(name = "zhgxsj", length = 10) + @PropertyDef(label = "鏇存柊鏃堕棿" ) + private Date zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/MAreationData.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/MAreationData.java new file mode 100644 index 0000000..d067238 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/MAreationData.java @@ -0,0 +1,267 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.util.Date; + +/** + * 閫氶鏁版嵁 + * @author vince + * + */ +@Data +@Entity +@Table(name = "D_AREATION_DATA") +public class MAreationData implements Serializable { + + public static String SORT_PROP = "id"; + + @Id + @Column(name = "ID_", length = 41) + @PropertyDef(label = "涓婚敭") + private String id; + + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "DEPT_ID_", length = 40) + @PropertyDef(label = "鎵�灞炲垎搴�") + private String deptId; + + @Column(name = "DEPOT_ID_", length = 50) + @PropertyDef(label = "鎿嶄綔浠撳簱") + private String depotId; + + @Column(name = "OBJECTIVE_", length = 100) + @PropertyDef(label = "閫氶鐩殑") + private String objective; + + @PropertyDef(label = "绮爢瀛旈殭搴�") + @Column(name = "ldkxd", precision = 10, scale = 3) + private Double ldkxd; + + /** + * 1锛氳嚜鐒剁┖姘旈�氶 + * 2锛氬姞鐑┖姘旈�氶 + * 3锛氬喎鍗寸┖姘旈�氶 + * 4锛氬唴寰幆鎺ф俯 + * 5锛氱┖璋冩帶娓╅�氶 + * 6锛氱淮鎸侀�氶 + */ + @Column(name = "TYPE_", length = 10) + @PropertyDef(label = "閫氶绫诲瀷") + private String type; + /** + * 1锛氬湴妲� + * 2锛氬湴涓婄 + * 3锛氱Щ鍔ㄥ紡 + * 4锛氱寮� + * 5锛氬緞鍚� + * 6锛氬す搴� + * 9锛氬叾浠� + */ + @Column(name = "WIND_NET_TYPE_", length = 10) + @PropertyDef(label = "椋庣綉绫诲瀷") + private String windNetType; + + @PropertyDef(label = "椋庣綉璁剧疆鏂瑰紡") + @Column(name = "fwszfs", length = 64) + private String fwszfs; + + @PropertyDef(label = "涓婚閬撴埅闈㈢Н") + @Column(name = "zfdjmj", precision = 10, scale = 3) + private Double zfdjmj; + + @PropertyDef(label = "鏀閬撴埅闈㈢Н") + @Column(name = "zhfdjmj", precision = 10, scale = 3) + private Double zhfdjmj; + + @PropertyDef(label = "鏀閬撴�婚暱搴�") + @Column(name = "zfdzcd", precision = 20, scale = 3) + private Double zfdzcd; + + @PropertyDef(label = "椋庣綉寮�瀛旂巼") + @Column(name = "fwkkl", precision = 10, scale = 3) + private Double fwkkl; + + @PropertyDef(label = "绌烘皵閫斿緞姣�") + @Column(name = "kqtjb", precision = 10, scale = 3) + private Double kqtjb; + + @PropertyDef(label = "閫氶鍙h缃釜鏁�") + @Column(name = "tfkszgs") + private Integer tfkszgs; + + @PropertyDef(label = "閫氶鏈哄瀷鍙�") + @Column(name = "tfjxh", length = 128) + private String tfjxh; + + @PropertyDef(label = "閫氶鏈哄彴鏁�") + @Column(name = "tfjts") + private Integer tfjts; + + @PropertyDef(label = "鍗曞彴椋庢満棰濆畾鍏ㄥ帇") + @Column(name = "dtfjedqy", precision = 10, scale = 3) + private Double dtfjedqy; + + @PropertyDef(label = "鍗曞彴椋庢満棰濆畾椋庨噺") + @Column(name = "dtfjedfl", precision = 10, scale = 3) + private Double dtfjedfl; + + @PropertyDef(label = "鍗曞彴椋庢満棰濆畾鍔熺巼") + @Column(name = "dtfjedgl", precision = 10, scale = 3) + private Double dtfjedgl; + + /** + * 1锛氬帇鍏ュ紡閫氶 + * 2锛氬惛鍑哄紡閫氶 + * 3锛氬帇鍏ヤ笌鍚稿嚭鐩哥粨鍚堝紡閫氶 + * 4锛氱幆娴侀�氶 + * 9锛氬叾瀹� + */ + @Column(name = "AIR_SUPPLY_MODE_", length = 10) + @PropertyDef(label = "閫侀鏂瑰紡") + private String airSupplyMode; + + @PropertyDef(label = "鍗曞彴椋庢満瀹炴祴椋庨噺") + @Column(name = "dtfjscfl", precision = 10, scale = 3) + private Double dtfjscfl; + + @PropertyDef(label = "鍗曞彴椋庢満杞村姛鐜�") + @Column(name = "dtfjzgl", precision = 10, scale = 3) + private Double dtfjzgl; + + @PropertyDef(label = "鎬婚閲�") + @Column(name = "zfl", precision = 10, scale = 3) + private Double zfl; + + @PropertyDef(label = "鍗曚綅閫氶閲�") + @Column(name = "dwtfl", precision = 10, scale = 3) + private Double dwtfl; + + @PropertyDef(label = "瀹炴祴绯荤粺闃诲姏") + @Column(name = "scxtzl", precision = 10, scale = 3) + private Double scxtzl; + + /** + * 鎬昏�楃數閲� 鍗冪摝 + */ + @Column(name = "TOTAL_ES_") + @PropertyDef(label = "鎬昏�楃數閲�") + private Double totalEs; + + @PropertyDef(label = "浣滀笟鏃舵皵娓�") + @Column(name = "zysqw", precision = 10, scale = 3) + private double zysqw; + + @PropertyDef(label = "浣滀笟鏃舵皵婀�") + @Column(name = "zysqs", precision = 10, scale = 3) + private double zysqs; + + @Column(name = "BEFORE_TEMP_AVG_") + @PropertyDef(label = "浣滀笟鍓嶅钩鍧囩伯娓�") + private Double beforeTempAvg; + + @Column(name = "AFTER_TEMP_AVG_") + @PropertyDef(label = "浣滀笟鍚庡钩鍧囩伯娓�") + private Double afterTempAvg; + + @PropertyDef(label = "闄嶆俯骞呭害") + @Column(name = "jwfd", precision = 10, scale = 3) + private double jwfd; + + @PropertyDef(label = "鍚ㄧ伯闄嶆俯鑳借��") + @Column(name = "dljwnh", precision = 10, scale = 3) + private double dljwnh; + + @PropertyDef(label = "澶辨按鐜�") + @Column(name = "ssl_", precision = 10, scale = 3) + private double ssl; + + @PropertyDef(label = "淇濇按鏁堟灉璇勪环缁撴灉") + @Column(name = "bsxgpjjg", length = 128) + private String bsxgpjjg; + + @PropertyDef(label = "閫氶闄嶆俯鍧囧寑鎬ц瘎浠穇鏁翠粨") + @Column(name = "tfjwjyxpjzc", length = 128) + private String tfjwjyxpjzc; + + @PropertyDef(label = "閫氶闄嶆俯鍧囧寑鎬ц瘎浠穇涓婂眰") + @Column(name = "tfjwjyxpjsc", length = 128) + private String tfjwjyxpjsc; + + @PropertyDef(label = "閫氶闄嶆俯鍧囧寑鎬ц瘎浠穇涓�(闂�)灞�") + @Column(name = "tfjwjyxpjzjc", length = 128) + private String tfjwjyxpjzjc; + + @PropertyDef(label = "閫氶闄嶆俯鍧囧寑鎬ц瘎浠穇涓嬪眰") + @Column(name = "tfjwjyxpjxc", length = 128) + private String tfjwjyxpjxc; + + @Column(name = "BEFORE_PER_WET_AVG_") + @PropertyDef(label = "浣滀笟鍓嶅钩鍧囨按鍒�") + private Double beforPerWetAvg; + + @Column(name = "AFTER_PER_WET_AVG_") + @PropertyDef(label = "浣滀笟鍚庡钩鍧囨按鍒�") + private Double afterPerWetAvg; + + @PropertyDef(label = "闄嶆按骞呭害") + @Column(name = "jsfd", precision = 10, scale = 3) + private Double jsfd; + + @PropertyDef(label = "鍚ㄧ伯闄嶆按鑳借��") + @Column(name = "dljsnh", precision = 10, scale = 3) + private Double dljsnh; + + @PropertyDef(label = "閫氶闄嶆按鍧囧寑鎬у垎鏋恄鏁翠粨") + @Column(name = "tfjsjyxfxzc", length = 128) + private String tfjsjyxfxzc; + + @PropertyDef(label = "閫氶闄嶆按鍧囧寑鎬у垎鏋恄涓婂眰") + @Column(name = "tfjsjyxfxsc", length = 128) + private String tfjsjyxfxsc; + + @PropertyDef(label = "閫氶闄嶆按鍧囧寑鎬у垎鏋恄涓�(闂�)灞�") + @Column(name = "tfjsjyxfxzjc", length = 128) + private String tfjsjyxfxzjc; + + @PropertyDef(label = "閫氶闄嶆按鍧囧寑鎬у垎鏋恄涓嬪眰") + @Column(name = "tfjsjyxfxxc", length = 128) + private String tfjsjyxfxxc; + + @Column(name = "CHARGE_USER_", length = 30) + @PropertyDef(label = "璐熻矗浜�", description = "閫氶浣滀笟璐熻矗浜�") + private String chargeUser; + @Column(name = "OPERATORS_", length = 30) + @PropertyDef(label = "浣滀笟浜哄憳", description = "閫氶浣滀笟浜�") + private String operators; + + @Column(name = "START_TIME_") + @PropertyDef(label = "閫氶浣滀笟鏃堕棿") + private Date startTime; + + @Column(name = "LONG_TIME_") + @PropertyDef(label = "閫氶鏃堕暱锛屽崟浣嶅皬鏃�") + private Double longTime; + + @Column(name = "UPDATE_TIME_") + @PropertyDef(label = "淇敼鏃堕棿", description = "鏈�鍚庝慨鏀规椂闂�") + private Date updateTime; + + @Column(name = "UPDATE_USER_", length = 30) + @PropertyDef(label = "淇敼浜�", description = "鏈�鍚庝慨鏀逛汉") + private String updateUser; + + @Column(name = "REMARK_", length = 200) + @PropertyDef(label = "澶囨敞淇℃伅") + private String remark; + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/N2Filling.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/N2Filling.java new file mode 100644 index 0000000..c7bd781 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/N2Filling.java @@ -0,0 +1,199 @@ +package com.fzzy.igds.dzhwk.domain; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import java.io.Serializable; +import java.util.Date; + +/** + * 鎺ュ彛琛�-鍏呮爱姘旇皟浣滀笟 + * + */ +@Data +@Entity +@Table(name = "H_N2_FILLING") +public class N2Filling implements Serializable { + + @Id + @Column(name = "zydh", length = 40) + @PropertyDef(label = "浣滀笟鍗曞彿") + private String zydh; + + @Column(name = "COMPANY_ID_", length = 10) + @PropertyDef(label = "缁勭粐缂栫爜") + private String companyId; + + @Column(name = "DEPT_ID_", length = 40) + @PropertyDef(label = "鎵�灞炲垎搴�") + private String deptId; + + @Column(name = "ajdm", length = 40) + @PropertyDef(label = "寤掗棿浠g爜") + private String ajdm; + + @Column(name = "kssj") + @PropertyDef(label = "寮�濮嬫椂闂�") + private Date kssj; + + @Column(name = "jssj") + @PropertyDef(label = "缁撴潫鏃堕棿") + private Date jssj; + + @Column(name = "lspzdm", length = 40) + @PropertyDef(label = "绮鍝佺") + private String lspzdm; + + @Column(name = "lssl", length = 40) + @PropertyDef(label = "绮鏁伴噺") + private Double lssl; + + @Column(name = "qmxsfdb", length = 40) + @PropertyDef(label = "浠撴埧姘斿瘑鎬ф槸鍚﹁揪鏍�") + private String qmxsfdb; + + @Column(name = "qtmd", length = 40) + @PropertyDef(label = "姘旇皟鐩殑") + private String qtmd; + + @Column(name = "mbfs", length = 40) + @PropertyDef(label = "绮爢瀵嗛棴鏂瑰紡") + private String mbfs; + + @Column(name = "sddqnd") + @PropertyDef(label = "璁惧畾姘皵娴撳害") + private Double sddqnd; + + @Column(name = "cqfs", length = 40) + @PropertyDef(label = "鍏呮皵鏂瑰紡") + private String cqfs; + + @Column(name = "ljqtsj") + @PropertyDef(label = "绱姘旇皟鏃堕棿") + private Double ljqtsj; + + @Column(name = "wwzgz") + @PropertyDef(label = "姘旇皟鏈熼棿澶ф皵娓╁害鏈�楂樺��") + private Double wwzgz; + + @Column(name = "wwzdz") + @PropertyDef(label = "姘旇皟鏈熼棿澶ф皵娓╁害鏈�浣庡��") + private Double wwzdz; + + @Column(name = "wwpjz") + @PropertyDef(label = "姘旇皟鏈熼棿澶ф皵娓╁害骞冲潎鍊�") + private Double wwpjz; + + @Column(name = "cnwwzgz") + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴娓╁害鏈�楂樺��") + private Double cnwwzgz; + + @Column(name = "cnwwzdz") + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴娓╁害鏈�浣庡��") + private Double cnwwzdz; + + @Column(name = "cnwwpjz") + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴娓╁害骞冲潎鍊�") + private Double cnwwpjz; + + @Column(name = "cnwszgz") + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴婀垮害鏈�楂樺��") + private Double cnwszgz; + + @Column(name = "cnwszdz") + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴婀垮害鏈�浣庡��") + private Double cnwszdz; + + @Column(name = "cnwspjz") + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴婀垮害骞冲潎鍊�") + private Double cnwspjz; + + @Column(name = "ldndzgz") + @PropertyDef(label = "姘旇皟鏈熼棿绮爢姘皵娴撳害鏈�楂樺��") + private Double ldndzgz; + + @Column(name = "ldndzdz") + @PropertyDef(label = "姘旇皟鏈熼棿绮爢姘皵娴撳害鏈�浣庡��") + private Double ldndzdz; + + @Column(name = "ldndpjz") + @PropertyDef(label = "姘旇皟鏈熼棿绮爢姘皵娴撳害骞冲潎鍊�") + private Double ldndpjz; + + @Column(name = "qtqlwzgz") + @PropertyDef(label = "姘旇皟鍓嶇伯娓╂渶楂樺��") + private Double qtqlwzgz; + + @Column(name = "qtqlwzdz") + @PropertyDef(label = "姘旇皟鍓嶇伯娓╂渶浣庡��") + private Double qtqlwzdz; + + @Column(name = "qtqlwpjz") + @PropertyDef(label = "姘旇皟鍓嶇伯娓╁钩鍧�") + private Double qtqlwpjz; + + @Column(name = "qthlwzgz") + @PropertyDef(label = "姘旇皟鍚庣伯娓╂渶楂樺��") + private Double qthlwzgz; + + @Column(name = "qthlwzdz") + @PropertyDef(label = "姘旇皟鍚庣伯娓╂渶浣庡��") + private Double qthlwzdz; + + @Column(name = "qthlwpjz") + @PropertyDef(label = "姘旇皟鍚庣伯娓╁钩鍧�") + private Double qthlwpjz; + + @Column(name = "qtqsfzgz") + @PropertyDef(label = "姘旇皟鍓嶇伯姘村垎鏈�楂樺��") + private Double qtqsfzgz; + + @Column(name = "qtqsfzdz") + @PropertyDef(label = "姘旇皟鍓嶇伯姘村垎鏈�浣庡��") + private Double qtqsfzdz; + + @Column(name = "qtqsfpjz") + @PropertyDef(label = "姘旇皟鍓嶇伯姘村垎骞冲潎") + private Double qtqsfpjz; + + @Column(name = "qthsfzgz") + @PropertyDef(label = "姘旇皟鍚庣伯姘村垎鏈�楂樺��") + private Double qthsfzgz; + + @Column(name = "qthsfzdz") + @PropertyDef(label = "姘旇皟鍚庣伯姘村垎鏈�浣庡��") + private Double qthsfzdz; + + @Column(name = "qthsfpjz") + @PropertyDef(label = "姘旇皟鍚庣伯姘村垎骞冲潎") + private Double qthsfpjz; + + @Column(name = "qtqchqk", length = 40) + @PropertyDef(label = "姘旇皟鍓嶈櫕瀹虫儏鍐�") + private String qtqchqk; + + @Column(name = "qthchqk", length = 40) + @PropertyDef(label = "姘旇皟鍚庤櫕瀹虫儏鍐�") + private String qthchqk; + + @Column(name = "ycms", length = 40) + @PropertyDef(label = "姘旇皟闂村紓甯告儏鍐垫弿杩�") + private String ycms; + + @Column(name = "czr", length = 40) + @PropertyDef(label = "鎿嶄綔浜�") + private String czr; + + @Column(name = "bz", length = 40) + @PropertyDef(label = "澶囨敞") + private String bz; + + @Column(name = "zhgxsj") + @PropertyDef(label = "鏇存柊鏃堕棿") + private Date zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/AreationDataRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/AreationDataRepository.java new file mode 100644 index 0000000..6607fb6 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/AreationDataRepository.java @@ -0,0 +1,31 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.MAreationData; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2024/12/21 10:59 + */ +@Service +public interface AreationDataRepository extends JpaRepository<MAreationData, String> , JpaSpecificationExecutor<MAreationData> { + + /** + * 鑾峰彇淇℃伅 + * + * @param start + * @param end + * @return + */ + @Query("from MAreationData where startTime >=:start and startTime <:end order by id DESC") + List<MAreationData> getDataByTime(@Param("start") Date start, @Param("end") Date end); + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ColdValleyRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ColdValleyRepository.java new file mode 100644 index 0000000..51b49f5 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/ColdValleyRepository.java @@ -0,0 +1,16 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.ColdValley; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author CZT + * @Date 2025/6/05 14:46 + */ +@Service +public interface ColdValleyRepository extends JpaRepository<ColdValley, String>, JpaSpecificationExecutor<ColdValley> { + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/DrugLogRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/DrugLogRepository.java new file mode 100644 index 0000000..cbb95ad --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/DrugLogRepository.java @@ -0,0 +1,32 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.DrugLog; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2024/12/25 19:39 + */ +@Service +public interface DrugLogRepository extends JpaRepository<DrugLog, String> , JpaSpecificationExecutor<DrugLog> { + + /** + * 鑾峰彇淇℃伅 + * + * @param start + * @param end + * @return + */ + @Query("from DrugLog where updateTime >=:start and updateTime <:end order by id DESC") + List<DrugLog> getDataByTime(@Param("start") Date start, @Param("end") Date end); + + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GasRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GasRepository.java new file mode 100644 index 0000000..0eb2895 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GasRepository.java @@ -0,0 +1,16 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.Gas; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author CZT + * @Date 2024/12/21 10:36 + */ +@Service +public interface GasRepository extends JpaRepository<Gas, String>, JpaSpecificationExecutor<Gas> { + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GrainRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GrainRepository.java new file mode 100644 index 0000000..4f7cc1d --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/GrainRepository.java @@ -0,0 +1,30 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.Grain; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2024/12/21 10:36 + */ +@Service +public interface GrainRepository extends JpaRepository<Grain, String>, JpaSpecificationExecutor<Grain> { + + /** + * 鏍规嵁缁勭粐缂栫爜鍜屽簱鍖虹紪鐮佽幏鍙栦俊鎭� + * + * @param companyId + * @param depotId + * @return + */ + @Query("from Grain where companyId =:companyId and depotId =:depotId order by batchId DESC") + List<Grain> listGrain(@Param("companyId") String companyId, @Param("depotId") String depotId); + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/InoutDepotRecordRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/InoutDepotRecordRepository.java new file mode 100644 index 0000000..ffe561b --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/InoutDepotRecordRepository.java @@ -0,0 +1,16 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.InoutDepotRecord; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author CZT + * @Date 2025/06/05 10:36 + */ +@Service +public interface InoutDepotRecordRepository extends JpaRepository<InoutDepotRecord, String>, JpaSpecificationExecutor<InoutDepotRecord> { + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/N2FillingRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/N2FillingRepository.java new file mode 100644 index 0000000..4c6e3a5 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/N2FillingRepository.java @@ -0,0 +1,16 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.N2Filling; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.stereotype.Service; + +/** + * @Description + * @Author CZT + * @Date 2025/6/05 14:46 + */ +@Service +public interface N2FillingRepository extends JpaRepository<N2Filling, String>, JpaSpecificationExecutor<N2Filling> { + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/QualityManageRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/QualityManageRepository.java new file mode 100644 index 0000000..0a2fc3b --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/service/repository/QualityManageRepository.java @@ -0,0 +1,29 @@ +package com.fzzy.igds.dzhwk.service.repository; + +import com.fzzy.igds.dzhwk.domain.MQuality; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; +import java.util.List; + +/** + * @Description + * @Author CZT + * @Date 2024/12/02 16:33 + */ +@Service +public interface QualityManageRepository extends JpaRepository<MQuality, String>, JpaSpecificationExecutor<MQuality> { + + /** + * 鏍规嵁缁勭粐缂栫爜鍜屼粨搴撶紪鐮佽幏鍙栦俊鎭� + * + * @param companyId + * @param depotId + * @return + */ + @Query("from MQuality where companyId =:companyId and depotId =:depotId order by time DESC") + List<MQuality> getDataByDepotId(@Param("companyId") String companyId, @Param("depotId") String depotId); + +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysConfService.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysConfService.java new file mode 100644 index 0000000..3584934 --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysConfService.java @@ -0,0 +1,88 @@ +package com.fzzy.igds.sys; + +import com.fzzy.igds.dzhwk.constant.RedisConst; +import com.fzzy.igds.dzhwk.domain.DicSysConf; +import com.fzzy.igds.sys.repository.SysConfRepository; +import com.fzzy.igds.util.ContextUtil; +import com.ruoyi.common.core.redis.RedisCache; +import com.ruoyi.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + +/** + * @Description 绯荤粺閰嶇疆service灞� + * @Author CZT + * @Date 2024/11/20 19:01 + */ +@Slf4j +@Service("sys.sysConfService") +public class SysConfService { + + @Resource + private SysConfRepository sysConfRepository; + @Resource + private RedisCache redisCache; + + /** + * 鏍规嵁缁勭粐缂栫爜鑾峰彇绯荤粺鍙傛暟閰嶇疆淇℃伅 + * @param companyId + * @return + */ + public DicSysConf getSysConf(String companyId) { + + if(StringUtils.isEmpty(companyId)){ + companyId = ContextUtil.getCompanyId(); + } + return sysConfRepository.getSysConf(companyId); + } + + /** + * 鏇存柊绯荤粺閰嶇疆淇℃伅 + * @param data + */ + public void saveSysConf(DicSysConf data) { + if(StringUtils.isEmpty(data.getCompanyId())){ + data.setCompanyId(ContextUtil.getCompanyId()); + } + sysConfRepository.save(data); + } + + /** + * 鍒锋柊绯荤粺閰嶇疆缂撳瓨 + * @param companyId + */ + public void flushCacheSysConf(String companyId) { + if(StringUtils.isEmpty(companyId)){ + companyId = ContextUtil.getCompanyId(); + } + DicSysConf sysConf = sysConfRepository.getSysConf(companyId); + this.setCacheSysConf(companyId, sysConf); + } + + /** + * 璁剧疆绯荤粺閰嶇疆缂撳瓨 + * @param companyId + * @param data + */ + public void setCacheSysConf(String companyId, DicSysConf data) { + String key = RedisConst.buildKey(companyId, RedisConst.KEY_SYS_CONF); + redisCache.setCacheObject(key, data); + } + + /** + * 鑾峰彇绯荤粺閰嶇疆缂撳瓨 + * @param companyId + * @return + */ + public DicSysConf getCacheSysConf(String companyId) { + String key = RedisConst.buildKey(companyId, RedisConst.KEY_SYS_CONF); + DicSysConf data = (DicSysConf) redisCache.getCacheObject(key); + if (null == data) { + log.error("娌℃湁鑾峰彇鍒板綋鍓嶇粍缁�={}鐨勭郴缁熼厤缃郴缁燂紝鍙栭粯璁ゅ�笺��", companyId); + return new DicSysConf(companyId); + } + return data; + } +} diff --git a/igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/SysConfRepository.java b/igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/SysConfRepository.java new file mode 100644 index 0000000..6d68d9e --- /dev/null +++ b/igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/SysConfRepository.java @@ -0,0 +1,25 @@ +package com.fzzy.igds.sys.repository; + +import com.fzzy.igds.dzhwk.domain.DicSysConf; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Service; + +/** + * @Description SysConf JPA鎸佷箙灞� + * @Author CZT + * @Date 2024/11/19 18:36 + */ +@Service +public interface SysConfRepository extends JpaRepository<DicSysConf, String> { + + /** + * 鏍规嵁缁勭粐缂栫爜鑾峰彇绯荤粺閰嶇疆淇℃伅 + * @param companyId + * @return + */ + @Query("from DicSysConf where companyId =:companyId ") + DicSysConf getSysConf(@Param("companyId") String companyId); + +} diff --git a/igds-dzhwk-inte/pom.xml b/igds-dzhwk-inte/pom.xml new file mode 100644 index 0000000..61e1538 --- /dev/null +++ b/igds-dzhwk-inte/pom.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.fzzy</groupId> + <artifactId>igds-dzhwk-inte</artifactId> + <version>${igds.dzhwk.version}</version> + + <parent> + <artifactId>igds-dzhwk-parent</artifactId> + <groupId>com.fzzy</groupId> + <version>6.0.0</version> + <relativePath>../igds-dzhwk-parent/pom.xml</relativePath> + </parent> + + <description> + 鎺ュ彛妯″潡 + </description> + + <dependencies> + <dependency> + <groupId>com.fzzy</groupId> + <artifactId>igds-dzhwk-core</artifactId> + <version>${igds.dzhwk.version}</version> + </dependency> + </dependencies> + + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + <includes> + <include>**/*.xml</include> + <include>**/*.properties</include> + </includes> + <filtering>false</filtering> + </resource> + <resource> + <directory>src/main/java</directory> + <includes> + <include>**/*.xml</include> + </includes> + </resource> + </resources> + </build> + +</project> \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Manager.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Manager.java new file mode 100644 index 0000000..1dc9717 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Manager.java @@ -0,0 +1,48 @@ +package com.fzzy.igds.dzhwk.v1; + +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; +import java.util.HashMap; +import java.util.Map; + +/** + * @Description 瑙f瀽鏁版嵁鎺ュ彛鍒嗗彂 + * @Author CZT + * @Date 2025/6/04 16:10 + */ +@Component +public class ApiV1Manager implements ApplicationContextAware { + + private static Map<String, ApiV1Service> serviceMap; + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + Map<String, ApiV1Service> map = applicationContext + .getBeansOfType(ApiV1Service.class); + serviceMap = new HashMap<>(); + for (String key : map.keySet()) { + serviceMap.put(map.get(key).getInterfaceId(), map.get(key)); + } + } + + /** + * 涓氬姟鎵ц鍏ュ彛 + * @param + * @return + * @throws Exception + */ + @Async + public void analysis(String interfaceId, String dataStr, ApiV1ReqDto reqDto){ + + ApiV1Service service = serviceMap.get(interfaceId); + if(null == service){ + return; + } + service.analysis(dataStr, reqDto); + } + +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Server.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Server.java new file mode 100644 index 0000000..4948a51 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Server.java @@ -0,0 +1,103 @@ +package com.fzzy.igds.dzhwk.v1; + +import com.alibaba.fastjson.JSON; +import com.fzzy.igds.dzhwk.domain.DicSysConf; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1RespDto; +import com.fzzy.igds.dzhwk.v1.util.ApiV1Utils; +import com.fzzy.igds.sys.SysConfService; +import com.fzzy.igds.util.ContextUtil; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.http.HttpUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateFormatUtils; +import org.springframework.stereotype.Component; +import javax.annotation.Resource; +import java.util.Date; + +/** + * @Description 榄斿鏁版嵁鎺ュ彛鏈嶅姟 + * @Author CZT + * @Date 2025/6/04 16:10 + */ +@Slf4j +@Component +public class ApiV1Server { + + @Resource + private SysConfService confService; + @Resource + private ApiV1Manager apiManager; + + /** + * 鎷夊彇鏁版嵁 + * @param interfaceId 鎺ュ彛缂栫爜 + * @param startTime 璧峰鏃堕棿 + * @param endTime 鎴鏃堕棿 + * @return + */ + public String pullData(String interfaceId, Date startTime, Date endTime) { + + if (StringUtils.isEmpty(interfaceId)) { + log.error("鎺ュ彛缂栫爜涓虹┖锛屾帴鍙g紪鐮�={}", interfaceId); + return "鎺ュ彛缂栫爜涓虹┖锛�"; + } + if (null == startTime || null == endTime) { + log.error("璇锋眰鏃堕棿娈典负绌猴紝startTime={}, endTime={}", startTime, endTime); + return "璇锋眰鏃堕棿娈典负绌猴紒"; + } + DicSysConf sysConf = confService.getCacheSysConf(ContextUtil.getDefaultCompanyId()); + if (null == sysConf) { + log.error("鏈厤缃郴缁熼厤缃俊鎭�"); + return "鏈厤缃郴缁熼厤缃俊鎭紒"; + } + if (StringUtils.isEmpty(sysConf.getHwkApiPath())) { + log.error("鏈厤缃帴鍙h姹傚湴鍧�锛岃姹傚湴鍧�={}", sysConf.getHwkApiPath()); + return "鏈厤缃帴鍙h姹傚湴鍧�锛�"; + } + + //缁勮璇锋眰鏁版嵁 + ApiV1ReqDto reqDto = new ApiV1ReqDto(); + reqDto.setInterfaceId(interfaceId); + reqDto.setDeptId(""); + reqDto.setDeptId(""); + reqDto.setReqDate(DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss")); + reqDto.setStartTime(DateFormatUtils.format(startTime, "yyyy-MM-dd HH:mm:ss")); + reqDto.setEndTime(DateFormatUtils.format(endTime, "yyyy-MM-dd HH:mm:ss")); + String jsonString = JSON.toJSONString(reqDto); + + //POST璇锋眰鑾峰彇鏁版嵁 + String result = HttpUtils.sendPost(sysConf.getHwkApiPath(), jsonString); + + log.info("璇锋眰鎺ュ彛锛岃繑鍥炴暟鎹�={}", result); + if(StringUtils.isEmpty(result)){ + log.error("璇锋眰鎺ュ彛澶辫触锛岃繑鍥炴暟鎹�={}", result); + return "璇锋眰鎺ュ彛澶辫触锛�"; + } + //瑙f瀽杩斿洖鏁版嵁 + ApiV1RespDto respDto = JSON.parseObject(result, ApiV1RespDto.class); + if (null == respDto) { + log.error("璇锋眰鎺ュ彛澶辫触锛岃繑鍥炴暟鎹�={}", respDto); + return "璇锋眰鎺ュ彛澶辫触锛�"; + } + if(!"200".equals(respDto.getCode())){ + log.error("璇锋眰鎺ュ彛澶辫触锛岃繑鍥炴暟鎹�={}", respDto.getMsg()); + return respDto.getMsg(); + } + //瑙e瘑鎶ユ枃 + String dataStr = ApiV1Utils.decrypt(respDto.getData(), null); + log.info("璇锋眰鎺ュ彛锛岃繑鍥炴暟鎹�,瑙e瘑鍚�={}", dataStr); + if (dataStr == null) { + log.error("瑙e瘑鍚庢暟鎹负绌猴紝瑙e瘑鏁版嵁={}", dataStr); + return "瑙e瘑鍚庢暟鎹负绌猴紒"; + } + try { + //寮傛瑙f瀽鏁版嵁 + apiManager.analysis(interfaceId, dataStr, reqDto); + return null; + } catch (Exception e) { + log.error("榄斿鏁版嵁鎺ュ彛鏈嶅姟寮傚父", e); + return "榄斿鏁版嵁鎺ュ彛鏈嶅姟寮傚父锛�"; + } + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Service.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Service.java new file mode 100644 index 0000000..72780a3 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/ApiV1Service.java @@ -0,0 +1,23 @@ +package com.fzzy.igds.dzhwk.v1; + +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; + +/** + * @Description 鏁版嵁鎺ュ彛V1瑙f瀽鍒嗗彂 + * @Author CZT + * @Date 2025/6/04 16:10 + */ +public interface ApiV1Service { + + /** + * 鑾峰彇鎺ュ彛缂栫爜 + * @return + */ + public String getInterfaceId(); + + /** + * 瑙f瀽鏁版嵁 + * @param dataStr + */ + public void analysis(String dataStr, ApiV1ReqDto reqDto); +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1001.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1001.java new file mode 100644 index 0000000..1a887d3 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1001.java @@ -0,0 +1,86 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * @Description 浠撳偍鍗曚綅淇℃伅 + * @Author CZT + * @Date 2025/02/24 09:35 + */ +@Data +public class ApiV1Data1001 { + + @PropertyDef(label = "鍗曚綅浠g爜") + private String dwdm; + + @PropertyDef(label = "鍗曚綅鍚嶇О") + private String dwmc; + + @PropertyDef(label = "鍗曚綅绫诲瀷") + private String dwlx; + + @PropertyDef(label = "娉ㄥ唽鏃ユ湡") + private String zcrq; + + @PropertyDef(label = "娉ㄥ唽璧勬湰") + private Double zczb; + + @PropertyDef(label = "璧勪骇鎬婚") + private Double zcze; + + @PropertyDef(label = "娉曞畾浠h〃浜�") + private String fddbr; + + @PropertyDef(label = "娉曚汉韬唤璇佸彿") + private String frsfzh; + + @PropertyDef(label = "娉曚汉鑱旂郴鏂瑰紡") + private String frlxfs; + + @PropertyDef(label = "浼佷笟鑱旂郴浜�") + private String qylxr; + + @PropertyDef(label = "鍔炲叕鐢佃瘽") + private String bgdh; + + @PropertyDef(label = "娉ㄥ唽鍦板潃") + private String zcdz; + + @PropertyDef(label = "鐢靛瓙閭") + private String dzyx; + + @PropertyDef(label = "浼佷笟瀹樻柟缃戠珯鍦板潃") + private String qygfwzdz; + + @PropertyDef(label = "浼犵湡鍙风爜") + private String czhm; + + @PropertyDef(label = "閭斂缂栫爜") + private String yzbm; + + @PropertyDef(label = "琛屾斂鍖哄垝浠g爜") + private String xzqhdm; + + @PropertyDef(label = "搴撳尯鏁�") + private Integer kqs; + + @PropertyDef(label = "浠撴埧鏁�") + private Integer cfs; + + @PropertyDef(label = "娌圭綈鏁�") + private Integer ygs; + + @PropertyDef(label = "缁忓害") + private Double jd; + + @PropertyDef(label = "绾害") + private Double wd; + + @PropertyDef(label = "鍗曚綅鐘舵��") + private String dwzt; + + @PropertyDef(label = "鏇存柊鏃堕棿") + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1002.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1002.java new file mode 100644 index 0000000..51cb41a --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1002.java @@ -0,0 +1,62 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * @Description 搴撳尯淇℃伅 + * @Author CZT + * @Date 2025/02/24 09:35 + */ +@Data +public class ApiV1Data1002 { + + @PropertyDef(label = "搴撳尯浠g爜") + private String kqdm; + + @PropertyDef(label = "缁熶竴搴撳尯缂栫爜") + private String tykqbm; + + @PropertyDef(label = "鍗曚綅浠g爜") + private String dwdm; + + @PropertyDef(label = "搴撳尯鍚嶇О") + private String kqmc; + + @PropertyDef(label = "搴撳尯鍦板潃") + private String kqdz; + + @PropertyDef(label = "琛屾斂鍖哄垝浠g爜") + private String xzqhdm; + + @PropertyDef(label = "搴撳尯浜ф潈", description = "1锛� 鑷湁 2锛氱璧� 3锛氬叡鏈� 4锛氭贩鍚� 9锛氬叾浠�") + private String kqcq; + + @PropertyDef(label = "鏈夋晥浠撳") + private Double yxcr; + + @PropertyDef(label = "鏈夋晥缃愬") + private Double yxgr; + + @PropertyDef(label = "鍗犲湴闈㈢Н") + private Double zdmj; + + @PropertyDef(label = "浠撴埧鏁�") + private Integer cfs; + + @PropertyDef(label = "娌圭綈鏁�") + private Integer ygs; + + @PropertyDef(label = "搴撳尯缁忓害") + private Double jd; + + @PropertyDef(label = "搴撳尯绾害") + private Double wd; + + @PropertyDef(label = "搴撳尯鐘舵��", description = "1:姝e父锛堥粯璁わ級 2:閫�鍑哄偍澶囩伯鎵垮偍") + private String kqzt; + + @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�") + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1003.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1003.java new file mode 100644 index 0000000..07f2073 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1003.java @@ -0,0 +1,62 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * @Description 浠撴埧淇℃伅 + * @Author CZT + * @Date 2025/02/24 09:35 + */ +@Data +public class ApiV1Data1003 { + + @PropertyDef(label = "浠撴埧缂栫爜") + private String cfdm; + + @PropertyDef(label = "浠撴埧鍚嶇О") + private String cfmc; + + @PropertyDef(label = "浠撴埧绫诲瀷浠g爜") + private String cflxdm; + + @PropertyDef(label = "浜や粯浣跨敤鏃ユ湡") + private String jfsyrq; + + @PropertyDef(label = "鍦伴潰缁撴瀯") + private String dmjg; + + @PropertyDef(label = "澧欎綋缁撴瀯") + private String qtjg; + + @PropertyDef(label = "灞嬮《缁撴瀯") + private String fdjg; + + @PropertyDef(label = "灞嬫灦缁撴瀯") + private String fjjg; + + @PropertyDef(label = "璁捐鍌ㄩ噺", description = "鍗曚綅锛氬惃") + private Double sjcr; + + @PropertyDef(label = "浠撴埧楂樺害", description = "鍗曚綅锛氱背") + private Double cwg; + + @PropertyDef(label = "浠撴埧闀垮害", description = "鍗曚綅锛氱背") + private Double cwc; + + @PropertyDef(label = "浠撴埧瀹藉害", description = "鍗曚綅锛氱背") + private Double cwk; + + @PropertyDef(label = "淇濈鍛�") + private String bgr; + + @PropertyDef(label = "缁忓害") + private Double jd; + + @PropertyDef(label = "绾害") + private Double wd; + + @PropertyDef(label = "鏇存柊鏃堕棿") + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1004.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1004.java new file mode 100644 index 0000000..9a14744 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1004.java @@ -0,0 +1,43 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * @Description 寤掗棿淇℃伅 + * @Author CZT + * @Date 2025/02/24 09:35 + */ +@Data +public class ApiV1Data1004 { + + @PropertyDef(label = "寤掗棿浠g爜") + private String ajdh; + + @PropertyDef(label = "寤掗棿鍚嶇О") + private String ajmc; + + @PropertyDef(label = "浠撴埧(鎴栨补缃�)缂栫爜") + private String cfbh; + + @PropertyDef(label = "寤掗棿闀垮害") + private double ajcd; + + @PropertyDef(label = "寤掗棿瀹藉害") + private double ajkd; + + @PropertyDef(label = "寤掗棿楂樺害") + private double ajgd; + + @PropertyDef(label = "寤掗棿璁捐浠撳") + private double ajsjcr; + + @PropertyDef(label = "寤掗棿鍚敤鏃ユ湡") + private String ajqyrq; + + @PropertyDef(label = "寤掗棿鐘舵��") + private String ajzt; + + @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�") + private String zhgxsj; +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1005.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1005.java new file mode 100644 index 0000000..8cbaed2 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data1005.java @@ -0,0 +1,65 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * @Description 璐т綅淇℃伅 + * @Author CZT + * @Date 2025/02/24 09:35 + */ +@Data +public class ApiV1Data1005 { + + @PropertyDef(label = "璐т綅浠g爜" ) + private String hwdm; + + @PropertyDef(label = "璐т綅鍚嶇О" ) + private String hwmc; + + @PropertyDef(label = "寤掗棿浠g爜" ) + private String ajdm; + + @PropertyDef(label = "璐т綅鍚敤鏃ユ湡" ) + private String hwqyrq; + + @PropertyDef(label = "璐т綅瀹归噺" ) + private Double hwrl; + + @PropertyDef(label = "淇濈鍗曚綅" ) + private String bgdw; + + @PropertyDef(label = "淇濈鍛�" ) + private String bgy; + + @PropertyDef(label = "绮鍝佺浠g爜") + private String lspzdm; + + @PropertyDef(label = "绮鎬ц川浠g爜") + private String lsxzdm; + + @PropertyDef(label = "绮绛夌骇浠g爜") + private String lsdjdm; + + @PropertyDef(label = "鏀惰幏骞村害") + private String shnd; + + @PropertyDef(label = "鍥藉埆") + private String gb; + + @PropertyDef(label = "浜у湴") + private String cd; + + @PropertyDef(label = "璐т綅(娌圭綈)鐘舵��") + private String hwzt; + + @PropertyDef(label = "鍏ヤ粨鏃堕棿") + private String rcsj; + + @PropertyDef(label = "瀹為檯鏁伴噺(鍏枻)") + private double sjsl; + + @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�" ) + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2001.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2001.java new file mode 100644 index 0000000..90a6f70 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2001.java @@ -0,0 +1,54 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-绮儏 + */ +@Data +public class ApiV1Data2001 { + + @PropertyDef(label = "妫�娴嬪崟鍙�") + private String jcdj; + + @PropertyDef(label = "妫�娴嬫椂闂�") + private String jcsj; + + @PropertyDef(label = "浠撳簱缂栫爜") + private String hwdm; + + @PropertyDef(label = "浠撴埧澶栨俯") + private Double cfww; + + @PropertyDef(label = "浠撴埧澶栨箍") + private Double cfws; + + @PropertyDef(label = "浠撴埧鍐呮俯") + private Double cfnw; + + @PropertyDef(label = "浠撴埧鍐呮箍") + private Double cfns; + + @PropertyDef(label = "绮鏈�楂樻俯") + private Double lszgw; + + @PropertyDef(label = "绮鏈�浣庢俯") + private Double lszdw; + + @PropertyDef(label = "绮骞冲潎娓�") + private Double lspjw; + + @PropertyDef(label = "绮娓╁害鍊� 闆嗗悎") + private String lswdzjh; + + @PropertyDef(label = "澶╂皵") + private String weather; + + @PropertyDef(label = "妫�娴嬩汉") + private String jcr; + + @PropertyDef(label = "澶囨敞淇℃伅") + private String remarks; + +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2002.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2002.java new file mode 100644 index 0000000..450bb45 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2002.java @@ -0,0 +1,39 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-姘斾綋 + */ +@Data +public class ApiV1Data2002 { + + @PropertyDef(label = "妫�娴嬪崟鍙�") + private String qtndjcdh; + + @PropertyDef(label = "妫�娴嬫椂闂�") + private String jcsj; + + @PropertyDef(label = "浠撳簱缂栫爜") + private String hwdm; + + @PropertyDef(label = "姘ф皵鍚噺鍊奸泦鍚�") + private String yqhlzjh; + + @PropertyDef(label = "浜屾哀鍖栫⒊鍚噺鍊奸泦鍚�") + private String eyhthlzjh; + + @PropertyDef(label = "姘ф皵鍚噺鍊奸泦鍚�") + private String lhqndzjh; + + @PropertyDef(label = "姘皵鍚噺鍊奸泦鍚�") + private String dqndzjh; + + @PropertyDef(label = "浣滀笟绫诲瀷") + private Integer zylx; + + @PropertyDef(label = "鏇存柊鏃堕棿") + private String zhgxsj; + +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2003.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2003.java new file mode 100644 index 0000000..5252a35 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2003.java @@ -0,0 +1,100 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; +import java.util.Date; + +/** + * 鎺ュ彛琛�-璐ㄦ鏁版嵁琛� + */ +@Data +public class ApiV1Data2003 { + + @PropertyDef(label = "璐ㄦ鎶ュ憡鍗曞彿" ) + private String zjbgdh; + + @PropertyDef(label = "璐т綅浠g爜" ) + private String hwdm; + + @PropertyDef(label = "绮鍝佺浠g爜" ) + private String lspzdm; + + @PropertyDef(label = "绮绛夌骇浠g爜" ) + private String lsdjdm; + + @PropertyDef(label = "鍏ュ簱鏃ユ湡" ) + private String rkrq; + + @PropertyDef(label = "妫�楠屾椂闂�" ) + private String jysj; + + @PropertyDef(label = "妫�楠屽崟浣�" ) + private String jydw; + + @PropertyDef(label = "妫�楠岀被鍒�" ) + private String jylb; + + @PropertyDef(label = "妫�楠屼汉" ) + private String jyr; + + @PropertyDef(label = "妫�楠屼緷鎹�" ) + private String jyyj; + + @PropertyDef(label = "鎸囨爣绫诲埆" ) + private String zblb; + + @PropertyDef(label = "妫�楠岄」鐩�" ) + private String jyxm; + + @PropertyDef(label = "妫�楠岄」鐩��" ) + private String jyxmz; + + @PropertyDef(label = "鎸囨爣缁撴灉鍒ゅ畾" ) + private String zbjgpd; + + @PropertyDef(label = "椋熷搧瀹夊叏鎸囨爣鏄惁鍚堟牸" ) + private String spaqzbsfhg; + + @PropertyDef(label = "鎶ュ憡鍑哄叿鏃堕棿" ) + private String bgcjsj; + + @PropertyDef(label = "瀹℃牳浜哄鍚�" ) + private String shrxm; + + @PropertyDef(label = "鎵︽牱鍗曠紪鍙�" ) + private String qydbh; + + @PropertyDef(label = "鎵︽牱鏃堕棿" ) + private String qysj; + + @PropertyDef(label = "鎵︽牱鍖哄煙" ) + private String qyqy; + + @PropertyDef(label = "鎵︽牱浜哄鍚�" ) + private String qyrxm; + + @PropertyDef(label = "鐩戠潱浜哄鍚�" ) + private String jdrxm; + + @PropertyDef(label = "鏍峰搧缂栧彿" ) + private String ypbh; + + @PropertyDef(label = "鏍峰搧鏁伴噺" ) + private Double ypsl; + + @PropertyDef(label = "浠h〃鏁伴噺" ) + private Double dbsl; + + @PropertyDef(label = "鏍峰搧绛夌骇" ) + private String ypdj; + + @PropertyDef(label = "鏄惁姝e父瀛樺偍骞撮檺" ) + private String sfzcccnx; + + @PropertyDef(label = "澶囨敞" ) + private String bz; + + @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�" ) + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2004.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2004.java new file mode 100644 index 0000000..f9e43e2 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2004.java @@ -0,0 +1,36 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-杩涘嚭浠撹褰� + */ +@Data +public class ApiV1Data2004 { + + @PropertyDef(label = "鍗曞彿" ) + private String jccdh; + + @PropertyDef(label = "寤掗棿浠g爜" ) + private String ajdm; + + @PropertyDef(label = "杩涘嚭浠撲汉鍛�" ) + private String jcry; + + @PropertyDef(label = "杩涗粨鏃堕棿" ) + private String jcsj; + + @PropertyDef(label = "鍑轰粨鏃堕棿" ) + private String ccsj; + + @PropertyDef(label = "鍏ヤ粨鐩殑" ) + private String jcmd; + + @PropertyDef(label = "鍏ヤ粨璇存槑" ) + private String jcsm; + + @PropertyDef(label = "鏇存柊鏃堕棿" ) + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2005.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2005.java new file mode 100644 index 0000000..9cc1432 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2005.java @@ -0,0 +1,61 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-閫氶浣滀笟 + * + */ +@Data +public class ApiV1Data2005 { + + @PropertyDef(label = "閫氶浣滀笟鍗曞彿" ) + private String tfzydh; + + @PropertyDef(label = "閫氶鏃ユ湡" ) + private String tfrq; + + @PropertyDef(label = "寤掗棿浠g爜" ) + private String ajdm; + + @PropertyDef(label = "閫氶鐩殑" ) + private String tfmd; + + @PropertyDef(label = "閫氶绫诲瀷" ) + private String tflx; + + @PropertyDef(label = "閫侀鏂瑰紡" ) + private String sffs; + + @PropertyDef(label = "浣滀笟鏃舵皵娓�" ) + private Double zysqw; + + @PropertyDef(label = "浣滀笟鏃舵皵婀�" ) + private Double zysqs; + + @PropertyDef(label = "閫氶鏃堕暱" ) + private Double tfsc; + + @PropertyDef(label = "浣滀笟鍓嶅钩鍧囩伯娓�" ) + private Double zyqpjlw; + + @PropertyDef(label = "缁撴潫鍚庡钩鍧囩伯娓�" ) + private Double jshpjlw; + + @PropertyDef(label = "浣滀笟鍓嶅钩鍧囨按鍒�" ) + private Double zyqpjsf; + + @PropertyDef(label = "缁撴潫鍚庡钩鍧囨按鍒�" ) + private Double zyhpjsf; + + @PropertyDef(label = "閫氶浣滀笟璐熻矗浜�" ) + private String tfzyfzr; + + @PropertyDef(label = "閫氶浣滀笟浜哄憳" ) + private String tfzyry; + + @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�" ) + private String zhgxsj; + +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2006.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2006.java new file mode 100644 index 0000000..3499dca --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2006.java @@ -0,0 +1,142 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-鐔忚捀浣滀笟 + * + */ +@Data +public class ApiV1Data2006 { + + @PropertyDef(label = "鐔忚捀浣滀笟鍗曞彿") + private String xzzydh; + + @PropertyDef(label = "寤掗棿浠g爜") + private String ajdm; + + @PropertyDef(label = "鐔忚捀寮�濮嬫椂闂�") + private String xzkssj; + + @PropertyDef(label = "鐔忚捀缁撴潫鏃堕棿") + private String xzjssj; + + @PropertyDef(label = "灏佷粨鍚庣啅钂哥殑娆℃暟 绗嚑娆$啅钂�") + private Integer djcxz; + + @PropertyDef(label = "甯歌鐔忚捀鏂瑰紡") + private String cgxzfs; + + @PropertyDef(label = "鐜祦鐔忚捀鏂瑰紡") + private String hlxzfs; + + @PropertyDef(label = "鑽墏鍚嶇О") + private String yjmc; + + @PropertyDef(label = "鍓傚瀷") + private String jx; + + @PropertyDef(label = "娴撳害") + private Double nd; + + @PropertyDef(label = "鎬荤敤鑽噺") + private Double zyyl; + + @PropertyDef(label = "鏂借嵂鏂规硶") + private String syff; + + @PropertyDef(label = "杈呭姪鏂借嵂鎺柦") + private String fzsycs; + + @PropertyDef(label = "绌烘皵鍛煎惛鍣ㄥ強瀹夊叏妫�鏌ユ儏鍐�") + private String kqhqjaqjcqk; + + @PropertyDef(label = "纾峰寲姘㈡娴嬭缃皟璇曟儏鍐�") + private String lhqjczztsqk; + + @PropertyDef(label = "姘ф皵娣卞害妫�娴嬭缃皟璇曟儏鍐�") + private String yqsdjczztsqk; + + @PropertyDef(label = "纾峰寲姘㈡姤璀︿华瀹夊叏妫�鏌�") + private String lhqbjyaqjc; + + @PropertyDef(label = "姘ф皵鎶ヨ浠畨鍏ㄦ鏌�") + private String yqbjyaqjc; + + @PropertyDef(label = "琛ヨ嵂鍓嶄粨鍐呯7鍖栨阿娴撳害") + private Double byqcnlhqnd; + + @PropertyDef(label = "纾峰寲姘㈡祿搴﹀崟浣�",description = "1锛歡/m鲁 (榛樿) 2锛歱pm 3:ml/m鲁 4锛�%VOL銆�") + private String nlhqnddw; + + @PropertyDef(label = "鐩爣娴撳害") + private Double mbnd; + + @PropertyDef(label = "浣滀笟浜烘暟") + private Integer zyrs; + + @PropertyDef(label = "鐜板満鎸囨尌浜�") + private String xczhr; + + @PropertyDef(label = "婕忔皵浣嶇疆鐩戞祴") + private String lswzjc; + + @PropertyDef(label = "婕忔皵閮ㄤ綅閲囧彇鐨勮ˉ鏁戞帾鏂�") + private String lqbwcqdbjcs; + + @PropertyDef(label = "瀵嗛棴鏃堕棿") + private Integer mbsj; + + @PropertyDef(label = "鏁f皵鍓嶇7鍖栨阿娴撳害") + private Double sqqlhqnd; + + @PropertyDef(label = "鏁f皵鏃ユ湡") + private String sqrq; + + @PropertyDef(label = "鏁f皵鏂规硶") + private String sqff; + + @PropertyDef(label = "鏁f皵鎵瑰噯浜�") + private String sqpzr; + + @PropertyDef(label = "鏁f皵鎸佺画澶╂暟") + private Integer sqcsts; + + @PropertyDef(label = "鏁f皵缁撴潫鏃剁7鍖栨阿娴撳害") + private Double sqjsslhqnd; + + @PropertyDef(label = "娈嬫福鏀堕泦浣滀笟鏃堕棿") + private String czsjzysj; + + @PropertyDef(label = "娈嬫福鏀堕泦浣滀笟浜烘暟") + private Integer czsjzyrs; + + @PropertyDef(label = "娈嬫福鏀堕泦鏂规硶") + private String czsjff; + + @PropertyDef(label = "娈嬫福鏀堕泦浣滀笟鎵瑰噯浜�") + private String czsjzypzr; + + @PropertyDef(label = "娈嬫福澶勭悊鎺柦") + private String czclcs; + + @PropertyDef(label = "娈嬫福澶勭悊浣滀笟浜烘暟") + private Integer czclzyrs; + + @PropertyDef(label = "娈嬫福澶勭悊鎵瑰噯浜�") + private String czclpzr; + + @PropertyDef(label = "鐔忚捀鏁堟灉璇勪环") + private String xzxgpj; + + @PropertyDef(label = "鐔忚捀璐熻矗浜�") + private String xzfzr; + + @PropertyDef(label = "鐔忚捀浣滀笟浜哄憳") + private String xzzyry; + + @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�") + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2007.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2007.java new file mode 100644 index 0000000..e0bce5e --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2007.java @@ -0,0 +1,109 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-璋峰喎浣滀笟 + * + */ +@Data +public class ApiV1Data2007 { + + @PropertyDef(label = "璋峰喎浣滀笟鍗曞彿") + private String zydh; + + @PropertyDef(label = "寤掗棿浠g爜") + private String ajdm; + + @PropertyDef(label = "閫氶寮�濮嬫椂闂�") + private String kssj; + + @PropertyDef(label = "閫氶缁撴潫鏃堕棿") + private String jssj; + + @PropertyDef(label = "绮鍝佺") + private String lspzdm; + + @PropertyDef(label = "绮鏁伴噺") + private Double lssl; + + @PropertyDef(label = "鍐峰嵈閫氶鐩殑") + private String lqtfmd; + + @PropertyDef(label = "鍐峰嵈閫侀娓╁害") + private Double lqsfwd; + + @PropertyDef(label = "鍐峰嵈閫侀婀垮害") + private Double lqsfsd; + + @PropertyDef(label = "绱閫氶鏃堕棿") + private Double ljtfsj; + + @PropertyDef(label = "閫氶鏈熼棿澶栨俯鏈�楂樺��") + private Double wwzgz; + + @PropertyDef(label = "閫氶鏈熼棿澶栨俯鏈�浣庡��") + private Double wwzdz; + + @PropertyDef(label = "閫氶鏈熼棿澶栨俯骞冲潎鍊�") + private Double wwpjz; + + @PropertyDef(label = "閫氶鏈熼棿澶栨箍鏈�楂樺��") + private Double wszgz; + + @PropertyDef(label = "閫氶鏈熼棿澶栨箍鏈�浣庡��") + private Double wszdz; + + @PropertyDef(label = "閫氶鏈熼棿澶栨箍骞冲潎鍊�") + private Double wspjz; + + @PropertyDef(label = "閫氶鍓嶇伯娓╂渶楂樺��") + private Double qlwzgz; + + @PropertyDef(label = "閫氶鍓嶇伯娓╂渶浣庡��") + private Double qlwzdz; + + @PropertyDef(label = "閫氶鍓嶇伯娓╁钩鍧囧��") + private Double qlwpjz; + + @PropertyDef(label = "閫氶鍚庣伯娓╂渶楂樺��") + private Double hlwzgz; + + @PropertyDef(label = "閫氶鍚庣伯娓╂渶浣庡��") + private Double hlwzdz; + + @PropertyDef(label = "閫氶鍚庣伯娓╁钩鍧囧��") + private Double hlwpjz; + + @PropertyDef(label = "閫氶鍓嶇伯婀垮害鏈�楂樺��") + private Double qlszgz; + + @PropertyDef(label = "閫氶鍓嶇伯婀垮害鏈�浣庡��") + private Double qlszdz; + + @PropertyDef(label = "閫氶鍓嶇伯婀垮害骞冲潎鍊�") + private Double qlspjz; + + @PropertyDef(label = "閫氶鍚庣伯婀垮害鏈�楂樺��") + private Double hlszgz; + + @PropertyDef(label = "閫氶鍚庣伯婀垮害鏈�浣庡��") + private Double hlszdz; + + @PropertyDef(label = "閫氶鍚庣伯婀垮害骞冲潎鍊�") + private Double hlspjz; + + @PropertyDef(label = "鎬昏�楃數閲�") + private String zhdl; + + @PropertyDef(label = "鎿嶄綔浜�") + private String czr; + + @PropertyDef(label = "澶囨敞") + private Integer bz; + + @PropertyDef(label = "鏇存柊鏃堕棿") + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2008.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2008.java new file mode 100644 index 0000000..606784d --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1Data2008.java @@ -0,0 +1,139 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import com.bstek.dorado.annotation.PropertyDef; +import lombok.Data; + +/** + * 鎺ュ彛琛�-鍏呮爱姘旇皟浣滀笟 + * + */ +@Data +public class ApiV1Data2008 { + + @PropertyDef(label = "璋峰喎浣滀笟鍗曞彿") + private String zydh; + + @PropertyDef(label = "寤掗棿浠g爜") + private String ajdm; + + @PropertyDef(label = "閫氶寮�濮嬫椂闂�") + private String kssj; + + @PropertyDef(label = "閫氶缁撴潫鏃堕棿") + private String jssj; + + @PropertyDef(label = "绮鍝佺") + private String lspzdm; + + @PropertyDef(label = "绮鏁伴噺") + private String lssl; + + @PropertyDef(label = "浠撴埧姘斿瘑鎬ф槸鍚﹁揪鏍�") + private String qmxsfdb; + + @PropertyDef(label = "姘旇皟鐩殑") + private String qtmd; + + @PropertyDef(label = "绮爢瀵嗛棴鏂瑰紡") + private Double mbfs; + + @PropertyDef(label = "璁惧畾姘皵娴撳害") + private Double sddqnd; + + @PropertyDef(label = "鍏呮皵鏂瑰紡") + private String cqfs; + + @PropertyDef(label = "绱姘旇皟鏃堕棿") + private Double ljqtsj; + + @PropertyDef(label = "姘旇皟鏈熼棿澶ф皵娓╁害鏈�楂樺��") + private Double wwzgz; + + @PropertyDef(label = "姘旇皟鏈熼棿澶ф皵娓╁害鏈�浣庡��") + private Double wwzdz; + + @PropertyDef(label = "姘旇皟鏈熼棿澶ф皵娓╁害骞冲潎鍊�") + private Double wwpjz; + + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴娓╁害鏈�楂樺��") + private Double cnwwzgz; + + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴娓╁害鏈�浣庡��") + private Double cnwwzdz; + + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴娓╁害骞冲潎鍊�") + private Double cnwwpjz; + + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴婀垮害鏈�楂樺��") + private Double cnwszgz; + + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴婀垮害鏈�浣庡��") + private Double cnwszdz; + + @PropertyDef(label = "姘旇皟鏈熼棿浠撳唴婀垮害骞冲潎鍊�") + private Double cnwspjz; + + @PropertyDef(label = "姘旇皟鏈熼棿绮爢姘皵娴撳害鏈�楂樺��") + private Double ldndzgz; + + @PropertyDef(label = "姘旇皟鏈熼棿绮爢姘皵娴撳害鏈�浣庡��") + private Double ldndzdz; + + @PropertyDef(label = "姘旇皟鏈熼棿绮爢姘皵娴撳害骞冲潎鍊�") + private Double ldndpjz; + + @PropertyDef(label = "姘旇皟鍓嶇伯娓╂渶楂樺��") + private Double qtqlwzgz; + + @PropertyDef(label = "姘旇皟鍓嶇伯娓╂渶浣庡��") + private Double qtqlwzdz; + + @PropertyDef(label = "姘旇皟鍓嶇伯娓╁钩鍧�") + private Double qtqlwpjz; + + @PropertyDef(label = "姘旇皟鍚庣伯娓╂渶楂樺��") + private Double qthlwzgz; + + @PropertyDef(label = "姘旇皟鍚庣伯娓╂渶浣庡��") + private Double qthlwzdz; + + @PropertyDef(label = "姘旇皟鍚庣伯娓╁钩鍧�") + private Double qthlwpjz; + + @PropertyDef(label = "姘旇皟鍓嶇伯姘村垎鏈�楂樺��") + private Double qtqsfzgz; + + @PropertyDef(label = "姘旇皟鍓嶇伯姘村垎鏈�浣庡��") + private Double qtqsfzdz; + + @PropertyDef(label = "姘旇皟鍓嶇伯姘村垎骞冲潎") + private Double qtqsfpjz; + + @PropertyDef(label = "姘旇皟鍚庣伯姘村垎鏈�楂樺��") + private Double qthsfzgz; + + @PropertyDef(label = "姘旇皟鍚庣伯姘村垎鏈�浣庡��") + private Double qthsfzdz; + + @PropertyDef(label = "姘旇皟鍚庣伯姘村垎骞冲潎") + private Double qthsfpjz; + + @PropertyDef(label = "姘旇皟鍓嶈櫕瀹虫儏鍐�") + private String qtqchqk; + + @PropertyDef(label = "姘旇皟鍚庤櫕瀹虫儏鍐�") + private String qthchqk; + + @PropertyDef(label = "姘旇皟闂村紓甯告儏鍐垫弿杩�") + private String ycms; + + @PropertyDef(label = "czr") + private String 鎿嶄綔浜�; + + @PropertyDef(label = "澶囨敞") + private Integer bz; + + @PropertyDef(label = "鏇存柊鏃堕棿") + private String zhgxsj; + +} \ No newline at end of file diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1ReqDto.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1ReqDto.java new file mode 100644 index 0000000..bd4eb3e --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1ReqDto.java @@ -0,0 +1,26 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import lombok.Data; +import java.io.Serializable; + +/** + * @Description 鏁版嵁鎺ュ彛V1-鍙傛暟 + * @Author CZT + * @Date 2025/6/04 16:10 + */ +@Data +public class ApiV1ReqDto implements Serializable { + + private String interfaceId; + + private String sign; + + private String deptId; + + private String reqDate; + + private String startTime; + + private String endTime; + +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1RespDto.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1RespDto.java new file mode 100644 index 0000000..3a93dce --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/dto/ApiV1RespDto.java @@ -0,0 +1,34 @@ +package com.fzzy.igds.dzhwk.v1.dto; + +import lombok.Data; +import java.io.Serializable; + +/** + * @Description 鏁版嵁鎺ュ彛V1-鍝嶅簲鏁版嵁 + * @Author CZT + * @Date 2025/6/04 16:10 + */ +@Data +public class ApiV1RespDto implements Serializable { + + /** + * 鍝嶅簲缂栫爜 + */ + private String code; + + /** + * 鍝嶅簲淇℃伅 + */ + private String msg; + + /** + * 鍝嶅簲鏃堕棿(yyyy-MM-dd HH:mm:ss) + */ + private String respDate; + + /** + * 涓氬姟鏁版嵁 + */ + private String data; + +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1001.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1001.java new file mode 100644 index 0000000..a5b123c --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1001.java @@ -0,0 +1,60 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Company; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data1001; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.fzzy.igds.sys.repository.CompanyRepository; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.List; + +/** + * @Description 瑙f瀽鍗曚綅淇℃伅 + * @Author CZT + * @Date 2025/06/04 17:26 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl1001 implements ApiV1Service { + + @Autowired + private CompanyRepository companyRepository; + @Override + public String getInterfaceId() { + return "1001"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData){ + + List<ApiV1Data1001> list = JSONObject.parseArray(dataStr, ApiV1Data1001.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌鍗曚綅淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try{ + Company company; + for (ApiV1Data1001 api1001 : list) { + company = companyRepository.getDataById(configData.getSign()); + if(null == company){ + company = new Company(); + } + company.setId(configData.getSign()); + company.setCompanyId(configData.getSign()); + //璧嬪�煎睘鎬у�� + BeanUtils.copyProperties(api1001, company); + company.setZcrq(DateUtils.parseDate(api1001.getZcrq(), "yyyy-MM-dd")); + company.setZhgxsj(DateUtils.parseDate(api1001.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + companyRepository.save(company); + } + }catch (Exception e){ + log.error("-----瑙f瀽澶辫触={}---------", e); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1002.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1002.java new file mode 100644 index 0000000..ef83fc9 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1002.java @@ -0,0 +1,59 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Dept; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data1002; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.fzzy.igds.sys.repository.DeptRepository; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽搴撳尯淇℃伅 + * @Author CZT + * @Date 2025/06/04 17:26 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl1002 implements ApiV1Service { + + @Resource + private DeptRepository deptRepository; + @Override + public String getInterfaceId() { + return "1002"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData){ + + List<ApiV1Data1002> list = JSONObject.parseArray(dataStr, ApiV1Data1002.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌搴撳尯淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try{ + Dept dept; + for (ApiV1Data1002 api2002 : list) { + dept = deptRepository.getDataById(configData.getDeptId()); + if(null == dept){ + dept = new Dept(); + } + dept.setId(configData.getDeptId()); + dept.setCompanyId(configData.getSign()); + //璧嬪�煎睘鎬у�� + BeanUtils.copyProperties(api2002, dept); + dept.setZhgxsj(DateUtils.parseDate(api2002.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + deptRepository.save(dept); + } + }catch (Exception e){ + log.error("-----瑙f瀽澶辫触={}---------", e); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1003.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1003.java new file mode 100644 index 0000000..ae50857 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1003.java @@ -0,0 +1,70 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Building; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data1003; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.fzzy.igds.sys.BuildingService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽浠撴埧淇℃伅 + * @Author CZT + * @Date 2025/06/04 17:26 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl1003 implements ApiV1Service { + + @Resource + private BuildingService buildingService; + @Override + public String getInterfaceId() { + return "1003"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData){ + + List<ApiV1Data1003> list = JSONObject.parseArray(dataStr, ApiV1Data1003.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌浠撴埧淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try{ + Building building; + for (ApiV1Data1003 api2003 : list) { + building = new Building(); + + building.setId(api2003.getCfdm()); + building.setCompanyId(configData.getSign()); + building.setDeptId(configData.getDeptId()); + building.setName(api2003.getCfmc()); + building.setStorage(api2003.getSjcr()); + building.setHeight(api2003.getCwg()); + building.setLength(api2003.getCwc()); + building.setWidth(api2003.getCwk()); + + building.setGround(api2003.getDmjg()); + building.setWall(api2003.getQtjg()); + building.setRoof(api2003.getFdjg()); + building.setRoofTruss(api2003.getFjjg()); + building.setLon(api2003.getJd()); + building.setLat(api2003.getWd()); + + building.setUserDate(DateUtils.parseDate(api2003.getJfsyrq(), "yyyy-MM-dd")); + building.setUpdateTime(DateUtils.parseDate(api2003.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + + buildingService.saveOrUpdate(building); + } + }catch (Exception e){ + log.error("-----瑙f瀽澶辫触={}---------", e); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1004.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1004.java new file mode 100644 index 0000000..b683b43 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1004.java @@ -0,0 +1,70 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Granary; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data1004; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.fzzy.igds.sys.GranaryService; +import com.ruoyi.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽寤掗棿淇℃伅 + * @Author CZT + * @Date 2025/6/04 18:20 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl1004 implements ApiV1Service { + + @Resource + private GranaryService granaryService; + @Override + public String getInterfaceId() { + return "1004"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData){ + + List<ApiV1Data1004> list = JSONObject.parseArray(dataStr, ApiV1Data1004.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌寤掗棿淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try{ + Granary granary; + for (ApiV1Data1004 api2004 : list) { + + granary = new Granary(); + + granary.setAjdh(api2004.getAjdh()); + granary.setCompanyId(configData.getSign()); + granary.setDeptId(configData.getDeptId()); + granary.setAjmc(api2004.getAjmc()); + granary.setCfbh(api2004.getCfbh()); + granary.setAjcd(api2004.getAjcd()); + granary.setAjkd(api2004.getAjkd()); + granary.setAjgd(api2004.getAjgd()); + granary.setAjsjcr(api2004.getAjsjcr()); + + if(StringUtils.isNotEmpty(api2004.getAjqyrq())){ + granary.setAjqyrq(DateUtils.parseDate(api2004.getAjqyrq(), "yyyy-MM-dd")); + } + if(StringUtils.isNotEmpty(api2004.getZhgxsj())){ + granary.setUpdateTime(DateUtils.parseDate(api2004.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + } + granaryService.saveOrUpdate(granary); + } + }catch (Exception e){ + log.error("-----瑙f瀽澶辫触={}---------", e); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1005.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1005.java new file mode 100644 index 0000000..521ef64 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl1005.java @@ -0,0 +1,79 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Depot; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data1005; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.fzzy.igds.sys.DepotService; +import com.ruoyi.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽璐т綅淇℃伅 + * @Author CZT + * @Date 2025/6/04 18:50 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl1005 implements ApiV1Service { + + @Resource + private DepotService depotService; + + @Override + public String getInterfaceId() { + return "1005"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data1005> list = JSONObject.parseArray(dataStr, ApiV1Data1005.class); + if (null == list || list.isEmpty()) { + log.error("-----鏈幏鍙栧埌璐т綅淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + Depot depot; + for (ApiV1Data1005 apiData : list) { + + depot = depotService.getCacheDepot(configData.getSign(), apiData.getHwdm()); + if (null == depot) { + depot = new Depot(); + } + + depot.setId(apiData.getHwdm()); + depot.setName(apiData.getHwmc()); + + depot.setCompanyId(configData.getSign()); + depot.setDeptId(configData.getDeptId()); + depot.setBuildingId(apiData.getAjdm().substring(0, 25)); + depot.setGranaryId(apiData.getAjdm()); + depot.setStorageMax(apiData.getHwrl()); + depot.setStoreKeeperName(apiData.getBgy()); + depot.setFoodVariety(apiData.getLspzdm()); + depot.setFoodType(apiData.getLsxzdm()); + depot.setFoodLevel(apiData.getLsdjdm()); + depot.setFoodYear(apiData.getShnd()); + depot.setFoodLocation(apiData.getCd()); + depot.setDepotStatus(apiData.getHwzt()); + if (StringUtils.isNotEmpty(apiData.getRcsj())) { + depot.setStoreDate(DateUtils.parseDate(apiData.getRcsj(), "yyyy-MM-dd HH:mm:ss")); + } + if (StringUtils.isNotEmpty(apiData.getZhgxsj())) { + depot.setUpdateTime(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + } + depot.setStorageReal(apiData.getSjsl()); + depotService.saveDepot(depot); + } + } catch (Exception e) { + log.error("-----瑙f瀽澶辫触={}---------", e); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2001.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2001.java new file mode 100644 index 0000000..0650048 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2001.java @@ -0,0 +1,125 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Grain; +import com.fzzy.igds.dzhwk.service.repository.GrainRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2001; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽绮儏淇℃伅 + * @Author CZT + * @Date 2025/6/04 19:11 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2001 implements ApiV1Service { + + @Resource + private GrainRepository grainRepository; + + @Override + public String getInterfaceId() { + return "2001"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2001> list = JSONObject.parseArray(dataStr, ApiV1Data2001.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌绮儏淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + Grain grain; + for (ApiV1Data2001 apiData : list) { + grain = new Grain(); + BeanUtils.copyProperties(apiData, grain); + + grain.setBatchId(apiData.getJcdj()); + grain.setCompanyId(configData.getSign()); + grain.setDepotId(apiData.getHwdm()); + grain.setTempMin(apiData.getLszdw());//绮儏鏈�浣庢俯 + grain.setTempMax(apiData.getLszgw());//绮儏鏈�楂樻俯 + grain.setTempIn(apiData.getCfnw());//浠撳唴娓╁害 + grain.setTempOut(apiData.getCfww());//浠撳娓╁害 + grain.setTempAve(apiData.getLspjw());//绮骞冲潎娓� + grain.setHumidityOut(apiData.getCfws());//浠撳婀垮害 + grain.setHumidityIn(apiData.getCfww());//浠撳唴婀垮害 + + grain = grainGbToGrain01(grain, apiData.getLswdzjh()); + + grain.setWeather(apiData.getWeather()); + grain.setReceiveDate(DateUtils.parseDate(apiData.getJcsj(), "yyyy-MM-dd HH:mm:ss")); + grain.setCheckUser(apiData.getJcr()); + grain.setRemark(apiData.getRemarks()); + + grainRepository.save(grain); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + + } + + /** + * 灏嗘俯搴︿俊鎭浆涓虹郴缁熷唴绮儏鐐逛綅淇℃伅 + * + * @param lswdzjh + * @return + */ + public Grain grainGbToGrain01(Grain grain, String lswdzjh) { + String[] pointList = lswdzjh.split("\\|"); + + //鑾峰彇鏈�澶у眰琛屽垪 + String[] split; + Integer z = 0; //灞� + Integer y = 0; //琛� + Integer x = 0; //鍒� + for (String s : pointList) { + if (s.startsWith(",")) { + s = s.substring(1); + } + split = s.split(","); + if (Integer.valueOf(split[1]) > z) { + z = Integer.valueOf(split[1]); + } + if (Integer.valueOf(split[2]) > y) { + y = Integer.valueOf(split[2]); + } + if (Integer.valueOf(split[3]) > x) { + x = Integer.valueOf(split[3]); + } + } + + grain.setCable(z + "-" + y + "-" + x); + String points = ""; + + //灏嗘俯婀垮害鐐硅浆涓虹郴缁熶娇鐢ㄦ牸寮� + for (int a = 1; a <= x; a++) { //鍒� + for (int b = 1; b <= y; b++) { //琛� + for (int c = 1; c <= z; c++) { //灞� + for (String s : pointList) { + if (s.startsWith(",")) { + s = s.substring(1); + } + split = s.split(","); + if (Integer.valueOf(split[1]) == c && Integer.valueOf(split[2]) == b && Integer.valueOf(split[3]) == a) { + points += split[0] + ","; + } + } + } + } + } + grain.setPoints(points); + return grain; + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2002.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2002.java new file mode 100644 index 0000000..3b42da4 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2002.java @@ -0,0 +1,182 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.Gas; +import com.fzzy.igds.dzhwk.service.repository.GasRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2002; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import com.ruoyi.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; + +/** + * @Description 瑙f瀽姘斾綋淇℃伅 + * @Author CZT + * @Date 2025/6/04 20:11 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2002 implements ApiV1Service { + + @Resource + private GasRepository gasRepository; + + @Override + public String getInterfaceId() { + return "2002"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2002> list = JSONObject.parseArray(dataStr, ApiV1Data2002.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌姘斾綋妫�娴嬩俊鎭紝涓嶈В鏋�---------"); + return; + } + try { + Gas gas; + List<String> co2List = new ArrayList<>(); + List<String> o2List = new ArrayList<>(); + List<String> ph3List = new ArrayList<>(); + List<String> n2List = new ArrayList<>(); + Double max = 0.0; + Double min = 0.0; + Double sum = 0.0; + Double temp = 0.0; + for (ApiV1Data2002 apiData : list) { + gas = new Gas(); + + gas.setBatchId(apiData.getQtndjcdh()); + gas.setCompanyId(configData.getSign()); + gas.setDepotId(apiData.getHwdm()); + gas.setType(apiData.getZylx() + ""); + + //CO2 + if(StringUtils.isNotEmpty(apiData.getEyhthlzjh())){ + String[] split = apiData.getEyhthlzjh().split("\\|"); + String points = split[0]; + String[] values = points.split(","); + for(int i = 0; i < values.length; i++){ + temp = Double.valueOf(values[i]); + if (i ==0) { + sum = 0.0; + max = temp; + min = temp; + } + if(temp > max){ + max = temp; + } + if(temp < min){ + min = temp; + } + sum += temp; + o2List.add(values[i]); + } + gas.setPerCo2(sum / values.length); + gas.setPerCo2Max(max); + gas.setPerCo2Min(min); + } + + //O2 + if(StringUtils.isNotEmpty(apiData.getYqhlzjh())){ + String[] split = apiData.getYqhlzjh().split("\\|"); + String points = split[0]; + String[] values = points.split(","); + for(int i = 0; i < values.length; i++){ + temp = Double.valueOf(values[i]); + if (i ==0) { + sum = 0.0; + max = temp; + min = temp; + } + if(temp > max){ + max = temp; + } + if(temp < min){ + min = temp; + } + sum += temp; + o2List.add(values[i]); + } + gas.setPerO2(sum / values.length); + gas.setPerO2Max(max); + gas.setPerO2Min(min); + } + + //Ph3 + if(StringUtils.isNotEmpty(apiData.getLhqndzjh())){ + String[] split = apiData.getLhqndzjh().split("\\|"); + String points = split[0]; + String[] values = points.split(","); + for(int i = 0; i < values.length; i++){ + temp = Double.valueOf(values[i]); + if (i ==0) { + sum = 0.0; + max = temp; + min = temp; + } + if(temp > max){ + max = temp; + } + if(temp < min){ + min = temp; + } + sum += temp; + o2List.add(values[i]); + } + gas.setPerPh3(sum / values.length); + gas.setPerPh3Max(max); + gas.setPerPh3Min(min); + } + + //N2 + if(StringUtils.isNotEmpty(apiData.getDqndzjh())){ + String[] split = apiData.getDqndzjh().split("\\|"); + String points = split[0]; + String[] values = points.split(","); + for(int i = 0; i < values.length; i++){ + temp = Double.valueOf(values[i]); + if (i ==0) { + sum = 0.0; + max = temp; + min = temp; + } + if(temp > max){ + max = temp; + } + if(temp < min){ + min = temp; + } + sum += temp; + o2List.add(values[i]); + } + gas.setPerN2(sum / values.length); + gas.setPerN2Max(max); + gas.setPerN2Min(min); + } + + //鐐逛綅鍚勬皵浣撴祿搴� + String pointStr = ""; + for(int i = 0; i < o2List.size(); i++){ + pointStr += i + "," + co2List.get(i) + "," + o2List.get(i) + "," + ph3List.get(i) + "," + n2List.get(i) + ";"; + } + gas.setPoints(pointStr); + + gas.setReceiveDate(DateUtils.parseDate(apiData.getJcsj(), "yyyy-MM-dd HH:mm:ss")); + gas.setCheckUser(""); + gas.setRemark(""); + + gasRepository.save(gas); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2003.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2003.java new file mode 100644 index 0000000..c0d208d --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2003.java @@ -0,0 +1,62 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.MQuality; +import com.fzzy.igds.dzhwk.service.repository.QualityManageRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2003; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽璐ㄦ淇℃伅 + * @Author CZT + * @Date 2025/6/05 10:01 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2003 implements ApiV1Service { + + @Resource + private QualityManageRepository qualityManageRepository; + + @Override + public String getInterfaceId() { + return "2003"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2003> list = JSONObject.parseArray(dataStr, ApiV1Data2003.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌璐ㄦ淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + MQuality quality; + for (ApiV1Data2003 apiData : list) { + quality =new MQuality(); + BeanUtils.copyProperties(apiData, quality); + + quality.setCompanyId(configData.getSign()); + quality.setDeptId(configData.getDeptId()); + + quality.setStoreDate(DateUtils.parseDate(apiData.getRkrq(), "yyyy-MM-dd")); + quality.setTime(DateUtils.parseDate(apiData.getJysj(), "yyyy-MM-dd HH:mm:ss")); + quality.setBgcjsj(DateUtils.parseDate(apiData.getBgcjsj(), "yyyy-MM-dd HH:mm:ss")); + quality.setCheckTime(DateUtils.parseDate(apiData.getQysj(), "yyyy-MM-dd HH:mm:ss")); + quality.setUpdateTime(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + qualityManageRepository.save(quality); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2004.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2004.java new file mode 100644 index 0000000..6f1950e --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2004.java @@ -0,0 +1,57 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.InoutDepotRecord; +import com.fzzy.igds.dzhwk.service.repository.InoutDepotRecordRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2004; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽杩涘嚭浠撹褰曚俊鎭� + * @Author CZT + * @Date 2025/6/05 10:21 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2004 implements ApiV1Service { + + @Resource + private InoutDepotRecordRepository repository; + + @Override + public String getInterfaceId() { + return "2004"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2004> list = JSONObject.parseArray(dataStr, ApiV1Data2004.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌杩涘嚭浠撹褰曚俊鎭紝涓嶈В鏋�---------"); + return; + } + try { + InoutDepotRecord record; + for (ApiV1Data2004 apiData : list) { + record = new InoutDepotRecord(); + BeanUtils.copyProperties(apiData, record); + + record.setJcsj(DateUtils.parseDate(apiData.getJcsj(), "yyyy-MM-dd HH:mm:ss")); + record.setCcsj(DateUtils.parseDate(apiData.getCcsj(), "yyyy-MM-dd HH:mm:ss")); + record.setZhgxsj(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + + repository.save(record); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2005.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2005.java new file mode 100644 index 0000000..c6366e2 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2005.java @@ -0,0 +1,76 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.MAreationData; +import com.fzzy.igds.dzhwk.service.repository.AreationDataRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2005; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽鏈烘閫氶淇℃伅 + * @Author CZT + * @Date 2025/6/04 20:11 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2005 implements ApiV1Service { + + @Resource + private AreationDataRepository repository; + + @Override + public String getInterfaceId() { + return "2005"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2005> list = JSONObject.parseArray(dataStr, ApiV1Data2005.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + MAreationData data; + for (ApiV1Data2005 apiData : list) { + data = new MAreationData(); + data.setCompanyId(configData.getSign()); + data.setDeptId(configData.getDeptId()); + + BeanUtils.copyProperties(apiData, data); + + + data.setDepotId(apiData.getAjdm()); + data.setObjective(apiData.getTfmd()); + data.setType(apiData.getTflx()); + data.setAirSupplyMode(apiData.getSffs()); + data.setZysqw(apiData.getZysqw()); + data.setZysqs(apiData.getZysqs()); + data.setStartTime(DateUtils.parseDate(apiData.getTfrq(), "yyyy-MM-dd")); + + data.setLongTime(apiData.getTfsc()); + data.setBeforeTempAvg(apiData.getZyqpjlw()); + data.setAfterTempAvg(apiData.getJshpjlw()); + + data.setBeforPerWetAvg(apiData.getZyqpjsf()); + data.setAfterPerWetAvg(apiData.getZyhpjsf()); + data.setChargeUser(apiData.getTfzyfzr()); + data.setOperators(apiData.getTfzyry()); + + data.setUpdateTime(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + + repository.save(data); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2006.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2006.java new file mode 100644 index 0000000..3cab354 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2006.java @@ -0,0 +1,73 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.DrugLog; +import com.fzzy.igds.dzhwk.service.repository.DrugLogRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2006; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽鐔忚捀浣滀笟淇℃伅 + * @Author CZT + * @Date 2025/6/04 20:11 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2006 implements ApiV1Service { + + @Resource + private DrugLogRepository repository; + + @Override + public String getInterfaceId() { + return "2006"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2006> list = JSONObject.parseArray(dataStr, ApiV1Data2006.class); + if (null == list || list.isEmpty()) { + log.error("-----鏈幏鍙栧埌鐔忚捀浣滀笟淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + DrugLog data; + for (ApiV1Data2006 apiData : list) { + data = new DrugLog(); + + BeanUtils.copyProperties(apiData, data); + + data.setId(apiData.getXzzydh()); + data.setCompanyId(configData.getSign()); + data.setDeptId(configData.getDeptId()); + data.setDepotId(apiData.getAjdm()); + + data.setStart(DateUtils.parseDate(apiData.getXzkssj(), "yyyy-MM-dd HH:mm:ss")); + data.setEnd(DateUtils.parseDate(apiData.getXzjssj(), "yyyy-MM-dd HH:mm:ss")); + data.setNum(apiData.getDjcxz()); + data.setMode(apiData.getCgxzfs()); + data.setRecirMode(apiData.getHlxzfs()); + data.setDrugName(apiData.getYjmc()); + data.setJx(apiData.getJx()); + + data.setConcentration(apiData.getNd()); + data.setDose(apiData.getZyyl()); + data.setVentilateMethod(apiData.getSqff()); + data.setVentilateTime(DateUtils.parseDate(apiData.getSqrq(), "yyyy-MM-dd")); + + data.setUpdateTime(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + repository.save(data); + } + } catch (Exception e) { + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2007.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2007.java new file mode 100644 index 0000000..e5ed94b --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2007.java @@ -0,0 +1,61 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.ColdValley; +import com.fzzy.igds.dzhwk.service.repository.ColdValleyRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2007; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽璋峰喎浣滀笟淇℃伅 + * @Author CZT + * @Date 2025/6/05 14:46 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2007 implements ApiV1Service { + + @Resource + private ColdValleyRepository repository; + + @Override + public String getInterfaceId() { + return "2007"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2007> list = JSONObject.parseArray(dataStr, ApiV1Data2007.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌璋峰喎浣滀笟淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + ColdValley data; + for (ApiV1Data2007 apiData : list) { + data = new ColdValley(); + + BeanUtils.copyProperties(apiData, data); + + data.setCompanyId(configData.getSign()); + data.setDeptId(configData.getDeptId()); + + data.setKssj(DateUtils.parseDate(apiData.getKssj(), "yyyy-MM-dd HH:mm:ss")); + data.setJssj(DateUtils.parseDate(apiData.getJssj(), "yyyy-MM-dd HH:mm:ss")); + data.setZhgxsj(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + + repository.save(data); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2008.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2008.java new file mode 100644 index 0000000..a57b222 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/impl/ApiV1ServiceImpl2008.java @@ -0,0 +1,63 @@ +package com.fzzy.igds.dzhwk.v1.impl; + +import com.alibaba.fastjson.JSONObject; +import com.fzzy.igds.dzhwk.domain.N2Filling; +import com.fzzy.igds.dzhwk.service.repository.N2FillingRepository; +import com.fzzy.igds.dzhwk.v1.ApiV1Service; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1Data2008; +import com.fzzy.igds.dzhwk.v1.dto.ApiV1ReqDto; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.time.DateUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @Description 瑙f瀽鍏呮爱姘旇皟浣滀笟淇℃伅 + * @Author CZT + * @Date 2025/6/04 20:11 + */ +@Slf4j +@Service +public class ApiV1ServiceImpl2008 implements ApiV1Service { + + @Resource + private N2FillingRepository repository; + + @Override + public String getInterfaceId() { + return "2008"; + } + + @Override + public void analysis(String dataStr, ApiV1ReqDto configData) { + + List<ApiV1Data2008> list = JSONObject.parseArray(dataStr, ApiV1Data2008.class); + if(null == list || list.isEmpty()){ + log.error("-----鏈幏鍙栧埌淇℃伅锛屼笉瑙f瀽---------"); + return; + } + try { + N2Filling data; + for (ApiV1Data2008 apiData : list) { + data = new N2Filling(); + + BeanUtils.copyProperties(apiData, data); + + data.setCompanyId(configData.getSign()); + data.setDeptId(configData.getDeptId()); + + data.setKssj(DateUtils.parseDate(apiData.getKssj(), "yyyy-MM-dd HH:mm:ss")); + data.setJssj(DateUtils.parseDate(apiData.getJssj(), "yyyy-MM-dd HH:mm:ss")); + data.setZhgxsj(DateUtils.parseDate(apiData.getZhgxsj(), "yyyy-MM-dd HH:mm:ss")); + + repository.save(data); + } + }catch (Exception e){ + log.error("-----瑙f瀽閿欒={}---------", e.toString()); + } + + } +} diff --git a/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/util/ApiV1Utils.java b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/util/ApiV1Utils.java new file mode 100644 index 0000000..ab3bc23 --- /dev/null +++ b/igds-dzhwk-inte/src/main/java/com/fzzy/igds/dzhwk/v1/util/ApiV1Utils.java @@ -0,0 +1,148 @@ +package com.fzzy.igds.dzhwk.v1.util; + +import com.ruoyi.common.utils.StringUtils; +import lombok.extern.slf4j.Slf4j; + +import javax.crypto.Cipher; +import java.io.ByteArrayOutputStream; +import java.security.KeyFactory; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; +import java.util.Base64; + +@Slf4j +public class ApiV1Utils { + + + public static final String KEY_ALGORITHM = "RSA"; + public static final String PRIVATE_KEY = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJGxqYyI/k6nYkm2nf4ggkAMViEvbnplbQqw6Qweu4neFXCC+iKY8cq5RZEj8JLfrm/gHBTPN8FF1sQIwWwsDV7UUc88DS5KwAi5JXBHMdcbh2tftkINr0YVn6rIgUBTbmPZ7Y8L2iW8psYsF9nxwvUUtcbFJXIMJfi39Qxl0NQvAgMBAAECgYBKWLHfoCy9sFbMrN7UxnwQ+PqetpiW5tkNApf58ljbErQ4FO5V51xDieXBGejy2igmuOM7jz6xZtUgdiNV8uji/RtiNRqsBekVBPMeYAnPwA4GQ0HNwyHJ3ebJNQqT9bwrk8QpRUuCnrx/U1l7P1QNR5o52H1HpEKPlS0ga0fuQQJBAMdiSFYKt8/PwsYclvU/GqXrPy4cxMBhtE/ZssH9KourxnJcyfRz7EPgfSZykxlGHn8j/r8C2XxtAIYW6mRckqECQQC7EIZCZ3eV8abSIB33oKmw2jZlPQrHXMt8DWz8FYbNIA/9bvk9e9O42iQwMUtHfOMcNMWbcvKR/J+83bcE08TPAkA1ErdYl+/H1HDvVUrlq0+HnPArcSL6ZsedfcB0nNRHa4kehg6IEJdylf4aTuNTFfQmOcmkxLhpw4YhK1ZnMrEhAkEAuiMLNXA3MmCumk+TAiBAOdYoYjyHSTEw2VOSqpPQ+rN4tbmDEIbyefG2KK4kNhIy+pIYP0H11QYG/KuxvX/rSQJBALs0TqUgcGOp9+IkOq4jCXiVkP5/r7JWinQ4d6bYhJ4wspQYloYFCHljKKXtst1m8I3PC+vJY8R6va/3xtQKT8U="; + + private static final String CHARSET = "utf-8"; + + private static final int RESERVE_BYTES = 11; + + private static final int KEYSIZE = 1024;// 瀵嗛挜浣嶆暟 + + // 2048 bits 鐨� RSA 瀵嗛挜瀵癸紝鏈�澶цВ瀵嗗瘑鏂囧ぇ灏� + private static final int MAX_DECRYPT_BLOCK = KEYSIZE / 8; + + // 2048 bits 鐨� RSA 瀵嗛挜瀵癸紝鏈�澶у姞瀵嗘槑鏂囧ぇ灏� + private static final int MAX_ENCRYPT_BLOCK = MAX_DECRYPT_BLOCK - RESERVE_BYTES; + + // 鑾峰彇鍏挜 + public static PublicKey getPublicKey(String publicKeyString) throws Exception { + byte[] publicKeyByte = Base64.getDecoder().decode(publicKeyString); + X509EncodedKeySpec keySpec = new X509EncodedKeySpec(publicKeyByte); + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + return keyFactory.generatePublic(keySpec); + } + + // 鑾峰彇绉侀挜 + public static PrivateKey getPrivateKey(String privateKeyString) throws Exception { + byte[] privateKeyByte = Base64.getDecoder().decode(privateKeyString); + PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateKeyByte); + KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM); + return keyFactory.generatePrivate(keySpec); + } + + /** + * 绉侀挜瑙e瘑 + * + * @param secretText 寰呰В瀵嗙殑瀵嗘枃瀛楃涓� + * @param privateKeyStr 绉侀挜 + * @return 瑙e瘑鍚庣殑鏄庢枃 + */ + public static String decrypt(String secretText, String privateKeyStr) { + try { + if (StringUtils.isEmpty(privateKeyStr)) { + privateKeyStr = PRIVATE_KEY; + } + // 鐢熸垚绉侀挜 + Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); + cipher.init(Cipher.DECRYPT_MODE, getPrivateKey(privateKeyStr)); + // 瀵嗘枃瑙g爜 + byte[] data = Base64.getDecoder().decode(secretText); + + // 杩斿洖UTF-8缂栫爜鐨勮В瀵嗕俊鎭� + int inputLen = data.length; + ByteArrayOutputStream out = new ByteArrayOutputStream(); + int offSet = 0; + byte[] cache; + int i = 0; + // 瀵规暟鎹垎娈佃В瀵� + while (inputLen - offSet > 0) { + if (inputLen - offSet > MAX_DECRYPT_BLOCK) { + cache = cipher.doFinal(data, offSet, MAX_DECRYPT_BLOCK); + } else { + cache = cipher.doFinal(data, offSet, inputLen - offSet); + } + out.write(cache, 0, cache.length); + i++; + offSet = i * MAX_DECRYPT_BLOCK; + } + out.close(); + return out.toString(CHARSET); + } catch (Exception e) { + throw new RuntimeException("瑙e瘑瀛楃涓瞇" + secretText + "]鏃堕亣鍒板紓甯�", e); + } + } + + /** + * 鍏挜鍔犲瘑 + * + * @param text 寰呭姞瀵嗙殑鏄庢枃瀛楃涓� + * @param publicKeyStr 鍏挜 + * @return 鍔犲瘑鍚庣殑瀵嗘枃 + */ + public static String encrypt(String text, String publicKeyStr) { + String result = ""; + try { +// log.info("鏄庢枃瀛楃涓蹭负:[{}]", text); + // 鍔犲瘑 + Cipher cipher = Cipher.getInstance(KEY_ALGORITHM); + cipher.init(Cipher.ENCRYPT_MODE, getPublicKey(publicKeyStr)); + byte[] textArray = text.getBytes(); + int textLength = textArray.length; +// log.info("鍔犲瘑瀛楄妭鏁�={}", textLength); + // 鏈�澶у姞瀵嗗瓧鑺傛暟锛岃秴鍑烘渶澶у瓧鑺傛暟闇�瑕佸垎缁勫姞瀵� + int MAX_ENCRYPT_BLOCK = 117; + // 鏍囪瘑 + int offSet = 0; + byte[] resultBytes = {}; + byte[] cache = {}; + while (textLength - offSet > 0) { + if (textLength - offSet > MAX_ENCRYPT_BLOCK) { + cache = cipher.doFinal(textArray, offSet, MAX_ENCRYPT_BLOCK); + offSet += MAX_ENCRYPT_BLOCK; + } else { + cache = cipher.doFinal(textArray, offSet, textLength - offSet); + offSet = textLength; + } + resultBytes = Arrays.copyOf(resultBytes, resultBytes.length + cache.length); + System.arraycopy(cache, 0, resultBytes, resultBytes.length - cache.length, cache.length); + } + result = Base64.getEncoder().encodeToString(resultBytes); + } catch (Exception e) { + throw new RuntimeException("鍔犲瘑瀛楃涓瞇" + text + "]鏃堕亣鍒板紓甯�", e); + } + return result; + } + + public static void main(String[] args) { + String pri = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAJGxqYyI/k6nYkm2nf4ggkAMViEvbnplbQqw6Qweu4neFXCC+iKY8cq5RZEj8JLfrm/gHBTPN8FF1sQIwWwsDV7UUc88DS5KwAi5JXBHMdcbh2tftkINr0YVn6rIgUBTbmPZ7Y8L2iW8psYsF9nxwvUUtcbFJXIMJfi39Qxl0NQvAgMBAAECgYBKWLHfoCy9sFbMrN7UxnwQ+PqetpiW5tkNApf58ljbErQ4FO5V51xDieXBGejy2igmuOM7jz6xZtUgdiNV8uji/RtiNRqsBekVBPMeYAnPwA4GQ0HNwyHJ3ebJNQqT9bwrk8QpRUuCnrx/U1l7P1QNR5o52H1HpEKPlS0ga0fuQQJBAMdiSFYKt8/PwsYclvU/GqXrPy4cxMBhtE/ZssH9KourxnJcyfRz7EPgfSZykxlGHn8j/r8C2XxtAIYW6mRckqECQQC7EIZCZ3eV8abSIB33oKmw2jZlPQrHXMt8DWz8FYbNIA/9bvk9e9O42iQwMUtHfOMcNMWbcvKR/J+83bcE08TPAkA1ErdYl+/H1HDvVUrlq0+HnPArcSL6ZsedfcB0nNRHa4kehg6IEJdylf4aTuNTFfQmOcmkxLhpw4YhK1ZnMrEhAkEAuiMLNXA3MmCumk+TAiBAOdYoYjyHSTEw2VOSqpPQ+rN4tbmDEIbyefG2KK4kNhIy+pIYP0H11QYG/KuxvX/rSQJBALs0TqUgcGOp9+IkOq4jCXiVkP5/r7JWinQ4d6bYhJ4wspQYloYFCHljKKXtst1m8I3PC+vJY8R6va/3xtQKT8U="; + String s = "{\"sign\":\"5363\",\"deptId\":\"5363_001\",\"reqDate\":\"2025-01-22 17:16:23\",\"data\":[{\"jcdj\":\"202501220001\",\"jcsj\":\"2025-01-22 17:16:23\",\"hwdm\":\"100010101\",\"cfww\":17.5,\"cfws\":75.5,\"cfnw\":17.5,\"cfns\":75.5,\"lszgw\":17.5,\"lszdw\":17.5,\"lspjw\":17.5,\"lswdzjh\":\"27.7,1,1,1|25.1,1,1,2|24.6,1,1,3|26.3,1,2,1|19.3,1,2,2|19.3,1,2,3|27.7,2,1,1|25.1,2,1,2|24.6,2,1,3|26.3,2,2,1|19.3,2,2,2|19.3,2, 2,3\",\"weather\":\"鏅碶",\"jcr\":\"妫�娴嬩汉\",\"remarks\":\"澶囨敞淇℃伅\"},{\"jcdj\":\"202501220001\",\"jcsj\":\"2025-01-22 17:16:23\",\"hwdm\":\"100010101\",\"cfww\":17.5,\"cfws\":75.5,\"cfnw\":17.5,\"cfns\":75.5,\"lszgw\":17.5,\"lszdw\":17.5,\"lspjw\":17.5,\"lswdzjh\":\"27.7,1,1,1|25.1,1,1,2|24.6,1,1,3|26.3,1,2,1|19.3,1,2,2|19.3,1,2,3|27.7,2,1,1|25.1,2,1,2|24.6,2,1,3|26.3,2,2,1|19.3,2,2,2|19.3,2, 2,3\",\"weather\":\"鏅碶",\"jcr\":\"妫�娴嬩汉\",\"remarks\":\"澶囨敞淇℃伅111\"}]}"; + String pub = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCRsamMiP5Op2JJtp3+IIJADFYhL256ZW0KsOkMHruJ3hVwgvoimPHKuUWRI/CS365v4BwUzzfBRdbECMFsLA1e1FHPPA0uSsAIuSVwRzHXG4drX7ZCDa9GFZ+qyIFAU25j2e2PC9olvKbGLBfZ8cL1FLXGxSVyDCX4t/UMZdDULwIDAQAB"; + log.info("鏄庢枃瀛楃涓�:{}", s); + log.info("鍏挜:{}", pub); + String rsaPublicKey = encrypt(s, pub); + log.info("鍏挜鍔犲瘑鍚庡瘑鏂�:{}", rsaPublicKey); + + String decrypt = decrypt(rsaPublicKey, pri); + log.info("瑙e瘑鍚庢槑鏂�:{}", decrypt); + + } + +} diff --git a/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/SysConf.view.xml b/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/SysConf.view.xml new file mode 100644 index 0000000..186e821 --- /dev/null +++ b/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/SysConf.view.xml @@ -0,0 +1,525 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ViewConfig> + <Arguments/> + <Context/> + <Model> + <DataType name="dtMain"> + <Property name="creationType">com.fzzy.igds.dzhwk.domain.DicSysConf</Property> + <PropertyDef name="id"> + <Property></Property> + <Property name="label">缂栧彿</Property> + </PropertyDef> + <PropertyDef name="companyId"> + <Property></Property> + <Property name="label">缁勭粐缂栫爜</Property> + </PropertyDef> + <PropertyDef name="grainAuto"> + <Property></Property> + <Property name="label">绮儏鎵规鑷姩浼樺寲</Property> + <Property name="mapping"> + <Property name="mapValues"> + <Collection> + <Entity> + <Property name="code">N</Property> + <Property name="name">鍏抽棴</Property> + </Entity> + <Entity> + <Property name="code">Y</Property> + <Property name="name">寮�鍚�</Property> + </Entity> + </Collection> + </Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </Property> + </PropertyDef> + <PropertyDef name="grainErrorAuto"> + <Property></Property> + <Property name="label">绮儏寮傚父鑷姩澶勭悊</Property> + <Property name="mapping"> + <Property name="mapValues"> + <Collection> + <Entity> + <Property name="code">N</Property> + <Property name="name">鍏抽棴</Property> + </Entity> + <Entity> + <Property name="code">Y</Property> + <Property name="name">寮�鍚�</Property> + </Entity> + </Collection> + </Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="grainMaxAuto"> + <Property></Property> + <Property name="label">绮儏楂樻俯浼樺寲</Property> + <Property name="mapping"> + <Property name="mapValues"> + <Collection> + <Entity> + <Property name="code">N</Property> + <Property name="name">鍏抽棴</Property> + </Entity> + <Entity> + <Property name="code">Y</Property> + <Property name="name">寮�鍚�</Property> + </Entity> + </Collection> + </Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="grainMoreTag"> + <Property></Property> + <Property name="label">涓�鍒嗘満澶氫粨</Property> + <Property name="mapping"> + <Property name="mapValues"> + <Collection> + <Entity> + <Property name="code">N</Property> + <Property name="name">鍏抽棴</Property> + </Entity> + <Entity> + <Property name="code">Y</Property> + <Property name="name">寮�鍚�</Property> + </Entity> + </Collection> + </Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="grainOffset"> + <Property name="dataType">Double</Property> + <Property name="label">鍋忕Щ閲�</Property> + </PropertyDef> + <PropertyDef name="warnToWxTag"> + <Property></Property> + <Property name="label">璀﹀憡鎺ㄩ�佸井淇″惎鐢�</Property> + <Property name="mapping"> + <Property name="mapValues"> + <Collection> + <Entity> + <Property name="code">N</Property> + <Property name="name">鍏抽棴</Property> + </Entity> + <Entity> + <Property name="code">Y</Property> + <Property name="name">寮�鍚�</Property> + </Entity> + </Collection> + </Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="intervalTime"> + <Property name="dataType">int</Property> + <Property name="label">鎵ц闂撮殧鏃堕棿</Property> + <Property name="displayFormat">0.0 绉�</Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="intervalGas"> + <Property name="dataType">int</Property> + <Property name="label">姘斾綋妫�娴嬮棿闅�</Property> + <Property name="displayFormat">0.0 绉�</Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="intervalPest"> + <Property name="dataType">int</Property> + <Property name="label">铏妫�娴嬮棿闅�</Property> + <Property name="displayFormat">0.0 绉�</Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="grainAddPoint"> + <Property></Property> + <Property name="label">绮儏鐐硅蛋鍔垮紑鍚�</Property> + <Property name="mapping"> + <Property name="mapValues"> + <Collection> + <Entity> + <Property name="code">N</Property> + <Property name="name">鍏抽棴</Property> + </Entity> + <Entity> + <Property name="code">Y</Property> + <Property name="name">寮�鍚�</Property> + </Entity> + </Collection> + </Property> + <Property name="keyProperty">code</Property> + <Property name="valueProperty">name</Property> + </Property> + <Property name="required">true</Property> + </PropertyDef> + <PropertyDef name="quantityPath"> + <Property></Property> + <Property name="label">鏁伴噺妫�娴嬫湇鍔″湴鍧�</Property> + </PropertyDef> + <PropertyDef name="hwkApiPath"> + <Property></Property> + <Property name="label">璐т綅鍗℃帴鍙h矾寰�</Property> + </PropertyDef> + <PropertyDef name="sysName"> + <Property></Property> + <Property name="label">绯荤粺鍚嶇О</Property> + <Property name="required">true</Property> + <Validator name="validator1" type="length"> + <Property name="maxLength">8</Property> + <Property name="minLength">1</Property> + <Property name="resultMessage">闀垮害瑕佹眰1-8涓眽瀛�</Property> + </Validator> + </PropertyDef> + <PropertyDef name="threePath"> + <Property></Property> + <Property name="label">涓夌淮鍙鍖栬矾寰�</Property> + </PropertyDef> + <PropertyDef name="screeName"> + <Property></Property> + <Property name="label">澶у睆鍚嶇О</Property> + <Property name="required">true</Property> + <Validator name="validator1" type="length"> + <Property name="maxLength">20</Property> + <Property name="minLength">1</Property> + <Property name="resultMessage">闀垮害瑕佹眰1-14涓眽瀛�</Property> + </Validator> + </PropertyDef> + <PropertyDef name="support"> + <Property></Property> + <Property name="label">鎶�鏈敮鎸�</Property> + <Property name="required">true</Property> + <Validator name="validator1" type="length"> + <Property name="maxLength">25</Property> + <Property name="minLength">1</Property> + <Property name="resultMessage">闀垮害瑕佹眰1-25涓眽瀛�</Property> + </Validator> + </PropertyDef> + <PropertyDef name="email"> + <Property></Property> + <Property name="label">鍏徃閭</Property> + </PropertyDef> + <PropertyDef name="phone"> + <Property></Property> + <Property name="label">鍏徃鐢佃瘽</Property> + </PropertyDef> + <PropertyDef name="website"> + <Property></Property> + <Property name="label">鍏徃缃戠珯</Property> + </PropertyDef> + <PropertyDef name="address"> + <Property></Property> + <Property name="label">鍏徃鍦板潃</Property> + </PropertyDef> + </DataType> + </Model> + <View layout="padding:5;regionPadding:5"> + <ClientEvent name="onReady">view.get("#dialogPwd").show();</ClientEvent> + <Property name="packages">font-awesome,css-common</Property> + <DataSet id="dsMain"> + <Property name="dataProvider">sysConfPR#getSysConf</Property> + <Property name="dataType">dtMain</Property> + </DataSet> + <Container layout="regionPadding:10" layoutConstraint="top"> + <Property name="exClassName">bg-color</Property> + <Property name="height">55</Property> + <Property name="contentOverflow">hidden</Property> + <Label layoutConstraint="left"> + <Property name="text">鑿滃崟鏍忥細</Property> + </Label> + <Button id="btnUpdate" layoutConstraint="left"> + <Property name="caption">纭淇敼</Property> + <Property name="exClassName">btn1</Property> + <Property name="iconClass">fa fa-check</Property> + <Property name="action">updateData</Property> + </Button> + <Button layoutConstraint="left"> + <Property name="caption">鍒锋柊缂撳瓨</Property> + <Property name="exClassName">btn2</Property> + <Property name="iconClass">fa fa-refresh</Property> + <Property name="action">ajaxRefreshCache</Property> + </Button> + <Button layoutConstraint="left"> + <ClientEvent name="onClick">window.location.reload();</ClientEvent> + <Property name="caption">閲嶆柊楠岃瘉</Property> + <Property name="exClassName">btn4</Property> + <Property name="iconClass">fa fa-key</Property> + <Property name="icon">S</Property> + </Button> + <Button layoutConstraint="left"> + <Property name="caption">鍒锋柊鎵�鏈夌紦瀛�</Property> + <Property name="exClassName">btn1</Property> + <Property name="iconClass">fa fa-refresh</Property> + <Property name="action">ajaxRefreshCacheALL</Property> + </Button> + </Container> + <Panel> + <Property name="caption">楂樼骇绯荤粺鍙傛暟閰嶇疆</Property> + <Property name="iconClass">fa fa-cog</Property> + <Property name="tags">tagShow</Property> + <Property name="visible">false</Property> + <Buttons/> + <Children> + <AutoForm> + <Property name="dataSet">dsMain</Property> + <Property name="labelAlign">right</Property> + <Property name="labelSeparator">锛�</Property> + <Property name="labelWidth">140</Property> + <Property name="cols">*,*,*,*</Property> + <Control/> + <AutoFormElement> + <Property name="name">grainAuto</Property> + <Property name="property">grainAuto</Property> + <Property name="hideMode">display</Property> + <Property name="visible">false</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氬紑鍚悗锛岀伯鎯呮壒娆℃牴鎹笂涓�涓壒娆¤嚜鍔ㄤ紭鍖�</Property> + <Property name="hideMode">display</Property> + <Property name="visible">false</Property> + </Label> + <Control> + <Property name="hideMode">display</Property> + <Property name="visible">false</Property> + </Control> + <AutoFormElement> + <Property name="name">grainErrorAuto</Property> + <Property name="property">grainErrorAuto</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氬紑鍚悗锛岀伯鎯呭紓甯哥偣鑷姩浼樺寲</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">grainMaxAuto</Property> + <Property name="property">grainMaxAuto</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氬紑鍚悗锛岀伯鎯呴珮娓╃偣鑷姩浼樺寲璋冩暣</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">grainMoreTag</Property> + <Property name="property">grainMoreTag</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氫竴鍒嗘満澶氫粨闇�瑕佸紑鍚�</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">intervalTime</Property> + <Property name="property">intervalTime</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氱綉缁滄ā寮�=銆愭棤绾裤�戞湁鏁�</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">intervalGas</Property> + <Property name="property">intervalGas</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">intervalPest</Property> + <Property name="property">intervalPest</Property> + <Editor/> + </AutoFormElement> + <Label/> + <Control/> + <AutoFormElement> + <Property name="name">warnToWxTag</Property> + <Property name="property">warnToWxTag</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氬紑鍚井淇¤鍛婇�氱煡鍔熻兘</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">grainAddPoint</Property> + <Property name="property">grainAddPoint</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氬紑鍚悗鏀寔绮儏鐐硅蛋鍔挎煡鐪�</Property> + </Label> + </AutoForm> + </Children> + <Tools/> + </Panel> + <Panel> + <Property name="caption">绯荤粺杩愮淮鍙傛暟閰嶇疆</Property> + <Property name="iconClass">fa fa-cog</Property> + <Property name="tags">tagShow</Property> + <Property name="visible">false</Property> + <Buttons/> + <Children> + <AutoForm> + <Property name="dataSet">dsMain</Property> + <Property name="labelAlign">right</Property> + <Property name="labelSeparator">锛�</Property> + <Property name="labelWidth">140</Property> + <Property name="cols">*,*,*,*</Property> + <Control/> + <AutoFormElement> + <Property name="name">sysName</Property> + <Property name="property">sysName</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氱郴缁熻彍鍗曚笂闈㈠悕绉帮紝濡傛灉閰嶇疆涓猴細SUB_NAME 琛ㄧず褰撳墠鎵�灞炲垎搴撳悕绉�</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">screeName</Property> + <Property name="property">screeName</Property> + <Editor/> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氬ぇ灞忓悕绉帮紝濡傛灉閰嶇疆涓猴細SUB_NAME鏅烘収绮簱缁煎悎澶у睆锛岃〃绀猴細XX绮簱鏅烘収绮簱缁煎悎澶у睆</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">support</Property> + <Property name="property">support</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">website</Property> + <Property name="property">website</Property> + <Editor> + <TextEditor> + <Property name="blankText"> -- 蹇呴』浠� http:// 寮�澶�--</Property> + </TextEditor> + </Editor> + </AutoFormElement> + <Control/> + <Control/> + <AutoFormElement> + <Property name="name">phone</Property> + <Property name="property">phone</Property> + <Editor/> + </AutoFormElement> + <AutoFormElement> + <Property name="name">email</Property> + <Property name="property">email</Property> + <Editor/> + </AutoFormElement> + <Control/> + <Control/> + <AutoFormElement layoutConstraint="colSpan:2"> + <Property name="name">address</Property> + <Property name="property">address</Property> + <Editor/> + </AutoFormElement> + <Control/> + <Control/> + <AutoFormElement> + <Property name="name">quantityPath</Property> + <Property name="property">quantityPath</Property> + <Editor> + <TextEditor> + <Property name="blankText"> -- 蹇呴』浠� http:// 寮�澶�--</Property> + </TextEditor> + </Editor> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氭暟閲忓湪绾挎娴嬬嫭绔嬫湇鍔″湴鍧�</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">threePath</Property> + <Property name="property">threePath</Property> + <Editor> + <TextEditor> + <Property name="blankText"> -- 蹇呴』浠� http:// 寮�澶�--</Property> + </TextEditor> + </Editor> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氫笁缁村彲瑙嗗寲鐙珛鏈嶅姟鍦板潃</Property> + </Label> + <Control/> + <AutoFormElement> + <Property name="name">hwkApiPath</Property> + <Property name="property">hwkApiPath</Property> + <Editor> + <TextEditor> + <Property name="blankText"> -- 蹇呴』浠� http:// 寮�澶�--</Property> + </TextEditor> + </Editor> + </AutoFormElement> + <Label layoutConstraint="colSpan:2"> + <Property name="text">璇存槑锛氱數瀛愯揣浣嶅崱鎺ュ彛璺緞</Property> + </Label> + </AutoForm> + </Children> + <Tools/> + </Panel> + <AjaxAction id="ajaxRefreshCache"> + <Property name="service">sysConfPR#flushCacheSysConf</Property> + <Property name="successMessage">鍒锋柊鎴愬姛锛�</Property> + <Property name="confirmMessage">纭畾瑕佸埛鏂扮紦瀛樹箞锛�</Property> + </AjaxAction> + <AjaxAction id="ajaxCheckPwd"> + <Property name="service">sysConfPR#checkUserByPwd</Property> + </AjaxAction> + <UpdateAction id="updateData"> + <Property name="dataResolver">sysConfPR#saveSysConf</Property> + <Property name="confirmMessage">纭畾瑕佹墽琛屾洿鏂颁箞锛�</Property> + <Property name="successMessage">鏁版嵁鏇存柊瀹屾垚锛侊紒锛�</Property> + <UpdateItem> + <Property name="dataSet">dsMain</Property> + <Property name="dataPath">[#current]</Property> + </UpdateItem> + </UpdateAction> + <AjaxAction id="ajaxRefreshCacheALL"> + <Property name="service">systemRunner#flushAllCache</Property> + <Property name="successMessage">鍒锋柊鎴愬姛锛�</Property> + <Property name="confirmMessage">纭畾瑕佸埛鏂版墍鏈夌紦瀛樹箞锛�</Property> + </AjaxAction> + <Dialog id="dialogPwd"> + <Property name="caption">浜屾瀵嗙爜楠岃瘉</Property> + <Buttons> + <Button> + <ClientEvent name="onClick">var pwd = view.get("#passwordEditor").get("value");
 +view.get("#ajaxCheckPwd").set("parameter",pwd).execute(function(result){
 + if(result){
 + $alert(result);
 + }else{
 + self.get("parent").close();
 + view.get("^tagShow").set("visible",true);
 + view.get("#dsMain").flushAsync();
 + }
 +});</ClientEvent> + <Property name="width">85</Property> + <Property name="caption">纭畾</Property> + <Property name="exClassName">btn1</Property> + </Button> + <Button> + <ClientEvent name="onClick">self.get("parent").close();
 +</ClientEvent> + <Property name="width">85</Property> + <Property name="caption">鍙栨秷</Property> + <Property name="exClassName">btn3</Property> + </Button> + </Buttons> + <Children> + <PasswordEditor id="passwordEditor" layoutConstraint="padding:10"/> + </Children> + <Tools/> + </Dialog> + </View> +</ViewConfig> diff --git a/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/SysConfPR.java b/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/SysConfPR.java new file mode 100644 index 0000000..d6d53a0 --- /dev/null +++ b/igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/SysConfPR.java @@ -0,0 +1,84 @@ +package com.fzzy.igds.sys.pr; + +import com.bstek.dorado.annotation.DataProvider; +import com.bstek.dorado.annotation.DataResolver; +import com.bstek.dorado.annotation.Expose; +import com.fzzy.igds.dzhwk.domain.DicSysConf; +import com.fzzy.igds.sys.SysConfService; +import com.fzzy.igds.util.ContextUtil; +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.common.utils.ShiroUtils; +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authc.AuthenticationException; +import org.apache.shiro.authc.UsernamePasswordToken; +import org.apache.shiro.subject.Subject; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +/** + * @Description 绯荤粺閰嶇疆绠$悊 + * @Author CZT + * @Date 2024/11/19 18:36 + */ +@Component +public class SysConfPR { + + @Resource + private SysConfService sysConfService; + + /** + * sysConfPR#getSysConf + * + * @return 鑾峰彇鏁版嵁搴撲腑鐨勯厤缃紝濡傛灉娌℃湁鍒欏垱寤轰竴涓柊瀵硅薄 + */ + @DataProvider + public DicSysConf getSysConf() { + return sysConfService.getSysConf(ContextUtil.getCompanyId()); + } + + /** + * sysConfPR#saveSysConf 鏁版嵁鏇存柊 + * + * @return + */ + @DataResolver + public void saveSysConf(DicSysConf data) { + + DicSysConf sysConf = new DicSysConf(); + BeanUtils.copyProperties(data, sysConf); + sysConfService.saveSysConf(sysConf); + } + + /** + * sysConfPR#flushCacheSysConf + */ + @Expose + public void flushCacheSysConf() { + sysConfService.flushCacheSysConf(ContextUtil.getCompanyId()); + } + + /** + * sysConfPR#checkUserByPwd + * systemPR#checkUserByPwd + * 褰撳墠鐧婚檰浜哄瘑鐮侀獙璇� + * @param pwd + * @return + */ + @Expose + public String checkUserByPwd(String pwd){ + SysUser user = ShiroUtils.getSysUser(); + if(null == user){ + return "鎮ㄥ凡缁忔帀绾匡紝璇烽噸鏂扮櫥褰曞悗纭锛�"; + } + UsernamePasswordToken token = new UsernamePasswordToken(user.getLoginName(), pwd, false); + Subject subject = SecurityUtils.getSubject(); + try { + subject.login(token); + return null; + } catch (AuthenticationException e) { + return "瀵嗙爜閿欒"; + } + } +} diff --git a/igds-dzhwk-web/pom.xml b/igds-dzhwk-web/pom.xml index 8eabd65..44323f0 100644 --- a/igds-dzhwk-web/pom.xml +++ b/igds-dzhwk-web/pom.xml @@ -44,6 +44,13 @@ <version>${igds.dzhwk.version}</version> </dependency> + <!-- 鎺ュ彛鍖�--> + <dependency> + <groupId>com.fzzy</groupId> + <artifactId>igds-dzhwk-inte</artifactId> + <version>${igds.dzhwk.version}</version> + </dependency> + <!-- d7鐨偆鍖� --> <dependency> <groupId>dorado.skins</groupId> diff --git a/pom.xml b/pom.xml index 143e97b..132f81c 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,7 @@ <module>igds-dzhwk-view</module> <module>igds-dzhwk-web</module> <module>igds-dzhwk-doc</module> + <module>igds-dzhwk-inte</module> </modules> </project> \ No newline at end of file -- Gitblit v1.9.3