diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java index 3dc0e83..fd9187b 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java @@ -214,4 +214,17 @@ public class MaType extends BaseEntity { * */ @ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码") private String intelligentCode; + + /* + * 是否以大代小 + * */ + @ApiModelProperty(value = "是否以大代小1是可以") + private String isReplace; + + /* + * 是否库存管理 + * */ + @ApiModelProperty(value = "是否库存管理1是库存管理") + private String isStorage; + } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java index 9641055..90f01f8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/mapper/TmTaskMapper.java @@ -149,4 +149,6 @@ public interface TmTaskMapper { int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo); List getLeaseOutDetailRecord(TmTask record); -} \ No newline at end of file + + LeaseApplyDetails getApplyNeedDetailsCq(LeaseApplyDetails detail); +} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 0a68d50..c6af152 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -536,6 +536,16 @@ public class TmTaskServiceImpl implements TmTaskService { // 去查询领料任务详情表 List leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsCq(leaseApplyInfo); if (leaseApplyDetails.size() > 0) { + //查询同规格下预出库量 + if(leaseApplyDetails != null){ + for (LeaseApplyDetails detail : leaseApplyDetails) { + + LeaseApplyDetails needDetails = tmTaskMapper.getApplyNeedDetailsCq(detail); + detail.setOutNum(needDetails.getOutNum()); + } + } + + /* for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) { List machineParts = new ArrayList<>(); List typeIds = tmTaskMapper.getMaTypeDetails(leaseApplyDetail); @@ -1479,4 +1489,4 @@ public class TmTaskServiceImpl implements TmTaskService { } throw new Exception("推送失败"); } -} \ No newline at end of file +} diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml index 1acd41e..cf31d7b 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml @@ -1218,4 +1218,16 @@ group by lod.type_id + + diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/base/MaMachineTypeMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/base/MaMachineTypeMapper.xml index 9dc5ca4..c3af71d 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/base/MaMachineTypeMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/base/MaMachineTypeMapper.xml @@ -34,6 +34,8 @@ + + @@ -72,6 +74,8 @@ remark, fac_model, intelligent_code, + is_replace, + is_storage, #{typeName}, @@ -103,6 +107,8 @@ #{remark}, #{facModel}, #{intelligentCode}, + #{isReplace}, + #{isStorage}, @@ -161,6 +167,8 @@ company_id = #{companyId}, fac_model = #{facModel}, intelligent_code = #{intelligentCode}, + is_replace = #{isReplace}, + is_storage = #{isStorage}, where type_id = #{typeId} @@ -291,7 +299,7 @@ mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, su.nick_name keeperUserName, mtr.user_id repairUserId, su1.nick_name repairUserName,mpi.prop_id as propId, mpi.prop_name as propName, m.del_flag, m.create_by, m.create_time, - m.remark, m.company_id,m.fac_model as facModel,m.intelligent_code + m.remark, m.company_id,m.fac_model as facModel,m.intelligent_code,m.is_replace,m.is_storage from ma_type m left join ma_prop_set mps on m.type_id = mps.type_id left join ma_prop_info mpi on mps.prop_id = mpi.prop_id @@ -453,4 +461,4 @@ update ma_type set num = IFNULL( num, 0 ) + 1 where type_id = #{typeId} - \ No newline at end of file +