Browse Source

部门接口BUG修复

anderx 3 years ago
parent
commit
edd8a1c958

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

@@ -657,9 +657,7 @@
 	<if test="type !=null">
 	and a.`type`= #{type,jdbcType=INTEGER}
 	</if>
-	<if test="financeId !=null">
-	and e.finance_id= #{financeId,jdbcType=VARCHAR}
-	</if>
+
 	<if test="orderNo !=null">
 	and a.order_no = #{orderNo,jdbcType=VARCHAR}
 	</if>
@@ -706,9 +704,6 @@
 	<if test="type !=null">
 	and a.`type`= #{type,jdbcType=INTEGER}
 	</if>
-	<if test="financeId !=null">
-	and e.finance_id= #{financeId,jdbcType=VARCHAR}
-	</if>
 	<if test="orderNo !=null">
 	and a.order_no = #{orderNo,jdbcType=VARCHAR}
 	</if>

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

@@ -132,7 +132,6 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
 		List<String> aDep=new ArrayList<>();
 		//财务专员查看自己的
 		if (TokenManager.hasRole(AFTConstants.FINANCE)) {
-			params.put("financeId", TokenManager.getAdminId());
 			aDep.addAll(departmentService.getFinanceDep(TokenManager.getAdminId()));
 		}
 		//财务经理
@@ -144,6 +143,11 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
 			aDep.addAll(departmentService.selectMyDeps());
 
 		}
+		if (TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)) {
+			if (o.getDeps()!=null){
+				aDep.addAll(departmentService.parseArray(o.getDeps()));
+			}
+		}
 		if(o.getDeps()==null){
 			if (!aDep.isEmpty()){
 				params.put("deps", aDep);