Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

ezhizao_zx 9 mesiacov pred
rodič
commit
0a83a16c1b

+ 4 - 4
src/main/java/cn/ezhizao/project/business/product/controller/BizDayworkItemExamineController.java

@@ -60,7 +60,7 @@ public class BizDayworkItemExamineController extends BaseController
         List<BizDaywork> dayworkList = bizDayworkService.query().in("id", bizDayworkItemExamine.getDayworkIds()).list();
         if(examine.size() == 0) {
             String msg = dayworkList.stream().map(BizDaywork::getLotCode).collect(Collectors.joining(","));
-            return error("批次"+msg+"没有提出审核申请,请联系管理员添加");
+            return error("批次"+msg+"未提交包装审核申请,请联系管理员添加");
         }else {
             List<Long> examineDayworkIds = examine.stream().map(BizDayworkItemExamine::getDayworkId).collect(Collectors.toList());
             List<BizDaywork> notDaywork = new ArrayList<>();
@@ -72,12 +72,12 @@ public class BizDayworkItemExamineController extends BaseController
             });
             if(notDaywork.size() > 0) {
                 String msg = notDaywork.stream().map(BizDaywork::getLotCode).collect(Collectors.joining(","));
-                return error("批次"+msg+"未提审核申请,请联系管理员添加");
+                return error("批次"+msg+"未提交包装审核申请,请联系管理员添加");
             }
             List<BizDayworkItemExamine> collect = examine.stream().filter(item -> item.getStatus().equals(2) ).collect(Collectors.toList());
             if(collect.size() == 0) {
                 String msg = examine.stream().map(BizDayworkItemExamine::getLotCode).collect(Collectors.joining(","));
-                return error("批次"+msg+"审核尚未通过,请联系管理员");
+                return error("批次"+msg+"包装审核尚未通过,请联系管理员");
             }else {
                 List<BizDayworkItemExamine> notExamine = new ArrayList<>();
                 //判断是否存在一个申请通过,一个未通过
@@ -88,7 +88,7 @@ public class BizDayworkItemExamineController extends BaseController
                 });
                 if(notExamine.size() > 0) {
                     String msg = notExamine.stream().map(BizDayworkItemExamine::getLotCode).collect(Collectors.joining(","));
-                    return error("批次"+msg+"审核未通过,请联系管理员");
+                    return error("批次"+msg+"包装审核未通过,请联系管理员");
                 }
                 return success();
             }

+ 6 - 3
src/main/java/cn/ezhizao/project/business/product/controller/BizProcessInspecionController.java

@@ -435,6 +435,7 @@ public TableDataInfo examineList(@RequestBody BizProcessInspecion bizProcessInsp
         lot.setDayworkItemId(dayworkItem.getId());
         lot.setCarrierCode(dayworkItem.getCarrierCode());
         lot.setCarrierId(dayworkItem.getCarrierId());
+        lot.setProcessId(dayworkItem.getProcessId());
         lot.setProcessStepNumber(dayworkItem.getProcessStepNumber());
         lot.setPudName(dayworkItem.getProdNum() == 0 ? lot.getProductionQuantity() : dayworkItem.getProdNum());
         processInspecion.setLot(lot);
@@ -969,8 +970,10 @@ public TableDataInfo examineList(@RequestBody BizProcessInspecion bizProcessInsp
         processInspecion.setReturnReceiptDetailId(bizReturnReceiptDetail.getId());
 //        processInspecion.setUserId(user == null ? 0L : user.getUserId());
 //        processInspecion.setNickName(user == null ? "" : user.getNickName());
-        processInspecion.setCarrierId(processInspecion.getLot().getCarrierId());
-        processInspecion.setCarrierCode(processInspecion.getLot().getCarrierCode());
+        if(processInspecion.getId() == null) {
+            processInspecion.setCarrierId(processInspecion.getLot().getCarrierId());
+            processInspecion.setCarrierCode(processInspecion.getLot().getCarrierCode());
+        }
         processInspecion.setDayworkId(daywork.getId());
         processInspecion.setProductionPlanId(daywork.getProductionPlanId());
         processInspecion.setDayworkItemId(dayworkItem.getId());
@@ -989,7 +992,7 @@ public TableDataInfo examineList(@RequestBody BizProcessInspecion bizProcessInsp
         processInspecion.setOutsourceOrderId(outsourceOrderDetail.getMasterId());
         processInspecion.setReviewerId(SecurityUtils.getLoginUser().getUserId());
         processInspecion.setProcessStepNumber(processInspecion.getLot().getProcessStepNumber());
-        processInspecion.setType("outsourcedInspection");
+        processInspecion.setType("outsourcedInspector");
 
         if (processInspecion.getStartTime() == null) {
             processInspecion.setStartTime(new Date());

+ 1 - 1
src/main/resources/mybatis/business/product/BizProcessInspecionMapper.xml

@@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isAuto != null  ">AND t1.is_auto = #{isAuto}</if>
 
         </trim>
-        order by t1.production_plan_detail_id ,t1.lot_code
+        order by ( case when t1.status = 0 then 3 else t1.status end) desc, t1.create_time asc
     </select>
     <select id="getInfoByIds" resultMap="BizProcessInspecionResult">
         select t1.*,t3.id as process_id,t3.process_alias,t4.technology_version,t5.drawing_number from biz_process_inspecion t1