From f90eb22ee3d2901b3491484ea23f491f98812781 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 28 Mar 2023 18:23:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E6=8D=AE=E7=B1=BB=E5=9E=8B=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../basic/BasicBussinessTypeController.java | 14 +++++-- .../basic/UdiRelevanceController.java | 1 + .../api/dao/basic/BasicBussinessTypeDao.java | 1 + .../glxp/api/idc/thread/AsyncFetchTask.java | 2 +- .../basic/IBasicBussinessTypeService.java | 3 ++ .../impl/BasicBussinessTypeServiceImpl.java | 9 +++- .../mapper/basic/BasicBussinessTypeDao.xml | 42 ++++++++++++++++--- .../mybatis/mapper/basic/UdiRelevanceDao.xml | 8 +++- 8 files changed, 67 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java index 3c730bd6..8dfd6d49 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java @@ -188,16 +188,22 @@ public class BasicBussinessTypeController extends BaseController { pageSimpleResponse.setList(bussinessTypeEntities); return ResultVOUtils.success(pageSimpleResponse); } else { + + List bussinessTypeEntities; //判断是否是医院用户 if (isHosUser()) { bussinessTypeFilterRequest.setUserId(getUserId()); + bussinessTypeEntities = basicBussinessTypeService.filterJoinByUser( + bussinessTypeFilterRequest); } else { //当前用户为供应商,查询单据类型添加允许供应商使用参数 - bussinessTypeFilterRequest.setSpUse(3); + if (bussinessTypeFilterRequest.getSpUse() == null) + bussinessTypeFilterRequest.setSpUse(3); + bussinessTypeEntities = basicBussinessTypeService.filterJoinByInv( + bussinessTypeFilterRequest); } - List bussinessTypeEntities; - bussinessTypeEntities = basicBussinessTypeService.filterJoinByUser( - bussinessTypeFilterRequest); + + PageInfo pageInfo; pageInfo = new PageInfo<>(bussinessTypeEntities); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); diff --git a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java index cd215260..a55facd0 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiRelevanceController.java @@ -188,6 +188,7 @@ public class UdiRelevanceController extends BaseController { } + //资质证书选入产品列表 产品名称,生产企业过滤 @AuthRuleAnnotation("") @GetMapping("/udi/cert/filterUdi") diff --git a/src/main/java/com/glxp/api/dao/basic/BasicBussinessTypeDao.java b/src/main/java/com/glxp/api/dao/basic/BasicBussinessTypeDao.java index 36dce29a..7e212f9f 100644 --- a/src/main/java/com/glxp/api/dao/basic/BasicBussinessTypeDao.java +++ b/src/main/java/com/glxp/api/dao/basic/BasicBussinessTypeDao.java @@ -24,6 +24,7 @@ public interface BasicBussinessTypeDao extends BaseMapperPlus filterJoinByUser(FilterBussinessTypeRequest filterBussinessTypeRequest); + List filterJoinByInv(FilterBussinessTypeRequest filterBussinessTypeRequest); /** * 忽略已存在数据插入单据类型 diff --git a/src/main/java/com/glxp/api/idc/thread/AsyncFetchTask.java b/src/main/java/com/glxp/api/idc/thread/AsyncFetchTask.java index e2178acc..81c46f0f 100644 --- a/src/main/java/com/glxp/api/idc/thread/AsyncFetchTask.java +++ b/src/main/java/com/glxp/api/idc/thread/AsyncFetchTask.java @@ -34,7 +34,7 @@ public class AsyncFetchTask implements SchedulingConfigurer { scheduledRequest.setCronName("syncFetch"); logger.info("syncFetch----------------"); ScheduledEntity scheduledEntity = scheduledDao.findScheduled(scheduledRequest); - String cron = scheduledEntity != null ? scheduledEntity.getCron() : "15 * * * * ?"; + String cron = scheduledEntity != null ? scheduledEntity.getCron() : "* 0/30 * * * ?"; if (cron.isEmpty()) { logger.error("cron is null"); diff --git a/src/main/java/com/glxp/api/service/basic/IBasicBussinessTypeService.java b/src/main/java/com/glxp/api/service/basic/IBasicBussinessTypeService.java index 3c1c0284..47b8b221 100644 --- a/src/main/java/com/glxp/api/service/basic/IBasicBussinessTypeService.java +++ b/src/main/java/com/glxp/api/service/basic/IBasicBussinessTypeService.java @@ -21,6 +21,9 @@ public interface IBasicBussinessTypeService { List filterJoinByUser(FilterBussinessTypeRequest filterBussinessTypeRequest); + List filterJoinByInv(FilterBussinessTypeRequest filterBussinessTypeRequest); + + /** * 添加单据类型 * diff --git a/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java index 1b23585f..e1dcaa9a 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/BasicBussinessTypeServiceImpl.java @@ -56,6 +56,11 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService return basicBussinessTypeDao.filterJoinByUser(filterBussinessTypeRequest); } + @Override + public List filterJoinByInv(FilterBussinessTypeRequest filterBussinessTypeRequest) { + return basicBussinessTypeDao.filterJoinByInv(filterBussinessTypeRequest); + } + @Override public boolean insertBussinessType(BasicBussinessTypeEntity bussinessTypeEntity) { //设置创建时间和更新时间数据 @@ -217,11 +222,11 @@ public class BasicBussinessTypeServiceImpl implements IBasicBussinessTypeService if (StrUtil.isNotEmpty(deliveryInstock) && deliveryInstock.equals("1")) { bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper() .eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT) - .eq("spUse", ConstantStatus.ORDER_SPUSE_EDIT).eq("enable", true)); + .gt("spUse", 0).eq("enable", true)); } else { bussinessTypeEntities = basicBussinessTypeDao.selectList(new QueryWrapper() .eq("mainAction", ConstantType.TYPE_PUT).eq("corpType", ConstantStatus.CORP_TYPE_OUT) - .eq("spUse", ConstantStatus.ORDER_SPUSE_EDIT).eq("inStock", false).eq("enable", true)); + .gt("spUse", 0).eq("inStock", false).eq("enable", true)); } break; diff --git a/src/main/resources/mybatis/mapper/basic/BasicBussinessTypeDao.xml b/src/main/resources/mybatis/mapper/basic/BasicBussinessTypeDao.xml index c740065f..77288f09 100644 --- a/src/main/resources/mybatis/mapper/basic/BasicBussinessTypeDao.xml +++ b/src/main/resources/mybatis/mapper/basic/BasicBussinessTypeDao.xml @@ -245,23 +245,55 @@ AND basic_bussiness_type.enable = #{enable} - + AND basic_bussiness_type.spUse > 0 - + AND basic_bussiness_type.spUse = #{spUse} AND subInvCode = #{code} + + AND subInvCode = #{code} + AND auth_user_bustype.`userId` = #{userId} - + + group by basic_bussiness_type.action + + + @@ -815,7 +821,7 @@ #{modifyTime}, #{createUser}, #{updateUser}, - #{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy} ,#{needCert}) + #{remark}, #{useExpireTime}, #{dispatch}, #{groupBuy}, #{needCert})