出库单问题修复

This commit is contained in:
hongchao 2025-08-25 15:37:47 +08:00
parent f371afe246
commit 63db53eda8
4 changed files with 11 additions and 8 deletions

View File

@ -118,7 +118,7 @@ public interface LeaseOutDetailsMapper {
int updateOutTimeDetails(TmTask bean);
TmTask getSlt(TmTask bean);
List<TmTask> getSlt(TmTask bean);
int updateOutTimeSlt(TmTask bean);

View File

@ -253,9 +253,11 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
}
List<TmTask> sltList = new ArrayList<>();
for(TmTask tmTask : detailList){
TmTask sltDetail = leaseOutDetailsMapper.getSlt(tmTask);
if(sltDetail != null){
sltList.add(sltDetail);
List<TmTask> sltDetailList = leaseOutDetailsMapper.getSlt(tmTask);
if(!sltDetailList.isEmpty()){
for(TmTask tmTaskThree : sltDetailList){
sltList.add(tmTaskThree);
}
}
}
if(!sltList.isEmpty()){

View File

@ -120,14 +120,14 @@
mt.type_id as deviceTypeId,
mt2.type_name AS typeName,
mt.type_name AS deviceType,
lad.sets_num as setsNum,
#{outNum} as setsNum,
CASE mt.manage_type
WHEN 0 THEN
IFNULL(subquery0.num, 0)
ELSE
IFNULL(mt.num, 0)
END as num,
case when lad.update_num IS NOT NULL then lad.update_num else lad.pre_num * lad.sets_num end as applyNum,
case when lad.update_num IS NOT NULL then (lad.update_num / lad.sets_num) * #{outNum} else (lad.pre_num / lad.sets_num) * #{outNum} end as applyNum,
mt.is_storage AS isStorage
from lease_apply_details lad
left join ma_type mt on lad.type_id = mt.type_id

View File

@ -780,12 +780,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getSltCtList" resultType="com.bonus.sgzb.material.domain.LeaseInfo">
select
sai.id as id,
sai.num as num,
sum(sai.num) as num,
sai.lease_id as leaseId,
sai.type_id as typeId,
sai.agreement_id as agreementId
from slt_agreement_info sai
where sai.agreement_id = #{agreementId} and sai.type_id = #{id}
group by sai.lease_id
</select>
<select id="getWholeName" resultType="java.lang.String">
@ -805,7 +806,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
lad.parennt_id as parentId,
lad.type_id as typeId,
case
when lad.update_num is not null then lad.update_num else lad.pre_num end as num,
when lad.update_num is not null then (lad.update_num / lad.sets_num) * #{num} else (lad.pre_num / lad.sets_num) * #{num} end as num,
lad.ct_parent_id as ctParentId,
mt2.type_name AS typeName,
mt.type_name AS typeModelName,