Kaynağa Gözat

物资修改

wwh 1 yıl önce
ebeveyn
işleme
0af97cb3bd

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

@@ -120,8 +120,8 @@ public class FlowUtil {
             billCleanBefore.setVistitDate(vistitDate);
             billCleanBefore.setSubDate(LocalDateTime.now());
             billCleanBefore.setPhone(phone);
-            billCleanBefore.setCurrentLocation(locationName);
-            billCleanBefore.setCurrentLocationId(locationId);
+            billCleanBefore.setTestLocation(locationName);
+            billCleanBefore.setTestLocationId(locationId);
             billCleanBefore.setBillAdmission(processId);
             billCleanBefore.setFarmId(String.valueOf(farmId));
             billCleanBefore.setDepartureId(departureId);

+ 2 - 2
huimv-receive/src/main/java/com/huimv/receive/entity/BillGoodsInventory.java

@@ -55,12 +55,12 @@ public class BillGoodsInventory implements Serializable {
     /**
      * 当前位置
      */
-    private String currentLocation;
+    private String testLocation;
 
     /**
      * 当前位置 id
      */
-    private Integer currentLocationId;
+    private Integer testLocationId;
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
     private Date createDate;

+ 5 - 0
huimv-receive/src/main/java/com/huimv/receive/entity/vo/BaseProcessByLocationVo.java

@@ -44,5 +44,10 @@ public class BaseProcessByLocationVo {
     private String dryTem;
     private List<String> imgUrls;
 
+    private String goodsType;
+    private String feedImgUrl;
+
+
+
 
 }

+ 3 - 3
huimv-receive/src/main/java/com/huimv/receive/service/impl/BillCleanServiceImpl.java

@@ -120,7 +120,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 cleanDryGoodPage = cleanMapper.listCleanDryGoods(page, farmId, type, "0,1".split(","), s);
                 queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
                 queryWrapper2.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
-                queryWrapper3.in("current_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
+                queryWrapper3.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
             }
             if ("1".equals(data)) {
                 String[] ids = {TokenSign.getWorkIdByJwtToken(httpServletRequest)};
@@ -130,7 +130,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 cleanDryGoodPage = cleanMapper.listCleanDryGoods(page, farmId, type, s, ids);
                 queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
                 queryWrapper2.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
-                queryWrapper3.in("current_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
+                queryWrapper3.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
             }
             if ("2".equals(data)) {
                 String[] ids = {TokenSign.getWorkIdByJwtToken(httpServletRequest)};
@@ -140,7 +140,7 @@ public class BillCleanServiceImpl extends ServiceImpl<BillCleanMapper, BillClean
                 cleanDryGoodPage = cleanMapper.listCleanDryGoods(page, farmId, type, s, ids);
                 queryWrapper.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
                 queryWrapper2.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
-                queryWrapper3.in("current_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
+                queryWrapper3.in("test_location_id", TokenSign.getWorkIdByJwtToken(httpServletRequest));
             }
             queryWrapper.eq("img_status", 0);
             queryWrapper2.eq("img_status", 0);

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

@@ -105,7 +105,7 @@ public class BillGoodsInventoryServiceImpl extends ServiceImpl<BillGoodsInventor
         BaseProcess baseProcess = processMapper.selectOne(processQueryWrapper);//进程
 
         QueryWrapper<BaseLocation> locationQueryWrapper = new QueryWrapper<>();
-        locationQueryWrapper.eq("id", goodsInventory.getCurrentLocationId());
+        locationQueryWrapper.eq("id", goodsInventory.getTestLocationId());
         BaseLocation baseLocation = locationMapper.selectOne(locationQueryWrapper);//当前pcr检测所在的位置
 
         String allLocationId = baseProcess.getAllLocationId();//所有的位置id
@@ -118,7 +118,7 @@ public class BillGoodsInventoryServiceImpl extends ServiceImpl<BillGoodsInventor
 
         Object newObject = BillPcrServiceImpl.getNewObject(nextId, goodsInventory.getDestName(), goodsInventory.getDestId(), goodsInventory.getAdmissionUserName(),
                 goodsInventory.getAdmissionUserId(), goodsInventory.getVistitDate(), goodsInventory.getSubDate(),
-                goodsInventory.getBillAdmission(), Integer.parseInt(goodsInventory.getFarmId()), goodsInventory.getCurrentLocation(), goodsInventory.getCurrentLocationId(),
+                goodsInventory.getBillAdmission(), Integer.parseInt(goodsInventory.getFarmId()), goodsInventory.getTestLocation(), goodsInventory.getTestLocationId(),
                 goodsInventory.getVistitType(), goodsInventory.getPhone(),goodsInventory.getDepartureName(),goodsInventory.getDepartureId());
         if (nextId == 0) {
             if (split.length == 1) {
@@ -395,11 +395,10 @@ public class BillGoodsInventoryServiceImpl extends ServiceImpl<BillGoodsInventor
         QueryWrapper<BillGoodsInventory> queryWrapper = new QueryWrapper<>();
         Page<BillGoodsInventory> page = new Page(Integer.parseInt(pageNum), Integer.parseInt(pageSize));
         queryWrapper.eq("farm_id", farmId).orderByDesc("sub_date");
-        queryWrapper.eq(StringUtils.isNotBlank(data), "vistit_type", data);
         if ("0".equals(type)) {
-            queryWrapper.in("status", 0, 1);
+            queryWrapper.in("bill_status", 0, 1);
         } else {
-            queryWrapper.eq("status", type);
+            queryWrapper.eq("bill_status", type);
         }
         return new Result(ResultCode.SUCCESS,inventoryMapper.selectPage(page,queryWrapper));
     }

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

@@ -942,12 +942,13 @@ public class BillPcrServiceImpl extends ServiceImpl<BillPcrMapper, BillPcr> impl
             billCleanBefore.setVistitDate(vistitDate);
             billCleanBefore.setSubDate(LocalDateTime.now());
             billCleanBefore.setPhone(phone);
-            billCleanBefore.setCurrentLocation(testLocation);
-            billCleanBefore.setCurrentLocationId(testLocationId);
+            billCleanBefore.setTestLocation(testLocation);
+            billCleanBefore.setTestLocationId(testLocationId);
             billCleanBefore.setBillAdmission(processId);
             billCleanBefore.setFarmId(String.valueOf(farmId));
             billCleanBefore.setDepartureName(departureName);
             billCleanBefore.setDepartureId(departureId);
+            billCleanBefore.setProcessId(processId);
             return billCleanBefore;
         }
         return null;

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

@@ -209,8 +209,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
             for (BillGoodsInventory good : admissionAndGoods) {
                 good.setBillAdmission(billPersonnelAdmission.getId());
                 BaseLocation baseLocation1 = baseLocationMapper.selectById(destId);
-                good.setCurrentLocation(baseLocation1.getLocationName());
-                good.setCurrentLocationId(baseLocation1.getId());
+                good.setTestLocation(baseLocation1.getLocationName());
+                good.setTestLocationId(baseLocation1.getId());
                 good.setCreateDate(new Date());
                 good.setFarmId(farmId);
                 billGoodsInventoryMapper.insert(good);
@@ -343,8 +343,8 @@ public class BillPersonnelAdmissionServiceImpl extends ServiceImpl<BillPersonnel
             for (BillGoodsInventory good : admissionAndGoods) {
                 good.setBillAdmission(billPersonnelAdmission.getId());
                 BaseLocation baseLocation1 = baseLocationMapper.selectById(destId);
-                good.setCurrentLocation(baseLocation1.getLocationName());
-                good.setCurrentLocationId(baseLocation1.getId());
+                good.setTestLocation(baseLocation1.getLocationName());
+                good.setTestLocationId(baseLocation1.getId());
                 good.setCreateDate(new Date());
                 good.setFarmId(farmId);
                 billGoodsInventoryMapper.insert(good);

+ 8 - 8
huimv-receive/src/main/resources/com/huimv/receive/mapper/BaseProcessMapper.xml

@@ -20,39 +20,39 @@
 
  SELECT *FROM (
       SELECT   NULL AS qualified_date,pass_user_name AS pass_user_name,NULL AS pcr_type,process_id ,id,farm_id ,admission_user_id ,test_location,check_date,test_location_id
-      ,bill_status  ,NULL AS isolate_end_date ,1 AS `type`   , NULL AS isolate_day_num   ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date ,img_url,img_status,clean_time ,NULL AS dry_time,NULL AS dry_tem  ,  null as goods_type FROM `bill_clean`
+      ,bill_status  ,NULL AS isolate_end_date ,1 AS `type`   , NULL AS isolate_day_num   ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date ,img_url,img_status,clean_time ,NULL AS dry_time,NULL AS dry_tem  ,  null as goods_type , null as feed_img_url FROM `bill_clean`
 
    UNION
    SELECT qualified_date,pass_user_name,pcr_type, process_id ,id,farm_id,admission_user_id ,test_location,check_date,test_location_id   ,bill_status
-   ,NULL AS isolate_end_date ,2 AS `type` ,NULL AS isolate_day_num ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date , img_url,   img_status ,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem  ,  null as goods_type FROM  `bill_pcr`
+   ,NULL AS isolate_end_date ,2 AS `type` ,NULL AS isolate_day_num ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date , img_url,   img_status ,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem  ,  null as goods_type , null as feed_img_url FROM  `bill_pcr`
 
    UNION
    SELECT NULL AS qualified_date,pass_user_name AS pass_user_name, NULL AS pcr_type, process_id ,id,farm_id,admission_user_id ,test_location,check_date,test_location_id
-    ,bill_status  ,NULL AS isolate_end_date ,3  AS `type` ,NULL AS isolate_day_num ,NULL AS isolate_real_day_num,  NULL AS  isolate_real_end_date, img_url, img_status ,NULL AS clean_time  ,dry_time,dry_tem  ,  null as goods_type FROM  `bill_dry`
+    ,bill_status  ,NULL AS isolate_end_date ,3  AS `type` ,NULL AS isolate_day_num ,NULL AS isolate_real_day_num,  NULL AS  isolate_real_end_date, img_url, img_status ,NULL AS clean_time  ,dry_time,dry_tem  ,  null as goods_type , null as feed_img_url FROM  `bill_dry`
     UNION
 
    SELECT  NULL AS qualified_date,pass_user_name,  NULL AS pcr_type, process_id ,id,farm_id,admission_user_id , isolate_location AS test_location,
    isolate_start_date AS check_date ,
    isolate_location_id AS test_location_id  ,
    bill_status,
-      isolate_end_date ,   4 AS `type` ,isolate_day_num  ,isolate_real_day_num, isolate_real_end_date , NULL AS img_url, NULL AS  img_status ,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem ,  null as goods_type
+      isolate_end_date ,   4 AS `type` ,isolate_day_num  ,isolate_real_day_num, isolate_real_end_date , NULL AS img_url, NULL AS  img_status ,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem ,  null as goods_type , null as feed_img_url
 
     FROM  `bill_isolate`
 
       UNION
    SELECT NULL AS qualified_date, pass_user_name, NULL AS pcr_type, process_id ,id,farm_id,admission_user_id ,test_location,check_date,test_location_id
     ,bill_status  ,NULL AS isolate_end_date ,
-    5  AS `type` ,NULL AS isolate_day_num ,NULL AS isolate_real_day_num,  NULL AS  isolate_real_end_date, img_url, img_status ,NULL AS clean_time  , NULL AS dry_time, NULL AS dry_tem ,  null as goods_type FROM  `bill_sampling`
+    5  AS `type` ,NULL AS isolate_day_num ,NULL AS isolate_real_day_num,  NULL AS  isolate_real_end_date, img_url, img_status ,NULL AS clean_time  , NULL AS dry_time, NULL AS dry_tem ,  null as goods_type , null as feed_img_url FROM  `bill_sampling`
 
        UNION
    SELECT   NULL AS qualified_date,pass_user_name,NULL AS pcr_type,process_id ,id,farm_id ,admission_user_id ,test_location,check_date,test_location_id
-      ,bill_status  ,NULL AS isolate_end_date ,6 AS `type`   , NULL AS isolate_day_num   ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date ,img_url,img_status,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem , null as goods_type  FROM `bill_clean_before`
+      ,bill_status  ,NULL AS isolate_end_date ,6 AS `type`   , NULL AS isolate_day_num   ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date ,img_url,img_status,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem , null as goods_type , null as feed_img_url FROM `bill_clean_before`
 
 
 
       UNION
-   SELECT   NULL AS qualified_date,null  AS pass_user_name,NULL AS pcr_type,process_id ,id,farm_id ,admission_user_id , null as  test_location, null as  check_date, null as  test_location_id
-      ,bill_status  ,NULL AS isolate_end_date ,7 AS `type`   , NULL AS isolate_day_num   ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date ,img_url,null as  img_status,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem  ,    goods_type
+   SELECT   NULL AS qualified_date,null  AS pass_user_name,NULL AS pcr_type,process_id ,id,farm_id ,admission_user_id ,   test_location, null as  check_date,   test_location_id
+      ,bill_status  ,NULL AS isolate_end_date ,7 AS `type`   , NULL AS isolate_day_num   ,NULL AS isolate_real_day_num, NULL AS isolate_real_end_date ,img_url,null as  img_status,NULL AS clean_time ,NULL AS dry_time,NULL AS dry_tem , goods_type ,feed_img_url
      FROM `bill_goods_inventory`
 
     ) a  WHERE  a.process_id  = #{processId} and test_location_id  = #{locationId} AND bill_status &gt; 0 order by a.check_date desc

+ 1 - 1
huimv-receive/src/main/resources/com/huimv/receive/mapper/BillCleanMapper.xml

@@ -141,7 +141,7 @@ ORDER BY
             #{statu}
         </foreach>
         union all
-        select id,'5' as 'vistitType',current_location as 'testLocation',admission_user_name,car_num,null as 'cleanTime',null as 'dryTime',null as 'checkDate' ,sub_date,bill_status as 'billStatus' ,null,3 AS 'type' from bill_goods_inventory where farm_id=#{farmId}
+        select id,'5' as 'vistitType',test_location as 'testLocation',admission_user_name,car_num,null as 'cleanTime',null as 'dryTime',null as 'checkDate' ,sub_date,bill_status as 'billStatus' ,null,3 AS 'type' from bill_goods_inventory where farm_id=#{farmId}
 <!--        and current_location_id in-->
 <!--        <foreach collection="locations" item="location" separator="," open="(" close=")">-->
 <!--            #{location}-->