|
|
|
@ -94,12 +94,13 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_3501 = {};
|
|
|
|
|
private final String[] buyType_3502 = {"SC73650724355678"};
|
|
|
|
|
// private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
|
|
|
|
|
// private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
|
|
|
|
|
private final String[] buyType_3505 = {};
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_3506 = {};
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_35051 = {"SC72249388338364","SC72197936495755"};
|
|
|
|
|
private final String[] buyType_35051 = {"SC72197936495755"};
|
|
|
|
|
|
|
|
|
|
@Value("${DSF_XML_SQL_TYPE:MySql}")
|
|
|
|
|
private String defXmlSqlType;
|
|
|
|
|
@Resource
|
|
|
|
@ -685,24 +686,24 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
// zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
|
|
|
|
|
zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
|
|
|
|
|
LambdaQueryWrapper<VA001> wrapper = new LambdaQueryWrapper();
|
|
|
|
|
wrapper.eq(VA001::getName,basicCorpEntity.getName());
|
|
|
|
|
wrapper.eq(VA001::getUnittype,"3");
|
|
|
|
|
wrapper.eq(VA001::getName, basicCorpEntity.getName());
|
|
|
|
|
wrapper.eq(VA001::getUnittype, "3");
|
|
|
|
|
|
|
|
|
|
// 补充数据
|
|
|
|
|
va001 = va001Service.getOne(wrapper);
|
|
|
|
|
if(va001!=null){
|
|
|
|
|
if (va001 != null) {
|
|
|
|
|
zaxzyyOrderRequest.setCorpId(va001.getUnitid());
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
String msg = "查询单据对应的第三方往来单位信息异常111";
|
|
|
|
|
orderUploadLogService.updateLocalErr(orderEntity, msg);
|
|
|
|
|
log.error("----单据提交111-----"+ basicCorpEntity+"==="+ orderEntity.getBillNo() + msg);
|
|
|
|
|
log.error("----单据提交111-----" + basicCorpEntity + "===" + orderEntity.getBillNo() + msg);
|
|
|
|
|
return ResultVOUtils.error(500, msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
String msg = "查询单据对应的第三方往来单位信息异常222";
|
|
|
|
|
orderUploadLogService.updateLocalErr(orderEntity, msg);
|
|
|
|
|
log.error("----单据提交222-----"+ orderEntity+"==="+ orderEntity.getBillNo() + msg);
|
|
|
|
|
log.error("----单据提交222-----" + orderEntity + "===" + orderEntity.getBillNo() + msg);
|
|
|
|
|
return ResultVOUtils.error(500, msg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -769,21 +770,21 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
i.setInvoiceDate(fprq);
|
|
|
|
|
}
|
|
|
|
|
ZaxzyyOrderHlfyRequest zaxzyyOrderHlfyRequest = new ZaxzyyOrderHlfyRequest();
|
|
|
|
|
if(zaxzyyOrderRequest!=null ){
|
|
|
|
|
zaxzyyOrderHlfyRequest =new ZaxzyyOrderHlfyRequest();
|
|
|
|
|
BeanUtils.copyProperties(zaxzyyOrderRequest,zaxzyyOrderHlfyRequest,"item,items");
|
|
|
|
|
if (zaxzyyOrderRequest != null) {
|
|
|
|
|
zaxzyyOrderHlfyRequest = new ZaxzyyOrderHlfyRequest();
|
|
|
|
|
BeanUtils.copyProperties(zaxzyyOrderRequest, zaxzyyOrderHlfyRequest, "item,items");
|
|
|
|
|
|
|
|
|
|
List<UdiwmsOrderDetailHlfyRequest> udiwmsOrderDetailHlfyRequestArrayList = new ArrayList<>();
|
|
|
|
|
for (UdiwmsOrderDetailRequest udiwmsOrderDetailRequest : zaxzyyOrderRequest.getItem()) {
|
|
|
|
|
log.error("udiwmsOrderDetailRequest==="+udiwmsOrderDetailRequest);
|
|
|
|
|
log.error("udiwmsOrderDetailRequest===" + udiwmsOrderDetailRequest);
|
|
|
|
|
|
|
|
|
|
// if(udiwmsOrderDetailRequest!= null){
|
|
|
|
|
// udiwmsOrderDetailRequest.setCodeList(new ArrayList<>());
|
|
|
|
|
// }
|
|
|
|
|
UdiwmsOrderDetailHlfyRequest udiwmsOrderDetailHlfyRequest = new UdiwmsOrderDetailHlfyRequest();
|
|
|
|
|
BeanUtils.copyProperties(udiwmsOrderDetailRequest,udiwmsOrderDetailHlfyRequest,"price,count,allowNoBatch");
|
|
|
|
|
BeanUtils.copyProperties(udiwmsOrderDetailRequest, udiwmsOrderDetailHlfyRequest, "price,count,allowNoBatch");
|
|
|
|
|
udiwmsOrderDetailHlfyRequest.setPrice(udiwmsOrderDetailRequest.getPrice().toString());
|
|
|
|
|
udiwmsOrderDetailHlfyRequest.setCount(udiwmsOrderDetailRequest.getCount()+"");
|
|
|
|
|
udiwmsOrderDetailHlfyRequest.setCount(udiwmsOrderDetailRequest.getCount() + "");
|
|
|
|
|
udiwmsOrderDetailHlfyRequest.setAllowNoBatch(Boolean.toString(udiwmsOrderDetailRequest.isAllowNoBatch()));
|
|
|
|
|
// // 判断生产日期失效日期 发票等数据如果没值就写死
|
|
|
|
|
// if(StringUtils.isEmpty(udiwmsOrderDetailHlfyRequest.getInvoiceDate())){
|
|
|
|
@ -799,16 +800,16 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
// udiwmsOrderDetailHlfyRequest.setExpireDate("2099-01-01 00:00:00");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if(udiwmsOrderDetailRequest.getCodeList()!=null && udiwmsOrderDetailRequest.getCodeList().size() >0){
|
|
|
|
|
if (udiwmsOrderDetailRequest.getCodeList() != null && udiwmsOrderDetailRequest.getCodeList().size() > 0) {
|
|
|
|
|
List<UdiwmsOrderDetailHlfyRequest.CodeDetailEntity> list = new ArrayList<>();
|
|
|
|
|
for (UdiwmsOrderDetailRequest.CodeDetailEntity codeDetailEntity : udiwmsOrderDetailRequest.getCodeList()) {
|
|
|
|
|
UdiwmsOrderDetailHlfyRequest.CodeDetailEntity codeDetailEntityNew =
|
|
|
|
|
new UdiwmsOrderDetailHlfyRequest.CodeDetailEntity
|
|
|
|
|
(codeDetailEntity.getCode(),codeDetailEntity.getNameCode(),codeDetailEntity.getCount());
|
|
|
|
|
(codeDetailEntity.getCode(), codeDetailEntity.getNameCode(), codeDetailEntity.getCount());
|
|
|
|
|
list.add(codeDetailEntityNew);
|
|
|
|
|
}
|
|
|
|
|
udiwmsOrderDetailHlfyRequest.setCodeList(list);
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
udiwmsOrderDetailHlfyRequest.setCodeList(new ArrayList<>());
|
|
|
|
|
}
|
|
|
|
|
udiwmsOrderDetailHlfyRequestArrayList.add(udiwmsOrderDetailHlfyRequest);
|
|
|
|
@ -1273,28 +1274,28 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
// ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new LambdaQueryWrapper<ThrProductsEntity>()
|
|
|
|
|
// .eq(ThrProductsEntity::getCode, thirdProductId).eq(ThrProductsEntity::getThirdSysFk, "thirdId1").last("limit 1"));
|
|
|
|
|
if (thrProductsEntity == null) {
|
|
|
|
|
log.error("第三方产品编码未关联: "+detailBizEntity.getBindRlFk()+thirdId1);
|
|
|
|
|
log.error("第三方产品编码未关联: " + detailBizEntity.getBindRlFk() + thirdId1);
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
//产品ID
|
|
|
|
|
LambdaQueryWrapper<VA003> wrapper = new LambdaQueryWrapper();
|
|
|
|
|
wrapper.eq(VA003::getYbbm,thirdId1);
|
|
|
|
|
wrapper.eq(VA003::getYbbm, thirdId1);
|
|
|
|
|
wrapper.eq(VA003::getRemark, "Y");
|
|
|
|
|
VA003 va003 = va003Mapper.selectOne(wrapper);
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<VA001> wrapperVa001 = new LambdaQueryWrapper();
|
|
|
|
|
wrapperVa001.eq(VA001::getName,basicProducts.getManufactory());
|
|
|
|
|
wrapperVa001.eq(VA001::getUnittype,"2");
|
|
|
|
|
wrapperVa001.eq(VA001::getName, basicProducts.getManufactory());
|
|
|
|
|
wrapperVa001.eq(VA001::getUnittype, "2");
|
|
|
|
|
|
|
|
|
|
// 补充数据
|
|
|
|
|
VA001 va001 = va001Service.getOne(wrapperVa001);
|
|
|
|
|
if (va003 == null) {
|
|
|
|
|
log.error("第三方产品未查到: "+thirdId1);
|
|
|
|
|
log.error("第三方产品未查到: " + thirdId1);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
if (va001 == null) {
|
|
|
|
|
log.error("第三方生产厂家未查到: "+thirdId1);
|
|
|
|
|
log.error("第三方生产厂家未查到: " + thirdId1);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
item.setProductId(va003.getCode()); //产品ID
|
|
|
|
@ -1710,10 +1711,10 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
optionUploadCollectOrder3505(ioCollectOrder);
|
|
|
|
|
} else if (matchBusType(busType, buyType_3506)) {
|
|
|
|
|
optionUploadCollectOrder3506(ioCollectOrder);
|
|
|
|
|
}else if (matchBusType(busType, buyType_35051)) {
|
|
|
|
|
optionUploadCollectOrder35051(ioCollectOrder);
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(500,"上传类型都未对上请检查单据类型");
|
|
|
|
|
} else if (matchBusType(busType, buyType_35051)) {
|
|
|
|
|
return optionUploadCollectOrder35051(ioCollectOrder);
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "上传类型都未对上请检查单据类型");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2037,90 +2038,142 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BaseResponse optionUploadCollectOrder35051(IoCollectOrder ioCollectOrder) {
|
|
|
|
|
List<CollectOrderBizResponse> bizList = ioCollectOrder.getCollectOrderBizResponseList();
|
|
|
|
|
|
|
|
|
|
String stoout_no = StringUtils.isBlank(ioCollectOrder.getBackupOrderRemark1()) ? ioCollectOrder.getBackupOrderRemark2() : ioCollectOrder.getBackupOrderRemark1();
|
|
|
|
|
List<VInsurNationGoodsPhysic> vInsurNationGoodsPhysics = goodsPhysicMapper.selectList(new LambdaQueryWrapper<VInsurNationGoodsPhysic>().eq(VInsurNationGoodsPhysic::getSTOOUT_NO, stoout_no));
|
|
|
|
|
if (CollUtil.isNotEmpty(vInsurNationGoodsPhysics)) {
|
|
|
|
|
List<CollectOrderBizResponse> collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
|
|
|
|
|
if (CollUtil.isNotEmpty(bizList)) {
|
|
|
|
|
List<Xsck35051Request> xsck35051Requests = new ArrayList<>();
|
|
|
|
|
for (CollectOrderBizResponse collectOrderBizResponse : collectOrderBizResponseList) {
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(collectOrderBizResponse.getRelId());
|
|
|
|
|
for (CollectOrderBizResponse item : bizList) {
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(item.getRelId());
|
|
|
|
|
String itemCode = basicUdirelEntity.getMainId();
|
|
|
|
|
for (VInsurNationGoodsPhysic vInsurNationGoodsPhysic : vInsurNationGoodsPhysics) {
|
|
|
|
|
if (vInsurNationGoodsPhysic.getFIXMEDINS_HILIST_ID().equals(itemCode)) {
|
|
|
|
|
String[] codes = collectOrderBizResponse.getFinishUdiCode().split(",");
|
|
|
|
|
// for (CollectOrderBizResponse item : collectOrderBizResponseList) {
|
|
|
|
|
// if (item.getYbbm().equals(itemCode)) {
|
|
|
|
|
String[] codes = item.getFinishUdiCode().split(",");
|
|
|
|
|
|
|
|
|
|
String nameCode = item.getNameCode();
|
|
|
|
|
BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(
|
|
|
|
|
new QueryWrapper<BasicProductsEntity>().eq("nameCode", nameCode).last("limit 1")
|
|
|
|
|
);
|
|
|
|
|
if (Objects.isNull(basicProductsEntity)) {
|
|
|
|
|
return ResultVOUtils.error(500, "产品为空请检查");
|
|
|
|
|
}
|
|
|
|
|
Integer packLevel = Integer.valueOf(basicProductsEntity.getPackLevel());
|
|
|
|
|
List<DrugInfoRequest> drugTraceList = new ArrayList<>();
|
|
|
|
|
List<String> codeList = new ArrayList<>();
|
|
|
|
|
// 遍历fruits数组
|
|
|
|
|
for (String code : codes) {
|
|
|
|
|
if (StrUtil.isNotBlank(code)) {
|
|
|
|
|
List<RelCodeDetail> relCodeDetailList = relCodeDetailService.getAllNext(code);
|
|
|
|
|
if (relCodeDetailList != null && relCodeDetailList.size() > 0) {
|
|
|
|
|
for (RelCodeDetail relCodeDetail : relCodeDetailList) {
|
|
|
|
|
DrugInfoRequest request = new DrugInfoRequest();
|
|
|
|
|
request.setDrug_trac_codg(relCodeDetail.getCurCode());
|
|
|
|
|
drugTraceList.add(request);
|
|
|
|
|
}
|
|
|
|
|
codeList.add(relCodeDetail.getCurCode());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 级别为2的产品码不可能只有一个
|
|
|
|
|
if (packLevel > 1 && codeList.size() < 2) {
|
|
|
|
|
return ResultVOUtils.error(500, "大包装码关联关系拉取不到请检查" + code);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Set<String> set = new HashSet(codeList);
|
|
|
|
|
for (String code : set) {
|
|
|
|
|
DrugInfoRequest request = new DrugInfoRequest();
|
|
|
|
|
request.setDrug_trac_codg(code);
|
|
|
|
|
drugTraceList.add(request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(drugTraceList)) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据要传的码为空请检查");
|
|
|
|
|
}
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
String formattedDate = sdf.format(ioCollectOrder.getBillTime());
|
|
|
|
|
//todo 处方药标志先写死 后面要商量怎么获得
|
|
|
|
|
String rxFlag ="1";
|
|
|
|
|
log.error("optionUploadCollectOrder35051===item==="+item);
|
|
|
|
|
Xsck35051Request xsck35051Request = Xsck35051Request.builder()
|
|
|
|
|
.med_list_codg(vInsurNationGoodsPhysic.getMED_LIST_CODG())
|
|
|
|
|
.fixmedins_hilist_id(vInsurNationGoodsPhysic.getFIXMEDINS_HILIST_ID())
|
|
|
|
|
.fixmedins_hilist_name(vInsurNationGoodsPhysic.getFIXMEDINS_HILIST_NAME())
|
|
|
|
|
.fixmedins_bchno(vInsurNationGoodsPhysic.getFIXMEDINS_BCHNO())
|
|
|
|
|
.prsc_dr_cert_type(vInsurNationGoodsPhysic.getPRSC_DR_CERT_TYPE())
|
|
|
|
|
.prsc_dr_certno(vInsurNationGoodsPhysic.getPRSC_DR_CERTNO())
|
|
|
|
|
.prsc_dr_name(vInsurNationGoodsPhysic.getPRSC_DR_NAME())
|
|
|
|
|
.phar_cert_type(vInsurNationGoodsPhysic.getPHAR_CERT_TYPE())
|
|
|
|
|
.phar_certno(vInsurNationGoodsPhysic.getPHAR_CERTNO())
|
|
|
|
|
.phar_name(vInsurNationGoodsPhysic.getPHAR_NAME())
|
|
|
|
|
.phar_prac_cert_no(vInsurNationGoodsPhysic.getPHAR_PRAC_CERT_NO())
|
|
|
|
|
.hi_feesetl_type(vInsurNationGoodsPhysic.getHI_FEESETL_TYPE())
|
|
|
|
|
.setl_id(vInsurNationGoodsPhysic.getSETL_ID())
|
|
|
|
|
.mdtrt_sn(vInsurNationGoodsPhysic.getMDTRT_SN())
|
|
|
|
|
.psn_no(vInsurNationGoodsPhysic.getPSN_NO())
|
|
|
|
|
.psn_cert_type(vInsurNationGoodsPhysic.getPSN_CERT_TYPE())
|
|
|
|
|
.certno(vInsurNationGoodsPhysic.getCERTNO())
|
|
|
|
|
.psn_name(vInsurNationGoodsPhysic.getPSN_NAME())
|
|
|
|
|
.manu_lotnum(vInsurNationGoodsPhysic.getMANU_LOTNUM())
|
|
|
|
|
.manu_date(vInsurNationGoodsPhysic.getMANU_DATE())
|
|
|
|
|
.expy_end(vInsurNationGoodsPhysic.getEXPY_END())
|
|
|
|
|
.rx_flag(vInsurNationGoodsPhysic.getRX_FLAG())
|
|
|
|
|
.trdn_flag(vInsurNationGoodsPhysic.getTRDN_FLAG())
|
|
|
|
|
.finl_trns_pric(vInsurNationGoodsPhysic.getFINL_TRNS_PRIC())
|
|
|
|
|
.rxno(vInsurNationGoodsPhysic.getRXNO())
|
|
|
|
|
.rx_circ_flag(vInsurNationGoodsPhysic.getRX_CIRC_FLAG())
|
|
|
|
|
.rtal_docno(vInsurNationGoodsPhysic.getRTAL_DOCNO())
|
|
|
|
|
.stoout_no(vInsurNationGoodsPhysic.getSTOOUT_NO())
|
|
|
|
|
.bchno(vInsurNationGoodsPhysic.getBCHNO())
|
|
|
|
|
.drug_prod_barc(vInsurNationGoodsPhysic.getRUG_PROD_BARC())
|
|
|
|
|
.shelf_posi(vInsurNationGoodsPhysic.getSHELF_POSI())
|
|
|
|
|
.sel_retn_cnt(vInsurNationGoodsPhysic.getSEL_RETN_CNT())
|
|
|
|
|
.sel_retn_time(vInsurNationGoodsPhysic.getSEL_RETN_TIME())
|
|
|
|
|
.sel_retn_opter_name(vInsurNationGoodsPhysic.getSEL_RETN_OPTER_NAME())
|
|
|
|
|
.memo(vInsurNationGoodsPhysic.getMEMO())
|
|
|
|
|
.mdtrt_setl_type(vInsurNationGoodsPhysic.getMDTRT_SETL_TYPE())
|
|
|
|
|
.med_list_codg(item.getYbbm())
|
|
|
|
|
.fixmedins_hilist_id(item.getNameCode())
|
|
|
|
|
.fixmedins_hilist_name(item.getCpmctymc())
|
|
|
|
|
.fixmedins_bchno(item.getOrderIdFk())
|
|
|
|
|
.prsc_dr_cert_type(null)
|
|
|
|
|
.prsc_dr_certno(null)
|
|
|
|
|
.prsc_dr_name(null)
|
|
|
|
|
.phar_cert_type(null)
|
|
|
|
|
.phar_certno(null)
|
|
|
|
|
.phar_name(null)
|
|
|
|
|
.phar_prac_cert_no(null)
|
|
|
|
|
.hi_feesetl_type(null)
|
|
|
|
|
.setl_id(null)
|
|
|
|
|
.mdtrt_sn(null)
|
|
|
|
|
.psn_no(null)
|
|
|
|
|
.psn_cert_type(null)
|
|
|
|
|
.certno(null)
|
|
|
|
|
.psn_name(null)
|
|
|
|
|
.manu_lotnum(item.getBatchNo())
|
|
|
|
|
.manu_date(DateUtil.timeTransition(item.getProductDate()))
|
|
|
|
|
.expy_end(DateUtil.timeTransition(item.getExpireDate()))
|
|
|
|
|
.rx_flag(rxFlag)
|
|
|
|
|
.trdn_flag(item.getTrdnFlag())
|
|
|
|
|
.finl_trns_pric(null)
|
|
|
|
|
.rxno(null)
|
|
|
|
|
.rx_circ_flag(null)
|
|
|
|
|
.rtal_docno(null)
|
|
|
|
|
.stoout_no(null)
|
|
|
|
|
.bchno(null)
|
|
|
|
|
.drug_prod_barc(null)
|
|
|
|
|
.shelf_posi(null)
|
|
|
|
|
.sel_retn_cnt(item.getCount())
|
|
|
|
|
.sel_retn_time(formattedDate)
|
|
|
|
|
.sel_retn_opter_name(ioCollectOrder.getCreateUser())
|
|
|
|
|
.memo(null)
|
|
|
|
|
.mdtrt_setl_type(null)
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
xsck35051Requests.add(xsck35051Request);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
BaseXsck35051Request baseXsck35051Request = new BaseXsck35051Request();
|
|
|
|
|
baseXsck35051Request.setSelinfoDetail(xsck35051Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsck35051Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ybClient.ybPost("35051", dataJson);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "医保视图数据查不到,请核实");
|
|
|
|
|
return ResultVOUtils.error(500, "上传医保数据为空请核实");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse orderMedicalDelete(PostOrderMedicalDeleteRequest postOrderMedicalDeleteRequest) {
|
|
|
|
|
List<Xsck3507Request> xsck35057Requests = new ArrayList<>();
|
|
|
|
|
String invDataType=null;
|
|
|
|
|
if (matchBusType(postOrderMedicalDeleteRequest.getBusType(), buyType_3501)) {
|
|
|
|
|
invDataType="1";
|
|
|
|
|
} else if (matchBusType(postOrderMedicalDeleteRequest.getBusType(), buyType_3502)) {
|
|
|
|
|
invDataType="2";
|
|
|
|
|
|
|
|
|
|
} else if (matchBusType(postOrderMedicalDeleteRequest.getBusType(), buyType_3505)) {
|
|
|
|
|
invDataType="4";
|
|
|
|
|
|
|
|
|
|
} else if (matchBusType(postOrderMedicalDeleteRequest.getBusType(), buyType_3506)) {
|
|
|
|
|
invDataType="4";
|
|
|
|
|
|
|
|
|
|
} else if (matchBusType(postOrderMedicalDeleteRequest.getBusType(), buyType_35051)) {
|
|
|
|
|
invDataType="4";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Xsck3507Request xsck3507Request = Xsck3507Request.builder()
|
|
|
|
|
.med_list_codg(postOrderMedicalDeleteRequest.getBillNo())
|
|
|
|
|
.inv_data_type(invDataType).build();
|
|
|
|
|
xsck35057Requests.add(xsck3507Request);
|
|
|
|
|
BaseXsck3507Request baseXsck3507Request = new BaseXsck3507Request();
|
|
|
|
|
baseXsck3507Request.setGoodDetail(xsck35057Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsck3507Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
return ybClient.ybPost("3507A", dataJson);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void optionUploadCollectOrder3501(IoCollectOrder ioCollectOrder) {
|
|
|
|
|
List<IoCollectOrderBiz> bizList = ioCollectOrder.getBizList();
|
|
|
|
|
if (CollUtil.isNotEmpty(bizList)) {
|
|
|
|
@ -2185,10 +2238,10 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
String[] codes = item.getFinishUdiCode().split(",");
|
|
|
|
|
String nameCode = item.getNameCode();
|
|
|
|
|
BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(
|
|
|
|
|
new QueryWrapper<BasicProductsEntity>().eq("nameCode",nameCode).last("limit 1")
|
|
|
|
|
new QueryWrapper<BasicProductsEntity>().eq("nameCode", nameCode).last("limit 1")
|
|
|
|
|
);
|
|
|
|
|
if(Objects.isNull(basicProductsEntity)){
|
|
|
|
|
return ResultVOUtils.error(500,"产品为空请检查");
|
|
|
|
|
if (Objects.isNull(basicProductsEntity)) {
|
|
|
|
|
return ResultVOUtils.error(500, "产品为空请检查");
|
|
|
|
|
}
|
|
|
|
|
Integer packLevel = Integer.valueOf(basicProductsEntity.getPackLevel());
|
|
|
|
|
List<DrugInfoRequest> drugTraceList = new ArrayList<>();
|
|
|
|
@ -2205,8 +2258,8 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 级别为2的产品码不可能只有一个
|
|
|
|
|
if(packLevel >1 && codeList.size() <2){
|
|
|
|
|
return ResultVOUtils.error(500,"大包装码关联关系拉取不到请检查"+code);
|
|
|
|
|
if (packLevel > 1 && codeList.size() < 2) {
|
|
|
|
|
return ResultVOUtils.error(500, "大包装码关联关系拉取不到请检查" + code);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2217,8 +2270,8 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
drugTraceList.add(request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(CollUtil.isEmpty(drugTraceList)){
|
|
|
|
|
return ResultVOUtils.error(500,"单据要传的码为空请检查");
|
|
|
|
|
if (CollUtil.isEmpty(drugTraceList)) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据要传的码为空请检查");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: 2024/9/10 字段未完全正确对应
|
|
|
|
@ -2227,7 +2280,7 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
.inv_chg_type("108")
|
|
|
|
|
.fixmedins_hilist_id(item.getThrCode())
|
|
|
|
|
.fixmedins_hilist_name(item.getCpmctymc())
|
|
|
|
|
.fixmedins_bchno("0000")
|
|
|
|
|
.fixmedins_bchno(item.getOrderIdFk())
|
|
|
|
|
.pric("0")
|
|
|
|
|
.cnt(item.getActCount())
|
|
|
|
|
.rx_flag("1")
|
|
|
|
@ -2245,8 +2298,8 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseKcbg3502Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
return ybClient.ybPost("3502A", dataJson);
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(500,"上传医保数据为空请核实");
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "上传医保数据为空请核实");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2628,7 +2681,7 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
String xml = xmlResponse.body();
|
|
|
|
|
// 假设 XML 解析到的 JSON 字符串部分
|
|
|
|
|
String jsonStr ="{" + xml.substring(xml.indexOf("{") + 1, xml.lastIndexOf("}")) + "}" ;
|
|
|
|
|
String jsonStr = "{" + xml.substring(xml.indexOf("{") + 1, xml.lastIndexOf("}")) + "}";
|
|
|
|
|
log.error("上传his单据返回:" + jsonStr);
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(jsonStr);
|
|
|
|
@ -2649,4 +2702,4 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|