laoyao 4 سال پیش
والد
کامیت
d2a3deecdf

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/dao/BBomMapper.java

@@ -23,6 +23,6 @@ import org.springframework.stereotype.Repository;
 public interface BBomMapper extends SuperMapper<BBom> {
 public interface BBomMapper extends SuperMapper<BBom> {
 
 
 
 
-    IPage<BBom> pageList(IPage page, @Param(Constants.WRAPPER) Wrapper<BBom> queryWrapper);
+    IPage<BBom> pageList(IPage page,@Param("version")String version, @Param(Constants.WRAPPER) Wrapper<BBom> queryWrapper);
 
 
 }
 }

+ 1 - 1
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/BBomService.java

@@ -19,7 +19,7 @@ import java.util.Map;
 public interface BBomService extends SuperService<BBom> {
 public interface BBomService extends SuperService<BBom> {
 
 
 
 
-    IPage<BBom> pageList(IPage page, LbqWrapper<BBom> wrapper);
+    IPage<BBom> pageList(IPage page,String version, LbqWrapper<BBom> wrapper);
 
 
     /**
     /**
      * 分页
      * 分页

+ 2 - 2
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/BBomServiceImpl.java

@@ -50,8 +50,8 @@ public class BBomServiceImpl extends SuperServiceImpl<BBomMapper, BBom> implemen
     private CustMapper custMapper;
     private CustMapper custMapper;
 
 
     @Override
     @Override
-    public IPage<BBom> pageList(IPage page, LbqWrapper<BBom> wrapper) {
-        return baseMapper.pageList(page, wrapper);
+    public IPage<BBom> pageList(IPage page, String version,LbqWrapper<BBom> wrapper) {
+        return baseMapper.pageList(page,version, wrapper);
     }
     }
 
 
     @Override
     @Override

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

@@ -25,8 +25,8 @@
 
 
     <!-- 通用查询结果列 -->
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
     <sql id="Base_Column_List">
-        id,create_time,create_user,update_time,update_user,parts_no,parts_alias,bom_alias,materialBrandName
-        audit_status, parent_id, name, no, status, model, brand, specification, module_id
+        id,create_time,create_user,update_time,update_user,parts_no,parts_alias,bom_alias
+        audit_status, parent_id, name, no, status, model, brand, specification, module_id,materialBrandName,version
     </sql>
     </sql>
 
 
 
 
@@ -34,10 +34,11 @@
     <select id="pageList" parameterType="String" resultMap="BaseResultMap">
     <select id="pageList" parameterType="String" resultMap="BaseResultMap">
         select
         select
         <include refid="Base_Column_List"/>
         <include refid="Base_Column_List"/>
-        from (select b.*,m.brand materialBrandName from imcs_b_bom b LEFT JOIN imcs_m_tool_meterial m on b.meterial_id = m.id
+        from (select b.*,m.brand materialBrandName
+            ,bi.version
+        from imcs_b_bom b LEFT JOIN imcs_m_tool_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
         where 1=1
         where 1=1
-
-
         ) s ${ew.customSqlSegment}
         ) s ${ew.customSqlSegment}
 
 
     </select>
     </select>

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

@@ -60,7 +60,8 @@ public class BBomController extends SuperController<BBomService, Long, BBom, BBo
         wrapper.like(BBom::getName, bom.getName()).like(BBom::getBomAlias, bom.getBomAlias()).like(BBom::getPartsNo, bom.getPartsNo())
         wrapper.like(BBom::getName, bom.getName()).like(BBom::getBomAlias, bom.getBomAlias()).like(BBom::getPartsNo, bom.getPartsNo())
                 .like(BBom::getPartsAlias, bom.getPartsAlias())
                 .like(BBom::getPartsAlias, bom.getPartsAlias())
                 .eq(BBom::getStatus, bom.getStatus()).eq(BBom::getAuditStatus, bom.getAuditStatus());
                 .eq(BBom::getStatus, bom.getStatus()).eq(BBom::getAuditStatus, bom.getAuditStatus());
-        baseService.pageList(page, wrapper);
+        String version = data.getVersion();
+        baseService.pageList(page, version,wrapper);
     }
     }
 
 
     @ApiOperation(value = "所有产品bom--分页列表", notes = "所有产品bom分页列表")
     @ApiOperation(value = "所有产品bom--分页列表", notes = "所有产品bom分页列表")

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

@@ -147,4 +147,8 @@ public class BBomPageDTO implements Serializable {
     private String bomAlias;
     private String bomAlias;
 
 
 
 
+    @ApiModelProperty(value = "版本")
+    private String version;
+
+
 }
 }

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

@@ -213,6 +213,12 @@ public class BBom extends Entity<Long> {
     private Long materialBrandName;
     private Long materialBrandName;
 
 
 
 
+    @ApiModelProperty(value = "版本号")
+    @TableField(exist = false)
+    private String version;
+
+
+
     @Builder
     @Builder
     public BBom(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, 
     public BBom(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, 
                     String auditStatus, Long parentId, String name, String no, String status, 
                     String auditStatus, Long parentId, String name, String no, String status,