Redeem 1 gadu atpakaļ
vecāks
revīzija
94e4ff1003

+ 2 - 2
pom.xml

@@ -189,13 +189,13 @@
                 <artifactId>generator-maven-plugin</artifactId>
                 <version>3.0</version>
                 <configuration>
-                    <connUrl>jdbc:oracle:thin:@172.16.90.214:1521/gxmes</connUrl>
+                    <connUrl>jdbc:oracle:thin:@172.16.90.197:1521/ATTMS</connUrl>
                     <user>gxmestest</user>
                     <password>gxmestest</password>
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>SYSTEM_FILE</param>
+                        <param>DIL_APP_CID</param>
                     </tables>
                 </configuration>
                 <executions>

+ 25 - 0
src/main/java/com/steerinfo/dil/controller/BackgroundProcessingController.java

@@ -4,8 +4,11 @@ package com.steerinfo.dil.controller;
 import com.steerinfo.dil.aspect.LogAspect;
 import com.steerinfo.dil.feign.SSOFeign;
 import com.steerinfo.dil.mapper.BackgroundProcessingMapper;
+import com.steerinfo.dil.mapper.DilAppCidMapper;
 import com.steerinfo.dil.mapper.OmstruckOrderMapper;
 import com.steerinfo.dil.mapper.UniversalMapper;
+import com.steerinfo.dil.model.DilAppCid;
+import com.steerinfo.dil.model.OmstruckOrder;
 import com.steerinfo.dil.service.impl.BackgroundProcessingServiceImpl;
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.DataChange;
@@ -36,6 +39,9 @@ public class BackgroundProcessingController extends BaseRESTfulController {
     @Resource
     SSOUtil ssoUtil;
 
+    @Resource
+    DilAppCidMapper dilAppCidMapper;
+
     static final Logger log = Logger.getLogger(BackgroundProcessingController.class);
 
     @ApiOperation("登录接口")
@@ -69,6 +75,25 @@ public class BackgroundProcessingController extends BaseRESTfulController {
         return resMap;
     }
 
+    @ApiOperation("更新cid")
+    @PostMapping("/insertAppCid")
+    public RESTfulResult  insertAppCid(DilAppCid dilAppCid) {
+        try {
+            Map<String, Object> searchMap = new HashMap<>();
+            searchMap.put("cid",dilAppCid.getCid());
+            searchMap.put("userCode",dilAppCid.getUserCode());
+            List<DilAppCid> mapList = dilAppCidMapper.selectByParameters(searchMap);
+            if(mapList.size() > 0 && mapList.get(0) != null) {
+                return success();
+            }
+            dilAppCid.setPrimaryId(dilAppCidMapper.nextId());
+            dilAppCidMapper.insertSelective(dilAppCid);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return success("更新成功");
+    }
+
 
 
 }

+ 0 - 68
src/main/java/com/steerinfo/dil/mapper/BackgroundProcessingMapper.java

@@ -10,75 +10,7 @@ import java.util.Map;
 
 @Mapper
 public interface BackgroundProcessingMapper {
-    //通过采购订单号关闭一车多趟
-    int closePurOrderMoreTrips(String purchaseOrderNo);
 
-    Integer getOrderType(Map<String, Object> map);
-
-    int updatePurOrderOrgId(Map<String, Object> map);
-
-    Map<String, Object> getOrderMesByOrderNum(String orderNumber);
-
-    ArrayList<Integer> getAllPurOrder(String purchaseOrderNo);
-
-    int deleteOrders(ArrayList<Integer> list);
-
-    int deleteOrderMaterials(ArrayList<Integer> list);
-
-    int batchByOrderIdForTotalDelete(ArrayList<Integer> list);
-
-    List<Integer> enFactoryCheck(BigDecimal resultTotalId);
-    List<Integer> loadCheck(BigDecimal resultTotalId);
-    List<Integer> unloadCheck(BigDecimal resultTotalId);
-    List<Integer> weightCheck(BigDecimal resultTotalId);
-    List<Integer> outFactoryCheck(BigDecimal resultTotalId);
-
-    List<Map<String, Object>> getEnFactoryResult(@Param("resultTotalId") BigDecimal resultTotalId,@Param("sqe") Integer sqe);
-
-    List<Map<String, Object>> loadResult(@Param("resultTotalId") BigDecimal resultTotalId,@Param("sqe") Integer sqe);
-
-    List<Map<String, Object>> unloadResult(@Param("resultTotalId") BigDecimal resultTotalId,@Param("sqe") Integer sqe);
-
-    List<Map<String, Object>> weightResult(@Param("resultTotalId") BigDecimal resultTotalId,@Param("sqe") Integer sqe);
-
-    List<Map<String, Object>> outFactoryResult(@Param("resultTotalId") BigDecimal resultTotalId,@Param("sqe") Integer sqe);
-
-    int deleteEnFactoryUnnecessaryResult(@Param("list") List<Integer> list);
-
-    int deleteLoadUnnecessaryResult(@Param("list") List<Integer> list);
-
-    int deleteUnloadUnnecessaryResult(@Param("list") List<Integer> list);
-
-    int deleteWeightUnnecessaryResult(@Param("list") List<Integer> list);
-
-    int deleteOutFactoryUnnecessaryResult(@Param("list") List<Integer> list);
-
-    int allowEnfactory(String orderNumber);
-
-    int updateOrderCanWork(String orderNumber);
-
-    int updateOrderStatus(Map<String, Object> map);
-
-    //根据总实绩无差别删除多余计量实绩,仅保留一条
-    int deleteExtraWeight(BigDecimal resultTotalId);
-
-    //根据总实绩无差别删除多余装货实绩,仅保留一条
-    int deleteExtraLoad(BigDecimal resultTotalId);
-
-    //根据总实绩无差别删除多余卸货实绩,仅保留一条
-    int deleteExtraUnload(BigDecimal resultTotalId);
-
-    //插入待传金蝶表格
-    int insertNotUpload(Map<String,Object> map);
-
-    //重置钢材打印数量
-    int resetPrintNumber(Map<String,Object> map);
-
-    //查询钢材车辆进厂并且没有净重的总实绩
-    Map<String,Object> getDetailsForEnAndQue(Map<String,Object> map);
-
-    //清空进厂信息
-    int clearEnDetails(Map<String,Object> map);
 
     Map<String, Object> getUserInfo(String userName);
 

+ 15 - 0
src/main/java/com/steerinfo/dil/mapper/DilAppCidMapper.java

@@ -0,0 +1,15 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.DilAppCid;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface DilAppCidMapper extends IBaseMapper<DilAppCid, BigDecimal> {
+
+    @Select("select SEQ_DIL_APP_CID.nextval from dual")
+    BigDecimal nextId();
+}

+ 289 - 0
src/main/java/com/steerinfo/dil/model/DilAppCid.java

@@ -0,0 +1,289 @@
+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="null")
+public class DilAppCid implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(PRIMARY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal primaryId;
+
+    /**
+     * 用户(USER_CODE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="用户",required=false)
+    private String userCode;
+
+    /**
+     * 推送ID(CID,VARCHAR,255)
+     */
+    @ApiModelProperty(value="推送ID",required=false)
+    private String cid;
+
+    /**
+     * 新增时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="新增时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 新增用户(INSERT_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="新增用户",required=false)
+    private String insertUsername;
+
+    /**
+     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 修改用户(UPDATE_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="修改用户",required=false)
+    private String updateUsername;
+
+    /**
+     * 备注(INSERT_UPDATE_REMARK,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 逻辑删除(0正常,1删除)(DELETED,DECIMAL,8)
+     */
+    @ApiModelProperty(value="逻辑删除(0正常,1删除)",required=true)
+    private Integer deleted;
+
+    /**
+     * 备用字段1(ALTERNATE_FIELDS1,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段1",required=false)
+    private String alternateFields1;
+
+    /**
+     * 备用字段2(ALTERNATE_FIELDS2,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段2",required=false)
+    private String alternateFields2;
+
+    /**
+     * 备用字段3(ALTERNATE_FIELDS3,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段3",required=false)
+    private String alternateFields3;
+
+    /**
+     * 备用字段4(ALTERNATE_FIELDS4,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段4",required=false)
+    private String alternateFields4;
+
+    /**
+     * 备用字段5(ALTERNATE_FIELDS5,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段5",required=false)
+    private String alternateFields5;
+
+    /**
+     * 备用字段6(ALTERNATE_FIELDS6,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段6",required=false)
+    private String alternateFields6;
+
+    /**
+     * 备用字段7(ALTERNATE_FIELDS7,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段7",required=false)
+    private String alternateFields7;
+
+    /**
+     * 备用字段8(ALTERNATE_FIELDS8,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段8",required=false)
+    private String alternateFields8;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.primaryId;
+    }
+
+    @Override
+    public void setId(BigDecimal primaryId) {
+        this.primaryId = primaryId;
+    }
+
+    public BigDecimal getPrimaryId() {
+        return primaryId;
+    }
+
+    public void setPrimaryId(BigDecimal primaryId) {
+        this.primaryId = primaryId;
+    }
+
+    public String getUserCode() {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode) {
+        this.userCode = userCode == null ? null : userCode.trim();
+    }
+
+    public String getCid() {
+        return cid;
+    }
+
+    public void setCid(String cid) {
+        this.cid = cid == null ? null : cid.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public Integer getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(Integer deleted) {
+        this.deleted = deleted;
+    }
+
+    public String getAlternateFields1() {
+        return alternateFields1;
+    }
+
+    public void setAlternateFields1(String alternateFields1) {
+        this.alternateFields1 = alternateFields1 == null ? null : alternateFields1.trim();
+    }
+
+    public String getAlternateFields2() {
+        return alternateFields2;
+    }
+
+    public void setAlternateFields2(String alternateFields2) {
+        this.alternateFields2 = alternateFields2 == null ? null : alternateFields2.trim();
+    }
+
+    public String getAlternateFields3() {
+        return alternateFields3;
+    }
+
+    public void setAlternateFields3(String alternateFields3) {
+        this.alternateFields3 = alternateFields3 == null ? null : alternateFields3.trim();
+    }
+
+    public String getAlternateFields4() {
+        return alternateFields4;
+    }
+
+    public void setAlternateFields4(String alternateFields4) {
+        this.alternateFields4 = alternateFields4 == null ? null : alternateFields4.trim();
+    }
+
+    public String getAlternateFields5() {
+        return alternateFields5;
+    }
+
+    public void setAlternateFields5(String alternateFields5) {
+        this.alternateFields5 = alternateFields5 == null ? null : alternateFields5.trim();
+    }
+
+    public String getAlternateFields6() {
+        return alternateFields6;
+    }
+
+    public void setAlternateFields6(String alternateFields6) {
+        this.alternateFields6 = alternateFields6 == null ? null : alternateFields6.trim();
+    }
+
+    public String getAlternateFields7() {
+        return alternateFields7;
+    }
+
+    public void setAlternateFields7(String alternateFields7) {
+        this.alternateFields7 = alternateFields7 == null ? null : alternateFields7.trim();
+    }
+
+    public String getAlternateFields8() {
+        return alternateFields8;
+    }
+
+    public void setAlternateFields8(String alternateFields8) {
+        this.alternateFields8 = alternateFields8 == null ? null : alternateFields8.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", primaryId=").append(primaryId);
+        sb.append(", userCode=").append(userCode);
+        sb.append(", cid=").append(cid);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", alternateFields1=").append(alternateFields1);
+        sb.append(", alternateFields2=").append(alternateFields2);
+        sb.append(", alternateFields3=").append(alternateFields3);
+        sb.append(", alternateFields4=").append(alternateFields4);
+        sb.append(", alternateFields5=").append(alternateFields5);
+        sb.append(", alternateFields6=").append(alternateFields6);
+        sb.append(", alternateFields7=").append(alternateFields7);
+        sb.append(", alternateFields8=").append(alternateFields8);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 0 - 3
src/main/java/com/steerinfo/dil/service/IBackgroundProcessService.java

@@ -4,7 +4,4 @@ import java.util.Map;
 
 public interface IBackgroundProcessService {
 
-    int updatePurOrgId(Map<String, Object> map);
-
-    int bindCidCapacityNo(String cid, String capacityNo);
 }

+ 0 - 129
src/main/java/com/steerinfo/dil/service/impl/BackgroundProcessingServiceImpl.java

@@ -14,135 +14,6 @@ import java.util.*;
 @Service(value = "backgroundProcessingService")
 public class BackgroundProcessingServiceImpl implements IBackgroundProcessService {
 
-    @Autowired
-    private BackgroundProcessingMapper backgroundProcessingMapper;
 
-    @Autowired
-    private DilCidCapacityMapper dilCidCapacityMapper;
 
-
-    /**
-     * 更新订单所属厂区
-     * @param map
-     * @return
-     */
-    @Override
-    public int updatePurOrgId(Map<String, Object> map) {
-        return backgroundProcessingMapper.updatePurOrderOrgId(map);
-    }
-
-    /**
-     * 删除重复实绩
-     * @param orderNumber
-     * @return
-     */
-    public int deleteErrorResult(String orderNumber) {
-        Map<String, Object> orderMes = backgroundProcessingMapper.getOrderMesByOrderNum(orderNumber);
-        int orderType = DataChange.dataToBigDecimal(orderMes.get("orderType")).intValue();
-        List<Integer> arrayList = Arrays.asList(15, 16, 21); //没有固定路线不支持此操作
-        if(arrayList.contains(orderType)){
-            return 0;
-        }
-        BigDecimal resultTotalId = DataChange.dataToBigDecimal(orderMes.get("resultTotalId"));
-        if(orderType==11){
-            //如果是内转计重,删除多余计量和装卸货实绩
-            backgroundProcessingMapper.deleteExtraWeight(resultTotalId);
-            backgroundProcessingMapper.deleteExtraLoad(resultTotalId);
-            backgroundProcessingMapper.deleteExtraUnload(resultTotalId);
-            return 0;
-        }
-        List<Integer> enFactoryList = backgroundProcessingMapper.enFactoryCheck(resultTotalId);
-        if(enFactoryList != null && enFactoryList.size() != 0){
-            //查询出当前顺序号中所有的实绩
-            for (Integer sqe : enFactoryList) {
-                List<Map<String, Object>> mesList = backgroundProcessingMapper.getEnFactoryResult(resultTotalId, sqe);
-                closeWay(mesList, 1);
-            }
-        }
-        List<Integer> loadList = backgroundProcessingMapper.loadCheck(resultTotalId);
-        if(loadList != null && loadList.size() != 0){
-            for (Integer sqe : loadList) {
-                List<Map<String, Object>> mesList = backgroundProcessingMapper.loadResult(resultTotalId, sqe);
-                closeWay(mesList, 2);
-            }
-        }
-        List<Integer> unloadList = backgroundProcessingMapper.unloadCheck(resultTotalId);
-        if(unloadList != null && unloadList.size() != 0){
-            for (Integer sqe : unloadList) {
-                List<Map<String, Object>> mesList = backgroundProcessingMapper.unloadResult(resultTotalId, sqe);
-                closeWay( mesList, 3);
-            }
-        }
-        List<Integer> weightList = backgroundProcessingMapper.weightCheck(resultTotalId);
-        if(weightList != null && weightList.size() != 0){
-            for (Integer sqe : weightList) {
-                List<Map<String, Object>> mesList = backgroundProcessingMapper.weightResult(resultTotalId, sqe);
-                closeWay(mesList, 4);
-            }
-        }
-        List<Integer> outFactoryList = backgroundProcessingMapper.outFactoryCheck(resultTotalId);
-        if(outFactoryList != null && outFactoryList.size() != 0){
-            for (Integer sqe : outFactoryList) {
-                List<Map<String, Object>> mesList = backgroundProcessingMapper.outFactoryResult(resultTotalId, sqe);
-                closeWay(mesList, 5);
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * 关闭通用方法
-     * @param mesList 这些顺序号的实绩信息
-     * @param type 1:进厂 2:计量 3:装货:4:卸货 5:出厂
-     */
-    public void closeWay(List<Map<String, Object>> mesList, int type){
-        List<Integer> resultList = new ArrayList<>();
-        for (Map<String, Object> map : mesList) {
-            //有过操作时间的不做删除
-            if(map.get("time") == null){
-                resultList.add(DataChange.dataToBigDecimal(map.get("resultId")).intValue()); //添入列表中
-            }
-        }
-        if(mesList.size() == resultList.size()){
-            //如果所有的实绩都为空 ,则只保留一条实绩,其余的全部删除
-            resultList.remove(0);
-        }
-        if(resultList.size() != 0){
-            //删除实绩数据
-            if(type == 1)
-                backgroundProcessingMapper.deleteEnFactoryUnnecessaryResult(resultList);
-            else if(type == 2)
-                backgroundProcessingMapper.deleteLoadUnnecessaryResult(resultList);
-            else if(type == 3)
-                backgroundProcessingMapper.deleteUnloadUnnecessaryResult(resultList);
-            else if(type == 4)
-                backgroundProcessingMapper.deleteWeightUnnecessaryResult(resultList);
-            else if(type == 5)
-                backgroundProcessingMapper.deleteOutFactoryUnnecessaryResult(resultList);
-        }
-    }
-
-    @Override
-    public int bindCidCapacityNo(String cid, String capacityNo) {
-        DilCidCapacity dilCidCapacity = new DilCidCapacity();
-        //根据车牌号和cid去查询是否存在
-        Integer j = dilCidCapacityMapper.selectByCidAndCapacityNo(cid,capacityNo);
-        if(j > 0){
-            return 0;
-        }
-        dilCidCapacity.setCidCapacityId(dilCidCapacityMapper.getCidMax());
-        dilCidCapacity.setCid(cid);
-        dilCidCapacity.setCapacityNumber(capacityNo);
-        dilCidCapacity.setInsertTime(new Date());
-        int i = dilCidCapacityMapper.insertSelective(dilCidCapacity);
-        return i;
-    }
-
-    public Map<String,Object> bpLogin(String userName) {
-        Map<String,Object> map = backgroundProcessingMapper.getUserInfo(userName);
-        if("司机".equals(map.get("personnelPost"))) {
-            List<Map<String,Object>> capacityList = backgroundProcessingMapper.getCapacityList(DataChange.dataToBigDecimal(map.get("personnelId")));
-        }
-        return map;
-    }
 }

+ 525 - 0
src/main/resources/com/steerinfo/dil/mapper/DilAppCidMapper.xml

@@ -0,0 +1,525 @@
+<?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.DilAppCidMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.DilAppCid">
+    <id column="PRIMARY_ID" jdbcType="DECIMAL" property="primaryId" />
+    <result column="USER_CODE" jdbcType="VARCHAR" property="userCode" />
+    <result column="CID" jdbcType="VARCHAR" property="cid" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="ALTERNATE_FIELDS1" jdbcType="VARCHAR" property="alternateFields1" />
+    <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
+    <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
+    <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
+    <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
+    <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
+    <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
+    <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
+  </resultMap>
+  <sql id="columns">
+    PRIMARY_ID, USER_CODE, CID, INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, 
+    INSERT_UPDATE_REMARK, DELETED, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, 
+    ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
+  </sql>
+  <sql id="columns_alias">
+    t.PRIMARY_ID, t.USER_CODE, t.CID, t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, 
+    t.UPDATE_USERNAME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ALTERNATE_FIELDS1, t.ALTERNATE_FIELDS2, 
+    t.ALTERNATE_FIELDS3, t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6, 
+    t.ALTERNATE_FIELDS7, t.ALTERNATE_FIELDS8
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM DIL_APP_CID
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM DIL_APP_CID t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="primaryId != null">
+        and PRIMARY_ID = #{primaryId}
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE = #{userCode}
+      </if>
+      <if test="cid != null and cid != ''">
+        and CID = #{cid}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="alternateFields1 != null and alternateFields1 != ''">
+        and ALTERNATE_FIELDS1 = #{alternateFields1}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="primaryId != null">
+        and PRIMARY_ID = #{primaryId}
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE LIKE '%${userCode}%'
+      </if>
+      <if test="cid != null and cid != ''">
+        and CID LIKE '%${cid}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="alternateFields1 != null and alternateFields1 != ''">
+        and ALTERNATE_FIELDS1 LIKE '%${alternateFields1}%'
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from DIL_APP_CID
+    where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DIL_APP_CID
+    where 1!=1 
+      <if test="userCode != null and userCode != ''">
+        or USER_CODE = #{userCode}
+      </if>
+      <if test="cid != null and cid != ''">
+        or CID = #{cid}
+      </if>
+      <if test="insertTime != null">
+        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        or INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        or UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="deleted != null">
+        or DELETED = #{deleted}
+      </if>
+      <if test="alternateFields1 != null and alternateFields1 != ''">
+        or ALTERNATE_FIELDS1 = #{alternateFields1}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        or ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        or ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        or ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        or ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        or ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        or ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        or ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.DilAppCid">
+    insert into DIL_APP_CID (PRIMARY_ID, USER_CODE, CID, 
+      INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, 
+      UPDATE_USERNAME, INSERT_UPDATE_REMARK, DELETED, 
+      ALTERNATE_FIELDS1, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, 
+      ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, 
+      ALTERNATE_FIELDS7, ALTERNATE_FIELDS8)
+    values (#{primaryId,jdbcType=DECIMAL}, #{userCode,jdbcType=VARCHAR}, #{cid,jdbcType=VARCHAR}, 
+      #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{updateUsername,jdbcType=VARCHAR}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, 
+      #{alternateFields1,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR}, #{alternateFields3,jdbcType=VARCHAR}, 
+      #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR}, #{alternateFields6,jdbcType=VARCHAR}, 
+      #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.DilAppCid">
+    insert into DIL_APP_CID
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="primaryId != null">
+        PRIMARY_ID,
+      </if>
+      <if test="userCode != null">
+        USER_CODE,
+      </if>
+      <if test="cid != null">
+        CID,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="alternateFields1 != null">
+        ALTERNATE_FIELDS1,
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2,
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3,
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4,
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5,
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6,
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7,
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="primaryId != null">
+        #{primaryId,jdbcType=DECIMAL},
+      </if>
+      <if test="userCode != null">
+        #{userCode,jdbcType=VARCHAR},
+      </if>
+      <if test="cid != null">
+        #{cid,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="alternateFields1 != null">
+        #{alternateFields1,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.DilAppCid">
+    update DIL_APP_CID
+    set USER_CODE = #{userCode,jdbcType=VARCHAR},
+      CID = #{cid,jdbcType=VARCHAR},
+      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      DELETED = #{deleted,jdbcType=DECIMAL},
+      ALTERNATE_FIELDS1 = #{alternateFields1,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR}
+    where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.DilAppCid">
+    update DIL_APP_CID
+    <set>
+      <if test="userCode != null">
+        USER_CODE = #{userCode,jdbcType=VARCHAR},
+      </if>
+      <if test="cid != null">
+        CID = #{cid,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="alternateFields1 != null">
+        ALTERNATE_FIELDS1 = #{alternateFields1,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where PRIMARY_ID = #{primaryId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into DIL_APP_CID 
+      (PRIMARY_ID, 
+      USER_CODE, CID, INSERT_TIME, 
+      INSERT_USERNAME, UPDATE_TIME, 
+      UPDATE_USERNAME, INSERT_UPDATE_REMARK, 
+      DELETED, ALTERNATE_FIELDS1, ALTERNATE_FIELDS2, 
+      ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, 
+      ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, 
+      ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.primaryId,jdbcType=DECIMAL}, 
+      #{item.userCode,jdbcType=VARCHAR}, #{item.cid,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
+      #{item.insertUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.updateUsername,jdbcType=VARCHAR}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{item.deleted,jdbcType=DECIMAL}, #{item.alternateFields1,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR}, 
+      #{item.alternateFields3,jdbcType=VARCHAR}, #{item.alternateFields4,jdbcType=VARCHAR}, 
+      #{item.alternateFields5,jdbcType=VARCHAR}, #{item.alternateFields6,jdbcType=VARCHAR}, 
+      #{item.alternateFields7,jdbcType=VARCHAR}, #{item.alternateFields8,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DIL_APP_CID
+     set
+       PRIMARY_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.primaryId,jdbcType=DECIMAL}
+       </foreach>
+       ,USER_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.userCode,jdbcType=VARCHAR}
+       </foreach>
+       ,CID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.cid,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETED=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+       </foreach>
+       ,ALTERNATE_FIELDS1=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields1,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS2=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS3=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS4=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS5=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS6=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS7=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS8=
+       <foreach collection="list" item="item" index="index" separator=" " open="case PRIMARY_ID" close="end">
+          when #{item.primaryId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
+       </foreach>
+     where PRIMARY_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.primaryId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DIL_APP_CID
+    where PRIMARY_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 1 - 21
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -347,23 +347,7 @@
         PERSONNEL_POST "personnelPost",
         PERSONNEL_PHONE "personnelPhone",
         INNNER_CODE "innerCode",
-        to_char(SSO_ID) "ssoId",,
-        CASE WHEN RC.COMPANY_TYPE = '业务单位'
-        THEN RC.COMPANY_ID
-        else -1
-        END "businessCompanyId",
-        CASE WHEN RC.COMPANY_TYPE = '承运商'
-        THEN RC.COMPANY_ID
-        else -1
-        END "carrierId",
-        CASE WHEN RC.COMPANY_TYPE = '发货单位'
-        THEN RC.COMPANY_ID
-        else -1
-        END "shippingCompanyId",
-        CASE WHEN RC.COMPANY_TYPE = '收货客户'
-        THEN RC.COMPANY_ID
-        else -1
-        END "receivingCompanyId",
+        to_char(SSO_ID) "ssoId",
         PERSONNEL_ID "id",
         PERSONNEL_ID "value",
         PERSONNEL_NAME "label",
@@ -374,10 +358,6 @@
         </if>
         FROM
         RMS_PERSONNEL RP
-        LEFT JOIN RMS_PERSONNEL_COMPANY RPC
-        ON RPC.PERSONNEL_ID = RP.PERSONNEL_ID
-        LEFT JOIN RMS_COMPANY RC
-        ON RC.COMPANY_ID = RPC.COMPANY_ID
         <if test="capacityId!=null and capacityId!=''">
             LEFT JOIN (
             SELECT DRIVER_ID "driverId",