This commit is contained in:
parent
0f582a0d68
commit
dc63eb8bf1
|
|
@ -11,6 +11,7 @@ import com.bonus.common.core.exception.ServiceException;
|
|||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.mapper.BmAgreementInfoMapper;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper;
|
||||
|
|
@ -289,6 +290,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
|
|||
}
|
||||
if (res > 0) {
|
||||
// 插入领料出库明细表(lease_out_details)
|
||||
record.setCreateBy(SecurityUtils.getUsername());
|
||||
res = leaseOutDetailsMapper.insertLeaseOutDetails(record);
|
||||
if (res > 0) {
|
||||
// 普通机具减少 (ma_type 设备规格表)的库存数量
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
//插入任务表
|
||||
Long newTaskId = insertTt();
|
||||
Long newTaskId = insertTt(rePairDto.getTaskId());
|
||||
result += insertTta(newTaskId, repairInputDetails1);
|
||||
for (RepairInputInfo repairInputInfo : list) {
|
||||
if (repairInputInfo.getStatus().equals(RepairInputStatusEnum.Input_TASK_IN_FINISHED.getStatus().toString())
|
||||
|
|
@ -322,7 +322,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
private int processCodeTypeReject(RepairInputDetails repairInputDetails) {
|
||||
int result = 0;
|
||||
//插入任务表
|
||||
Long newTaskId = insertTt();
|
||||
Long newTaskId = insertTt(repairInputDetails.getTaskId());
|
||||
result += insertTta(newTaskId, repairInputDetails);
|
||||
for (RepairInputDetails inputDetails : repairInputDetails.getMaCodeList()) {
|
||||
inputDetails.setStatus(RepairInputStatusEnum.Input_TASK_TO_REJECT.getStatus().toString());
|
||||
|
|
@ -359,7 +359,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
repairInputInfo.setTypeId(repairInputDetails.getTypeId());
|
||||
repairInputInfo.setInputNum(repairInputDetails.getInputNum());
|
||||
repairInputDetailsMapper.updateNum(repairInputInfo);
|
||||
Long newTaskId = insertTt();
|
||||
Long newTaskId = insertTt(repairInputDetails.getTaskId());
|
||||
result += insertTta(newTaskId, repairInputDetails);
|
||||
result += insertWxTask(newTaskId, repairInputDetails);
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
* 驳回后重新生成维修单 插入任务表
|
||||
* @return
|
||||
*/
|
||||
private Long insertTt() {
|
||||
private Long insertTt(Long preTaskId) {
|
||||
Long newTask = null;
|
||||
int thisMonthMaxOrder = taskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId());
|
||||
// 生成维修单号
|
||||
|
|
@ -406,6 +406,7 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
|||
null,thisMonthMaxOrder + 1, code);
|
||||
tmTask.setCreateTime(DateUtils.getNowDate());
|
||||
tmTask.setCreateBy(SecurityUtils.getUsername());
|
||||
tmTask.setPreTaskId(preTaskId);
|
||||
// 插入任务
|
||||
int taskId = taskMapper.insertTmTask(tmTask);
|
||||
// 如果插入成功且返回的 taskId 大于 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue