laoyao 3 năm trước cách đây
mục cha
commit
4765645924

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/TrayMapper.xml

@@ -19,7 +19,7 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,create_time,create_user,update_time,update_user,
+        id,create_time,create_user,update_time,update_user,material_type,factory,period,expiry_date,join_date,
         name, no, brand, num, specification, status,positionSort
     </sql>
 

+ 22 - 22
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionReadyCenter/TrayController.java

@@ -60,30 +60,30 @@ public class TrayController extends SuperController<TrayService, Long, Tray, Tra
 
         wrapper.like(Tray::getName, tray.getName())
                 .like(Tray::getSpecification, tray.getSpecification())
-                .eq(Tray::getBrand,tray.getBrand());
+                .eq(Tray::getBrand,tray.getBrand()).eq(Tray::getStatus,tray.getStatus());
 
         IPage<Tray> list= baseService.pageList(page, wrapper);
-        //取出分页里面得数据
-        List<Tray> l = list.getRecords();
-        //取出IDList
-        List<Long> idList = l.stream().map(p -> p.getId()).collect(Collectors.toList());
-        //根据IDList取出明细
-        List<TrayPosition> detailList = trayPositionService.list(Wraps.<TrayPosition>lbQ().in(TrayPosition::getTrayId, idList));
-        Map<Long,List<TrayPosition>>map = new HashMap<Long,List<TrayPosition>>();
-        for(TrayPosition ms:detailList){
-            if(map.containsKey(ms.getTrayId())){
-                map.get(ms.getTrayId()).add(ms);
-            }else{
-                List a = new ArrayList<TrayPosition>();
-                a.add(ms);
-                map.put(ms.getTrayId(),a);
-            }
-        }
-        for(Tray m:l){
-            if(map.containsKey(m.getId())){
-                m.setPositionList(map.get(m.getId()));
-            }
-        }
+//        //取出分页里面得数据
+//        List<Tray> l = list.getRecords();
+//        //取出IDList
+//        List<Long> idList = l.stream().map(p -> p.getId()).collect(Collectors.toList());
+//        //根据IDList取出明细
+//        List<TrayPosition> detailList = trayPositionService.list(Wraps.<TrayPosition>lbQ().in(TrayPosition::getTrayId, idList));
+//        Map<Long,List<TrayPosition>>map = new HashMap<Long,List<TrayPosition>>();
+//        for(TrayPosition ms:detailList){
+//            if(map.containsKey(ms.getTrayId())){
+//                map.get(ms.getTrayId()).add(ms);
+//            }else{
+//                List a = new ArrayList<TrayPosition>();
+//                a.add(ms);
+//                map.put(ms.getTrayId(),a);
+//            }
+//        }
+//        for(Tray m:l){
+//            if(map.containsKey(m.getId())){
+//                m.setPositionList(map.get(m.getId()));
+//            }
+//        }
 
     }
 

+ 31 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/TraySaveDTO.java

@@ -1,10 +1,12 @@
 package com.github.zuihou.business.productionReadyCenter.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.github.zuihou.base.entity.Entity;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.github.zuihou.injection.annonation.InjectionField;
 import com.github.zuihou.model.RemoteData;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -23,6 +25,10 @@ import com.github.zuihou.common.constant.DictionaryType;
 import java.io.Serializable;
 import java.util.List;
 
+import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;
+import static com.github.zuihou.common.constant.InjectionFieldConstants.DICTIONARY_ITEM_CLASS;
+import static com.github.zuihou.common.constant.InjectionFieldConstants.DICTIONARY_ITEM_METHOD;
+
 /**
  * <p>
  * 实体类
@@ -78,6 +84,31 @@ public class TraySaveDTO implements Serializable {
     @ApiModelProperty(value = "托盘数量")
     private Integer num;
 
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    @Excel(name = "入场日期")
+    private String joinDate;
+
+    /**
+     * 物料类型
+     */
+    @ApiModelProperty(value = "物料类型")
+    @Length(max = 128, message = "物料类型长度不能超过128")
+    @Excel(name = "物料类型")
+    private String materialType;
+
+
+    @ApiModelProperty(value = "生产分厂")
+    @Length(max = 128, message = "name长度不能超过128")
+    @Excel(name = "生产分厂")
+    private String factory;
+
+    @ApiModelProperty(value = "有效期(月)")
+    private Integer expiryDate;
+
+    @ApiModelProperty(value = "周期(月)")
+    private Integer period;
+
     private List<TrayPositionSaveDTO> trayPositionList;
 
 }

+ 26 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/TrayUpdateDTO.java

@@ -1,5 +1,6 @@
 package com.github.zuihou.business.productionReadyCenter.dto;
 
+import cn.afterturn.easypoi.excel.annotation.Excel;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -83,5 +84,30 @@ public class TrayUpdateDTO implements Serializable {
     @ApiModelProperty(value = "托盘数量")
     private Integer num;
 
+    @ApiModelProperty(value = "入场日期")
+    @Length(max = 255, message = "入场日期不能超过128")
+    @Excel(name = "入场日期")
+    private String joinDate;
+
+    /**
+     * 物料类型
+     */
+    @ApiModelProperty(value = "物料类型")
+    @Length(max = 128, message = "物料类型长度不能超过128")
+    @Excel(name = "物料类型")
+    private String materialType;
+
+
+    @ApiModelProperty(value = "生产分厂")
+    @Length(max = 128, message = "name长度不能超过128")
+    @Excel(name = "生产分厂")
+    private String factory;
+
+    @ApiModelProperty(value = "有效期(月)")
+    private Integer expiryDate;
+
+    @ApiModelProperty(value = "周期(月)")
+    private Integer period;
+
     private List<TrayPositionUpdateDTO> trayPositionList;
 }

+ 0 - 1
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/Tray.java

@@ -117,7 +117,6 @@ public class Tray extends Entity<Long> {
      */
     @ApiModelProperty(value = "物料类型")
     @Length(max = 128, message = "物料类型长度不能超过128")
-    @InjectionField(api = DICTIONARY_ITEM_CLASS, method = DICTIONARY_ITEM_METHOD, dictType = DictionaryType.MATERIAL_TYPE)
     @TableField(value = "material_type", condition = LIKE)
     @Excel(name = "物料类型")
     private String materialType;

+ 1 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/service/impl/ProductionresourceServiceImpl.java

@@ -835,6 +835,7 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
         String sql = "UPDATE "+tableName+" " +
                 "SET hand_num="+productionresource.getHandNum()+", workbench_num="+productionresource.getWorkbenchNum()+"," +
                 " cache_storge_num="+productionresource.getCacheStorgeNum()+", max_speed="+productionresource.getMaxSpeed()+"," +
+                " plate_id="+data.getPlateId()+", " +
                 "  tray_num="+productionresource.getTrayNum()+
                 " WHERE id= "+productionresource.getId();
         baseMapper.createDynTable(sql);

+ 1 - 0
imcs-admin-boot/imcs-tenant-biz/src/main/resources/mapper_tenant/base/defaults/ProductionresourceviewMapper.xml

@@ -26,6 +26,7 @@
             v.display_status displayStatus,
             v.program_syn_time programSynTime,
             v.program_num programNum,
+            v.plate_id plateId,
             pic,
             name,
             code,

+ 4 - 0
imcs-admin-boot/imcs-tenant-entity/src/main/java/com/github/zuihou/tenant/dto/ProductionresourceUpdateDTO.java

@@ -181,6 +181,10 @@ public class ProductionresourceUpdateDTO implements Serializable {
     @ApiModelProperty(value = "IP")
     @Length(max = 64, message = "IP长度不能超过64")
     private String ip;
+
+
+
+    private String plateId;
     /**
      * 端口号
      */