Merge remote-tracking branch 'origin/master'

This commit is contained in:
hayu 2025-09-15 19:34:19 +08:00
commit bb41e8db9d
4 changed files with 17 additions and 17 deletions

View File

@ -1240,15 +1240,15 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
if (leaseApplyDetails.getMaCodeVoList()!=null){
//编码
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);
if (res == 0) {
throw new ServiceException("设备状态修改失败,请联系管理员");
}
type.setTypeId(Long.parseLong(maCodeVo.getTypeId()));
type.setMaId(maCodeVo.getMaId());
type.setInputNum(BigDecimal.ONE);
typeService.updateNumAddOrSubtract(type);
}
}
//判断是领用任务还是领料任务根据newType

View File

@ -174,15 +174,6 @@ public class WarehousingServiceImpl implements WarehousingService {
}
for (int i = 0; i < dto.getMachIneDtoList().size(); 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
Type type = new Type();
type.setModelTitle("盘点入库");
@ -193,6 +184,15 @@ public class WarehousingServiceImpl implements WarehousingService {
type.setMaId(machIneDto.getMaId());
type.setMaCode(machIneDto.getMaCode());
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;
}

View File

@ -249,13 +249,13 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService {
type.setCode(tmTask.getCode());
}
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.setTypeId(Long.valueOf(purchaseDto.getTypeId()));
type.setInputNum(BigDecimal.ONE);
type.setStyle("4");
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);
if (CollectionUtils.isNotEmpty(bindMaList)) {
// 还有已绑定的设备 那就不动状态了,这块由设备绑定阶段来决定是否修改成待入库状态 by阮 2025-01-10号修改逻辑

View File

@ -675,8 +675,6 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
inputDetails.setAuditBy(SecurityUtils.getLoginUser().getUserid());
inputDetails.setAuditTime(DateUtils.getNowDate());
result += repairInputDetailsMapper.updateRepairInputDetails(inputDetails);
inputDetails.setStatus(MaMachineStatusEnum.IN_STORE.getStatus().toString());
updateRepairInputInfo(inputDetails);
Type type = new Type();
type.setModelTitle("修试入库");
type.setCode(repairInputDetails.getInputCode());
@ -685,6 +683,8 @@ public class RepairInputDetailsServiceImpl implements IRepairInputDetailsService
type.setInputNum(BigDecimal.valueOf(1));
type.setMaId(inputDetails.getMaId());
typeService.updateNumAddOrSubtract(type);
inputDetails.setStatus(MaMachineStatusEnum.IN_STORE.getStatus().toString());
updateRepairInputInfo(inputDetails);
}
if (result > 0) {
updateTaskStatus(repairInputDetails);