Browse Source

外包开发 1.0

anderx 6 years ago
parent
commit
1f853383e9

+ 10 - 21
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -842,23 +842,18 @@
   
   
    <select id="selectOrderTaskListByPage" 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,
-    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,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName
-  	from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id 
+  	    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,
+    ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, j.name as outsourceName 
+    from t_order_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 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 e.order_status not in (5,7)
+    group by task_id) i on a.id=i.task_id  left join (select order_no,name from outsource_organization
+  	group by order_no ) j on a.order_no=j.order_no where e.delete_sign=0  and e.order_status not in (5,7)
     and e.outsource= #{outsource,jdbcType=INTEGER}
     <if test="specially == 0">
     and a.task_receiver= #{aid,jdbcType=VARCHAR}
     </if>
-    <if test="specially == 1">
-    and a.task_receiver= #{aid,jdbcType=VARCHAR}
-    </if>
-    <if test="specially == 2">
-    and d.superior_id= (select department_id from admin where  id= #{aid,jdbcType=VARCHAR})
-    </if>
     <if test="orderNo != null">
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>
@@ -898,12 +893,6 @@
     <if test="specially == 0">
     and a.task_receiver= #{aid,jdbcType=VARCHAR}
     </if>
-    <if test="specially == 1">
-    and a.task_receiver= #{aid,jdbcType=VARCHAR}
-    </if>
-    <if test="specially == 2">
-    and d.superior_id= (select department_id from admin where  id= #{aid,jdbcType=VARCHAR})
-    </if>
     <if test="orderNo != null">
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>
@@ -1002,8 +991,8 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
  	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 (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 
+    from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a 
+    where task_allocator=#{aid ,jdbcType=VARCHAR}) 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
@@ -1041,8 +1030,8 @@ 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 (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 
+    from (select task_id from t_task_log a where task_receiver=#{aid ,jdbcType=VARCHAR} UNION select task_id from t_task_log a 
+    where task_allocator=#{aid ,jdbcType=VARCHAR}) 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

+ 8 - 0
src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java

@@ -17,6 +17,8 @@ public class TOrderTaskListBo {
 	private String creteTime;
 	private String signTime;
 	private Integer alreadyNumber;
+	/** 外包部门 */
+	private String outsourceName;
 	public String getContractNo() {
 		return contractNo;
 	}
@@ -113,5 +115,11 @@ public class TOrderTaskListBo {
 	public void setAlreadyNumber(Integer alreadyNumber) {
 		this.alreadyNumber = alreadyNumber;
 	}
+	public String getOutsourceName() {
+		return outsourceName;
+	}
+	public void setOutsourceName(String outsourceName) {
+		this.outsourceName = outsourceName;
+	}
 	
 }