1机具类型以大代小、是否库存管理2领料预出库数查询修改

This commit is contained in:
bonus 2025-03-04 17:25:57 +08:00
parent bed98574c4
commit f0bf68a8cd
5 changed files with 49 additions and 4 deletions

View File

@ -214,4 +214,17 @@ public class MaType extends BaseEntity {
* */ * */
@ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码") @ApiModelProperty(value = "推送智慧工程定义的门类分类机具编码")
private String intelligentCode; private String intelligentCode;
/*
* 是否以大代小
* */
@ApiModelProperty(value = "是否以大代小1是可以")
private String isReplace;
/*
* 是否库存管理
* */
@ApiModelProperty(value = "是否库存管理1是库存管理")
private String isStorage;
} }

View File

@ -149,4 +149,6 @@ public interface TmTaskMapper {
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo); int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
List<TmTask> getLeaseOutDetailRecord(TmTask record); List<TmTask> getLeaseOutDetailRecord(TmTask record);
LeaseApplyDetails getApplyNeedDetailsCq(LeaseApplyDetails detail);
} }

View File

@ -536,6 +536,16 @@ public class TmTaskServiceImpl implements TmTaskService {
// 去查询领料任务详情表 // 去查询领料任务详情表
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsCq(leaseApplyInfo); List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsCq(leaseApplyInfo);
if (leaseApplyDetails.size() > 0) { if (leaseApplyDetails.size() > 0) {
//查询同规格下预出库量
if(leaseApplyDetails != null){
for (LeaseApplyDetails detail : leaseApplyDetails) {
LeaseApplyDetails needDetails = tmTaskMapper.getApplyNeedDetailsCq(detail);
detail.setOutNum(needDetails.getOutNum());
}
}
/* for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) { /* for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
List<MachinePart> machineParts = new ArrayList<>(); List<MachinePart> machineParts = new ArrayList<>();
List<TmTask> typeIds = tmTaskMapper.getMaTypeDetails(leaseApplyDetail); List<TmTask> typeIds = tmTaskMapper.getMaTypeDetails(leaseApplyDetail);

View File

@ -1218,4 +1218,16 @@
</if> </if>
group by lod.type_id group by lod.type_id
</select> </select>
<select id="getApplyNeedDetailsCq" resultType="com.bonus.sgzb.app.domain.LeaseApplyDetails">
SELECT
lad.type_id as typeId,
SUM(lad.pre_num) -SUM(lad.al_num) as outNum
FROM
lease_apply_details lad
where lad.type_id = #{typeId}
GROUP BY lad.type_id
</select>
</mapper> </mapper>

View File

@ -34,6 +34,8 @@
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="childPhoto" column="childPhoto" /> <result property="childPhoto" column="childPhoto" />
<result property="intelligentCode" column="intelligent_code" /> <result property="intelligentCode" column="intelligent_code" />
<result property="isReplace" column="is_replace" />
<result property="isStorage" column="is_storage" />
</resultMap> </resultMap>
<sql id="selectMaTypeVo"> <sql id="selectMaTypeVo">
@ -72,6 +74,8 @@
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="facModel != null">fac_model,</if> <if test="facModel != null">fac_model,</if>
<if test="intelligentCode != null">intelligent_code,</if> <if test="intelligentCode != null">intelligent_code,</if>
<if test="isReplace != null">is_replace,</if>
<if test="isStorage != null">is_storage,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="typeName != null and typeName != ''">#{typeName},</if> <if test="typeName != null and typeName != ''">#{typeName},</if>
@ -103,6 +107,8 @@
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="facModel != null">#{facModel},</if> <if test="facModel != null">#{facModel},</if>
<if test="intelligentCode != null">#{intelligentCode},</if> <if test="intelligentCode != null">#{intelligentCode},</if>
<if test="isReplace != null">#{isReplace},</if>
<if test="isStorage != null">#{isStorage},</if>
</trim> </trim>
</insert> </insert>
@ -161,6 +167,8 @@
<if test="companyId != null">company_id = #{companyId},</if> <if test="companyId != null">company_id = #{companyId},</if>
<if test="facModel != null">fac_model = #{facModel},</if> <if test="facModel != null">fac_model = #{facModel},</if>
<if test="intelligentCode != null">intelligent_code = #{intelligentCode},</if> <if test="intelligentCode != null">intelligent_code = #{intelligentCode},</if>
<if test="isReplace != null">is_replace = #{isReplace},</if>
<if test="isStoage != null">is_storage = #{isStorage},</if>
</trim> </trim>
where type_id = #{typeId} where type_id = #{typeId}
</update> </update>
@ -291,7 +299,7 @@
mtf2.file_name documentName, mtf2.file_url documentUrl, mtk.user_id keeperUserId, 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, 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.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 from ma_type m
left join ma_prop_set mps on m.type_id = mps.type_id 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 left join ma_prop_info mpi on mps.prop_id = mpi.prop_id