Bladeren bron

修改

master
yangpeilai 1 maand geleden
bovenliggende
commit
6c9eab420e

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/agency/AgencyInsertRequestDTO.java Bestand weergeven

@@ -21,7 +21,7 @@ public class AgencyInsertRequestDTO extends AbstractStaffBizRequestDTO {
@NotBlank
@FixedLength( length = 11)
@ApiModelProperty(value = "中心渠道编号",required = true)
private String centerAgencyId;//---
private String mapAgencyId;//---
@NotBlank
@ApiModelProperty(value = "合作机构类别",required = true)
private String type;

+ 1
- 1
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/dto/agency/AgencyUpdateRequestDTO.java Bestand weergeven

@@ -26,7 +26,7 @@ public class AgencyUpdateRequestDTO extends AbstractStaffBizRequestDTO {
@NotBlank
@FixedLength( length = 11)
@ApiModelProperty(value = "中心渠道编号")
private String centerAgencyId;//---
private String mapAgencyId;//---
@NotBlank
@ApiModelProperty(value = "合作机构类别")
private String type;

+ 5
- 5
zhywpt-app-userw/src/main/java/cn/com/taiji/userw/manager/agency/AgencyManagerImpl.java Bestand weergeven

@@ -73,10 +73,10 @@ public class AgencyManagerImpl extends AbstractManager implements AgencyManager
if (byAgencyId != null) throw new ManagerException("该机构编号已存在");
QtkAgency byName = qtkAgencyRepo.findByName(req.getName());
if (byName != null) throw new ManagerException("该机构名称已存在");
QtkAgencyMap byCenterAgencyId = qtkAgencyMapRepo.findByCenterAgencyId(req.getCenterAgencyId());
QtkAgencyMap byCenterAgencyId = qtkAgencyMapRepo.findByCenterAgencyId(req.getMapAgencyId());
if (byCenterAgencyId == null) throw new ManagerException("该中心渠道编号不存在");
QtkAgency qtkAgency = copyProperties(req, new QtkAgency());
qtkAgency.setMapAgencyId(req.getCenterAgencyId());
qtkAgency.setMapAgencyId(req.getMapAgencyId());
qtkAgencyRepo.persist(qtkAgency);
QtkAgencyBkModel[] agencyModels = req.getAgencyModels();
ArrayList<QtkAgencyModel> qtkAgencyModels = new ArrayList<>();
@@ -102,11 +102,11 @@ public class AgencyManagerImpl extends AbstractManager implements AgencyManager
QtkAgency byName = qtkAgencyRepo.findByName(reqDTO.getName());
if (byName != null) throw new ManagerException("该机构名称已存在");
}
if (!byAgencyId.getMapAgencyId().equals(reqDTO.getCenterAgencyId())) {
QtkAgencyMap byCenterAgencyId = qtkAgencyMapRepo.findByCenterAgencyId(reqDTO.getCenterAgencyId());
if (!byAgencyId.getMapAgencyId().equals(reqDTO.getMapAgencyId())) {
QtkAgencyMap byCenterAgencyId = qtkAgencyMapRepo.findByCenterAgencyId(reqDTO.getMapAgencyId());
if (byCenterAgencyId == null) throw new ManagerException("该中心渠道编号不存在");
}
byAgencyId.setMapAgencyId(reqDTO.getCenterAgencyId());
byAgencyId.setMapAgencyId(reqDTO.getMapAgencyId());
byAgencyId.setType(reqDTO.getType());
byAgencyId.setName(reqDTO.getName());
byAgencyId.setContact(reqDTO.getContact());

Laden…
Annuleren
Opslaan