Browse Source

修改装卸货点以及货权转移单位

zx 3 năm trước cách đây
mục cha
commit
13307b6541

+ 1 - 1
pom.xml

@@ -111,7 +111,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>RMS_MATERIAL_TYPE</param>
+                        <param>AMSSHIP_DELIVERY_NOTICE</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);

+ 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);
+    }
+
+}

+ 0 - 1
src/main/java/com/steerinfo/dil/controller/RmsMaterialTypeController.java

@@ -59,7 +59,6 @@ public class RmsMaterialTypeController extends BaseRESTfulController {
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsMaterialTypeService.getMaterialTypeList(mapValue);
-
         PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
         return success(data);
     }

+ 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);
+}

+ 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();
+    }
+}

+ 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);
+
+}

+ 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;
+    }
+}

+ 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

+ 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>

+ 0 - 1
src/main/resources/com/steerinfo/dil/mapper/RmsMaterialTypeMapper.xml

@@ -487,7 +487,6 @@
     where MATERIAL_TYPE_NAME like #{con}
   </if>
   )
-  WHERE rownum &lt; 100
   <where>
   <if test="materialTypeId!= null">
     and