Browse Source

任务查询修改

anderx 6 years ago
parent
commit
634145bb4a

+ 9 - 5
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -997,10 +997,11 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   </select>
   
    <select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
-  	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
+ 	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
     a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
     a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName,ifnull(i.alreadyNumber,0)as alreadyNumber
-    from t_task_log x left join  t_order_task a on x.task_id=a.id 
+    from (select task_id from t_task_log a where task_receiver='e36eba1b-3b1a-4297-9c03-17952205d84e ' UNION select task_id from t_task_log a 
+    where task_allocator='e36eba1b-3b1a-4297-9c03-17952205d84e') x left join  t_order_task a on x.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 admin d on a.task_receiver=d.id
@@ -1009,7 +1010,6 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
     left join department h on e.order_dep=h.id
     left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
     where e.delete_sign=0 
-    and (x.task_receiver= #{aid,jdbcType=VARCHAR} or x.task_allocator= #{aid,jdbcType=VARCHAR})
     <if test="orderNo != null">
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>
@@ -1039,12 +1039,16 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   
    <select id="selectTaskListCount" resultType="java.lang.Integer">
   	select  count(*)
-    from t_task_log x left join  t_order_task a on x.task_id=a.id 
+    from (select task_id from t_task_log a where task_receiver='e36eba1b-3b1a-4297-9c03-17952205d84e ' UNION select task_id from t_task_log a 
+    where task_allocator='e36eba1b-3b1a-4297-9c03-17952205d84e') x left join  t_order_task a on x.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 admin d on a.task_receiver=d.id
     left join t_order_new e on a.order_no=e.order_no
     left join user f on e.buyer_id=f.id
+    left join department h on e.order_dep=h.id
+    left join (select task_id , sum(already_number) as alreadyNumber from task_progress group by task_id) i on a.id=i.task_id
     where e.delete_sign=0 
-    and (x.task_receiver= #{aid,jdbcType=VARCHAR} or x.task_allocator= #{aid,jdbcType=VARCHAR})
     <if test="orderNo != null">
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>

+ 10 - 10
src/main/resources/props/config_local.properties

@@ -1,13 +1,13 @@
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 #本地
-jdbc.url=jdbc\:mysql\://localhost\:3306/aft?useUnicode\=true&characterEncoding\=UTF-8&autoReconnect\=true&useSSL\=false
-jdbc.username=dev
-jdbc.password=123456
+#jdbc.url=jdbc\:mysql\://localhost\:3306/aft?useUnicode\=true&characterEncoding\=UTF-8&autoReconnect\=true&useSSL\=false
+#jdbc.username=dev
+#jdbc.password=123456
 #测试
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft20181217?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=aftdev
+jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.username=root
+jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
 jdbc.validationQuery=SELECT 'x'
 #\u521d\u59cb\u8fde\u63a5\u6570
@@ -60,12 +60,12 @@ template.cacheable=false
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-static.host=//sb.jishutao.com/1.1.06
-avatar.host=//sb.jishutao.com
+#static.host=//sb.jishutao.com/1.1.06
+#avatar.host=//sb.jishutao.com
 
 #连生产
-#avatar.host=//static.kedexinxi.com
-#static.host=//s.kedexinxi.com/1.1.06
+avatar.host=//static.kedexinxi.com
+static.host=//s.kedexinxi.com/1.1.06
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload