user5 пре 4 година
родитељ
комит
2847a4f74e

+ 2 - 2
pom.xml

@@ -74,8 +74,8 @@
                 <artifactId>maven-compiler-plugin</artifactId>
                 <version>3.3</version>
                 <configuration>
-                    <source>1.7</source>
-                    <target>1.7</target>
+                    <source>8</source>
+                    <target>8</target>
                     <compilerArguments>
                         <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar</bootclasspath>
                         <extdirs>${project.basedir}/src/main/webapp/WEB-INF/jar</extdirs>

+ 25 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/dao/RuralProjectRecordsReportedDao.java

@@ -2,8 +2,11 @@ package com.jeeplus.modules.ruralprojectrecords.dao;
 
 import com.jeeplus.common.persistence.CrudDao;
 import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.ReportedConsultant;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
 
+import java.util.List;
+
 /**
  * @author: 大猫
  * @create: 2020-12-14 17:20
@@ -11,4 +14,26 @@ import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReporte
 @MyBatisDao
 public interface RuralProjectRecordsReportedDao extends CrudDao<RuralProjectRecordsReported>  {
 
+    List<ReportedConsultant> consultantList(String reportedId);
+
+    /**
+     * 新增上报咨询员信息
+     * @param info
+     * @return
+     */
+    int insertConsultant(ReportedConsultant info);
+
+    /**
+     * 修改上报咨询员信息
+     * @param info
+     * @return
+     */
+    int updateConsultant(ReportedConsultant info);
+
+    /**
+     * 删除上报咨询员信息
+     * @param info
+     * @return
+     */
+    int deleteConsultant(ReportedConsultant info);
 }

+ 22 - 13
src/main/java/com/jeeplus/modules/ruralprojectrecords/entity/ReportedConsultant.java

@@ -8,20 +8,21 @@ import com.jeeplus.common.persistence.DataEntity;
  **/
 public class ReportedConsultant extends DataEntity<ReportedConsultant> {
 
-    private Integer zixunyuan_id;   //咨询员序号   自增长
+    private String zixunyuanId;   //咨询员序号   自增长
     private String zixunyuan;       //咨询员
     private String zixunyuanName;       //咨询员(录入)
-    private String zhucezigezh_ID;  //注册/资格证号
-    private String Wordnr;          //本人复制内容
+    private String zhucezigezhID;  //注册/资格证号
+    private String wordnr;          //本人复制内容
     private Double wcyysrbl;        //完成营业收入比例( %)
     private Double wcyysr;          //完成营业收入(元)
+    private String reportedId;       //上报id
 
-    public Integer getZixunyuan_id() {
-        return zixunyuan_id;
+    public String getZixunyuanId() {
+        return zixunyuanId;
     }
 
-    public void setZixunyuan_id(Integer zixunyuan_id) {
-        this.zixunyuan_id = zixunyuan_id;
+    public void setZixunyuanId(String zixunyuanId) {
+        this.zixunyuanId = zixunyuanId;
     }
 
     public String getZixunyuan() {
@@ -40,20 +41,20 @@ public class ReportedConsultant extends DataEntity<ReportedConsultant> {
         this.zixunyuanName = zixunyuanName;
     }
 
-    public String getZhucezigezh_ID() {
-        return zhucezigezh_ID;
+    public String getZhucezigezhID() {
+        return zhucezigezhID;
     }
 
-    public void setZhucezigezh_ID(String zhucezigezh_ID) {
-        this.zhucezigezh_ID = zhucezigezh_ID;
+    public void setZhucezigezhID(String zhucezigezhID) {
+        this.zhucezigezhID = zhucezigezhID;
     }
 
     public String getWordnr() {
-        return Wordnr;
+        return wordnr;
     }
 
     public void setWordnr(String wordnr) {
-        Wordnr = wordnr;
+        this.wordnr = wordnr;
     }
 
     public Double getWcyysrbl() {
@@ -71,4 +72,12 @@ public class ReportedConsultant extends DataEntity<ReportedConsultant> {
     public void setWcyysr(Double wcyysr) {
         this.wcyysr = wcyysr;
     }
+
+    public String getReportedId() {
+        return reportedId;
+    }
+
+    public void setReportedId(String reportedId) {
+        this.reportedId = reportedId;
+    }
 }

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

@@ -78,6 +78,8 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	private String officeName;
 	private String flagAdmin;
 	private String reportedState;   //上报状态
+	private String syncStatus;   //同步状态
+	private String reportStatus;   //上报状态
 	private String view;
 	private List<ProjectPlanInfo> projectPlanList= Lists.newArrayList();;//项目计划信息
 	private List<ReportedConsultant> reportedConsultantList= Lists.newArrayList();;//咨询员列表
@@ -848,4 +850,20 @@ public class RuralProjectRecords extends ActEntity<RuralProjectRecords> {
 	public void setReportedConsultantList(List<ReportedConsultant> reportedConsultantList) {
 		this.reportedConsultantList = reportedConsultantList;
 	}
+
+	public String getSyncStatus() {
+		return syncStatus;
+	}
+
+	public void setSyncStatus(String syncStatus) {
+		this.syncStatus = syncStatus;
+	}
+
+	public String getReportStatus() {
+		return reportStatus;
+	}
+
+	public void setReportStatus(String reportStatus) {
+		this.reportStatus = reportStatus;
+	}
 }

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

@@ -8,11 +8,8 @@ import com.google.common.collect.Lists;
 import com.jeeplus.common.persistence.DataEntity;
 import com.jeeplus.modules.sys.entity.User;
 import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
-import org.springframework.format.annotation.DateTimeFormat;
 
-import java.util.Date;
 import java.util.List;
-import com.fasterxml.jackson.annotation.JsonFormat;
 
 
 /**
@@ -49,18 +46,18 @@ public class RuralProjectRecordsReported extends DataEntity<RuralProjectRecordsR
 	private String PorjectStruct;	//工程结构
 	private Integer FloorUp;		//地上层数
 	private Integer FloorDown;		//地下层数
-	private Double GCGM_Value;		//建筑面积或规模
-	private String GCGM_Unit;		//计量单位
+	private Double GCGMValue;		//建筑面积或规模
+	private String GCGMUnit;		//计量单位
 	private String PorjectUse;		//工程用途
 	private Double ZiXunBDE;		//咨询标的额(万元)
-	private Double ZiXunBDE_TJ;		//其中土建造价(万元)
-	private Double ZiXunBDE_AZ;		//其中安装造价(万元)
-	private Double Cal_TJ_Percent;	//其中土建百分比(%)
-	private Double Cal_AZ_Percent;	//其中安装百分比(%)
-	private Double Cal_ZZJ_Unit;	//单位造价(元)
-
-	private Double Cal_ZZJ_TJ_Unit;	//其中土建单位造价(元)
-	private Double Cal_ZZJ_AZ_Unit;	//其中安装单位造价(元)
+	private Double ZiXunBDETJ;		//其中土建造价(万元)
+	private Double ZiXunBDEAZ;		//其中安装造价(万元)
+	private Double CalTJPercent;	//其中土建百分比(%)
+	private Double CalAZPercent;	//其中安装百分比(%)
+	private Double CalZZJUnit;	//单位造价(元)
+
+	private Double CalZZJTJUnit;	//其中土建单位造价(元)
+	private Double CalZZJAZUnit;	//其中安装单位造价(元)
 	private Double HeTongJia;		//合同价(万元)
 	private Double SongShenJia;		//送审价(万元)
 	private Double ShenDingJia;		//审定价(万元)
@@ -73,23 +70,26 @@ public class RuralProjectRecordsReported extends DataEntity<RuralProjectRecordsR
 	private Double SNYL;			//水泥用量(t)
 	private Double YBTYL;			//预拌砼用量(m³)
 	private Double RGGRYL;			//人工工日用量(工日)
-	private Double GCYL_PerUnit;	//钢材消耗指标(kg)
-	private Double SNYL_PerUnit;	//水泥消耗指标(kg)
-	private Double YBTYL_PerUnit;	//预拌砼消耗指标(m³)
-	private Double RGGRYL_PerUnit;	//人工工日消耗指标(工日)
-
-	private List<String> TJ_ProjectList;		//土建工程
-	private List<String> ZS_ProjectList;	//装饰工程
-	private List<String> AZ_ProjectList;	//安装工程
-	private List<String> SZ_ProjectList;	//市政工程
-	private List<String> FGYL_ProjectList;		//仿古园林工程
-
-	private String TJ_Project;//土建工程
-	private String ZS_Project;//装饰工程
-	private String AZ_Project;//安装工程
-	private String SZ_Project;//市政工程
-	private String FGYL_Project;//仿古园林工程
-	private String QT_Projec;	//其他专业工程咨询项目造价包含内容说明
+	private Double GCYLPerUnit;	//钢材消耗指标(kg)
+	private Double SNYLPerUnit;	//水泥消耗指标(kg)
+	private Double YBTYLPerUnit;	//预拌砼消耗指标(m³)
+	private Double RGGRYLPerUnit;	//人工工日消耗指标(工日)
+
+	private List<String> TJProjectList;		//土建工程
+	private List<String> ZSProjectList;	//装饰工程
+	private List<String> AZProjectList;	//安装工程
+	private List<String> SZProjectList;	//市政工程
+	private List<String> FGYLProjectList;		//仿古园林工程
+
+	private String TJProject;//土建工程
+	private String ZSProject;//装饰工程
+	private String AZProject;//安装工程
+	private String SZProject;//市政工程
+	private String FGYLProject;//仿古园林工程
+	private String QTProjec;	//其他专业工程咨询项目造价包含内容说明
+
+	private String city;
+	private String county;
 
 	public WorkContractInfo getWorkContractInfo() {
 		return workContractInfo;
@@ -275,20 +275,20 @@ public class RuralProjectRecordsReported extends DataEntity<RuralProjectRecordsR
 		FloorDown = floorDown;
 	}
 
-	public Double getGCGM_Value() {
-		return GCGM_Value;
+	public Double getGCGMValue() {
+		return GCGMValue;
 	}
 
-	public void setGCGM_Value(Double GCGM_Value) {
-		this.GCGM_Value = GCGM_Value;
+	public void setGCGMValue(Double GCGMValue) {
+		this.GCGMValue = GCGMValue;
 	}
 
-	public String getGCGM_Unit() {
-		return GCGM_Unit;
+	public String getGCGMUnit() {
+		return GCGMUnit;
 	}
 
-	public void setGCGM_Unit(String GCGM_Unit) {
-		this.GCGM_Unit = GCGM_Unit;
+	public void setGCGMUnit(String GCGMUnit) {
+		this.GCGMUnit = GCGMUnit;
 	}
 
 	public String getPorjectUse() {
@@ -307,60 +307,60 @@ public class RuralProjectRecordsReported extends DataEntity<RuralProjectRecordsR
 		ZiXunBDE = ziXunBDE;
 	}
 
-	public Double getZiXunBDE_TJ() {
-		return ZiXunBDE_TJ;
+	public Double getZiXunBDETJ() {
+		return ZiXunBDETJ;
 	}
 
-	public void setZiXunBDE_TJ(Double ziXunBDE_TJ) {
-		ZiXunBDE_TJ = ziXunBDE_TJ;
+	public void setZiXunBDETJ(Double ziXunBDETJ) {
+		ZiXunBDETJ = ziXunBDETJ;
 	}
 
-	public Double getZiXunBDE_AZ() {
-		return ZiXunBDE_AZ;
+	public Double getZiXunBDEAZ() {
+		return ZiXunBDEAZ;
 	}
 
-	public void setZiXunBDE_AZ(Double ziXunBDE_AZ) {
-		ZiXunBDE_AZ = ziXunBDE_AZ;
+	public void setZiXunBDEAZ(Double ziXunBDEAZ) {
+		ZiXunBDEAZ = ziXunBDEAZ;
 	}
 
-	public Double getCal_TJ_Percent() {
-		return Cal_TJ_Percent;
+	public Double getCalTJPercent() {
+		return CalTJPercent;
 	}
 
-	public void setCal_TJ_Percent(Double cal_TJ_Percent) {
-		Cal_TJ_Percent = cal_TJ_Percent;
+	public void setCalTJPercent(Double calTJPercent) {
+		CalTJPercent = calTJPercent;
 	}
 
-	public Double getCal_AZ_Percent() {
-		return Cal_AZ_Percent;
+	public Double getCalAZPercent() {
+		return CalAZPercent;
 	}
 
-	public void setCal_AZ_Percent(Double cal_AZ_Percent) {
-		Cal_AZ_Percent = cal_AZ_Percent;
+	public void setCalAZPercent(Double calAZPercent) {
+		CalAZPercent = calAZPercent;
 	}
 
-	public Double getCal_ZZJ_Unit() {
-		return Cal_ZZJ_Unit;
+	public Double getCalZZJUnit() {
+		return CalZZJUnit;
 	}
 
-	public void setCal_ZZJ_Unit(Double cal_ZZJ_Unit) {
-		Cal_ZZJ_Unit = cal_ZZJ_Unit;
+	public void setCalZZJUnit(Double calZZJUnit) {
+		CalZZJUnit = calZZJUnit;
 	}
 
-	public Double getCal_ZZJ_TJ_Unit() {
-		return Cal_ZZJ_TJ_Unit;
+	public Double getCalZZJTJUnit() {
+		return CalZZJTJUnit;
 	}
 
-	public void setCal_ZZJ_TJ_Unit(Double cal_ZZJ_TJ_Unit) {
-		Cal_ZZJ_TJ_Unit = cal_ZZJ_TJ_Unit;
+	public void setCalZZJTJUnit(Double calZZJTJUnit) {
+		CalZZJTJUnit = calZZJTJUnit;
 	}
 
-	public Double getCal_ZZJ_AZ_Unit() {
-		return Cal_ZZJ_AZ_Unit;
+	public Double getCalZZJAZUnit() {
+		return CalZZJAZUnit;
 	}
 
-	public void setCal_ZZJ_AZ_Unit(Double cal_ZZJ_AZ_Unit) {
-		Cal_ZZJ_AZ_Unit = cal_ZZJ_AZ_Unit;
+	public void setCalZZJAZUnit(Double calZZJAZUnit) {
+		CalZZJAZUnit = calZZJAZUnit;
 	}
 
 	public Double getHeTongJia() {
@@ -435,123 +435,139 @@ public class RuralProjectRecordsReported extends DataEntity<RuralProjectRecordsR
 		this.RGGRYL = RGGRYL;
 	}
 
-	public Double getGCYL_PerUnit() {
-		return GCYL_PerUnit;
+	public Double getGCYLPerUnit() {
+		return GCYLPerUnit;
 	}
 
-	public void setGCYL_PerUnit(Double GCYL_PerUnit) {
-		this.GCYL_PerUnit = GCYL_PerUnit;
+	public void setGCYLPerUnit(Double GCYLPerUnit) {
+		this.GCYLPerUnit = GCYLPerUnit;
 	}
 
-	public Double getSNYL_PerUnit() {
-		return SNYL_PerUnit;
+	public Double getSNYLPerUnit() {
+		return SNYLPerUnit;
 	}
 
-	public void setSNYL_PerUnit(Double SNYL_PerUnit) {
-		this.SNYL_PerUnit = SNYL_PerUnit;
+	public void setSNYLPerUnit(Double SNYLPerUnit) {
+		this.SNYLPerUnit = SNYLPerUnit;
 	}
 
-	public Double getYBTYL_PerUnit() {
-		return YBTYL_PerUnit;
+	public Double getYBTYLPerUnit() {
+		return YBTYLPerUnit;
 	}
 
-	public void setYBTYL_PerUnit(Double YBTYL_PerUnit) {
-		this.YBTYL_PerUnit = YBTYL_PerUnit;
+	public void setYBTYLPerUnit(Double YBTYLPerUnit) {
+		this.YBTYLPerUnit = YBTYLPerUnit;
 	}
 
-	public Double getRGGRYL_PerUnit() {
-		return RGGRYL_PerUnit;
+	public Double getRGGRYLPerUnit() {
+		return RGGRYLPerUnit;
 	}
 
-	public void setRGGRYL_PerUnit(Double RGGRYL_PerUnit) {
-		this.RGGRYL_PerUnit = RGGRYL_PerUnit;
+	public void setRGGRYLPerUnit(Double RGGRYLPerUnit) {
+		this.RGGRYLPerUnit = RGGRYLPerUnit;
 	}
 
-	public List<String> getTJ_ProjectList() {
-		return TJ_ProjectList;
+	public List<String> getTJProjectList() {
+		return TJProjectList;
 	}
 
-	public void setTJ_ProjectList(List<String> TJ_ProjectList) {
-		this.TJ_ProjectList = TJ_ProjectList;
+	public void setTJProjectList(List<String> TJProjectList) {
+		this.TJProjectList = TJProjectList;
 	}
 
-	public List<String> getZS_ProjectList() {
-		return ZS_ProjectList;
+	public List<String> getZSProjectList() {
+		return ZSProjectList;
 	}
 
-	public void setZS_ProjectList(List<String> ZS_ProjectList) {
-		this.ZS_ProjectList = ZS_ProjectList;
+	public void setZSProjectList(List<String> ZSProjectList) {
+		this.ZSProjectList = ZSProjectList;
 	}
 
-	public List<String> getAZ_ProjectList() {
-		return AZ_ProjectList;
+	public List<String> getAZProjectList() {
+		return AZProjectList;
 	}
 
-	public void setAZ_ProjectList(List<String> AZ_ProjectList) {
-		this.AZ_ProjectList = AZ_ProjectList;
+	public void setAZProjectList(List<String> AZProjectList) {
+		this.AZProjectList = AZProjectList;
 	}
 
-	public List<String> getSZ_ProjectList() {
-		return SZ_ProjectList;
+	public List<String> getSZProjectList() {
+		return SZProjectList;
 	}
 
-	public void setSZ_ProjectList(List<String> SZ_ProjectList) {
-		this.SZ_ProjectList = SZ_ProjectList;
+	public void setSZProjectList(List<String> SZProjectList) {
+		this.SZProjectList = SZProjectList;
 	}
 
-	public List<String> getFGYL_ProjectList() {
-		return FGYL_ProjectList;
+	public List<String> getFGYLProjectList() {
+		return FGYLProjectList;
 	}
 
-	public void setFGYL_ProjectList(List<String> FGYL_ProjectList) {
-		this.FGYL_ProjectList = FGYL_ProjectList;
+	public void setFGYLProjectList(List<String> FGYLProjectList) {
+		this.FGYLProjectList = FGYLProjectList;
 	}
 
-	public String getTJ_Project() {
-		return TJ_Project;
+	public String getTJProject() {
+		return TJProject;
 	}
 
-	public void setTJ_Project(String TJ_Project) {
-		this.TJ_Project = TJ_Project;
+	public void setTJProject(String TJProject) {
+		this.TJProject = TJProject;
 	}
 
-	public String getZS_Project() {
-		return ZS_Project;
+	public String getZSProject() {
+		return ZSProject;
 	}
 
-	public void setZS_Project(String ZS_Project) {
-		this.ZS_Project = ZS_Project;
+	public void setZSProject(String ZSProject) {
+		this.ZSProject = ZSProject;
 	}
 
-	public String getAZ_Project() {
-		return AZ_Project;
+	public String getAZProject() {
+		return AZProject;
 	}
 
-	public void setAZ_Project(String AZ_Project) {
-		this.AZ_Project = AZ_Project;
+	public void setAZProject(String AZProject) {
+		this.AZProject = AZProject;
 	}
 
-	public String getSZ_Project() {
-		return SZ_Project;
+	public String getSZProject() {
+		return SZProject;
 	}
 
-	public void setSZ_Project(String SZ_Project) {
-		this.SZ_Project = SZ_Project;
+	public void setSZProject(String SZProject) {
+		this.SZProject = SZProject;
 	}
 
-	public String getFGYL_Project() {
-		return FGYL_Project;
+	public String getFGYLProject() {
+		return FGYLProject;
 	}
 
-	public void setFGYL_Project(String FGYL_Project) {
-		this.FGYL_Project = FGYL_Project;
+	public void setFGYLProject(String FGYLProject) {
+		this.FGYLProject = FGYLProject;
 	}
 
-	public String getQT_Projec() {
-		return QT_Projec;
+	public String getQTProjec() {
+		return QTProjec;
 	}
 
-	public void setQT_Projec(String QT_Projec) {
-		this.QT_Projec = QT_Projec;
+	public void setQTProjec(String QTProjec) {
+		this.QTProjec = QTProjec;
+	}
+
+	public String getCity() {
+		return city;
+	}
+
+	public void setCity(String city) {
+		this.city = city;
+	}
+
+	public String getCounty() {
+		return county;
+	}
+
+	public void setCounty(String county) {
+		this.county = county;
 	}
 }

+ 119 - 15
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectMessageService.java

@@ -14,12 +14,14 @@ import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportData;
 import com.jeeplus.modules.projectcontentinfo.entity.ProjectReportRecord;
 import com.jeeplus.modules.projectcontentinfo.entity.Projectcontentinfo;
 import com.jeeplus.modules.projectcontentinfo.service.ProjectReportDataService;
+import com.jeeplus.modules.projectrecord.entity.ProjectPlanInfo;
 import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
 import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
 import com.jeeplus.modules.projectreportnum.service.ProjectReportNumService;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectMessageDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsReportedDao;
 import com.jeeplus.modules.ruralprojectrecords.dao.RuralWorkProjectUserDao;
+import com.jeeplus.modules.ruralprojectrecords.entity.ReportedConsultant;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecords;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectRecordsReported;
 import com.jeeplus.modules.ruralprojectrecords.entity.RuralProjectReportData;
@@ -59,6 +61,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 /**
@@ -1495,6 +1498,75 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
         return dao.getProjectReportedAreaByParentId(parentId);
     }
 
+
+    /**
+     * 上报数据新增处理
+     * @param records
+     * @return
+     */
+    public RuralProjectRecordsReported disposeData(RuralProjectRecords records){
+        RuralProjectRecordsReported reported = new RuralProjectRecordsReported();
+        reported.setWorkContractInfo(records.getWorkContractInfo());
+        reported.setProjectId(records.getId());
+        reported.setProjectLeaders(records.getProjectLeaders());
+        reported.setProjectName(records.getProjectName());
+        reported.setXmFZR(records.getLeaderIds());
+        reported.setLeaderNameStr(records.getLeaderNameStr());
+        reported.setZiXunHTBH(records.getWorkContractInfo().getContractNum());
+        reported.setWeiTuoDW(records.getWorkContractInfo().getClient().getName());
+        reported.setLianXiDH(records.getWorkContractInfo().getClient().getTelephone());
+        reported.setDangABH(records.getReportData().getNumber());
+
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+        reported.setBaoGaoShuQianFaDate(formatter.format(records.getReportData().getReportDate()));
+        reported.setHeTongJia(records.getReportData().getContractFee());
+        reported.setSongShenJia(records.getReportData().getReviewFee());
+        reported.setShenDingJia(records.getReportData().getApprovalFee());
+        reported.setJingHeJianE(records.getReportData().getVerifyFee());
+        reported.setJingHeJianLv(records.getReportData().getVerifyRate());
+        reported.setPorjectStruct("11");
+        reported.setGCGMUnit("7");
+        reported.setPorjectUse("17");
+        return reported;
+    }
+
+    /**
+     * 根据id查询上报信息
+     * @param id
+     * @return
+     */
+    public RuralProjectRecordsReported getRuralProjectRecordsReported(String id){
+        //查询上报信息
+        RuralProjectRecordsReported ruralProjectRecordsReported = ruralProjectRecordsReportedDao.get(id);
+        if(null != ruralProjectRecordsReported) {
+            //处理多选框选项
+            if (StringUtils.isNotBlank(ruralProjectRecordsReported.getTJProject())) {
+                ruralProjectRecordsReported.setTJProjectList(Arrays.asList(ruralProjectRecordsReported.getTJProject().split(";")));
+            }
+            if (StringUtils.isNotBlank(ruralProjectRecordsReported.getZSProject())) {
+                ruralProjectRecordsReported.setZSProjectList(Arrays.asList(ruralProjectRecordsReported.getZSProject().split(";")));
+            }
+            if (StringUtils.isNotBlank(ruralProjectRecordsReported.getAZProject())) {
+                ruralProjectRecordsReported.setAZProjectList(Arrays.asList(ruralProjectRecordsReported.getAZProject().split(";")));
+            }
+            if (StringUtils.isNotBlank(ruralProjectRecordsReported.getSZProject())) {
+                ruralProjectRecordsReported.setSZProjectList(Arrays.asList(ruralProjectRecordsReported.getSZProject().split(";")));
+            }
+            if (StringUtils.isNotBlank(ruralProjectRecordsReported.getFGYLProject())) {
+                ruralProjectRecordsReported.setFGYLProjectList(Arrays.asList(ruralProjectRecordsReported.getFGYLProject().split(";")));
+            }
+
+            //查询咨询员信息
+            List<ReportedConsultant> consultantList = ruralProjectRecordsReportedDao.consultantList(id);
+            if(0 < consultantList.size())
+            for (ReportedConsultant info: consultantList) {
+                info.setZixunyuanId(info.getZixunyuan());
+            }
+            ruralProjectRecordsReported.setReportedConsultantList(consultantList);
+        }
+        return ruralProjectRecordsReported;
+    }
+
     /**
      * 保存上报数据
      * @param reported
@@ -1502,26 +1574,58 @@ public class RuralProjectMessageService extends CrudService<RuralProjectMessageD
     @Transactional(readOnly = false)
     public void saveReportedInfo(RuralProjectRecordsReported reported) {
         //处理多选框选项
-        if(null != reported.getTJ_ProjectList() && reported.getTJ_ProjectList().size()>0){
-            reported.setTJ_Project(String.join(";", reported.getTJ_ProjectList()));
+        if(null != reported.getTJProjectList() && reported.getTJProjectList().size()>0){
+            reported.setTJProject(String.join(";", reported.getTJProjectList()));
         }
-        if(null != reported.getZS_ProjectList() && reported.getZS_ProjectList().size()>0){
-            reported.setZS_Project(String.join(";", reported.getZS_ProjectList()));
+        if(null != reported.getZSProjectList() && reported.getZSProjectList().size()>0){
+            reported.setZSProject(String.join(";", reported.getZSProjectList()));
         }
-        if(null != reported.getAZ_ProjectList() && reported.getAZ_ProjectList().size()>0){
-            reported.setAZ_Project(String.join(";", reported.getAZ_ProjectList()));
+        if(null != reported.getAZProjectList() && reported.getAZProjectList().size()>0){
+            reported.setAZProject(String.join(";", reported.getAZProjectList()));
         }
-        if(null != reported.getSZ_ProjectList() && reported.getSZ_ProjectList().size()>0){
-            reported.setSZ_Project(String.join(";", reported.getSZ_ProjectList()));
+        if(null != reported.getSZProjectList() && reported.getSZProjectList().size()>0){
+            reported.setSZProject(String.join(";", reported.getSZProjectList()));
         }
-        if(null != reported.getFGYL_ProjectList() && reported.getFGYL_ProjectList().size()>0){
-            reported.setFGYL_Project(String.join(";", reported.getFGYL_ProjectList()));
+        if(null != reported.getFGYLProjectList() && reported.getFGYLProjectList().size()>0){
+            reported.setFGYLProject(String.join(";", reported.getFGYLProjectList()));
         }
 
-        
-        reported.preInsert();
-        //将项目id设置为id
-        reported.setId(reported.getProjectId());
-        ruralProjectRecordsReportedDao.insert(reported);
+        //查询是否已经上报项目信息
+        if (StringUtils.isBlank(reported.getId())){
+            reported.preInsert();
+            //将项目id设置为id
+            reported.setId(reported.getProjectId());
+            ruralProjectRecordsReportedDao.insert(reported);
+        }else{
+            reported.preUpdate();
+            ruralProjectRecordsReportedDao.update(reported);
+        }
+        //修改项目信息中的上报状态
+        RuralProjectRecords records = new RuralProjectRecords();
+        records.setId(reported.getId());
+        records.setReportedState("2");
+        dao.updateReported(records);
+
+        //保存咨询员信息
+        for (ReportedConsultant info : reported.getReportedConsultantList()){
+            if (info.getId() == null){
+                continue;
+            }
+            //添加项目上报id
+            info.setReportedId(reported.getId());
+            //判断删除信息
+            if (ProjectPlanInfo.DEL_FLAG_NORMAL.equals(info.getDelFlag())){
+                //判断是否有id  没有则为新增
+                if (StringUtils.isBlank(info.getId())){
+                    info.preInsert();
+                    ruralProjectRecordsReportedDao.insertConsultant(info);
+                }else{
+                    info.preUpdate();
+                    ruralProjectRecordsReportedDao.updateConsultant(info);
+                }
+            }else{
+                ruralProjectRecordsReportedDao.deleteConsultant(info);
+            }
+        }
     }
 }

+ 0 - 26
src/main/java/com/jeeplus/modules/ruralprojectrecords/service/RuralProjectRecordsService.java

@@ -1381,30 +1381,4 @@ public class RuralProjectRecordsService extends CrudService<RuralProjectRecordsD
 			dao.updateProjectReportedState(idList);
 		}
 	}
-
-	public RuralProjectRecordsReported disposeData(RuralProjectRecords records){
-		RuralProjectRecordsReported reported = new RuralProjectRecordsReported();
-		reported.setWorkContractInfo(records.getWorkContractInfo());
-		reported.setProjectId(records.getId());
-		reported.setProjectLeaders(records.getProjectLeaders());
-		reported.setProjectName(records.getProjectName());
-		reported.setXmFZR(records.getLeaderIds());
-		reported.setLeaderNameStr(records.getLeaderNameStr());
-		reported.setZiXunHTBH(records.getWorkContractInfo().getContractNum());
-		reported.setWeiTuoDW(records.getWorkContractInfo().getClient().getName());
-		reported.setLianXiDH(records.getWorkContractInfo().getClient().getTelephone());
-		reported.setDangABH(records.getReportData().getNumber());
-
-		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
-		reported.setBaoGaoShuQianFaDate(formatter.format(records.getReportData().getReportDate()));
-		reported.setHeTongJia(records.getReportData().getContractFee());
-		reported.setSongShenJia(records.getReportData().getReviewFee());
-		reported.setShenDingJia(records.getReportData().getApprovalFee());
-		reported.setJingHeJianE(records.getReportData().getVerifyFee());
-		reported.setJingHeJianLv(records.getReportData().getVerifyRate());
-		reported.setPorjectStruct("11");
-		reported.setGCGM_Unit("7");
-		reported.setPorjectUse("17");
-		return reported;
-	}
 }

+ 12 - 8
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageController.java

@@ -973,12 +973,16 @@ public class RuralProjectMessageController extends BaseController {
      */
     @RequestMapping(value = "updateReported")
     public String updateReported(RuralProjectRecords projectRecords, Model model) {
-        RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
-        projectRecordsService.queryProjectDetail(records);
-        Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectRecords.getId());
-        ProjectReportData projectReportData = projectReportDataService.getOnRural(projectcontentinfo1.getInfoId());
-        records.setReportData(projectReportData);
-        RuralProjectRecordsReported reported = projectRecordsService.disposeData(records);
+        //查询上报信息表中是否含有数据,没有则进行获取基础数据
+        RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReported(projectRecords.getId());
+        if(reported == null){
+            RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(projectRecords.getId());
+            projectRecordsService.queryProjectDetail(records);
+            Projectcontentinfo projectcontentinfo1 = projectcontentinfoService.getByProjectId(projectRecords.getId());
+            ProjectReportData projectReportData = projectReportDataService.getOnRural(projectcontentinfo1.getInfoId());
+            records.setReportData(projectReportData);
+            reported = ruralProjectMessageService.disposeData(records);
+        }
         model.addAttribute("ruralProjectRecordsReported", reported);
         return "modules/ruralprojectrecords/ruralporjectmessage/reportedForm";
     }
@@ -1009,7 +1013,7 @@ public class RuralProjectMessageController extends BaseController {
     @RequestMapping(value = "saveReported")
     public String saveReported(RuralProjectRecordsReported reported,  RedirectAttributes redirectAttributes) {
         ruralProjectMessageService.saveReportedInfo(reported);
-
-        return "";
+        addMessage(redirectAttributes, "项目上报成功");
+        return "redirect:"+Global.getAdminPath()+"/ruralProject/ruralProjectMessage/?repage";
     }
 }

+ 3 - 0
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectMessageDao.xml

@@ -222,8 +222,11 @@
 		,prr.id as prrId
 		,prd.audit_pass_date as auditPassDate
 		,if(date_add(prd.audit_pass_date,interval #{endingCount} day) >now(),"0","1") as reportedType
+		,ifnull(rprr.report_status,0) as "reportStatus"
+		,ifnull(rprr.sync_status,0) as "syncStatus"
 		FROM rural_project_records a
 		LEFT JOIN sys_area area ON area.id = a.area_id
+		left join rural_project_records_reported rprr on rprr.id = a.id
 
         <if test="leaderNameStr !=null and leaderNameStr !=''">
             LEFT JOIN work_project_user w on a.id = w.project_id

+ 253 - 42
src/main/resources/mappings/modules/ruralprojectrecords/RuralProjectRecordsReported.xml

@@ -2,14 +2,77 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jeeplus.modules.ruralprojectrecords.dao.RuralProjectRecordsReportedDao">
 
-	<sql id="projectRecordsColumns">
+	<sql id="projectRecordsReportedColumns">
+		a.id,
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.ProjectName,
+		a.xmFZR,
+		(select name from sys_user user where user.id=a.xmFZR) AS "leaderNameStr",
+		a.WeiTuoDW,
+		a.LianXiDH,
+		a.TouZiXZ,
+		a.ProjectType,
+		a.HeTongLeiXing,
+		a.ZiXunHTBH,
+		a.DangABH,
+		DATE_FORMAT(a.BaoGaoShuQianFaDate, '%Y-%m-%d') as 'BaoGaoShuQianFaDate',
+		a.ZiXunShouRu,
+		a.zaoJiaShiZhengHao,
+		a.s1,
+		a.s2,
+		a.s3,
+		a.PorjectStruct,
+		a.FloorUp,
+		a.FloorDown,
+		a.GCGMValue as "GCGMValue",
+		a.GCGMUnit,
+		a.PorjectUse,
+		a.ZiXunBDE,
+		a.ZiXunBDETJ,
+		a.ZiXunBDEAZ,
+		a.CalTJPercent,
+		a.CalAZPercent,
+		a.CalZZJUnit,
+		a.CalZZJTJUnit,
+		a.CalZZJAZUnit,
+		a.HeTongJia,
+		a.SongShenJia,
+		a.ShenDingJia,
+		a.JingHeJianE,
+		a.JingHeJianLv,
+		a.GCYL,
+		a.SNYL,
+		a.YBTYL,
+		a.RGGRYL,
+		a.GCYLPerUnit,
+		a.SNYLPerUnit,
+		a.YBTYLPerUnit,
+		a.RGGRYLPerUnit,
+		a.TJProject,
+		a.ZSProject,
+		a.AZProject,
+		a.SZProject,
+		a.FGYLProject,
+		a.QTProjec
 	</sql>
 
 	
     
-	<!--<select id="get" resultType="RuralProjectRecordsReported" >
-
-	</select>-->
+	<select id="get" resultType="RuralProjectRecordsReported" >
+		SELECT
+		<include refid="projectRecordsReportedColumns"/>
+		,pra.name as "city"
+		,pra2.name as "county"
+		FROM rural_project_records_reported a
+		left join project_reported_area pra on a.s2 = pra.id
+		left join project_reported_area pra2 on a.s3 = pra2.id
+		WHERE a.id = #{id}
+	</select>
 
 	<insert id="insert">
 		insert into rural_project_records_reported (
@@ -28,6 +91,7 @@
 			ProjectType,
 			HeTongLeiXing,
 			ZiXunHTBH,
+			DangABH,
 			BaoGaoShuQianFaDate,
 			ZiXunShouRu,
 			zaoJiaShiZhengHao,
@@ -37,17 +101,17 @@
 			PorjectStruct,
 			FloorUp,
 			FloorDown,
-			GCGM_Value,
-			GCGM_Unit,
+			GCGMValue,
+			GCGMUnit,
 			PorjectUse,
 			ZiXunBDE,
-			ZiXunBDE_TJ,
-			ZiXunBDE_AZ,
-			Cal_TJ_Percent,
-			Cal_AZ_Percent,
-			Cal_ZZJ_Unit,
-			Cal_ZZJ_TJ_Unit,
-			Cal_ZZJ_AZ_Unit,
+			ZiXunBDETJ,
+			ZiXunBDEAZ,
+			CalTJPercent,
+			CalAZPercent,
+			CalZZJUnit,
+			CalZZJTJUnit,
+			CalZZJAZUnit,
 			HeTongJia,
 			SongShenJia,
 			ShenDingJia,
@@ -57,16 +121,18 @@
 			SNYL,
 			YBTYL,
 			RGGRYL,
-			GCYL_PerUnit,
-			SNYL_PerUnit,
-			YBTYL_PerUnit,
-			RGGRYL_PerUnit,
-			TJ_Project,
-			ZS_Project,
-			AZ_Project,
-			SZ_Project,
-			FGYL_Project,
-			QT_Projec
+			GCYLPerUnit,
+			SNYLPerUnit,
+			YBTYLPerUnit,
+			RGGRYLPerUnit,
+			TJProject,
+			ZSProject,
+			AZProject,
+			SZProject,
+			FGYLProject,
+			QTProjec,
+			report_status,
+			upload_time
 		)
 		values
 		  (
@@ -85,6 +151,7 @@
 			#{ProjectType},
 			#{HeTongLeiXing},
 			#{ZiXunHTBH},
+			#{DangABH},
 			#{BaoGaoShuQianFaDate},
 			#{ZiXunShouRu},
 			#{zaoJiaShiZhengHao},
@@ -94,17 +161,17 @@
 			#{PorjectStruct},
 			#{FloorUp},
 			#{FloorDown},
-			#{GCGM_Value},
-			#{GCGM_Unit},
+			#{GCGMValue},
+			#{GCGMUnit},
 			#{PorjectUse},
 			#{ZiXunBDE},
-			#{ZiXunBDE_TJ},
-			#{ZiXunBDE_AZ},
-			#{Cal_TJ_Percent},
-			#{Cal_AZ_Percent},
-			#{Cal_ZZJ_Unit},
-			#{Cal_ZZJ_TJ_Unit},
-			#{Cal_ZZJ_AZ_Unit},
+			#{ZiXunBDETJ},
+			#{ZiXunBDEAZ},
+			#{CalTJPercent},
+			#{CalAZPercent},
+			#{CalZZJUnit},
+			#{CalZZJTJUnit},
+			#{CalZZJAZUnit},
 			#{HeTongJia},
 			#{SongShenJia},
 			#{ShenDingJia},
@@ -114,18 +181,162 @@
 			#{SNYL},
 			#{YBTYL},
 			#{RGGRYL},
-			#{GCYL_PerUnit},
-			#{SNYL_PerUnit},
-			#{YBTYL_PerUnit},
-			#{RGGRYL_PerUnit},
-			#{TJ_Project},
-			#{ZS_Project},
-			#{AZ_Project},
-			#{SZ_Project},
-			#{FGYL_Project},
-			#{QT_Projec}
+			#{GCYLPerUnit},
+			#{SNYLPerUnit},
+			#{YBTYLPerUnit},
+			#{RGGRYLPerUnit},
+			#{TJProject},
+			#{ZSProject},
+			#{AZProject},
+			#{SZProject},
+			#{FGYLProject},
+			#{QTProjec},
+			1,
+			now()
 		  )
 	</insert>
 
+	<update id="update">
+		update
+		  rural_project_records_reported
+		set
+		  update_by = #{updateBy.id},
+		  update_date = #{updateDate},
+		  remarks = #{remarks},
+		  ProjectName = #{ProjectName},
+		  xmFZR = #{xmFZR},
+		  WeiTuoDW = #{WeiTuoDW},
+		  LianXiDH = #{LianXiDH},
+		  TouZiXZ = #{TouZiXZ},
+		  ProjectType = #{ProjectType},
+		  HeTongLeiXing = #{HeTongLeiXing},
+		  ZiXunHTBH = #{ZiXunHTBH},
+		  DangABH = #{DangABH},
+		  BaoGaoShuQianFaDate = #{BaoGaoShuQianFaDate},
+		  ZiXunShouRu = #{ZiXunShouRu},
+		  zaoJiaShiZhengHao = #{zaoJiaShiZhengHao},
+		  s1 = #{s1},
+		  s2 = #{s2},
+		  s3 = #{s3},
+		  PorjectStruct = #{PorjectStruct},
+		  FloorUp = #{FloorUp},
+		  FloorDown = #{FloorDown},
+		  GCGMValue = #{GCGMValue},
+		  GCGMUnit = #{GCGMUnit},
+		  PorjectUse = #{PorjectUse},
+		  ZiXunBDE = #{ZiXunBDE},
+		  ZiXunBDETJ = #{ZiXunBDETJ},
+		  ZiXunBDEAZ = #{ZiXunBDEAZ},
+		  CalTJPercent = #{CalTJPercent},
+		  CalAZPercent = #{CalAZPercent},
+		  CalZZJUnit = #{CalZZJUnit},
+		  CalZZJTJUnit = #{CalZZJTJUnit},
+		  CalZZJAZUnit = #{CalZZJAZUnit},
+		  HeTongJia = #{HeTongJia},
+		  SongShenJia = #{SongShenJia},
+		  ShenDingJia = #{ShenDingJia},
+		  JingHeJianE = #{JingHeJianE},
+		  JingHeJianLv = #{JingHeJianLv},
+		  GCYL = #{GCYL},
+		  SNYL = #{SNYL},
+		  YBTYL = #{YBTYL},
+		  RGGRYL = #{RGGRYL},
+		  GCYLPerUnit = #{GCYLPerUnit},
+		  SNYLPerUnit = #{SNYLPerUnit},
+		  YBTYLPerUnit = #{YBTYLPerUnit},
+		  RGGRYLPerUnit = #{RGGRYLPerUnit},
+		  TJProject = #{TJProject},
+		  ZSProject = #{ZSProject},
+		  AZProject = #{AZProject},
+		  SZProject = #{SZProject},
+		  FGYLProject = #{FGYLProject},
+		  QTProjec = #{QTProjec},
+		  upload_time = now()
+		where id = #{id}
+	</update>
+
+	<select id="consultantList" resultType="ReportedConsultant">
+		select
+		  a.id,
+		  a.create_by,
+		  a.create_date,
+		  a.update_by,
+		  a.update_date,
+		  a.remarks,
+		  a.del_flag,
+		  a.zixunyuan,
+		  (select name from sys_user user where user.id=a.zixunyuan) as "zixunyuanName",
+		  a.zhucezigezhID,
+		  a.wordnr,
+		  a.wcyysrbl,
+		  a.wcyysr,
+		  a.reportedId
+		from
+		  rural_reported_consultant a
+		where del_flag = 0
+		and reportedId = #{reportedId}
+	</select>
+	
+	<insert id="insertConsultant">
+		insert into rural_reported_consultant (
+		  id,
+		  create_by,
+		  create_date,
+		  update_by,
+		  update_date,
+		  remarks,
+		  del_flag,
+		  zixunyuan,
+		  zhucezigezhID,
+		  wordnr,
+		  wcyysrbl,
+		  wcyysr,
+		  reportedId
+		)
+		values
+		  (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{zixunyuan},
+			#{zhucezigezhID},
+			#{wordnr},
+			#{wcyysrbl},
+			#{wcyysr},
+			#{reportedId}
+		  ) ;
+	</insert>
+
+	<update id="updateConsultant">
+		update
+  		  rural_reported_consultant
+		set
+		  update_by = #{updateBy.id},
+		  update_date = #{updateDate}
+		<if test="zixunyuan !=null and zixunyuan !=''">
+			,zixunyuan = #{zixunyuan}
+		</if>
+		<if test="zhucezigezhID !=null and zhucezigezhID !=''">
+			,zhucezigezhID = #{zhucezigezhID}
+		</if>
+		<if test="wordnr !=null and wordnr !=''">
+			,wordnr = #{wordnr}
+		</if>
+		<if test="wcyysrbl !=null and wcyysrbl !=''">
+			,wcyysrbl = #{wcyysrbl}
+		</if>
+		<if test="wcyysr !=null and wcyysr !=''">
+			,wcyysr = #{wcyysr}
+		</if>
+		where id = #{id}
+	</update>
+
+	<delete id="deleteConsultant">
+		delete from rural_reported_consultant where id = #{id}
+	</delete>
 
 </mapper>

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

@@ -90,7 +90,7 @@
 						var id = '${id}';
 						var w=id.indexOf("_"); // v 的下标为 2
 						var str = id.substring(0,w+1);
-						$("#"+str+"zhucezigezh_ID").val(officeIds.join(","));
+						$("#"+str+"zhucezigezhID").val(officeIds.join(","));
 						console.log(officeIds)
 						$("#${id}Name").focus();
 						top.layer.close(index);

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

@@ -462,7 +462,7 @@ function getReportedState(id)
     {
         case "0":result.label = "tempstore";result.status="未上报";result.action = false;break;
         case "1":result.label = "tempstore";result.status="暂存";result.action = false;break;
-        case "2":result.label = "auditing";result.status="归档中";break;
+        case "2":result.label = "auditing";result.status="上报中";break;
         case "3":result.label = "cancel";result.status="撤回";break;
         case "4":result.label = "reject";result.status="驳回";break;
         case "5":result.label = "signed";result.status="已上报";result.action = false;break;

+ 199 - 111
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/reportedForm.jsp

@@ -51,6 +51,22 @@
                         return false;
                     }
                 }
+                var list = [];
+                var size = $("#reportedConsultantList tr").length;
+                if(size>0){
+                    for (var i = 1;i<=size;i++){
+                        var zixunyuan = $("#reportedConsultantList"+i+"_zixunyuan").val();
+                        list.push(zixunyuan);
+                    }
+                    var nary = list.sort();
+                    for(var i = 0; i < nary.length - 1; i++) {
+                        if(nary[i] == nary[i + 1]) {
+                            parent.layer.msg("咨询员重复,请重新选择!", {icon: 5});
+                            return false;
+                        }
+                    }
+                }
+
                 var team = $("#team").val()
                 var city = $("#city").val()
                 var county = $("#county").val()
@@ -92,18 +108,42 @@
                 }
             });
 
-            $("#FloorUp").val(0);
-            $("#FloorDown").val(0);
-            $("#ZiXunBDE_TJ").val(0.00);
-            $("#ZiXunBDE_AZ").val(0.00);
-            $("#GCYL").val(0.00);
-            $("#SNYL").val(0.00);
-            $("#YBTYL").val(0.00);
-            $("#RGGRYL").val(0.00);
-            $("#GCYL_PerUnit").val(0.00);
-            $("#SNYL_PerUnit").val(0.00);
-            $("#YBTYL_PerUnit").val(0.00);
-            $("#RGGRYL_PerUnit").val(0.00);
+            if($("#FloorUp").val() == undefined || $("#FloorUp").val() == null || $("#FloorUp").val() == ''){
+                $("#FloorUp").val(0);
+            }
+            if($("#FloorDown").val() == undefined || $("#FloorDown").val() == null || $("#FloorDown").val() == ''){
+                $("#FloorDown").val(0);
+            }
+            if($("#ZiXunBDETJ").val() == undefined || $("#ZiXunBDETJ").val() == null || $("#ZiXunBDETJ").val() == ''){
+                $("#ZiXunBDETJ").val(0);
+            }
+            if($("#ZiXunBDEAZ").val() == undefined || $("#ZiXunBDEAZ").val() == null || $("#ZiXunBDEAZ").val() == ''){
+                $("#ZiXunBDEAZ").val(0);
+            }
+            if($("#GCYL").val() == undefined || $("#GCYL").val() == null || $("#GCYL").val() == ''){
+                $("#GCYL").val(0);
+            }
+            if($("#SNYL").val() == undefined || $("#SNYL").val() == null || $("#SNYL").val() == ''){
+                $("#SNYL").val(0);
+            }
+            if($("#YBTYL").val() == undefined || $("#YBTYL").val() == null || $("#YBTYL").val() == ''){
+                $("#YBTYL").val(0);
+            }
+            if($("#RGGRYL").val() == undefined || $("#RGGRYL").val() == null || $("#RGGRYL").val() == ''){
+                $("#RGGRYL").val(0);
+            }
+            if($("#GCYLPerUnit").val() == undefined || $("#GCYLPerUnit").val() == null || $("#GCYLPerUnit").val() == ''){
+                $("#GCYLPerUnit").val(0);
+            }
+            if($("#SNYLPerUnit").val() == undefined || $("#SNYLPerUnit").val() == null || $("#SNYLPerUnit").val() == ''){
+                $("#SNYLPerUnit").val(0);
+            }
+            if($("#YBTYLPerUnit").val() == undefined || $("#YBTYLPerUnit").val() == null || $("#YBTYLPerUnit").val() == ''){
+                $("#YBTYLPerUnit").val(0);
+            }
+            if($("#RGGRYLPerUnit").val() == undefined || $("#RGGRYLPerUnit").val() == null || $("#RGGRYLPerUnit").val() == ''){
+                $("#RGGRYLPerUnit").val(0);
+            }
 
             laydate.render({
                 elem: '#BaoGaoShuQianFaDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
@@ -112,17 +152,23 @@
                 , trigger: 'click'
                 ,max: 38 //38天后
             });
+
+
+            $('#city').html('<option value="${ruralProjectRecordsReported.s2}">${ruralProjectRecordsReported.city}</option>')
+            $('#county').html('<option value="${ruralProjectRecordsReported.s3}">${ruralProjectRecordsReported.county}</option>')
+            layui.form.render("select");
+
         });
 
         function ZiXunBDEChange(){
             //咨询标的额
             var ZiXunBDE = $("#ZiXunBDE").val();
             //建筑面积或规模
-            var GCGM_Value = $("#GCGM_Value").val();
+            var GCGMValue = $("#GCGMValue").val();
             //土建造价
-            var ZiXunBDE_TJ = $("#ZiXunBDE_TJ").val();
+            var ZiXunBDETJ = $("#ZiXunBDETJ").val();
             //安装造价
-            var ZiXunBDE_AZ = $("#ZiXunBDE_AZ").val();
+            var ZiXunBDEAZ = $("#ZiXunBDEAZ").val();
             //钢材用量
             var GCYL = $("#GCYL").val();
             //水泥用量
@@ -135,144 +181,144 @@
             //判断咨询标的额的值
             if(ZiXunBDE != ''){
                 //判断土建造价的值
-                if(ZiXunBDE_TJ != ''){
-                    var Cal_TJ_Percent = (Math.round(parseInt(ZiXunBDE_TJ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
-                    $("#Cal_TJ_Percent").val(Cal_TJ_Percent);
+                if(ZiXunBDETJ != ''){
+                    var CalTJPercent = (Math.round(parseInt(ZiXunBDETJ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
+                    $("#CalTJPercent").val(CalTJPercent);
                 }else{
-                    $("#Cal_TJ_Percent").val('');
+                    $("#CalTJPercent").val('');
                 }
                 //判断土建造价的值
-                if(ZiXunBDE_AZ != ''){
-                    var Cal_AZ_Percent = (Math.round(parseInt(ZiXunBDE_AZ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
-                    $("#Cal_AZ_Percent").val(Cal_AZ_Percent);
+                if(ZiXunBDEAZ != ''){
+                    var CalAZPercent = (Math.round(parseInt(ZiXunBDEAZ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
+                    $("#CalAZPercent").val(CalAZPercent);
                 }else{
-                    $("#Cal_AZ_Percent").val('');
+                    $("#CalAZPercent").val('');
                 }
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var Cal_ZZJ_Unit = (Math.round(parseInt(ZiXunBDE) / parseInt(GCGM_Value) * 100) * 100).toFixed(2);
-                    $("#Cal_ZZJ_Unit").val(Cal_ZZJ_Unit);
+                if(GCGMValue != ''){
+                    var CalZZJUnit = (Math.round(parseInt(ZiXunBDE) / parseInt(GCGMValue) * 100) * 100).toFixed(2);
+                    $("#CalZZJUnit").val(CalZZJUnit);
                 }else{
-                    $("#Cal_ZZJ_Unit").val('');
+                    $("#CalZZJUnit").val('');
                 }
             }
             //判断建筑面积或规模
-            if(GCGM_Value != ''){
+            if(GCGMValue != ''){
                 //判断土建造价
-                if(ZiXunBDE_TJ != ''){
-                    var Cal_ZZJ_TJ_Unit = (Math.round(parseInt(ZiXunBDE_TJ) / parseInt(GCGM_Value) * 100) * 100).toFixed(2);
-                    $("#Cal_ZZJ_TJ_Unit").val(Cal_ZZJ_TJ_Unit);
+                if(ZiXunBDETJ != ''){
+                    var CalZZJTJUnit = (Math.round(parseInt(ZiXunBDETJ) / parseInt(GCGMValue) * 100) * 100).toFixed(2);
+                    $("#CalZZJTJUnit").val(CalZZJTJUnit);
                 }else{
-                    $("#Cal_ZZJ_TJ_Unit").val('');
+                    $("#CalZZJTJUnit").val('');
                 }
                 //判断安装造价
-                if(ZiXunBDE_AZ != ''){
-                    var Cal_ZZJ_AZ_Unit = (Math.round(parseInt(ZiXunBDE_AZ) / parseInt(GCGM_Value) * 100) * 100).toFixed(2);
-                    $("#Cal_ZZJ_AZ_Unit").val(Cal_ZZJ_AZ_Unit);
+                if(ZiXunBDEAZ != ''){
+                    var CalZZJAZUnit = (Math.round(parseInt(ZiXunBDEAZ) / parseInt(GCGMValue) * 100) * 100).toFixed(2);
+                    $("#CalZZJAZUnit").val(CalZZJAZUnit);
                 }else{
-                    $("#Cal_ZZJ_AZ_Unit").val('');
+                    $("#CalZZJAZUnit").val('');
                 }
                 //判断钢材用量
                 if(GCYL != ''){
-                    var GCYL_PerUnit = (Math.round(parseInt(GCYL) / parseInt(GCGM_Value) * 100) * 10).toFixed(2);
-                    $("#GCYL_PerUnit").val(GCYL_PerUnit);
+                    var GCYLPerUnit = (Math.round(parseInt(GCYL) / parseInt(GCGMValue) * 100) * 10).toFixed(2);
+                    $("#GCYLPerUnit").val(GCYLPerUnit);
                 }else{
-                    $("#GCYL_PerUnit").val('');
+                    $("#GCYLPerUnit").val('');
                 }
                 //判断水泥用量
                 if(SNYL != ''){
-                    var SNYL_PerUnit = (Math.round(parseInt(SNYL) / parseInt(GCGM_Value) * 100) * 10).toFixed(2);
-                    $("#SNYL_PerUnit").val(SNYL_PerUnit);
+                    var SNYLPerUnit = (Math.round(parseInt(SNYL) / parseInt(GCGMValue) * 100) * 10).toFixed(2);
+                    $("#SNYLPerUnit").val(SNYLPerUnit);
                 }else{
-                    $("#SNYL_PerUnit").val('');
+                    $("#SNYLPerUnit").val('');
                 }
                 //判断预拌砼用量
                 if(YBTYL != ''){
-                    var YBTYL_PerUnit = Math.round(parseInt(YBTYL) / parseInt(GCGM_Value)).toFixed(2);
-                    $("#YBTYL_PerUnit").val(YBTYL_PerUnit);
+                    var YBTYLPerUnit = Math.round(parseInt(YBTYL) / parseInt(GCGMValue)).toFixed(2);
+                    $("#YBTYLPerUnit").val(YBTYLPerUnit);
                 }else{
-                    $("#YBTYL_PerUnit").val('');
+                    $("#YBTYLPerUnit").val('');
                 }
                 //判断人工工日用量
                 if(RGGRYL != ''){
-                    var RGGRYL_PerUnit = Math.round(parseInt(RGGRYL) / parseInt(GCGM_Value)).toFixed(2);
-                    $("#RGGRYL_PerUnit").val(RGGRYL_PerUnit);
+                    var RGGRYLPerUnit = Math.round(parseInt(RGGRYL) / parseInt(GCGMValue)).toFixed(2);
+                    $("#RGGRYLPerUnit").val(RGGRYLPerUnit);
                 }else{
-                    $("#RGGRYL_PerUnit").val('');
+                    $("#RGGRYLPerUnit").val('');
                 }
             }
             //判断土建造价
-            if(ZiXunBDE_TJ !=''){
+            if(ZiXunBDETJ !=''){
                 //判断咨询标的额
                 if(ZiXunBDE != ''){
-                    var Cal_TJ_Percent = (Math.round(parseInt(ZiXunBDE_TJ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
-                    $("#Cal_TJ_Percent").val(Cal_TJ_Percent);
+                    var CalTJPercent = (Math.round(parseInt(ZiXunBDETJ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
+                    $("#CalTJPercent").val(CalTJPercent);
                 }else{
-                    $("#Cal_TJ_Percent").val('');
+                    $("#CalTJPercent").val('');
                 }
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var Cal_ZZJ_TJ_Unit = (Math.round(parseInt(ZiXunBDE_TJ) / parseInt(GCGM_Value) * 100) * 100).toFixed(2);
-                    $("#Cal_ZZJ_TJ_Unit").val(Cal_ZZJ_TJ_Unit);
+                if(GCGMValue != ''){
+                    var CalZZJTJUnit = (Math.round(parseInt(ZiXunBDETJ) / parseInt(GCGMValue) * 100) * 100).toFixed(2);
+                    $("#CalZZJTJUnit").val(CalZZJTJUnit);
                 }else{
-                    $("#Cal_ZZJ_TJ_Unit").val('');
+                    $("#CalZZJTJUnit").val('');
                 }
             }
             //判断安装造价
-            if(ZiXunBDE_AZ !=''){
+            if(ZiXunBDEAZ !=''){
                 //判断咨询标的额
                 if(ZiXunBDE != ''){
-                    var Cal_AZ_Percent = (Math.round(parseInt(ZiXunBDE_AZ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
-                    $("#Cal_AZ_Percent").val(Cal_AZ_Percent);
+                    var CalAZPercent = (Math.round(parseInt(ZiXunBDEAZ) / parseInt(ZiXunBDE) * 100) / 100 * 100).toFixed(2);
+                    $("#CalAZPercent").val(CalAZPercent);
                 }else{
-                    $("#Cal_AZ_Percent").val('');
+                    $("#CalAZPercent").val('');
                 }
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var Cal_ZZJ_AZ_Unit = (Math.round(parseInt(ZiXunBDE_AZ) / parseInt(GCGM_Value) * 100) * 100).toFixed(2);
-                    $("#Cal_ZZJ_AZ_Unit").val(Cal_ZZJ_AZ_Unit);
+                if(GCGMValue != ''){
+                    var CalZZJAZUnit = (Math.round(parseInt(ZiXunBDEAZ) / parseInt(GCGMValue) * 100) * 100).toFixed(2);
+                    $("#CalZZJAZUnit").val(CalZZJAZUnit);
                 }else{
-                    $("#Cal_ZZJ_AZ_Unit").val('');
+                    $("#CalZZJAZUnit").val('');
                 }
             }
             //判断钢材用量
             if(GCYL !=''){
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var GCYL_PerUnit = (Math.round(parseInt(GCYL) / parseInt(GCGM_Value) * 100) * 10).toFixed(2);
-                    $("#GCYL_PerUnit").val(GCYL_PerUnit);
+                if(GCGMValue != ''){
+                    var GCYLPerUnit = (Math.round(parseInt(GCYL) / parseInt(GCGMValue) * 100) * 10).toFixed(2);
+                    $("#GCYLPerUnit").val(GCYLPerUnit);
                 }else{
-                    $("#GCYL_PerUnit").val('');
+                    $("#GCYLPerUnit").val('');
                 }
             }
             //判断水泥用量
             if(SNYL !=''){
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var SNYL_PerUnit = (Math.round(parseInt(SNYL) / parseInt(GCGM_Value) * 100) * 10).toFixed(2);
-                    $("#SNYL_PerUnit").val(SNYL_PerUnit);
+                if(GCGMValue != ''){
+                    var SNYLPerUnit = (Math.round(parseInt(SNYL) / parseInt(GCGMValue) * 100) * 10).toFixed(2);
+                    $("#SNYLPerUnit").val(SNYLPerUnit);
                 }else{
-                    $("#SNYL_PerUnit").val('');
+                    $("#SNYLPerUnit").val('');
                 }
             }
             //判断预拌砼用量
             if(YBTYL !=''){
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var YBTYL_PerUnit = (Math.round(parseInt(YBTYL) / parseInt(GCGM_Value) * 100) * 10).toFixed(2);
-                    $("#YBTYL_PerUnit").val(YBTYL_PerUnit);
+                if(GCGMValue != ''){
+                    var YBTYLPerUnit = (Math.round(parseInt(YBTYL) / parseInt(GCGMValue) * 100) * 10).toFixed(2);
+                    $("#YBTYLPerUnit").val(YBTYLPerUnit);
                 }else{
-                    $("#YBTYL_PerUnit").val('');
+                    $("#YBTYLPerUnit").val('');
                 }
             }
             //判断人工工日用量
             if(RGGRYL !=''){
                 //判断建筑面积或规模
-                if(GCGM_Value != ''){
-                    var RGGRYL_PerUnit = Math.round(parseInt(RGGRYL) / parseInt(GCGM_Value)).toFixed(2);
-                    $("#RGGRYL_PerUnit").val(RGGRYL_PerUnit);
+                if(GCGMValue != ''){
+                    var RGGRYLPerUnit = Math.round(parseInt(RGGRYL) / parseInt(GCGMValue)).toFixed(2);
+                    $("#RGGRYLPerUnit").val(RGGRYLPerUnit);
                 }else{
-                    $("#RGGRYL_PerUnit").val('');
+                    $("#RGGRYLPerUnit").val('');
                 }
             }
         }
@@ -727,6 +773,47 @@
                 $("#buildingPercent").val("");
             }
         }
+
+
+        function setTaxMoney(obj){
+            var a = $(obj).attr("id");
+            //咨询营业收入
+            var mv = $("#ZiXunShouRu").val();
+            var m = parseFloat(mv)* 10000;
+
+            var t2 = $("#" +  a ).val();
+
+            //完成营业收入
+            var t = a.replace('wcyysrbl','wcyysr');
+            if(!/^\d+(\.\d{1,4})?$/.test( t2 )){
+                $("#" +  t ).val("");
+                parent.layer.msg("请填写正确完成营业收入比例",{icon:5});
+                return;
+            }else {
+                var wcyysr = m * t2 /100;
+                $("#" +  t ).val(parseFloat(wcyysr.toFixed(2)));
+            }
+        }
+
+        function zxChange() {
+            //咨询营业收入
+            var mv = $("#ZiXunShouRu").val();
+            if(!/^\d+(\.\d{1,4})?$/.test( mv )){
+                $("#" +  t ).val("");
+                parent.layer.msg("请填写正确的咨询营业收入",{icon:5});
+                return;
+            }
+            var m = parseFloat(mv)* 10000;
+            var size = $("#reportedConsultantList tr").length;
+            for (var i = 1;i<=size;i++){
+                var wcyysrbl = $("#reportedConsultantList"+i+"_wcyysrbl").val();
+
+                if(wcyysrbl!=''){
+                    var wcyysr = m * wcyysrbl /100;
+                    $("#reportedConsultantList"+i+"_wcyysr").val(wcyysr);
+                }
+            }
+        }
     </script>
 </head>
 <body>
@@ -734,6 +821,7 @@
     <div class="container">
         <sys:message content="${message}"/>
         <form:form id="inputForm" modelAttribute="ruralProjectRecordsReported" enctype="multipart/form-data" action="${ctx}/ruralProject/ruralProjectMessage/saveReported" method="post" class="form-horizontal layui-form">
+            <form:hidden path="id"/>
             <form:hidden path="projectId"/>
             <form:hidden path="workContractInfo.client.id" id="contractClientId" value="${workContractInfo.client.id}"/>
             <input type="hidden" id="flagFile" value="">
@@ -749,7 +837,7 @@
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>咨询项目负责人:</label>
                     <div class="layui-input-block  with-icon">
-                        <sys:treeselect id="master" name="projectLeaders" value="${ruralProjectRecordsReported.xmFZR}" labelName="leaderNameStr" labelValue="${ruralProjectRecordsReported.leaderNameStr}"
+                        <sys:treeselect id="master" name="xmFZR" value="${ruralProjectRecordsReported.xmFZR}" labelName="leaderNameStr" labelValue="${ruralProjectRecordsReported.leaderNameStr}"
                                         title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                     </div>
                 </div>
@@ -810,7 +898,7 @@
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>咨询营业收入(万元):</label>
                     <div class="layui-input-block">
-                        <form:input path="ZiXunShouRu" htmlEscape="false"  class="form-control required layui-input"/>
+                        <form:input path="ZiXunShouRu" htmlEscape="false" onchange="zxChange()" class="form-control required layui-input"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
@@ -858,19 +946,19 @@
                                         <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>
-                                        <sys:reportedtreeselectUser id="reportedConsultantList{{idx}}_zixunyuan" name="reportedConsultantList[{{idx}}].zixunyuan" value="${ruralPprojectRecords.leaderIds}" labelName="workAccountList[{{idx}}].zixunyuan" labelValue="{{row.zixunyuan}}"
+                                        <sys:reportedtreeselectUser id="reportedConsultantList{{idx}}_zixunyuan" name="reportedConsultantList[{{idx}}].zixunyuan" value="{{row.zixunyuan}}" labelName="workAccountList[{{idx}}].zixunyuan" labelValue="{{row.zixunyuanName}}"
                                             title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
                                     </td>
 
                                     <td>
-                                        <input id="reportedConsultantList{{idx}}_zhucezigezh_ID" readonly="true" name="reportedConsultantList[{{idx}}].zhucezigezh_ID" value="{{row.zhucezigezh_ID}}" class="form-control required"/>
+                                        <input id="reportedConsultantList{{idx}}_zhucezigezhID" readonly="true" name="reportedConsultantList[{{idx}}].zhucezigezhID" value="{{row.zhucezigezhID}}" class="form-control required"/>
                                     </td>
                                     <td>
-                                        <input id="reportedConsultantList{{idx}}_Wordnr"  name="reportedConsultantList[{{idx}}].Wordnr" value="{{row.Wordnr}}" class="form-control required"/>
+                                        <input id="reportedConsultantList{{idx}}_wordnr"  name="reportedConsultantList[{{idx}}].wordnr" value="{{row.wordnr}}" class="form-control required"/>
                                     </td>
 
                                     <td>
-                                        <input id="reportedConsultantList{{idx}}_wcyysrbl"  name="reportedConsultantList[{{idx}}].wcyysrbl" value="{{row.wcyysrbl}}" class="form-control number required"/>
+                                        <input id="reportedConsultantList{{idx}}_wcyysrbl" onblur="setTaxMoney(this)" name="reportedConsultantList[{{idx}}].wcyysrbl" value="{{row.wcyysrbl}}" class="form-control number required"/>
                                     </td>
 
                                     <td>
@@ -893,21 +981,21 @@
                     <div class="layui-input-block with-icon">
                         <select name="s1" id="team" lay-verify="required" lay-filter="cityfilter">
                             <option value=""></option>
-                            <option value="1" <c:if test="${team=='1'}">selected</c:if>>江苏省</option>
-                            <option value="2" <c:if test="${team=='2'}">selected</c:if>>外省</option>
+                            <option value="1" <c:if test="${ruralProjectRecordsReported.s1=='1'}">selected</c:if>>江苏省</option>
+                            <option value="2" <c:if test="${ruralProjectRecordsReported.s1=='2'}">selected</c:if>>外省</option>
                         </select>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>工程所在地级市</label>
                     <div class="layui-input-block">
-                        <select id="city" name="s2" lay-verify="required" lay-filter="quyufilter"></select>
+                        <select id="city" name="s2" value="${city}" lay-verify="required" lay-filter="quyufilter"></select>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>工程所在区县</label>
                     <div class="layui-input-block">
-                        <select id="county" name="s3" lay-verify="required" lay-filter="countyfilter"></select>
+                        <select id="county" name="s3" value="${county}" lay-verify="required" lay-filter="countyfilter"></select>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
@@ -933,13 +1021,13 @@
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line"><span class="require-item">*</span>建筑面积或规模:</label>
                     <div class="layui-input-block">
-                        <form:input path="GCGM_Value" htmlEscape="false"  class="form-control layui-input required number" onchange="ZiXunBDEChange()"/>
+                        <form:input path="GCGMValue" htmlEscape="false"  class="form-control layui-input required number" onchange="ZiXunBDEChange()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label"><span class="require-item">*</span>计量单位:</label>
                     <div class="layui-input-block">
-                        <form:select path="GCGM_Unit" class="form-control layui-input required simple-select">
+                        <form:select path="GCGMUnit" class="form-control layui-input required simple-select">
                             <form:options items="${fns:getMainDictList('GCGM_Unit')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                         </form:select>
                     </div>
@@ -961,43 +1049,43 @@
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">其中土建造价(万元):</label>
                     <div class="layui-input-block">
-                        <form:input path="ZiXunBDE_TJ" htmlEscape="false" class="form-control layui-input" onchange="ZiXunBDEChange()"/>
+                        <form:input path="ZiXunBDETJ" htmlEscape="false" class="form-control layui-input" onchange="ZiXunBDEChange()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">其中安装造价(万元):</label>
                     <div class="layui-input-block">
-                        <form:input path="ZiXunBDE_AZ" htmlEscape="false" class="form-control layui-input" onchange="ZiXunBDEChange()"/>
+                        <form:input path="ZiXunBDEAZ" htmlEscape="false" class="form-control layui-input" onchange="ZiXunBDEChange()"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">其中土建百分比(%):</label>
                     <div class="layui-input-block">
-                        <form:input path="Cal_TJ_Percent" htmlEscape="false" class="form-control layui-input" readonly="true"/>
+                        <form:input path="CalTJPercent" htmlEscape="false" class="form-control layui-input" readonly="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">其中安装百分比(%):</label>
                     <div class="layui-input-block">
-                        <form:input path="Cal_AZ_Percent" htmlEscape="false" class="form-control layui-input" readonly="true"/>
+                        <form:input path="CalAZPercent" htmlEscape="false" class="form-control layui-input" readonly="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">单位造价(元):</label>
                     <div class="layui-input-block">
-                        <form:input path="Cal_ZZJ_Unit" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                        <form:input path="CalZZJUnit" htmlEscape="false" readonly="true" class="form-control layui-input"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">其中土建单位造价(元):</label>
                     <div class="layui-input-block">
-                        <form:input path="Cal_ZZJ_TJ_Unit" htmlEscape="false" readonly="true" class="form-control layui-input"/>
+                        <form:input path="CalZZJTJUnit" htmlEscape="false" readonly="true" class="form-control layui-input"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">其中装修单位造价(元):</label>
                     <div class="layui-input-block">
-                        <form:input path="Cal_ZZJ_AZ_Unit" htmlEscape="false" class="form-control layui-input" readonly="true"/>
+                        <form:input path="CalZZJAZUnit" htmlEscape="false" class="form-control layui-input" readonly="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
@@ -1061,25 +1149,25 @@
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">钢材消耗指标(kg):</label>
                     <div class="layui-input-block">
-                        <form:input path="GCYL_PerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
+                        <form:input path="GCYLPerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">水泥消耗指标(kg):</label>
                     <div class="layui-input-block">
-                        <form:input path="SNYL_PerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
+                        <form:input path="SNYLPerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">预拌砼消耗指标(m³):</label>
                     <div class="layui-input-block">
-                        <form:input path="YBTYL_PerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
+                        <form:input path="YBTYLPerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw6">
                     <label class="layui-form-label double-line">人工工日消耗指标(工日):</label>
                     <div class="layui-input-block">
-                        <form:input path="RGGRYL_PerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
+                        <form:input path="RGGRYLPerUnit" htmlEscape="false" class="form-control layui-input number" readonly="true"/>
                     </div>
                 </div>
             </div>
@@ -1090,37 +1178,37 @@
                 <div class="layui-item layui-col-sm12 lw6">
                     <label class="layui-form-label">土建工程:</label>
                     <div class="layui-input-block paddingDiv">
-                        <form:checkboxes path="TJ_ProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('civil_project')}" />
+                        <form:checkboxes path="TJProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('civil_project')}" />
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm12 lw6">
                     <label class="layui-form-label">装饰工程:</label>
                     <div class="layui-input-block paddingDiv">
-                        <form:checkboxes path="ZS_ProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('decorate_project')}" />
+                        <form:checkboxes path="ZSProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('decorate_project')}" />
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm12 lw6">
                     <label class="layui-form-label">安装工程:</label>
                     <div class="layui-input-block paddingDiv">
-                        <form:checkboxes path="AZ_ProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('install_project')}" />
+                        <form:checkboxes path="AZProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('install_project')}" />
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm12 lw6">
                     <label class="layui-form-label">市政工程:</label>
                     <div class="layui-input-block paddingDiv">
-                        <form:checkboxes path="SZ_ProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('services_project')}" />
+                        <form:checkboxes path="SZProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('services_project')}" />
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm12 lw6">
                     <label class="layui-form-label">仿古园林工程:</label>
                     <div class="layui-input-block paddingDiv">
-                        <form:checkboxes path="FGYL_ProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('park_project')}" />
+                        <form:checkboxes path="FGYLProjectList" lay-skin="primary" itemLabel="label" itemValue="value" htmlEscape="false" items="${fns:getMainDictList('park_project')}" />
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm12 lw6 with-textarea">
                     <label class="layui-form-label double-line">其他专业工程咨询项目造价包含内容说明:</label>
                     <div class="layui-input-block">
-                        <form:textarea path="QT_Projec" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
+                        <form:textarea path="QTProjec" htmlEscape="false" rows="4"  maxlength="255"  class="form-control "/>
                     </div>
                 </div>
             </div>
@@ -1194,11 +1282,11 @@
     var workClientBankRowIdx = 0,
         workClientBankTpl = $("#workClientBankTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g, "");
     $(document).ready(function () {
-        /*var dataBank = ${fns:toJson(ruralPprojectRecords.reportedConsultantList)};
+        var dataBank = ${fns:toJson(ruralProjectRecordsReported.reportedConsultantList)};
         for (var i = 0; i < dataBank.length; i++) {
             addRow('#reportedConsultantList', workClientBankRowIdx, workClientBankTpl, dataBank[i]);
             workClientBankRowIdx = workClientBankRowIdx + 1;
-        }*/
+        }
     });
 
 </script>

+ 12 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralporjectmessage/ruralProjectMessageList.jsp

@@ -393,9 +393,16 @@
                         }
 						/*上报相关按钮*/
 						if(d.projectReportRecordStatus == 5 || d.projectReportStatus == 5){
-							if(d.reportedState == 0 || d.reportedState == 6){
-								xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" +  d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #5FB878' class=\"op-btn op-btn-delete\" ><i class=\"fa fa-plus\"></i> 上报</a>";
-								/*xml+="<a href=\"${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" + d.id + "\" style='background-color: #5FB878' onclick=\"return confirmx('确认要上报吗?', this.href)\" class=\"op-btn op-btn-delete\" ><i class=\"fa fa-plus\"></i> 上报</a>";*/
+							if(d.syncStatus == 0){
+								if(d.reportStatus == 0){
+									if(d.reportedState == 0 || d.reportedState == 6){
+										xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" +  d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #5FB878' class=\"op-btn op-btn-delete\" ><i class=\"fa fa-plus\"></i> 上报</a>";
+									}
+								}else{
+									if(d.reportedState == 2){
+									xml+="<a href=\"#\" onclick=\"openDialogre('上报管理', '${ctx}/ruralProject/ruralProjectMessage/updateReported?id=" +  d.id + " ','95%', '95%','','上报,关闭')\" style='background-color: #1E9FFF' class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改上报</a>";
+									}
+								}
 							}
 						}
 						if(d.deleteAdmin != undefined && d.deleteAdmin =="1")
@@ -431,6 +438,8 @@
                     ,"projectReportName":"${projectRecords.projectReportName}"
                     ,"reportedState":"${projectRecords.reportedState}"
                     ,"reportedType":"${projectRecords.reportedType}"
+                    ,"reportStatus":"${projectRecords.reportStatus}"
+                    ,"syncStatus":"${projectRecords.syncStatus}"
                     ,"view":"${projectRecords.view}"
                     <c:choose>
                         <c:when test="${fns:getUser().id == projectRecords.leaderIds || fns:getUser().id eq projectRecords.createBy.id}">