Browse Source

批次详情-第3版

wangxin 1 năm trước cách đây
mục cha
commit
79d9f85498

+ 19 - 1
src/main/java/cn/ezhizao/project/business/controller/BizTechnologicalAmendController.java

@@ -63,6 +63,9 @@ public class BizTechnologicalAmendController extends BaseController
     @Resource
     private ISysDeptService sysDeptService;
 
+    @Resource
+    private IBizDayworkCarrierService bizDayworkCarrierService;
+
     /**
      * 查询修改后工艺列表
      */
@@ -110,10 +113,25 @@ public class BizTechnologicalAmendController extends BaseController
         BizFurnaceNoInfo furnaceNoInfo=new BizFurnaceNoInfo();
         furnaceNoInfo.setProductionPlanDetailId(lot.getProductionPlanDetailId());
         furnaceNoInfo.setDayworkId(daywork.getId());
-        lot.getProductionPlanDetail().setRequisitionDepartmentName(sysDeptService.selectDeptById(daywork.getDeptId()).getDeptName());
 
+        //查询箱号
+        BizDayworkCarrier dayworkCarrier=new BizDayworkCarrier();
+        dayworkCarrier.setDayworkId(daywork.getId());
+        dayworkCarrier.setIsChanged(0);
+        List <BizDayworkCarrier> dayworkCarriers = bizDayworkCarrierService.getList(dayworkCarrier);
+        StringBuffer carrierName=new StringBuffer();
+        dayworkCarriers.forEach(item->{
+            carrierName.append(item.getCarrierCode()).append(", ");
+        });
+        // 删除末尾多余的逗号和空格
+        if (carrierName.length() > 0) {
+            carrierName.delete(carrierName.length() - 2, carrierName.length());
+        }
+        lot.setCarrierName(carrierName.toString());
         //设置furnaceNoInfo
         lot.setFurnaceNoInfo(bizFurnaceNoInfoService.getList(furnaceNoInfo).get(0));
+        lot.getProductionPlanDetail().setRequisitionDepartmentName(sysDeptService.selectDeptById(daywork.getDeptId()).getDeptName());
+
         return success(lot);
     }
 

+ 6 - 2
src/main/java/cn/ezhizao/project/business/domain/BizLot.java

@@ -143,14 +143,18 @@ public class BizLot extends BaseEntity {
     @TableField(exist = false)
     private BizDaywork daywork;
 
+    //当前箱号
+    @TableField(exist = false)
+    private String carrierName;
+
     @TableField(exist = false)
     private List<BizTechnologicalProcessDetail> technologicalProcessDetailList;
 
     @TableField(exist = false)
     private String[] lotCodeList;
     //批废工序
-    @TableField(exist = false)
-    private List<BizTechnologicalWasteRecyclingDetail> processList;
+//    @TableField(exist = false)
+//    private List<BizTechnologicalWasteRecyclingDetail> processList;
     //领料部门id
     private Long requisitionDepartmentId;
     //领料部门名称

+ 1 - 0
src/main/resources/mybatis/business/BizDayworkMapper.xml

@@ -135,6 +135,7 @@
             <if test="productDescription != null  and productDescription != ''">AND t2.description LIKE CONCAT('%',
                 #{productDescription}, '%')
             </if>
+            <if test="lotId != null  and lotId != ''">AND t3.id = #{lotId}</if>
             <if test="lotCode != null  and lotCode != ''">AND t3.lot_code LIKE CONCAT('%', #{lotCode}, '%')</if>
             <if test="productionPlanNo != null  and productionPlanNo != ''">AND (t4.production_plan_no LIKE CONCAT('%',
                 #{productionPlanNo}, '%') or t3.lot_code LIKE CONCAT('%', #{productionPlanNo}, '%'))