更新清分的搜索
This commit is contained in:
parent
23a4f56d86
commit
6f46223996
@ -29,14 +29,12 @@ public class WorkDeptController extends BaseController {
|
||||
|
||||
|
||||
@GetMapping("/getPage")
|
||||
public TableDataInfo getPage(HttpServletRequest request,
|
||||
String status) {
|
||||
public TableDataInfo getPage(HttpServletRequest request) {
|
||||
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
startPage();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("status", status);
|
||||
return getDataTable(workDeptService.getPage(params));
|
||||
}
|
||||
|
||||
|
||||
@ -29,14 +29,12 @@ public class WorkUserController extends BaseController {
|
||||
LogUserUtils logUserUtils;
|
||||
|
||||
@GetMapping("/getPage")
|
||||
public TableDataInfo getPage(HttpServletRequest request,
|
||||
String status) {
|
||||
public TableDataInfo getPage(HttpServletRequest request) {
|
||||
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
startPage();
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("status", status);
|
||||
return getDataTable(workUserService.getPage(params));
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import com.xhpc.activity.domain.XhpcClearingCheckoutDomain;
|
||||
import com.xhpc.activity.service.XhpcClearingCheckoutService;
|
||||
import com.xhpc.activity.vo.ClearingReceiptVo;
|
||||
import com.xhpc.common.core.domain.R;
|
||||
import com.xhpc.common.core.exception.CustomException;
|
||||
import com.xhpc.common.core.utils.StringUtils;
|
||||
import com.xhpc.common.core.web.controller.BaseController;
|
||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||
@ -134,6 +135,10 @@ public class XhpcClearingCheckoutController extends BaseController {
|
||||
@PostMapping("/importReceipt")
|
||||
public R importReceipt(HttpServletRequest request, @RequestBody ClearingReceiptVo receiptVo) throws Exception {
|
||||
|
||||
if(StringUtils.isEmpty(receiptVo.getFile()) || receiptVo.getReceiptList().size() < 1){
|
||||
throw new CustomException("Excel文件和回执图片必传");
|
||||
}
|
||||
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
receiptVo.setCreateBy(loginUser.getUserid().toString());
|
||||
return R.ok(checkoutService.insertReceipt(receiptVo));
|
||||
|
||||
@ -101,7 +101,13 @@ public class XhpcClearingHistoryOrderController extends BaseController {
|
||||
|
||||
// ============================== 清分 ============================
|
||||
@GetMapping("/getOrderPage")
|
||||
public TableDataInfo getOrderPage(HttpServletRequest request, String operatorId){
|
||||
public TableDataInfo getOrderPage(HttpServletRequest request, String operatorId,
|
||||
@RequestParam(value = "orderNo", required = false, defaultValue = "") String orderNo,
|
||||
@RequestParam(value = "stationId", required = false, defaultValue = "") String stationId,
|
||||
@RequestParam(value = "source", required = false, defaultValue = "") String source,
|
||||
@RequestParam(value = "startTime", required = false, defaultValue = "") String startTime,
|
||||
@RequestParam(value = "endTime", required = false, defaultValue = "") String endTime,
|
||||
@RequestParam(value = "status", required = false, defaultValue = "") String status){
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
|
||||
@ -109,6 +115,12 @@ public class XhpcClearingHistoryOrderController extends BaseController {
|
||||
operatorId = loginUser.getSysUser().getOperatorId() + "";
|
||||
}
|
||||
params.put("operatorId", operatorId);
|
||||
params.put("orderNo", orderNo);
|
||||
params.put("stationId", stationId);
|
||||
params.put("source", source);
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
params.put("status", status);
|
||||
if(params.get("operatorId") == null || StringUtils.isEmpty(params.get("operatorId").toString()) || "null".equals(params.get("operatorId").toString())){
|
||||
throw new CustomException("运营商ID错误,请登陆运营商账户再试");
|
||||
}
|
||||
|
||||
@ -80,8 +80,8 @@
|
||||
IFNULL(cc1.applyAmount,0) as 'applyAmount',
|
||||
IFNULL(cc2.cashedAmount,0) as 'cashedAmount'
|
||||
from xhpc_operator xo
|
||||
left join (SELECT operator_id, sum(apply_amount) as 'applyAmount' from xhpc_clearing_checkout WHERE `status`=1 and del_flag=0 GROUP BY operator_id) cc1 on xo.operator_id = cc1.operator_id
|
||||
left join (SELECT operator_id, sum(apply_amount) as 'cashedAmount' from xhpc_clearing_checkout WHERE `status`=6 and del_flag=0 GROUP BY operator_id) cc2 on xo.operator_id = cc2.operator_id
|
||||
left join (SELECT operator_id, sum(received_amount) as 'applyAmount' from xhpc_clearing_checkout WHERE `status`=1 and del_flag=0 GROUP BY operator_id) cc1 on xo.operator_id = cc1.operator_id
|
||||
left join (SELECT operator_id, sum(received_amount) as 'cashedAmount' from xhpc_clearing_checkout WHERE `status`=6 and del_flag=0 GROUP BY operator_id) cc2 on xo.operator_id = cc2.operator_id
|
||||
left join xhpc_tenant xt on xo.tenant_id=xt.tenant_id
|
||||
LEFT JOIN (
|
||||
select
|
||||
|
||||
@ -160,6 +160,54 @@
|
||||
<if test="params.operatorId!=null and params.operatorId!=''">
|
||||
and ct.operator_id=#{params.operatorId}
|
||||
</if>
|
||||
<if test="params.orderNo!=null and params.orderNo!=''">
|
||||
and ho.serial_number like concat('%',#{params.orderNo},'%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="params.source != null and params.source ='刷卡'">
|
||||
and ho.charging_mode is null
|
||||
</when>
|
||||
<when test="params.source!=null and params.source !='刷卡' and params.source!=''">
|
||||
and ho.charging_mode =#{params.source}
|
||||
</when>
|
||||
<otherwise>
|
||||
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
<if test="params.stationName!=null and params.stationName!=''">
|
||||
and ct.name =concat('%', #{params.stationName}, '%')
|
||||
</if>
|
||||
<if test="params.stationId!=null and params.stationId!=''">
|
||||
and ct.charging_station_id =#{params.stationId}
|
||||
</if>
|
||||
<if test="params.startTime!=null and params.startTime!=''">
|
||||
and ho.end_time <![CDATA[ >= ]]> #{params.startTime}
|
||||
</if>
|
||||
<if test="params.endTime!= null and params.endTime!=''">
|
||||
and ho.end_time <![CDATA[ <= ]]> #{params.endTime}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="params.status!=null and params.status == '待审核'">
|
||||
and ho.check_status=0 and ho.clearing_checkout_id is null
|
||||
</when>
|
||||
<when test="params.status!=null and params.status == '审核失败'">
|
||||
and ho.check_status=1 and ho.clearing_checkout_id is null
|
||||
</when>
|
||||
<when test="params.status!=null and params.status == '审核成功'">
|
||||
and ho.check_status=2 and ho.clearing_checkout_id is null
|
||||
</when>
|
||||
<when test="params.status!=null and params.status == '待清分'">
|
||||
and ho.check_status=2 and ho.clearing_checkout_id is null
|
||||
</when>
|
||||
<when test="params.status!=null and params.status == '提现中'">
|
||||
and ho.check_status=2 and cc.STATUS = 1
|
||||
</when>
|
||||
<when test="params.status!=null and params.status == '已提现'">
|
||||
and ho.check_status=2 and cc.STATUS = 6
|
||||
</when>
|
||||
</choose>
|
||||
|
||||
GROUP BY ho.`clearing_order_id`
|
||||
ORDER BY FIELD(cc.STATUS, NULL,1,2) ASC, FIELD(ho.check_status,NULL,0,2, 1) asc
|
||||
</select>
|
||||
@ -189,10 +237,10 @@
|
||||
left join xhpc_terminal xt on xt.terminal_id=ho.terminal_id
|
||||
where ho.status =0 and ho.del_flag=0 and ho.check_status=0 and ho.state <![CDATA[ <> ]]> 3
|
||||
<if test="params.startTime!=null and params.startTime!=''">
|
||||
and ho.start_time <![CDATA[ >= ]]> #{params.startTime}
|
||||
and ho.end_time <![CDATA[ >= ]]> #{params.startTime}
|
||||
</if>
|
||||
<if test="params.endTime!= null and params.endTime!=''">
|
||||
and ho.start_time <![CDATA[ <= ]]> #{params.endTime}
|
||||
and ho.end_time <![CDATA[ <= ]]> #{params.endTime}
|
||||
</if>
|
||||
<if test="params.tenantId!=null and params.tenantId !=''">
|
||||
and ct.tenant_id=#{params.tenantId}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user