| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174 |
- <?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.goafanti.common.dao.TechProjectMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.TechProject">
- <id column="id" property="id" jdbcType="VARCHAR" />
- <result column="uid" property="uid" jdbcType="VARCHAR" />
- <result column="serial_number" property="serialNumber"
- jdbcType="INTEGER" />
- <result column="contacts" property="contacts" jdbcType="INTEGER" />
- <result column="department" property="department" jdbcType="VARCHAR" />
- <result column="dispatch_info" property="dispatchInfo"
- jdbcType="VARCHAR" />
- <result column="project_name" property="projectName" jdbcType="VARCHAR" />
- <result column="project_catagory" property="projectCatagory"
- jdbcType="VARCHAR" />
- <result column="tech_field" property="techField" jdbcType="VARCHAR" />
- <result column="project_des" property="projectDes" jdbcType="VARCHAR" />
- <result column="project_mode" property="projectMode" jdbcType="INTEGER" />
- <result column="project_approval" property="projectApproval"
- jdbcType="DECIMAL" />
- <result column="subsidy" property="subsidy" jdbcType="INTEGER" />
- <result column="consultant" property="consultant" jdbcType="VARCHAR" />
- <result column="approval_url" property="approvalUrl" jdbcType="VARCHAR" />
- <result column="state" property="state" jdbcType="INTEGER" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="accept_date" property="acceptDate" jdbcType="TIMESTAMP" />
- <result column="approved_date" property="approvedDate"
- jdbcType="TIMESTAMP" />
- <result column="record_time" property="recordTime" jdbcType="TIMESTAMP" />
- <result column="deleted_sign" property="deletedSign" jdbcType="INTEGER" />
- <result column="founder" property="founder" jdbcType="VARCHAR" />
- <result column="contract_id" property="contractId" jdbcType="VARCHAR" />
- <result column="principal" property="principal" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Base_Column_List">
- id, uid, serial_number, contacts, department, dispatch_info,
- project_name, project_catagory,
- tech_field, project_des, project_mode, project_approval, subsidy, consultant,
- approval_url,
- state, create_time, accept_date, approved_date, record_time, deleted_sign,
- founder, contract_id, principal
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap"
- parameterType="java.lang.String">
- select
- <include refid="Base_Column_List" />
- from tech_project
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from tech_project
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.goafanti.common.model.TechProject">
- insert into tech_project (id, uid, serial_number,
- contacts, department, dispatch_info,
- project_name, project_catagory, tech_field,
- project_des, project_mode, project_approval,
- subsidy, consultant, approval_url,
- state, create_time, accept_date,
- approved_date, record_time, deleted_sign, founder, contract_id, principal
- )
- values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR},
- #{serialNumber,jdbcType=INTEGER},
- #{contacts,jdbcType=INTEGER}, #{department,jdbcType=VARCHAR}, #{dispatchInfo,jdbcType=VARCHAR},
- #{projectName,jdbcType=VARCHAR}, #{projectCatagory,jdbcType=VARCHAR},
- #{techField,jdbcType=VARCHAR},
- #{projectDes,jdbcType=VARCHAR}, #{projectMode,jdbcType=INTEGER}, #{projectApproval,jdbcType=DECIMAL},
- #{subsidy,jdbcType=INTEGER}, #{consultant,jdbcType=VARCHAR},
- #{approvalUrl,jdbcType=VARCHAR},
- #{state,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{acceptDate,jdbcType=TIMESTAMP},
- #{approvedDate,jdbcType=TIMESTAMP}, #{recordTime,jdbcType=TIMESTAMP},
- #{deletedSign,jdbcType=INTEGER}, #{founder,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR},
- #{principal,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.goafanti.common.model.TechProject">
- insert into tech_project
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="uid != null">
- uid,
- </if>
- <if test="serialNumber != null">
- serial_number,
- </if>
- <if test="contacts != null">
- contacts,
- </if>
- <if test="department != null">
- department,
- </if>
- <if test="dispatchInfo != null">
- dispatch_info,
- </if>
- <if test="projectName != null">
- project_name,
- </if>
- <if test="projectCatagory != null">
- project_catagory,
- </if>
- <if test="techField != null">
- tech_field,
- </if>
- <if test="projectDes != null">
- project_des,
- </if>
- <if test="projectMode != null">
- project_mode,
- </if>
- <if test="projectApproval != null">
- project_approval,
- </if>
- <if test="subsidy != null">
- subsidy,
- </if>
- <if test="consultant != null">
- consultant,
- </if>
- <if test="approvalUrl != null">
- approval_url,
- </if>
- <if test="state != null">
- state,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="acceptDate != null">
- accept_date,
- </if>
- <if test="approvedDate != null">
- approved_date,
- </if>
- <if test="recordTime != null">
- record_time,
- </if>
- <if test="deletedSign != null">
- deleted_sign,
- </if>
- <if test="founder != null">
- founder,
- </if>
- <if test="contractId != null">
- contract_id,
- </if>
- <if test="principal != null">
- principal,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="uid != null">
- #{uid,jdbcType=VARCHAR},
- </if>
- <if test="serialNumber != null">
- #{serialNumber,jdbcType=INTEGER},
- </if>
- <if test="contacts != null">
- #{contacts,jdbcType=INTEGER},
- </if>
- <if test="department != null">
- #{department,jdbcType=VARCHAR},
- </if>
- <if test="dispatchInfo != null">
- #{dispatchInfo,jdbcType=VARCHAR},
- </if>
- <if test="projectName != null">
- #{projectName,jdbcType=VARCHAR},
- </if>
- <if test="projectCatagory != null">
- #{projectCatagory,jdbcType=VARCHAR},
- </if>
- <if test="techField != null">
- #{techField,jdbcType=VARCHAR},
- </if>
- <if test="projectDes != null">
- #{projectDes,jdbcType=VARCHAR},
- </if>
- <if test="projectMode != null">
- #{projectMode,jdbcType=INTEGER},
- </if>
- <if test="projectApproval != null">
- #{projectApproval,jdbcType=DECIMAL},
- </if>
- <if test="subsidy != null">
- #{subsidy,jdbcType=INTEGER},
- </if>
- <if test="consultant != null">
- #{consultant,jdbcType=VARCHAR},
- </if>
- <if test="approvalUrl != null">
- #{approvalUrl,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- #{state,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="acceptDate != null">
- #{acceptDate,jdbcType=TIMESTAMP},
- </if>
- <if test="approvedDate != null">
- #{approvedDate,jdbcType=TIMESTAMP},
- </if>
- <if test="recordTime != null">
- #{recordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deletedSign != null">
- #{deletedSign,jdbcType=INTEGER},
- </if>
- <if test="founder != null">
- #{founder,jdbcType=VARCHAR},
- </if>
- <if test="contractId != null">
- #{contractId,jdbcType=VARCHAR},
- </if>
- <if test="principal != null">
- #{principal,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TechProject">
- update tech_project
- <set>
- <if test="uid != null">
- uid = #{uid,jdbcType=VARCHAR},
- </if>
- <if test="serialNumber != null">
- serial_number = #{serialNumber,jdbcType=INTEGER},
- </if>
- <if test="contacts != null">
- contacts = #{contacts,jdbcType=INTEGER},
- </if>
- <if test="department != null">
- department = #{department,jdbcType=VARCHAR},
- </if>
- <if test="dispatchInfo != null">
- dispatch_info = #{dispatchInfo,jdbcType=VARCHAR},
- </if>
- <if test="projectName != null">
- project_name = #{projectName,jdbcType=VARCHAR},
- </if>
- <if test="projectCatagory != null">
- project_catagory = #{projectCatagory,jdbcType=VARCHAR},
- </if>
- <if test="techField != null">
- tech_field = #{techField,jdbcType=VARCHAR},
- </if>
- <if test="projectDes != null">
- project_des = #{projectDes,jdbcType=VARCHAR},
- </if>
- <if test="projectMode != null">
- project_mode = #{projectMode,jdbcType=INTEGER},
- </if>
- <if test="projectApproval != null">
- project_approval = #{projectApproval,jdbcType=DECIMAL},
- </if>
- <if test="subsidy != null">
- subsidy = #{subsidy,jdbcType=INTEGER},
- </if>
- <if test="consultant != null">
- consultant = #{consultant,jdbcType=VARCHAR},
- </if>
- <if test="approvalUrl != null">
- approval_url = #{approvalUrl,jdbcType=VARCHAR},
- </if>
- <if test="state != null">
- state = #{state,jdbcType=INTEGER},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="acceptDate != null">
- accept_date = #{acceptDate,jdbcType=TIMESTAMP},
- </if>
- <if test="approvedDate != null">
- approved_date = #{approvedDate,jdbcType=TIMESTAMP},
- </if>
- <if test="recordTime != null">
- record_time = #{recordTime,jdbcType=TIMESTAMP},
- </if>
- <if test="deletedSign != null">
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- </if>
- <if test="founder != null">
- founder = #{founder,jdbcType=VARCHAR},
- </if>
- <if test="contractId != null">
- contract_id = #{contractId,jdbcType=VARCHAR},
- </if>
- <if test="principal != null">
- principal = #{principal,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TechProject">
- update tech_project
- set uid = #{uid,jdbcType=VARCHAR},
- serial_number = #{serialNumber,jdbcType=INTEGER},
- contacts = #{contacts,jdbcType=INTEGER},
- department = #{department,jdbcType=VARCHAR},
- dispatch_info = #{dispatchInfo,jdbcType=VARCHAR},
- project_name = #{projectName,jdbcType=VARCHAR},
- project_catagory = #{projectCatagory,jdbcType=VARCHAR},
- tech_field = #{techField,jdbcType=VARCHAR},
- project_des = #{projectDes,jdbcType=VARCHAR},
- project_mode = #{projectMode,jdbcType=INTEGER},
- project_approval = #{projectApproval,jdbcType=DECIMAL},
- subsidy = #{subsidy,jdbcType=INTEGER},
- consultant = #{consultant,jdbcType=VARCHAR},
- approval_url = #{approvalUrl,jdbcType=VARCHAR},
- state = #{state,jdbcType=INTEGER},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- accept_date = #{acceptDate,jdbcType=TIMESTAMP},
- approved_date = #{approvedDate,jdbcType=TIMESTAMP},
- record_time = #{recordTime,jdbcType=TIMESTAMP},
- deleted_sign = #{deletedSign,jdbcType=INTEGER},
- founder = #{founder,jdbcType=VARCHAR},
- contract_id = #{contractId,jdbcType=VARCHAR},
- principal = #{principal,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="findTechProjectClientListByPage" parameterType="java.lang.String"
- resultType="com.goafanti.techproject.bo.TechProjectClientListBo">
- select p.id, p.uid, i.location_province as province,
- i.unit_name as unitName,
- p.serial_number as serialNumber, p.create_time as createTime, p.approved_date as approvedDate,
- p.accept_date as acceptDate, a.name as consultant, p.contacts,
- p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField, p.state
- FROM tech_project p
- LEFT JOIN organization_identity i on i.uid = p.uid
- LEFT JOIN admin a on p.consultant = a.id
- where p.deleted_sign = 0
- <if test ="uid != null">
- and p.uid = #{uid,jdbcType=VARCHAR}
- </if>
- order by p.serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findTechProjectClientCount" resultType="java.lang.Integer" parameterType="String">
- select count(1)
- FROM tech_project p
- LEFT JOIN organization_identity i on i.uid = p.uid
- LEFT JOIN admin a on p.consultant = a.id
- where p.deleted_sign = 0
- <if test ="uid != null">
- and p.uid = #{uid,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id ="findTechProjectManageListByPage" parameterType="java.lang.String"
- resultType="com.goafanti.techproject.bo.TechProjectManageListBo">
- select p.id, p.uid, i.licence_province as province, p.contract_id as contractId,
- i.unit_name as unitName,
- p.serial_number as serialNumber, p.create_time as createTime, p.approved_date as approvedDate,
- p.accept_date as acceptDate, a.name as consultant, p.contacts, ad.name as founder,
- p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField, p.state,
- w.id as wid, w.website, w.account_number as accountNumber, w.department,
- w.password, c.serial_number as contractNumber
- FROM tech_project p
- LEFT JOIN organization_identity i on i.uid = p.uid
- LEFT JOIN admin a on p.consultant = a.id
- LEFT JOIN admin ad on p.founder = ad.id
- LEFT JOIN tech_website w on p.department = w.id
- LEFT JOIN contract c on c.id = p.contract_id
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.deleted_sign = 0 and (w.deleted_sign is null or w.deleted_sign = 0)
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
- <if test="contractId != null">
- and p.contract_id = #{contractId,jdbcType=VARCHAR}
- </if>
- <if test="province != null">
- and i.licence_province = #{province,jdbcType=INTEGER}
- </if>
- <if test="uid != null">
- and p.uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="unitName != null" >
- and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
- </if>
- <if test="principal != null">
- group by p.id,i.id
- </if>
- order by p.serial_number desc
- <if test="page_sql!=null">
- ${page_sql}
- </if>
- </select>
-
- <select id="findTechProjectManageCount" resultType="java.lang.Integer" parameterType="String">
- select count(distinct(p.id))
- FROM tech_project p
- LEFT JOIN organization_identity i on i.uid = p.uid
- LEFT JOIN tech_website w on p.department = w.id
- <if test="principal != null">
- left join contract_log l on p.contract_id=l.cid
- </if>
- where p.deleted_sign = 0 and (w.deleted_sign is null or w.deleted_sign = 0)
- <if test="principal != null">
- and l.principal = #{principal,jdbcType=VARCHAR}
- </if>
- <if test="contractId != null">
- and p.contract_id = #{contractId,jdbcType=VARCHAR}
- </if>
- <if test="province != null">
- and i.licence_province = #{province,jdbcType=INTEGER}
- </if>
- <if test="uid != null">
- and p.uid = #{uid,jdbcType=VARCHAR}
- </if>
- <if test="unitName != null" >
- and i.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
- </if>
- </select>
-
- <select id="selectProjectDetail" resultType="com.goafanti.techproject.bo.TechProjectDetailBo" parameterType="java.lang.String">
- select
- p.id, p.uid, i.licence_province as province,
- i.licence_city as city, i.licence_area as area, i.postal_address as postalAddress,
- i.unit_name as unitName, i.org_code as orgCode, p.serial_number as serialNumber,
- a.name as consultant, p.contacts, p.project_des as projectDes,
- p.subsidy, p.dispatch_info as dispatchInfo, p.project_mode as projectMode,
- p.project_approval as projectApproval, p.approval_url as approvalUrl , p.department,
- p.project_name as projectName, p.project_catagory as projectCatagory, p.tech_field as techField,
- p.state
- FROM tech_project p
- LEFT JOIN organization_identity i on i.uid = p.uid
- LEFT JOIN admin a on p.consultant = a.id
- where p.deleted_sign = 0 and p.id = #{uid,jdbcType=VARCHAR}
- </select>
-
- <update id="batchDeleteByPrimaryKey" parameterType="java.util.List">
- update tech_project set deleted_sign = 1
- where id in
- <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
- #{item}
- </foreach>
- </update>
-
- <select id="countTechProjectDone" resultType="java.lang.Integer">
- select
- count(1)
- from tech_project
- where uid = #{uid,jdbcType=VARCHAR}
- and
- deleted_sign = 0
- and state in (6,8)
- and approved_date >=
- (
- select
- str_to_date(CONCAT(#{year,jdbcType=INTEGER}-3,'-01-01'), '%Y-%m-%d %H')
- )
- and approved_date <![CDATA[ < ]]>
- (
- select
- str_to_date(CONCAT(#{year,jdbcType=INTEGER},'-01-01'), '%Y-%m-%d %H')
- )
- </select>
-
- <select id="countTechProjectUndone" resultType="java.lang.Integer">
- select
- count(1)
- from tech_project
- where uid = #{uid,jdbcType=VARCHAR}
- and deleted_sign = 0
- and state in (1,2,3,4,5,7)
- and approved_date >=
- (
- select
- str_to_date(CONCAT(#{year,jdbcType=INTEGER}-3,'-01-01'), '%Y-%m-%d %H')
- )
- and approved_date <![CDATA[ < ]]>
- (
- select
- str_to_date(CONCAT(#{year,jdbcType=INTEGER},'-01-01'), '%Y-%m-%d %H')
- )
- </select>
-
- <select id="selectWebsiteUnitNames" parameterType="java.lang.String" resultType="com.goafanti.user.bo.OrgUnitNames">
- select distinct(oi.uid), oi.unit_name as unitName
- from tech_project tp
- LEFT JOIN organization_identity oi on oi.uid = tp.uid
- <if test="_parameter != null">
- LEFT JOIN tech_project_log tpl on tp.id = tpl.pid
- </if>
- where tp.deleted_sign = 0
- <if test="_parameter != null">
- and tpl.principal = #{principal,jdbcType=VARCHAR}
- </if>
- <if test="_parameter != null">
- group by tp.id,oi.id
- </if>
- </select>
-
- <select id="listContractTechProjectByContractId" parameterType="java.lang.String" resultType="com.goafanti.techproject.bo.TechProjectContractListBo">
- select
- tp.id, tp.uid, tp.contract_id as contractId,
- tp.project_name as projectName, tp.project_catagory as projectCatagory, tp.state,
- tp.tech_field as techField, a.name as principle
- from tech_project tp
- left join admin a on a.id = tp.principal
- where tp.contract_id = #{contractId,jdbcType=VARCHAR}
- </select>
-
- <insert id="batchInsert" parameterType="com.goafanti.common.model.TechProject">
- insert into tech_project (id, uid, serial_number,
- contacts, department, dispatch_info,
- project_name, project_catagory, tech_field,
- project_des, project_mode, project_approval,
- subsidy, consultant, approval_url,
- state, create_time, accept_date,
- approved_date, record_time, deleted_sign, founder, contract_id, principal
- )
- values
- <foreach item="item" index="index" collection="list" separator=",">
- (
- #{item.id,jdbcType=VARCHAR}, #{item.uid,jdbcType=VARCHAR},
- #{item.serialNumber,jdbcType=INTEGER},
- #{item.contacts,jdbcType=INTEGER}, #{item.department,jdbcType=VARCHAR}, #{item.dispatchInfo,jdbcType=VARCHAR},
- #{item.projectName,jdbcType=VARCHAR}, #{item.projectCatagory,jdbcType=VARCHAR},
- #{item.techField,jdbcType=VARCHAR},
- #{item.projectDes,jdbcType=VARCHAR}, #{item.projectMode,jdbcType=INTEGER}, #{item.projectApproval,jdbcType=DECIMAL},
- #{item.subsidy,jdbcType=INTEGER}, #{item.consultant,jdbcType=VARCHAR},
- #{item.approvalUrl,jdbcType=VARCHAR},
- #{item.state,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.acceptDate,jdbcType=TIMESTAMP},
- #{item.approvedDate,jdbcType=TIMESTAMP}, #{item.recordTime,jdbcType=TIMESTAMP},
- #{item.deletedSign,jdbcType=INTEGER}, #{item.founder,jdbcType=VARCHAR}, #{item.contractId,jdbcType=VARCHAR},
- #{item.principal,jdbcType=VARCHAR}
- )
- </foreach>
- </insert>
-
- <select id="findTechProjectNumByUid" parameterType="java.lang.String" resultType="java.lang.Integer">
- select
- count(1)
- from tech_project
- where
- deleted_sign = 0
- and uid = #{uid,jdbcType=VARCHAR}
- </select>
- <update id="batchDeleteByContractId" parameterType="java.util.List">
- update tech_project set deleted_sign = 1
- where contract_id in
- <foreach item="item" index="index" collection="list" open="("
- separator="," close=")">
- #{item}
- </foreach>
- </update>
-
- <select id="listProjectByPage" resultType="com.goafanti.techproject.bo.ProjectListBo">
- select
- a.id,
- a.serial_number as serialNumber,
- date_format(a.sign_date,'%Y-%m-%d %H:%i:%S') as signDate,
- date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as projectTime,
- a.uid,
- a.status as projectStatus,
- a.task_distribution as taskDistribution,
- a.deleted_sign as deletedSign,
- a.order_no as orderNo,
- b.nickname as buyerName,
- b.type as buyerType,
- f.cname as projectType,
- c.create_time as orderTime,
- c.order_status as orderStatus,
- c.liquidation_status as liquidationStatus,
- c.approval,
- d.name as salesmanName,
- e.name as departmentName,
- g.name as principalName
- from
- contract a left join user b on
- a.uid = b.id left join t_order c on
- a.order_no = c.order_no left join admin d on
- c.salesman_id = d.id left join department e on
- d.department_id = e.id left join business_category f on
- a.type = f.id left join admin g on
- a.principal = g.id
- where 1=1
- <if test="deletedSign != null">
- and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and a.order_no = #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null and serialNumber != ''">
- and a.serial_number = #{serialNumber,jdbcType=VARCHAR}
- </if>
- <if test="setUpStartDate != null and setUpStartDate != ''">
- and a.create_time > #{setUpStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="setUpEndDate != null and setUpEndDate != ''">
- and a.create_time < #{setUpEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="taskDistribution != null">
- and a.task_distribution = #{taskDistribution,jdbcType=INTEGER}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and b.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="salesmanName != null and salesmanName !=''">
- and d.name = #{salesmanName,jdbcType=VARCHAR}
- </if>
- <if test="depId != null and depId != ''">
- and d.department_id = #{depId,jdbcType=VARCHAR}
- </if>
- <if test="orderStartDate != null and orderStartDate != ''">
- and c.create_time > #{orderStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="orderEndDate != null and orderEndDate != ''">
- and c.create_time < #{orderEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="principalName != null and principalName != ''">
- and g.name = #{principalName,jdbcType=VARCHAR}
- </if>
- order by a.create_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
- <select id="listProjectCount" resultType="java.lang.Integer">
- select
- count(0)
- from
- contract a left join user b on
- a.uid = b.id left join t_order c on
- a.order_no = c.order_no left join admin d on
- c.salesman_id = d.id left join department e on
- d.department_id = e.id left join business_category f on
- a.type = f.id left join admin g on
- a.principal = g.id
- where 1=1
- <if test="deletedSign != null">
- and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and a.order_no = #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null and serialNumber != ''">
- and a.serial_number = #{serialNumber,jdbcType=VARCHAR}
- </if>
- <if test="setUpStartDate != null and setUpStartDate != ''">
- and a.create_time > #{setUpStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="setUpEndDate != null and setUpEndDate != ''">
- and a.create_time < #{setUpEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="taskDistribution != null">
- and a.task_distribution = #{taskDistribution,jdbcType=INTEGER}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and b.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="salesmanName != null and salesmanName !=''">
- and d.name = #{salesmanName,jdbcType=VARCHAR}
- </if>
- <if test="depId != null and depId != ''">
- and d.department_id = #{depId,jdbcType=VARCHAR}
- </if>
- <if test="orderStartDate != null and orderStartDate != ''">
- and c.create_time > #{orderStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="orderEndDate != null and orderEndDate != ''">
- and c.create_time < #{orderEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="principalName != null and principalName != ''">
- and g.name = #{principalName,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="selectTechProjectDetail" resultType="com.goafanti.techproject.bo.ProjectDetailBo">
- <choose>
- <when test="buyerType == 0">
- select
- a.id,
- a.serial_number as serialNumber,
- date_format( a.sign_date, '%Y-%m-%d %H:%i:%S' ) as signDate,
- a.sign_comment as signComment,
- date_format( a.complete_date, '%Y-%m-%d %H:%i:%S' ) as completeDate,
- a.complete_comment as completeComment,
- a.uid,
- a.status as projectStatus,
- a.deleted_sign as deletedSign,
- a.order_no as orderNo,
- b.nickname as buyerName,
- d.name as principalName,
- f.name as buyerProvince,
- g.cname as projectType,
- t.contract_no as contractNo,
- h.name as salesmanName
- from
- contract a left join user b on
- a.uid = b.id left join admin d on
- a.principal = d.id left join user_identity e on
- a.uid = e.uid left join district_glossory f on
- e.province = f.id left join business_category g on
- a.type = g.id left join t_order t on
- a.order_no=t.order_no left join admin h on
- t.salesman_id=h.id
- where a.id = #{contractId,jdbcType=VARCHAR}
- </when>
- <when test="buyerType == 1">
- select
- a.id,
- a.serial_number as serialNumber,
- date_format(a.sign_date,'%Y-%m-%d %H:%i:%S') as signDate,
- a.sign_comment as signComment,
- date_format(a.complete_date,'%Y-%m-%d %H:%i:%S') as completeDate,
- a.complete_comment as completeComment,
- a.uid,
- a.status as projectStatus,
- a.deleted_sign as deletedSign,
- a.order_no as orderNo,
- b.nickname as buyerName,
- d.name as principalName,
- f.name as buyerProvince,
- g.cname as projectType,
- t.contract_no as contractNo,
- h.name as salesmanName
- from
- contract a left join user b on
- a.uid = b.id left join admin d on
- a.principal = d.id left join organization_identity e on
- a.uid = e.uid left join district_glossory f on
- e.location_province = f.id left join business_category g on
- a.type = g.id left join t_order t on
- a.order_no=t.order_no left join admin h on
- t.salesman_id=h.id
- where a.id = #{contractId,jdbcType=VARCHAR}
- </when>
- </choose>
- </select>
-
- <select id="selectProjectTask" resultType="com.goafanti.techproject.bo.TaskListBo">
- select
- a.id as taskId,
- a.commodity_name as commodityName,
- a.commodity_quantity as commodityQuantity,
- a.task_status as taskStatus,
- a.deleted_sign as deletedSign,
- a.task_comment as taskComment,
- a.publish_status as publishStatus,
- ifnull(b.name,'暂无') as technicianName,
- ifnull(b.contact_mobile,'暂无') as technicianMobile
- from
- contract_task a left join admin b on
- a.task_receiver = b.id
- where a.contract_id = #{contractId,jdbcType=VARCHAR}
- </select>
- <select id="selectMyProjectTaskByPage" resultType="com.goafanti.techproject.bo.TaskListBo">
- select
- a.id as taskId,
- a.commodity_id as commodityId,
- a.serial_number as taskNo,
- a.task_status as taskStatus,
- a.deleted_sign as deleteSign,
- date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S') as taskDistributionTimes,
- a.task_comment as taskComment,
- a.publish_status as publishStatus,
- b.bname as commodityName ,
- c.cname as categoryName,
- c.id as categoryId,
- d.serial_number as projectNo,
- d.status,
- d.deleted_sign as deletedSign,
- e.nickname as buyerName,
- f.name as taskReceiverName
- from
- contract_task a left join business_project b on
- a.commodity_id = b.id left join business_category c on
- b.cid = c.id left join contract d on
- a.contract_id = d.id left join user e on
- d.uid = e.id left join admin f on
- a.task_receiver = f.id
- where 1=1
- <if test="taskReceiverId != null and taskReceiverId != ''">
- and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
- </if>
- <if test="deleteSign != null">
- and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
- </if>
- <if test="publishStatus != null">
- and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
- </if>
- <if test="taskStatus != null">
- and a.task_status = #{taskStatus,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="projectNo != null and projectNo != ''">
- and d.serial_number = #{projectNo,jdbcType=VARCHAR}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskReceiverName != null and taskReceiverName != ''">
- and f.name = #{taskReceiverName,jdbcType=VARCHAR}
- </if>
- <if test="categoryId != null and categoryId != ''">
- and c.id = #{categoryId,jdbcType=VARCHAR}
- </if>
- order by a.task_distribution_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
- <select id="selectMyProjectTaskCount" resultType="java.lang.Integer">
- select
- count(0)
- from
- contract_task a left join business_project b on
- a.commodity_id = b.id left join business_category c on
- b.cid = c.id left join contract d on
- a.contract_id = d.id left join user e on
- d.uid = e.id left join admin f on
- a.task_receiver = f.id
- where 1=1
- <if test="taskReceiverId != null and taskReceiverId != ''">
- and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
- </if>
- <if test="deleteSign != null">
- and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
- </if>
- <if test="publishStatus != null">
- and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
- </if>
- <if test="taskStatus != null">
- and a.task_status = #{taskStatus,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="projectNo != null and projectNo != ''">
- and d.serial_number = #{projectNo,jdbcType=VARCHAR}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskReceiverName != null and taskReceiverName != ''">
- and f.name = #{taskReceiverName,jdbcType=VARCHAR}
- </if>
- <if test="categoryId != null and categoryId != ''">
- and c.id = #{categoryId,jdbcType=VARCHAR}
- </if>
-
- <if test="taskReceiverId != null and taskReceiverId != ''">
- and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
- </if>
- <if test="deleteSign != null">
- and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
- </if>
- <if test="publishStatus != null">
- and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
- </if>
- <if test="taskStatus != null">
- and a.task_status = #{taskStatus,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="projectNo != null and projectNo != ''">
- and d.serial_number = #{projectNo,jdbcType=VARCHAR}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskReceiverName != null and taskReceiverName != ''">
- and f.name = #{taskReceiverName,jdbcType=VARCHAR}
- </if>
- <if test="categoryId != null and categoryId != ''">
- and c.id = #{categoryId,jdbcType=VARCHAR}
- </if>
- order by a.task_distribution_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
-
- <select id="salesmanListProjectByPage" resultType="com.goafanti.techproject.bo.ProjectListBo">
- select
- a.id,
- a.serial_number as serialNumber,
- date_format(a.sign_date,'%Y-%m-%d %H:%i:%S') as signDate,
- date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as projectTime,
- a.uid,
- a.status as projectStatus,
- a.task_distribution as taskDistribution,
- a.deleted_sign as deletedSign,
- a.order_no as orderNo,
- b.nickname as buyerName,
- b.type as buyerType,
- f.cname as projectType,
- c.create_time as orderTime,
- c.order_status as orderStatus,
- c.liquidation_status as liquidationStatus,
- c.approval,
- d.name as salesmanName,
- e.name as departmentName,
- g.name as principalName
- from
- contract a left join user b on
- a.uid = b.id left join t_order c on
- a.order_no = c.order_no left join admin d on
- c.salesman_id = d.id left join department e on
- d.department_id = e.id left join business_category f on
- a.type = f.id left join admin g on
- a.principal = g.id
- where 1=1
- and c.salesman_id= #{salesmanId,jdbcType=VARCHAR}
- <if test="deletedSign != null">
- and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and a.order_no = #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null and serialNumber != ''">
- and a.serial_number = #{serialNumber,jdbcType=VARCHAR}
- </if>
- <if test="setUpStartDate != null and setUpStartDate != ''">
- and a.create_time > #{setUpStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="setUpEndDate != null and setUpEndDate != ''">
- and a.create_time < #{setUpEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="taskDistribution != null">
- and a.task_distribution = #{taskDistribution,jdbcType=INTEGER}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and b.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="salesmanName != null and salesmanName !=''">
- and d.name = #{salesmanName,jdbcType=VARCHAR}
- </if>
- <if test="depId != null and depId != ''">
- and d.department_id = #{depId,jdbcType=VARCHAR}
- </if>
- <if test="orderStartDate != null and orderStartDate != ''">
- and c.create_time > #{orderStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="orderEndDate != null and orderEndDate != ''">
- and c.create_time < #{orderEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="principalName != null and principalName != ''">
- and g.name = #{principalName,jdbcType=VARCHAR}
- </if>
- order by a.create_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
- <select id="salesmanListProjectCount" resultType="java.lang.Integer">
- select
- count(0)
- from
- contract a left join user b on
- a.uid = b.id left join t_order c on
- a.order_no = c.order_no left join admin d on
- c.salesman_id = d.id left join department e on
- d.department_id = e.id left join business_category f on
- a.type = f.id left join admin g on
- a.principal = g.id
- where 1=1
- and c.salesman_id= #{salesmanId,jdbcType=VARCHAR}
- <if test="deletedSign != null">
- and a.deleted_sign = #{deletedSign,jdbcType=INTEGER}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and a.order_no = #{orderNo,jdbcType=VARCHAR}
- </if>
- <if test="serialNumber != null and serialNumber != ''">
- and a.serial_number = #{serialNumber,jdbcType=VARCHAR}
- </if>
- <if test="setUpStartDate != null and setUpStartDate != ''">
- and a.create_time > #{setUpStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="setUpEndDate != null and setUpEndDate != ''">
- and a.create_time < #{setUpEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="taskDistribution != null">
- and a.task_distribution = #{taskDistribution,jdbcType=INTEGER}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and b.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="salesmanName != null and salesmanName !=''">
- and d.name = #{salesmanName,jdbcType=VARCHAR}
- </if>
- <if test="depId != null and depId != ''">
- and d.department_id = #{depId,jdbcType=VARCHAR}
- </if>
- <if test="orderStartDate != null and orderStartDate != ''">
- and c.create_time > #{orderStartDate,jdbcType=TIMESTAMP}
- </if>
- <if test="orderEndDate != null and orderEndDate != ''">
- and c.create_time < #{orderEndDate,jdbcType=TIMESTAMP}
- </if>
- <if test="principalName != null and principalName != ''">
- and g.name = #{principalName,jdbcType=VARCHAR}
- </if>
- </select>
-
- <select id="selectProjectTaskByPage" resultType="com.goafanti.techproject.bo.TaskListBo">
- select
- a.id as taskId,
- a.commodity_id as commodityId,
- a.serial_number as taskNo,
- a.task_status as taskStatus,
- a.deleted_sign as deleteSign,
- date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S') as taskDistributionTimes,
- a.task_comment as taskComment,
- a.publish_status as publishStatus,
- b.bname as commodityName ,
- c.cname as categoryName,
- c.id as categoryId,
- d.serial_number as projectNo,
- d.status,
- d.deleted_sign as deletedSign,
- e.nickname as buyerName,
- f.name as taskReceiverName,
- ifnull(g.sign_total_amount,0) as signTotalAmount
- from
- (select *
- from contract_task_log
- where task_receiver=#{taskReceiver,jdbcType=VARCHAR}) x left join contract_task a on
- x.contract_task_id=a.id left join business_project b on
- a.commodity_id = b.id left join business_category c on
- b.cid = c.id left join contract d on
- a.contract_id = d.id left join user e on
- d.uid = e.id left join admin f on
- a.task_receiver = f.id left join t_order g on
- d.order_no=g.order_no
- where 1=1
- <if test="taskReceiverId != null and taskReceiverId != ''">
- and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
- </if>
- <if test="deleteSign != null">
- and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
- </if>
- <if test="publishStatus != null">
- and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
- </if>
- <if test="taskStatus != null">
- and a.task_status = #{taskStatus,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="projectNo != null and projectNo != ''">
- and d.serial_number = #{projectNo,jdbcType=VARCHAR}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskReceiverName != null and taskReceiverName != ''">
- and f.name = #{taskReceiverName,jdbcType=VARCHAR}
- </if>
- <if test="categoryId != null and categoryId != ''">
- and c.id = #{categoryId,jdbcType=VARCHAR}
- </if>
- order by a.task_distribution_time desc
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
-
- <select id="selectProjectTaskCount" resultType="java.lang.Integer">
- select
- count(0)
- from
- (select *
- from contract_task_log
- where task_receiver=#{taskReceiver,jdbcType=VARCHAR}) x left join contract_task a on
- x.contract_task_id=a.id left join business_project b on
- a.commodity_id = b.id left join business_category c on
- b.cid = c.id left join contract d on
- a.contract_id = d.id left join user e on
- d.uid = e.id left join admin f on
- a.task_receiver = f.id left join t_order g on
- d.order_no=g.order_no
- where 1=1
- <if test="taskReceiverId != null and taskReceiverId != ''">
- and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
- </if>
- <if test="deleteSign != null">
- and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
- </if>
- <if test="publishStatus != null">
- and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
- </if>
- <if test="taskStatus != null">
- and a.task_status = #{taskStatus,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="projectNo != null and projectNo != ''">
- and d.serial_number = #{projectNo,jdbcType=VARCHAR}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskReceiverName != null and taskReceiverName != ''">
- and f.name = #{taskReceiverName,jdbcType=VARCHAR}
- </if>
- <if test="categoryId != null and categoryId != ''">
- and c.id = #{categoryId,jdbcType=VARCHAR}
- </if>
-
- <if test="taskReceiverId != null and taskReceiverId != ''">
- and a.task_receiver = #{taskReceiverId,jdbcType=VARCHAR}
- </if>
- <if test="deleteSign != null">
- and a.deleted_sign = #{deleteSign,jdbcType=VARCHAR}
- </if>
- <if test="publishStatus != null">
- and a.publish_status = #{publishStatus,jdbcType=VARCHAR}
- </if>
- <if test="taskStatus != null">
- and a.task_status = #{taskStatus,jdbcType=VARCHAR}
- </if>
- <if test="startDate != null">
- and a.task_distribution_time > #{startDate,jdbcType=TIMESTAMP}
- </if>
- <if test="endDate != null">
- and a.task_distribution_time < #{endDate,jdbcType=TIMESTAMP}
- </if>
- <if test="projectNo != null and projectNo != ''">
- and d.serial_number = #{projectNo,jdbcType=VARCHAR}
- </if>
- <if test="buyerName != null and buyerName != ''">
- and e.nickname like concat('%',#{buyerName,jdbcType=VARCHAR},'%')
- </if>
- <if test="taskReceiverName != null and taskReceiverName != ''">
- and f.name = #{taskReceiverName,jdbcType=VARCHAR}
- </if>
- <if test="categoryId != null and categoryId != ''">
- and c.id = #{categoryId,jdbcType=VARCHAR}
- </if>
- </select>
- </mapper>
|