Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bb41e8db9d
|
|
@ -1240,15 +1240,15 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
if (leaseApplyDetails.getMaCodeVoList()!=null){
|
if (leaseApplyDetails.getMaCodeVoList()!=null){
|
||||||
//编码
|
//编码
|
||||||
for (MaCodeVo maCodeVo : leaseApplyDetails.getMaCodeVoList()) {
|
for (MaCodeVo maCodeVo : leaseApplyDetails.getMaCodeVoList()) {
|
||||||
|
type.setTypeId(Long.parseLong(maCodeVo.getTypeId()));
|
||||||
|
type.setMaId(maCodeVo.getMaId());
|
||||||
|
type.setInputNum(BigDecimal.ONE);
|
||||||
|
typeService.updateNumAddOrSubtract(type);
|
||||||
//更改设备状态为在库
|
//更改设备状态为在库
|
||||||
int res = mapper.updateMaStatus(maCodeVo);
|
int res = mapper.updateMaStatus(maCodeVo);
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -174,15 +174,6 @@ public class WarehousingServiceImpl implements WarehousingService {
|
||||||
}
|
}
|
||||||
for (int i = 0; i < dto.getMachIneDtoList().size(); i++) {
|
for (int i = 0; i < dto.getMachIneDtoList().size(); i++) {
|
||||||
MachIneDto machIneDto = dto.getMachIneDtoList().get(i);
|
MachIneDto machIneDto = dto.getMachIneDtoList().get(i);
|
||||||
machIneDto.setCode(code);
|
|
||||||
machIneDto.setIsCode(dto.getIsCode());
|
|
||||||
machIneDto.setTypeId(dto.getTypeId());
|
|
||||||
machIneDto.setCreator(dto.getCreator());
|
|
||||||
machIneDto.setPutInType(dto.getPutInType());
|
|
||||||
machIneDto.setNum(dto.getNum());
|
|
||||||
machIneDto.setCheckMan(dto.getCheckMan());
|
|
||||||
machIneDto.setInfoId(dto.getMachIneDtoList().get(0).getInfoId());
|
|
||||||
res += insertMachineInfo(machIneDto);
|
|
||||||
//根据类型追加ma_type表里面的num
|
//根据类型追加ma_type表里面的num
|
||||||
Type type = new Type();
|
Type type = new Type();
|
||||||
type.setModelTitle("盘点入库");
|
type.setModelTitle("盘点入库");
|
||||||
|
|
@ -193,6 +184,15 @@ public class WarehousingServiceImpl implements WarehousingService {
|
||||||
type.setMaId(machIneDto.getMaId());
|
type.setMaId(machIneDto.getMaId());
|
||||||
type.setMaCode(machIneDto.getMaCode());
|
type.setMaCode(machIneDto.getMaCode());
|
||||||
res += typeService.updateNumAddOrSubtract(type);
|
res += typeService.updateNumAddOrSubtract(type);
|
||||||
|
machIneDto.setCode(code);
|
||||||
|
machIneDto.setIsCode(dto.getIsCode());
|
||||||
|
machIneDto.setTypeId(dto.getTypeId());
|
||||||
|
machIneDto.setCreator(dto.getCreator());
|
||||||
|
machIneDto.setPutInType(dto.getPutInType());
|
||||||
|
machIneDto.setNum(dto.getNum());
|
||||||
|
machIneDto.setCheckMan(dto.getCheckMan());
|
||||||
|
machIneDto.setInfoId(dto.getMachIneDtoList().get(0).getInfoId());
|
||||||
|
res += insertMachineInfo(machIneDto);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -249,13 +249,13 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService {
|
||||||
type.setCode(tmTask.getCode());
|
type.setCode(tmTask.getCode());
|
||||||
}
|
}
|
||||||
dto.setTypeId(purchaseDto.getTypeId());
|
dto.setTypeId(purchaseDto.getTypeId());
|
||||||
if (1 > purchaseStorageMapper.updateMachineByCode(dto)) {throw new RuntimeException("入库失败,更新物资入库状态0条");}
|
|
||||||
//if (1 > purchaseStorageMapper.updateStorageNum(BigDecimal.ONE, dto.getTypeId())) {throw new RuntimeException("入库失败,库存增加0");}
|
|
||||||
type.setModelTitle("新购入库");
|
type.setModelTitle("新购入库");
|
||||||
type.setTypeId(Long.valueOf(purchaseDto.getTypeId()));
|
type.setTypeId(Long.valueOf(purchaseDto.getTypeId()));
|
||||||
type.setInputNum(BigDecimal.ONE);
|
type.setInputNum(BigDecimal.ONE);
|
||||||
type.setStyle("4");
|
type.setStyle("4");
|
||||||
if (1 > typeService.updateNumAddOrSubtract(type)) {throw new RuntimeException("入库失败,库存增加0");}
|
if (1 > typeService.updateNumAddOrSubtract(type)) {throw new RuntimeException("入库失败,库存增加0");}
|
||||||
|
if (1 > purchaseStorageMapper.updateMachineByCode(dto)) {throw new RuntimeException("入库失败,更新物资入库状态0条");}
|
||||||
|
//if (1 > purchaseStorageMapper.updateStorageNum(BigDecimal.ONE, dto.getTypeId())) {throw new RuntimeException("入库失败,库存增加0");}
|
||||||
List<PurchaseCheckDetails> bindMaList = purchaseBindMapper.getMachineById(purchaseDto);
|
List<PurchaseCheckDetails> bindMaList = purchaseBindMapper.getMachineById(purchaseDto);
|
||||||
if (CollectionUtils.isNotEmpty(bindMaList)) {
|
if (CollectionUtils.isNotEmpty(bindMaList)) {
|
||||||
// 还有已绑定的设备, 那就不动状态了,这块由设备绑定阶段来决定是否修改成待入库状态 by阮 2025-01-10号修改逻辑
|
// 还有已绑定的设备, 那就不动状态了,这块由设备绑定阶段来决定是否修改成待入库状态 by阮 2025-01-10号修改逻辑
|
||||||
|
|
|
||||||
|
|
@ -675,8 +675,6 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
||||||
inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
|
||||||
inputDetails.setAuditTime(DateUtils.getNowDate());
|
inputDetails.setAuditTime(DateUtils.getNowDate());
|
||||||
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);
|
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);
|
||||||
inputDetails.setStatus(MaMachineStatusEnum.IN_STORE.getStatus().toString());
|
|
||||||
updateRepairInputInfo(inputDetails);
|
|
||||||
Type type = new Type();
|
Type type = new Type();
|
||||||
type.setModelTitle("修试入库");
|
type.setModelTitle("修试入库");
|
||||||
type.setCode(repairInputDetails.getInputCode());
|
type.setCode(repairInputDetails.getInputCode());
|
||||||
|
|
@ -685,6 +683,8 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
|
||||||
type.setInputNum(BigDecimal.valueOf(1));
|
type.setInputNum(BigDecimal.valueOf(1));
|
||||||
type.setMaId(inputDetails.getMaId());
|
type.setMaId(inputDetails.getMaId());
|
||||||
typeService.updateNumAddOrSubtract(type);
|
typeService.updateNumAddOrSubtract(type);
|
||||||
|
inputDetails.setStatus(MaMachineStatusEnum.IN_STORE.getStatus().toString());
|
||||||
|
updateRepairInputInfo(inputDetails);
|
||||||
}
|
}
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
updateTaskStatus(repairInputDetails);
|
updateTaskStatus(repairInputDetails);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue