|
|
|
@ -78,7 +78,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
// 目前只有3505调通过上传医保 其他先不配置怕自动上传出问题
|
|
|
|
|
private final String[] buyType_3501 = {};
|
|
|
|
|
private final String[] buyType_3502 = { };
|
|
|
|
|
private final String[] buyType_3502 = {"SC73200069614118"};
|
|
|
|
|
private final String[] buyType_3504 = { };
|
|
|
|
|
|
|
|
|
|
private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
|
|
|
|
@ -2213,6 +2213,10 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
String formattedDate = sdf.format(ioCollectOrder.getBillTime());
|
|
|
|
|
//todo 处方药标志先写死 后面要商量怎么获得
|
|
|
|
|
String rxFlag ="1";
|
|
|
|
|
// 云霄妇幼没有外网所有写成空
|
|
|
|
|
if(StringUtils.isEmpty(item.getBatchNo())){
|
|
|
|
|
item.setBatchNo("null");
|
|
|
|
|
}
|
|
|
|
|
log.error("optionUploadCollectOrder35051===item==="+item);
|
|
|
|
|
Xsck35051Request xsck35051Request = Xsck35051Request.builder()
|
|
|
|
|
.med_list_codg(item.getYbbm())
|
|
|
|
@ -2333,15 +2337,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)) {
|
|
|
|
@ -2354,8 +2358,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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2366,24 +2370,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("0000")
|
|
|
|
|
.pric("0")
|
|
|
|
|
.cnt(item.getActCount())
|
|
|
|
|
.fixmedins_bchno(item.getOrderIdFk())
|
|
|
|
|
// TODO: 价格和数量可以不填
|
|
|
|
|
// .pric("0")
|
|
|
|
|
// .cnt(item.getActCount())
|
|
|
|
|
.rx_flag("1")
|
|
|
|
|
.inv_chg_time(item.getUpdateTime())
|
|
|
|
|
.inv_chg_opter_name(ioCollectOrder.getCreateUser())
|
|
|
|
|
.memo(item.getRemark())
|
|
|
|
|
.trdn_flag("0")
|
|
|
|
|
.trdn_flag(item.getTrdnFlag())
|
|
|
|
|
.drugtracinfo(drugTraceList).build();
|
|
|
|
|
kcbg3502Requests.add(kcbg3502Request);
|
|
|
|
|
// }
|
|
|
|
@ -2394,8 +2398,8 @@ public class yxfyClient extends CommonHttpClient {
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(baseKcbg3502Request);
|
|
|
|
|
JSONObject dataJson = JSONObject.parseObject(jsonStr);
|
|
|
|
|
return ybClient.ybPost("3502A", dataJson);
|
|
|
|
|
}else {
|
|
|
|
|
return ResultVOUtils.error(500,"上传医保数据为空请核实");
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "上传医保数据为空请核实");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|