更新运营商的判断
This commit is contained in:
parent
1fddd7ad7a
commit
6c97020b06
@ -34,9 +34,11 @@ public class XhpcClearingBankController extends BaseController {
|
||||
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
startPage();
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("status", status);
|
||||
params.put("operatorId", loginUser.getSysUser().getOperatorId());
|
||||
return getDataTable(bankService.getPage(params));
|
||||
}
|
||||
|
||||
@ -68,6 +70,11 @@ public class XhpcClearingBankController extends BaseController {
|
||||
public R insertDomain(HttpServletRequest request, @RequestBody XhpcClearingBankDomain domain) {
|
||||
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
|
||||
if(domain.getOperatorId() == null){
|
||||
domain.setOperatorId(loginUser.getSysUser().getOperatorId());
|
||||
}
|
||||
|
||||
domain.setCreateBy(loginUser.getUserid().toString());
|
||||
domain.setUpdateBy(loginUser.getUserid().toString());
|
||||
domain.setTenantId(loginUser.getTenantId());
|
||||
|
||||
@ -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.utils.StringUtils;
|
||||
import com.xhpc.common.core.web.controller.BaseController;
|
||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||
import com.xhpc.common.log.annotation.Log;
|
||||
@ -40,6 +41,10 @@ public class XhpcClearingCheckoutController extends BaseController {
|
||||
String endTime) {
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
startPage();
|
||||
if (StringUtils.isEmpty(operatorId)) {
|
||||
operatorId = loginUser.getSysUser().getOperatorId().toString();
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("status", status);
|
||||
@ -73,6 +78,10 @@ public class XhpcClearingCheckoutController extends BaseController {
|
||||
domain.setUpdateBy(loginUser.getUserid().toString());
|
||||
domain.setTenantId(loginUser.getTenantId());
|
||||
|
||||
if (domain.getOperatorId() == null || domain.getOperatorId() == 0){
|
||||
domain.setOperatorId(loginUser.getSysUser().getOperatorId());
|
||||
}
|
||||
|
||||
return R.ok(checkoutService.insertDomain(domain));
|
||||
}
|
||||
|
||||
@ -116,8 +125,13 @@ public class XhpcClearingCheckoutController extends BaseController {
|
||||
|
||||
|
||||
@GetMapping("/getListPage")
|
||||
public TableDataInfo getListPage(String phone, String transactionNumber, @RequestParam("status") Integer status, String chargingStationName, Long operatorId, Integer source, String beginStartTime, String beginEndTime, @RequestParam("userId") Long userId, Integer type,
|
||||
public TableDataInfo getListPage(HttpServletRequest request, String phone, String transactionNumber, @RequestParam("status") Integer status, String chargingStationName, Long operatorId, Integer source, String beginStartTime, String beginEndTime, @RequestParam("userId") Long userId, Integer type,
|
||||
String affiliationOrganization, String evcsOrderNo, String plateNum, Integer internetId, String internetSerialNumber, String terminalName, String vinCode, String overStartTime, String overEndTime, Long personnelId, Integer confirmResult, Integer checkoutId) {
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
if(operatorId == null || operatorId == 0){
|
||||
operatorId = loginUser.getSysUser().getOperatorId();
|
||||
}
|
||||
|
||||
List<Map<String, Object>> listPage = checkoutService.getListPage(phone, transactionNumber, status, chargingStationName, operatorId, source, beginStartTime, beginEndTime, userId, type, affiliationOrganization, evcsOrderNo, plateNum, internetId, internetSerialNumber, terminalName, vinCode, overStartTime, overEndTime, personnelId, confirmResult, checkoutId);
|
||||
return getDataTable(listPage);
|
||||
}
|
||||
|
||||
@ -41,10 +41,13 @@ public class XhpcClearingHistoryOrderController extends BaseController {
|
||||
String internetName,
|
||||
String operatorId,
|
||||
String stationId) {
|
||||
// LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
startPage();
|
||||
if(StringUtils.isEmpty(operatorId)){
|
||||
operatorId = loginUser.getSysUser().getOperatorId().toString();
|
||||
}
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
// params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("startTime", startTime);
|
||||
params.put("endTime", endTime);
|
||||
params.put("orderNo", orderNo);
|
||||
@ -78,6 +81,9 @@ public class XhpcClearingHistoryOrderController extends BaseController {
|
||||
String stationId,
|
||||
String orderIds) throws IOException {
|
||||
LoginUser loginUser = logUserUtils.getLogUser(request);
|
||||
if(StringUtils.isEmpty(operatorId)){
|
||||
operatorId = loginUser.getSysUser().getOperatorId().toString();
|
||||
}
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
params.put("startTime", startTime);
|
||||
@ -100,10 +106,10 @@ public class XhpcClearingHistoryOrderController extends BaseController {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
if(StringUtils.isEmpty(operatorId)){
|
||||
params.put("operatorId", loginUser.getSysUser().getOperatorId());
|
||||
}else {
|
||||
params.put("operatorId", operatorId);
|
||||
operatorId = loginUser.getSysUser().getOperatorId().toString();
|
||||
}
|
||||
params.put("operatorId", operatorId);
|
||||
|
||||
if(params.get("operatorId") == null){
|
||||
throw new CustomException("缺少运营商ID");
|
||||
}
|
||||
@ -118,10 +124,9 @@ public class XhpcClearingHistoryOrderController extends BaseController {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("tenantId", loginUser.getTenantId());
|
||||
if(StringUtils.isEmpty(operatorId)){
|
||||
params.put("operatorId", loginUser.getSysUser().getOperatorId());
|
||||
}else {
|
||||
params.put("operatorId", operatorId);
|
||||
operatorId = loginUser.getSysUser().getOperatorId().toString();
|
||||
}
|
||||
params.put("operatorId", operatorId);
|
||||
|
||||
if(params.get("operatorId") == null){
|
||||
throw new CustomException("缺少运营商ID");
|
||||
|
||||
@ -0,0 +1,160 @@
|
||||
package com.xhpc.activity.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class XhpcOperatorDomain {
|
||||
/**
|
||||
* 运营商id
|
||||
*/
|
||||
private Long operatorId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
private String contactName;
|
||||
|
||||
/**
|
||||
* 联系人电话
|
||||
*/
|
||||
private String contactPhone;
|
||||
|
||||
/**
|
||||
* 手机号(账号)
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 运营商属性
|
||||
*/
|
||||
private Integer attribute;
|
||||
|
||||
|
||||
/**
|
||||
* 税号
|
||||
*/
|
||||
private String dutyParagraph;
|
||||
|
||||
|
||||
/**
|
||||
* 开户行
|
||||
*/
|
||||
private String openBank;
|
||||
|
||||
/**
|
||||
* 卡号
|
||||
*/
|
||||
private String cardNumber;
|
||||
|
||||
/**
|
||||
* 地址code
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
private String detailedAddress;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 提成类型(0总金额提成 1服务费提成)
|
||||
*/
|
||||
private Integer commissionType;
|
||||
|
||||
/**
|
||||
* 平台提成
|
||||
*/
|
||||
private Double platformCommissionRate;
|
||||
|
||||
/**
|
||||
* 运维提成
|
||||
*/
|
||||
private Double maintenanceCommissionRate;
|
||||
|
||||
/**
|
||||
* 营业执照id
|
||||
*/
|
||||
private String businessLicenseId;
|
||||
|
||||
/**
|
||||
* 提现时间(tn)
|
||||
*/
|
||||
private Integer withdrawalTime;
|
||||
|
||||
/**
|
||||
* 设置充电终止的soc
|
||||
*/
|
||||
private String soc;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 对接第三方平台及监管平台的operatorId
|
||||
*/
|
||||
private String operatorIdEvcs;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
private Long roleId;
|
||||
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.xhpc.activity.mapper;
|
||||
|
||||
import com.xhpc.activity.domain.XhpcOperatorDomain;
|
||||
import com.xhpc.activity.domain.XhpcTradebillInternetCheckRecordDomain;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 运营商信息 数据层
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface XhpcOperatorMapper {
|
||||
|
||||
XhpcOperatorDomain selectByPrimaryKey(Long id);
|
||||
|
||||
}
|
||||
@ -1,7 +1,9 @@
|
||||
package com.xhpc.activity.service.impl;
|
||||
|
||||
import com.xhpc.activity.domain.XhpcClearingBankDomain;
|
||||
import com.xhpc.activity.domain.XhpcOperatorDomain;
|
||||
import com.xhpc.activity.mapper.XhpcClearingBankMapper;
|
||||
import com.xhpc.activity.mapper.XhpcOperatorMapper;
|
||||
import com.xhpc.activity.service.XhpcClearingBankService;
|
||||
import com.xhpc.common.api.SmsService;
|
||||
import com.xhpc.common.core.exception.CustomException;
|
||||
@ -24,6 +26,9 @@ public class XhpcClearingBankServiceImpl implements XhpcClearingBankService {
|
||||
@Resource
|
||||
XhpcClearingBankMapper bankMapper;
|
||||
|
||||
@Resource
|
||||
XhpcOperatorMapper operatorMapper;
|
||||
|
||||
@Resource
|
||||
SmsService smsService;
|
||||
|
||||
@ -64,6 +69,16 @@ public class XhpcClearingBankServiceImpl implements XhpcClearingBankService {
|
||||
throw new CustomException("短信验证码错误,请重试");
|
||||
}
|
||||
|
||||
XhpcOperatorDomain operatorDomain = operatorMapper.selectByPrimaryKey(domain.getOperatorId());
|
||||
if(operatorDomain == null){
|
||||
throw new CustomException("运营商ID是:" + domain.getOperatorId() + " 的运营商不存在");
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(domain.getOperatorName())){
|
||||
domain.setOperatorName(operatorDomain.getName());
|
||||
domain.setOperatorAccount(operatorDomain.getName());
|
||||
}
|
||||
|
||||
bankMapper.deleteLogicByOperatorId(domain.getOperatorId());
|
||||
return bankMapper.insert(domain) > 0;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user