|
@@ -174,7 +174,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
//公司级:项目报表总览 年度级
|
|
//公司级:项目报表总览 年度级
|
|
//type:类型(1:项目;2:开票;3:报销;4:合同)
|
|
//type:类型(1:项目;2:开票;3:报销;4:合同)
|
|
statementCompanyComprehensiveInfo.setType("1");
|
|
statementCompanyComprehensiveInfo.setType("1");
|
|
- List<StatementCompanyComprehensiveInfo> reportFormList5 = this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
|
|
|
|
|
|
+ List<StatementCompanyComprehensiveInfo> reportFormList5 = this.selectAllByTypeInYearReportByYear(statementCompanyComprehensiveInfo);
|
|
//项目表 各列合计
|
|
//项目表 各列合计
|
|
String xmnumyear1 = "0";
|
|
String xmnumyear1 = "0";
|
|
String xmnumyear2 = "0";
|
|
String xmnumyear2 = "0";
|
|
@@ -211,7 +211,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
//公司级:开票报表开始
|
|
//公司级:开票报表开始
|
|
//类型(1:项目;2:开票;3:报销;4:合同)
|
|
//类型(1:项目;2:开票;3:报销;4:合同)
|
|
statementCompanyComprehensiveInfo.setType("2");
|
|
statementCompanyComprehensiveInfo.setType("2");
|
|
- List<StatementCompanyComprehensiveInfo> reportFormList6 = this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
|
|
|
|
|
|
+ List<StatementCompanyComprehensiveInfo> reportFormList6 = this.selectAllByTypeInYearReportByYear(statementCompanyComprehensiveInfo);
|
|
//各列合计
|
|
//各列合计
|
|
String kpyearnum1 = "0";
|
|
String kpyearnum1 = "0";
|
|
String kpyearnum2 = "0";
|
|
String kpyearnum2 = "0";
|
|
@@ -236,7 +236,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
//公司级:报销报表
|
|
//公司级:报销报表
|
|
//类型(1:项目;2:开票;3:报销;4:合同)
|
|
//类型(1:项目;2:开票;3:报销;4:合同)
|
|
statementCompanyComprehensiveInfo.setType("3");
|
|
statementCompanyComprehensiveInfo.setType("3");
|
|
- List<StatementCompanyComprehensiveInfo> reportFormList7 = this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
|
|
|
|
|
|
+ List<StatementCompanyComprehensiveInfo> reportFormList7 = this.selectAllByTypeInYearReportByYear(statementCompanyComprehensiveInfo);
|
|
//合计
|
|
//合计
|
|
String bxyearnum1 = "0";
|
|
String bxyearnum1 = "0";
|
|
String bxyearnum2 = "0";
|
|
String bxyearnum2 = "0";
|
|
@@ -255,7 +255,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
//公司级:合同报表
|
|
//公司级:合同报表
|
|
//类型(1:项目;2:开票;3:报销;4:合同)
|
|
//类型(1:项目;2:开票;3:报销;4:合同)
|
|
statementCompanyComprehensiveInfo.setType("4");
|
|
statementCompanyComprehensiveInfo.setType("4");
|
|
- List<StatementCompanyComprehensiveInfo> reportFormList8= this.selectAllByTypeInYearReport(statementCompanyComprehensiveInfo);
|
|
|
|
|
|
+ List<StatementCompanyComprehensiveInfo> reportFormList8= this.selectAllByTypeInYearReportByYear(statementCompanyComprehensiveInfo);
|
|
//合计
|
|
//合计
|
|
String htyearnum1 = "0";
|
|
String htyearnum1 = "0";
|
|
String htyearnum2 = "0";
|
|
String htyearnum2 = "0";
|
|
@@ -344,47 +344,15 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
- * 公司级年度信息处理
|
|
|
|
|
|
+ * 公司集信息处理 年度用
|
|
*/
|
|
*/
|
|
- public void disposeStatementCompanyByyear(Integer year,Integer bigDateType,Integer smallDateType){
|
|
|
|
|
|
+ public void disposeStatementCompanyByYear(Integer year,Integer bigDateType,Integer smallDateType){
|
|
Calendar cal = Calendar.getInstance();
|
|
Calendar cal = Calendar.getInstance();
|
|
//获取当前年份
|
|
//获取当前年份
|
|
if(null == year){
|
|
if(null == year){
|
|
year = cal.get(Calendar.YEAR);
|
|
year = cal.get(Calendar.YEAR);
|
|
}
|
|
}
|
|
- int month = cal.get(Calendar.MONTH)+1;
|
|
|
|
- List<StatementCompanyComprehensiveInfo> statementCompanyComprehensiveInfos = new ArrayList<StatementCompanyComprehensiveInfo>();
|
|
|
|
- String xmnum1 = "0";
|
|
|
|
- String xmnum2 = "0";
|
|
|
|
- String xmnum3 = "0";
|
|
|
|
- String xmnum4 = "0";
|
|
|
|
-// 获取项目月报的信息,将每个月的新增A类,B类、本月电子归档、本月上报进行增加 1为项目报告
|
|
|
|
- for(int i =1;i<=month;i++){
|
|
|
|
- statementCompanyComprehensiveInfos = dao.getMonthData("1",i);
|
|
|
|
- // 从 statement_company_comprehensive_info中获取之前月份的信息,进行增加后保存到statement_company_comprehensive_info2中
|
|
|
|
-// for(StatementCompanyComprehensiveInfo info:statementCompanyComprehensiveInfos){
|
|
|
|
-// xmnum1 = new BigDecimal(info.getField1()).add(new BigDecimal(xmnum1)).toString();
|
|
|
|
-// xmnum2 = new BigDecimal(info.getField2()).add(new BigDecimal(xmnum2)).toString();
|
|
|
|
-// xmnum3 = new BigDecimal(info.getField3()).add(new BigDecimal(xmnum3)).toString();
|
|
|
|
-// xmnum4 = new BigDecimal(info.getField4()).add(new BigDecimal(xmnum4)).toString();
|
|
|
|
-// }
|
|
|
|
- for(int j=0;j<statementCompanyComprehensiveInfos.size();j++){
|
|
|
|
- xmnum1 = new BigDecimal(statementCompanyComprehensiveInfos.get(i).getField1()).add(new BigDecimal(xmnum1)).toString();
|
|
|
|
- statementCompanyComprehensiveInfos.get(i).setField1(xmnum1);
|
|
|
|
- xmnum2 = new BigDecimal(statementCompanyComprehensiveInfos.get(i).getField2()).add(new BigDecimal(xmnum2)).toString();
|
|
|
|
- statementCompanyComprehensiveInfos.get(i).setField1(xmnum2);
|
|
|
|
- xmnum3 = new BigDecimal(statementCompanyComprehensiveInfos.get(i).getField3()).add(new BigDecimal(xmnum3)).toString();
|
|
|
|
- statementCompanyComprehensiveInfos.get(i).setField1(xmnum3);
|
|
|
|
- xmnum4 = new BigDecimal(statementCompanyComprehensiveInfos.get(i).getField4()).add(new BigDecimal(xmnum4)).toString();
|
|
|
|
- statementCompanyComprehensiveInfos.get(i).setField4(xmnum4);
|
|
|
|
- }
|
|
|
|
-// statementCompanyComprehensiveInfos
|
|
|
|
-// dao.insertToStatementCompanyComprehensiveInfo(statementCompanyComprehensiveInfos);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
Map<String, String> dateMap = getDateNew(bigDateType, smallDateType, year);
|
|
Map<String, String> dateMap = getDateNew(bigDateType, smallDateType, year);
|
|
//开始时间
|
|
//开始时间
|
|
@@ -393,15 +361,15 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
String endDate = dateMap.get("endDate");
|
|
String endDate = dateMap.get("endDate");
|
|
String statementDate = dateMap.get("statementDate");
|
|
String statementDate = dateMap.get("statementDate");
|
|
//公司级项目处理
|
|
//公司级项目处理
|
|
- disposeStatementCompanyProject(year,beginDate,endDate,statementDate,bigDateType, smallDateType);
|
|
|
|
|
|
+ disposeStatementCompanyProjectByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType);
|
|
//查询部门信息
|
|
//查询部门信息
|
|
List<Office> officeList = dao.getAllOfficeListInfo();
|
|
List<Office> officeList = dao.getAllOfficeListInfo();
|
|
//公司级开票处理
|
|
//公司级开票处理
|
|
- disposeStatementCompanyInvoice(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
|
|
|
|
|
|
+ disposeStatementCompanyInvoiceByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
|
|
//公司级报销处理
|
|
//公司级报销处理
|
|
- disposeStatementCompanyReimbursement(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
|
|
|
|
|
|
+ disposeStatementCompanyReimbursementByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
|
|
//公司级合同处理
|
|
//公司级合同处理
|
|
- disposeStatementCompanyContract(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
|
|
|
|
|
|
+ disposeStatementCompanyContractByYear(year,beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
|
|
|
|
|
|
//创建utilNotifyId参数
|
|
//创建utilNotifyId参数
|
|
//参数是由 year、bigDateType、smallDateType参数设定
|
|
//参数是由 year、bigDateType、smallDateType参数设定
|
|
@@ -425,6 +393,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 公司级通知
|
|
* 公司级通知
|
|
* @param statementDate
|
|
* @param statementDate
|
|
@@ -512,6 +481,7 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
|
|
|
|
//查询新增A类项目数量
|
|
//查询新增A类项目数量
|
|
List<ReportDataEntity> projectCountByAAll = dao.getInsertProjectCountByGradeAll( "2", beginDate, endDate);
|
|
List<ReportDataEntity> projectCountByAAll = dao.getInsertProjectCountByGradeAll( "2", beginDate, endDate);
|
|
|
|
+// 查询新增B类项目数量
|
|
List<ReportDataEntity> projectCountByBAll = dao.getInsertProjectCountByGradeAll( "1", beginDate, endDate);
|
|
List<ReportDataEntity> projectCountByBAll = dao.getInsertProjectCountByGradeAll( "1", beginDate, endDate);
|
|
List<ReportDataEntity> getProjectCountByRecordAll = dao.getProjectCountByRecordAll(beginDate, endDate);
|
|
List<ReportDataEntity> getProjectCountByRecordAll = dao.getProjectCountByRecordAll(beginDate, endDate);
|
|
List<ReportDataEntity> getProjectCountByReportedAll = dao.getProjectCountByReportedAll(beginDate, endDate);
|
|
List<ReportDataEntity> getProjectCountByReportedAll = dao.getProjectCountByReportedAll(beginDate, endDate);
|
|
@@ -525,17 +495,18 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
List<ReportDataEntity> overDueReportedProjectIdListAll = dao.getOverDueReportedProjectAll(beginDate, endDate);
|
|
List<ReportDataEntity> overDueReportedProjectIdListAll = dao.getOverDueReportedProjectAll(beginDate, endDate);
|
|
//查询电子归档超期未归档项目数量(分组)
|
|
//查询电子归档超期未归档项目数量(分组)
|
|
Map<String, List<ReportDataEntity>> overDueNotRecordProjectIdListAllMap = dataMessageDispose(overDueNotRecordProjectIdListAll);
|
|
Map<String, List<ReportDataEntity>> overDueNotRecordProjectIdListAllMap = dataMessageDispose(overDueNotRecordProjectIdListAll);
|
|
- //分组
|
|
|
|
|
|
+ //分组 超期归档做分组 key 为OfficeParentIds,OfficeId value 当前对象 field为项目id
|
|
Map<String, List<ReportDataEntity>> overDueRecordProjectIdListAllMap = dataMessageDispose(overDueRecordProjectIdListAll);
|
|
Map<String, List<ReportDataEntity>> overDueRecordProjectIdListAllMap = dataMessageDispose(overDueRecordProjectIdListAll);
|
|
- //分组
|
|
|
|
|
|
+ //分组 超期未上报 同上
|
|
Map<String, List<ReportDataEntity>> overDueNotReportedProjectIdListAllMap = dataMessageDispose(overDueNotReportedProjectIdListAll);
|
|
Map<String, List<ReportDataEntity>> overDueNotReportedProjectIdListAllMap = dataMessageDispose(overDueNotReportedProjectIdListAll);
|
|
- //分组
|
|
|
|
|
|
+ //分组 超期上报 同上
|
|
Map<String, List<ReportDataEntity>> overDueReportedProjectIdListAllMap = dataMessageDispose(overDueReportedProjectIdListAll);
|
|
Map<String, List<ReportDataEntity>> overDueReportedProjectIdListAllMap = dataMessageDispose(overDueReportedProjectIdListAll);
|
|
|
|
|
|
//查询部门信息
|
|
//查询部门信息
|
|
List<Office> officeList = dao.getOfficeListInfo();
|
|
List<Office> officeList = dao.getOfficeListInfo();
|
|
for (Office officeInfo : officeList) {
|
|
for (Office officeInfo : officeList) {
|
|
StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
|
|
StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
|
|
|
|
+// 代表项目
|
|
comprehensiveInfo.setType("1");
|
|
comprehensiveInfo.setType("1");
|
|
comprehensiveInfo.setYear(String.valueOf(year));
|
|
comprehensiveInfo.setYear(String.valueOf(year));
|
|
comprehensiveInfo.setBigDateType(bigDateType.toString());
|
|
comprehensiveInfo.setBigDateType(bigDateType.toString());
|
|
@@ -722,6 +693,233 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 年报汇总方法
|
|
|
|
+ * @param beginDate 开始时间
|
|
|
|
+ * @param endDate 结束时间
|
|
|
|
+ * @param statementDate 报表时间
|
|
|
|
+ * @param bigDateType 状态1(0:年;1:季度;2:月份)
|
|
|
|
+ * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void disposeStatementCompanyProjectByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType){
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //查询新增A类项目数量
|
|
|
|
+ List<ReportDataEntity> projectCountByAAll = dao.getInsertProjectCountByGradeAll( "2", beginDate, endDate);
|
|
|
|
+// 查询新增B类项目数量
|
|
|
|
+ List<ReportDataEntity> projectCountByBAll = dao.getInsertProjectCountByGradeAll( "1", beginDate, endDate);
|
|
|
|
+ List<ReportDataEntity> getProjectCountByRecordAll = dao.getProjectCountByRecordAll(beginDate, endDate);
|
|
|
|
+ List<ReportDataEntity> getProjectCountByReportedAll = dao.getProjectCountByReportedAll(beginDate, endDate);
|
|
|
|
+ //超期未归档
|
|
|
|
+ List<ReportDataEntity> overDueNotRecordProjectIdListAll = dao.getOverDueNotRecordProjectAll();
|
|
|
|
+ //超期归档
|
|
|
|
+ List<ReportDataEntity> overDueRecordProjectIdListAll = dao.getOverDueRecordProjectAll(beginDate, endDate);
|
|
|
|
+ //超期未上报
|
|
|
|
+ List<ReportDataEntity> overDueNotReportedProjectIdListAll = dao.getOverDueNotReportedProjectAll();
|
|
|
|
+ //超期上报
|
|
|
|
+ List<ReportDataEntity> overDueReportedProjectIdListAll = dao.getOverDueReportedProjectAll(beginDate, endDate);
|
|
|
|
+ //查询电子归档超期未归档项目数量(分组)
|
|
|
|
+ Map<String, List<ReportDataEntity>> overDueNotRecordProjectIdListAllMap = dataMessageDispose(overDueNotRecordProjectIdListAll);
|
|
|
|
+ //分组 超期归档做分组 key 为OfficeParentIds,OfficeId value 当前对象 field为项目id
|
|
|
|
+ Map<String, List<ReportDataEntity>> overDueRecordProjectIdListAllMap = dataMessageDispose(overDueRecordProjectIdListAll);
|
|
|
|
+ //分组 超期未上报 同上
|
|
|
|
+ Map<String, List<ReportDataEntity>> overDueNotReportedProjectIdListAllMap = dataMessageDispose(overDueNotReportedProjectIdListAll);
|
|
|
|
+ //分组 超期上报 同上
|
|
|
|
+ Map<String, List<ReportDataEntity>> overDueReportedProjectIdListAllMap = dataMessageDispose(overDueReportedProjectIdListAll);
|
|
|
|
+
|
|
|
|
+ //查询部门信息
|
|
|
|
+ List<Office> officeList = dao.getOfficeListInfo();
|
|
|
|
+ for (Office officeInfo : officeList) {
|
|
|
|
+ StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
|
|
|
|
+// 代表项目
|
|
|
|
+ comprehensiveInfo.setType("1");
|
|
|
|
+ comprehensiveInfo.setYear(String.valueOf(year));
|
|
|
|
+ comprehensiveInfo.setBigDateType(bigDateType.toString());
|
|
|
|
+ comprehensiveInfo.setSmallDateType(smallDateType.toString());
|
|
|
|
+ comprehensiveInfo.setStatementDate(statementDate);
|
|
|
|
+ comprehensiveInfo.setOfficeId(officeInfo.getId());
|
|
|
|
+ //查询新增A类项目数量
|
|
|
|
+ /*Integer projectCountByA = dao.getInsertProjectCountByGrade(officeInfo.getId(), "2", beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField1(projectCountByA.toString());*/
|
|
|
|
+ //遍历添加新增A类项目数量
|
|
|
|
+ for (ReportDataEntity reportData: projectCountByAAll) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询新增B类项目数量
|
|
|
|
+ /*Integer projectCountByB = dao.getInsertProjectCountByGrade(officeInfo.getId(), "1", beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField2(projectCountByB.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: projectCountByBAll) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField2(String.valueOf(Integer.parseInt(comprehensiveInfo.getField2()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询本月电子归档项目数量
|
|
|
|
+ /*Integer getProjectCountByRecord = dao.getProjectCountByRecord(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField3(getProjectCountByRecord.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: getProjectCountByRecordAll) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField3(String.valueOf(Integer.parseInt(comprehensiveInfo.getField3()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询本月上报项目数量
|
|
|
|
+ /*Integer getProjectCountByReported = dao.getProjectCountByReported(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField4(getProjectCountByReported.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: getProjectCountByReportedAll) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField4(String.valueOf(Integer.parseInt(comprehensiveInfo.getField4()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询电子归档超期未归档项目数量(保存到数据库)
|
|
|
|
+ //List<String> overDueNotRecordProjectIdList = dao.getOverDueNotRecordProject(officeInfo.getId());
|
|
|
|
+ List<ReportDataEntity> overDueNotRecordProjectListAll = Lists.newArrayList();
|
|
|
|
+ for (String key : overDueNotRecordProjectIdListAllMap.keySet()) {
|
|
|
|
+ if(officeInfo.getId().equals(key) || key.contains(officeInfo.getId())){
|
|
|
|
+ List<ReportDataEntity> reportDataEntities = overDueNotRecordProjectIdListAllMap.get(key);
|
|
|
|
+ overDueNotRecordProjectListAll.addAll(reportDataEntities);
|
|
|
|
+ comprehensiveInfo.setField5(String.valueOf(Integer.parseInt(comprehensiveInfo.getField5()) + reportDataEntities.size()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ List<StatementDataInfo> overDueNotRecordProjectList = Lists.newArrayList();
|
|
|
|
+ for (ReportDataEntity peportDataEntity : overDueNotRecordProjectListAll) {
|
|
|
|
+ String projectId = peportDataEntity.getFieldId();
|
|
|
|
+ StatementDataInfo info = new StatementDataInfo();
|
|
|
|
+ info.setStatementDate(statementDate);
|
|
|
|
+ info.setGradeType("1");
|
|
|
|
+ info.setType("1");
|
|
|
|
+ info.setYear(String.valueOf(year));
|
|
|
|
+ info.setBigDateType(bigDateType.toString());
|
|
|
|
+ info.setSmallDateType(smallDateType.toString());
|
|
|
|
+ info.setOfficeId(officeInfo.getId());
|
|
|
|
+ info.setField1(projectId);
|
|
|
|
+ overDueNotRecordProjectList.add(info);
|
|
|
|
+ }
|
|
|
|
+ if(overDueNotRecordProjectList.size()>0){
|
|
|
|
+ //每次删除之前存的数据
|
|
|
|
+ for (StatementDataInfo statementDataInfo: overDueNotRecordProjectList) {
|
|
|
|
+ dao.deleteStatementDataInfoByYear(statementDataInfo);
|
|
|
|
+ }
|
|
|
|
+ dao.insertStatementDataInfoByYear(overDueNotRecordProjectList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //查询电子归档超期归档项目数量(保存到数据库)
|
|
|
|
+ //List<String> overDueRecordProjectIdList = dao.getOverDueRecordProject(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ List<ReportDataEntity> overDueRecordProjectListAll = Lists.newArrayList();
|
|
|
|
+ for (String key : overDueRecordProjectIdListAllMap.keySet()) {
|
|
|
|
+ if(officeInfo.getId().equals(key) || key.contains(officeInfo.getId())){
|
|
|
|
+ List<ReportDataEntity> reportDataEntities = overDueRecordProjectIdListAllMap.get(key);
|
|
|
|
+ overDueRecordProjectListAll.addAll(reportDataEntities);
|
|
|
|
+ comprehensiveInfo.setField6(String.valueOf(Integer.parseInt(comprehensiveInfo.getField6()) + reportDataEntities.size()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //comprehensiveInfo.setField6(String.valueOf(overDueRecordProjectIdList.size()));
|
|
|
|
+ List<StatementDataInfo> overDueRecordProjectList = Lists.newArrayList();
|
|
|
|
+ for (ReportDataEntity peportDataEntity : overDueRecordProjectListAll) {
|
|
|
|
+ String projectId = peportDataEntity.getFieldId();
|
|
|
|
+ StatementDataInfo info = new StatementDataInfo();
|
|
|
|
+ info.setStatementDate(statementDate);
|
|
|
|
+ info.setGradeType("1");
|
|
|
|
+ info.setType("1");
|
|
|
|
+ info.setYear(String.valueOf(year));
|
|
|
|
+ info.setBigDateType(bigDateType.toString());
|
|
|
|
+ info.setSmallDateType(smallDateType.toString());
|
|
|
|
+ info.setOfficeId(officeInfo.getId());
|
|
|
|
+ info.setField2(projectId);
|
|
|
|
+ overDueRecordProjectList.add(info);
|
|
|
|
+ }
|
|
|
|
+ if(overDueRecordProjectList.size()>0){
|
|
|
|
+ //每次删除之前存的数据
|
|
|
|
+ for (StatementDataInfo statementDataInfo: overDueRecordProjectList) {
|
|
|
|
+ dao.deleteStatementDataInfoByYear(statementDataInfo);
|
|
|
|
+ }
|
|
|
|
+ dao.insertStatementDataInfoByYear(overDueRecordProjectList);
|
|
|
|
+ }
|
|
|
|
+ //查询上报超期未上报项目数量(保存到数据库)
|
|
|
|
+ //List<String> overDueNotReportedProjectIdList = dao.getOverDueNotReportedProject(officeInfo.getId());
|
|
|
|
+ List<ReportDataEntity> overDueNotReportedProjectListAll = Lists.newArrayList();
|
|
|
|
+ for (String key : overDueNotReportedProjectIdListAllMap.keySet()) {
|
|
|
|
+ if(officeInfo.getId().equals(key) || key.contains(officeInfo.getId())){
|
|
|
|
+ List<ReportDataEntity> reportDataEntities = overDueNotReportedProjectIdListAllMap.get(key);
|
|
|
|
+ overDueNotReportedProjectListAll.addAll(reportDataEntities);
|
|
|
|
+ comprehensiveInfo.setField7(String.valueOf(Integer.parseInt(comprehensiveInfo.getField7()) + reportDataEntities.size()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //comprehensiveInfo.setField7(String.valueOf(overDueNotReportedProjectIdListAll.size()));
|
|
|
|
+ List<StatementDataInfo> overDueNotReportedProjectList = Lists.newArrayList();
|
|
|
|
+ for (ReportDataEntity peportDataEntity : overDueNotReportedProjectListAll) {
|
|
|
|
+ String projectId = peportDataEntity.getFieldId();
|
|
|
|
+ StatementDataInfo info = new StatementDataInfo();
|
|
|
|
+ info.setStatementDate(statementDate);
|
|
|
|
+ info.setGradeType("1");
|
|
|
|
+ info.setType("1");
|
|
|
|
+ info.setYear(String.valueOf(year));
|
|
|
|
+ info.setBigDateType(bigDateType.toString());
|
|
|
|
+ info.setSmallDateType(smallDateType.toString());
|
|
|
|
+ info.setOfficeId(officeInfo.getId());
|
|
|
|
+ info.setField3(projectId);
|
|
|
|
+ overDueNotReportedProjectList.add(info);
|
|
|
|
+ }
|
|
|
|
+ if(overDueNotReportedProjectList.size()>0){
|
|
|
|
+ //每次删除之前存的数据
|
|
|
|
+ for (StatementDataInfo statementDataInfo: overDueNotReportedProjectList) {
|
|
|
|
+ dao.deleteStatementDataInfoByYear(statementDataInfo);
|
|
|
|
+ }
|
|
|
|
+ dao.insertStatementDataInfoByYear(overDueNotReportedProjectList);
|
|
|
|
+ }
|
|
|
|
+ //查询上报超期上报项目数量(保存到数据库)
|
|
|
|
+ //List<String> overDueReportedProjectIdList = dao.getOverDueReportedProject(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ List<ReportDataEntity> overDueReportedProjectListAll = Lists.newArrayList();
|
|
|
|
+ for (String key : overDueReportedProjectIdListAllMap.keySet()) {
|
|
|
|
+ if(officeInfo.getId().equals(key) || key.contains(officeInfo.getId())){
|
|
|
|
+ List<ReportDataEntity> reportDataEntities = overDueReportedProjectIdListAllMap.get(key);
|
|
|
|
+ overDueReportedProjectListAll.addAll(reportDataEntities);
|
|
|
|
+ comprehensiveInfo.setField8(String.valueOf(Integer.parseInt(comprehensiveInfo.getField8()) + reportDataEntities.size()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //comprehensiveInfo.setField8(String.valueOf(overDueReportedProjectIdList.size()));
|
|
|
|
+ List<StatementDataInfo> overDueReportedProjectList = Lists.newArrayList();
|
|
|
|
+ for (ReportDataEntity peportDataEntity : overDueReportedProjectListAll) {
|
|
|
|
+ String projectId = peportDataEntity.getFieldId();
|
|
|
|
+ StatementDataInfo info = new StatementDataInfo();
|
|
|
|
+ info.setStatementDate(statementDate);
|
|
|
|
+ info.setGradeType("1");
|
|
|
|
+ info.setType("1");
|
|
|
|
+ info.setYear(String.valueOf(year));
|
|
|
|
+ info.setBigDateType(bigDateType.toString());
|
|
|
|
+ info.setSmallDateType(smallDateType.toString());
|
|
|
|
+ info.setOfficeId(officeInfo.getId());
|
|
|
|
+ info.setField4(projectId);
|
|
|
|
+ overDueReportedProjectList.add(info);
|
|
|
|
+ }
|
|
|
|
+ if(overDueReportedProjectList.size()>0){
|
|
|
|
+ //每次删除之前存的数据
|
|
|
|
+ for (StatementDataInfo statementDataInfo: overDueReportedProjectList) {
|
|
|
|
+ dao.deleteStatementDataInfoByYear(statementDataInfo);
|
|
|
|
+ }
|
|
|
|
+ dao.insertStatementDataInfoByYear(overDueReportedProjectList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //数据处理并保存到数据库中
|
|
|
|
+ comprehensiveInfo.preInsert();
|
|
|
|
+ //每次都要删除之前的数据
|
|
|
|
+ dao.deleteByYear(comprehensiveInfo);
|
|
|
|
+ dao.insertByYear(comprehensiveInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 公司级数据分组
|
|
* 公司级数据分组
|
|
* @param dataList
|
|
* @param dataList
|
|
@@ -869,8 +1067,90 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
- * 公司级报销记录月报/季报/年报汇总方法
|
|
|
|
|
|
+ * 公司级开票记录月报/季报/年报汇总方法
|
|
|
|
+ * @param beginDate 开始时间
|
|
|
|
+ * @param endDate 结束时间
|
|
|
|
+ * @param statementDate 报表时间
|
|
|
|
+ * @param bigDateType 状态1(0:年;1:季度;2:月份)
|
|
|
|
+ * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
|
|
|
|
+ * @param officeList 部门信息
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void disposeStatementCompanyInvoiceByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
|
|
|
|
+ //查询新增发票信息
|
|
|
|
+ List<ReportDataEntity> field1All = dao.getInsertInvoiceCountByOfficeAll(beginDate, endDate);
|
|
|
|
+ //查询开票金额总额
|
|
|
|
+ List<ReportDataEntity> field2All = dao.getInsertInvoiceSumMoneyByOfficeAll(beginDate, endDate);
|
|
|
|
+ //查询本月收款发票
|
|
|
|
+ List<ReportDataEntity> field3All = dao.getInsertInvoiceDetailsCountByOfficeAll(beginDate, endDate);
|
|
|
|
+ //查询本月收款
|
|
|
|
+ List<ReportDataEntity> field4All = dao.getInsertInvoiceDetailsSumMoneyByOfficeAll(beginDate, endDate);
|
|
|
|
+
|
|
|
|
+ for (Office officeInfo : officeList) {
|
|
|
|
+ StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
|
|
|
|
+ comprehensiveInfo.setType("2");
|
|
|
|
+ comprehensiveInfo.setYear(String.valueOf(year));
|
|
|
|
+ comprehensiveInfo.setBigDateType(bigDateType.toString());
|
|
|
|
+ comprehensiveInfo.setSmallDateType(smallDateType.toString());
|
|
|
|
+ comprehensiveInfo.setStatementDate(statementDate);
|
|
|
|
+ comprehensiveInfo.setOfficeId(officeInfo.getId());
|
|
|
|
+
|
|
|
|
+ //查询新增发票信息
|
|
|
|
+ /*Integer field1 = dao.getInsertInvoiceCountByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField1(field1.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: field1All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询开票金额总额
|
|
|
|
+ /*String field2 = dao.getInsertInvoiceSumMoneyByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField2(field2);*/
|
|
|
|
+ for (ReportDataEntity reportData: field2All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField2(String.valueOf(new BigDecimal(comprehensiveInfo.getField2()).add(new BigDecimal(reportData.getVariableElement()))));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询本月收款发票
|
|
|
|
+ /*Integer field3 = dao.getInsertInvoiceDetailsCountByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField3(field3.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: field3All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField3(String.valueOf(Integer.parseInt(comprehensiveInfo.getField3()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询本月收款
|
|
|
|
+ /*String field4 = dao.getInsertInvoiceDetailsSumMoneyByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField4(field4);*/
|
|
|
|
+ for (ReportDataEntity reportData: field4All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField4(String.valueOf(new BigDecimal(comprehensiveInfo.getField4()).add(new BigDecimal(reportData.getVariableElement()))));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //对金额数据进行处理和四舍五入
|
|
|
|
+ if(StringUtils.isNotBlank(comprehensiveInfo.getField2())){
|
|
|
|
+ BigDecimal b = new BigDecimal(comprehensiveInfo.getField2());
|
|
|
|
+ comprehensiveInfo.setField2(String.valueOf(b.setScale(2, BigDecimal.ROUND_HALF_UP)));
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotBlank(comprehensiveInfo.getField4())){
|
|
|
|
+ BigDecimal b = new BigDecimal(comprehensiveInfo.getField4());
|
|
|
|
+ comprehensiveInfo.setField4(String.valueOf(b.setScale(2, BigDecimal.ROUND_HALF_UP)));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //数据处理并保存到数据库中
|
|
|
|
+ comprehensiveInfo.preInsert();
|
|
|
|
+ //每次都要删除之前的数据
|
|
|
|
+ dao.deleteByYear(comprehensiveInfo);
|
|
|
|
+ dao.insertByYear(comprehensiveInfo);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 年报汇总方法
|
|
* @param beginDate 开始时间
|
|
* @param beginDate 开始时间
|
|
* @param endDate 结束时间
|
|
* @param endDate 结束时间
|
|
*/
|
|
*/
|
|
@@ -920,6 +1200,58 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 公司级年度报销
|
|
|
|
+ * @param beginDate 开始时间
|
|
|
|
+ * @param endDate 结束时间
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void disposeStatementCompanyReimbursementByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
|
|
|
|
+
|
|
|
|
+ //查询新增报销信息
|
|
|
|
+ List<ReportDataEntity> field1All = dao.getInsertReimbursementCountByOfficeAll(beginDate, endDate);
|
|
|
|
+ //查询报销金额总额
|
|
|
|
+ List<ReportDataEntity> field2All = dao.getInsertReimbursementSumMoneyByOfficeAll(beginDate, endDate);
|
|
|
|
+
|
|
|
|
+ for (Office officeInfo : officeList) {
|
|
|
|
+ StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
|
|
|
|
+ comprehensiveInfo.setType("3");
|
|
|
|
+ comprehensiveInfo.setYear(String.valueOf(year));
|
|
|
|
+ comprehensiveInfo.setBigDateType(bigDateType.toString());
|
|
|
|
+ comprehensiveInfo.setSmallDateType(smallDateType.toString());
|
|
|
|
+ comprehensiveInfo.setStatementDate(statementDate);
|
|
|
|
+ comprehensiveInfo.setOfficeId(officeInfo.getId());
|
|
|
|
+ //查询新增报销信息
|
|
|
|
+ /*Integer field1 = dao.getInsertReimbursementCountByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField1(field1.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: field1All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询报销金额总额
|
|
|
|
+ /*String field2 = dao.getInsertReimbursementSumMoneyByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField2(field2);*/
|
|
|
|
+ for (ReportDataEntity reportData: field2All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField2(String.valueOf(new BigDecimal(comprehensiveInfo.getField2()).add(new BigDecimal(reportData.getVariableElement()))));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //对金额数据进行处理和四舍五入
|
|
|
|
+ if(StringUtils.isNotBlank(comprehensiveInfo.getField2())){
|
|
|
|
+ BigDecimal b = new BigDecimal(comprehensiveInfo.getField2());
|
|
|
|
+ comprehensiveInfo.setField2(String.valueOf(b.setScale(2, BigDecimal.ROUND_HALF_UP)));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //数据处理并保存到数据库中
|
|
|
|
+ comprehensiveInfo.preInsert();
|
|
|
|
+ //每次都要删除之前的数据
|
|
|
|
+ dao.deleteByYear(comprehensiveInfo);
|
|
|
|
+ dao.insertByYear(comprehensiveInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 公司级合同记录月报/季报/年报汇总方法
|
|
* 公司级合同记录月报/季报/年报汇总方法
|
|
* @param beginDate 开始时间
|
|
* @param beginDate 开始时间
|
|
@@ -1044,6 +1376,129 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 公司级合同记录年报汇总方法
|
|
|
|
+ * @param beginDate 开始时间
|
|
|
|
+ * @param endDate 结束时间
|
|
|
|
+ */
|
|
|
|
+ @Transactional(readOnly = false)
|
|
|
|
+ public void disposeStatementCompanyContractByYear(Integer year,String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
|
|
|
|
+
|
|
|
|
+ //查询新增合同信息
|
|
|
|
+ List<ReportDataEntity> field1All = dao.getInsertContractCountByOfficeAll( beginDate, endDate);
|
|
|
|
+ //查询本月纸质归档合同信息
|
|
|
|
+ List<ReportDataEntity> field2All = dao.getInsertContractRecordCountByOfficeAll( beginDate, endDate);
|
|
|
|
+ //查询超期未归档合同信息
|
|
|
|
+ List<ReportDataEntity> field3All = dao.getOverDueNotContractRecordCountByOfficeAll();
|
|
|
|
+ //查询超期归档合同信息
|
|
|
|
+ List<ReportDataEntity> field4All = dao.getOverDueContractRecordCountByOfficeAll( beginDate, endDate);
|
|
|
|
+ //查询电子归档超期未归档项目数量(分组)
|
|
|
|
+ Map<String, List<ReportDataEntity>> field3AllMap = dataMessageDispose(field3All);
|
|
|
|
+ //分组
|
|
|
|
+ Map<String, List<ReportDataEntity>> field4AllMap = dataMessageDispose(field4All);
|
|
|
|
+
|
|
|
|
+ for (Office officeInfo : officeList) {
|
|
|
|
+ StatementCompanyComprehensiveInfo comprehensiveInfo = new StatementCompanyComprehensiveInfo();
|
|
|
|
+ comprehensiveInfo.setType("4");
|
|
|
|
+ comprehensiveInfo.setYear(String.valueOf(year));
|
|
|
|
+ comprehensiveInfo.setBigDateType(bigDateType.toString());
|
|
|
|
+ comprehensiveInfo.setSmallDateType(smallDateType.toString());
|
|
|
|
+ comprehensiveInfo.setStatementDate(statementDate);
|
|
|
|
+ comprehensiveInfo.setOfficeId(officeInfo.getId());
|
|
|
|
+
|
|
|
|
+ //查询新增合同信息
|
|
|
|
+ /*Integer field1 = dao.getInsertContractCountByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField1(field1.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: field1All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField1(String.valueOf(Integer.parseInt(comprehensiveInfo.getField1()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询本月纸质归档合同信息
|
|
|
|
+ /*Integer field2 = dao.getInsertContractRecordCountByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField2(field2.toString());*/
|
|
|
|
+ for (ReportDataEntity reportData: field2All) {
|
|
|
|
+ if(officeInfo.getId().equals(reportData.getOfficeId()) || reportData.getOfficeParentIds().contains(officeInfo.getId())){
|
|
|
|
+ comprehensiveInfo.setField2(String.valueOf(Integer.parseInt(comprehensiveInfo.getField2()) + reportData.getCount()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //查询超期未归档合同信息
|
|
|
|
+ /*List<String> overDueNotContractIdList = dao.getOverDueNotContractRecordCountByOffice(officeInfo.getId());
|
|
|
|
+ comprehensiveInfo.setField3(String.valueOf(overDueNotContractIdList.size()));*/
|
|
|
|
+ List<ReportDataEntity> field3ListAll = Lists.newArrayList();
|
|
|
|
+ for (String key : field3AllMap.keySet()) {
|
|
|
|
+ if(officeInfo.getId().equals(key) || key.contains(officeInfo.getId())){
|
|
|
|
+ List<ReportDataEntity> reportDataEntities = field3AllMap.get(key);
|
|
|
|
+ field3ListAll.addAll(reportDataEntities);
|
|
|
|
+ comprehensiveInfo.setField3(String.valueOf(Integer.parseInt(comprehensiveInfo.getField3()) + reportDataEntities.size()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<StatementDataInfo> overDueNotContractList = Lists.newArrayList();
|
|
|
|
+ for (ReportDataEntity peportDataEntity : field3ListAll) {
|
|
|
|
+ String contract = peportDataEntity.getFieldId();
|
|
|
|
+ StatementDataInfo info = new StatementDataInfo();
|
|
|
|
+ info.setStatementDate(statementDate);
|
|
|
|
+ info.setGradeType("1");
|
|
|
|
+ info.setType("4");
|
|
|
|
+ info.setYear(String.valueOf(year));
|
|
|
|
+ info.setBigDateType(bigDateType.toString());
|
|
|
|
+ info.setSmallDateType(smallDateType.toString());
|
|
|
|
+ info.setOfficeId(officeInfo.getId());
|
|
|
|
+ info.setField1(contract);
|
|
|
|
+ overDueNotContractList.add(info);
|
|
|
|
+ }
|
|
|
|
+ if(overDueNotContractList.size()>0){
|
|
|
|
+ //每次删除之前存的数据
|
|
|
|
+ for (StatementDataInfo statementDataInfo: overDueNotContractList) {
|
|
|
|
+ dao.deleteStatementDataInfo(statementDataInfo);
|
|
|
|
+ }
|
|
|
|
+ dao.insertStatementDataInfo(overDueNotContractList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //查询超期归档合同信息
|
|
|
|
+ /*List<String> overDueContractIdList = dao.getOverDueContractRecordCountByOffice(officeInfo.getId(), beginDate, endDate);
|
|
|
|
+ comprehensiveInfo.setField4(String.valueOf(overDueContractIdList.size()));*/
|
|
|
|
+ List<ReportDataEntity> field4ListAll = Lists.newArrayList();
|
|
|
|
+ for (String key : field4AllMap.keySet()) {
|
|
|
|
+ if(officeInfo.getId().equals(key) || key.contains(officeInfo.getId())){
|
|
|
|
+ List<ReportDataEntity> reportDataEntities = field4AllMap.get(key);
|
|
|
|
+ field4ListAll.addAll(reportDataEntities);
|
|
|
|
+ comprehensiveInfo.setField4(String.valueOf(Integer.parseInt(comprehensiveInfo.getField4()) + reportDataEntities.size()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ List<StatementDataInfo> overDueContractList = Lists.newArrayList();
|
|
|
|
+ for (ReportDataEntity peportDataEntity : field4ListAll) {
|
|
|
|
+ String contract = peportDataEntity.getFieldId();
|
|
|
|
+ StatementDataInfo info = new StatementDataInfo();
|
|
|
|
+ info.setStatementDate(statementDate);
|
|
|
|
+ info.setGradeType("1");
|
|
|
|
+ info.setType("4");
|
|
|
|
+ info.setYear(String.valueOf(year));
|
|
|
|
+ info.setBigDateType(bigDateType.toString());
|
|
|
|
+ info.setSmallDateType(smallDateType.toString());
|
|
|
|
+ info.setOfficeId(officeInfo.getId());
|
|
|
|
+ info.setField2(contract);
|
|
|
|
+ overDueContractList.add(info);
|
|
|
|
+ }
|
|
|
|
+ if(overDueContractList.size()>0){
|
|
|
|
+ //每次删除之前存的数据
|
|
|
|
+ for (StatementDataInfo statementDataInfo: overDueContractList) {
|
|
|
|
+ dao.deleteStatementDataInfo(statementDataInfo);
|
|
|
|
+ }
|
|
|
|
+ dao.insertStatementDataInfo(overDueContractList);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //数据处理并保存到数据库中
|
|
|
|
+ comprehensiveInfo.preInsert();
|
|
|
|
+ //每次都要删除之前的数据
|
|
|
|
+ dao.deleteByYear(comprehensiveInfo);
|
|
|
|
+ dao.insertByYear(comprehensiveInfo);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 根据状态获取查询得开始和结束时间
|
|
* 根据状态获取查询得开始和结束时间
|
|
@@ -1768,6 +2223,16 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ //根据公司级报告查询所有的表内容
|
|
|
|
+ public List<StatementCompanyComprehensiveInfo> selectAllByTypeInYearReportByYear(StatementCompanyComprehensiveInfo info){
|
|
|
|
+ List<StatementCompanyComprehensiveInfo> list = dao.selectAllByTypeByYear(info);
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 部门级 所有报表信息
|
|
* 部门级 所有报表信息
|
|
* @param year 年份
|
|
* @param year 年份
|