Commit 9802536d authored by suhuiguang's avatar suhuiguang

1.人员导入开发联调

parent 349cabd5
......@@ -17,7 +17,7 @@ public class EquipTypeConverter implements Converter<String> {
CODE_MAP.put("压力容器", "2000");
CODE_MAP.put("电梯", "3000");
CODE_MAP.put("起重机械", "4000");
CODE_MAP.put("场(厂)内专用机动车辆", "5000");
CODE_MAP.put("场机动车辆", "5000");
CODE_MAP.put("大型游乐设施", "6000");
CODE_MAP.put("压力管道", "8000");
CODE_MAP.put("客运索道", "9000");
......
......@@ -7,7 +7,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD,ElementType.ANNOTATION_TYPE})
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CustomerEquipTypeValidator.class)
public @interface CustomerEquipTypeCheck {
......
......@@ -8,49 +8,46 @@ import com.yeejoin.amos.boot.module.tcm.api.customer.CustomerEquipTypeCheck;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.*;
@Data
@CustomerEquipTypeCheck(message = "设备类型不能为空")
public class UserImportDto {
@NotBlank(message = "单位名称不能为空")
@NotBlank(message = "单位名称不能为空")
@ExcelProperty(value = "单位名称")
private String unitName;
@NotBlank(message = "单位统一信用代码不能为空")
@NotBlank(message = "单位统一信用代码不能为空")
@ExcelProperty(value = "单位统一信用代码")
private String unitCode;
@NotBlank(message = "单位类型不能为空")
@NotBlank(message = "单位类型不能为空")
@ExcelProperty(value = "单位类型")
private String unitType;
@NotBlank(message = "姓名不能为空")
@NotBlank(message = "姓名不能为空")
@ExcelProperty(value = "姓名")
private String name;
@NotBlank(message = "联系电话不能为空")
@NotBlank(message = "联系电话不能为空")
@ExcelProperty(value = "联系电话")
private String phone;
@NotBlank(message = "证件类型不能为空")
@NotBlank(message = "证件类型不能为空")
@ExcelProperty(value = "证件类型", converter = CertificateTypeConverter.class)
private String certificateType;
@NotBlank(message = "证件编号不能为空")
@NotBlank(message = "证件编号不能为空")
@ExcelProperty(value = "证件编号")
private String certificateNum;
@NotBlank(message = "人员类型不能为空")
@NotBlank(message = "人员类型不能为空")
@ExcelProperty(value = "人员类型", converter = PostTypeConverter.class)
private String post;
@CustomerEquipTypeCheck(message = "设备类型不能为空")
@ExcelProperty(value = "设备类型", converter = EquipTypeConverter.class)
private String equipType;
......@@ -85,6 +82,9 @@ public class UserImportDto {
@ExcelProperty
private Long seq;
@ExcelIgnore
private Set<String> equipTypeList;
@Override
public boolean equals(Object o) {
if (this == o) return true;
......
......@@ -356,7 +356,7 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/import")
@ApiOperation(value = "人员导入",httpMethod = "POST")
@ApiOperation(value = "人员导入",httpMethod = "POST",notes = "导入已经存在公司的人员")
public ResponseModel<?> importUser(@RequestBody MultipartFile file) {
return tzsUserInfoService.importUserBatch(file);
}
......
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