长泰医保上传接口修改

scpwxyy
yewj 7 months ago
parent 8eb19bd8c1
commit 011d8e3d6f

@ -1858,63 +1858,63 @@ public class CtqyyClient extends CommonHttpClient {
}
public void optionUploadCollectOrder3506(IoCollectOrder ioCollectOrder) {
List<IoCollectOrderBiz> bizList = ioCollectOrder.getBizList();
if (CollUtil.isNotEmpty(bizList)) {
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;
}
for (CollectOrderBizResponse collectOrderBizResponse : collectOrderBizResponseList) {
BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectById(collectOrderBizResponse.getRelId());
String itemCode = basicUdirelEntity.getMainId();
for (IoCollectOrderBiz item : bizList) {
if (item.getNameCode().equals(itemCode)) {
String[] codes = collectOrderBizResponse.getFinishUdiCode().split(",");
List<DrugInfoRequest> drugTraceList = new ArrayList<>();
// 遍历fruits数组
for (String code : codes) {
DrugInfoRequest request = new DrugInfoRequest();
request.setDrug_trac_codg(code);
drugTraceList.add(request);
}
// 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("")
.setl_id(null)
.psn_no(null)
.psn_cert_type(null)
.certno(null)
.psn_name(ioCollectOrder.getFromCorp())
.manu_lotnum(item.getBatchNo())
.manu_date(item.getProductDate())
.expy_end(item.getExpireDate())
.rx_flag(null)
.trdn_flag(ioCollectOrder.getSplitStatus() == 0 ? "0" : "1")
.finl_trns_pric(null)
.sel_retn_cnt(BigDecimal.valueOf(item.getActCount()))
.sel_retn_time(ioCollectOrder.getUpdateTime())
.sel_retn_opter_name(ioCollectOrder.getCreateUser())
.memo(item.getRemark())
.medins_prod_sel_no(null)
.mdtrt_sn(null)
.drugtracinfo(drugTraceList).build();
// 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;
}
xsth3506Requests.add(xsth3506Request);
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) {
DrugInfoRequest request = new DrugInfoRequest();
request.setDrug_trac_codg(code);
drugTraceList.add(request);
}
// 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.get)
.drugtracinfo(drugTraceList).build();
xsth3506Requests.add(xsth3506Request);
}
}
BaseXsth3506Request baseXsth3506Request = new BaseXsth3506Request();
baseXsth3506Request.setSelinfoDetail(xsth3506Requests);
String jsonStr = JSONUtil.toJsonStr(baseXsth3506Request);
JSONObject dataJson = JSONObject.parseObject(jsonStr);
ybClient.ybPost("3506A", dataJson);
}
BaseXsth3506Request baseXsth3506Request = new BaseXsth3506Request();
baseXsth3506Request.setSelinfoDetail(xsth3506Requests);
String jsonStr = JSONUtil.toJsonStr(baseXsth3506Request);
JSONObject dataJson = JSONObject.parseObject(jsonStr);
ybClient.ybPost("3506A", dataJson);
}
}

@ -26,13 +26,13 @@ public class VInsurNationGoodsReturn {
private String FIXMEDINS_HILIST_NAME;
@TableField(value = "FIXMEDINS_BCHNO")
private Integer FIXMEDINS_BCHNO;
private String FIXMEDINS_BCHNO;
@TableField(value = "SETL_ID")
private Integer SETL_ID;
private String SETL_ID;
@TableField(value = "PSN_NO")
private Integer PSN_NO;
private String PSN_NO;
@TableField(value = "PSN_CERT_TYPE")
private String PSN_CERT_TYPE;
@ -47,10 +47,10 @@ public class VInsurNationGoodsReturn {
private String MANU_LOTNUM;
@TableField(value = "MANU_DATE")
private Date MANU_DATE;
private String MANU_DATE;
@TableField(value = "EXPY_END")
private Date EXPY_END;
private String EXPY_END;
@TableField(value = "RX_FLAG")
private String RX_FLAG;

@ -97,7 +97,7 @@ public class Xsth3506Request {
/**
* /退
*/
private BigDecimal sel_retn_cnt;
private Integer sel_retn_cnt;
/**
* /退
@ -133,5 +133,4 @@ public class Xsth3506Request {
private String drug_trac_codg;
}

Loading…
Cancel
Save