|
@@ -42,7 +42,9 @@ import com.jeeplus.modules.workreview.dao.WorkReviewAuditDao;
|
|
|
import com.jeeplus.modules.workreview.entity.WorkReviewAudit;
|
|
|
import com.jeeplus.modules.workreview.entity.WorkReviewStandard;
|
|
|
import com.jeeplus.modules.workreview.service.WorkReviewStandardService;
|
|
|
+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;
|
|
@@ -112,6 +114,8 @@ public class RuralProjectMessageNewController extends BaseController {
|
|
|
private UserDao userDao;
|
|
|
@Autowired
|
|
|
private ProjectPlanService projectPlanService;
|
|
|
+ @Autowired
|
|
|
+ private WorkStaffBasicInfoService workStaffBasicInfoService;
|
|
|
|
|
|
private static byte[] SYN_BYTE = new byte[0];
|
|
|
|
|
@@ -327,17 +331,43 @@ public class RuralProjectMessageNewController extends BaseController {
|
|
|
//使用迭代器去除重复信息
|
|
|
//排除 重新申请|撤销
|
|
|
Iterator<RuralReportConsultant> it = consultantList.iterator();
|
|
|
+ RuralReportConsultant consultantBzshb = new RuralReportConsultant();
|
|
|
while(it.hasNext()){
|
|
|
RuralReportConsultant consultant = it.next();
|
|
|
- if(consultant.getZixunyuan().equals(zongshen.getZixunyuan())){
|
|
|
- it.remove();
|
|
|
- }else if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
|
|
|
+ if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
|
|
|
try {
|
|
|
MyBeanUtils.copyBeanNotNull2Bean(consultant, currentConsultant);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
it.remove();
|
|
|
+ }else if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
|
|
|
+ if("1".equals(records.getSubmitMoney())){
|
|
|
+
|
|
|
+ User chenHongXing=UserUtils.getByLoginName("陈红星");
|
|
|
+ List<WorkStaffCertificate> chenHongXingCertificateList = ruralProjectMessageService.getCertificateByUser(chenHongXing.getId());
|
|
|
+ //获取陈红星的造价师信息
|
|
|
+ WorkStaffCertificate chenHongXingStaffCertificate = chenHongXingCertificateList.get(0);
|
|
|
+
|
|
|
+ //根据用户查询技能信息
|
|
|
+ List<WorkStaffCertificate> certificateList = ruralProjectMessageService.getCertificateByUser(consultant.getZixunyuan());
|
|
|
+ consultant.setZhucezigezhID(chenHongXingStaffCertificate.getNum());
|
|
|
+ for (WorkStaffCertificate certificateInfo: certificateList) {
|
|
|
+ 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());
|
|
|
+ consultant.setRole("技术负责人");
|
|
|
+ consultantBzshb = consultant;
|
|
|
+ it.remove();
|
|
|
+ }else{
|
|
|
+ it.remove();
|
|
|
+ }
|
|
|
}else{
|
|
|
//根据用户查询技能信息
|
|
|
List<WorkStaffCertificate> certificateList = ruralProjectMessageService.getCertificateByUser(consultant.getZixunyuan());
|
|
@@ -355,6 +385,44 @@ public class RuralProjectMessageNewController extends BaseController {
|
|
|
consultant.setZixunyuanName(user.getName());
|
|
|
}
|
|
|
}
|
|
|
+ if(StringUtils.isNotBlank(consultantBzshb.getId())){
|
|
|
+ consultants.add(consultantBzshb);
|
|
|
+ }
|
|
|
+
|
|
|
+ if("1".equals(records.getSubmitMoney())){
|
|
|
+ Integer jsfzrCount = 0;
|
|
|
+ for (RuralReportConsultant consultant: consultants) {
|
|
|
+ if("技术负责人".equals(consultant.getRole())){
|
|
|
+ jsfzrCount ++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(jsfzrCount == 0 && StringUtils.isNotBlank(projectReportData.getBzshbUserId())){
|
|
|
+ RuralReportConsultant consultant = new RuralReportConsultant();
|
|
|
+ consultant.setZixunyuan(projectReportData.getBzshbUserId());
|
|
|
+
|
|
|
+ WorkStaffBasicInfo workStaffBasicInfo = workStaffBasicInfoService.getWorkStaffBasicInfoByUserId(projectReportData.getBzshbUserId());
|
|
|
+ workStaffBasicInfoService.queryDetails(workStaffBasicInfo);
|
|
|
+
|
|
|
+ User chenHongXing=UserUtils.getByLoginName("陈红星");
|
|
|
+ if(null != chenHongXing){
|
|
|
+ List<WorkStaffCertificate> chenHongXingCertificateList = ruralProjectMessageService.getCertificateByUser(chenHongXing.getId());
|
|
|
+ //获取陈红星的造价师信息
|
|
|
+ WorkStaffCertificate chenHongXingStaffCertificate = chenHongXingCertificateList.get(0);
|
|
|
+ consultant.setZhucezigezhID(chenHongXingStaffCertificate.getNum());
|
|
|
+ for (MainDictDetail type : certificateMajor) {
|
|
|
+ if(chenHongXingStaffCertificate.getMajor().equals(type.getValue())){
|
|
|
+ consultant.setMajor(type.getLabel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ User user=userService.get(consultant.getZixunyuan());
|
|
|
+ consultant.setZixunyuanName("陈红星("+user.getName() + "代)");
|
|
|
+ consultant.setZixunyuanId(user.getId());
|
|
|
+ consultant.setRole("技术负责人");
|
|
|
+ consultants.add(consultant);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
consultants.addAll(consultantList);
|
|
|
model.addAttribute("info", consultants);
|
|
|
//添加当前文件服务器类型
|
|
@@ -362,6 +430,7 @@ public class RuralProjectMessageNewController extends BaseController {
|
|
|
model.addAttribute("projectRecords", records);
|
|
|
model.addAttribute("projectcontentinfo", projectcontentinfo);
|
|
|
model.addAttribute("projectReportData", projectcontentinfo.getProjectReportData());
|
|
|
+ model.addAttribute("projectGrade", records.getSubmitMoney());
|
|
|
if (projectReportData != null && projectReportData.getCreateBy() != null && StringUtils.isNotBlank(projectReportData.getCreateBy().getId()) && projectReportData.getCreateBy().getId().equals(UserUtils.getUser().getId())) {
|
|
|
return "modules/ruralprojectrecords/ruralporjectmessage/projectcontentinfo/new/reportForm";
|
|
|
} else if (projectReportData == null || StringUtils.isBlank(projectReportData.getId())) {
|
|
@@ -447,7 +516,25 @@ public class RuralProjectMessageNewController extends BaseController {
|
|
|
}
|
|
|
it.remove();
|
|
|
}else if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
|
|
|
- it.remove();
|
|
|
+ if("1".equals(ruralProjectRecords.getSubmitMoney())){
|
|
|
+ //根据用户查询技能信息
|
|
|
+ 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());
|
|
@@ -557,6 +644,7 @@ public class RuralProjectMessageNewController extends BaseController {
|
|
|
model.addAttribute("id", projectcontentinfo.getId());
|
|
|
model.addAttribute("projectcontentinfo", projectcontent);
|
|
|
model.addAttribute("info", consultants);
|
|
|
+ model.addAttribute("projectGrade", ruralProjectRecords.getSubmitMoney());
|
|
|
//获取是否含有上报信息
|
|
|
RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReportedById(projectcontentinfo.getReportedId());
|
|
|
if(null != reported){
|