Browse Source

导入网点

v1.0
15989082884@163.com 2 years ago
parent
commit
231b4073ad
  1. 70
      src/main/java/com/qs/serve/modules/bms/controller/BmsChannelController.java
  2. 247
      src/main/java/com/qs/serve/modules/bms/controller/BmsChannelPointController.java
  3. 2
      src/main/java/com/qs/serve/modules/bms/entity/bo/BmsChannel4ExcelBo.java
  4. 96
      src/main/java/com/qs/serve/modules/bms/entity/bo/BmsChannelPoint4ExcelBo.java
  5. 2
      src/main/resources/mapper/bms/BmsChannelPointMapper.xml

70
src/main/java/com/qs/serve/modules/bms/controller/BmsChannelController.java

@ -189,7 +189,7 @@ public class BmsChannelController {
} }
/** /**
* 新增 * 导入
* @param param * @param param
* @return * @return
*/ */
@ -206,7 +206,7 @@ public class BmsChannelController {
if(!StringUtils.hasText(a.getChannelType())){ if(!StringUtils.hasText(a.getChannelType())){
a.setErrorInfo(a.getErrorInfo()+"渠道类型不能为空;"); a.setErrorInfo(a.getErrorInfo()+"渠道类型不能为空;");
} }
if(!StringUtils.hasText(a.getCostFlag())){ if(a.getCostFlag()==null){
a.setErrorInfo(a.getErrorInfo()+"是否可投放费用不能为空;"); a.setErrorInfo(a.getErrorInfo()+"是否可投放费用不能为空;");
} }
}); });
@ -238,33 +238,41 @@ public class BmsChannelController {
/** ------------------------------- 校验新增 ------------------------------------------------ */ /** ------------------------------- 校验新增 ------------------------------------------------ */
if(saveList.size()>0) { if(saveList.size()>0) {
List<String> saveCodes = saveList.stream().filter(a -> StringUtils.hasText(a.getChannelCode())).map(a -> a.getChannelCode()).distinct().collect(Collectors.toList()); List<String> saveCodes = saveList.stream().filter(a -> StringUtils.hasText(a.getChannelCode())).map(a -> a.getChannelCode()).distinct().collect(Collectors.toList());
LambdaQueryWrapper<BmsChannel> checkSaveChannelCode = new LambdaQueryWrapper<>(); if(saveCodes.size()>0) {
checkSaveChannelCode.in(BmsChannel::getChannelCode, saveCodes); LambdaQueryWrapper<BmsChannel> checkSaveChannelCode = new LambdaQueryWrapper<>();
List<BmsChannel> checkSaveChannelList = bmsChannelService.list(checkSaveChannelCode); checkSaveChannelCode.in(BmsChannel::getChannelCode, saveCodes);
if (checkSaveChannelList.size() > 0) { List<BmsChannel> checkSaveChannelList = bmsChannelService.list(checkSaveChannelCode);
List<String> existSaveCodes = checkSaveChannelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList()); if (checkSaveChannelList.size() > 0) {
param.forEach(a -> { List<String> existSaveCodes = checkSaveChannelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList());
if (a.getType().equals("1")) { param.forEach(a -> {
if (existSaveCodes.contains(a.getChannelCode())) { if (a.getType().equals("1")) {
a.setErrorInfo(a.getErrorInfo() + "新增已存在网点编码;"); if (existSaveCodes.contains(a.getChannelCode())) {
a.setErrorInfo(a.getErrorInfo() + "新增已存在渠道编码;");
}
} }
} });
}); }
} }
} }
/** ----------------------------------------------------------------------------------- */ /** ----------------------------------------------------------------------------------- */
/** ------------------------------- 校验更新 ------------------------------------------------ */ /** ------------------------------- 校验更新 ------------------------------------------------ */
if(updateList.size()>0) { if(updateList.size()>0) {
List<String> updateCheckCodes = updateList.stream().filter(a -> StringUtils.hasText(a.getChannelCode())).map(a -> a.getChannelCode()).distinct().collect(Collectors.toList()); List<String> updateCheckCodes = updateList.stream().filter(a -> StringUtils.hasText(a.getChannelCode())).map(a -> a.getChannelCode()).distinct().collect(Collectors.toList());
LambdaQueryWrapper<BmsChannel> checkUpdateChannelCode = new LambdaQueryWrapper<>(); if(updateCheckCodes.size()==0) {
checkUpdateChannelCode.in(BmsChannel::getChannelCode, updateCheckCodes); param.forEach(a -> {
List<BmsChannel> checkUpdateChannelList = bmsChannelService.list(checkUpdateChannelCode); if (a.getType().equals("2")) {
if (checkUpdateChannelList.size() > 0) { a.setErrorInfo(a.getErrorInfo() + "更新不存在渠道编码;");
}
});
}else {
LambdaQueryWrapper<BmsChannel> checkUpdateChannelCode = new LambdaQueryWrapper<>();
checkUpdateChannelCode.in(BmsChannel::getChannelCode, updateCheckCodes);
List<BmsChannel> checkUpdateChannelList = bmsChannelService.list(checkUpdateChannelCode);
List<String> existSaveCodes = checkUpdateChannelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList()); List<String> existSaveCodes = checkUpdateChannelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList());
param.forEach(a -> { param.forEach(a -> {
if (a.getType().equals("2")) { if (a.getType().equals("2")) {
if (!existSaveCodes.contains(a.getChannelCode())) { if (!existSaveCodes.contains(a.getChannelCode())) {
a.setErrorInfo(a.getErrorInfo() + "更新不存在网点编码;"); a.setErrorInfo(a.getErrorInfo() + "更新不存在渠道编码;");
} }
} }
}); });
@ -274,20 +282,30 @@ public class BmsChannelController {
/** ------------------------------- 删除更新 ------------------------------------------------ */ /** ------------------------------- 删除更新 ------------------------------------------------ */
if(deleteList.size()>0) { if(deleteList.size()>0) {
List<String> deleteCheckCodes = deleteList.stream().filter(a -> StringUtils.hasText(a.getChannelCode())).map(a -> a.getChannelCode()).distinct().collect(Collectors.toList()); List<String> deleteCheckCodes = deleteList.stream().filter(a -> StringUtils.hasText(a.getChannelCode())).map(a -> a.getChannelCode()).distinct().collect(Collectors.toList());
LambdaQueryWrapper<BmsChannel> checkdeleteChannelCode = new LambdaQueryWrapper<>(); if(deleteCheckCodes.size()==0){
checkdeleteChannelCode.in(BmsChannel::getChannelCode, deleteCheckCodes);
List<BmsChannel> checkdeleteChannelList = bmsChannelService.list(checkdeleteChannelCode);
if (checkdeleteChannelList.size() > 0) {
List<String> existSaveCodes = checkdeleteChannelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList());
param.forEach(a -> { param.forEach(a -> {
if (a.getType().equals("3")) { if (a.getType().equals("3")) {
if (!existSaveCodes.contains(a.getChannelCode())) { a.setErrorInfo(a.getErrorInfo() + "删除不存在渠道编码;");
a.setErrorInfo(a.getErrorInfo() + "删除不存在网点编码;");
}
} }
}); });
}else {
LambdaQueryWrapper<BmsChannel> checkdeleteChannelCode = new LambdaQueryWrapper<>();
checkdeleteChannelCode.in(BmsChannel::getChannelCode, deleteCheckCodes);
List<BmsChannel> checkdeleteChannelList = bmsChannelService.list(checkdeleteChannelCode);
if (checkdeleteChannelList.size() > 0) {
List<String> existSaveCodes = checkdeleteChannelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList());
param.forEach(a -> {
if (a.getType().equals("3")) {
if (!existSaveCodes.contains(a.getChannelCode())) {
a.setErrorInfo(a.getErrorInfo() + "删除不存在渠道编码;");
}
}
});
}
} }
} }
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 返回错误 ------------------------------------------- */
if(param.stream().filter(a->a.getErrorInfo().length()>0).count()>0) { if(param.stream().filter(a->a.getErrorInfo().length()>0).count()>0) {
return R.ok(param, "导入失败,请打开EXCEL查询错误详情!"); return R.ok(param, "导入失败,请打开EXCEL查询错误详情!");
} }

247
src/main/java/com/qs/serve/modules/bms/controller/BmsChannelPointController.java

@ -14,9 +14,9 @@ import com.qs.serve.modules.baz.entity.BazVisitInfo;
import com.qs.serve.modules.baz.service.BazVisitInfoService; import com.qs.serve.modules.baz.service.BazVisitInfoService;
import com.qs.serve.modules.bms.common.MasterUserType; import com.qs.serve.modules.bms.common.MasterUserType;
import com.qs.serve.modules.bms.controller.my.BmsChannelPointMyController; import com.qs.serve.modules.bms.controller.my.BmsChannelPointMyController;
import com.qs.serve.modules.bms.entity.BmsChannel; import com.qs.serve.modules.bms.entity.*;
import com.qs.serve.modules.bms.entity.BmsRegion; import com.qs.serve.modules.bms.entity.bo.BmsChannel4ExcelBo;
import com.qs.serve.modules.bms.entity.BmsRegion2; import com.qs.serve.modules.bms.entity.bo.BmsChannelPoint4ExcelBo;
import com.qs.serve.modules.bms.entity.bo.BmsChannelPointBo; import com.qs.serve.modules.bms.entity.bo.BmsChannelPointBo;
import com.qs.serve.modules.bms.entity.bo.BmsChannelPointMapInfoBo; import com.qs.serve.modules.bms.entity.bo.BmsChannelPointMapInfoBo;
import com.qs.serve.modules.bms.entity.so.BmsPointVisitSo; import com.qs.serve.modules.bms.entity.so.BmsPointVisitSo;
@ -34,11 +34,11 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.qs.serve.modules.bms.entity.BmsChannelPoint;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -230,6 +230,243 @@ public class BmsChannelPointController {
return R.isTrue(result); return R.isTrue(result);
} }
/**
* 导入
* @param param
* @return
*/
@PostMapping("/importExcel")
@SysLog(module = SystemModule.BASE, title = "渠道站点", biz = BizType.INSERT)
@PreAuthorize("hasRole('bms:channelPoint:insert')")
public R<?> importExcel(@RequestBody @Valid List<BmsChannelPoint4ExcelBo> param){
param.forEach(a->{
a.setErrorInfo("");
if(!StringUtils.hasText(a.getChannelCode())){
a.setErrorInfo(a.getErrorInfo()+"渠道编码不能为空;");
}
if(!StringUtils.hasText(a.getPointName())){
a.setErrorInfo(a.getErrorInfo()+"网点名称不能为空;");
}
if(!StringUtils.hasText(a.getAddress())){
a.setErrorInfo(a.getErrorInfo()+"网点地址不能为空;");
}
if(!StringUtils.hasText(a.getPointLevel())){
a.setErrorInfo(a.getErrorInfo()+"网点等级不能为空;");
}
if(!StringUtils.hasText(a.getPointType())){
a.setErrorInfo(a.getErrorInfo()+"网点类型不能为空;");
}
if(!StringUtils.hasText(a.getBizRegionCode())){
a.setErrorInfo(a.getErrorInfo()+"行政区域编码不能为空;");
}
if(!StringUtils.hasText(a.getShopArea())){
a.setErrorInfo(a.getErrorInfo()+"店铺面积不能为空;");
}
if(a.getCountCheckstand()==null){
a.setErrorInfo(a.getErrorInfo()+"收银台数量不能为空;");
}
if(a.getCostFlag()==null){
a.setErrorInfo(a.getErrorInfo()+"是否可投放费用不能为空;");
}
});
List<BmsChannelPoint4ExcelBo> saveList = param.stream().filter(a->a.getType().equals("1")).collect(Collectors.toList());
List<BmsChannelPoint4ExcelBo> updateList = param.stream().filter(a->a.getType().equals("2")).collect(Collectors.toList());
List<BmsChannelPoint4ExcelBo> deleteList = param.stream().filter(a->a.getType().equals("3")).collect(Collectors.toList());
/** ------------------------------- 查渠道列表 ------------------------------------------------ */
List<String> channelCodes = new ArrayList<>();
channelCodes.addAll(saveList.stream().filter(a->a.getChannelCode()!=null).map(a->a.getChannelCode()).collect(Collectors.toList()));
channelCodes.addAll(updateList.stream().filter(a->a.getChannelCode()!=null).map(a->a.getChannelCode()).collect(Collectors.toList()));
channelCodes = channelCodes.stream().distinct().collect(Collectors.toList());
List<BmsChannel> channelList = new ArrayList<>();
if(channelCodes.size()>0){
LambdaQueryWrapper<BmsChannel> channelLambdaQueryWrapper = new LambdaQueryWrapper<>();
channelLambdaQueryWrapper.in(BmsChannel::getChannelCode,channelCodes);
channelList = bmsChannelService.list(channelLambdaQueryWrapper);
List<String> existChannelCode = channelList.stream().map(a -> a.getChannelCode()).collect(Collectors.toList());
if(channelList.size()<channelCodes.size()) {
param.forEach(a -> {
if(!existChannelCode.contains(a.getChannelCode())){
a.setErrorInfo(a.getErrorInfo()+"不存在该渠道编码;");
}
});
}
}
Map<String,BmsChannel> codeToChannaledId = channelList.stream().collect(Collectors.toMap(BmsChannel::getChannelCode, a->a));
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 查行政区域列表 ------------------------------------------------ */
List<String> bizRegionCodes = new ArrayList<>();
bizRegionCodes.addAll(saveList.stream().filter(a->a.getBizRegionCode()!=null).map(a->a.getBizRegionCode()).collect(Collectors.toList()));
bizRegionCodes.addAll(updateList.stream().filter(a->a.getBizRegionCode()!=null).map(a->a.getBizRegionCode()).collect(Collectors.toList()));
bizRegionCodes = bizRegionCodes.stream().distinct().collect(Collectors.toList());
List<BmsRegion2> region2List = new ArrayList<>();
if(bizRegionCodes.size()>0){
LambdaQueryWrapper<BmsRegion2> region2LambdaQueryWrapper = new LambdaQueryWrapper<>();
region2LambdaQueryWrapper.in(BmsRegion2::getCode,bizRegionCodes);
region2List = bmsRegion2Service.list(region2LambdaQueryWrapper);
List<String> existRegion2Code = region2List.stream().map(a -> a.getCode()).collect(Collectors.toList());
if(region2List.size()<bizRegionCodes.size()) {
param.forEach(a -> {
if(!existRegion2Code.contains(a.getBizRegionCode())){
a.setErrorInfo(a.getErrorInfo()+"不存在该行政区域编码;");
}
});
}
}
Map<String,BmsRegion2> codeToBizRegion = region2List.stream().collect(Collectors.toMap(BmsRegion2::getCode, a->a));
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 校验新增 ------------------------------------------------ */
if(saveList.size()>0) {
List<String> saveCodes = saveList.stream().filter(a->StringUtils.hasText(a.getPointCode())).map(a->a.getPointCode()).distinct().collect(Collectors.toList());
if(saveCodes.size()>0) {
LambdaQueryWrapper<BmsChannelPoint> checkSavePointCodeLqw = new LambdaQueryWrapper<>();
checkSavePointCodeLqw.in(BmsChannelPoint::getPointCode, saveCodes);
List<BmsChannelPoint> checkSavePointList = bmsChannelPointService.list(checkSavePointCodeLqw);
if (checkSavePointList.size() > 0) {
List<String> existSaveCodes = checkSavePointList.stream().map(a -> a.getPointCode()).collect(Collectors.toList());
param.forEach(a -> {
if (a.getType().equals("1")) {
if (existSaveCodes.contains(a.getPointCode())) {
a.setErrorInfo(a.getErrorInfo() + "新增已存在网点编码;");
}
}
});
}
}
}
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 校验更新 ------------------------------------------------ */
if(updateList.size()>0) {
List<String> updateCheckCodes = updateList.stream().filter(a -> StringUtils.hasText(a.getPointCode())).map(a -> a.getPointCode()).distinct().collect(Collectors.toList());
if(updateCheckCodes.size()==0){
param.forEach(a -> {
if (a.getType().equals("2")) {
a.setErrorInfo(a.getErrorInfo() + "更新不存在网点编码;");
}
});
}else {
LambdaQueryWrapper<BmsChannelPoint> checkUpdategetPointCodeLqw = new LambdaQueryWrapper<>();
checkUpdategetPointCodeLqw.in(BmsChannelPoint::getPointCode, updateCheckCodes);
List<BmsChannelPoint> checkUpdateChannelList = bmsChannelPointService.list(checkUpdategetPointCodeLqw);
List<String> existSaveCodes = checkUpdateChannelList.stream().map(a -> a.getPointCode()).collect(Collectors.toList());
param.forEach(a -> {
if (a.getType().equals("2")) {
if (!existSaveCodes.contains(a.getPointCode())) {
a.setErrorInfo(a.getErrorInfo() + "更新不存在网点编码;");
}
}
});
}
}
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 删除更新 ------------------------------------------------ */
if(deleteList.size()>0) {
List<String> deleteCheckCodes = deleteList.stream().filter(a -> StringUtils.hasText(a.getPointCode())).map(a -> a.getPointCode()).distinct().collect(Collectors.toList());
if(deleteCheckCodes.size()==0){
param.forEach(a -> {
if (a.getType().equals("3")) {
a.setErrorInfo(a.getErrorInfo() + "删除不存在网点编码;");
}
});
}else {
LambdaQueryWrapper<BmsChannelPoint> checkdeleteChannelCode = new LambdaQueryWrapper<>();
checkdeleteChannelCode.in(BmsChannelPoint::getPointCode, deleteCheckCodes);
List<BmsChannelPoint> checkdeleteChannelList = bmsChannelPointService.list(checkdeleteChannelCode);
if (checkdeleteChannelList.size() > 0) {
List<String> existSaveCodes = checkdeleteChannelList.stream().map(a -> a.getPointCode()).collect(Collectors.toList());
param.forEach(a -> {
if (a.getType().equals("3")) {
if (!existSaveCodes.contains(a.getPointCode())) {
a.setErrorInfo(a.getErrorInfo() + "删除不存在网点编码;");
}
}
});
}
}
}
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 返回错误 ------------------------------------------- */
if(param.stream().filter(a->a.getErrorInfo().length()>0).count()>0) {
return R.ok(param, "导入失败,请打开EXCEL查询错误详情!");
}
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 保存新增 ------------------------------------------------ */
if(saveList.size()>0) {
List<BmsChannelPoint> saveBmsChannels = saveList.stream().map(a->{
BmsChannelPoint bmsChannelPoint = new BmsChannelPoint();
CopierUtil.copy(a, bmsChannelPoint);
if(!StringUtils.hasText(bmsChannelPoint.getPointCode())){
bmsChannelPoint.setPointCode("D"+StringUtils.genShortId());
}
BmsChannel channel = codeToChannaledId.get(a.getChannelCode());
BmsRegion2 region2 = codeToBizRegion.get(a.getBizRegionCode());
bmsChannelPoint.setChannelId(channel.getId());
bmsChannelPoint.setChannelName(channel.getChannelName());
bmsChannelPoint.setChannelType(channel.getChannelType());
bmsChannelPoint.setBizRegionId(region2.getId());
bmsChannelPoint.setBizRegionPath(region2.getPathNames());
bmsChannelPoint.setBizRegionPathIds(region2.getPathIds());
return bmsChannelPoint;
}).collect(Collectors.toList());
bmsChannelPointService.saveBatch(saveBmsChannels);
}
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 更新数据 ------------------------------------------------ */
if(updateList.size()>0) {
List<BmsChannelPoint> updateBmsChannelPoints = updateList.stream().map(a -> {
BmsChannelPoint bmsChannelPoint = new BmsChannelPoint();
CopierUtil.copy(a, bmsChannelPoint);
BmsChannel channel = codeToChannaledId.get(a.getChannelCode());
BmsRegion2 region2 = codeToBizRegion.get(a.getBizRegionCode());
bmsChannelPoint.setChannelId(channel.getId());
bmsChannelPoint.setChannelName(channel.getChannelName());
bmsChannelPoint.setChannelType(channel.getChannelType());
bmsChannelPoint.setBizRegionId(region2.getId());
bmsChannelPoint.setBizRegionPath(region2.getPathNames());
bmsChannelPoint.setBizRegionPathIds(region2.getPathIds());
return bmsChannelPoint;
}).collect(Collectors.toList());
List<String> updateCodes = updateBmsChannelPoints.stream().map(a -> a.getPointCode()).collect(Collectors.toList());
LambdaQueryWrapper<BmsChannelPoint> bmsChannelLambdaQueryWrapper = new LambdaQueryWrapper<>();
bmsChannelLambdaQueryWrapper.in(BmsChannelPoint::getPointCode, updateCodes);
List<BmsChannelPoint> oriBmsChannelList = bmsChannelPointService.list(bmsChannelLambdaQueryWrapper);
Map<String, Long> codeToChannelId = oriBmsChannelList.stream().collect(Collectors.toMap(BmsChannelPoint::getPointCode, BmsChannelPoint::getId));
updateBmsChannelPoints = updateBmsChannelPoints.stream().map(a -> {
a.setId(codeToChannelId.get(a.getPointCode()));
return a;
}).collect(Collectors.toList());
bmsChannelPointService.updateBatchById(updateBmsChannelPoints);
}
/** ----------------------------------------------------------------------------------- */
/** ------------------------------- 删除数据 ------------------------------------------------ */
if(deleteList.size()>0) {
List<BmsChannelPoint> deleteBmsChannelPoints = updateList.stream().map(a -> {
BmsChannelPoint bmsChannel = new BmsChannelPoint();
CopierUtil.copy(a, bmsChannel);
return bmsChannel;
}).collect(Collectors.toList());
List<String> updateCodes = deleteBmsChannelPoints.stream().map(a -> a.getPointCode()).collect(Collectors.toList());
LambdaQueryWrapper<BmsChannelPoint> bmsChannelLambdaQueryWrapper = new LambdaQueryWrapper<>();
bmsChannelLambdaQueryWrapper.in(BmsChannelPoint::getPointCode, updateCodes);
List<BmsChannelPoint> oriBmsChannelList = bmsChannelPointService.list(bmsChannelLambdaQueryWrapper);
Map<String, Long> codeToChannelId = oriBmsChannelList.stream().collect(Collectors.toMap(BmsChannelPoint::getPointCode, BmsChannelPoint::getId));
deleteBmsChannelPoints = deleteBmsChannelPoints.stream().map(a -> {
a.setId(codeToChannelId.get(a.getPointCode()));
return a;
}).collect(Collectors.toList());
List<Long> deleteIds = deleteBmsChannelPoints.stream().map(a -> a.getId()).collect(Collectors.toList());
bmsChannelPointService.removeBatchByIds(deleteIds);
}
/** ----------------------------------------------------------------------------------- */
return R.ok();
}
/** /**
* 删除 * 删除
* @param id * @param id

2
src/main/java/com/qs/serve/modules/bms/entity/bo/BmsChannel4ExcelBo.java

@ -38,7 +38,7 @@ public class BmsChannel4ExcelBo implements Serializable {
/** 备注 */ /** 备注 */
private String remark; private String remark;
private String costFlag; private Integer costFlag;
/** 所属租户 */ /** 所属租户 */
private String tenantId; private String tenantId;

96
src/main/java/com/qs/serve/modules/bms/entity/bo/BmsChannelPoint4ExcelBo.java

@ -0,0 +1,96 @@
package com.qs.serve.modules.bms.entity.bo;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.qs.serve.common.framework.mybatis.handler.meta.SplitStringTypeHandler;
import com.qs.serve.common.model.annotation.BusinessDifference;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
/**
* 渠道站点 实体类
* @author YenHex
* @since 2022-11-07
*/
@Data
public class BmsChannelPoint4ExcelBo implements Serializable {
private String type;
private String channelCode;
private String channelName;
private String pointCode;
/** 站点名称 */
private String pointName;
/** 店铺面积 */
private String shopArea;
/** 收银台数量 */
private Integer countCheckstand;
/** 站点等级(读取字典值) */
private String pointLevel;
/** 站点类型(读取字典值) */
private String pointType;
/** 详细地址 */
@Length(max = 255,message = "详细地址长度不能超过255字")
@BusinessDifference("详细地址")
private String address;
/** 行政区域id */
private String bizRegionCode;
/** 行政区域 */
@Length(max = 255,message = "行政区域长度不能超过255字")
@BusinessDifference("行政区域")
private String bizRegionPath;
private String bizRegionPathIds;
/** 纬度 */
@Length(max = 255,message = "纬度长度不能超过255字")
private String localX;
/** 经度 */
@Length(max = 255,message = "经度长度不能超过255字")
private String localY;
/** 地图地址 */
@Length(max = 255,message = "地图地址长度不能超过255字")
private String mapAddress;
/** 备注 */
@Length(max = 255,message = "备注长度不能超过255字")
private String remark;
/** 所属租户 */
private String tenantId;
/** 可投放费用标识 */
private Integer costFlag;
private String errorInfo;
}

2
src/main/resources/mapper/bms/BmsChannelPointMapper.xml

@ -8,6 +8,7 @@
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="channelId" column="channel_id"/> <result property="channelId" column="channel_id"/>
<result property="channelName" column="channel_name"/> <result property="channelName" column="channel_name"/>
<result property="channelCode" column="channel_code"/>
<result property="pointCode" column="point_code"/> <result property="pointCode" column="point_code"/>
<result property="pointName" column="point_name"/> <result property="pointName" column="point_name"/>
<result property="shopArea" column="shop_area"/> <result property="shopArea" column="shop_area"/>
@ -37,6 +38,7 @@
<sql id="bmsChannelPointSql"> <sql id="bmsChannelPointSql">
bms_channel_point.`id`, bms_channel_point.`id`,
bms_channel_point.`channel_id`, bms_channel_point.`channel_id`,
bms_channel_point.`channel_code`,
bms_channel_point.`channel_name`, bms_channel_point.`channel_name`,
bms_channel_point.`point_code`, bms_channel_point.`point_code`,
bms_channel_point.`point_name`, bms_channel_point.`point_name`,

Loading…
Cancel
Save