优化代码
This commit is contained in:
parent
25d828a319
commit
1143ea4c18
|
@ -43,9 +43,9 @@ public class CheckSchemeEntity extends AuditableEntity implements Serializable {
|
||||||
@TableField("construction_scheme")
|
@TableField("construction_scheme")
|
||||||
private String constructionScheme;
|
private String constructionScheme;
|
||||||
|
|
||||||
@ApiModelProperty("检查方式,枚举CheckTypeEnum")
|
@ApiModelProperty("检查方式,枚举CheckMethodEnum")
|
||||||
@TableField("check_type")
|
@TableField("check_method")
|
||||||
private String checkType;
|
private String checkMethod;
|
||||||
|
|
||||||
@ApiModelProperty("备注")
|
@ApiModelProperty("备注")
|
||||||
@TableField("remark")
|
@TableField("remark")
|
||||||
|
|
|
@ -13,8 +13,8 @@ import java.util.List;
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
public interface CheckSchemeService extends IService<CheckSchemeEntity> {
|
public interface CheckSchemeService extends IService<CheckSchemeEntity> {
|
||||||
List<CheckSchemeResp> page(String checkType);
|
List<CheckSchemeResp> page(String checkMethod);
|
||||||
List<CheckSchemeResp> list(String checkType);
|
List<CheckSchemeResp> list(String checkMethod);
|
||||||
CheckSchemeResp detail(String checkSchemeId);
|
CheckSchemeResp detail(String checkSchemeId);
|
||||||
void save(CheckSchemeReq req);
|
void save(CheckSchemeReq req);
|
||||||
void update(String checkSchemeId, CheckSchemeReq req);
|
void update(String checkSchemeId, CheckSchemeReq req);
|
||||||
|
|
|
@ -28,14 +28,14 @@ import java.util.List;
|
||||||
public class CheckSchemeServiceImpl extends ServiceImpl<CheckSchemeMapper, CheckSchemeEntity> implements CheckSchemeService {
|
public class CheckSchemeServiceImpl extends ServiceImpl<CheckSchemeMapper, CheckSchemeEntity> implements CheckSchemeService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CheckSchemeResp> page(String checkType) {
|
public List<CheckSchemeResp> page(String checkMethod) {
|
||||||
PageUtil.startPage();
|
PageUtil.startPage();
|
||||||
return this.list(checkType);
|
return this.list(checkMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CheckSchemeResp> list(String checkType) {
|
public List<CheckSchemeResp> list(String checkMethod) {
|
||||||
List<CheckSchemeResp> result = Converts.INSTANCE.toCheckSchemeResp(this.list(Wrappers.lambdaQuery(CheckSchemeEntity.class).eq(StrUtil.isNotBlank(checkType), CheckSchemeEntity::getCheckType, checkType)));
|
List<CheckSchemeResp> result = Converts.INSTANCE.toCheckSchemeResp(this.list(Wrappers.lambdaQuery(CheckSchemeEntity.class).eq(StrUtil.isNotBlank(checkMethod), CheckSchemeEntity::getCheckMethod, checkMethod)));
|
||||||
result.forEach(resp -> {
|
result.forEach(resp -> {
|
||||||
resp.setCheckMethodLabel(CheckMethodEnum.getDescByCode(resp.getCheckMethod()));
|
resp.setCheckMethodLabel(CheckMethodEnum.getDescByCode(resp.getCheckMethod()));
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,14 +27,14 @@ public class CheckSchemeController {
|
||||||
|
|
||||||
@ApiOperation(value = "分页查询检查方案信息", httpMethod = "GET")
|
@ApiOperation(value = "分页查询检查方案信息", httpMethod = "GET")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public PageResult<CheckSchemeResp> page(@RequestParam(required = false) String checkType){
|
public PageResult<CheckSchemeResp> page(@RequestParam(required = false) String checkMethod){
|
||||||
return PageResult.ok(checkSchemeService.page(checkType));
|
return PageResult.ok(checkSchemeService.page(checkMethod));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询检查方案信息列表", httpMethod = "GET")
|
@ApiOperation(value = "查询检查方案信息列表", httpMethod = "GET")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result<List<CheckSchemeResp>> list(@RequestParam(required = false) String checkType){
|
public Result<List<CheckSchemeResp>> list(@RequestParam(required = false) String checkMethod){
|
||||||
return Result.ok(checkSchemeService.list(checkType));
|
return Result.ok(checkSchemeService.list(checkMethod));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询检查方案详情", httpMethod = "GET")
|
@ApiOperation(value = "查询检查方案详情", httpMethod = "GET")
|
||||||
|
|
|
@ -134,7 +134,7 @@ public class CommonController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询在职状态", httpMethod = "GET")
|
@ApiOperation(value = "查询在职状态", httpMethod = "GET")
|
||||||
@GetMapping("/list/user_status")
|
@GetMapping("/list/user-status")
|
||||||
public Result<?> listUserStatus(){
|
public Result<?> listUserStatus(){
|
||||||
return Result.ok(UserStatusEnum.listAll());
|
return Result.ok(UserStatusEnum.listAll());
|
||||||
}
|
}
|
||||||
|
@ -146,16 +146,22 @@ public class CommonController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询保险状态", httpMethod = "GET")
|
@ApiOperation(value = "查询保险状态", httpMethod = "GET")
|
||||||
@GetMapping("/list/insurance_status")
|
@GetMapping("/list/insurance-status")
|
||||||
public Result<?> listInsuranceStatus(){
|
public Result<?> listInsuranceStatus(){
|
||||||
return Result.ok(InsuranceStatusEnum.listAll());
|
return Result.ok(InsuranceStatusEnum.listAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "查询附件业务类型", httpMethod = "GET")
|
@ApiOperation(value = "查询附件业务类型", httpMethod = "GET")
|
||||||
@GetMapping("/list/attach_business_type")
|
@GetMapping("/list/attach-business_type")
|
||||||
public Result<?> listAttachBusinessType(){
|
public Result<?> listAttachBusinessType(){
|
||||||
return Result.ok(AttachBusinessTypeEnum.listAll());
|
return Result.ok(AttachBusinessTypeEnum.listAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询检查方式", httpMethod = "GET")
|
||||||
|
@GetMapping("/list/check-method")
|
||||||
|
public Result<?> listCheckMethod(){
|
||||||
|
return Result.ok(CheckMethodEnum.listAll());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue