Commit 363d4103 by huluobin

# fee 搜索

parent 391e1ca5
......@@ -8,12 +8,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blt.other.common.annotation.LoginIgnore;
import com.blt.other.module.cost.dao.CostDao;
import com.blt.other.module.cost.dto.request.CheckCostListReq;
import com.blt.other.module.cost.dto.request.CostQueryPageReq;
import com.blt.other.module.cost.dto.response.*;
import com.blt.other.module.cost.dto.response.GetCostByCostPlanNoResp;
import com.blt.other.module.cost.dto.response.PrintListResp;
import com.blt.other.module.cost.dto.response.UpdateCostResp;
import com.blt.other.module.cost.model.CostDomain;
import com.blt.other.module.cost.service.CostListSearchService;
import com.blt.other.module.cost.service.CostLogService;
import com.blt.other.module.cost.service.CostService;
import com.blt.other.module.cost.service.impl.cost.CostServiceFactory;
......@@ -28,7 +28,6 @@ import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <p>
......@@ -46,12 +45,8 @@ public class CostController {
@Resource
private CostService costService;
@Resource
private CostListSearchService costListSearchService;
@Resource
private CostLogService costLogService;
@Resource
private CostDao costDao;
@Resource
private UnSubmitState unSubmitState;
@Resource
private DepartmentCheckState departmentCheckState;
......@@ -63,21 +58,6 @@ public class CostController {
private HrCheckState hrCheckState;
@Deprecated
@ApiOperation("获取所有费用单")
@GetMapping("/list/getAllCost")
public CostPageResult getAllCost(@RequestParam Integer pageNum,
@RequestParam Integer pageSize,
@RequestParam Integer userId,
@RequestParam(defaultValue = "0", required = false) Integer authType,
@RequestParam(required = false) String projectTypes) {
if (authType != 0) {
userId = null;
}
costService = CostServiceFactory.getCostService();
return costService.getAllCost(pageNum, pageSize, userId, projectTypes);
}
@ApiOperation("获取前端要打印的费用单列表")
@PostMapping("/list/print/list")
public PrintListResp printList(@RequestBody CostListPrintVo costListPrintVo) {
......@@ -91,41 +71,6 @@ public class CostController {
}
@Deprecated
@ApiOperation("搜索")
@PostMapping("/list/search/key")
public GetByKeyResp getByKey(@RequestParam Integer pageNum,
@RequestParam Integer pageSize,
@RequestParam String key) {
costService = CostServiceFactory.getCostService();
return costListSearchService.searchByKey(key, pageNum, pageSize);
}
@Deprecated
@ApiOperation("搜索?")
@PostMapping("/list/search/keys")
public GetByKeyResp getByKeys(@RequestBody CostListSearchKeysVo searchKeysVo) {
costService = CostServiceFactory.getCostService();
if (null != searchKeysVo.getParams().getKeys().getCostForm() && 3 == searchKeysVo.getParams().getKeys().getCostForm()) {
searchKeysVo.getParams().getKeys().setIsLend(1);
}
if (null != searchKeysVo.getParams().getKeys().getCostForm() && 4 == searchKeysVo.getParams().getKeys().getCostForm()) {
searchKeysVo.getParams().getKeys().setCostForm(3);
searchKeysVo.getParams().getKeys().setIsLend(2);
}
return costListSearchService.searchByKeys(searchKeysVo);
}
@Deprecated
@ApiOperation("获取借支单列表")
@GetMapping("/list/search/getLinkCost")
public List<CostDomain> getLinkCost() {
return costListSearchService.getLinkCost();
}
@ApiOperation("分页查询费用单")
@PostMapping("/queryPage")
public CostResult<Page<CostDto>> queryPage(@RequestBody CostQueryPageReq req) {
......@@ -190,17 +135,6 @@ public class CostController {
return resp;
}
@Deprecated
@ApiOperation("获取借支单列表")
@GetMapping("/getAllLendCost")
public GetAllLendCostResp getAllLendCost(@RequestParam Integer createuserid) {
costService = CostServiceFactory.getCostService();
List<CostDto> costDtoList = costDao.selectLinkLendCost(createuserid).stream().map(CostDomain::castToDto).collect(Collectors.toList());
GetAllLendCostResp resp = new GetAllLendCostResp();
resp.setLends(costDtoList);
return resp;
}
@ApiOperation("根据费用计划查询")
@PostMapping("/getCostByCostPlanNo")
......
......@@ -34,7 +34,7 @@ public class CostQueryPageReq extends BaseRequest {
private Integer createUserid;
@ApiModelProperty("费用单状态 0 待提交 1- 待财务审核 2待出纳付款 3被驳回 4已支付 5已作废 6-待部门审核 7-待财务审核 8-待最终审核人审核")
private Integer costStatus;
private String costStatus;
@ApiModelProperty("1 未还 2 部分还款 3 待补差额 4 结清")
private Integer lendStatus;
......@@ -67,6 +67,9 @@ public class CostQueryPageReq extends BaseRequest {
@ApiModelProperty("模糊搜索字段")
private String key;
@ApiModelProperty("费用单-收款/付款人(创建人)")
private String bankCardUser;
private List<String> keys;
}
......@@ -321,7 +321,7 @@
<if test=" req.isLend!=null and req.isLend != ''">and t1.is_lend=#{req.isLend}</if>
<if test=" req.companyNo!=null and req.companyNo != ''">and t1.company_no=#{req.companyNo}</if>
<if test=" req.createUserid!=null ">and t1.create_userid=#{req.createUserid}</if>
<if test=" req.costStatus!=null ">and t1.cost_status=#{req.costStatus}</if>
<if test=" req.costStatus!=null ">and find_in_set(t1.cost_status,#{req.costStatus})</if>
<if test=" req.lendStatus!=null ">and t1.lend_status=#{req.lendStatus}</if>
<if test=" req.isTax!=null ">and t1.is_tax=#{req.isTax}</if>
<if test=" req.isLend!=null ">and t1.is_lend=#{req.isLend}</if>
......@@ -329,40 +329,25 @@
<if test=" req.endTime != null">AND t1.create_time <![CDATA[<=]]>#{req.endTime}</if>
<if test=" req.beginPayTime != null">AND t1.pay_time <![CDATA[>=]]> #{req.beginPayTime}</if>
<if test=" req.endPayTime != null">AND t1.pay_time <![CDATA[<=]]>#{req.endPayTime}</if>
<if test=" req.linkCost!=null and req.linkCost != ''">
and (t1.sup_cost_no=#{req.linkCost} or t1.cost_no=#{req.linkCost})
</if>
<if test=" req.projectTypes!=null and req.projectTypes != ''">and
find_in_set(t1.project_type,#{req.projectTypes})
</if>
<if test=" req.linkCost!=null and req.linkCost != ''">and (t1.sup_cost_no=#{req.linkCost} or t1.cost_no=#{req.linkCost})</if>
<if test=" req.projectTypes!=null and req.projectTypes != ''">and find_in_set(t1.project_type,#{req.projectTypes})</if>
<if test="req.bankCardUser !=null and req.bankCardUser !='' ">and t1.bank_card_user like concat('%',#{req.bankCardUser},'%')</if>
<if test=" req.keys!=null and req.keys.size()>0 ">
and (false
<foreach collection="req.keys" item="key" index="index">
<if test="key != null and key != '' ">
or t1.cost_plan_no = #{key}
</if>
<if test="key != null and key != '' ">or t1.cost_plan_no = #{key}</if>
</foreach>
<foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' ">
or t1.cost_no LIKE CONCAT('%',#{key},'%')
</if>
<if test="key != null and key != '' ">or t1.cost_no LIKE CONCAT('%',#{key},'%')</if>
</foreach>
<foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' ">
or t1.type_name LIKE CONCAT('%',#{key},'%')
</if>
<if test="key != null and key != '' ">or t1.type_name LIKE CONCAT('%',#{key},'%')</if>
</foreach>
<foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' ">
or t1.company_name LIKE CONCAT('%',#{key},'%')
</if>
<if test="key != null and key != '' ">or t1.company_name LIKE CONCAT('%',#{key},'%')</if>
</foreach>
<foreach collection="keys" item="key" index="index">
<if test="key != null and key != '' ">
or t1.bank_card_user LIKE CONCAT('%',#{key},'%')
</if>
<if test="key != null and key != '' ">or t1.bank_card_user LIKE CONCAT('%',#{key},'%')</if>
</foreach>
)
</if>
......
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