Explorar o código

管理员勿需上报项目上报功能调整

user5 %!s(int64=2) %!d(string=hai) anos
pai
achega
fd7bd50aa6

+ 33 - 0
src/main/java/com/jeeplus/modules/ruralprojectrecords/web/RuralProjectMessageAllController.java

@@ -47,6 +47,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.*;
 
@@ -691,6 +692,16 @@ public class RuralProjectMessageAllController extends BaseController {
             reported.setProjectCode("0");
             //工程用途默认其他
             reported.setPorjectUse("09");
+            //项目类型
+            reported.setProjectType("82");
+            //咨询收入乘1.5
+            if(StringUtils.isNotBlank(reported.getZiXunShouRu())){
+                BigDecimal ziXunShouRuB = new BigDecimal(reported.getZiXunShouRu());
+                ziXunShouRuB = ziXunShouRuB.multiply(new BigDecimal(1.5)).setScale(2,BigDecimal.ROUND_HALF_UP);
+                reported.setZiXunShouRu(ziXunShouRuB.toString());
+            }
+
+
             //建筑规模默认1项
             reported.setGCGMValueParameter("1项");
         }
@@ -722,6 +733,28 @@ public class RuralProjectMessageAllController extends BaseController {
                 reported.setAct(act);
             }
         }
+        if(null != consultantList && consultantList.size() == 2 ){
+            consultantList.get(0).setWcyysrbl(80D);
+            if(org.apache.commons.lang3.StringUtils.isNotBlank(reported.getZiXunShouRu())){
+                BigDecimal ziXunShouRuB = new BigDecimal(reported.getZiXunShouRu());
+                BigDecimal wcyysrB = new BigDecimal(consultantList.get(0).getWcyysrbl());
+                wcyysrB = ziXunShouRuB.multiply(new BigDecimal(0.8)).setScale(2,BigDecimal.ROUND_HALF_UP);
+                consultantList.get(0).setWcyysr(wcyysrB.doubleValue());
+            }else{
+                consultantList.get(0).setWcyysr(0D);
+            }
+
+            consultantList.get(1).setWcyysrbl(20D);
+            if(org.apache.commons.lang3.StringUtils.isNotBlank(reported.getZiXunShouRu())){
+                BigDecimal ziXunShouRuB = new BigDecimal(reported.getZiXunShouRu());
+                BigDecimal wcyysrB = new BigDecimal(consultantList.get(0).getWcyysrbl());
+                wcyysrB = ziXunShouRuB.multiply(new BigDecimal(0.2)).setScale(2,BigDecimal.ROUND_HALF_UP);
+                consultantList.get(1).setWcyysr(wcyysrB.doubleValue());
+            }else{
+                consultantList.get(1).setWcyysr(0D);
+            }
+
+        }
         /*RuralProjectRecords records = projectRecordsService.getQueryProjectUsers(reported.getProjectId());
         //根据上报id查询上报咨询员的信息
         List<RuralReportConsultant> reportedConsultants=ruralProjectMessageS.getReportedConsultantsList(reported.getId());

+ 15 - 15
src/main/webapp/webpage/modules/ruralprojectrecords/cost/newReported/adminSubmitReportedProvincialStandingForm.jsp

@@ -229,11 +229,11 @@
                     return false;
                 }
 
-                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,"/");
@@ -437,12 +437,12 @@
                 var projectType = $("#ProjectType").val()
                 if (projectType == "10") {
                     $("#ptDiv").show();
-                    $("#heTongJiaDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>合同价(万元):")
-                    $("#HeTongJia").attr("class","form-control layui-input number judgment")
-                    $("#songShenJiaDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>送审价(万元):")
-                    $("#SongShenJia").attr("class","form-control layui-input number judgment")
-                    $("#shenDingJiaDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>审定价(万元):")
-                    $("#ShenDingJia").attr("class","form-control layui-input number judgment")
+                    $("#heTongJiaDiv").find("label").eq(0).html("合同价(万元):")
+                    $("#HeTongJia").attr("class","form-control layui-input number")
+                    $("#songShenJiaDiv").find("label").eq(0).html("送审价(万元):")
+                    $("#SongShenJia").attr("class","form-control layui-input number")
+                    $("#shenDingJiaDiv").find("label").eq(0).html("审定价(万元):")
+                    $("#ShenDingJia").attr("class","form-control layui-input number")
                     $(".overallProcessDiv").hide();
                 }else if(projectType == "19"){
                     $("#heTongJiaDiv").find("label").eq(0).html("合同价(万元):")
@@ -622,12 +622,12 @@
                 layui.form.on('select(ProjectType)',function(data) {
                     if (data.value == "10") {
                         $("#ptDiv").show();
-                        $("#heTongJiaDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>合同价(万元):")
-                        $("#HeTongJia").attr("class","form-control layui-input number judgment")
-                        $("#songShenJiaDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>送审价(万元):")
-                        $("#SongShenJia").attr("class","form-control layui-input number judgment")
-                        $("#shenDingJiaDiv").find("label").eq(0).html("<span class=\"require-item\">*</span>审定价(万元):")
-                        $("#ShenDingJia").attr("class","form-control layui-input number judgment")
+                        $("#heTongJiaDiv").find("label").eq(0).html("合同价(万元):")
+                        $("#HeTongJia").attr("class","form-control layui-input number")
+                        $("#songShenJiaDiv").find("label").eq(0).html("送审价(万元):")
+                        $("#SongShenJia").attr("class","form-control layui-input number")
+                        $("#shenDingJiaDiv").find("label").eq(0).html("审定价(万元):")
+                        $("#ShenDingJia").attr("class","form-control layui-input number")
                         $(".overallProcessDiv").hide();
                     }else if(data.value == "19"){
                         $("#heTongJiaDiv").find("label").eq(0).html("合同价(万元):")
@@ -1422,7 +1422,7 @@
             <div class="form-group layui-row first lw9">
                 <div class="form-group-label"><h2>咨询项目造价包含内容说明</h2></div>
                 <div class="layui-item layui-col-sm12">
-                    <label class="layui-form-label double-line"><span class="require-item">*</span>咨询项目造价包含内容说明(勾选):</label>
+                    <label class="layui-form-label double-line">咨询项目造价包含内容说明(勾选):</label>
                     <div class="layui-input-block paddingDiv">
                         <c:forEach items="${fns:getMainDictList('contents_include')}" var="contents">
                             <input type="checkbox" name="contentsIncludeList" class="contents_${contents.value}" value="${contents.value}" title="${contents.label}"/>