不良信息提交

master
yuanwei 1 year ago
parent 56a0ee0935
commit 1642e226ac

@ -0,0 +1,126 @@
package com.glxp.api.controller.anno;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
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.entity.stat.AnncmntManuCertEntity;
import com.glxp.api.entity.stat.AnncmntManuEntity;
import com.glxp.api.req.anno.AnncmntDevEntityRequest;
import com.glxp.api.req.anno.AnncmntManuCertEntityRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.stat.AnncmntManuCertService;
import com.glxp.api.service.stat.AnncmntManuService;
import com.glxp.api.util.BeanCopyUtils;
import com.glxp.api.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
/**
*
*
*/
@ApiIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/anno/anncmnt/manu/cert")
public class AnncmntManuCertController extends BaseController {
private final AnncmntManuCertService anncmntManuCertService;
@GetMapping("/list")
public BaseResponse list(AnncmntManuCertEntityRequest request, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
IPage page = new Page(request.getPage(),request.getLimit());
IPage<AnncmntManuCertEntity> pages = anncmntManuCertService.page(page, getQueryWrapper(request));
PageSimpleResponse<AnncmntManuCertEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pages.getTotal());
pageSimpleResponse.setList(pages.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/save")
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody AnncmntManuCertEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
boolean b = anncmntManuCertService.save(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/edit")
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
public BaseResponse edit(@RequestBody @Valid AnncmntManuCertEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (entity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
AnncmntManuCertEntity originEntity = anncmntManuCertService.getById(entity.getId());
if (originEntity == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntManuCertService.updateById(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("修改成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/delete")
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (StringUtils.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntManuCertService.removeById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
public static QueryWrapper<AnncmntManuCertEntity> getQueryWrapper(AnncmntManuCertEntityRequest request) {
AnncmntManuCertEntity entity = new AnncmntManuCertEntity();
BeanCopyUtils.copy(request, entity);
QueryWrapper queryWrapper = new QueryWrapper(entity);
return queryWrapper;
}
}

@ -0,0 +1,125 @@
package com.glxp.api.controller.anno;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
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.entity.anno.AnncmntDevEntity;
import com.glxp.api.entity.stat.AnncmntManuEntity;
import com.glxp.api.req.anno.AnncmntDevEntityRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.anno.AnncmntDevService;
import com.glxp.api.service.stat.AnncmntManuService;
import com.glxp.api.util.BeanCopyUtils;
import com.glxp.api.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
/**
*
*
*/
@ApiIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/anno/anncmnt/manu")
public class AnncmntManuController extends BaseController {
private final AnncmntManuService anncmntManuService;
@GetMapping("/list")
public BaseResponse list(AnncmntDevEntityRequest request, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
IPage page = new Page(request.getPage(),request.getLimit());
IPage<AnncmntManuEntity> pages = anncmntManuService.page(page, getQueryWrapper(request));
PageSimpleResponse<AnncmntManuEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pages.getTotal());
pageSimpleResponse.setList(pages.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/save")
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody AnncmntManuEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
boolean b = anncmntManuService.save(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/edit")
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
public BaseResponse edit(@RequestBody @Valid AnncmntManuEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (entity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
AnncmntManuEntity originEntity = anncmntManuService.getById(entity.getId());
if (originEntity == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntManuService.updateById(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("修改成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/delete")
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (StringUtils.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntManuService.removeById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
public static QueryWrapper<AnncmntManuEntity> getQueryWrapper(AnncmntDevEntityRequest request) {
AnncmntManuEntity entity = new AnncmntManuEntity();
BeanCopyUtils.copy(request, entity);
QueryWrapper queryWrapper = new QueryWrapper(entity);
return queryWrapper;
}
}

@ -0,0 +1,126 @@
package com.glxp.api.controller.anno;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
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.entity.stat.AnncmntManuCertEntity;
import com.glxp.api.entity.stat.AnncmntProductBatchEntity;
import com.glxp.api.req.anno.AnncmntManuCertEntityRequest;
import com.glxp.api.req.anno.AnncmntProductBatchEntityRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.stat.AnncmntManuCertService;
import com.glxp.api.service.stat.AnncmntProductBatchService;
import com.glxp.api.util.BeanCopyUtils;
import com.glxp.api.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
/**
*
*
*/
@ApiIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/anno/anncmnt/product/batch")
public class AnncmntProductBatchController extends BaseController {
private final AnncmntProductBatchService anncmntProductBatchService;
@GetMapping("/list")
public BaseResponse list(AnncmntProductBatchEntityRequest request, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
IPage page = new Page(request.getPage(),request.getLimit());
IPage<AnncmntProductBatchEntity> pages = anncmntProductBatchService.page(page, getQueryWrapper(request));
PageSimpleResponse<AnncmntProductBatchEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pages.getTotal());
pageSimpleResponse.setList(pages.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/save")
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody AnncmntProductBatchEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
boolean b = anncmntProductBatchService.save(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/edit")
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
public BaseResponse edit(@RequestBody @Valid AnncmntProductBatchEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (entity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
AnncmntProductBatchEntity originEntity = anncmntProductBatchService.getById(entity.getId());
if (originEntity == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntProductBatchService.updateById(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("修改成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/delete")
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (StringUtils.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntProductBatchService.removeById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
public static QueryWrapper<AnncmntProductBatchEntity> getQueryWrapper(AnncmntProductBatchEntityRequest request) {
AnncmntProductBatchEntity entity = new AnncmntProductBatchEntity();
BeanCopyUtils.copy(request, entity);
QueryWrapper queryWrapper = new QueryWrapper(entity);
return queryWrapper;
}
}

@ -0,0 +1,126 @@
package com.glxp.api.controller.anno;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
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.entity.stat.AnncmntManuEntity;
import com.glxp.api.entity.stat.AnncmntProductEntity;
import com.glxp.api.req.anno.AnncmntDevEntityRequest;
import com.glxp.api.req.anno.AnncmntProductEntityRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.stat.AnncmntManuService;
import com.glxp.api.service.stat.AnncmntProductService;
import com.glxp.api.util.BeanCopyUtils;
import com.glxp.api.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
/**
*
*
*/
@ApiIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/anno/anncmnt/product")
public class AnncmntProductController extends BaseController {
private final AnncmntProductService anncmntProductService;
@GetMapping("/list")
public BaseResponse list(AnncmntProductEntityRequest request, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
IPage page = new Page(request.getPage(),request.getLimit());
IPage<AnncmntProductEntity> pages = anncmntProductService.page(page, getQueryWrapper(request));
PageSimpleResponse<AnncmntProductEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pages.getTotal());
pageSimpleResponse.setList(pages.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/save")
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody AnncmntProductEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
boolean b = anncmntProductService.save(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/edit")
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
public BaseResponse edit(@RequestBody @Valid AnncmntProductEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (entity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
AnncmntProductEntity originEntity = anncmntProductService.getById(entity.getId());
if (originEntity == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntProductService.updateById(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("修改成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/delete")
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (StringUtils.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntProductService.removeById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
public static QueryWrapper<AnncmntProductEntity> getQueryWrapper(AnncmntProductEntityRequest request) {
AnncmntProductEntity entity = new AnncmntProductEntity();
BeanCopyUtils.copy(request, entity);
QueryWrapper queryWrapper = new QueryWrapper(entity);
return queryWrapper;
}
}

@ -0,0 +1,141 @@
package com.glxp.api.controller.anno;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
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.auth.InvWarehouseEntity;
import com.glxp.api.entity.stat.AnncmntYlqxzcrEntity;
import com.glxp.api.req.anno.AnncmntYlqxzcrEntityRequest;
import com.glxp.api.req.auth.FilterInvWarehouseRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.stat.AnncmntYlqxzcrService;
import com.glxp.api.util.BeanCopyUtils;
import com.glxp.api.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
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;
/**
*
*
*/
@ApiIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/anno/anncmnt/ylqxzcr")
public class AnncmntYlqxzcrController extends BaseController {
private final AnncmntYlqxzcrService anncmntYlqxzcrService;
@GetMapping("/list")
public BaseResponse list(AnncmntYlqxzcrEntityRequest request, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
IPage page = new Page(request.getPage(),request.getLimit());
IPage<AnncmntYlqxzcrEntity> pages = anncmntYlqxzcrService.page(page, getQueryWrapper(request));
PageSimpleResponse<AnncmntYlqxzcrEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pages.getTotal());
pageSimpleResponse.setList(pages.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/save")
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody AnncmntYlqxzcrEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
entity.setCreateTime(new Date());
entity.setUdpateTime(new Date());
boolean b = anncmntYlqxzcrService.save(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/edit")
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
public BaseResponse edit(@RequestBody @Valid AnncmntYlqxzcrEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (entity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
AnncmntYlqxzcrEntity originEntity = anncmntYlqxzcrService.getById(entity.getId());
if (originEntity == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
entity.setUdpateTime(new Date());
boolean b = anncmntYlqxzcrService.updateById(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("修改成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/delete")
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (StringUtils.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntYlqxzcrService.removeById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
public static QueryWrapper<AnncmntYlqxzcrEntity> getQueryWrapper(AnncmntYlqxzcrEntityRequest request) {
AnncmntYlqxzcrEntity entity = new AnncmntYlqxzcrEntity();
BeanCopyUtils.copy(request, entity);
QueryWrapper queryWrapper = new QueryWrapper(entity);
return queryWrapper;
}
@GetMapping("getList")
public BaseResponse getList(AnncmntYlqxzcrEntityRequest request) {
List<AnncmntYlqxzcrEntity> list = anncmntYlqxzcrService.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);
}
}

@ -0,0 +1,141 @@
package com.glxp.api.controller.anno;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
import com.glxp.api.common.enums.ResultEnum;
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.stat.AnncmntYlqxzcrEntity;
import com.glxp.api.entity.stat.AnncmntYlqxzczhEntity;
import com.glxp.api.req.anno.AnncmntYlqxzcrEntityRequest;
import com.glxp.api.req.anno.AnncmntYlqxzczhEntityRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.stat.AnncmntYlqxzcrService;
import com.glxp.api.service.stat.AnncmntYlqxzczhService;
import com.glxp.api.util.BeanCopyUtils;
import com.glxp.api.util.StringUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
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;
/**
*
*
*/
@ApiIgnore
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/anno/anncmnt/ylqxzczh")
public class AnncmntYlqxzczhController extends BaseController {
private final AnncmntYlqxzczhService anncmntYlqxzczhService;
@GetMapping("/list")
public BaseResponse list(AnncmntYlqxzczhEntityRequest request, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
IPage page = new Page(request.getPage(),request.getLimit());
IPage<AnncmntYlqxzczhEntity> pages = anncmntYlqxzczhService.page(page, getQueryWrapper(request));
PageSimpleResponse<AnncmntYlqxzczhEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pages.getTotal());
pageSimpleResponse.setList(pages.getRecords());
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/save")
@Log(title = "器械公告管理", businessType = BusinessType.INSERT)
public BaseResponse save(@RequestBody AnncmntYlqxzczhEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
entity.setCreateTime(new Date());
entity.setUdpateTime(new Date());
boolean b = anncmntYlqxzczhService.save(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/edit")
@Log(title = "器械公告管理", businessType = BusinessType.UPDATE)
public BaseResponse edit(@RequestBody @Valid AnncmntYlqxzczhEntity entity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (entity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
AnncmntYlqxzczhEntity originEntity = anncmntYlqxzczhService.getById(entity.getId());
if (originEntity == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
entity.setUdpateTime(new Date());
boolean b = anncmntYlqxzczhService.updateById(entity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success("修改成功!");
}
@AuthRuleAnnotation("")
@PostMapping("/delete")
@Log(title = "器械公告管理", businessType = BusinessType.DELETE)
public BaseResponse delete(@RequestBody DeleteRequest deleteRequest) {
if (StringUtils.isEmpty(deleteRequest.getId())) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
boolean b = anncmntYlqxzczhService.removeById(deleteRequest.getId());
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success();
}
public static QueryWrapper<AnncmntYlqxzczhEntity> getQueryWrapper(AnncmntYlqxzczhEntityRequest request) {
AnncmntYlqxzczhEntity entity = new AnncmntYlqxzczhEntity();
BeanCopyUtils.copy(request, entity);
QueryWrapper queryWrapper = new QueryWrapper(entity);
return queryWrapper;
}
@GetMapping("getList")
public BaseResponse getList(AnncmntYlqxzcrEntityRequest request) {
List<AnncmntYlqxzczhEntity> list = anncmntYlqxzczhService.list();
List<DictDto> reList = list.stream().map(s-> {
DictDto dictDto = new DictDto(s.getRegCreditCode(),s.getRegCompanyName());
return dictDto;
}).collect(Collectors.toList());
return ResultVOUtils.success(reList);
}
}

@ -0,0 +1,20 @@
package com.glxp.api.dto;
import lombok.Data;
@Data
public class DictDto {
private String code;
private String label;
public DictDto(String code, String label) {
this.code = code;
this.label = label;
}
public DictDto(Integer code, String label) {
this.code = code.toString();
this.label = label;
}
}

@ -153,13 +153,13 @@ public class AnncmntManuEntity implements Serializable {
*
*/
@TableField(value = "approvalDate")
private Date approvalDate;
private String approvalDate;
/**
*
*/
@TableField(value = "expireDate")
private Date expireDate;
private String expireDate;
private static final long serialVersionUID = 1L;
}

@ -96,13 +96,13 @@ public class AnncmntYlqxzczhEntity implements Serializable {
*
*/
@TableField(value = "approvalDate")
private Date approvalDate;
private String approvalDate;
/**
*
*/
@TableField(value = "expireDate")
private Date expireDate;
private String expireDate;
/**
* :1:2:

@ -0,0 +1,95 @@
package com.glxp.api.req.anno;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class AnncmntManuCertEntityRequest extends ListPageRequest {
private Integer id;
/**
* /
*/
private String zczbhhzbapzbh;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String regCreditCode;
/**
*
*/
private String productName;
/**
*
*/
private String manuName;
/**
*
*/
private String manuCreditCode;
/**
*
*/
private Byte status;
/**
*
*/
private String errType;
/**
*
*/
private String errMsg;
/**
*
*/
private String remark;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private String updateUser;
/**
*
*/
private Date udpateTime;
/**
* 使
*/
private Date pauseStartTime;
/**
* 使
*/
private Date pauseEndTime;
}

@ -0,0 +1,129 @@
package com.glxp.api.req.anno;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class AnncmntManuEntityRequest extends ListPageRequest {
private Integer id;
/**
*
*/
private String name;
/**
*
*/
private String creditCode;
/**
*
*/
private String addr;
/**
*
*/
private String contact;
/**
*
*/
private String phone;
/**
*
*/
private String legalName;
/**
*
*/
private String spell;
/**
* 12
*/
private String status;
/**
*
*/
private String errType;
/**
*
*/
private String errMsg;
/**
*
*/
private String remark;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateUser;
/**
*
*/
private Date udpateTime;
/**
* 使
*/
private Date pauseStartTime;
/**
* 使
*/
private Date pauseEndTime;
/**
*
*/
private String productionCode;
/**
*
*/
private String productionRange;
/**
*
*/
private String productionAddr;
/**
*
*/
private String publicDept;
/**
*
*/
private String approvalDate;
/**
*
*/
private String expireDate;
}

@ -0,0 +1,90 @@
package com.glxp.api.req.anno;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class AnncmntProductBatchEntityRequest extends ListPageRequest {
private Integer id;
/**
* Id
*/
private String productIdFk;
/**
*
*/
private String productName;
/**
*
*/
private Integer batchNo;
/**
*
*/
private String productionDate;
/**
*
*/
private String expireDate;
/**
*
*/
private String status;
/**
*
*/
private String errType;
/**
*
*/
private String errMsg;
/**
*
*/
private String remark;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private Date udpateTime;
/**
*
*/
private String updateUser;
/**
* 使
*/
private Date pauseStartTime;
/**
* 使
*/
private Date pauseEndTime;
}

@ -0,0 +1,99 @@
package com.glxp.api.req.anno;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class AnncmntProductEntityRequest extends ListPageRequest {
private Integer id;
/**
*
*/
private String productName;
/**
*
*/
private String ggxh;
/**
* di/
*/
private String nameCode;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String regCreditCode;
/**
*
*/
private String manuName;
/**
*
*/
private String manuCreditCode;
/**
*
*/
private String status;
/**
*
*/
private String errType;
/**
*
*/
private String errMsg;
/**
*
*/
private String remark;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateUser;
/**
*
*/
private Date udpateTime;
/**
* 使
*/
private Date pauseStartTime;
/**
* 使
*/
private Date pauseEndTime;
}

@ -0,0 +1,99 @@
package com.glxp.api.req.anno;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class AnncmntYlqxzcrEntityRequest extends ListPageRequest {
/**
*
*/
private String name;
/**
*
*/
private String creditCode;
/**
*
*/
private String addr;
/**
*
*/
private String contact;
/**
*
*/
private String legalName;
/**
*
*/
private String spell;
/**
*
*/
private String phone;
/**
* 12
*/
private Byte status;
/**
*
*/
private String errType;
/**
*
*/
private String errMsg;
/**
*
*/
private String remark;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private String updateUser;
/**
*
*/
private Date udpateTime;
/**
* 使
*/
private Date pauseStartTime;
/**
* 使
*/
private Date pauseEndTime;
}

@ -0,0 +1,128 @@
package com.glxp.api.req.anno;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class AnncmntYlqxzczhEntityRequest extends ListPageRequest {
/**
* :1:
*/
private Integer id;
/**
*
*/
private String code;
/**
*
*/
private String productName;
/**
*
*/
private String ggxh;
/**
*
*/
private String regCompanyName;
/**
*
*/
private String regCreditCode;
/**
*
*/
private String agentName;
/**
*
*/
private String agentCertCode;
/**
*
*/
private String jgjzc;
/**
*
*/
private String useRange;
/**
*
*/
private String remark;
/**
*
*/
private String auditDept;
/**
*
*/
private String approvalDate;
/**
*
*/
private String expireDate;
/**
* :1:2:
*/
private String status;
/**
*
*/
private String errType;
/**
*
*/
private String errMsg;
/**
*
*/
private String createUser;
/**
*
*/
private Date createTime;
/**
*
*/
private String updateUser;
/**
*
*/
private Date udpateTime;
/**
* 使
*/
private Date pauseStartTime;
/**
* 使
*/
private Date pauseEndTime;
}
Loading…
Cancel
Save