Newspaper 1 рік тому
батько
коміт
59d2ca7dd5

+ 13 - 1
huimv-receive/src/main/java/com/huimv/receive/common/utils/FlowUtil.java

@@ -7,7 +7,7 @@ import java.time.LocalDateTime;
 
 @Component
 public class FlowUtil {
-    public Object getEntity(Integer nextFlowId,Integer vistitType, String destName, Integer destId, Integer userId, String userName, String phone, LocalDateTime vistitDate, Integer locationId, String locationName, Integer farmId, Integer processId){
+    public Object getEntity(Integer nextFlowId,Integer vistitType, String destName, Integer destId, Integer userId, String userName, String phone, LocalDateTime vistitDate, Integer locationId, String locationName, Integer farmId, Integer processId, String departureName, Integer departureId){
         if (nextFlowId == 1){
             BillSampling billSampling = new BillSampling();
             billSampling.setVistitType(vistitType);
@@ -22,6 +22,8 @@ public class FlowUtil {
             billSampling.setTestLocationId(locationId);
             billSampling.setProcessId(processId);
             billSampling.setFarmId(String.valueOf(farmId));
+            billSampling.setDepartureId(departureId);
+            billSampling.setDepartureName(departureName);
             return billSampling;
         }else if (nextFlowId == 2){
             BillPcr billPcr = new BillPcr();
@@ -37,6 +39,8 @@ public class FlowUtil {
             billPcr.setTestLocationId(locationId);
             billPcr.setProcessId(processId);
             billPcr.setFarmId(farmId);
+            billPcr.setDepartureId(departureId);
+            billPcr.setDepartureName(departureName);
             return billPcr;
         }else if (nextFlowId == 3){
             BillClean billClean = new BillClean();
@@ -52,6 +56,8 @@ public class FlowUtil {
             billClean.setTestLocationId(locationId);
             billClean.setProcessId(processId);
             billClean.setFarmId(farmId);
+            billClean.setDepartureId(departureId);
+            billClean.setDepartureName(departureName);
             return billClean;
         }else if (nextFlowId == 4){
             BillIsolate billIsolate = new BillIsolate();
@@ -67,6 +73,8 @@ public class FlowUtil {
             billIsolate.setIsolateLocationId(locationId);
             billIsolate.setProcessId(processId);
             billIsolate.setFarmId(farmId);
+            billIsolate.setDepartureId(departureId);
+            billIsolate.setDepartureName(departureName);
             return billIsolate;
         }else if (nextFlowId == 5){
             BillDry billDry = new BillDry();
@@ -82,6 +90,8 @@ public class FlowUtil {
             billDry.setTestLocationId(locationId);
             billDry.setProcessId(processId);
             billDry.setFarmId(farmId);
+            billDry.setDepartureId(departureId);
+            billDry.setDepartureName(departureName);
             return billDry;
         }else {
             BillCleanBefore billCleanBefore = new BillCleanBefore();
@@ -97,6 +107,8 @@ public class FlowUtil {
             billCleanBefore.setTestLocationId(locationId);
             billCleanBefore.setProcessId(processId);
             billCleanBefore.setFarmId(String.valueOf(farmId));
+            billCleanBefore.setDepartureId(departureId);
+            billCleanBefore.setDepartureName(departureName);
             return billCleanBefore;
         }
     }

+ 4 - 6
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanBeforeServiceImpl.java

@@ -23,6 +23,7 @@ import java.io.IOException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.Date;
 import java.util.Map;
 
@@ -127,11 +128,8 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
         }
         s = uploadImage.uploadImg(img);
 
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
 
-        if (StringUtils.isBlank(date)) {
-            date = sdf.format(new Date());
-        }
         BillCleanBefore cleanBefore = billCleanBeforeMapper.selectById(id);
         cleanBefore.setImgUrl(s);
         cleanBefore.setImgStatus(1);
@@ -158,7 +156,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
         cleanBefore.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
         cleanBefore.setTestLocation(baseLocation.getLocationName());
         cleanBefore.setTestLocationId(baseLocation.getId());
-        cleanBefore.setCheckDate(LocalDateTime.parse(date));
+        cleanBefore.setCheckDate(LocalDateTime.parse(date, dateTimeFormatter));
         cleanBefore.setPassDate(LocalDateTime.now());
 
 
@@ -197,7 +195,7 @@ public class BillCleanBeforeServiceImpl extends ServiceImpl<BillCleanBeforeMappe
             BillCleanBefore before = (BillCleanBefore) newObject;
             billCleanBeforeMapper.insert(before);
         }
-        baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + sdf.format(new Date()));
+        baseProcess.setUpdateDate(baseProcess.getUpdateDate() + "," + LocalDateTime.now().format(dateTimeFormatter));
         baseProcess.setCurrentLocation(baseProcess.getCurrentLocation() + "," + baseLocation.getLocationName());
         baseProcess.setCurrentLocationId(baseProcess.getCurrentLocationId() + "," + baseLocation.getId());
         String status = baseProcess.getCurrentStatus();

+ 0 - 4
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillGoodsInventoryServiceImpl.java

@@ -37,11 +37,7 @@ public class BillGoodsInventoryServiceImpl extends ServiceImpl<BillGoodsInventor
         Calendar calendar = Calendar.getInstance();
         calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - 7);
         queryWrapper.ge("create_date", calendar.getTime()).eq("farm_id", farmId);
-//        queryWrapper.groupBy("create_date");
-//        queryWrapper.orderByAsc("create_date");
         List<BillGoodsInventoryVo> billGoodsInventoryVos = inventoryMapper.listAll(queryWrapper);
-//        List<BillGoodsInventory> billGoodsInventories = inventoryMapper.selectList(queryWrapper);
-
         return new Result(ResultCode.SUCCESS, billGoodsInventoryVos);
     }
 }

+ 2 - 1
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPcrServiceImpl.java

@@ -391,7 +391,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
             if ("1".equals(result)) {
                 Integer pcrTime = washoutPointMapper.selectOne(new QueryWrapper<BaseWashoutPoint>().eq("farm_ids", farmId)
                         .eq("visiting_type", billPcr.getVistitType()).eq("location_id", baseLocation.getId())).getPcrTime();
-
+                System.out.println("pcr的下一个流程id:"+nextId);
                 billPcr.setBillStatus(1);
                 billPcr.setPassUserName(TokenSign.getUserNameByJwtToken(httpServletRequest));
                 billPcr.setPassUserId(TokenSign.getMemberIdByJwtToken(httpServletRequest));
@@ -613,6 +613,7 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
             billPcr.setSubDate(subDate);
             billPcr.setBillStatus(0);
             billPcr.setProcessId(processId);
+            billPcr.setPhone(phone);
             billPcr.setFarmId(farmId);
             billPcr.setTestLocationId(testLocationId);
             billPcr.setTestLocation(testLocation);

+ 20 - 8
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillPersonnelAdmissionServiceImpl.java

@@ -166,9 +166,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
 
         List<BaseWashoutPoint> baseWashoutPoints = new ArrayList<>();
         if (ObjectUtil.isEmpty(baseWashoutPoint1)){
-            baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).orderByAsc(BaseWashoutPoint::getPointLevel));
+            baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().le(BaseWashoutPoint::getPointLevel,baseWashoutPoint2.getPointLevel()).eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).orderByAsc(BaseWashoutPoint::getPointLevel));
         }else {
-            baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).ge(BaseWashoutPoint::getPointLevel,baseWashoutPoint1.getPointLevel()).orderByAsc(BaseWashoutPoint::getPointLevel));
+            baseWashoutPoints = baseWashoutPointMapper.selectList(new QueryWrapper<BaseWashoutPoint>().lambda().le(BaseWashoutPoint::getPointLevel,baseWashoutPoint2.getPointLevel()).eq(BaseWashoutPoint::getVisitingType, vistitType).like(BaseWashoutPoint::getFarmIds, farmId).ge(BaseWashoutPoint::getPointLevel,baseWashoutPoint1.getPointLevel()).orderByAsc(BaseWashoutPoint::getPointLevel));
         }
         for (BaseWashoutPoint baseWashoutPoint : baseWashoutPoints) {
             allLocation = allLocation + "," + baseLocationMapper.selectById(baseWashoutPoint.getLocationId()).getLocationName();
@@ -363,7 +363,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseLocation.getId(),
                             baseLocation.getLocationName(),
                             billPersonnelAdmission.getFarmId(),
-                            baseProcess.getId());
+                            baseProcess.getId(),
+                            billPersonnelAdmission.getDepartureName(),
+                            billPersonnelAdmission.getDepartureId());
                     if (ObjectUtil.isNotEmpty(billPersonnelAdmission.getCarNum())){
                         billSampling.setCarNum(billPersonnelAdmission.getCarNum());
                     }
@@ -380,7 +382,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseLocation.getId(),
                             baseLocation.getLocationName(),
                             billPersonnelAdmission.getFarmId(),
-                            baseProcess.getId());
+                            baseProcess.getId(),
+                            billPersonnelAdmission.getDepartureName(),
+                            billPersonnelAdmission.getDepartureId());
                     if (ObjectUtil.isNotEmpty(billPersonnelAdmission.getCarNum())){
                         billPcr.setCarNum(billPersonnelAdmission.getCarNum());
                     }
@@ -397,7 +401,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseLocation.getId(),
                             baseLocation.getLocationName(),
                             billPersonnelAdmission.getFarmId(),
-                            baseProcess.getId());
+                            baseProcess.getId(),
+                            billPersonnelAdmission.getDepartureName(),
+                            billPersonnelAdmission.getDepartureId());
                     if (ObjectUtil.isNotEmpty(billPersonnelAdmission.getCarNum())){
                         billClean.setCarNum(billPersonnelAdmission.getCarNum());
                     }
@@ -414,7 +420,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseLocation.getId(),
                             baseLocation.getLocationName(),
                             billPersonnelAdmission.getFarmId(),
-                            baseProcess.getId());
+                            baseProcess.getId(),
+                            billPersonnelAdmission.getDepartureName(),
+                            billPersonnelAdmission.getDepartureId());
                     billIsolateMapper.insert(billIsolate);
                 }else if (Integer.valueOf(nextFlowId) == 5){
                     BillDry billDry = (BillDry) flowUtil.getEntity(Integer.valueOf(nextFlowId),
@@ -428,7 +436,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseLocation.getId(),
                             baseLocation.getLocationName(),
                             billPersonnelAdmission.getFarmId(),
-                            baseProcess.getId());
+                            baseProcess.getId(),
+                            billPersonnelAdmission.getDepartureName(),
+                            billPersonnelAdmission.getDepartureId());
                     dryMapper.insert(billDry);
                 }else {
                     BillCleanBefore billCleanBefore = (BillCleanBefore) flowUtil.getEntity(Integer.valueOf(nextFlowId),
@@ -442,7 +452,9 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
                             baseLocation.getId(),
                             baseLocation.getLocationName(),
                             billPersonnelAdmission.getFarmId(),
-                            baseProcess.getId());
+                            baseProcess.getId(),
+                            billPersonnelAdmission.getDepartureName(),
+                            billPersonnelAdmission.getDepartureId());
                     if (ObjectUtil.isNotEmpty(billPersonnelAdmission.getCarNum())){
                         billCleanBefore.setCarNum(billPersonnelAdmission.getCarNum());
                     }