فهرست منبع

审定内审核签章流程优化,添加线程处理功能

user5 3 سال پیش
والد
کامیت
ec9be99d17

+ 15 - 10
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageNewService.java

@@ -41,6 +41,8 @@ import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsReportedDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralWorkProjectUserDao;
 import com.jeeplus.modules.ruralprojectrecords.entity.*;
+import com.jeeplus.modules.ruralprojectrecords.thread.ApprovalThread;
+import com.jeeplus.modules.ruralprojectrecords.thread.JudgementThread;
 import com.jeeplus.modules.ruralprojectrecords.utils.RuralProjectReportedInfoUtil;
 import com.jeeplus.modules.sys.dao.UserDao;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
@@ -1665,17 +1667,17 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                         synchronized (SYN_BYTE) {
                             /*String reportNo = createReportNo(reportData.getConditionType());
                             projectReportData.setNumber(reportNo);*/
-
+                            new JudgementThread(ruralProjectRecords,projectReportData).start();
                             //下载审定单文件
                             String deleteFile = null;
-                            try {
+                            /*try {
                                 //进行签章处理
                                 //根据项目id查询是否已经提交过了审定单签章
                                 if(null == ruralProjectRecords){
                                     return "查询不到该项目信息";
                                 }
                                 if(null!= ruralProjectRecords.getQualitySignatureFlag() && 1 == ruralProjectRecords.getQualitySignatureFlag()){
-                                    return "该项目已经报告盖章完成";
+                                    return "该项目已经审定单盖章完成";
                                 }
                                 if(StringUtils.isBlank(ruralProjectRecords.getProjectMasterId())){
                                     return "项目负责人为空,无法进行签章";
@@ -1765,7 +1767,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                     System.out.println("创建签章合同用时:" + (s2-s1));
 
                                     //进行静默签署
-                                    /*long s3 = System.currentTimeMillis();
+                                    *//*long s3 = System.currentTimeMillis();
                                     HashMap signbyCompanyHashMap = ruralProjectMessageService.signbyCompanyByKeyWord(contractId,documentList);
                                     if(null != signbyCompanyHashMap){
                                         String signbyCompanyCode = signbyCompanyHashMap.get("code").toString();
@@ -1775,7 +1777,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                         }
                                     }
                                     long s4 = System.currentTimeMillis();
-                                    System.out.println("进行静默签署用时:" + (s4-s3));*/
+                                    System.out.println("进行静默签署用时:" + (s4-s3));*//*
                                     //将documentId 和contractId存储到质量复核对应的数据种
                                     //签章完成则进行数据的保存
                                     ruralProjectRecords.setQualitySignatureFlag(1);
@@ -1786,9 +1788,9 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                     ruralProjectRecords.setQualitySignatureUploadDate(new Date());
                                     //修改签章对应信息文件
                                     projectReportDataService.updateJudgementSignatureInfo(ruralProjectRecords);
-                                }/*else{
+                                }*//*else{
                                     return "质量复核审定单文件未找到,无法进行签章操作";
-                                }*/
+                                }*//*
                             }catch (Exception e){
 
                             }finally {
@@ -1800,7 +1802,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                         file.delete();
                                     }
                                 }
-                            }
+                            }*/
                             //添加审核通过日期
                             projectReportData.setAuditPassDate(new Date());
                         }
@@ -1838,7 +1840,10 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
         List<User> userList = new ArrayList<>();
         if (!state) {
             users.add(projectReportData.getCreateBy());
-            if ("yes".equals(flag)) {
+            WorkProjectNotify notify = new WorkProjectNotify();
+            notify.setNotifyId(projectReportData.getId());
+            userList = workProjectNotifyService.readByNotifyId(notify);
+            /*if ("yes".equals(flag)) {
                 String titleStr = "项目【"+projectRecords.getProjectName()+"】报告质量复核审批通过";
                 String content = "项目【"+projectRecords.getProjectName()+"】报告质量复核审批通过";
                 if(StringUtils.isNotBlank(projectReportData.getNumber())){
@@ -1881,7 +1886,7 @@ public class RuralProjectMessageNewService extends CrudService<RuralProjectMessa
                                             notifyRole));
                 }
             }
-            workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());
+            workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());*/
         } else {
             if (StringUtils.isNotBlank(workActivityMenu.getProcessType()) && !workActivityMenu.getProcessType().equals("judgementReport")) {
                 WorkProjectNotify notify = new WorkProjectNotify();

+ 3 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -4009,6 +4009,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         //添加盖章位置
         List<Location> locations = Lists.newArrayList();
         Location location = new Location();
+        location.setSealId(COMPANYROUNDSEALID);
         location.setDocumentId(documentList.get(0));
         location.setPage("0");
         location.setRectType("SEAL_CORPORATE");
@@ -4037,6 +4038,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                     //添加盖章位置
                     //List<Location> principalLocations = Lists.newArrayList();
                     Location principalLocation = new Location();
+                    principalLocation.setSealId(userSealId);
                     principalLocation.setDocumentId(documentList.get(0));
                     principalLocation.setPage("0");
                     principalLocation.setRectType("SEAL_CORPORATE");
@@ -4069,6 +4071,7 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
                 //添加盖章位置
                 //List<Location> principalLocations = Lists.newArrayList();
                 Location principalLocation = new Location();
+                principalLocation.setSealId(userSealId);
                 principalLocation.setDocumentId(documentList.get(0));
                 principalLocation.setPage("0");
                 principalLocation.setRectType("SEAL_CORPORATE");

+ 303 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/thread/JudgementThread.java

@@ -0,0 +1,303 @@
+package com.jeeplus.modules.ruralprojectrecords.thread;
+
+import com.alibaba.fastjson.JSON;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.oss.OSSClientUtil;
+import com.jeeplus.common.utils.SpringContextHolder;
+import com.jeeplus.modules.projectcontentinfo.dao.ProjectReportDataDao;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
+import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageElectronicSealDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.ProjectApprovalSignature;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
+import com.jeeplus.modules.ruralprojectrecords.enums.ProjectStatusEnum;
+import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.entity.Workattachment;
+import com.jeeplus.modules.sys.service.WorkattachmentService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.tools.utils.SignaturePostUtil;
+import com.jeeplus.modules.workactivity.service.WorkActivityProcessService;
+import com.jeeplus.modules.workprojectnotify.entity.WorkProjectNotify;
+import com.jeeplus.modules.workprojectnotify.service.WorkProjectNotifyService;
+import com.jeeplus.modules.workprojectnotify.util.UtilNotify;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.File;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * @author: 徐滕
+ * @create: 2021-12-17 15:45
+ **/
+public class JudgementThread extends Thread {
+
+    private ProjectReportDataService projectReportDataService = SpringContextHolder.getBean(ProjectReportDataService.class);
+    private WorkattachmentService workattachmentService = SpringContextHolder.getBean(WorkattachmentService.class);
+    private RuralProjectMessageService ruralProjectMessageService = SpringContextHolder.getBean(RuralProjectMessageService.class);
+    private WorkActivityProcessService workActivityProcessService = SpringContextHolder.getBean(WorkActivityProcessService.class);
+    private WorkProjectNotifyService workProjectNotifyService = SpringContextHolder.getBean(WorkProjectNotifyService.class);
+    private ProjectReportDataDao dao = SpringContextHolder.getBean(ProjectReportDataDao.class);
+
+    private RuralProjectRecords ruralProjectRecords;
+    private ProjectReportData projectReportData;
+
+
+    public JudgementThread(RuralProjectRecords ruralProjectRecords, ProjectReportData projectReportData)
+    {
+        this.ruralProjectRecords = ruralProjectRecords;
+        this.projectReportData = projectReportData;
+    }
+
+    public void run(){
+        Boolean bool = true;
+        String disposeResult = "";
+        //下载审定单文件
+        String deleteFile = null;
+        try {
+            //进行签章调用
+            //根据项目id查询是否已经提交过了审定单签章
+            if(null == projectReportData){
+                disposeResult = "查询不到该项目的质量复核信息";
+                bool = false;
+            }
+            if(null!= projectReportData.getSignatureFlag() && 1 == projectReportData.getSignatureFlag()){
+                disposeResult = "该质量复核已经盖章完成";
+                bool = false;
+            }
+            if(StringUtils.isBlank(ruralProjectRecords.getProjectMasterId())){
+                disposeResult = "项目负责人为空,无法进行签章";
+                bool = false;
+            }
+
+            //根据项目id和附件类型的
+            Workattachment workClientAttachment = new Workattachment();
+            workClientAttachment.setAttachmentFlag("105");
+            workClientAttachment.setAttachmentId(ruralProjectRecords.getId());
+            workClientAttachment.setProjectId(ruralProjectRecords.getId());
+            workClientAttachment.setDivIdType("_judgement");
+            List<Workattachment> fileList = workattachmentService.findList(workClientAttachment);
+            if(fileList.size()>0){
+                Workattachment workattachment = fileList.get(0);
+                if(StringUtils.isBlank(workattachment.getUrl())){
+                    disposeResult = "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
+                    bool = false;
+                }
+                //下载审定单文件
+                String path = null;
+                if(System.getProperty("os.name").toLowerCase().contains("win")){
+                    path = "D:/attachment-file/";
+                }else{
+                    path = "/attachment-file/";
+                }
+                String file = workattachment.getUrl();
+                file = file.replace("amp;","");
+                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                String aliyunUrl = Global.getAliyunUrl();
+                String aliDownloadUrl = Global.getAliDownloadUrl();
+                String cons = "";
+                if (file.contains(aliyunUrl)){
+                    cons = aliyunUrl;
+                }else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+                    cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+                }else {
+                    cons = aliDownloadUrl;
+                }
+                String ossKey = file.split(cons+"/")[1];
+                new OSSClientUtil().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                //将下载下来的文件转换为file文件
+                File srcFile = new File(path+fileName);
+                File verticalInvalidFile = new File(path+fileName);
+                deleteFile = path+fileName;
+
+                //截取文件名称
+                String srcFileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
+                //截取文件后缀名
+                String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
+                if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase()) && !"xls".equals(substring.toLowerCase()) && !"xlsx".equals(substring.toLowerCase())){
+                    disposeResult = "请上传doc、docx、xls、xlsx或者pdf文件进行签章操作";
+                    bool = false;
+                }
+                //获取真签单的documentId
+                HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                String code = hashMap.get("code").toString();
+                String documentId = "";
+                if("0".equals(code)){
+                    String result = hashMap.get("result").toString();
+                    HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                    documentId =  documentIdMap.get("documentId").toString();
+                    if("".equals(documentId)){
+                        disposeResult =  "签章文件创建失败";
+                        bool = false;
+                    }
+                }else{
+                    String message = hashMap.get("message").toString();
+                    disposeResult =  message;
+                    bool = false;
+                }
+                List<String> documentList = Lists.newArrayList();
+                documentList.add(documentId);
+                //根据项目id 和 documentId生成合同id
+                long s1 = System.currentTimeMillis();
+                HashMap contractIdHashMap = new HashMap();
+                if("doc".equals(substring.toLowerCase()) || "docx".equals(substring.toLowerCase()) || "pdf".equals(substring.toLowerCase()) ){
+                    contractIdHashMap = ruralProjectMessageService.getSignatureContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
+                }else if("xls".equals(substring.toLowerCase()) || "xlsx".equals(substring.toLowerCase())){
+                    contractIdHashMap = ruralProjectMessageService.getSignatureExcelContractId(ruralProjectRecords.getId(), documentList,ruralProjectRecords.getProjectMasterId(),"");
+                }
+                String contractIdCode = contractIdHashMap.get("code").toString();
+                String contractId = "";
+                if("0".equals(contractIdCode)){
+                    contractId = contractIdHashMap.get("contractId").toString();
+                    if("".equals(contractId)){
+                        disposeResult =  "签章文件创建失败";
+                        bool = false;
+                    }
+                }else{
+                    disposeResult =  contractIdHashMap.get("message").toString();
+                    bool = false;
+                }
+                long s2 = System.currentTimeMillis();
+                System.out.println("创建签章合同用时:" + (s2-s1));
+                //进行静默签署
+                                /*HashMap signbyCompanyHashMap = ruralProjectMessageService.signbyCompany(contractId, documentList);
+                                if(null != signbyCompanyHashMap){
+                                    String signbyCompany = signbyCompanyHashMap.get("code").toString();
+                                    if(!"0".equals(signbyCompany)){
+                                        disposeResult = signbyCompanyHashMap.get("message").toString();
+                                    }
+                                }*/
+                //将documentId 和contractId存储到质量复核对应的数据种
+                //签章完成则进行数据的保存
+                notification(bool,disposeResult,documentId,contractId,srcFileName);
+            }else{
+                disposeResult = "审定单文件未找到,无法进行签章操作";
+                bool = false;
+                notification(bool,disposeResult,"","","");
+            }
+        }catch (Exception e){
+
+        }finally {
+            if(StringUtils.isNotBlank(deleteFile)){
+                //根据路径创建文件对象
+                File file = new File(deleteFile);
+                //路径是个文件且不为空时删除文件
+                if(file.isFile()&&file.exists()){
+                    file.delete();
+                }
+            }
+        }
+
+    }
+
+    private void notification(Boolean bool,String disposeResult,String documentId,String contractId,String srcFileName){
+        if(bool){
+            //users.add(projectReportSignature.getCreateBy());
+            //审核完成提示框
+            String title = "报告号【"+projectReportData.getNumber()+"】审定单签章审批登记完成";
+            String content = "报告号【"+projectReportData.getNumber()+"】审定单签章审批登记完成,项目编号:"+ruralProjectRecords.getProjectId();
+            if ("yes".equals(projectReportData.getAct().getFlag())) {
+                projectReportData.setStatus("5");
+                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",
+                                        "待通知",
+                                        "审批通过"));
+
+            } 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")){
+                    projectReportData.setStatus("4");
+                    workProjectNotifyService
+                            .save(UtilNotify
+                                    .saveNotify(projectReportData.getId(),
+                                            projectReportData.getCreateBy(),
+                                            projectReportData.getCompanyId(),
+                                            title,
+                                            content,
+                                            "105",
+                                            "0",
+                                            "待通知",
+                                            "审批通过"));
+                }
+            }
+            workActivityProcessService.deleteProcessIdAuditUsers(projectReportData.getProcessInstanceId());
+
+            //签章完成则进行数据的保存
+            ruralProjectRecords.setQualitySignatureFlag(1);
+            ruralProjectRecords.setQualitySignatureDocumentId(documentId);
+            ruralProjectRecords.setQualitySignatureContractId(contractId);
+            ruralProjectRecords.setQualitySignatureFileName(srcFileName);
+            ruralProjectRecords.setQualitySignatureUploadFileUser(UserUtils.getUser());
+            ruralProjectRecords.setQualitySignatureUploadDate(new Date());
+            //修改签章对应信息文件
+            projectReportDataService.updateJudgementSignatureInfo(ruralProjectRecords);
+
+        }else{
+            //users.add(projectReportSignature.getCreateBy());
+            //审核完成提示框
+            String title = "报告号【"+projectReportData.getNumber()+"】审定单签章失败。原因:"+ disposeResult;
+            String content = "报告号【"+projectReportData.getNumber()+"】审定单签章失败。原因:"+ disposeResult;
+            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",
+                                        "待通知",
+                                        "审批通过"));
+
+            } 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("1");
+            dao.update(projectReportData);
+        }
+
+
+    }
+}
+

+ 10 - 7
src/main/java/com/jeeplus/modules/workclientinfo/web/WorkClientInfoController.java

@@ -79,7 +79,7 @@ public class WorkClientInfoController extends BaseController {
 		}
 		return entity;
 	}
-	
+
 	/**
 	 * 客户管理列表页面
 	 */
@@ -222,8 +222,11 @@ public class WorkClientInfoController extends BaseController {
 //		}
 
 		//保存当前人的公司
-		workClientInfo.setCompanyId(UserUtils.getSelectCompany().getId());
-		workClientInfo.setOfficeId(UserUtils.getSelectOffice().getId());
+		User user = UserUtils.getUser();
+		if(!user.isAdmin()){
+			workClientInfo.setCompanyId(UserUtils.getSelectCompany().getId());
+			workClientInfo.setOfficeId(UserUtils.getSelectOffice().getId());
+		}
         if(!workClientInfo.getIsNewRecord()){//编辑表单保存
 			WorkClientInfo t = workClientInfoService.get(workClientInfo.getId());//从数据库取出记录的值
 			MyBeanUtils.copyBeanNotNull2Bean(workClientInfo, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
@@ -373,7 +376,7 @@ public class WorkClientInfoController extends BaseController {
 		}
 		return map;
 	}
-	
+
 	/**
 	 * 批量删除客户管理
 	 */
@@ -387,7 +390,7 @@ public class WorkClientInfoController extends BaseController {
 		addMessage(redirectAttributes, "删除客户管理成功");
 		return "redirect:"+Global.getAdminPath()+"/workclientinfo/workClientInfo/?repage";
 	}
-	
+
 	/**
 	 * 导出excel文件
 	 */
@@ -541,7 +544,7 @@ public class WorkClientInfoController extends BaseController {
 		}
 		return "redirect:"+Global.getAdminPath()+"/workclientinfo/workClientInfo/?repage";
     }
-	
+
 	/**
 	 * 下载导入客户管理数据模板
 	 */
@@ -955,4 +958,4 @@ public class WorkClientInfoController extends BaseController {
 			return maps;
 		}
 	}
-}
+}

+ 1 - 1
src/main/java/com/jeeplus/modules/workinvoice/entity/WorkInvoiceExport.java

@@ -145,7 +145,7 @@ public class WorkInvoiceExport extends ActEntity<WorkInvoiceExport> {
 		this.bankNumber = bankNumber;
 	}
 
-	@ExcelField(title="发票状态", align=2, sort=11)
+	@ExcelField(title="发票状态", align=2, sort=11,dictType = "invoice_audit_state")
 	public String getInvoiceState() {
 		return invoiceState;
 	}

+ 4 - 43
src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceAllTwoController.java

@@ -149,7 +149,7 @@ public class WorkInvoiceAllTwoController extends BaseController {
 				model.addAttribute("workInvoice", workInvoice);
 			}
 		}
-		Page<WorkInvoice> page = workInvoiceService.findMapPage(new Page<WorkInvoice>(request, response), workInvoice);
+		Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response), workInvoice);
 		//查询已通过的所有发票的开票金额总和
 		String getSumMoney = workInvoiceService.getSumMoney(workInvoice);
 		List<WorkInvoice> workInvoiceList = page.getList();
@@ -675,52 +675,13 @@ public class WorkInvoiceAllTwoController extends BaseController {
 	public String exportFile(WorkInvoice workInvoice, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
 		try {
 			String fileName = "发票一览表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-			Page<WorkInvoice> page = workInvoiceService.findMapPage(new Page<WorkInvoice>(request, response, -1), workInvoice);
+			Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response, -1), workInvoice);
 			List<WorkInvoice> workInvoiceList = page.getList();
 			for (WorkInvoice invoice: workInvoiceList) {
-				List<WorkInvoiceProjectRelation> projectRelation = workInvoiceService.getProjectRelation(invoice);
-				invoice.setWorkInvoiceProjectRelationList(projectRelation);
-				List<String> projectNameList = Lists.newArrayList();
-				List<String> reportNumber = Lists.newArrayList();
-				List<String> widNumber = Lists.newArrayList();
-				invoice.setMoneyStr(invoice.getMoney().toString());
-				boolean f = false;
-				for (WorkInvoiceProjectRelation info : projectRelation) {
-					if (StringUtils.isNotBlank(info.getReportDataNum())) {
-						reportNumber.add(info.getReportDataNum());
-					}
-					if (null != info.getIsProject() && 2 == info.getIsProject()) {
-						projectNameList.add(info.getDetails());
-					} else {
-						f = true;
-					}
-				}
-				if (f) {
-					List<String> list = workInvoiceService.getProjectNameList(invoice);
-					if (list.size() > 0) {
-						projectNameList.addAll(list);
-					}
-				}
+				invoice.setWorkInvoiceProjectRelationList(workInvoiceService.getProjectRelation(invoice));
+				List<String> projectNameList = workInvoiceService.getProjectNameList(invoice);
 				String projectNameStr = String.join(",", projectNameList);
-				String reportNumberStr = String.join(",", reportNumber);
 				invoice.setProjectName(projectNameStr);
-				invoice.setReportNumber(reportNumberStr);
-				for (WorkInvoiceDetail detail : invoice.getWorkAccountList()) {
-					if (StringUtils.isNotBlank(detail.getNumber())) {
-						widNumber.add(detail.getNumber());
-					}
-				}
-				if (widNumber.size() > 0) {
-					String widNumberStr = String.join(",", widNumber);
-					invoice.setWidNumber(widNumberStr);
-				}
-				if (StringUtils.isNotBlank(invoice.getInvoiceState())) {
-					if (invoice.getInvoiceState().equals("5")) {
-						invoice.setInvoiceState("已开票");
-					} else {
-						invoice.setInvoiceState("未开票");
-					}
-				}
 			}
 			new ExportExcel("发票一览表", WorkInvoiceExport.class).setDataList(page.getList()).write(response, fileName).dispose();
 			return null;

+ 4 - 43
src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceTwoController.java

@@ -155,7 +155,7 @@ public class WorkInvoiceTwoController extends BaseController {
 		if(StringUtils.isBlank(workInvoice.getAccountCheckingUserId())){
 			workInvoice.setAccountCheckingUserId(null);
 		}
-		Page<WorkInvoice> page = workInvoiceService.findMapPage(new Page<WorkInvoice>(request, response), workInvoice);
+		Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response), workInvoice);
 
 		//查询所有和当前登陆人有关的项目的审核
 		WorkProjectNotify workProjectNotify = new WorkProjectNotify();
@@ -733,52 +733,13 @@ public class WorkInvoiceTwoController extends BaseController {
     public String exportFile(WorkInvoice workInvoice, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
 		try {
             String fileName = "发票一览表"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
-            Page<WorkInvoice> page = workInvoiceService.findMapPage(new Page<WorkInvoice>(request, response, -1), workInvoice);
+            Page<WorkInvoice> page = workInvoiceService.findPage(new Page<WorkInvoice>(request, response, -1), workInvoice);
 			List<WorkInvoice> workInvoiceList = page.getList();
 			for (WorkInvoice invoice: workInvoiceList) {
-				List<WorkInvoiceProjectRelation> projectRelation = workInvoiceService.getProjectRelation(invoice);
-				invoice.setWorkInvoiceProjectRelationList(projectRelation);
-				List<String> projectNameList = Lists.newArrayList();
-				List<String> reportNumber = Lists.newArrayList();
-				List<String> widNumber = Lists.newArrayList();
-				invoice.setMoneyStr(invoice.getMoney().toString());
-				boolean f = false;
-				for (WorkInvoiceProjectRelation info : projectRelation) {
-					if (StringUtils.isNotBlank(info.getReportDataNum())) {
-						reportNumber.add(info.getReportDataNum());
-					}
-					if (null != info.getIsProject() && 2 == info.getIsProject()) {
-						projectNameList.add(info.getDetails());
-					} else {
-						f = true;
-					}
-				}
-				if (f) {
-					List<String> list = workInvoiceService.getProjectNameList(invoice);
-					if (list.size() > 0) {
-						projectNameList.addAll(list);
-					}
-				}
+				invoice.setWorkInvoiceProjectRelationList(workInvoiceService.getProjectRelation(invoice));
+				List<String> projectNameList = workInvoiceService.getProjectNameList(invoice);
 				String projectNameStr = String.join(",", projectNameList);
-				String reportNumberStr = String.join(",", reportNumber);
 				invoice.setProjectName(projectNameStr);
-				invoice.setReportNumber(reportNumberStr);
-				for (WorkInvoiceDetail detail : invoice.getWorkAccountList()) {
-					if (StringUtils.isNotBlank(detail.getNumber())) {
-						widNumber.add(detail.getNumber());
-					}
-				}
-				if (widNumber.size() > 0) {
-					String widNumberStr = String.join(",", widNumber);
-					invoice.setWidNumber(widNumberStr);
-				}
-				if (StringUtils.isNotBlank(invoice.getInvoiceState())) {
-					if (invoice.getInvoiceState().equals("5")) {
-						invoice.setInvoiceState("已开票");
-					} else {
-						invoice.setInvoiceState("未开票");
-					}
-				}
 			}
     		new ExportExcel("发票一览表", WorkInvoiceExport.class).setDataList(page.getList()).write(response, fileName).dispose();
     		return null;

+ 6 - 2
src/main/resources/mappings/modules/workclientinfo/WorkClientInfoDao.xml

@@ -490,8 +490,12 @@
 			register_address = #{registerAddress},
 			company_url = #{companyUrl},
 			remarks = #{unitIntroduction},
-			company_id = #{companyId},
-			office_id = #{officeId},
+			<if test="companyId != null and companyId != ''">
+				company_id = #{companyId},
+			</if>
+			<if test="officeId != null and officeId != ''">
+				office_id = #{officeId},
+			</if>
 			telephone = #{telephone},
 			has_uscc = #{hasUscc},
 			usc_code = #{uscCode}

+ 1 - 1
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm.jsp

@@ -1082,7 +1082,7 @@
                                         <input id="reportedConsultantList{{idx}}_costNum" name="reportedConsultantList[{{idx}}].costNum" readonly="readonly" style="text-align: center"  value="{{idx}}" type="text" class="form-control contentDetail"/>
                                     </td>
                                     <td>
-                                    	<input id="reportedConsultantList{{idx}}_zixunyuan" name="reportedConsultantList[{{idx}}].zixunyuan" type="hidden" value="{{row.zixunyuanId}}"/>
+                                    	<input id="reportedConsultantList{{idx}}_zixunyuan" name="reportedConsultantList[{{idx}}].zixunyuan" type="hidden" value="{{row.zixunyuan}}"/>
 										<input id="reportedConsultantList{{idx}}_zixunyuanName" readonly="true" name="reportedConsultantList[{{idx}}].zixunyuanName" value="{{row.zixunyuanName}}" readonly="true" class="form-control"/>
                                     </td>
 									<td>