|
@@ -1087,6 +1087,13 @@
|
|
|
on a.id=l.tid left join t_task_mid ttm on a.id=ttm.tid left join t_task_member tmer on a.id=tmer.tid
|
|
on a.id=l.tid left join t_task_mid ttm on a.id=ttm.tid left join t_task_member tmer on a.id=tmer.tid
|
|
|
where e.delete_sign in (0,2,3) and e.order_status in (2,4)
|
|
where e.delete_sign in (0,2,3) and e.order_status in (2,4)
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
|
|
+ <include refid="selectOrderTaskListSql"/>
|
|
|
|
|
+ order by a.task_distribution_time desc
|
|
|
|
|
+ <if test="page_sql!=null">
|
|
|
|
|
+ ${page_sql}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <sql id="selectOrderTaskListSql">
|
|
|
<if test="role == 0 ">
|
|
<if test="role == 0 ">
|
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
</if>
|
|
@@ -1132,6 +1139,9 @@
|
|
|
<if test="name != null">
|
|
<if test="name != null">
|
|
|
and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="projectName != null">
|
|
|
|
|
+ and a.commodity_name like CONCAT('%',#{projectName,jdbcType=VARCHAR},'%')
|
|
|
|
|
+ </if>
|
|
|
<if test="taskId != null">
|
|
<if test="taskId != null">
|
|
|
and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
|
|
and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
|
|
|
</if>
|
|
</if>
|
|
@@ -1144,11 +1154,7 @@
|
|
|
<if test="startTime != null and endTime != null">
|
|
<if test="startTime != null and endTime != null">
|
|
|
and e.sign_time between #{startTime} and #{endTime}
|
|
and e.sign_time between #{startTime} and #{endTime}
|
|
|
</if>
|
|
</if>
|
|
|
- order by a.task_distribution_time desc
|
|
|
|
|
- <if test="page_sql!=null">
|
|
|
|
|
- ${page_sql}
|
|
|
|
|
- </if>
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
+ </sql>
|
|
|
|
|
|
|
|
<select id="selectOrderTaskListCount" resultType="java.lang.Integer">
|
|
<select id="selectOrderTaskListCount" resultType="java.lang.Integer">
|
|
|
select count(*) from t_order_task a
|
|
select count(*) from t_order_task a
|
|
@@ -1165,63 +1171,26 @@
|
|
|
</if>
|
|
</if>
|
|
|
where e.delete_sign in (0,2,3) and e.order_status in (2,4)
|
|
where e.delete_sign in (0,2,3) and e.order_status in (2,4)
|
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
- <if test="role == 0 ">
|
|
|
|
|
- and a.task_receiver= #{aid,jdbcType=VARCHAR}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="role ==1 and fids != null and fids.size() > 0">
|
|
|
|
|
- and e.finance_id in
|
|
|
|
|
- <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
|
|
|
|
|
- #{item}
|
|
|
|
|
- </foreach>
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="specially == 0 ">
|
|
|
|
|
- and a.split_status in (0,2)
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="orderNo != null">
|
|
|
|
|
- and a.order_no= #{orderNo,jdbcType=VARCHAR}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="approval ==0">
|
|
|
|
|
- and e.approval = 0
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="approval ==1">
|
|
|
|
|
- and e.approval in(1,2)
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="approval ==2">
|
|
|
|
|
- and e.approval in (4,5)
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
+ <include refid="selectOrderTaskListSql"/>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectOrderTaskListSum" resultType="java.util.Map">
|
|
|
|
|
+ select sum(a.commodity_price) totalAmount,sum(a.commodity_quantity)totalNumber
|
|
|
|
|
+ from t_order_task a
|
|
|
|
|
+ left join t_order_new e on a.order_no=e.order_no
|
|
|
<if test="cid != null">
|
|
<if test="cid != null">
|
|
|
- and c.id = #{cid}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="outsourceStatus !=null">
|
|
|
|
|
- and l.refund_status = #{outsourceStatus,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="contractNo != null">
|
|
|
|
|
- and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="projectStatus != null">
|
|
|
|
|
- and a.project_status = #{projectStatus,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="deps != null">
|
|
|
|
|
- and e.order_dep in
|
|
|
|
|
- <foreach close=")" collection="deps" item="depId" open="(" separator=",">
|
|
|
|
|
- #{depId}
|
|
|
|
|
- </foreach>
|
|
|
|
|
|
|
+ left join business_project b on a.commodity_id=b.id
|
|
|
|
|
+ left join business_category c on b.cid=c.id
|
|
|
</if>
|
|
</if>
|
|
|
<if test="name != null">
|
|
<if test="name != null">
|
|
|
- and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="taskId != null">
|
|
|
|
|
- and (a.id= #{taskId,jdbcType=VARCHAR} or a.split_super= #{taskId,jdbcType=VARCHAR})
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="taskStatus != null">
|
|
|
|
|
- and a.task_status= #{taskStatus,jdbcType=INTEGER}
|
|
|
|
|
- </if>
|
|
|
|
|
- <if test="adminName != null">
|
|
|
|
|
- and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
|
|
|
|
|
|
|
+ left join user f on e.buyer_id=f.id
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="startTime != null and endTime != null">
|
|
|
|
|
- and e.sign_time between #{startTime} and #{endTime}
|
|
|
|
|
|
|
+ <if test="outsourceStatus !=null">
|
|
|
|
|
+ left join t_order_outsource l on a.id=l.tid
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ where e.delete_sign in (0,2,3) and e.order_status in (2,4)
|
|
|
|
|
+ and a.outsource= #{outsource,jdbcType=INTEGER}
|
|
|
|
|
+ <include refid="selectOrderTaskListSql"/>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
|
|
<select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
|
|
|
select
|
|
select
|