Merge remote-tracking branch 'origin/dev_drug' into dev_drug

dev_unify
yewj 4 months ago
commit 16c86f330a

@ -359,6 +359,7 @@ public class UdiRlSupController extends BaseController {
udiRelevanceEntity.setLockStatus(1); udiRelevanceEntity.setLockStatus(1);
udiRelevanceEntity.setProductsType(2); udiRelevanceEntity.setProductsType(2);
udiRelevanceEntity.setUpdateTime(new Date()); udiRelevanceEntity.setUpdateTime(new Date());
udiRelevanceEntity.setDetailSort(udiInfoExportRequest.getSupplementRequest().getDetailSort());
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity); udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiProductEntity udiProductEntity = new UdiProductEntity(); UdiProductEntity udiProductEntity = new UdiProductEntity();
udiProductEntity.setProductsType(2); udiProductEntity.setProductsType(2);
@ -373,7 +374,7 @@ public class UdiRlSupController extends BaseController {
byUuid.setCatalogname1(udiProductEntity.getCatalogname1()); byUuid.setCatalogname1(udiProductEntity.getCatalogname1());
byUuid.setCatalogname2(udiProductEntity.getCatalogname2()); byUuid.setCatalogname2(udiProductEntity.getCatalogname2());
byUuid.setCatalogname3(udiProductEntity.getCatalogname3()); byUuid.setCatalogname3(udiProductEntity.getCatalogname3());
byUuid.setDetailSort(udiProductEntity.getDetailSort()); // byUuid.setDetailSort(udiProductEntity.getDetailSort());
byUuid.setYbbm(udiProductEntity.getYbbm()); byUuid.setYbbm(udiProductEntity.getYbbm());
byUuid.setManufactory(udiProductEntity.getManufactory()); byUuid.setManufactory(udiProductEntity.getManufactory());
byUuid.setUpdateTime(new Date()); byUuid.setUpdateTime(new Date());

@ -457,7 +457,10 @@ public class IoOrderDetailBizController extends BaseController {
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderDetailBizRequest.getOrderIdFk()); List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderDetailBizRequest.getOrderIdFk());
ioCheckInoutService.bizOrderCheck2(list, orderDetailCodeEntities); ioCheckInoutService.bizOrderCheck2(list, orderDetailCodeEntities);
PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list); PageInfo<IoOrderDetailBizResponse> pageInfo = new PageInfo<>(list);
return ResultVOUtils.page(pageInfo); PageSimpleResponse<IoOrderDetailBizResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
} }
@ -818,6 +821,8 @@ public class IoOrderDetailBizController extends BaseController {
if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) { if (StrUtil.isNotEmpty(aliYljgBillDetailDrug.getValidEndDate())) {
codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", "")); codeLostEntity.setExpireDate(aliYljgBillDetailDrug.getValidEndDate().substring(2).replace(" 00:00:00", "").replace("-", ""));
} }
Long id = codeLostEntity.getId();
if (id == null) codeLostEntity.setId(IdUtil.getSnowflakeNextId());
} }
ioCodeLostService.insertOrUpdate(codeLostEntity); ioCodeLostService.insertOrUpdate(codeLostEntity);

@ -2,6 +2,7 @@ package com.glxp.api.controller.test;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.dao.auth.AuthCompanyMapper; import com.glxp.api.dao.auth.AuthCompanyMapper;
import com.glxp.api.entity.alihealth.AliYljgBillDetail; import com.glxp.api.entity.alihealth.AliYljgBillDetail;
import com.glxp.api.entity.alihealth.AliYljgSearchbill; import com.glxp.api.entity.alihealth.AliYljgSearchbill;
@ -21,8 +22,10 @@ import com.glxp.api.res.alihealth.AlihealthYljgListupoutDetailResponse;
import com.glxp.api.service.collect.RelCodeBatchService; import com.glxp.api.service.collect.RelCodeBatchService;
import com.glxp.api.service.collect.RelCodeDetailService; import com.glxp.api.service.collect.RelCodeDetailService;
import com.glxp.api.service.thrsys.ThirdAliDrugService; import com.glxp.api.service.thrsys.ThirdAliDrugService;
import com.glxp.api.util.DimaUtil;
import com.glxp.api.util.alihealth.AlihealthUtils; import com.glxp.api.util.alihealth.AlihealthUtils;
import com.glxp.api.util.alihealth.AlihealthYljgUtils; import com.glxp.api.util.alihealth.AlihealthYljgUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -87,46 +90,48 @@ public class TestCodeController {
return null; return null;
} }
@PostMapping("/test1")
@PostMapping("/test1")
public BaseResponse test1() { public BaseResponse test1() {
AlihealthThirdAliDrugInsertReqeust alihealthThirdAliDrugInsertReqeust = new AlihealthThirdAliDrugInsertReqeust(); AlihealthThirdAliDrugInsertReqeust alihealthThirdAliDrugInsertReqeust = new AlihealthThirdAliDrugInsertReqeust();
alihealthThirdAliDrugInsertReqeust.setErpId("123"); alihealthThirdAliDrugInsertReqeust.setErpId("123");
alihealthThirdAliDrugInsertReqeust.setAppSecret("5231c601505706a9d49823c3dfe2cb01"); alihealthThirdAliDrugInsertReqeust.setAppSecret("5231c601505706a9d49823c3dfe2cb01");
AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust = new AlihealthKytDrugrescodeReqeust(); AlihealthKytDrugrescodeReqeust alihealthKytDrugrescodeReqeust = new AlihealthKytDrugrescodeReqeust();
alihealthKytDrugrescodeReqeust.setPhysic_name("苯巴比妥片"); alihealthKytDrugrescodeReqeust.setPhysic_name("苯巴比妥片");
// alihealthKytDrugrescodeReqeust.setApproval_licence_no(); // alihealthKytDrugrescodeReqeust.setApproval_licence_no();
// alihealthKytDrugrescodeReqeust.setStart_date(); // alihealthKytDrugrescodeReqeust.setStart_date();
// alihealthKytDrugrescodeReqeust.setEnd_date(); // alihealthKytDrugrescodeReqeust.setEnd_date();
// alihealthKytDrugrescodeReqeust.setEnt_name(); // alihealthKytDrugrescodeReqeust.setEnt_name();
// alihealthKytDrugrescodeReqeust.setPackage_spec(); // alihealthKytDrugrescodeReqeust.setPackage_spec();
// alihealthKytDrugrescodeReqeust.setPrepn_spec(); // alihealthKytDrugrescodeReqeust.setPrepn_spec();
alihealthKytDrugrescodeReqeust.setPage_size(20); alihealthKytDrugrescodeReqeust.setPage_size(20);
alihealthKytDrugrescodeReqeust.setPage(1); alihealthKytDrugrescodeReqeust.setPage(1);
alihealthKytDrugrescodeReqeust.setApp_key("31721223"); alihealthKytDrugrescodeReqeust.setApp_key("31721223");
alihealthKytDrugrescodeReqeust.setRef_ent_id("ef99b78bd9c54c1284f813149c858fb0"); alihealthKytDrugrescodeReqeust.setRef_ent_id("ef99b78bd9c54c1284f813149c858fb0");
alihealthThirdAliDrugInsertReqeust.setAlihealthKytDrugrescodeReqeust(alihealthKytDrugrescodeReqeust); alihealthThirdAliDrugInsertReqeust.setAlihealthKytDrugrescodeReqeust(alihealthKytDrugrescodeReqeust);
BaseResponse<List<ThirdAliDrug>> baseResponse = alihealthUtils.thirdAliDrugInsertAll(alihealthThirdAliDrugInsertReqeust); BaseResponse<List<ThirdAliDrug>> baseResponse = alihealthUtils.thirdAliDrugInsertAll(alihealthThirdAliDrugInsertReqeust);
if(baseResponse.getCode() == 20000){ if (baseResponse.getCode() == 20000) {
List<ThirdAliDrug> list = baseResponse.getData(); List<ThirdAliDrug> list = baseResponse.getData();
if(list!=null && list.size() >0){ if (list != null && list.size() > 0) {
for (ThirdAliDrug thirdAliDrug : list) { for (ThirdAliDrug thirdAliDrug : list) {
ThirdAliDrug thirdAliDrugNew = thirdAliDrugService.getOne(new QueryWrapper<ThirdAliDrug>().eq("nameCode", thirdAliDrug.getNameCode()) ThirdAliDrug thirdAliDrugNew = thirdAliDrugService.getOne(new QueryWrapper<ThirdAliDrug>().eq("nameCode", thirdAliDrug.getNameCode())
.last("limit 1") .last("limit 1")
); );
if (Objects.isNull(thirdAliDrugNew)) { if (Objects.isNull(thirdAliDrugNew)) {
thirdAliDrugService.save(thirdAliDrug); thirdAliDrugService.save(thirdAliDrug);
} else { } else {
thirdAliDrugService.update(thirdAliDrug, new QueryWrapper<ThirdAliDrug>().eq("nameCode", thirdAliDrug.getNameCode())); thirdAliDrugService.update(thirdAliDrug, new QueryWrapper<ThirdAliDrug>().eq("nameCode", thirdAliDrug.getNameCode()));
}
} }
} }
} }
return baseResponse;
}
return baseResponse;
// return alihealthUtils.thirdAliDrugInsert(alihealthThirdAliDrugInsertReqeust,true); // return alihealthUtils.thirdAliDrugInsert(alihealthThirdAliDrugInsertReqeust,true);
} }
@PostMapping("/test2") @PostMapping("/test2")
public BaseResponse test2() { public BaseResponse test2() {
AlihealthKytThirdAliSearchbillInsertReqeust alihealthKytThirdAliSearchbillInsertReqeust = new AlihealthKytThirdAliSearchbillInsertReqeust(); AlihealthKytThirdAliSearchbillInsertReqeust alihealthKytThirdAliSearchbillInsertReqeust = new AlihealthKytThirdAliSearchbillInsertReqeust();
@ -166,6 +171,7 @@ public class TestCodeController {
return alihealthUtils.thirdAliSearchbillInsert(alihealthKytThirdAliSearchbillInsertReqeust); return alihealthUtils.thirdAliSearchbillInsert(alihealthKytThirdAliSearchbillInsertReqeust);
} }
@PostMapping("/test3") @PostMapping("/test3")
public BaseResponse<List<AliYljgSearchbill>> test3() { public BaseResponse<List<AliYljgSearchbill>> test3() {
@ -174,8 +180,9 @@ public class TestCodeController {
alihealthYljgListupoutReqeust1.setEnd_date("2024-05-01"); alihealthYljgListupoutReqeust1.setEnd_date("2024-05-01");
alihealthYljgListupoutReqeust1.setPage(1); alihealthYljgListupoutReqeust1.setPage(1);
alihealthYljgListupoutReqeust1.setPage_size(20); alihealthYljgListupoutReqeust1.setPage_size(20);
return alihealthYljgUtils.listupout(alihealthYljgListupoutReqeust1,"72890663819159"); return alihealthYljgUtils.listupout(alihealthYljgListupoutReqeust1, "72890663819159");
} }
@PostMapping("/test4") @PostMapping("/test4")
public BaseResponse<AliYljgBillDetail> test4() { public BaseResponse<AliYljgBillDetail> test4() {
@ -183,6 +190,6 @@ public class TestCodeController {
alihealthYljgListupoutDetailReqeust.setBill_code("19604910"); alihealthYljgListupoutDetailReqeust.setBill_code("19604910");
alihealthYljgListupoutDetailReqeust.setFrom_ref_user_id("a74061d26923498785ad8489962d9de2"); alihealthYljgListupoutDetailReqeust.setFrom_ref_user_id("a74061d26923498785ad8489962d9de2");
return alihealthYljgUtils.listupoutDetail(alihealthYljgListupoutDetailReqeust); return alihealthYljgUtils.listupoutDetail(alihealthYljgListupoutDetailReqeust);
} }
} }

@ -347,8 +347,8 @@ public class UdiProductEntity {
/** /**
* *
*/ */
@TableField(value = "detailSort") // @TableField(value = "detailSort")
private Integer detailSort; // private Integer detailSort;
public Integer getMyBhxjsl() { public Integer getMyBhxjsl() {
if (bhxjsl == null || bhxjsl == 0) if (bhxjsl == null || bhxjsl == 0)

@ -311,4 +311,7 @@ public class UdiRelevanceEntity {
@TableField(value = "unpackUseTime") @TableField(value = "unpackUseTime")
private Integer unpackUseTime; private Integer unpackUseTime;
@TableField(value = "detailSort")
private Integer detailSort;
} }

@ -35,6 +35,7 @@ public class UpdateLevelDrugRequest {
private String uuid; private String uuid;
private String xjdw; private String xjdw;
private Integer diType; private Integer diType;
private String packRatio;
public Integer getMyBhxjsl() { public Integer getMyBhxjsl() {
if (bhxjsl == null || bhxjsl == 0) if (bhxjsl == null || bhxjsl == 0)

@ -433,6 +433,7 @@ public class UdiContrastService {
udiProductEntity.setSpmc(thirdAliDrug.getSpmc()); udiProductEntity.setSpmc(thirdAliDrug.getSpmc());
udiProductEntity.setBzgg(thirdAliDrug.getBzgg()); udiProductEntity.setBzgg(thirdAliDrug.getBzgg());
udiProductEntity.setPackRatio(thirdAliDrug.getPackRatio());
// udiProductEntity.setMatrial(ybDrug.getMaterialName()); // udiProductEntity.setMatrial(ybDrug.getMaterialName());
// udiProductEntity.setPackMatrial(ybDrug.getMaterialName()); // udiProductEntity.setPackMatrial(ybDrug.getMaterialName());
// udiProductEntity.setMedicareType(setMedicareType(ybDrug.getProductInsuranceType())); // udiProductEntity.setMedicareType(setMedicareType(ybDrug.getProductInsuranceType()));

@ -324,6 +324,7 @@ public class UdiProductServiceImpl implements UdiProductService {
udiRelevanceEntity.setUseMaxLevel(addProductRequest.getUseMaxLevel()); udiRelevanceEntity.setUseMaxLevel(addProductRequest.getUseMaxLevel());
udiRelevanceEntity.setDistributeMaxLevel(addProductRequest.getDistributeMaxLevel()); udiRelevanceEntity.setDistributeMaxLevel(addProductRequest.getDistributeMaxLevel());
udiRelevanceEntity.setUnpackUseTime(addProductRequest.getUnpackUseTime()); udiRelevanceEntity.setUnpackUseTime(addProductRequest.getUnpackUseTime());
udiRelevanceEntity.setDetailSort(addProductRequest.getDetailSort());
udiRelevanceEntity.setUpdateTime(new Date()); udiRelevanceEntity.setUpdateTime(new Date());
udiRelevanceDao.updateById(udiRelevanceEntity); udiRelevanceDao.updateById(udiRelevanceEntity);
updateLevelCount(udiRelevanceEntity); updateLevelCount(udiRelevanceEntity);
@ -342,6 +343,7 @@ public class UdiProductServiceImpl implements UdiProductService {
udiRelevanceEntity.setHcType(addProductRequest.getHcType()); udiRelevanceEntity.setHcType(addProductRequest.getHcType());
udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode()); udiRelevanceEntity.setPayFeeCode(addProductRequest.getPayFeeCode());
udiRelevanceEntity.setUnpackUseTime(addProductRequest.getUnpackUseTime()); udiRelevanceEntity.setUnpackUseTime(addProductRequest.getUnpackUseTime());
udiRelevanceEntity.setDetailSort(addProductRequest.getDetailSort());
udiRelevanceEntity.setUpdateTime(new Date()); udiRelevanceEntity.setUpdateTime(new Date());
// if (addProductRequest.getDistributeLevelDi() != null) { // if (addProductRequest.getDistributeLevelDi() != null) {
// udiRelevanceEntity.setDistributeLevelDi(addProductRequest.getDistributeLevelDi()); // udiRelevanceEntity.setDistributeLevelDi(addProductRequest.getDistributeLevelDi());

@ -703,7 +703,7 @@ public class RelCodeBatchService extends ServiceImpl<RelCodeBatchMapper, RelCode
@Resource @Resource
AlihealthYljgUtils alihealthYljgUtils; AlihealthYljgUtils alihealthYljgUtils;
// 处理阿里新增关联关系 // 处理阿里新增关联关系
public void addRelCodeAli( Set<String> set, String erpId){ public void addRelCodeAli(Set<String> set, String erpId){
try { try {
List<String> relCodeBatchList =new ArrayList<>(); List<String> relCodeBatchList =new ArrayList<>();
//2.下载关联关系存到关联关系表 //2.下载关联关系存到关联关系表

@ -28,16 +28,18 @@ public class DimaUtil {
} }
// 最后加上最小单位(第一层级为 1 // 最后加上最小单位(第一层级为 1
calculatedLevels.add(1); calculatedLevels.add(0,1);
// 结果倒序 // 结果倒序
List<Integer> reversed = new ArrayList<>(); // List<Integer> reversed = new ArrayList<>();
for (int i = calculatedLevels.size() - 1; i >= 0; i--) { // for (int i = calculatedLevels.size() - 1; i >= 0; i--) {
reversed.add(calculatedLevels.get(i)); // reversed.add(calculatedLevels.get(i));
} // }
return reversed; return calculatedLevels;
} }
public static Integer trMinCount(String bzgg) { public static Integer trMinCount(String bzgg) {
// 定义正则表达式模式,用于匹配数字 // 定义正则表达式模式,用于匹配数字
Pattern pattern = Pattern.compile("\\d+"); Pattern pattern = Pattern.compile("\\d+");

@ -599,9 +599,7 @@
<if test="catalogname2 != null"> <if test="catalogname2 != null">
catalogname2=#{catalogname2}, catalogname2=#{catalogname2},
</if> </if>
<if test="detailSort != null">
detailSort=#{detailSort},
</if>
</trim> </trim>
WHERE nameCode = #{nameCode} WHERE nameCode = #{nameCode}
and uuid = #{uuid} and uuid = #{uuid}

@ -494,8 +494,7 @@
basic_products.workPlaceCount, basic_products.workPlaceCount,
basic_products.bhltcjsl, basic_products.bhltcjsl,
basic_products.bhsycjsl, basic_products.bhsycjsl,
th.hsmc hslbName, th.hsmc hslbName
basic_products.detailSort
FROM basic_products FROM basic_products
inner JOIN basic_udirel inner JOIN basic_udirel
ON basic_products.uuid = basic_udirel.uuid ON basic_products.uuid = basic_udirel.uuid
@ -1067,7 +1066,7 @@
groupBuy, needCert, isStack, groupBuy, needCert, isStack,
distributeLevelCount, useLevel, distributeLevelCount, useLevel,
distributeLevel, distributeLevel,
splitEnable, autoCode, distributeMaxLevel, useMaxLevel,unpackUseTime) splitEnable, autoCode, distributeMaxLevel, useMaxLevel,unpackUseTime,detailSort)
values (#{id}, values (#{id},
#{uuid}, #{uuid},
#{mainId}, #{mainId},
@ -1103,7 +1102,7 @@
#{useLevel}, #{useLevel},
#{distributeLevel}, #{distributeLevel},
#{splitEnable}, #{splitEnable},
#{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime}) #{autoCode}, #{distributeMaxLevel}, #{useMaxLevel}, #{unpackUseTime},#{detailSort})
</insert> </insert>
<insert id="insertUdiRelevanceignore" keyProperty="id" <insert id="insertUdiRelevanceignore" keyProperty="id"
@ -1298,6 +1297,9 @@
<if test="unpackUseTime != null"> <if test="unpackUseTime != null">
unpackUseTime=#{unpackUseTime}, unpackUseTime=#{unpackUseTime},
</if> </if>
<if test="detailSort != null">
detailSort=#{detailSort},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

@ -145,7 +145,7 @@
basic_products.physicType, basic_products.physicType,
basic_products.medicareType, basic_products.medicareType,
basic_products.indate, basic_products.indate,
basic_products.detailSort basic_udirel.detailSort
FROM company_product_relevance FROM company_product_relevance
inner JOIN basic_udirel inner JOIN basic_udirel
ON company_product_relevance.udiRlIdFk = basic_udirel.id ON company_product_relevance.udiRlIdFk = basic_udirel.id

@ -1184,9 +1184,9 @@ CALL Pro_Temp_ColumnWork('third_ali_drug', 'approvalNum',
call Modify_index('third_ali_drug', 'approvalNum', 'approvalNum', 'BTREE'); call Modify_index('third_ali_drug', 'approvalNum', 'approvalNum', 'BTREE');
CALL Pro_Temp_ColumnWork('basic_products', 'detailSort', # CALL Pro_Temp_ColumnWork('basic_products', 'detailSort',
' tinyint DEFAULT NULL COMMENT ''明细分类''', # ' tinyint DEFAULT NULL COMMENT ''明细分类''',
1); # 1);
CALL Pro_Temp_ColumnWork('sync_data_set', 'drugDataTask', CALL Pro_Temp_ColumnWork('sync_data_set', 'drugDataTask',
' tinyint NULL DEFAULT NULL COMMENT ''药品关联关系同步''', ' tinyint NULL DEFAULT NULL COMMENT ''药品关联关系同步''',
@ -1254,3 +1254,8 @@ call Modify_UNIQUE_index('io_code_lost', 'code', 'uniqueCode', 'BTREE');
CALL Pro_Temp_ColumnWork('io_order', 'aliOrderBillNo', CALL Pro_Temp_ColumnWork('io_order', 'aliOrderBillNo',
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里来源单号''', ' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''阿里来源单号''',
1); 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'detailSort', ' tinyint DEFAULT NULL', 1);

Loading…
Cancel
Save