Jelajahi Sumber

Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampSaveDTO.java
姚云青 3 tahun lalu
induk
melakukan
169af54455

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/edgeLibrary/service/impl/ShelvesServiceImpl.java

@@ -127,7 +127,7 @@ public class ShelvesServiceImpl extends SuperCacheServiceImpl<ShelvesMapper, She
         //[{id=xx,name=xx,children=[{id=xx,name=xx}]}]
         List<Shelves> returnList = new ArrayList<Shelves>();
         LbqWrapper<Shelves> queryWrapper  = Wraps.<Shelves>lbQ();
-        queryWrapper.eq(Shelves::getStatus,1).orderByAsc(Shelves::getWeight);
+        queryWrapper.eq(Shelves::getStatus,1).orderByAsc(Shelves::getWeight).orderByAsc(Shelves::getCreateTime);
 
         IPage<Shelves> shelves = baseMapper.shelvesTreeList(new Page<Shelves>(1L,50), queryWrapper, new DataScope());
         //Map shelvesIPage = baseMapper.shelvesTreeList(, new DataScope());

+ 0 - 4
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/edgeLibrary/ShelvesMapper.xml

@@ -37,11 +37,7 @@
                   SELECT a.*, b. NAME AS pname FROM imcs_s_shelves a LEFT JOIN imcs_s_shelves b ON a.parent_id = b.id
                  )c
             ) d
-        <!--
-       left join imcs_tenant_productionresource p on p.code = a.no
-       left join imcs_z_zone_productionresource r on r.resource_id = p.id -->
         LEFT JOIN imcs_z_zone z ON locate(z.abbreviate, left(d.zone_name,5))
-        WHERE d.status = '1'
         ) s ${ew.customSqlSegment}
     </select>
 

+ 2 - 1
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/edgeLibrary/StorgeMapper.xml

@@ -45,7 +45,8 @@
                 SELECT  h.id, h.parent_id, h1.name as aname, h1.status
                 FROM imcs_s_shelves h LEFT JOIN imcs_s_shelves h1 ON h.parent_id = h1.id
             ) d ON a.shelves_id = d.id
-            LEFT JOIN imcs_z_zone z ON Locate(z.abbreviate, d.aname)
+            LEFT JOIN imcs_z_zone z ON Locate(z.abbreviate, left(d.aname,5))
+              <!--order by a.weight asc -->
             ) s ${ew.customSqlSegment}
     </select>
 

+ 7 - 3
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionReadyCenter/BBomMapper.xml

@@ -19,14 +19,17 @@
         <result column="specification" jdbcType="VARCHAR" property="specification"/>
         <result column="module_id" jdbcType="BIGINT" property="moduleId"/>
         <result column="parts_no" jdbcType="VARCHAR" property="partsNo"/>
+        <result column="batch_no" jdbcType="VARCHAR" property="batchNo"/>
         <result column="parts_alias" jdbcType="VARCHAR" property="partsAlias"/>
         <result column="bom_alias" jdbcType="VARCHAR" property="bomAlias"/>
+        <result column="key_flag" jdbcType="VARCHAR" property="keyFlag"/>
+        <result column="important_flag" jdbcType="VARCHAR" property="importantFlag"/>
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,create_time,create_user,update_time,update_user,parts_no,parts_alias,bom_alias,meterial_id,remark,
-        audit_status, parent_id, name, no, status, model, brand, specification, module_id,materialBrandName,version,org_id
+        id,create_time,create_user,update_time,update_user,parts_no,parts_alias,bom_alias,meterial_id,remark,batch_no,key_flag,important_flag,
+        audit_status, parent_id, name, no, status, model, brand, specification, module_id,materialBrandName,productModuleName, version,org_id
     </sql>
 
 
@@ -34,10 +37,11 @@
     <select id="pageList" parameterType="String" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List"/>
-        from (select b.*,m.trade_mark materialBrandName
+        from (select b.*,m.trade_mark materialBrandName,mi.name productModuleName
             ,bi.version,z.org_id
         from imcs_b_bom b LEFT JOIN imcs_m_meterial m on b.meterial_id = m.id
             LEFT JOIN imcs_b_bom_version_info bi on b.id = bi.bom_id and bi.use_status = 1
+            LEFT JOIN imcs_m_module_info mi on b.product_module_id = mi.id
             LEFT JOIN imcs_z_zone z on z.id = b.zone_id
         where 1=1
         ) s ${ew.customSqlSegment}

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

@@ -20,6 +20,7 @@
         <result column="expiry_date" jdbcType="INTEGER" property="expiryDate"/>
         <result column="num" jdbcType="INTEGER" property="num"/>
         <result column="join_date" jdbcType="VARCHAR" property="joinDate"/>
+        <result column="zone_id" jdbcType="BIGINT" property="zoneId"/>
         <result column="material_type" jdbcType="VARCHAR" property="materialType"/>
     </resultMap>
 

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

@@ -64,12 +64,12 @@ public class BBomController extends SuperController<BBomService, Long, BBom, BBo
         baseService.pageList(page, version,wrapper);
     }
 
-    @ApiOperation(value = "所有产品bom--分页列表", notes = "所有产品bom分页列表")
-    @PostMapping("/pageList")
-    public R<Map<String, Object>> pageList(@RequestBody Map<String, String> map) {
-        Map <String, Object>remap = baseService.pageList(map);
-        return success(remap);
-    }
+//    @ApiOperation(value = "所有产品bom--分页列表", notes = "所有产品bom分页列表")
+//    @PostMapping("/pageList")
+//    public R<Map<String, Object>> pageList(@RequestBody Map<String, String> map) {
+//        Map <String, Object>remap = baseService.pageList(map);
+//        return success(remap);
+//    }
 
     @ApiOperation(value = "所有产品bom--列表", notes = "所有产品bom--列表")
     @PostMapping("/bomList")

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

@@ -140,6 +140,19 @@ public class BBomPageDTO implements Serializable {
     private String partsAlias;
 
 
+    @ApiModelProperty(value = "批量代号")
+    @Length(max = 32, message = "批量代号长度不能超过32")
+    private String batchNo;
+
+
+    @ApiModelProperty(value = "是否关键件")
+    @Length(max = 4, message = "是否关键件不能超过4")
+    private String  keyFlag;
+
+
+    @ApiModelProperty(value = "是否关重件")
+    @Length(max = 4, message = "是否关重件不能超过4")
+    private String  importantFlag;
 
     @ApiModelProperty(value = "产品代号")
     @Length(max = 128, message = "产品代号长度不能超过128")

+ 2 - 1
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/dto/MToolClampSaveDTO.java

@@ -103,6 +103,7 @@ public class MToolClampSaveDTO implements Serializable {
     @ApiModelProperty(value = "生产分厂")
     private String factory;
 
-    private String zoneId;
+    @ApiModelProperty(value = "产线")
+    private Long zoneId;
 
 }

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

@@ -177,6 +177,23 @@ public class BBom extends Entity<Long> {
     @TableField("syn_flag")
     private String  synFlag;
 
+
+    /**
+     * 是否关键件
+     */
+    @ApiModelProperty(value = "是否关键件")
+    @Length(max = 4, message = "是否关键件不能超过4")
+    @TableField("key_flag")
+    private String  keyFlag;
+
+    /**
+     * 是否关键件
+     */
+    @ApiModelProperty(value = "是否关重件")
+    @Length(max = 4, message = "是否关重件不能超过4")
+    @TableField("important_flag")
+    private String  importantFlag;
+
     /**
      * 分组号
      */
@@ -201,6 +218,14 @@ public class BBom extends Entity<Long> {
     @Excel(name = "批量标准")
     private String batchStand;
 
+
+    /**
+     * 批量标准
+     */
+    @ApiModelProperty(value = "批量编号")
+    @TableField("batch_no")
+    private String batchNo;
+
 //    /**
 //     * 材料牌号
 //     */
@@ -217,6 +242,11 @@ public class BBom extends Entity<Long> {
     @TableField(exist = false)
     private String version;
 
+    @ApiModelProperty(value = "工艺版本名称")
+    @Length(max = 64, message = "工艺版本名称长度不能超过64")
+    @TableField(exist = false)
+    private String productModuleName;
+
 
     @ApiModelProperty(value = "说明")
     @TableField("remark")

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

@@ -156,7 +156,7 @@ public class MToolClamp extends Entity<Long> {
     @Builder
     public MToolClamp(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser,
                       String no, String name, String status, String model, RemoteData<String, String> category, String mapNo, int period,int expiryDate,
-                      int num, String joinDate, RemoteData<String, String> brand, String materialType,int synFlag) {
+                      int num, String joinDate, RemoteData<String, String> brand, String materialType,int synFlag, Long zoneId) {
         this.id = id;
         this.createTime = createTime;
         this.createUser = createUser;
@@ -175,6 +175,7 @@ public class MToolClamp extends Entity<Long> {
         this.materialType = materialType;
         this.num = num;
         this.synFlag = synFlag;
+        this.zoneId = zoneId;
     }
 
 }

+ 3 - 0
imcs-admin-boot/imcs-common/src/main/java/com/github/zuihou/common/constant/DictionaryKey.java

@@ -13,6 +13,9 @@ import java.util.Map;
  */
 public interface DictionaryKey {
 
+    //线边库最大库位数
+    final Integer RESOURCE_MAX_NUM = 20;
+
     //PLC
     String INTERFACETYPE_PLC = "01";
     //生产加工接口