123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602 |
- <?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.jihuadetail.dao.APlanDetailDao">
- <resultMap id="APlanDetailVO" type="net.lab1024.smartadmin.module.longgang.jihuadetail.domain.vo.APlanDetailVO"></resultMap>
- <resultMap id="APlanDetailExcelVO" type="net.lab1024.smartadmin.module.longgang.jihuadetail.domain.vo.APlanDetailExcelVO"></resultMap>
- <select id="queryByPage" resultMap="APlanDetailVO">
- select
- id,
- order_sale_id,
- order_jihua_id,
- order_shengchan_id,
- wuliao_bianma,
- wuliao_name,
- guige_xinghao,
- caizhi,
- kehu_id,
- kehu_name,
- if_zhibao,
- if_efficat,
- now_gongxu,
- kaigong_time,
- wangong_time,
- fanchang_time,
- shuliang,
- shuju_type,
- zhuancaigou_flag,
- if_convert,
- convert_type,
- convert_plan_parent_id,
- daohuo_flag,
- department_id,
- department_name,
- 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,
- cfree20
- from a_plan_detail
- <where>
- <if test="queryDTO.id != null">
- AND id = #{queryDTO.id}
- </if>
- <if test="queryDTO.orderSaleId != null and queryDTO.orderSaleId != ''">
- AND order_sale_id = #{queryDTO.orderSaleId}
- </if>
- <if test="queryDTO.orderJihuaId != null and queryDTO.orderJihuaId != ''">
- AND order_jihua_id = #{queryDTO.orderJihuaId}
- </if>
- <if test="queryDTO.orderShengchanId != null and queryDTO.orderShengchanId != ''">
- AND order_shengchan_id = #{queryDTO.orderShengchanId}
- </if>
- <if test="queryDTO.wuliaoBianma != null and queryDTO.wuliaoBianma != ''">
- AND wuliao_bianma = #{queryDTO.wuliaoBianma}
- </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.caizhi != null and queryDTO.caizhi != ''">
- AND caizhi = #{queryDTO.caizhi}
- </if>
- <if test="queryDTO.kehuId != null and queryDTO.kehuId != ''">
- AND kehu_id = #{queryDTO.kehuId}
- </if>
- <if test="queryDTO.kehuName != null and queryDTO.kehuName != ''">
- AND kehu_name = #{queryDTO.kehuName}
- </if>
- <if test="queryDTO.ifZhibao != null and queryDTO.ifZhibao != ''">
- AND if_zhibao = #{queryDTO.ifZhibao}
- </if>
- <if test="queryDTO.ifEfficat != null and queryDTO.ifEfficat != ''">
- AND if_efficat = #{queryDTO.ifEfficat}
- </if>
- <if test="queryDTO.nowGongxu != null and queryDTO.nowGongxu != ''">
- AND now_gongxu = #{queryDTO.nowGongxu}
- </if>
- <if test="queryDTO.kaigongTime != null">
- AND kaigong_time = #{queryDTO.kaigongTime}
- </if>
- <if test="queryDTO.wangongTime != null">
- AND wangong_time = #{queryDTO.wangongTime}
- </if>
- <if test="queryDTO.fanchangTime != null">
- AND fanchang_time = #{queryDTO.fanchangTime}
- </if>
- <if test="queryDTO.shuliang != null and queryDTO.shuliang != ''">
- AND shuliang = #{queryDTO.shuliang}
- </if>
- <if test="queryDTO.shujuType != null and queryDTO.shujuType != ''">
- AND shuju_type = #{queryDTO.shujuType}
- </if>
- <if test="queryDTO.zhuancaigouFlag != null and queryDTO.zhuancaigouFlag != ''">
- AND zhuancaigou_flag = #{queryDTO.zhuancaigouFlag}
- </if>
- <if test="queryDTO.ifConvert != null and queryDTO.ifConvert != ''">
- AND if_convert = #{queryDTO.ifConvert}
- </if>
- <if test="queryDTO.convertType != null and queryDTO.convertType != ''">
- AND convert_type = #{queryDTO.convertType}
- </if>
- <if test="queryDTO.convertPlanParentId != null and queryDTO.convertPlanParentId != ''">
- AND convert_plan_parent_id = #{queryDTO.convertPlanParentId}
- </if>
- <if test="queryDTO.daohuoFlag != null and queryDTO.daohuoFlag != ''">
- AND daohuo_flag = #{queryDTO.daohuoFlag}
- </if>
- <if test="queryDTO.departmentId != null and queryDTO.departmentId != ''">
- AND department_id = #{queryDTO.departmentId}
- </if>
- <if test="queryDTO.departmentName != null and queryDTO.departmentName != ''">
- AND department_name = #{queryDTO.departmentName}
- </if>
- <if test="queryDTO.status != null and queryDTO.status != ''">
- AND status = #{queryDTO.status}
- </if>
- <if test="queryDTO.remarks != null and queryDTO.remarks != ''">
- AND remarks = #{queryDTO.remarks}
- </if>
- <if test="queryDTO.createDate != null">
- AND create_date = #{queryDTO.createDate}
- </if>
- <if test="queryDTO.createBy != null and queryDTO.createBy != ''">
- AND create_by = #{queryDTO.createBy}
- </if>
- <if test="queryDTO.updateBy != null and queryDTO.updateBy != ''">
- AND update_by = #{queryDTO.updateBy}
- </if>
- <if test="queryDTO.updateDate != null">
- AND update_date = #{queryDTO.updateDate}
- </if>
- <if test="queryDTO.delFlag != null and queryDTO.delFlag != ''">
- AND del_flag = #{queryDTO.delFlag}
- </if>
- <if test="queryDTO.cfree1 != null and queryDTO.cfree1 != ''">
- AND cfree1 = #{queryDTO.cfree1}
- </if>
- <if test="queryDTO.cfree2 != null and queryDTO.cfree2 != ''">
- AND cfree2 = #{queryDTO.cfree2}
- </if>
- <if test="queryDTO.cfree3 != null and queryDTO.cfree3 != ''">
- AND cfree3 = #{queryDTO.cfree3}
- </if>
- <if test="queryDTO.cfree4 != null and queryDTO.cfree4 != ''">
- AND cfree4 = #{queryDTO.cfree4}
- </if>
- <if test="queryDTO.cfree5 != null and queryDTO.cfree5 != ''">
- AND cfree5 = #{queryDTO.cfree5}
- </if>
- <if test="queryDTO.cfree6 != null and queryDTO.cfree6 != ''">
- AND cfree6 = #{queryDTO.cfree6}
- </if>
- <if test="queryDTO.cfree7 != null and queryDTO.cfree7 != ''">
- AND cfree7 = #{queryDTO.cfree7}
- </if>
- <if test="queryDTO.cfree8 != null and queryDTO.cfree8 != ''">
- AND cfree8 = #{queryDTO.cfree8}
- </if>
- <if test="queryDTO.cfree9 != null and queryDTO.cfree9 != ''">
- AND cfree9 = #{queryDTO.cfree9}
- </if>
- <if test="queryDTO.cfree10 != null and queryDTO.cfree10 != ''">
- AND cfree10 = #{queryDTO.cfree10}
- </if>
- <if test="queryDTO.cfree11 != null and queryDTO.cfree11 != ''">
- AND cfree11 = #{queryDTO.cfree11}
- </if>
- <if test="queryDTO.cfree12 != null and queryDTO.cfree12 != ''">
- AND cfree12 = #{queryDTO.cfree12}
- </if>
- <if test="queryDTO.cfree13 != null and queryDTO.cfree13 != ''">
- AND cfree13 = #{queryDTO.cfree13}
- </if>
- <if test="queryDTO.cfree14 != null and queryDTO.cfree14 != ''">
- AND cfree14 = #{queryDTO.cfree14}
- </if>
- <if test="queryDTO.cfree15 != null and queryDTO.cfree15 != ''">
- AND cfree15 = #{queryDTO.cfree15}
- </if>
- <if test="queryDTO.cfree16 != null and queryDTO.cfree16 != ''">
- AND cfree16 = #{queryDTO.cfree16}
- </if>
- <if test="queryDTO.cfree17 != null and queryDTO.cfree17 != ''">
- AND cfree17 = #{queryDTO.cfree17}
- </if>
- <if test="queryDTO.cfree18 != null and queryDTO.cfree18 != ''">
- AND cfree18 = #{queryDTO.cfree18}
- </if>
- <if test="queryDTO.cfree19 != null and queryDTO.cfree19 != ''">
- AND cfree19 = #{queryDTO.cfree19}
- </if>
- <if test="queryDTO.cfree20 != null and queryDTO.cfree20 != ''">
- AND cfree20 = #{queryDTO.cfree20}
- </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="findById" resultMap="APlanDetailVO">
- select
- id,
- order_sale_id,
- order_jihua_id,
- order_shengchan_id,
- wuliao_bianma,
- wuliao_name,
- guige_xinghao,
- caizhi,
- kehu_id,
- kehu_name,
- if_zhibao,
- if_efficat,
- now_gongxu,
- kaigong_time,
- wangong_time,
- fanchang_time,
- shuliang,
- shuju_type,
- zhuancaigou_flag,
- if_convert,
- convert_type,
- convert_plan_parent_id,
- daohuo_flag,
- department_id,
- department_name,
- 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,
- cfree20
- from a_plan_detail
- <where>
- <if test="id != null">
- AND id = #{id}
- </if>
- </where>
- </select>
- <select id="queryAllExportData" resultMap="APlanDetailExcelVO">
- select
- id,
- order_sale_id,
- order_jihua_id,
- order_shengchan_id,
- wuliao_bianma,
- wuliao_name,
- guige_xinghao,
- caizhi,
- kehu_id,
- kehu_name,
- if_zhibao,
- if_efficat,
- now_gongxu,
- kaigong_time,
- wangong_time,
- fanchang_time,
- shuliang,
- shuju_type,
- zhuancaigou_flag,
- if_convert,
- convert_type,
- convert_plan_parent_id,
- daohuo_flag,
- department_id,
- department_name,
- 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,
- cfree20
- from a_plan_detail
- <where>
- <if test="queryDTO.id != null">
- AND id = #{queryDTO.id}
- </if>
- <if test="queryDTO.orderSaleId != null and queryDTO.orderSaleId != ''">
- AND order_sale_id = #{queryDTO.orderSaleId}
- </if>
- <if test="queryDTO.orderJihuaId != null and queryDTO.orderJihuaId != ''">
- AND order_jihua_id = #{queryDTO.orderJihuaId}
- </if>
- <if test="queryDTO.orderShengchanId != null and queryDTO.orderShengchanId != ''">
- AND order_shengchan_id = #{queryDTO.orderShengchanId}
- </if>
- <if test="queryDTO.wuliaoBianma != null and queryDTO.wuliaoBianma != ''">
- AND wuliao_bianma = #{queryDTO.wuliaoBianma}
- </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.caizhi != null and queryDTO.caizhi != ''">
- AND caizhi = #{queryDTO.caizhi}
- </if>
- <if test="queryDTO.kehuId != null and queryDTO.kehuId != ''">
- AND kehu_id = #{queryDTO.kehuId}
- </if>
- <if test="queryDTO.kehuName != null and queryDTO.kehuName != ''">
- AND kehu_name = #{queryDTO.kehuName}
- </if>
- <if test="queryDTO.ifZhibao != null and queryDTO.ifZhibao != ''">
- AND if_zhibao = #{queryDTO.ifZhibao}
- </if>
- <if test="queryDTO.ifEfficat != null and queryDTO.ifEfficat != ''">
- AND if_efficat = #{queryDTO.ifEfficat}
- </if>
- <if test="queryDTO.nowGongxu != null and queryDTO.nowGongxu != ''">
- AND now_gongxu = #{queryDTO.nowGongxu}
- </if>
- <if test="queryDTO.kaigongTime != null">
- AND kaigong_time = #{queryDTO.kaigongTime}
- </if>
- <if test="queryDTO.wangongTime != null">
- AND wangong_time = #{queryDTO.wangongTime}
- </if>
- <if test="queryDTO.fanchangTime != null">
- AND fanchang_time = #{queryDTO.fanchangTime}
- </if>
- <if test="queryDTO.shuliang != null and queryDTO.shuliang != ''">
- AND shuliang = #{queryDTO.shuliang}
- </if>
- <if test="queryDTO.shujuType != null and queryDTO.shujuType != ''">
- AND shuju_type = #{queryDTO.shujuType}
- </if>
- <if test="queryDTO.zhuancaigouFlag != null and queryDTO.zhuancaigouFlag != ''">
- AND zhuancaigou_flag = #{queryDTO.zhuancaigouFlag}
- </if>
- <if test="queryDTO.ifConvert != null and queryDTO.ifConvert != ''">
- AND if_convert = #{queryDTO.ifConvert}
- </if>
- <if test="queryDTO.convertType != null and queryDTO.convertType != ''">
- AND convert_type = #{queryDTO.convertType}
- </if>
- <if test="queryDTO.convertPlanParentId != null and queryDTO.convertPlanParentId != ''">
- AND convert_plan_parent_id = #{queryDTO.convertPlanParentId}
- </if>
- <if test="queryDTO.daohuoFlag != null and queryDTO.daohuoFlag != ''">
- AND daohuo_flag = #{queryDTO.daohuoFlag}
- </if>
- <if test="queryDTO.departmentId != null and queryDTO.departmentId != ''">
- AND department_id = #{queryDTO.departmentId}
- </if>
- <if test="queryDTO.departmentName != null and queryDTO.departmentName != ''">
- AND department_name = #{queryDTO.departmentName}
- </if>
- <if test="queryDTO.status != null and queryDTO.status != ''">
- AND status = #{queryDTO.status}
- </if>
- <if test="queryDTO.remarks != null and queryDTO.remarks != ''">
- AND remarks = #{queryDTO.remarks}
- </if>
- <if test="queryDTO.createDate != null">
- AND create_date = #{queryDTO.createDate}
- </if>
- <if test="queryDTO.createBy != null and queryDTO.createBy != ''">
- AND create_by = #{queryDTO.createBy}
- </if>
- <if test="queryDTO.updateBy != null and queryDTO.updateBy != ''">
- AND update_by = #{queryDTO.updateBy}
- </if>
- <if test="queryDTO.updateDate != null">
- AND update_date = #{queryDTO.updateDate}
- </if>
- <if test="queryDTO.delFlag != null and queryDTO.delFlag != ''">
- AND del_flag = #{queryDTO.delFlag}
- </if>
- <if test="queryDTO.cfree1 != null and queryDTO.cfree1 != ''">
- AND cfree1 = #{queryDTO.cfree1}
- </if>
- <if test="queryDTO.cfree2 != null and queryDTO.cfree2 != ''">
- AND cfree2 = #{queryDTO.cfree2}
- </if>
- <if test="queryDTO.cfree3 != null and queryDTO.cfree3 != ''">
- AND cfree3 = #{queryDTO.cfree3}
- </if>
- <if test="queryDTO.cfree4 != null and queryDTO.cfree4 != ''">
- AND cfree4 = #{queryDTO.cfree4}
- </if>
- <if test="queryDTO.cfree5 != null and queryDTO.cfree5 != ''">
- AND cfree5 = #{queryDTO.cfree5}
- </if>
- <if test="queryDTO.cfree6 != null and queryDTO.cfree6 != ''">
- AND cfree6 = #{queryDTO.cfree6}
- </if>
- <if test="queryDTO.cfree7 != null and queryDTO.cfree7 != ''">
- AND cfree7 = #{queryDTO.cfree7}
- </if>
- <if test="queryDTO.cfree8 != null and queryDTO.cfree8 != ''">
- AND cfree8 = #{queryDTO.cfree8}
- </if>
- <if test="queryDTO.cfree9 != null and queryDTO.cfree9 != ''">
- AND cfree9 = #{queryDTO.cfree9}
- </if>
- <if test="queryDTO.cfree10 != null and queryDTO.cfree10 != ''">
- AND cfree10 = #{queryDTO.cfree10}
- </if>
- <if test="queryDTO.cfree11 != null and queryDTO.cfree11 != ''">
- AND cfree11 = #{queryDTO.cfree11}
- </if>
- <if test="queryDTO.cfree12 != null and queryDTO.cfree12 != ''">
- AND cfree12 = #{queryDTO.cfree12}
- </if>
- <if test="queryDTO.cfree13 != null and queryDTO.cfree13 != ''">
- AND cfree13 = #{queryDTO.cfree13}
- </if>
- <if test="queryDTO.cfree14 != null and queryDTO.cfree14 != ''">
- AND cfree14 = #{queryDTO.cfree14}
- </if>
- <if test="queryDTO.cfree15 != null and queryDTO.cfree15 != ''">
- AND cfree15 = #{queryDTO.cfree15}
- </if>
- <if test="queryDTO.cfree16 != null and queryDTO.cfree16 != ''">
- AND cfree16 = #{queryDTO.cfree16}
- </if>
- <if test="queryDTO.cfree17 != null and queryDTO.cfree17 != ''">
- AND cfree17 = #{queryDTO.cfree17}
- </if>
- <if test="queryDTO.cfree18 != null and queryDTO.cfree18 != ''">
- AND cfree18 = #{queryDTO.cfree18}
- </if>
- <if test="queryDTO.cfree19 != null and queryDTO.cfree19 != ''">
- AND cfree19 = #{queryDTO.cfree19}
- </if>
- <if test="queryDTO.cfree20 != null and queryDTO.cfree20 != ''">
- AND cfree20 = #{queryDTO.cfree20}
- </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="APlanDetailExcelVO">
- select
- id,
- order_sale_id,
- order_jihua_id,
- order_shengchan_id,
- wuliao_bianma,
- wuliao_name,
- guige_xinghao,
- caizhi,
- kehu_id,
- kehu_name,
- if_zhibao,
- if_efficat,
- now_gongxu,
- kaigong_time,
- wangong_time,
- fanchang_time,
- shuliang,
- shuju_type,
- zhuancaigou_flag,
- if_convert,
- convert_type,
- convert_plan_parent_id,
- daohuo_flag,
- department_id,
- department_name,
- 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,
- cfree20
- from a_plan_detail
- where id in
- <foreach collection="idList" open="(" close=")" separator="," item="item">
- #{item}
- </foreach>
- </select>
- <delete id="deleteById">
- delete from a_plan_detail where id = #{id}
- </delete>
- <delete id="deleteByIdList">
- delete from a_plan_detail where id in
- <foreach collection="idList" open="(" close=")" separator="," item="item">
- #{item}
- </foreach>
- </delete>
- </mapper>
|