From 4632256b4056ab3a63da6aea1745a042e8e4e16a Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期五, 18 八月 2023 19:52:17 +0800
Subject: [PATCH] 基础数据上报--单位、库区、仓房
---
src/main/java/com/fzzy/push/sh2023/SH2023PushService11.java | 168 +++++++++++
src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1102.java | 101 +++++++
src/main/java/com/fzzy/api/view/repository/Api1106Rep.java | 9
src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1103.java | 213 +++++++++++++++
src/main/java/com/fzzy/api/view/repository/Api1105Rep.java | 9
src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1101.java | 149 ++++++++++
src/main/java/com/fzzy/api/entity/Api1102.java | 51 ++-
src/main/java/com/fzzy/api/view/repository/Api1104Rep.java | 8
src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java | 102 ++++++
9 files changed, 763 insertions(+), 47 deletions(-)
diff --git a/src/main/java/com/fzzy/api/entity/Api1102.java b/src/main/java/com/fzzy/api/entity/Api1102.java
index b36ed75..801c79d 100644
--- a/src/main/java/com/fzzy/api/entity/Api1102.java
+++ b/src/main/java/com/fzzy/api/entity/Api1102.java
@@ -21,36 +21,36 @@
@Entity
@Table(name = "API_1102")
public class Api1102 implements Serializable {
-
+
/**
- *
- */
- private static final long serialVersionUID = 6597930270077627879L;
+ *
+ */
+ private static final long serialVersionUID = 6597930270077627879L;
@Id
- @PropertyDef(label = "搴撳尯浠g爜" )
+ @PropertyDef(label = "搴撳尯浠g爜")
@Column(name = "kqdm", length = 21)
private String kqdm;
- @JsonIgnore
+ @JsonIgnore
@PropertyDef(label = "涓氬姟id")
@Column(name = "bizId", length = 40)
private String bizId;
- @PropertyDef(label = "鍗曚綅浠g爜" )
+ @PropertyDef(label = "鍗曚綅浠g爜")
@Column(name = "dwdm", length = 18)
private String dwdm;
- @PropertyDef(label = "搴撳尯鍚嶇О" )
+ @PropertyDef(label = "搴撳尯鍚嶇О")
@Column(name = "kqmc", length = 256)
private String kqmc;
- @PropertyDef(label = "搴撳尯鍦板潃" )
+ @PropertyDef(label = "搴撳尯鍦板潃")
@Column(name = "kqdz", length = 512)
private String kqdz;
- @PropertyDef(label = "琛屾斂鍖哄垝浠g爜" )
+ @PropertyDef(label = "琛屾斂鍖哄垝浠g爜")
@Column(name = "xzqhdm", length = 6)
private String xzqhdm;
@@ -59,57 +59,62 @@
@Column(name = "xzqhmc", length = 20)
private String xzqhmc;
- @PropertyDef(label = "搴撳尯浜ф潈" ,description = "1锛� 鑷湁 2锛氱璧� 3锛氬叡鏈� 4锛氭贩鍚� 9锛氬叾浠�")
+ @PropertyDef(label = "搴撳尯浜ф潈", description = "1锛� 鑷湁 2锛氱璧� 3锛氬叡鏈� 4锛氭贩鍚� 9锛氬叾浠�")
@Column(name = "kqcq", length = 1)
private String kqcq;
- @PropertyDef(label = "鏈夋晥浠撳" )
+ @PropertyDef(label = "鏈夋晥浠撳")
@Column(name = "yxcr", precision = 20, scale = 6)
private double yxcr;
- @PropertyDef(label = "鏈夋晥缃愬" )
+ @PropertyDef(label = "鏈夋晥缃愬")
@Column(name = "yxgr", precision = 20, scale = 6)
private double yxgr;
- @PropertyDef(label = "鍗犲湴闈㈢Н" )
+ @PropertyDef(label = "鍗犲湴闈㈢Н")
@Column(name = "zdmj", precision = 20, scale = 6)
private double zdmj;
- @PropertyDef(label = "浠撴埧鏁�" )
+ @PropertyDef(label = "浠撴埧鏁�")
@Column(name = "cfs")
private Integer cfs;
- @PropertyDef(label = "娌圭綈鏁�" )
+ @PropertyDef(label = "娌圭綈鏁�")
@Column(name = "ygs")
private Integer ygs;
- @PropertyDef(label = "搴撳尯缁忓害" )
+ @PropertyDef(label = "搴撳尯缁忓害")
@Column(name = "jd", precision = 20, scale = 6)
private double jd;
- @PropertyDef(label = "搴撳尯绾害" )
+ @PropertyDef(label = "搴撳尯绾害")
@Column(name = "wd", precision = 20, scale = 6)
private double wd;
- @PropertyDef(label = "搴撳尯鐘舵��" ,description = "1:姝e父锛堥粯璁わ級 2:閫�鍑哄偍澶囩伯鎵垮偍")
+ @PropertyDef(label = "搴撳尯鐘舵��", description = "1:姝e父锛堥粯璁わ級 2:閫�鍑哄偍澶囩伯鎵垮偍")
@Column(name = "kqzt", length = 1)
private String kqzt;
- @PropertyDef(label = "娴峰悍鍖哄煙ID" ,description = "瀵瑰簲娴峰悍瑙嗛骞冲彴regionIndexCode瀛楁")
+ @PropertyDef(label = "娴峰悍鍖哄煙ID", description = "瀵瑰簲娴峰悍瑙嗛骞冲彴regionIndexCode瀛楁")
@Column(name = "hkRegionId", length = 36)
private String hkRegionId;
- @PropertyDef(label = "浜ф潈鏂瑰簱鍖轰唬鐮�" ,description = "鑷湁浜ф潈鏃跺簱鍖轰唬鐮佸繀椤荤瓑浜庝骇鏉冩柟搴撳尯浠g爜,闈炶嚜鏈変骇鏉冩椂搴撳尯浠g爜涓嶈兘绛変簬浜ф潈鏂瑰簱鍖轰唬鐮�")
+ @PropertyDef(label = "浜ф潈鏂瑰簱鍖轰唬鐮�", description = "鑷湁浜ф潈鏃跺簱鍖轰唬鐮佸繀椤荤瓑浜庝骇鏉冩柟搴撳尯浠g爜,闈炶嚜鏈変骇鏉冩椂搴撳尯浠g爜涓嶈兘绛変簬浜ф潈鏂瑰簱鍖轰唬鐮�")
@Column(name = "cqfkqdm", length = 21)
private String cqfkqdm;
- @PropertyDef(label = "鎿嶄綔鏍囧織" )
+ @PropertyDef(label = "鎿嶄綔鏍囧織")
@Column(name = "czbz", length = 1)
private String czbz;
- @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�" )
+ @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@Column(name = "zhgxsj", nullable = false)
private Date zhgxsj;
+ @PropertyDef(label = "搴撳尯灞炴��", description = "1:甯傜骇鐩村睘锛�2:鍖虹骇鐩村睘锛�3:绀句細浠撳锛�4:鍏朵粬")
+ @JSONField(serialize = false)
+ @Column(name = "kqsx", length = 1)
+ private String kqsx;
+
}
\ No newline at end of file
diff --git a/src/main/java/com/fzzy/api/view/repository/Api1104Rep.java b/src/main/java/com/fzzy/api/view/repository/Api1104Rep.java
index b9c8140..0bc7632 100644
--- a/src/main/java/com/fzzy/api/view/repository/Api1104Rep.java
+++ b/src/main/java/com/fzzy/api/view/repository/Api1104Rep.java
@@ -1,6 +1,5 @@
package com.fzzy.api.view.repository;
-import com.fzzy.api.entity.Api1102;
import com.fzzy.api.entity.Api1104;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
@@ -25,9 +24,14 @@
@Query("update Api1104 set czbz=:czbz where ajdh=:id ")
int updateStatus(@Param("id") String id, @Param("czbz") String czbz);
+ /**
+ * @param kqdm
+ * @return
+ */
+ @Query("from Api1104 where kqdm=:kqdm ")
+ List<Api1104> findPushData(@Param("kqdm") String kqdm);
/**
- *
* @param
* @return
*/
diff --git a/src/main/java/com/fzzy/api/view/repository/Api1105Rep.java b/src/main/java/com/fzzy/api/view/repository/Api1105Rep.java
index cab6b0e..0bb0d4f 100644
--- a/src/main/java/com/fzzy/api/view/repository/Api1105Rep.java
+++ b/src/main/java/com/fzzy/api/view/repository/Api1105Rep.java
@@ -6,6 +6,7 @@
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
+
import java.util.List;
@@ -24,10 +25,18 @@
/**
* 鏍规嵁璐т綅浠g爜鏌ヨ
+ *
* @param hwdm
* @return
*/
@Query("from Api1105 where hwdm=:hwdm ")
List<Api1105> findPushDataByHwdm(@Param("hwdm") String hwdm);
+ /**
+ * @param kqdm
+ * @return
+ */
+ @Query("from Api1105 where kqdm=:kqdm ")
+ List<Api1105> findPushData(@Param("kqdm") String kqdm);
+
}
diff --git a/src/main/java/com/fzzy/api/view/repository/Api1106Rep.java b/src/main/java/com/fzzy/api/view/repository/Api1106Rep.java
index 396c022..f519849 100644
--- a/src/main/java/com/fzzy/api/view/repository/Api1106Rep.java
+++ b/src/main/java/com/fzzy/api/view/repository/Api1106Rep.java
@@ -7,6 +7,8 @@
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
+import java.util.List;
+
public interface Api1106Rep extends JpaRepository<Api1106, String> {
@@ -22,4 +24,11 @@
@Query("update Api1106 set czbz=:czbz where bizId=:id ")
int updateStatus(@Param("id") String id, @Param("czbz") String czbz);
+ /**
+ * @param kqdm
+ * @return
+ */
+ @Query("from Api1106 where kqdm=:kqdm ")
+ List<Api1106> findPushData(@Param("kqdm") String kqdm);
+
}
diff --git a/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java b/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
index d7ce01a..4ec8b8c 100644
--- a/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
+++ b/src/main/java/com/fzzy/push/sh2023/SH2023ApiRemoteService.java
@@ -4,23 +4,25 @@
import com.fzzy.api.data.ApiParam;
import com.fzzy.api.data.PushProtocol;
import com.fzzy.api.dto.ResponseDto;
-import com.fzzy.api.entity.Api1102;
-import com.fzzy.api.entity.ApiConfs;
-import com.fzzy.api.entity.ApiLog;
+import com.fzzy.api.entity.*;
import com.fzzy.api.service.ApiCommonService;
import com.fzzy.api.service.ApiRemoteService;
import com.fzzy.api.service.ApiTriggerService;
import com.fzzy.api.utils.*;
import com.fzzy.api.view.repository.Api1102Rep;
+import com.fzzy.api.view.repository.Api1104Rep;
import com.fzzy.api.view.repository.ApiLogRep;
-import com.fzzy.push.sh2023.dto.SH2023ReqDto;
-import com.fzzy.push.sh2023.dto.SH2023RespDto;
+import com.fzzy.push.sh2023.dto.*;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateFormatUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -45,6 +47,8 @@
private ApiLogRep apiLogRep;
@Autowired
private Api1102Rep api1102Rep;
+ @Autowired
+ private Api1104Rep api1104Rep;
@Override
public String getProtocol() {
@@ -60,7 +64,8 @@
public ResponseDto pushData(ApiParam param, ApiConfs conf, Object data) {
String inteId = param.getInteId();
String kqdm = param.getKqdm();
-
+ //鏌ヨ搴撳尯淇℃伅琛屾斂鍖哄垝鐮�
+ List<Api1102> api1102List = api1102Rep.findPushData(conf.getKqdm());
try {
if (null == conf) {
conf = apiCommonService.getConf(kqdm);
@@ -70,7 +75,7 @@
ApiLog apiLog = new ApiLog();
apiLog.setId(ContextUtil.getUUID());
apiLog.setInteId(inteId);
- String jsonData = getJsonData(inteId, data);
+ String jsonData = getJsonData(inteId, data, api1102List.get(0).getXzqhdm());
log.info("鎺ュ彛鏁版嵁淇℃伅=" + jsonData);
if (StringUtils.isEmpty(inteId)) {
@@ -96,8 +101,7 @@
SH2023ReqDto reqData = new SH2023ReqDto();
reqData.setId(ContextUtil.getUUID());
//鑾峰彇韬唤ID锛屽嵆琛屾斂鍖哄垝鐮�
- List<Api1102> api1102List = api1102Rep.findPushData(conf.getKqdm());
- if(null == api1102List || api1102List.isEmpty()){
+ if (null == api1102List || api1102List.isEmpty()) {
ResponseDto responseDto = new ResponseDto(99, "娌℃湁鑾峰彇鍒拌韩浠絀D");
apiLog.setStatus(99);
apiLog.setResult("娌℃湁鑾峰彇鍒拌韩浠絀D");
@@ -108,9 +112,9 @@
//鎸囦护id
reqData.setOrderid(param.getOrderid());
//韬唤绛惧悕锛屽鍦板尯琛屾斂鍖哄垝浠g爜_褰撳ぉ鏃ユ湡杩涜MD5绠楁硶绛惧悕
- reqData.setAccess_token(RSAUtils.encryptData(reqData.getUid() + "_" + DateFormatUtils.format(new Date(), "yyyy-MM-dd"),conf.getPublicKey()));
+ reqData.setAccess_token(RSAUtils.encryptData(reqData.getUid() + "_" + DateFormatUtils.format(new Date(), "yyyy-MM-dd"), conf.getPublicKey()));
//鏁版嵁鎬绘潯鏁�
- List<Object> list = (List<Object>)data;
+ List<Object> list = (List<Object>) data;
reqData.setDatalength(list.size());
//鏁版嵁杩涜SM4鍔犲瘑
reqData.setData(jsonData);
@@ -140,13 +144,85 @@
* @return
* @throws Exception
*/
- private String getJsonData(String inteId, Object data) {
+ private String getJsonData(String inteId, Object data, String code) {
//鍏蜂綋鏍规嵁鎺ュ彛杩涜灏佽
if (SH2023Constant.SH_2023_API_CODE_1101.equals(inteId)) {
- return JSON.toJSONString(data);
+ SH2023Api1101 api1101;
+ //鏈�鍚庤浆鎹负json
+ List<SH2023Api1101> list = new ArrayList<>();
+ //鎶奷ata杞寲鎴恖ist闆嗗悎
+ List<Api1101> api1101List = castList(data, Api1101.class);
+ //鏌ヨ寤掗棿鏁�
+ List<Api1104> api1104List = api1104Rep.findPushData(api1101List.get(0).getKqdm());
+ for (Api1101 apiData : api1101List) {
+ api1101 = new SH2023Api1101();
+ BeanUtils.copyProperties(apiData, api1101);
+ api1101.setAjs(api1104List.size());
+ api1101.setBjw(ShAreaBjw.getBjw(code));
+ list.add(api1101);
+ }
+ return JSON.toJSONString(list);
+ } else if (SH2023Constant.SH_2023_API_CODE_1102.equals(inteId)) {
+ SH2023Api1102 api1102;
+ //鏈�鍚庤浆鎹负json
+ List<SH2023Api1102> list = new ArrayList<>();
+ //鎶奷ata杞寲鎴恖ist闆嗗悎
+ List<Api1102> api1101List = castList(data, Api1102.class);
+ //鏌ヨ寤掗棿鏁�
+ List<Api1104> api1104List = api1104Rep.findPushData(api1101List.get(0).getKqdm());
+ //璁$畻鍌ㄥ浠撳
+ Double count = 0.0;
+ for (Api1104 api1104 : api1104List) {
+ count = count + api1104.getAjsjcrong();
+ }
+ for (Api1102 apiData : api1101List) {
+ api1102 = new SH2023Api1102();
+ BeanUtils.copyProperties(apiData, api1102);
+ api1102.setAjs(api1104List.size());
+ api1102.setBjw(ShAreaBjw.getBjw(code));
+ api1102.setCbcr(count);
+ list.add(api1102);
+ }
+ return JSON.toJSONString(list);
+ } else if (SH2023Constant.SH_2023_API_CODE_1103.equals(inteId)) {
+ SH2023Api1103 api1103;
+ //鏈�鍚庤浆鎹负json
+ List<SH2023Api1103> list = new ArrayList<>();
+ //鎶奷ata杞寲鎴恖ist闆嗗悎
+ List<Api1103> api1103List = castList(data, Api1103.class);
+ //鏌ヨ寤掗棿鏁�
+ List<Api1104> api1104List = api1104Rep.findPushData(api1103List.get(0).getKqdm());
+ for (Api1103 apiData : api1103List) {
+ api1103 = new SH2023Api1103();
+ BeanUtils.copyProperties(apiData, api1103);
+ api1103.setAjs(api1104List.size());
+ api1103.setBjw(ShAreaBjw.getBjw(code));
+ list.add(api1103);
+ }
+ return JSON.toJSONString(list);
} else {
return JSON.toJSONString(data);
}
}
+ /**
+ * Object绫诲瀷杞彉涓篖ist
+ *
+ * @param obj
+ * @param clazz
+ * @param <T>
+ * @return
+ */
+ public static <T> List<T> castList(Object obj, Class<T> clazz) {
+ List<T> result = new ArrayList<T>();
+ if (obj instanceof List<?>) {
+ for (Object o : (List<?>) obj) {
+ result.add(clazz.cast(o));
+ }
+ return result;
+ }
+ return null;
+ }
+
+
}
\ No newline at end of file
diff --git a/src/main/java/com/fzzy/push/sh2023/SH2023PushService11.java b/src/main/java/com/fzzy/push/sh2023/SH2023PushService11.java
index 5ddcc8e..a263dc7 100644
--- a/src/main/java/com/fzzy/push/sh2023/SH2023PushService11.java
+++ b/src/main/java/com/fzzy/push/sh2023/SH2023PushService11.java
@@ -4,13 +4,14 @@
import com.fzzy.api.data.ApiParam;
import com.fzzy.api.data.PushProtocol;
import com.fzzy.api.dto.ResponseDto;
-import com.fzzy.api.entity.Api1101;
+import com.fzzy.api.entity.*;
import com.fzzy.api.service.ApiRemoteService;
import com.fzzy.api.service.PushService11;
-import com.fzzy.api.view.repository.Api1101Rep;
+import com.fzzy.api.view.repository.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+
import java.util.List;
/**
@@ -28,6 +29,30 @@
private SH2023ApiRemoteService apiRemoteService;
@Autowired
private Api1101Rep api1101Rep;
+ @Autowired
+ private Api1102Rep api1102Rep;
+ @Autowired
+ private Api1103Rep api1103Rep;
+ @Autowired
+ private Api1104Rep api1104Rep;
+ @Autowired
+ private Api1105Rep api1105Rep;
+ @Autowired
+ private Api1106Rep api1106Rep;
+ @Autowired
+ private Api1107Rep api1107Rep;
+ @Autowired
+ private Api1108Rep api1108Rep;
+ @Autowired
+ private Api1109Rep api1109Rep;
+ @Autowired
+ private Api1110Rep api1110Rep;
+ @Autowired
+ private Api1111Rep api1111Rep;
+ @Autowired
+ private Api1112Rep api1112Rep;
+ @Autowired
+ private Api1113Rep api1113Rep;
@Override
public String getProtocol() {
@@ -41,8 +66,32 @@
//鎺ㄩ�佸崟浣嶄俊鎭�
this.pushData1101(apiRemoteService, param);
- //TODO 鍏朵粬鍩虹淇℃伅
-
+ //搴撳尯淇℃伅
+ this.pushData1102(apiRemoteService, param);
+ //浠撴埧淇℃伅
+ this.pushData1103(apiRemoteService, param);
+ //寤掗棿淇℃伅
+ this.pushData1104(apiRemoteService, param);
+ //璐т綅淇℃伅
+ this.pushData1105(apiRemoteService, param);
+ //娌圭綈淇℃伅
+ this.pushData1106(apiRemoteService, param);
+ //璁惧淇℃伅
+ this.pushData1107(apiRemoteService, param);
+ //鑽墏淇℃伅
+ this.pushData1108(apiRemoteService, param);
+ //鏂囦欢淇℃伅
+ this.pushData1109(apiRemoteService, param);
+ //搴撳尯鍥句粨鎴跨偣浣嶆爣娉�
+ this.pushData1110(apiRemoteService, param);
+ //搴撳尯鍥捐棰戠洃鎺ц澶囩偣浣嶆爣娉�
+ this.pushData1111(apiRemoteService, param);
+ //浜哄憳淇℃伅
+ this.pushData1112(apiRemoteService, param);
+ //浼佷笟淇$敤淇℃伅
+ this.pushData1113(apiRemoteService, param);
+ //璐㈠姟鎶ヨ〃
+ this.pushData1114(apiRemoteService, param);
log.info("------->>>>鍩虹淇℃伅 鎺ュ彛妯″潡涓婃姤缁撴潫");
}
@@ -79,7 +128,27 @@
* 1102 搴撳尯淇℃伅
*/
public void pushData1102(ApiRemoteService apiRemoteService, ApiParam param) {
- //TODO
+ //鑾峰彇搴撳尯淇℃伅
+ List<Api1102> list = api1102Rep.findPushData(param.getKqdm());
+
+ if (null == list || list.isEmpty()) {
+ log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌搴撳尯淇℃伅锛屼笉鎺ㄩ��-----");
+ return;
+ }
+
+ //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
+ ResponseDto responseDto = apiRemoteService.pushData(param, list);
+ if (responseDto.getSuccess() == 0) {
+ //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
+ for (Api1102 data : list) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+
+ data.setCzbz(Constant.CZBZ_U);
+ //鏇存柊鐘舵��
+ api1102Rep.save(data);
+ }
+ }
+ }
}
@@ -87,7 +156,27 @@
* 1103 浠撴埧淇℃伅
*/
public void pushData1103(ApiRemoteService apiRemoteService, ApiParam param) {
- //TODO
+ //鑾峰彇浠撴埧淇℃伅
+ List<Api1103> list = api1103Rep.findPushData(param.getKqdm());
+
+ if (null == list || list.isEmpty()) {
+ log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌浠撴埧淇℃伅锛屼笉鎺ㄩ��-----");
+ return;
+ }
+
+ //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
+ ResponseDto responseDto = apiRemoteService.pushData(param, list);
+ if (responseDto.getSuccess() == 0) {
+ //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
+ for (Api1103 data : list) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+
+ data.setCzbz(Constant.CZBZ_U);
+ //鏇存柊鐘舵��
+ api1103Rep.save(data);
+ }
+ }
+ }
}
@@ -95,7 +184,28 @@
* 1104 寤掗棿淇℃伅
*/
public void pushData1104(ApiRemoteService apiRemoteService, ApiParam param) {
- //TODO
+ //鑾峰彇寤掗棿淇℃伅
+ List<Api1104> list = api1104Rep.findPushData(param.getKqdm());
+
+ if (null == list || list.isEmpty()) {
+ log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌寤掗棿淇℃伅锛屼笉鎺ㄩ��-----");
+ return;
+ }
+
+ //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
+ ResponseDto responseDto = apiRemoteService.pushData(param, list);
+ if (responseDto.getSuccess() == 0) {
+ //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
+ for (Api1104 data : list) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+
+ data.setCzbz(Constant.CZBZ_U);
+ //鏇存柊鐘舵��
+ api1104Rep.save(data);
+ }
+ }
+ }
+
}
@@ -103,7 +213,27 @@
* 1105 璐т綅淇℃伅
*/
public void pushData1105(ApiRemoteService apiRemoteService, ApiParam param) {
- //TODO
+ //鑾峰彇璐т綅淇℃伅
+ List<Api1105> list = api1105Rep.findPushData(param.getKqdm());
+
+ if (null == list || list.isEmpty()) {
+ log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌璐т綅淇℃伅锛屼笉鎺ㄩ��-----");
+ return;
+ }
+
+ //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
+ ResponseDto responseDto = apiRemoteService.pushData(param, list);
+ if (responseDto.getSuccess() == 0) {
+ //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
+ for (Api1105 data : list) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+
+ data.setCzbz(Constant.CZBZ_U);
+ //鏇存柊鐘舵��
+ api1105Rep.save(data);
+ }
+ }
+ }
}
@@ -111,7 +241,27 @@
* 1106 娌圭綈淇℃伅
*/
public void pushData1106(ApiRemoteService apiRemoteService, ApiParam param) {
- //TODO
+ //鑾峰彇娌圭綈淇℃伅
+ List<Api1106> list = api1106Rep.findPushData(param.getKqdm());
+
+ if (null == list || list.isEmpty()) {
+ log.error("-----涓婃捣甯傚钩鍙�2023鐗堬細鏈幏鍙栧埌娌圭綈淇℃伅锛屼笉鎺ㄩ��-----");
+ return;
+ }
+
+ //鎺ㄩ�侊紝鏁版嵁涓洪泦鍚堝舰寮�
+ ResponseDto responseDto = apiRemoteService.pushData(param, list);
+ if (responseDto.getSuccess() == 0) {
+ //鎺ㄩ�佹垚鍔燂紝鏇存柊鏁版嵁涓婁紶鐘舵��
+ for (Api1106 data : list) {
+ if (Constant.CZBZ_I.equals(data.getCzbz())) {
+
+ data.setCzbz(Constant.CZBZ_U);
+ //鏇存柊鐘舵��
+ api1106Rep.save(data);
+ }
+ }
+ }
}
diff --git a/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1101.java b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1101.java
new file mode 100644
index 0000000..ab06114
--- /dev/null
+++ b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1101.java
@@ -0,0 +1,149 @@
+package com.fzzy.push.sh2023.dto;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.bstek.dorado.annotation.PropertyDef;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fzzy.api.entity.ApiParent;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+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 chen
+ * @date 2022-09-02 14:18
+ */
+@Data
+public class SH2023Api1101 extends ApiParent implements Serializable {
+
+ private static final long serialVersionUID = 9157617424050247565L;
+
+ @PropertyDef(label = "鍗曚綅浠g爜")
+ private String dwdm;
+
+ @PropertyDef(label = "鍗曚綅鍚嶇О")
+ private String dwmc;
+
+ @PropertyDef(label = "鍗曚綅绫诲瀷")
+ private String dwlx;
+
+ @PropertyDef(label = "娉ㄥ唽鏃ユ湡")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+ @JSONField(format = "yyyy-MM-dd")
+ private Date 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 = "琛屾斂鍖哄垝鍚嶇О", description = "闈炲浗鏍囧瓧娈碉紝鍚庢湡澧炲姞")
+ @JSONField(serialize = false)
+ private String xzqhmc;
+
+ @PropertyDef(label = "涓婄骇鍗曚綅鍚嶇О")
+ private String sjdwmc;
+
+ @PropertyDef(label = "涓婄骇鍗曚綅浠g爜")
+ private String sjdwdm;
+
+ @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 = "澶囨绫诲瀷", description = "0:鍒濇澶囨 1:鍙樻洿澶囨 2:閲嶆柊澶囨")
+ private String balx;
+
+ @PropertyDef(label = "浠撳偍涓氬姟绫诲瀷")
+ private String ccywlx;
+
+ @PropertyDef(label = "浠撳偍鍝佺")
+ private String ccpz;
+
+ @PropertyDef(label = "澶囨鐘舵��")
+ private String bazt;
+
+ @PropertyDef(label = "鎿嶄綔鏍囧織")
+ private String czbz;
+
+ @PropertyDef(label = "寤掗棿鏁�")
+ private Integer ajs;
+
+ @PropertyDef(label = "鏍囪浣�")
+ private String bjw;
+
+ @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�")
+ @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+ private Date zhgxsj;
+
+ @JSONField(serialize = false)
+ @PropertyDef(label = "涓氬姟id")
+ private String bizId;
+
+ @JSONField(serialize = false)
+ @PropertyDef(label = "鍚屾鏃堕棿", description = "浠庣伯搴撶郴缁熷悓姝ュ埌鎺ュ彛绠$悊涓績鐨勬椂闂�")
+ private Date syncTime;
+
+ @JSONField(serialize = false)
+ @PropertyDef(label = "搴撳尯浠g爜")
+ private String kqdm;
+
+
+}
diff --git a/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1102.java b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1102.java
new file mode 100644
index 0000000..12e7202
--- /dev/null
+++ b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1102.java
@@ -0,0 +1,101 @@
+package com.fzzy.push.sh2023.dto;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.bstek.dorado.annotation.PropertyDef;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+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
+@EqualsAndHashCode(callSuper = false)
+public class SH2023Api1102 implements Serializable {
+
+ private static final long serialVersionUID = 6597930270077627879L;
+
+ @PropertyDef(label = "搴撳尯浠g爜")
+ private String kqdm;
+
+ @PropertyDef(label = "涓氬姟id")
+ private String bizId;
+
+ @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 = "闈炲浗鏍囧瓧娈碉紝鍚庢湡澧炲姞")
+ @JSONField(serialize = false)
+ private String xzqhmc;
+
+ @PropertyDef(label = "搴撳尯浜ф潈", description = "1锛� 鑷湁 2锛氱璧� 3锛氬叡鏈� 4锛氭贩鍚� 9锛氬叾浠�")
+ private String kqcq;
+
+ @PropertyDef(label = "鏈夋晥浠撳")
+ private double yxcr;
+
+ @PropertyDef(label = "鍌ㄥ浠撳")
+ private double cbcr;
+
+ @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 = "娴峰悍鍖哄煙ID", description = "瀵瑰簲娴峰悍瑙嗛骞冲彴regionIndexCode瀛楁")
+ private String hkRegionId;
+
+ @PropertyDef(label = "浜ф潈鏂瑰簱鍖轰唬鐮�", description = "鑷湁浜ф潈鏃跺簱鍖轰唬鐮佸繀椤荤瓑浜庝骇鏉冩柟搴撳尯浠g爜,闈炶嚜鏈変骇鏉冩椂搴撳尯浠g爜涓嶈兘绛変簬浜ф潈鏂瑰簱鍖轰唬鐮�")
+ private String cqfkqdm;
+
+ @PropertyDef(label = "鎿嶄綔鏍囧織")
+ private String czbz;
+
+ @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�")
+ @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+ private Date zhgxsj;
+
+ @PropertyDef(label = "搴撳尯灞炴��", description = "1:甯傜骇鐩村睘锛�2:鍖虹骇鐩村睘锛�3:绀句細浠撳锛�4:鍏朵粬")
+ @JSONField(serialize = false)
+ private String kqsx;
+
+ @PropertyDef(label = "寤掗棿鏁�")
+ private Integer ajs;
+
+ @PropertyDef(label = "鏍囪浣�")
+ private String bjw;
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1103.java b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1103.java
new file mode 100644
index 0000000..d6f4acc
--- /dev/null
+++ b/src/main/java/com/fzzy/push/sh2023/dto/SH2023Api1103.java
@@ -0,0 +1,213 @@
+package com.fzzy.push.sh2023.dto;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.bstek.dorado.annotation.PropertyDef;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+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
+@EqualsAndHashCode(callSuper = false)
+public class SH2023Api1103 implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 8095346227076335949L;
+
+ @JSONField(serialize = false)
+ @PropertyDef(label = "涓氬姟id")
+ private String bizId;
+
+
+ @JSONField(serialize = false)
+ @PropertyDef(label = "鍚屾鏃堕棿", description = "浠庣伯搴撶郴缁熷悓姝ュ埌鎺ュ彛绠$悊涓績鐨勬椂闂�")
+ private Date syncTime;
+
+ @PropertyDef(label = "浠撴埧浠g爜")
+ private String cfdm;
+
+ @PropertyDef(label = "浠撴埧鍚嶇О")
+ private String cfmc;
+
+ @PropertyDef(label = "搴撳尯浠g爜")
+ private String kqdm;
+
+ @PropertyDef(label = "浠撴埧绫诲瀷浠g爜")
+ private String cflxdm;
+
+ @PropertyDef(label = "浜や粯浣跨敤鏃ユ湡")
+ @JSONField(format = "yyyy-MM-dd")
+ private Date jfsyrq;
+
+ @PropertyDef(label = "寤鸿鍗曚綅")
+ private String jsdw;
+
+ @PropertyDef(label = "璁捐浣跨敤骞撮檺")
+ private String sjsynx;
+
+ @PropertyDef(label = "璁捐鍗曚綅")
+ private String sjdw;
+
+ @PropertyDef(label = "鐩戠悊鍗曚綅")
+ private String jldw;
+
+ @PropertyDef(label = "澧欎綋缁撴瀯")
+ private String qtjg;
+
+ @PropertyDef(label = "鎴块《缁撴瀯")
+ private String fdjg;
+
+ @PropertyDef(label = "鎴挎灦缁撴瀯")
+ private String fjjg;
+
+ @PropertyDef(label = "鍦伴潰缁撴瀯")
+ private String dmjg;
+
+ @PropertyDef(label = "璁捐浠撳")
+ private double sjcr;
+
+ @PropertyDef(label = "浠撳闀�")
+ private double cwc;
+
+ @PropertyDef(label = "浠撳瀹�")
+ private double cwk;
+
+ @PropertyDef(label = "浠撳妾愰珮")
+ private double cwyg;
+
+ @PropertyDef(label = "浠撳椤堕珮")
+ private double cwdg;
+
+ @PropertyDef(label = "绛掍粨澶栧緞")
+ private double tcwj;
+
+ @PropertyDef(label = "浠撳唴闀�")
+ private double cnc;
+
+ @PropertyDef(label = "浠撳唴瀹�")
+ private double cnk;
+
+ @PropertyDef(label = "浠撳唴妾愰珮")
+ private double cnyg;
+
+ @PropertyDef(label = "浠撳唴瑁呯伯绾块珮")
+ private double cnzlxg;
+
+ @PropertyDef(label = "绛掍粨鍐呭緞")
+ private double tcnj;
+
+ @PropertyDef(label = "浠撳唴浣撶Н")
+ private double cntj;
+
+ @PropertyDef(label = "浠撻棬鏁伴噺")
+ private Integer cmsl;
+
+ @PropertyDef(label = "浠撻棬浣嶇疆")
+ private String cmwz;
+
+ @PropertyDef(label = "浠撻棬楂樺害")
+ private double cmgd;
+
+ @PropertyDef(label = "浠撻棬瀹藉害")
+ private double cmkd;
+
+ @PropertyDef(label = "鎸$伯闂ㄥ瀷寮�")
+ private String dlmxs;
+
+ @PropertyDef(label = "浠撴埧鏄惁瀹屽ソ")
+ private String cfsfwh;
+
+ @PropertyDef(label = "鍌ㄧ伯鍔熸晥")
+ private String clgx;
+
+ @PropertyDef(label = "鑳藉惁闅旂儹淇濇俯")
+ private String nfgrbw;
+
+ @PropertyDef(label = "闅旂儹淇濇俯鎺柦")
+ private String grbwcs;
+
+ @PropertyDef(label = "闅旂儹鎬ц兘")
+ private String grxn;
+
+ @PropertyDef(label = "缁撴瀯鏉愭枡")
+ private String jgcl;
+
+ @PropertyDef(label = "姘斿瘑鎬�")
+ private String qmx;
+
+ @PropertyDef(label = "鏄惁宸茶繘琛屼俊鎭寲鏀归��")
+ private String sfyjxxxhgz;
+
+ @PropertyDef(label = "绮儏鎶�鏈�")
+ private String lqjs;
+
+ @PropertyDef(label = "鑳藉惁鏁h鍌ㄥ瓨")
+ private String nfszcc;
+
+ @PropertyDef(label = "鏈夋棤闃查紶闃查泙闃茶櫕瑁呯疆鍙婅鏂�")
+ private String ywfsfqfczz;
+
+ @PropertyDef(label = "鏈夋棤闃茬伀闃茬垎闃茬洍璁炬柦")
+ private String ywfhfbfdss;
+
+ @PropertyDef(label = "鏈夋棤鏈烘閫氶璁炬柦")
+ private String ywjxtfss;
+
+ @PropertyDef(label = "閫氶绯荤粺鍨嬪紡")
+ private String tfxtxs;
+
+ @PropertyDef(label = "閫氶鎶�鏈�")
+ private String tfjs;
+
+ @PropertyDef(label = "鑳藉惁鐜祦鐔忚捀鏉�铏�")
+ private String nfhlxzsc;
+
+ @PropertyDef(label = "鏉�铏妧鏈�")
+ private String scjs;
+
+ @PropertyDef(label = "鑳藉惁瀵屾爱浣庢哀姘旇皟鍌ㄧ伯")
+ private String nffddyqtcl;
+
+ @PropertyDef(label = "鎺ф俯鎶�鏈�")
+ private String kwjs;
+
+ @PropertyDef(label = "瀹宠櫕妫�娴嬫柟寮�")
+ private String hcjcfs;
+
+ @PropertyDef(label = "浠撴埧鐘舵��")
+ private String cfzt;
+
+ @PropertyDef(label = "淇濈鍛�")
+ private String bgr;
+
+ @PropertyDef(label = "浠撴埧缁忓害")
+ private double jd;
+
+ @PropertyDef(label = "浠撴埧绾害")
+ private double wd;
+
+ @PropertyDef(label = "鎿嶄綔鏍囧織")
+ private String czbz;
+
+ @PropertyDef(label = "鏈�鍚庢洿鏂版椂闂�")
+ @JSONField(format = "yyyy-MM-dd HH:mm:ss")
+ private Date zhgxsj;
+
+ @PropertyDef(label = "寤掗棿鏁�")
+ private Integer ajs;
+
+ @PropertyDef(label = "鏍囪浣�")
+ private String bjw;
+
+
+}
--
Gitblit v1.9.3