Browse Source

添加发送地

jaikuai 3 years ago
parent
commit
3152ddf7a3

+ 2 - 2
src/main/java/cn/fastfun/controller/dto/DeviceAttrDTO.java

@@ -18,8 +18,8 @@ public class DeviceAttrDTO {
     // pack厂
     private String pack;
 
-    // 发送
-    private String deliverAddr;
+    // 收货
+    private String receivedPlace;
 
 
     // 显示名称

+ 0 - 6
src/main/java/cn/fastfun/service/entity/AppDevice.java

@@ -53,12 +53,6 @@ public class AppDevice extends DateEntity {
     @Column(name = "operator")
     private String operator;
 
-
-    @ApiModelProperty(value = "发送地", name = "deliverAddr", required = true)
-    @Column(name = "deliver_addr")
-    private String deliverAddr;
-
-
     @ApiModelProperty(value = "发货时间", name = "deliverTime", required = true)
     @DateTimeFormat(pattern = "yyyy-MM-dd ")
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")

+ 3 - 3
src/main/java/cn/fastfun/service/impl/AppDeviceServiceImp.java

@@ -40,14 +40,14 @@ public class AppDeviceServiceImp extends JpaServiceImp<AppDevice, String> implem
             // 数据效验
             if (null == diffAttrDTO) {
                 diffAttrDTO = new DeviceAttrDTO(device.getBatchNum(), device.getSn());
-                diffAttrDTO.setDeliverAddr(device.getDeliverAddr());
+                diffAttrDTO.setReceivedPlace(device.getReceivedPlace());
             }
             DeviceAttrDTO temp = new DeviceAttrDTO(device.getBatchNum(), device.getSn());
-            temp.setDeliverAddr(device.getDeliverAddr());
+            temp.setReceivedPlace(device.getReceivedPlace());
             if (!temp.getBatchNum().equals(diffAttrDTO.getBatchNum())) new ApiRuntimeException("存在不同的批次号");
             if (!temp.getPack().equals(diffAttrDTO.getPack())) new ApiRuntimeException("存在不同的PACK厂");
             if (!temp.getType().equals(diffAttrDTO.getType())) new ApiRuntimeException("存在不同的电池类型");
-            if (!temp.getDeliverAddr().equals(diffAttrDTO.getDeliverAddr())) new ApiRuntimeException("存在不同的发送地");
+            if (!temp.getReceivedPlace().equals(diffAttrDTO.getReceivedPlace())) new ApiRuntimeException("存在不同的收货地");
             devices.add(device);
         }
         save(devices);