工机具管理-库管员配置;维修班配置
This commit is contained in:
parent
891246c5a9
commit
11aef851d9
|
|
@ -148,4 +148,7 @@ public class LeaseApplyInfo implements Serializable {
|
|||
@ApiModelProperty(value = "设备数据所属组织类型")
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value="审批状态id")
|
||||
private String examineStatusId;
|
||||
|
||||
}
|
||||
|
|
@ -289,37 +289,24 @@ public class TmTaskController extends BaseController {
|
|||
LeaseApplyInfo infoAdd = new LeaseApplyInfo();
|
||||
if(list.size()<2){
|
||||
List<List<LeaseApplyDetails>> deviceByCompanyList = CollUtil.groupByField(task.getLeaseApplyDetails(), "companyId");
|
||||
String companyId="";
|
||||
for (List<LeaseApplyDetails> leaseApplyDetailsList : deviceByCompanyList) {
|
||||
companyId = leaseApplyDetailsList.get(0).getCompanyId() + "@" ;
|
||||
}
|
||||
|
||||
LeaseApplyInfo info = new LeaseApplyInfo();
|
||||
infoAdd.setTaskId(task.getTaskId().intValue());
|
||||
infoAdd.setCode(task.getLeaseApplyInfoList().get(0).getCode());
|
||||
infoAdd.setLeasePerson(task.getLeaseApplyInfoList().get(0).getLeasePerson());
|
||||
infoAdd.setPhone(task.getLeaseApplyInfoList().get(0).getPhone());
|
||||
infoAdd.setRemark(task.getLeaseApplyInfoList().get(0).getRemark());
|
||||
infoAdd.setType(task.getLeaseApplyInfoList().get(0).getType());
|
||||
|
||||
if(companyId.contains("101")){
|
||||
info.setId(101);
|
||||
info.setTaskId(task.getTaskId().intValue());
|
||||
LeaseApplyInfo bean = tmTaskService.getListSomeol(info);
|
||||
if(bean==null){
|
||||
for (List<LeaseApplyDetails> leaseApplyDetailsList : deviceByCompanyList) {
|
||||
if(leaseApplyDetailsList.get(0).getParenntId() == null ){
|
||||
if(leaseApplyDetailsList.get(0).getCompanyId()==101){
|
||||
infoAdd.setCompanyId(101);
|
||||
leaseApplyInfoService.genderLeaseCode(infoAdd);
|
||||
}
|
||||
}else if(companyId.contains("102")){
|
||||
info.setId(102);
|
||||
info.setTaskId(task.getTaskId().intValue());
|
||||
LeaseApplyInfo bean = tmTaskService.getListSomeol(info);
|
||||
if(bean==null){
|
||||
}else if(leaseApplyDetailsList.get(0).getCompanyId()==102){
|
||||
infoAdd.setCompanyId(102);
|
||||
leaseApplyInfoService.genderLeaseCode(infoAdd);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LeaseApplyInfo bean = new LeaseApplyInfo();
|
||||
bean.setTaskId(task.getTaskId().intValue());
|
||||
bean.setLeasePerson(task.getLeaseApplyInfo().getLeasePerson());
|
||||
|
|
@ -328,7 +315,6 @@ public class TmTaskController extends BaseController {
|
|||
tmTaskService.updateLeaseInfo(bean);
|
||||
|
||||
for (LeaseApplyInfo leaseApplyInfo : task.getLeaseApplyInfoList()) {
|
||||
|
||||
if (leaseApplyInfo == null || leaseApplyInfo.getId() == null) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -340,8 +326,13 @@ public class TmTaskController extends BaseController {
|
|||
// 删除后,插入新地领料任务明细
|
||||
if (StringUtils.isNotNull(leaseApplyInfo.getId())) {
|
||||
for (LeaseApplyDetails leaseApplyDetails : leaseApplyInfo.getLeaseApplyDetails()) {
|
||||
if(leaseApplyDetails.getParenntId() == null){
|
||||
leaseApplyDetails.setParenntId(infoAdd.getId());
|
||||
}else{
|
||||
leaseApplyDetails.setParenntId(leaseApplyInfo.getId()); // 设置领料任务ID
|
||||
}
|
||||
|
||||
}
|
||||
// 插入领料任务明细
|
||||
boolean addLeaseTaskDetailsResult = leaseApplyDetailsService.batchInsert(leaseApplyInfo.getLeaseApplyDetails()) > 0;
|
||||
System.out.println(addLeaseTaskDetailsResult ? "领料任务明细插入成功" : "领料任务明细插入失败");
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ public class TmTaskServiceImpl implements TmTaskService{
|
|||
if (CollUtil.isNotEmpty(record.getLeaseApplyInfoList())) {
|
||||
for (LeaseApplyInfo leaseApplyInfo : record.getLeaseApplyInfoList()) {
|
||||
if (leaseApplyInfo != null) {
|
||||
leaseApplyInfo.setExamineStatusId(record.getExamineStatusId());
|
||||
result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo);
|
||||
// 再审核领料任务详情表
|
||||
if (CollUtil.isNotEmpty(leaseApplyInfo.getLeaseApplyDetails())) {
|
||||
|
|
|
|||
|
|
@ -585,19 +585,20 @@
|
|||
lease_apply_info
|
||||
set
|
||||
<trim suffixOverrides=",">
|
||||
<if test="record.companyAuditBy != null and record.companyAuditBy != ''">
|
||||
<if test="record.examineStatusId == 30 and record.examineStatusId == '30'">
|
||||
company_audit_by = #{record.companyAuditBy},
|
||||
company_audit_time = now(),
|
||||
company_audit_remark = #{record.companyAuditRemark},
|
||||
</if>
|
||||
<if test="record.deptAuditBy != null and record.deptAuditBy != ''">
|
||||
<if test="record.examineStatusId == 31 and record.examineStatusId == '31'">
|
||||
dept_audit_by = #{record.companyAuditBy},
|
||||
dept_audit_time = now(),
|
||||
dept_audit_remark = #{record.companyAuditRemark},
|
||||
</if>
|
||||
<if test="record.directAuditBy != null and record.directAuditBy != ''">
|
||||
direct_audit_by = #{record.directAuditBy},
|
||||
direct_audit_time = now()
|
||||
<if test="record.examineStatusId == 32 and record.examineStatusId == '32'">
|
||||
direct_audit_by = #{record.companyAuditBy},
|
||||
direct_audit_time = now(),
|
||||
direct_audit_remark = #{record.companyAuditRemark},
|
||||
</if>
|
||||
</trim>
|
||||
WHERE
|
||||
|
|
|
|||
Loading…
Reference in New Issue