liyg 2 rokov pred
rodič
commit
48619fac83

+ 5 - 3
src/main/java/com/steerinfo/dil/service/impl/WmshInboundResultServiceImpl.java

@@ -60,11 +60,13 @@ public class WmshInboundResultServiceImpl implements IWmshInboundResultService {
         if( map.get("attorneyTime") != null ) {
             long attorneyTime =(long) map.get("attorneyTime");
             wmshInboundResult.setWorkTime(new Date(attorneyTime));
-        }
-        //卸船专业开始时间作为万州港入库作业时间
-        if (map.get("resultStartTime") != null) {
+        }else if (map.get("resultStartTime") != null) {
+            //卸船专业开始时间作为万州港入库作业时间
             long resultStartTime = (long) map.get("resultStartTime");
             wmshInboundResult.setWorkTime(new Date(resultStartTime));
+        }else {
+            //默认使用当前时间
+            wmshInboundResult.setWorkTime(new Date());
         }
         wmshInboundResult.setDeleted(new BigDecimal(0)); //状态 0 正常
         return wmshInboundResultMapper.insertSelective(wmshInboundResult);

+ 4 - 3
src/main/java/com/steerinfo/dil/service/impl/WmshOutboundResultServiceImpl.java

@@ -73,11 +73,12 @@ public class WmshOutboundResultServiceImpl implements IWmshOutboundResultService
         if (map.get("resultLoadShipDate") != null) {
             long resultLoadShipDate =(long) map.get("resultLoadShipDate");
             wmshOutboundResult.setWorkTime(new Date(resultLoadShipDate));
-        }
-        //按照出库时间作为万州港出库作业时间
-        if (map.get("resultLoadingDate") != null) {
+        }else if (map.get("resultLoadingDate") != null) {
+            //按照出库时间作为万州港出库作业时间
             long resultLoadingDate =(long) map.get("resultLoadingDate");
             wmshOutboundResult.setWorkTime(new Date(resultLoadingDate));
+        }else {
+            wmshOutboundResult.setWorkTime(new Date());
         }
         wmshOutboundResultMapper.insertSelective(wmshOutboundResult);
         return  id;