Browse Source

userw 办理点增加字段是否可办理

master
chenchaod 1 week ago
parent
commit
27bd3ccea0

+ 5
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/serviceHall/ServiceHallRegisterLocationBatchReqDTO.java View File

import lombok.Data; import lombok.Data;


import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;


/** /**
* @description: * @description:
@NotBlank(message = "") @NotBlank(message = "")
@ApiModelProperty(value = "网点数据id") @ApiModelProperty(value = "网点数据id")
private String serviceHallId; private String serviceHallId;

@NotNull
@ApiModelProperty(value = "1-可办理2-禁止办理")
private Integer type;
} }

+ 4
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/excel/listener/ServiceHallRegisterLocationBatchListener.java View File

private Set<ServiceLocationRegisterData> errors = new HashSet<>(); private Set<ServiceLocationRegisterData> errors = new HashSet<>();
private List<ServiceLocationRegisterData> result = new ArrayList<>(); private List<ServiceLocationRegisterData> result = new ArrayList<>();
private String openId; private String openId;
private Integer type;


public ServiceHallRegisterLocationBatchListener(QtkServicehallLocationRepo LocationRepo, QtkServiceHall serviceHall,String openId) {
public ServiceHallRegisterLocationBatchListener(QtkServicehallLocationRepo LocationRepo, QtkServiceHall serviceHall,String openId,Integer type) {
this.LocationRepo = LocationRepo; this.LocationRepo = LocationRepo;
this.serviceHall = serviceHall; this.serviceHall = serviceHall;
this.openId = openId; this.openId = openId;
this.type = type;
} }


@Override @Override
for (ServiceLocationRegisterData serviceLocationRegisterData : result) { for (ServiceLocationRegisterData serviceLocationRegisterData : result) {
QtkServicehallLocation serviceHall = covertToQtk(serviceLocationRegisterData); QtkServicehallLocation serviceHall = covertToQtk(serviceLocationRegisterData);
serviceHall.setCreateOpenId(openId); serviceHall.setCreateOpenId(openId);
serviceHall.setType(type);
locations.add(serviceHall); locations.add(serviceHall);
} }
LocationRepo.saveAll(locations); LocationRepo.saveAll(locations);

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/serviceHall/ServiceHallManagerImpl.java View File

throw new ManagerException("通过文件流失败!"); throw new ManagerException("通过文件流失败!");
} }
ServiceHallRegisterLocationBatchListener listener = ServiceHallRegisterLocationBatchListener listener =
new ServiceHallRegisterLocationBatchListener(locationRepo, serviceHall,findOpenIdByToken(reqDto.getAccessToken()));
new ServiceHallRegisterLocationBatchListener(locationRepo, serviceHall,findOpenIdByToken(reqDto.getAccessToken()),reqDto.getType());
//读取文件数据并保存 //读取文件数据并保存
EasyExcel.read(fileInputStream, EasyExcel.read(fileInputStream,
ServiceLocationRegisterData.class, ServiceLocationRegisterData.class,

+ 3
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/model/serviceHall/ServiceHallLocationModel.java View File

@NotNull @NotNull
@ApiModelProperty(value = "半径距离") @ApiModelProperty(value = "半径距离")
private Integer radial;//半径距离 private Integer radial;//半径距离
@NotNull
@ApiModelProperty(value = "1-可办理2-禁止办理")
private Integer type = 1;


} }

Loading…
Cancel
Save