Commit e9fbc41b by 谢海旭

v5.7.0版本 飞行督导:批量变更接口、新增招聘需求接口调整

1 parent 684d5c6c
......@@ -19,7 +19,7 @@
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-staff-api</artifactId>
<version>5.6.4-SNAPSHOT</version>
<version>5.7.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
......
......@@ -14,7 +14,15 @@ public enum RopErrorEnum implements ErrorEnum{
GET_LOGIN_EXPIRE("40990301", "登录失效"),
/** 招聘需求-获取门店列表失败 **/
RECRUITMENT_DEMAND_GET_STORE_LIST_ERROR("50000101", "获取门店列表失败");
RECRUITMENT_DEMAND_GET_STORE_LIST_ERROR("50000101", "获取门店列表失败"),
/** 招聘需求-通过系统门店创建时门店不能为空 **/
RECRUITMENT_DEMAND_MERCHANT_REQUIRED("50000102", "门店不能为空"),
/** 招聘需求-未创建系统门店时近一月新车销量不能为空 **/
RECRUITMENT_DEMAND_SALES_VOLUME_REQUIRED("50000103", "近一月新车销量不能为空且必须大于0"),
/** 招聘需求-未创建系统门店时主营品牌不能为空 **/
RECRUITMENT_DEMAND_BRAND_REQUIRED("50000104", "主营品牌不能为空"),
/** 招聘需求-未创建系统门店时门店地址不能为空 **/
RECRUITMENT_DEMAND_ADDRESS_REQUIRED("50000105", "门店地址不能为空");
private String value;
......
......@@ -9,12 +9,12 @@ import javax.validation.constraints.NotNull;
@Data
public class RecruitmentDemandAddRequest extends AbstractRopRequest {
@NotBlank(message = "门店id不能为空")
@ApiModelProperty(notes="门店id(门店和园区店商户)", required = true)
@ApiModelProperty(notes = "门店id(门店和园区店商户),通过系统门店创建时必填")
private String merchantId;
@NotBlank(message = "门店名称不能为空")
@ApiModelProperty(notes="门店名称", required = true)
@ApiModelProperty(notes = "门店名称", required = true)
private String merchantName;
@NotNull(message = "是否急招不能为空")
......@@ -22,26 +22,40 @@ public class RecruitmentDemandAddRequest extends AbstractRopRequest {
private Byte urgent;
@NotNull(message = "招聘数量不能为空")
@ApiModelProperty(notes="招聘数量", required = true)
@ApiModelProperty(notes = "招聘数量", required = true)
private Integer recruitmentQuantity;
@NotBlank(message = "业务类型值不能为空")
@ApiModelProperty(notes="业务类型值", required = true)
@ApiModelProperty(notes = "业务类型值", required = true)
private String businessType;
@NotBlank(message = "业务类型名称不能为空")
@ApiModelProperty(notes="业务类型名称", required = true)
@ApiModelProperty(notes = "业务类型名称", required = true)
private String businessTypeName;
@NotBlank(message = "招聘类型值不能为空")
@ApiModelProperty(notes="招聘类型值", required = true)
@ApiModelProperty(notes = "招聘类型值", required = true)
private String recruitmentType;
@NotBlank(message = "招聘类型名称不能为空")
@ApiModelProperty(notes="招聘类型名称", required = true)
@ApiModelProperty(notes = "招聘类型名称", required = true)
private String recruitmentTypeName;
@ApiModelProperty(notes="需求描述")
@ApiModelProperty(notes = "需求描述")
private String requirementDescription;
@ApiModelProperty(notes = "是否通过系统门店创建,true-是 false-否,勾选未创建系统门店时传 false")
private Boolean bySystemMerchant;
@ApiModelProperty(notes = "近一月新车销量(未创建系统门店时必填,仅支持大于0的整数,最大不超过9999)")
private Integer salesVolume;
@ApiModelProperty(notes = "主营品牌,多个以/分隔(未创建系统门店时必填)")
private String brand;
@ApiModelProperty(notes = "门店地址,省市联动(未创建系统门店时必填)")
private String merchantAddress;
@ApiModelProperty(notes = "省份名称(未创建系统门店时必填,用于查询技术督导)")
private String province;
}
......@@ -177,6 +177,24 @@ public class RecruitmentDemandService {
dto.setRegionOperationId(loginUserInfo.getUuid());
dto.setRegionOperationName(loginUserInfo.getName());
}
boolean bySystemMerchant = !Boolean.FALSE.equals(dto.getBySystemMerchant());
if (bySystemMerchant) {
// 通过系统门店创建:门店商户号必填
if (org.apache.commons.lang3.StringUtils.isBlank(dto.getMerchantId())) {
return RopResponse.error(RopErrorEnum.RECRUITMENT_DEMAND_MERCHANT_REQUIRED);
}
} else {
// 未创建系统门店:销量、品牌、门店地址必填
if (dto.getSalesVolume() == null || dto.getSalesVolume() <= 0) {
return RopResponse.error(RopErrorEnum.RECRUITMENT_DEMAND_SALES_VOLUME_REQUIRED);
}
if (org.apache.commons.lang3.StringUtils.isBlank(dto.getBrand())) {
return RopResponse.error(RopErrorEnum.RECRUITMENT_DEMAND_BRAND_REQUIRED);
}
if (org.apache.commons.lang3.StringUtils.isBlank(dto.getMerchantAddress())) {
return RopResponse.error(RopErrorEnum.RECRUITMENT_DEMAND_ADDRESS_REQUIRED);
}
}
RpcResponse<RecruitmentDemandDTO> response = recruitmentDemandRemote.recruitmentDemandAdd(dto);
if (!response.isSuccess()) {
return RopResponse.error(response.getError());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!