Commit 7613b4ac by lzxry

bugfix

parent 5e49f1ef
......@@ -2534,6 +2534,7 @@ public class ContractServiceImpl implements ContractService {
DataFormatter formatter = new DataFormatter();
int rowNumber = sheet.getLastRowNum();
List<Object[]> args_data = new ArrayList<>();
List<Contract> masterContracts = new ArrayList<>();
Map<String, String> codeUniqueDic = new HashMap<>();
List<String> accountsEmail = new ArrayList<>();
......@@ -2691,7 +2692,7 @@ public class ContractServiceImpl implements ContractService {
}
}
}
List<Contract> masterContracts = new ArrayList<>();
if("tkio".equals(platform)&&"2".equals(filter.get("contractType"))){
if(filter.get("relation_code")==null){
......@@ -2719,7 +2720,7 @@ public class ContractServiceImpl implements ContractService {
if(StringUtils.isEmpty(contract.getNextSignedDate())){
contract.setNextSignedDate(dateTime.plusDays(-1).toString("yyyy-MM-dd"));//签订日的前一天
contract.setNextSignedContractCode(filter.get("contractCode"));
contractRepository.save(contract);
masterContracts.add(contract);
break;
}else{
relationCode = contract.getNextSignedContractCode();
......@@ -2811,6 +2812,7 @@ public class ContractServiceImpl implements ContractService {
// TransactionStatus transactionStatus = transactionUtils.begin();
jdbcTemplate.batchUpdate(sql.toString(), args_data);
contractRepository.save(masterContracts);
// transactionUtils.commit(transactionStatus);
if ("tkio".equals(platform)) {
for (String email : moreEmail) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment