|
|
|
@ -2069,18 +2069,15 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
// log.error("stoout_no===",stoout_no);
|
|
|
|
|
List<VYpzsPresInfo> list = vYpzsPresInfoMapper
|
|
|
|
|
.selectList(
|
|
|
|
|
new QueryWrapper<VYpzsPresInfo>().eq("STOOUT_NO",ioCollectOrder.getBillNo())
|
|
|
|
|
new QueryWrapper<VYpzsPresInfo>().eq("PRESCRIBE_NUMBER",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) {
|
|
|
|
@ -2092,6 +2089,8 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
if(StringUtils.isNotEmpty(collectOrderBizResponse.getFinishUdiCode())){
|
|
|
|
|
codes = collectOrderBizResponse.getFinishUdiCode().split(",");
|
|
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
collectOrderBizResponse.setTrdnFlag("0");
|
|
|
|
|
}
|
|
|
|
|
List<DrugInfoRequest> drugTraceList = new ArrayList<>();
|
|
|
|
|
// 遍历fruits数组
|
|
|
|
@ -2108,7 +2107,6 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
log.error("vInsurNationGoodsPhysic==="+vInsurNationGoodsPhysic);
|
|
|
|
|
// 医保自费类型
|
|
|
|
|
if(StringUtils.isEmpty(vInsurNationGoodsPhysic.getMDTRT_SETL_TYPE()) || !"1".equals(vInsurNationGoodsPhysic.getMDTRT_SETL_TYPE())){
|
|
|
|
|
vInsurNationGoodsPhysic.setMDTRT_SETL_TYPE("2");
|
|
|
|
@ -2143,7 +2141,7 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
.manu_date(vInsurNationGoodsPhysic.getMANU_DATE())
|
|
|
|
|
.expy_end(vInsurNationGoodsPhysic.getEXPY_END())
|
|
|
|
|
.rx_flag(vInsurNationGoodsPhysic.getRX_FLAG())
|
|
|
|
|
.trdn_flag(vInsurNationGoodsPhysic.getTRDN_FLAG())
|
|
|
|
|
.trdn_flag(collectOrderBizResponse.getTrdnFlag())
|
|
|
|
|
.finl_trns_pric(vInsurNationGoodsPhysic.getFINL_TRNS_PRIC())
|
|
|
|
|
.rxno(vInsurNationGoodsPhysic.getRXNO())
|
|
|
|
|
.rx_circ_flag(vInsurNationGoodsPhysic.getRX_CIRC_FLAG())
|
|
|
|
@ -2158,7 +2156,6 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
.memo(vInsurNationGoodsPhysic.getMEMO())
|
|
|
|
|
.mdtrt_setl_type(vInsurNationGoodsPhysic.getMDTRT_SETL_TYPE())
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
log.error("xsck3505Request==="+xsck3505Request);
|
|
|
|
|
|
|
|
|
|
xsck3505Requests.add(xsck3505Request);
|
|
|
|
|
}
|
|
|
|
@ -2168,7 +2165,7 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
baseXsck3505Request.setSelinfoDetail(xsck3505Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsck3505Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
return ybClient.ybPost("3505A", dataJson);
|
|
|
|
|
return ybClient.ybPost("3505A", dataJson,ioCollectOrder.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(500,"上传医保数据为空请核实");
|
|
|
|
@ -2233,6 +2230,9 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
//todo 处方药标志先写死 后面要商量怎么获得
|
|
|
|
|
String rxFlag ="1";
|
|
|
|
|
log.error("optionUploadCollectOrder35051===item==="+item);
|
|
|
|
|
if(org.apache.commons.lang3.StringUtils.isEmpty(item.getBatchNo())){
|
|
|
|
|
item.setBatchNo("null");
|
|
|
|
|
}
|
|
|
|
|
Xsck35051Request xsck35051Request = Xsck35051Request.builder()
|
|
|
|
|
.med_list_codg(item.getYbbm())
|
|
|
|
|
.fixmedins_hilist_id(item.getNameCode())
|
|
|
|
@ -2279,7 +2279,7 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
baseXsck35051Request.setSelinfoDetail(xsck35051Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsck35051Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
return ybClient.ybPost("35051", dataJson);
|
|
|
|
|
return ybClient.ybPost("35051", dataJson,ioCollectOrder.getBillNo());
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "上传医保数据为空请核实");
|
|
|
|
|
}
|
|
|
|
@ -2334,7 +2334,7 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
basePcsc3501Request.setSelinfoDetail(pcsc3501Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(basePcsc3501Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
ybClient.ybPost("3501A", dataJson);
|
|
|
|
|
ybClient.ybPost("3501A", dataJson,ioCollectOrder.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2352,15 +2352,15 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
// if (item.getYbbm().equals(itemCode)) {
|
|
|
|
|
String[] codes = item.getFinishUdiCode().split(",");
|
|
|
|
|
String nameCode = item.getNameCode();
|
|
|
|
|
BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(
|
|
|
|
|
new QueryWrapper<BasicProductsEntity>().eq("nameCode", nameCode).last("limit 1")
|
|
|
|
|
BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(
|
|
|
|
|
new QueryWrapper<BasicProductsEntity>().eq("nameCode",nameCode).last("limit 1")
|
|
|
|
|
);
|
|
|
|
|
if (Objects.isNull(basicProductsEntity)) {
|
|
|
|
|
return ResultVOUtils.error(500, "产品为空请检查");
|
|
|
|
|
if(Objects.isNull(basicProductsEntity)){
|
|
|
|
|
return ResultVOUtils.error(500,"产品为空请检查");
|
|
|
|
|
}
|
|
|
|
|
Integer packLevel = Integer.valueOf(basicProductsEntity.getPackLevel());
|
|
|
|
|
List<DrugInfoRequest> drugTraceList = new ArrayList<>();
|
|
|
|
|
List<String> codeList = new ArrayList<>();
|
|
|
|
|
List<String> codeList = new ArrayList<>();
|
|
|
|
|
// 遍历fruits数组
|
|
|
|
|
for (String code : codes) {
|
|
|
|
|
if (StrUtil.isNotBlank(code)) {
|
|
|
|
@ -2373,8 +2373,8 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 级别为2的产品码不可能只有一个
|
|
|
|
|
if (packLevel > 1 && codeList.size() < 2) {
|
|
|
|
|
return ResultVOUtils.error(500, "大包装码关联关系拉取不到请检查" + code);
|
|
|
|
|
if(packLevel >1 && codeList.size() <2){
|
|
|
|
|
return ResultVOUtils.error(500,"大包装码关联关系拉取不到请检查"+code);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2385,24 +2385,24 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
drugTraceList.add(request);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isEmpty(drugTraceList)) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据要传的码为空请检查");
|
|
|
|
|
if(CollUtil.isEmpty(drugTraceList)){
|
|
|
|
|
return ResultVOUtils.error(500,"单据要传的码为空请检查");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO: 2024/9/10 字段未完全正确对应
|
|
|
|
|
Kcbg3502Request kcbg3502Request = Kcbg3502Request.builder()
|
|
|
|
|
.med_list_codg(item.getYbbm())
|
|
|
|
|
.inv_chg_type("108")
|
|
|
|
|
.fixmedins_hilist_id(item.getThrCode())
|
|
|
|
|
.fixmedins_hilist_name(item.getCpmctymc())
|
|
|
|
|
.fixmedins_bchno(item.getOrderIdFk())
|
|
|
|
|
// TODO: 价格和数量可以不填
|
|
|
|
|
// .pric("0")
|
|
|
|
|
// .cnt(item.getActCount())
|
|
|
|
|
.fixmedins_bchno("0000")
|
|
|
|
|
.pric("0")
|
|
|
|
|
.cnt(item.getActCount())
|
|
|
|
|
.rx_flag("1")
|
|
|
|
|
.inv_chg_time(item.getUpdateTime())
|
|
|
|
|
.inv_chg_opter_name(ioCollectOrder.getCreateUser())
|
|
|
|
|
.memo(item.getRemark())
|
|
|
|
|
.trdn_flag(item.getTrdnFlag())
|
|
|
|
|
.trdn_flag("0")
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
kcbg3502Requests.add(kcbg3502Request);
|
|
|
|
|
// }
|
|
|
|
@ -2412,12 +2412,13 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
baseKcbg3502Request.setInvinfoDetail(kcbg3502Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseKcbg3502Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
return ybClient.ybPost("3502A", dataJson);
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "上传医保数据为空请核实");
|
|
|
|
|
return ybClient.ybPost("3502A", dataJson,ioCollectOrder.getBillNo());
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(500,"上传医保数据为空请核实");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void optionUploadCollectOrder3506(IoCollectOrder ioCollectOrder) {
|
|
|
|
|
// List<IoCollectOrderBiz> bizList = ioCollectOrder.getBizList();
|
|
|
|
|
List<CollectOrderBizResponse> collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
|
|
|
|
@ -2484,7 +2485,7 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
baseXsth3506Request.setSelinfoDetail(xsth3506Requests);
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseXsth3506Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
ybClient.ybPost("3506A", dataJson);
|
|
|
|
|
ybClient.ybPost("3506A", dataJson,ioCollectOrder.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|