| | |
| | | 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)); |
| | | |
| | |
| | | } |
| | | if (checkRequiredColumn(row, "签订日期", rowNum, errorMap)) { |
| | | contract.setSignDate(Timestamp.valueOf(row.get("签订日期").toString())); |
| | | // 业绩日期按照签订日期填充 |
| | | contract.setPerformanceDate(Timestamp.valueOf(row.get("签订日期").toString())); |
| | | } |
| | | if (checkRequiredColumn(row, "起始日期", rowNum, errorMap)) { |
| | | contract.setStartDate(Timestamp.valueOf(row.get("起始日期").toString())); |
| | |
| | | annualData.put(String.valueOf(year), currentMap); |
| | | } |
| | | |
| | | |
| | | for (Contract incomeContract : incomeContractList) { |
| | | // 支付统计(当前合同) |
| | | BigDecimal currentContractAmount = incomeContract.getContractAmount() != null ? incomeContract.getContractAmount() : new BigDecimal(0); |
| | |
| | | } |
| | | |
| | | // 年度内统计 |
| | | calendar.setTime(incomeContract.getSignDate()); |
| | | calendar.setTime(incomeContract.getPerformanceDate()); |
| | | Integer year = calendar.get(Calendar.YEAR); |
| | | Integer month = calendar.get(Calendar.MONTH) + 1; |
| | | |