This commit is contained in:
hayu 2025-09-23 12:45:44 +08:00
parent c0bb92fd75
commit 1c1f973957
1 changed files with 6 additions and 3 deletions

View File

@ -811,7 +811,7 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
type.setStyle("1");
type.setModelTitle("领料出库");
type.setCode(record.getCode());
res = typeService.updateNumAddOrSubtract(type);
if (record.getMaId() != null) {
if (record.getJiJuType() == GlobalConstants.INT_1) {
record.setThisCheckTime(DateUtils.getNowDate());
@ -820,10 +820,13 @@ public class LeaseOutDetailsServiceImpl implements ILeaseOutDetailsService {
LocalDate nextCheckDate = currentDate.plusYears(GlobalConstants.INT_1).minusDays(GlobalConstants.INT_1);
record.setNextCheckTime(DateUtils.toDate(nextCheckDate));
}
// 更新 (ma_machine 设备表)的状态
res = machineMapper.updateMaMachineStatus(record, MaMachineStatusEnum.IN_USE.getStatus());
type.setOutNum(BigDecimal.valueOf(GlobalConstants.INT_1));
type.setMaId(record.getMaId());
res = typeService.updateNumAddOrSubtract(type);
// 更新 (ma_machine 设备表)的状态
res = machineMapper.updateMaMachineStatus(record, MaMachineStatusEnum.IN_USE.getStatus());
} else {
res = typeService.updateNumAddOrSubtract(type);
}
}
}