领料申请查看按钮数据展示
This commit is contained in:
parent
738706a03c
commit
242b86514e
|
|
@ -556,13 +556,25 @@ public class TmTaskController extends BaseController {
|
|||
return getDataTable(leaseAuditList);
|
||||
}
|
||||
|
||||
@Log(title = "获取领料申请-详情列表", businessType = BusinessType.QUERY)
|
||||
@Log(title = "获取领料申请-查看列表", businessType = BusinessType.QUERY)
|
||||
@GetMapping("/getLeaseApplyListAll")
|
||||
public TableDataInfo getLeaseApplyListAll(@RequestParam(value = "taskId", required = false, defaultValue = "") String taskId) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(Long.parseLong(taskId));
|
||||
task.setFlag(1);
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseApplyListAll(task);
|
||||
return getDataTable(leaseAuditList);
|
||||
}
|
||||
|
||||
@Log(title = "获取领料申请-驳回提交数据", businessType = BusinessType.QUERY)
|
||||
@GetMapping("/getLeaseApplyAuditListAll")
|
||||
public TableDataInfo getLeaseApplyAuditListAll(@RequestParam(value = "taskId", required = false, defaultValue = "") String taskId) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(Long.parseLong(taskId));
|
||||
task.setFlag(0);
|
||||
List<TmTask> leaseAuditList = tmTaskService.getLeaseApplyListAll(task);
|
||||
return getDataTable(leaseAuditList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,8 @@ public class TmTask implements Serializable {
|
|||
@ApiModelProperty(value="任务状态(数据字典)")
|
||||
private Integer taskStatus;
|
||||
|
||||
private Integer flag;
|
||||
|
||||
/**
|
||||
* 预领料合计数
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -782,6 +782,7 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
List<LeaseApplyInfo> leaseApplyInfos = new ArrayList<>();
|
||||
if (tmTask != null) {
|
||||
List<LeaseApplyInfo> leaseApplyInfoList = tmTaskMapper.getLeaseListByLeaseInfo(task);
|
||||
if (task.getFlag() == 0) {
|
||||
for (LeaseApplyInfo applyInfo : leaseApplyInfoList) {
|
||||
if ("2".equals(applyInfo.getStatus()) || "4".equals(applyInfo.getStatus()) || "6".equals(applyInfo.getStatus()) || "8".equals(applyInfo.getStatus())) {
|
||||
leaseApplyInfos.add(applyInfo);
|
||||
|
|
@ -803,6 +804,25 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
// 塞入领料任务详情的集合中
|
||||
tmTask.setLeaseApplyDetails(listLeaseDetails);
|
||||
}
|
||||
|
||||
if (task.getFlag() == 1) {
|
||||
tmTask.setLeaseApplyInfoList(leaseApplyInfoList);
|
||||
|
||||
List<LeaseApplyDetails> listLeaseDetails = new ArrayList<>();
|
||||
for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) {
|
||||
if (leaseApplyInfo != null) {
|
||||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetailsByApply(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
leaseApplyInfo.setLeaseApplyDetails(leaseApplyDetails);
|
||||
listLeaseDetails.addAll(leaseApplyDetails);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 塞入领料任务详情的集合中
|
||||
tmTask.setLeaseApplyDetails(listLeaseDetails);
|
||||
}
|
||||
}
|
||||
tmTaskList.add(tmTask);
|
||||
return tmTaskList;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue