Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pom.xml
cert
schry 2 years ago
commit 8627274717

@ -371,15 +371,10 @@
<artifactId>bcprov-jdk15to18</artifactId> <artifactId>bcprov-jdk15to18</artifactId>
<version>1.68</version> <version>1.68</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId> <artifactId>spring-boot-starter-amqp</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -0,0 +1,143 @@
package com.glxp.api.controller.basic;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.req.basic.BasicDictSelectRequest;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.service.basic.BasicUdiProductService;
import com.glxp.api.service.basic.ProductInfoService;
import com.glxp.api.util.udi.FilterUdiUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
@ApiIgnore
@Slf4j
@RestController
public class UdiProductController extends BaseController {
@Resource
BasicUdiProductService basicUdiProductService;
@Resource
ProductInfoService productInfoService;
//获取同步库UDI信息
@AuthRuleAnnotation("")
@ApiIgnore
@GetMapping("udi/basic/dict/filter")
public BaseResponse filterDict(FilterUdiRelRequest filterUdiRelRequest) {
String nameCode;
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode());
if (udiEntity != null) {
nameCode = udiEntity.getUdi();
} else {
return ResultVOUtils.error(500, "无效UDI码");
}
} else
nameCode = filterUdiRelRequest.getNameCode();
if (StrUtil.isNotEmpty(nameCode)) {
filterUdiRelRequest.setNameCode(nameCode);
} else {
filterUdiRelRequest.setDiType(1);
}
List<BasicUdiProductEntity> udiDlDeviceResponse = basicUdiProductService.filterList(filterUdiRelRequest);
PageInfo<BasicUdiProductEntity> basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse);
PageSimpleResponse<BasicUdiProductEntity> basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>();
basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal());
basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse);
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
//医疗器械信息字典编辑保存
@AuthRuleAnnotation("")
@PostMapping("udi/basic/dict/add")
public BaseResponse addDict(@RequestBody BasicDictSelectRequest basicDictSelectRequest) {
if (StrUtil.isNotEmpty(basicDictSelectRequest.getKey())) {
List<ProductInfoEntity> productInfoEntities = productInfoService.selectByUuid(basicDictSelectRequest.getKey());
if (CollUtil.isNotEmpty(productInfoEntities)) {
for (ProductInfoEntity productInfoEntity : productInfoEntities) {
BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity();
BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity);
basicUdiProductEntity.setUpdateTime(new Date());
basicUdiProductEntity.setUpdateUser(getUserId());
basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiProductService.save(basicUdiProductEntity);
}
}
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("udi/basic/dict/delete")
public BaseResponse addDict(@RequestBody DeleteRequest deleteRequest) {
if (StrUtil.isEmpty(deleteRequest.getUuid())) {
return ResultVOUtils.error(500, "uuid不能未空");
}
basicUdiProductService.remove(new QueryWrapper<BasicUdiProductEntity>().eq("uuid", deleteRequest.getUuid()));
return ResultVOUtils.success("删除成功!!");
}
//医疗器械信息字典编辑保存
@AuthRuleAnnotation("")
@PostMapping("udi/basic/dict/batchAdd")
public BaseResponse batchAdd(@RequestBody BasicDictSelectRequest basicDictSelectRequest) {
long userId = getUserId();
if (CollUtil.isNotEmpty(basicDictSelectRequest.getKeys())) {
for (String uuid : basicDictSelectRequest.getKeys()) {
if (!basicUdiProductService.isExit(uuid)) {
List<ProductInfoEntity> productInfoEntities = productInfoService.selectByUuid(uuid);
if (CollUtil.isNotEmpty(productInfoEntities)) {
for (ProductInfoEntity productInfoEntity : productInfoEntities) {
BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity();
BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity);
basicUdiProductEntity.setUpdateTime(new Date());
basicUdiProductEntity.setUpdateUser(userId);
basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiProductService.save(basicUdiProductEntity);
}
}
}
}
}
return ResultVOUtils.success("添加成功!");
}
//医疗器械信息字典编辑保存
@AuthRuleAnnotation("")
@PostMapping("udi/basic/dict/edit")
public BaseResponse editDict(@RequestBody BasicUdiProductEntity basicUdiProductEntity) {
basicUdiProductEntity.setUpdateTime(new Date());
basicUdiProductService.updateById(basicUdiProductEntity);
return ResultVOUtils.success("更新成功!");
}
}

@ -0,0 +1,159 @@
package com.glxp.api.controller.basic;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.basic.*;
import com.glxp.api.req.basic.*;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.*;
import com.glxp.api.util.udi.FilterUdiUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
*
*/
@Api(tags = "注册企业医疗器械信息绑定接口")
@Slf4j
@RestController
public class UdiRelController extends BaseController {
@Resource
BasicUdiRelService basicUdiRelService;
@Resource
CustomerService customerService;
@Resource
BasicUdiProductService basicUdiProductService;
@Resource
ProductInfoService productInfoService;
//获取同步库UDI信息
@AuthRuleAnnotation("")
@ApiIgnore
@GetMapping("udi/basic/rel/filter")
public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) {
String nameCode;
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode());
if (udiEntity != null) {
nameCode = udiEntity.getUdi();
} else {
return ResultVOUtils.error(500, "无效UDI码");
}
} else
nameCode = filterUdiRelRequest.getNameCode();
if (StrUtil.isNotEmpty(nameCode)) {
filterUdiRelRequest.setNameCode(nameCode);
} else {
filterUdiRelRequest.setDiType(1);
}
List<BasicUdiRelResponse> udiDlDeviceResponse = basicUdiRelService.filterList(filterUdiRelRequest);
PageInfo<BasicUdiRelResponse> basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse);
PageSimpleResponse<BasicUdiRelResponse> basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>();
basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal());
basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse);
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
//产品信息关联新增
@ApiIgnore
@AuthRuleAnnotation("")
@ApiOperation(value = "注册企业新增医疗器械信息", response = BaseResponse.class)
@PostMapping("udi/basic/rel/save")
public BaseResponse saveRel(@RequestBody BasicUdiBatchRelRequest basicUdiBatchRelRequest) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
BeanUtils.copyProperties(basicUdiBatchRelRequest, basicUdiRelEntity);
basicUdiRelEntity.setUpdateTime(new Date());
basicUdiRelEntity.setUpdateUser(customerService.getUserId() + "");
basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiRelService.save(basicUdiRelEntity);
return ResultVOUtils.success("添加成功!");
}
//产品信息关联新增
@AuthRuleAnnotation("")
@ApiOperation(value = "注册企业批量新增医疗器械信息", response = BaseResponse.class)
@PostMapping("udi/basic/rel/batch/save")
public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) {
String userId = customerService.getUserId() + "";
if (CollUtil.isNotEmpty(udiSelectRequest.getProducts())) {
for (BasicUdiRelRequest basicUdiRelRequest : udiSelectRequest.getProducts()) {
if (!basicUdiRelService.isExit(basicUdiRelRequest.getUuid(), udiSelectRequest.getCompanyId())) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
basicUdiRelEntity.setUuid(basicUdiRelRequest.getUuid());
basicUdiRelEntity.setCompanyIdFk(udiSelectRequest.getCompanyId());
basicUdiRelEntity.setUpdateTime(new Date());
basicUdiRelEntity.setUpdateUser(userId);
basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiRelService.save(basicUdiRelEntity);
List<ProductInfoEntity> productInfoEntities = productInfoService.selectByUuid(basicUdiRelRequest.getUuid());
if (CollUtil.isNotEmpty(productInfoEntities)) {
for (ProductInfoEntity productInfoEntity : productInfoEntities) {
// basicUdiProductService
BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity();
BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity);
basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiProductService.save(basicUdiProductEntity);
}
}
}
}
}
return ResultVOUtils.success("添加成功!");
}
@AuthRuleAnnotation("")
@PostMapping("udi/basic/rel/delete")
public BaseResponse deletRel(@RequestBody DeleteRequest deleteRequest) {
basicUdiRelService.removeById(deleteRequest.getId());
return ResultVOUtils.success("删除成功!");
}
//产品信息关联修改
@AuthRuleAnnotation("")
@PostMapping("udi/basic/rel/update")
public BaseResponse updateRel(@RequestBody BasicUdiRelRequest basicUdiRelRequest) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
BeanUtils.copyProperties(basicUdiRelRequest, basicUdiRelEntity);
basicUdiRelEntity.setUpdateTime(new Date());
basicUdiRelEntity.setUpdateUser(customerService.getUserId() + "");
basicUdiRelService.updateById(basicUdiRelEntity);
BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity();
basicUdiProductEntity.setUuid(basicUdiRelRequest.getUuid());
basicUdiProductEntity.setManufactory(basicUdiRelRequest.getManufactory());
basicUdiProductEntity.setMeasname(basicUdiRelRequest.getMeasname());
basicUdiProductEntity.setSpmc(basicUdiRelRequest.getSpmc());
basicUdiProductService.updateByUuid(basicUdiProductEntity);
return ResultVOUtils.success("添加成功!");
}
}

@ -1,53 +1,32 @@
package com.glxp.api.controller.basic; package com.glxp.api.controller.basic;
import java.util.ArrayList; import cn.hutool.core.util.StrUtil;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.auth.DeptUserEntity;
import com.glxp.api.entity.basic.*;
import com.glxp.api.req.auth.FilterDeptUserReqeust;
import com.glxp.api.req.basic.*;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.res.auth.AuthAdminResponse;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.basic.UdiRelevanceResponse;
import com.glxp.api.service.auth.CustomerService;
import com.glxp.api.service.basic.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.constant.AsyncDiDlHelper; import com.glxp.api.entity.basic.ProductInfoEntity;
import com.glxp.api.entity.basic.UdiCompanyEntity;
import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.basic.ProductInfoFilterRequest;
import com.glxp.api.req.basic.UdiCompanyRequest;
import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.service.basic.*;
import com.glxp.api.util.udi.FilterUdiUtils; import com.glxp.api.util.udi.FilterUdiUtils;
import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
/** import javax.annotation.Resource;
* import java.util.List;
*/
@Api(tags = "注册企业医疗器械信息绑定接口")
@Slf4j @Slf4j
@RestController @RestController
public class UdiSyncController extends BaseController { public class UdiSyncController {
@Resource @Resource
SyncUdiService syncUdiService; SyncUdiService syncUdiService;
@Resource @Resource
@ -57,8 +36,6 @@ public class UdiSyncController extends BaseController {
@Resource @Resource
BasicUdiRelService basicUdiRelService; BasicUdiRelService basicUdiRelService;
@Resource @Resource
CustomerService customerService;
@Resource
BasicUdiProductService basicUdiProductService; BasicUdiProductService basicUdiProductService;
//获取同步库UDI信息 //获取同步库UDI信息
@ -66,6 +43,38 @@ public class UdiSyncController extends BaseController {
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/filterUdi") @GetMapping("udiwms/udiinfo/filterUdi")
public BaseResponse filterUdi(FilterUdiRelRequest filterUdiRelRequest) { public BaseResponse filterUdi(FilterUdiRelRequest filterUdiRelRequest) {
String nameCode;
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode());
if (udiEntity != null) {
nameCode = udiEntity.getUdi();
} else {
return ResultVOUtils.error(500, "无效UDI码");
}
} else
nameCode = filterUdiRelRequest.getNameCode();
ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest();
BeanUtils.copyProperties(filterUdiRelRequest, productInfoFilterRequest);
if (StrUtil.isNotEmpty(nameCode)) {
productInfoFilterRequest.setNameCode(nameCode);
} else {
productInfoFilterRequest.setDiType("1");
}
try {
BaseResponse<PageSimpleResponse<ProductInfoEntity>> udiDlDeviceResponse = syncUdiService.filterUdi(productInfoFilterRequest);
return udiDlDeviceResponse;
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResultVOUtils.error(500, "连接UDI数据下载服务出错");
}
}
//获取同步库UDI信息
@ApiIgnore
@AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/dict/filter")
public BaseResponse filterDict(FilterUdiRelRequest filterUdiRelRequest) {
String nameCode; String nameCode;
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode()); UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode());
@ -91,7 +100,7 @@ public class UdiSyncController extends BaseController {
List<ProductInfoEntity> productInfoEntities = udiDlDeviceResponse.getData().getList(); List<ProductInfoEntity> productInfoEntities = udiDlDeviceResponse.getData().getList();
if (productInfoEntities != null && productInfoEntities.size() > 0) { if (productInfoEntities != null && productInfoEntities.size() > 0) {
for (ProductInfoEntity productInfoEntity : productInfoEntities) { for (ProductInfoEntity productInfoEntity : productInfoEntities) {
Boolean isExit = basicUdiRelService.isExit(productInfoEntity.getUuid(), filterUdiRelRequest.getCompanyId()); Boolean isExit = basicUdiProductService.isExit(productInfoEntity.getUuid());
if (isExit) { if (isExit) {
productInfoEntity.setCheck(true); productInfoEntity.setCheck(true);
} else } else
@ -108,26 +117,10 @@ public class UdiSyncController extends BaseController {
} }
//获取同步库医疗器械注册人信息
@ApiIgnore
@AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/filterCompany")
public BaseResponse filterCompany(UdiCompanyRequest udiCompanyRequest) {
try {
BaseResponse<PageSimpleResponse<UdiCompanyEntity>> udiDlDeviceResponse = syncUdiService.filterCompany(udiCompanyRequest);
return udiDlDeviceResponse;
} catch (Exception e) {
e.printStackTrace();
return ResultVOUtils.error(500, "连接UDI数据下载服务出错");
}
}
//获取同步库UDI信息 //获取同步库UDI信息
@AuthRuleAnnotation("")
@ApiIgnore @ApiIgnore
@GetMapping("udi/basic/rel/filter") @AuthRuleAnnotation("")
@GetMapping("udiwms/udiinfo/rel/filter")
public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) { public BaseResponse filterRel(FilterUdiRelRequest filterUdiRelRequest) {
String nameCode; String nameCode;
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) { if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
@ -139,87 +132,51 @@ public class UdiSyncController extends BaseController {
} }
} else } else
nameCode = filterUdiRelRequest.getNameCode(); nameCode = filterUdiRelRequest.getNameCode();
ProductInfoFilterRequest productInfoFilterRequest = new ProductInfoFilterRequest();
BeanUtils.copyProperties(filterUdiRelRequest, productInfoFilterRequest);
if (StrUtil.isNotEmpty(nameCode)) { if (StrUtil.isNotEmpty(nameCode)) {
filterUdiRelRequest.setNameCode(nameCode); productInfoFilterRequest.setNameCode(nameCode);
} else { } else {
filterUdiRelRequest.setDiType(1); productInfoFilterRequest.setDiType("1");
}
List<BasicUdiRelResponse> udiDlDeviceResponse = basicUdiRelService.filterList(filterUdiRelRequest);
PageInfo<BasicUdiRelResponse> basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse);
PageSimpleResponse<BasicUdiRelResponse> basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>();
basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal());
basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse);
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
}
//产品信息关联新增
@ApiIgnore
@AuthRuleAnnotation("")
@ApiOperation(value = "注册企业新增医疗器械信息", response = BaseResponse.class)
@PostMapping("udi/basic/rel/save")
public BaseResponse saveRel(@RequestBody BasicUdiReRequest basicUdiReRequest) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
BeanUtils.copyProperties(basicUdiReRequest, basicUdiRelEntity);
basicUdiRelEntity.setUpdateTime(new Date());
basicUdiRelEntity.setUpdateUser(customerService.getUserId() + "");
basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiRelService.save(basicUdiRelEntity);
return ResultVOUtils.success("添加成功!");
} }
try {
BaseResponse<PageSimpleResponse<ProductInfoEntity>> udiDlDeviceResponse = syncUdiService.filterUdi(productInfoFilterRequest);
//产品信息关联新增 if (udiDlDeviceResponse.getCode() == 20000) {
@AuthRuleAnnotation("") if (filterUdiRelRequest.getIsCheck() != null && filterUdiRelRequest.getIsCheck()) {
@ApiOperation(value = "注册企业批量新增医疗器械信息", response = BaseResponse.class) List<ProductInfoEntity> productInfoEntities = udiDlDeviceResponse.getData().getList();
@PostMapping("udi/basic/rel/batch/save") if (productInfoEntities != null && productInfoEntities.size() > 0) {
public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) {
String userId = customerService.getUserId() + "";
if (CollUtil.isNotEmpty(udiSelectRequest.getProducts())) {
for (BasicUdiRelRequest basicUdiRelRequest : udiSelectRequest.getProducts()) {
if (!basicUdiRelService.isExit(basicUdiRelRequest.getUuid(), udiSelectRequest.getCompanyId())) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity();
basicUdiRelEntity.setUuid(basicUdiRelRequest.getUuid());
basicUdiRelEntity.setCompanyIdFk(udiSelectRequest.getCompanyId());
basicUdiRelEntity.setUpdateTime(new Date());
basicUdiRelEntity.setUpdateUser(userId);
basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId());
basicUdiRelService.save(basicUdiRelEntity);
List<ProductInfoEntity> productInfoEntities = productInfoService.selectByUuid(basicUdiRelRequest.getUuid());
if (CollUtil.isNotEmpty(productInfoEntities)) {
for (ProductInfoEntity productInfoEntity : productInfoEntities) { for (ProductInfoEntity productInfoEntity : productInfoEntities) {
// basicUdiProductService Boolean isExit = basicUdiRelService.isExit(productInfoEntity.getUuid(), filterUdiRelRequest.getCompanyId());
BasicUdiProductEntity basicUdiProductEntity = new BasicUdiProductEntity(); if (isExit) {
BeanUtils.copyProperties(productInfoEntity, basicUdiProductEntity); productInfoEntity.setCheck(true);
basicUdiProductEntity.setId(IdUtil.getSnowflakeNextId()); } else
basicUdiProductService.save(basicUdiProductEntity); productInfoEntity.setCheck(false);
} }
} }
} }
} }
return udiDlDeviceResponse;
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResultVOUtils.error(500, "连接UDI数据下载服务出错");
} }
return ResultVOUtils.success("添加成功!");
} }
@AuthRuleAnnotation("")
@PostMapping("udi/basic/rel/delete")
public BaseResponse deletRel(@RequestBody DeleteRequest deleteRequest) {
basicUdiRelService.removeById(deleteRequest.getId());
return ResultVOUtils.success("删除成功!");
}
//产品信息关联修改 //获取同步库医疗器械注册人信息
@ApiIgnore
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@PostMapping("udi/basic/rel/update") @GetMapping("udiwms/udiinfo/filterCompany")
public BaseResponse updateRel(@RequestBody BasicUdiRelRequest basicUdiRelRequest) { public BaseResponse filterCompany(UdiCompanyRequest udiCompanyRequest) {
BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); try {
BeanUtils.copyProperties(basicUdiRelRequest, basicUdiRelEntity); BaseResponse<PageSimpleResponse<UdiCompanyEntity>> udiDlDeviceResponse = syncUdiService.filterCompany(udiCompanyRequest);
basicUdiRelEntity.setUpdateTime(new Date()); return udiDlDeviceResponse;
basicUdiRelEntity.setUpdateUser(customerService.getUserId() + ""); } catch (Exception e) {
basicUdiRelService.updateById(basicUdiRelEntity); e.printStackTrace();
return ResultVOUtils.success("添加成功!"); return ResultVOUtils.error(500, "连接UDI数据下载服务出错");
}
} }
@ -254,5 +211,5 @@ public class UdiSyncController extends BaseController {
return ResultVOUtils.success(udiInfoEntities); return ResultVOUtils.success(udiInfoEntities);
} }
}
}

@ -0,0 +1,58 @@
package com.glxp.api.controller.trace;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.req.trace.TraceManuDetailRequest;
import com.glxp.api.req.trace.TraceManuOrderRequest;
import com.glxp.api.req.trace.TraceRecordRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.trace.TraceManuCodeRellResponse;
import com.glxp.api.res.trace.TraceManuOrderResponse;
import com.glxp.api.res.trace.TraceRecordResponse;
import com.glxp.api.service.trace.TraceManuCodeRelService;
import com.glxp.api.service.trace.TraceManuOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import java.util.List;
@ApiIgnore
@RestController
@Slf4j
public class TraceManuOrderController {
@Resource
TraceManuOrderService traceManuOrderService;
@Resource
TraceManuCodeRelService traceManuCodeRelService;
@AuthRuleAnnotation("udi/trace/manu/order/filter")
@GetMapping("udi/trace/manu/order/filter")
public BaseResponse filterLogs(TraceManuOrderRequest traceManuOrderRequest) {
List<TraceManuOrderResponse> traceManuOrderResponses = traceManuOrderService.filterTraces(traceManuOrderRequest);
PageInfo<TraceManuOrderResponse> pageInfo = new PageInfo<>(traceManuOrderResponses);
PageSimpleResponse<TraceManuOrderResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(traceManuOrderResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("udi/trace/manu/order/relCode")
@GetMapping("udi/trace/manu/order/relCode")
public BaseResponse filterDetail(TraceManuDetailRequest traceManuDetailRequest) {
List<TraceManuCodeRellResponse> traceManuCodeRellResponses = traceManuCodeRelService.filterList(traceManuDetailRequest);
PageInfo<TraceManuCodeRellResponse> pageInfo = new PageInfo<>(traceManuCodeRellResponses);
PageSimpleResponse<TraceManuCodeRellResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(traceManuCodeRellResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
}

@ -2,8 +2,14 @@ package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper @Mapper
public interface BasicUdiProductMapper extends BaseMapper<BasicUdiProductEntity> { public interface BasicUdiProductMapper extends BaseMapper<BasicUdiProductEntity> {
List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest);
} }

@ -1,9 +0,0 @@
package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.basic.BasicUdiRelEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface BasicUdiRelEntityMapper extends BaseMapper<BasicUdiRelEntity> {
}

@ -2,8 +2,15 @@ package com.glxp.api.dao.trace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.trace.TraceManuOrderEntity; import com.glxp.api.entity.trace.TraceManuOrderEntity;
import com.glxp.api.req.trace.TraceManuOrderRequest;
import com.glxp.api.res.trace.TraceManuOrderResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper @Mapper
public interface TraceManuOrderMapper extends BaseMapper<TraceManuOrderEntity> { public interface TraceManuOrderMapper extends BaseMapper<TraceManuOrderEntity> {
List<TraceManuOrderResponse> filterTraces(TraceManuOrderRequest traceManuOrderRequest);
} }

@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
@Data @Data
@ -46,7 +48,7 @@ public class BasicUdiProductEntity implements Serializable {
/** /**
* 使: * 使:
使 * 使
*/ */
@TableField(value = "zxxsbzbhsydysl") @TableField(value = "zxxsbzbhsydysl")
private Integer zxxsbzbhsydysl; private Integer zxxsbzbhsydysl;
@ -85,7 +87,7 @@ public class BasicUdiProductEntity implements Serializable {
* 使 * 使
*/ */
@TableField(value = "isUseDy") @TableField(value = "isUseDy")
private Byte isUseDy; private Integer isUseDy;
/** /**
* ERP * ERP
@ -175,7 +177,7 @@ public class BasicUdiProductEntity implements Serializable {
* 1.2使3.4 * 1.2使3.4
*/ */
@TableField(value = "diType") @TableField(value = "diType")
private Byte diType; private Integer diType;
/** /**
* *
@ -226,7 +228,7 @@ public class BasicUdiProductEntity implements Serializable {
* *
*/ */
@TableField(value = "isNewest") @TableField(value = "isNewest")
private Byte isNewest; private Boolean isNewest;
/** /**
* *
@ -254,7 +256,7 @@ public class BasicUdiProductEntity implements Serializable {
/** /**
* MR 0 1 28 * MR 0 1 28
3 MR * 3 MR
*/ */
@TableField(value = "cgzmraqxgxx") @TableField(value = "cgzmraqxgxx")
private String cgzmraqxgxx; private String cgzmraqxgxx;
@ -301,5 +303,15 @@ public class BasicUdiProductEntity implements Serializable {
@TableField(value = "categoryName") @TableField(value = "categoryName")
private String categoryName; private String categoryName;
@TableField(value = "manufactory")
private String manufactory;
@TableField(value = "measname")
private String measname;
@TableField(value = "remark")
private String remark;
@TableField(value = "updateUser")
private Long updateUser;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

@ -4,14 +4,16 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import lombok.Data; import lombok.Data;
@Data @Data
@TableName(value = "trace_manu_code_rel") @TableName(value = "trace_manu_code_rel")
public class TraceManuCodeRelEntity implements Serializable { public class TraceManuCodeRelEntity implements Serializable {
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Integer id; private Long id;
/** /**
* UDI * UDI
@ -53,13 +55,13 @@ public class TraceManuCodeRelEntity implements Serializable {
* 1.;2: 3: 4: * 1.;2: 3: 4:
*/ */
@TableField(value = "packState") @TableField(value = "packState")
private Byte packState; private Integer packState;
/** /**
* *
*/ */
@TableField(value = "bzcj") @TableField(value = "bzcj")
private Byte bzcj; private Integer bzcj;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

@ -0,0 +1,12 @@
package com.glxp.api.req.basic;
import lombok.Data;
import java.util.List;
@Data
public class BasicDictSelectRequest {
private String key;
private List<String> keys;
}

@ -9,7 +9,7 @@ import lombok.Data;
import java.util.Date; import java.util.Date;
@Data @Data
public class BasicUdiReRequest { public class BasicUdiBatchRelRequest {
/** /**

@ -45,4 +45,11 @@ public class BasicUdiRelRequest {
private Date agengtStartDate; private Date agengtStartDate;
private Date agengtEndDate; private Date agengtEndDate;
// 器械字典设置
private String manufactory;
private String measname;
private String spmc;
} }

@ -12,4 +12,5 @@ public class DeleteRequest {
String billNo; String billNo;
List<String> billNos; List<String> billNos;
Integer dlType; //1:同步任务2下载记录 Integer dlType; //1:同步任务2下载记录
String uuid;
} }

@ -0,0 +1,53 @@
package com.glxp.api.req.trace;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
@Data
public class TraceManuDetailRequest {
private Long id;
/**
* UDI
*/
private String code;
/**
*
*/
private String pcode;
/**
*
*/
private String batchNo;
/**
*
*/
private String produceDate;
/**
*
*/
private String expireDate;
/**
*
*/
private String serialNo;
/**
* 1.;2: 3: 4:
*/
private Integer packState;
/**
*
*/
private Integer bzcj;
}

@ -0,0 +1,77 @@
package com.glxp.api.req.trace;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.util.Date;
@Data
public class TraceManuOrderRequest extends ListPageRequest {
private Long id;
/**
*
*/
private String billNo;
/**
*
*/
private String billDate;
/**
*
*/
private String cpmctymc;
/**
*
*/
private String ggxh;
/**
*
*/
private String cpms;
/**
* /
*/
private String zczbhhzbapzbh;
/**
* DI
*/
private String nameCode;
/**
* UUID
*/
private String uuid;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String manufactory;
/**
*
*/
private Date updateTime;
/**
* ID
*/
private Long companyIdFk;
/**
* ID
*/
private Long uploadUser;
}

@ -0,0 +1,79 @@
package com.glxp.api.res.trace;
import lombok.Data;
import java.util.Date;
@Data
public class TraceManuCodeRellResponse {
private Long id;
/**
*
*/
private String billNo;
/**
*
*/
private String billDate;
/**
*
*/
private String cpmctymc;
/**
*
*/
private String ggxh;
/**
*
*/
private String cpms;
/**
* /
*/
private String zczbhhzbapzbh;
/**
* DI
*/
private String nameCode;
/**
* UUID
*/
private String uuid;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String manufactory;
/**
*
*/
private Date updateTime;
/**
* ID
*/
private Long companyIdFk;
/**
* ID
*/
private Long uploadUser;
}

@ -0,0 +1,80 @@
package com.glxp.api.res.trace;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.util.Date;
@Data
public class TraceManuOrderResponse {
private Long id;
/**
*
*/
private String billNo;
/**
*
*/
private String billDate;
/**
*
*/
private String cpmctymc;
/**
*
*/
private String ggxh;
/**
*
*/
private String cpms;
/**
* /
*/
private String zczbhhzbapzbh;
/**
* DI
*/
private String nameCode;
/**
* UUID
*/
private String uuid;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String manufactory;
/**
*
*/
private Date updateTime;
/**
* ID
*/
private Long companyIdFk;
/**
* ID
*/
private Long uploadUser;
}

@ -1,8 +1,18 @@
package com.glxp.api.service.basic; package com.glxp.api.service.basic;
import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.basic.BasicUdiProductEntity;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse;
import java.util.List;
public interface BasicUdiProductService extends IService<BasicUdiProductEntity> { public interface BasicUdiProductService extends IService<BasicUdiProductEntity> {
public boolean isExit(String uuid);
public List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest);
boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity);
} }

@ -1,11 +1,37 @@
package com.glxp.api.service.basic; package com.glxp.api.service.basic;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.entity.basic.BasicUdiRelEntity;
import com.glxp.api.req.basic.FilterUdiRelRequest;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.dao.basic.BasicUdiProductMapper; import com.glxp.api.dao.basic.BasicUdiProductMapper;
import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.BasicUdiProductEntity;
import javax.annotation.Resource;
import java.util.List;
@Service @Service
public class BasicUdiProductServiceImpl extends ServiceImpl<BasicUdiProductMapper, BasicUdiProductEntity> implements BasicUdiProductService { public class BasicUdiProductServiceImpl extends ServiceImpl<BasicUdiProductMapper, BasicUdiProductEntity> implements BasicUdiProductService {
@Resource
BasicUdiProductMapper basicUdiProductMapper;
@Override
public boolean isExit(String uuid) {
return basicUdiProductMapper.exists(new QueryWrapper<BasicUdiProductEntity>().eq("uuid", uuid));
}
@Override
public List<BasicUdiProductEntity> filterList(FilterUdiRelRequest filterUdiRelRequest) {
if (null != filterUdiRelRequest.getPage() && null != filterUdiRelRequest.getLimit()) {
PageHelper.offsetPage((filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit(), filterUdiRelRequest.getLimit());
}
return basicUdiProductMapper.filterList(filterUdiRelRequest);
}
@Override
public boolean updateByUuid(BasicUdiProductEntity basicUdiProductEntity) {
return basicUdiProductMapper.update(basicUdiProductEntity, new QueryWrapper<BasicUdiProductEntity>().eq("uuid", basicUdiProductEntity.getUuid())) > 0;
}
} }

@ -1,6 +1,7 @@
package com.glxp.api.service.basic; package com.glxp.api.service.basic;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse; import com.glxp.api.res.basic.BasicUdiRelResponse;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -22,6 +23,9 @@ public class BasicUdiRelService extends ServiceImpl<BasicUdiRelMapper, BasicUdiR
} }
public List<BasicUdiRelResponse> filterList(FilterUdiRelRequest filterUdiRelRequest) { public List<BasicUdiRelResponse> filterList(FilterUdiRelRequest filterUdiRelRequest) {
if (null != filterUdiRelRequest.getPage() && null != filterUdiRelRequest.getLimit()) {
PageHelper.offsetPage((filterUdiRelRequest.getPage() - 1) * filterUdiRelRequest.getLimit(), filterUdiRelRequest.getLimit());
}
return basicUdiRelMapper.filterList(filterUdiRelRequest); return basicUdiRelMapper.filterList(filterUdiRelRequest);
} }
} }

@ -2,7 +2,12 @@ package com.glxp.api.service.trace;
import com.glxp.api.entity.trace.TraceManuCodeRelEntity; import com.glxp.api.entity.trace.TraceManuCodeRelEntity;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
public interface TraceManuCodeRelService extends IService<TraceManuCodeRelEntity>{ import com.glxp.api.req.trace.TraceManuDetailRequest;
import com.glxp.api.res.trace.TraceManuCodeRellResponse;
import java.util.List;
public interface TraceManuCodeRelService extends IService<TraceManuCodeRelEntity> {
List<TraceManuCodeRellResponse> filterList(TraceManuDetailRequest traceManuDetailRequest);
} }

@ -1,11 +1,19 @@
package com.glxp.api.service.trace; package com.glxp.api.service.trace;
import com.glxp.api.req.trace.TraceManuDetailRequest;
import com.glxp.api.res.trace.TraceManuCodeRellResponse;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.entity.trace.TraceManuCodeRelEntity; import com.glxp.api.entity.trace.TraceManuCodeRelEntity;
import com.glxp.api.dao.trace.TraceManuCodeRelMapper; import com.glxp.api.dao.trace.TraceManuCodeRelMapper;
import java.util.List;
@Service @Service
public class TraceManuCodeRelServiceImpl extends ServiceImpl<TraceManuCodeRelMapper, TraceManuCodeRelEntity> implements TraceManuCodeRelService { public class TraceManuCodeRelServiceImpl extends ServiceImpl<TraceManuCodeRelMapper, TraceManuCodeRelEntity> implements TraceManuCodeRelService {
@Override
public List<TraceManuCodeRellResponse> filterList(TraceManuDetailRequest traceManuDetailRequest) {
return null;
}
} }

@ -2,7 +2,14 @@ package com.glxp.api.service.trace;
import com.glxp.api.entity.trace.TraceManuOrderEntity; import com.glxp.api.entity.trace.TraceManuOrderEntity;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
public interface TraceManuOrderService extends IService<TraceManuOrderEntity>{ import com.glxp.api.req.trace.TraceManuOrderRequest;
import com.glxp.api.req.trace.TraceRecordRequest;
import com.glxp.api.res.trace.TraceManuOrderResponse;
import com.glxp.api.res.trace.TraceRecordResponse;
import java.util.List;
public interface TraceManuOrderService extends IService<TraceManuOrderEntity> {
List<TraceManuOrderResponse> filterTraces(TraceManuOrderRequest traceManuOrderRequest);
} }

@ -1,11 +0,0 @@
package com.glxp.api.service.trace;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.entity.trace.TraceManuOrderEntity;
import com.glxp.api.dao.trace.TraceManuOrderMapper;
@Service
public class TraceManuOrderServiceImpl extends ServiceImpl<TraceManuOrderMapper, TraceManuOrderEntity> implements TraceManuOrderService{
}

@ -0,0 +1,39 @@
package com.glxp.api.service.trace.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.trace.TraceRecordMapper;
import com.glxp.api.req.trace.TraceManuOrderRequest;
import com.glxp.api.req.trace.TraceRecordRequest;
import com.glxp.api.res.trace.TraceManuOrderResponse;
import com.glxp.api.res.trace.TraceRecordResponse;
import com.glxp.api.service.trace.TraceManuOrderService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.entity.trace.TraceManuOrderEntity;
import com.glxp.api.dao.trace.TraceManuOrderMapper;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class TraceManuOrderServiceImpl extends ServiceImpl<TraceManuOrderMapper, TraceManuOrderEntity> implements TraceManuOrderService {
@Resource
TraceManuOrderMapper traceManuOrderMapper;
@Override
public List<TraceManuOrderResponse> filterTraces(TraceManuOrderRequest traceManuOrderRequest) {
if (traceManuOrderRequest == null) {
return Collections.emptyList();
}
if (traceManuOrderRequest.getPage() != null) {
int offset = (traceManuOrderRequest.getPage() - 1) * traceManuOrderRequest.getLimit();
PageHelper.offsetPage(offset, traceManuOrderRequest.getLimit());
}
return traceManuOrderMapper.filterTraces(traceManuOrderRequest);
}
}

@ -1,5 +1,6 @@
package com.glxp.api.service.trace; package com.glxp.api.service.trace.impl;
import com.glxp.api.service.trace.TraceTaskNoticeService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.entity.trace.TraceTaskNoticeEntity; import com.glxp.api.entity.trace.TraceTaskNoticeEntity;

@ -1,4 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.basic.BasicUdiProductMapper"> <mapper namespace="com.glxp.api.dao.basic.BasicUdiProductMapper">
<select id="filterList" parameterType="com.glxp.api.req.basic.FilterUdiRelRequest"
resultType="com.glxp.api.entity.basic.BasicUdiProductEntity">
select *
FROM basic_udi_product
<where>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
AND ylqxzcrbarmc LIKE concat('%', #{ylqxzcrbarmc}, '%')
</if>
<if test="cpmctymc != '' and cpmctymc != null">
AND cpmctymc LIKE concat('%', #{cpmctymc}, '%')
</if>
<if test="nameCode != '' and nameCode != null">
AND nameCode LIKE concat(#{nameCode}, '%')
</if>
<if test="uuid != '' and uuid != null">
AND uuid = #{uuid}
</if>
<if test="id != '' and id != null">
AND id = #{id}
</if>
<if test="diType != null">
AND diType = #{diType}
</if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
AND zczbhhzbapzbh LIKE concat(#{zczbhhzbapzbh}, '%')
</if>
<if test="lastUpdateTime != null and lastUpdateTime != ''">
<![CDATA[
and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S') >=
DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S')
]]>
</if>
<if test="unionFilterStr != '' and unionFilterStr != null">
or cpmctymc LIKE concat('%', #{unionFilterStr}, '%')
or ylqxzcrbarmc LIKE concat('%', #{unionFilterStr}, '%')
or ggxh LIKE concat('%', #{unionFilterStr}, '%')
or zczbhhzbapzbh LIKE concat('%', #{unionFilterStr}, '%')
</if>
<if test="uniqueNameCode != '' and uniqueNameCode != null">
AND nameCode = #{uniqueNameCode}
</if>
</where>
ORDER BY updateTime DESC
</select>
</mapper> </mapper>

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.basic.BasicUdiRelEntityMapper">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicUdiRelEntity">
<!--@mbg.generated-->
<!--@Table basic_udi_rel-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
<result column="companyIdFk" jdbcType="BIGINT" property="companyIdFk" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, uuid, companyIdFk, updateTime, remark, updateUser
</sql>
</mapper>

@ -1,4 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.trace.TraceManuOrderMapper"> <mapper namespace="com.glxp.api.dao.trace.TraceManuOrderMapper">
<select id="filterTraces" parameterType="com.glxp.api.req.trace.TraceManuOrderRequest"
resultType="com.glxp.api.res.trace.TraceManuOrderResponse">
select *
from trace_manu_order
<where>
<if test="id != '' and id != null">
and id = #{id}
</if>
<if test="billNo != '' and billNo != null">
and billNo = #{billNo}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
and cpmctymc = #{cpmctymc}
</if>
<if test="ggxh != '' and ggxh != null">
and `ggxh` = #{ggxh}
</if>
<if test="zczbhhzbapzbh != '' and zczbhhzbapzbh != null">
and zczbhhzbapzbh = #{zczbhhzbapzbh}
</if>
<if test="nameCode != '' and nameCode != null">
and nameCode = #{nameCode}
</if>
<if test="uuid != '' and uuid != null">
and uuid = #{uuid}
</if>
<if test="ylqxzcrbarmc != '' and ylqxzcrbarmc != null">
and `ylqxzcrbarmc` = #{ylqxzcrbarmc}
</if>
<if test="nameCode != '' and nameCode != null">
and nameCode = #{nameCode}
</if>
<if test="cpmctymc != '' and cpmctymc != null">
and cpmctymc = #{cpmctymc}
</if>
<if test="ggxh != '' and ggxh != null">
and ggxh = #{ggxh}
</if>
<if test="manufactory != '' and manufactory != null">
and `manufactory` = #{manufactory}
</if>
</where>
ORDER BY id DESC
</select>
</mapper> </mapper>

@ -10,6 +10,8 @@ CALL Pro_Temp_ColumnWork('user_register', 'xemail', 'varchar(255)', 1);
-- CALL Pro_Temp_ColumnWork('user_company', 'reason', 'varchar(255)', 1); -- CALL Pro_Temp_ColumnWork('user_company', 'reason', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('user_register', 'fmobile', 'varchar(255)', 1); CALL Pro_Temp_ColumnWork('user_register', 'fmobile', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('trace_order', 'recordCodeFk', 'varchar(255)', 1);

Loading…
Cancel
Save