diff --git a/src/main/java/com/glxp/api/controller/collect/IoCollectOriginController.java b/src/main/java/com/glxp/api/controller/collect/IoCollectOriginController.java index 4bf589c93..28ed3f38f 100644 --- a/src/main/java/com/glxp/api/controller/collect/IoCollectOriginController.java +++ b/src/main/java/com/glxp/api/controller/collect/IoCollectOriginController.java @@ -3,6 +3,7 @@ package com.glxp.api.controller.collect; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageInfo; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; @@ -13,6 +14,7 @@ import com.glxp.api.dao.basic.SysWorkplaceDocumentDao; import com.glxp.api.entity.auth.SysWorkplace; import com.glxp.api.entity.collect.IoCollectOrder; import com.glxp.api.entity.collect.IoCollectOrderOrigin; +import com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity; import com.glxp.api.http.ErpBasicClient; import com.glxp.api.req.basic.BasicCollectUserRequest; import com.glxp.api.req.basic.GetSickPrescribeRequest; @@ -33,6 +35,8 @@ import com.glxp.api.service.collect.IoCollectOrderBizOriginService; import com.glxp.api.service.collect.IoCollectOrderOriginService; import com.glxp.api.service.collect.IoCollectOrderService; import com.glxp.api.service.collect.IoCollectOriginService; +import com.glxp.api.service.thrsys.impl.ThrBusTypeOriginServiceImpl; +import com.glxp.api.util.IntUtil; import org.springframework.dao.CannotAcquireLockException; import org.springframework.web.bind.annotation.*; @@ -69,6 +73,8 @@ public class IoCollectOriginController extends BaseController { @Resource SysWorkplaceService sysWorkplaceService; + @Resource + private ThrBusTypeOriginServiceImpl thrBusTypeOriginService; @PostMapping("/udiwms/basic/collect/origin/order/download") public BaseResponse downloadOrder(@RequestBody CollectOrderRequest collectOrderRequest) { @@ -98,6 +104,21 @@ public class IoCollectOriginController extends BaseController { getSickPrescribeRequest.setFromCorpName(collectOrderRequest.getFromCorpName()); getSickPrescribeRequest.setShipperName(collectOrderRequest.getShipperName()); getSickPrescribeRequest.setBusType(collectOrderRequest.getBusType()); + ThrBusTypeOriginEntity thrBusTypeOriginEntity = thrBusTypeOriginService.getOne( + new QueryWrapper().eq("action",collectOrderRequest.getBusType()) + .last("limit 1") + ); + if(thrBusTypeOriginEntity!=null){ + //todo 因为这边之前单据据都是设置1 第三方那边判断是0 所有为了不影响其他医院流0和1 都设置为0好让第三方使用 + // 判断是不是处方退费 + Integer inOutType = IntUtil.value(thrBusTypeOriginEntity.getInoutType()); + if(inOutType == 0 || inOutType ==1){ + getSickPrescribeRequest.setInOutType(0); + }else{ + getSickPrescribeRequest.setInOutType(1); + } + } + BaseResponse> baseResponse = erpBasicClient.getPrescribeV2(getSickPrescribeRequest); return baseResponse; diff --git a/src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java b/src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java new file mode 100644 index 000000000..45d368f32 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/basic/YbNotCodeMapper.java @@ -0,0 +1,19 @@ +package com.glxp.api.dao.basic; + +import com.glxp.api.entity.basic.YbNotCode; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface YbNotCodeMapper { + int deleteByPrimaryKey(String ybbm); + + int insert(YbNotCode record); + + int insertSelective(YbNotCode record); + + YbNotCode selectByPrimaryKey(String ybbm); + + int updateByPrimaryKeySelective(YbNotCode record); + + int updateByPrimaryKey(YbNotCode record); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/basic/YbNotCode.java b/src/main/java/com/glxp/api/entity/basic/YbNotCode.java new file mode 100644 index 000000000..4c952613c --- /dev/null +++ b/src/main/java/com/glxp/api/entity/basic/YbNotCode.java @@ -0,0 +1,28 @@ +package com.glxp.api.entity.basic; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 医保无码信息表 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class YbNotCode { + /** + * 国家医保目录编码 + */ + private String ybbm; + + /** + * 机构编码 + */ + private String organizationcode; + + /** + * 无码类型 + */ + private String notcodetype; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/req/basic/GetSickPrescribeRequest.java b/src/main/java/com/glxp/api/req/basic/GetSickPrescribeRequest.java index be25fd7f3..ebc9408e8 100644 --- a/src/main/java/com/glxp/api/req/basic/GetSickPrescribeRequest.java +++ b/src/main/java/com/glxp/api/req/basic/GetSickPrescribeRequest.java @@ -1,5 +1,6 @@ package com.glxp.api.req.basic; +import com.baomidou.mybatisplus.annotation.TableField; import com.glxp.api.util.page.ListPageRequest; import lombok.Data; @@ -33,4 +34,7 @@ public class GetSickPrescribeRequest extends ListPageRequest { private String fromCorpName; private String shipperName; private String busType; + + + private Integer inOutType; } diff --git a/src/main/java/com/glxp/api/service/auth/YbNotCodeService.java b/src/main/java/com/glxp/api/service/auth/YbNotCodeService.java new file mode 100644 index 000000000..e26990317 --- /dev/null +++ b/src/main/java/com/glxp/api/service/auth/YbNotCodeService.java @@ -0,0 +1,43 @@ +package com.glxp.api.service.auth; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import com.glxp.api.entity.basic.YbNotCode; +import com.glxp.api.dao.basic.YbNotCodeMapper; +@Service +public class YbNotCodeService{ + + @Resource + private YbNotCodeMapper ybNotCodeMapper; + + + public int deleteByPrimaryKey(String ybbm) { + return ybNotCodeMapper.deleteByPrimaryKey(ybbm); + } + + + public int insert(YbNotCode record) { + return ybNotCodeMapper.insert(record); + } + + + public int insertSelective(YbNotCode record) { + return ybNotCodeMapper.insertSelective(record); + } + + + public YbNotCode selectByPrimaryKey(String ybbm) { + return ybNotCodeMapper.selectByPrimaryKey(ybbm); + } + + + public int updateByPrimaryKeySelective(YbNotCode record) { + return ybNotCodeMapper.updateByPrimaryKeySelective(record); + } + + + public int updateByPrimaryKey(YbNotCode record) { + return ybNotCodeMapper.updateByPrimaryKey(record); + } + +} diff --git a/src/main/resources/com/glxp/api/dao/basic/YbNotCodeMapper.xml b/src/main/resources/com/glxp/api/dao/basic/YbNotCodeMapper.xml new file mode 100644 index 000000000..3b956e971 --- /dev/null +++ b/src/main/resources/com/glxp/api/dao/basic/YbNotCodeMapper.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + ybbm, organizationCode, notCodeType + + + + + delete from yb_not_code + where ybbm = #{ybbm,jdbcType=VARCHAR} + + + + insert into yb_not_code (ybbm, organizationCode, notCodeType + ) + values (#{ybbm,jdbcType=VARCHAR}, #{organizationcode,jdbcType=VARCHAR}, #{notcodetype,jdbcType=VARCHAR} + ) + + + + insert into yb_not_code + + + ybbm, + + + organizationCode, + + + notCodeType, + + + + + #{ybbm,jdbcType=VARCHAR}, + + + #{organizationcode,jdbcType=VARCHAR}, + + + #{notcodetype,jdbcType=VARCHAR}, + + + + + + update yb_not_code + + + organizationCode = #{organizationcode,jdbcType=VARCHAR}, + + + notCodeType = #{notcodetype,jdbcType=VARCHAR}, + + + where ybbm = #{ybbm,jdbcType=VARCHAR} + + + + update yb_not_code + set organizationCode = #{organizationcode,jdbcType=VARCHAR}, + notCodeType = #{notcodetype,jdbcType=VARCHAR} + where ybbm = #{ybbm,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 012669ad7..3c82f561e 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -5445,3 +5445,24 @@ CALL Pro_Temp_ColumnWork('io_order', 'fifoSplitTag', CALL Pro_Temp_ColumnWork('io_collect_set', 'drugDealConfirm', ' tinyint NULL DEFAULT b''0''COMMENT ''是否允许取药整单确认''', 1); +CALL Pro_Temp_ColumnWork('basic_udirel', 'notCodeType', + ' tinyint NULL DEFAULT b''0''COMMENT ''无码类型''', + 1); +CALL Pro_Temp_ColumnWork('basic_udirel', 'drugSellingPrice', + ' decimal(10, 2) DEFAULT NULL COMMENT ''药品售价''', + 1); + +CALL Pro_Temp_ColumnWork('basic_udirel', 'drugSellingPriceTime', + ' datetime DEFAULT NULL COMMENT ''药品售价''', + 1); +CALL Pro_Temp_ColumnWork('basic_udirel', 'hangingNetType', + ' tinyint DEFAULT NULL COMMENT ''是否挂网''', + 1); + + +CREATE TABLE IF NOT EXISTS `yb_not_code` ( + `ybbm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '国家医保目录编码', + `organizationCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '机构编码', + `notCodeType` tinyint DEFAULT NULL COMMENT '无码类型', + PRIMARY KEY (`ybbm`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='医保无码信息表';