Quellcode durchsuchen

项目上报部分代码

user5 vor 4 Jahren
Ursprung
Commit
3863db52d7

+ 19 - 1
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/ReportedConsultant.java

@@ -12,10 +12,12 @@ public class ReportedConsultant extends DataEntity<ReportedConsultant> {
     private String zixunyuan;       //咨询员
     private String zixunyuanName;       //咨询员(录入)
     private String zhucezigezhID;  //注册/资格证号
-    private String wordnr;          //本人复制内容
+    private String wordnr;          //本人负责内容
     private Double wcyysrbl;        //完成营业收入比例( %)
     private Double wcyysr;          //完成营业收入(元)
     private String reportedId;       //上报id
+    private String roleFlag;       //咨询员角色(0:咨询员;1:负责人)
+    private String idCard;       //身份证号码
 
     public String getZixunyuanId() {
         return zixunyuanId;
@@ -80,4 +82,20 @@ public class ReportedConsultant extends DataEntity<ReportedConsultant> {
     public void setReportedId(String reportedId) {
         this.reportedId = reportedId;
     }
+
+    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;
+    }
 }

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

@@ -51,7 +51,7 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 	private String PorjectStruct;	//工程结构
 	private Integer FloorUp;		//地上层数
 	private Integer FloorDown;		//地下层数
-	private Double GCGMValue;		//建筑面积或规模
+	private String GCGMValue;		//建筑面积或规模
 	private String GCGMUnit;		//计量单位
 	private String PorjectUse;		//工程用途
 	private String ZiXunBDE;		//咨询标的额(万元)
@@ -109,8 +109,8 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 	private List<String> contentsIncludeList;		//咨询项目造价包含内容说明(勾选)
 	private String contentsInclude;//咨询项目造价包含内容说明(勾选)
 	private String projectTotalInvestment;	//项目总投资
-	private Date beginDate;	//作业期开始日期
-	private Date endDate;	//作业期结束日期
+	private String beginDate;	//作业期开始日期
+	private String endDate;	//作业期结束日期
 
 	private String advisoryIncome;	//全过程咨询收入
 	private String projectSupervisionIncome;	//工程监理收入
@@ -303,11 +303,11 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 		FloorDown = floorDown;
 	}
 
-	public Double getGCGMValue() {
+	public String getGCGMValue() {
 		return GCGMValue;
 	}
 
-	public void setGCGMValue(Double GCGMValue) {
+	public void setGCGMValue(String GCGMValue) {
 		this.GCGMValue = GCGMValue;
 	}
 
@@ -703,19 +703,19 @@ public class RuralProjectRecordsReported extends ActEntity<RuralProjectRecordsRe
 		this.projectTotalInvestment = projectTotalInvestment;
 	}
 
-	public Date getBeginDate() {
+	public String getBeginDate() {
 		return beginDate;
 	}
 
-	public void setBeginDate(Date beginDate) {
+	public void setBeginDate(String beginDate) {
 		this.beginDate = beginDate;
 	}
 
-	public Date getEndDate() {
+	public String getEndDate() {
 		return endDate;
 	}
 
-	public void setEndDate(Date endDate) {
+	public void setEndDate(String endDate) {
 		this.endDate = endDate;
 	}
 

+ 464 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/RuralProjectReportedInfo.java

@@ -0,0 +1,464 @@
+package com.jeeplus.modules.ruralprojectrecords.entity;
+
+import java.util.List;
+
+/**
+ * 上报数据表
+ * @author: 徐滕
+ * @create: 2021-06-07 13:51
+ **/
+public class RuralProjectReportedInfo {
+
+    private String projectProv;     //工程所在省份,必填
+    private String projectHome;     //工程所在地,必填
+    private String projectNum;     //项目编号,必填
+    private String projectName;     //项目名称,必填
+    private String projectSort;     //项目分类,必填
+    private String projectSection;     //项目标段       ,非必填
+    private String projectCode;     //项目代码,必填
+    private String investPropCd;     //投资性质,必填
+    private String contractNum;     //合同编号,必填
+    private String contractTypeCd;     //合同类型,必填
+
+    private String projectTypeCd;     //项目类型,必填
+    private String entrustUnit;     //委托单位,必填
+    private String entrustPhone;     //委托单位联系电话,必填
+    private String recordNum;     //造价记录编号,必填
+    private String issueReportDate;     //出具咨询报告日期,必填
+    private String incomeFee;     //造价咨询营业收入,必填
+
+    private String leaderName;     //咨询项目负责人姓名,必填
+    private String leaderLetterNum;     //咨询项目负责人身份证号,必填
+    private String leaderIncomePercent;     //咨询项目负责人完成营业收入比例(%),必填
+    private String leaderIncomeMoney;     //咨询项目负责人完成营业收入       ,非必填
+
+    //咨询员信息(要求json)
+    private List<StaffInfo> staffs;     //咨询员列信息
+
+    private String projectStructCd;     //工程结构,必填
+    private String floorUp;     //房屋地上层数       ,非必填
+    private String floorDown;     //房屋地下层数       ,非必填
+    private String projectAreaVal;     //建筑规模,必填
+    private String projectAreaUnit;     //建筑规模单位,必填
+    private String projectUseCd;     //工程用途,必填
+    private String targetFee;     //咨询标的额(万元),必填
+    private String contractFee;     //合同价(万元)       ,非必填
+    private String submitAuditFee;     //送审价(万元)       ,非必填
+    private String fixedAuditFee;     //审定价(万元)       ,非必填
+    private String checkCutFee;     //审核增减额       ,非必填
+    private String checkCutLv;     //审核增减率       ,非必填
+    private String projectContainContent;     //咨询项目造价包含内容说明(“,”隔开),必填
+    private String totalInvestment;     //工程项目总投资(万元)       ,非必填
+    private String chiefConsultant;     //总咨询师       ,非必填
+    private String archivesNo;     //咨询档案编号       ,非必填
+    private String stage;     //作业期(起止时间) 模板:2020-12-12到2021-12-12       ,非必填
+    private String wholeIncomeFee;     //全过程工程咨询收入       ,非必填
+    private String supervisorFee;     //工程监理收入       ,非必填
+    private String biddingFee;     //招标代理收入       ,非必填
+    private String designFee;     //设计收入       ,非必填
+    private String otherFee;     //其他收入       ,非必填
+    private String delFlag;     //项目状态,必填
+
+
+    public String getProjectProv() {
+        return projectProv;
+    }
+
+    public void setProjectProv(String projectProv) {
+        this.projectProv = projectProv;
+    }
+
+    public String getProjectHome() {
+        return projectHome;
+    }
+
+    public void setProjectHome(String projectHome) {
+        this.projectHome = projectHome;
+    }
+
+    public String getProjectNum() {
+        return projectNum;
+    }
+
+    public void setProjectNum(String projectNum) {
+        this.projectNum = projectNum;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getProjectSort() {
+        return projectSort;
+    }
+
+    public void setProjectSort(String projectSort) {
+        this.projectSort = projectSort;
+    }
+
+    public String getProjectSection() {
+        return projectSection;
+    }
+
+    public void setProjectSection(String projectSection) {
+        this.projectSection = projectSection;
+    }
+
+    public String getProjectCode() {
+        return projectCode;
+    }
+
+    public void setProjectCode(String projectCode) {
+        this.projectCode = projectCode;
+    }
+
+    public String getInvestPropCd() {
+        return investPropCd;
+    }
+
+    public void setInvestPropCd(String investPropCd) {
+        this.investPropCd = investPropCd;
+    }
+
+    public String getContractNum() {
+        return contractNum;
+    }
+
+    public void setContractNum(String contractNum) {
+        this.contractNum = contractNum;
+    }
+
+    public String getContractTypeCd() {
+        return contractTypeCd;
+    }
+
+    public void setContractTypeCd(String contractTypeCd) {
+        this.contractTypeCd = contractTypeCd;
+    }
+
+    public String getProjectTypeCd() {
+        return projectTypeCd;
+    }
+
+    public void setProjectTypeCd(String projectTypeCd) {
+        this.projectTypeCd = projectTypeCd;
+    }
+
+    public String getEntrustUnit() {
+        return entrustUnit;
+    }
+
+    public void setEntrustUnit(String entrustUnit) {
+        this.entrustUnit = entrustUnit;
+    }
+
+    public String getEntrustPhone() {
+        return entrustPhone;
+    }
+
+    public void setEntrustPhone(String entrustPhone) {
+        this.entrustPhone = entrustPhone;
+    }
+
+    public String getRecordNum() {
+        return recordNum;
+    }
+
+    public void setRecordNum(String recordNum) {
+        this.recordNum = recordNum;
+    }
+
+    public String getIssueReportDate() {
+        return issueReportDate;
+    }
+
+    public void setIssueReportDate(String issueReportDate) {
+        this.issueReportDate = issueReportDate;
+    }
+
+    public String getIncomeFee() {
+        return incomeFee;
+    }
+
+    public void setIncomeFee(String incomeFee) {
+        this.incomeFee = incomeFee;
+    }
+
+    public String getLeaderName() {
+        return leaderName;
+    }
+
+    public void setLeaderName(String leaderName) {
+        this.leaderName = leaderName;
+    }
+
+    public String getLeaderLetterNum() {
+        return leaderLetterNum;
+    }
+
+    public void setLeaderLetterNum(String leaderLetterNum) {
+        this.leaderLetterNum = leaderLetterNum;
+    }
+
+    public String getLeaderIncomePercent() {
+        return leaderIncomePercent;
+    }
+
+    public void setLeaderIncomePercent(String leaderIncomePercent) {
+        this.leaderIncomePercent = leaderIncomePercent;
+    }
+
+    public String getLeaderIncomeMoney() {
+        return leaderIncomeMoney;
+    }
+
+    public void setLeaderIncomeMoney(String leaderIncomeMoney) {
+        this.leaderIncomeMoney = leaderIncomeMoney;
+    }
+
+    public List<StaffInfo> getStaffs() {
+        return staffs;
+    }
+
+    public void setStaffs(List<StaffInfo> staffs) {
+        this.staffs = staffs;
+    }
+
+    public String getProjectStructCd() {
+        return projectStructCd;
+    }
+
+    public void setProjectStructCd(String projectStructCd) {
+        this.projectStructCd = projectStructCd;
+    }
+
+    public String getFloorUp() {
+        return floorUp;
+    }
+
+    public void setFloorUp(String floorUp) {
+        this.floorUp = floorUp;
+    }
+
+    public String getFloorDown() {
+        return floorDown;
+    }
+
+    public void setFloorDown(String floorDown) {
+        this.floorDown = floorDown;
+    }
+
+    public String getProjectAreaVal() {
+        return projectAreaVal;
+    }
+
+    public void setProjectAreaVal(String projectAreaVal) {
+        this.projectAreaVal = projectAreaVal;
+    }
+
+    public String getProjectAreaUnit() {
+        return projectAreaUnit;
+    }
+
+    public void setProjectAreaUnit(String projectAreaUnit) {
+        this.projectAreaUnit = projectAreaUnit;
+    }
+
+    public String getProjectUseCd() {
+        return projectUseCd;
+    }
+
+    public void setProjectUseCd(String projectUseCd) {
+        this.projectUseCd = projectUseCd;
+    }
+
+    public String getTargetFee() {
+        return targetFee;
+    }
+
+    public void setTargetFee(String targetFee) {
+        this.targetFee = targetFee;
+    }
+
+    public String getContractFee() {
+        return contractFee;
+    }
+
+    public void setContractFee(String contractFee) {
+        this.contractFee = contractFee;
+    }
+
+    public String getSubmitAuditFee() {
+        return submitAuditFee;
+    }
+
+    public void setSubmitAuditFee(String submitAuditFee) {
+        this.submitAuditFee = submitAuditFee;
+    }
+
+    public String getFixedAuditFee() {
+        return fixedAuditFee;
+    }
+
+    public void setFixedAuditFee(String fixedAuditFee) {
+        this.fixedAuditFee = fixedAuditFee;
+    }
+
+    public String getCheckCutFee() {
+        return checkCutFee;
+    }
+
+    public void setCheckCutFee(String checkCutFee) {
+        this.checkCutFee = checkCutFee;
+    }
+
+    public String getCheckCutLv() {
+        return checkCutLv;
+    }
+
+    public void setCheckCutLv(String checkCutLv) {
+        this.checkCutLv = checkCutLv;
+    }
+
+    public String getProjectContainContent() {
+        return projectContainContent;
+    }
+
+    public void setProjectContainContent(String projectContainContent) {
+        this.projectContainContent = projectContainContent;
+    }
+
+    public String getTotalInvestment() {
+        return totalInvestment;
+    }
+
+    public void setTotalInvestment(String totalInvestment) {
+        this.totalInvestment = totalInvestment;
+    }
+
+    public String getChiefConsultant() {
+        return chiefConsultant;
+    }
+
+    public void setChiefConsultant(String chiefConsultant) {
+        this.chiefConsultant = chiefConsultant;
+    }
+
+    public String getArchivesNo() {
+        return archivesNo;
+    }
+
+    public void setArchivesNo(String archivesNo) {
+        this.archivesNo = archivesNo;
+    }
+
+    public String getStage() {
+        return stage;
+    }
+
+    public void setStage(String stage) {
+        this.stage = stage;
+    }
+
+    public String getWholeIncomeFee() {
+        return wholeIncomeFee;
+    }
+
+    public void setWholeIncomeFee(String wholeIncomeFee) {
+        this.wholeIncomeFee = wholeIncomeFee;
+    }
+
+    public String getSupervisorFee() {
+        return supervisorFee;
+    }
+
+    public void setSupervisorFee(String supervisorFee) {
+        this.supervisorFee = supervisorFee;
+    }
+
+    public String getBiddingFee() {
+        return biddingFee;
+    }
+
+    public void setBiddingFee(String biddingFee) {
+        this.biddingFee = biddingFee;
+    }
+
+    public String getDesignFee() {
+        return designFee;
+    }
+
+    public void setDesignFee(String designFee) {
+        this.designFee = designFee;
+    }
+
+    public String getOtherFee() {
+        return otherFee;
+    }
+
+    public void setOtherFee(String otherFee) {
+        this.otherFee = otherFee;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    @Override
+    public String toString() {
+        return "{" +
+                "projectProv:'" + projectProv + '\'' +
+                ", projectHome:'" + projectHome + '\'' +
+                ", projectNum:'" + projectNum + '\'' +
+                ", projectName:'" + projectName + '\'' +
+                ", projectSort:'" + projectSort + '\'' +
+                ", projectSection:'" + projectSection + '\'' +
+                ", projectCode:'" + projectCode + '\'' +
+                ", investPropCd:'" + investPropCd + '\'' +
+                ", contractNum:'" + contractNum + '\'' +
+                ", contractTypeCd:'" + contractTypeCd + '\'' +
+                ", projectTypeCd:'" + projectTypeCd + '\'' +
+                ", entrustUnit:'" + entrustUnit + '\'' +
+                ", entrustPhone:'" + entrustPhone + '\'' +
+                ", recordNum:'" + recordNum + '\'' +
+                ", issueReportDate:'" + issueReportDate + '\'' +
+                ", incomeFee:'" + incomeFee + '\'' +
+                ", leaderName:'" + leaderName + '\'' +
+                ", leaderLetterNum:'" + leaderLetterNum + '\'' +
+                ", leaderIncomePercent:'" + leaderIncomePercent + '\'' +
+                ", leaderIncomeMoney:'" + leaderIncomeMoney + '\'' +
+                ", staffs:'" + staffs + '\'' +
+                ", projectStructCd:'" + projectStructCd + '\'' +
+                ", floorUp:'" + floorUp + '\'' +
+                ", floorDown:'" + floorDown + '\'' +
+                ", projectAreaVal:'" + projectAreaVal + '\'' +
+                ", projectAreaUnit:'" + projectAreaUnit + '\'' +
+                ", projectUseCd:'" + projectUseCd + '\'' +
+                ", targetFee:'" + targetFee + '\'' +
+                ", contractFee:'" + contractFee + '\'' +
+                ", submitAuditFee:'" + submitAuditFee + '\'' +
+                ", fixedAuditFee:'" + fixedAuditFee + '\'' +
+                ", checkCutFee:'" + checkCutFee + '\'' +
+                ", checkCutLv:'" + checkCutLv + '\'' +
+                ", projectContainContent:'" + projectContainContent + '\'' +
+                ", totalInvestment:'" + totalInvestment + '\'' +
+                ", chiefConsultant:'" + chiefConsultant + '\'' +
+                ", archivesNo:'" + archivesNo + '\'' +
+                ", stage:'" + stage + '\'' +
+                ", wholeIncomeFee:'" + wholeIncomeFee + '\'' +
+                ", supervisorFee:'" + supervisorFee + '\'' +
+                ", biddingFee:'" + biddingFee + '\'' +
+                ", designFee:'" + designFee + '\'' +
+                ", otherFee:'" + otherFee + '\'' +
+                ", delFlag:'" + delFlag + '\'' +
+                '}';
+    }
+}

+ 66 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/StaffInfo.java

@@ -0,0 +1,66 @@
+package com.jeeplus.modules.ruralprojectrecords.entity;
+
+/**
+ * 上报咨询员列表
+ * @author: 徐滕
+ * @create: 2021-06-07 14:10
+ **/
+public class StaffInfo {
+
+    private String staffName;       //专业咨询员姓名,必填
+    private String letterNum;       //专业咨询员身份证号,必填
+    private String incomePercent;   //专业咨询员完成营业收入比例,必填
+    private String incomeMoney;     //专业咨询员完成营业收入       ,非必填
+    private String jobContent;      //专业咨询员负责内容,必填
+
+    public String getStaffName() {
+        return staffName;
+    }
+
+    public void setStaffName(String staffName) {
+        this.staffName = staffName;
+    }
+
+    public String getLetterNum() {
+        return letterNum;
+    }
+
+    public void setLetterNum(String letterNum) {
+        this.letterNum = letterNum;
+    }
+
+    public String getIncomePercent() {
+        return incomePercent;
+    }
+
+    public void setIncomePercent(String incomePercent) {
+        this.incomePercent = incomePercent;
+    }
+
+    public String getIncomeMoney() {
+        return incomeMoney;
+    }
+
+    public void setIncomeMoney(String incomeMoney) {
+        this.incomeMoney = incomeMoney;
+    }
+
+    public String getJobContent() {
+        return jobContent;
+    }
+
+    public void setJobContent(String jobContent) {
+        this.jobContent = jobContent;
+    }
+
+    @Override
+    public String toString() {
+        return "{" +
+                "\"staffName\":'" + staffName + '\'' +
+                ", \"letterNum\":'" + letterNum + '\'' +
+                ", \"incomePercent\":'" + incomePercent + '\'' +
+                ", \"incomeMoney\":'" + incomeMoney + '\'' +
+                ", \"jobContent\":'" + jobContent + '\'' +
+                '}';
+    }
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 108 - 8
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java


+ 206 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/utils/RuralProjectReportedInfoUtil.java

@@ -0,0 +1,206 @@
+package com.jeeplus.modules.ruralprojectrecords.utils;
+
+import com.alibaba.fastjson.JSONObject;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.modules.ruralprojectrecords.entity.ReportedConsultant;
+import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
+import com.jeeplus.modules.ruralprojectrecords.entity.StaffInfo;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.utils.UserUtils;
+
+import java.util.*;
+
+/**
+ * 上报数据处理
+ * @author: 徐滕
+ * @create: 2021-06-07 14:40
+ **/
+public class RuralProjectReportedInfoUtil {
+
+    /**
+     * 项目上报数据处理(转map)
+     * @param reported
+     * @return
+     */
+    public static Map<String ,Object> reportedDataManage(RuralProjectRecordsReported reported){
+        Map<String,Object> map = new LinkedHashMap<>();
+        //工程所在省份,必填
+        map.put("projectProv",reported.getS1());
+        //工程所在地,必填
+        map.put("projectHome",reported.getS3());
+        //项目编号,必填
+        map.put("projectNum",reported.getProjectRecordId());
+        //项目名称,必填
+        map.put("projectName",reported.getProjectName());
+        //项目分类,必填
+        map.put("projectSort",reported.getProjectClassify());
+        //项目标段
+        map.put("projectSection",notRequiredManage(reported.getProjectSection()));
+
+        //项目代码,必填
+        map.put("projectCode",reported.getProjectCode());
+        //投资性质,必填
+        map.put("investPropCd",reported.getTouZiXZ());
+        //合同编号,必填
+        map.put("contractNum",reported.getZiXunHTBH());
+        //合同类型,必填
+        map.put("contractTypeCd",reported.getHeTongLeiXing());
+        //项目类型,必填
+        map.put("projectTypeCd",reported.getProjectType());
+        //委托单位,必填
+        map.put("entrustUnit",reported.getWeiTuoDW());
+        //委托单位联系电话,必填
+        map.put("entrustPhone",reported.getLianXiDH());
+        //造价记录编号,必填
+        map.put("recordNum",reported.getDangABH());
+        //出具咨询报告日期,必填
+        map.put("issueReportDate",reported.getBaoGaoShuQianFaDate());
+        //造价咨询营业收入,必填
+        map.put("incomeFee",reported.getZiXunShouRu());
+
+
+
+        //负责人筛选
+        ReportedConsultant responsiblePerson = new ReportedConsultant();
+        //咨询员
+        List<ReportedConsultant> reportedConsultantList = reported.getReportedConsultantList();
+
+        Iterator iterator = reportedConsultantList.iterator();
+        while (iterator.hasNext()) {
+            ReportedConsultant data = (ReportedConsultant) iterator.next();
+            if (null == data.getId()){
+                iterator.remove();
+            }else if("1".equals(data.getRoleFlag())){
+                responsiblePerson = data;
+                iterator.remove();
+            }
+        }
+        //根据咨询员id查询咨询员姓名信息
+        User user = UserUtils.get(responsiblePerson.getZixunyuan());
+
+
+        //咨询项目负责人姓名,必填
+        map.put("leaderName",user.getName());
+        //咨询项目负责人身份证号,必填
+        map.put("leaderLetterNum",responsiblePerson.getIdCard());
+        //咨询项目负责人完成营业收入比例(%),必填
+        map.put("leaderIncomePercent",responsiblePerson.getWcyysrbl().toString());
+        //咨询项目负责人完成营业收入
+        map.put("leaderIncomeMoney",responsiblePerson.getWcyysr().toString());
+
+        //添加咨询员信息
+        map.put("staffs",consultantManage(reportedConsultantList));
+
+        //工程结构,必填
+        map.put("projectStructCd",reported.getPorjectStruct());
+        //地上层数
+        if(null != reported.getFloorUp()){
+            map.put("floorUp",reported.getFloorUp().toString());
+        }else{
+            map.put("floorUp","");
+        }
+
+        //地下层数
+        if(null != reported.getFloorUp()){
+            map.put("floorDown",reported.getFloorDown().toString());
+        }else{
+            map.put("floorDown","");
+        }
+        //建筑规模,必填
+        map.put("projectAreaVal",reported.getGCGMValue());
+        //建筑规模单位,必填
+        map.put("projectAreaUnit",reported.getGCGMValueParameter());
+        //工程用途,必填
+        map.put("projectUseCd",reported.getPorjectUse());
+        //咨询标的额(万元),必填
+        map.put("targetFee",reported.getZiXunBDE());
+        //合同价(万元)
+        map.put("contractFee",notRequiredManage(reported.getHeTongJia()));
+        //送审价(万元)
+        map.put("submitAuditFee",notRequiredManage(reported.getSongShenJia()));
+        //审定价(万元)
+        map.put("fixedAuditFee",notRequiredManage(reported.getShenDingJia()));
+        //审核增减额
+        map.put("checkCutFee",notRequiredManage(reported.getJingHeJianE()));
+        //审核增减率
+        map.put("checkCutLv",notRequiredManage(reported.getJingHeJianLv()));
+        //咨询项目造价包含内容说明,必填
+        map.put("projectContainContent",notRequiredManage(reported.getContentsInclude()));
+        //工程项目总投资(万元)
+        map.put("totalInvestment",notRequiredManage(reported.getProjectTotalInvestment()));
+
+        //总咨询师
+        if(StringUtils.isNotBlank(reported.getXmFZR())){
+            User xmFZRUser = UserUtils.get(reported.getXmFZR());
+            if(null != xmFZRUser){
+                map.put("chiefConsultant",xmFZRUser.getName());
+            }else{
+                map.put("chiefConsultant","");
+            }
+        }else{
+            map.put("chiefConsultant","");
+        }
+
+        //咨询档案编号
+        map.put("archivesNo",notRequiredManage(reported.getProjectTotalInvestment()));
+        //作业期(起止时间) 模板:2020-12-12到2021-12-12
+        if(StringUtils.isNotBlank(reported.getBeginDate()) && StringUtils.isNotBlank(reported.getEndDate())){
+            map.put("stage",reported.getBeginDate() + "到" + reported.getEndDate());
+        }else{
+            map.put("stage","");
+        }
+        //全过程工程咨询收入
+        map.put("wholeIncomeFee",notRequiredManage(reported.getAdvisoryIncome()));
+        //工程监理收入
+        map.put("supervisorFee",notRequiredManage(reported.getProjectSupervisionIncome()));
+        //招标代理收入
+        map.put("biddingFee",notRequiredManage(reported.getTenderingAgencyIncome()));
+        //设计收入
+        map.put("designFee",notRequiredManage(reported.getDesignIncome()));
+        //其他收入
+        map.put("otherFee",notRequiredManage(reported.getOtherIncome()));
+        //项目状态,必填(默认给0,即暂存)
+        map.put("delFlag","0");
+
+        String s = JSONObject.toJSONString(map);
+        System.out.println(s);
+        return map;
+    }
+
+    /**
+     * 非必填项数据处理
+     * @param parameter
+     * @return
+     */
+    private static String notRequiredManage(String parameter){
+        String result = "";
+        if(StringUtils.isNotBlank(parameter)){
+            result = parameter;
+        }
+        return result;
+    }
+
+    private static Map<String, String> consultantManage(List<ReportedConsultant> reportedConsultantList){
+        Map<String,String> map = new LinkedHashMap<>();
+        //获取填写的咨询员数量
+        Integer count = reportedConsultantList.size();
+        for (int i = 0;i<count; i++){
+            StaffInfo staffInfo =new StaffInfo();
+            User ziXunYuaUser = UserUtils.get(reportedConsultantList.get(i).getZixunyuan());
+            staffInfo.setStaffName(ziXunYuaUser.getName());//咨询员名称,必填
+            staffInfo.setLetterNum(reportedConsultantList.get(i).getIdCard());//咨询员身份证号,必填
+            staffInfo.setIncomePercent(reportedConsultantList.get(i).getWcyysrbl().toString());//专业咨询员完成营业收入比例,必填
+            staffInfo.setIncomeMoney(reportedConsultantList.get(i).getWcyysr().toString());//专业咨询员完成营业收入
+            staffInfo.setJobContent(reportedConsultantList.get(i).getWordnr());//专业咨询员负责内容,必填
+            map.put("staff"+i,staffInfo.toString());
+            /*map.put("staffName"+i,ziXunYuaUser.getName());                                  //咨询员名称,必填
+            map.put("letterNum"+i,reportedConsultantList.get(i).getIdCard());      //咨询员身份证号,必填
+            map.put("incomePercent"+i,reportedConsultantList.get(i).getWcyysrbl().toString());         //专业咨询员完成营业收入比例,必填
+            map.put("incomeMoney"+i,reportedConsultantList.get(i).getWcyysr().toString());           //专业咨询员完成营业收入
+            map.put("jobContent"+i,reportedConsultantList.get(i).getWordnr());            //专业咨询员负责内容,必填*/
+        }
+        String jsonStr = JSONObject.toJSONString(map);
+        System.out.println(jsonStr);
+        return map;
+    }
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 290 - 0
src/main/java/com/jeeplus/modules/tools/utils/HttpPostTool.java


+ 81 - 0
src/main/java/com/jeeplus/modules/utils/Aestool.java

@@ -0,0 +1,81 @@
+package com.jeeplus.modules.utils;
+
+import org.apache.commons.codec.binary.Base64;
+
+import javax.crypto.Cipher;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import java.security.MessageDigest;
+
+/**
+ * Created on 14:18 2021/5/7.
+ * Aes 加密工具
+ * @author xueh
+ */
+public class Aestool {
+    /**
+     * 使用密钥进行加密
+     *
+     * @param sSrc
+     * @param keyStr
+     * @return
+     * @throws Exception
+     */
+    public static String Encrypt(String sSrc, String keyStr) throws Exception {
+        byte[] key = GeneralKey(keyStr);
+        byte[] iv = GeneralIv(keyStr);
+        SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");// "算法/模式/补码方式"
+        IvParameterSpec _iv = new IvParameterSpec(iv);
+        cipher.init(Cipher.ENCRYPT_MODE, skeySpec, _iv);
+        byte[] encrypted = cipher.doFinal(sSrc.getBytes("utf-8"));
+        return Base64.encodeBase64String(encrypted);
+    }
+
+    /**
+     * 使用密钥进行解密
+     *
+     * @param sSrc
+     * @param keyStr
+     * @return
+     * @throws Exception
+     */
+    public static String Decrypt(String sSrc, String keyStr) throws Exception {
+        byte[] key = GeneralKey(keyStr);
+        byte[] iv = GeneralIv(keyStr);
+        SecretKeySpec skeySpec = new SecretKeySpec(key, "AES");
+        Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
+        IvParameterSpec _iv = new IvParameterSpec(iv);
+        cipher.init(Cipher.DECRYPT_MODE, skeySpec, _iv);
+        byte[] encrypted = Base64.decodeBase64(sSrc);// 先用base64解码
+        byte[] original = cipher.doFinal(encrypted);
+        return new String(original, "utf-8");
+    }
+    /**
+     * 构建密钥字节码
+     *
+     * @param keyStr
+     * @return
+     * @throws Exception
+     */
+    private static byte[] GeneralKey(String keyStr) throws Exception {
+        byte[] bytes = keyStr.getBytes("utf-8");
+        MessageDigest md = MessageDigest.getInstance("SHA-256");
+        md.update(bytes);
+        return md.digest();
+    }
+
+    /**
+     * 构建加解密向量字节码
+     *
+     * @param keyStr
+     * @return
+     * @throws Exception
+     */
+    private static byte[] GeneralIv(String keyStr) throws Exception {
+        byte[] bytes = keyStr.getBytes("utf-8");
+        MessageDigest md = MessageDigest.getInstance("MD5");
+        md.update(bytes);
+        return md.digest();
+    }
+}

+ 196 - 0
src/main/java/com/jeeplus/modules/utils/Rsatool.java

@@ -0,0 +1,196 @@
+package com.jeeplus.modules.utils;
+
+import javax.crypto.Cipher;
+import java.io.ByteArrayOutputStream;
+import java.security.*;
+import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.RSAPublicKey;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created on 14:19 2021/5/7.
+ * RSA 非对称加密算法工具
+ * @author xueh
+ */
+public class Rsatool {
+    //非对称密钥算法
+    public static final String KEY_ALGORITHM = "RSA";
+    /**
+     * 密钥长度,DH算法的默认密钥长度是1024
+     * 密钥长度必须是64的倍数,在512到65536位之间
+     */
+    private static final int KEY_SIZE = 512;
+
+    /**
+     * 初始化密钥对
+     *
+     * @return Map 甲方密钥的Map
+     */
+    public static Map<String, Object> initKey(String PUBLIC_KEY, String PRIVATE_KEY) throws Exception {
+        //实例化密钥生成器
+        KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGORITHM);
+        //初始化密钥生成器
+        keyPairGenerator.initialize(KEY_SIZE);
+        //生成密钥对
+        KeyPair keyPair = keyPairGenerator.generateKeyPair();
+        //甲方公钥
+        RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();
+        //甲方私钥
+        RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();
+        //将密钥存储在map中
+        Map<String, Object> keyMap = new HashMap<String, Object>();
+        keyMap.put(PUBLIC_KEY, publicKey);
+        keyMap.put(PRIVATE_KEY, privateKey);
+        return keyMap;
+
+    }
+
+
+    /**
+     * 私钥加密
+     *
+     * @param data 待加密数据
+     * @param key       密钥
+     * @return byte[] 加密数据
+     */
+    public static byte[] encryptByPrivateKey(byte[] data, byte[] key) throws Exception {
+
+        //取得私钥
+        PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(key);
+        KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+        //生成私钥
+        PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
+        //数据加密
+        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
+        cipher.init(Cipher.ENCRYPT_MODE, privateKey);
+        //为了解决加密块大小限制,将加密内容 以 53 bytes为单位拆分加密
+        int inputLen = data.length;
+        int offLen = 0;//偏移量
+        int i = 0;
+        ByteArrayOutputStream bops = new ByteArrayOutputStream();
+        while(inputLen - offLen > 0){
+            byte [] cache;
+            if(inputLen - offLen > 53){
+                cache = cipher.doFinal(data, offLen,53);
+            }else{
+                cache = cipher.doFinal(data, offLen,inputLen - offLen);
+            }
+            bops.write(cache);
+            i++;
+            offLen = 53 * i;
+        }
+        bops.close();
+        byte[] encryptedData = bops.toByteArray();
+        return encryptedData;
+    }
+
+    /**
+     * 公钥加密
+     *
+     * @param data 待加密数据
+     * @param key       密钥
+     * @return byte[] 加密数据
+     */
+    public static byte[] encryptByPublicKey(byte[] data, byte[] key) throws Exception {
+
+        //实例化密钥工厂
+        KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+        //初始化公钥
+        //密钥材料转换
+        X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key);
+        //产生公钥
+        PublicKey pubKey = keyFactory.generatePublic(x509KeySpec);
+
+        //数据加密
+        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
+        cipher.init(Cipher.ENCRYPT_MODE, pubKey);
+        return cipher.doFinal(data);
+    }
+
+    /**
+     * 私钥解密
+     *
+     * @param data 待解密数据
+     * @param key  密钥
+     * @return byte[] 解密数据
+     */
+    public static byte[] decryptByPrivateKey(byte[] data, byte[] key) throws Exception {
+        //取得私钥
+        PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(key);
+        KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+        //生成私钥
+        PrivateKey privateKey = keyFactory.generatePrivate(pkcs8KeySpec);
+        //数据解密
+        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
+        cipher.init(Cipher.DECRYPT_MODE, privateKey);
+        return cipher.doFinal(data);
+    }
+
+    /**
+     * 公钥解密
+     *
+     * @param data 待解密数据
+     * @param key  密钥
+     * @return byte[] 解密数据
+     */
+    public static byte[] decryptByPublicKey(byte[] data, byte[] key) throws Exception {
+
+        //实例化密钥工厂
+        KeyFactory keyFactory = KeyFactory.getInstance(KEY_ALGORITHM);
+        //初始化公钥
+        //密钥材料转换
+        X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec(key);
+        //产生公钥
+        PublicKey pubKey = keyFactory.generatePublic(x509KeySpec);
+        //数据解密
+        Cipher cipher = Cipher.getInstance(keyFactory.getAlgorithm());
+        cipher.init(Cipher.DECRYPT_MODE, pubKey);
+
+        //为了解决解密块大小限制,将解密内容 以 64 bytes为单位拆分解密
+        int inputLen = data.length;
+        int offLen = 0;
+        int i = 0;
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        while(inputLen - offLen > 0){
+            byte[] cache;
+            if(inputLen - offLen > 64){
+                cache = cipher.doFinal(data,offLen,64);
+            }else{
+                cache = cipher.doFinal(data,offLen,inputLen - offLen);
+            }
+            byteArrayOutputStream.write(cache);
+            i++;
+            offLen = 64 * i;
+
+        }
+        byteArrayOutputStream.close();
+        byte[] byteArray = byteArrayOutputStream.toByteArray();
+
+        return byteArray;
+    }
+
+    /**
+     * 取得私钥
+     *
+     * @param keyMap 密钥map
+     * @return byte[] 私钥
+     */
+    public static byte[] getPrivateKey(Map<String, Object> keyMap,String PRIVATE_KEY) {
+        Key key = (Key) keyMap.get(PRIVATE_KEY);
+        return key.getEncoded();
+    }
+
+    /**
+     * 取得公钥
+     *
+     * @param keyMap 密钥map
+     * @return byte[] 公钥
+     */
+    public static byte[] getPublicKey(Map<String, Object> keyMap, String PUBLIC_KEY) throws Exception {
+        Key key = (Key) keyMap.get(PUBLIC_KEY);
+        return key.getEncoded();
+    }
+}

+ 12 - 13
src/main/webapp/webpage/modules/ruralprojectrecords/cost/newReportedForm.jsp

@@ -67,16 +67,16 @@
                 }
                 var list = [];
                 var size = $("#reportedConsultantList tr").length;
-                if(size == 0){
+                if(size <= 0){
                     parent.layer.msg("咨询员数量至少有1个人!", {icon: 5});
                     return false;
                 }
-                if(size>20){
+                if(size>21){
                     parent.layer.msg("咨询员数量不得超过20人!", {icon: 5});
                     return false;
                 }
                 if(size>0){
-                    for (var i = 1;i<=50;i++){
+                    for (var i = 1;i<=99;i++){
                         var zixunyuan = $("#reportedConsultantList"+i+"_zixunyuanId").val();
                         if(zixunyuan!=undefined && zixunyuan != null && zixunyuan !=''){
                             list.push(zixunyuan);
@@ -91,7 +91,7 @@
                     }
                 }
 
-                var team = $("input[name='s1']").val();
+                var team = $("input[name='s1']:checked").val();
                 var city = $("#city").val()
                 var county = $("#county").val()
                 var otherProvinces = $("#otherProvinces").val()
@@ -115,11 +115,11 @@
                     }
                 }
 
-                /*var checkedCount = $('input[type=checkbox]:checked').length;
+                var checkedCount = $('input[type=checkbox]:checked').length;
                 if(checkedCount == 0){
                     parent.layer.msg("请选择咨询项目造价包含内容说明!", {icon: 5});
                     return false;
-                }*/
+                }
 
                 var BaoGaoShuQianFaDate = $("#BaoGaoShuQianFaDate").val();
                 var s = BaoGaoShuQianFaDate.replace(/-/g,"/");
@@ -221,9 +221,9 @@
             });
 
 
-            $('#city').html('<option value="${ruralProjectRecordsReported.s2}">${ruralProjectRecordsReported.city}</option>')
+            /*$('#city').html('<option value="${ruralProjectRecordsReported.s2}">${ruralProjectRecordsReported.city}</option>')
             $('#county').html('<option value="${ruralProjectRecordsReported.s3}">${ruralProjectRecordsReported.county}</option>')
-            layui.form.render("select");
+            layui.form.render("select");*/
 
             layui.use(['table','form'], function(){
 
@@ -826,14 +826,14 @@
                     <label class="layui-form-label double-line"><span class="require-item">*</span>工程所在省份</label>
                     <div class="layui-input-block">
                         <input type="radio" title="本省" lay-filter="ext" name="s1" checked id="ext" value="1">
-                        <input type="radio" title="外省" lay-filter="ext" name="s1" id="ext1" value="2">
+                        <input type="radio" title="外省" lay-filter="ext" name="s1" id="ext1" value="999">
                     </div>
                 </div>
 
                 <div class="layui-item layui-col-sm6 lw6" id="d2">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>工程所在省份</label>
                     <div class="layui-input-block">
-                        <select id="otherProvinces" name="s2" value="${city}" lay-verify="required" lay-filter="quyufilter"></select>
+                        <select id="otherProvinces" name="s3" value="${city}" lay-verify="required" lay-filter="quyufilter"></select>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6" id="cityDiv">
@@ -907,7 +907,6 @@
                     <label class="layui-form-label double-line"><span class="require-item">*</span>项目类型:</label>
                     <div class="layui-input-block">
                         <form:select path="ProjectType" class="form-control layui-input required simple-select" lay-filter="ProjectType">
-                            <form:option value=""></form:option>
                             <form:options items="${fns:getMainDictList('ProjectType')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                         </form:select>
                     </div>
@@ -1161,11 +1160,11 @@
 
 
             <div class="form-group layui-row first lw9">
-                <div class="form-group-label"><h2>咨询项目造价包含内容说明</h2></div>
+                <div class="form-group-label"><h2><span class="require-item">*</span>咨询项目造价包含内容说明</h2></div>
                 <div class="layui-item layui-col-sm12">
                     <label class="layui-form-label double-line">咨询项目造价包含内容说明(勾选):</label>
                     <div class="layui-input-block paddingDiv">
-                        <form:checkboxes path="TJProjectList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="label" htmlEscape="true" items="${fns:getMainDictList('contents_include')}" />
+                        <form:checkboxes path="contentsIncludeList" lay-filter="chargeCriterionList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="true" items="${fns:getMainDictList('contents_include')}" />
                     </div>
                 </div>
                 <div class="overallProcessDiv" style="display: none">