yaoyq 3 anni fa
parent
commit
3613586941

+ 3 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/WorkpieceServiceImpl.java

@@ -126,6 +126,7 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
         BaseContextHandler.setTenant("0000");
         Map map = new HashMap();
         map.put("fullFlag","1");
+        map.put("goodsName","1");
         List<ProductionresourcePosition> list = productionresourcePositionMapper.getPPList(map);
         Map<String, List<ProductionresourcePosition>> pointMap = list.stream().collect(groupingBy(ProductionresourcePosition::getPointId));
 
@@ -138,11 +139,13 @@ public class WorkpieceServiceImpl extends SuperServiceImpl<WorkpieceMapper, TWor
             }
             ProductionresourcePosition position0 = subList.get(0);
             returnMap.put("pointId",key);
+            returnMap.put("name",position0.getName());
             returnMap.put("lockStatus",position0.getLockStatus());
             List<Map>l = new ArrayList<>();
             for(ProductionresourcePosition p:subList){
                 if(p.getGoodsId()!=null){
                     Map m = new HashMap();
+                    m.put("goodsName",p.getGoodsName());
                     m.put("goodsId",p.getGoodsId());
                     m.put("category",p.getCategory());
                     l.add(m);

+ 7 - 1
imcs-admin-boot/imcs-business-biz/src/main/resources/mapper_business/base/productionResourceCenter/ProductionresourcePositionMapper.xml

@@ -44,11 +44,17 @@
     <select id="getPPList" resultType="com.github.zuihou.business.productionResourceCenter.entity.ProductionresourcePosition" parameterType="map">
         SELECT
         p.*,r.code,s.lock_status lockStatus,i.goods_id goodsId,i.goods_type category,i.complete_batch_no completeBatchNo,s.complete_batch_no campCompleteBatchNo,i.unique_code uniqueCode
-        FROM
+        <if test="goodsName != null and goodsName != ''">
+            ,b.name goodsName
+        </if>
+       FROM
         imcs_p_productionresource_position p
         LEFT JOIN imcs_s_storge s on p.storge_id = s.id
         LEFT JOIN imcs_s_stock_info i ON p.storge_id = i.storge_id
         INNER JOIN imcs_tenant_productionresource r ON p.resource_id = r.id
+        <if test="goodsName != null and goodsName != ''">
+            left join view_stock_goods b on i.spec_id = b.specId
+        </if>
         where 1=1
         <if test="haveGoods != null and haveGoods != ''">
             and i.storge_id is not null

+ 7 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionResourceCenter/entity/ProductionresourcePosition.java

@@ -229,6 +229,13 @@ public class ProductionresourcePosition extends Entity<Long> {
 
 
 
+    @ApiModelProperty(value = "物品名称")
+    @TableField(exist = false)
+    @Excel(name = "物品名称")
+    private String goodsName;
+
+
+
 
 
     @Builder