Bladeren bron

审定内质量复核添加技术负责人栏

user5 3 jaren geleden
bovenliggende
commit
92fda541d9

+ 33 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -1556,6 +1556,39 @@ public class RuralCostProjectMessageController extends BaseController {
     }
 
     /**
+     * 咨询员获取资格证号和专业
+     * @param workStaffBasicInfo
+     * @return
+     */
+    @ResponseBody
+    @RequestMapping(value = "getWorkUserBYJudgement")
+    public WorkStaffCertificate getWorkUserBYJudgement(WorkStaffBasicInfo workStaffBasicInfo){
+        User byUserName = UserUtils.getByUserName("陈红星");
+        User user = UserUtils.get(workStaffBasicInfo.getId());
+
+        workStaffBasicInfo = workStaffBasicInfoService.getWorkStaffBasicInfoByUserId(byUserName.getId());
+        workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
+        WorkStaffCertificate workStaffCertificate=new WorkStaffCertificate();
+        for (WorkStaffCertificate workStaff:workStaffBasicInfo.getCertificateList()){
+            //判定是否是一级造价师
+            if ("161".equals( workStaff.getName()) || "171".equals( workStaff.getName())){
+                workStaffCertificate.setName(workStaff.getName());
+                workStaffCertificate.setNum(workStaff.getNum());
+                List<MainDictDetail> mainDictDetails=DictUtils.getMainDictListOnProjectAdvent("certificate_major");
+                for (MainDictDetail mainDictDetail:mainDictDetails){
+                    if (mainDictDetail.getValue().equals(workStaff.getMajor())){
+                        workStaffCertificate.setMajor(mainDictDetail.getLabel());
+                    }
+                }
+            }
+        }
+        workStaffCertificate.setIdCard(workStaffBasicInfo.getIdCard());
+        workStaffCertificate.setZixunyuanId(user.getId());
+        workStaffCertificate.setZixunyuanName("陈红星("+user.getName()+"代)");
+        return workStaffCertificate;
+    }
+
+    /**
      * 保存报告归档
      */
     @RequestMapping(value = "saveRecord")

+ 36 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageNewController.java

@@ -43,7 +43,9 @@ import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
+import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
 import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
+import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
 import org.activiti.engine.HistoryService;
 import org.activiti.engine.history.HistoricProcessInstance;
 import org.activiti.engine.runtime.ProcessInstance;
@@ -107,6 +109,8 @@ public class RuralCostProjectMessageNewController extends BaseController {
     private ProjectPlanService projectPlanService;
     @Autowired
     private WorkattachmentService workattachmentService;
+    @Autowired
+    private WorkStaffBasicInfoService workStaffBasicInfoService;
 
     private static byte[] SYN_BYTE = new byte[0];
 
@@ -368,10 +372,19 @@ public class RuralCostProjectMessageNewController extends BaseController {
         model.addAttribute("projectcontentinfo", projectcontentinfo);
         model.addAttribute("projectReportData", projectcontentinfo.getProjectReportData());
         if (projectReportData != null && projectReportData.getCreateBy() != null && StringUtils.isNotBlank(projectReportData.getCreateBy().getId()) && projectReportData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
+            if("8".equals(records.getAttachmentProjectSort())){
+                return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm";
+            }
             return "modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm";
         } else if (projectReportData == null || StringUtils.isBlank(projectReportData.getId())) {
+            if("8".equals(records.getAttachmentProjectSort())){
+                return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm";
+            }
             return "modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm";
         } else {
+            if("8".equals(records.getAttachmentProjectSort())){
+                return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm";
+            }
             return "modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm";
         }
     }
@@ -467,7 +480,25 @@ public class RuralCostProjectMessageNewController extends BaseController {
                 }
                 it.remove();
             }else if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
-                it.remove();
+                if("8".equals(ruralProjectRecords.getAttachmentProjectSort())){
+                    //根据用户查询技能信息
+                    List<WorkStaffCertificate> certificateList = ruralProjectMessageService.getCertificateByUser(consultant.getZixunyuan());
+                    for (WorkStaffCertificate certificateInfo: certificateList) {
+                        if(certificateInfo.getName().equals(consultant.getZhucezigezhKey())){
+                            consultant.setZhucezigezhID(certificateInfo.getNum());
+                        }
+                        for (MainDictDetail type : certificateMajor) {
+                            if(certificateInfo.getMajor().equals(type.getValue())){
+                                consultant.setMajor(type.getLabel());
+                            }
+                        }
+                    }
+                    User user=userService.get(consultant.getZixunyuan());
+                    consultant.setZixunyuanName("陈红星("+user.getName() + "代)");
+                    consultant.setZixunyuanId(user.getId());
+                }else{
+                    it.remove();
+                }
             }else{
                 //根据用户查询技能信息
                 List<WorkStaffCertificate> certificateList = ruralProjectMessageService.getCertificateByUser(consultant.getZixunyuan());
@@ -605,6 +636,10 @@ public class RuralCostProjectMessageNewController extends BaseController {
             }
             return "modules/ruralprojectrecords/cost/projectcontentinfo/new/reportModify";
         }
+        if("8".equals(ruralProjectRecords.getAttachmentProjectSort())){
+            model.addAttribute("attachmentProjectSort", ruralProjectRecords.getAttachmentProjectSort());
+            return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementForm";
+        }
         return "modules/ruralprojectrecords/cost/projectcontentinfo/new/reportForm";
     }
 

+ 23 - 6
src/main/java/com/jeeplus/modules/workprojectnotify/web/WorkProjectNotifyController.java

@@ -3847,6 +3847,23 @@ public class WorkProjectNotifyController extends BaseController {
 								e.printStackTrace();
 							}
 							it.remove();
+						}else if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
+							//根据用户查询技能信息
+							List<WorkStaffCertificate> certificateList = ruralProjectMessageService.getCertificateByUser(consultant.getZixunyuan());
+							for (WorkStaffCertificate certificateInfo: certificateList) {
+								if(certificateInfo.getName().equals(consultant.getZhucezigezhKey())){
+									consultant.setZhucezigezhID(certificateInfo.getNum());
+								}
+								for (MainDictDetail type : certificateMajor) {
+									if(certificateInfo.getMajor().equals(type.getValue())){
+										consultant.setMajor(type.getLabel());
+									}
+								}
+							}
+							User user=userService.get(consultant.getZixunyuan());
+							consultant.setZixunyuanName("陈红星("+user.getName() + "代)");
+							consultant.setZixunyuanId(user.getId());
+
 						}else{
 							//根据用户查询技能信息
 							List<WorkStaffCertificate> certificateList = ruralProjectMessageService.getCertificateByUser(consultant.getZixunyuan());
@@ -4118,7 +4135,7 @@ public class WorkProjectNotifyController extends BaseController {
 							User bzshbUser=userService.get(projectReportData.getBzshbUserId());
 							bzshbConsultant.setZixunyuanName(bzshbUser.getName());
 							bzshbConsultant.setZixunyuan(bzshbUser.getId());
-							consultants.add(bzshbConsultant);
+							//consultants.add(bzshbConsultant);
 						}
 						Iterator<RuralReportConsultant> itView = consultants.iterator();
 						while(itView.hasNext()){
@@ -4127,7 +4144,7 @@ public class WorkProjectNotifyController extends BaseController {
 								if(consultant.getZixunyuan().equals(bzshbConsultant.getZixunyuan())){
 									try {
 										MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
-										bzshbConsultant.setZixunyuanName("陈红星("+bzshbConsultant.getZixunyuanName()+"代)");
+										bzshbConsultant.setZixunyuanName(bzshbConsultant.getZixunyuanName());
 										bzshbConsultant.setRole("技术负责人");
 									} catch (Exception e) {
 										e.printStackTrace();
@@ -4138,7 +4155,7 @@ public class WorkProjectNotifyController extends BaseController {
 								if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
 									try {
 										MyBeanUtils.copyBeanNotNull2Bean(consultant, bzshbConsultant);
-										bzshbConsultant.setZixunyuanName("陈红星("+bzshbConsultant.getZixunyuanName()+"代)");
+										bzshbConsultant.setZixunyuanName(bzshbConsultant.getZixunyuanName());
 										bzshbConsultant.setRole("技术负责人");
 									} catch (Exception e) {
 										e.printStackTrace();
@@ -4152,7 +4169,7 @@ public class WorkProjectNotifyController extends BaseController {
 							consultants.add(bzshbConsultant);
 						}else{
 							User user=userService.get(projectReportData.getBzshbUserId());
-							bzshbConsultant.setZixunyuanName("陈红星("+user.getName()+"代)");
+							bzshbConsultant.setZixunyuanName(user.getName());
 							bzshbConsultant.setZixunyuan(user.getId());
 							bzshbConsultant.setRole("技术负责人");
 							consultants.add(bzshbConsultant);
@@ -4166,13 +4183,13 @@ public class WorkProjectNotifyController extends BaseController {
 						model.addAttribute("identificationName","报告审核意见");
 						return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageAudit";
 					} else if (workProjectNotify.getRemarks().contains("重新申请") && !"1".equals(workProjectNotify.getStatus())) {
-						Iterator<RuralReportConsultant> itView = consultants.iterator();
+						/*Iterator<RuralReportConsultant> itView = consultants.iterator();
 						while(itView.hasNext()){
 							RuralReportConsultant consultant = itView.next();
 							if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
 								itView.remove();
 							}
-						}
+						}*/
 						model.addAttribute("info", consultants);
 						model.addAttribute("consultantCount", consultants.size());
 

+ 18 - 0
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffCertificate.java

@@ -33,6 +33,8 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
     private MultipartFile file;
     private String idCard;		//身份证号
     private Date endDate;		//结束时间
+	private String zixunyuanId;		//咨询员id
+	private String zixunyuanName;		//咨询员name
 
     public String getFileName() {
         return fileName;
@@ -174,4 +176,20 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setEndDate(Date endDate) {
 		this.endDate = endDate;
 	}
+
+	public String getZixunyuanId() {
+		return zixunyuanId;
+	}
+
+	public void setZixunyuanId(String zixunyuanId) {
+		this.zixunyuanId = zixunyuanId;
+	}
+
+	public String getZixunyuanName() {
+		return zixunyuanName;
+	}
+
+	public void setZixunyuanName(String zixunyuanName) {
+		this.zixunyuanName = zixunyuanName;
+	}
 }

+ 43 - 0
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/judgementReport/projectRecordsJudgementMessageModify.jsp

@@ -936,6 +936,43 @@
                                     </td>
                                 </tr>//-->
                         </script>
+                        <script type="text/template" id="workClientBankTplTechnology">//<!--
+                                <tr id="reportedConsultantList{{idx}}">
+                                    <td class="hide">
+                                        <input id="reportedConsultantList{{idx}}_id" name="reportedConsultantList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+                                        <input id="reportedConsultantList{{idx}}_delFlag" name="reportedConsultantList[{{idx}}].delFlag" type="hidden" value="0"/>
+                                        <input id="reportedConsultantList{{idx}}_remindId" name="reportedConsultantList[{{idx}}].remindId" type="hidden" value="{{row.remindId}}"/>
+                                    	<input id="reportedConsultantList{{idx}}_zhucezigezhKey" name="reportedConsultantList[{{idx}}].zhucezigezhKey" type="hidden" value="{{row.zhucezigezhKey}}"/>
+                                    </td>
+
+                                    <td width="60px">
+                                        <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}}_zixunyuanName" readonly="true" name="reportedConsultantList[{{idx}}].zixunyuanName" value="{{row.zixunyuanName}}" readonly="true" class="form-control"/>
+                                    </td>
+									<td>
+										<input id="reportedConsultantList{{idx}}_role" readonly="true" name="reportedConsultantList[{{idx}}].role" value="技术负责人" readonly="true" class="form-control"/>
+									</td>
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_zhucezigezhID" readonly="true" name="reportedConsultantList[{{idx}}].zhucezigezhID" value="{{row.zhucezigezhID}}" class="form-control required"/>
+                                    </td>
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_major" readonly="true"  name="reportedConsultantList[{{idx}}].major" value="{{row.major}}" class="form-control required"/>
+                                    </td>
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_wordnr" placeholder="请输入本人负责内容" name="reportedConsultantList[{{idx}}].wordnr" value="{{row.wordnr}}" class="form-control"/>
+                                    </td>
+                                    <td>
+                                        <input id="reportedConsultantList{{idx}}_auditOpinion" placeholder="请输入审核意见" readonly="true" style="background-color: #FFFFFF;" name="reportedConsultantList[{{idx}}].auditOpinion" value="{{row.auditOpinion}}" onclick="openInfo(reportedConsultantList{{idx}},this.value)" class="form-control judgment"/>
+                                    </td>
+
+                                    <td class="text-center op-td" width="10">
+
+                                    </td>
+                                </tr>//-->
+                        </script>
                     </div>
                 </div>
             </div>
@@ -1726,11 +1763,15 @@
     var workClientBankRowIdx = 0,
         workClientBankTpl = $("#workClientBankTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
         workClientBankTplFirst = $("#workClientBankTplFirst").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
+        workClientBankTplTechnology = $("#workClientBankTplTechnology").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
     $(document).ready(function () {
         var dataBank = ${fns:toJson(info)};
         for (var i = 0; i < dataBank.length; i++) {
             if(i == 0){
                 addRow('#reportedConsultantList', workClientBankRowIdx, workClientBankTplFirst, dataBank[i]);
+            }else if(i ==1){
+                addRow('#reportedConsultantList', workClientBankRowIdx, workClientBankTplTechnology, dataBank[i]);
+
             }else{
                 addRow('#reportedConsultantList', workClientBankRowIdx, workClientBankTpl, dataBank[i]);
             }
@@ -1743,6 +1784,8 @@
         var length = $("#reportedConsultantList").find("tr").length;
         if(length == 0){
             addRow(id, workClientBankRowIdx, workClientBankTplFirst, "");
+        }else if(length ==1){
+            addRow(id, workClientBankRowIdx, workClientBankTplTechnology, "");
         }else{
             addRow(id, workClientBankRowIdx, workClientBankTpl, "");
         }