Browse Source

凯和业务

lazhaoqian 4 years ago
parent
commit
cf21373c4a

+ 1 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCtnpriceItemsController.java

@@ -102,6 +102,7 @@ public class TCtnpriceItemsController extends BaseController
     {
     {
         return toAjax(tCtnpriceItemsService.deleteTCtnpriceItemsByIds(fIds));
         return toAjax(tCtnpriceItemsService.deleteTCtnpriceItemsByIds(fIds));
     }
     }
+    @Log(title = "查询海运运价", businessType = BusinessType.DELETE)
     @PostMapping("/containerPrice")
     @PostMapping("/containerPrice")
     public AjaxResult containerPrice(@RequestBody TCtnpriceItems tCtnpriceItems)
     public AjaxResult containerPrice(@RequestBody TCtnpriceItems tCtnpriceItems)
     {
     {

+ 9 - 8
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCtnpriceServiceImpl.java

@@ -94,26 +94,27 @@ public class TCtnpriceServiceImpl implements ITCtnpriceService
         if (ctnprice.getfDistinationid() == null){
         if (ctnprice.getfDistinationid() == null){
             return AjaxResult.error("目的港不能为空");
             return AjaxResult.error("目的港不能为空");
         }
         }
-        if (ctnprice.getfPortoftransshipment() == null){
+       /* if (ctnprice.getfPortoftransshipment() == null){
             return AjaxResult.error("中转港不能为空");
             return AjaxResult.error("中转港不能为空");
-        }
-        if (ctnprice.getfEtd() == null){
+        }*/
+        /*if (ctnprice.getfEtd() == null){
             return AjaxResult.error("预计开船日期不能为空");
             return AjaxResult.error("预计开船日期不能为空");
         }
         }
         if (ctnprice.getfEta() == null){
         if (ctnprice.getfEta() == null){
             return AjaxResult.error("预计到达日期不能为空");
             return AjaxResult.error("预计到达日期不能为空");
-        }
+        }*/
         if (ctnprice.getfBegindate() == null){
         if (ctnprice.getfBegindate() == null){
             return AjaxResult.error("有效期止不能为空");
             return AjaxResult.error("有效期止不能为空");
         }
         }
+
         List<TCtnpriceItems> ctnpriceItems = new ArrayList<>();
         List<TCtnpriceItems> ctnpriceItems = new ArrayList<>();
         if (ctnprice.getfId() == null){
         if (ctnprice.getfId() == null){
             ctnprice.setCreateTime(DateUtils.getNowDate());
             ctnprice.setCreateTime(DateUtils.getNowDate());
             ctnprice.setCreateBy(SecurityUtils.getUsername());
             ctnprice.setCreateBy(SecurityUtils.getUsername());
-            if (ctnprice.getfDays()==null){
+            /*if (ctnprice.getfDays()==null){
                 long dateDay = DateUtils.getDateDay(ctnprice.getfEta(),ctnprice.getfEtd());
                 long dateDay = DateUtils.getDateDay(ctnprice.getfEta(),ctnprice.getfEtd());
                 ctnprice.setfDays(dateDay);
                 ctnprice.setfDays(dateDay);
-            }
+            }*/
             int i = tCtnpriceMapper.insertTCtnprice(ctnprice);
             int i = tCtnpriceMapper.insertTCtnprice(ctnprice);
             JSONArray warehouseJSON = JSONArray.parseArray(tCtnpriceItems);
             JSONArray warehouseJSON = JSONArray.parseArray(tCtnpriceItems);
             ctnpriceItems = JSONObject.parseArray(warehouseJSON.toJSONString(), TCtnpriceItems.class);
             ctnpriceItems = JSONObject.parseArray(warehouseJSON.toJSONString(), TCtnpriceItems.class);
@@ -128,10 +129,10 @@ public class TCtnpriceServiceImpl implements ITCtnpriceService
         }else {
         }else {
             ctnprice.setUpdateTime(DateUtils.getNowDate());
             ctnprice.setUpdateTime(DateUtils.getNowDate());
             ctnprice.setUpdateBy(SecurityUtils.getUsername());
             ctnprice.setUpdateBy(SecurityUtils.getUsername());
-            if (ctnprice.getfDays()==null){
+            /*if (ctnprice.getfDays()==null){
                 long dateDay = DateUtils.getDateDay(ctnprice.getfEta(),ctnprice.getfEtd());
                 long dateDay = DateUtils.getDateDay(ctnprice.getfEta(),ctnprice.getfEtd());
                 ctnprice.setfDays(dateDay);
                 ctnprice.setfDays(dateDay);
-            }
+            }*/
             if (ctnprice.getfStatus().equals("T") ||ctnprice.getfStatus().equals("正常")){
             if (ctnprice.getfStatus().equals("T") ||ctnprice.getfStatus().equals("正常")){
                 ctnprice.setfStatus("T");
                 ctnprice.setfStatus("T");
             }else {
             }else {

+ 1 - 0
ruoyi-shipping/src/main/resources/mapper/shipping/TCtnpriceMapper.xml

@@ -132,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="fPortofloadid != null">f_portofloadid = #{fPortofloadid},</if>
             <if test="fPortofloadid != null">f_portofloadid = #{fPortofloadid},</if>
             <if test="fDistinationid != null">f_distinationid = #{fDistinationid},</if>
             <if test="fDistinationid != null">f_distinationid = #{fDistinationid},</if>
             <if test="fPortoftransshipment != null">f_portoftransshipment = #{fPortoftransshipment},</if>
             <if test="fPortoftransshipment != null">f_portoftransshipment = #{fPortoftransshipment},</if>
+            <if test="fPortoftransshipment == null">f_portoftransshipment = null,</if>
             <if test="fEtd != null">f_ETD = #{fEtd},</if>
             <if test="fEtd != null">f_ETD = #{fEtd},</if>
             <if test="fEta != null">f_ETA = #{fEta},</if>
             <if test="fEta != null">f_ETA = #{fEta},</if>
             <if test="fDays != null">f_days = #{fDays},</if>
             <if test="fDays != null">f_days = #{fDays},</if>