|
|
@@ -124,36 +124,36 @@ public class contractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
|
|
|
// contractEntity.setShouldPostponedDate(shouldPostponedDate);
|
|
|
// }
|
|
|
|
|
|
- baseMapper.updateById(contractEntity);
|
|
|
+ contractMapper.updateMapper(contractEntity);
|
|
|
contractSupplierService.saveAndUpdate(contractDto.getContractType(),contractDto.getSupplierIdList(), contractEntity.getId());
|
|
|
|
|
|
contractFileService.saveAndUpdate(contractDto.getFilePathIdList(), contractEntity.getId());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private LocalDateTime saveShouldPostponedDate(ContractDto contractDto) {
|
|
|
- LocalDateTime expiringDateNew =null;
|
|
|
- String yearTime = contractDto.getYearTime();
|
|
|
- String monthTime = contractDto.getMonthTime();
|
|
|
- String dayTime = contractDto.getDayTime();
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- LocalDateTime expiringDate = contractDto.getExpiringDate();
|
|
|
- if(StringUtils.isNotEmpty(yearTime)){
|
|
|
- expiringDateNew=expiringDate.plusYears(Integer.parseInt(yearTime));
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(monthTime)){
|
|
|
-
|
|
|
- expiringDateNew=expiringDate.plusMonths(Integer.parseInt(monthTime));
|
|
|
- }
|
|
|
-
|
|
|
- if(StringUtils.isNotEmpty(dayTime)){
|
|
|
- expiringDateNew=expiringDate.plusDays(Integer.parseInt(dayTime));
|
|
|
-
|
|
|
- }
|
|
|
- return expiringDateNew;
|
|
|
- }
|
|
|
+// private LocalDateTime saveShouldPostponedDate(ContractDto contractDto) {
|
|
|
+// LocalDateTime expiringDateNew =null;
|
|
|
+// String yearTime = contractDto.getYearTime();
|
|
|
+// String monthTime = contractDto.getMonthTime();
|
|
|
+// String dayTime = contractDto.getDayTime();
|
|
|
+//
|
|
|
+//
|
|
|
+//
|
|
|
+// LocalDateTime expiringDate = contractDto.getExpiringDate();
|
|
|
+// if(StringUtils.isNotEmpty(yearTime)){
|
|
|
+// expiringDateNew=expiringDate.plusYears(Integer.parseInt(yearTime));
|
|
|
+// }
|
|
|
+// if(StringUtils.isNotEmpty(monthTime)){
|
|
|
+//
|
|
|
+// expiringDateNew=expiringDate.plusMonths(Integer.parseInt(monthTime));
|
|
|
+// }
|
|
|
+//
|
|
|
+// if(StringUtils.isNotEmpty(dayTime)){
|
|
|
+// expiringDateNew=expiringDate.plusDays(Integer.parseInt(dayTime));
|
|
|
+//
|
|
|
+// }
|
|
|
+// return expiringDateNew;
|
|
|
+// }
|
|
|
|
|
|
private String getNameInv(String externalCompaniesId) {
|
|
|
QueryWrapper<InvAccount> queryWrapper = new QueryWrapper<>();
|
|
|
@@ -463,4 +463,14 @@ public class contractServiceImpl extends ServiceImpl<ContractMapper, ContractEnt
|
|
|
public IPage<ContractDto> supplierContractPage(ContractVo contractVO) {
|
|
|
return contractSupplierService.supplierContractPage(contractVO);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 定时更新合同失效状态
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ @Transactional
|
|
|
+ public void batchOrderDate(String nowTime) {
|
|
|
+ List<ContractEntity> contractEntityList = baseMapper.selectFilterFailure(nowTime);
|
|
|
+ this.saveOrUpdateBatch(contractEntityList);
|
|
|
+ }
|
|
|
}
|