长泰上传处方单

phxyy
qiuyt 1 month ago
parent 07e2983e58
commit ad3eac8e0d

@ -83,7 +83,7 @@ public class CtqyyClient extends CommonHttpClient {
// 目前只有3502调通过上传医保 其他先不配置怕自动上传出问题
private final String[] buyType_3501 = {};
private final String[] buyType_3502 = {"SC72889572632899"};
private final String[] buyType_3505 = {};
private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
// private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
private final String[] buyType_3506 = {};
@ -1690,7 +1690,7 @@ public class CtqyyClient extends CommonHttpClient {
} else if (matchBusType(busType, buyType_3502)) {
return optionUploadCollectOrder3502(ioCollectOrder);
} else if (matchBusType(busType, buyType_3505)) {
optionUploadCollectOrder3505(ioCollectOrder);
return optionUploadCollectOrder3505(ioCollectOrder);
} else if (matchBusType(busType, buyType_3506)) {
optionUploadCollectOrder3506(ioCollectOrder);
} else {
@ -2058,82 +2058,109 @@ public class CtqyyClient extends CommonHttpClient {
}
public void optionUploadCollectOrder3505(IoCollectOrder ioCollectOrder) {
public BaseResponse optionUploadCollectOrder3505(IoCollectOrder ioCollectOrder) {
//摆药流水号
String stoout_no = 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();
List<Xsck3505Request> xsck3505Requests = new ArrayList<>();
for (CollectOrderBizResponse collectOrderBizResponse : collectOrderBizResponseList) {
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(collectOrderBizResponse.getRelId());
String itemCode = basicUdirelEntity.getMainId();
for (VInsurNationGoodsPhysic vInsurNationGoodsPhysic : vInsurNationGoodsPhysics) {
if (vInsurNationGoodsPhysic.getFIXMEDINS_HILIST_ID().equals(itemCode)) {
String[] codes = collectOrderBizResponse.getFinishUdiCode().split(",");
List<DrugInfoRequest> drugTraceList = 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);
}
// String stoout_no = StringUtils.isNotEmpty(ioCollectOrder.getBackupOrderRemark1()) ? ioCollectOrder.getBackupOrderRemark1() :ioCollectOrder.getBackupOrderRemark2();
// log.error("stoout_no===",stoout_no);
List<VYpzsPresInfo> list = vYpzsPresInfoMapper
.selectList(
new QueryWrapper<VYpzsPresInfo>().eq("STOOUT_NO",ioCollectOrder.getBillNo())
);
if ( CollUtil.isNotEmpty(list)) {
String stoout_no = list.get(0).getSTOOUT_NO();
log.error("stoout_no==="+stoout_no);
List<VInsurNationGoodsPhysic> vInsurNationGoodsPhysics = goodsPhysicMapper.selectList(new LambdaQueryWrapper<VInsurNationGoodsPhysic>().eq(VInsurNationGoodsPhysic::getSTOOUT_NO, stoout_no));
log.error("vInsurNationGoodsPhysics==="+vInsurNationGoodsPhysics);
if ( CollUtil.isNotEmpty(vInsurNationGoodsPhysics)) {
List<CollectOrderBizResponse> collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
log.error("collectOrderBizResponseList==="+collectOrderBizResponseList);
List<Xsck3505Request> xsck3505Requests = new ArrayList<>();
for (CollectOrderBizResponse collectOrderBizResponse : collectOrderBizResponseList) {
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(collectOrderBizResponse.getRelId());
String itemCode = basicUdirelEntity.getMainId();
for (VInsurNationGoodsPhysic vInsurNationGoodsPhysic : vInsurNationGoodsPhysics) {
if (vInsurNationGoodsPhysic.getMED_LIST_CODG().equals(itemCode)) {
String[] codes = new String[0];
if(StringUtils.isNotEmpty(collectOrderBizResponse.getFinishUdiCode())){
codes = collectOrderBizResponse.getFinishUdiCode().split(",");
}
List<DrugInfoRequest> drugTraceList = 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);
}
}
}
}
log.error("vInsurNationGoodsPhysic==="+vInsurNationGoodsPhysic);
Xsck3505Request xsck3505Request = Xsck3505Request.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())
.drugtracinfo(drugTraceList).build();
log.error("xsck3505Request==="+xsck3505Request);
xsck3505Requests.add(xsck3505Request);
}
Xsck3505Request xsck3505Request = Xsck3505Request.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())
.drugtracinfo(drugTraceList).build();
xsck3505Requests.add(xsck3505Request);
}
}
BaseXsck3505Request baseXsck3505Request = new BaseXsck3505Request();
baseXsck3505Request.setSelinfoDetail(xsck3505Requests);
String jsonStr = JSONUtil.toJsonStr(baseXsck3505Request);
JSONObject dataJson = JSONObject.parseObject(jsonStr);
return ybClient.ybPost("3505A", dataJson);
}
BaseXsck3505Request baseXsck3505Request = new BaseXsck3505Request();
baseXsck3505Request.setSelinfoDetail(xsck3505Requests);
String jsonStr = JSONUtil.toJsonStr(baseXsck3505Request);
JSONObject dataJson = JSONObject.parseObject(jsonStr);
ybClient.ybPost("3505A", dataJson);
}else {
return ResultVOUtils.error(500,"上传医保数据为空请核实");
}
return ResultVOUtils.error(500,"上传医保数据为空请核实");
}

Loading…
Cancel
Save