| | |
| | | if (oldSignYear.equals(newSignYear)) { |
| | | contractNumber.append(resources.getContractNumber().substring(9, 14)); |
| | | } else { |
| | | String companyCode = resources.getContractNumber().substring(0, 4); |
| | | // 业绩年度(以签订日期为准) |
| | | contractNumber.append(newSignYear); |
| | | // 本公司当年编号(以签订日期为准)(因先存后改故排除本身数据) |
| | | Long companySort = contractRepository.countContractSort(String.valueOf(calendar.get(Calendar.YEAR)), companyCode, resources.getContractId()); |
| | | contractNumber.append(String.format("%03d", (companySort == null ? 0L : companySort) + 1)); |
| | | // TODO:250115业务方提出修改为以创建日期为准 |
| | | contractNumber.append(resources.getContractNumber().substring(11, 14)); |
| | | } |
| | | |
| | | if (oldTrueContract.equals(newTrueContract)) { |
| | | contractNumber.append(resources.getContractNumber().substring(14, 15)); |
| | | } else { |
| | |
| | | calendar.setTime(resources.getSignDate()); |
| | | contractNumber.append(String.valueOf(calendar.get(Calendar.YEAR)).substring(2)); |
| | | // 本公司当年编号(以签订日期为准)(因先存后改故排除本身数据) |
| | | // TODO:250115业务方提出修改为以创建日期为准 |
| | | calendar.setTime(resources.getCreateTime()); |
| | | Long companySort = contractRepository.countContractSort(String.valueOf(calendar.get(Calendar.YEAR)), companyCode, resources.getContractId()); |
| | | contractNumber.append(String.format("%03d", (companySort == null ? 0L : companySort) + 1)); |
| | | // 是否有真实合同 |
| | |
| | | } |
| | | // 全部公司当年编号(以签订日期为准)(因先存后改故排除本身数据) |
| | | // TODO:250115业务方提出修改为以创建日期为准 |
| | | calendar.setTime(resources.getCreateTime()); |
| | | Long allCompanySort = contractRepository.countAllContractSort(String.valueOf(calendar.get(Calendar.YEAR)), resources.getContractId()); |
| | | contractNumber.append(String.format("%04d", (allCompanySort == null ? 0L : allCompanySort) + 1)); |
| | | |