From 083d78d348e9e9695981dd570f28280bee1aa333 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 16 May 2023 11:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9F=BA=E7=A1=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=BB=B4=E6=8A=A4=EF=BC=8C=E4=BC=81=E4=B8=9A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/auth/RegisterController.java | 19 ++-- .../controller/auth/UserComanyController.java | 36 +++++++ .../controller/basic/UdiSyncController.java | 95 +++++++++++++---- .../glxp/api/dao/auth/UserCompanyMapper.java | 9 ++ .../dao/basic/BasicUdiRelEntityMapper.java | 9 ++ .../glxp/api/dao/basic/BasicUdiRelMapper.java | 16 +++ .../api/entity/auth/UserCompanyEntity.java | 86 +++++++++++++++ .../api/entity/basic/BasicUdiRelEntity.java | 48 +++++++++ .../req/auth/FilterUserComapanyRequest.java | 11 ++ .../glxp/api/req/basic/BasicUdiReRequest.java | 39 +++++++ .../api/req/basic/FilterUdiRelRequest.java | 2 + .../api/res/basic/BasicUdiRelResponse.java | 100 ++++++++++++++++++ .../api/service/auth/UserCompanyService.java | 9 ++ .../auth/impl/UserCompanyServiceImpl.java | 11 ++ .../api/service/basic/BasicUdiRelService.java | 27 +++++ src/main/resources/application-dev.yml | 4 +- .../mybatis/mapper/auth/UserCompanyMapper.xml | 4 + .../mapper/basic/BasicUdiRelEntityMapper.xml | 18 ++++ .../mapper/basic/BasicUdiRelMapper.xml | 49 +++++++++ 19 files changed, 557 insertions(+), 35 deletions(-) create mode 100644 src/main/java/com/glxp/api/controller/auth/UserComanyController.java create mode 100644 src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java create mode 100644 src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java create mode 100644 src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java create mode 100644 src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java create mode 100644 src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java create mode 100644 src/main/java/com/glxp/api/req/auth/FilterUserComapanyRequest.java create mode 100644 src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java create mode 100644 src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java create mode 100644 src/main/java/com/glxp/api/service/auth/UserCompanyService.java create mode 100644 src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java create mode 100644 src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java create mode 100644 src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml create mode 100644 src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml create mode 100644 src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml diff --git a/src/main/java/com/glxp/api/controller/auth/RegisterController.java b/src/main/java/com/glxp/api/controller/auth/RegisterController.java index f442d48..97aee87 100644 --- a/src/main/java/com/glxp/api/controller/auth/RegisterController.java +++ b/src/main/java/com/glxp/api/controller/auth/RegisterController.java @@ -23,7 +23,6 @@ import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.entity.auth.UserPersonEntity; import com.glxp.api.entity.auth.UserRegisterEntity; -import com.glxp.api.req.auth.UserResisterFilterRequest; import com.glxp.api.service.auth.UserPersonService; import com.glxp.api.service.auth.UserRegisterService; import com.glxp.api.util.CaptchaUtils; @@ -40,19 +39,19 @@ public class RegisterController { private UserRegisterService userRegisterService; @Resource private UserPersonService userPersonService; - + @PostMapping("/admin/auth/register/getCheckcode") public BaseResponse getCheckcode(@RequestBody Map params, HttpSession httpSession) { logger.info("---------------"+JSON.toJSONString(params)); return CaptchaUtils.getCheckcode(params,httpSession); } - + @PostMapping("/admin/auth/register/checkCode") public BaseResponse checkCode(@RequestBody Map params) { logger.info("---------------"+JSON.toJSONString(params)); return CaptchaUtils.checkCode(params); } - + /** * 根据手机号获取注册信息 * @@ -70,14 +69,14 @@ public class RegisterController { } return ResultVOUtils.success(userRegisterEntity); } - + @PostMapping("/admin/auth/register/save") public BaseResponse saveRegister(@RequestBody @Valid UserRegisterEntity userRegisterEntity, HttpSession httpSession, BindingResult bindingResult) { if (bindingResult.hasErrors()) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } - + //校验邮箱是否正确 if (StrUtil.isNotBlank(userRegisterEntity.getEmail())) { boolean match = ReUtil.isMatch("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", userRegisterEntity.getEmail()); @@ -87,7 +86,7 @@ public class RegisterController { } UserRegisterEntity userRegisterEntity2 = userRegisterService.selectByCompanyName(userRegisterEntity.getCompanyName()); if (userRegisterEntity2 !=null ) { - if(StringUtils.isEmpty(userRegisterEntity.getId())) + if(StringUtils.isEmpty(userRegisterEntity.getId())) return ResultVOUtils.error(500, "该单位已被注册!"); if(!userRegisterEntity2.getId().equals(userRegisterEntity.getId())) return ResultVOUtils.error(500, "该单位已被注册!"); @@ -100,14 +99,14 @@ public class RegisterController { } else { b = userRegisterService.insertUserRegister(userRegisterEntity); } - + if (!b) { return ResultVOUtils.error(ResultEnum.NOT_NETWORK); } - + return ResultVOUtils.success(); } - + @GetMapping("/admin/auth/register/list") public BaseResponse list(UserResisterFilterRequest userResisterFilterRequest, BindingResult bindingResult) { if (bindingResult.hasErrors()) { diff --git a/src/main/java/com/glxp/api/controller/auth/UserComanyController.java b/src/main/java/com/glxp/api/controller/auth/UserComanyController.java new file mode 100644 index 0000000..9f8f17a --- /dev/null +++ b/src/main/java/com/glxp/api/controller/auth/UserComanyController.java @@ -0,0 +1,36 @@ +package com.glxp.api.controller.auth; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +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.auth.UserCompanyEntity; +import com.glxp.api.req.auth.FilterUserComapanyRequest; +import com.glxp.api.service.auth.UserCompanyService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +@RestController +@Slf4j +public class UserComanyController extends BaseController { + + @Resource + UserCompanyService userCompanyService; + + + // 关键字搜索 + @AuthRuleAnnotation("") + @GetMapping("udi/auth/user/comapny/search") + public BaseResponse search(FilterUserComapanyRequest filterUserComapanyRequest) { + //获取部门id + List userCompanyEntities = userCompanyService.list(new QueryWrapper().like("companyName", filterUserComapanyRequest.getSearchKey()) + .or().like("creditNum", filterUserComapanyRequest.getSearchKey())); + return ResultVOUtils.success(userCompanyEntities); + } + +} diff --git a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java index 3302e85..e1e07da 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java @@ -1,11 +1,24 @@ package com.glxp.api.controller.basic; +import java.util.Date; import java.util.List; import javax.annotation.Resource; +import cn.hutool.core.util.IdUtil; +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.BasicUdiReRequest; +import com.glxp.api.res.auth.AuthAdminResponse; +import com.glxp.api.res.basic.BasicUdiRelResponse; +import com.glxp.api.service.auth.CustomerService; +import com.glxp.api.service.basic.BasicUdiRelService; +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; @@ -13,11 +26,6 @@ import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.common.res.BaseResponse; 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.entity.basic.UdiProductEntity; -import com.glxp.api.entity.basic.UdiRelevanceEntity; import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.basic.ProductInfoFilterRequest; import com.glxp.api.req.basic.UdiCompanyRequest; @@ -40,11 +48,13 @@ public class UdiSyncController { @Resource SyncUdiService syncUdiService; @Resource - AsyncDiDlHelper asyncDiDlHelper; - @Resource ProductInfoService productInfoService; @Resource UdiCompanyService udiCompanyService; + @Resource + BasicUdiRelService basicUdiRelService; + @Resource + CustomerService customerService; //获取同步库UDI信息 @@ -76,22 +86,11 @@ public class UdiSyncController { List productInfoEntities = udiDlDeviceResponse.getData().getList(); if (productInfoEntities != null && productInfoEntities.size() > 0) { for (ProductInfoEntity productInfoEntity : productInfoEntities) { -// List udiRelevanceEntities = udiRelevanceService.selectByUuid(productInfoEntity.getUuid()); -// if (udiRelevanceEntities != null && udiRelevanceEntities.size() > 0) { -// for (UdiRelevanceEntity udiRelevanceEntity : udiRelevanceEntities) { -// if (udiRelevanceEntity.getThirdId() == null && -// udiRelevanceEntity.getThirdId2() == null && udiRelevanceEntity.getThirdId1() == null && -// udiRelevanceEntity.getThirdId3() == null && udiRelevanceEntity.getThirdId4() == null) { -// //不能添加 -// productInfoEntity.setCheck(true); -// break; -// } else -// productInfoEntity.setCheck(false); -// } -// -// } else { -// productInfoEntity.setCheck(false); -// } + Boolean isExit = basicUdiRelService.isExit(productInfoEntity.getUuid(), filterUdiRelRequest.getCompanyId()); + if (isExit) { + productInfoEntity.setCheck(true); + } else + productInfoEntity.setCheck(false); } } } @@ -119,6 +118,56 @@ public class UdiSyncController { } + //获取同步库UDI信息 + @AuthRuleAnnotation("") + @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 udiDlDeviceResponse = basicUdiRelService.filterList(filterUdiRelRequest); + PageInfo basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse); + PageSimpleResponse basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>(); + basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal()); + basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse); + return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse); + } + + //产品信息关联新增 + @AuthRuleAnnotation("") + @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("添加成功!"); + } + + //产品信息关联修改 + @AuthRuleAnnotation("") + @PostMapping("udi/basic/rel/update") + public BaseResponse updateRel(@RequestBody BasicUdiRelEntity basicUdiRelEntity) { + basicUdiRelEntity.setUpdateTime(new Date()); + basicUdiRelEntity.setUpdateUser(customerService.getUserId() + ""); + basicUdiRelService.updateById(basicUdiRelEntity); + return ResultVOUtils.success("添加成功!"); + } + //出入库同步下载 @GetMapping("udidl/udiwms/syncUdi") diff --git a/src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java b/src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java new file mode 100644 index 0000000..528f0a1 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.auth; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.auth.UserCompanyEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface UserCompanyMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java new file mode 100644 index 0000000..d2e4da2 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelEntityMapper.java @@ -0,0 +1,9 @@ +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 { +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java new file mode 100644 index 0000000..e62903e --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/BasicUdiRelMapper.java @@ -0,0 +1,16 @@ +package com.glxp.api.dao.basic; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.basic.BasicUdiRelEntity; +import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.res.basic.BasicUdiRelResponse; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface BasicUdiRelMapper extends BaseMapper { + + + List filterList(FilterUdiRelRequest filterUdiRelRequest); +} diff --git a/src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java b/src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java new file mode 100644 index 0000000..ecfe14f --- /dev/null +++ b/src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java @@ -0,0 +1,86 @@ +package com.glxp.api.entity.auth; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.io.Serializable; +import java.util.Date; + +import lombok.Data; + +@Data +@TableName(value = "user_company") +public class UserCompanyEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + private Long id; + + /** + * 企业名称 + */ + @TableField(value = "companyName") + private String companyName; + + /** + * 统一社会信用号 + */ + @TableField(value = "creditNum") + private String creditNum; + + /** + * 企业类型 1生产企业,2流通企业,3,医疗机构.4.监管机构 + */ + @TableField(value = "bussinessStatus") + private String bussinessStatus; + + /** + * 注册时间 + */ + @TableField(value = "registerTime") + private Date registerTime; + + /** + * 法人名称 + */ + @TableField(value = "legalPerson") + private String legalPerson; + + /** + * 法人身份证 + */ + @TableField(value = "legalIdCard") + private String legalIdCard; + + /** + * 注册地址 + */ + @TableField(value = "registerAddress") + private String registerAddress; + + /** + * 联系方式 + */ + @TableField(value = "contactWay") + private String contactWay; + + /** + * 备注 + */ + @TableField(value = "comments") + private String comments; + + /** + * 审核状态 0 未提交/3 已提交未审核/1 审核通过/2 审核未通过 + */ + @TableField(value = "checkStatus") + private String checkStatus; + + /** + * 状态1 正常,0 禁用 + */ + @TableField(value = "`status`") + private String status; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java b/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java new file mode 100644 index 0000000..affec84 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/BasicUdiRelEntity.java @@ -0,0 +1,48 @@ +package com.glxp.api.entity.basic; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@Data +@TableName(value = "basic_udi_rel") +public class BasicUdiRelEntity implements Serializable { + @TableId(value = "id", type = IdType.INPUT) + private Long id; + + /** + * 国家库uuid + */ + @TableField(value = "uuid") + private String uuid; + + /** + * 企业信息ID外键 + */ + @TableField(value = "companyIdFk") + private Long companyIdFk; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + private Date updateTime; + + /** + * 备注 + */ + @TableField(value = "remark") + private String remark; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + private String updateUser; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/req/auth/FilterUserComapanyRequest.java b/src/main/java/com/glxp/api/req/auth/FilterUserComapanyRequest.java new file mode 100644 index 0000000..a6be375 --- /dev/null +++ b/src/main/java/com/glxp/api/req/auth/FilterUserComapanyRequest.java @@ -0,0 +1,11 @@ +package com.glxp.api.req.auth; + +import com.glxp.api.util.page.ListPageRequest; +import lombok.Data; + +@Data +public class FilterUserComapanyRequest extends ListPageRequest { + + private String searchKey; + +} diff --git a/src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java b/src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java new file mode 100644 index 0000000..4b5da4c --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/BasicUdiReRequest.java @@ -0,0 +1,39 @@ +package com.glxp.api.req.basic; + +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 BasicUdiReRequest { + + + /** + * 国家库uuid + */ + private String uuid; + + /** + * 企业信息ID外键 + */ + private Long companyIdFk; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 更新人 + */ + private String updateUser; + +} diff --git a/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java b/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java index 2daec8a..1b55159 100644 --- a/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java +++ b/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java @@ -70,4 +70,6 @@ public class FilterUdiRelRequest extends ListPageRequest { private Boolean dispatch; private Boolean groupBuy; + private Long companyId; + } diff --git a/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java b/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java new file mode 100644 index 0000000..12fabdb --- /dev/null +++ b/src/main/java/com/glxp/api/res/basic/BasicUdiRelResponse.java @@ -0,0 +1,100 @@ +package com.glxp.api.res.basic; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +@Data +public class BasicUdiRelResponse { + + + private Long id; + + /** + * 国家库uuid + */ + private String uuid; + + /** + * 企业信息ID外键 + */ + private Long companyIdFk; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 更新人 + */ + private String updateUser; + + + private String nameCode; + private String packRatio; + private String packLevel; + private Integer bhxjsl; + private Integer bhzxxsbzsl; + private Integer zxxsbzbhsydysl; + private String bhxjcpbm; + private String sjcpbm; // + private String bzcj; + private String thirdProductNo; + private String thirdProductName; + private String addType; + private String deviceRecordKey; + private Integer isUseDy; + private String cpmctymc; + private String cplb; + private String flbm; + private String ggxh; + private String qxlb; + private String tyshxydm; + private String ylqxzcrbarmc; + private String zczbhhzbapzbh; + private String ylqxzcrbarywmc; + private String sydycpbs; + private Integer versionNumber; + private Integer diType; + + private String scbssfbhph; + private String scbssfbhxlh; + private String scbssfbhscrq; + private String scbssfbhsxrq; + + private String ybbm; + private String spmc; + private String cphhhbh; + private String cpms; + private String cpbsbmtxmc; + + private String batchNo; + private String produceDate; + private String expireDate; + + private Boolean isNewest; + + private String cplx; + private String hchzsb; + + private String sfwblztlcp; + private String cgzmraqxgxx; + private String sfbjwycxsy; + private String zdcfsycs; + private String sfwwjbz; + private String syqsfxyjxmj; + private String qtxxdwzlj; + private String mjfs; + + +} diff --git a/src/main/java/com/glxp/api/service/auth/UserCompanyService.java b/src/main/java/com/glxp/api/service/auth/UserCompanyService.java new file mode 100644 index 0000000..f9292bf --- /dev/null +++ b/src/main/java/com/glxp/api/service/auth/UserCompanyService.java @@ -0,0 +1,9 @@ +package com.glxp.api.service.auth; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.glxp.api.entity.auth.UserCompanyEntity; + +public interface UserCompanyService extends IService{ + + +} diff --git a/src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java new file mode 100644 index 0000000..3475441 --- /dev/null +++ b/src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java @@ -0,0 +1,11 @@ +package com.glxp.api.service.auth.impl; + +import com.glxp.api.entity.auth.UserCompanyEntity; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.auth.UserCompanyMapper; +import com.glxp.api.service.auth.UserCompanyService; +@Service +public class UserCompanyServiceImpl extends ServiceImpl implements UserCompanyService{ + +} diff --git a/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java b/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java new file mode 100644 index 0000000..91af281 --- /dev/null +++ b/src/main/java/com/glxp/api/service/basic/BasicUdiRelService.java @@ -0,0 +1,27 @@ +package com.glxp.api.service.basic; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.glxp.api.req.basic.FilterUdiRelRequest; +import com.glxp.api.res.basic.BasicUdiRelResponse; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.basic.BasicUdiRelMapper; +import com.glxp.api.entity.basic.BasicUdiRelEntity; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class BasicUdiRelService extends ServiceImpl { + + @Resource + BasicUdiRelMapper basicUdiRelMapper; + + public boolean isExit(String uuid, Long companyId) { + return basicUdiRelMapper.exists(new QueryWrapper().eq("uuid", uuid).eq("companyIdFk", companyId)); + } + + public List filterList(FilterUdiRelRequest filterUdiRelRequest) { + return basicUdiRelMapper.filterList(filterUdiRelRequest); + } +} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 811d832..03b3b41 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -1,12 +1,12 @@ server: - port: 9991 + port: 9998 spring: datasource: driver-class-name: com.p6spy.engine.spy.P6SpyDriver jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_cpt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true username: root - password: Glxp@6066 + password: 123456 hikari: connection-timeout: 60000 maximum-pool-size: 20 diff --git a/src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml b/src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml new file mode 100644 index 0000000..b760590 --- /dev/null +++ b/src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml new file mode 100644 index 0000000..e7293eb --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/BasicUdiRelEntityMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + id, uuid, companyIdFk, updateTime, remark, updateUser + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml b/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml new file mode 100644 index 0000000..34b6b8f --- /dev/null +++ b/src/main/resources/mybatis/mapper/basic/BasicUdiRelMapper.xml @@ -0,0 +1,49 @@ + + + + +