获取领料申请-详情列表

This commit is contained in:
sliang 2023-12-22 20:17:22 +08:00
parent 1666636cab
commit 621fe5a27a
3 changed files with 26 additions and 17 deletions

View File

@ -80,5 +80,7 @@ public interface TmTaskMapper {
TmTask getLeaseListTmTask(TmTask task); TmTask getLeaseListTmTask(TmTask task);
LeaseApplyInfo getLeaseListByLeaseInfo(TmTask task); List<LeaseApplyInfo> getLeaseListByLeaseInfo(TmTask task);
// LeaseApplyInfo getLeaseListByLeaseInfo(TmTask task);
} }

View File

@ -225,11 +225,17 @@ public class TmTaskServiceImpl implements TmTaskService{
List<TmTask> tmTaskList = new ArrayList<>(); List<TmTask> tmTaskList = new ArrayList<>();
TmTask tmTask = tmTaskMapper.getLeaseListTmTask(task); TmTask tmTask = tmTaskMapper.getLeaseListTmTask(task);
if(tmTask != null){ if(tmTask != null){
LeaseApplyInfo leaseApplyInfo = tmTaskMapper.getLeaseListByLeaseInfo(task); List<LeaseApplyInfo> leaseApplyInfoList = tmTaskMapper.getLeaseListByLeaseInfo(task);
tmTask.setLeaseApplyInfo(leaseApplyInfo); tmTask.setLeaseApplyInfoList(leaseApplyInfoList);
if(leaseApplyInfo !=null){ for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo); if (leaseApplyInfo != null) {
tmTask.setLeaseApplyDetails(leaseApplyDetails); // 去查询领料任务详情表
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
// 塞入领料任务详情的集合中
tmTask.setLeaseApplyDetails(leaseApplyDetails);
}
}
} }
} }
tmTaskList.add(tmTask); tmTaskList.add(tmTask);

View File

@ -32,12 +32,12 @@
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType} select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
</select> </select>
<update id="deleteTaskByPrimaryKey" parameterType="java.lang.Long"> <update id="deleteTaskByPrimaryKey" >
update tm_task set `status` = '0' update tm_task set `status` = '0'
where task_id = #{taskId,jdbcType=BIGINT} where task_id = #{taskId}
</update> </update>
<update id="deleteTaskInfoByTaskId" parameterType="java.lang.Long"> <update id="deleteTaskInfoByTaskId" >
update lease_apply_info set `status` = '0' update lease_apply_info set `status` = '0'
where task_id = #{taskId} where task_id = #{taskId}
</update> </update>
@ -541,14 +541,15 @@
WHERE tt.task_id = #{taskId} WHERE tt.task_id = #{taskId}
</select> </select>
<select id="getLeaseListByLeaseInfo" resultType="com.bonus.sgzb.base.api.domain.LeaseApplyInfo"> <select id="getLeaseListByLeaseInfo" resultType="com.bonus.sgzb.base.api.domain.LeaseApplyInfo">
SELECT SELECT
lai.* lai.*
FROM FROM
lease_apply_info lai lease_apply_info lai
WHERE WHERE
lai.task_id = #{taskId} lai.task_id = #{taskId}
</select> </select>
<update id="updateTmTaskAuditStatus"> <update id="updateTmTaskAuditStatus">
UPDATE tm_task SET task_status = #{record.taskStatus} WHERE task_id = #{record.taskId} UPDATE tm_task SET task_status = #{record.taskStatus} WHERE task_id = #{record.taskId}