Commit b28cf9fe by yinyong

财务审核单筛选更改

parent 775d91b5
...@@ -67,7 +67,9 @@ public class CostCheckSearchController { ...@@ -67,7 +67,9 @@ public class CostCheckSearchController {
String key = request.getParameter("key"); String key = request.getParameter("key");
String pageSizeStr = request.getParameter("pageSize"); String pageSizeStr = request.getParameter("pageSize");
String pageNumStr = request.getParameter("pageNum"); String pageNumStr = request.getParameter("pageNum");
Map<String, Object> map = costCheckSearchService.seachByKey(key,Integer.parseInt(pageNumStr),Integer.parseInt(pageSizeStr)); Integer userId = Integer.valueOf(request.getParameter("userId"));
String authority = costCheckSearchService.findAuthorityByUserid(userId);
Map<String, Object> map = costCheckSearchService.seachByKey(key,Integer.parseInt(pageNumStr),Integer.parseInt(pageSizeStr), authority);
map.put("success",true); map.put("success",true);
return map; return map;
} }
...@@ -85,6 +87,8 @@ public class CostCheckSearchController { ...@@ -85,6 +87,8 @@ public class CostCheckSearchController {
searchKeysVo.getParams().getKeys().setCostForm(3); searchKeysVo.getParams().getKeys().setCostForm(3);
searchKeysVo.getParams().getKeys().setIsLend(2); searchKeysVo.getParams().getKeys().setIsLend(2);
} }
String authority = costCheckSearchService.findAuthorityByUserid(searchKeysVo.getParams().getKeys().getUserId());
searchKeysVo.getParams().getKeys().setAuthority(authority);
Map<String, Object> map = costCheckSearchService.searchByKeys(searchKeysVo); Map<String, Object> map = costCheckSearchService.searchByKeys(searchKeysVo);
map.put("success",true); map.put("success",true);
return map; return map;
......
...@@ -17,7 +17,7 @@ public interface CostCheckSearchDao { ...@@ -17,7 +17,7 @@ public interface CostCheckSearchDao {
* @param key * @param key
* @return * @return
*/ */
List<CostDomain> selectByKey(@Param("key") String key); List<CostDomain> selectByKey(@Param("key") String key, @Param("authority") String authority);
List<CostDomain> selectByKeys(CostCheckSearchKeysVo searchKeysVo); List<CostDomain> selectByKeys(CostCheckSearchKeysVo searchKeysVo);
......
...@@ -18,7 +18,7 @@ public interface CostCheckSearchService { ...@@ -18,7 +18,7 @@ public interface CostCheckSearchService {
* @param key * @param key
* @return * @return
*/ */
Map<String,Object> seachByKey(String key,int pageNum,int pageSize); Map<String,Object> seachByKey(String key,int pageNum,int pageSize, String authority);
List<CostDto> domainListToDto(List<CostDomain> domains); List<CostDto> domainListToDto(List<CostDomain> domains);
......
...@@ -45,10 +45,10 @@ public class CostCheckSearchServiceImpl implements CostCheckSearchService { ...@@ -45,10 +45,10 @@ public class CostCheckSearchServiceImpl implements CostCheckSearchService {
} }
@Override @Override
public Map<String, Object> seachByKey(String key,int pageNum,int pageSize) { public Map<String, Object> seachByKey(String key,int pageNum,int pageSize, String authority) {
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
PageHelper.startPage(pageNum,pageSize); PageHelper.startPage(pageNum,pageSize);
List<CostDomain> costDomains = costCheckSearchDao.selectByKey(key); List<CostDomain> costDomains = costCheckSearchDao.selectByKey(key, authority);
PageInfo<CostDomain> pageInfo = new PageInfo<>(costDomains); PageInfo<CostDomain> pageInfo = new PageInfo<>(costDomains);
map.put("costs",domainListToDto(costDomains)); map.put("costs",domainListToDto(costDomains));
map.put("pageInfo",pageInfo); map.put("pageInfo",pageInfo);
......
...@@ -16,6 +16,8 @@ public class CostCheckSearchKeysVo { ...@@ -16,6 +16,8 @@ public class CostCheckSearchKeysVo {
private Integer pageSize; private Integer pageSize;
public class Keys{ public class Keys{
private String authority;
private Integer userId;
private String companyNo; private String companyNo;
private Integer costForm; private Integer costForm;
private String createUsercode; private String createUsercode;
...@@ -32,6 +34,22 @@ public class CostCheckSearchKeysVo { ...@@ -32,6 +34,22 @@ public class CostCheckSearchKeysVo {
private Integer logisticsSupplierId; // 一级物流供应商ID private Integer logisticsSupplierId; // 一级物流供应商ID
private Integer subLogisticsSupplierId; // 二级物流供应商ID private Integer subLogisticsSupplierId; // 二级物流供应商ID
public String getAuthority() {
return authority;
}
public void setAuthority(String authority) {
this.authority = authority;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getCompanyNo() { public String getCompanyNo() {
return companyNo; return companyNo;
} }
...@@ -139,7 +157,9 @@ public class CostCheckSearchKeysVo { ...@@ -139,7 +157,9 @@ public class CostCheckSearchKeysVo {
@Override @Override
public String toString() { public String toString() {
return "Keys{" + return "Keys{" +
"companyNo='" + companyNo + '\'' + "authority='" + authority + '\'' +
", userId=" + userId +
", companyNo='" + companyNo + '\'' +
", costForm=" + costForm + ", costForm=" + costForm +
", createUsercode='" + createUsercode + '\'' + ", createUsercode='" + createUsercode + '\'' +
", kindNo='" + kindNo + '\'' + ", kindNo='" + kindNo + '\'' +
...@@ -147,11 +167,11 @@ public class CostCheckSearchKeysVo { ...@@ -147,11 +167,11 @@ public class CostCheckSearchKeysVo {
", lendStatus=" + lendStatus + ", lendStatus=" + lendStatus +
", isTax=" + isTax + ", isTax=" + isTax +
", linkCost='" + linkCost + '\'' + ", linkCost='" + linkCost + '\'' +
", isLend=" + isLend +
", beginPayTime=" + beginPayTime + ", beginPayTime=" + beginPayTime +
", endPayTime=" + endPayTime + ", endPayTime=" + endPayTime +
", logisticsSupplierId=" + logisticsSupplierId + ", logisticsSupplierId=" + logisticsSupplierId +
", subLogisticsSupplierId=" + subLogisticsSupplierId + ", subLogisticsSupplierId=" + subLogisticsSupplierId +
", isLend=" + isLend +
'}'; '}';
} }
} }
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
OR OR
company_name LIKE CONCAT('%',#{key},'%') company_name LIKE CONCAT('%',#{key},'%')
) )
and FIND_IN_SET(company_value, #{authority})
ORDER BY ORDER BY
id DESC id DESC
</select> </select>
...@@ -64,6 +65,7 @@ ...@@ -64,6 +65,7 @@
<if test=" params.keys.logisticsSupplierId != null">and logistics_supplier_id = #{params.keys.logisticsSupplierId}</if> <if test=" params.keys.logisticsSupplierId != null">and logistics_supplier_id = #{params.keys.logisticsSupplierId}</if>
<if test=" params.keys.subLogisticsSupplierId != null">and sub_logistics_supplier_id = #{params.keys.subLogisticsSupplierId}</if> <if test=" params.keys.subLogisticsSupplierId != null">and sub_logistics_supplier_id = #{params.keys.subLogisticsSupplierId}</if>
<if test=" params.keys.linkCost!=null and params.keys.linkCost != ''">and sup_cost_no=#{params.keys.linkCost}</if> <if test=" params.keys.linkCost!=null and params.keys.linkCost != ''">and sup_cost_no=#{params.keys.linkCost}</if>
<if test=" params.keys.authority != null">and FIND_IN_SET(company_value, #{params.keys.authority})</if>
ORDER BY ORDER BY
id DESC id DESC
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment