|
|
|
@ -94,13 +94,15 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
// 目前只有3502调通过上传医保 其他先不配置怕自动上传出问题
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_3501 = {};
|
|
|
|
|
private final String[] buyType_3502 = {"SC73650724355678"};
|
|
|
|
|
private final String[] buyType_3502 = {"SC73650724355678","SC74159456307972"};
|
|
|
|
|
private final String[] buyType_3504 = {};
|
|
|
|
|
|
|
|
|
|
// private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
|
|
|
|
|
// private final String[] buyType_3505 = {"YPCF002","YPCF003"};
|
|
|
|
|
private final String[] buyType_3505 = {"YPCF002","YPCF003"};
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_3506 = {"YPCFTF002","YPCFTF003"};
|
|
|
|
|
// private final String[] buyType_3506 = {"YPCFTF002","YPCFTF003"};
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_35051 = {"SC72197936495755"};
|
|
|
|
|
|
|
|
|
@ -213,7 +215,10 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
private VA015Mapper va015Mapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private VA015MxMapper va015MxMapper;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private VA012Mapper va012Mapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private VA013Mapper va013Mapper;
|
|
|
|
|
/**
|
|
|
|
|
* 拼接xml请求头
|
|
|
|
|
*
|
|
|
|
@ -1705,7 +1710,7 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse uploadCollectOrder(PostCollectOrderRequest postCollectOrderRequest) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.error("postCollectOrderRequest"+postCollectOrderRequest);
|
|
|
|
|
List<IoCollectOrder> collectOrderList = postCollectOrderRequest.getCollectOrderList();
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(collectOrderList)) {
|
|
|
|
@ -1978,89 +1983,116 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
public BaseResponse optionUploadCollectOrder3505(IoCollectOrder ioCollectOrder) {
|
|
|
|
|
//摆药流水号
|
|
|
|
|
// String stoout_no = ioCollectOrder.getBackupOrderRemark1();
|
|
|
|
|
VA010 va010 = va010Service.getOne(new LambdaQueryWrapper<VA010>().eq(VA010::getCode, ioCollectOrder.getBillNo()));
|
|
|
|
|
List<VA010Mx> list = va010MxMapper.selectList(new LambdaQueryWrapper<VA010Mx>().eq(VA010Mx::getCodefk, va010.getCode()));
|
|
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
|
|
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 (VA010Mx va010Mx : list) {
|
|
|
|
|
if (va010Mx.getHiltstCode().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<VA010> list = va010Mapper
|
|
|
|
|
.selectList(
|
|
|
|
|
new QueryWrapper<VA010>().eq("code",ioCollectOrder.getBillNo())
|
|
|
|
|
);
|
|
|
|
|
if ( CollUtil.isNotEmpty(list)) {
|
|
|
|
|
|
|
|
|
|
String stoout_no = list.get(0).getCode();
|
|
|
|
|
log.error("stoout_no==="+stoout_no);
|
|
|
|
|
|
|
|
|
|
List<VA012> va012List = va012Mapper.selectList(new LambdaQueryWrapper<VA012>().eq(VA012::getSTOOUT_NO, stoout_no));
|
|
|
|
|
log.error("va012==="+va012List);
|
|
|
|
|
if ( CollUtil.isNotEmpty(va012List)) {
|
|
|
|
|
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 (VA012 va012 : va012List) {
|
|
|
|
|
if (va012.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("va012==="+va012);
|
|
|
|
|
// 医保自费类型
|
|
|
|
|
if(StringUtils.isEmpty(va012.getMDTRT_SETL_TYPE()) || !"1".equals(va012.getMDTRT_SETL_TYPE())){
|
|
|
|
|
va012.setMDTRT_SETL_TYPE("2");
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(va012.getMDTRT_SN())){
|
|
|
|
|
va012.setMDTRT_SN(ioCollectOrder.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isEmpty(va012.getFIXMEDINS_BCHNO())){
|
|
|
|
|
va012.setFIXMEDINS_BCHNO(ioCollectOrder.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
Xsck3505Request xsck3505Request = Xsck3505Request.builder()
|
|
|
|
|
.med_list_codg(va012.getMED_LIST_CODG())
|
|
|
|
|
.fixmedins_hilist_id(va012.getFIXMEDINS_HILIST_ID())
|
|
|
|
|
.fixmedins_hilist_name(va012.getFIXMEDINS_HILIST_NAME())
|
|
|
|
|
.fixmedins_bchno(va012.getFIXMEDINS_BCHNO())
|
|
|
|
|
.prsc_dr_cert_type(va012.getPRSC_DR_CERT_TYPE())
|
|
|
|
|
.prsc_dr_certno(va012.getPRSC_DR_CERTNO())
|
|
|
|
|
.prsc_dr_name(va012.getPRSC_DR_NAME())
|
|
|
|
|
.phar_cert_type(va012.getPHAR_CERT_TYPE())
|
|
|
|
|
.phar_certno(va012.getPHAR_CERTNO())
|
|
|
|
|
.phar_name(va012.getPHAR_NAME())
|
|
|
|
|
.phar_prac_cert_no(va012.getPHAR_PRAC_CERT_NO())
|
|
|
|
|
.hi_feesetl_type(va012.getHI_FEESETL_TYPE())
|
|
|
|
|
.setl_id(va012.getSETL_ID())
|
|
|
|
|
.mdtrt_sn(va012.getMDTRT_SN())
|
|
|
|
|
.psn_no(va012.getPSN_NO())
|
|
|
|
|
.psn_cert_type(va012.getPSN_CERT_TYPE())
|
|
|
|
|
.certno(va012.getCERTNO())
|
|
|
|
|
.psn_name(va012.getPSN_NAME())
|
|
|
|
|
.manu_lotnum(va012.getMANU_LOTNUM())
|
|
|
|
|
.manu_date(va012.getMANU_DATE())
|
|
|
|
|
.expy_end(va012.getEXPY_END())
|
|
|
|
|
.rx_flag(va012.getRX_FLAG())
|
|
|
|
|
.trdn_flag(va012.getTRDN_FLAG())
|
|
|
|
|
.finl_trns_pric(va012.getFINL_TRNS_PRIC())
|
|
|
|
|
.rxno(va012.getRXNO())
|
|
|
|
|
.rx_circ_flag(va012.getRX_CIRC_FLAG())
|
|
|
|
|
.rtal_docno(va012.getRTAL_DOCNO())
|
|
|
|
|
.stoout_no(va012.getSTOOUT_NO())
|
|
|
|
|
.bchno(va012.getBCHNO())
|
|
|
|
|
.drug_prod_barc(va012.getRUG_PROD_BARC())
|
|
|
|
|
.shelf_posi(va012.getSHELF_POSI())
|
|
|
|
|
.sel_retn_cnt(va012.getSEL_RETN_CNT())
|
|
|
|
|
.sel_retn_time(va012.getSEL_RETN_TIME())
|
|
|
|
|
.sel_retn_opter_name(va012.getSEL_RETN_OPTER_NAME())
|
|
|
|
|
.memo(va012.getMEMO())
|
|
|
|
|
.mdtrt_setl_type(va012.getMDTRT_SETL_TYPE())
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
log.error("xsck3505Request==="+xsck3505Request);
|
|
|
|
|
|
|
|
|
|
xsck3505Requests.add(xsck3505Request);
|
|
|
|
|
}
|
|
|
|
|
Xsck3505Request xsck3505Request = Xsck3505Request.builder()
|
|
|
|
|
.med_list_codg(va010Mx.getHiltstCode())
|
|
|
|
|
.fixmedins_hilist_id(va010Mx.getItemcode())
|
|
|
|
|
.fixmedins_hilist_name(va010Mx.getItemname())
|
|
|
|
|
.fixmedins_bchno(va010Mx.getCodefk())
|
|
|
|
|
.prsc_dr_cert_type(null)
|
|
|
|
|
.prsc_dr_certno(null)
|
|
|
|
|
.prsc_dr_name(va010.getCreatedr())
|
|
|
|
|
.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(va010.getSickcode())
|
|
|
|
|
.psn_cert_type(null)
|
|
|
|
|
.certno(null)
|
|
|
|
|
.psn_name(va010.getSickname())
|
|
|
|
|
.manu_lotnum(null)
|
|
|
|
|
.manu_date(null)
|
|
|
|
|
.expy_end(null)
|
|
|
|
|
.rx_flag("1")
|
|
|
|
|
.trdn_flag(null)
|
|
|
|
|
.finl_trns_pric(new BigDecimal(va010Mx.getAmount()))
|
|
|
|
|
.rxno(null)
|
|
|
|
|
.rx_circ_flag(null)
|
|
|
|
|
.rtal_docno(null)
|
|
|
|
|
.stoout_no(null)
|
|
|
|
|
.bchno(null)
|
|
|
|
|
.drug_prod_barc(null)
|
|
|
|
|
.shelf_posi(null)
|
|
|
|
|
.sel_retn_cnt(Integer.valueOf(va010Mx.getCount()))
|
|
|
|
|
.sel_retn_time(va010.getPrescribedate())
|
|
|
|
|
.sel_retn_opter_name(null)
|
|
|
|
|
.memo(null)
|
|
|
|
|
.mdtrt_setl_type(null)
|
|
|
|
|
.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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ybClient.ybPostScyh("3505A", dataJson);
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(500,"上传医保数据为空请核实");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "医保视图数据查不到,请核实");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.error(500,"上传医保数据为空请核实");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public BaseResponse optionUploadCollectOrder35051(IoCollectOrder ioCollectOrder) {
|
|
|
|
@ -2283,10 +2315,13 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 级别为2的产品码不可能只有一个
|
|
|
|
|
if (packLevel > 1 && codeList.size() < 2) {
|
|
|
|
|
return ResultVOUtils.error(500, "大包装码关联关系拉取不到请检查" + code);
|
|
|
|
|
if(buyType_3502[0].equals(ioCollectOrder.getBillNo())){
|
|
|
|
|
// 级别为2的产品码不可能只有一个
|
|
|
|
|
if (packLevel > 1 && codeList.size() < 2) {
|
|
|
|
|
return ResultVOUtils.error(500, "大包装码关联关系拉取不到请检查" + code);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Set<String> set = new HashSet(codeList);
|
|
|
|
@ -2332,15 +2367,15 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
public BaseResponse optionUploadCollectOrder3506(IoCollectOrder ioCollectOrder) {
|
|
|
|
|
VA011 va011 = va011Service.getOne(new LambdaQueryWrapper<VA011>().eq(VA011::getCode, ioCollectOrder.getBillNo()));
|
|
|
|
|
List<VA011Mx> list = va011MxMapper.selectList(new LambdaQueryWrapper<VA011Mx>().eq(VA011Mx::getCodefk, va011.getCode()));
|
|
|
|
|
List<VA013> list = va013Mapper.selectList(new LambdaQueryWrapper<VA013>().eq(VA013::getSTOOUT_NO, va011.getCode()));
|
|
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
|
|
List<CollectOrderBizResponse> collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
|
|
|
|
|
List<Xsth3506Request> xsck3506Requests = new ArrayList<>();
|
|
|
|
|
for (CollectOrderBizResponse collectOrderBizResponse : collectOrderBizResponseList) {
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(collectOrderBizResponse.getRelId());
|
|
|
|
|
String itemCode = basicUdirelEntity.getMainId();
|
|
|
|
|
for (VA011Mx item : list) {
|
|
|
|
|
if (item.getHiltstCode().equals(itemCode)) {
|
|
|
|
|
for (VA013 item : list) {
|
|
|
|
|
if (item.getMED_LIST_CODG().equals(itemCode)) {
|
|
|
|
|
String[] codes = collectOrderBizResponse.getFinishUdiCode().split(",");
|
|
|
|
|
List<DrugInfoRequest> drugTraceList = new ArrayList<>();
|
|
|
|
|
// 遍历fruits数组
|
|
|
|
@ -2359,32 +2394,32 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// // TODO: 2024/9/10 字段未完全正确对应
|
|
|
|
|
// Xsth3506Request xsth3506Request = Xsth3506Request.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())
|
|
|
|
|
// .setl_id(vInsurNationGoodsPhysic.getSETL_ID())
|
|
|
|
|
// .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())
|
|
|
|
|
// .sel_retn_cnt(vInsurNationGoodsPhysic.getSEL_RETN_CNT())
|
|
|
|
|
// .sel_retn_time(vInsurNationGoodsPhysic.getSEL_RETN_TIME())
|
|
|
|
|
// .sel_retn_opter_name(vInsurNationGoodsPhysic.getSEL_RETN_OPTER_NAME())
|
|
|
|
|
// .memo(item.getRemark())
|
|
|
|
|
// .medins_prod_sel_no(vInsurNationGoodsPhysic.getMEDINS_PROL_SEL_NO())
|
|
|
|
|
// .mdtrt_sn(vInsurNationGoodsPhysic.getMDTRT_SN())
|
|
|
|
|
// .drugtracinfo(drugTraceList).build();
|
|
|
|
|
//
|
|
|
|
|
// xsck3506Requests.add(xsth3506Request);
|
|
|
|
|
// TODO: 2024/9/10 字段未完全正确对应
|
|
|
|
|
Xsth3506Request xsth3506Request = Xsth3506Request.builder()
|
|
|
|
|
.med_list_codg(item.getMED_LIST_CODG())
|
|
|
|
|
.fixmedins_hilist_id(item.getFIXMEDINS_HILIST_ID())
|
|
|
|
|
.fixmedins_hilist_name(item.getFIXMEDINS_HILIST_NAME())
|
|
|
|
|
.fixmedins_bchno(item.getFIXMEDINS_BCHNO())
|
|
|
|
|
.setl_id(item.getSETL_ID())
|
|
|
|
|
.psn_no(item.getPSN_NO())
|
|
|
|
|
.psn_cert_type(item.getPSN_CERT_TYPE())
|
|
|
|
|
.certno(item.getCERTNO())
|
|
|
|
|
.psn_name(item.getPSN_NAME())
|
|
|
|
|
.manu_lotnum(item.getMANU_LOTNUM())
|
|
|
|
|
.manu_date(item.getMANU_DATE())
|
|
|
|
|
.expy_end(item.getEXPY_END())
|
|
|
|
|
.rx_flag(item.getRX_FLAG())
|
|
|
|
|
.trdn_flag(item.getTRDN_FLAG())
|
|
|
|
|
.finl_trns_pric(item.getFINL_TRNS_PRIC())
|
|
|
|
|
.sel_retn_cnt(item.getSEL_RETN_CNT())
|
|
|
|
|
.sel_retn_time(item.getSEL_RETN_TIME())
|
|
|
|
|
.sel_retn_opter_name(item.getSEL_RETN_OPTER_NAME())
|
|
|
|
|
.memo(item.getMEMO())
|
|
|
|
|
.medins_prod_sel_no(null)
|
|
|
|
|
.mdtrt_sn(item.getMDTRT_SN())
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
|
|
|
|
|
xsck3506Requests.add(xsth3506Request);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|