|
@@ -776,6 +776,81 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
BigDecimal securityMonth = item.getSocialSecurityMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getSocialSecurityMonth());
|
|
|
BigDecimal housingFundMonth = item.getHousingFundMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getHousingFundMonth());
|
|
|
BigDecimal returnTaxMonth = item.getReturnTaxMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getReturnTaxMonth());
|
|
|
+ if (item.getKeepAccountStartMonth() != null && item.getKeepAccountEndMonth() != null){
|
|
|
+ Calendar startCalendar = Calendar.getInstance();
|
|
|
+ startCalendar.setTime(item.getKeepAccountStartMonth());
|
|
|
+ Calendar endCalendar = Calendar.getInstance();
|
|
|
+ endCalendar.setTime(item.getKeepAccountEndMonth());
|
|
|
+ // 计算年份和月份的差异
|
|
|
+ int yearDiff = endCalendar.get(Calendar.YEAR) - startCalendar.get(Calendar.YEAR);
|
|
|
+ int monthDiff = endCalendar.get(Calendar.MONTH) - startCalendar.get(Calendar.MONTH);
|
|
|
+ // 总的月份差异
|
|
|
+ int totalMonthsBetween = yearDiff * 12 + monthDiff;
|
|
|
+ BigDecimal keeFreeMonth = item.getKeepAccountFreeMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getKeepAccountFreeMonth());
|
|
|
+ if (totalMonthsBetween != keepAccountMonth.add(keeFreeMonth).intValue()){
|
|
|
+ failureNum++;
|
|
|
+ failureMsg.append("<br/>").append(failureNum).append("导入的合同编号 ").append(item.getContractNo()).append("代理记账时间不同");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(item.getSocialSecurityStartMonth() != null && item.getSocialSecurityEndMonth()!= null){
|
|
|
+ Calendar startCalendar2 = Calendar.getInstance();
|
|
|
+ startCalendar2.setTime(item.getSocialSecurityStartMonth());
|
|
|
+ Calendar endCalendar2 = Calendar.getInstance();
|
|
|
+ endCalendar2.setTime(item.getSocialSecurityEndMonth());
|
|
|
+ // 计算年份和月份的差异
|
|
|
+ int yearDiff2 = endCalendar2.get(Calendar.YEAR) - startCalendar2.get(Calendar.YEAR);
|
|
|
+ int monthDiff2 = endCalendar2.get(Calendar.MONTH) - startCalendar2.get(Calendar.MONTH);
|
|
|
+ // 总的月份差异
|
|
|
+ int totalMonthsBetween2 = yearDiff2 * 12 + monthDiff2;
|
|
|
+ BigDecimal socialSecurityMonth = item.getSocialSecurityFreeMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getSocialSecurityFreeMonth());
|
|
|
+ if (totalMonthsBetween2 != securityMonth.add(socialSecurityMonth).intValue()){
|
|
|
+ failureNum++;
|
|
|
+ failureMsg.append("<br/>").append(failureNum).append("导入的合同编号 ").append(item.getContractNo()).append("社保代缴时间不同");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(item.getHousingFundStartMonth() != null && item.getHousingFundEndMonth()!= null){
|
|
|
+ Calendar startCalendar3 = Calendar.getInstance();
|
|
|
+ startCalendar3.setTime(item.getHousingFundStartMonth());
|
|
|
+ Calendar endCalendar3 = Calendar.getInstance();
|
|
|
+ endCalendar3.setTime(item.getHousingFundEndMonth());
|
|
|
+ // 计算年份和月份的差异
|
|
|
+ int yearDiff3= endCalendar3.get(Calendar.YEAR) - startCalendar3.get(Calendar.YEAR);
|
|
|
+ int monthDiff3 = endCalendar3.get(Calendar.MONTH) - startCalendar3.get(Calendar.MONTH);
|
|
|
+ // 总的月份差异
|
|
|
+ int totalMonthsBetween3 = yearDiff3 * 12 + monthDiff3;
|
|
|
+ BigDecimal housingFundMonths = item.getHousingFundFreeMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getHousingFundFreeMonth());
|
|
|
+ if (totalMonthsBetween3!= housingFundMonth.add(housingFundMonths).intValue()){
|
|
|
+ failureNum++;
|
|
|
+ failureMsg.append("<br/>").append(failureNum).append("导入的合同编号 ").append(item.getContractNo()).append("公积金时间不同");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(item.getReturnTaxStartMonth() != null && item.getReturnTaxEndMonth()!= null){
|
|
|
+ Calendar startCalendar4 = Calendar.getInstance();
|
|
|
+ startCalendar4.setTime(item.getHousingFundStartMonth());
|
|
|
+ Calendar endCalendar4 = Calendar.getInstance();
|
|
|
+ endCalendar4.setTime(item.getHousingFundEndMonth());
|
|
|
+ // 计算年份和月份的差异
|
|
|
+ int yearDiff4= endCalendar4.get(Calendar.YEAR) - startCalendar4.get(Calendar.YEAR);
|
|
|
+ int monthDiff4 = endCalendar4.get(Calendar.MONTH) - startCalendar4.get(Calendar.MONTH);
|
|
|
+ // 总的月份差异
|
|
|
+ int totalMonthsBetween4 = yearDiff4 * 12 + monthDiff4;
|
|
|
+ BigDecimal returnTaxFreeMonth = item.getReturnTaxFreeMonth() == null ? BigDecimal.ZERO : BigDecimal.valueOf(item.getReturnTaxFreeMonth());
|
|
|
+ if (totalMonthsBetween4!= returnTaxMonth.add(returnTaxFreeMonth).intValue()){
|
|
|
+ failureNum++;
|
|
|
+ failureMsg.append("<br/>").append(failureNum).append("导入的合同编号 ").append(item.getContractNo()).append("返税申报时间不同");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (nameCountMap.get(item.getContractNo()) > 1L) {
|
|
|
failureNum++;
|
|
|
failureMsg.append("<br/>").append(failureNum).append("导入的合同编号 ").append(item.getContractNo()).append("不能重复");
|
|
@@ -808,6 +883,10 @@ public class BizArchiveInputServiceImpl extends ServiceImpl<BizArchiveInputMappe
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
archiveInput.setSignerId(user != null ? user.getUserId() : null);
|
|
|
archiveInput.setContractType("新签".equals(item.getOrderType()) ? 0 : "续签".equals(item.getOrderType()) ? 1 : 3);
|
|
|
archiveInput.setServiceType(1);
|