Procházet zdrojové kódy

上报部分代码提交(未完成)

user5 před 4 roky
rodič
revize
9a9f17dcca

+ 6 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/dao/ProjectcontentinfoDao.java

@@ -103,6 +103,12 @@ public interface ProjectcontentinfoDao extends CrudDao<Projectcontentinfo> {
 	 * @return
 	 */
 	List<RuralReportConsultant> findByProjectId(@Param("projectId") String projectId);
+	/**
+	 * 根据项目id查找报告咨询员信息
+	 * @param projectId
+	 * @return
+	 */
+	List<RuralReportConsultant> getReportedConsultantsList(@Param("reportedId") String reportedId);
 
 	/**
 	 * 根据用户查询技能信息

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

@@ -9,8 +9,10 @@ import com.jeeplus.common.persistence.ActEntity;
 import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.modules.sys.entity.Office;
 import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 
+import java.util.Date;
 import java.util.List;
 
 
@@ -100,6 +102,23 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 	private String reportStatus;  //上报状态
 	private String home;
 
+	private String projectCode;	//项目代码
+	private String projectSection;	//项目标段
+	private String projectClassify;	//项目分类
+	private String GCGMValueParameter;	//建筑规模参数
+	private List<String> contentsIncludeList;		//咨询项目造价包含内容说明(勾选)
+	private String contentsInclude;//咨询项目造价包含内容说明(勾选)
+	private String projectTotalInvestment;	//项目总投资
+	private Date beginDate;	//作业期开始日期
+	private Date endDate;	//作业期结束日期
+
+	private String advisoryIncome;	//全过程咨询收入
+	private String projectSupervisionIncome;	//工程监理收入
+	private String tenderingAgencyIncome;	//招标代理收入
+	private String designIncome;	//设计收入
+	private String otherIncome;	//其他收入
+	private List<WorkClientAttachment> workAttachments = Lists.newArrayList();
+
 	public WorkContractInfo getWorkContractInfo() {
 		return workContractInfo;
 	}
@@ -635,4 +654,124 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 	public void setProjectRecordId(String projectRecordId) {
 		this.projectRecordId = projectRecordId;
 	}
+
+	public String getProjectCode() {
+		return projectCode;
+	}
+
+	public void setProjectCode(String projectCode) {
+		this.projectCode = projectCode;
+	}
+
+	public String getProjectSection() {
+		return projectSection;
+	}
+
+	public void setProjectSection(String projectSection) {
+		this.projectSection = projectSection;
+	}
+
+	public String getProjectClassify() {
+		return projectClassify;
+	}
+
+	public void setProjectClassify(String projectClassify) {
+		this.projectClassify = projectClassify;
+	}
+
+	public String getGCGMValueParameter() {
+		return GCGMValueParameter;
+	}
+
+	public void setGCGMValueParameter(String GCGMValueParameter) {
+		this.GCGMValueParameter = GCGMValueParameter;
+	}
+
+	public List<String> getContentsIncludeList() {
+		return contentsIncludeList;
+	}
+
+	public void setContentsIncludeList(List<String> contentsIncludeList) {
+		this.contentsIncludeList = contentsIncludeList;
+	}
+
+	public String getProjectTotalInvestment() {
+		return projectTotalInvestment;
+	}
+
+	public void setProjectTotalInvestment(String projectTotalInvestment) {
+		this.projectTotalInvestment = projectTotalInvestment;
+	}
+
+	public Date getBeginDate() {
+		return beginDate;
+	}
+
+	public void setBeginDate(Date beginDate) {
+		this.beginDate = beginDate;
+	}
+
+	public Date getEndDate() {
+		return endDate;
+	}
+
+	public void setEndDate(Date endDate) {
+		this.endDate = endDate;
+	}
+
+	public String getAdvisoryIncome() {
+		return advisoryIncome;
+	}
+
+	public void setAdvisoryIncome(String advisoryIncome) {
+		this.advisoryIncome = advisoryIncome;
+	}
+
+	public String getProjectSupervisionIncome() {
+		return projectSupervisionIncome;
+	}
+
+	public void setProjectSupervisionIncome(String projectSupervisionIncome) {
+		this.projectSupervisionIncome = projectSupervisionIncome;
+	}
+
+	public String getTenderingAgencyIncome() {
+		return tenderingAgencyIncome;
+	}
+
+	public void setTenderingAgencyIncome(String tenderingAgencyIncome) {
+		this.tenderingAgencyIncome = tenderingAgencyIncome;
+	}
+
+	public String getDesignIncome() {
+		return designIncome;
+	}
+
+	public void setDesignIncome(String designIncome) {
+		this.designIncome = designIncome;
+	}
+
+	public String getOtherIncome() {
+		return otherIncome;
+	}
+
+	public void setOtherIncome(String otherIncome) {
+		this.otherIncome = otherIncome;
+	}
+
+	public List<WorkClientAttachment> getWorkAttachments() {
+		return workAttachments;
+	}
+
+	public void setWorkAttachments(List<WorkClientAttachment> workAttachments) {
+		this.workAttachments = workAttachments;
+	}
+
+	public String getContentsInclude() {
+		return contentsInclude;
+	}
+
+	public void setContentsInclude(String contentsInclude) {
+		this.contentsInclude = contentsInclude;
+	}
 }

+ 18 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralReportConsultant.java

@@ -18,6 +18,8 @@ public class RuralReportConsultant extends DataEntity<RuralReportConsultant> {
     private String projectId;       //项目id
     private String auditOpinion;          //审核意见
     private String role;          //角色
+    private String roleFlag;          //角色判定
+    private String idCard;          //身份证号
 
     public String getZixunyuanId() {
         return zixunyuanId;
@@ -106,4 +108,20 @@ public class RuralReportConsultant extends DataEntity<RuralReportConsultant> {
     public void setRole(String role) {
         this.role = role;
     }
+
+    public String getRoleFlag() {
+        return roleFlag;
+    }
+
+    public void setRoleFlag(String roleFlag) {
+        this.roleFlag = roleFlag;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
 }

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

@@ -2097,6 +2097,9 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         if(null != reported.getFGYLProjectList() && reported.getFGYLProjectList().size()>0){
             reported.setFGYLProject(String.join(";", reported.getFGYLProjectList()));
         }
+        if(null != reported.getContentsIncludeList() && reported.getContentsIncludeList().size()>0){
+            reported.setContentsInclude(String.join(";", reported.getContentsIncludeList()));
+        }
     }
 
     /**
@@ -2779,6 +2782,16 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
     }
 
     /**
+     * 根据项目id 查询上报咨询员列表
+     * @param reportedId   上报id
+     * @return
+     */
+    public List<RuralReportConsultant> getReportedConsultantsList(String reportedId){
+        List<RuralReportConsultant> list=projectcontentinfoDao.getReportedConsultantsList(reportedId);
+        return list;
+    }
+
+    /**
      * 根据用户查询技能信息
      * @param projectId
      * @return

+ 163 - 11
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -23,7 +23,6 @@ import com.jeeplus.modules.projectcontentinfo.service.ProjectReportChangeService
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportRecordService;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectcontentinfoService;
-import com.jeeplus.modules.projectrecord.entity.ProjectPlanInfo;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectPlanService;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
@@ -33,12 +32,12 @@ import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectcontentinfo;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectMessageService;
 import com.jeeplus.modules.ruralprojectrecords.service.RuralProjectRecordsService;
+import com.jeeplus.modules.sys.entity.Area;
 import com.jeeplus.modules.sys.entity.MainDictDetail;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.sys.service.UserService;
 import com.jeeplus.modules.sys.utils.DictUtils;
 import com.jeeplus.modules.sys.utils.UserUtils;
-import com.jeeplus.modules.wexinpackage.access.util.access.RequestAccess;
 import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
 import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
@@ -50,8 +49,6 @@ import org.activiti.engine.runtime.ProcessInstance;
 import org.activiti.engine.task.Task;
 import org.apache.shiro.authz.annotation.Logical;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
@@ -1269,6 +1266,7 @@ public class RuralCostProjectMessageController extends BaseController {
                 }
             }
         }
+        workStaffCertificate.setIdCard(workStaffBasicInfo.getIdCard());
         return workStaffCertificate;
     }
 
@@ -1479,20 +1477,174 @@ public class RuralCostProjectMessageController extends BaseController {
             records.setReportData(projectReportData);
             reported = ruralProjectMessageService.disposeData(records);
         }
+        //根据上报id查询上报咨询员的信息
+        List<RuralReportConsultant> reportedConsultants=ruralProjectMessageService.getReportedConsultantsList(reported.getId());
         //查询报告咨询员的信息
         List<RuralReportConsultant> consultants=ruralProjectMessageService.getConsultantsList(projectRecords.getId());
-        for (RuralReportConsultant consultant:consultants){
-            User user=userService.get(consultant.getZixunyuan());
-            consultant.setZixunyuanName(user.getName());
+        List<RuralReportConsultant> consultantList = Lists.newArrayList();
+        if(reportedConsultants.size() == 0){
+            //如果上报的咨询员信息为空 则处理报告咨询员信息
+            consultantList = disposeConsultant(consultants, projectRecords);
+        }else{
+            //对上报的咨询员进行处理
+            consultantList = disposereportedConsultant(consultants, projectRecords);
         }
-
+        RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(reported.getProjectId());
+        reported.setProjectRecordId(records.getProjectId());
         model.addAttribute("ruralProjectRecordsReported", reported);
         //查询项目信息
-        RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(reported.getProjectId());
         model.addAttribute("ruralProjectRecords", records);
-        model.addAttribute("consultantInfo", consultants);
+        model.addAttribute("consultantInfo", consultantList);
+        if(StringUtils.isBlank(reported.getS1())){
+            reported.setS1("1");
+        }
+        List<Area> areaList = ruralProjectMessageService.getProjectReportedAreaByParentId(reported.getS1());
+        model.addAttribute("cityList", areaList);
+        return "modules/ruralprojectrecords/cost/newReportedForm";
+    }
+
+    private List<RuralReportConsultant> disposereportedConsultant(List<RuralReportConsultant> consultants,RuralProjectRecords projectRecords){
+        List<RuralReportConsultant> consultantInfoList = Lists.newArrayList();
+        List<RuralReportConsultant> list = Lists.newArrayList();
+        Iterator<RuralReportConsultant> it = consultants.iterator();
+        while(it.hasNext()){
+            RuralReportConsultant consultant = it.next();
+            if("1".equals(consultant.getRoleFlag())){
+                list.add(consultant);
+                it.remove();
+            }
+        }
+        list.addAll(consultants);
+        consultants = list;
+        //获取专业类型
+        List<MainDictDetail> certificateMajor = DictUtils.getMainDictList("certificate_major");
+        //创建负责人信息
+        RuralReportConsultant master = new RuralReportConsultant();
+        for (RuralReportConsultant consultant: consultants) {
+            //根据用户查询技能信息
+            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());
+            //查询用户身份证号
+            WorkStaffBasicInfo userInfo = workStaffBasicInfoService.getByUserId(user.getId());
+            if(null != userInfo){
+                consultant.setIdCard(userInfo.getIdCard());
+            }
+            if("1".equals(consultant.getRoleFlag())){
+                consultant.setRole("负责人");
+            }else{
+                consultant.setRole("咨询员");
+            }
+            consultant.setZixunyuanName(user.getName());
+            consultantInfoList.add(consultant);
+        }
+        return consultantInfoList;
+    }
+
+    /**
+     * 咨询员信息处理
+     * @param consultants
+     * @return
+     */
+    private List<RuralReportConsultant> disposeConsultant(List<RuralReportConsultant> consultants,RuralProjectRecords projectRecords){
+        List<RuralReportConsultant> consultantInfoList = Lists.newArrayList();
+        //查询报告信息
+        Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectRecords.getId());
+        ProjectReportData projectReportData = projectReportDataService.getOnRural(projectcontentinfo1.getInfoId());
+        //创建负责人信息
+        RuralReportConsultant master = new RuralReportConsultant();
+        for (RuralReportConsultant consultant: consultants) {
+            //判断是否是负责人,如果是则挑出来
+            if(StringUtils.isNotBlank(consultant.getRoleFlag()) && "1".equals(consultant.getRoleFlag())){
+                master = consultant;
+                break;
+            }
+        }
+        //如果没有负责人,则将项目负责人添加进去
+        if(StringUtils.isBlank(master.getId())){
+            //将自己添加到咨询员数据中
+            //根据用户查询技能信息
+            RuralReportConsultant currentConsultant = new RuralReportConsultant();
+            List<WorkStaffCertificate> userCertificateList = Lists.newArrayList();
+            if(StringUtils.isNotBlank(projectRecords.getProjectMasterId())){
+                userCertificateList = ruralProjectMessageService.getCertificateByUser(projectRecords.getProjectMasterId());
+            }
+            //获取专业类型
+            List<MainDictDetail> certificateMajor = DictUtils.getMainDictList("certificate_major");
+            for (WorkStaffCertificate certificateInfo: userCertificateList) {
+                currentConsultant.setZhucezigezhID(certificateInfo.getNum());
+                currentConsultant.setZhucezigezhKey(certificateInfo.getName());
+                for (MainDictDetail type : certificateMajor) {
+                    if(certificateInfo.getMajor().equals(type.getValue())){
+                        currentConsultant.setMajor(type.getLabel());
+                    }
+                }
+                User currentUser=userService.get(projectRecords.getProjectMasterId());
+                currentConsultant.setZixunyuanName(currentUser.getName());
+                currentConsultant.setZixunyuan(currentUser.getId());
+                currentConsultant.setRole("负责人");
+                currentConsultant.setRoleFlag("1");
+                //查询用户身份证号
+                WorkStaffBasicInfo userInfo = workStaffBasicInfoService.getByUserId(currentUser.getId());
+                if(null != userInfo){
+                    currentConsultant.setIdCard(userInfo.getIdCard());
+                }
+                consultantInfoList.add(currentConsultant);
+            }
+            //根据项目id查找报告咨询员信息
+            List<RuralReportConsultant> consultantList = ruralProjectMessageService.getConsultantsList(projectRecords.getId());
+            //使用迭代器去除重复信息
+            //排除 重新申请|撤销
+            Iterator<RuralReportConsultant> it = consultantList.iterator();
+            while(it.hasNext()){
+                RuralReportConsultant consultant = it.next();
+                if(consultant.getZixunyuan().equals(currentConsultant.getZixunyuan())){
+                    try {
+                        MyBeanUtils.copyBeanNotNull2Bean(consultant, currentConsultant);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    it.remove();
+                }else{
+                    //根据用户查询技能信息
+                    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.setRole("咨询员");
+                    consultant.setZixunyuanName(user.getName());
+                    //查询用户身份证号
+                    WorkStaffBasicInfo userInfo = workStaffBasicInfoService.getByUserId(user.getId());
+                    if(null != userInfo){
+                        consultant.setIdCard(userInfo.getIdCard());
+                    }
+                    if(consultant.getZixunyuan().equals(projectReportData.getBzshbUserId())){
+                        it.remove();
+                    }
+                }
+            }
+            consultantInfoList.addAll(consultantList);
+
+        }
 
-        return "modules/ruralprojectrecords/cost/reportedForm";
+        return consultantInfoList;
     }
 
 

+ 14 - 0
src/main/java/com/jeeplus/modules/sys/dao/UserDao.java

@@ -258,4 +258,18 @@ public interface UserDao extends CrudDao<User> {
 	 * @return
 	 */
 	public List<User> getAuditUserList(User user);
+
+	/**
+	 * 根据登陆人的部门id查询所有人员信息
+	 * @param officeId
+	 * @return
+	 */
+	public List<User> getOfficeUserList(String officeId);
+
+	/**
+	 * 根据登陆人的公司id查询所有人员信息
+	 * @param companyId
+	 * @return
+	 */
+	public List<User> getCompanyUserList(String companyId);
 }

+ 76 - 0
src/main/java/com/jeeplus/modules/sys/service/WorkattachmentService.java

@@ -10,6 +10,8 @@ import com.jeeplus.common.persistence.Page;
 import com.jeeplus.common.service.CrudService;
 import com.jeeplus.common.utils.StringUtils;
 import com.jeeplus.modules.isignature.service.ISignatureDocumentService;
+import com.jeeplus.modules.projectAccessory.dao.ProjectAccessoryDao;
+import com.jeeplus.modules.projectAccessory.entity.CollectAccessoryInfo;
 import com.jeeplus.modules.sys.dao.WorkattachmentDao;
 import com.jeeplus.modules.sys.entity.Workattachment;
 import com.jeeplus.modules.sys.utils.UserUtils;
@@ -50,6 +52,8 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	private WorkattachmentDao workattachmentDao;
 	@Autowired
 	private WorkClientAttachmentDao workClientAttachmentDao;
+	@Autowired
+	private ProjectAccessoryDao projectAccessoryDao;
 
 	public Workattachment get(String id) {
 		return super.get(id);
@@ -357,6 +361,20 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	 */
 	public List<WorkClientAttachment> getAttachmentList(WorkClientAttachment workClientAttachment){
 		List<WorkClientAttachment> list = workClientAttachmentDao.findList(workClientAttachment);
+		CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
+		cAInfo.setOfficeId(UserUtils.getUser().getOffice().getId());
+		cAInfo.setCompanyId(UserUtils.getUser().getCompany().getId());
+		cAInfo.setCreateBy(UserUtils.getUser());
+		//遍历附件信息,判定改附件信息是否被收藏
+		for (WorkClientAttachment info: list) {
+			cAInfo.setUrl(info.getUrl());
+			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo(cAInfo);
+			if(null != collectAccessoryInfo){
+				info.setCollectFlag("1");
+			}else{
+				info.setCollectFlag("0");
+			}
+		}
 		//数据处理
 		workClientAttachmentManage(list);
 		return list;
@@ -369,6 +387,20 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	 */
 	public List<WorkClientAttachment> getAttachmentListOnProjectAccessory(WorkClientAttachment workClientAttachment){
 		List<WorkClientAttachment> list = workClientAttachmentDao.getList(workClientAttachment);
+		CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
+		cAInfo.setOfficeId(UserUtils.getUser().getOffice().getId());
+		cAInfo.setCompanyId(UserUtils.getUser().getCompany().getId());
+		cAInfo.setCreateBy(UserUtils.getUser());
+		//遍历附件信息,判定改附件信息是否被收藏
+		for (WorkClientAttachment info: list) {
+			cAInfo.setUrl(info.getUrl());
+			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo(cAInfo);
+			if(null != collectAccessoryInfo){
+				info.setCollectFlag("1");
+			}else{
+				info.setCollectFlag("0");
+			}
+		}
 		//数据处理
 		workClientAttachmentManage(list);
 		return list;
@@ -381,6 +413,20 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 	 */
 	public List<WorkClientAttachment> getList(WorkClientAttachment workClientAttachment){
 		List<WorkClientAttachment> list = workClientAttachmentDao.getList(workClientAttachment);
+		CollectAccessoryInfo cAInfo = new CollectAccessoryInfo();
+		cAInfo.setOfficeId(UserUtils.getUser().getOffice().getId());
+		cAInfo.setCompanyId(UserUtils.getUser().getCompany().getId());
+		cAInfo.setCreateBy(UserUtils.getUser());
+		//遍历附件信息,判定改附件信息是否被收藏
+		for (WorkClientAttachment info: list) {
+			cAInfo.setUrl(info.getUrl());
+			CollectAccessoryInfo collectAccessoryInfo = projectAccessoryDao.getCollectAccessoryInfo(cAInfo);
+			if(null != collectAccessoryInfo){
+				info.setCollectFlag("1");
+			}else{
+				info.setCollectFlag("0");
+			}
+		}
 		//数据处理
 		workClientAttachmentManage(list);
 		return list;
@@ -528,4 +574,34 @@ public class WorkattachmentService extends CrudService<WorkattachmentDao, Workat
 		}
 		return url;
 	}
+
+	/**
+	 * 根据存储路径查询文件信息
+	 * @param url
+	 * @return
+	 */
+	public Workattachment getByUrl(String url) {
+		return dao.getByUrl(url);
+	}
+
+
+	/**
+	 * 数据处理(如果为阿里云文件服务器,则对查看的路径进行处理)
+	 * @param list
+	 */
+	public static void attachmentManageByUrlOnCollect(List<CollectAccessoryInfo> list){
+		// 判断文件存储方式(0:本地服务器存储。1:云端存储)
+		for (CollectAccessoryInfo info : list) {
+			switch (uploadMode){
+				case "1":
+					info.setUrl(bosUrl + info.getUrl());
+					break;
+				case "2":
+					info.setUrl(aliyunUrl + info.getUrl());
+					info.setTemporaryUrl(new OSSClientUtil().getFileTemporaryLookUrl(info.getUrl()));
+					break;
+
+			}
+		}
+	}
 }

+ 15 - 0
src/main/java/com/jeeplus/modules/sys/utils/UserUtils.java

@@ -1852,4 +1852,19 @@ public class UserUtils {
 		return users;
 	}
 
+	/**
+	 * 查询当前登录人部门内人员信息
+	 * @return
+	 */
+	public static List<User> getOfficeUserList(){
+		return userDao.getOfficeUserList(UserUtils.getUser().getOffice().getId());
+	}
+
+	/**
+	 * 查询当前登录人部门内人员信息
+	 * @return
+	 */
+	public static List<User> getCompanyUserList(){
+		return userDao.getCompanyUserList(UserUtils.getUser().getCompany().getId());
+	}
 }

+ 13 - 4
src/main/java/com/jeeplus/modules/workclientinfo/entity/WorkClientAttachment.java

@@ -13,7 +13,7 @@ import com.jeeplus.common.utils.excel.annotation.ExcelField;
  * @version 2017-10-12
  */
 public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String url;		// 附件地址
 	private String type;		// 附件类型
@@ -24,6 +24,7 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	private String companyId; //附件类别
 	private String projectId; //项目id
 	private String temporaryUrl;		// 附件地址(临时地址)
+	private String collectFlag;		// 收藏判定
 
 	public WorkClientAttachment() {
 		super();
@@ -41,7 +42,7 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	public void setUrl(String url) {
 		this.url = url;
 	}
-	
+
 	@ExcelField(title="附件类型", align=2, sort=8)
 	public String getType() {
 		return type;
@@ -59,7 +60,7 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	public void setAttachmentUser(String attachmentUser) {
 		this.attachmentUser = attachmentUser;
 	}
-	
+
 	@ExcelField(title="文件名", align=2, sort=11)
 	public String getAttachmentName() {
 		return attachmentName;
@@ -109,4 +110,12 @@ public class WorkClientAttachment extends DataEntity<WorkClientAttachment> {
 	public void setTemporaryUrl(String temporaryUrl) {
 		this.temporaryUrl = temporaryUrl;
 	}
-}
+
+	public String getCollectFlag() {
+		return collectFlag;
+	}
+
+	public void setCollectFlag(String collectFlag) {
+		this.collectFlag = collectFlag;
+	}
+}

+ 21 - 13
src/main/java/com/jeeplus/modules/workstaff/entity/WorkStaffCertificate.java

@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
  * @version 2018-07-27
  */
 public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
-	
+
 	private static final long serialVersionUID = 1L;
 	private String staffId;		// 员工ID
 	private String name;		// 证书名称
@@ -31,6 +31,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	private String filePath;		// 文件
     private String fileName;		// 文件名
     private MultipartFile file;
+    private String idCard;		//身份证号
 
     public String getFileName() {
         return fileName;
@@ -64,7 +65,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setStaffId(String staffId) {
 		this.staffId = staffId;
 	}
-	
+
 	@ExcelField(title="证书名称", align=2, sort=8)
 	public String getName() {
 		return name;
@@ -73,7 +74,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setName(String name) {
 		this.name = name;
 	}
-	
+
 	@ExcelField(title="证书编号", align=2, sort=9)
 	public String getNum() {
 		return num;
@@ -82,7 +83,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setNum(String num) {
 		this.num = num;
 	}
-	
+
 	@ExcelField(title="发证机关", align=2, sort=10)
 	public String getIssuingAuthority() {
 		return issuingAuthority;
@@ -91,7 +92,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setIssuingAuthority(String issuingAuthority) {
 		this.issuingAuthority = issuingAuthority;
 	}
-	
+
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	@ExcelField(title="发证日期", align=2, sort=11)
 	public Date getIssuingDate() {
@@ -101,7 +102,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setIssuingDate(Date issuingDate) {
 		this.issuingDate = issuingDate;
 	}
-	
+
 	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	@ExcelField(title="注册日期", align=2, sort=12)
 	public Date getRegistDate() {
@@ -111,7 +112,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setRegistDate(Date registDate) {
 		this.registDate = registDate;
 	}
-	
+
 	@ExcelField(title="注册证书编号", align=2, sort=13)
 	public String getRegistNum() {
 		return registNum;
@@ -120,7 +121,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setRegistNum(String registNum) {
 		this.registNum = registNum;
 	}
-	
+
 	@ExcelField(title="专业", align=2, sort=14)
 	public String getMajor() {
 		return major;
@@ -129,7 +130,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setMajor(String major) {
 		this.major = major;
 	}
-	
+
 	@ExcelField(title="等级", align=2, sort=15)
 	public String getGrade() {
 		return grade;
@@ -138,7 +139,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setGrade(String grade) {
 		this.grade = grade;
 	}
-	
+
 	@ExcelField(title="取得方式", align=2, sort=16)
 	public String getIssType() {
 		return issType;
@@ -147,7 +148,7 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setIssType(String issType) {
 		this.issType = issType;
 	}
-	
+
 	@ExcelField(title="文件", align=2, sort=17)
 	public String getFilePath() {
 		return filePath;
@@ -156,5 +157,12 @@ public class WorkStaffCertificate extends DataEntity<WorkStaffCertificate> {
 	public void setFilePath(String filePath) {
 		this.filePath = filePath;
 	}
-	
-}
+
+	public String getIdCard() {
+		return idCard;
+	}
+
+	public void setIdCard(String idCard) {
+		this.idCard = idCard;
+	}
+}

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

@@ -976,6 +976,10 @@ public class WorkStaffBasicInfoService extends CrudService<WorkStaffBasicInfoDao
         return workStaffBasicInfoDao.getByAchieveId(achiveId);
     }
 
+    //根据userId查询用户信息
+    public WorkStaffBasicInfo getByUserId(String userId) {
+        return workStaffAchivesDao.getJob(userId);
+    }
 
 
 }

+ 12 - 0
src/main/resources/mappings/modules/projectcontentinfo/ProjectcontentinfoDao.xml

@@ -604,6 +604,18 @@
 		order by major
 	</select>
 
+	<select id="getReportedConsultantsList"
+			resultType="com.jeeplus.modules.ruralprojectrecords.entity.RuralReportConsultant">
+		select id
+			 ,zixunyuan
+			 ,zhucezigezhID as 'zhucezigezhKey'
+			 ,major
+			 ,wordnr
+			 ,reportedId
+		from rural_reported_consultant where reportedId=#{reportedId}
+		order by major
+	</select>
+
 	<select id="getCertificateByUser" resultType="com.jeeplus.modules.workstaff.entity.WorkStaffCertificate">
 		select a.name,a.num,a.major from work_staff_certificate a
 		left join work_staff_achives wsa on a.staff_id = wsa.id

+ 20 - 0
src/main/resources/mappings/modules/sys/UserDao.xml

@@ -1202,4 +1202,24 @@
 				,a.name = '总审3' desc
 	</select>
 
+	<select id="getOfficeUserList" resultType="User">
+		SELECT
+		<include refid="userColumns"/>
+		FROM sys_user a
+		LEFT JOIN sys_office s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		LEFT JOIN sys_office bo ON bo.id = o.branch_office
+		WHERE a.office_id = #{officeId} AND a.del_flag = 0
+	</select>
+
+	<select id="getCompanyUserList" resultType="User">
+		SELECT
+		<include refid="userColumns"/>
+		FROM sys_user a
+		LEFT JOIN sys_office s ON s.id = a.company_id
+		LEFT JOIN sys_office o ON o.id = a.office_id
+		LEFT JOIN sys_office bo ON bo.id = o.branch_office
+		WHERE a.company_id = #{companyId} AND a.del_flag = 0
+	</select>
+
 </mapper>

+ 1 - 0
src/main/webapp/WEB-INF/tags/sys/reportedtreeselectUser.tag

@@ -103,6 +103,7 @@
 								$("#"+str+"zhucezigezhID").val(data.num);
 								$("#"+str+"zhucezigezhKey").val(data.name);
 								$("#"+str+"major").val(data.major);
+								$("#"+str+"idCard").val(data.idCard);
 
 								// if(data.success) {
 								// 	for (var info in data.data){

+ 75 - 75
src/main/webapp/static/common/jeeplus.js

@@ -1,6 +1,6 @@
 /*!
  * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
- * 
+ *
  * 通用公共方法
  * @author jeeplus
  * @version 2014-4-29
@@ -40,7 +40,7 @@ function getQueryString(name, url) {
     var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
     if (!url || url == ""){
 	    url = window.location.search;
-    }else{	
+    }else{
     	url = url.substring(url.indexOf("?"));
     }
     r = url.substr(1).match(reg)
@@ -80,7 +80,7 @@ function closeTip(){
 function showTip(mess, type, timeout, lazytime){
 	resetTip();
 	setTimeout(function(){
-		top.$.jBox.tip(mess, (type == undefined || type == '' ? 'info' : type), {opacity:0, 
+		top.$.jBox.tip(mess, (type == undefined || type == '' ? 'info' : type), {opacity:0,
 			timeout:  timeout == undefined ? 2000 : timeout});
 	}, lazytime == undefined ? 500 : lazytime);
 }
@@ -106,7 +106,7 @@ function alertx(mess, closed){
 
 // 确认对话框
 function confirmx(mess, href, closed){
-	
+
 	top.layer.confirm(mess, {icon: 3, title:'系统提示'}, function(index){
 	    //do something
 		if (typeof href == 'function') {
@@ -117,7 +117,7 @@ function confirmx(mess, href, closed){
 		}
 	    top.layer.close(index);
 	});
-	
+
 //	top.$.jBox.confirm(mess,'系统提示',function(v,h,f){
 //		if(v=='ok'){
 //			if (typeof href == 'function') {
@@ -146,7 +146,7 @@ function promptx(title,  href){
 				resetTip(); //loading();
 				location = href + encodeURIComponent(text);
 			}
-		 
+
 		 top.layer.close(index);
 		  });
 	return false;
@@ -209,77 +209,77 @@ function strToDate(date){
 }
 
 // 日期加减
-function addDate(date, dadd){  
+function addDate(date, dadd){
 	date = date.valueOf();
 	date = date + dadd * 24 * 60 * 60 * 1000;
-	return new Date(date);  
+	return new Date(date);
 }
 
 //截取字符串,区别汉字和英文
-function abbr(name, maxLength){  
- if(!maxLength){  
-     maxLength = 20;  
- }  
- if(name==null||name.length<1){  
-     return "";  
- }  
- var w = 0;//字符串长度,一个汉字长度为2   
- var s = 0;//汉字个数   
- var p = false;//判断字符串当前循环的前一个字符是否为汉字   
- var b = false;//判断字符串当前循环的字符是否为汉字   
- var nameSub;  
- for (var i=0; i<name.length; i++) {  
-    if(i>1 && b==false){  
-         p = false;  
-    }  
-    if(i>1 && b==true){  
-         p = true;  
-    }  
-    var c = name.charCodeAt(i);  
-    //单字节加1   
-    if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) {  
-         w++;  
-         b = false;  
-    }else {  
-         w+=2;  
-         s++;  
-         b = true;  
-    }  
-    if(w>maxLength && i<=name.length-1){  
-         if(b==true && p==true){  
-             nameSub = name.substring(0,i-2)+"...";  
-         }  
-         if(b==false && p==false){  
-             nameSub = name.substring(0,i-3)+"...";  
-         }  
-         if(b==true && p==false){  
-             nameSub = name.substring(0,i-2)+"...";  
-         }  
-         if(p==true){  
-             nameSub = name.substring(0,i-2)+"...";  
-         }  
-         break;  
-    }  
- }  
- if(w<=maxLength){  
-     return name;  
- }  
- return nameSub;  
+function abbr(name, maxLength){
+ if(!maxLength){
+     maxLength = 20;
+ }
+ if(name==null||name.length<1){
+     return "";
+ }
+ var w = 0;//字符串长度,一个汉字长度为2
+ var s = 0;//汉字个数
+ var p = false;//判断字符串当前循环的前一个字符是否为汉字
+ var b = false;//判断字符串当前循环的字符是否为汉字
+ var nameSub;
+ for (var i=0; i<name.length; i++) {
+    if(i>1 && b==false){
+         p = false;
+    }
+    if(i>1 && b==true){
+         p = true;
+    }
+    var c = name.charCodeAt(i);
+    //单字节加1
+    if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) {
+         w++;
+         b = false;
+    }else {
+         w+=2;
+         s++;
+         b = true;
+    }
+    if(w>maxLength && i<=name.length-1){
+         if(b==true && p==true){
+             nameSub = name.substring(0,i-2)+"...";
+         }
+         if(b==false && p==false){
+             nameSub = name.substring(0,i-3)+"...";
+         }
+         if(b==true && p==false){
+             nameSub = name.substring(0,i-2)+"...";
+         }
+         if(p==true){
+             nameSub = name.substring(0,i-2)+"...";
+         }
+         break;
+    }
+ }
+ if(w<=maxLength){
+     return name;
+ }
+ return nameSub;
 }
 
 
 //打开对话框(添加修改)
 function openDialog(title,url,width,height,target){
-	
+
 	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
 		width='auto';
 		height='auto';
 	}else{//如果是PC端,根据用户设置的width和height显示。
-	
+
 	}
-	
+
 	top.layer.open({
-	    type: 2,  
+	    type: 2,
 	    area: [width, height],
 	    title: title,
         maxmin: true, //开启最大化最小化按钮
@@ -294,31 +294,31 @@ function openDialog(title,url,width,height,target){
 	         if(target){
 	        	 top_iframe = target;//如果指定了iframe,则在改frame中跳转
 	         }else{
-	        	 top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe 
+	        	 top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
 	         }
 	         inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
-	         
+
 	        if(iframeWin.contentWindow.doSubmit() ){
 	        	// top.layer.close(index);//关闭对话框。
 	        	  setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
 	         }
-			
+
 		  },
-		  cancel: function(index){ 
+		  cancel: function(index){
 	       }
-	}); 	
-	
+	});
+
 }
 
 //打开对话框(查看)
 function openDialogView(title,url,width,height){
-	
-	
+
+
 	if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
 		width='auto';
 		height='auto';
 	}else{//如果是PC端,根据用户设置的width和height显示。
-	
+
 	}
 	top.layer.open({
 	    type: 2,
@@ -328,10 +328,10 @@ function openDialogView(title,url,width,height){
         maxmin: true, //开启最大化最小化按钮
 	    content: url ,
 	    btn: ['关闭'],
-	    cancel: function(index){ 
+	    cancel: function(index){
 	       }
-	}); 
-	
+	});
+
 }
 
 function search(){//查询,页码清零
@@ -355,7 +355,7 @@ function reset(){//重置,页码清零
 		return false;
 	 }
 function sortOrRefresh(){//刷新或者排序,页码不清零
-	
+
 	$("#searchForm").submit();
 		return false;
 }
@@ -647,4 +647,4 @@ function checkContentKeyUp(id,maxLength) {
     var contentMsg = document.getElementById('contentMsg');
     contentMsg.innerHTML = "您已输入<font >" + length
         + "</font>字符,还可输入<font color='red'>" + (maxLength - length) + "</font>字符";
-}
+}