Explorar el Código

修复钥匙、印章交接确认时旧信息覆盖问题

fangq hace 4 años
padre
commit
8cfe3037ce

+ 14 - 6
src/main/java/org/springblade/bank/keypwd/controller/KeyPwdController.java

@@ -205,17 +205,25 @@ public class KeyPwdController extends BladeController {
 
 					KeyPwd keep = keyPwdService.getKeepOneByOrgNoCategory(keyPwd.getBankNo(), keyPwd.getOrgNo(), category);
 					if (keep == null){
-						keep = BeanUtil.clone(keyPwd);
+						keep = keyPwd;
 						keep.setId(null);
 						keep.setStatus(2);
 						keep.setCategory(category);
-					}else{
-						keep.setPid(keyPwd.getId());
-						keep.setReceiverId(keyPwd.getReceiverId());
-						keep.setReceiverNo(keyPwd.getReceiverNo());
-						keep.setReceiverName(keyPwd.getReceiverName());
 					}
 
+					keep.setPid(keyPwd.getId());
+					keep.setReceiverId(keyPwd.getReceiverId());
+					keep.setReceiverNo(keyPwd.getReceiverNo());
+					keep.setReceiverName(keyPwd.getReceiverName());
+					keep.setHandoverDate(keyPwd.getHandoverDate());
+					keep.setHandoverPersonName(keyPwd.getHandoverPersonName());
+					keep.setHandoverPersonId(keyPwd.getHandoverPersonId());
+					keep.setHandoverPersonNo(keyPwd.getHandoverPersonNo());
+					keep.setFillingPerson(keyPwd.getHandoverPersonName());
+					keep.setFillingDate(keyPwd.getFillingDate());
+					keep.setCreateUser(keyPwd.getCreateUser());
+					keep.setCreateTime(keyPwd.getCreateTime());
+
 					keyPwdService.saveOrUpdate(keep);
 				}
 			}

+ 19 - 19
src/main/java/org/springblade/bank/sealhandover/controller/SealHandoverController.java

@@ -274,30 +274,30 @@ public class SealHandoverController extends BladeController {
 		if (sealHandoverService.updateById(sealHandover)){
 			SealHandover keep = sealHandoverService.getKeyOneByOrgNoSealTypeNo(sealHandover.getBankNo(), sealHandover.getOrgNo(), sealHandover.getSealType(), sealHandover.getSealNo());
 			Long keepId = null;
+			keepId = keep.getId();
+
 			if (keep == null){
-				keep = BeanUtil.clone(sealHandover);
+				keep = sealHandover;
 				keep.setId(null);
 				keep.setStatus(2);
-			}else{
-				keepId = keep.getId();
-
-				keep.setPid(sealHandover.getId());
-				keep.setReceiverId(sealHandover.getReceiverId());
-				keep.setReceiverNo(sealHandover.getReceiverNo());
-				keep.setReceiverName(sealHandover.getReceiverName());
-				keep.setCreateDept(sealHandover.getCreateDept());
-
-				keep.setHandoverDate(sealHandover.getHandoverDate());
-				keep.setHandoverPersonId(sealHandover.getHandoverPersonId());
-				keep.setHandoverPersonNo(sealHandover.getHandoverPersonNo());
-				keep.setHandoverPersonName(sealHandover.getHandoverPersonName());
-				keep.setRemark(sealHandover.getRemark());
-				keep.setFillingPerson(sealHandover.getHandoverPersonName());
-				keep.setFillingDate(sealHandover.getFillingDate());
-				keep.setCreateUser(sealHandover.getCreateUser());
-				keep.setCreateTime(sealHandover.getCreateTime());
 			}
 
+			keep.setPid(sealHandover.getId());
+			keep.setReceiverId(sealHandover.getReceiverId());
+			keep.setReceiverNo(sealHandover.getReceiverNo());
+			keep.setReceiverName(sealHandover.getReceiverName());
+			keep.setCreateDept(sealHandover.getCreateDept());
+
+			keep.setHandoverDate(sealHandover.getHandoverDate());
+			keep.setHandoverPersonId(sealHandover.getHandoverPersonId());
+			keep.setHandoverPersonNo(sealHandover.getHandoverPersonNo());
+			keep.setHandoverPersonName(sealHandover.getHandoverPersonName());
+			keep.setRemark(sealHandover.getRemark());
+			keep.setFillingPerson(sealHandover.getHandoverPersonName());
+			keep.setFillingDate(sealHandover.getFillingDate());
+			keep.setCreateUser(sealHandover.getCreateUser());
+			keep.setCreateTime(sealHandover.getCreateTime());
+
 			if (sealHandover.getIsTurnIn().equals(1) && keepId != null){
 				//上繳,刪除原持有人記錄
 				sealHandoverService.removeById(keepId);

+ 2 - 2
src/main/resources/application-dev.yml

@@ -13,8 +13,8 @@ spring:
     #  commandTimeout: 5000
   datasource:
     # MySql
-    url: jdbc:mysql://localhost:3306/zh_goods_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
-#    url: jdbc:mysql://localhost:3306/macao_zh_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+#    url: jdbc:mysql://127.0.0.1:3306/zh_goods_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+    url: jdbc:mysql://localhost:3306/macao_zh_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
     username: root
     password: 123456
     # PostgreSQL

+ 4 - 4
src/main/resources/application-prod.yml

@@ -14,8 +14,8 @@ spring:
     #  nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
     #  commandTimeout: 5000
   datasource:
-#    url: jdbc:mysql://22.237.192.144:3306/macao_zh_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
-    url: jdbc:mysql://22.236.178.185:3306/macao_zh_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+    #    url: jdbc:mysql://22.237.192.144:3306/macao_zh_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
+    url: jdbc:mysql://22.236.178.186:3306/macao_zh_sys?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
     username: root
     password:
 
@@ -39,7 +39,7 @@ blade:
     ##将docker脚本部署的redis服务映射为宿主机ip
     ##生产环境推荐使用阿里云高可用redis服务并设置密码
     address: redis://127.0.0.1:6379
-    password: 123456
+    password:
   #本地文件上传
   file:
     remote-mode: true
@@ -55,5 +55,5 @@ oss:
   secret-key: QyVqGnhIQQE734UYSUFlGOZViE6+ZlDEfUG3NjhJ
 
 hangxin:
-  url: http://22.237.189.107:9001
+  url: http://22.236.179.107:9001
   sysid: "000004"