Browse Source

网点管理

master
yangpeilai 1 month ago
parent
commit
0db01cccd1

+ 2
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/api/CenterAgencyController.java View File

import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


import javax.validation.Valid;
import java.util.List; import java.util.List;


/** /**


@ApiOperation(value = "分页查询") @ApiOperation(value = "分页查询")
@PostMapping(value = "/page") @PostMapping(value = "/page")
public ApiResponse<Pagination> getCenterServiceHall(@Validated @RequestBody CenterHallOrAgencyPageRequestDTO reqDto) {
public ApiResponse<Pagination> getCenterServiceHall(@Valid @RequestBody CenterHallOrAgencyPageRequestDTO reqDto) {
Pagination page = manager.page(reqDto); Pagination page = manager.page(reqDto);
return ApiResponse.of(page); return ApiResponse.of(page);
} }

+ 0
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/agency/AgencyPageRequestDTO.java View File

package cn.com.taiji.userw.dto.agency; package cn.com.taiji.userw.dto.agency;


import cn.com.taiji.core.dto.AbstractBizPageRequestDTO;
import cn.com.taiji.core.dto.AbstractStaffBizPageRequestDTO; import cn.com.taiji.core.dto.AbstractStaffBizPageRequestDTO;
import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant; import cn.com.taiji.core.model.comm.protocol.constraint.IntegerConstant;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/centerHallAndAgency/CenterHallOrAgencyPageRequestDTO.java View File

* @Filename:CenterHallRequestDTO * @Filename:CenterHallRequestDTO
* @description: 中心网点/渠道请求参数 * @description: 中心网点/渠道请求参数
*/ */
@ApiModel(value = "中心网点/渠道请求参数")
@ApiModel(description = "中心网点/渠道请求参数")
@Data @Data
public class CenterHallOrAgencyPageRequestDTO extends AbstractStaffBizPageRequestDTO { public class CenterHallOrAgencyPageRequestDTO extends AbstractStaffBizPageRequestDTO {



+ 1
- 3
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/serviceHall/ServiceHallPageRequestDTO.java View File

import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;


import javax.validation.constraints.NotNull;

@ApiModel(description = "网点查询请求参数") @ApiModel(description = "网点查询请求参数")
@Data @Data
public class ServiceHallPageRequestDTO extends AbstractStaffBizPageRequestDTO { public class ServiceHallPageRequestDTO extends AbstractStaffBizPageRequestDTO {
@ApiModelProperty(value = "网点名称") @ApiModelProperty(value = "网点名称")
private String name;//网点名称 private String name;//网点名称
@ApiModelProperty(value = "网点编号") @ApiModelProperty(value = "网点编号")
private String servicehallId;//网点编号
private String serviceHallId;//网点编号
@ApiModelProperty(value = "渠道编号") @ApiModelProperty(value = "渠道编号")
private String agencyId;//渠道编号 private String agencyId;//渠道编号
@ApiModelProperty(value = "机构") @ApiModelProperty(value = "机构")

+ 2
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/centerHallAndAgency/CenterAgencyManagerImpl.java View File

import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallOrAgencyDeleteRequestDTO; import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallOrAgencyDeleteRequestDTO;
import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallOrAgencyPageRequestDTO; import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallOrAgencyPageRequestDTO;
import cn.com.taiji.userw.repo.jpa.request.CenterAgencyPageRequest; import cn.com.taiji.userw.repo.jpa.request.CenterAgencyPageRequest;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


@Override @Override
public Pagination page(CenterHallOrAgencyPageRequestDTO reqDto) { public Pagination page(CenterHallOrAgencyPageRequestDTO reqDto) {
CenterAgencyPageRequest request = new CenterAgencyPageRequest(); CenterAgencyPageRequest request = new CenterAgencyPageRequest();
BeanUtils.copyProperties(reqDto, request);
request.setCenterAgencyId(reqDto.getId()); request.setCenterAgencyId(reqDto.getId());
request.setCenterAgencyName(reqDto.getName()); request.setCenterAgencyName(reqDto.getName());
return qtkAgencyMapRepo.page(request); return qtkAgencyMapRepo.page(request);

+ 2
- 0
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/centerHallAndAgency/CenterServiceHallManagerImpl.java View File

import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallAddOrUpdateReqDTO; import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallAddOrUpdateReqDTO;
import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallOrAgencyPageRequestDTO; import cn.com.taiji.userw.dto.centerHallAndAgency.CenterHallOrAgencyPageRequestDTO;
import cn.com.taiji.userw.repo.jpa.request.CenterServiceHallPageRequest; import cn.com.taiji.userw.repo.jpa.request.CenterServiceHallPageRequest;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


@Override @Override
public Pagination page(CenterHallOrAgencyPageRequestDTO reqDto) { public Pagination page(CenterHallOrAgencyPageRequestDTO reqDto) {
CenterServiceHallPageRequest request = new CenterServiceHallPageRequest(); CenterServiceHallPageRequest request = new CenterServiceHallPageRequest();
BeanUtils.copyProperties(reqDto, request);
request.setCenterServiceHallId(reqDto.getId()); request.setCenterServiceHallId(reqDto.getId());
request.setCenterServicehallName(reqDto.getName()); request.setCenterServicehallName(reqDto.getName());
return qtkServicehallMapRepo.page(request); return qtkServicehallMapRepo.page(request);

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

public String registerFullBath(ServiceHallRegisterFullBatchRequestDTO reqDto) throws ManagerException { public String registerFullBath(ServiceHallRegisterFullBatchRequestDTO reqDto) throws ManagerException {
String path = null; String path = null;
File tempFile = minioUtil.getFileByUrl(reqDto.getExcelFileUrl()); File tempFile = minioUtil.getFileByUrl(reqDto.getExcelFileUrl());
//获取本地文件
// File tempFile = new File("C:\\Users\\32258\\Desktop\\gy\\测试\\用户管理\\测试文件\\网点信息导入模板.xlsx");
//获取文件流 //获取文件流
InputStream fileInputStream = null; InputStream fileInputStream = null;
try { try {
.doWrite(errors); .doWrite(errors);
path = minioUtil.fileUploadHttp(upFile, BucketFileBus.SERVICEHALL); path = minioUtil.fileUploadHttp(upFile, BucketFileBus.SERVICEHALL);
} }
//删除临时文件
FileUtil.del(tempFile);
return path == null ? null : minioUtil.getOuterUrl(path); return path == null ? null : minioUtil.getOuterUrl(path);
} }



+ 0
- 8
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/repo/jpa/request/CenterAgencyPageRequest.java View File

import cn.com.taiji.common.pub.dao.HqlBuilder; import cn.com.taiji.common.pub.dao.HqlBuilder;
import cn.com.taiji.common.repo.request.jpa.JpaPageableDataRequest; import cn.com.taiji.common.repo.request.jpa.JpaPageableDataRequest;
import cn.com.taiji.core.entity.basic.QtkAgencyMap; import cn.com.taiji.core.entity.basic.QtkAgencyMap;
import cn.com.taiji.core.entity.basic.QtkServicehallMap;
import lombok.Data; import lombok.Data;


import javax.persistence.Column;
import javax.validation.constraints.Size;

@Data @Data
public class CenterAgencyPageRequest extends JpaPageableDataRequest<QtkAgencyMap> { public class CenterAgencyPageRequest extends JpaPageableDataRequest<QtkAgencyMap> {




private String centerAgencyName; private String centerAgencyName;


public CenterAgencyPageRequest() {
this.orderBy="insertTime";
this.desc=true;
}
@Override @Override
public HqlBuilder toSelectHql() { public HqlBuilder toSelectHql() {
HqlBuilder hql = new HqlBuilder("from QtkAgencyMap where 1=1 "); HqlBuilder hql = new HqlBuilder("from QtkAgencyMap where 1=1 ");

+ 2
- 4
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/repo/jpa/request/ServiceHallPageRequest.java View File

public class ServiceHallPageRequest extends JpaPageableDataRequest<QtkServiceHall> { public class ServiceHallPageRequest extends JpaPageableDataRequest<QtkServiceHall> {


private String name;//网点名称 private String name;//网点名称
private String servicehallId;
private String serviceHallId;
private String agencyId; private String agencyId;
private String agencyName;




@Override @Override
public HqlBuilder toSelectHql() { public HqlBuilder toSelectHql() {
HqlBuilder hql = new HqlBuilder("from QtkServiceHall where 1=1 "); HqlBuilder hql = new HqlBuilder("from QtkServiceHall where 1=1 ");
hql.append(" and name like :name ", like(name)); hql.append(" and name like :name ", like(name));
hql.append(" and servicehallId = :servicehallId ", servicehallId);
hql.append(" and serviceHallId = :serviceHallId ", serviceHallId);
hql.append(" and agencyId = :agencyId ", agencyId); hql.append(" and agencyId = :agencyId ", agencyId);
hql.append(" and agencyName like :agencyName ", like(agencyName));
return hql; return hql;
} }
} }

Loading…
Cancel
Save