Commit 4fc3777a authored by hezhen's avatar hezhen

123

parent 1faf4505
......@@ -30,10 +30,16 @@ public class CompanyVo {
String content;
@ApiModelProperty("地址-省/直辖市(编码)")
Integer addrProvince;
@ApiModelProperty("地址-省/直辖市(编码)名称")
String provinceName;
@ApiModelProperty("地址-市(编码)")
Integer addrCity;
@ApiModelProperty("地址-市(编码)名称")
String cityName;
@ApiModelProperty("地址-镇/县(编码)")
Integer addrTown;
@ApiModelProperty("地址-镇/县(编码)名称")
String townName;
/**
* 分支机构
......
......@@ -104,15 +104,36 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
//设置股权信息
public ObjectRestResponse updStockInfo(CompanyVo companyVo){
if (companyVo==null|| StringUtils.isBlank(companyVo.getCompanyName())|| StringUtils.isBlank(companyVo.getName())||
companyVo.getZoneId()==null||companyVo.getZoneId()==0|| companyVo.getAddrProvince()==null||companyVo.getAddrProvince()==0
|| companyVo.getAddrCity()==null||companyVo.getAddrCity()==0){
if (companyVo==null|| companyVo.getId()==null||companyVo.getId()==0 || companyVo.getBalance()==null||companyVo.getBalance()==0|| companyVo.getTotal()==null||companyVo.getTotal()==0
||companyVo.getPrice() ==null|| companyVo.getPrice().compareTo(BigDecimal.ZERO)<0){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE,"参数不能为空");
}
Integer state=companyVo.getState()==null?2:companyVo.getState();
if (state==1&&(StringUtils.isBlank(companyVo.getAddrDetail())||StringUtils.isBlank(companyVo.getImages())||StringUtils.isBlank(companyVo.getDescribes())||StringUtils.isBlank(companyVo.getContent())
||StringUtils.isBlank(companyVo.getLeader())||StringUtils.isBlank(companyVo.getLeaderContactInfo())||StringUtils.isBlank(companyVo.getTourServicePhone())||StringUtils.isBlank(companyVo.getVehiceServicePhone()))){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE,"上架时参数不能为空");
Integer companyBaseId=companyVo.getId();
Integer stockState=companyVo.getStockState();
if (stockState!=null&&stockState==2){
CompanyBase companyBase=selectById(companyBaseId);
if (companyBase==null||StringUtils.isBlank(companyBase.getDescribes())|| StringUtils.isBlank(companyBase.getContent())||StringUtils.isBlank(companyBase.getImages())){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE,"基础信息不完善");
}
}
Integer stockId=companyVo.getStockId();
BranchCompanyStockRight right=new BranchCompanyStockRight();
BeanUtils.copyProperties(companyVo,right);
if (stockId==null||stockId==0){
right.setId(null);
stockRightBiz.insertSelective(right);
}else {
right.setId(stockId);
stockRightBiz.updateSelectiveById(right);
}
return ObjectRestResponse.succ();
}
//设置基础信息
public ObjectRestResponse updCompanyDetail(CompanyVo companyVo){
if (companyVo==null){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE,"参数不能为空");
}
CompanyBase companyBase=new CompanyBase();
BeanUtils.copyProperties(companyVo,companyBase);
......@@ -126,7 +147,6 @@ public class CompanyBaseBiz extends BaseBiz<CompanyBaseMapper, CompanyBase> {
BranchCompany branchCompany=new BranchCompany();
BeanUtils.copyProperties(companyVo,branchCompany);
branchCompany.setCompanyBaseId(companyBaseId);
branchCompany.setName(companyVo.getCompanyName());
Integer companyId=companyVo.getCompanyId();
if (companyId==null||companyId==0){
branchCompany.setId(null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment