1机具类型以大代小、是否库存管理2领料预出库数查询修改
This commit is contained in:
parent
bed98574c4
commit
f0bf68a8cd
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,4 +149,6 @@ public interface TmTaskMapper {
|
|||
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
List<TmTask> getLeaseOutDetailRecord(TmTask record);
|
||||
}
|
||||
|
||||
LeaseApplyDetails getApplyNeedDetailsCq(LeaseApplyDetails detail);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -536,6 +536,16 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> 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<MachinePart> machineParts = new ArrayList<>();
|
||||
List<TmTask> typeIds = tmTaskMapper.getMaTypeDetails(leaseApplyDetail);
|
||||
|
|
@ -1479,4 +1489,4 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
}
|
||||
throw new Exception("推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1218,4 +1218,16 @@
|
|||
</if>
|
||||
group by lod.type_id
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@
|
|||
<result property="remark" column="remark" />
|
||||
<result property="childPhoto" column="childPhoto" />
|
||||
<result property="intelligentCode" column="intelligent_code" />
|
||||
<result property="isReplace" column="is_replace" />
|
||||
<result property="isStorage" column="is_storage" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMaTypeVo">
|
||||
|
|
@ -72,6 +74,8 @@
|
|||
<if test="remark != null">remark,</if>
|
||||
<if test="facModel != null">fac_model,</if>
|
||||
<if test="intelligentCode != null">intelligent_code,</if>
|
||||
<if test="isReplace != null">is_replace,</if>
|
||||
<if test="isStorage != null">is_storage,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="typeName != null and typeName != ''">#{typeName},</if>
|
||||
|
|
@ -103,6 +107,8 @@
|
|||
<if test="remark != null">#{remark},</if>
|
||||
<if test="facModel != null">#{facModel},</if>
|
||||
<if test="intelligentCode != null">#{intelligentCode},</if>
|
||||
<if test="isReplace != null">#{isReplace},</if>
|
||||
<if test="isStorage != null">#{isStorage},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
@ -161,6 +167,8 @@
|
|||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="facModel != null">fac_model = #{facModel},</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>
|
||||
where type_id = #{typeId}
|
||||
</update>
|
||||
|
|
@ -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 id="updateTypeNum">
|
||||
update ma_type set num = IFNULL( num, 0 ) + 1 where type_id = #{typeId}
|
||||
</update>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue