123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <?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="net.lab1024.smartadmin.module.longgang.zhuzao.dao.APlanZhuzaoDao">
- <resultMap id="APlanZhuzaoVO" type="net.lab1024.smartadmin.module.longgang.zhuzao.domain.vo.APlanZhuzaoVO"></resultMap>
- <resultMap id="APlanZhuzaoExcelVO" type="net.lab1024.smartadmin.module.longgang.zhuzao.domain.vo.APlanZhuzaoExcelVO"></resultMap>
- <select id="queryByPage" resultMap="APlanZhuzaoVO">
- select
- id,
- order_shengchan_id,
- order_sale_id,
- wuliao_id,
- wuliao_name,
- guige_xinghao,
- if_convert,
- convert_type,
- convert_plan_id,
- department,
- shengchan_shuliang,
- status,
- remarks,
- create_date,
- create_by,
- update_by,
- update_date,
- del_flag,
- cfree1,
- cfree2,
- cfree3,
- cfree4,
- cfree5,
- cfree6,
- cfree7,
- cfree8,
- cfree9,
- cfree10,
- cfree11,
- cfree12,
- cfree13,
- cfree14,
- cfree15,
- cfree16,
- cfree17,
- cfree18,
- cfree19,
- wangong_time,
- kaigong_time,
- cfree20,
- jihua_shuliang,
- shuju_type,
- jihua_id,
- shengchan_chejian
- from a_plan_zhuzao
- <where>
- del_flag='0'
- <if test="queryDTO.id != null">
- AND id = #{queryDTO.id}
- </if>
- <if test="queryDTO.orderShengchanId != null and queryDTO.orderShengchanId != ''">
- AND order_shengchan_id = #{queryDTO.orderShengchanId}
- </if>
- <if test="queryDTO.orderSaleId != null and queryDTO.orderSaleId != ''">
- AND order_sale_id = #{queryDTO.orderSaleId}
- </if>
- <if test="queryDTO.wuliaoId != null and queryDTO.wuliaoId != ''">
- AND wuliao_id = #{queryDTO.wuliaoId}
- </if>
- <if test="queryDTO.wuliaoName != null and queryDTO.wuliaoName != ''">
- AND wuliao_name = #{queryDTO.wuliaoName}
- </if>
- <if test="queryDTO.guigeXinghao != null and queryDTO.guigeXinghao != ''">
- AND guige_xinghao = #{queryDTO.guigeXinghao}
- </if>
- <if test="queryDTO.statusList !=null and queryDTO.statusList.size() > 0">
- and status in
- <foreach collection="queryDTO.statusList" open="(" index="index" separator="," close=")" item="item">
- #{item}
- </foreach>
- </if>
- <if test="queryDTO.shujuTypeList !=null and queryDTO.shujuTypeList.size() > 0">
- and shuju_type in
- <foreach collection="queryDTO.shujuTypeList" open="(" index="index" separator="," close=")" item="item">
- #{item}
- </foreach>
- </if>
- <if test="queryDTO.createTimeBegin != null ">
- AND create_time >= #{queryDTO.createTimeBegin}
- </if>
- <if test="queryDTO.createTimeEnd != null ">
- AND create_time <= #{queryDTO.createTimeEnd}
- </if>
- <if test="queryDTO.updateTimeBegin != null ">
- AND update_time >= #{queryDTO.updateTimeBegin}
- </if>
- <if test="queryDTO.updateTimeEnd != null ">
- AND update_time <= #{queryDTO.updateTimeEnd}
- </if>
- </where>
- </select>
- <select id="queryAllExportData" resultMap="APlanZhuzaoExcelVO">
- select
- id,
- order_shengchan_id,
- order_sale_id,
- wuliao_id,
- wuliao_name,
- guige_xinghao,
- if_convert,
- convert_type,
- convert_plan_id,
- department,
- shengchan_shuliang,
- status,
- remarks,
- create_date,
- create_by,
- update_by,
- update_date,
- del_flag,
- cfree1,
- cfree2,
- cfree3,
- cfree4,
- cfree5,
- cfree6,
- cfree7,
- cfree8,
- cfree9,
- cfree10,
- cfree11,
- cfree12,
- cfree13,
- cfree14,
- cfree15,
- cfree16,
- cfree17,
- cfree18,
- cfree19,
- wangong_time,
- kaigong_time,
- cfree20,
- jihua_shuliang,
- shuju_type,
- jihua_id,
- shengchan_chejian
- from a_plan_zhuzao
- <where>
- del_flag='0'
- <if test="queryDTO.id != null">
- AND id = #{queryDTO.id}
- </if>
- <if test="queryDTO.orderShengchanId != null and queryDTO.orderShengchanId != ''">
- AND order_shengchan_id = #{queryDTO.orderShengchanId}
- </if>
- <if test="queryDTO.orderSaleId != null and queryDTO.orderSaleId != ''">
- AND order_sale_id = #{queryDTO.orderSaleId}
- </if>
- <if test="queryDTO.wuliaoId != null and queryDTO.wuliaoId != ''">
- AND wuliao_id = #{queryDTO.wuliaoId}
- </if>
- <if test="queryDTO.wuliaoName != null and queryDTO.wuliaoName != ''">
- AND wuliao_name = #{queryDTO.wuliaoName}
- </if>
- <if test="queryDTO.guigeXinghao != null and queryDTO.guigeXinghao != ''">
- AND guige_xinghao = #{queryDTO.guigeXinghao}
- </if>
- <if test="queryDTO.statusList !=null and queryDTO.statusList.size() > 0">
- and status in
- <foreach collection="queryDTO.statusList" open="(" index="index" separator="," close=")" item="item">
- #{item}
- </foreach>
- </if>
- <if test="queryDTO.shujuTypeList !=null and queryDTO.shujuTypeList.size() > 0">
- and shuju_type in
- <foreach collection="queryDTO.shujuTypeList" open="(" index="index" separator="," close=")" item="item">
- #{item}
- </foreach>
- </if>
- <if test="queryDTO.createTimeBegin != null ">
- AND create_time >= #{queryDTO.createTimeBegin}
- </if>
- <if test="queryDTO.createTimeEnd != null ">
- AND create_time <= #{queryDTO.createTimeEnd}
- </if>
- <if test="queryDTO.updateTimeBegin != null ">
- AND update_time >= #{queryDTO.updateTimeBegin}
- </if>
- <if test="queryDTO.updateTimeEnd != null ">
- AND update_time <= #{queryDTO.updateTimeEnd}
- </if>
- </where>
- </select>
- <select id="queryBatchExportData" resultMap="APlanZhuzaoExcelVO">
- select
- id,
- order_shengchan_id,
- order_sale_id,
- wuliao_id,
- wuliao_name,
- guige_xinghao,
- if_convert,
- convert_type,
- convert_plan_id,
- department,
- shengchan_shuliang,
- status,
- remarks,
- create_date,
- create_by,
- update_by,
- update_date,
- del_flag,
- cfree1,
- cfree2,
- cfree3,
- cfree4,
- cfree5,
- cfree6,
- cfree7,
- cfree8,
- cfree9,
- cfree10,
- cfree11,
- cfree12,
- cfree13,
- cfree14,
- cfree15,
- cfree16,
- cfree17,
- cfree18,
- cfree19,
- wangong_time,
- kaigong_time,
- cfree20,
- jihua_shuliang,
- shuju_type,
- jihua_id,
- shengchan_chejian
- from a_plan_zhuzao
- where id in
- <foreach collection="idList" open="(" close=")" separator="," item="item">
- #{item}
- </foreach>
- </select>
- <delete id="deleteById">
- delete from a_plan_zhuzao where id = #{id}
- </delete>
- <delete id="deleteByIdList">
- delete from a_plan_zhuzao where id in
- <foreach collection="idList" open="(" close=")" separator="," item="item">
- #{item}
- </foreach>
- </delete>
- </mapper>
|