Browse Source

优化代码

Your Name 2 years ago
parent
commit
e0f8f8256c

+ 3 - 3
java110-bean/src/main/java/com/java110/dto/purchase/AllocationStorehouseApplyDto.java

@@ -47,7 +47,7 @@ public class AllocationStorehouseApplyDto extends PageDto implements Serializabl
     private String communityId;
     private String nextUserId;
 
-    private Date createTime;
+    private String createTime;
 
     private String statusCd = "0";
 
@@ -120,11 +120,11 @@ public class AllocationStorehouseApplyDto extends PageDto implements Serializabl
         this.storeId = storeId;
     }
 
-    public Date getCreateTime() {
+    public String getCreateTime() {
         return createTime;
     }
 
-    public void setCreateTime(Date createTime) {
+    public void setCreateTime(String createTime) {
         this.createTime = createTime;
     }
 

+ 2 - 1
service-job/src/main/java/com/java110/job/adapt/purchase/allocationStorehouse/MachineAllocationStorehouse.java

@@ -21,6 +21,7 @@ import com.java110.utils.cache.MappingCache;
 import com.java110.utils.constant.MappingConstant;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.DateUtil;
 import com.java110.utils.util.StringUtil;
 import org.slf4j.Logger;
 import com.java110.core.log.LoggerFactory;
@@ -89,7 +90,7 @@ public class MachineAllocationStorehouse extends DatabusAdaptImpl {
         //获取小区id
         String communityId = allocationStorehouseApplyDtos.get(0).getCommunityId();
         //获取申请时间
-        Date createTime = allocationStorehouseApplyDtos.get(0).getCreateTime();
+        Date createTime = DateUtil.getDateFromStringA(allocationStorehouseApplyDtos.get(0).getCreateTime());
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         JSONObject paramIn = new JSONObject();
         paramIn.put("applyOrderId", applyOrderId);

+ 2 - 2
service-store/src/main/java/com/java110/store/cmd/purchase/UrgentPurchaseApplyCmd.java

@@ -211,7 +211,7 @@ public class UrgentPurchaseApplyCmd extends Cmd {
                 allocationStorehouseApplyDto.setRemark("紧急采购入库并调拨");
                 allocationStorehouseApplyDto.setApplyCount(purchaseApplyDetailPo.getQuantity());
                 allocationStorehouseApplyDto.setStoreId(storeId);
-                allocationStorehouseApplyDto.setCreateTime(new Date());
+                allocationStorehouseApplyDto.setCreateTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
                 allocationStorehouseApplyDto.setState(AllocationStorehouseDto.STATE_SUCCESS);
                 allocationStorehouseApplyDto.setCommunityId(reqJson.getString("communityId"));
                 //调拨
@@ -280,7 +280,7 @@ public class UrgentPurchaseApplyCmd extends Cmd {
                 allocationStorehouseApplyDto.setRemark("紧急采购入库并调拨");
                 allocationStorehouseApplyDto.setApplyCount(purchaseApplyDetailPo.getQuantity());
                 allocationStorehouseApplyDto.setStoreId(storeId);
-                allocationStorehouseApplyDto.setCreateTime(new Date());
+                allocationStorehouseApplyDto.setCreateTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
                 allocationStorehouseApplyDto.setState(AllocationStorehouseDto.STATE_SUCCESS);
                 allocationStorehouseApplyDto.setCommunityId(reqJson.getString("communityId"));
                 //调拨