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})