Просмотр исходного кода

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/DAL-DAZHOU-RMS-API

HUJIANGUO 3 лет назад
Родитель
Сommit
7177d7b891
43 измененных файлов с 1833 добавлено и 864 удалено
  1. 1 1
      pom.xml
  2. 0 2
      src/main/java/com/steerinfo/dil/component/ImageFileUtils.java
  3. 2 34
      src/main/java/com/steerinfo/dil/controller/DilNoticeController.java
  4. 12 3
      src/main/java/com/steerinfo/dil/controller/RmsCapacityController.java
  5. 113 0
      src/main/java/com/steerinfo/dil/controller/RmsCargodepController.java
  6. 1 31
      src/main/java/com/steerinfo/dil/controller/RmsGatepostController.java
  7. 39 31
      src/main/java/com/steerinfo/dil/controller/RmsMaterialTypeController.java
  8. 7 36
      src/main/java/com/steerinfo/dil/controller/RmsPersonnelController.java
  9. 2 24
      src/main/java/com/steerinfo/dil/controller/RmsPierController.java
  10. 2 25
      src/main/java/com/steerinfo/dil/controller/RmsPortController.java
  11. 2 25
      src/main/java/com/steerinfo/dil/controller/RmsPortStorageYard.java
  12. 3 35
      src/main/java/com/steerinfo/dil/controller/RmsShipperController.java
  13. 2 30
      src/main/java/com/steerinfo/dil/controller/RmsTruckCalculateController.java
  14. 6 34
      src/main/java/com/steerinfo/dil/controller/RmsWarehouseController.java
  15. 2 0
      src/main/java/com/steerinfo/dil/mapper/RmsCapacityMapper.java
  16. 31 0
      src/main/java/com/steerinfo/dil/mapper/RmsCargodepMapper.java
  17. 7 0
      src/main/java/com/steerinfo/dil/mapper/RmsMaterialTypeMapper.java
  18. 3 0
      src/main/java/com/steerinfo/dil/mapper/RmsPersonnelMapper.java
  19. 4 0
      src/main/java/com/steerinfo/dil/mapper/RmsWarehouseMapper.java
  20. 15 0
      src/main/java/com/steerinfo/dil/model/RmsCapacityCarrier.java
  21. 169 0
      src/main/java/com/steerinfo/dil/model/RmsCargodep.java
  22. 100 40
      src/main/java/com/steerinfo/dil/model/RmsMaterialType.java
  23. 15 0
      src/main/java/com/steerinfo/dil/model/RmsPersonnel.java
  24. 3 1
      src/main/java/com/steerinfo/dil/service/IRmsCapacityService.java
  25. 39 0
      src/main/java/com/steerinfo/dil/service/IRmsCargodepService.java
  26. 4 0
      src/main/java/com/steerinfo/dil/service/IRmsMaterialTypeService.java
  27. 2 2
      src/main/java/com/steerinfo/dil/service/IRmsPersonnelService.java
  28. 1 1
      src/main/java/com/steerinfo/dil/service/IRmsWarehouseService.java
  29. 16 4
      src/main/java/com/steerinfo/dil/service/impl/RmsCapacityServiceImpl.java
  30. 97 0
      src/main/java/com/steerinfo/dil/service/impl/RmsCargodepServiceImpl.java
  31. 19 0
      src/main/java/com/steerinfo/dil/service/impl/RmsMaterialTypeServiceImpl.java
  32. 63 39
      src/main/java/com/steerinfo/dil/service/impl/RmsPersonnelServiceImpl.java
  33. 19 6
      src/main/java/com/steerinfo/dil/service/impl/RmsWarehouseServiceImpl.java
  34. 1 1
      src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java
  35. 1 0
      src/main/resources/application-dev.yml
  36. 1 1
      src/main/resources/application-prod.yml
  37. 6 5
      src/main/resources/bootstrap.yml
  38. 130 104
      src/main/resources/com/steerinfo/dil/mapper/RmsCapacityCarrierMapper.xml
  39. 16 2
      src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml
  40. 344 0
      src/main/resources/com/steerinfo/dil/mapper/RmsCargodepMapper.xml
  41. 295 148
      src/main/resources/com/steerinfo/dil/mapper/RmsMaterialTypeMapper.xml
  42. 232 199
      src/main/resources/com/steerinfo/dil/mapper/RmsPersonnelMapper.xml
  43. 6 0
      src/main/resources/com/steerinfo/dil/mapper/RmsWarehouseMapper.xml

+ 1 - 1
pom.xml

@@ -111,7 +111,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>RMS_CAPACITY_CARRIER</param>
+                        <param>RMS_PERSONNEL</param>
                     </tables>
                 </configuration>
                 <executions>

+ 0 - 2
src/main/java/com/steerinfo/dil/component/ImageFileUtils.java

@@ -142,9 +142,7 @@ public class ImageFileUtils implements FileUtils {
     public Object downloadFile(String filePath) throws Exception {
         File file = new File(filePath);
         if(file.isDirectory()){
-
             throw new RuntimeException("当前路径是目录");
-
         }
         byte[] b = bytes(file);
         String type =getFileHeader(b);

+ 2 - 34
src/main/java/com/steerinfo/dil/controller/DilNoticeController.java

@@ -153,43 +153,11 @@ public class DilNoticeController extends BaseRESTfulController {
                                                Integer pageNum,
                                                Integer pageSize,
                                                String con) {
-        if (mapValue==null){
-            mapValue=new HashMap<>();
-        }
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_notice_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = dilNoticeService.getNoticeList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_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 = dilNoticeService.getNoticeList(mapValue);
-        }
+
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = dilNoticeService.getNoticeList(mapValue);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }
 

+ 12 - 3
src/main/java/com/steerinfo/dil/controller/RmsCapacityController.java

@@ -61,7 +61,7 @@ public class RmsCapacityController extends BaseRESTfulController {
 
     /**
      * 根据id更新运力信息
-     * @param rmsCapacity
+     * @param map
      * @return
      */
     @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的rmsCapacity信息来更新详细信息")
@@ -70,8 +70,8 @@ public class RmsCapacityController extends BaseRESTfulController {
             @ApiImplicitParam(name = "rmsCapacity", value = "详细实体rmsCapacity", required = true, dataType = "RmsCapacity")
     })
     @PostMapping(value = "/updateCapacity", produces  = "application/json;charset=UTF-8")
-    public RESTfulResult updateCapacity( @RequestBody RmsCapacity rmsCapacity){
-        int result = rmsCapacityService.updateCapacity(rmsCapacity);
+    public RESTfulResult updateCapacity( @RequestBody Map<String,Object> map){
+        int result = rmsCapacityService.updateCapacity(map);
         return success(result);
     }
 
@@ -109,6 +109,15 @@ public class RmsCapacityController extends BaseRESTfulController {
         return success(resultList);
     }
 
+
+    @ApiOperation(value="获取运力详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    @PostMapping(value = "/getCapacityInfoById/{id}")
+    public RESTfulResult getCapacityInfoById(@PathVariable("id") Integer id) throws Exception {
+        List<Map<String,Object>> list= rmsCapacityService.getCapacityByCapacityId(id);
+        return success(list);
+    }
+
     /*
     * 运力类型下拉框
     * */

+ 113 - 0
src/main/java/com/steerinfo/dil/controller/RmsCargodepController.java

@@ -0,0 +1,113 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.dil.model.RmsCargodep;
+import com.steerinfo.dil.service.IRmsCargodepService;
+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.*;
+import java.math.BigDecimal;
+
+/**
+ * RmsCargodep RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-07 12:00
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-07
+ * 作者:generator
+ * 参考:
+ * 描述:RmsCargodep RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/rmscargodeps")
+public class RmsCargodepController extends BaseRESTfulController {
+
+    @Autowired
+    IRmsCargodepService rmsCargodepService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="创建", notes="根据RmsCargoDep对象创建")
+    @ApiImplicitParam(name = "RmsCargoDep", value = "详细实体RmsCargoDep", required = true, dataType = "RmsCargoDep")
+    @PostMapping(value = "/insertCargoDep")
+    public RESTfulResult insertCargoDep(@RequestBody(required = false) Map<String,Object> mapValue){
+        int result = rmsCargodepService.insetCargoDep(mapValue);
+        if (result == -1){
+            return failed("系统已经存在该送达单位,请仔细查找");
+        }
+        return success(result);
+    }
+
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "BigDecimal")
+    @PostMapping(value = "/getCargoDepById/{id}")
+    public RESTfulResult getCargoDepById(@PathVariable("id") BigDecimal id){
+        List<Map<String,Object>> list= rmsCargodepService.getCargoDepById(id);
+        return success(list);
+    }
+
+
+    @ApiOperation(value="更新", notes="根据RmsCargoDep对象更新")
+    @ApiImplicitParam(name = "RmsCargoDep", value = "详细实体RmsCargoDep", required = true, dataType = "RmsCargoDep")
+    @PostMapping(value = "/updateCargoDep")
+    public RESTfulResult updateCargoDep(@RequestBody(required = false) Map<String,Object> mapValue){
+        int result = rmsCargodepService.updateCargoDep(mapValue);
+        return success(result);
+    }
+
+    @ApiOperation(value="删除", notes="根据RmsCargoDep对象删除")
+    @ApiImplicitParam(name = "RmsCargoDep", value = "详细实体RmsCargoDep", required = true, dataType = "RmsCargoDep")
+    @PostMapping(value = "/deleteCargoDep")
+    public RESTfulResult deleteCargoDep(@RequestBody(required = false) Map<String,Object> map){
+        int result=rmsCargodepService.deleteCargoDep(map);
+        return success(result);
+    }
+
+
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "487", required = false, dataType = "BigDecimal"),
+    })
+
+    @PostMapping(value = "/getCargoDep")
+    public RESTfulResult getCargoDep(@RequestBody(required = false) Map<String, Object> mapValue,
+                                        Integer apiId,
+                                        Integer pageNum,
+                                        Integer pageSize,
+                                        String con) {
+        if (mapValue == null) {
+            mapValue = new HashMap<>();
+        }
+        if (con != null && (con.equals("") || con.equals("undefined")) ) {
+            con = null;
+        }
+        if (con != null && con.length() != 0) {
+            mapValue.put("con","%" + con + "%");
+        }
+
+        PageHelper.startPage(pageNum, pageSize);
+        //初始化过滤
+        List<Map<String, Object>> columnList = rmsCargodepService.getCargoDepList(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
+        return success(data);
+    }
+
+}

+ 1 - 31
src/main/java/com/steerinfo/dil/controller/RmsGatepostController.java

@@ -69,41 +69,11 @@ public class RmsGatepostController extends BaseRESTfulController {
                                          Integer pageNum,
                                          Integer pageSize,
                                          String con) throws ParseException {
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_gatepost_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsGatepostService.getGatepostList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_gatepost_list");
-            //添加id
-            map.put("indexId", "gatepostId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsGatepostService.getGatepostList(mapValue);
-        }
 
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsGatepostService.getGatepostList(mapValue);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }
 

+ 39 - 31
src/main/java/com/steerinfo/dil/controller/RmsMaterialTypeController.java

@@ -53,42 +53,50 @@ public class RmsMaterialTypeController extends BaseRESTfulController {
         if (mapValue==null){
             mapValue=new HashMap<>();
         }
-
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_material_type_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsMaterialTypeService.getMaterialTypeList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_material_type_list");
-            //添加id
-            map.put("indexId", "materialTypeId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsMaterialTypeService.getMaterialTypeList(mapValue);
+        if (con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
         }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsMaterialTypeService.getMaterialTypeList(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
+        return success(data);
+    }
 
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "376", required = false, dataType = "BigDecimal"),
+    })
+    @PostMapping(value = "/getInwardContractMaterial")
+    public RESTfulResult getInwardContractMaterial(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer apiId,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             String con){
+        if (mapValue==null){
+            mapValue=new HashMap<>();
+        }
+        if(con != null){
+            mapValue.put("con","%" + con + "%");
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = rmsMaterialTypeService.getInwardContractMaterial(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }
+
+    /**
+     * 新增货物品名
+     * @param mapValue
+     * @return
+     */
+    @PostMapping("/insertMaterialType")
+    public RESTfulResult insertMaterialType(@RequestBody(required = false) Map<String,Object> mapValue){
+        int i = rmsMaterialTypeService.insertMaterialType(mapValue);
+        return success(i);
+    }
+
+
 }

+ 7 - 36
src/main/java/com/steerinfo/dil/controller/RmsPersonnelController.java

@@ -69,40 +69,11 @@ public class RmsPersonnelController extends BaseRESTfulController {
                                           Integer pageSize,
                                           String con){
 
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_personnel_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsPersonnelService.getPersonnelList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_personnel_list");
-            //添加id
-            map.put("indexId", "personnelId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsPersonnelService.getPersonnelList(mapValue);
-        }
+
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsPersonnelService.getPersonnelList(mapValue);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId,listTotal,columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId,null,columnList);
         return success(data);
     }
 
@@ -115,8 +86,8 @@ public class RmsPersonnelController extends BaseRESTfulController {
     @ApiImplicitParam(name = "rmsPersonnel", value = "详细实体rmsPersonnel", required = false, dataType = "RmsPersonnel")
     //@RequiresPermissions("rmspersonnel:create")
     @PostMapping(value = "/insertPersonnel")
-    public RESTfulResult insertPersonnel(@RequestBody RmsPersonnel rmsPersonnel){
-        int result=rmsPersonnelService.insertPersonnel(rmsPersonnel);
+    public RESTfulResult insertPersonnel(@RequestBody(required = false) Map<String,Object> map){
+        int result=rmsPersonnelService.insertPersonnel(map);
         if (result <= 0){
             return failed();
         }
@@ -216,13 +187,13 @@ public class RmsPersonnelController extends BaseRESTfulController {
 
     /**
      * 新增人员权限
-     * @param rmsPersonnel
+     * @param map
      * @return
      */
     @ApiOperation(value="创建", notes="RmsPersonnel对象创建")
     @PostMapping(value = "/addPersonnel")
-    public RESTfulResult addPersonnel(@RequestBody RmsPersonnel rmsPersonnel){
-        int result = rmsPersonnelService.addPersonnel(rmsPersonnel);
+    public RESTfulResult addPersonnel(@RequestBody(required = false) Map<String,Object> map){
+        int result = rmsPersonnelService.addPersonnel(map);
         if (result <= 0){
             return failed();
         }

+ 2 - 24
src/main/java/com/steerinfo/dil/controller/RmsPierController.java

@@ -109,30 +109,8 @@ public class RmsPierController extends BaseRESTfulController {
                                  Integer pageSize,
                                  Integer apiId,
                                  String con){
-        if(con != null ){
-            if(!"undefined".equals(con)){
-                String index = "get_rmspier";
-                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
-            }
-        }
-        List<Map<String,Object>> pierList = null;
-        if(mapVal.size() == 0){
-            //将查询结果存入索引中
-            pierList = rmsPierService.getPier(mapVal);
-            Map<String,Object>pierMap = new HashMap<>();
-            //添加索引
-            pierMap.put("index","get_rmspier");
-            //添加ID
-            pierMap.put("indexId","pierId");
-            pierList.add(pierMap);
-            //新建索引
-            esFeign.insertIndex(pierList);
-            //删除
-            pierList.remove(pierList.size()-1);
-        }
-        if(pierList == null){
-            pierList = rmsPierService.getPier(mapVal);
-        }
+
+        List<Map<String,Object>>   pierList = rmsPierService.getPier(mapVal);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsPierService.getPier(mapVal);

+ 2 - 25
src/main/java/com/steerinfo/dil/controller/RmsPortController.java

@@ -107,34 +107,11 @@ public class RmsPortController extends BaseRESTfulController {
                                          Integer pageSize,
                                          Integer apiId,
                                          String con){
-        if (con != null) {
-            if(!"undefined".equals(con)){
-                String index = "get_rms_port";
-                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
-            }
-        }
-        List<Map<String,Object>>portList = null;
-        if(mapVal.size() ==0 ){
-            //将查询结果存入索引中
-            portList = rmsPortService.getPort(mapVal);
-            Map<String,Object>portMap = new HashMap<>();
-            //添加索引
-            portMap.put("index","get_rms_port");
-            //添加ID
-            portMap.put("indexId","portId");
-            portList.add(portMap);
-            //新建索引
-            esFeign.insertIndex(portList);
-            //删除
-            portList.remove(portList.size()-1);
-        }
-        if(portList == null){
-            portList = rmsPortService.getPort(mapVal);
-        }
+
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsPortService.getPort(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, portList, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }
 

+ 2 - 25
src/main/java/com/steerinfo/dil/controller/RmsPortStorageYard.java

@@ -114,34 +114,11 @@ public class RmsPortStorageYard extends BaseRESTfulController {
                                  Integer pageSize,
                                  Integer apiId,
                                      String con){
-        if(con != null) {
-            if(!"undefined".equals(con)){
-                String index = "get_rms_portyard";
-                return success(esFeign.getConResult(mapVal,index,apiId,pageNum,pageSize,con));
-            }
-        }
-        List<Map<String,Object>> portYardlist = null;
-        if(mapVal.size() == 0){
-            //将查询结果存入索引中
-            portYardlist = rmsPortStorageYardService.getPortYard(mapVal);
-            Map<String,Object>portYardMap = new HashMap<>();
-            //添加索引
-            portYardMap.put("index","get_rms_portyard");
-            //添加ID
-            portYardMap.put("indexId","portyardId");
-            portYardlist.add(portYardMap);
-            //新建索引
-            esFeign.insertIndex(portYardlist);
-            //删除
-            portYardlist.remove(portYardlist.size()-1);
-        }
-        if(portYardlist == null){
-            portYardlist = rmsPortStorageYardService.getPortYard(mapVal);
-        }
+
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsPortStorageYardService.getPortYard(mapVal);
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, portYardlist, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }
 

+ 3 - 35
src/main/java/com/steerinfo/dil/controller/RmsShipperController.java

@@ -67,44 +67,12 @@ public class RmsShipperController extends BaseRESTfulController {
                                         Integer pageNum,
                                         Integer pageSize,
                                         String con){
-        if (mapValue==null){
-            mapValue=new HashMap<>();
-        }
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_shipper_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsShipperService.getShipperList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_shipper_list");
-            //添加id
-            map.put("indexId", "shipperId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsShipperService.getShipperList(mapValue);
-        }
+
+
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsShipperService.getShipperList(mapValue);
-
-        PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }
 

+ 2 - 30
src/main/java/com/steerinfo/dil/controller/RmsTruckCalculateController.java

@@ -133,39 +133,11 @@ public class RmsTruckCalculateController extends BaseRESTfulController {
                                                 Integer pageSize,
                                                 Integer apiId,
                                                 String con) {
-        if (mapValue==null){
-            mapValue=new HashMap<>();
-        }
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_truck_calculate_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
+
         //初始化过滤
         List<Map<String, Object>> listTotal = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsTruckCalculateService.getTruckCalculateList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_truck_calculate_list");
-            //添加id
-            map.put("indexId", "truckCalculateId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsTruckCalculateService.getTruckCalculateList(mapValue);
-        }
+        listTotal = rmsTruckCalculateService.getTruckCalculateList(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsTruckCalculateService.getTruckCalculateList(mapValue);

+ 6 - 34
src/main/java/com/steerinfo/dil/controller/RmsWarehouseController.java

@@ -48,8 +48,11 @@ public class RmsWarehouseController extends BaseRESTfulController {
     @ApiOperation(value="创建", notes="根据RmsWarehouse对象创建")
     @ApiImplicitParam(name = "rmsWarehouse", value = "详细实体rmsWarehouse", required = true, dataType = "RmsWarehouse")
     @PostMapping(value = "/insertWarehouse")
-    public RESTfulResult insertWarehouse(@RequestBody(required = false) RmsWarehouse rmsWarehouse){
+    public RESTfulResult insertWarehouse(@RequestBody(required = false) Map<String,Object> rmsWarehouse){
         int result = rmsWarehouseService.insertWarehouse(rmsWarehouse);
+        if (result==-1){
+            return  failed("该仓库已经存在于系统中,请搜索查找");
+        }
         return success(result);
     }
 
@@ -127,39 +130,8 @@ public class RmsWarehouseController extends BaseRESTfulController {
                                                 Integer pageSize,
                                                 Integer apiId,
                                                 String con) {
-        if (mapValue==null){
-            mapValue=new HashMap<>();
-        }
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_warehouse_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsWarehouseService.getWarehouseList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_warehouse_list");
-            //添加id
-            map.put("indexId", "warehouseId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsWarehouseService.getWarehouseList(mapValue);
-        }
+
+        List<Map<String,Object>>   listTotal = rmsWarehouseService.getWarehouseList(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsWarehouseService.getWarehouseList(mapValue);

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/RmsCapacityMapper.java

@@ -39,4 +39,6 @@ public interface RmsCapacityMapper extends IBaseMapper<RmsCapacity, BigDecimal>
 
  //逻辑删除
  int updateCapacityCarrier(@Param("capacityId") String capacityId,@Param("carrierSSOId")  String carrierSSOId);
+
+ List<Map<String, Object>> getCapacityByCapacityId(Integer id);
 }

+ 31 - 0
src/main/java/com/steerinfo/dil/mapper/RmsCargodepMapper.java

@@ -0,0 +1,31 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.RmsCargodep;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+/**
+ * @Description:
+ * @Author:zx
+ * @CreateTime:2021/11/6 11:03
+ * @Version:V1.0
+ */
+@Mapper
+public interface RmsCargodepMapper extends IBaseMapper<RmsCargodep, BigDecimal> {
+    //根据货权转移收货单位茶找是否存在于数据库中
+    BigDecimal searchNumberForCagoName(Map<String,Object> map);
+
+    //获取主键id
+    @Select("select seq__WMSP_OUTBOUND_RESULT.nextval from dual")
+    BigDecimal selectCargoId();
+
+    List<Map<String, Object>> getCargoDepList(Map<String, Object> mapValue);
+
+    //通过id获取数据
+    List<Map<String, Object>> getCargoDepById(BigDecimal id);
+}

+ 7 - 0
src/main/java/com/steerinfo/dil/mapper/RmsMaterialTypeMapper.java

@@ -3,6 +3,7 @@ package com.steerinfo.dil.mapper;
 import com.steerinfo.dil.model.RmsMaterialType;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 import java.math.BigDecimal;
 import java.util.List;
@@ -15,4 +16,10 @@ public interface RmsMaterialTypeMapper extends IBaseMapper<RmsMaterialType, BigD
     List<RmsMaterialType> selectByParameters(Map<String, Object> parameters);
 
     List<Map<String, Object>> getMaterialTypeList(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getInwardContractMaterial(Map<String, Object> mapValue);
+
+    @Select("select seq__RMS_MATERIAL_TYPE.nextval from dual")
+    BigDecimal getMaterialTypeId();
+
 }

+ 3 - 0
src/main/java/com/steerinfo/dil/mapper/RmsPersonnelMapper.java

@@ -32,4 +32,7 @@ public interface RmsPersonnelMapper extends IBaseMapper<RmsPersonnel, BigDecimal
     List<Map<String, Object>> getThirdShipper(BigDecimal shipperId);
 // 查询sso主键和机构编码
     Map<String, Object> getShipperMap(BigDecimal shipperId);
+
+    //通过用户名和账号判断是否存在
+   BigDecimal getPersonnelIdByJobNumber(Map<String,Object> map);
 }

+ 4 - 0
src/main/java/com/steerinfo/dil/mapper/RmsWarehouseMapper.java

@@ -22,6 +22,10 @@ public interface RmsWarehouseMapper extends IBaseMapper<RmsWarehouse, BigDecimal
     @Select("select seq_RMS_WAREHOUSE.nextval from dual")
     BigDecimal selectWarehouseId();
 
+    //根据卸货点查找是否存在该卸货地点
+    BigDecimal searchWarehouseName(String warehouseName,BigDecimal shipperId);
+
+
     //仓库下拉框
     List<Map<String, Object>> getWarehouseTypeId();
 

+ 15 - 0
src/main/java/com/steerinfo/dil/model/RmsCapacityCarrier.java

@@ -62,6 +62,12 @@ public class RmsCapacityCarrier implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="逻辑删除0:未删除;1:已删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 使用单位(CAPACITY_USER_DEP,VARCHAR,255)
+     */
+    @ApiModelProperty(value="使用单位",required=false)
+    private String capacityUserDep;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -146,6 +152,14 @@ public class RmsCapacityCarrier implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public String getCapacityUserDep() {
+        return capacityUserDep;
+    }
+
+    public void setCapacityUserDep(String capacityUserDep) {
+        this.capacityUserDep = capacityUserDep == null ? null : capacityUserDep.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -161,6 +175,7 @@ public class RmsCapacityCarrier implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", capacityUserDep=").append(capacityUserDep);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 169 - 0
src/main/java/com/steerinfo/dil/model/RmsCargodep.java

@@ -0,0 +1,169 @@
+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 RmsCargodep implements IBasePO<BigDecimal> {
+    /**
+     * 货权转移送达单位id(CARGO_CARRIER_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="货权转移送达单位id",required=true)
+    private BigDecimal cargoCarrierId;
+
+    /**
+     * 货权转移送达单位名称(CARGO_CARRIER_NAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="货权转移送达单位名称",required=false)
+    private String cargoCarrierName;
+
+    /**
+     * 操作人员姓名(INSERT_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="操作人员姓名",required=false)
+    private String insertUsername;
+
+    /**
+     * 操作时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="操作时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 修改操作人员姓名(UPDATE_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="修改操作人员姓名",required=false)
+    private String updateName;
+
+    /**
+     * 修改操作人员时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改操作人员时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 货权转移送达单位类型(CARGO_CARRIER_TYPE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="货权转移送达单位类型",required=false)
+    private String cargoCarrierType;
+
+    /**
+     * 删除状态(0为未删除,1为已删除)(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="删除状态(0为未删除,1为已删除)",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 删除人员姓名(DELETED_NAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="删除人员姓名",required=false)
+    private String deletedName;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.cargoCarrierId;
+    }
+
+    @Override
+    public void setId(BigDecimal cargoCarrierId) {
+        this.cargoCarrierId = cargoCarrierId;
+    }
+
+    public BigDecimal getCargoCarrierId() {
+        return cargoCarrierId;
+    }
+
+    public void setCargoCarrierId(BigDecimal cargoCarrierId) {
+        this.cargoCarrierId = cargoCarrierId;
+    }
+
+    public String getCargoCarrierName() {
+        return cargoCarrierName;
+    }
+
+    public void setCargoCarrierName(String cargoCarrierName) {
+        this.cargoCarrierName = cargoCarrierName == null ? null : cargoCarrierName.trim();
+    }
+
+    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 getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName == null ? null : updateName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getCargoCarrierType() {
+        return cargoCarrierType;
+    }
+
+    public void setCargoCarrierType(String cargoCarrierType) {
+        this.cargoCarrierType = cargoCarrierType;
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public String getDeletedName() {
+        return deletedName;
+    }
+
+    public void setDeletedName(String deletedName) {
+        this.deletedName = deletedName == null ? null : deletedName.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", cargoCarrierId=").append(cargoCarrierId);
+        sb.append(", cargoCarrierName=").append(cargoCarrierName);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateName=").append(updateName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", cargoCarrierType=").append(cargoCarrierType);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", deletedName=").append(deletedName);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 100 - 40
src/main/java/com/steerinfo/dil/model/RmsMaterialType.java

@@ -16,28 +16,28 @@ public class RmsMaterialType implements IBasePO<BigDecimal> {
     private BigDecimal materialTypeId;
 
     /**
-     * 物资类型名称(钢材、铸管、危化品、钢渣、水渣、废旧物资、焦炭)(MATERIAL_TYPE_NAME,VARCHAR,20)
+     * 物资类型名称(钢材、铸管、危化品、钢渣、水渣、废旧物资、焦炭)(MATERIAL_TYPE_NAME,VARCHAR,100)
      */
     @ApiModelProperty(value="物资类型名称(钢材、铸管、危化品、钢渣、水渣、废旧物资、焦炭)",required=false)
     private String materialTypeName;
 
     /**
-     * 数量单位(件、支)(MATERIAL_UNIT,VARCHAR,20)
+     * 物资类型编码(MATERIAL_TYPE_CODE,VARCHAR,50)
      */
-    @ApiModelProperty(value="数量单位(件、支)",required=false)
-    private String materialUnit;
+    @ApiModelProperty(value="物资类型编码",required=false)
+    private String materialTypeCode;
 
     /**
-     * 装卸货次序(MATERIAL_ORDER,DECIMAL,0)
+     * 物资类型全称(MATERIAL_TYPE_SHOWNAME,VARCHAR,200)
      */
-    @ApiModelProperty(value="装卸货次序",required=false)
-    private BigDecimal materialOrder;
-    /*
-    * 物资状态
-    * */
-    @ApiModelProperty(value="物资状态",required =false )
-    private String materialTypeStatus;
+    @ApiModelProperty(value="物资类型全称",required=false)
+    private String materialTypeShowname;
 
+    /**
+     * 物资类型层级(MATERIAL_TYPE_CLASSIS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资类型层级",required=false)
+    private BigDecimal materialTypeClassis;
 
     /**
      * 记录创建人(INSERT_USERNAME,VARCHAR,20)
@@ -69,12 +69,36 @@ public class RmsMaterialType implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="记录创建或修改备注",required=false)
     private String insertUpdateRemark;
 
-    /*
-    * 逻辑删除
-    * */
-    @ApiModelProperty(value = "逻辑删除",required = false)
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 数量单位(MATERIAL_UNIT,VARCHAR,20)
+     */
+    @ApiModelProperty(value="数量单位",required=false)
+    private String materialUnit;
+
+    /**
+     * 装卸货次序(MATERIAL_ORDER,DECIMAL,0)
+     */
+    @ApiModelProperty(value="装卸货次序",required=false)
+    private BigDecimal materialOrder;
+
+    /**
+     * 物资状态(是否停产)(MATERIAL_TYPE_STATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资状态(是否停产)",required=false)
+    private BigDecimal materialTypeStatus;
+
+    /**
+     * 是否内转(1:是)(MATERIAL_ISINWARD,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否内转(1:是)",required=false)
+    private BigDecimal materialIsinward;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -103,36 +127,28 @@ public class RmsMaterialType implements IBasePO<BigDecimal> {
         this.materialTypeName = materialTypeName == null ? null : materialTypeName.trim();
     }
 
-    public String getMaterialUnit() {
-        return materialUnit;
-    }
-
-    public void setMaterialUnit(String materialUnit) {
-        this.materialUnit = materialUnit == null ? null : materialUnit.trim();
-    }
-
-    public BigDecimal getMaterialOrder() {
-        return materialOrder;
+    public String getMaterialTypeCode() {
+        return materialTypeCode;
     }
 
-    public void setMaterialOrder(BigDecimal materialOrder) {
-        this.materialOrder = materialOrder;
+    public void setMaterialTypeCode(String materialTypeCode) {
+        this.materialTypeCode = materialTypeCode == null ? null : materialTypeCode.trim();
     }
 
-    public String getMaterialTypeStatus() {
-        return materialTypeStatus;
+    public String getMaterialTypeShowname() {
+        return materialTypeShowname;
     }
 
-    public void setMaterialTypeStatus(String materialTypeStatus) {
-        this.materialTypeStatus = materialTypeStatus;
+    public void setMaterialTypeShowname(String materialTypeShowname) {
+        this.materialTypeShowname = materialTypeShowname == null ? null : materialTypeShowname.trim();
     }
 
-    public BigDecimal getDeleted() {
-        return deleted;
+    public BigDecimal getMaterialTypeClassis() {
+        return materialTypeClassis;
     }
 
-    public void setDeleted(BigDecimal deleted) {
-        this.deleted = deleted;
+    public void setMaterialTypeClassis(BigDecimal materialTypeClassis) {
+        this.materialTypeClassis = materialTypeClassis;
     }
 
     public String getInsertUsername() {
@@ -175,6 +191,46 @@ public class RmsMaterialType implements IBasePO<BigDecimal> {
         this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
     }
 
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public String getMaterialUnit() {
+        return materialUnit;
+    }
+
+    public void setMaterialUnit(String materialUnit) {
+        this.materialUnit = materialUnit == null ? null : materialUnit.trim();
+    }
+
+    public BigDecimal getMaterialOrder() {
+        return materialOrder;
+    }
+
+    public void setMaterialOrder(BigDecimal materialOrder) {
+        this.materialOrder = materialOrder;
+    }
+
+    public BigDecimal getMaterialTypeStatus() {
+        return materialTypeStatus;
+    }
+
+    public void setMaterialTypeStatus(BigDecimal materialTypeStatus) {
+        this.materialTypeStatus = materialTypeStatus;
+    }
+
+    public BigDecimal getMaterialIsinward() {
+        return materialIsinward;
+    }
+
+    public void setMaterialIsinward(BigDecimal materialIsinward) {
+        this.materialIsinward = materialIsinward;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -183,15 +239,19 @@ public class RmsMaterialType implements IBasePO<BigDecimal> {
         sb.append("Hash = ").append(hashCode());
         sb.append(", materialTypeId=").append(materialTypeId);
         sb.append(", materialTypeName=").append(materialTypeName);
-        sb.append(", materialUnit=").append(materialUnit);
-        sb.append(", materialOrder=").append(materialOrder);
-        sb.append(", materialTypeStatus=").append(materialTypeStatus);
+        sb.append(", materialTypeCode=").append(materialTypeCode);
+        sb.append(", materialTypeShowname=").append(materialTypeShowname);
+        sb.append(", materialTypeClassis=").append(materialTypeClassis);
         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(",deleted=").append(deleted);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", materialUnit=").append(materialUnit);
+        sb.append(", materialOrder=").append(materialOrder);
+        sb.append(", materialTypeStatus=").append(materialTypeStatus);
+        sb.append(", materialIsinward=").append(materialIsinward);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 15 - 0
src/main/java/com/steerinfo/dil/model/RmsPersonnel.java

@@ -117,6 +117,12 @@ public class RmsPersonnel implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="SSO主键",required=false)
     private String personnelSsoId;
 
+    /**
+     * 联系电话(PERSONNEL_CONTACT_NUMBER,VARCHAR,100)
+     */
+    @ApiModelProperty(value="联系电话",required=false)
+    private String personnelContactNumber;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -273,6 +279,14 @@ public class RmsPersonnel implements IBasePO<BigDecimal> {
         this.personnelSsoId = personnelSsoId == null ? null : personnelSsoId.trim();
     }
 
+    public String getPersonnelContactNumber() {
+        return personnelContactNumber;
+    }
+
+    public void setPersonnelContactNumber(String personnelContactNumber) {
+        this.personnelContactNumber = personnelContactNumber == null ? null : personnelContactNumber.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -297,6 +311,7 @@ public class RmsPersonnel implements IBasePO<BigDecimal> {
         sb.append(", username=").append(username);
         sb.append(", password=").append(password);
         sb.append(", personnelSsoId=").append(personnelSsoId);
+        sb.append(", personnelContactNumber=").append(personnelContactNumber);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

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

@@ -26,7 +26,7 @@ public interface IRmsCapacityService{
 
     int insertCapacity(Map<String,Object> mapValue);
 
-    int updateCapacity(RmsCapacity rmsCapacity);
+    int updateCapacity(Map<String,Object> map);
 
     int deleteCapacity(BigDecimal id);
 
@@ -39,4 +39,6 @@ public interface IRmsCapacityService{
     Map<String,Object> getCarrierNameBySSOId(String carrierSSOId);
 
     int deleteCapacityCarrier(String capacityId, String carrierId);
+
+    List<Map<String, Object>> getCapacityByCapacityId(Integer id);
 }

+ 39 - 0
src/main/java/com/steerinfo/dil/service/IRmsCargodepService.java

@@ -0,0 +1,39 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.model.RmsCargodep;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * RmsCargodep服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-07 12:00
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-07
+ * 作者:generator
+ * 参考:
+ * 描述:RmsCargodep服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IRmsCargodepService {
+    //新增放货码头
+    int insetCargoDep(Map<String,Object> map);
+
+    //更新放货码头
+    int updateCargoDep(Map<String, Object> mapValue);
+
+    //删除放货码头
+    int deleteCargoDep(Map<String,Object> map);
+
+    //列表展示
+    List<Map<String, Object>> getCargoDepList(Map<String, Object> mapValue);
+
+    //获取列表数据通过id
+    List<Map<String, Object>> getCargoDepById(BigDecimal id);
+
+}

+ 4 - 0
src/main/java/com/steerinfo/dil/service/IRmsMaterialTypeService.java

@@ -12,4 +12,8 @@ import java.util.Map;
 public interface IRmsMaterialTypeService {
 
     List<Map<String, Object>> getMaterialTypeList(Map<String, Object> mapValue);
+
+    List<Map<String, Object>> getInwardContractMaterial(Map<String, Object> mapValue);
+
+    int insertMaterialType(Map<String, Object> mapValue);
 }

+ 2 - 2
src/main/java/com/steerinfo/dil/service/IRmsPersonnelService.java

@@ -26,7 +26,7 @@ public interface IRmsPersonnelService {
 //    获取人员信息
     List<Map<String, Object>> getPersonnelList(Map<String, Object> mapVal);
 //增加人员信息
-    int insertPersonnel(RmsPersonnel rmsPersonnel);
+    int insertPersonnel(Map<String,Object> map);
 //更新人员信息
     int updatePersonnel(RmsPersonnel rmsPersonnel);
 //删除人员信息
@@ -43,7 +43,7 @@ public interface IRmsPersonnelService {
     List<Map<String,Object>> getThirdShipper(BigDecimal shipperId);
 
     // 新增人员权限
-    int addPersonnel(RmsPersonnel rmsPersonnel);
+    int addPersonnel(Map<String,Object> map);
 
     // 查询SSO主键和机构编码
     Map<String,Object> getShipperMap(BigDecimal shipperId);

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

@@ -23,7 +23,7 @@ public interface IRmsWarehouseService {
 
     List<Map<String, Object>> getWarehouseList(Map<String, Object> mapVal);
 
-    int insertWarehouse(RmsWarehouse rmsWarehouse);
+    int insertWarehouse(Map<String,Object> rmsWarehouse);
 
     int updateWarehouse(RmsWarehouse rmsWarehouse);
 

+ 16 - 4
src/main/java/com/steerinfo/dil/service/impl/RmsCapacityServiceImpl.java

@@ -113,10 +113,15 @@ public class RmsCapacityServiceImpl implements IRmsCapacityService {
     * 修改运力信息
     * */
     @Override
-    public int updateCapacity(RmsCapacity rmsCapacity) {
-        rmsCapacity.setUpdateTime(new Date());
-        rmsCapacity.setUpdateUsername("admin");
-        return rmsCapacityMapper.updateByPrimaryKeySelective(rmsCapacity);
+    public int updateCapacity(Map<String,Object> map) {
+        String remark = (String) map.get("remark");
+        String userDep =(String) map.get("userDep");
+        BigDecimal capacityCarrierId =DataChange.dataToBigDecimal(map.get("capacityCarrierId"));
+        RmsCapacityCarrier rmsCapacityCarrier=new RmsCapacityCarrier();
+        rmsCapacityCarrier.setCapacityCarrierId(capacityCarrierId);
+        rmsCapacityCarrier.setInsertUpdateRemark(remark);
+        rmsCapacityCarrier.setCapacityUserDep(userDep);
+        return rmsCapacityCarrierMapper.updateByPrimaryKeySelective(rmsCapacityCarrier);
     }
 
     /*
@@ -165,6 +170,13 @@ public class RmsCapacityServiceImpl implements IRmsCapacityService {
         return rmsCapacityMapper.updateCapacityCarrier(capacityId,carrierSSOId);
     }
 
+
+    //
+    @Override
+    public List<Map<String, Object>> getCapacityByCapacityId(Integer id) {
+        return rmsCapacityMapper.getCapacityByCapacityId(id);
+    }
+
     //获取承运商id
     @Override
     public List<Map<String, Object>> getCarrierId() {

+ 97 - 0
src/main/java/com/steerinfo/dil/service/impl/RmsCargodepServiceImpl.java

@@ -0,0 +1,97 @@
+package com.steerinfo.dil.service.impl;
+
+import com.baomidou.mybatisplus.extension.api.R;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.dil.model.RmsCargodep;
+import com.steerinfo.dil.mapper.RmsCargodepMapper;
+import com.steerinfo.dil.service.IRmsCargodepService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * RmsCargodep服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-05-07 12:00
+ * 类描述
+ * 修订历史:
+ * 日期:2022-05-07
+ * 作者:generator
+ * 参考:
+ * 描述:RmsCargodep服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "rmsCargodepService")
+public class RmsCargodepServiceImpl  implements IRmsCargodepService {
+
+    @Autowired
+    private RmsCargodepMapper rmsCargodepMapper;
+
+    //新增货权转移单位
+    @Override
+    public int insetCargoDep(Map<String, Object> map) {
+        String cargoName = (String) map.get("cargoName");
+        String cargoType = (String) map.get("cargoType");
+        String userId = (String) map.get("userId");
+        RmsCargodep rmsCargodep=new RmsCargodep();
+        //根据货权转移送达单位查找是否重复
+        BigDecimal searchNumberForCagoName = rmsCargodepMapper.searchNumberForCagoName(map);
+        if (searchNumberForCagoName!=null&&searchNumberForCagoName.intValue()!=0){
+            return -1;
+        }
+        rmsCargodep.setCargoCarrierId(rmsCargodepMapper.selectCargoId());
+        rmsCargodep.setCargoCarrierName(cargoName);
+        rmsCargodep.setCargoCarrierType(cargoType);
+        rmsCargodep.setInsertUsername(userId);
+        rmsCargodep.setInsertTime(new Date());
+        rmsCargodep.setDeleted(new BigDecimal(0));
+        int i = rmsCargodepMapper.insertSelective(rmsCargodep);
+        return i;
+    }
+
+    //更改货权转移送达单位
+    @Override
+    public int updateCargoDep(Map<String, Object> mapValue) {
+        String cargoName = (String) mapValue.get("cargoName");
+        String cargoType =(String) mapValue.get("cargoType");
+        String userId = (String) mapValue.get("userId");
+        RmsCargodep rmsCargodep=new RmsCargodep();
+        rmsCargodep.setCargoCarrierId(DataChange.dataToBigDecimal(mapValue.get("cargoId")));
+        rmsCargodep.setCargoCarrierName(cargoName);
+        rmsCargodep.setCargoCarrierType(cargoType);
+        rmsCargodep.setUpdateName(userId);
+        rmsCargodep.setUpdateTime(new Date());
+        int i = rmsCargodepMapper.updateByPrimaryKeySelective(rmsCargodep);
+        return i;
+    }
+
+    //删除货权转移送货单位
+    @Override
+    public int deleteCargoDep(Map<String,Object> map) {
+        BigDecimal id = DataChange.dataToBigDecimal(map.get("id"));
+        String userId = (String) map.get("userId");
+        RmsCargodep rmsCargodep=new RmsCargodep();
+        rmsCargodep.setCargoCarrierId(id);
+        rmsCargodep.setDeleted(new BigDecimal(1));
+        rmsCargodep.setDeletedName(userId);
+        return rmsCargodepMapper.updateByPrimaryKeySelective(rmsCargodep);
+    }
+
+    @Override
+    public List<Map<String, Object>> getCargoDepList(Map<String, Object> mapValue) {
+        return rmsCargodepMapper.getCargoDepList(mapValue);
+    }
+
+    //通过id获取数据
+    @Override
+    public List<Map<String, Object>> getCargoDepById(BigDecimal id) {
+        List<Map<String, Object>> cargoDepByIdList = rmsCargodepMapper.getCargoDepById(id);
+        return cargoDepByIdList;
+    }
+}

+ 19 - 0
src/main/java/com/steerinfo/dil/service/impl/RmsMaterialTypeServiceImpl.java

@@ -1,10 +1,12 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.mapper.RmsMaterialTypeMapper;
+import com.steerinfo.dil.model.RmsMaterialType;
 import com.steerinfo.dil.service.IRmsMaterialTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 
@@ -24,4 +26,21 @@ public class RmsMaterialTypeServiceImpl implements IRmsMaterialTypeService {
     public List<Map<String, Object>> getMaterialTypeList(Map<String, Object> mapValue) {
         return rmsMaterialTypeMapper.getMaterialTypeList(mapValue);
     }
+
+    @Override
+    public List<Map<String, Object>> getInwardContractMaterial(Map<String, Object> mapValue) {
+        return rmsMaterialTypeMapper.getInwardContractMaterial(mapValue);
+    }
+
+    @Override
+    public int insertMaterialType(Map<String, Object> mapValue) {
+        String materialTypeName = (String) mapValue.get("materialTypeName");
+        BigDecimal materialTypeId = rmsMaterialTypeMapper.getMaterialTypeId();
+        RmsMaterialType rmsMaterialType = new RmsMaterialType();
+        rmsMaterialType.setMaterialTypeId(materialTypeId);
+        rmsMaterialType.setMaterialTypeName(materialTypeName);
+        rmsMaterialType.setMaterialIsinward(new BigDecimal(1));
+        rmsMaterialTypeMapper.insertSelective(rmsMaterialType);
+        return 1;
+    }
 }

+ 63 - 39
src/main/java/com/steerinfo/dil/service/impl/RmsPersonnelServiceImpl.java

@@ -5,6 +5,7 @@ import com.steerinfo.dil.mapper.RmsShipperMapper;
 import com.steerinfo.dil.model.RmsPersonnel;
 import com.steerinfo.dil.model.RmsShipper;
 import com.steerinfo.dil.service.IRmsPersonnelService;
+import com.steerinfo.dil.util.DataChange;
 import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -99,38 +100,39 @@ public class RmsPersonnelServiceImpl implements IRmsPersonnelService {
 
     /**
      * 添加人员信息
-     * @param rmsPersonnel
+     * @param map
      * @return
      */
     @Override
-    public int insertPersonnel(RmsPersonnel rmsPersonnel) {
-//        获取到用户名以及使用默认密码
-        String username=rmsPersonnel.getUsername();
-        String password="123456";
-
-
+    public int insertPersonnel(Map<String,Object> map) {
+        RmsPersonnel rmsPersonnel=new RmsPersonnel();
+        String personnelSsoId = (String) map.get("personnelSsoId");
+        String personnelTeam = (String) map.get("personnelTeam");
+        String personnelShifts =(String) map.get("personnelShifts");
+        String userId =(String) map.get("userId");
+        String concatTelephone =(String) map.get("ConcatTelephone");
+        String personnelJobNumber = (String) map.get("personnelJobNumber");
+        String personnelPost =(String) map.get("personnelPost");
+        String personnelName = (String) map.get("personnelName");
+        BigDecimal personnelDepartmentId = DataChange.dataToBigDecimal(map.get("personnelDepartmentId"));
         int i=0;
-        String personnelJobNumber=rmsPersonnel.getPersonnelJobNumber();
-        Map<String, Object> map=new HashMap<>();
-        map.put("personnelJobNumber",personnelJobNumber);
-        List<RmsPersonnel> rmsPersonnels=rmsPersonnelMapper.selectByParameters(map);
-        if (rmsPersonnels.size()!=0){
-            RmsPersonnel rmsPersonnel1=rmsPersonnels.get(0);
-            if (rmsPersonnel1.getDeleted().equals(new BigDecimal(1))){
-                rmsPersonnel.setInsertUsername("admin");
-                rmsPersonnel.setDeleted(new BigDecimal(0));
-                rmsPersonnel.setPersonnelId(rmsPersonnelMapper.getPersonnelId());
-                i+= rmsPersonnelMapper.insertSelective(rmsPersonnel);
-            }
-            else{
-                i=-1;
-            }
-        }
-        else {
-            rmsPersonnel.setInsertTime(new Date());
-            rmsPersonnel.setInsertUsername("admin");
-            rmsPersonnel.setDeleted(new BigDecimal(0));
+        //判断用户是否存在系统
+        BigDecimal personnelId = rmsPersonnelMapper.getPersonnelIdByJobNumber(map);
+        if (personnelId!=null&&!"null".equals(personnelId)&&personnelId.intValue()!=0){
+           return  -1;
+        }else {
+            //执行新增
             rmsPersonnel.setPersonnelId(rmsPersonnelMapper.getPersonnelId());
+            rmsPersonnel.setPersonnelJobNumber(personnelJobNumber);
+            rmsPersonnel.setPersonnelContactNumber(concatTelephone);
+            rmsPersonnel.setPersonnelName(personnelName);
+            rmsPersonnel.setPersonnelTeam(personnelTeam);
+            rmsPersonnel.setPersonnelPost(personnelPost);
+            rmsPersonnel.setPersonnelDepartmentId(personnelDepartmentId);
+            rmsPersonnel.setPersonnelSsoId(personnelSsoId);
+            rmsPersonnel.setPersonnelShifts(personnelShifts);
+            rmsPersonnel.setInsertUsername(userId);
+            rmsPersonnel.setInsertTime(new Date());
             i+= rmsPersonnelMapper.insertSelective(rmsPersonnel);
         }
         return i;
@@ -199,21 +201,43 @@ public class RmsPersonnelServiceImpl implements IRmsPersonnelService {
 
     /**
      * 新增人员权限
-     * @param rmsPersonnel
+     * @param map
      * @return
      */
     @Override
-    public int addPersonnel(RmsPersonnel rmsPersonnel) {
-        int result = 0;
-        String personnelJobNumber = rmsPersonnel.getPersonnelJobNumber();
-        BigDecimal personnelId = rmsPersonnelMapper.getPersonnelId();
-        rmsPersonnel.setPersonnelId(personnelId);
-        rmsPersonnel.setPersonnelJobNumber(personnelJobNumber);
-        rmsPersonnel.setDeleted(new BigDecimal(0));
-        rmsPersonnel.setInsertTime(new Date());
-        rmsPersonnel.setInsertUsername("admin");
-        result += rmsPersonnelMapper.insertSelective(rmsPersonnel);
-        return result;
+    public int addPersonnel(Map<String,Object> map) {
+        RmsPersonnel rmsPersonnel=new RmsPersonnel();
+        String personnelSsoId = (String) map.get("personnelSsoId");
+        String personnelTeam = (String) map.get("personnelTeam");
+        String personnelShifts =(String) map.get("personnelShifts");
+        String userId =(String) map.get("userId");
+        String concatTelephone =(String) map.get("ConcatTelephone");
+        String personnelJobNumber = (String) map.get("personnelJobNumber");
+        String personnelPost =(String) map.get("personnelPost");
+        String personnelName = (String) map.get("personnelName");
+        BigDecimal personnelDepartmentId = DataChange.dataToBigDecimal(map.get("personnelDepartmentId"));
+        int i=0;
+        //判断用户是否存在系统
+        BigDecimal personnelId = rmsPersonnelMapper.getPersonnelIdByJobNumber(map);
+        if (personnelId!=null&&!"null".equals(personnelId)&&personnelId.intValue()!=0){
+            return  -1;
+        }else {
+            //执行新增
+            rmsPersonnel.setPersonnelId(rmsPersonnelMapper.getPersonnelId());
+            rmsPersonnel.setPersonnelJobNumber(personnelJobNumber);
+            rmsPersonnel.setPersonnelContactNumber(concatTelephone);
+            rmsPersonnel.setPersonnelName(personnelName);
+            rmsPersonnel.setPersonnelTeam(personnelTeam);
+            rmsPersonnel.setPersonnelPost(personnelPost);
+            rmsPersonnel.setPersonnelDepartmentId(personnelDepartmentId);
+            rmsPersonnel.setPersonnelSsoId(personnelSsoId);
+            rmsPersonnel.setPersonnelShifts(personnelShifts);
+            rmsPersonnel.setInsertUsername(userId);
+            rmsPersonnel.setInsertTime(new Date());
+            rmsPersonnel.setDeleted(new BigDecimal(0));
+            i+= rmsPersonnelMapper.insertSelective(rmsPersonnel);
+        }
+        return i;
     }
 
     /**

+ 19 - 6
src/main/java/com/steerinfo/dil/service/impl/RmsWarehouseServiceImpl.java

@@ -4,6 +4,7 @@ import com.steerinfo.dil.mapper.RmsWarehouseMapper;
 import com.steerinfo.dil.model.RmsShipper;
 import com.steerinfo.dil.model.RmsWarehouse;
 import com.steerinfo.dil.service.IRmsWarehouseService;
+import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -43,12 +44,24 @@ public class RmsWarehouseServiceImpl  implements IRmsWarehouseService {
     * 增加原料工厂
     * */
     @Override
-    public int insertWarehouse(RmsWarehouse rmsWarehouse) {
-            rmsWarehouse.setDeleted(new BigDecimal(0));
-            rmsWarehouse.setInsertUsername("admin");
-            rmsWarehouse.setInsertTime(new Date());
-            rmsWarehouse.setWarehouseId(rmsWarehouseMapper.selectWarehouseId());
-        return rmsWarehouseMapper.insertSelective(rmsWarehouse);
+    public int insertWarehouse(Map<String,Object> rmsWarehouse) {
+        RmsWarehouse rmsWarehouse1=new RmsWarehouse();
+        String warehouseName =(String) rmsWarehouse.get("warehouseName");
+        BigDecimal shipperId = DataChange.dataToBigDecimal(rmsWarehouse.get("shipperId"));
+        String userId=(String) rmsWarehouse.get("userId");
+        //根据仓库名称查找装货点是否存在于数据库中
+        BigDecimal searchNum = rmsWarehouseMapper.searchWarehouseName(warehouseName,shipperId);
+        if (searchNum==null) {
+            rmsWarehouse1.setDeleted(new BigDecimal(0));
+            if (userId!=null) {
+                rmsWarehouse1.setInsertUsername(userId);
+            }
+            rmsWarehouse1.setInsertTime(new Date());
+            rmsWarehouse1.setWarehouseId(rmsWarehouseMapper.selectWarehouseId());
+            return rmsWarehouseMapper.insertSelective(rmsWarehouse1);
+        }else {
+            return -1;
+        }
     }
     /*
     * 更改原料工厂

+ 1 - 1
src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java

@@ -28,7 +28,7 @@ public class ColumnDataUtil {
     public PageListAdd tableColumnData(Integer apiId, List<Map<String, Object>> list, List<Map<String,Object>> data) {
         List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
         for (Map<String, Object> columnData : columnDataList) {
-            //每个表头字段的过滤条
+            //每个表头字段的过滤条
             columnData.put("filters", setListMap(data, columnData.get("prop").toString()));
         }
         PageListAdd pageList = new PageListAdd(data);

+ 1 - 0
src/main/resources/application-dev.yml

@@ -19,6 +19,7 @@ piction:
   # path: /usr/share/nginx/html/image
   #  path: /test/data/nginx/html/image
 #  path: C:\Users\24390\Desktop\work\a
+#  path: C:\Users\zx\Pictures\test
   path: /shared
 server:
     port: 8014

+ 1 - 1
src/main/resources/application-prod.yml

@@ -19,7 +19,7 @@ openFeign:
 piction:
   # path: /usr/share/nginx/html/image
   #  path: /test/data/nginx/html/image
-  # path: C:\Users\24390\Desktop\work\a
+#   path: C:\Users\zx\Pictures\test
   path: /shared
 server:
     port: 8060

+ 6 - 5
src/main/resources/bootstrap.yml

@@ -16,16 +16,17 @@ spring:
 eureka:
   client:
     service-url:
-      defaultZone: http://root:root@${EUREKA_HOST:172.16.33.162}:${EUREKA_PORT:8081}/eureka/
-    registerWithEureka:
-      false
-    fetchRegistry:
-      false
+      defaultZone: http://root:root@${EUREKA_HOST:172.16.33.166}:${EUREKA_PORT:8081}/eureka/
+    register-with-eureka: false #表示向EurekaServer注册自己 默认为true
+    fetch-registry: false #是否从EurekaServer抓取已有的注册信息,默认为true,单节点无所谓,集群必须设置为true才能配合ribbon使用负载均衡
+
   instance:
     prefer-ip-address: true
     status-page-url: http://${spring.cloud.client.ip-address}:${server.port}/swagger-ui.html#/
     instance-id: ${spring.cloud.client.ip-address}:${server.port}
 
+
+
 genxml:
   pth: com/a
 cache:

+ 130 - 104
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityCarrierMapper.xml

@@ -11,14 +11,15 @@
     <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="CAPACITY_USER_DEP" jdbcType="VARCHAR" property="capacityUserDep" />
   </resultMap>
   <sql id="columns">
-    CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
+    CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, CAPACITY_USER_DEP
   </sql>
   <sql id="columns_alias">
-    t.CAPACITY_CARRIER_ID, t.CAPACITY_ID, t.CARRIER_ID, t.INSERT_USERNAME, t.INSERT_TIME, 
-    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
+    t.CAPACITY_CARRIER_ID, t.CAPACITY_ID, t.CARRIER_ID, t.INSERT_USERNAME, t.INSERT_TIME,
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.CAPACITY_USER_DEP
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_CAPACITY_CARRIER
@@ -27,7 +28,7 @@
     SELECT <include refid="columns_alias" /> FROM RMS_CAPACITY_CARRIER t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="capacityCarrierId != null">
         and CAPACITY_CARRIER_ID = #{capacityCarrierId}
       </if>
@@ -55,10 +56,13 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="capacityUserDep != null and capacityUserDep != ''">
+        and CAPACITY_USER_DEP = #{capacityUserDep}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="capacityCarrierId != null">
         and CAPACITY_CARRIER_ID = #{capacityCarrierId}
       </if>
@@ -86,6 +90,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="capacityUserDep != null and capacityUserDep != ''">
+        and CAPACITY_USER_DEP LIKE '%${capacityUserDep}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
@@ -94,41 +101,44 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_CAPACITY_CARRIER
-    where 1!=1 
-      <if test="capacityId != null">
-        or CAPACITY_ID = #{capacityId}
-      </if>
-      <if test="carrierId != null">
-        or CARRIER_ID = #{carrierId}
-      </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>
-      <if test="deleted != null">
-        or DELETED = #{deleted}
-      </if>
+    where 1!=1
+    <if test="capacityId != null">
+      or CAPACITY_ID = #{capacityId}
+    </if>
+    <if test="carrierId != null">
+      or CARRIER_ID = #{carrierId}
+    </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>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="capacityUserDep != null and capacityUserDep != ''">
+      or CAPACITY_USER_DEP = #{capacityUserDep}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
-    insert into RMS_CAPACITY_CARRIER (CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
-      )
-    values (#{capacityCarrierId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}
-      )
+    insert into RMS_CAPACITY_CARRIER (CAPACITY_CARRIER_ID, CAPACITY_ID, CARRIER_ID,
+                                      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
+                                      CAPACITY_USER_DEP)
+    values (#{capacityCarrierId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
+            #{capacityUserDep,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
     insert into RMS_CAPACITY_CARRIER
@@ -160,6 +170,9 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="capacityUserDep != null">
+        CAPACITY_USER_DEP,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="capacityCarrierId != null">
@@ -189,18 +202,22 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="capacityUserDep != null">
+        #{capacityUserDep,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
     update RMS_CAPACITY_CARRIER
     set CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
-      CARRIER_ID = #{carrierId,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},
-      DELETED = #{deleted,jdbcType=DECIMAL}
+        CARRIER_ID = #{carrierId,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},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        CAPACITY_USER_DEP = #{capacityUserDep,jdbcType=VARCHAR}
     where CAPACITY_CARRIER_ID = #{capacityCarrierId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCapacityCarrier">
@@ -230,6 +247,9 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="capacityUserDep != null">
+        CAPACITY_USER_DEP = #{capacityUserDep,jdbcType=VARCHAR},
+      </if>
     </set>
     where CAPACITY_CARRIER_ID = #{capacityCarrierId,jdbcType=DECIMAL}
   </update>
@@ -246,68 +266,72 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_CAPACITY_CARRIER 
-      (CAPACITY_CARRIER_ID, 
-      CAPACITY_ID, CARRIER_ID, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      DELETED)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.capacityCarrierId,jdbcType=DECIMAL}, 
-      #{item.capacityId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{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  
-   </foreach> )
+    insert into RMS_CAPACITY_CARRIER
+    (CAPACITY_CARRIER_ID,
+    CAPACITY_ID, CARRIER_ID, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETED, CAPACITY_USER_DEP)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.capacityCarrierId,jdbcType=DECIMAL},
+    #{item.capacityId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.deleted,jdbcType=DECIMAL}, #{item.capacityUserDep,jdbcType=VARCHAR} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_CAPACITY_CARRIER
-     set
-       CAPACITY_CARRIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityCarrierId,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
-       </foreach>
-       ,CARRIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
-          when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-     where CAPACITY_CARRIER_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.capacityCarrierId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_CAPACITY_CARRIER
+    set
+    CAPACITY_CARRIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityCarrierId,jdbcType=DECIMAL}
+    </foreach>
+    ,CAPACITY_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+    </foreach>
+    ,CARRIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,CAPACITY_USER_DEP=
+    <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_CARRIER_ID" separator=" ">
+      when #{item.capacityCarrierId,jdbcType=DECIMAL} then #{item.capacityUserDep,jdbcType=VARCHAR}
+    </foreach>
+    where CAPACITY_CARRIER_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.capacityCarrierId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_CAPACITY_CARRIER
-    where CAPACITY_CARRIER_ID in 
+    where CAPACITY_CARRIER_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -315,5 +339,7 @@
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
 
-  
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
 </mapper>

+ 16 - 2
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml

@@ -743,7 +743,8 @@
     RC.CAPACITY_VIP AS "capacityVip",
     RC.CAPACITY_BLACKLIST AS "capacityBlacklist",
     RCA.CARRIER_NAME AS "carrierName",
-    RC.INSERT_UPDATE_REMARK "insertRemark"
+    RCC.INSERT_UPDATE_REMARK "insertRemark",
+    RCC.CAPACITY_CARRIER_ID "capacityCarrierId"
     FROM RMS_CAPACITY RC
     LEFT JOIN RMS_CAPACITY_TYPE RCT
     ON RC.CAPACITY_TYPE_ID = RCT.CAPACITY_TYPE_ID
@@ -885,7 +886,20 @@
     from RMS_CAPACITY RC
     where  RC.CAPACITY_ID=#{id}
   </select>
-  <update id="updateCapacityCarrier">
+    <select id="getCapacityByCapacityId" resultType="java.util.Map" parameterType="java.lang.Integer">
+      select  RCC.INSERT_UPDATE_REMARK "remark",
+              RCC.CAPACITY_USER_DEP "userDep",
+              RC.CAPACITY_NUMBER "capacityNumber",
+              RC.CAPACITY_ID "capacityId",
+              RC2.CARRIER_NAME "carrierName"
+      from RMS_CAPACITY RC
+      LEFT JOIN RMS_CAPACITY_CARRIER RCC
+      ON RC.CAPACITY_ID =RCC.CAPACITY_ID
+      left join RMS_CARRIER RC2
+      ON RC2.CARRIER_ID=RCC.CARRIER_ID
+      WHERE  RCC.CAPACITY_CARRIER_ID=#{id}
+    </select>
+    <update id="updateCapacityCarrier">
     update RMS_CAPACITY_CARRIER set DELETED=1 ,UPDATE_TIME=sysDate  where CAPACITY_ID=#{capacityId} and CARRIER_ID in(
         select RC.CARRIER_ID from RMS_CARRIER RC
         where RC.CARRIER_SSO_ID = #{carrierSSOId}

+ 344 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsCargodepMapper.xml

@@ -0,0 +1,344 @@
+<?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.RmsCargodepMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCargodep">
+    <id column="CARGO_CARRIER_ID" jdbcType="DECIMAL" property="cargoCarrierId" />
+    <result column="CARGO_CARRIER_NAME" jdbcType="VARCHAR" property="cargoCarrierName" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_NAME" jdbcType="VARCHAR" property="updateName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="CARGO_CARRIER_TYPE" jdbcType="VARCHAR" property="cargoCarrierType" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="DELETED_NAME" jdbcType="VARCHAR" property="deletedName" />
+  </resultMap>
+  <sql id="columns">
+    CARGO_CARRIER_ID, CARGO_CARRIER_NAME, INSERT_USERNAME, INSERT_TIME, UPDATE_NAME,
+    UPDATE_TIME, CARGO_CARRIER_TYPE, DELETED, DELETED_NAME
+  </sql>
+  <sql id="columns_alias">
+    t.CARGO_CARRIER_ID, t.CARGO_CARRIER_NAME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_NAME,
+    t.UPDATE_TIME, t.CARGO_CARRIER_TYPE, t.DELETED, t.DELETED_NAME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM RMS_CARGODEP
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM RMS_CARGODEP t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="cargoCarrierId != null">
+        and CARGO_CARRIER_ID = #{cargoCarrierId}
+      </if>
+      <if test="cargoCarrierName != null and cargoCarrierName != ''">
+        and CARGO_CARRIER_NAME = #{cargoCarrierName}
+      </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="updateName != null and updateName != ''">
+        and UPDATE_NAME = #{updateName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="cargoCarrierType != null and cargoCarrierType != ''">
+        and CARGO_CARRIER_TYPE = #{cargoCarrierType}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="deletedName != null and deletedName != ''">
+        and DELETED_NAME = #{deletedName}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="cargoCarrierId != null">
+        and CARGO_CARRIER_ID = #{cargoCarrierId}
+      </if>
+      <if test="cargoCarrierName != null and cargoCarrierName != ''">
+        and CARGO_CARRIER_NAME LIKE '%${cargoCarrierName}%'
+      </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="updateName != null and updateName != ''">
+        and UPDATE_NAME LIKE '%${updateName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="cargoCarrierType != null and cargoCarrierType != ''">
+        and CARGO_CARRIER_TYPE LIKE '%${cargoCarrierType}%'
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="deletedName != null and deletedName != ''">
+        and DELETED_NAME LIKE '%${deletedName}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from RMS_CARGODEP
+    where CARGO_CARRIER_ID = #{cargoCarrierId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from RMS_CARGODEP
+    where 1!=1
+    <if test="cargoCarrierName != null and cargoCarrierName != ''">
+      or CARGO_CARRIER_NAME = #{cargoCarrierName}
+    </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="updateName != null and updateName != ''">
+      or UPDATE_NAME = #{updateName}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="cargoCarrierType != null and cargoCarrierType != ''">
+      or CARGO_CARRIER_TYPE = #{cargoCarrierType}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="deletedName != null and deletedName != ''">
+      or DELETED_NAME = #{deletedName}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCargodep">
+    insert into RMS_CARGODEP (CARGO_CARRIER_ID, CARGO_CARRIER_NAME,
+                              INSERT_USERNAME, INSERT_TIME, UPDATE_NAME,
+                              UPDATE_TIME, CARGO_CARRIER_TYPE, DELETED,
+                              DELETED_NAME)
+    values (#{cargoCarrierId,jdbcType=DECIMAL}, #{cargoCarrierName,jdbcType=VARCHAR},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateName,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{cargoCarrierType,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
+            #{deletedName,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCargodep">
+    insert into RMS_CARGODEP
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="cargoCarrierId != null">
+        CARGO_CARRIER_ID,
+      </if>
+      <if test="cargoCarrierName != null">
+        CARGO_CARRIER_NAME,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateName != null">
+        UPDATE_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="cargoCarrierType != null">
+        CARGO_CARRIER_TYPE,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="deletedName != null">
+        DELETED_NAME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="cargoCarrierId != null">
+        #{cargoCarrierId,jdbcType=DECIMAL},
+      </if>
+      <if test="cargoCarrierName != null">
+        #{cargoCarrierName,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateName != null">
+        #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cargoCarrierType != null">
+        #{cargoCarrierType,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="deletedName != null">
+        #{deletedName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCargodep">
+    update RMS_CARGODEP
+    set CARGO_CARRIER_NAME = #{cargoCarrierName,jdbcType=VARCHAR},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_NAME = #{updateName,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        CARGO_CARRIER_TYPE = #{cargoCarrierType,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        DELETED_NAME = #{deletedName,jdbcType=VARCHAR}
+    where CARGO_CARRIER_ID = #{cargoCarrierId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCargodep">
+    update RMS_CARGODEP
+    <set>
+      <if test="cargoCarrierName != null">
+        CARGO_CARRIER_NAME = #{cargoCarrierName,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateName != null">
+        UPDATE_NAME = #{updateName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="cargoCarrierType != null">
+        CARGO_CARRIER_TYPE = #{cargoCarrierType,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="deletedName != null">
+        DELETED_NAME = #{deletedName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where CARGO_CARRIER_ID = #{cargoCarrierId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
+    where CARGO_CARRIER_ID = #{cargoCarrierId,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 RMS_CARGODEP
+    (CARGO_CARRIER_ID,
+    CARGO_CARRIER_NAME, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_NAME, UPDATE_TIME,
+    CARGO_CARRIER_TYPE, DELETED, DELETED_NAME
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.cargoCarrierId,jdbcType=DECIMAL},
+    #{item.cargoCarrierName,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.cargoCarrierType,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, #{item.deletedName,jdbcType=VARCHAR}
+    from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update RMS_CARGODEP
+    set
+    CARGO_CARRIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.cargoCarrierId,jdbcType=DECIMAL}
+    </foreach>
+    ,CARGO_CARRIER_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.cargoCarrierName,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.updateName,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,CARGO_CARRIER_TYPE=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.cargoCarrierType,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,DELETED_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CARGO_CARRIER_ID" separator=" ">
+      when #{item.cargoCarrierId,jdbcType=DECIMAL} then #{item.deletedName,jdbcType=VARCHAR}
+    </foreach>
+    where CARGO_CARRIER_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.cargoCarrierId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from RMS_CARGODEP
+    where CARGO_CARRIER_ID in
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!--  根据货权转移送达单位查找是否存在-->
+  <select id="searchNumberForCagoName" parameterType="java.util.Map" resultType="java.math.BigDecimal">
+    select count(CARGO_CARRIER_ID)
+    from RMS_CARGODEP rc
+    where rc.CARGO_CARRIER_NAME = #{cargoName} and rc.CARGO_CARRIER_TYPE=#{cargoType}
+  </select>
+
+  <!--  获取货权转移送达单位列表-->
+  <select id="getCargoDepList" resultType="java.util.Map" parameterType="java.util.Map">
+    select * from
+    (select
+    RC.CARGO_CARRIER_NAME "cargoCarrierName",
+    RC.CARGO_CARRIER_ID "cargoCarrierId"
+    from RMS_CARGODEP RC
+    where RC.DELETED = 0
+    <if test="con!=null">
+      and instr(RC.CARGO_CARRIER_NAME, #{con}) > 0
+    </if>
+    )
+  </select>
+  <select id="getCargoDepById" resultType="java.util.Map" parameterType="java.util.Map">
+    select RC.CARGO_CARRIER_NAME "cargoName",
+           RC.CARGO_CARRIER_TYPE "cargoType"
+    from RMS_CARGODEP RC
+    WHERE CARGO_CARRIER_ID=#{id}
+  </select>
+
+</mapper>

+ 295 - 148
src/main/resources/com/steerinfo/dil/mapper/RmsMaterialTypeMapper.xml

@@ -4,21 +4,31 @@
   <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsMaterialType">
     <id column="MATERIAL_TYPE_ID" jdbcType="DECIMAL" property="materialTypeId" />
     <result column="MATERIAL_TYPE_NAME" jdbcType="VARCHAR" property="materialTypeName" />
-    <result column="MATERIAL_UNIT" jdbcType="VARCHAR" property="materialUnit" />
-    <result column="MATERIAL_ORDER" jdbcType="DECIMAL" property="materialOrder" />
+    <result column="MATERIAL_TYPE_CODE" jdbcType="VARCHAR" property="materialTypeCode" />
+    <result column="MATERIAL_TYPE_SHOWNAME" jdbcType="VARCHAR" property="materialTypeShowname" />
+    <result column="MATERIAL_TYPE_CLASSIS" jdbcType="DECIMAL" property="materialTypeClassis" />
     <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="MATERIAL_UNIT" jdbcType="VARCHAR" property="materialUnit" />
+    <result column="MATERIAL_ORDER" jdbcType="DECIMAL" property="materialOrder" />
+    <result column="MATERIAL_TYPE_STATUS" jdbcType="DECIMAL" property="materialTypeStatus" />
+    <result column="MATERIAL_ISINWARD" jdbcType="DECIMAL" property="materialIsinward" />
   </resultMap>
   <sql id="columns">
-    MATERIAL_TYPE_ID, MATERIAL_TYPE_NAME, MATERIAL_UNIT, MATERIAL_ORDER, MATERIAL_PACKING_TYPE, 
-    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+    MATERIAL_TYPE_ID, MATERIAL_TYPE_NAME, MATERIAL_TYPE_CODE, MATERIAL_TYPE_SHOWNAME, 
+    MATERIAL_TYPE_CLASSIS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+    INSERT_UPDATE_REMARK, DELETED, MATERIAL_UNIT, MATERIAL_ORDER, MATERIAL_TYPE_STATUS, 
+    MATERIAL_ISINWARD
   </sql>
   <sql id="columns_alias">
-    t.MATERIAL_TYPE_ID, t.MATERIAL_TYPE_NAME, t.MATERIAL_UNIT, t.MATERIAL_ORDER, t.MATERIAL_PACKING_TYPE, 
-    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
+    t.MATERIAL_TYPE_ID, t.MATERIAL_TYPE_NAME, t.MATERIAL_TYPE_CODE, t.MATERIAL_TYPE_SHOWNAME, 
+    t.MATERIAL_TYPE_CLASSIS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK, t.DELETED, t.MATERIAL_UNIT, t.MATERIAL_ORDER, t.MATERIAL_TYPE_STATUS, 
+    t.MATERIAL_ISINWARD
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_MATERIAL_TYPE
@@ -27,21 +37,21 @@
     SELECT <include refid="columns_alias" /> FROM RMS_MATERIAL_TYPE t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="materialTypeId != null">
         and MATERIAL_TYPE_ID = #{materialTypeId}
       </if>
       <if test="materialTypeName != null and materialTypeName != ''">
         and MATERIAL_TYPE_NAME = #{materialTypeName}
       </if>
-      <if test="materialUnit != null and materialUnit != ''">
-        and MATERIAL_UNIT = #{materialUnit}
+      <if test="materialTypeCode != null and materialTypeCode != ''">
+        and MATERIAL_TYPE_CODE = #{materialTypeCode}
       </if>
-      <if test="materialOrder != null">
-        and MATERIAL_ORDER = #{materialOrder}
+      <if test="materialTypeShowname != null and materialTypeShowname != ''">
+        and MATERIAL_TYPE_SHOWNAME = #{materialTypeShowname}
       </if>
-      <if test="materialPackingType != null and materialPackingType != ''">
-        and MATERIAL_PACKING_TYPE = #{materialPackingType}
+      <if test="materialTypeClassis != null">
+        and MATERIAL_TYPE_CLASSIS = #{materialTypeClassis}
       </if>
       <if test="insertUsername != null and insertUsername != ''">
         and INSERT_USERNAME = #{insertUsername}
@@ -58,24 +68,39 @@
       <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
         and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
       </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="materialUnit != null and materialUnit != ''">
+        and MATERIAL_UNIT = #{materialUnit}
+      </if>
+      <if test="materialOrder != null">
+        and MATERIAL_ORDER = #{materialOrder}
+      </if>
+      <if test="materialTypeStatus != null">
+        and MATERIAL_TYPE_STATUS = #{materialTypeStatus}
+      </if>
+      <if test="materialIsinward != null">
+        and MATERIAL_ISINWARD = #{materialIsinward}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="materialTypeId != null">
         and MATERIAL_TYPE_ID = #{materialTypeId}
       </if>
       <if test="materialTypeName != null and materialTypeName != ''">
         and MATERIAL_TYPE_NAME LIKE '%${materialTypeName}%'
       </if>
-      <if test="materialUnit != null and materialUnit != ''">
-        and MATERIAL_UNIT LIKE '%${materialUnit}%'
+      <if test="materialTypeCode != null and materialTypeCode != ''">
+        and MATERIAL_TYPE_CODE LIKE '%${materialTypeCode}%'
       </if>
-      <if test="materialOrder != null">
-        and MATERIAL_ORDER = #{materialOrder}
+      <if test="materialTypeShowname != null and materialTypeShowname != ''">
+        and MATERIAL_TYPE_SHOWNAME LIKE '%${materialTypeShowname}%'
       </if>
-      <if test="materialPackingType != null and materialPackingType != ''">
-        and MATERIAL_PACKING_TYPE LIKE '%${materialPackingType}%'
+      <if test="materialTypeClassis != null">
+        and MATERIAL_TYPE_CLASSIS = #{materialTypeClassis}
       </if>
       <if test="insertUsername != null and insertUsername != ''">
         and INSERT_USERNAME LIKE '%${insertUsername}%'
@@ -92,52 +117,86 @@
       <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
         and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
       </if>
-    </where>
-  </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
-    delete from RMS_MATERIAL_TYPE
-    where MATERIAL_TYPE_ID = #{materialTypeId,jdbcType=DECIMAL}
-  </delete>
-  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
-    delete from RMS_MATERIAL_TYPE
-    where 1!=1 
-      <if test="materialTypeName != null and materialTypeName != ''">
-        or MATERIAL_TYPE_NAME = #{materialTypeName}
+      <if test="deleted != null">
+        and DELETED = #{deleted}
       </if>
       <if test="materialUnit != null and materialUnit != ''">
-        or MATERIAL_UNIT = #{materialUnit}
+        and MATERIAL_UNIT LIKE '%${materialUnit}%'
       </if>
       <if test="materialOrder != null">
-        or MATERIAL_ORDER = #{materialOrder}
-      </if>
-      <if test="materialPackingType != null and materialPackingType != ''">
-        or MATERIAL_PACKING_TYPE = #{materialPackingType}
-      </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}
+        and MATERIAL_ORDER = #{materialOrder}
       </if>
-      <if test="updateTime != null">
-        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      <if test="materialTypeStatus != null">
+        and MATERIAL_TYPE_STATUS = #{materialTypeStatus}
       </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      <if test="materialIsinward != null">
+        and MATERIAL_ISINWARD = #{materialIsinward}
       </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
+    delete from RMS_MATERIAL_TYPE
+    where MATERIAL_TYPE_ID = #{materialTypeId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from RMS_MATERIAL_TYPE
+    where 1!=1
+    <if test="materialTypeName != null and materialTypeName != ''">
+      or MATERIAL_TYPE_NAME = #{materialTypeName}
+    </if>
+    <if test="materialTypeCode != null and materialTypeCode != ''">
+      or MATERIAL_TYPE_CODE = #{materialTypeCode}
+    </if>
+    <if test="materialTypeShowname != null and materialTypeShowname != ''">
+      or MATERIAL_TYPE_SHOWNAME = #{materialTypeShowname}
+    </if>
+    <if test="materialTypeClassis != null">
+      or MATERIAL_TYPE_CLASSIS = #{materialTypeClassis}
+    </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>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="materialUnit != null and materialUnit != ''">
+      or MATERIAL_UNIT = #{materialUnit}
+    </if>
+    <if test="materialOrder != null">
+      or MATERIAL_ORDER = #{materialOrder}
+    </if>
+    <if test="materialTypeStatus != null">
+      or MATERIAL_TYPE_STATUS = #{materialTypeStatus}
+    </if>
+    <if test="materialIsinward != null">
+      or MATERIAL_ISINWARD = #{materialIsinward}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsMaterialType">
-    insert into RMS_MATERIAL_TYPE (MATERIAL_TYPE_ID, MATERIAL_TYPE_NAME, 
-      MATERIAL_UNIT, MATERIAL_ORDER, MATERIAL_PACKING_TYPE, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK)
-    values (#{materialTypeId,jdbcType=DECIMAL}, #{materialTypeName,jdbcType=VARCHAR}, 
-      #{materialUnit,jdbcType=VARCHAR}, #{materialOrder,jdbcType=DECIMAL}, #{materialPackingType,jdbcType=VARCHAR}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+    insert into RMS_MATERIAL_TYPE (MATERIAL_TYPE_ID, MATERIAL_TYPE_NAME,
+                                   MATERIAL_TYPE_CODE, MATERIAL_TYPE_SHOWNAME,
+                                   MATERIAL_TYPE_CLASSIS, INSERT_USERNAME, INSERT_TIME,
+                                   UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                   DELETED, MATERIAL_UNIT, MATERIAL_ORDER,
+                                   MATERIAL_TYPE_STATUS, MATERIAL_ISINWARD)
+    values (#{materialTypeId,jdbcType=DECIMAL}, #{materialTypeName,jdbcType=VARCHAR},
+            #{materialTypeCode,jdbcType=VARCHAR}, #{materialTypeShowname,jdbcType=VARCHAR},
+            #{materialTypeClassis,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+            #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+            #{deleted,jdbcType=DECIMAL}, #{materialUnit,jdbcType=VARCHAR}, #{materialOrder,jdbcType=DECIMAL},
+            #{materialTypeStatus,jdbcType=DECIMAL}, #{materialIsinward,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsMaterialType">
     insert into RMS_MATERIAL_TYPE
@@ -148,14 +207,14 @@
       <if test="materialTypeName != null">
         MATERIAL_TYPE_NAME,
       </if>
-      <if test="materialUnit != null">
-        MATERIAL_UNIT,
+      <if test="materialTypeCode != null">
+        MATERIAL_TYPE_CODE,
       </if>
-      <if test="materialOrder != null">
-        MATERIAL_ORDER,
+      <if test="materialTypeShowname != null">
+        MATERIAL_TYPE_SHOWNAME,
       </if>
-      <if test="materialPackingType != null">
-        MATERIAL_PACKING_TYPE,
+      <if test="materialTypeClassis != null">
+        MATERIAL_TYPE_CLASSIS,
       </if>
       <if test="insertUsername != null">
         INSERT_USERNAME,
@@ -172,6 +231,21 @@
       <if test="insertUpdateRemark != null">
         INSERT_UPDATE_REMARK,
       </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="materialUnit != null">
+        MATERIAL_UNIT,
+      </if>
+      <if test="materialOrder != null">
+        MATERIAL_ORDER,
+      </if>
+      <if test="materialTypeStatus != null">
+        MATERIAL_TYPE_STATUS,
+      </if>
+      <if test="materialIsinward != null">
+        MATERIAL_ISINWARD,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="materialTypeId != null">
@@ -180,14 +254,14 @@
       <if test="materialTypeName != null">
         #{materialTypeName,jdbcType=VARCHAR},
       </if>
-      <if test="materialUnit != null">
-        #{materialUnit,jdbcType=VARCHAR},
+      <if test="materialTypeCode != null">
+        #{materialTypeCode,jdbcType=VARCHAR},
       </if>
-      <if test="materialOrder != null">
-        #{materialOrder,jdbcType=DECIMAL},
+      <if test="materialTypeShowname != null">
+        #{materialTypeShowname,jdbcType=VARCHAR},
       </if>
-      <if test="materialPackingType != null">
-        #{materialPackingType,jdbcType=VARCHAR},
+      <if test="materialTypeClassis != null">
+        #{materialTypeClassis,jdbcType=DECIMAL},
       </if>
       <if test="insertUsername != null">
         #{insertUsername,jdbcType=VARCHAR},
@@ -204,19 +278,39 @@
       <if test="insertUpdateRemark != null">
         #{insertUpdateRemark,jdbcType=VARCHAR},
       </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="materialUnit != null">
+        #{materialUnit,jdbcType=VARCHAR},
+      </if>
+      <if test="materialOrder != null">
+        #{materialOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="materialTypeStatus != null">
+        #{materialTypeStatus,jdbcType=DECIMAL},
+      </if>
+      <if test="materialIsinward != null">
+        #{materialIsinward,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsMaterialType">
     update RMS_MATERIAL_TYPE
     set MATERIAL_TYPE_NAME = #{materialTypeName,jdbcType=VARCHAR},
-      MATERIAL_UNIT = #{materialUnit,jdbcType=VARCHAR},
-      MATERIAL_ORDER = #{materialOrder,jdbcType=DECIMAL},
-      MATERIAL_PACKING_TYPE = #{materialPackingType,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}
+        MATERIAL_TYPE_CODE = #{materialTypeCode,jdbcType=VARCHAR},
+        MATERIAL_TYPE_SHOWNAME = #{materialTypeShowname,jdbcType=VARCHAR},
+        MATERIAL_TYPE_CLASSIS = #{materialTypeClassis,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},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        MATERIAL_UNIT = #{materialUnit,jdbcType=VARCHAR},
+        MATERIAL_ORDER = #{materialOrder,jdbcType=DECIMAL},
+        MATERIAL_TYPE_STATUS = #{materialTypeStatus,jdbcType=DECIMAL},
+        MATERIAL_ISINWARD = #{materialIsinward,jdbcType=DECIMAL}
     where MATERIAL_TYPE_ID = #{materialTypeId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsMaterialType">
@@ -225,14 +319,14 @@
       <if test="materialTypeName != null">
         MATERIAL_TYPE_NAME = #{materialTypeName,jdbcType=VARCHAR},
       </if>
-      <if test="materialUnit != null">
-        MATERIAL_UNIT = #{materialUnit,jdbcType=VARCHAR},
+      <if test="materialTypeCode != null">
+        MATERIAL_TYPE_CODE = #{materialTypeCode,jdbcType=VARCHAR},
       </if>
-      <if test="materialOrder != null">
-        MATERIAL_ORDER = #{materialOrder,jdbcType=DECIMAL},
+      <if test="materialTypeShowname != null">
+        MATERIAL_TYPE_SHOWNAME = #{materialTypeShowname,jdbcType=VARCHAR},
       </if>
-      <if test="materialPackingType != null">
-        MATERIAL_PACKING_TYPE = #{materialPackingType,jdbcType=VARCHAR},
+      <if test="materialTypeClassis != null">
+        MATERIAL_TYPE_CLASSIS = #{materialTypeClassis,jdbcType=DECIMAL},
       </if>
       <if test="insertUsername != null">
         INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
@@ -249,10 +343,25 @@
       <if test="insertUpdateRemark != null">
         INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
       </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="materialUnit != null">
+        MATERIAL_UNIT = #{materialUnit,jdbcType=VARCHAR},
+      </if>
+      <if test="materialOrder != null">
+        MATERIAL_ORDER = #{materialOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="materialTypeStatus != null">
+        MATERIAL_TYPE_STATUS = #{materialTypeStatus,jdbcType=DECIMAL},
+      </if>
+      <if test="materialIsinward != null">
+        MATERIAL_ISINWARD = #{materialIsinward,jdbcType=DECIMAL},
+      </if>
     </set>
     where MATERIAL_TYPE_ID = #{materialTypeId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="decimal" resultMap="BaseResultMap">
     <include refid="select" />
     where MATERIAL_TYPE_ID = #{materialTypeId,jdbcType=DECIMAL}
   </select>
@@ -265,74 +374,100 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_MATERIAL_TYPE 
-      (MATERIAL_TYPE_ID, 
-      MATERIAL_TYPE_NAME, MATERIAL_UNIT, 
-      MATERIAL_ORDER, MATERIAL_PACKING_TYPE, 
-      INSERT_USERNAME, INSERT_TIME, 
-      UPDATE_USERNAME, UPDATE_TIME, 
-      INSERT_UPDATE_REMARK)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.materialTypeId,jdbcType=DECIMAL}, 
-      #{item.materialTypeName,jdbcType=VARCHAR}, #{item.materialUnit,jdbcType=VARCHAR}, 
-      #{item.materialOrder,jdbcType=DECIMAL}, #{item.materialPackingType,jdbcType=VARCHAR}, 
-      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
-      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
-      #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual  
-   </foreach> )
+    insert into RMS_MATERIAL_TYPE
+    (MATERIAL_TYPE_ID,
+    MATERIAL_TYPE_NAME, MATERIAL_TYPE_CODE,
+    MATERIAL_TYPE_SHOWNAME, MATERIAL_TYPE_CLASSIS,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, DELETED,
+    MATERIAL_UNIT, MATERIAL_ORDER,
+    MATERIAL_TYPE_STATUS, MATERIAL_ISINWARD
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.materialTypeId,jdbcType=DECIMAL},
+    #{item.materialTypeName,jdbcType=VARCHAR}, #{item.materialTypeCode,jdbcType=VARCHAR},
+    #{item.materialTypeShowname,jdbcType=VARCHAR}, #{item.materialTypeClassis,jdbcType=DECIMAL},
+    #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+    #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
+    #{item.materialUnit,jdbcType=VARCHAR}, #{item.materialOrder,jdbcType=DECIMAL},
+    #{item.materialTypeStatus,jdbcType=DECIMAL}, #{item.materialIsinward,jdbcType=DECIMAL}
+    from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_MATERIAL_TYPE
-     set
-       MATERIAL_TYPE_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeId,jdbcType=DECIMAL}
-       </foreach>
-       ,MATERIAL_TYPE_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeName,jdbcType=VARCHAR}
-       </foreach>
-       ,MATERIAL_UNIT=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialUnit,jdbcType=VARCHAR}
-       </foreach>
-       ,MATERIAL_ORDER=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialOrder,jdbcType=DECIMAL}
-       </foreach>
-       ,MATERIAL_PACKING_TYPE=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialPackingType,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
-          when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-     where MATERIAL_TYPE_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.materialTypeId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_MATERIAL_TYPE
+    set
+    MATERIAL_TYPE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeId,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_TYPE_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeName,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_TYPE_CODE=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeCode,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_TYPE_SHOWNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeShowname,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_TYPE_CLASSIS=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeClassis,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_UNIT=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialUnit,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_ORDER=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialOrder,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_TYPE_STATUS=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialTypeStatus,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_ISINWARD=
+    <foreach close="end" collection="list" index="index" item="item" open="case MATERIAL_TYPE_ID" separator=" ">
+      when #{item.materialTypeId,jdbcType=DECIMAL} then #{item.materialIsinward,jdbcType=DECIMAL}
+    </foreach>
+    where MATERIAL_TYPE_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.materialTypeId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_MATERIAL_TYPE
-    where MATERIAL_TYPE_ID in 
+    where MATERIAL_TYPE_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -348,8 +483,10 @@
   RMT.MATERIAL_TYPE_NAME AS "materialTypeName"
   FROM
   RMS_MATERIAL_TYPE RMT
+  <if test="con != null">
+    where MATERIAL_TYPE_NAME like #{con}
+  </if>
   )
-  WHERE rownum &lt; 100
   <where>
   <if test="materialTypeId!= null">
     and
@@ -367,6 +504,16 @@
   </where>
   <include refid="orderBy"></include>
 </select>
+  <select id="getInwardContractMaterial" resultType="java.util.Map">
+    select RMT.MATERIAL_TYPE_ID "materialTypeId",
+           RMT.MATERIAL_TYPE_NAME "materialTypeName"
+           from RMS_MATERIAL_TYPE RMT
+    where rmt.MATERIAL_ISINWARD = 1
+    <if test="con != null">
+      and rmt.MATERIAL_TYPE_NAME like #{con}
+    </if>
+    order by RMT.MATERIAL_TYPE_ID DESC
+  </select>
   <sql id="orderBy">
     <if test="orderField!=null and orderField !=''">
       order by "${orderField}"

+ 232 - 199
src/main/resources/com/steerinfo/dil/mapper/RmsPersonnelMapper.xml

@@ -20,18 +20,19 @@
     <result column="USERNAME" jdbcType="VARCHAR" property="username" />
     <result column="PASSWORD" jdbcType="VARCHAR" property="password" />
     <result column="PERSONNEL_SSO_ID" jdbcType="VARCHAR" property="personnelSsoId" />
+    <result column="PERSONNEL_CONTACT_NUMBER" jdbcType="VARCHAR" property="personnelContactNumber" />
   </resultMap>
   <sql id="columns">
-    PERSONNEL_ID, PERSONNEL_JOB_NUMBER, PERSONNEL_POST, PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID, 
-    PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, PERSONNEL_TEAM, INSERT_USERNAME, INSERT_TIME, 
-    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID, DELETED, USERNAME, 
-    PASSWORD, PERSONNEL_SSO_ID
+    PERSONNEL_ID, PERSONNEL_JOB_NUMBER, PERSONNEL_POST, PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID,
+    PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, PERSONNEL_TEAM, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID, DELETED, USERNAME,
+    PASSWORD, PERSONNEL_SSO_ID, PERSONNEL_CONTACT_NUMBER
   </sql>
   <sql id="columns_alias">
-    t.PERSONNEL_ID, t.PERSONNEL_JOB_NUMBER, t.PERSONNEL_POST, t.PERSONNEL_NAME, t.PERSONNEL_DEPARTMENT_ID, 
-    t.PERSONNEL_WORKSHOPID, t.PERSONNEL_SHIFTS, t.PERSONNEL_TEAM, t.INSERT_USERNAME, 
-    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.EAS_PERSONNEL_ID, 
-    t.DELETED, t.USERNAME, t.PASSWORD, t.PERSONNEL_SSO_ID
+    t.PERSONNEL_ID, t.PERSONNEL_JOB_NUMBER, t.PERSONNEL_POST, t.PERSONNEL_NAME, t.PERSONNEL_DEPARTMENT_ID,
+    t.PERSONNEL_WORKSHOPID, t.PERSONNEL_SHIFTS, t.PERSONNEL_TEAM, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.EAS_PERSONNEL_ID,
+    t.DELETED, t.USERNAME, t.PASSWORD, t.PERSONNEL_SSO_ID, t.PERSONNEL_CONTACT_NUMBER
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_PERSONNEL
@@ -40,7 +41,7 @@
     SELECT <include refid="columns_alias" /> FROM RMS_PERSONNEL t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="personnelId != null">
         and PERSONNEL_ID = #{personnelId}
       </if>
@@ -95,10 +96,13 @@
       <if test="personnelSsoId != null and personnelSsoId != ''">
         and PERSONNEL_SSO_ID = #{personnelSsoId}
       </if>
+      <if test="personnelContactNumber != null and personnelContactNumber != ''">
+        and PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="personnelId != null">
         and PERSONNEL_ID = #{personnelId}
       </if>
@@ -153,6 +157,9 @@
       <if test="personnelSsoId != null and personnelSsoId != ''">
         and PERSONNEL_SSO_ID LIKE '%${personnelSsoId}%'
       </if>
+      <if test="personnelContactNumber != null and personnelContactNumber != ''">
+        and PERSONNEL_CONTACT_NUMBER LIKE '%${personnelContactNumber}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
@@ -161,74 +168,77 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_PERSONNEL
-    where 1!=1 
-      <if test="personnelJobNumber != null and personnelJobNumber != ''">
-        or PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
-      </if>
-      <if test="personnelPost != null and personnelPost != ''">
-        or PERSONNEL_POST = #{personnelPost}
-      </if>
-      <if test="personnelName != null and personnelName != ''">
-        or PERSONNEL_NAME = #{personnelName}
-      </if>
-      <if test="personnelDepartmentId != null">
-        or PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId}
-      </if>
-      <if test="personnelWorkshopid != null">
-        or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
-      </if>
-      <if test="personnelShifts != null and personnelShifts != ''">
-        or PERSONNEL_SHIFTS = #{personnelShifts}
-      </if>
-      <if test="personnelTeam != null and personnelTeam != ''">
-        or PERSONNEL_TEAM = #{personnelTeam}
-      </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>
-      <if test="easPersonnelId != null and easPersonnelId != ''">
-        or EAS_PERSONNEL_ID = #{easPersonnelId}
-      </if>
-      <if test="deleted != null">
-        or DELETED = #{deleted}
-      </if>
-      <if test="username != null and username != ''">
-        or USERNAME = #{username}
-      </if>
-      <if test="password != null and password != ''">
-        or PASSWORD = #{password}
-      </if>
-      <if test="personnelSsoId != null and personnelSsoId != ''">
-        or PERSONNEL_SSO_ID = #{personnelSsoId}
-      </if>
+    where 1!=1
+    <if test="personnelJobNumber != null and personnelJobNumber != ''">
+      or PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
+    </if>
+    <if test="personnelPost != null and personnelPost != ''">
+      or PERSONNEL_POST = #{personnelPost}
+    </if>
+    <if test="personnelName != null and personnelName != ''">
+      or PERSONNEL_NAME = #{personnelName}
+    </if>
+    <if test="personnelDepartmentId != null">
+      or PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId}
+    </if>
+    <if test="personnelWorkshopid != null">
+      or PERSONNEL_WORKSHOPID = #{personnelWorkshopid}
+    </if>
+    <if test="personnelShifts != null and personnelShifts != ''">
+      or PERSONNEL_SHIFTS = #{personnelShifts}
+    </if>
+    <if test="personnelTeam != null and personnelTeam != ''">
+      or PERSONNEL_TEAM = #{personnelTeam}
+    </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>
+    <if test="easPersonnelId != null and easPersonnelId != ''">
+      or EAS_PERSONNEL_ID = #{easPersonnelId}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="username != null and username != ''">
+      or USERNAME = #{username}
+    </if>
+    <if test="password != null and password != ''">
+      or PASSWORD = #{password}
+    </if>
+    <if test="personnelSsoId != null and personnelSsoId != ''">
+      or PERSONNEL_SSO_ID = #{personnelSsoId}
+    </if>
+    <if test="personnelContactNumber != null and personnelContactNumber != ''">
+      or PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsPersonnel">
-    insert into RMS_PERSONNEL (PERSONNEL_ID, PERSONNEL_JOB_NUMBER, 
-      PERSONNEL_POST, PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID, 
-      PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, PERSONNEL_TEAM, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID, 
-      DELETED, USERNAME, PASSWORD, 
-      PERSONNEL_SSO_ID)
-    values (#{personnelId,jdbcType=DECIMAL}, #{personnelJobNumber,jdbcType=VARCHAR}, 
-      #{personnelPost,jdbcType=VARCHAR}, #{personnelName,jdbcType=VARCHAR}, #{personnelDepartmentId,jdbcType=DECIMAL}, 
-      #{personnelWorkshopid,jdbcType=DECIMAL}, #{personnelShifts,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{easPersonnelId,jdbcType=VARCHAR}, 
-      #{deleted,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 
-      #{personnelSsoId,jdbcType=VARCHAR})
+    insert into RMS_PERSONNEL (PERSONNEL_ID, PERSONNEL_JOB_NUMBER,
+                               PERSONNEL_POST, PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID,
+                               PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, PERSONNEL_TEAM,
+                               INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                               UPDATE_TIME, INSERT_UPDATE_REMARK, EAS_PERSONNEL_ID,
+                               DELETED, USERNAME, PASSWORD,
+                               PERSONNEL_SSO_ID, PERSONNEL_CONTACT_NUMBER)
+    values (#{personnelId,jdbcType=DECIMAL}, #{personnelJobNumber,jdbcType=VARCHAR},
+            #{personnelPost,jdbcType=VARCHAR}, #{personnelName,jdbcType=VARCHAR}, #{personnelDepartmentId,jdbcType=DECIMAL},
+            #{personnelWorkshopid,jdbcType=DECIMAL}, #{personnelShifts,jdbcType=VARCHAR}, #{personnelTeam,jdbcType=VARCHAR},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{easPersonnelId,jdbcType=VARCHAR},
+            #{deleted,jdbcType=DECIMAL}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
+            #{personnelSsoId,jdbcType=VARCHAR}, #{personnelContactNumber,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsPersonnel">
     insert into RMS_PERSONNEL
@@ -287,6 +297,9 @@
       <if test="personnelSsoId != null">
         PERSONNEL_SSO_ID,
       </if>
+      <if test="personnelContactNumber != null">
+        PERSONNEL_CONTACT_NUMBER,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="personnelId != null">
@@ -343,27 +356,31 @@
       <if test="personnelSsoId != null">
         #{personnelSsoId,jdbcType=VARCHAR},
       </if>
+      <if test="personnelContactNumber != null">
+        #{personnelContactNumber,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsPersonnel">
     update RMS_PERSONNEL
     set PERSONNEL_JOB_NUMBER = #{personnelJobNumber,jdbcType=VARCHAR},
-      PERSONNEL_POST = #{personnelPost,jdbcType=VARCHAR},
-      PERSONNEL_NAME = #{personnelName,jdbcType=VARCHAR},
-      PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId,jdbcType=DECIMAL},
-      PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
-      PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
-      PERSONNEL_TEAM = #{personnelTeam,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},
-      EAS_PERSONNEL_ID = #{easPersonnelId,jdbcType=VARCHAR},
-      DELETED = #{deleted,jdbcType=DECIMAL},
-      USERNAME = #{username,jdbcType=VARCHAR},
-      PASSWORD = #{password,jdbcType=VARCHAR},
-      PERSONNEL_SSO_ID = #{personnelSsoId,jdbcType=VARCHAR}
+        PERSONNEL_POST = #{personnelPost,jdbcType=VARCHAR},
+        PERSONNEL_NAME = #{personnelName,jdbcType=VARCHAR},
+        PERSONNEL_DEPARTMENT_ID = #{personnelDepartmentId,jdbcType=DECIMAL},
+        PERSONNEL_WORKSHOPID = #{personnelWorkshopid,jdbcType=DECIMAL},
+        PERSONNEL_SHIFTS = #{personnelShifts,jdbcType=VARCHAR},
+        PERSONNEL_TEAM = #{personnelTeam,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},
+        EAS_PERSONNEL_ID = #{easPersonnelId,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        USERNAME = #{username,jdbcType=VARCHAR},
+        PASSWORD = #{password,jdbcType=VARCHAR},
+        PERSONNEL_SSO_ID = #{personnelSsoId,jdbcType=VARCHAR},
+        PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber,jdbcType=VARCHAR}
     where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsPersonnel">
@@ -420,10 +437,13 @@
       <if test="personnelSsoId != null">
         PERSONNEL_SSO_ID = #{personnelSsoId,jdbcType=VARCHAR},
       </if>
+      <if test="personnelContactNumber != null">
+        PERSONNEL_CONTACT_NUMBER = #{personnelContactNumber,jdbcType=VARCHAR},
+      </if>
     </set>
     where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
     <include refid="select" />
     where PERSONNEL_ID = #{personnelId,jdbcType=DECIMAL}
   </select>
@@ -436,112 +456,118 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_PERSONNEL 
-      (PERSONNEL_ID, 
-      PERSONNEL_JOB_NUMBER, PERSONNEL_POST, 
-      PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID, 
-      PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS, 
-      PERSONNEL_TEAM, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      EAS_PERSONNEL_ID, DELETED, USERNAME, 
-      PASSWORD, PERSONNEL_SSO_ID)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.personnelId,jdbcType=DECIMAL}, 
-      #{item.personnelJobNumber,jdbcType=VARCHAR}, #{item.personnelPost,jdbcType=VARCHAR}, 
-      #{item.personnelName,jdbcType=VARCHAR}, #{item.personnelDepartmentId,jdbcType=DECIMAL}, 
-      #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{item.personnelShifts,jdbcType=VARCHAR}, 
-      #{item.personnelTeam,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{item.easPersonnelId,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, #{item.username,jdbcType=VARCHAR}, 
-      #{item.password,jdbcType=VARCHAR}, #{item.personnelSsoId,jdbcType=VARCHAR} from dual  
-   </foreach> )
+    insert into RMS_PERSONNEL
+    (PERSONNEL_ID,
+    PERSONNEL_JOB_NUMBER, PERSONNEL_POST,
+    PERSONNEL_NAME, PERSONNEL_DEPARTMENT_ID,
+    PERSONNEL_WORKSHOPID, PERSONNEL_SHIFTS,
+    PERSONNEL_TEAM, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    EAS_PERSONNEL_ID, DELETED, USERNAME,
+    PASSWORD, PERSONNEL_SSO_ID, PERSONNEL_CONTACT_NUMBER
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.personnelId,jdbcType=DECIMAL},
+    #{item.personnelJobNumber,jdbcType=VARCHAR}, #{item.personnelPost,jdbcType=VARCHAR},
+    #{item.personnelName,jdbcType=VARCHAR}, #{item.personnelDepartmentId,jdbcType=DECIMAL},
+    #{item.personnelWorkshopid,jdbcType=DECIMAL}, #{item.personnelShifts,jdbcType=VARCHAR},
+    #{item.personnelTeam,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.easPersonnelId,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, #{item.username,jdbcType=VARCHAR},
+    #{item.password,jdbcType=VARCHAR}, #{item.personnelSsoId,jdbcType=VARCHAR}, #{item.personnelContactNumber,jdbcType=VARCHAR}
+    from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_PERSONNEL
-     set
-       PERSONNEL_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelId,jdbcType=DECIMAL}
-       </foreach>
-       ,PERSONNEL_JOB_NUMBER=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelJobNumber,jdbcType=VARCHAR}
-       </foreach>
-       ,PERSONNEL_POST=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelPost,jdbcType=VARCHAR}
-       </foreach>
-       ,PERSONNEL_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelName,jdbcType=VARCHAR}
-       </foreach>
-       ,PERSONNEL_DEPARTMENT_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelDepartmentId,jdbcType=DECIMAL}
-       </foreach>
-       ,PERSONNEL_WORKSHOPID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
-       </foreach>
-       ,PERSONNEL_SHIFTS=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
-       </foreach>
-       ,PERSONNEL_TEAM=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,EAS_PERSONNEL_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.easPersonnelId,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-       ,USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.username,jdbcType=VARCHAR}
-       </foreach>
-       ,PASSWORD=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.password,jdbcType=VARCHAR}
-       </foreach>
-       ,PERSONNEL_SSO_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
-          when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelSsoId,jdbcType=VARCHAR}
-       </foreach>
-     where PERSONNEL_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.personnelId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_PERSONNEL
+    set
+    PERSONNEL_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelId,jdbcType=DECIMAL}
+    </foreach>
+    ,PERSONNEL_JOB_NUMBER=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelJobNumber,jdbcType=VARCHAR}
+    </foreach>
+    ,PERSONNEL_POST=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelPost,jdbcType=VARCHAR}
+    </foreach>
+    ,PERSONNEL_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelName,jdbcType=VARCHAR}
+    </foreach>
+    ,PERSONNEL_DEPARTMENT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelDepartmentId,jdbcType=DECIMAL}
+    </foreach>
+    ,PERSONNEL_WORKSHOPID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelWorkshopid,jdbcType=DECIMAL}
+    </foreach>
+    ,PERSONNEL_SHIFTS=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelShifts,jdbcType=VARCHAR}
+    </foreach>
+    ,PERSONNEL_TEAM=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelTeam,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,EAS_PERSONNEL_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.easPersonnelId,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.username,jdbcType=VARCHAR}
+    </foreach>
+    ,PASSWORD=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.password,jdbcType=VARCHAR}
+    </foreach>
+    ,PERSONNEL_SSO_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelSsoId,jdbcType=VARCHAR}
+    </foreach>
+    ,PERSONNEL_CONTACT_NUMBER=
+    <foreach close="end" collection="list" index="index" item="item" open="case PERSONNEL_ID" separator=" ">
+      when #{item.personnelId,jdbcType=DECIMAL} then #{item.personnelContactNumber,jdbcType=VARCHAR}
+    </foreach>
+    where PERSONNEL_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.personnelId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_PERSONNEL
-    where PERSONNEL_ID in 
+    where PERSONNEL_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -562,7 +588,8 @@
     RP.PERSONNEL_SHIFTS AS "personnelShifts",
     RS.SHIPPER_ID AS "shipperId",
     RP.PERSONNEL_DEPARTMENT_ID AS "departmentId",
-    RP.PERSONNEL_TEAM AS "personnelTeam"
+    RP.PERSONNEL_TEAM AS "personnelTeam",
+    RP.PERSONNEL_CONTACT_NUMBER "concactNumber"
     FROM RMS_PERSONNEL RP
     LEFT JOIN RMS_SHIPPER RS
     ON RP.PERSONNEL_DEPARTMENT_ID=RS.SHIPPER_ID
@@ -677,10 +704,10 @@
   <!-- 查询sso主键以及机构编码 -->
   <select id="getShipperMap" parameterType="DECIMAL" resultType="java.util.Map" >
     SELECT
-        RS.SHIPPER_SSO_ID AS "shipperSsoId",
-        RS.SHIPPER_ORG_CODE AS "shipperOrgCode"
-FROM RMS_SHIPPER RS
-WHERE RS.SHIPPER_ID = #{shipperId}
+      RS.SHIPPER_SSO_ID AS "shipperSsoId",
+      RS.SHIPPER_ORG_CODE AS "shipperOrgCode"
+    FROM RMS_SHIPPER RS
+    WHERE RS.SHIPPER_ID = #{shipperId}
   </select>
   <select id="selectByParametersPersonnelJobNumber" resultType="java.lang.Integer">
     SELECT RP.PERSONNEL_ID
@@ -688,4 +715,10 @@ WHERE RS.SHIPPER_ID = #{shipperId}
     WHERE RP.PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
       AND RP.DELETED =0
   </select>
+  <select id="getPersonnelIdByJobNumber" resultType="java.math.BigDecimal">
+    select COUNT(RP.PERSONNEL_ID)
+    from RMS_PERSONNEL RP
+    WHERE  RP.PERSONNEL_JOB_NUMBER=#{personnelJobNumber} and RP.PERSONNEL_NAME=#{personnelName} and RP.DELETED=0
+  </select>
+
 </mapper>

+ 6 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsWarehouseMapper.xml

@@ -542,5 +542,11 @@
     </where>
 
   </select>
+<!-- 根据仓库名称和托运人查找仓库 -->
+    <select id="searchWarehouseName" resultType="java.math.BigDecimal" parameterType="java.util.Map">
+      select count(RW.WAREHOUSE_ID)
+      from RMS_WAREHOUSE RW
+      WHERE  RW.WAREHOUSE_NAME=#{warehouseName} and RW.SHIPPER_ID = #{shipperId} and RW.deleted=0
+    </select>
 
 </mapper>