fanxw 11 mesi fa
parent
commit
f974bb5a0e

+ 3 - 0
src/main/java/com/chinaitop/depot/device/model/StorageJsglKhxx.java

@@ -3,6 +3,8 @@ package com.chinaitop.depot.device.model;
3 3
 import java.math.BigDecimal;
4 4
 import java.util.Date;
5 5
 
6
+import com.fasterxml.jackson.annotation.JsonFormat;
7
+
6 8
 public class StorageJsglKhxx {
7 9
     private String id;
8 10
 
@@ -32,6 +34,7 @@ public class StorageJsglKhxx {
32 34
 
33 35
     private BigDecimal crksl;
34 36
 
37
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
35 38
     private Date crkrq;
36 39
 
37 40
     /**

+ 6 - 2
src/main/java/com/chinaitop/depot/device/service/impl/StorageJsglServiceImpl.java

@@ -2,6 +2,7 @@ package com.chinaitop.depot.device.service.impl;
2 2
 
3 3
 import java.util.Date;
4 4
 import java.util.List;
5
+import java.util.UUID;
5 6
 
6 7
 import javax.annotation.Resource;
7 8
 
@@ -64,9 +65,7 @@ public class StorageJsglServiceImpl implements StorageJsglService {
64 65
 	@Override
65 66
 	public void addStorageJsgl(StorageJsgl storageJsgl) throws Exception {
66 67
 
67
-		String id = ParameterUtil.getUuid();
68 68
 		Date date = new Date();
69
-		storageJsgl.setId(id);
70 69
 		storageJsgl.setCreateTime(date);
71 70
 		storageJsgl.setUpdateTime(date);
72 71
 
@@ -93,9 +92,14 @@ public class StorageJsglServiceImpl implements StorageJsglService {
93 92
 		storageJsgl.setFpText(fpText);
94 93
 
95 94
 		if (StringUtils.isBlank(storageJsgl.getId())) {
95
+			String id = ParameterUtil.getUuid();
96
+			storageJsgl.setId(id);
96 97
 			addStorageJsgl(storageJsgl);
97 98
 			if (storageJsgl.getKhxxlist().size() > 0) {
98 99
 				for (int i = 0; i < storageJsgl.getKhxxlist().size(); i++) {
100
+					storageJsgl.getKhxxlist().get(i).setId(UUID.randomUUID().toString().replace("-", ""));
101
+					storageJsgl.getKhxxlist().get(i).setOrgId(storageJsgl.getOrgId());
102
+					storageJsgl.getKhxxlist().get(i).setZid(id);
99 103
 					storageJsglKhxxMapper.insert(storageJsgl.getKhxxlist().get(i));
100 104
 				}
101 105
 			}