This commit is contained in:
parent
fc3ebb9089
commit
0705f0ceb1
|
|
@ -191,6 +191,16 @@ public class TmTaskController extends BaseController {
|
|||
if (StringUtils.isNull(task)) {
|
||||
return AjaxResult.error("参数错误");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(task.getLeaseApplyDetails())) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : task.getLeaseApplyDetails()) {
|
||||
if (leaseApplyDetail.getPreNum() != null && leaseApplyDetail.getNum() != null) {
|
||||
if (leaseApplyDetail.getPreNum() > leaseApplyDetail.getNum()) {
|
||||
return AjaxResult.error(leaseApplyDetail.getTypeCn() + leaseApplyDetail.getGuigeCn()
|
||||
+ "的预领数量不能大于库存数量:" + leaseApplyDetail.getNum());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(task.getLeaseApplyInfo().getPhone())) {
|
||||
String phone = task.getLeaseApplyInfo().getPhone();
|
||||
if (!PhoneUtil.isMobile(phone)) {
|
||||
|
|
|
|||
|
|
@ -185,4 +185,14 @@ public class LeaseApplyDetails implements Serializable {
|
|||
@ApiModelProperty(value="预领数量-已领数量的差值")
|
||||
private Double nums;
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 设备工程在用量
|
||||
*/
|
||||
@ApiModelProperty(value = "设备工程在用量")
|
||||
private Double usNum;
|
||||
|
||||
private String guigeCn;
|
||||
|
||||
private String typeCn;
|
||||
}
|
||||
|
|
@ -139,7 +139,7 @@ public interface TmTaskMapper {
|
|||
|
||||
int updateLeaseApplyInfoAuditInfoCq(@Param("record") LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
int getDeptId(String createBy);
|
||||
Integer getDeptId(String createBy);
|
||||
|
||||
List<TmTask> getLeaseOutListByjjbz(TmTask task);
|
||||
List<TmTask> getLeaseOutListByts(TmTask task);
|
||||
|
|
|
|||
|
|
@ -3,12 +3,9 @@ package com.bonus.sgzb.app.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyInfo;
|
||||
import com.bonus.sgzb.app.mapper.*;
|
||||
import com.bonus.sgzb.base.api.domain.*;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyInfoMapper;
|
||||
import com.bonus.sgzb.app.mapper.LeaseOutDetailsMapper;
|
||||
import com.bonus.sgzb.app.mapper.TmTaskMapper;
|
||||
import com.bonus.sgzb.app.service.*;
|
||||
import com.bonus.sgzb.common.core.constant.Constants;
|
||||
import com.bonus.sgzb.common.core.domain.R;
|
||||
|
|
@ -84,6 +81,9 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
@Resource
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Resource
|
||||
private BackReceiveMapper backReceiveMapper;
|
||||
|
||||
private final static String STRING_ADMIN = "admin";
|
||||
private final static String STRING_JJFGS = "jjfgs";
|
||||
private final static String STRING_TSFGS = "tsfgs";
|
||||
|
|
@ -906,7 +906,10 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
if (collect.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
int deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy());
|
||||
Integer deptId1 = tmTaskMapper.getDeptId(collect.get(0).getCreateBy());
|
||||
if (deptId1 == null) {
|
||||
continue;
|
||||
}
|
||||
List<LeaseApplyInfo> filteredList = filterLeaseApplyInfoList(roles, deptId, deptId1, collect);
|
||||
processLeaseApplyInfoList(tmTaskMapper, tmTask, filteredList, deptId1, collect.get(0).getRemark());
|
||||
}
|
||||
|
|
@ -1593,6 +1596,14 @@ public class TmTaskServiceImpl implements TmTaskService {
|
|||
// 去查询领料任务详情表
|
||||
List<LeaseApplyDetails> leaseApplyDetails = tmTaskMapper.getLeaseApplyDetails(leaseApplyInfo);
|
||||
if (leaseApplyDetails != null && !leaseApplyDetails.isEmpty()) {
|
||||
for (LeaseApplyDetails leaseApply : leaseApplyDetails) {
|
||||
BackApplyInfo applyInfo = new BackApplyInfo();
|
||||
applyInfo.setLotId(tmTask.getProId().toString());
|
||||
applyInfo.setTypeName(leaseApply.getTypeName());
|
||||
applyInfo.setTypeCode(leaseApply.getTypeModelName());
|
||||
BackApplyInfo info = backReceiveMapper.getProAndTypeNum(applyInfo);
|
||||
leaseApply.setUsNum(info != null ? info.getUsNum() : 0.0);
|
||||
}
|
||||
listLeaseDetails.addAll(leaseApplyDetails);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue