diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processbom/ProcessBomDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processbom/ProcessBomDetailDO.java index 79048fc..0c85f0c 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processbom/ProcessBomDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processbom/ProcessBomDetailDO.java @@ -146,4 +146,6 @@ public class ProcessBomDetailDO extends BaseDO { private String sortAttr; @TableField(exist = false) private String matType; + @TableField(exist = false) + private BigDecimal price; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processbom/ProcessBomDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processbom/ProcessBomDetailMapper.java index b09deaf..7c64fcf 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processbom/ProcessBomDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processbom/ProcessBomDetailMapper.java @@ -48,9 +48,10 @@ public interface ProcessBomDetailMapper extends BaseMapperX // .eq(ProcessBomDetailDO::getBomId,bomId); // return selectJoinList(ProcessBomDetailDO.class, query); // } - @Select("SELECT p.*, IFNULL(SUM(s.storage_ok_qty), 0) AS storage_ok_qty " + + @Select("SELECT p.*, IFNULL(SUM(s.storage_ok_qty), 0) AS storage_ok_qty,COALESCE(m.price, 0) as price " + "FROM pro_process_bom_detail p " + "LEFT JOIN v_storage_material_now s ON p.material_id = s.id " + + "LEFT JOIN base_material m ON s.id=m.id "+ "WHERE p.bom_id = #{bomId} and p.material_id is not null AND p.deleted IN (0, 1) " + "GROUP BY p.material_code") List selectStandardListByBomId(@Param("bomId") Long bomId); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java index 9e25312..f0eca00 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java @@ -53,7 +53,7 @@ public interface StorageLogNowMapper extends BaseMapperX { MPJLambdaWrapper query = new MPJLambdaWrapper<>(); query.selectAll(StorageLogNowDO.class) - .select("a.material_type as materialTypeId","a.unit as matUnitId") + .select("a.material_type as materialTypeId","a.unit as matUnitId","COALESCE(a.price, 0) as price") .leftJoin(MaterialDO.class,"a",MaterialDO::getId,StorageLogNowDO::getId) .orderByDesc(StorageLogNowDO::getId); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java index 8972877..d0d6cd0 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java @@ -349,7 +349,6 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //去重查询,重复则不加 List selecteqint = bdgzsomthingMapper.selecteqint(BdgzsomthingDO); - System.out.println("生产任务单"+BdgzsomthingDO); if(selecteqint.size()>0){ }else{ diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/processbom/ProcessBomDetailMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/processbom/ProcessBomDetailMapper.xml index a8e4b1d..528ca85 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/processbom/ProcessBomDetailMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/processbom/ProcessBomDetailMapper.xml @@ -35,7 +35,8 @@ t.updater, t.deleted, g.material_type AS materialTypeId, - g.unit AS matUnitId + g.unit AS matUnitId, + COALESCE(g.price, 0) AS price FROM v_storage_material_now t diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/plantask/edit.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/plantask/edit.vue index d5e9722..bd47c6d 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/plantask/edit.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/plantask/edit.vue @@ -144,7 +144,8 @@ - + +