|
|
|
@ -1917,6 +1917,7 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
ioCollectOrder.setUpdateTime(new Date());
|
|
|
|
|
ioCollectOrder.setSplitStatus(0);
|
|
|
|
|
ioCollectOrder.setTagStatus(0);
|
|
|
|
|
ioCollectOrder.setBackupOrderRemark1(item.getRemark());
|
|
|
|
|
List<VA011Mx> itemDetails = finalDetailsMap.get(item.getCode());
|
|
|
|
|
List<IoCollectOrderBiz> bizList = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(itemDetails)) {
|
|
|
|
@ -2320,70 +2321,85 @@ public class HlfyyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void optionUploadCollectOrder3506(IoCollectOrder ioCollectOrder) {
|
|
|
|
|
// List<IoCollectOrderBiz> bizList = ioCollectOrder.getBizList();
|
|
|
|
|
List<CollectOrderBizResponse> collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
|
|
|
|
|
List<Xsth3506Request> xsth3506Requests = new ArrayList<>();
|
|
|
|
|
List<VInsurNationGoodsReturn> vInsurNationGoodsReturns = vInsurNationGoodsReturnMapper.selectList(new LambdaQueryWrapper<VInsurNationGoodsReturn>().eq(VInsurNationGoodsReturn::getAPPLY_NO, ioCollectOrder.getBillNo()));
|
|
|
|
|
if (CollUtil.isEmpty(vInsurNationGoodsReturns)) {
|
|
|
|
|
log.error("申请单号{}不存在", ioCollectOrder.getBillNo());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
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()));
|
|
|
|
|
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 (VA011Mx va011Mx : list) {
|
|
|
|
|
if (va011Mx.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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (CollectOrderBizResponse item : collectOrderBizResponseList) {
|
|
|
|
|
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(item.getRelId());
|
|
|
|
|
String itemCode = basicUdirelEntity.getMainId();
|
|
|
|
|
for (VInsurNationGoodsReturn vInsurNationGoodsPhysic : vInsurNationGoodsReturns) {
|
|
|
|
|
if (vInsurNationGoodsPhysic.getFIXMEDINS_HILIST_ID().equals(itemCode)) {
|
|
|
|
|
String[] codes = item.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) {
|
|
|
|
|
DrugInfoRequest request = new DrugInfoRequest();
|
|
|
|
|
request.setDrug_trac_codg(code);
|
|
|
|
|
drugTraceList.add(request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Xsck3505Request xsck3505Request = Xsck3505Request.builder()
|
|
|
|
|
.med_list_codg(va011Mx.getHiltstCode())
|
|
|
|
|
.fixmedins_hilist_id(va011Mx.getItemcode())
|
|
|
|
|
.fixmedins_hilist_name(va011Mx.getItemname())
|
|
|
|
|
.fixmedins_bchno(va011Mx.getCodefk())
|
|
|
|
|
.prsc_dr_cert_type(null)
|
|
|
|
|
.prsc_dr_certno(null)
|
|
|
|
|
.prsc_dr_name(va011.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(va011.getSickcode())
|
|
|
|
|
.psn_cert_type(null)
|
|
|
|
|
.certno(null)
|
|
|
|
|
.psn_name(va011.getSickname())
|
|
|
|
|
.manu_lotnum(null)
|
|
|
|
|
.manu_date(null)
|
|
|
|
|
.expy_end(null)
|
|
|
|
|
.rx_flag("1")
|
|
|
|
|
.trdn_flag(null)
|
|
|
|
|
.finl_trns_pric(new BigDecimal(va011Mx.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(va011Mx.getCount()))
|
|
|
|
|
.sel_retn_time(va011.getPrescribedate())
|
|
|
|
|
.sel_retn_opter_name(null)
|
|
|
|
|
.memo(null)
|
|
|
|
|
.mdtrt_setl_type(null)
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
xsck3505Requests.add(xsck3505Request);
|
|
|
|
|
}
|
|
|
|
|
// TODO: 2024/9/10 字段未完全正确对应
|
|
|
|
|
Xsth3506Request xsth3506Request = Xsth3506Request.builder()
|
|
|
|
|
.med_list_codg(item.getYbbm())
|
|
|
|
|
.fixmedins_hilist_id(item.getThrCode())
|
|
|
|
|
.fixmedins_hilist_name(item.getCpmctymc())
|
|
|
|
|
.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();
|
|
|
|
|
|
|
|
|
|
xsth3506Requests.add(xsth3506Request);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
BaseXsck3505Request baseXsck3505Request = new BaseXsck3505Request();
|
|
|
|
|
// baseXsck3505Request.setSelinfoDetail(xsck3505Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsck3505Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BaseXsth3506Request baseXsth3506Request = new BaseXsth3506Request();
|
|
|
|
|
baseXsth3506Request.setSelinfoDetail(xsth3506Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsth3506Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
ybClient.ybPostScyh("3506A", dataJson);
|
|
|
|
|
return ybClient.ybPostScyh("3505A", dataJson);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|