Explorar o código

案例项目导出功能,人员信息添加激活和禁用相关功能

徐滕 hai 11 horas
pai
achega
e868ce3b44
Modificáronse 15 ficheiros con 2904 adicións e 16 borrados
  1. 2382 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsCaseBaseExport.java
  2. 302 0
      src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsCaseBaseService.java
  3. 67 4
      src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsCaseBaseController.java
  4. 1 0
      src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffBasicInfo.java
  5. 10 0
      src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffBasicInfoExcel.java
  6. 1 0
      src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java
  7. 10 0
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml
  8. 93 3
      src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsCaseBaseDao.xml
  9. 3 0
      src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml
  10. 2 2
      src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementAudit.jsp
  11. 2 2
      src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseSycnForm.jsp
  12. 1 1
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp
  13. 6 2
      src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralProjectRecordsCaseBaseList.jsp
  14. 14 2
      src/main/webapp/webpage/modules/ruralprojectrecords/electronicSeal/ruralProjectReportSignatureInfoForm.jsp
  15. 10 0
      src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2382 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectRecordsCaseBaseExport.java


+ 302 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsCaseBaseService.java

@@ -15,6 +15,8 @@ import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsCaseBaseDa
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralWorkProjectUserDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsCaseBaseExport;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsExport;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.OfficeService;
@@ -30,6 +32,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
 
 @Service
@@ -52,6 +56,23 @@ public class RuralProjectRecordsCaseBaseService extends CrudService<RuralProject
     @Autowired
     private RuralProjectRecordsDao ruralProjectRecordsDao;
 
+
+    /**
+     * 获取造价项目类别
+     * @return
+     */
+    public static List<MainDictDetail> projectSortCostList(){
+        return  DictUtils.getMainDictList("attachment_project_sort_cost");
+    }
+
+    /**
+     * 获取项目附件模板类型
+     * @return
+     */
+    public static List<MainDictDetail> projectSortList(){
+        return  DictUtils.getMainDictList("attachment_project_sort");
+    }
+
     public Page<RuralProjectRecords> findPage(Page<RuralProjectRecords> page, RuralProjectRecords projectRecords) {
         //设置数据权限
         if(!UserUtils.getUser().isAdmin()) {
@@ -196,4 +217,285 @@ public class RuralProjectRecordsCaseBaseService extends CrudService<RuralProject
         ruralProjectRecordsDao.insertCaseBase(records);
     }
 
+
+
+    public List<RuralProjectRecordsCaseBaseExport> exportDataD (List<RuralProjectRecordsCaseBaseExport> recordsList){
+
+        //查询上报超期时间天数
+        List<MainDictDetail> adventCount = DictUtils.getMainDictListOnProjectAdvent("advent_count");
+        //查询超期时间天数(电子归档)
+        List<MainDictDetail> adventRecordCount = DictUtils.getMainDictListOnProjectAdvent("advent_record_count");
+        //查询超期时间天数(A类纸质归档)
+        List<MainDictDetail> adventRecordACount = DictUtils.getMainDictListOnProjectAdvent("advent_record_A_count");
+        //查询超期时间天数(B类纸质归档)
+        List<MainDictDetail> adventRecordBCount = DictUtils.getMainDictListOnProjectAdvent("advent_record_B_count");
+
+        Integer endingCount = 0;
+        if(adventCount.size()>0){
+            //获取超期时间天数转int
+            endingCount = Integer.parseInt(adventCount.get(0).getLabel());
+        }
+
+        Integer endingAdventRecordCount = 0;
+        if(adventRecordCount.size()>0){
+            //获取超期时间天数(电子归档)转int
+            endingAdventRecordCount = Integer.parseInt(adventRecordCount.get(0).getLabel());
+        }
+        Integer endingAdventRecordACount = 0;
+        if(adventRecordACount.size()>0){
+            //获取超期时间天数(A类纸质归档)转int
+            endingAdventRecordACount = Integer.parseInt(adventRecordACount.get(0).getLabel());
+        }
+        Integer endingAdventRecordBCount = 0;
+        if(adventRecordBCount.size()>0){
+            //获取超期时间天数(A类纸质归档)转int
+            endingAdventRecordBCount = Integer.parseInt(adventRecordBCount.get(0).getLabel());
+        }
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+
+
+        if(null != recordsList && recordsList.size()>0){
+
+            //查询报告文件、依据性文件、其他文件必填列表以及数据
+            List<MainDictDetail> projectSortCostList = projectSortCostList();
+
+            //查询报告文件、依据性文件、其他文件必填列表以及数据
+            List<MainDictDetail> projectSortList = projectSortList();
+
+            for (RuralProjectRecordsCaseBaseExport info : recordsList) {
+                if("1".equals(info.getProjectType())){  //工程咨询
+
+                    for (MainDictDetail infoDetail: projectSortList) {
+                        if(info.getAttachmentProjectSort().equals(infoDetail.getValue())){
+                            info.setAttachmentProjectSort(infoDetail.getLabel());
+                            break;
+                        }
+                    }
+
+                }else if("2".equals(info.getProjectType())){    //造价审核
+
+                    for (MainDictDetail infoDetail: projectSortCostList) {
+                        if(info.getAttachmentProjectSort().equals(infoDetail.getValue())){
+                            info.setAttachmentProjectSort(infoDetail.getLabel());
+                            break;
+                        }
+                    }
+                }
+
+                //判断是A类还是B类 2是A类1是B类
+                if ("1".equals(info.getSubmitMoney())){
+                    info.setSubmitMoneyStr("B类");
+                    //设置电子未归档天数
+                    if (null != info.getReportAuditDate() && 5 != info.getProjectReportRecordStatus()
+                            && 7!= info.getProjectReportRecordStatus()){
+                        try {
+                            Date date2 = info.getReportAuditDate();
+                            Long dateTimeLong = date.getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong)/(24*60*60*1000);
+                            endTime = endTime - endingAdventRecordCount;
+                            info.setNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }else if (null != info.getReportAuditDate() && (5 == info.getProjectReportRecordStatus()
+                            || 7 == info.getProjectReportRecordStatus()) && null != info.getProjectReportRecordAuditDate()) {
+                        try {
+                            Date date2 = info.getReportAuditDate();
+                            //获取电子归档审核通过时间
+                            Long dateTimeLong = info.getProjectReportRecordAuditDate().getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong) / (24 * 60 * 60 * 1000);
+                            endTime = endTime - endingAdventRecordCount;
+                            info.setNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    //设置纸质未归档天数
+                    if (null != info.getReportAuditDate()
+                            && !"5".equals(info.getPaperFilingStatus())
+                            && !"7".equals(info.getPaperFilingStatus()) && !"10".equals(info.getPaperFilingStatus())){
+                        try {
+                            Date date2 = info.getReportAuditDate();
+                            Long dateTimeLong = date.getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong)/(24*60*60*1000);
+                            endTime = endTime - endingAdventRecordBCount;
+
+                            info.setPaperNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }else if(null != info.getReportAuditDate()
+                            && ("5".equals(info.getPaperFilingStatus())
+                            || "7".equals(info.getPaperFilingStatus())) && null != info.getFilingBatchAuditPassDate()) {
+                        try {
+                            Date date2 = info.getReportAuditDate();
+                            //获取电子归档审核通过时间
+                            Long dateTimeLong = info.getFilingBatchAuditPassDate().getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong) / (24 * 60 * 60 * 1000);
+                            endTime = endTime - endingAdventRecordBCount;
+
+                            info.setPaperNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+
+                    }
+
+                    //设置上报未归档天数
+                    if (null != info.getReportAuditDate()
+                            && !"5".equals(info.getReportStatus())
+                            && !"7".equals(info.getReportStatus()) && !"10".equals(info.getReportStatus())){
+                        try {
+                            Date date2 = info.getReportAuditDate();
+                            Long dateTimeLong = date.getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong)/(24*60*60*1000);
+                            endTime = endTime - endingCount;
+
+                            info.setAccomplishDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }else if(null != info.getReportAuditDate()
+                            && ("5".equals(info.getReportStatus())
+                            || "7".equals(info.getReportStatus())) && null != info.getAccomplishDate()) {
+                        try {
+                            Date date2 = info.getReportAuditDate();
+                            //获取电子归档审核通过时间
+                            Long dateTimeLong = info.getAccomplishDate().getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong) / (24 * 60 * 60 * 1000);
+                            endTime = endTime - endingCount;
+
+                            info.setAccomplishDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+
+                    }
+
+                } else if ("2".equals(info.getSubmitMoney())){
+                    info.setSubmitMoneyStr("A类");
+                    if(StringUtils.isNotBlank(info.getPpfFileNum())){
+                        info.setFilingBoxNum(info.getPpfFileNum());
+                    }
+                    //设置电子未归档天数
+                    if (null != info.getReportTwoAuditDate() && 5 != info.getProjectReportRecordStatus()
+                            && 7!= info.getProjectReportRecordStatus()){
+                        try {
+                            Date date2 = info.getReportTwoAuditDate();
+                            Long dateTimeLong = date.getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong)/(24*60*60*1000);
+                            endTime = endTime - endingAdventRecordCount;
+
+                            info.setNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }else if (null != info.getReportTwoAuditDate() && (5 == info.getProjectReportRecordStatus()
+                            || 7 == info.getProjectReportRecordStatus()) && null != info.getProjectReportRecordAuditDate()) {
+                        try {
+                            Date date2 = info.getReportTwoAuditDate();
+                            //获取电子归档审核通过时间
+                            Long dateTimeLong = info.getProjectReportRecordAuditDate().getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong) / (24 * 60 * 60 * 1000);
+                            endTime = endTime - endingAdventRecordCount;
+                            info.setNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    //设置纸质未归档天数
+                    if (null != info.getReportTwoAuditDate()
+                            && !"5".equals(info.getPaperFilingStatus()) &&
+                            !"7".equals(info.getPaperFilingStatus()) && !"10".equals(info.getPaperFilingStatus())){
+                        try {
+                            Date date2 = info.getReportTwoAuditDate();
+                            Long dateTimeLong = date.getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong)/(24*60*60*1000);
+                            endTime = endTime - endingAdventRecordACount;
+
+                            info.setPaperNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }else if (null != info.getReportTwoAuditDate() && (5 == info.getProjectReportRecordStatus()
+                            || 7 == info.getProjectReportRecordStatus()) && null != info.getPaperFilingAuditPassDate()) {
+                        try {
+                            Date date2 = info.getReportTwoAuditDate();
+                            //获取电子归档审核通过时间
+                            Long dateTimeLong = info.getPaperFilingAuditPassDate().getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong) / (24 * 60 * 60 * 1000);
+                            endTime = endTime - endingAdventRecordACount;
+
+                            info.setPaperNoArchivedDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+
+
+                    //设置上报未归档天数
+                    if (null != info.getReportTwoAuditDate()
+                            && !"5".equals(info.getReportStatus())
+                            && !"7".equals(info.getReportStatus()) && !"10".equals(info.getReportStatus())){
+                        try {
+                            Date date2 = info.getReportTwoAuditDate();
+                            Long dateTimeLong = date.getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong)/(24*60*60*1000);
+                            endTime = endTime - endingCount;
+
+                            info.setAccomplishDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }else if(null != info.getReportTwoAuditDate()
+                            && ("5".equals(info.getReportStatus())
+                            || "7".equals(info.getReportStatus())) && null != info.getAccomplishDate()) {
+                        try {
+                            Date date2 = info.getReportTwoAuditDate();
+                            //获取电子归档审核通过时间
+                            Long dateTimeLong = info.getAccomplishDate().getTime();
+                            Long date2TimeLong = date2.getTime();
+                            //计算未归档天数
+                            Long endTime = (dateTimeLong - date2TimeLong) / (24 * 60 * 60 * 1000);
+                            endTime = endTime - endingCount;
+
+                            info.setAccomplishDays(endTime.toString());
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+
+                    }
+                }
+
+            }
+        }
+        return recordsList;
+    }
+
 }

+ 67 - 4
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectRecordsCaseBaseController.java

@@ -1,11 +1,17 @@
 package com.jeeplus.modules.ruralprojectrecords.web;
 
+import com.jeeplus.common.config.Global;
 import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
 import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
 import com.jeeplus.common.web.BaseController;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.ProjectCaseBaseAudit;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsCaseBaseExport;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsExport;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsCaseBaseService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsOwnCaseBaseService;
@@ -17,16 +23,16 @@ import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
 import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
 import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfoExcel;
 import jersey.repackaged.com.google.common.collect.Lists;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -226,4 +232,61 @@ public class RuralProjectRecordsCaseBaseController extends BaseController {
         return map;
     }
 
+    /**
+     * 导出excel文件
+     */
+    @RequiresPermissions("ruralProject:RuralProjectRecordsCaseBase:export")
+    @RequestMapping(value = "exportCaseBase", method= RequestMethod.POST)
+    public String exportCaseBase(RuralProjectRecords projectRecords, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+        try {
+            String fileName = "案例项目信息"+ DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            //添加查询类型(工程咨询)
+            List<String> typeList = Lists.newArrayList();
+            String oldProjectSort = null;
+            if (StringUtils.isBlank(projectRecords.getAttachmentProjectSort())){
+                typeList.add("1");
+                typeList.add("2");
+            }else {
+                oldProjectSort=projectRecords.getAttachmentProjectSort();
+                String attachmentProjectSort=projectRecords.getAttachmentProjectSort();
+                typeList.add(attachmentProjectSort.split("-")[0]);
+                projectRecords.setAttachmentProjectSort(attachmentProjectSort.split("-")[1]);
+            }
+
+            List<RuralProjectRecordsCaseBaseExport> list = Lists.newArrayList();
+            Page<RuralProjectRecords> page = service.findPage(new Page<RuralProjectRecords>(request, response, -1), projectRecords);
+            for (RuralProjectRecords t : page.getList()) {
+                RuralProjectRecordsCaseBaseExport caseBaseExport = new RuralProjectRecordsCaseBaseExport();
+                MyBeanUtils.copyBeanNotNull2Bean(t,caseBaseExport);//将编辑表单中的非NULL值覆盖数据库记录中的值
+                if(null != t.getZiXunBDE()){
+                    caseBaseExport.setZiXunBDE(Double.valueOf(t.getZiXunBDE()));
+                }
+                if(null != t.getReviewFee()){
+                    caseBaseExport.setReviewFee(Double.valueOf(t.getReviewFee()));
+                }
+                if(null != t.getApprovalFee()){
+                    caseBaseExport.setApprovalFee(Double.valueOf(t.getApprovalFee()));
+                }
+                if(null != t.getVerifyFee()){
+                    caseBaseExport.setVerifyFee(Double.valueOf(t.getVerifyFee()));
+                }
+                if(null != t.getVerifyRate()){
+                    caseBaseExport.setVerifyRate(Double.valueOf(t.getVerifyRate()));
+                }
+                if(null != t.getMoney()){
+                    caseBaseExport.setMoney(Double.valueOf(t.getMoney()));
+                }
+                list.add(caseBaseExport);
+            }
+            List<RuralProjectRecordsCaseBaseExport> ruralProjectRecordsCaseBaseExports = service.exportDataD(list);
+
+            new ExportExcel("案例项目信息", RuralProjectRecordsCaseBaseExport.class).setDataList(ruralProjectRecordsCaseBaseExports).write(response, fileName).dispose();
+            addMessage(redirectAttributes, "导出案例项目信息记录成功!");
+            return null;
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出案例项目信息记录失败!失败信息:"+e.getMessage());
+        }
+        return "redirect:"+ Global.getAdminPath()+"/ruralProject/RuralProjectRecordsCaseBase?repage";
+    }
+
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffBasicInfo.java

@@ -874,6 +874,7 @@ public class WorkStaffBasicInfo extends DataEntity<WorkStaffBasicInfo> {
         this.handSignatureUrl = handSignatureUrl;
     }
 
+    @ExcelField(title = "是否禁用", dictType = "disabled_user_login", align = 2, sort = 28)
     public String getUserLoginFlag() {
         return userLoginFlag;
     }

+ 10 - 0
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffBasicInfoExcel.java

@@ -33,6 +33,7 @@ public class WorkStaffBasicInfoExcel extends DataEntity<WorkStaffBasicInfoExcel>
 	private String certificateName; //执业资格证书
 	private String certificateNum; //执业资格证书编号
 	private Date certificateDate; //执业资格证书发证日期
+	private String userLoginFlag;    //用户登录状态
 
 	@ExcelField(title="姓    名", align=2, sort=1)
 	public String getName() {
@@ -141,4 +142,13 @@ public class WorkStaffBasicInfoExcel extends DataEntity<WorkStaffBasicInfoExcel>
 	public void setCertificateDate(Date certificateDate) {
 		this.certificateDate = certificateDate;
 	}
+
+	@ExcelField(title = "是否禁用", dictType = "disabled_user_login", align = 2, sort = 13)
+	public String getUserLoginFlag() {
+		return userLoginFlag;
+	}
+
+	public void setUserLoginFlag(String userLoginFlag) {
+		this.userLoginFlag = userLoginFlag;
+	}
 }

+ 1 - 0
src/main/java/com/jeeplus/modules/workstaff/service/WorkStaffBasicInfoService.java

@@ -1135,6 +1135,7 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
             WorkStaffBasicInfoExcel infoExcel = new WorkStaffBasicInfoExcel();
             infoExcel.setName(info.getName());
             infoExcel.setIdCard(info.getIdCard());
+            infoExcel.setUserLoginFlag(info.getUserLoginFlag());
             Integer age = info.getAge();
             if (null != age) {
                 infoExcel.setAge(age.toString());

+ 10 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageAllDao.xml

@@ -1005,6 +1005,16 @@ END) as projectScale*/
 		left join project_paper_filing ppf on ppf.project_id = a.id
 		<where>
 			a.status = 5
+			<if test="caseStatus !=null and caseStatus != ''">
+				<choose>
+					<when test="caseStatus == 0">
+						and a.id not in (select project_id from case_base)
+					</when>
+					<otherwise>
+						AND cb.case_status = #{caseStatus}
+					</otherwise>
+				</choose>
+			</if>
 			<if test="projectId != null and projectId != ''">
 				AND a.project_id like concat('%',#{projectId},'%')
 			</if>

+ 93 - 3
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsCaseBaseDao.xml

@@ -68,6 +68,56 @@
 		a.belonging_department as "belongingDepartment"
 	</sql>
 
+	<sql id="projectRecordsColumnss">
+		distinct(a.id) AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		(select name from sys_user user where user.id=a.create_by) AS "createBy.name",
+		(select name from sys_user user where user.id=a.create_by) AS "createByName",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.del_flag AS "delFlag",
+		a.contract_id AS "workContractInfo.id",
+		a.project_id AS "projectId",
+		a.project_name AS "projectName",
+		a.scale_type AS "scaleType",
+		a.scale_unit AS "scaleUnit",
+		a.scale_quantity AS "scaleQuantity",
+		a.area_id AS "area.id",
+		a.project_site AS "projectSite",
+		a.project_desc AS "projectDesc",
+		a.remarks AS "remarks",
+		a.status AS "projectStatus",
+		a.process_instance_id AS "processInstanceId",
+		a.company_id AS "company.id",
+		a.office_id AS "office.id",
+		a.alter_process_id AS "alterProcessId",
+		area.name AS "area.name",
+		area.type as "area.type",
+		a.province,
+		a.city,
+		a.area_name AS "county",
+		a.project_structure AS "projectStructure",
+		a.on_ground_num AS "onGroundNum",
+		a.under_ground_num AS "underGroundNum",
+		a.building_scale AS "buildingScale",
+		a.measuring_unit AS "measuringUnit",
+		a.project_use AS "projectUse",
+		a.install_fees AS "installFees",
+		a.building_fees AS "buildingFees",
+		a.building_percent AS "buildingPercent",
+		a.install_percent AS "installPercent",
+		a.unit_fees AS "unitFees",
+		a.building_unit_fees AS "buildingUnitFees",
+		a.install_unit_fees AS "installUnitFees",
+		a.total_fees AS "totalFees",
+		ifnull(a.reported_state,0) as "reportedState",
+		a.over_due_status as "overDueStatus",
+		ifnull(a.record_state,0) as "projectRecordStatus",
+		a.over_record_status as "overRecordStatus",
+		a.emergency_project as "emergencyProject"
+	</sql>
+
 
 
 	<select id="queryCount" resultType="int" >
@@ -266,13 +316,36 @@
 
 	<select id="findList" resultType="RuralProjectRecords" >
 		SELECT
-		<include refid="projectRecordsColumns"/>
+		<include refid="projectRecordsColumnss"/>
+		,a.record_state as "recordState"
 		,a.submit_money as "submitMoney"
+		,a.submit_scale as "submitScale"
+		,a.attachment_project_sort as "attachmentProjectSort"
+		,rprr.ZiXunBDE as "ziXunBDE"
+		,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as projectScale
+		,(case
+		when a.submit_money = '1' and prd.status = '5' then
+		'已完成'
+		when a.submit_money = '2' and prdt.status = '5' then
+		'已完成' else '未完成'
+		end) as completionStatus
+		,(case
+		when a.submit_money = '1' and pfp.status = '5' then
+		'已归档'
+		when a.submit_money = '2' and ppf.status = '5' then
+		'已归档' else '未归档'
+		end) as downArchiveStatus
+
 		,a.project_type as projectType,
 		wci.name AS "workContractInfo.name",
+		wci.contract_num as "workContractInfo.contractNum",
+		wci.contract_price as "workContractInfo.contractPrice",
+		sub.name as "projectMasterName",
+		sob.name as "projectMasterOffice",
 		wct.id AS "workContractInfo.client.id",
 		wct.name AS "workContractInfo.client.name",
 		o.top_company AS "office.name",
+		o.name AS "createByOffice",
 		ifnull(prd.number ,"") as "projectReportNumber"
 		,ifnull(prd.status,0) as "projectReportStatus"
 		,ifnull(prd.name,"") as "projectReportName"
@@ -300,17 +373,34 @@
 		,ppf.id as "ppfId"
 		,pfb.process_instance_id AS "filingProcessinstanceId"
 		,ifnull(pfp.status,0) as "filingProjectStatus"
-		,prd.audit_pass_date as "prdAuditDate"
+		,ifnull(prd.approval_fee ,"") as "approvalFee"
+		,ifnull(prd.review_fee ,"") as "reviewFee"
+		,ifnull(prd.verify_fee ,"") as "verifyFee"
+		,ifnull(prd.verify_rate ,"") as "verifyRate"
+		,prd.audit_pass_date as "reportAuditDate"
+		,prdt.audit_pass_date as "reportTwoAuditDate"
+		/*,SUM(wi.money) as "money"*/
+		,prd.ZiXunShouRu as "money"
+		,prd.signature_flag as "signatureFlag"
+		,prd.signature_contract_id as "signatureContractId"
+		,prd.signature_url as "signatureUrl"
+		,a.report_signature_flag as "reportSignatureFlag"
+		,a.report_signature_url as "reportSignatureUrl"
+		,a.report_signature_contract_id as "reportSignatureContractId"
+		,(SELECT group_concat( su.NAME ) FROM work_project_user wpu LEFT JOIN sys_user su ON su.id = wpu.user_id WHERE wpu.project_id = a.id ) AS "leaderNameStr",
+		(SELECT group_concat( su.id ) FROM work_project_user wpu LEFT JOIN sys_user su ON su.id = wpu.user_id WHERE wpu.project_id = a.id ) AS "leaderNameIds"
 		,cb.case_process_id as "caseProcessId"
 		,cb.case_type as "caseType"
 		,cb.case_create_by as "caseCreateBy"
 		,if(case_status > 0 ,case_status,"0") as "caseStatus"
 		,pcda.process_instance_id as "caseAuditProcessId"
 		,pcda.id as "caseAuditId"
-		,pcda.id as "caseAuditId"
 		,ifnull(pcda.status,0) as "caseAuditStatus"
+		,ifnull(pcda.status,0) as "caseBaseStatus"
 		FROM rural_project_records a
 		LEFT JOIN sys_area area ON area.id = a.area_id
+		LEFT JOIN sys_user sub on a.project_master_id = sub.id
+		LEFT JOIN sys_office sob ON sob.id = sub.office_id
 		left join rural_project_records_reported rprr on rprr.id = a.id
 		left join case_base cb on a.id = cb.project_id
 		left join project_case_base_audit pcda on pcda.project_id = cb.project_id

+ 3 - 0
src/main/resources/mappings/modules/workstaff/WorkStaffBasicInfoDao.xml

@@ -204,6 +204,9 @@
 			<if test="office != null and office.id =='' and office.name != null and office.name != ''">
 				AND o.name like concat("%",#{office.name},"%")
 			</if>
+			<if test="userLoginFlag != null and userLoginFlag != ''">
+				AND suc.login_flag = #{userLoginFlag}
+			</if>
 			<if test="officeIdList!=null and officeIdList.size!=0">
 				and a.office_id in
 				<foreach collection="officeIdList" item="officeId" separator="," open="(" close=")">

+ 2 - 2
src/main/webapp/webpage/modules/projectcontentinfo/projectCaseBaseSupplementAudit.jsp

@@ -2526,13 +2526,13 @@
 
 	var allDataList = [
 		<c:forEach var="item" items="${projectReportRecord.fileCaseBaseList}" varStatus="i">
-		<c:forEach var="attachment" items="${item.workAttachments}">
+		<c:forEach var="attachment" items="${item.workAttachments}" varStatus="j">
 		{
 			id: '${attachment.id}',
 			syncDifySync: '${attachment.syncDifySync}',
 			attachmentName:'${attachment.attachmentName}'
 		}
-		<c:if test="${!i.last || !attachment.last}">,</c:if>
+		<c:if test="${!i.last || !j.last}">,</c:if>
 		</c:forEach>
 		</c:forEach>
 	];

+ 2 - 2
src/main/webapp/webpage/modules/projectcontentinfo/projectReportRecordCaseBaseSycnForm.jsp

@@ -792,13 +792,13 @@
 
 	var allDataList = [
 		<c:forEach var="item" items="${projectReportRecord.fileCaseBaseList}" varStatus="i">
-		<c:forEach var="attachment" items="${item.workAttachments}">
+		<c:forEach var="attachment" items="${item.workAttachments}" varStatus="j">
 		{
 			id: '${attachment.id}',
 			syncDifySync: '${attachment.syncDifySync}',
 			attachmentName:'${attachment.attachmentName}'
 		}
-		<c:if test="${!i.last || !attachment.last}">,</c:if>
+		<c:if test="${!i.last || !j.last}">,</c:if>
 		</c:forEach>
 		</c:forEach>
 	];

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp

@@ -166,7 +166,7 @@
                 $("#subbmitFlag").val(subbmitFlag)
                 console.log(subbmitFlag)
 
-                if(1 === subbmitFlag){
+                if(subbmitFlag > 0){
                     $("#inputForm").submit();
                     return true;
                 }else{

+ 6 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralProjectRecordsCaseBaseList.jsp

@@ -839,6 +839,10 @@
 					<div class="layui-btn-group">
 <%--						<button class="layui-btn layui-btn-sm layui-bg-blue" id="btn-expand">全部展开</button>--%>
 <%--						<button class="layui-btn layui-btn-sm layui-bg-blue" id="btn-fold">全部折叠</button>--%>
+
+						<shiro:hasPermission name="ruralProject:RuralProjectRecordsCaseBase:export">
+							<table:exportExcel url="${ctx}/ruralProject/RuralProjectRecordsCaseBase/exportCaseBase"></table:exportExcel><!-- 导出按钮 -->
+						</shiro:hasPermission>
 						<button class="layui-btn layui-btn-sm" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"> 刷新</button>
 					</div>
 					<div style="clear: both;"></div>
@@ -1020,7 +1024,7 @@
 				<%--			var xml = "<span style=\"cursor:default;\" class=\"new-status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
 				<%--		return xml;--%>
 				<%--	}}--%>
-				,{align:'center',title:"操作",width:260,templet:function(d){
+				,{align:'center',title:"操作",width:270,templet:function(d){
 						var xml = "";
 
 						if(d.caseBaseAuditNotifyFlag != undefined && d.caseBaseAuditNotifyFlag !=null && "" != d.caseBaseAuditNotifyFlag && d.caseBaseAuditNotifyFlag == 1)
@@ -1041,7 +1045,7 @@
 						<shiro:hasPermission name="ruralProject:RuralProjectRecordsCaseBase:canceCaseBase">
 						if((d.reportedState == 5 || d.reportedState == 7) && (d.projectReportRecordStatus == 5 || d.projectReportRecordStatus == 7)){
 							if(d.caseType == 1){
-								xml+="<a href=\"javascript:void(0)\" onclick=\"deleteFun('${ctx}/ruralProject/RuralProjectRecordsCaseBase/canceCaseBase?projectId=" + d.id + "')\" class=\"layui-btn layui-btn-xs layui-bg-red\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;'  > 撤销案例项目</a>";
+								xml+="<a href=\"javascript:void(0)\" onclick=\"deleteFun('${ctx}/ruralProject/RuralProjectRecordsCaseBase/canceCaseBase?projectId=" + d.id + "')\" class=\"layui-btn layui-btn-xs layui-bg-red\" style='height: 32px;margin-top: 5px;margin-bottom: 5px;'  > 撤销案例</a>";
 							}
 						}
 						</shiro:hasPermission>

+ 14 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/electronicSeal/ruralProjectReportSignatureInfoForm.jsp

@@ -47,8 +47,19 @@
         var clientCount = 0;
         function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             if(validateForm.form()){
-                $("#inputForm").submit();
-                return true;
+
+                var subbmitFlag = $("#subbmitFlag").val();
+                subbmitFlag ++;
+                $("#subbmitFlag").val(subbmitFlag)
+                console.log(subbmitFlag)
+
+                if(subbmitFlag > 0){
+                    $("#inputForm").submit();
+                    return true;
+                }else{
+                    parent.layer.msg("请勿重复提交!", {icon: 5});
+                    return false;
+                }
             }else{
                 parent.layer.msg("信息未填写完整!", {icon: 5});
             }
@@ -866,6 +877,7 @@
         <form:form id="inputForm" modelAttribute="projectReportSignatureInfo" action="${ctx}/ruralProject/electronicSeal/save" method="post" class="form-horizontal layui-form ">
             <input type="hidden" id="id" name="id" value="${projectReportSignatureInfo.id}" />
             <input type="hidden" id="type" name="type" value="${projectReportSignatureInfo.type}" />
+            <input type="hidden" id="subbmitFlag" value="0">
 
 
 

+ 10 - 0
src/main/webapp/webpage/modules/workstaff/workStaffBasicInfoList.jsp

@@ -266,6 +266,16 @@
                             </input>
                         </div>
                     </div>
+
+                    <div class="layui-item query athird">
+                        <label class="layui-form-label">是否禁用:</label>
+                        <div class="layui-input-block">
+                            <form:select path="userLoginFlag" class="form-control simple-select">
+                                <form:option value="" label=""/>
+                                <form:options items="${fns:getDictList('disabled_user_login')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                            </form:select>
+                        </div>
+                    </div>
                 </div>
             </form:form>
 	        </div>