Browse Source

财务部门筛选修改,已修改至普通派单

anderx 3 years ago
parent
commit
b991a136cf

+ 1 - 1
src/main/java/com/goafanti/common/dao/TOrderNewMapper.java

@@ -40,7 +40,7 @@ public interface TOrderNewMapper {
 
     int updateFinance(@Param("aid")String aid, @Param("orderNos") List<String> orderNos, @Param("newFinance")String newFinance);
     int checkContractNo(String sno);
-    Map<String, Object> countTotalAndActually(@Param("o") OrderListBo o, @Param("fids")List<String> fids);
+    Map<String, Object> countTotalAndActually(@Param("o") OrderListBo o, @Param("fids") List<String> fids, @Param("deps")List<String> listDep);
     TOrderBillNew getLastPayment(String orderNo);
     int updateSalesmanId(@Param("aid")String aid, @Param("transferId")String transferId);
     List<TOrderNewBo> selectUsedOrderByOrder(String orderNo);

+ 12 - 6
src/main/java/com/goafanti/common/mapper/PatentNewMapper.xml

@@ -475,7 +475,10 @@
 			and b.name like concat('%',#{aname},'%')
 		</if>
 		<if test="depName != null">
-			and tm.dep_name  = #{depName}
+			and tm.dep_name  in
+			<foreach close=")" collection="depName" item="deps" open="(" separator=",">
+				#{deps}
+			</foreach>
 		</if>
 		<if test="inputDep != null">
 			and ia.department_id in
@@ -485,8 +488,8 @@
 		</if>
 		<if test="followDep != null">
 			and b.department_id  in
-			<foreach close=")" collection="followDep" item="f" open="(" separator=",">
-				#{f}
+			<foreach close=")" collection="followDep" item="deps" open="(" separator=",">
+				#{deps}
 			</foreach>
 		</if>
 		<if test="salesmanRemind !=null">
@@ -546,7 +549,10 @@
 			and b.name like concat('%',#{aname},'%')
 		</if>
 		<if test="depName != null">
-			and tm.dep_name  = #{depName}
+			and tm.dep_name  in
+			<foreach close=")" collection="depName" item="deps" open="(" separator=",">
+				#{deps}
+			</foreach>
 		</if>
 		<if test="inputDep != null">
 			and ia.department_id in
@@ -556,8 +562,8 @@
 		</if>
 		<if test="followDep != null">
 			and b.department_id  in
-			<foreach close=")" collection="followDep" item="f" open="(" separator=",">
-				#{f}
+			<foreach close=")" collection="followDep" item="deps" open="(" separator=",">
+				#{deps}
 			</foreach>
 		</if>
 		<if test="salesmanRemind !=null">

+ 5 - 2
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1478,8 +1478,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     <if test="o.orderStatus != null and o.orderStatus != &quot;&quot;">
       and (o.order_status >=  #{o.orderStatus,jdbcType=INTEGER} or o.back_status=3)
     </if>
-    <if test="o.departmentId != null and o.departmentId != &quot;&quot;">
-      and o.order_dep = #{o.departmentId,jdbcType=INTEGER}
+    <if test="deps !=null">
+      and o.order_dep in
+      <foreach close=")" collection="deps" item="depId" open="(" separator=",">
+        #{depId}
+      </foreach>
     </if>
     <if test="o.contractNo != null and o.contractNo != &quot;&quot;">
       and o.contract_no like CONCAT('%',#{o.contractNo,jdbcType=VARCHAR},'%')

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

@@ -162,12 +162,14 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		}
 		if (order.getOutsource()==null)order.setOutsource(0);//默认非外包
 		params.put("o", order);
+		List<String> listDep=null;
 		if (order.getDeps()!=null){
-			params.put("deps", departmentService.parseArray(order.getDeps()));
+			listDep=departmentService.parseArray(order.getDeps());
+			params.put("deps", listDep);
 		}
 		Pagination<OrderListBo> data = (Pagination<OrderListBo>)findPage("financeList", "financeCount", params, pageNo, pageSize);
 		result.put("pagination", data);
-		Map<String, Object> count = tOrderNewMapper.countTotalAndActually(order,fids);
+		Map<String, Object> count = tOrderNewMapper.countTotalAndActually(order,fids,listDep);
 		result.put("count", count);
 		return result;
 	}

+ 1 - 1
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -227,7 +227,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 		if(p.getCreateEnds()!=null)params.put("createEnds", p.getCreateEnds()+" 23:59:59");
 		if(p.getType()!=null)params.put("type", p.getType());
 		if(p.getDepName()!=null){
-			params.put("depName",  p.getDepName());
+			params.put("depName",  departmentService.parseArray(p.getDepName()));
 		}
 		if(p.getAnnualFeeStatus()!=null)params.put("annualFeeStatus", p.getAnnualFeeStatus());
 		if(p.getUserName()!=null)params.put("userName", p.getUserName());