Browse Source

修改财务、咨询师管理员派单列表BUG

anderx 6 years ago
parent
commit
55b972ef26

+ 9 - 3
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -891,8 +891,11 @@
   	,liquidation_status,o.finance_id as financeId,contract_no as contractNo,d.name as departmentName,e.name as outsourceName
   	from t_order_new o left join `user` u on o.buyer_id = u.id left join admin a on o.salesman_id = a.id
   	left join department d on o.order_dep=d.id left join (select order_no,max(name)as name from outsource_organization group by order_no) e
-  	 on o.order_no=e.order_no where delete_sign = 0 and order_status = 2
-  	and approval in (0,2) and outsource=#{o.outsource,jdbcType=INTEGER}
+  	 on o.order_no=e.order_no where delete_sign = 0 
+  	and approval in (0,2) 
+  	<if test="o.outsource != null">
+  	and outsource=#{o.outsource,jdbcType=INTEGER}
+  	</if>
   	and process_status &gt;= 2
   	<if test="o.processStatus == 2">
   	and (o.finance_id is null or o.finance_id='') 
@@ -930,7 +933,10 @@
   </select>
   <select id="getAllUnassignedCountOrder" parameterType="Map" resultType="java.lang.Integer">
   select count(*) from t_order_new o left join `user` u on o.buyer_id = u.id left join admin a on o.salesman_id = a.id
-  	where delete_sign = 0 and order_status = 2 and approval in (0,2) and outsource=#{o.outsource,jdbcType=INTEGER}
+  	where delete_sign = 0  and approval in (0,2) 
+	<if test="o.outsource != null">
+  	and outsource=#{o.outsource,jdbcType=INTEGER}
+  	</if>
   	and process_status &gt;= 2
   	<if test="o.processStatus == 2">
   	and (o.finance_id is null or o.finance_id='')

+ 1 - 1
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -88,7 +88,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 	public Pagination<OrderListBo> allUnassignedOrder(OrderListBo order, Integer pageNo,
 			Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
-		if (order.getOutsource()==null)order.setOutsource(0);//默认非外包 
+		//if (order.getOutsource()==null)order.setOutsource(0);//默认非外包 
 		params.put("o", order);
 		Pagination<OrderListBo> data = (Pagination<OrderListBo>)findPage("getAllUnassignedListOrder", "getAllUnassignedCountOrder", params, pageNo, pageSize);
 		return data;

+ 3 - 2
src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java

@@ -24,6 +24,7 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.OrderOutsourceBo;
 import com.goafanti.order.bo.OrderOutsourceDtails;
 import com.goafanti.order.bo.OutsourceOrganizationBo;
+import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.OrderService;
 import com.goafanti.order.service.OutsourceOrgService;
 @Service
@@ -90,10 +91,10 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 	public int updateAuditOutsource(OrderOutsourceDtails o) {
 		o.setAuditTime(new Date());
 		TOrderNew t=new TOrderNew();
-		t.setOrderNo(o.getOrderNo());
+		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(o.getOrderNo());
 		if (o.getRefundStatus()==1) {
 			t.setOrderStatus(2);//订单审核标记通过
-			t.setProcessStatus(2);//订单流程标记到财务
+			t.setProcessStatus(t2.getApproval()==0?ProcessStatus.YPCWGLY.getCode():ProcessStatus.YPZXSGLY.getCode());
 			addOrderLog(o.getOrderNo(),OrderLogProcess.WBSH.getCode());
 			tOrderNewMapper.updateByPrimaryKeySelective(t);
 		}else {