Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
11b34a6424
|
|
@ -36,6 +36,7 @@ import com.bonus.material.lease.mapper.LeaseTaskMapper;
|
||||||
import com.bonus.material.lease.service.ILeaseTaskService;
|
import com.bonus.material.lease.service.ILeaseTaskService;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||||
|
import com.bonus.material.ma.service.ITypeService;
|
||||||
import com.bonus.material.task.domain.TmTask;
|
import com.bonus.material.task.domain.TmTask;
|
||||||
import com.bonus.material.task.domain.TmTaskAgreement;
|
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||||
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
||||||
|
|
@ -111,6 +112,9 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
@Resource
|
@Resource
|
||||||
private BmTeamMapper bmTeamMapper;
|
private BmTeamMapper bmTeamMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITypeService typeService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增领用任务
|
* 新增领用任务
|
||||||
|
|
@ -1182,6 +1186,10 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
try {
|
try {
|
||||||
//1、查询整个单子是否已完成,根据taskId
|
//1、查询整个单子是否已完成,根据taskId
|
||||||
TmTask tmTask = tmTaskMapper.selectStatusByTaskId(leaseApplyDetails.getTaskId());
|
TmTask tmTask = tmTaskMapper.selectStatusByTaskId(leaseApplyDetails.getTaskId());
|
||||||
|
Type type = new Type();
|
||||||
|
type.setModelTitle("领料出库驳回");
|
||||||
|
type.setCode(tmTask.getCode());
|
||||||
|
type.setStyle("6");
|
||||||
if (tmTask.getTaskStatus() == 4) {
|
if (tmTask.getTaskStatus() == 4) {
|
||||||
return AjaxResult.error("该领料任务已出库完成,不可退回");
|
return AjaxResult.error("该领料任务已出库完成,不可退回");
|
||||||
}
|
}
|
||||||
|
|
@ -1194,6 +1202,10 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new ServiceException("设备状态修改失败,请联系管理员");
|
throw new ServiceException("设备状态修改失败,请联系管理员");
|
||||||
}
|
}
|
||||||
|
type.setTypeId(Long.parseLong(maCodeVo.getTypeId()));
|
||||||
|
type.setMaId(maCodeVo.getMaId());
|
||||||
|
type.setInputNum(BigDecimal.ONE);
|
||||||
|
typeService.updateNumAddOrSubtract(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断是领用任务还是领料任务,根据newType
|
//判断是领用任务还是领料任务,根据newType
|
||||||
|
|
@ -1213,10 +1225,17 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
bean1.setTypeId(leaseApplyDetails.getTypeId());
|
bean1.setTypeId(leaseApplyDetails.getTypeId());
|
||||||
bean1.setAlNum(leaseApplyDetails.getAlNum());
|
bean1.setAlNum(leaseApplyDetails.getAlNum());
|
||||||
}
|
}
|
||||||
int res = mapper.updateInventory(bean1);
|
if (CollectionUtils.isEmpty(leaseApplyDetails.getMaCodeVoList())) {
|
||||||
|
// 数量设备库存修改
|
||||||
|
type.setTypeId(bean1.getTypeId());
|
||||||
|
type.setInputNum(bean1.getAlNum());
|
||||||
|
typeService.updateNumAddOrSubtract(type);
|
||||||
|
/*int res = mapper.updateInventory(bean1);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new ServiceException("库存修改失败,请联系管理员");
|
throw new ServiceException("库存修改失败,请联系管理员");
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
int res = 0;
|
||||||
// 3、修改任务状态(tm_task)
|
// 3、修改任务状态(tm_task)
|
||||||
if (leaseApplyDetails.getTaskId()!= null) {
|
if (leaseApplyDetails.getTaskId()!= null) {
|
||||||
LeaseOutDetails leaseOutDetails = new LeaseOutDetails();
|
LeaseOutDetails leaseOutDetails = new LeaseOutDetails();
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStatusByTaskId" resultType="com.bonus.material.task.domain.TmTask">
|
<select id="selectStatusByTaskId" resultType="com.bonus.material.task.domain.TmTask">
|
||||||
SELECT
|
SELECT
|
||||||
task_status as taskStatus
|
task_status as taskStatus,
|
||||||
|
code as code
|
||||||
FROM
|
FROM
|
||||||
tm_task
|
tm_task
|
||||||
WHERE
|
WHERE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue