| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175 |
- <?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" />
- <result column="publish_status" property="publishStatus" jdbcType="INTEGER" />
- </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_management e on
- d.department_id = e.id left join business_varieties 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_management e on
- d.department_id = e.id left join business_varieties 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_varieties 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_varieties 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,
- b.name as technicianName,
- b.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_varieties 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_varieties 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_management e on
- d.department_id = e.id left join business_varieties 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_management e on
- d.department_id = e.id left join business_varieties 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_varieties 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_varieties 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>
|