|
|
|
@ -11,9 +11,13 @@ import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.BusinessType;
|
|
|
|
|
import com.glxp.api.controller.BaseController;
|
|
|
|
|
import com.glxp.api.dto.DictDto;
|
|
|
|
|
import com.glxp.api.entity.anno.AnncmntDevEntity;
|
|
|
|
|
import com.glxp.api.entity.stat.AnncmntManuEntity;
|
|
|
|
|
import com.glxp.api.entity.stat.AnncmntYlqxzcrEntity;
|
|
|
|
|
import com.glxp.api.req.anno.AnncmntDevEntityRequest;
|
|
|
|
|
import com.glxp.api.req.anno.AnncmntManuEntityRequest;
|
|
|
|
|
import com.glxp.api.req.anno.AnncmntYlqxzcrEntityRequest;
|
|
|
|
|
import com.glxp.api.req.system.DeleteRequest;
|
|
|
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.api.service.anno.AnncmntDevService;
|
|
|
|
@ -27,6 +31,9 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 用户信息
|
|
|
|
@ -43,7 +50,7 @@ public class AnncmntManuController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/list")
|
|
|
|
|
public BaseResponse list(AnncmntDevEntityRequest request, BindingResult bindingResult) {
|
|
|
|
|
public BaseResponse list(AnncmntManuEntityRequest request, BindingResult bindingResult) {
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
@ -65,7 +72,8 @@ public class AnncmntManuController extends BaseController {
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
entity.setCreateTime(new Date());
|
|
|
|
|
entity.setUdpateTime(new Date());
|
|
|
|
|
boolean b = anncmntManuService.save(entity);
|
|
|
|
|
if (!b) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
@ -89,6 +97,7 @@ public class AnncmntManuController extends BaseController {
|
|
|
|
|
if (originEntity == null) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
|
|
|
|
|
}
|
|
|
|
|
entity.setUdpateTime(new Date());
|
|
|
|
|
boolean b = anncmntManuService.updateById(entity);
|
|
|
|
|
if (!b) {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
|
|
|
@ -115,11 +124,21 @@ public class AnncmntManuController extends BaseController {
|
|
|
|
|
return ResultVOUtils.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static QueryWrapper<AnncmntManuEntity> getQueryWrapper(AnncmntDevEntityRequest request) {
|
|
|
|
|
public static QueryWrapper<AnncmntManuEntity> getQueryWrapper(AnncmntManuEntityRequest request) {
|
|
|
|
|
AnncmntManuEntity entity = new AnncmntManuEntity();
|
|
|
|
|
BeanCopyUtils.copy(request, entity);
|
|
|
|
|
QueryWrapper queryWrapper = new QueryWrapper(entity);
|
|
|
|
|
return queryWrapper;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("getList")
|
|
|
|
|
public BaseResponse getList(AnncmntManuEntityRequest request) {
|
|
|
|
|
List<AnncmntManuEntity> list = anncmntManuService.list();
|
|
|
|
|
List<DictDto> reList = list.stream().map(s-> {
|
|
|
|
|
DictDto dictDto = new DictDto(s.getCreditCode(),s.getName());
|
|
|
|
|
return dictDto;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
return ResultVOUtils.success(reList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|