加上35051 销售出库上传医保

hlfyyy
qiuyt 4 weeks ago
parent 35fddf6682
commit bedafc8a75

@ -98,6 +98,8 @@ public class HlfyyyClient extends CommonHttpClient {
private final String[] buyType_3505 = {};
private final String[] buyType_3506 = {};
private final String[] buyType_35051 = {"SC72249388338364","SC72197936495755"};
@Value("${DSF_XML_SQL_TYPE:MySql}")
private String defXmlSqlType;
@Resource
@ -1708,6 +1710,8 @@ 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,"上传类型都未对上请检查单据类型");
}
@ -2032,7 +2036,91 @@ public class HlfyyyClient extends CommonHttpClient {
}
public BaseResponse optionUploadCollectOrder35051(IoCollectOrder ioCollectOrder) {
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();
List<Xsck35051Request> xsck35051Requests = 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);
}
}
}
}
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())
.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, "医保视图数据查不到,请核实");
}
}
public void optionUploadCollectOrder3501(IoCollectOrder ioCollectOrder) {
List<IoCollectOrderBiz> bizList = ioCollectOrder.getBizList();
if (CollUtil.isNotEmpty(bizList)) {

@ -0,0 +1,10 @@
package com.glxp.mipsdl.req.yb;
import lombok.Data;
import java.util.List;
@Data
public class BaseXsck35051Request {
private List<Xsck35051Request> selinfoDetail;
}

@ -0,0 +1,213 @@
package com.glxp.mipsdl.req.yb;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.List;
/**
*
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Xsck35051Request {
/**
*
*/
private String med_list_codg;
/**
*
*/
private String fixmedins_hilist_id;
/**
*
*/
private String fixmedins_hilist_name;
/**
*
*/
private String fixmedins_bchno;
/**
*
*/
private String prsc_dr_cert_type;
/**
*
*/
private String prsc_dr_certno;
/**
*
*/
private String prsc_dr_name;
/**
*
*/
private String phar_cert_type;
/**
*
*/
private String phar_certno;
/**
*
*/
private String phar_name;
/**
*
*/
private String phar_prac_cert_no;
/**
*
*/
private String hi_feesetl_type;
/**
* ID
*/
private String setl_id;
/**
*
*/
private String mdtrt_sn;
/**
*
*/
private String psn_no;
/**
*
*/
private String psn_cert_type;
/**
*
*/
private String certno;
/**
*
*/
private String psn_name;
/**
*
*/
private String manu_lotnum;
/**
*
*/
private String manu_date;
/**
*
*/
private String expy_end;
/**
*
*/
private String rx_flag;
/**
*
*/
private String trdn_flag;
/**
*
*/
private BigDecimal finl_trns_pric;
/**
*
*/
private String rxno;
/**
*
*/
private String rx_circ_flag;
/**
*
*/
private String rtal_docno;
/**
*
*/
private String stoout_no;
/**
*
*/
private String bchno;
/**
*
*/
private String drug_trac_codg;
/**
*
*/
private String drug_prod_barc;
/**
*
*/
private String shelf_posi;
/**
* /退
*/
private Integer sel_retn_cnt;
/**
* /退
*/
private String sel_retn_time;
/**
* /退
*/
private String sel_retn_opter_name;
/**
*
*/
private String memo;
/**
*
*/
private String mdtrt_setl_type;
/**
*
*/
private List<DrugInfoRequest> drugtracinfo;
}
Loading…
Cancel
Save