HUJIANGUO преди 3 години
родител
ревизия
87d8152e86
променени са 25 файла, в които са добавени 1278 реда и са изтрити 182 реда
  1. 50 7
      src/main/java/com/steerinfo/dil/controller/AmsshipCargoTransferResultController.java
  2. 38 5
      src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryAttorneyController.java
  3. 37 3
      src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryNoticeController.java
  4. 110 0
      src/main/java/com/steerinfo/dil/controller/DilBatchController.java
  5. 3 1
      src/main/java/com/steerinfo/dil/controller/OmsshipInstructionsCapacityController.java
  6. 38 4
      src/main/java/com/steerinfo/dil/controller/OmsshipShipmentInstructionsController.java
  7. 40 5
      src/main/java/com/steerinfo/dil/controller/TmsshipBargeOperationController.java
  8. 3 1
      src/main/java/com/steerinfo/dil/controller/TmsshipEntryWharyResultController.java
  9. 39 6
      src/main/java/com/steerinfo/dil/controller/TmsshipLoadShipResultController.java
  10. 3 1
      src/main/java/com/steerinfo/dil/controller/TmsshipOutWharyResultController.java
  11. 40 6
      src/main/java/com/steerinfo/dil/controller/TmsshipShipLocationController.java
  12. 41 7
      src/main/java/com/steerinfo/dil/controller/TmsshipTotalResultController.java
  13. 40 6
      src/main/java/com/steerinfo/dil/controller/TmsshipUnloadShipResultController.java
  14. 40 6
      src/main/java/com/steerinfo/dil/controller/TmsshipWaterQualityResultController.java
  15. 32 0
      src/main/java/com/steerinfo/dil/feign/ESFeign.java
  16. 4 1
      src/main/java/com/steerinfo/dil/mapper/AmsshipCargoTransferResultMapper.java
  17. 14 0
      src/main/java/com/steerinfo/dil/mapper/DilBatchMapper.java
  18. 19 3
      src/main/java/com/steerinfo/dil/model/AmsshipCargoTransferResult.java
  19. 155 0
      src/main/java/com/steerinfo/dil/model/DilBatch.java
  20. 3 1
      src/main/java/com/steerinfo/dil/service/IAmsshipCargoTransferResultService.java
  21. 23 0
      src/main/java/com/steerinfo/dil/service/IDilBatchService.java
  22. 58 12
      src/main/java/com/steerinfo/dil/service/impl/AmsshipCargoTransferResultServiceImpl.java
  23. 36 0
      src/main/java/com/steerinfo/dil/service/impl/DilBatchServiceImpl.java
  24. 119 107
      src/main/resources/com/steerinfo/dil/mapper/AmsshipCargoTransferResultMapper.xml
  25. 293 0
      src/main/resources/com/steerinfo/dil/mapper/DilBatchMapper.xml

+ 50 - 7
src/main/java/com/steerinfo/dil/controller/AmsshipCargoTransferResultController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.AmsshipCargoTransferResult;
 import com.steerinfo.dil.model.AmsshipDeliveryAttorney;
 import com.steerinfo.dil.model.OmsshipShipmentInstructions;
@@ -16,6 +18,7 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.HashMap;
 import java.util.List;
 import java.math.BigDecimal;
 import java.util.Map;
@@ -41,6 +44,8 @@ public class AmsshipCargoTransferResultController extends BaseRESTfulController
     IAmsshipCargoTransferResultService amsshipCargoTransferResultService;
     @Autowired
     ColumnDataUtil columnDataUtil;
+    @Autowired
+    ESFeign esFeign;
     @ApiOperation(value="展示货权转移表", notes="分页查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -48,23 +53,53 @@ public class AmsshipCargoTransferResultController extends BaseRESTfulController
             @ApiImplicitParam(name = "apiId", value = "66", required = false, dataType = "BigDecimal"),
     })
     @PostMapping(value = "/getAmsshipCargoTranferResultList")
-    public RESTfulResult getAmsshipCargoTranferResultList(@RequestBody(required = false) Map<String,Object> mapVal,
+    public RESTfulResult getAmsshipCargoTranferResultList(@RequestBody(required = false) Map<String,Object> mapValue,
                                                           Integer pageNum,
                                                           Integer pageSize,
-                                                          Integer apiId){
-        List<Map<String,Object>> list = amsshipCargoTransferResultService.seletCargoTransfer(mapVal);
+                                                          Integer apiId,
+                                                          String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_ship_cargo_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> listTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapValue.size() == 0) {
+            //将查询结果存入索引中
+            listTotal = amsshipCargoTransferResultService.seletCargoTransfer(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_ship_cargo_list");
+            //添加id
+            map.put("indexId", "cargoTransferResultId");
+            listTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(listTotal);
+            esFeign.insertIndex(listTotal);
+            //删除
+            listTotal.remove(listTotal.size() - 1);
+        }
+        if (listTotal == null) {
+            listTotal = amsshipCargoTransferResultService.seletCargoTransfer(mapValue);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
-        List<Map<String, Object>> columnList = amsshipCargoTransferResultService.seletCargoTransfer(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        List<Map<String, Object>> columnList = amsshipCargoTransferResultService.seletCargoTransfer(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
         return success(data);
     }
     //新增
     @ApiOperation(value="新增", notes="根据amsshipCargoTransferResult对象创建")
     @ApiImplicitParam(name = "amsshipCargoTransferResult", value = "详细实体amsshipCargoTransferResult", required = true, dataType = "amsshipCargoTransferResult", paramType = "java.util.Map")
     @PostMapping(value = "/insertamsshipCargoTransferResult")
-    public RESTfulResult insertamsshipCargoTransferResult(@RequestBody AmsshipCargoTransferResult amsshipCargoTransferResult){
-        int code=amsshipCargoTransferResultService.insertSelective(amsshipCargoTransferResult);
+    public RESTfulResult insertamsshipCargoTransferResult(@RequestBody(required = false) Map<String,Object> map){
+        int code=amsshipCargoTransferResultService.addCargoTransferResult(map);
         System.out.println(code);
         return success(code);
     }
@@ -127,4 +162,12 @@ public class AmsshipCargoTransferResultController extends BaseRESTfulController
         List<Map<String,Object>> list= amsshipCargoTransferResultService.insertBetchId();
         return success(list);
     }
+    //获取物资id
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    @GetMapping(value = "/getMaterialId")
+    public RESTfulResult getMaterialId(){
+        List<Map<String,Object>> list= amsshipCargoTransferResultService.selectMaterialIdByMaterialTypeId();
+        return success(list);
+    }
 }

+ 38 - 5
src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryAttorneyController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.AmsshipCargoTransferResult;
 import com.steerinfo.dil.model.AmsshipDeliveryAttorney;
 import com.steerinfo.dil.model.AmsshipDeliveryNotice;
@@ -46,6 +48,8 @@ public class AmsshipDeliveryAttorneyController extends BaseRESTfulController {
     IAmsshipDeliveryAttorneyService amsshipDeliveryAttorneyService;
     @Autowired
     ColumnDataUtil columnDataUtil;
+    @Autowired
+    ESFeign esFeign;
     @ApiOperation(value="展示提货委托表", notes="分页查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -56,13 +60,42 @@ public class AmsshipDeliveryAttorneyController extends BaseRESTfulController {
     public RESTfulResult getAmsshipDeliveryAttroneyList(@RequestBody(required = false) Map<String,Object> mapVal,
                                                         Integer pageNum,
                                                         Integer pageSize,
-                                                        Integer apiId
-    ){
-        List<Map<String,Object>> list = amsshipDeliveryAttorneyService.selectshipCargoTranferResult(mapVal);
+                                                        Integer apiId,
+                                                        String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_ship_delivery_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> listTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal.size() == 0) {
+            //将查询结果存入索引中
+            listTotal = amsshipDeliveryAttorneyService.selectshipCargoTranferResult(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_ship_delivery_list");
+            //添加id
+            map.put("indexId", "attorneyId");
+            listTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(listTotal);
+            esFeign.insertIndex(listTotal);
+            //删除
+            listTotal.remove(listTotal.size() - 1);
+        }
+        if (listTotal == null) {
+            listTotal = amsshipDeliveryAttorneyService.selectshipCargoTranferResult(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
-        List<Map<String, Object>> columnList =amsshipDeliveryAttorneyService.selectshipCargoTranferResult(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        List<Map<String, Object>> columnList = amsshipDeliveryAttorneyService.selectshipCargoTranferResult(mapVal);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
         return success(data);
     }
 

+ 37 - 3
src/main/java/com/steerinfo/dil/controller/AmsshipDeliveryNoticeController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.AmsshipDeliveryAttorney;
 import com.steerinfo.dil.model.AmsshipDeliveryNotice;
 import com.steerinfo.dil.model.OmsshipShipmentInstructions;
@@ -43,6 +45,8 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
     IAmsshipDeliveryNoticeService amsshipDeliveryNoticeService;
     @Autowired
     ColumnDataUtil columnDataUtil;
+    @Autowired
+    ESFeign esFeign;
     @ApiOperation(value="展示发货通知单表", notes="分页查询")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
@@ -53,12 +57,42 @@ public class AmsshipDeliveryNoticeController extends BaseRESTfulController {
     public RESTfulResult getshipDeliveryNoticeList(@RequestBody(required = false) Map<String,Object> mapVal,
                                                    Integer pageNum,
                                                    Integer pageSize,
-                                                   Integer apiId){
-        List<Map<String,Object>> list = amsshipDeliveryNoticeService.selectShipDeliveryNotice(mapVal);
+                                                   Integer apiId,
+                                                   String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_ship_delivery_notice_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> listTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal.size() == 0) {
+            //将查询结果存入索引中
+            listTotal = amsshipDeliveryNoticeService.selectShipDeliveryNotice(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_ship_delivery_notice_list");
+            //添加id
+            map.put("indexId", "noticeId");
+            listTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(listTotal);
+            esFeign.insertIndex(listTotal);
+            //删除
+            listTotal.remove(listTotal.size() - 1);
+        }
+        if (listTotal == null) {
+            listTotal = amsshipDeliveryNoticeService.selectShipDeliveryNotice(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = amsshipDeliveryNoticeService.selectShipDeliveryNotice(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
         return success(data);
     }
     //新增

+ 110 - 0
src/main/java/com/steerinfo/dil/controller/DilBatchController.java

@@ -0,0 +1,110 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.dil.model.DilBatch;
+import com.steerinfo.dil.service.IDilBatchService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * DilBatch RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-11-06 10:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-11-06
+ * 作者:generator
+ * 参考:
+ * 描述:DilBatch RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dilbatchs")
+public class DilBatchController extends BaseRESTfulController {
+
+    @Autowired
+    IDilBatchService dilBatchService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dilbatch:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DilBatch> list = dilBatchService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dilbatch:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DilBatch> list = dilBatchService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DilBatch对象创建")
+    @ApiImplicitParam(name = "dilBatch", value = "详细实体dilBatch", required = true, dataType = "DilBatch")
+    //@RequiresPermissions("dilbatch:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute DilBatch model){
+        DilBatch dilBatch = dilBatchService.add(model);
+        return success(dilBatch);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("dilbatch:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable Short id){
+        DilBatch dilBatch = dilBatchService.getById(id);
+        return success(dilBatch);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dilBatch信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short"),
+        @ApiImplicitParam(name = "dilBatch", value = "详细实体dilBatch", required = true, dataType = "DilBatch")
+    })
+    //@RequiresPermissions("dilbatch:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable Short id, @RequestBody DilBatch model){
+        model.setId(id);
+        DilBatch dilBatch = dilBatchService.modify(model);
+        return success(dilBatch);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("dilbatch:delete")
+    @DeleteMapping(value = "/{id}")//Short
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<Short> ids = ListUtils.convertList(list);
+			  dilBatchService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 3 - 1
src/main/java/com/steerinfo/dil/controller/OmsshipInstructionsCapacityController.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.controller;
 
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.OmsshipInstructionsCapacity;
 import com.steerinfo.dil.model.OmsshipShipmentInstructions;
 import com.steerinfo.dil.model.TmsshipBargeOperation;
@@ -43,7 +44,8 @@ public class OmsshipInstructionsCapacityController extends BaseRESTfulController
     IOmsshipInstructionsCapacityService omsshipInstructionsCapacityService;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 获取运单id
      * @return

+ 38 - 4
src/main/java/com/steerinfo/dil/controller/OmsshipShipmentInstructionsController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
 import com.steerinfo.dil.util.PageListAdd;
@@ -42,7 +44,8 @@ public class OmsshipShipmentInstructionsController extends BaseRESTfulController
     IOmsshipShipmentInstructionsService omsshipShipmentInstructionsService;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增
      * @param omsshipShipmentInstructions
@@ -115,13 +118,44 @@ public class OmsshipShipmentInstructionsController extends BaseRESTfulController
     public RESTfulResult getShipMentInstructionsList(@RequestBody(required = false) Map<String,Object> mapVal,
                                                      Integer pageNum,
                                                      Integer pageSize,
-                                                     Integer apiId){
-        List<Map<String,Object>> list = omsshipShipmentInstructionsService.selectAll(mapVal);
+                                                     Integer apiId,
+                                                     String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_ship_instruction_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = omsshipShipmentInstructionsService.selectAll(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_ship_instruction_list");
+            //添加id
+            map.put("indexId", "shipmentInstructionsId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = omsshipShipmentInstructionsService.selectAll(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = omsshipShipmentInstructionsService.selectAll(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
+
     }
 
     /**

+ 40 - 5
src/main/java/com/steerinfo/dil/controller/TmsshipBargeOperationController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipBargeOperation;
 import com.steerinfo.dil.model.TmsshipShipLocation;
 import com.steerinfo.dil.service.ITmsshipBargeOperationService;
@@ -42,6 +44,8 @@ public class TmsshipBargeOperationController extends BaseRESTfulController {
     ITmsshipBargeOperationService tmsshipBargeOperationService;
     @Autowired
     ColumnDataUtil columnDataUtil;
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增驳船作业
      * @param map
@@ -134,14 +138,45 @@ public class TmsshipBargeOperationController extends BaseRESTfulController {
     })
     @PostMapping(value = "/getBargeOperationList")
     public RESTfulResult getBargeOperationList(@RequestBody(required = false) Map<String,Object> mapVal,
-                                             Integer pageNum,
-                                             Integer pageSize,
-                                             Integer apiId){
-        List<Map<String,Object>> list = tmsshipBargeOperationService.selectBargeOperationList(mapVal);
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               Integer apiId,
+                                               String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_barge_operation_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = tmsshipBargeOperationService.selectBargeOperationList(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_barge_operation_list");
+            //添加id
+            map.put("indexId", "bargeOperationId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = tmsshipBargeOperationService.selectBargeOperationList(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = tmsshipBargeOperationService.selectBargeOperationList(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
+
     }
 }

+ 3 - 1
src/main/java/com/steerinfo/dil/controller/TmsshipEntryWharyResultController.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.controller;
 
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipEntryWharyResult;
 import com.steerinfo.dil.service.ITmsshipEntryWharyResultService;
 import com.steerinfo.dil.service.impl.TmsshipEntryWharyResultServiceImpl;
@@ -32,7 +33,8 @@ public class TmsshipEntryWharyResultController extends BaseRESTfulController {
     @Autowired
     TmsshipTotalResultServiceImpl tmsshipTotalResultService;
 
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增抵达实绩
      * @param mapVal

+ 39 - 6
src/main/java/com/steerinfo/dil/controller/TmsshipLoadShipResultController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipLoadShipResult;
 import com.steerinfo.dil.model.TmsshipShipLocation;
 import com.steerinfo.dil.service.ITmsshipLoadShipResultService;
@@ -42,7 +44,8 @@ public class TmsshipLoadShipResultController extends BaseRESTfulController {
     ITmsshipLoadShipResultService tmsshipLoadShipResultService;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增装船作业(附带新增装船卸船)
      * @param map
@@ -135,14 +138,44 @@ public class TmsshipLoadShipResultController extends BaseRESTfulController {
     })
     @PostMapping(value = "/getLoadShipList")
     public RESTfulResult getLoadShipList(@RequestBody(required = false) Map<String,Object> mapVal,
-                                             Integer pageNum,
-                                             Integer pageSize,
-                                             Integer apiId){
-        List<Map<String,Object>> list = tmsshipLoadShipResultService.selectLoadShipList(mapVal);
+                                         Integer pageNum,
+                                         Integer pageSize,
+                                         Integer apiId,
+                                         String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_load_ship_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = tmsshipLoadShipResultService.selectLoadShipList(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_load_ship_list");
+            //添加id
+            map.put("indexId", "resultId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = tmsshipLoadShipResultService.selectLoadShipList(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = tmsshipLoadShipResultService.selectLoadShipList(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
     }
 

+ 3 - 1
src/main/java/com/steerinfo/dil/controller/TmsshipOutWharyResultController.java

@@ -1,5 +1,6 @@
 package com.steerinfo.dil.controller;
 
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipEntryWharyResult;
 import com.steerinfo.dil.model.TmsshipOutWharyResult;
 import com.steerinfo.dil.service.ITmsshipOutWharyResultService;
@@ -29,7 +30,8 @@ public class TmsshipOutWharyResultController extends BaseRESTfulController {
 
     @Autowired
     TmsshipOutWharyResultServiceImpl tmsshipOutWharyResultService;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增离港实绩
      * @param mapVal

+ 40 - 6
src/main/java/com/steerinfo/dil/controller/TmsshipShipLocationController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipShipLocation;
 import com.steerinfo.dil.service.ITmsshipShipLocationService;
 import com.steerinfo.dil.service.impl.TmsshipShipLocationServiceImpl;
@@ -45,7 +47,8 @@ public class TmsshipShipLocationController extends BaseRESTfulController {
     TmsshipTotalResultServiceImpl tmsshipTotalResultService;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
 
     /**
      * 新增位置作业
@@ -139,14 +142,45 @@ public class TmsshipShipLocationController extends BaseRESTfulController {
     })
     @PostMapping(value = "/getShipLocationList")
     public RESTfulResult getShipLocationList(@RequestBody(required = false) Map<String,Object> mapVal,
-                                       Integer pageNum,
-                                       Integer pageSize,
-                                       Integer apiId){
-        List<Map<String,Object>> list = tmsshipShipLocationService.selectShipLocationList(mapVal);
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             Integer apiId,
+                                             String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_ship_location_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = tmsshipShipLocationService.selectShipLocationList(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_ship_location_list");
+            //添加id
+            map.put("indexId", "locationId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = tmsshipShipLocationService.selectShipLocationList(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = tmsshipShipLocationService.selectShipLocationList(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
+
     }
 }

+ 41 - 7
src/main/java/com/steerinfo/dil/controller/TmsshipTotalResultController.java

@@ -1,6 +1,8 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.steerinfo.dil.feign.ColumnDataFeign;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipTotalResult;
 import com.steerinfo.dil.service.ITmsshipTotalResultService;
 import com.steerinfo.dil.service.impl.TmsshipTotalResultServiceImpl;
@@ -45,7 +47,8 @@ public class TmsshipTotalResultController extends BaseRESTfulController {
     ColumnDataFeign columnDataFeign;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 展示水路货物运单列表
      * @param mapVal
@@ -56,21 +59,52 @@ public class TmsshipTotalResultController extends BaseRESTfulController {
      */
     @ApiOperation(value="展示水路货物运单", notes="分页查询")
     @ApiImplicitParams({
-        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
-        @ApiImplicitParam(name = "apiId", value = "56", required = false, dataType = "BigDecimal"),
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "56", required = false, dataType = "BigDecimal"),
     })
     @PostMapping(value = "/listAllOrders")
     public RESTfulResult listAllOrders(@RequestBody(required = false) Map<String,Object> mapVal,
                                        Integer pageNum,
                                        Integer pageSize,
-                                       Integer apiId){
-        List<Map<String,Object>> list = tmsshipTotalResultService.getOrderList(mapVal);
+                                       Integer apiId,
+                                       String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_all_order_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = tmsshipTotalResultService.getOrderList(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_all_order_list");
+            //添加id
+            map.put("indexId", "resultId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = tmsshipTotalResultService.getOrderList(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = tmsshipTotalResultService.getOrderList(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
+
     }
 
     /**

+ 40 - 6
src/main/java/com/steerinfo/dil/controller/TmsshipUnloadShipResultController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipLoadShipResult;
 import com.steerinfo.dil.model.TmsshipUnloadShipResult;
 import com.steerinfo.dil.service.ITmsshipUnloadShipResultService;
@@ -42,7 +44,8 @@ public class TmsshipUnloadShipResultController extends BaseRESTfulController {
     ITmsshipUnloadShipResultService tmsshipUnloadShipResultService;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增卸船作业
      * @param map
@@ -135,15 +138,46 @@ public class TmsshipUnloadShipResultController extends BaseRESTfulController {
     })
     @PostMapping(value = "/getUnLoadShipList")
     public RESTfulResult getUnLoadShipList(@RequestBody(required = false) Map<String,Object> mapVal,
-                                         Integer pageNum,
-                                         Integer pageSize,
-                                         Integer apiId){
-        List<Map<String,Object>> list = tmsshipUnloadShipResultService.selectUnloadShipList(mapVal);
+                                           Integer pageNum,
+                                           Integer pageSize,
+                                           Integer apiId,
+                                           String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_unLoad_ship_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = tmsshipUnloadShipResultService.selectUnloadShipList(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_unLoad_ship_list");
+            //添加id
+            map.put("indexId", "resultId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = tmsshipUnloadShipResultService.selectUnloadShipList(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = tmsshipUnloadShipResultService.selectUnloadShipList(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
+
     }
 
 }

+ 40 - 6
src/main/java/com/steerinfo/dil/controller/TmsshipWaterQualityResultController.java

@@ -1,5 +1,7 @@
 package com.steerinfo.dil.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
 import com.steerinfo.dil.model.TmsshipLoadShipResult;
 import com.steerinfo.dil.model.TmsshipWaterQualityResult;
 import com.steerinfo.dil.service.ITmsshipWaterQualityResultService;
@@ -42,7 +44,8 @@ public class TmsshipWaterQualityResultController extends BaseRESTfulController {
     ITmsshipWaterQualityResultService tmsshipWaterQualityResultService;
     @Autowired
     ColumnDataUtil columnDataUtil;
-
+    @Autowired
+    ESFeign esFeign;
     /**
      * 新增水分质检作业
      * @param map
@@ -135,15 +138,46 @@ public class TmsshipWaterQualityResultController extends BaseRESTfulController {
     })
     @PostMapping(value = "/getWaterQualityResultList")
     public RESTfulResult getWaterQualityResultList(@RequestBody(required = false) Map<String,Object> mapVal,
-                                         Integer pageNum,
-                                         Integer pageSize,
-                                         Integer apiId){
-        List<Map<String,Object>> list = tmsshipWaterQualityResultService.selectWaterQualityList(mapVal);
+                                                   Integer pageNum,
+                                                   Integer pageSize,
+                                                   Integer apiId,
+                                                   String con){
+        //框计算
+        if(con != null){
+            if(!"undefined".equals(con)){
+                //设置要查询的索引名称
+                String index="get_water_quality_list";
+                //获取查询结果
+                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
+            }
+        }
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if (mapVal == null) {
+            //将查询结果存入索引中
+            detailListTotal = tmsshipWaterQualityResultService.selectWaterQualityList(null);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index", "get_water_quality_list");
+            //添加id
+            map.put("indexId", "resultId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size() - 1);
+        }
+        if (detailListTotal == null) {
+            detailListTotal = tmsshipWaterQualityResultService.selectWaterQualityList(mapVal);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = tmsshipWaterQualityResultService.selectWaterQualityList(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, list, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, detailListTotal, columnList);
         return success(data);
+
     }
 
 }

+ 32 - 0
src/main/java/com/steerinfo/dil/feign/ESFeign.java

@@ -0,0 +1,32 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.dil.util.PageListAdd;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/7/27 15:49
+ * @Version 1.0
+ */
+
+
+@FeignClient(value = "DIL-ES-DEV",url = "172.16.33.161:8089/api/v1/es")
+public interface ESFeign {
+    @PostMapping("getConResult")
+    PageListAdd getConResult(@RequestBody(required = false) Map<String, Object> mapValue,
+                             @RequestParam String index,
+                             @RequestParam Integer apiId,
+                             @RequestParam Integer pageNum,
+                             @RequestParam Integer pageSize,
+                             @RequestParam String con);
+
+
+    @PostMapping( value = "insertIndex",consumes = "application/json", produces = "application/json")
+    void insertIndex(@RequestBody List<Map<String, Object>> detailListTotal);
+}

+ 4 - 1
src/main/java/com/steerinfo/dil/mapper/AmsshipCargoTransferResultMapper.java

@@ -28,10 +28,13 @@ public interface AmsshipCargoTransferResultMapper extends IBaseMapper<AmsshipCar
     List<Map<String,Object>> getCargoId();
     List<Map<String,Object>> selectByOrder(Integer cargoTransferResultId);
     //    List<Map<String,Object>>  updateByBatchId(Integer betchId);
+    //插入批次
     List<Map<String,Object>>  insertBetchId( );
-
+    //通过
     BigDecimal selectPortId(BigDecimal pierId);
 
     @Select("select seq_AMSSHIP_CARGO.nextval from dual")
     BigDecimal selectCargoId();
+    //获取船运物资id
+    List<Map<String,Object>> selectMaterialIdByMaterialTypeId();
 }

+ 14 - 0
src/main/java/com/steerinfo/dil/mapper/DilBatchMapper.java

@@ -0,0 +1,14 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.DilBatch;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+@Mapper
+public interface DilBatchMapper extends IBaseMapper<DilBatch, Short> {
+    //获取当前序列值+1
+    @Select("select seq_DIL_BATCH.nextval from dual")
+    BigDecimal selectBatchId();
+}

+ 19 - 3
src/main/java/com/steerinfo/dil/model/AmsshipCargoTransferResult.java

@@ -3,13 +3,14 @@ package com.steerinfo.dil.model;
 import com.steerinfo.framework.model.IBasePO;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
+
 import java.math.BigDecimal;
 import java.util.Date;
 
 @ApiModel(value="货权转移实绩")
 public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     /**
-     * 实绩ID(CARGO_TRANSFER_RESULT_ID,DECIMAL,38)
+     * 实绩ID(CARGO_TRANSFER_RESULT_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="实绩ID",required=true)
     private BigDecimal cargoTransferResultId;
@@ -21,7 +22,7 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     private String resultNumber;
 
     /**
-     * 货权转移送达单位(CARRIER_ID,DECIMAL,38)
+     * 货权转移送达单位(CARRIER_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="货权转移送达单位",required=false)
     private BigDecimal carrierId;
@@ -39,7 +40,7 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     private String resultTelephoneFax;
 
     /**
-     * 收货人ID(GROUP_ID,DECIMAL,38)
+     * 收货人ID(GROUP_ID,DECIMAL,0)
      */
     @ApiModelProperty(value="收货人ID",required=false)
     private BigDecimal groupId;
@@ -116,6 +117,12 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="是否删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 放货日期(RESULT_DATE_OF_LOANS,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="放货日期",required=false)
+    private Date resultDateOfLoans;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -272,6 +279,14 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public Date getResultDateOfLoans() {
+        return resultDateOfLoans;
+    }
+
+    public void setResultDateOfLoans(Date resultDateOfLoans) {
+        this.resultDateOfLoans = resultDateOfLoans;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -296,6 +311,7 @@ public class AmsshipCargoTransferResult implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", resultDateOfLoans=").append(resultDateOfLoans);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 155 - 0
src/main/java/com/steerinfo/dil/model/DilBatch.java

@@ -0,0 +1,155 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="采购批次表")
+public class DilBatch implements IBasePO<Short> {
+    /**
+     * 批次ID(BATCH_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="批次ID",required=true)
+    private BigDecimal batchId;
+
+    /**
+     * 外轮船名(RESULT_FOREIGN_SHIP_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="外轮船名",required=false)
+    private String resultForeignShipName;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    private static final long serialVersionUID = 1L;
+
+    public BigDecimal getBatchId() {
+        return batchId;
+    }
+
+    public void setBatchId(BigDecimal batchId) {
+        this.batchId = batchId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public String getResultForeignShipName() {
+        return resultForeignShipName;
+    }
+
+    public void setResultForeignShipName(String resultForeignShipName) {
+        this.resultForeignShipName = resultForeignShipName == null ? null : resultForeignShipName.trim();
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", batchId=").append(batchId);
+        sb.append(", resultForeignShipName=").append(resultForeignShipName);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+
+
+    @Override
+    public Short getId() {
+        return null;
+    }
+
+    @Override
+    public void setId(Short aShort) {
+
+    }
+}

+ 3 - 1
src/main/java/com/steerinfo/dil/service/IAmsshipCargoTransferResultService.java

@@ -24,7 +24,7 @@ import java.util.Map;
 public interface IAmsshipCargoTransferResultService{
     List<Map<String,Object>> seletCargoTransfer(Map<String,Object> mapVal);
     //添加货权转移信息
-    int insertSelective(AmsshipCargoTransferResult amsshipCargoTransferResult);
+    int addCargoTransferResult(Map<String,Object> map);
     //删除货权转移信息
     int deleteByPrimaryKey(BigDecimal cargoTransferResultId);
     //修改货权转移信息
@@ -37,5 +37,7 @@ public interface IAmsshipCargoTransferResultService{
     int updateByPrimaryKeySelective(AmsshipCargoTransferResult amsshipCargoTransferResult);
     List<Map<String,Object>> selectByOrder(Integer cargoTransferResultId);
     List<Map<String,Object>>  insertBetchId();
+    //查询船运物资id
+    List<Map<String,Object>> selectMaterialIdByMaterialTypeId();
 
 }

+ 23 - 0
src/main/java/com/steerinfo/dil/service/IDilBatchService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.model.DilBatch;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * DilBatch服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-11-06 10:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-11-06
+ * 作者:generator
+ * 参考:
+ * 描述:DilBatch服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDilBatchService extends IBaseService<DilBatch, Short>{
+
+}

+ 58 - 12
src/main/java/com/steerinfo/dil/service/impl/AmsshipCargoTransferResultServiceImpl.java

@@ -1,8 +1,10 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.feign.WmshboundFeign;
+import com.steerinfo.dil.mapper.DilBatchMapper;
 import com.steerinfo.dil.model.AmsshipCargoTransferResult;
 import com.steerinfo.dil.mapper.AmsshipCargoTransferResultMapper;
+import com.steerinfo.dil.model.DilBatch;
 import com.steerinfo.dil.service.IAmsshipCargoTransferResultService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -35,6 +37,8 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
     private AmsshipCargoTransferResultMapper amsshipCargoTransferResultMapper;
     @Autowired
     WmshboundFeign wmshboundFeign;
+    @Autowired
+    private DilBatchMapper dilBatchMapper;
 
     @Override
     public List<Map<String, Object>> seletCargoTransfer(Map<String, Object> mapVal) {
@@ -43,24 +47,62 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
 
     @Override
     @Transactional
-    public int insertSelective(AmsshipCargoTransferResult amsshipCargoTransferResult) {
+    public int addCargoTransferResult(Map<String,Object> map) {
+        AmsshipCargoTransferResult amsshipCargoTransferResult=new AmsshipCargoTransferResult();
         //货权转移编号
         BigDecimal cargoTransferResultId = amsshipCargoTransferResultMapper.selectCargoId();
         amsshipCargoTransferResult.setCargoTransferResultId(cargoTransferResultId);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         String  date=sdf.format(new Date());
-        // 修改港存库实时库存
-        BigDecimal pierId = amsshipCargoTransferResult.getGroupId();
-        BigDecimal portId = amsshipCargoTransferResultMapper.selectPortId(pierId);
-        BigDecimal batchId = amsshipCargoTransferResult.getBatchId();
-        BigDecimal resultNumberOfLoans = amsshipCargoTransferResult.getResultNumberOfLoans();
-        Map<String,Object> map = new HashMap<>();
-        map.put("portId",portId);
-        map.put("batchId",batchId);
-        map.put("resultMaterialNumber",resultNumberOfLoans);
-        wmshboundFeign.addWarehousingResult(map);
+//        // 修改港存库实时库存
+//        BigDecimal pierId = amsshipCargoTransferResult.getGroupId();
+//        BigDecimal portId = amsshipCargoTransferResultMapper.selectPortId(pierId);
+//        BigDecimal batchId = amsshipCargoTransferResult.getBatchId();
+//        BigDecimal resultNumberOfLoans = amsshipCargoTransferResult.getResultNumberOfLoans();
+//        Map<String,Object> map1 = new HashMap<>();
+//        map.put("portId",portId);
+//        map.put("batchId",batchId);
+//        map.put("resultMaterialNumber",resultNumberOfLoans);
+//        wmshboundFeign.addWarehousingResult(map);
         String resultNumber="ZY"+date+"00"+cargoTransferResultId;
         amsshipCargoTransferResult.setResultNumber(resultNumber);
+        //同时新增批次
+        //获取外轮船名
+        String foreignShipName = (String)map.get("foreignShipName");
+        Integer materialId=(Integer)map.get("materialId");
+        //调用新增批次方法
+        DilBatch dilBatch=new DilBatch();
+        BigDecimal batchId1=dilBatchMapper.selectBatchId();
+        dilBatch.setBatchId(batchId1);
+        dilBatch.setInsertTime(new Date());
+        dilBatch.setResultForeignShipName(foreignShipName);
+        dilBatch.setMaterialId(new BigDecimal(materialId));
+        dilBatch.setInsertUsername("admin");
+        dilBatchMapper.insertSelective(dilBatch);
+        //获取批次id进行新增
+        amsshipCargoTransferResult.setBatchId(dilBatch.getBatchId());
+        //获取货权转移送达单位
+        Integer carrierId =(Integer)map.get("carrierId");
+        amsshipCargoTransferResult.setCarrierId(new BigDecimal(carrierId));
+        //获取联系人
+        String contactPerson =(String)map.get("contactPerson");
+        amsshipCargoTransferResult.setResultContactPerson(contactPerson);
+        //获取联系方式
+        String telephoneFax =(String)map.get("telephoneFax");
+        amsshipCargoTransferResult.setResultTelephoneFax(telephoneFax);
+        //获取收货人id
+        Integer groupId =(Integer)map.get("groupId");
+        amsshipCargoTransferResult.setGroupId(new BigDecimal(groupId));
+        //获取放货数量
+        Integer number =(Integer) map.get("number");
+        amsshipCargoTransferResult.setResultNumberOfLoans(new BigDecimal(number));
+        //获取货代信息
+        String forwaredingInfo = (String)map.get("forwaredingInfo");
+        amsshipCargoTransferResult.setResultFreightForwardingInfo(forwaredingInfo);
+        //获取备注
+        String remark =(String) map.get("remark");
+        amsshipCargoTransferResult.setInsertUpdateRemark(remark);
+        amsshipCargoTransferResult.setResultDateOfLoans(new Date());
         //  设置常规字段
         amsshipCargoTransferResult.setInsertTime(new Date());
         amsshipCargoTransferResult.setDeleteName(null);
@@ -70,7 +112,7 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
         amsshipCargoTransferResult.setInsertUpdateRemark("无");
         amsshipCargoTransferResult.setUpdateUsername("admin");
         amsshipCargoTransferResult.setDeleted(new BigDecimal(0));
-        return amsshipCargoTransferResultMapper.insert(amsshipCargoTransferResult);
+        return amsshipCargoTransferResultMapper.insertSelective(amsshipCargoTransferResult);
     }
 
     @Override
@@ -118,6 +160,10 @@ public class AmsshipCargoTransferResultServiceImpl implements IAmsshipCargoTrans
         return amsshipCargoTransferResultMapper.insertBetchId();
     }
 
+    @Override
+    public List<Map<String, Object>> selectMaterialIdByMaterialTypeId() {
+        return amsshipCargoTransferResultMapper.selectMaterialIdByMaterialTypeId();
+    }
 
 
 }

+ 36 - 0
src/main/java/com/steerinfo/dil/service/impl/DilBatchServiceImpl.java

@@ -0,0 +1,36 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.dil.model.DilBatch;
+import com.steerinfo.dil.mapper.DilBatchMapper;
+import com.steerinfo.dil.service.IDilBatchService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * DilBatch服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-11-06 10:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-11-06
+ * 作者:generator
+ * 参考:
+ * 描述:DilBatch服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dilBatchService")
+public class DilBatchServiceImpl extends BaseServiceImpl<DilBatch, Short> implements IDilBatchService {
+
+    @Autowired
+    private DilBatchMapper dilBatchMapper;
+
+    @Override
+    protected IBaseMapper<DilBatch, Short> getMapper() {
+        return dilBatchMapper;
+    }
+}

+ 119 - 107
src/main/resources/com/steerinfo/dil/mapper/AmsshipCargoTransferResultMapper.xml

@@ -2,46 +2,43 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.AmsshipCargoTransferResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsshipCargoTransferResult">
-        <id column="CARGO_TRANSFER_RESULT_ID" jdbcType="DECIMAL" property="cargoTransferResultId"/>
-        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
-        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId"/>
-        <result column="RESULT_CONTACT_PERSON" jdbcType="VARCHAR" property="resultContactPerson"/>
-        <result column="RESULT_TELEPHONE_FAX" jdbcType="VARCHAR" property="resultTelephoneFax"/>
-        <result column="GROUP_ID" jdbcType="DECIMAL" property="groupId"/>
-        <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId"/>
-        <result column="RESULT_NUMBER_OF_LOANS" jdbcType="DECIMAL" property="resultNumberOfLoans"/>
-        <result column="RESULT_FREIGHT_FORWARDING_INFO" jdbcType="VARCHAR" property="resultFreightForwardingInfo"/>
-        <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo"/>
-        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
-        <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
+        <id column="CARGO_TRANSFER_RESULT_ID" jdbcType="DECIMAL" property="cargoTransferResultId" />
+        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber" />
+        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
+        <result column="RESULT_CONTACT_PERSON" jdbcType="VARCHAR" property="resultContactPerson" />
+        <result column="RESULT_TELEPHONE_FAX" jdbcType="VARCHAR" property="resultTelephoneFax" />
+        <result column="GROUP_ID" jdbcType="DECIMAL" property="groupId" />
+        <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+        <result column="RESULT_NUMBER_OF_LOANS" jdbcType="DECIMAL" property="resultNumberOfLoans" />
+        <result column="RESULT_FREIGHT_FORWARDING_INFO" jdbcType="VARCHAR" property="resultFreightForwardingInfo" />
+        <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo" />
+        <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
+        <result column="DELETE_TIME" jdbcType="VARCHAR" property="deleteTime" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+        <result column="RESULT_DATE_OF_LOANS" jdbcType="TIMESTAMP" property="resultDateOfLoans" />
     </resultMap>
     <sql id="columns">
-        CARGO_TRANSFER_RESULT_ID, RESULT_NUMBER, CARRIER_ID, RESULT_CONTACT_PERSON, RESULT_TELEPHONE_FAX,
-    GROUP_ID, BATCH_ID, RESULT_NUMBER_OF_LOANS, RESULT_FREIGHT_FORWARDING_INFO, RESULT_MEMO,
-    DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-    INSERT_UPDATE_REMARK, DELETED
+    CARGO_TRANSFER_RESULT_ID, RESULT_NUMBER, CARRIER_ID, RESULT_CONTACT_PERSON, RESULT_TELEPHONE_FAX,
+    GROUP_ID, BATCH_ID, RESULT_NUMBER_OF_LOANS, RESULT_FREIGHT_FORWARDING_INFO, RESULT_MEMO, 
+    DELETE_NAME, DELETE_TIME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+    INSERT_UPDATE_REMARK, DELETED, RESULT_DATE_OF_LOANS
     </sql>
     <sql id="columns_alias">
-        t.CARGO_TRANSFER_RESULT_ID, t.RESULT_NUMBER, t.CARRIER_ID, t.RESULT_CONTACT_PERSON,
-    t.RESULT_TELEPHONE_FAX, t.GROUP_ID, t.BATCH_ID, t.RESULT_NUMBER_OF_LOANS, t.RESULT_FREIGHT_FORWARDING_INFO,
-    t.RESULT_MEMO, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
+        t.CARGO_TRANSFER_RESULT_ID, t.RESULT_NUMBER, t.CARRIER_ID, t.RESULT_CONTACT_PERSON, 
+    t.RESULT_TELEPHONE_FAX, t.GROUP_ID, t.BATCH_ID, t.RESULT_NUMBER_OF_LOANS, t.RESULT_FREIGHT_FORWARDING_INFO, 
+    t.RESULT_MEMO, t.DELETE_NAME, t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.RESULT_DATE_OF_LOANS
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM AMSSHIP_CARGO_TRANSFER_RESULT
+        SELECT <include refid="columns" /> FROM AMSSHIP_CARGO_TRANSFER_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM AMSSHIP_CARGO_TRANSFER_RESULT t
+        SELECT <include refid="columns_alias" /> FROM AMSSHIP_CARGO_TRANSFER_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -99,6 +96,9 @@
             <if test="deleted != null">
                 and DELETED = #{deleted}
             </if>
+            <if test="resultDateOfLoans != null">
+                and TO_CHAR(RESULT_DATE_OF_LOANS,'yyyy-MM-dd') = #{resultDateOfLoans}
+            </if>
         </where>
     </sql>
     <sql id="whereLike">
@@ -157,11 +157,13 @@
             <if test="deleted != null">
                 and DELETED = #{deleted}
             </if>
+            <if test="resultDateOfLoans != null">
+                and TO_CHAR(RESULT_DATE_OF_LOANS,'yyyy-MM-dd') = #{resultDateOfLoans}
+            </if>
         </where>
     </sql>
-    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-        delete
-        from AMSSHIP_CARGO_TRANSFER_RESULT
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+        delete from AMSSHIP_CARGO_TRANSFER_RESULT
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -218,6 +220,9 @@
         <if test="deleted != null">
             or DELETED = #{deleted}
         </if>
+        <if test="resultDateOfLoans != null">
+            or TO_CHAR(RESULT_DATE_OF_LOANS,'yyyy-MM-dd') = '#{resultDateOfLoans}'
+        </if>
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
         insert into AMSSHIP_CARGO_TRANSFER_RESULT (CARGO_TRANSFER_RESULT_ID, RESULT_NUMBER,
@@ -226,15 +231,16 @@
                                                    RESULT_FREIGHT_FORWARDING_INFO, RESULT_MEMO,
                                                    DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
                                                    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
-                                                   INSERT_UPDATE_REMARK, DELETED)
+                                                   INSERT_UPDATE_REMARK, DELETED, RESULT_DATE_OF_LOANS
+        )
         values (#{cargoTransferResultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR},
-                #{carrierId,jdbcType=DECIMAL}, #{resultContactPerson,jdbcType=VARCHAR},
-                #{resultTelephoneFax,jdbcType=VARCHAR},
+                #{carrierId,jdbcType=DECIMAL}, #{resultContactPerson,jdbcType=VARCHAR}, #{resultTelephoneFax,jdbcType=VARCHAR},
                 #{groupId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{resultNumberOfLoans,jdbcType=DECIMAL},
                 #{resultFreightForwardingInfo,jdbcType=VARCHAR}, #{resultMemo,jdbcType=VARCHAR},
                 #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
                 #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
+                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{resultDateOfLoans,jdbcType=TIMESTAMP}
+               )
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
         insert into AMSSHIP_CARGO_TRANSFER_RESULT
@@ -293,6 +299,9 @@
             <if test="deleted != null">
                 DELETED,
             </if>
+            <if test="resultDateOfLoans != null">
+                RESULT_DATE_OF_LOANS,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="cargoTransferResultId != null">
@@ -349,27 +358,31 @@
             <if test="deleted != null">
                 #{deleted,jdbcType=DECIMAL},
             </if>
+            <if test="resultDateOfLoans != null">
+                #{resultDateOfLoans,jdbcType=TIMESTAMP},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
         update AMSSHIP_CARGO_TRANSFER_RESULT
-        set RESULT_NUMBER                  = #{resultNumber,jdbcType=VARCHAR},
-            CARRIER_ID                     = #{carrierId,jdbcType=DECIMAL},
-            RESULT_CONTACT_PERSON          = #{resultContactPerson,jdbcType=VARCHAR},
-            RESULT_TELEPHONE_FAX           = #{resultTelephoneFax,jdbcType=VARCHAR},
-            GROUP_ID                       = #{groupId,jdbcType=DECIMAL},
-            BATCH_ID                       = #{batchId,jdbcType=DECIMAL},
-            RESULT_NUMBER_OF_LOANS         = #{resultNumberOfLoans,jdbcType=DECIMAL},
+        set RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
+            CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+            RESULT_CONTACT_PERSON = #{resultContactPerson,jdbcType=VARCHAR},
+            RESULT_TELEPHONE_FAX = #{resultTelephoneFax,jdbcType=VARCHAR},
+            GROUP_ID = #{groupId,jdbcType=DECIMAL},
+            BATCH_ID = #{batchId,jdbcType=DECIMAL},
+            RESULT_NUMBER_OF_LOANS = #{resultNumberOfLoans,jdbcType=DECIMAL},
             RESULT_FREIGHT_FORWARDING_INFO = #{resultFreightForwardingInfo,jdbcType=VARCHAR},
-            RESULT_MEMO                    = #{resultMemo,jdbcType=VARCHAR},
-            DELETE_NAME                    = #{deleteName,jdbcType=VARCHAR},
-            DELETE_TIME                    = #{deleteTime,jdbcType=VARCHAR},
-            INSERT_USERNAME                = #{insertUsername,jdbcType=VARCHAR},
-            INSERT_TIME                    = #{insertTime,jdbcType=TIMESTAMP},
-            UPDATE_USERNAME                = #{updateUsername,jdbcType=VARCHAR},
-            UPDATE_TIME                    = #{updateTime,jdbcType=TIMESTAMP},
-            INSERT_UPDATE_REMARK           = #{insertUpdateRemark,jdbcType=VARCHAR},
-            DELETED                        = #{deleted,jdbcType=DECIMAL}
+            RESULT_MEMO = #{resultMemo,jdbcType=VARCHAR},
+            DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+            DELETE_TIME = #{deleteTime,jdbcType=VARCHAR},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETED = #{deleted,jdbcType=DECIMAL},
+            RESULT_DATE_OF_LOANS = #{resultDateOfLoans,jdbcType=TIMESTAMP}
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsshipCargoTransferResult">
@@ -426,20 +439,23 @@
             <if test="deleted != null">
                 DELETED = #{deleted,jdbcType=DECIMAL},
             </if>
+            <if test="resultDateOfLoans != null">
+                RESULT_DATE_OF_LOANS = #{resultDateOfLoans,jdbcType=TIMESTAMP},
+            </if>
         </set>
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </update>
-    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
-        <include refid="select"/>
+    <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+        <include refid="select" />
         where CARGO_TRANSFER_RESULT_ID = #{cargoTransferResultId,jdbcType=DECIMAL}
     </select>
     <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="where"/>
+        <include refid="select" />
+        <include refid="where" />
     </select>
     <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="whereLike"/>
+        <include refid="select" />
+        <include refid="whereLike" />
     </select>
     <insert id="batchInsert" parameterType="java.util.List">
         insert into AMSSHIP_CARGO_TRANSFER_RESULT
@@ -451,130 +467,114 @@
         DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
         INSERT_TIME, UPDATE_USERNAME,
         UPDATE_TIME, INSERT_UPDATE_REMARK,
-        DELETED)
+        DELETED, RESULT_DATE_OF_LOANS)
         ( <foreach collection="list" item="item" separator="union all">
         select
         #{item.cargoTransferResultId,jdbcType=DECIMAL},
-        #{item.resultNumber,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL},
-        #{item.resultContactPerson,jdbcType=VARCHAR},
+        #{item.resultNumber,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL}, #{item.resultContactPerson,jdbcType=VARCHAR},
         #{item.resultTelephoneFax,jdbcType=VARCHAR}, #{item.groupId,jdbcType=DECIMAL},
         #{item.batchId,jdbcType=DECIMAL}, #{item.resultNumberOfLoans,jdbcType=DECIMAL},
         #{item.resultFreightForwardingInfo,jdbcType=VARCHAR}, #{item.resultMemo,jdbcType=VARCHAR},
-        #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR},
-        #{item.insertUsername,jdbcType=VARCHAR},
+        #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
         #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
         #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
-        #{item.deleted,jdbcType=DECIMAL} from dual
+        #{item.deleted,jdbcType=DECIMAL}, #{item.resultDateOfLoans,jdbcType=TIMESTAMP} from dual
     </foreach> )
     </insert>
     <update id="batchUpdate" parameterType="java.util.List">
         update AMSSHIP_CARGO_TRANSFER_RESULT
         set
         CARGO_TRANSFER_RESULT_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.cargoTransferResultId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_NUMBER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
         </foreach>
         ,CARRIER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_CONTACT_PERSON=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultContactPerson,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_TELEPHONE_FAX=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultTelephoneFax,jdbcType=VARCHAR}
         </foreach>
         ,GROUP_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.groupId,jdbcType=DECIMAL}
         </foreach>
         ,BATCH_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_NUMBER_OF_LOANS=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultNumberOfLoans,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_FREIGHT_FORWARDING_INFO=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
-            when #{item.cargoTransferResultId,jdbcType=DECIMAL} then
-            #{item.resultFreightForwardingInfo,jdbcType=VARCHAR}
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
+            when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultFreightForwardingInfo,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_MEMO=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultMemo,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_NAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
         </foreach>
         ,DELETE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,DELETED=
-        <foreach collection="list" item="item" index="index" separator=" " open="case CARGO_TRANSFER_RESULT_ID"
-                 close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
             when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
         </foreach>
+        ,RESULT_DATE_OF_LOANS=
+        <foreach close="end" collection="list" index="index" item="item" open="case CARGO_TRANSFER_RESULT_ID" separator=" ">
+            when #{item.cargoTransferResultId,jdbcType=DECIMAL} then #{item.resultDateOfLoans,jdbcType=TIMESTAMP}
+        </foreach>
         where CARGO_TRANSFER_RESULT_ID in
-        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.cargoTransferResultId,jdbcType=DECIMAL}
         </foreach>
     </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from AMSSHIP_CARGO_TRANSFER_RESULT
         where CARGO_TRANSFER_RESULT_ID in
-        <foreach collection="list" item="id" open="(" close=")" separator=",">
+        <foreach close=")" collection="list" item="id" open="(" separator=",">
             #{id}
         </foreach>
     </delete>
     <!-- 友情提示!!!-->
     <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
     <select id="seletCargoTransfer" resultType="java.util.Map">
         select *
         from
@@ -716,5 +716,17 @@
         FROM RMS_PIER
         WHERE PIER_ID = #{pierId}
     </select>
+    <!-- 查询船运物资id-->
+    <select id="selectMaterialIdByMaterialTypeId" resultType="java.util.LinkedHashMap">
+        select  RM.MATERIAL_ID "id",
+                RM.MATERIAL_ID "value",
+                RM.MATERIAL_NAME  "label"
+
+        from RMS_MATERIAL RM
+                 left join RMS_MATERIAL_TYPE RMT
+                           on RM.MATERIAL_TYPE_ID=RMT.MATERIAL_TYPE_ID
+        where RM.MATERIAL_LENGTH is NULL  and RM.MATERIAL_SPECIFICATION is NULL
+          and   RMT.MATERIAL_TYPE_ID=1
+    </select>
 
 </mapper>

+ 293 - 0
src/main/resources/com/steerinfo/dil/mapper/DilBatchMapper.xml

@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.dil.mapper.DilBatchMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.DilBatch">
+    <id column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+    <result column="RESULT_FOREIGN_SHIP_NAME" jdbcType="VARCHAR" property="resultForeignShipName" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+  </resultMap>
+  <sql id="columns">
+    BATCH_ID, RESULT_FOREIGN_SHIP_NAME, MATERIAL_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.BATCH_ID, t.RESULT_FOREIGN_SHIP_NAME, t.MATERIAL_ID, t.INSERT_USERNAME, t.INSERT_TIME, 
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM DIL_BATCH
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM DIL_BATCH t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="resultForeignShipName != null and resultForeignShipName != ''">
+        and RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="resultForeignShipName != null and resultForeignShipName != ''">
+        and RESULT_FOREIGN_SHIP_NAME LIKE '%${resultForeignShipName}%'
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from DIL_BATCH
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DIL_BATCH
+    where 1!=1 
+      <if test="resultForeignShipName != null and resultForeignShipName != ''">
+        or RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName}
+      </if>
+      <if test="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        or INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        or UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.DilBatch">
+    insert into DIL_BATCH (BATCH_ID, RESULT_FOREIGN_SHIP_NAME, MATERIAL_ID, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{batchId,jdbcType=DECIMAL}, #{resultForeignShipName,jdbcType=VARCHAR}, #{materialId,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilBatch">
+    insert into DIL_BATCH
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="batchId != null">
+        BATCH_ID,
+      </if>
+      <if test="resultForeignShipName != null">
+        RESULT_FOREIGN_SHIP_NAME,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="batchId != null">
+        #{batchId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultForeignShipName != null">
+        #{resultForeignShipName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilBatch">
+    update DIL_BATCH
+    set RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName,jdbcType=VARCHAR},
+      MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilBatch">
+    update DIL_BATCH
+    <set>
+      <if test="resultForeignShipName != null">
+        RESULT_FOREIGN_SHIP_NAME = #{resultForeignShipName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
+    where BATCH_ID = #{batchId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into DIL_BATCH 
+      (BATCH_ID, 
+      RESULT_FOREIGN_SHIP_NAME, MATERIAL_ID, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.batchId,jdbcType=DECIMAL}, 
+      #{item.resultForeignShipName,jdbcType=VARCHAR}, #{item.materialId,jdbcType=DECIMAL}, 
+      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
+      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DIL_BATCH
+     set
+       BATCH_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_FOREIGN_SHIP_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.resultForeignShipName,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case BATCH_ID" separator=" ">
+          when #{item.batchId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where BATCH_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.batchId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DIL_BATCH
+    where BATCH_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  
+</mapper>