Explorar o código

1、财务逻辑修改,允许全款,一次性付款;2、奖金逻辑调整,将只发主项目更改为所有项目。

anderx %!s(int64=6) %!d(string=hai) anos
pai
achega
106aa84dae

+ 14 - 8
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -1054,17 +1054,19 @@
    <select id="selectAdminCustomerList" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminCustomerBo">
   	select a.id as aid,a.name as aName,d.name as depName,ifnull(b.userCount,0) as userCount,ifnull(c.timeCount,0) as timeCount from admin a 
 	left join (select aid,count(aid) as userCount from user where aid is not null  
-	and  share_type=0 and source !=0
+	and  share_type=0 and source !=0 and type=1
 	group by aid) b on a.id=b.aid
 	left join (select aid,count(aid) as timeCount from user where aid is not null  
-	and  share_type=0 and source !=0
+	and  share_type=0 and source !=0 and type=1
 	 <if test="startTime != null and endTime != null"> 
     and  create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>
 	group by aid) c on a.id=c.aid
 	left join department d on a.department_id=d.id
-	where a.status='正常'
-	and b.userCount !=0
+	left join user_role e on a.id=e.uid
+	left join `role` f on e.rid=f.id
+	where f.role_name in ('营销员','营销经理')	
+	and	 a.status='正常'
 	<if test="depId != null"> 
     and a.department_id =  #{depId,jdbcType=VARCHAR}
     </if>
@@ -1076,16 +1078,18 @@
   <select id="selectAdminCustomerCount" parameterType="java.lang.String" resultType="java.lang.Integer">
   select count(*) from admin a 
 	left join (select aid,count(aid) as userCount from user where aid is not null  
-	and  share_type=0 and source !=0
+	and  share_type=0 and source !=0 and type=1
 	group by aid) b on a.id=b.aid
 	left join (select aid,count(aid) as timeCount from user where aid is not null  
-	and  share_type=0 and source !=0
+	and  share_type=0 and source !=0 and type=1
 	 <if test="startTime != null and endTime != null"> 
     and  create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
     </if>
 	group by aid) c on a.id=c.aid
-	where a.status='正常'
-	and b.userCount !=0
+	left join user_role e on a.id=e.uid
+	left join `role` f on e.rid=f.id
+	where f.role_name in ('营销员','营销经理')	
+	and  a.status='正常'
 	<if test="depId != null"> 
     and a.department_id =  #{depId,jdbcType=VARCHAR}
     </if>
@@ -1102,6 +1106,7 @@
 	and a.aid=  #{aid,jdbcType=VARCHAR}
     </if>
 	and  a.share_type=0 
+	and a.type=1
 	<if test="startTime != null and endTime != null">
 	 and  a.create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
     </if>
@@ -1119,6 +1124,7 @@
 	and a.aid=  #{aid,jdbcType=VARCHAR}
     </if>
 	and  a.share_type=0 
+	and a.type=1
 	<if test="startTime != null and endTime != null">
 	 and  a.create_time  between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR} 
     </if>

+ 1 - 6
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -879,12 +879,7 @@
   	and o.create_time between #{a,jdbcType=VARCHAR} and #{b,jdbcType=VARCHAR}
   	</if>
 )oo
-  	<if test="ob == 1">
-  	order by oo.createTime desc
-  	</if>
-  	<if test="ob == 2">
-  	order by oo.liquidation_status,oo.createTime desc
-  	</if>
+  	order by oo.processStatus,oo.createTime desc
 	<if test="page_sql != null">
 		${page_sql}
 	</if>

+ 1 - 1
src/main/java/com/goafanti/order/controller/FundManagerOrderApiController.java

@@ -54,7 +54,7 @@ public class FundManagerOrderApiController extends CertifyApiController {
 		//判断当前登录的角色是不是财务管理员
 		
 		//order.setProcessStatus(2);//订单状态为2   改为前端传
-		res.setData(fundManageOrderServiceImpl.allUnassignedOrder(order, pageNo, pageSize,1));
+		res.setData(fundManageOrderServiceImpl.allUnassignedOrder(order, pageNo, pageSize));
 		return res;
 	}
 	

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

@@ -18,7 +18,7 @@ public interface FundManageOrderService {
 	 * @param PageSize
 	 * @return
 	 */
-	Pagination<OrderListBo> allUnassignedOrder(OrderListBo order,Integer pageNo,Integer pageSize,Integer ob);
+	Pagination<OrderListBo> allUnassignedOrder(OrderListBo order,Integer pageNo,Integer pageSize);
 	/**
 	 * 财务专员查看分配给自己的订单
 	 * @param order

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

@@ -80,11 +80,11 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<OrderListBo> allUnassignedOrder(OrderListBo order, Integer pageNo,
-			Integer pageSize,Integer ob) {
+			Integer pageSize) {
 		
 		Map<String, Object> params = new HashMap<String, Object>();
 		params.put("o", order);
-		params.put("ob", ob);
+		
 		Pagination<OrderListBo> data = (Pagination<OrderListBo>)findPage("getAllUnassignedListOrder", "getAllUnassignedCountOrder", params, pageNo, pageSize);
 		return data;
 	}

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

@@ -228,8 +228,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	}
 
 	private void meanwhileUpdateOrder(TOrderTask task) {
-		
-		if (task.getMain()==1) {//是否是主要项目
+//		if (task.getMain()==1) {//是否是主要项目 更改为不管是不是主项目都会有奖金信息
 			//更改订单项目状态
 			TOrderNew tNew=new TOrderNew();
 			tNew.setProjectStatus(task.getProjectStatus());
@@ -257,7 +256,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				}
 				
 			}
-		}
+		
 	}
 
 	@Override

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

@@ -60,7 +60,7 @@ 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.0.51
+static.host=//sb.jishutao.com/1.0.95
 avatar.host=//sb.jishutao.com
 
 #连生产