Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

user5 4 gadi atpakaļ
vecāks
revīzija
38c5e96a28

+ 37 - 5
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralCostProjectMessageController.java

@@ -547,6 +547,42 @@ public class RuralCostProjectMessageController extends BaseController {
                 consultants.add(bzshbConsultant);
             }
         }
+
+        //查询上报信息表中是否含有数据,没有则进行获取基础数据
+        RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReported(projectRecords.getId());
+        if(reported == null){
+            model.addAttribute("reportedFalg", false);
+
+        }else{
+            //根据上报id查询上报咨询员的信息
+            List<RuralReportConsultant> reportedConsultants=ruralProjectMessageService.getReportedConsultantsList(reported.getId());
+            //查询报告咨询员的信息
+            List<RuralReportConsultant> reportConsultants=ruralProjectMessageService.getConsultantsList(projectRecords.getId());
+            List<RuralReportConsultant> consultantLista = Lists.newArrayList();
+            if(reportedConsultants.size() == 0){
+                //如果上报的咨询员信息为空 则处理报告咨询员信息
+                consultantLista = ruralProjectMessageService.disposeConsultant(reportConsultants, projectRecords);
+            }else{
+                //对上报的咨询员进行处理
+                consultantLista = ruralProjectMessageService.disposereportedConsultant(reportedConsultants);
+            }
+            RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(reported.getProjectId());
+            if(StringUtils.isBlank(reported.getProjectRecordId())){
+                reported.setProjectRecordId(records.getProjectId());
+            }
+            model.addAttribute("ruralProjectRecordsReported", reported);
+            projectcontent.setRecordsReported(reported);
+            //查询项目信息
+            model.addAttribute("ruralProjectRecords", records);
+            model.addAttribute("consultantInfo1", consultantLista);
+            if(StringUtils.isBlank(reported.getS1())){
+                reported.setS1("10");
+            }
+            //获取工程类型
+            ProjectEngineeringInfo engineeringInfos=engineeringService.getProjectReportedType(reported.getPorjectUse());
+            model.addAttribute("engineeringInfo", engineeringInfos);
+        }
+
         //查询总审人员信息
         List<User> auditUserList = userService.getAuditUserList();
         ruralProjectRecords.setBzshbUserList(auditUserList);
@@ -559,11 +595,7 @@ public class RuralCostProjectMessageController extends BaseController {
         model.addAttribute("id", projectcontentinfo.getId());
         model.addAttribute("projectcontentinfo", projectcontent);
         model.addAttribute("consultantinfo", consultants);
-        //获取是否含有上报信息
-        RuralProjectRecordsReported reported = ruralProjectMessageService.getRuralProjectRecordsReportedById(projectcontentinfo.getReportedId());
-        if(null != reported){
-            model.addAttribute("reportedView", 1);
-        }
+
         List<MainDictDetail> achievementTypes = DictUtils.getMainDictList("achievement_type");
         if(null != achievementTypes){
             for (MainDictDetail achievementType:achievementTypes) {

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1551 - 42
src/main/webapp/webpage/modules/ruralprojectrecords/cost/projectcontentinfo/adminReportEditForm.jsp


+ 8 - 4
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsAdminModify.jsp

@@ -31,7 +31,11 @@
             if(validateForm.form()){
                 var startDate = new Date($("#startDate").val());
                 var endingDate = new Date($("#endingDate").val());
-
+                var projectProperties=$("#projectProperties").val();
+                if(projectProperties==''){
+                    parent.layer.msg("投资性质未选择!", {icon: 5});
+                    return false;
+                }
                 if(startDate.getTime() > endingDate.getTime()){
                     parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                     return false;
@@ -754,8 +758,8 @@
                     <label class="layui-form-label"><span class="require-item">*</span>项目所在地:</label>
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectProject id="area" name="area.id" value="${projectRecords.area.id}" labelName="area.name" labelValue="${projectRecords.area.name}"
-                                               cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input judgment" allowClear="true" notAllowSelectParent="true"/>
-                        <span id="areaShow" style="color: #999"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
+                                               cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input required" allowClear="true" notAllowSelectParent="true"/>
+                        <span id="areaShow" style="color: red"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
 
                     </div>
                 </div>
@@ -822,7 +826,7 @@
                     <div class="layui-input-block">
                         <button type="button" class="layui-btn layui-btn-primary" style="width: 100%;text-align: left" id="demo100">
                             <span>${engineeringInfo.engineeringName}</span>
-                            <input type="hidden" name="engineeringType" id="engineeringType" class="judgment" value="${engineeringInfo.id}"/>
+                            <input type="hidden" name="engineeringType" id="engineeringType" class="required" value="${engineeringInfo.id}"/>
                             <i class="layui-icon layui-icon-down layui-font-12" style="float: right"></i>
                         </button>
                     </div>

+ 7 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsForm.jsp

@@ -66,6 +66,11 @@
                 if(i==2){
                     $("#inputForm").attr("action","${ctx}/ruralProject/ruralCostProjectRecords/tstore");
                 }else{
+                    var projectProperties=$("#projectProperties").val();
+                    if(projectProperties==''){
+                        parent.layer.msg("投资性质未选择!", {icon: 5});
+                        return false;
+                    }
                     var flag = $("#flagFile").val();
                     if(flag == 'false'){
                         top.layer.msg('附件信息未上传完成,请等待!', {icon: 0});
@@ -880,8 +885,8 @@
                     <label class="layui-form-label"><span class="require-item">*</span>项目所在地:</label>
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectProject id="area" name="area.id" value="${ruralProjectRecords.area.id}" labelName="area.name" labelValue="${ruralProjectRecords.area.name}"
-                                       cssStyle="background-color: #fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="false"/>
-                        <span id="areaShow" style="color: #999"><c:if test="${ruralProjectRecords.area.id!=null}">${ruralProjectRecords.province}-${ruralProjectRecords.city}-${ruralProjectRecords.county}</c:if></span>
+                                       cssStyle="background-color: #fff" title="区域" url="/sys/area/treeData" cssClass="form-control judgment layui-input" allowClear="true" notAllowSelectParent="false"/>
+                        <span id="areaShow" style="color: red"><c:if test="${ruralProjectRecords.area.id!=null}">${ruralProjectRecords.province}-${ruralProjectRecords.city}-${ruralProjectRecords.county}</c:if></span>
                     </div>
                 </div>
                 <div class="layui-item layui-col-sm6 lw7">

+ 7 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/cost/ruralCostProjectRecordsModify.jsp

@@ -46,7 +46,11 @@
 		  if(validateForm.form()){
               var startDate = new Date($("#startDate").val());
               var endingDate = new Date($("#endingDate").val());
-
+              var projectProperties=$("#projectProperties").val();
+              if(projectProperties==''){
+                  parent.layer.msg("投资性质未选择!", {icon: 5});
+                  return false;
+              }
               if(startDate.getTime() > endingDate.getTime()){
                   parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                   return false;
@@ -889,8 +893,8 @@
                     <label class="layui-form-label">项目所在地:</label>
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectProject id="area" name="area.id" value="${projectRecords.area.id}" labelName="area.name" labelValue="${projectRecords.area.name}"
-                                               cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-                        <span id="areaShow" style="color: #999"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
+                                               cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        <span id="areaShow" style="color: red"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
 
                     </div>
                 </div>

+ 7 - 3
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsAdminModify.jsp

@@ -31,7 +31,11 @@
 		  if(validateForm.form()){
               var startDate = new Date($("#startDate").val());
               var endingDate = new Date($("#endingDate").val());
-
+              var projectProperties=$("#projectProperties").val();
+              if(projectProperties==''){
+                  parent.layer.msg("投资性质未选择!", {icon: 5});
+                  return false;
+              }
               if(startDate.getTime() > endingDate.getTime()){
                   parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                   return false;
@@ -744,8 +748,8 @@
                     <label class="layui-form-label">项目所在地:</label>
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectProject id="area" name="area.id" value="${projectRecords.area.id}" labelName="area.name" labelValue="${projectRecords.area.name}"
-                                               cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-                        <span id="areaShow" style="color: #999"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
+                                               cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        <span id="areaShow" style="color: red"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
 
                     </div>
                 </div>

+ 6 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsForm.jsp

@@ -54,7 +54,11 @@
 
                 var startDate = new Date($("#startDate").val());
                 var endingDate = new Date($("#endingDate").val());
-
+                var projectProperties=$("#projectProperties").val();
+                if(projectProperties==''){
+                    parent.layer.msg("投资性质未选择!", {icon: 5});
+                    return false;
+                }
                 if(startDate.getTime() > endingDate.getTime()){
                     parent.layer.msg("工作开始日期不得大于工作结束日期!", {icon: 5});
                     return false;
@@ -900,7 +904,7 @@
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectProject id="area" name="area.id" value="${ruralProjectRecords.area.id}" labelName="area.name" labelValue="${ruralProjectRecords.area.name}"
                                                cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input judgment" allowClear="true" notAllowSelectParent="true"/>
-                        <span id="areaShow" style="color: #999"><c:if test="${ruralProjectRecords.area.id!=null}">${ruralProjectRecords.province}-${ruralProjectRecords.city}-${ruralProjectRecords.county}</c:if></span>
+                        <span id="areaShow" style="color: red"><c:if test="${ruralProjectRecords.area.id!=null}">${ruralProjectRecords.province}-${ruralProjectRecords.city}-${ruralProjectRecords.county}</c:if></span>
 
                     </div>
                 </div>

+ 7 - 2
src/main/webapp/webpage/modules/ruralprojectrecords/ruralProjectRecordsModify.jsp

@@ -57,6 +57,11 @@
                   top.layer.msg("请选择委托方联系人!", {icon: 5});
                   return;
               }
+              var projectProperties=$("#projectProperties").val();
+              if(projectProperties==''){
+                  parent.layer.msg("投资性质未选择!", {icon: 5});
+                  return false;
+              }
               var flag = $("#flagFile").val();
               if(flag == 'false'){
                   top.layer.msg('附件信息未上传完成,请等待!', {icon: 0});
@@ -880,8 +885,8 @@
                     <label class="layui-form-label">项目所在地:</label>
                     <div class="layui-input-block  with-icon">
                         <sys:treeselectProject id="area" name="area.id" value="${projectRecords.area.id}" labelName="area.name" labelValue="${projectRecords.area.name}"
-                                       cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
-                        <span id="areaShow" style="color: #999"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
+                                       cssStyle="background-color:#fff" title="区域" url="/sys/area/treeData" cssClass="form-control required layui-input" allowClear="true" notAllowSelectParent="true"/>
+                        <span id="areaShow" style="color: red"><c:if test="${projectRecords.area.id!=null}">${projectRecords.province}-${projectRecords.city}-${projectRecords.county}</c:if></span>
 
                     </div>
                 </div>