Commit b28cf9fe by yinyong

财务审核单筛选更改

parent 775d91b5
......@@ -67,7 +67,9 @@ public class CostCheckSearchController {
String key = request.getParameter("key");
String pageSizeStr = request.getParameter("pageSize");
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);
return map;
}
......@@ -85,6 +87,8 @@ public class CostCheckSearchController {
searchKeysVo.getParams().getKeys().setCostForm(3);
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.put("success",true);
return map;
......
......@@ -17,7 +17,7 @@ public interface CostCheckSearchDao {
* @param key
* @return
*/
List<CostDomain> selectByKey(@Param("key") String key);
List<CostDomain> selectByKey(@Param("key") String key, @Param("authority") String authority);
List<CostDomain> selectByKeys(CostCheckSearchKeysVo searchKeysVo);
......
......@@ -18,7 +18,7 @@ public interface CostCheckSearchService {
* @param key
* @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);
......
......@@ -45,10 +45,10 @@ public class CostCheckSearchServiceImpl implements CostCheckSearchService {
}
@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<>();
PageHelper.startPage(pageNum,pageSize);
List<CostDomain> costDomains = costCheckSearchDao.selectByKey(key);
List<CostDomain> costDomains = costCheckSearchDao.selectByKey(key, authority);
PageInfo<CostDomain> pageInfo = new PageInfo<>(costDomains);
map.put("costs",domainListToDto(costDomains));
map.put("pageInfo",pageInfo);
......
......@@ -16,6 +16,8 @@ public class CostCheckSearchKeysVo {
private Integer pageSize;
public class Keys{
private String authority;
private Integer userId;
private String companyNo;
private Integer costForm;
private String createUsercode;
......@@ -32,6 +34,22 @@ public class CostCheckSearchKeysVo {
private Integer logisticsSupplierId; // 一级物流供应商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() {
return companyNo;
}
......@@ -139,7 +157,9 @@ public class CostCheckSearchKeysVo {
@Override
public String toString() {
return "Keys{" +
"companyNo='" + companyNo + '\'' +
"authority='" + authority + '\'' +
", userId=" + userId +
", companyNo='" + companyNo + '\'' +
", costForm=" + costForm +
", createUsercode='" + createUsercode + '\'' +
", kindNo='" + kindNo + '\'' +
......@@ -147,11 +167,11 @@ public class CostCheckSearchKeysVo {
", lendStatus=" + lendStatus +
", isTax=" + isTax +
", linkCost='" + linkCost + '\'' +
", isLend=" + isLend +
", beginPayTime=" + beginPayTime +
", endPayTime=" + endPayTime +
", logisticsSupplierId=" + logisticsSupplierId +
", subLogisticsSupplierId=" + subLogisticsSupplierId +
", isLend=" + isLend +
'}';
}
}
......
......@@ -38,6 +38,7 @@
OR
company_name LIKE CONCAT('%',#{key},'%')
)
and FIND_IN_SET(company_value, #{authority})
ORDER BY
id DESC
</select>
......@@ -64,6 +65,7 @@
<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.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
id DESC
</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