Parcourir la source

Merge remote-tracking branch 'origin/master'

xs il y a 5 ans
Parent
commit
eb69d48c7e

+ 7 - 5
src/main/java/com/jeeplus/modules/sg/entity/TzData.java

@@ -1,20 +1,22 @@
 package com.jeeplus.modules.sg.entity;
 
+import java.util.List;
+
 public class TzData {
     private String id;
     private String type;
     private Double fee;
     private String state;
     private String wbsCode;
-    private double[] fees;
+    private List<JkxlData> jkxlData;
 
 
-    public double[] getFees() {
-        return fees;
+    public List<JkxlData> getJkxlData() {
+        return jkxlData;
     }
 
-    public void setFees(double[] fees) {
-        this.fees = fees;
+    public void setJkxlData(List<JkxlData> jkxlData) {
+        this.jkxlData = jkxlData;
     }
 
     public String getState() {

+ 4 - 4
src/main/java/com/jeeplus/modules/sg/mapper/xml/JkxlMapper.xml

@@ -34,10 +34,10 @@
          b.original_rate as originalRate,
          b.bz_fee as bzFee,
          b.jk_fee as jkFee,
-         b.rg_fee_ft as rgFtFee,
-         b.cbr_fee_ft as cbrFtFee,
-         b.fbr_fee_ft as fbrFtFee,
-         b.jx_fee_ft as jxFtFee
+      b.rg_fee_ft      as rgFtFee,
+       b.cbr_fee_ft    as cbrFtFee,
+       b.fbr_fee_ft    as fbrFtFee,
+       b.jx_fee_ft   as jxFtFee
          FROM sg_wbs_elements_data a LEFT JOIN sg_wbs_fee b on a.short_id = b.wbs_code
          and b.id = #{id}
 	</select>

+ 9 - 2
src/main/java/com/jeeplus/modules/sg/web/JkxlController.java

@@ -15,6 +15,7 @@ import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.multipart.MultipartFile;
@@ -336,11 +337,17 @@ public class JkxlController extends BaseController {
   }
 
   @RequestMapping("/ddtz")
-  public String ddtz(TzData tzData,Model model,RedirectAttributes redirectAttributes){
+  public String ddtz(@RequestBody TzData tzData, Model model, RedirectAttributes redirectAttributes){
     String id = tzData.getId();
     String type = tzData.getType();
-    double[] fees = tzData.getFees();
+    double fee = tzData.getFee();
+    List<JkxlData> list = tzData.getJkxlData();
+    List<JkxlData> lists = jkxlService.getList(id);
+
     try {
+      for (JkxlData jkxlData: list){
+
+      }
 
     }catch (Exception e){
       addMessage(redirectAttributes, "调整失败");

+ 4 - 4
src/main/webapp/webpage/modules/sg/free/wbslist.jsp

@@ -147,10 +147,10 @@
                     "jxf2": "${data.jxCost}",
 
                     <%--"rgf3": "${data.rgFtFee}",--%>
-                    "rgf3": "${data.rgFtFee}",
-                    "cbrcg3": "${data.cbrFtFee}",
-                    "fbrcg3": "${data.fbrFtFee}",
-                    "jxf3": "${data.jxFtFee}",
+                    "rgf3": "<c:if test="${ empty data.rgFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.rgFtFee}">${data.rgFtFee}</c:if> ",
+                    "cbrcg3": "<c:if test="${ empty data.cbrFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.cbrFtFee}">${data.cbrFtFee}</c:if>",
+                    "fbrcg3": "<c:if test="${ empty data.fbrFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.fbrFtFee}">${data.fbrFtFee}</c:if>",
+                    "jxf3": "<c:if test="${ empty data.jxFtFee and not empty data.originalTotalCost}">0.0</c:if><c:if test="${ not empty data.jxFtFee}">${data.jxFtFee}</c:if>",
 
                     "csf_1": "${data.measuresFee1}",
                     "csf_2": "${data.measuresFee2}",