更新对账单增加租户的条件

This commit is contained in:
panshuling321 2022-05-10 17:36:43 +08:00
parent d9b223cbe3
commit 4dd1e166fe
11 changed files with 101 additions and 52 deletions

View File

@ -3,14 +3,18 @@ package com.xhpc.activity.controller;
import com.xhpc.activity.domain.XhpcTradebillInternetCheckRecordDomain; import com.xhpc.activity.domain.XhpcTradebillInternetCheckRecordDomain;
import com.xhpc.activity.service.InternetBillService; import com.xhpc.activity.service.InternetBillService;
import com.xhpc.common.core.utils.StringUtils;
import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.controller.BaseController;
import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.core.web.page.TableDataInfo;
import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.annotation.Log;
import com.xhpc.common.log.enums.BusinessType; import com.xhpc.common.log.enums.BusinessType;
import com.xhpc.common.util.LogUserUtils;
import com.xhpc.system.api.model.LoginUser;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -23,6 +27,8 @@ public class XhpcTradebillInternetBillController extends BaseController {
@Resource @Resource
InternetBillService internetBillService; InternetBillService internetBillService;
@Resource
LogUserUtils logUserUtils;
@GetMapping("/checkList/{uploadId}") @GetMapping("/checkList/{uploadId}")
public AjaxResult getCheckList(@RequestParam(required = false) Integer uploadId, public AjaxResult getCheckList(@RequestParam(required = false) Integer uploadId,
@ -42,7 +48,7 @@ public class XhpcTradebillInternetBillController extends BaseController {
@GetMapping("/checkPage") @GetMapping("/checkPage")
public TableDataInfo getCheckPage( public TableDataInfo getCheckPage(HttpServletRequest request,
@RequestParam(required = false) String tenantId, @RequestParam(required = false) String tenantId,
@RequestParam(required = false) Long operatorId, @RequestParam(required = false) Long operatorId,
@RequestParam(required = false) Long chargingStationId, @RequestParam(required = false) Long chargingStationId,
@ -51,6 +57,10 @@ public class XhpcTradebillInternetBillController extends BaseController {
@RequestParam(required = false) String station, @RequestParam(required = false) String station,
@RequestParam(required = false) String internetName, @RequestParam(required = false) String internetName,
@RequestParam(required = false) Integer status){ @RequestParam(required = false) Integer status){
LoginUser loginUser = logUserUtils.getLogUser(request);
if (StringUtils.isEmpty(tenantId)){
tenantId = loginUser.getTenantId();
}
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("tenantId", tenantId); params.put("tenantId", tenantId);
@ -61,14 +71,13 @@ public class XhpcTradebillInternetBillController extends BaseController {
params.put("stationName", station); params.put("stationName", station);
params.put("internetName", internetName); params.put("internetName", internetName);
params.put("status", status); params.put("status", status);
startPage(); startPage();
return getDataTable(internetBillService.getInternetCheckList(params)); return getDataTable(internetBillService.getInternetCheckList(params));
} }
@GetMapping("/statusTotal") @GetMapping("/statusTotal")
public AjaxResult getStatusTotal( public AjaxResult getStatusTotal(HttpServletRequest request,
@RequestParam(required = false) String tenantId, @RequestParam(required = false) String tenantId,
@RequestParam(required = false) Long operatorId, @RequestParam(required = false) Long operatorId,
@RequestParam(required = false) Long chargingStationId, @RequestParam(required = false) Long chargingStationId,
@ -77,6 +86,10 @@ public class XhpcTradebillInternetBillController extends BaseController {
@RequestParam(required = false) String stationName, @RequestParam(required = false) String stationName,
@RequestParam(required = false) String internetName, @RequestParam(required = false) String internetName,
@RequestParam(required = false) Integer status){ @RequestParam(required = false) Integer status){
LoginUser loginUser = logUserUtils.getLogUser(request);
if (StringUtils.isEmpty(tenantId)){
tenantId = loginUser.getTenantId();
}
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("tenantId", tenantId); params.put("tenantId", tenantId);

View File

@ -8,9 +8,12 @@ import com.xhpc.common.core.web.domain.AjaxResult;
import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.common.core.web.page.TableDataInfo;
import com.xhpc.common.log.annotation.Log; import com.xhpc.common.log.annotation.Log;
import com.xhpc.common.log.enums.BusinessType; import com.xhpc.common.log.enums.BusinessType;
import com.xhpc.common.util.LogUserUtils;
import com.xhpc.system.api.model.LoginUser;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -22,6 +25,9 @@ public class XhpcTradebillPaymentBillController extends BaseController {
@Resource @Resource
PaymentBillService paymentBillService; PaymentBillService paymentBillService;
@Resource
LogUserUtils logUserUtils;
@GetMapping("/checkList/{uploadId}") @GetMapping("/checkList/{uploadId}")
public AjaxResult getCheckList(@RequestParam(required = false) Integer uploadId, public AjaxResult getCheckList(@RequestParam(required = false) Integer uploadId,
@ -38,32 +44,35 @@ public class XhpcTradebillPaymentBillController extends BaseController {
@GetMapping("/checkPage") @GetMapping("/checkPage")
public TableDataInfo getCheckPage(@RequestParam(required = false) Integer uploadId, public TableDataInfo getCheckPage(HttpServletRequest request, @RequestParam(required = false) Integer uploadId,
@RequestParam(required = false) String orderNumber, @RequestParam(required = false) String orderNumber,
@RequestParam(required = false) String userId, @RequestParam(required = false) String userId,
@RequestParam(required = false) Integer status){ @RequestParam(required = false) Integer status){
LoginUser loginUser = logUserUtils.getLogUser(request);
startPage(); startPage();
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("uploadId", uploadId); params.put("uploadId", uploadId);
params.put("orderNumber",orderNumber); params.put("orderNumber",orderNumber);
params.put("userId", userId); params.put("userId", userId);
params.put("status", status); params.put("status", status);
params.put("tenantId", loginUser.getTenantId());
return getDataTable(paymentBillService.getPaymentCheckList(params)); return getDataTable(paymentBillService.getPaymentCheckList(params));
} }
@GetMapping("/statusTotal") @GetMapping("/statusTotal")
public AjaxResult getStatusTotal(@RequestParam(required = false) Integer uploadId, public AjaxResult getStatusTotal(HttpServletRequest request, @RequestParam(required = false) Integer uploadId,
@RequestParam(required = false) String orderNumber, @RequestParam(required = false) String orderNumber,
@RequestParam(required = false) String userId, @RequestParam(required = false) String userId,
@RequestParam(required = false) Integer status){ @RequestParam(required = false) Integer status){
LoginUser loginUser = logUserUtils.getLogUser(request);
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("uploadId", uploadId); params.put("uploadId", uploadId);
params.put("orderNumber",orderNumber); params.put("orderNumber",orderNumber);
params.put("userId", userId); params.put("userId", userId);
params.put("status", status); params.put("status", status);
params.put("tenantId", loginUser.getTenantId());
return AjaxResult.success(paymentBillService.getStatusTotal(params)); return AjaxResult.success(paymentBillService.getStatusTotal(params));
} }

View File

@ -115,5 +115,7 @@ public class XhpcTradebillInternetCheckRecordDomain implements Serializable {
private String source; private String source;
private String tenantId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -58,5 +58,7 @@ public class XhpcTradebillPaymentCheckRecordDomain implements Serializable {
private String remark; private String remark;
private String tenantId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -2,6 +2,7 @@ package com.xhpc.activity.service;
import com.xhpc.activity.domain.XhpcTradebillInternetCheckRecordDomain; import com.xhpc.activity.domain.XhpcTradebillInternetCheckRecordDomain;
import com.xhpc.activity.domain.XhpcTradebillUploadRecordDomain;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
@ -17,7 +18,7 @@ public interface InternetBillService {
boolean updateInfoByDomain(XhpcTradebillInternetCheckRecordDomain domain); boolean updateInfoByDomain(XhpcTradebillInternetCheckRecordDomain domain);
Integer insertInternetCheckList(int uploadId, List<XhpcTradebillInternetCheckRecordDomain> internetCheckRecordDomainList); Integer insertInternetCheckList(XhpcTradebillUploadRecordDomain recordDomain, List<XhpcTradebillInternetCheckRecordDomain> internetCheckRecordDomainList);
/** /**

View File

@ -2,6 +2,7 @@ package com.xhpc.activity.service;
import com.xhpc.activity.domain.XhpcTradebillPaymentCheckRecordDomain; import com.xhpc.activity.domain.XhpcTradebillPaymentCheckRecordDomain;
import com.xhpc.activity.domain.XhpcTradebillUploadRecordDomain;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
@ -16,7 +17,7 @@ public interface PaymentBillService {
boolean updateInfoByDomain(XhpcTradebillPaymentCheckRecordDomain domain); boolean updateInfoByDomain(XhpcTradebillPaymentCheckRecordDomain domain);
Integer insertPaymentCheckList(int uploadId, List<XhpcTradebillPaymentCheckRecordDomain> paymentCheckList); Integer insertPaymentCheckList(XhpcTradebillUploadRecordDomain recordDomain, List<XhpcTradebillPaymentCheckRecordDomain> paymentCheckList);
Map<String, Object> getStatusTotal(Map<String, Object> params); Map<String, Object> getStatusTotal(Map<String, Object> params);

View File

@ -55,67 +55,66 @@ public class CommonServiceImpl implements CommonService {
domain.setCheckedCount(0); domain.setCheckedCount(0);
uploadRecordMapper.insertSelective(domain); uploadRecordMapper.insertSelective(domain);
XhpcTradebillUploadRecordDomain resDomain = uploadRecordMapper.selectByUrl(domain.getUrl());
List<XhpcTradebillPaymentCheckRecordDomain> paymentCheckRecordDomainList = null; List<XhpcTradebillPaymentCheckRecordDomain> paymentCheckRecordDomainList = null;
List<XhpcTradebillInternetCheckRecordDomain> recordDomainList = null; List<XhpcTradebillInternetCheckRecordDomain> recordDomainList = null;
Map<String, Integer> totalMap = new HashMap<>(); Map<String, Integer> totalMap = new HashMap<>();
int insertCount = 0; int insertCount = 0;
resDomain.setStatus(2); domain.setStatus(2);
try { try {
switch (domain.getType()) { switch (domain.getType()) {
case 1: case 1:
case 2: case 2:
// 微信支付 // 微信支付
paymentCheckRecordDomainList = paymentBillService.getWechatDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId()); paymentCheckRecordDomainList = paymentBillService.getWechatDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId());
insertCount = paymentBillService.insertPaymentCheckList(resDomain.getId(), paymentCheckRecordDomainList); insertCount = paymentBillService.insertPaymentCheckList(domain, paymentCheckRecordDomainList);
totalMap = computePaymentRecord(paymentCheckRecordDomainList); totalMap = computePaymentRecord(paymentCheckRecordDomainList);
break; break;
case 3: case 3:
case 4: case 4:
// 支付宝支付 // 支付宝支付
paymentCheckRecordDomainList = paymentBillService.getAliPayDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId()); paymentCheckRecordDomainList = paymentBillService.getAliPayDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId());
insertCount = paymentBillService.insertPaymentCheckList(resDomain.getId(), paymentCheckRecordDomainList); insertCount = paymentBillService.insertPaymentCheckList(domain, paymentCheckRecordDomainList);
totalMap = computePaymentRecord(paymentCheckRecordDomainList); totalMap = computePaymentRecord(paymentCheckRecordDomainList);
break; break;
case 5: case 5:
// 恒大 // 恒大
recordDomainList = internetBillService.getHdInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId()); recordDomainList = internetBillService.getHdInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId());
insertCount = internetBillService.insertInternetCheckList(resDomain.getId(), recordDomainList); insertCount = internetBillService.insertInternetCheckList(domain, recordDomainList);
totalMap = computeInternetRecord(recordDomainList); totalMap = computeInternetRecord(recordDomainList);
break; break;
case 6: case 6:
// 小桔 // 小桔
recordDomainList = internetBillService.getXjInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId()); recordDomainList = internetBillService.getXjInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId());
insertCount = internetBillService.insertInternetCheckList(resDomain.getId(), recordDomainList); insertCount = internetBillService.insertInternetCheckList(domain, recordDomainList);
totalMap = computeInternetRecord(recordDomainList); totalMap = computeInternetRecord(recordDomainList);
break; break;
case 7: case 7:
// 新电途 // 新电途
recordDomainList = internetBillService.getXDTInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId()); recordDomainList = internetBillService.getXDTInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId());
insertCount = internetBillService.insertInternetCheckList(resDomain.getId(), recordDomainList); insertCount = internetBillService.insertInternetCheckList(domain, recordDomainList);
totalMap = computeInternetRecord(recordDomainList); totalMap = computeInternetRecord(recordDomainList);
break; break;
case 8: case 8:
// 快电 // 快电
recordDomainList = internetBillService.getKDInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId()); recordDomainList = internetBillService.getKDInternetDataList(domain.getUrl(), domain.getStartTime(), domain.getEndTime(), domain.getTenantId());
insertCount = internetBillService.insertInternetCheckList(resDomain.getId(), recordDomainList); insertCount = internetBillService.insertInternetCheckList(domain, recordDomainList);
totalMap = computeInternetRecord(recordDomainList); totalMap = computeInternetRecord(recordDomainList);
break; break;
default: default:
resDomain.setStatus(1); domain.setStatus(1);
totalMap.put("successCount", 0); totalMap.put("successCount", 0);
totalMap.put("failCount", 0); totalMap.put("failCount", 0);
totalMap.put("checkCount", 0); totalMap.put("checkCount", 0);
totalMap.put("uncheckCount", 0); totalMap.put("uncheckCount", 0);
break; break;
} }
resDomain.setStatus(1); domain.setStatus(1);
resDomain.setSuccessCount(totalMap.get("successCount")); domain.setSuccessCount(totalMap.get("successCount"));
resDomain.setFailCount(totalMap.get("failCount")); domain.setFailCount(totalMap.get("failCount"));
resDomain.setCheckedCount(totalMap.get("checkCount")); domain.setCheckedCount(totalMap.get("checkCount"));
resDomain.setUncheckCount(totalMap.get("uncheckCount")); domain.setUncheckCount(totalMap.get("uncheckCount"));
uploadRecordMapper.updateByPrimaryKey(resDomain); uploadRecordMapper.updateByPrimaryKey(domain);
return resDomain; return domain;
} catch (Exception exception){ } catch (Exception exception){
exception.printStackTrace(); exception.printStackTrace();
throw new CustomException("内部错误"); throw new CustomException("内部错误");

View File

@ -7,6 +7,7 @@ import cn.hutool.core.text.csv.CsvReader;
import cn.hutool.core.text.csv.CsvUtil; import cn.hutool.core.text.csv.CsvUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.poi.excel.ExcelWriter; import cn.hutool.poi.excel.ExcelWriter;
import com.xhpc.activity.domain.XhpcTradebillUploadRecordDomain;
import com.xhpc.common.core.exception.CustomException; import com.xhpc.common.core.exception.CustomException;
import com.xhpc.common.core.utils.SecurityUtils; import com.xhpc.common.core.utils.SecurityUtils;
import com.xhpc.common.core.utils.poi.ExcelUtil; import com.xhpc.common.core.utils.poi.ExcelUtil;
@ -66,11 +67,12 @@ public class InternetBillServiceImpl implements InternetBillService {
@Override @Override
public Integer insertInternetCheckList(int uploadId, List<XhpcTradebillInternetCheckRecordDomain> internetCheckRecordDomainList) { public Integer insertInternetCheckList(XhpcTradebillUploadRecordDomain recordDomain, List<XhpcTradebillInternetCheckRecordDomain> internetCheckRecordDomainList) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();
for (XhpcTradebillInternetCheckRecordDomain domain : internetCheckRecordDomainList) { for (XhpcTradebillInternetCheckRecordDomain domain : internetCheckRecordDomainList) {
domain.setUploadId(uploadId); domain.setUploadId(recordDomain.getId());
domain.setTenantId(recordDomain.getTenantId());
domain.setCreateBy(userId); domain.setCreateBy(userId);
domain.setUpdateBy(userId); domain.setUpdateBy(userId);
} }

View File

@ -9,6 +9,7 @@ import cn.hutool.core.text.csv.CsvUtil;
import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.CharsetUtil;
import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.ExcelWriter; import cn.hutool.poi.excel.ExcelWriter;
import com.xhpc.activity.domain.XhpcTradebillUploadRecordDomain;
import com.xhpc.common.core.exception.CustomException; import com.xhpc.common.core.exception.CustomException;
import com.xhpc.common.core.utils.SecurityUtils; import com.xhpc.common.core.utils.SecurityUtils;
import com.xhpc.activity.domain.XhpcTradebillPaymentCheckRecordDomain; import com.xhpc.activity.domain.XhpcTradebillPaymentCheckRecordDomain;
@ -63,11 +64,12 @@ public class PaymentBillServiceImpl implements PaymentBillService {
@Override @Override
public Integer insertPaymentCheckList(int uploadId, List<XhpcTradebillPaymentCheckRecordDomain> paymentCheckList) { public Integer insertPaymentCheckList(XhpcTradebillUploadRecordDomain recordDomain, List<XhpcTradebillPaymentCheckRecordDomain> paymentCheckList) {
Long userId = SecurityUtils.getUserId(); Long userId = SecurityUtils.getUserId();
for (XhpcTradebillPaymentCheckRecordDomain domain : paymentCheckList) { for (XhpcTradebillPaymentCheckRecordDomain domain : paymentCheckList) {
domain.setUploadId(uploadId); domain.setUploadId(recordDomain.getId());
domain.setTenantId(recordDomain.getTenantId());
domain.setCreateBy(userId); domain.setCreateBy(userId);
domain.setUpdateBy(userId); domain.setUpdateBy(userId);
} }

View File

@ -39,6 +39,7 @@
<result column="internet_pay_amount" jdbcType="DECIMAL" property="internetPayAmount"/> <result column="internet_pay_amount" jdbcType="DECIMAL" property="internetPayAmount"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="status" jdbcType="SMALLINT" property="status"/> <result column="status" jdbcType="SMALLINT" property="status"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, create_time, create_by, update_time, update_by, upload_id, history_order_no, id, create_time, create_by, update_time, update_by, upload_id, history_order_no,
@ -48,7 +49,7 @@
platform_discount_amount, platform_pay_amount, internet_serial_number, internet_charge_station, platform_discount_amount, platform_pay_amount, internet_serial_number, internet_charge_station,
internet_start_soc, internet_end_soc, internet_charging_degree, internet_charging_time, internet_start_time, internet_start_soc, internet_end_soc, internet_charging_degree, internet_charging_time, internet_start_time,
internet_end_time, internet_order_amount, internet_power_amount, internet_server_amount, internet_discount_amount, internet_end_time, internet_order_amount, internet_power_amount, internet_server_amount, internet_discount_amount,
internet_pay_amount, remark, `status` internet_pay_amount, remark, `status`, tenant_id
</sql> </sql>
<select id="selectByParams" resultType="java.util.Map"> <select id="selectByParams" resultType="java.util.Map">
@ -114,26 +115,27 @@
<select id="selectTotalGroupbyStatus" resultType="java.util.Map"> <select id="selectTotalGroupbyStatus" resultType="java.util.Map">
select select
status, count(id) as 'total' xticr.status, count(xticr.id) as 'total'
from xhpc_tradebill_internet_check_record from xhpc_tradebill_internet_check_record xticr
left join xhpc_history_order xho on xho.history_order_id=xticr.history_order_no
<where> <where>
<if test="params.uploadId != null and params.upload!='' and params.uploadId !=0"> <if test="params.uploadId != null and params.upload!='' and params.uploadId !=0">
and upload_id = #{params.uploadId} and xticr.upload_id = #{params.uploadId}
</if> </if>
<if test="params.orderNumber != null and params.orderNumber!=''"> <if test="params.orderNumber != null and params.orderNumber!=''">
and internet_serial_number like concat('%',#{params.orderNumber}, '%') and xticr.internet_serial_number like concat('%',#{params.orderNumber}, '%')
</if> </if>
<if test="params.stationName != null and params.stationName!=''"> <if test="params.stationName != null and params.stationName!=''">
and internet_charge_station like concat('%', #{params.internetName},'%') and xticr.internet_charge_station like concat('%', #{params.internetName},'%')
</if> </if>
<if test="params.internetName != null and params.internetName!=''"> <if test="params.internetName != null and params.internetName!=''">
and internet_name like concat('%', #{params.internetName}, '%') and xticr.internet_name like concat('%', #{params.internetName}, '%')
</if> </if>
<if test="params.status != null and params.status!=''"> <if test="params.status != null and params.status!=''">
and status = #{params.status} and xticr.status = #{params.status}
</if> </if>
<if test="params.tenantId != null and params.tenantId!=''"> <if test="params.tenantId != null and params.tenantId!=''">
and p.tenant_id = #{params.tenantId} and xticr.tenant_id = #{params.tenantId}
</if> </if>
<if test="params.operatorId != null "> <if test="params.operatorId != null ">
and xho.charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{params.operatorId}) and xho.charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{params.operatorId})
@ -145,7 +147,7 @@
and xho.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{params.logOperatorId}) and xho.charging_station_id in (select charging_station_id from xhpc_user_privilege where user_id=#{params.logOperatorId})
</if> </if>
</where> </where>
group by status group by xticr.status
</select> </select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@ -178,7 +180,7 @@
internet_start_time, internet_end_time, internet_order_amount, internet_start_time, internet_end_time, internet_order_amount,
internet_power_amount, internet_server_amount, internet_power_amount, internet_server_amount,
internet_discount_amount, internet_discount_amount,
internet_pay_amount, remark, `status`) internet_pay_amount, remark, `status`, tenant_id)
values (now(), #{createBy}, now(), values (now(), #{createBy}, now(),
#{updateBy}, #{uploadId}, #{historyOrderNo}, #{updateBy}, #{uploadId}, #{historyOrderNo},
#{userId}, #{internetName}, #{userId}, #{internetName},
@ -197,7 +199,7 @@
#{internetOrderAmount}, #{internetOrderAmount},
#{internetPowerAmount}, #{internetServerAmount}, #{internetPowerAmount}, #{internetServerAmount},
#{internetDiscountAmount}, #{internetDiscountAmount},
#{internetPayAmount}, #{remark}, #{status,jdbcType=SMALLINT}) #{internetPayAmount}, #{remark}, #{status,jdbcType=SMALLINT}, #{tenantId})
</insert> </insert>
<insert id="insertCheckList" keyColumn="id" keyProperty="id" <insert id="insertCheckList" keyColumn="id" keyProperty="id"
@ -215,8 +217,7 @@
internet_end_soc, internet_charging_degree, internet_charging_time, internet_end_soc, internet_charging_degree, internet_charging_time,
internet_start_time, internet_end_time, internet_order_amount, internet_start_time, internet_end_time, internet_order_amount,
internet_power_amount, internet_server_amount, internet_discount_amount, internet_power_amount, internet_server_amount, internet_discount_amount,
internet_pay_amount, remark, `status` internet_pay_amount, remark, `status`, tenant_id) values
) values
<foreach collection="list" item="check" index="index" separator=","> <foreach collection="list" item="check" index="index" separator=",">
( (
now(), #{check.createBy}, now(), now(), #{check.createBy}, now(),
@ -239,7 +240,7 @@
#{check.internetPowerAmount}, #{check.internetServerAmount}, #{check.internetPowerAmount}, #{check.internetServerAmount},
#{check.internetDiscountAmount}, #{check.internetDiscountAmount},
#{check.internetPayAmount}, #{check.remark}, #{check.internetPayAmount}, #{check.remark},
#{check.status}) #{check.status}, #{check.tenantId})
</foreach> </foreach>
</insert> </insert>
@ -352,6 +353,9 @@
<if test="status != null"> <if test="status != null">
`status`, `status`,
</if> </if>
<if test="tenantId != null">
tenant_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
now(), now(),
@ -458,6 +462,9 @@
<if test="status != null"> <if test="status != null">
#{status}, #{status},
</if> </if>
<if test="tenantId != null">
#{tenantId},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" <update id="updateByPrimaryKeySelective"

View File

@ -21,11 +21,12 @@
<result column="payment_pay_time" jdbcType="TIMESTAMP" property="paymentPayTime"/> <result column="payment_pay_time" jdbcType="TIMESTAMP" property="paymentPayTime"/>
<result column="status" jdbcType="SMALLINT" property="status"/> <result column="status" jdbcType="SMALLINT" property="status"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, create_time, create_by, update_time, update_by, upload_id, order_type, payment_channel, id, create_time, create_by, update_time, update_by, upload_id, order_type, payment_channel,
platform_order_number, platform_pay_number, platform_user_id, platform_amount, platform_pay_time, platform_order_number, platform_pay_number, platform_user_id, platform_amount, platform_pay_time,
payment_pay_number, payment_user_id, payment_amount, payment_pay_time, `status`, remark payment_pay_number, payment_user_id, payment_amount, payment_pay_time, `status`, remark, tenant_id
</sql> </sql>
@ -73,6 +74,9 @@
<if test="params.status != null and params.status !=''"> <if test="params.status != null and params.status !=''">
and p.status=#{params.status} and p.status=#{params.status}
</if> </if>
<if test="params.tenantId != null and params.tenantId !=''">
and p.tenant_id=#{params.tenantId}
</if>
</where> </where>
order by p.upload_id desc, status asc order by p.upload_id desc, status asc
</select> </select>
@ -91,6 +95,9 @@
<if test="params.paymentPayNumber!=null and params.paymentPayNumber!=''"> <if test="params.paymentPayNumber!=null and params.paymentPayNumber!=''">
and payment_pay_number like concat('%', #{params.orderNumber},'%') and payment_pay_number like concat('%', #{params.orderNumber},'%')
</if> </if>
<if test="params.tenantId!=null and params.tenantId!=''">
and tenant_id=#{params.tenantId}
</if>
</where> </where>
group by status group by status
</select> </select>
@ -116,7 +123,7 @@
payment_channel, platform_order_number, platform_pay_number, payment_channel, platform_order_number, platform_pay_number,
platform_user_id, platform_amount, platform_pay_time, platform_user_id, platform_amount, platform_pay_time,
payment_pay_number, payment_user_id, payment_amount, payment_pay_number, payment_user_id, payment_amount,
payment_pay_time, `status`, remark) payment_pay_time, `status`, remark, tenant_id)
values (now(), #{createBy}, now(), values (now(), #{createBy}, now(),
#{updateBy}, #{uploadId}, #{orderType}, #{updateBy}, #{uploadId}, #{orderType},
#{paymentChannel}, #{platformOrderNumber}, #{paymentChannel}, #{platformOrderNumber},
@ -125,7 +132,7 @@
#{platformPayTime}, #{platformPayTime},
#{paymentPayNumber}, #{paymentUserId}, #{paymentPayNumber}, #{paymentUserId},
#{paymentAmount}, #{paymentAmount},
#{paymentPayTime}, #{status}, #{remark}) #{paymentPayTime}, #{status}, #{remark}, #{tenantId})
</insert> </insert>
<insert id="insertCheckList" keyColumn="id" keyProperty="id" <insert id="insertCheckList" keyColumn="id" keyProperty="id"
@ -135,10 +142,9 @@
payment_channel, platform_order_number, platform_pay_number, payment_channel, platform_order_number, platform_pay_number,
platform_user_id, platform_amount, platform_pay_time, platform_user_id, platform_amount, platform_pay_time,
payment_pay_number, payment_user_id, payment_amount, payment_pay_number, payment_user_id, payment_amount,
payment_pay_time, `status`, remark) values payment_pay_time, `status`, remark, tenant_id) values
<foreach collection="list" item="check" index="index" separator=","> <foreach collection="list" item="check" index="index" separator=",">
( (now(), #{check.createBy}, now(),
now(), #{check.createBy}, now(),
#{check.updateBy}, #{check.uploadId}, #{check.updateBy}, #{check.uploadId},
#{check.orderType}, #{check.orderType},
#{check.paymentChannel}, #{check.platformOrderNumber}, #{check.paymentChannel}, #{check.platformOrderNumber},
@ -148,8 +154,7 @@
#{check.paymentPayNumber}, #{check.paymentUserId}, #{check.paymentPayNumber}, #{check.paymentUserId},
#{check.paymentAmount}, #{check.paymentAmount},
#{check.paymentPayTime}, #{check.status}, #{check.paymentPayTime}, #{check.status},
#{check.remark} #{check.remark}, #{check.tenantId})
)
</foreach> </foreach>
</insert> </insert>
@ -208,6 +213,9 @@
<if test="remark != null"> <if test="remark != null">
remark, remark,
</if> </if>
<if test="tenantId != null">
tenant_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
now(), now(),
@ -260,6 +268,9 @@
<if test="remark != null"> <if test="remark != null">
#{remark}, #{remark},
</if> </if>
<if test="tenantId != null">
#{tenantId},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" <update id="updateByPrimaryKeySelective"