|
@@ -23,6 +23,7 @@
|
|
|
<result column="repeat_end_count" property="repeatEndCount" />
|
|
|
<result column="repeat_end_date" property="repeatEndDate" />
|
|
|
<result column="repeat_design_day" property="repeatDesignDay" />
|
|
|
+ <result column="repeat_design_sameday" property="repeatDesignSameday" />
|
|
|
<result column="task_desc" property="taskDesc" />
|
|
|
<result column="creater_id" property="createrId" />
|
|
|
<result column="creater_name" property="createrName" />
|
|
@@ -39,11 +40,41 @@
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, task_name, company_id, owner_id, contacts_id, executor_id, clue_id, custom_id, business_opportunity_id, order_id, product_id, status, priority, is_repeat, repeat_type, repeat_end_never, repeat_end_count, repeat_end_date, repeat_design_day, task_desc, creater_id, creater_name, create_date, end_date, start_date, finish_date, plate1, plate2, plate3, plate4, plate5
|
|
|
+ id, task_name, company_id, owner_id, contacts_id, executor_id, clue_id, custom_id, business_opportunity_id, order_id, product_id, status, priority, is_repeat, repeat_type, repeat_end_never, repeat_end_count, repeat_end_date, repeat_design_day, repeat_design_sameday, task_desc, creater_id, creater_name, create_date, end_date, start_date, finish_date, plate1, plate2, plate3, plate4, plate5
|
|
|
</sql>
|
|
|
|
|
|
<resultMap id="TaskVoMap" type="com.management.platform.entity.vo.TasKVo">
|
|
|
<id column="id" property="id" />
|
|
|
+ <result column="task_name" property="taskName" />
|
|
|
+ <result column="company_id" property="companyId" />
|
|
|
+ <result column="owner_id" property="ownerId" />
|
|
|
+ <result column="contacts_id" property="contactsId" />
|
|
|
+ <result column="executor_id" property="executorId" />
|
|
|
+ <result column="clue_id" property="clueId" />
|
|
|
+ <result column="custom_id" property="customId" />
|
|
|
+ <result column="business_opportunity_id" property="businessOpportunityId" />
|
|
|
+ <result column="order_id" property="orderId" />
|
|
|
+ <result column="product_id" property="productId" />
|
|
|
+ <result column="status" property="status" />
|
|
|
+ <result column="priority" property="priority" />
|
|
|
+ <result column="is_repeat" property="isRepeat" />
|
|
|
+ <result column="repeat_type" property="repeatType" />
|
|
|
+ <result column="repeat_end_never" property="repeatEndNever" />
|
|
|
+ <result column="repeat_end_count" property="repeatEndCount" />
|
|
|
+ <result column="repeat_end_date" property="repeatEndDate" />
|
|
|
+ <result column="repeat_design_day" property="repeatDesignDay" />
|
|
|
+ <result column="task_desc" property="taskDesc" />
|
|
|
+ <result column="creater_id" property="createrId" />
|
|
|
+ <result column="creater_name" property="createrName" />
|
|
|
+ <result column="create_date" property="createDate" />
|
|
|
+ <result column="end_date" property="endDate" />
|
|
|
+ <result column="start_date" property="startDate" />
|
|
|
+ <result column="finish_date" property="finishDate" />
|
|
|
+ <result column="plate1" property="plate1" />
|
|
|
+ <result column="plate2" property="plate2" />
|
|
|
+ <result column="plate3" property="plate3" />
|
|
|
+ <result column="plate4" property="plate4" />
|
|
|
+ <result column="plate5" property="plate5" />
|
|
|
<association property="custom" javaType="com.management.platform.entity.Custom">
|
|
|
<id column="custom_id" property="id"/>
|
|
|
<result column="custom_name" property="customName"/>
|
|
@@ -63,6 +94,7 @@
|
|
|
<association property="contacts" javaType="com.management.platform.entity.Contacts">
|
|
|
<id column="contacts_id" property="id"/>
|
|
|
<result column="contacts_name" property="name"/>
|
|
|
+ <result column="phone" property="phone"/>
|
|
|
</association>
|
|
|
<collection property="taskExecutors" ofType="com.management.platform.entity.TaskExecutor">
|
|
|
<id column="task_executor_id" property="taskExecutorId"/>
|
|
@@ -72,7 +104,7 @@
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
- <select id="pageTask" resultMap="TaskVoMap">
|
|
|
+ <select id="getPageListTask" resultMap="TaskVoMap">
|
|
|
select task.* ,
|
|
|
custom.custom_name,
|
|
|
business_opportunity.name businessName,
|
|
@@ -98,6 +130,9 @@
|
|
|
<if test=" customName!= null and customName != ''">
|
|
|
AND custom.custom_name LIKE CONCAT('%', #{customName}, '%')
|
|
|
</if>
|
|
|
+ <if test=" contactsName!= null and contactsName != ''">
|
|
|
+ AND contacts.name LIKE CONCAT('%', #{contactsName}, '%')
|
|
|
+ </if>
|
|
|
<if test=" businessName!= null and businessName != ''">
|
|
|
AND business_opportunity.name LIKE CONCAT('%', #{businessName}, '%')
|
|
|
</if>
|
|
@@ -131,41 +166,72 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
- <resultMap id="testMap" type="com.management.platform.entity.vo.TasKVo">
|
|
|
- <id column="id" property="id" />
|
|
|
- <result column="task_name" property="taskName" />
|
|
|
- <result column="company_id" property="companyId" />
|
|
|
- <result column="owner_id" property="ownerId" />
|
|
|
- <result column="contacts_id" property="contactsId" />
|
|
|
- <result column="executor_id" property="executorId" />
|
|
|
- <result column="clue_id" property="clueId" />
|
|
|
- <result column="custom_id" property="customId" />
|
|
|
- <result column="business_opportunity_id" property="businessOpportunityId" />
|
|
|
- <result column="order_id" property="orderId" />
|
|
|
- <result column="product_id" property="productId" />
|
|
|
- <result column="status" property="status" />
|
|
|
- <result column="priority" property="priority" />
|
|
|
- <result column="is_repeat" property="isRepeat" />
|
|
|
- <result column="repeat_type" property="repeatType" />
|
|
|
- <result column="repeat_end_never" property="repeatEndNever" />
|
|
|
- <result column="repeat_end_count" property="repeatEndCount" />
|
|
|
- <result column="repeat_end_date" property="repeatEndDate" />
|
|
|
- <result column="repeat_design_day" property="repeatDesignDay" />
|
|
|
- <result column="task_desc" property="taskDesc" />
|
|
|
- <result column="creater_id" property="createrId" />
|
|
|
- <result column="creater_name" property="createrName" />
|
|
|
- <result column="create_date" property="createDate" />
|
|
|
- <result column="end_date" property="endDate" />
|
|
|
- <result column="start_date" property="startDate" />
|
|
|
- <result column="finish_date" property="finishDate" />
|
|
|
- <collection property="taskExecutors" ofType="com.management.platform.entity.TaskExecutor">
|
|
|
- <id column="task_executor_id" property="taskExecutorId"/>
|
|
|
- <result column="executor_name" property="executorName"/>
|
|
|
- </collection>
|
|
|
|
|
|
- </resultMap>
|
|
|
- <select id="test" resultMap="testMap">
|
|
|
- select t.*,e.task_executor_id,e.executor_name from task t left join task_executor e ON t.id = e.task_id limit #{pageIndex},#{pageSize}
|
|
|
+ <select id="getPageListTotalTask" resultMap="TaskVoMap">
|
|
|
+ select task.* ,
|
|
|
+ custom.custom_name,
|
|
|
+ business_opportunity.name businessName,
|
|
|
+ `order`.order_name ,
|
|
|
+ clue.clue_name,
|
|
|
+ contacts.name contacts_name ,contacts.phone,
|
|
|
+ task_executor.task_executor_id, task_executor.executor_id taskExecutor_executor_id,task_executor.executor_name
|
|
|
+ from task
|
|
|
+ left join custom on task.custom_id=custom.id
|
|
|
+ left join business_opportunity on task.business_opportunity_id=business_opportunity.id
|
|
|
+ left join `order` on task.order_id=`order`.id
|
|
|
+ left join clue on task.clue_id=clue.id
|
|
|
+ left join contacts on task.contacts_id=contacts.id
|
|
|
+ left join task_executor on task.id=task_executor.task_id
|
|
|
+ <where>
|
|
|
+ <if test=" taskName!= null and taskName != ''">
|
|
|
+ AND task.task_name LIKE CONCAT('%', #{taskName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" priority!= null ">
|
|
|
+ AND task.priority =#{priority}
|
|
|
+ </if>
|
|
|
+ <if test=" customName!= null and customName != ''">
|
|
|
+ AND custom.custom_name LIKE CONCAT('%', #{customName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" contactsName!= null and contactsName != ''">
|
|
|
+ AND contacts.name LIKE CONCAT('%', #{contactsName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" businessName!= null and businessName != ''">
|
|
|
+ AND business_opportunity.name LIKE CONCAT('%', #{businessName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" orderName!= null and orderName != ''">
|
|
|
+ AND `order`.order_name LIKE CONCAT('%', #{orderName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" clueName!= null and clueName != ''">
|
|
|
+ AND clue.clue_name LIKE CONCAT('%', #{clueName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" phone!= null and phone != ''">
|
|
|
+ AND contacts.phone LIKE CONCAT('%', #{phone}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" status!= null ">
|
|
|
+ AND task.status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test=" executorName!= null and executorName != '' ">
|
|
|
+ AND task_executor.executor_name LIKE CONCAT('%', #{executorName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test=" startDate!= null and startDate != '' ">
|
|
|
+ AND task.start_date > #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test=" endDate!= null and endDate != '' ">
|
|
|
+ AND task.end_date < #{endDate}
|
|
|
+ </if>
|
|
|
+ <if test=" companyId!= null ">
|
|
|
+ AND task.company_id = #{companyId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
|
|
|
+ <update id="updateRepeatConfig">
|
|
|
+ update task
|
|
|
+ <set>
|
|
|
+ repeat_type=#{repeatType},repeat_end_never=#{repeatEndNever},repeat_end_count=#{repeatEndCount},
|
|
|
+ repeat_end_date=#{repeatEndDate},repeat_design_day=#{repeatDesignDay},repeat_design_sameday=#{repeatDesignSameday}
|
|
|
+ </set>
|
|
|
+ where id=#{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|