فهرست منبع

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java
#	src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java
#	src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractInfoDao.java
#	src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
#	src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml
#	src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml
[user3] 3 سال پیش
والد
کامیت
4d58313ac9
34فایلهای تغییر یافته به همراه2688 افزوده شده و 144 حذف شده
  1. 9 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/PresignCallBack.java
  2. 9 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsReported.java
  3. 1 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java
  4. 52 2
      src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/JudgementThread.java
  5. 9 9
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureCallBackController.java
  6. 176 0
      src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java
  7. 18 0
      src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java
  8. 18 0
      src/main/java/com/jeeplus/modules/statement/entity/StatementDataInfo.java
  9. 458 4
      src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java
  10. 31 82
      src/main/java/com/jeeplus/modules/workcalendar/service/WorkCalendarTaskService.java
  11. 2 0
      src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractInfoDao.java
  12. 63 0
      src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java
  13. 10 0
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java
  14. 583 0
      src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoTookDisposeService.java
  15. 4 1
      src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java
  16. 17 1
      src/main/java/com/jeeplus/modules/workcontractrecord/dao/WorkContractRecordDao.java
  17. 1 1
      src/main/java/com/jeeplus/modules/workcontractrecord/entity/WorkContractRecord.java
  18. 76 0
      src/main/java/com/jeeplus/modules/workcontractrecord/service/WorkContractRecordService.java
  19. 2 0
      src/main/java/com/jeeplus/modules/workcontractrecord/web/WorkContractRecordController.java
  20. 60 0
      src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java
  21. 9 0
      src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java
  22. 1 0
      src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java
  23. 62 5
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml
  24. 3 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsReported.xml
  25. 317 0
      src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml
  26. 32 6
      src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml
  27. 130 21
      src/main/resources/mappings/modules/workcontractrecord/WorkContractRecordDao.xml
  28. 3 0
      src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml
  29. 6 6
      src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp
  30. 513 0
      src/main/webapp/webpage/modules/ruralprojectrecords/compress/projectFileForm.jsp
  31. 8 1
      src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordForm.jsp
  32. 1 1
      src/main/webapp/webpage/modules/workclientinfo/all/workClientInfoForm.jsp
  33. 1 1
      src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp
  34. 3 3
      src/main/webapp/webpage/modules/workcontractinfo/workContractInfoAllList.jsp

+ 9 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/PresignCallBack.java

@@ -18,6 +18,7 @@ public class PresignCallBack {
     private String operatorMobile;  //操作人手机号
     private String operatorMobile;  //操作人手机号
     private String operatorNumber;  //操作人员工编号
     private String operatorNumber;  //操作人员工编号
     private String receiverNumber;  //经办人员工编号
     private String receiverNumber;  //经办人员工编号
+    private String fileDownloadUrl;  //文件归档下载地址
 
 
     public String getContractId() {
     public String getContractId() {
         return contractId;
         return contractId;
@@ -114,4 +115,12 @@ public class PresignCallBack {
     public void setReceiverNumber(String receiverNumber) {
     public void setReceiverNumber(String receiverNumber) {
         this.receiverNumber = receiverNumber;
         this.receiverNumber = receiverNumber;
     }
     }
+
+    public String getFileDownloadUrl() {
+        return fileDownloadUrl;
+    }
+
+    public void setFileDownloadUrl(String fileDownloadUrl) {
+        this.fileDownloadUrl = fileDownloadUrl;
+    }
 }
 }

+ 9 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsReported.java

@@ -120,6 +120,7 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 	private String designIncome;	//设计收入
 	private String designIncome;	//设计收入
 	private String otherIncome;	//其他收入
 	private String otherIncome;	//其他收入
 	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();	//附件信息
 	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();	//附件信息
+	private Date accomplishDate;	//审核通过时间
 
 
 	public WorkContractInfo getWorkContractInfo() {
 	public WorkContractInfo getWorkContractInfo() {
 		return workContractInfo;
 		return workContractInfo;
@@ -792,4 +793,12 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 	public void setChargeCriterionList(List<String> chargeCriterionList) {
 	public void setChargeCriterionList(List<String> chargeCriterionList) {
 		this.chargeCriterionList = chargeCriterionList;
 		this.chargeCriterionList = chargeCriterionList;
 	}
 	}
+
+	public Date getAccomplishDate() {
+		return accomplishDate;
+	}
+
+	public void setAccomplishDate(Date accomplishDate) {
+		this.accomplishDate = accomplishDate;
+	}
 }
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -3887,6 +3887,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                     return "上报失败:" + hashMap.get("msg").toString();
                                     return "上报失败:" + hashMap.get("msg").toString();
                                 }
                                 }
                                 //修改项目上报表中状态
                                 //修改项目上报表中状态
+                                reported.setAccomplishDate(new Date());
                                 reported.setReportStatus(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
                                 reported.setReportStatus(String.valueOf(ProjectStatusEnum.SIGNED.getValue()));
 
 
                                 //修改项目表中上报状态
                                 //修改项目表中上报状态

+ 52 - 2
src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/JudgementThread.java

@@ -201,9 +201,9 @@ public class JudgementThread extends Thread {
                 //签章完成则进行数据的保存
                 //签章完成则进行数据的保存
                 //notification(bool,disposeResult,documentId,contractId,srcFileName);
                 //notification(bool,disposeResult,documentId,contractId,srcFileName);
             }else{
             }else{
-                disposeResult = "审定单文件未找到,无法进行签章操作";
+                disposeResult = "审定单文件未找到,无文件签章";
                 bool = false;
                 bool = false;
-                notification(bool,disposeResult,"","","");
+                notFileNotification();
             }
             }
         }catch (Exception e){
         }catch (Exception e){
             if(StringUtils.isBlank(documentId)){
             if(StringUtils.isBlank(documentId)){
@@ -329,5 +329,55 @@ public class JudgementThread extends Thread {
 
 
 
 
     }
     }
+
+    private void notFileNotification(){
+
+            //users.add(projectReportSignature.getCreateBy());
+            //审核完成提示框
+            String title = "报告号【"+projectReportData.getNumber()+"】审定(内)无签章文件签章完成。";
+            String content = "报告号【"+projectReportData.getNumber()+"】审定(内)无签章文件签章完成。";
+            if ("yes".equals(projectReportData.getAct().getFlag())) {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(projectReportData.getId());
+                //userList = workProjectNotifyService.readByNotifyId(notify);
+                //users.add(projectReportSignature.getCreateBy());
+                workProjectNotifyService
+                        .save(UtilNotify
+                                .saveNotify(projectReportData.getId(),
+                                        projectReportData.getCreateBy(),
+                                        projectReportData.getCompanyId(),
+                                        title,
+                                        content,
+                                        "105",
+                                        "0",
+                                        "待通知",
+                                        "审批通过"));
+                workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());
+
+            } else {
+                WorkProjectNotify notify = new WorkProjectNotify();
+                notify.setNotifyId(projectReportData.getId());
+                //userList = workProjectNotifyService.readByNotifyId(notify);
+                //users.add(projectReportSignature.getCreateBy());
+                if (StringUtils.isNotBlank(projectReportData.getStatus()) && !projectReportData.getStatus().equals("3")){
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(projectReportData.getId(),
+                                            projectReportData.getCreateBy(),
+                                            projectReportData.getCompanyId(),
+                                            title,
+                                            content,
+                                            "105",
+                                            "0",
+                                            "待通知",
+                                            "审批通过"));
+                }
+                workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());
+            }
+
+            projectReportData.setStatus("5");
+            dao.update(projectReportData);
+
+    }
 }
 }
 
 

+ 9 - 9
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectSignatureCallBackController.java

@@ -342,6 +342,13 @@ public class RuralProjectSignatureCallBackController extends BaseController {
         }
         }
         //修改签章信息
         //修改签章信息
 
 
+        //签章完成则进行数据的保存
+        records.setQualitySignatureFlag(1);
+        records.setQualitySignatureDocumentId(presignCallBack.getDocumentId());
+        records.setQualitySignatureContractId(presignCallBack.getContractId());
+        records.setQualitySignatureUploadDate(new Date());
+        //修改签章对应信息文件
+        projectReportDataService.updateJudgementSignatureInfo(records);
         //发送通知
         //发送通知
         String title = "报告号【"+projectReportData.getNumber()+"】审定(内)签章审批登记完成";
         String title = "报告号【"+projectReportData.getNumber()+"】审定(内)签章审批登记完成";
         String content = "报告号【"+projectReportData.getNumber()+"】审定(内)签章审批登记完成,项目编号:"+records.getProjectId();
         String content = "报告号【"+projectReportData.getNumber()+"】审定(内)签章审批登记完成,项目编号:"+records.getProjectId();
@@ -365,17 +372,10 @@ public class RuralProjectSignatureCallBackController extends BaseController {
 
 
             workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());
             workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());
 
 
-            //签章完成则进行数据的保存
-            records.setQualitySignatureFlag(1);
-            records.setQualitySignatureDocumentId(presignCallBack.getDocumentId());
-            records.setQualitySignatureContractId(presignCallBack.getContractId());
-            records.setQualitySignatureUploadDate(new Date());
-            //修改签章对应信息文件
-            projectReportDataService.updateJudgementSignatureInfo(records);
 
 
-            projectReportData.setStatus("5");
-            projectReportDataDao.update(projectReportData);
         }
         }
+        projectReportData.setStatus("5");
+        projectReportDataDao.update(projectReportData);
 
 
 
 
 
 

+ 176 - 0
src/main/java/com/jeeplus/modules/statement/dao/StatementCompanyComprehensiveDao.java

@@ -6,6 +6,7 @@ import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.entity.StatementDataInfo;
 import com.jeeplus.modules.statement.entity.StatementDataInfo;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
 import java.util.List;
 import java.util.List;
@@ -24,6 +25,12 @@ public interface StatementCompanyComprehensiveDao  extends CrudDao<StatementComp
     List<Office> getOfficeListInfo();
     List<Office> getOfficeListInfo();
 
 
     /**
     /**
+     * 根据部门id查询所有子部门信息
+     * @return
+     */
+    List<Office> getChildOfficeList(String id);
+
+    /**
      * 查询所有一级部门信息
      * 查询所有一级部门信息
      * @return
      * @return
      */
      */
@@ -191,19 +198,188 @@ public interface StatementCompanyComprehensiveDao  extends CrudDao<StatementComp
     void insertStatementDataInfo(@Param("dataList")List<StatementDataInfo> statementDataInfoList);
     void insertStatementDataInfo(@Param("dataList")List<StatementDataInfo> statementDataInfoList);
 
 
     /**
     /**
+     * 查询公司级需要通知的人员信息
+     * @return
+     */
+    List<User> getStatementCompanyNotificationUserList();
+
+    /**
+     * 根据部门id查询员工信息
+     * @param officeId
+     * @return
+     */
+    List<User> getUserByOfficeId(String officeId);
+
+    /**
+     * 部门级根据项目等级查询项目信息数量
+     * @param userId 人员id
+     * @param grade 项目等级
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @return
+     */
+    Integer getOfficeInsertProjectCountByGrade(@Param("userId") String userId, @Param("grade")String grade, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+
+    /**
+     * 部门级查询项目归档信息数量
+     * @param userId 人员id
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @return
+     */
+    Integer getOfficeProjectCountByRecord(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 部门级查询项目上报信息数量
+     * @param userId 人员id
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @return
+     */
+    Integer getOfficeProjectCountByReported(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 部门级查询项目归档超期未归档项目id
+     * @param userId 人员id
+     * @return
+     */
+    List<String> getOfficeOverDueNotRecordProject(@Param("userId") String userId);
+    /**
+     * 部门级查询项目归档超期归档项目id
+     * @param userId 人员id
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @return
+     */
+    List<String> getOfficeOverDueRecordProject(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 部门级查询项目上报超期未上报项目id
+     * @param userId 人员id
+     * @return
+     */
+    List<String> getOfficeOverDueNotReportedProject(@Param("userId") String userId);
+    /**
+     * 部门级查询项目上报超期上报项目id
+     * @param userId 人员id
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @return
+     */
+    List<String> getOfficeOverDueReportedProject(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 保存部门级数据信息
+     * @param info
+     * @return
+     */
+    Integer insertOfficeComprehensive(StatementCompanyComprehensiveInfo info);
+
+    /**
+     * 部门级超期、未超期数据存储
+     * @param statementDataInfoList
+     */
+    void insertOfficeStatementDataInfo(@Param("dataList")List<StatementDataInfo> statementDataInfoList);
+
+    /**
+     * 部门级查询发票信息数量
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    Integer getInsertOfficeInvoiceCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 部门级查询发票信息开票金额总和
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    String getInsertOfficeInvoiceSumMoneyByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 部门级查询收款发票数量
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    Integer getInsertOfficeInvoiceDetailsCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+
+    /**
+     * 部门级查询收款发票金额总和
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    String getInsertOfficeInvoiceDetailsSumMoneyByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
      * 按照类型查询公司级所有报表信息
      * 按照类型查询公司级所有报表信息
      * @param statementCompanyComprehensiveInfo
      * @param statementCompanyComprehensiveInfo
      * @return
      * @return
      */
      */
     List<StatementCompanyComprehensiveInfo> selectAllByType(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
     List<StatementCompanyComprehensiveInfo> selectAllByType(StatementCompanyComprehensiveInfo statementCompanyComprehensiveInfo);
 
 
+    /**
+     * 部门级查询新增报销信息
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    Integer getInsertOfficeReimbursementCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
 
 
 //    List<RuralProjectRecords> findAllList(RuralProjectRecords ruralProjectRecords,@Param("officeId") String officeId);
 //    List<RuralProjectRecords> findAllList(RuralProjectRecords ruralProjectRecords,@Param("officeId") String officeId);
 
 
+    /**
+     * 部门级查询报销金额总额
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    String getInsertOfficeReimbursementSumMoneyByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
+
+    /**
+     * 部门级新增合同信息数量
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    Integer getInsertOfficeContractCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
 
 
+    /**
+     * 部门级合同纸质归档数量
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    Integer getInsertOfficeContractRecordCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
 
 
 
 
+    /**
+     * 部门级合同纸质归档超期未归档合同id信息
+     * @param userId
+     * @return
+     */
+    List<String> getOfficeOverDueNotContractRecordCountByOffice(@Param("userId") String userId);
 
 
+    /**
+     * 部门级合同纸质归档超期归档合同id信息
+     * @param userId
+     * @param beginDate
+     * @param endDate
+     * @return
+     */
+    List<String> getOfficeOverDueContractRecordCountByOffice(@Param("userId") String userId, @Param("beginDate")String beginDate, @Param("endDate")String endDate);
 
 
 
 
 
 

+ 18 - 0
src/main/java/com/jeeplus/modules/statement/entity/StatementCompanyComprehensiveInfo.java

@@ -15,7 +15,9 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
     private String smallDateType;   //状态2(针对状态1进行精确所在指定季度或者月份)
     private String smallDateType;   //状态2(针对状态1进行精确所在指定季度或者月份)
     private String statementDate;   //报表时间
     private String statementDate;   //报表时间
     private String officeName;      //部门名称
     private String officeName;      //部门名称
+    private String userId;          //用户id
     private String officeId;        //部门id
     private String officeId;        //部门id
+    private String officeParentIds; //部门parentIds
     private String field1;          //可变字段1(项目:新增A类;    开票:新增发票;   报销:新增报销;合同:新增合同)
     private String field1;          //可变字段1(项目:新增A类;    开票:新增发票;   报销:新增报销;合同:新增合同)
     private String field2;          //可变字段2(项目:新增B类;    开票:开票金额;   报销:报销金额;合同:本月纸质归档)
     private String field2;          //可变字段2(项目:新增B类;    开票:开票金额;   报销:报销金额;合同:本月纸质归档)
     private String field3;          //可变字段3(项目:本月电子归档;开票:本月收款发票;             合同:纸质归档超期未归档)
     private String field3;          //可变字段3(项目:本月电子归档;开票:本月收款发票;             合同:纸质归档超期未归档)
@@ -145,4 +147,20 @@ public class StatementCompanyComprehensiveInfo extends DataEntity<StatementCompa
     public void setField8(String field8) {
     public void setField8(String field8) {
         this.field8 = field8;
         this.field8 = field8;
     }
     }
+
+    public String getOfficeParentIds() {
+        return officeParentIds;
+    }
+
+    public void setOfficeParentIds(String officeParentIds) {
+        this.officeParentIds = officeParentIds;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
 }
 }

+ 18 - 0
src/main/java/com/jeeplus/modules/statement/entity/StatementDataInfo.java

@@ -20,6 +20,8 @@ public class StatementDataInfo extends DataEntity<StatementDataInfo> {
     private String field2;          //可变字段2(项目:电子归档(超期归档);合同:纸质归档(超期归档))
     private String field2;          //可变字段2(项目:电子归档(超期归档);合同:纸质归档(超期归档))
     private String field3;          //可变字段3(项目:上报(超期未上报))
     private String field3;          //可变字段3(项目:上报(超期未上报))
     private String field4;          //可变字段4(项目:上报(超期上报))
     private String field4;          //可变字段4(项目:上报(超期上报))
+    private String userId;          //用户id
+    private String officeParentIds; //部门parentIds
 
 
     public String getYear() {
     public String getYear() {
         return year;
         return year;
@@ -116,4 +118,20 @@ public class StatementDataInfo extends DataEntity<StatementDataInfo> {
     public void setField4(String field4) {
     public void setField4(String field4) {
         this.field4 = field4;
         this.field4 = field4;
     }
     }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getOfficeParentIds() {
+        return officeParentIds;
+    }
+
+    public void setOfficeParentIds(String officeParentIds) {
+        this.officeParentIds = officeParentIds;
+    }
 }
 }

+ 458 - 4
src/main/java/com/jeeplus/modules/statement/service/StatementCompanyComprehensiveService.java

@@ -6,13 +6,14 @@ import com.jeeplus.modules.statement.dao.StatementCompanyComprehensiveDao;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.entity.StatementCompanyComprehensiveInfo;
 import com.jeeplus.modules.statement.entity.StatementDataInfo;
 import com.jeeplus.modules.statement.entity.StatementDataInfo;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
-import java.util.Calendar;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 /**
 /**
  * 公司级报表Service
  * 公司级报表Service
@@ -24,12 +25,19 @@ import java.util.Map;
 @Transactional(readOnly = true)
 @Transactional(readOnly = true)
 public class StatementCompanyComprehensiveService extends CrudService<StatementCompanyComprehensiveDao, StatementCompanyComprehensiveInfo> {
 public class StatementCompanyComprehensiveService extends CrudService<StatementCompanyComprehensiveDao, StatementCompanyComprehensiveInfo> {
 
 
+    @Autowired
+    private WorkProjectNotifyService workProjectNotifyService;
+
     /**
     /**
      * 公司级信息处理
      * 公司级信息处理
      * @param bigDateType 状态1(0:年;1:季度;2:月份)
      * @param bigDateType 状态1(0:年;1:季度;2:月份)
      * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
      * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
      */
      */
     public void disposeStatementCompany(Integer bigDateType,Integer smallDateType){
     public void disposeStatementCompany(Integer bigDateType,Integer smallDateType){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        int year = cal.get(Calendar.YEAR);
+
         Map<String, String> dateMap = getDate(bigDateType, smallDateType);
         Map<String, String> dateMap = getDate(bigDateType, smallDateType);
         //开始时间
         //开始时间
         String beginDate = dateMap.get("beginDate");
         String beginDate = dateMap.get("beginDate");
@@ -46,6 +54,81 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         disposeStatementCompanyReimbursement(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
         disposeStatementCompanyReimbursement(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
         //公司级合同处理
         //公司级合同处理
         disposeStatementCompanyContract(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
         disposeStatementCompanyContract(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+
+        //创建utilNotifyId参数
+        //参数是由 year、bigDateType、smallDateType参数设定
+        String utilNotifyId = year + "," + bigDateType + "," + smallDateType;
+        //发送通知
+        switch (bigDateType){
+            //年度汇总
+            case 0:
+                companyNotification(statementDate,"年","161",utilNotifyId);
+                break;
+            //季度汇总
+            case 1:
+                //smallDateType  为季度时候
+                companyNotification(statementDate,"季","162",utilNotifyId);
+                break;
+            //月度汇总
+            case 2:
+                //smallDateType  为月度时候
+                companyNotification(statementDate,"月","163",utilNotifyId);
+                break;
+        }
+    }
+
+    /**
+     * 公司级通知
+     * @param statementDate
+     * @param type
+     * @param notificationType
+     * @param utilNotifyId
+     */
+    public void companyNotification(String statementDate,String type,String notificationType,String utilNotifyId){
+        String notifyStr = statementDate + "-公司级 " + type + "报";
+        String titleStr = statementDate + "-公司级 " + type + "报";
+
+        //查询公司级需要通知的人员信息
+        List<User> statementCompanyNotificationUserList = dao.getStatementCompanyNotificationUserList();
+        for (User user: statementCompanyNotificationUserList) {
+            workProjectNotifyService
+                    .save(UtilNotify.saveNotify(utilNotifyId,
+                            user,
+                            user.getCompany().getId(),
+                            titleStr,
+                            notifyStr,
+                            notificationType,
+                            "0",
+                            "待通知",
+                            ""));
+        }
+    }
+
+    /**
+     * 部门级通知
+     * @param statementDate
+     * @param type
+     * @param notificationType
+     * @param utilNotifyId
+     */
+    public void officeNotification(String statementDate,String type,String notificationType,String utilNotifyId){
+        String notifyStr = statementDate + "-部门级 " + type + "报";
+        String titleStr = statementDate + "-部门级 " + type + "报";
+
+        //查询公司级需要通知的人员信息
+        List<User> statementCompanyNotificationUserList = dao.getStatementCompanyNotificationUserList();
+        for (User user: statementCompanyNotificationUserList) {
+            workProjectNotifyService
+                    .save(UtilNotify.saveNotify(utilNotifyId,
+                            user,
+                            user.getCompany().getId(),
+                            titleStr,
+                            notifyStr,
+                            notificationType,
+                            "0",
+                            "待通知",
+                            ""));
+        }
     }
     }
 
 
     /**
     /**
@@ -391,6 +474,377 @@ public class StatementCompanyComprehensiveService extends CrudService<StatementC
         return map;
         return map;
     }
     }
 
 
+
+    /**
+     * 部门级信息处理
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     */
+    public void disposeStatementOffice(Integer bigDateType,Integer smallDateType){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        int year = cal.get(Calendar.YEAR);
+
+        Map<String, String> dateMap = getDate(bigDateType, smallDateType);
+        //开始时间
+        String beginDate = dateMap.get("beginDate");
+        //结束时间
+        String endDate = dateMap.get("endDate");
+        String statementDate = dateMap.get("statementDate");
+        //部门级项目处理
+        disposeStatementOfficeProject(beginDate,endDate,statementDate,bigDateType, smallDateType);
+        //查询部门信息
+        List<Office> officeList = dao.getAllOfficeListInfo();
+        //部门级开票处理
+        disposeStatementOfficeInvoice(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+        //部门级报销处理
+        disposeStatementOfficeReimbursement(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+        //部门级合同处理
+        disposeStatementOfficeContract(beginDate,endDate,statementDate,bigDateType, smallDateType,officeList);
+
+        //创建utilNotifyId参数
+        //参数是由 year、bigDateType、smallDateType参数设定
+        String utilNotifyId = year + "," + bigDateType + "," + smallDateType;
+        //发送通知
+        /*switch (bigDateType){
+            //年度汇总
+            case 0:
+                officeNotification(statementDate,"年","164",utilNotifyId);
+                break;
+            //季度汇总
+            case 1:
+                //smallDateType  为季度时候
+                officeNotification(statementDate,"季","165",utilNotifyId);
+                break;
+            //月度汇总
+            case 2:
+                //smallDateType  为月度时候
+                officeNotification(statementDate,"月","166",utilNotifyId);
+                break;
+        }*/
+    }
+
+    /**
+     * 部门级项目月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @param statementDate 报表时间
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeProject(String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        int year = cal.get(Calendar.YEAR);
+        //查询部门信息
+        List<Office> officeList = dao.getOfficeListInfo();
+        for (Office officeInfo : officeList) {
+            //查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    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(user.getOffice().getId());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增A类项目数量
+                    Integer projectCountByA = dao.getOfficeInsertProjectCountByGrade(user.getId(), "2", beginDate, endDate);
+                    comprehensiveInfo.setField1(projectCountByA.toString());
+                    //查询新增B类项目数量
+                    Integer projectCountByB = dao.getOfficeInsertProjectCountByGrade(user.getId(), "1", beginDate, endDate);
+                    comprehensiveInfo.setField2(projectCountByB.toString());
+                    //查询本月电子归档项目数量
+                    Integer getProjectCountByRecord = dao.getOfficeProjectCountByRecord(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField3(getProjectCountByRecord.toString());
+                    //查询本月上报项目数量
+                    Integer getProjectCountByReported = dao.getOfficeProjectCountByReported(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField4(getProjectCountByReported.toString());
+                    //查询电子归档超期未归档项目数量(保存到数据库)
+                    List<String> overDueNotRecordProjectIdList = dao.getOfficeOverDueNotRecordProject(user.getId());
+                    comprehensiveInfo.setField5(String.valueOf(overDueNotRecordProjectIdList.size()));
+                    List<StatementDataInfo> overDueNotRecordProjectList = Lists.newArrayList();
+                    for (String projectId : overDueNotRecordProjectIdList) {
+                        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(user.getOffice().getId());
+                        info.setField1(projectId);
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueNotRecordProjectList.add(info);
+                    }
+                    if(overDueNotRecordProjectList.size()>0){
+                        dao.insertOfficeStatementDataInfo(overDueNotRecordProjectList);
+                    }
+                    //查询电子归档超期归档项目数量(保存到数据库)
+                    List<String> overDueRecordProjectIdList = dao.getOfficeOverDueRecordProject(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField6(String.valueOf(overDueRecordProjectIdList.size()));
+                    List<StatementDataInfo> overDueRecordProjectList = Lists.newArrayList();
+                    for (String projectId : overDueRecordProjectIdList) {
+                        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(user.getOffice().getId());
+                        info.setField2(projectId);
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueRecordProjectList.add(info);
+                    }
+                    if(overDueRecordProjectList.size()>0){
+                        dao.insertOfficeStatementDataInfo(overDueRecordProjectList);
+                    }
+                    //查询上报超期未上报项目数量(保存到数据库)
+                    List<String> overDueNotReportedProjectIdList = dao.getOfficeOverDueNotReportedProject(user.getId());
+                    comprehensiveInfo.setField7(String.valueOf(overDueNotReportedProjectIdList.size()));
+                    List<StatementDataInfo> overDueNotReportedProjectList = Lists.newArrayList();
+                    for (String projectId : overDueNotReportedProjectIdList) {
+                        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(user.getOffice().getId());
+                        info.setField3(projectId);
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueNotReportedProjectList.add(info);
+                    }
+                    if(overDueNotReportedProjectList.size()>0){
+                        dao.insertOfficeStatementDataInfo(overDueNotReportedProjectList);
+                    }
+                    //查询上报超期上报项目数量(保存到数据库)
+                    List<String> overDueReportedProjectIdList = dao.getOfficeOverDueReportedProject(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField8(String.valueOf(overDueReportedProjectIdList.size()));
+                    List<StatementDataInfo> overDueReportedProjectList = Lists.newArrayList();
+                    for (String projectId : overDueReportedProjectIdList) {
+                        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(user.getOffice().getId());
+                        info.setField4(projectId);
+                        info.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        overDueReportedProjectList.add(info);
+                    }
+                    if(overDueReportedProjectList.size()>0){
+                        dao.insertOfficeStatementDataInfo(overDueReportedProjectList);
+                    }
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    dao.insertOfficeComprehensive(comprehensiveInfo);
+                }
+            }
+        }
+    }
+
+    /**
+     * 部门级开票记录月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     * @param statementDate 报表时间
+     * @param bigDateType 状态1(0:年;1:季度;2:月份)
+     * @param smallDateType 状态2(针对状态1进行精确所在指定季度或者月份)
+     * @param officeList 部门信息
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeInvoice(String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        int year = cal.get(Calendar.YEAR);
+
+        for (Office officeInfo : officeList) {
+            //查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    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(user.getOffice().getId());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增发票信息
+                    Integer field1 = dao.getInsertOfficeInvoiceCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField1(field1.toString());
+                    //查询开票金额总额
+                    String field2 = dao.getInsertOfficeInvoiceSumMoneyByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField2(field2);
+                    //查询本月收款发票
+                    Integer field3 = dao.getInsertOfficeInvoiceDetailsCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField3(field3.toString());
+                    //查询本月收款
+                    String field4 = dao.getInsertOfficeInvoiceDetailsSumMoneyByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField4(field4);
+
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    dao.insertOfficeComprehensive(comprehensiveInfo);
+                }
+            }
+
+
+        }
+    }
+
+    /**
+     * 公司级报销记录月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeReimbursement(String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        int year = cal.get(Calendar.YEAR);
+
+        for (Office officeInfo : officeList) {
+            //查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    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());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增报销信息
+                    Integer field1 = dao.getInsertOfficeReimbursementCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField1(field1.toString());
+                    //查询报销金额总额
+                    String field2 = dao.getInsertOfficeReimbursementSumMoneyByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField2(field2);
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    dao.insertOfficeComprehensive(comprehensiveInfo);
+                }
+            }
+
+        }
+    }
+
+    /**
+     * 公司级合同记录月报/季报/年报汇总方法
+     * @param beginDate 开始时间
+     * @param endDate 结束时间
+     */
+    @Transactional(readOnly = false)
+    public void disposeStatementOfficeContract(String beginDate,String endDate,String statementDate,Integer bigDateType,Integer smallDateType,List<Office> officeList){
+        Calendar cal = Calendar.getInstance();
+        //获取当前年份
+        int year = cal.get(Calendar.YEAR);
+
+        for (Office officeInfo : officeList) {//查询该部门的所有子部门
+            List<Office> childOfficeList = dao.getChildOfficeList(officeInfo.getId());
+            for (Office office : childOfficeList) {
+                //根据部门信息查询部门下的所有员工信息
+                List<User> officeUserList = dao.getUserByOfficeId(office.getId());
+                //遍历成员信息 并查询每个成员的项目信息
+                for (User user : officeUserList) {
+                    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());
+                    comprehensiveInfo.setOfficeParentIds(office.getParentIds());
+                    comprehensiveInfo.setUserId(user.getId());
+                    //查询新增合同信息
+                    Integer field1 = dao.getInsertOfficeContractCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField1(field1.toString());
+                    //查询本月纸质归档合同信息
+                    Integer field2 = dao.getInsertOfficeContractRecordCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField2(field2.toString());
+                    //查询超期未归档合同信息
+                    List<String> overDueNotContractIdList = dao.getOfficeOverDueNotContractRecordCountByOffice(user.getId());
+                    comprehensiveInfo.setField3(String.valueOf(overDueNotContractIdList.size()));
+                    List<StatementDataInfo> overDueNotContractList = Lists.newArrayList();
+                    for (String contract : overDueNotContractIdList) {
+                        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.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        info.setField1(contract);
+                        overDueNotContractList.add(info);
+                    }
+                    if(overDueNotContractList.size()>0){
+                        dao.insertOfficeStatementDataInfo(overDueNotContractList);
+                    }
+
+                    //查询超期归档合同信息
+                    List<String> overDueContractIdList = dao.getOfficeOverDueContractRecordCountByOffice(user.getId(), beginDate, endDate);
+                    comprehensiveInfo.setField4(String.valueOf(overDueContractIdList.size()));
+                    List<StatementDataInfo> overDueContractList = Lists.newArrayList();
+                    for (String contract : overDueContractIdList) {
+                        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.setUserId(user.getId());
+                        info.setOfficeParentIds(office.getParentIds());
+                        info.setField2(contract);
+                        overDueContractList.add(info);
+                    }
+                    if(overDueContractList.size()>0){
+                        dao.insertOfficeStatementDataInfo(overDueContractList);
+                    }
+
+                    //数据处理并保存到数据库中
+                    comprehensiveInfo.preInsert();
+                    dao.insertOfficeComprehensive(comprehensiveInfo);
+                }
+            }
+
+
+        }
+    }
+
     //根据type查询公司级表所有内容
     //根据type查询公司级表所有内容
     public List<StatementCompanyComprehensiveInfo> selectAllByType(StatementCompanyComprehensiveInfo info){
     public List<StatementCompanyComprehensiveInfo> selectAllByType(StatementCompanyComprehensiveInfo info){
         List<StatementCompanyComprehensiveInfo> list = dao.selectAllByType(info);
         List<StatementCompanyComprehensiveInfo> list = dao.selectAllByType(info);

+ 31 - 82
src/main/java/com/jeeplus/modules/workcalendar/service/WorkCalendarTaskService.java

@@ -6,6 +6,7 @@ package com.jeeplus.modules.workcalendar.service;
 import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectSignatureOldMessageDisposeService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectSignatureOldMessageDisposeService;
+import com.jeeplus.modules.statement.service.StatementCompanyComprehensiveService;
 import com.jeeplus.modules.workcalendar.entity.WorkCalendar;
 import com.jeeplus.modules.workcalendar.entity.WorkCalendar;
 import com.jeeplus.modules.workcontractrecord.service.WorkContractRecordService;
 import com.jeeplus.modules.workcontractrecord.service.WorkContractRecordService;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
@@ -40,7 +41,7 @@ public class WorkCalendarTaskService  {
     @Autowired
     @Autowired
     private RuralProjectSignatureOldMessageDisposeService ruralProjectSignatureOldMessageDispose;
     private RuralProjectSignatureOldMessageDisposeService ruralProjectSignatureOldMessageDispose;
     @Autowired
     @Autowired
-    private WorkContractRecordService workContractRecordService;
+    private StatementCompanyComprehensiveService statementCompanyComprehensiveService;
 
 
     @Scheduled(cron= "0 0/1 * * * ?")
     @Scheduled(cron= "0 0/1 * * * ?")
     public void notifyTask() {
     public void notifyTask() {
@@ -129,7 +130,7 @@ public class WorkCalendarTaskService  {
     /**
     /**
      * 每五分钟对签章文件进行文件位置转移处理
      * 每五分钟对签章文件进行文件位置转移处理
      */
      */
-    @Scheduled(cron= "0 0/3 * * * ?")
+    @Scheduled(cron= "0 0/50 * * * ?")
     @Transactional(readOnly = false)
     @Transactional(readOnly = false)
     public void getProjectSignatureOldMessageDispose() {
     public void getProjectSignatureOldMessageDispose() {
         logger.info("--------------处理审定单签章文件(开始)---------------");
         logger.info("--------------处理审定单签章文件(开始)---------------");
@@ -146,37 +147,23 @@ public class WorkCalendarTaskService  {
      */
      */
     //每个月最后一天晚上23点推送
     //每个月最后一天晚上23点推送
     //@Scheduled(cron= "0 0 23 28-31 * ?")
     //@Scheduled(cron= "0 0 23 28-31 * ?")
+    //@Scheduled(cron= "0 0/2 * * * ?")
+    @Transactional(readOnly = false)
     public void getStatementCompanyComprehensiveOnMonth() {
     public void getStatementCompanyComprehensiveOnMonth() {
         final Calendar c = Calendar.getInstance();
         final Calendar c = Calendar.getInstance();
-        if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)){
-            //当月最后一天
-            logger.info("-----------公司级—项目月度报表(开始)------------------");
-            projectRecordsService.saveProjectReportedListByAdvent();
-            logger.info("------------公司级—项目月度报表(结束)------------------");
-            logger.info("-----------公司级—开票月度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------公司级—开票月度报表(结束)------------------");
-            logger.info("-----------公司级—报销月度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------公司级—报销月度报表(结束)------------------");
-            logger.info("-----------公司级—合同月度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------公司级—合同月度报表(结束)------------------");
+        System.out.println(c.get(Calendar.DATE));
+        System.out.println(c.getActualMaximum(Calendar.DATE));
+        //if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)){
 
 
-
-            logger.info("-----------部门级—项目月度报表(开始)------------------");
-            projectRecordsService.saveProjectReportedListByAdvent();
-            logger.info("------------部门级—项目月度报表(结束)------------------");
-            logger.info("-----------部门级—开票月度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------部门级—开票月度报表(结束)------------------");
-            logger.info("-----------部门级—报销月度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------部门级—报销月度报表(结束)------------------");
-            logger.info("-----------部门级—合同月度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------部门级—合同月度报表(结束)------------------");
-        }
+            Integer month = c.get(Calendar.MONTH)+1; //第一个月从0开始,所以得到月份+1
+            //当月最后一天
+            logger.info("-----------公司级—月度报表(开始)------------------");
+            statementCompanyComprehensiveService.disposeStatementCompany(2,month);
+            logger.info("------------公司级—月度报表(结束)------------------");
+            logger.info("-----------部门级—月度报表(开始)------------------");
+            //statementCompanyComprehensiveService.disposeStatementOffice(2,month);
+            logger.info("------------部门级—月度报表(结束)------------------");
+        //}
 
 
     }
     }
 
 
@@ -187,34 +174,16 @@ public class WorkCalendarTaskService  {
     //@Scheduled(cron= "0 0 23 28-31 3,6,9,12 ?")
     //@Scheduled(cron= "0 0 23 28-31 3,6,9,12 ?")
     public void getStatementCompanyComprehensiveOnQuarter() {
     public void getStatementCompanyComprehensiveOnQuarter() {
         final Calendar c = Calendar.getInstance();
         final Calendar c = Calendar.getInstance();
+        Integer month = c.get(Calendar.MONTH)+3; //第一个月从0开始,所以得到月份+1
+        Integer quarter = month/3;
         if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)){
         if (c.get(Calendar.DATE) == c.getActualMaximum(Calendar.DATE)){
             //当月最后一天
             //当月最后一天
-            logger.info("-----------公司级—项目季度报表(开始)------------------");
-            projectRecordsService.saveProjectReportedListByAdvent();
-            logger.info("------------公司级—项目季度报表(结束)------------------");
-            logger.info("-----------公司级—开票季度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------公司级—开票季度报表(结束)------------------");
-            logger.info("-----------公司级—报销季度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------公司级—报销季度报表(结束)------------------");
-            logger.info("-----------公司级—合同季度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------公司级—合同季度报表(结束)------------------");
-
-
-            logger.info("-----------部门级—项目季度报表(开始)------------------");
-            projectRecordsService.saveProjectReportedListByAdvent();
-            logger.info("------------部门级—项目季度报表(结束)------------------");
-            logger.info("-----------部门级—开票季度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------部门级—开票季度报表(结束)------------------");
-            logger.info("-----------部门级—报销季度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------部门级—报销季度报表(结束)------------------");
-            logger.info("-----------部门级—合同季度报表(开始)------------------");
-            projectRecordsService.saveProjectRecordListByAdvent();
-            logger.info("------------部门级—合同季度报表(结束)------------------");
+            logger.info("-----------公司级—季度报表(开始)------------------");
+            statementCompanyComprehensiveService.disposeStatementCompany(1,quarter);
+            logger.info("------------公司级—季度报表(结束)------------------");
+            logger.info("-----------部门级—季度报表(开始)------------------");
+            //projectRecordsService.saveProjectRecordListByAdvent();
+            logger.info("------------部门级—季度报表(结束)------------------");
         }
         }
     }
     }
 
 
@@ -224,32 +193,12 @@ public class WorkCalendarTaskService  {
     //每年最后一天晚上23点推送
     //每年最后一天晚上23点推送
     //@Scheduled(cron= "0 0 23 31 12 ?")
     //@Scheduled(cron= "0 0 23 31 12 ?")
     public void getStatementCompanyComprehensiveOnYear() {
     public void getStatementCompanyComprehensiveOnYear() {
-        logger.info("-----------公司级—项目年度报表(开始)------------------");
-        projectRecordsService.saveProjectReportedListByAdvent();
-        logger.info("------------公司级—项目年度报表(结束)------------------");
-        logger.info("-----------公司级—开票年度报表(开始)------------------");
-        projectRecordsService.saveProjectRecordListByAdvent();
-        logger.info("------------公司级—开票年度报表(结束)------------------");
-        logger.info("-----------公司级—报销年度报表(开始)------------------");
-        projectRecordsService.saveProjectRecordListByAdvent();
-        logger.info("------------公司级—报销年度报表(结束)------------------");
-        logger.info("-----------公司级—合同年度报表(开始)------------------");
-        projectRecordsService.saveProjectRecordListByAdvent();
-        logger.info("------------公司级—合同年度报表(结束)------------------");
-
-
-        logger.info("-----------部门级—项目年度报表(开始)------------------");
-        projectRecordsService.saveProjectReportedListByAdvent();
-        logger.info("------------部门级—项目年度报表(结束)------------------");
-        logger.info("-----------部门级—开票年度报表(开始)------------------");
-        projectRecordsService.saveProjectRecordListByAdvent();
-        logger.info("------------部门级—开票年度报表(结束)------------------");
-        logger.info("-----------部门级—报销年度报表(开始)------------------");
-        projectRecordsService.saveProjectRecordListByAdvent();
-        logger.info("------------部门级—报销年度报表(结束)------------------");
-        logger.info("-----------部门级—合同年度报表(开始)------------------");
-        projectRecordsService.saveProjectRecordListByAdvent();
-        logger.info("------------部门级—合同年度报表(结束)------------------");
+        logger.info("-----------公司级—年度报表(开始)------------------");
+        statementCompanyComprehensiveService.disposeStatementCompany(0,0);
+        logger.info("------------公司级—年度报表(结束)------------------");
+        logger.info("-----------部门级—年度报表(开始)------------------");
+        //projectRecordsService.saveProjectRecordListByAdvent();
+        logger.info("------------部门级—年度报表(结束)------------------");
     }
     }
 
 
 }
 }

+ 2 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/dao/WorkContractInfoDao.java

@@ -110,4 +110,6 @@ public interface WorkContractInfoDao extends CrudDao<WorkContractInfo> {
     List<WorkContractInfo> findContractStatementPage(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeId") String officeId, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
     List<WorkContractInfo> findContractStatementPage(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeId") String officeId, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
     //查询合同信息的条数
     //查询合同信息的条数
     Integer findContractStatementPageCount(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeId") String officeId, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
     Integer findContractStatementPageCount(@Param("workContractInfo")WorkContractInfo workContractInfo,@Param("officeId") String officeId, @Param("beginDate")String beginDate, @Param("endDate")String endDate,@Param("contractRecordState")String contractRecordState);
+
+    void updateContractRecordStatus(WorkContractInfo workContractInfo);
 }
 }

+ 63 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/entity/WorkContractInfo.java

@@ -154,6 +154,13 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 
 
 	private String contractInformation; //合同金额类别
 	private String contractInformation; //合同金额类别
 	private String contractInformationStr; //合同金额类别
 	private String contractInformationStr; //合同金额类别
+	private Date accomplishDate; //合同审核通过日期
+	private Integer startCount;    //开始数据
+	private Integer endingCount;   //结束数据
+	private Date adventDateDate;   //超期时间
+	private String adventDate;   //超期时间
+	private String contractRecordState;   //归档状态
+	private String overDueStatus;   //归档状态
 
 
 	private boolean cancelDelFalg; //合同作废和删除判定
 	private boolean cancelDelFalg; //合同作废和删除判定
 
 
@@ -1145,4 +1152,60 @@ public class WorkContractInfo extends ActEntity<WorkContractInfo> {
 	public void setNewContractNotifyFlag(Integer newContractNotifyFlag) {
 	public void setNewContractNotifyFlag(Integer newContractNotifyFlag) {
 		this.newContractNotifyFlag = newContractNotifyFlag;
 		this.newContractNotifyFlag = newContractNotifyFlag;
 	}
 	}
+
+	public Date getAccomplishDate() {
+		return accomplishDate;
+	}
+
+	public void setAccomplishDate(Date accomplishDate) {
+		this.accomplishDate = accomplishDate;
+	}
+
+	public Integer getStartCount() {
+		return startCount;
+	}
+
+	public void setStartCount(Integer startCount) {
+		this.startCount = startCount;
+	}
+
+	public Integer getEndingCount() {
+		return endingCount;
+	}
+
+	public void setEndingCount(Integer endingCount) {
+		this.endingCount = endingCount;
+	}
+
+	public Date getAdventDateDate() {
+		return adventDateDate;
+	}
+
+	public void setAdventDateDate(Date adventDateDate) {
+		this.adventDateDate = adventDateDate;
+	}
+
+	public String getAdventDate() {
+		return adventDate;
+	}
+
+	public void setAdventDate(String adventDate) {
+		this.adventDate = adventDate;
+	}
+
+	public String getContractRecordState() {
+		return contractRecordState;
+	}
+
+	public void setContractRecordState(String contractRecordState) {
+		this.contractRecordState = contractRecordState;
+	}
+
+	public String getOverDueStatus() {
+		return overDueStatus;
+	}
+
+	public void setOverDueStatus(String overDueStatus) {
+		this.overDueStatus = overDueStatus;
+	}
 }
 }

+ 10 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoService.java

@@ -1671,6 +1671,7 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 				String content = "合同【"+workContractInfo.getName() +"】登记完成,合同编号:" + workContractInfo.getContractNum();
 				String content = "合同【"+workContractInfo.getName() +"】登记完成,合同编号:" + workContractInfo.getContractNum();
 
 
 				workContractInfo.setContractState("5");
 				workContractInfo.setContractState("5");
+				workContractInfo.setAccomplishDate(new Date());
 				WorkProjectNotify notify = new WorkProjectNotify();
 				WorkProjectNotify notify = new WorkProjectNotify();
 				notify.setNotifyId(workContractInfo.getId());
 				notify.setNotifyId(workContractInfo.getId());
 				userList = workProjectNotifyService.readByNotifyId(notify);
 				userList = workProjectNotifyService.readByNotifyId(notify);
@@ -4008,4 +4009,13 @@ public class WorkContractInfoService extends CrudService<WorkContractInfoDao, Wo
 		page.setList(list);
 		page.setList(list);
 		return page;
 		return page;
 	}
 	}
+
+	/**
+	 * 修改合同归档审核状态
+	 * @param workContractInfo
+	 */
+	@Transactional(readOnly = false)
+	public void updateContractRecordStatus(WorkContractInfo workContractInfo){
+		workContractInfoDao.updateContractRecordStatus(workContractInfo);
+	}
 }
 }

+ 583 - 0
src/main/java/com/jeeplus/modules/workcontractinfo/service/WorkContractInfoTookDisposeService.java

@@ -0,0 +1,583 @@
+
+package com.jeeplus.modules.workcontractinfo.service;
+
+
+import com.google.common.collect.Maps;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.alterinfo.service.AlterInfoService;
+import com.jeeplus.modules.contractclient.dao.WorkContractClientDao;
+import com.jeeplus.modules.contractclient.entity.WorkContractClient;
+import com.jeeplus.modules.contractclient.service.WorkContractClientService;
+import com.jeeplus.modules.isignature.service.ISignatureDocumentService;
+import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.sys.dao.RoleDao;
+import com.jeeplus.modules.sys.dao.WorkattachmentDao;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.DictUtils;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.entity.WorkActivityProcess;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workactivitymenu.entity.WorkActivityMenu;
+import com.jeeplus.modules.workactivitymenu.service.WorkActivityMenuService;
+import com.jeeplus.modules.workbidproject.dao.WorkBidProjectDao;
+import com.jeeplus.modules.workclientinfo.dao.WorkClientAttachmentDao;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
+import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
+import com.jeeplus.modules.workcontractinfo.dao.*;
+import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
+import com.jeeplus.modules.workcontractrecord.entity.WorkContractRecord;
+import com.jeeplus.modules.workcontractrecord.service.WorkContractRecordService;
+import com.jeeplus.modules.workfullmanage.dao.WorkFullRecordDao;
+import com.jeeplus.modules.workinvoicedetail.dao.WorkInvoiceDetailDao;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import org.activiti.engine.HistoryService;
+import org.activiti.engine.IdentityService;
+import org.activiti.engine.RuntimeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+
+/**
+ * 合同管理Service
+ * @author 丁旭
+ * @version 2017-03-21
+ */
+@SuppressWarnings("all")
+@Service
+@Transactional(readOnly = true)
+public class WorkContractInfoTookDisposeService extends CrudService<WorkContractInfoDao, WorkContractInfo> {
+
+	@Autowired
+	private AlterInfoService alterInfoService;
+	@Autowired
+	private WorkActivityProcessDao workActivityProcessDao;
+	@Autowired
+	private WorkContractAnnexDao workContractAnnexDao;
+	@Autowired
+	private WorkInvoiceDetailDao workInvoiceDetailDao;
+	@Autowired
+	private IdentityService identityService;
+	@Autowired
+	private RuntimeService runtimeService;
+	@Autowired
+	private WorkContractInfoDao workContractInfoDao;
+	@Autowired
+	private WorkClientAttachmentDao workClientAttachmentDao;
+	@Autowired
+	private WorkattachmentService workattachmentService;
+	@Autowired
+	private WorkattachmentDao workattachmentDao;
+	@Autowired
+	protected HistoryService historyService;
+	@Autowired
+	private WorkProjectNotifyService workProjectNotifyService;
+	@Autowired
+	private RoleDao roleDao;
+	@Autowired
+	private WorkFullRecordDao workFullRecordDao;
+	@Autowired
+	private OfficeService officeService;
+	@Autowired
+	private ActTaskService actTaskService;
+	@Autowired
+	private WorkActivityMenuService workActivityMenuService;
+	@Autowired
+	private WorkActivityProcessService workActivityProcessService;
+	@Autowired
+	private ActivityService activityService;
+	@Autowired
+	private WorkContractReviewDao workContractReviewDao;
+	@Autowired
+	private ISignatureDocumentService signatureDocumentService;
+	@Autowired
+	private WorkContractInfoCopyDao workContractInfoCopyDao;
+	@Autowired
+	private SerialNumTplService serialNumTplService;
+	@Autowired
+	private WorkContractClientService workContractClientService;
+	@Autowired
+	private WorkContractClientDao workContractClientDao;
+	@Autowired
+	private WorkClientInfoService workClientInfoService;
+	@Autowired
+	private WorkContractListInfoDao workContractListInfoDao;
+	@Autowired
+	private WorkBidProjectDao workBidProjectDao;
+	@Autowired
+	private WorkContractBorrowDao workContractBorrowDao;
+	@Autowired
+	private WorkContractRecordService workContractRecordService;
+
+	private static byte[] SYN_BYTE = new byte[0];
+
+	//客户列表
+	@Transactional(readOnly = false)
+	public void updateWorkContractInfo(WorkContractInfo workContractInfo) {
+		String contractId = workContractInfo.getId();
+		WorkClientInfo client = workContractInfo.getClient();
+		WorkClientInfo clientInfo = workClientInfoService.get(client.getId());
+		//根据客户信息查询委托方联系人信息
+		if(workContractInfo.getWorkClientInfoList().size()==0){
+			WorkClientInfo workClientInfo = new WorkClientInfo();
+			workClientInfo.setId(clientInfo.getId());
+			workClientInfo.setName(clientInfo.getName());
+			workClientInfo.setCompanyType(DictUtils.getMainDictLabel(clientInfo.getCompanyType(),"company_type",""));
+			workClientInfo.setCompanyIndustry(DictUtils.getMainDictLabel(clientInfo.getCompanyIndustry(),"company_industry",""));
+			workClientInfo.setArea(clientInfo.getArea());
+			workContractInfo.getWorkClientInfoList().add(workClientInfo);
+		}
+
+		WorkContractClient workContractClient1 = new WorkContractClient();
+		workContractClient1.setContractId(contractId);
+		List<WorkContractClient> list1 =workContractClientService.findList(workContractClient1);
+		if(list1!=null && list1.size()>0){
+			for(WorkContractClient w :list1){
+				workContractClientService.delete(w);
+			}
+			for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()){
+				if(workClientInfo.DEL_FLAG_NORMAL.equals(workClientInfo.getDelFlag())){
+					String clientId = workClientInfo.getId();
+					if (clientId == null){
+						continue;
+					}
+					WorkContractClient workContractClient = new WorkContractClient();
+					workContractClient.setContractId(contractId);
+					workContractClient.setClientId(clientId);
+					List<WorkContractClient> list2 =workContractClientService.findList(workContractClient);
+					if(list2!=null&&list2.size()>0){
+						logger.info("无法重复添加关联关系");
+					}else{
+						//第一次新增
+						workContractClientService.save(workContractClient);
+					}
+				}
+			}
+		}else{
+			for (WorkClientInfo workClientInfo : workContractInfo.getWorkClientInfoList()){
+				String clientId = workClientInfo.getId();
+				if (clientId == null){
+					continue;
+				}
+				WorkContractClient workContractClient = new WorkContractClient();
+				workContractClient.setContractId(contractId);
+				workContractClient.setClientId(clientId);
+				List<WorkContractClient> list2 =workContractClientService.findList(workContractClient);
+				if(list2!=null&&list2.size()>0){
+					logger.info("无法重复添加关联关系");
+				}else{
+					//第一次新增
+					workContractClientService.save(workContractClient);
+				}
+			}
+		}
+	}
+
+	/**
+	 * 工单执行(完成任务)
+	 * @param workContractInfo
+	 * @param
+	 * @return
+	 */
+	@Transactional(readOnly = false)
+	public String newAuditSave(WorkContractInfo workContractInfo,String [] status,List<User> auditUsers){
+		//判断收费标准是否存在
+		if(null!= workContractInfo.getChargeCriterionList() && workContractInfo.getChargeCriterionList().size()>0){
+			String chargeCriterion = String.join(",", workContractInfo.getChargeCriterionList());
+			workContractInfo.setChargeCriterion(chargeCriterion);
+		}
+
+		//Office office = officeService.get(workContractInfo.getChargeCompany());
+		Office office = UserUtils.getUser().getOffice();
+		String str = "合同申请人:" + UserUtils.get(workContractInfo.getCreateBy().getId()).getName() + ",主委托方:" + workContractInfo.getClient().getName() + ",合同所属部门:"+office.getName();
+		String title = "合同名称:"+workContractInfo.getName();
+		// 对不同环节的业务逻辑进行操作
+		String taskDefKey = workContractInfo.getAct().getTaskDefKey();
+		if (!"modifyApply".equals(taskDefKey)) {
+			actTaskService.claim(workContractInfo.getAct().getTaskId(), UserUtils.getUser().getId());
+		}else {
+			workContractInfo.getAct().setFlag("yes");
+			updateWorkContractInfo(workContractInfo);
+		}
+		String comment = "";
+		if (workContractInfo.getContractState().equals("3")){
+			comment = ("yes".equals(workContractInfo.getAct().getFlag())?"[重新申请] ":"[已撤销] ");
+		}else {
+			if(StringUtils.isNotBlank(workContractInfo.getAct().getComment())){
+				comment = ("yes".equals(workContractInfo.getAct().getFlag())?"[同意] ":"[驳回] ")+workContractInfo.getAct().getComment();
+			}else{
+				comment = ("yes".equals(workContractInfo.getAct().getFlag())?"[同意] ":"[驳回] ");
+			}
+		}
+		//yes 的时候状态为审核通过 否则为未通过
+		workContractInfo.setContractState(("yes".equals(workContractInfo.getAct().getFlag())?"2":"4"));
+		//String buffer = UserUtils.getRoleActivityEnname(workContractInfo.getCompanyId(),workContractInfo.getCreateBy());
+		Map<String, Object> vars = Maps.newHashMap();
+		//业务逻辑对应的条件表达式
+		String exp = "";
+		String taskCount = "";
+		String notifyRole = "";
+		int key = 0;
+		String enname = "";
+		List<Activity> activitieList = activityService.getByProcessInstanceId(workContractInfo.getProcessInstanceId());
+		WorkActivityMenu workActivityMenu = new WorkActivityMenu();
+		if (activitieList != null && activitieList.size() != 0) {
+			Iterator<Activity> iterator = activitieList.iterator();
+			while (iterator.hasNext()){
+				Activity activityInfo = iterator.next();
+				if (!"newContractAudit".equals(activityInfo.getProcessKey())){
+					iterator.remove();
+				}
+			}
+			workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+			workActivityMenu.setActivities(activitieList);
+		}
+		/*if (activitieList!=null && activitieList.size()!=0){
+			workActivityMenu.setProcessType(activitieList.get(0).getProcessKey());
+			workActivityMenu.setActivities(activitieList);
+		}*/
+
+		WorkActivityProcess workActivityProcess = new WorkActivityProcess();
+		WorkActivityProcess selectProcess = new WorkActivityProcess();
+		selectProcess.setProcessInstanceId(workContractInfo.getProcessInstanceId());
+		List<WorkActivityProcess> workActivityProcesses = workActivityProcessService.findList(selectProcess);
+		List<Activity> activities = workActivityMenu.getActivities();
+		if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("newContractAudit")) {
+			key = 1;
+			for (int i =0;i<workActivityProcesses.size();i++){
+				WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+				if (taskDefKey.equals(activityProcess.getActivityTask()) && !taskDefKey.equals("modifyApply")) {
+					taskCount = activityProcess.getCount()+"";
+					workActivityProcess = activityProcess;
+					if (!workActivityProcess.getIsApproval().equals("0")) {
+						workActivityProcess.setId("");
+					}
+					exp = "pass";
+					if (!"yes".equals(workContractInfo.getAct().getFlag())) {
+						workContractInfo.setContractState("4");
+						workActivityProcess.setIsApproval("2");
+						String returnBack = "-1";
+						for (Activity activity : activities) {
+							if (activity.getCount() == activityProcess.getCount()) {
+								notifyRole = activity.getName();
+								returnBack = activity.getReturnBack();
+								break;
+							}
+						}
+						if (returnBack.equals("0")) {
+							workActivityProcess.setId("");
+						}
+
+					} else {
+						workActivityProcess.setIsApproval("1");
+					}
+				}else if(taskDefKey.equals("modifyApply")){
+					notifyRole = "调整申请";
+					taskCount = "0";
+					exp = "pass";
+					workActivityProcess.setId("");
+					workActivityProcess.setCount(0);
+					if (!"yes".equals(workContractInfo.getAct().getFlag())) {
+						workContractInfo.setContractState("3");
+						workActivityProcess.setIsApproval("2");
+					} else {
+						workActivityProcess.setIsApproval("1");
+					}
+					break;
+				}
+			}
+		}else {
+			workActivityMenu.setProcessType("newContractAudit");
+			for (int i =0;i<workActivityProcesses.size();i++) {
+				WorkActivityProcess activityProcess = workActivityProcesses.get(i);
+				String count = activityProcess.getCount() + "";
+				workActivityProcess = activityProcess;
+				if (!workActivityProcess.getIsApproval().equals("0")){
+					workActivityProcess.setId("");
+				}
+				// 审核环节
+				if ("bmzr".equals(taskDefKey) && count.contains("1")) {
+					taskCount = "1";
+					exp = "pass";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						workActivityProcessService.insertAuditsByType(auditUsers,workContractInfo.getProcessInstanceId(),2,1);
+
+						notifyRole = "总经理审批";
+						workActivityProcess.setIsApproval("1");
+						enname = "zjl";
+						vars.put("zjlList", auditUsers);
+						vars.put("zjlCount",auditUsers.size());
+					} else {
+						notifyRole = "调整报告";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("zjl".equals(taskDefKey) && count.contains("2")) {
+					taskCount = "2";
+					exp = "pass";
+					if ("yes".equals(workContractInfo.getAct().getFlag())) {
+						notifyRole = "审批通过";
+						workActivityProcess.setIsApproval("1");
+					} else {
+						notifyRole = "调整合同信息";
+						workActivityProcess.setIsApproval("2");
+					}
+					break;
+				} else if ("modifyApply".equals(taskDefKey)&& count.contains("0")) {
+					notifyRole = "部门主任审批";
+					taskCount = "0";
+					exp = "pass";
+					workActivityProcess.setCount(0);
+					enname = "bmzr";
+					if (!"yes".equals(workContractInfo.getAct().getFlag())) {
+						workContractInfo.setContractState("3");
+					}
+					break;
+				}
+			}
+		}
+		//workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,workContractInfo.getProcessInstanceId(),taskDefKey,"modifyApply",workContractInfo.getAct().getFlag(),comment, activities);
+		// 设置意见
+		workContractInfo.getAct().setComment(("yes".equals(workContractInfo.getAct().getFlag()) ? "[同意] " : "[驳回] ") + workContractInfo.getAct().getComment());
+		workContractInfo.preUpdate();
+		// 提交流程任务
+		vars.put(exp, "yes".equals(workContractInfo.getAct().getFlag())? true : false);
+		vars.put("passs", true);
+		workActivityProcessService.updateProcess(workActivityProcess,workActivityMenu,key,taskCount,workContractInfo.getProcessInstanceId(),taskDefKey,"modifyApply",workContractInfo.getAct().getFlag(),comment, activities);
+		// 提交流程任务
+		actTaskService.complete(workContractInfo.getAct().getTaskId(), workContractInfo.getAct().getProcInsId(), workContractInfo.getAct().getComment(), vars);
+		boolean state = actTaskService.isProcessEnd(workContractInfo.getAct().getProcInsId());
+		List<User> users = new ArrayList<>();
+		List<User> userList = new ArrayList<>();
+		//List<User> zjlList = dao.getUserByRole("总经理");
+		if(!state) {
+			str = "合同编号:" + workContractInfo.getContractNum() + ",主委托方:" + workContractInfo.getClient().getName() + ",合同所属部门:"+office.getName();
+			title = "合同名称:"+workContractInfo.getName();
+			users.add(workContractInfo.getCreateBy());
+			if ("yes".equals(workContractInfo.getAct().getFlag())) {
+				String titleStr = "合同【"+workContractInfo.getName() +"】登记完成";
+				String content = "合同【"+workContractInfo.getName() +"】登记完成,合同编号:" + workContractInfo.getContractNum();
+
+				workContractInfo.setContractState("5");
+				workContractInfo.setAccomplishDate(new Date());
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(workContractInfo.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				workProjectNotifyService
+						.save(UtilNotify
+								.saveNotify(workContractInfo.getId(),
+										workContractInfo.getCreateBy(),
+										workContractInfo.getCompanyId(),
+										titleStr,
+										content,
+										"143",
+										"0",
+										"待通知",
+										notifyRole));
+				/*for (User user : zjlList) {
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(workContractInfo.getId(),
+											user,
+											workContractInfo.getCompanyId(),
+											titleStr,
+											content,
+											"143",
+											"0",
+											"待通知",
+											notifyRole));
+				}*/
+				//合同审批完成后随即发起归档申请
+				//合同审批完成后随即发起归档申请
+				WorkContractRecord workContractRecord = new WorkContractRecord();
+				workContractRecord.setStatus("2");
+				workContractRecord.setOfficeId(UserUtils.getSelectOffice().getId());
+				workContractRecord.setCompanyId(UserUtils.getSelectCompany().getId());
+				workContractRecord.setWorkContractInfo(workContractInfo);
+				Map<String, Object> variables = Maps.newHashMap();
+				String processInstanceId ="";
+				workContractRecordService.save(workContractRecord,variables,processInstanceId);
+				workContractInfo.setContractRecordState("2");
+
+			} else {
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(workContractInfo.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				if (StringUtils.isNotBlank(workContractInfo.getContractState()) && !("3").equals(workContractInfo.getContractState())){
+					workContractInfo.setContractState("4");
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(workContractInfo.getId(),
+											workContractInfo.getCreateBy(),
+											workContractInfo.getCompanyId(),
+											title,
+											str,
+											"143",
+											"0",
+											"待通知",
+											notifyRole));
+					/*for (User user : zjlList) {
+						workProjectNotifyService
+								.save(UtilNotify
+										.saveNotify(workContractInfo.getId(),
+												user,
+												workContractInfo.getCompanyId(),
+												title,
+												str,
+												"143",
+												"0",
+												"待通知",
+												notifyRole));
+					}*/
+				}
+			}
+			workActivityProcessService.deleteProcessIdAuditUsers(workContractInfo.getProcessInstanceId());
+		}else{
+			if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("newContractAudit")) {
+				WorkProjectNotify notify = new WorkProjectNotify();
+				notify.setNotifyId(workContractInfo.getId());
+				userList = workProjectNotifyService.readByNotifyId(notify);
+				//users.addAll(userList);
+				WorkProjectNotify workProjectNotify = UtilNotify
+						.saveNotify(workContractInfo.getId(),
+								new User(),
+								workContractInfo.getCompanyId(),
+								title,
+								str,
+								"143",
+								"0",
+								"待审批",
+								notifyRole);
+				List<WorkProjectNotify> workProjectNotifys = activityService.getByFlagAndTaskDefKeyList(
+						activities,
+						workProjectNotify,
+						taskDefKey,
+						workContractInfo.getAct().getFlag(),
+						taskCount,
+						workContractInfo.getCreateBy(),
+						workContractInfo.getChargeCompany(),
+						"2");
+				for (WorkProjectNotify workProjectNotify1:workProjectNotifys){
+					users.add(workProjectNotify1.getUser());
+					workProjectNotify1.setId("");
+					workProjectNotify1.setIsNewRecord(false);
+					workProjectNotifyService
+							.save(workProjectNotify1);
+					if (!"modifyApply".equals(taskDefKey)){
+						Map<String,Object> extras = new HashMap<>();
+						if ("gzr".equals(taskDefKey)){
+							extras.put("type","7001");
+						}else {
+							extras.put("type","7002");
+						}
+						extras.put("id",workProjectNotify.getId());
+						extras.put("procDefKey","143");
+						UserUtils.pushInfoToApp(title,str,extras,workProjectNotify1.getUser().getId());
+
+					}
+				}
+
+			} else {
+				if (!"yes".equals(workContractInfo.getAct().getFlag())) {//驳回待办展示
+					title = "合同【"+workContractInfo.getName() +"】登记被驳回";
+					str = "合同【"+workContractInfo.getName() +"】登记被驳回,请选择重新申请或作废";
+					WorkProjectNotify notify = new WorkProjectNotify();
+					notify.setNotifyId(workContractInfo.getId());
+					userList = workProjectNotifyService.readByNotifyId(notify);
+					//users.addAll(userList);
+					workProjectNotifyService
+							.save(UtilNotify
+									.saveNotify(workContractInfo.getId(),
+											workContractInfo.getCreateBy(),
+											workContractInfo.getCompanyId(),
+											title,
+											str,
+											"143",
+											"0",
+											"重新申请",
+											notifyRole));
+					users.add( workContractInfo.getCreateBy());
+				} else {
+					if (StringUtils.isNotBlank(enname)) {//驳回重新申请待办展示
+						title = "合同【"+workContractInfo.getName() +"】登记,待审批";
+						str = "合同【"+workContractInfo.getName() +"】登记,待审批";
+						WorkProjectNotify notify = new WorkProjectNotify();
+						notify.setNotifyId(workContractInfo.getId());
+						userList = workProjectNotifyService.readByNotifyId(notify);
+						//users.addAll(userList1);
+						WorkProjectNotify workProjectNotify = UtilNotify
+								.saveNotify(workContractInfo.getId(),
+										new User(),
+										workContractInfo.getCompanyId(),
+										title,
+										str,
+										"143",
+										"0",
+										"待审批",
+										notifyRole);
+						users.addAll(auditUsers);
+						for (User user1:auditUsers){
+							workProjectNotify.setUser(user1);
+							workProjectNotify.setId("");
+							workProjectNotify.setIsNewRecord(false);
+							workProjectNotifyService
+									.save(workProjectNotify);
+							if (!"modifyApply".equals(taskDefKey)){
+								Map<String,Object> extras = new HashMap<>();
+								if ("gzr".equals(taskDefKey)){
+									extras.put("type","7001");
+								}else {
+									extras.put("type","7002");
+								}
+								extras.put("id",workProjectNotify.getId());
+								extras.put("procDefKey","143");
+								UserUtils.pushInfoToApp(title,str,extras,user1.getId());
+
+							}
+						}
+					}else {
+						WorkProjectNotify notify = new WorkProjectNotify();
+						notify.setNotifyId(workContractInfo.getId());
+						userList = workProjectNotifyService.readByNotifyId(notify);
+						users.addAll(userList);
+						users.add(workContractInfo.getCreateBy());
+						workProjectNotifyService
+								.save(UtilNotify
+										.saveNotify(workContractInfo.getId(),
+												workContractInfo.getCreateBy(),
+												workContractInfo.getCompanyId(),
+												title,
+												str,
+												"143",
+												"0",
+												"重新申请",
+												notifyRole));
+					}
+				}
+			}
+		}
+		if (users!=null && users.size()!=0) {
+			for (User u : users) {
+				UserUtils.pushIm(u.getId(),str);
+			}
+		}
+		if (userList!=null && userList.size()!=0) {
+			for (User u : userList) {
+				UserUtils.pushMeIm(u.getId());
+			}
+		}
+		workContractInfoDao.update(workContractInfo);
+		return "保存审核意见成功!";
+	}
+}

+ 4 - 1
src/main/java/com/jeeplus/modules/workcontractinfo/web/WorkContractInfoController.java

@@ -51,6 +51,7 @@ import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
 import com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoCopyDao;
 import com.jeeplus.modules.workcontractinfo.dao.WorkContractInfoCopyDao;
 import com.jeeplus.modules.workcontractinfo.entity.*;
 import com.jeeplus.modules.workcontractinfo.entity.*;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoTookDisposeService;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractReviewService;
 import com.jeeplus.modules.workcontractinfo.service.WorkContractReviewService;
 import com.jeeplus.modules.workcontractrecord.entity.WorkContractRecord;
 import com.jeeplus.modules.workcontractrecord.entity.WorkContractRecord;
 import com.jeeplus.modules.workcontractrecord.service.WorkContractRecordService;
 import com.jeeplus.modules.workcontractrecord.service.WorkContractRecordService;
@@ -98,6 +99,8 @@ public class WorkContractInfoController extends BaseController {
     @Autowired
     @Autowired
     private WorkContractInfoService workContractInfoService;
     private WorkContractInfoService workContractInfoService;
     @Autowired
     @Autowired
+    private WorkContractInfoTookDisposeService workContractInfoTookDisposeService;
+    @Autowired
     private ActTaskService actTaskService;
     private ActTaskService actTaskService;
     @Autowired
     @Autowired
     private WorkClientInfoService workClientInfoService;
     private WorkClientInfoService workClientInfoService;
@@ -1855,7 +1858,7 @@ public class WorkContractInfoController extends BaseController {
 //            if ("yes".equals(flag) && (users==null || users.size()==0)){
 //            if ("yes".equals(flag) && (users==null || users.size()==0)){
 //                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
 //                addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
 //            }else {
 //            }else {
-            String str = workContractInfoService.newAuditSave(workContractInfo, VarStr.CONTRACT_STATUS,users);
+            String str = workContractInfoTookDisposeService.newAuditSave(workContractInfo, VarStr.CONTRACT_STATUS,users);
             addMessage(redirectAttributes, str);
             addMessage(redirectAttributes, str);
 //            }
 //            }
         }catch (Exception e){
         }catch (Exception e){

+ 17 - 1
src/main/java/com/jeeplus/modules/workcontractrecord/dao/WorkContractRecordDao.java

@@ -37,4 +37,20 @@ public interface WorkContractRecordDao extends CrudDao<WorkContractRecord> {
 	public String findRecordNum(@Param("num") String num);
 	public String findRecordNum(@Param("num") String num);
 
 
 	WorkContractRecord getByContractId(WorkContractRecord workContractRecord);
 	WorkContractRecord getByContractId(WorkContractRecord workContractRecord);
-}
+
+	List<WorkContractInfo> getContractRecordListByAdvent(WorkContractInfo workContractInfo);
+
+	List<WorkContractInfo> getContractRecordNotReportList(WorkContractInfo workContractInfo);
+
+	/**
+	 * 修改合同归档状态
+	 * @param workContractInfo
+	 */
+	void updateContractRecordState(WorkContractInfo workContractInfo);
+
+	/**
+	 * 修改合同归档创建人信息
+	 * @param workContractRecord
+	 */
+	void updateCreateBy(WorkContractRecord workContractRecord);
+}

+ 1 - 1
src/main/java/com/jeeplus/modules/workcontractrecord/entity/WorkContractRecord.java

@@ -209,4 +209,4 @@ public class WorkContractRecord extends ActEntity<WorkContractRecord> {
 	public void setFileNumTow(String fileNumTow) {
 	public void setFileNumTow(String fileNumTow) {
 		this.fileNumTow = fileNumTow;
 		this.fileNumTow = fileNumTow;
 	}
 	}
-}
+}

+ 76 - 0
src/main/java/com/jeeplus/modules/workcontractrecord/service/WorkContractRecordService.java

@@ -5,6 +5,7 @@ package com.jeeplus.modules.workcontractrecord.service;
 
 
 import java.util.*;
 import java.util.*;
 
 
+import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.config.Global;
 import com.jeeplus.common.oss.OSSClientUtil;
 import com.jeeplus.common.oss.OSSClientUtil;
@@ -13,12 +14,15 @@ import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.common.websocket.onchat.ChatServerPool;
 import com.jeeplus.common.websocket.onchat.ChatServerPool;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.service.ActTaskService;
 import com.jeeplus.modules.act.utils.ActUtils;
 import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
 import com.jeeplus.modules.serialnum.service.SerialNumTplService;
+import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.service.OfficeService;
 import com.jeeplus.modules.sys.service.OfficeService;
 import com.jeeplus.modules.sys.service.WorkattachmentService;
 import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
 import com.jeeplus.modules.workactivity.dao.WorkActivityProcessDao;
 import com.jeeplus.modules.workactivity.entity.Activity;
 import com.jeeplus.modules.workactivity.entity.Activity;
@@ -161,6 +165,13 @@ public class WorkContractRecordService extends CrudService<WorkContractRecordDao
 				workContractRecord.setRecordNum(recordNum);
 				workContractRecord.setRecordNum(recordNum);
 			}
 			}
 			super.save(workContractRecord);
 			super.save(workContractRecord);
+			//修改合同归档发起人信息(修改为合同创建人)
+			workContractRecord.setCreateBy(workContractInfo.getCreateBy());
+			workContractRecord.setUpdateBy(workContractInfo.getUpdateBy());
+			//修改合同归档的创建人信息
+			workContractRecordDao.updateCreateBy(workContractRecord);
+
+
 			Office office = officeService.get(workContractRecord.getOfficeId());
 			Office office = officeService.get(workContractRecord.getOfficeId());
 			String title = "合同【"+workContractRecord.getWorkContractInfo().getName()+"】归档待审批";
 			String title = "合同【"+workContractRecord.getWorkContractInfo().getName()+"】归档待审批";
 			String str = "合同【"+workContractRecord.getWorkContractInfo().getName()+"】归档,合同编号:" + workContractRecord.getWorkContractInfo().getContractNum();
 			String str = "合同【"+workContractRecord.getWorkContractInfo().getName()+"】归档,合同编号:" + workContractRecord.getWorkContractInfo().getContractNum();
@@ -486,10 +497,15 @@ public class WorkContractRecordService extends CrudService<WorkContractRecordDao
 						if(StringUtils.isNotBlank(workContractRecord.getWorkContractInfo().getId())){
 						if(StringUtils.isNotBlank(workContractRecord.getWorkContractInfo().getId())){
 							WorkContractInfo workContractInfo = workContractInfoService.get(workContractRecord.getWorkContractInfo().getId());
 							WorkContractInfo workContractInfo = workContractInfoService.get(workContractRecord.getWorkContractInfo().getId());
 							workContractInfo.setContractState("5");
 							workContractInfo.setContractState("5");
+							//判定合同归档状态是不是超期
+							if("1".equals(workContractInfo.getOverDueStatus())){
+								workContractInfo.setContractRecordState("7");
+							}
 							workContractInfoService.save(workContractInfo);
 							workContractInfoService.save(workContractInfo);
 						}
 						}
 					}
 					}
 
 
+
 				} else {
 				} else {
 					WorkProjectNotify notify = new WorkProjectNotify();
 					WorkProjectNotify notify = new WorkProjectNotify();
 					notify.setNotifyId(workContractRecord.getId());
 					notify.setNotifyId(workContractRecord.getId());
@@ -715,6 +731,10 @@ public class WorkContractRecordService extends CrudService<WorkContractRecordDao
 			workContractRecord.setStatus("3");
 			workContractRecord.setStatus("3");
 			workContractRecord.preUpdate();
 			workContractRecord.preUpdate();
 			workContractRecordDao.update(workContractRecord);
 			workContractRecordDao.update(workContractRecord);
+			WorkContractInfo workContractInfo = new WorkContractInfo();
+			workContractInfo.setId(workContractRecord.getWorkContractInfo().getId());
+			workContractInfo.setContractRecordState("3");
+			workContractInfoService.updateContractRecordStatus(workContractInfo);
 
 
 		}catch (ActivitiObjectNotFoundException e){
 		}catch (ActivitiObjectNotFoundException e){
 			logger.error("Exception e:"+e);
 			logger.error("Exception e:"+e);
@@ -742,4 +762,60 @@ public class WorkContractRecordService extends CrudService<WorkContractRecordDao
 		}
 		}
 		return s;
 		return s;
 	}
 	}
+
+	@Transactional(readOnly = false)
+	public void saveContractRecordListByAdvent(){
+		WorkContractInfo workContractInfo = new WorkContractInfo();
+		//查询超期时间天数
+		List<MainDictDetail> adventCount = DictUtils.getMainDictListOnProjectAdvent("advent_record_count");
+		if(adventCount.size()>0){
+			//获取超期时间天数转int
+			Integer endingCount = Integer.parseInt(adventCount.get(0).getLabel());
+			//设置开始时间为领取报告号30天未上报得时间节点
+			workContractInfo.setStartCount(30);
+			workContractInfo.setEndingCount(endingCount);
+		}
+
+
+		//获取合同数据(提前三天进行通知 即 获取即将超期的数据)
+		List<WorkContractInfo> workContractInfoList = dao.getContractRecordListByAdvent(workContractInfo);
+		for (WorkContractInfo info: workContractInfoList) {
+			String notifyStr = null;
+			String titleStr = null;
+			//如果当前时间大于过期时间
+			//Date类的一个方法,如果info.getAdventDateDate()早于 new Date() 返回true,否则返回false
+			if(info.getAdventDateDate().before(new Date())){
+				notifyStr = "合同【"+ info.getName()+"】归档已超期";
+				titleStr = "合同【"+ info.getName()+"】归档已超期。超期时间:"+info.getAdventDate() +"。请尽快上报";
+			}else{
+				notifyStr = "合同【"+ info.getName()+"】即将归档超期";
+				titleStr = "合同【"+ info.getName()+"】即将归档超期。超期时间:"+info.getAdventDate();
+			}
+
+			workProjectNotifyService
+					.save(UtilNotify.saveNotify(info.getId(),
+							info.getCreateBy(),
+							info.getCompanyId(),
+							titleStr,
+							notifyStr,
+							"146",
+							"0",
+							"待通知",
+							""));
+
+		}
+		//获取项目数据(获取已经超期的项目数据,进行修改超期状态)
+		List<WorkContractInfo> workContractNotReportList = dao.getContractRecordNotReportList(workContractInfo);
+		if(workContractNotReportList.size()>0) {
+			for (WorkContractInfo info : workContractNotReportList){
+				if(StringUtils.isBlank(info.getContractRecordState())){
+					info.setContractRecordState("6");
+				}
+				dao.updateContractRecordState(info);
+			}
+		}
+
+
+
+	}
 }
 }

+ 2 - 0
src/main/java/com/jeeplus/modules/workcontractrecord/web/WorkContractRecordController.java

@@ -203,6 +203,7 @@ public class WorkContractRecordController extends BaseController {
 				//将编辑表单中的非NULL值覆盖数据库记录中的值
 				//将编辑表单中的非NULL值覆盖数据库记录中的值
 				MyBeanUtils.copyBeanNotNull2Bean(workContractRecord.getWorkContractInfo(), t);
 				MyBeanUtils.copyBeanNotNull2Bean(workContractRecord.getWorkContractInfo(), t);
 				t.setRecordState("2");
 				t.setRecordState("2");
+				t.setContractRecordState("2");
 				t.setWorkAttachments(workContractRecord.getWorkAttachments());
 				t.setWorkAttachments(workContractRecord.getWorkAttachments());
 				workContractRecord.setWorkAttachments(new ArrayList<WorkClientAttachment>());
 				workContractRecord.setWorkAttachments(new ArrayList<WorkClientAttachment>());
 				workContractInfoService.save(t);
 				workContractInfoService.save(t);
@@ -264,6 +265,7 @@ public class WorkContractRecordController extends BaseController {
 				//将编辑表单中的非NULL值覆盖数据库记录中的值
 				//将编辑表单中的非NULL值覆盖数据库记录中的值
 				MyBeanUtils.copyBeanNotNull2Bean(workContractRecord.getWorkContractInfo(), t);
 				MyBeanUtils.copyBeanNotNull2Bean(workContractRecord.getWorkContractInfo(), t);
 				t.setRecordState("2");
 				t.setRecordState("2");
+				t.setContractRecordState("2");
 				t.setWorkAttachments(workContractRecord.getWorkAttachments());
 				t.setWorkAttachments(workContractRecord.getWorkAttachments());
 				workContractRecord.setWorkAttachments(new ArrayList<WorkClientAttachment>());
 				workContractRecord.setWorkAttachments(new ArrayList<WorkClientAttachment>());
 				workContractInfoService.save(t);
 				workContractInfoService.save(t);

+ 60 - 0
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -1271,6 +1271,35 @@ public class WorkProjectNotifyController extends BaseController {
 						}*/
 						}*/
 						return "modules/workcontractinfo/newWorkContract/workContractInfoFormEdit";
 						return "modules/workcontractinfo/newWorkContract/workContractInfoFormEdit";
 					}
 					}
+				} else if (workProjectNotify.getType().equals("146")) {    //合同管理new
+					WorkContractInfo workContractInfo = workContractInfoService.get(workProjectNotify.getNotifyId());
+					if(StringUtils.isNotBlank(workContractInfo.getChargeCriterion())){
+						workContractInfo.setChargeCriterionList(Arrays.asList(workContractInfo.getChargeCriterion().split(",")));
+					}
+					if(StringUtils.isNotBlank(workProjectNotify.getHome())){
+						workContractInfo.setHome(workProjectNotify.getHome());
+					}else{
+						workContractInfo.setHome("home");
+					}
+					workContractInfo.setAct(getByAct(workContractInfo.getProcessInstanceId()));
+					model.addAttribute("workContractInfo", workContractInfo);
+					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+						return "modules/workcontractinfo/workContractInfoLookForm";
+					}else if (workProjectNotify.getRemarks().contains("待审批") && !"1".equals(workProjectNotify.getStatus())) {
+						model.addAttribute("identification", "workContractInfo");
+						model.addAttribute("identificationName","合同审核意见");
+						if (workContractInfo.getAct() != null) {
+							if ("gzr".equals(workContractInfo.getAct().getTaskDefKey())) {
+								return "modules/workcontractinfo/workContractgzAudit";
+							}
+						}
+						return "modules/workcontractinfo/newWorkContract/workContractAudit";
+					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
+                    	/*if(("3").equals(workContractInfo.getAlterState())){
+							return "redirect:"+Global.getAdminPath()+"/workcontractinfo/workContractInfo?id="+workContractInfo.getAlterBeforeId();
+						}*/
+						return "modules/workcontractinfo/newWorkContract/workContractInfoFormEdit";
+					}
 				} else if (workProjectNotify.getType().equals("144")) {    //合同管理new
 				} else if (workProjectNotify.getType().equals("144")) {    //合同管理new
 					RuralProjectRecords ruralProjectRecords = ruralProjectMessageElectronicSealService.getProjectApprovalSignatureById(workProjectNotify.getNotifyId());
 					RuralProjectRecords ruralProjectRecords = ruralProjectMessageElectronicSealService.getProjectApprovalSignatureById(workProjectNotify.getNotifyId());
 					ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(ruralProjectRecords.getId());
 					ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(ruralProjectRecords.getId());
@@ -6843,6 +6872,37 @@ public class WorkProjectNotifyController extends BaseController {
 					} else {
 					} else {
 						return "modules/projectFilingBatch/projectFilingBatchView";
 						return "modules/projectFilingBatch/projectFilingBatchView";
 					}
 					}
+				}else if ("161".equals(workProjectNotify.getType())
+						|| "162".equals(workProjectNotify.getType())
+						|| "163".equals(workProjectNotify.getType())) {//公司级报表展示操作
+					switch (workProjectNotify.getType()){
+						case "161":	//年报
+							model.addAttribute("nyr", "年");
+							break;
+						case "162":	//季报
+							model.addAttribute("nyr", "季");
+							break;
+						case "163":	//月报
+							model.addAttribute("nyr", "月");
+							break;
+
+					}
+
+					String[] arguments = workProjectNotify.getNotifyId().split(",");
+					//获取年份
+					String year = arguments[0];
+					//获取状态1(0:年;1:季度;2:月份)
+					Integer bigDateType = Integer.valueOf(arguments[1]);
+					//获取状态2(针对状态1进行精确所在指定季度或者月份)
+					Integer smallDateType = Integer.valueOf(arguments[2]);
+
+					WorkRepay workRepay = workRepayService.get(workProjectNotify.getNotifyId());
+					workRepay.setHome("home");
+					workRepay.setAct(getByAct(workRepay.getProcessInstanceId()));
+					model.addAttribute("workRepay", workRepay);
+					if (workProjectNotify.getRemarks().contains("待通知") || "view".equals(workProjectNotify.getView())) {
+						return "modules/workrepay/workRepayView";
+					}
 				}
 				}
 			}
 			}
 		}
 		}

+ 9 - 0
src/main/java/com/jeeplus/modules/workreimbursement/entity/WorkReimbursement.java

@@ -72,6 +72,7 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	private String accountType;
 	private String accountType;
 	private String beginReimbursementPrice;		//报销开始金额
 	private String beginReimbursementPrice;		//报销开始金额
 	private String endReimbursementPrice;		//报销结束金额
 	private String endReimbursementPrice;		//报销结束金额
+	private Date accomplishDate;		//审核通过时间
 	public String getCreateOffice() {
 	public String getCreateOffice() {
 		return createOffice;
 		return createOffice;
 	}
 	}
@@ -602,4 +603,12 @@ public class WorkReimbursement extends ActEntity<WorkReimbursement> {
 	public void setEndReimbursementPrice(String endReimbursementPrice) {
 	public void setEndReimbursementPrice(String endReimbursementPrice) {
 		this.endReimbursementPrice = endReimbursementPrice;
 		this.endReimbursementPrice = endReimbursementPrice;
 	}
 	}
+
+	public Date getAccomplishDate() {
+		return accomplishDate;
+	}
+
+	public void setAccomplishDate(Date accomplishDate) {
+		this.accomplishDate = accomplishDate;
+	}
 }
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -1016,6 +1016,7 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
                 }
                 }
 
 
                 workReimbursement.setStatus("5");
                 workReimbursement.setStatus("5");
+                workReimbursement.setAccomplishDate(new Date());
                 WorkProjectNotify notify = new WorkProjectNotify();
                 WorkProjectNotify notify = new WorkProjectNotify();
                 notify.setNotifyId(workReimbursement.getId());
                 notify.setNotifyId(workReimbursement.getId());
                 userList = workProjectNotifyService.readByNotifyId(notify);
                 userList = workProjectNotifyService.readByNotifyId(notify);

+ 62 - 5
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -340,7 +340,14 @@ END) as projectScale*/
 		,ifnull(prd.status,0) as "projectReportStatus"
 		,ifnull(prd.status,0) as "projectReportStatus"
 		,ifnull(prd.name,"") as "projectReportName"
 		,ifnull(prd.name,"") as "projectReportName"
 		,ifnull(prr.status,0) as "projectReportRecordStatus"
 		,ifnull(prr.status,0) as "projectReportRecordStatus"
-		,ifnull(prrd.status,0) as "downProjectReportRecordStatus",
+		,(case
+		when a.submit_money = '1' then
+		ifnull(pfp.status,0)
+		when a.submit_money = '2' then
+		ifnull(prrd.status,0) else 0
+		end) as downProjectReportRecordStatus,
+
+		/*,ifnull(prrd.status,0) as "downProjectReportRecordStatus"*/
 		prrd.file_num as recodeNum,
 		prrd.file_num as recodeNum,
 		prr.process_instance_id as prrProcessInstanceId,
 		prr.process_instance_id as prrProcessInstanceId,
 		prrd.process_instance_id as prrdProcessInstanceId
 		prrd.process_instance_id as prrdProcessInstanceId
@@ -495,11 +502,36 @@ END) as projectScale*/
 			</if>
 			</if>
 			<choose>
 			<choose>
 				<when test="downProjectReportRecordStatus == 0">
 				<when test="downProjectReportRecordStatus == 0">
-					AND( /*pfp.status is null or*/ ppf.status is null )
+					<choose>
+						<when test="submitMoney !=null and submitMoney !=''">
+							<if test="submitMoney == 1">
+								AND( pfp.status is null)
+							</if>
+							<if test="submitMoney == 2">
+								AND( /*pfp.status is null or*/ ppf.status is null )
+							</if>
+						</when>
+						<otherwise>
+							AND( (a.submitMoney = 2 and pfp.status is null) or (a.submitMoney = 1 and ppf.status is null) )
+						</otherwise>
+					</choose>
 				</when>
 				</when>
 				<otherwise>
 				<otherwise>
 					<if test="downProjectReportRecordStatus!=null and downProjectReportRecordStatus !=''">
 					<if test="downProjectReportRecordStatus!=null and downProjectReportRecordStatus !=''">
-						and ppf.status = #{downProjectReportRecordStatus}
+						<choose>
+							<when test="submitMoney !=null and submitMoney !=''">
+								<if test="submitMoney == 1">
+									and pfp.status = #{downProjectReportRecordStatus}
+								</if>
+								<if test="submitMoney == 2">
+									and ppf.status = #{downProjectReportRecordStatus}
+								</if>
+							</when>
+							<otherwise>
+								and ppf.status = #{downProjectReportRecordStatus}
+							</otherwise>
+						</choose>
+
 					</if>
 					</if>
 				</otherwise>
 				</otherwise>
 			</choose>
 			</choose>
@@ -715,11 +747,36 @@ END) as projectScale*/
 
 
 			<choose>
 			<choose>
 				<when test="downProjectReportRecordStatus == 0">
 				<when test="downProjectReportRecordStatus == 0">
-					AND( /*pfp.status is null or*/ ppf.status is null )
+					<choose>
+						<when test="submitMoney !=null and submitMoney !=''">
+							<if test="submitMoney == 1">
+								AND( pfp.status is null)
+							</if>
+							<if test="submitMoney == 2">
+								AND( /*pfp.status is null or*/ ppf.status is null )
+							</if>
+						</when>
+						<otherwise>
+							AND( (a.submitMoney = 2 and pfp.status is null) or (a.submitMoney = 1 and ppf.status is null) )
+						</otherwise>
+					</choose>
 				</when>
 				</when>
 				<otherwise>
 				<otherwise>
 					<if test="downProjectReportRecordStatus!=null and downProjectReportRecordStatus !=''">
 					<if test="downProjectReportRecordStatus!=null and downProjectReportRecordStatus !=''">
-						AND ppf.status = #{downProjectReportRecordStatus}
+						<choose>
+							<when test="submitMoney !=null and submitMoney !=''">
+								<if test="submitMoney == 1">
+									and pfp.status = #{downProjectReportRecordStatus}
+								</if>
+								<if test="submitMoney == 2">
+									and ppf.status = #{downProjectReportRecordStatus}
+								</if>
+							</when>
+							<otherwise>
+								and ppf.status = #{downProjectReportRecordStatus}
+							</otherwise>
+						</choose>
+
 					</if>
 					</if>
 				</otherwise>
 				</otherwise>
 			</choose>
 			</choose>

+ 3 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsReported.xml

@@ -319,6 +319,9 @@
 		<if test="reportStatus !=null and reportStatus !=''">
 		<if test="reportStatus !=null and reportStatus !=''">
 			  ,report_status = #{reportStatus}
 			  ,report_status = #{reportStatus}
 		  </if>
 		  </if>
+		<if test="accomplishDate !=null and accomplishDate !=''">
+			  ,accomplish_date = #{accomplishDate}
+		  </if>
 		,projectCode = #{projectCode},
 		,projectCode = #{projectCode},
 		projectSection = #{projectSection},
 		projectSection = #{projectSection},
 		projectClassify = #{projectClassify},
 		projectClassify = #{projectClassify},

+ 317 - 0
src/main/resources/mappings/modules/statement/StatementCompanyComprehensiveDao.xml

@@ -130,6 +130,14 @@
 		ORDER BY o.code
 		ORDER BY o.code
 	</select>
 	</select>
 
 
+	<select id="getChildOfficeList" resultType="Office">
+		select a.id,a.name,a.parent_ids as parentIds from sys_office a
+		<where>
+			a.del_flag= 0
+			 and (a.id= #{id} or a.parent_ids like concat('%',#{id},'%'))
+		</where>
+	</select>
+
 	<select id="getAllOfficeListInfo" resultType="Office">
 	<select id="getAllOfficeListInfo" resultType="Office">
 		select a.id,a.name from sys_office a
 		select a.id,a.name from sys_office a
 		<where>
 		<where>
@@ -390,6 +398,315 @@
 		</foreach>
 		</foreach>
 	</insert>
 	</insert>
 
 
+	<select id="getStatementCompanyNotificationUserList" resultType="com.jeeplus.modules.sys.entity.User">
+		select su.id,su.name,su.company_id as "company.id" from statement_company_notification_user_info a
+		left join sys_user su on a.user_id = su.id
+	</select>
+
+	<select id="getUserByOfficeId" resultType="com.jeeplus.modules.sys.entity.User">
+		select su.id,su.name,su.company_id as "company.id",su.office_id as "office.id" from sys_user su
+		<where>
+			su.del_flag = 0 and su.office_id = #{officeId}
+		</where>
+	</select>
+
+	<select id="getOfficeInsertProjectCountByGrade" resultType="java.lang.Integer">
+		select count(1) from rural_project_records a
+		<where>
+			a.del_flag=0
+			and a.status = 5
+			and a.create_by = #{userId}
+			and a.submit_money = #{grade}
+			and a.create_date >= #{beginDate}
+			and a.create_date &lt;= #{endDate}
+		</where>
+	</select>
+
+
+	<select id="getOfficeProjectCountByRecord" resultType="java.lang.Integer">
+		select count(1) from rural_project_records a
+		left join project_report_data prd on a.id = prd.project_id
+		left join rural_project_report_record rprr on prd.id = rprr.report_id
+		<where>
+			a.del_flag=0
+			and a.record_state = 5
+			and a.over_record_status = 0
+			and a.create_by = #{userId}
+			and rprr.status = 5
+			and rprr.del_flag = 0
+			and rprr.accomplish_date >= #{beginDate}
+			and rprr.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getOfficeProjectCountByReported" resultType="java.lang.Integer">
+		select count(1) from rural_project_records a
+		left join rural_project_records_reported rprr on a.id = rprr.id
+		<where>
+			a.del_flag=0
+			and a.reported_state = 5
+			and a.over_due_status = 0
+			and a.create_by = #{userId}
+			and rprr.report_status = 5
+			and rprr.del_flag = 0
+			and rprr.accomplish_date >= #{beginDate}
+			and rprr.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+	<select id="getOfficeOverDueNotRecordProject" resultType="java.lang.String">
+		select id from rural_project_records a
+		<where>
+			a.del_flag=0
+			and a.record_state = 6
+			and a.over_record_status = 1
+			and a.create_by = #{userId}
+		</where>
+	</select>
+
+	<select id="getOfficeOverDueRecordProject" resultType="java.lang.String">
+		select a.id from rural_project_records a
+		left join project_report_data prd on a.id = prd.project_id
+		left join rural_project_report_record rprr on prd.id = rprr.report_id
+		<where>
+			a.del_flag=0
+			and a.record_state = 7
+			and a.over_record_status = 1
+			and a.create_by = #{userId}
+			and rprr.status = 5
+			and rprr.del_flag = 0
+			and rprr.accomplish_date >= #{beginDate}
+			and rprr.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getOfficeOverDueNotReportedProject" resultType="java.lang.String">
+		select a.id from rural_project_records a
+		<where>
+			a.del_flag=0
+			and a.reported_state = 6
+			and a.over_due_status = 1
+			and a.create_by = #{userId}
+		</where>
+	</select>
+
+	<select id="getOfficeOverDueReportedProject" resultType="java.lang.String">
+		select a.id from rural_project_records a
+		left join project_report_data prd on a.id = prd.project_id
+		left join rural_project_records_reported rprr on prd.id = rprr.id
+		<where>
+			a.del_flag=0
+			and a.reported_state = 7
+			and a.over_due_status = 1
+			and a.create_by = #{userId}
+			and rprr.report_status = 5
+			and rprr.del_flag = 0
+			and rprr.accomplish_date >= #{beginDate}
+			and rprr.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+
+	<insert id="insertOfficeComprehensive">
+		INSERT INTO statement_office_comprehensive_info(
+			create_date,
+			year,
+			type,
+			big_date_type,
+			small_date_type,
+			statement_date,
+			user_id,
+			office_id,
+			office_parent_ids,
+			field1,
+			field2,
+			field3,
+			field4,
+			field5,
+			field6,
+			field7,
+			field8
+		) VALUES (
+			#{createDate},
+			#{year},
+			#{type},
+			#{bigDateType},
+			#{smallDateType},
+			#{statementDate},
+			#{userId},
+			#{officeId},
+			#{officeParentIds},
+			#{field1},
+			#{field2},
+			#{field3},
+			#{field4},
+			#{field5},
+			#{field6},
+			#{field7},
+			#{field8}
+
+		)
+	</insert>
+
+
+	<insert id="insertOfficeStatementDataInfo">
+		INSERT INTO statement_office_data_info
+		(
+		create_date
+		,year
+		,grade_type
+		,type
+		,big_date_type
+		,small_date_type
+		,statement_date
+		,user_id
+		,office_id
+		,office_parent_ids
+		,field1
+		,field2
+		,field3
+		,field4
+		)
+		VALUES
+		<foreach collection="dataList" item="data" separator=",">
+			(
+			now()
+			,#{data.year}
+			,#{data.gradeType}
+			,#{data.type}
+			,#{data.bigDateType}
+			,#{data.smallDateType}
+			,#{data.statementDate}
+			,#{data.userId}
+			,#{data.officeId}
+			,#{data.officeParentIds}
+			,#{data.field1}
+			,#{data.field2}
+			,#{data.field3}
+			,#{data.field4}
+			)
+		</foreach>
+	</insert>
+
+	<select id="getInsertOfficeInvoiceCountByOffice" resultType="java.lang.Integer">
+		select count(1) from work_invoice a
+		<where>
+			a.del_flag=0
+			and a.invoice_state = 5
+			and a.create_by = #{userId}
+			and a.invoice_date >= #{beginDate}
+			and a.invoice_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeInvoiceSumMoneyByOffice" resultType="java.lang.String">
+		select ifnull(round(sum(money),2),0) from work_invoice a
+		<where>
+			a.del_flag=0
+			and a.invoice_state = 5
+			and a.create_by = #{userId}
+			and a.invoice_date >= #{beginDate}
+			and a.invoice_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeInvoiceDetailsCountByOffice" resultType="java.lang.Integer">
+		select count(1) from work_invoice_detail a
+		left join work_invoice wi on a.invoice_id = wi.id
+		<where>
+			wi.del_flag=0
+			and a.del_flag=0
+			and wi.invoice_state = 5
+			and wi.receipt_money = '1'
+			and wi.create_by = #{userId}
+			and wi.receipt_money_date >= #{beginDate}
+			and wi.receipt_money_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeInvoiceDetailsSumMoneyByOffice" resultType="java.lang.String">
+		select ifnull(round(sum(a.total_money),2),0) from work_invoice_detail a
+		left join work_invoice wi on a.invoice_id = wi.id
+		<where>
+			wi.del_flag=0
+			and a.del_flag=0
+			and wi.invoice_state = 5
+			and wi.receipt_money = '1'
+			and wi.create_by = #{userId}
+			and wi.receipt_money_date >= #{beginDate}
+			and wi.receipt_money_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeReimbursementCountByOffice" resultType="java.lang.Integer">
+		select count(1) from work_reimbursement a
+		<where>
+			and a.del_flag=0
+			and a.status = 5
+			and a.create_by = #{userId}
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeReimbursementSumMoneyByOffice" resultType="java.lang.String">
+		select ifnull(round(sum(a.money),2),0) from work_reimbursement a
+		<where>
+			a.del_flag=0
+			and a.status = 5
+			and a.create_by = #{userId}
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeContractCountByOffice" resultType="java.lang.Integer">
+		select count(1) from work_contract_info a
+		<where>
+			and a.del_flag=0
+			and a.contract_state = 5
+			and a.create_by = #{userId}
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getInsertOfficeContractRecordCountByOffice" resultType="java.lang.Integer">
+		select count(1) from work_contract_info a
+		<where>
+			and a.del_flag=0
+			and a.contract_state = 5
+			and a.contract_record_state = 5
+			and a.over_due_status = 0
+			and a.create_by = #{userId}
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
+	<select id="getOfficeOverDueNotContractRecordCountByOffice" resultType="java.lang.String">
+		select a.id from work_contract_info a
+		<where>
+			and a.del_flag=0
+			and a.contract_state = 5
+			and a.contract_record_state = 6
+			and a.over_due_status = 1
+			and a.create_by = #{userId}
+		</where>
+	</select>
+
+	<select id="getOfficeOverDueContractRecordCountByOffice" resultType="java.lang.String">
+		select a.id from work_contract_info a
+		<where>
+			and a.del_flag=0
+			and a.contract_state = 5
+			and a.contract_record_state = 7
+			and a.over_due_status = 1
+			and a.create_by = #{userId}
+			and a.accomplish_date >= #{beginDate}
+			and a.accomplish_date &lt;= #{endDate}
+		</where>
+	</select>
+
 	<select id="selectAllByType" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
 	<select id="selectAllByType" parameterType="StatementCompanyComprehensiveInfo" resultType="StatementCompanyComprehensiveInfo">
 		select *,(select name from sys_office where id = office_id) officeName from statement_company_comprehensive_info where type = #{type} and del_flag = 0 and big_date_type = #{bigDateType}
 		select *,(select name from sys_office where id = office_id) officeName from statement_company_comprehensive_info where type = #{type} and del_flag = 0 and big_date_type = #{bigDateType}
 	</select>
 	</select>

+ 32 - 6
src/main/resources/mappings/modules/workcontractinfo/WorkContractInfoDao.xml

@@ -63,7 +63,9 @@
 		a.office_id AS "officeId",
 		a.office_id AS "officeId",
 		(select count(1) from work_contract_info c where c.total_contract_id = a.id)  cnt,
 		(select count(1) from work_contract_info c where c.total_contract_id = a.id)  cnt,
 		a.contract_information AS "contractInformation",
 		a.contract_information AS "contractInformation",
-		a.describe_content AS "describeContent"
+		a.describe_content AS "describeContent",
+		a.contract_record_state AS "contractRecordState",
+		a.over_due_status AS "overDueStatus"
 	</sql>
 	</sql>
 
 
 	<sql id="workContractInfoJoins">
 	<sql id="workContractInfoJoins">
@@ -139,7 +141,9 @@
 		a.contract_information as "contractInformation",
 		a.contract_information as "contractInformation",
 		wcr.file_num as "fileNum",
 		wcr.file_num as "fileNum",
 		wcr.file_num_tow as "fileNumTow",
 		wcr.file_num_tow as "fileNumTow",
-		a.describe_content AS "describeContent"
+		a.describe_content AS "describeContent",
+		a.contract_record_state AS "contractRecordState",
+		a.over_due_status AS "overDueStatus"
 		FROM work_contract_info a
 		FROM work_contract_info a
 		<include refid="workContractInfoJoins"/>
 		<include refid="workContractInfoJoins"/>
 		LEFT JOIN work_contract_record wcr ON wcr.contract_info_id = a.id
 		LEFT JOIN work_contract_record wcr ON wcr.contract_info_id = a.id
@@ -265,7 +269,7 @@
 		WHEN '0' THEN '金额合同'
 		WHEN '0' THEN '金额合同'
 		WHEN '1' THEN '费率合同'
 		WHEN '1' THEN '费率合同'
 		ELSE '' END) as "contractInformationStr",
 		ELSE '' END) as "contractInformationStr",
-		ifnull(wcr.status,0) as "contrractRecordStatus",
+		ifnull(a.contract_record_state,0) as "contrractRecordStatus",
 		ifnull(wcr.file_num,"") as "recordNum",
 		ifnull(wcr.file_num,"") as "recordNum",
 		wcr.id as "contrractRecordId",
 		wcr.id as "contrractRecordId",
 		a.describe_content AS "describeContent",
 		a.describe_content AS "describeContent",
@@ -323,10 +327,10 @@
 			<if test="contrractRecordStatus != null and contrractRecordStatus != ''">
 			<if test="contrractRecordStatus != null and contrractRecordStatus != ''">
 				<choose>
 				<choose>
 					<when test="contrractRecordStatus == 0">
 					<when test="contrractRecordStatus == 0">
-						AND wcr.status is null
+						AND a.contrract_record_status is null
 					</when>
 					</when>
 					<otherwise>
 					<otherwise>
-						AND wcr.status = #{contrractRecordStatus}
+						AND a.contrract_record_status = #{contrractRecordStatus}
 					</otherwise>
 					</otherwise>
 				</choose>
 				</choose>
 			</if>
 			</if>
@@ -393,7 +397,17 @@
 			<if test="isTotal != null and isTotal != ''">
 			<if test="isTotal != null and isTotal != ''">
 				AND a.is_total = #{isTotal}
 				AND a.is_total = #{isTotal}
 			</if>
 			</if>
-			${sqlMap.dsf}
+			<if test="contrractRecordStatus != null and contrractRecordStatus != ''">
+				<choose>
+					<when test="contrractRecordStatus == 0">
+						AND a.contrract_record_status is null
+					</when>
+					<otherwise>
+						AND a.contrract_record_status = #{contrractRecordStatus}
+					</otherwise>
+				</choose>
+			</if>
+			AND a.company_id = #{currentUser.company.id} ${sqlMap.dsf}
 		</where>
 		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -1042,6 +1056,12 @@
 			other_details=#{otherDetails},
 			other_details=#{otherDetails},
 			contract_information=#{contractInformation},
 			contract_information=#{contractInformation},
 			describe_content=#{describeContent}
 			describe_content=#{describeContent}
+			<if test="accomplishDate != null and accomplishDate!= ''">
+				,accomplish_date = #{accomplishDate}
+			</if>
+			<if test="contractRecordState != null and contractRecordState!= ''">
+				,contract_record_state = #{contractRecordState}
+			</if>
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
 
 
@@ -1412,6 +1432,12 @@
 		limit 1
 		limit 1
 	</select>
 	</select>
 
 
+	<update id="updateContractRecordStatus">
+		UPDATE work_contract_info SET
+		contract_record_state = #{contractRecordState}
+		WHERE id = #{id}
+	</update>
+
 	<select id="findContractStatementPage" resultType="WorkContractInfo">
 	<select id="findContractStatementPage" resultType="WorkContractInfo">
 		SELECT
 		SELECT
 		a.id AS "id",
 		a.id AS "id",

+ 130 - 21
src/main/resources/mappings/modules/workcontractrecord/WorkContractRecordDao.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jeeplus.modules.workcontractrecord.dao.WorkContractRecordDao">
 <mapper namespace="com.jeeplus.modules.workcontractrecord.dao.WorkContractRecordDao">
-    
+
 	<sql id="workContractRecordColumns">
 	<sql id="workContractRecordColumns">
 		a.id AS "id",
 		a.id AS "id",
 		a.create_by AS "createBy.id",
 		a.create_by AS "createBy.id",
@@ -25,7 +25,69 @@
 		su.name AS "createBy.name",
 		su.name AS "createBy.name",
 		a.status AS "status"
 		a.status AS "status"
 	</sql>
 	</sql>
-	
+
+	<sql id="workContractInfoColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		(select name from sys_user user where user.id=a.create_by) AS "createBy.name",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.project_id AS "project.id",
+		a.project_name AS "projectName",
+		a.ext AS "ext",
+		a.del_flag AS "delFlag",
+		a.remarks AS "remarks",
+		a.client_id AS "client.id",
+		a.contract_date AS "contractDate",
+		a.effective_date AS "effectiveDate",
+		a.closing_date AS "closingDate",
+		a.name AS "name",
+		a.contract_num_path AS "contractNumPath",
+		a.contract_category AS "contractCategory",
+		a.contract_num AS "contractNum",
+		a.contract_price AS "contractPrice",
+		a.contract_opposite AS "contractOpposite",
+		a.contract_type AS "contractType",
+		a.contract_fee AS "contractFee",
+		a.contract_special AS "contractSpecial",
+		a.contract_state AS "contractState",
+		a.create_name AS "createName",
+		a.office_id AS "chargeCompany",
+		a.charge_company_name AS "chargeCompanyName",
+		a.contract_file_id AS "contractFileId",
+		a.contract_role AS  "contractRole",
+		a.apply_view AS  "applyView",
+		a.company_id AS "companyId",
+		a.contractFeeDoc AS "contractFeeDoc",
+		a.contractTypeDoc AS "contractTypeDoc",
+		a.process_instance_id AS "processInstanceId",
+		a.is_total AS "isTotal",
+		a.total_contract_id AS "totalContractId",
+		a.common_flag AS "commonFlag",
+		a.status AS "status",
+		a.investment_scale AS "investmentScale",
+		a.summary_payment AS "summaryPayment",
+		a.investment_amount AS "investmentAmount",
+		a.create_bys AS "createBys",
+		a.construction_project_type AS "constructionProjectType",
+		a.invalidate_process_instance_id AS "invalidateProcessInstanceId",
+		a.alter_process_instance_id AS "alterProcessInstanceId",
+		a.invalidate_status AS "invalidateStatus",
+		a.invalidate_user AS "invalidateUserId",
+		a.alter_state AS "alterState",
+		a.alterbefore_id AS "alterBeforeId",
+		a.alter_sign AS "alterSign",
+		a.record_state AS "recordState",
+		a.completion_status AS "completionStatus",
+		a.signature_status as "signatureStatus",
+		a.office_id AS "officeId",
+		a.contract_information AS "contractInformation",
+		a.describe_content AS "describeContent",
+		a.contract_record_state AS "contractRecordState",
+		a.over_due_status AS "overDueStatus"
+	</sql>
+
 	<sql id="workContractRecordJoins">
 	<sql id="workContractRecordJoins">
 		LEFT JOIN work_contract_info workContractInfo ON workContractInfo.id = a.contract_info_id
 		LEFT JOIN work_contract_info workContractInfo ON workContractInfo.id = a.contract_info_id
 		LEFT JOIN work_client_info wc ON workContractInfo.client_id = wc.id
 		LEFT JOIN work_client_info wc ON workContractInfo.client_id = wc.id
@@ -33,18 +95,18 @@
 		LEFT JOIN sys_office s ON s.id = a.company_id
 		LEFT JOIN sys_office s ON s.id = a.company_id
 		left JOIN sys_user su on su.id = a.create_by
 		left JOIN sys_user su on su.id = a.create_by
 	</sql>
 	</sql>
-	
-    
+
+
 	<select id="get" resultType="WorkContractRecord" >
 	<select id="get" resultType="WorkContractRecord" >
-		SELECT 
+		SELECT
 			<include refid="workContractRecordColumns"/>
 			<include refid="workContractRecordColumns"/>
 		FROM work_contract_record a
 		FROM work_contract_record a
 		<include refid="workContractRecordJoins"/>
 		<include refid="workContractRecordJoins"/>
 		WHERE a.id = #{id}
 		WHERE a.id = #{id}
 	</select>
 	</select>
-	
+
 	<select id="findList" resultType="WorkContractRecord" >
 	<select id="findList" resultType="WorkContractRecord" >
-		SELECT 
+		SELECT
 			<include refid="workContractRecordColumns"/>
 			<include refid="workContractRecordColumns"/>
 		FROM work_contract_record a
 		FROM work_contract_record a
 		<include refid="workContractRecordJoins"/>
 		<include refid="workContractRecordJoins"/>
@@ -94,15 +156,15 @@
 			</otherwise>
 			</otherwise>
 		</choose>
 		</choose>
 	</select>
 	</select>
-	
+
 	<select id="findAllList" resultType="WorkContractRecord" >
 	<select id="findAllList" resultType="WorkContractRecord" >
-		SELECT 
+		SELECT
 			<include refid="workContractRecordColumns"/>
 			<include refid="workContractRecordColumns"/>
 		FROM work_contract_record a
 		FROM work_contract_record a
 		<include refid="workContractRecordJoins"/>
 		<include refid="workContractRecordJoins"/>
 		<where>
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			a.del_flag = #{DEL_FLAG_NORMAL}
-		</where>		
+		</where>
 		<choose>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
 				ORDER BY ${page.orderBy}
@@ -112,7 +174,7 @@
 			</otherwise>
 			</otherwise>
 		</choose>
 		</choose>
 	</select>
 	</select>
-	
+
 	<insert id="insert">
 	<insert id="insert">
 		INSERT INTO work_contract_record(
 		INSERT INTO work_contract_record(
 			id,
 			id,
@@ -150,9 +212,9 @@
 			#{status}
 			#{status}
 		)
 		)
 	</insert>
 	</insert>
-	
+
 	<update id="update">
 	<update id="update">
-		UPDATE work_contract_record SET 	
+		UPDATE work_contract_record SET
 			update_by = #{updateBy.id},
 			update_by = #{updateBy.id},
 			update_date = #{updateDate},
 			update_date = #{updateDate},
 			remarks = #{remarks},
 			remarks = #{remarks},
@@ -167,27 +229,27 @@
 			status = #{status}
 			status = #{status}
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
-	
-	
+
+
 	<!--物理删除-->
 	<!--物理删除-->
 	<update id="delete">
 	<update id="delete">
 		DELETE FROM work_contract_record
 		DELETE FROM work_contract_record
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
-	
+
 	<!--逻辑删除-->
 	<!--逻辑删除-->
 	<update id="deleteByLogic">
 	<update id="deleteByLogic">
-		UPDATE work_contract_record SET 
+		UPDATE work_contract_record SET
 			del_flag = #{DEL_FLAG_DELETE}
 			del_flag = #{DEL_FLAG_DELETE}
 		WHERE id = #{id}
 		WHERE id = #{id}
 	</update>
 	</update>
-	
-	
+
+
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
 	<select id="findUniqueByProperty" resultType="WorkContractRecord" statementType="STATEMENT">
 	<select id="findUniqueByProperty" resultType="WorkContractRecord" statementType="STATEMENT">
 		select * FROM work_contract_record  where ${propertyName} = '${value}'
 		select * FROM work_contract_record  where ${propertyName} = '${value}'
 	</select>
 	</select>
-	
+
 	<select id="findListByworkContractInfo" resultType="WorkContractInfo">
 	<select id="findListByworkContractInfo" resultType="WorkContractInfo">
 		SELECT
 		SELECT
 		a.id AS "id",
 		a.id AS "id",
@@ -307,4 +369,51 @@
 		<include refid="workContractRecordJoins"/>
 		<include refid="workContractRecordJoins"/>
 		WHERE a.contract_info_id = #{workContractInfo.id}
 		WHERE a.contract_info_id = #{workContractInfo.id}
 	</select>
 	</select>
-</mapper>
+
+	<select id="getContractRecordListByAdvent" resultType="WorkContractInfo">
+		SELECT
+		<include refid="workContractInfoColumns"/>
+		,date_add(date_format(a.accomplish_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
+		,date_add(date_format(a.accomplish_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
+		FROM work_contract_info a
+		left join work_contract_record b on b.contract_info_id = a.id
+		<where>
+			a.del_flag = 0
+			AND a.contract_state = 5
+			AND ( b.STATUS IS NULL or b.STATUS != 5  )
+			AND now() > date_add( a.accomplish_date,interval #{startCount} day)
+		</where>
+	</select>
+
+
+	<select id="getContractRecordNotReportList" resultType="WorkContractInfo" >
+		SELECT
+		<include refid="workContractInfoColumns"/>
+		,date_add(date_format(a.accomplish_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDate
+		,date_add(date_format(a.accomplish_date, '%Y-%m-%d'),interval #{endingCount} day) as adventDateDate
+		FROM work_contract_info a
+		left join work_contract_record b on b.contract_info_id = a.id
+		<where>
+			a.del_flag = 0
+			and a.contract_state = 5
+			and (b.status != 5 or b.status is null)
+			and now() > date_add(a.accomplish_date,interval #{endingCount} day)
+			and a.accomplish_date is not null
+		</where>
+	</select>
+
+	<update id="updateContractRecordState">
+		update work_contract_info set
+		contract_record_state = #{contractRecordState},
+		over_due_status = 1
+		where id =#{id}
+	</update>
+
+	<update id="updateCreateBy">
+		UPDATE work_contract_record SET
+			create_by = #{createBy.id},
+			update_by = #{updateBy.id}
+		WHERE id = #{id}
+	</update>
+
+</mapper>

+ 3 - 0
src/main/resources/mappings/modules/workreimbursement/WorkReimbursementDao.xml

@@ -347,6 +347,9 @@
 			<if test="submitterId != null and submitterId !=''">
 			<if test="submitterId != null and submitterId !=''">
 				submitter_id = #{submitterId},
 				submitter_id = #{submitterId},
 			</if>
 			</if>
+			<if test="accomplishDate != null and accomplishDate !=''">
+				accomplish_date = #{accomplishDate},
+			</if>
 			<if test="limitCond != 1">
 			<if test="limitCond != 1">
 				submitter_date = #{submitterDate},
 				submitter_date = #{submitterDate},
 			</if>
 			</if>

+ 6 - 6
src/main/webapp/webpage/modules/projectAccessory/workAttachmentForm.jsp

@@ -297,15 +297,15 @@
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-														<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}">
+														<td><img src="${workClientAttachment.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.temporaryUrl}','90%','90%')" alt="${workClientAttachment.attachmentName}" title="${workClientAttachment.attachmentName}">
 													</c:when>
 													</c:when>
 													<c:otherwise>
 													<c:otherwise>
 														<c:choose>
 														<c:choose>
 															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
 															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)">${workClientAttachment.attachmentName}</a></td>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',1)" title="${workClientAttachment.attachmentName}">${workClientAttachment.attachmentName}</a></td>
 															</c:when>
 															</c:when>
 															<c:otherwise>
 															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)">${workClientAttachment.attachmentName}</a></td>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.temporaryUrl}',2)" title="${workClientAttachment.attachmentName}">${workClientAttachment.attachmentName}</a></td>
 															</c:otherwise>
 															</c:otherwise>
 														</c:choose>
 														</c:choose>
 													</c:otherwise>
 													</c:otherwise>
@@ -318,15 +318,15 @@
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'gif')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'bmp')
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
                                                            or fn:containsIgnoreCase(workClientAttachment.attachmentName,'jpeg')}">
-														<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}"></td>
+														<td><img src="${workClientAttachment.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${workClientAttachment.url}','90%','90%')" alt="${workClientAttachment.attachmentName}" title="${workClientAttachment.attachmentName}"></td>
 													</c:when>
 													</c:when>
 													<c:otherwise>
 													<c:otherwise>
 														<c:choose>
 														<c:choose>
 															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
 															<c:when test="${fn:containsIgnoreCase(workClientAttachment.attachmentName,'pdf')}">
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)">${workClientAttachment.attachmentName}</a></td>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',1)" title="${workClientAttachment.attachmentName}">${workClientAttachment.attachmentName}</a></td>
 															</c:when>
 															</c:when>
 															<c:otherwise>
 															<c:otherwise>
-																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)">${workClientAttachment.attachmentName}</a></td>
+																<td><a class="attention-info" href="javascript:void(0)" onclick="openPreview('${workClientAttachment.url}',2)" title="${workClientAttachment.attachmentName}">${workClientAttachment.attachmentName}</a></td>
 															</c:otherwise>
 															</c:otherwise>
 														</c:choose>
 														</c:choose>
 													</c:otherwise>
 													</c:otherwise>

+ 513 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/compress/projectFileForm.jsp

@@ -0,0 +1,513 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>个人信息</title>
+	<meta name="decorator" content="default"/>
+	<link rel="stylesheet" type="text/css" href="${ctxStatic}/webuploader-0.1.5/webuploader.css">
+	<link rel="stylesheet" type="text/css" href="${ctxStatic}/webuploader-0.1.5/demo.css">
+	  <script type="text/javascript">
+    // 添加全局站点信息
+    var BASE_URL = '/webuploader';
+    </script>
+	<script type="text/javascript" src="${ctxStatic}/webuploader-0.1.5/webuploader.js"></script>
+	<!-- <script type="text/javascript" src="${ctxStatic}/webuploader-0.1.5/demo.js"></script> -->
+    <style>
+        #uploader .placeholder{
+            min-height: 100px;
+        }
+    </style>
+</head>
+<body class="hideScroll">
+      <div class="wrapper wrapper-content animated fadeIn">
+        <input type="hidden" id="id" name="id" value="${projectRecords.id}">
+        <input type="hidden" id="msg" name="msg" value="${msg}">
+        <input type="hidden" id="result" name="result" value="${result}">
+        <%--<div class="row">--%>
+            <%--<div class="col-sm-12">--%>
+                <div class="ibox float-e-margins">
+                    <div class="ibox-content">
+                        <div class="page-container">
+                            <p>您可以尝试文件拖拽或者点击添加压缩文件按钮,来上传文件(仅可上传 zip、7z文件).</p>
+                            <div id="uploader" class="wu-example">
+                                <div class="queueList">
+                                    <div id="dndArea" class="placeholder">
+                                        <div id="filePicker"></div>
+                                        <p>将文件拖到这里</p>
+                                    </div>
+                                </div>
+                                <div class="statusBar" style="display:none;">
+                                    <div class="progress">
+                                        <span class="text">0%</span>
+                                        <span class="percentage"></span>
+                                    </div>
+                                    <div class="info"></div>
+                                    <div class="btns">
+                                        <div id="filePicker2"></div>
+                                        <div class="uploadBtn">开始上传</div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            <%--</div>--%>
+        <%--</div>--%>
+
+    </div>
+    <script>
+    jQuery(function() {
+        var $ = jQuery,
+
+            $wrap = $('#uploader'),
+
+            // 文件容器
+            $queue = $('<ul class="filelist"></ul>')
+                .appendTo( $wrap.find('.queueList') ),
+
+            // 状态栏,包括进度和控制按钮
+            $statusBar = $wrap.find('.statusBar'),
+
+            // 文件总体选择信息。
+            $info = $statusBar.find('.info'),
+
+            // 上传按钮
+            $upload = $wrap.find('.uploadBtn'),
+
+            // 没选择文件之前的内容。
+            $placeHolder = $wrap.find('.placeholder'),
+
+            // 总体进度条
+            $progress = $statusBar.find('.progress').hide(),
+
+            // 添加的文件数量
+            fileCount = 0,
+
+            // 添加的文件总大小
+            fileSize = 0,
+
+            // 优化retina, 在retina下这个值是2
+            ratio = window.devicePixelRatio || 1,
+
+            // 缩略图大小
+            thumbnailWidth = 110 * ratio,
+            thumbnailHeight = 110 * ratio,
+
+            // 可能有pedding, ready, uploading, confirm, done.
+            state = 'pedding',
+
+            // 所有文件的进度信息,key为file id
+            percentages = {},
+
+            supportTransition = (function(){
+                var s = document.createElement('p').style,
+                    r = 'transition' in s ||
+                          'WebkitTransition' in s ||
+                          'MozTransition' in s ||
+                          'msTransition' in s ||
+                          'OTransition' in s;
+                s = null;
+                return r;
+            })(),
+
+            // WebUploader实例
+            uploader;
+
+        if ( !WebUploader.Uploader.support() ) {
+            alert( 'Web Uploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器');
+            throw new Error( 'WebUploader does not support the browser you are using.' );
+        }
+
+        // 实例化
+        uploader = WebUploader.create({
+            pick: {
+                id: '#filePicker',
+                label: '点击选择文件'
+            },
+            dnd: '#uploader .queueList',
+            paste: document.body,
+
+            accept: {
+                title: '',
+                extensions: 'zip,7z',
+                mimeTypes: 'zip,7z'
+            },
+
+            // swf文件路径
+            swf: BASE_URL + '/js/Uploader.swf',
+
+            disableGlobalDnd: true,
+
+            chunked: true,
+            // server: 'http://webuploader.duapp.com/server/fileupload.php',
+            server: '${ctx}/ruralProject/ruralCostProjectRecords/importCompressFile?id='+$("#id").val(),
+            fileNumLimit: 1,//一次最多上传多少个文件
+        });
+
+        // 添加“添加文件”的按钮,
+//        uploader.addButton({
+//            id: '#filePicker2',
+//            label: '继续添加'
+//        });
+
+        uploader.on('error', function(handler) {
+            if (handler == "Q_EXCEED_NUM_LIMIT") {
+                parent.layer.msg("只能上传一个压缩文件",{icon:5});
+            }
+        });
+        uploader.on('uploadSuccess', function(file,response) {
+            console.log(response._raw);
+            var result = response._raw;
+            $("#result").val(result);
+
+        });
+        // 当有文件添加进来时执行,负责view的创建
+        function addFile( file ) {
+            var $li = $( '<li id="' + file.id + '">' +
+                    '<p class="title">' + file.name + '</p>' +
+                    '<p class="imgWrap"></p>'+
+                    '<p class="progress"><span></span></p>' +
+                    '</li>' ),
+
+                $btns = $('<div class="file-panel">' +
+                    '<span class="cancel">删除</span>' +
+                    '</div>').appendTo( $li ),
+                $prgress = $li.find('p.progress span'),
+                $wrap = $li.find( 'p.imgWrap' ),
+                $info = $('<p class="error"></p>'),
+
+                showError = function( code ) {
+                    switch( code ) {
+                        case 'exceed_size':
+                            text = '文件大小超出';
+                            break;
+
+                        case 'interrupt':
+                            text = '上传暂停';
+                            break;
+
+                        default:
+                            text = '上传失败,请重试';
+                            break;
+                    }
+
+                    $info.text( text ).appendTo( $li );
+                };
+
+            if ( file.getStatus() === 'invalid' ) {
+                showError( file.statusText );
+            } else {
+                // @todo lazyload
+                $wrap.text( '预览中' );
+                uploader.makeThumb( file, function( error, src ) {
+                    /*if ( error ) {
+                        $wrap.text( '不能预览' );
+                        return;
+                    }*/
+
+                    var img = $('<img src="${ctxStatic}/images/filePhoto.jpg">');
+                    $wrap.empty().append( img );
+                }, thumbnailWidth, thumbnailHeight );
+
+                percentages[ file.id ] = [ file.size, 0 ];
+                file.rotation = 0;
+            }
+
+            file.on('statuschange', function( cur, prev ) {
+                if ( prev === 'progress' ) {
+                    $prgress.hide().width(0);
+                } else if ( prev === 'queued' ) {
+                    $li.off( 'mouseenter mouseleave' );
+                    $btns.remove();
+                }
+
+                // 成功
+                if ( cur === 'error' || cur === 'invalid' ) {
+                    console.log( file.statusText );
+                    showError( file.statusText );
+                    percentages[ file.id ][ 1 ] = 1;
+                } else if ( cur === 'interrupt' ) {
+                    showError( 'interrupt' );
+                } else if ( cur === 'queued' ) {
+                    percentages[ file.id ][ 1 ] = 0;
+                } else if ( cur === 'progress' ) {
+                    $info.remove();
+                    $prgress.css('display', 'block');
+                } else if ( cur === 'complete' ) {
+                    $li.append( '<span class="success"></span>' );
+                }
+
+                $li.removeClass( 'state-' + prev ).addClass( 'state-' + cur );
+            });
+
+            $li.on( 'mouseenter', function() {
+                $btns.stop().animate({height: 30});
+            });
+
+            $li.on( 'mouseleave', function() {
+                $btns.stop().animate({height: 0});
+            });
+
+            $btns.on( 'click', 'span', function() {
+                var index = $(this).index(),
+                    deg;
+
+                switch ( index ) {
+                    case 0:
+                        uploader.removeFile( file );
+                        return;
+
+                    case 1:
+                        file.rotation += 90;
+                        break;
+
+                    case 2:
+                        file.rotation -= 90;
+                        break;
+                }
+
+                if ( supportTransition ) {
+                    deg = 'rotate(' + file.rotation + 'deg)';
+                    $wrap.css({
+                        '-webkit-transform': deg,
+                        '-mos-transform': deg,
+                        '-o-transform': deg,
+                        'transform': deg
+                    });
+                } else {
+                    $wrap.css( 'filter', 'progid:DXImageTransform.Microsoft.BasicImage(rotation='+ (~~((file.rotation/90)%4 + 4)%4) +')');
+                    // use jquery animate to rotation
+                    // $({
+                    //     rotation: rotation
+                    // }).animate({
+                    //     rotation: file.rotation
+                    // }, {
+                    //     easing: 'linear',
+                    //     step: function( now ) {
+                    //         now = now * Math.PI / 180;
+
+                    //         var cos = Math.cos( now ),
+                    //             sin = Math.sin( now );
+
+                    //         $wrap.css( 'filter', "progid:DXImageTransform.Microsoft.Matrix(M11=" + cos + ",M12=" + (-sin) + ",M21=" + sin + ",M22=" + cos + ",SizingMethod='auto expand')");
+                    //     }
+                    // });
+                }
+
+
+            });
+
+            $li.appendTo( $queue );
+        }
+
+        // 负责view的销毁
+        function removeFile( file ) {
+            var $li = $('#'+file.id);
+
+            delete percentages[ file.id ];
+            updateTotalProgress();
+            $li.off().find('.file-panel').off().end().remove();
+        }
+
+        function updateTotalProgress() {
+            var loaded = 0,
+                total = 0,
+                spans = $progress.children(),
+                percent;
+
+            $.each( percentages, function( k, v ) {
+                total += v[ 0 ];
+                loaded += v[ 0 ] * v[ 1 ];
+            } );
+
+            percent = total ? loaded / total : 0;
+
+            spans.eq( 0 ).text( Math.round( percent * 100 ) + '%' );
+            spans.eq( 1 ).css( 'width', Math.round( percent * 100 ) + '%' );
+            updateStatus();
+        }
+        var count = 0;
+        function updateStatus() {
+            var text = '', stats;
+
+            if ( state === 'ready' ) {
+                text = '选中' + fileCount + '个文件,共' +
+                        WebUploader.formatSize( fileSize ) + '。';
+            } else if ( state === 'confirm' ) {
+                stats = uploader.getStats();
+                if ( stats.uploadFailNum ) {
+                    text = '已成功上传' + stats.successNum+ '个文件,'+
+                        stats.uploadFailNum + '个文件上传失败,<a class="retry" href="javascript:void(0)">重新上传</a>失败文件或<a class="ignore" href="javascript:void(0)">忽略</a>'
+                }
+
+            } else {
+                stats = uploader.getStats();
+                text = '上传文件成功!';
+
+                if ( stats.uploadFailNum ) {
+                    text ='上传文件失败!';
+                }
+            }
+            $info.html( text );
+        }
+
+        function setState( val ) {
+            var file, stats;
+
+            if ( val === state ) {
+                return;
+            }
+
+            $upload.removeClass( 'state-' + state );
+            $upload.addClass( 'state-' + val );
+            state = val;
+
+            switch ( state ) {
+                case 'pedding':
+                    $placeHolder.removeClass( 'element-invisible' );
+                    $queue.parent().removeClass('filled');
+                    $queue.hide();
+                    $statusBar.addClass( 'element-invisible' );
+                    uploader.refresh();
+                    break;
+
+                case 'ready':
+                    $placeHolder.addClass( 'element-invisible' );
+                    $( '#filePicker2' ).removeClass( 'element-invisible');
+                    $queue.parent().addClass('filled');
+                    $queue.show();
+                    $statusBar.removeClass('element-invisible');
+                    uploader.refresh();
+                    break;
+
+                case 'uploading':
+                    $( '#filePicker2' ).addClass( 'element-invisible' );
+                    $progress.show();
+                    $upload.text( '暂停上传' );
+                    break;
+
+                case 'paused':
+                    $progress.show();
+                    $upload.text( '继续上传' );
+                    break;
+
+                case 'confirm':
+                    $progress.hide();
+                    $upload.text( '开始上传' ).addClass( 'disabled' );
+
+                    var result = $("#result").val();
+                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
+                    if(undefined != result && null != result && "" != result && 0 ==result){
+                        top.layer.msg("上传成功数据 "+result+" 条,压缩包或损坏,请检查后重新上传!", {icon: 0});
+
+                        top.layer.close(index);
+                    }else{
+                        top.layer.msg("数据上传成功!", {icon: 1});
+                        top.layer.close(index);
+                    }
+
+
+                    stats = uploader.getStats();
+                    if ( stats.successNum && !stats.uploadFailNum ) {
+                        setState( 'finish' );
+                        return;
+                    }
+                    break;
+                case 'finish':
+                    stats = uploader.getStats();
+                    if ( stats.successNum ) {
+                      //  alert( '上传成功' );
+
+                    } else {
+                        // 没有成功的文件,重设
+                        state = 'done';
+                        location.reload();
+                    }
+                    break;
+            }
+
+            updateStatus();
+        }
+
+        uploader.onUploadProgress = function( file, percentage ) {
+            var $li = $('#'+file.id),
+                $percent = $li.find('.progress span');
+
+            $percent.css( 'width', percentage * 100 + '%' );
+            percentages[ file.id ][ 1 ] = percentage;
+            updateTotalProgress();
+        };
+
+        uploader.onFileQueued = function( file ) {
+            fileCount++;
+            fileSize += file.size;
+
+            if ( fileCount === 1 ) {
+                $placeHolder.addClass( 'element-invisible' );
+                $statusBar.show();
+            }
+
+            addFile( file );
+            setState( 'ready' );
+            updateTotalProgress();
+        };
+
+        uploader.onFileDequeued = function( file ) {
+            fileCount--;
+            fileSize -= file.size;
+
+            if ( !fileCount ) {
+                setState( 'pedding' );
+            }
+
+            removeFile( file );
+            updateTotalProgress();
+
+        };
+
+        uploader.on( 'all', function( type ) {
+            var stats;
+            switch( type ) {
+                case 'uploadFinished':
+                    setState( 'confirm' );
+                    break;
+
+                case 'startUpload':
+                    setState( 'uploading' );
+                    break;
+
+                case 'stopUpload':
+                    setState( 'paused' );
+                    break;
+
+            }
+        });
+
+        $upload.on('click', function() {
+            if ( $(this).hasClass( 'disabled' ) ) {
+                return false;
+            }
+
+            if ( state === 'ready' ) {
+                uploader.upload();
+            } else if ( state === 'paused' ) {
+                uploader.upload();
+            } else if ( state === 'uploading' ) {
+                uploader.stop();
+            }
+        });
+
+        $info.on( 'click', '.retry', function() {
+            uploader.retry();
+        } );
+
+        $info.on( 'click', '.ignore', function() {
+            alert( 'todo' );
+        } );
+
+        $upload.addClass( 'state-' + state );
+        updateTotalProgress();
+    });
+    </script>
+</body>
+</html>

+ 8 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/record/cost/recordTwo/projectReportRecordForm.jsp

@@ -43,6 +43,13 @@
 		}
 		}
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
         function doSubmit(obj){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
             if(validateForm.form()){
+				var onsubmit = $("#onsubmit").val();
+				if("true" == onsubmit){
+					$("#onsubmit").val(false);
+				}else{
+					parent.layer.msg("请勿重复提交!", {icon: 5});
+					return false
+				}
 				var projectId = '${project.id}';
 				var projectId = '${project.id}';
 				var boolFlag = true;
 				var boolFlag = true;
 					if(obj == 2){
 					if(obj == 2){
@@ -171,7 +178,7 @@
 			<form:hidden id="reportId" path="report.id"/>
 			<form:hidden id="reportId" path="report.id"/>
 			<form:hidden path="report.name"/>
 			<form:hidden path="report.name"/>
 			<form:hidden path="report.project.id"/>
 			<form:hidden path="report.project.id"/>
-
+			<input type="hidden" id="onsubmit" value="true">
 			<div class="form-group layui-row first lw12">
 			<div class="form-group layui-row first lw12">
 				<div class="form-group-label"><h2>基本信息</h2></div>
 				<div class="form-group-label"><h2>基本信息</h2></div>
 
 

+ 1 - 1
src/main/webapp/webpage/modules/workclientinfo/all/workClientInfoForm.jsp

@@ -38,7 +38,7 @@
                   return false;
                   return false;
               }
               }
               var telephone = $("#telephone").val();
               var telephone = $("#telephone").val();
-              if(!/(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/.test(telephone) && !/^([0-9]{3,4}-)?[0-9]{7,8}$/.test(telephone)){
+              if(!/(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/.test(telephone) && !/^[0-9]{6,20}$/.test(telephone)){
                   parent.layer.msg("公司电话有误,请重新填写!", {icon: 5});
                   parent.layer.msg("公司电话有误,请重新填写!", {icon: 5});
                   return false;
                   return false;
               }
               }

+ 1 - 1
src/main/webapp/webpage/modules/workclientinfo/workClientInfoForm.jsp

@@ -51,7 +51,7 @@
                   return false;
                   return false;
               }
               }
               var telephone = $("#telephone").val();
               var telephone = $("#telephone").val();
-              if(!/(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/.test(telephone) && !/^([0-9]{3,4}-)?[0-9]{7,8}$/.test(telephone)){
+              if(!/(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/.test(telephone) && !/^[0-9]{6,20}$/.test(telephone)){
                   parent.layer.msg("公司电话有误,请重新填写!", {icon: 5});
                   parent.layer.msg("公司电话有误,请重新填写!", {icon: 5});
                   return false;
                   return false;
               }
               }

+ 3 - 3
src/main/webapp/webpage/modules/workcontractinfo/workContractInfoAllList.jsp

@@ -700,12 +700,12 @@
                             var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                             var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         return xml;
                         return xml;
                     }}
                     }}
-                ,{align:'center', title: '归档状态',  width:70,templet:function(d){
+                ,{align:'center', title: '归档状态',  width:90,templet:function(d){
                         var st = getRuralProjectArchiveState(d.contrractRecordStatus);
                         var st = getRuralProjectArchiveState(d.contrractRecordStatus);
                         if(st.action)
                         if(st.action)
-							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.contrractRecordId + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+							var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workcontractrecord/workContractRecord/getProcessOne?id=" + d.contrractRecordId + "','95%','95%')\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         else
                         else
-                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                            var xml = "<span style=\"cursor:default;\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";
                         return xml;
                         return xml;
                     }}
                     }}
                 ,{align:'center', title: '借用状态',  width:70,templet:function(d){
                 ,{align:'center', title: '借用状态',  width:70,templet:function(d){