diff --git a/pom.xml b/pom.xml
index ebffb18..daf3d3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -184,7 +184,26 @@
jna
5.10.0
-
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.4.2
+
+
+
+ org.mybatis
+ mybatis
+
+
+ org.mybatis
+ mybatis-spring
+
+
+
diff --git a/src/main/java/com/glxp/mipsdl/client/hlhyxyy/HlhyxyyClient.java b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/HlhyxyyClient.java
new file mode 100644
index 0000000..823ecdf
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/HlhyxyyClient.java
@@ -0,0 +1,2089 @@
+package com.glxp.mipsdl.client.hlhyxyy;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.ReflectUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.pagehelper.PageInfo;
+import com.glxp.mipsdl.client.CommonHttpClient;
+
+import com.glxp.mipsdl.client.hlhyxyy.entity.InvCodeResultEntity;
+import com.glxp.mipsdl.client.hlhyxyy.entity.InvProjectResultEntity;
+import com.glxp.mipsdl.client.hlhyxyy.entity.InvResultEntity;
+import com.glxp.mipsdl.config.ThirdSysConfig;
+import com.glxp.mipsdl.constant.BusTypeConstant;
+import com.glxp.mipsdl.constant.ConstantType;
+import com.glxp.mipsdl.constant.Constants;
+import com.glxp.mipsdl.dao.auth.AuthUserDao;
+import com.glxp.mipsdl.dao.auth.AuthWarehouseDao;
+import com.glxp.mipsdl.dao.basic.*;
+import com.glxp.mipsdl.dao.inout.*;
+import com.glxp.mipsdl.dao.thrsys.ThrInvWarehouseDao;
+import com.glxp.mipsdl.dao.thrsys.ThrProductsDao;
+import com.glxp.mipsdl.dao.thrsys.ThrSystemBusApiDao;
+import com.glxp.mipsdl.entity.auth.AuthUserEntity;
+import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
+import com.glxp.mipsdl.entity.basic.*;
+import com.glxp.mipsdl.entity.ctqyy.*;
+import com.glxp.mipsdl.entity.hlhyxyy.VA001;
+import com.glxp.mipsdl.entity.inout.*;
+import com.glxp.mipsdl.entity.system.ThrYbSetupMapper;
+import com.glxp.mipsdl.entity.thrsys.ThrCorpEntity;
+import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
+import com.glxp.mipsdl.entity.thrsys.ThrProductsEntity;
+import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity;
+import com.glxp.mipsdl.http.HttpClient;
+import com.glxp.mipsdl.req.base.*;
+import com.glxp.mipsdl.req.ctqyy.*;
+import com.glxp.mipsdl.req.post.*;
+import com.glxp.mipsdl.req.yb.*;
+import com.glxp.mipsdl.req.zaxyy.ZaxzyyOrderRequest;
+import com.glxp.mipsdl.req.zzzyy.ZzzyyRequest;
+import com.glxp.mipsdl.res.BaseResponse;
+import com.glxp.mipsdl.res.PageSimpleResponse;
+import com.glxp.mipsdl.res.ctqyy.CtBaseResponse;
+import com.glxp.mipsdl.res.udiwms.*;
+import com.glxp.mipsdl.service.auth.AuthWarehouseService;
+import com.glxp.mipsdl.service.basic.RelCodeDetailService;
+import com.glxp.mipsdl.service.hlhyxyy.*;
+import com.glxp.mipsdl.service.order.OrderUploadLogService;
+import com.glxp.mipsdl.service.system.SysParamConfigService;
+import com.glxp.mipsdl.service.thrsys.ThrCorpService;
+import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
+import com.glxp.mipsdl.service.yb.YbClient;
+import com.glxp.mipsdl.thirddao.ctqyy.*;
+import com.glxp.mipsdl.util.*;
+import lombok.extern.slf4j.Slf4j;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.DocumentHelper;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service(value = "100015HttpClient")
+public class HlhyxyyClient extends CommonHttpClient {
+ private final String[] buyType_3501 = {"24"};
+ private final String[] buyType_3502 = {"7", "6", "5", "4", "1", "16", "12", "28", "35"};
+ private final String[] buyType_3505 = {"QXCF001", "YPCF002"};
+ private final String[] buyType_3506 = {"YPTH001"};
+
+ @Resource
+ private ThrSystemDetailService thrSystemDetailService;
+ @Resource
+ private HttpClient httpClient;
+
+ @Resource
+ private SubmitOrderUtil submitOrderUtil;
+ @Resource
+ private IoOrderUploadLogDao orderUploadLogDao;
+ @Resource
+ private IoOrderDao orderDao;
+ @Resource
+ private ThrSystemBusApiDao thrSystemBusApiDao;
+ @Resource
+ private BasicBussinessTypeDao basicBussinessTypeDao;
+ @Resource
+ private BasicCorpDao basicCorpDao;
+ @Resource
+ private IoCodeDao codeDao;
+ @Resource
+ private AuthWarehouseDao authWarehouseDao;
+ @Resource
+ private ThrInvWarehouseDao thrInvWarehouseDao;
+ @Resource
+ private AuthWarehouseService authWarehouseService;
+ @Resource
+ private ThirdSysConfig thirdSysConfig;
+ @Resource
+ private ThrCorpService thrCorpService;
+ @Resource
+ private IoOrderDetailBizDao orderDetailBizDao;
+ @Resource
+ private IoOrderDetailCodeDao orderDetailCodeDao;
+ @Resource
+ private AuthUserDao authUserDao;
+ @Resource
+ BasicUdirelDao basicUdirelDao;
+ @Resource
+ BasicProductsDao basicProductsDao;
+ @Resource
+ private OrderUploadLogService orderUploadLogService;
+ @Resource
+ VInsurNationGoodsPhysicMapper goodsPhysicMapper;
+ @Resource
+ VInsurNationGoodsReturnMapper vInsurNationGoodsReturnMapper;
+ @Resource
+ VYpzsPresInfoReturnMapper vYpzsPresInfoReturnMapper;
+ @Resource
+ private VYpzsPhysicDictMapper vYpzsPhysicDictMapper;
+ @Resource
+ private VYpzsPresInfoMapper vYpzsPresInfoMapper;
+ @Resource
+ private VYpzsPlanInfoMapper vYpzsPlanInfoMapper;
+ @Resource
+ private VYpzsIoInfoMapper vYpzsIoInfoMapper;
+ @Resource
+ private YbClient ybClient;
+ @Resource
+ private ThrYbSetupMapper thrYbSetupMapper;
+ @Resource
+ private RelCodeDetailService relCodeDetailService;
+
+
+
+
+ @Resource
+ private VA001Service va001Service;
+ @Resource
+ private VA003Service va003Service;
+ @Resource
+ private VA005Service va005Service;
+ @Resource
+ private VA004Service va004Service;
+ @Resource
+ private VA011MxService va011MxService;
+ @Resource
+ private VA002Service va002Service;
+ @Resource
+ private VA011Service va011Service;
+ @Resource
+ private VA010Service va010Service;
+ @Resource
+ private VA006MxService va006MxService;
+ @Resource
+ private VA015MxService va015MxService;
+ @Resource
+ private VA006Service va006Service;
+ @Resource
+ private VA015Service va015Service;
+
+
+
+
+ /**
+ * 拼接xml请求头
+ *
+ * @param methodName 方法名
+ * @return
+ */
+ public String getMsgHeader(String methodName) {
+ return "" +
+ "" +
+ "" +
+ methodName +
+ "" +
+ "";
+ }
+
+
+ public String parserResult(String response) {
+ if (response.contains(" list = va001Service.filterList(udiwmsUnitRequest);
+ log.info("解析四川武平县医院返回往来单位,返回结果:{}", list);
+ PageInfo pageInfo = new PageInfo<>(list);
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(pageInfo.getTotal());
+ pageSimpleResponse.setList(list);
+ return ResultVOUtils.success(pageSimpleResponse);
+ }
+
+
+ @Override
+ public BaseResponse getManu(UdiwmsManuRequest udiwmsManuRequest) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialUnit"));
+ udiwmsManuRequest.setUnitType("2");
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsManuRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_CORP_URL), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析湖里妇幼医院智业接口返回生产企业字典数据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ }
+
+
+ /**
+ * 器械从三方拉取
+ * 药品从视图拉取
+ *
+ * @param udiwmsProductRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getProducts(UdiwmsProductRequest udiwmsProductRequest) {
+ if (udiwmsProductRequest.getProductType().equals(Constants.PRODUCT_TYPE_DEVICE)) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialDict"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsProductRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_PI_QUERY_URL), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ Map map = (Map) baseResponse.getData();
+ List zzzyyProductsResponse = JSON.parseArray(map.get("list") + "", ZzzyyProductsResponse.class);
+ for (ZzzyyProductsResponse productsResponse : zzzyyProductsResponse) {
+ //判断要是规格和型号一致就是取规格 不一致就合并
+ if (StrUtil.isNotEmpty(productsResponse.getModel_number()) && StrUtil.isNotEmpty(productsResponse.getStandard())) {
+ if (productsResponse.getModel_number().equals(productsResponse.getStandard())) {
+ productsResponse.setStandard(productsResponse.getStandard());
+ } else {
+ productsResponse.setStandard(productsResponse.getStandard() + productsResponse.getModel_number());
+ }
+ } else if (StrUtil.isNotEmpty(productsResponse.getModel_number()) && StrUtil.isBlank(productsResponse.getStandard())) {
+ productsResponse.setStandard(productsResponse.getModel_number());
+ }
+ productsResponse.setProductType(1);
+ }
+ map.put("list", JSON.toJSON(zzzyyProductsResponse));
+ baseResponse.setData("");
+ baseResponse.setData(map);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析长泰区医院智业接口返回产品信息字典数据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ } else if (udiwmsProductRequest.getProductType().equals(Constants.PRODUCT_TYPE_DRUG)) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper();
+ //补充其他查询条件
+ wrapper.eq(StrUtil.isNotBlank(udiwmsProductRequest.getCode()), VYpzsPhysicDict::getPHYSIC_CODE, udiwmsProductRequest.getCode());
+ wrapper.eq(StrUtil.isNotBlank(udiwmsProductRequest.getName()), VYpzsPhysicDict::getPHYSIC_NAME, udiwmsProductRequest.getName());
+ wrapper.eq(StrUtil.isNotBlank(udiwmsProductRequest.getRegisterNo()), VYpzsPhysicDict::getPHYSIC_NO, udiwmsProductRequest.getRegisterNo());
+ IPage page = vYpzsPhysicDictMapper.selectPage(new Page(udiwmsProductRequest.getPage(), udiwmsProductRequest.getLimit()), wrapper);
+ List physicDictEntities = page.getRecords();
+ List thrProductsEntityList = null;
+ if (CollUtil.isNotEmpty(physicDictEntities)) {
+ //数据处理以thr_products 返回
+ thrProductsEntityList = physicDictEntities.stream().map(dict -> {
+ ThrProductsEntity products = new ThrProductsEntity();
+ products.setCode(dict.getPHYSIC_CODE());
+ products.setName(dict.getPHYSIC_NAME());
+ products.setMeasname(dict.getPACK_UNIT());
+ products.setSpec(dict.getPACK_SPEC());
+ products.setYbbm(dict.getCOUNTRY_CODE());
+ products.setPrepnSpec(dict.getPHYSIC_SPEC());
+ products.setPrepnUnit(dict.getPHYSIC_UNIT());
+ products.setProductType(2);
+ return products;
+ }).collect(Collectors.toList());
+ }
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(page.getTotal());
+ pageSimpleResponse.setList(thrProductsEntityList);
+ return ResultVOUtils.success(pageSimpleResponse);
+ }
+ log.error("解析长泰区医院医疗类型,返回结果:{}", udiwmsProductRequest.getProductType());
+ return ResultVOUtils.error(500, "医疗类型不正确,productType:" + udiwmsProductRequest.getProductType());
+ }
+
+ @Override
+ public BaseResponse getOrderTypes(UdiwmsBusTypeRequest udiwmsBusTypeRequest) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialType"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsBusTypeRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_BUS_TYPE_QUERY_URL), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析湖里妇幼医院智业接口返回单据类型数据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ }
+
+ /**
+ * 提交关联产品更新
+ *
+ * @return
+ */
+ @Override
+ public BaseResponse postRelProduct(PostRelProductRequest postThrInvProductsRequest) {
+ UdiRelevanceResponse udiRelevanceResponse = postThrInvProductsRequest.getUdiRelevanceResponse();
+
+ if (udiRelevanceResponse == null) {
+ return ResultVOUtils.error(500, "提交产品列表不能为空!");
+ }
+ MaterialDictEntity materialDictEntity = new MaterialDictEntity();
+ if (StrUtil.isEmpty(udiRelevanceResponse.getMainId()) && StrUtil.isNotEmpty(udiRelevanceResponse.getOriginUuid()))
+ materialDictEntity.setOperatType("1");
+ else
+ materialDictEntity.setOperatType("2");
+ materialDictEntity.setMaterialName(udiRelevanceResponse.getCpmctymc());
+ materialDictEntity.setCostlySign("1");
+ if (StrUtil.isNotEmpty(udiRelevanceResponse.getMainId()) && udiRelevanceResponse.getMainId().endsWith("x")) {
+ materialDictEntity.setMaterialMasterCode(null);
+ materialDictEntity.setHisMaterialCode(null);
+ materialDictEntity.setCostlySign("0");
+ materialDictEntity.setOperatType("1");
+ } else {
+ materialDictEntity.setMaterialMasterCode(udiRelevanceResponse.getNameCode());
+ materialDictEntity.setHisMaterialCode(udiRelevanceResponse.getMainId());
+ }
+
+ materialDictEntity.setMaterialSpec(udiRelevanceResponse.getGgxh());
+ materialDictEntity.setMaterialUnit(udiRelevanceResponse.getMeasname());
+ //暂无区分进货价,零售价
+ materialDictEntity.setImportPrice(udiRelevanceResponse.getPrice() == null ? "0" : udiRelevanceResponse.getPrice().toString());
+ materialDictEntity.setRetailPrice(udiRelevanceResponse.getPrice() == null ? "0" : udiRelevanceResponse.getPrice().toString());
+ materialDictEntity.setFactoryName(udiRelevanceResponse.getManufactory());
+ materialDictEntity.setSupplierName(udiRelevanceResponse.getSupName());
+ materialDictEntity.setInsuranceCode(udiRelevanceResponse.getYbbm());
+ materialDictEntity.setRegeditNo(udiRelevanceResponse.getZczbhhzbapzbh());
+ materialDictEntity.setMaterialClass(udiRelevanceResponse.getBasicPrductRemak7());
+ //暂无中标标识
+ materialDictEntity.setPublicFlag("1");
+ materialDictEntity.setPriceItemClass(udiRelevanceResponse.getBasicPrductRemak8());
+ //暂无收费标志
+ materialDictEntity.setFeeFlag(udiRelevanceResponse.getBasicPrductRemak6());
+
+
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("addMaterialDict"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(materialDictEntity));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_PRODUCT_SUBMIT_URL), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ log.error("提交新增产品信息:" + ctqyyRequest.getMsgBody());
+ CtBaseResponse baseResponse = JSONObject.parseObject(response, CtBaseResponse.class);
+ if (baseResponse.getCode() != 20000) {
+ String errMsg = "提交新增产品信息,异常:{}" + response;
+ log.error(errMsg);
+ return ResultVOUtils.error(500, "提交新增产品失败!");
+
+ } else {
+// materialDictEntity.setMaterialNo(baseResponse.getMaterialNo());
+ log.error("提交新增产品信息,成功:{}", response);
+ return ResultVOUtils.success(baseResponse.getMaterialNo());
+ }
+ } catch (Exception e) {
+ String errMsg = "提交新增产品信息,异常:{}" + response;
+ log.error(errMsg);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, errMsg);
+
+ }
+ }
+
+
+ /**
+ * 获取患者信息
+ *
+ * @param getSickRequest
+ * @return
+ */
+ public BaseResponse getSickInfo(GetSickRequest getSickRequest) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getSickVisitInfo"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(getSickRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URI_GET_SICKER), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ Map map = (Map) baseResponse.getData();
+ List basicSkSickerResponses = JSON.parseArray(map.get("list") + "", BasicSkSickerResponse.class);
+// for (BasicSkSickerResponse productsResponse : basicSkSickerResponses) {
+//
+// }
+ map.put("list", JSON.toJSON(basicSkSickerResponses));
+ baseResponse.setData("");
+ baseResponse.setData(map);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析长泰医院智业返回病人信息数据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ }
+
+ /**
+ * 获取患者处方信息
+ *
+ * @param getSickPrescribeRequest
+ * @return
+ */
+ public BaseResponse getSickPescribe(GetSickPrescribeRequest getSickPrescribeRequest) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getResiPresInfo"));
+ getSickPrescribeRequest.setResiNo(getSickPrescribeRequest.getAdNum());
+ getSickPrescribeRequest.setAdNum(null);
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(getSickPrescribeRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URI_GET_SICKER_PRESCIRBE), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ Map map = (Map) baseResponse.getData();
+ List basicSkPrescribeResponses = JSON.parseArray(map.get("list") + "", BasicSkPrescribeResponse.class);
+ for (BasicSkPrescribeResponse basicSkPrescribeResponse : basicSkPrescribeResponses) {
+ List itemEntities = basicSkPrescribeResponse.getItemList();
+ if (CollUtil.isNotEmpty(itemEntities)) {
+ for (BasicSkPrescribeItemEntity itemEntity : itemEntities) {
+ itemEntity.setCount("0");
+ }
+ }
+ }
+ map.put("list", JSON.toJSON(basicSkPrescribeResponses));
+ baseResponse.setData("");
+ baseResponse.setData(map);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析长泰医院智业返回处方信息数据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+
+ }
+
+
+// public String getStrConut(String str) {
+// if (StrUtil.isNotEmpty(str)) {
+// return "0";
+// }
+// Pattern pattern = Pattern.compile("\\d+");
+// Matcher matcher = pattern.matcher(str);
+// String strCount = "";
+// while (matcher.find()) {
+// strCount = strCount + matcher.group();
+// }
+// return strCount;
+// }
+
+
+ /**
+ * 获取项目组套字典
+ *
+ * @param dlThirdProjectRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getBasicProject(DlThirdProjectRequest dlThirdProjectRequest) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialDict"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(dlThirdProjectRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URI_GET_PROJECT), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ Map map = (Map) baseResponse.getData();
+ List basicSkProjectResponses = JSON.parseArray(map.get("list") + "", BasicSkProjectResponse.class);
+ for (BasicSkProjectResponse basicSkProjectResponse : basicSkProjectResponses) {
+
+ }
+ map.put("list", JSON.toJSON(basicSkProjectResponses));
+ baseResponse.setData("");
+ baseResponse.setData(map);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析长泰医院智业返回项目信息数据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ }
+
+
+ /**
+ * 获取核算类别
+ *
+ * @param hslbRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getHsfl(FilterThrHslbRequest hslbRequest) {
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getItemClass"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(hslbRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URI_GET_HSLB), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ Map map = (Map) baseResponse.getData();
+ List priceClassEntities = JSON.parseArray(map.get("list") + "", PriceClassEntity.class);
+
+ List hslbEntities = new ArrayList<>();
+ for (PriceClassEntity priceClassEntity : priceClassEntities) {
+ ThrHslbEntity thrHslbEntity = new ThrHslbEntity();
+ thrHslbEntity.setHsbm(priceClassEntity.getClassCode());
+ thrHslbEntity.setHsmc(priceClassEntity.getClassName());
+ hslbEntities.add(thrHslbEntity);
+ }
+ map.put("list", JSON.toJSON(hslbEntities));
+ baseResponse.setData("");
+ baseResponse.setData(map);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析长泰医院智业返回物价类别信息异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ }
+
+
+ @Override
+ public BaseResponse getOrders(UdiwmsOrderQueryRequest udiwmsOrderQueryRequest) {
+ return null;
+ }
+
+ @Resource
+ SysParamConfigService sysParamConfigService;
+
+ @Override
+ public BaseResponse submitOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
+ if (StrUtil.isBlank(udiwmsOrderRequest.getBillNo())) {
+ return ResultVOUtils.error(500, "单据号不能为空");
+ }
+
+ ZaxzyyOrderRequest zaxzyyOrderRequest = new ZaxzyyOrderRequest();
+ BeanUtil.copyProperties(udiwmsOrderRequest, zaxzyyOrderRequest);
+ //查询单据和详情信息,组装第三方系统接口所需参数
+ IoOrderEntity orderEntity = orderDao.selectOne(new QueryWrapper().eq("billNo", udiwmsOrderRequest.getBillNo()));
+
+ zaxzyyOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getCreateTime()));
+ //查询对应的第三方单据类型
+ ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiDao.selectOne(new QueryWrapper().eq("code", udiwmsOrderRequest.getBillType()));
+ zaxzyyOrderRequest.setThirdSys(getUserName(orderEntity));
+ zaxzyyOrderRequest.setBillType(thrSystemBusApiEntity.getThirdBuyCode());
+ zaxzyyOrderRequest.setBillFlag("1");
+
+ //查询单据类型
+ BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(udiwmsOrderRequest.getBillType());
+ if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_HOSPTIAL)) {
+ //医院客户
+ zaxzyyOrderRequest.setCorpId(orderEntity.getFromCorp());
+ //查询客户名称
+ String corpName = basicCorpDao.selectNameByErpId(orderEntity.getFromCorp());
+ zaxzyyOrderRequest.setCorpName(corpName);
+ } else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_INTTERNAL)) {
+ //内部科室
+ BasicCorpEntity basicCorpEntity = null;
+ if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) {
+ basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
+ }
+ if (basicCorpEntity != null) {
+ zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
+ zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
+ } else {
+ AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper().eq("code", udiwmsOrderRequest.getCorpId()));
+ try {
+ //根据第三方系统标识,获取对应字段的值
+ ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper()
+ .eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
+ .eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
+
+ zaxzyyOrderRequest.setCorpId(thrInvWarehouseEntity.getCode());
+ zaxzyyOrderRequest.setCorpName(thrInvWarehouseEntity.getName());
+ } catch (Exception e) {
+ String msg = "查询单据对应往来单位的第三方仓库信息异常";
+ orderUploadLogService.updateLocalErr(orderEntity, msg);
+ log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
+ return ResultVOUtils.error(500, msg);
+ }
+ }
+
+ } else {
+ //供应商
+ BasicCorpEntity basicCorpEntity = null;
+ if (StrUtil.isNotEmpty(orderEntity.getFromCorp())) {
+ basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
+ }
+ if (basicCorpEntity != null) {
+ zaxzyyOrderRequest.setCorpId(basicCorpEntity.getThirdId());
+ zaxzyyOrderRequest.setCorpName(basicCorpEntity.getName());
+ } else {
+ String msg = "查询单据对应的第三方往来单位信息异常";
+ orderUploadLogService.updateLocalErr(orderEntity, msg);
+ log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
+ return ResultVOUtils.error(500, msg);
+ }
+ }
+
+
+ //查询仓库信息
+ AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new QueryWrapper().eq("code", orderEntity.getInvCode()));
+ try {
+ ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper()
+ .eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
+ .eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
+
+ zaxzyyOrderRequest.setLocInvCode(thrInvWarehouseEntity.getCode());
+ zaxzyyOrderRequest.setLocInvName(thrInvWarehouseEntity.getName());
+
+ zaxzyyOrderRequest.setLocStorageCode(thrInvWarehouseEntity.getCode());
+ zaxzyyOrderRequest.setLocStorageName(thrInvWarehouseEntity.getName());
+ } catch (Exception e) {
+ log.error("查询第三方系统仓库信息异常", e);
+ String msg = "查询第三方系统仓库信息异常";
+ orderUploadLogService.updateLocalErr(orderEntity, msg);
+ return ResultVOUtils.error(500, msg);
+ }
+
+ //设置单据出入库类型
+ if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
+ zaxzyyOrderRequest.setInoutType(1); //入库
+ } else if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
+ zaxzyyOrderRequest.setInoutType(2); //出库
+ }
+
+ //设置备注信息
+ zaxzyyOrderRequest.setRemark("udi管理系统提交单据");
+ //组装单据明细数据
+ List ioCodeEntities = codeDao.selectList(new QueryWrapper()
+ .eq("orderId", orderEntity.getBillNo())
+ .ne("action", "StockCheck")
+ );
+ List items = new ArrayList<>();
+ //查询业务单据详情
+ List detailBizEntities = orderDetailBizDao.selectList(new QueryWrapper().eq("orderIdFk", orderEntity.getBillNo()));
+ String errMsg = setOrderDetailList(ioCodeEntities, items, detailBizEntities);
+ zaxzyyOrderRequest.setItem(items);
+ if (CollUtil.isEmpty(items)) {
+ orderUploadLogService.updateLocalErr(orderEntity, errMsg);
+ return ResultVOUtils.error(500, errMsg);
+ }
+
+ if (StrUtil.isNotEmpty(errMsg)) {
+ orderUploadLogService.updateLocalErr(orderEntity, errMsg);
+ return ResultVOUtils.error(500, errMsg);
+ }
+
+
+ for (UdiwmsOrderDetailRequest i : items) {
+ String fphm = "";
+ String fprq = null;
+ List invoiceList = IoOrderInvoiceEntity.builder().build()
+ .selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo())
+ .eq(IoOrderInvoiceEntity::getBindRlFk, i.getBindRlFk())
+ .eq(StrUtil.isNotEmpty(i.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, i.getBatchNo()).
+ groupBy(IoOrderInvoiceEntity::getInvoiceEncode));
+ if (CollectionUtil.isNotEmpty(invoiceList)) {
+ fphm = invoiceList.stream().map(IoOrderInvoiceEntity::getInvoiceEncode).collect(Collectors.joining(","));
+ if (invoiceList.get(0).getInvoiceDate() != null)
+ fprq = DateUtil.formatDateTime(invoiceList.get(0).getInvoiceDate());
+ }
+ i.setFirstSalesInvNo(fphm);
+ i.setSecSalesInvNo(fphm);
+ i.setInvoiceDate(fprq);
+ }
+
+
+ //构造诏安接口参数
+ ZzzyyRequest zaZyRequest = new ZzzyyRequest();
+
+ //提交到第三方系统
+ if (thrSystemBusApiEntity.getUrl().equals("saveMasterialInput")) {
+// //采购入库单据
+// if (vailHightMaterial(detailBizEntities.get(0))) {
+// zaZyRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
+// UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
+// zaZyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsPreInOrderRequest));
+// } else {
+// zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
+// zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
+// }
+ Boolean b = sysParamConfigService.selectByKey("ct_split_groupbuy");
+ if (b) {
+ Map> splitMap = items.stream()
+ .collect(Collectors.groupingBy(UdiwmsOrderDetailRequest::getFirstSalesInvNo));
+ BaseResponse baseResponse = null;
+ int index = 1;
+ if (splitMap.size() > 1) {
+ for (List splitItems : splitMap.values()) {
+ zaxzyyOrderRequest.setItem(splitItems);
+ zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
+ zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
+ orderEntity.setBillNo(orderEntity.getBillNo() + "-" + index);
+ baseResponse = submitOrder(orderEntity, zaZyRequest);
+ }
+ return baseResponse;
+ } else {
+ zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
+ zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
+ return submitOrder(orderEntity, zaZyRequest);
+ }
+ } else {
+ zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
+ zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
+ return submitOrder(orderEntity, zaZyRequest);
+ }
+
+
+ } else if (thrSystemBusApiEntity.getUrl().equals("saveMaterialHight")) {
+
+// // 1.先提交到物资
+// zaZyRequest.setMsgHeader(getMsgHeader("saveMasterialInput"));
+// zaZyRequest.setMsgBody(JSONUtil.toJsonStr(zaxzyyOrderRequest));
+// submitOrder(orderEntity, zaZyRequest);
+
+
+ //2.提交到预备货
+ zaZyRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
+ UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = submitPreInOrderToThirdSys(zaxzyyOrderRequest, orderEntity);
+ zaZyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsPreInOrderRequest));
+ return submitOrder(orderEntity, zaZyRequest);
+ }
+
+ return ResultVOUtils.error(500, "提交失败!");
+ }
+
+
+ /**
+ * 校验是否高值耗材
+ *
+ * @return
+ */
+ public boolean vailHightMaterial(IoOrderDetailBizEntity orderDetailBizEntity) {
+ BasicUdirelEntity basicUdirel = basicUdirelDao.selectById(orderDetailBizEntity.getBindRlFk());
+ BasicProductsEntity basicProductsEntity = basicProductsDao.selectOne(new QueryWrapper().eq("uuid", basicUdirel.getUuid()).last("limit 1"));
+ if (basicProductsEntity != null &&
+ (StrUtil.trimToEmpty(basicProductsEntity.getBasicPrductRemak7()).equals("1101")
+ || StrUtil.trimToEmpty(basicProductsEntity.getBasicPrductRemak7()).equals("3601"))) {
+ return true;
+ } else
+ return false;
+
+ }
+
+
+ public String getUserName(IoOrderEntity orderEntity) {
+
+ return "方奕生/1007";
+// String userName = null;
+// //创建人非供应商
+// if (StrUtil.isNotEmpty(orderEntity.getCheckUser())) {
+// AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getCheckUser());
+// if (authUserEntity == null)
+// userName = null;
+// userName = authUserEntity.getUserName() + authUserEntity.getEmployeeName();
+// } else if (StrUtil.isNotEmpty(orderEntity.getReviewUser())) {
+// AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getReviewUser());
+// userName = authUserEntity.getUserName() + authUserEntity.getEmployeeName();
+// } else if (StrUtil.isNotEmpty(orderEntity.getCreateUser()) && orderEntity.getCreateUser().length() != 14) {
+// AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getCreateUser());
+// userName = authUserEntity.getUserName() + authUserEntity.getEmployeeName();
+// } else if (StrUtil.isNotEmpty(orderEntity.getUpdateUser()) && orderEntity.getUpdateUser().length() != 14) {
+// AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getUpdateUser());
+// userName = authUserEntity.getUserName() + authUserEntity.getEmployeeName();
+// }
+// if (userName == null) {
+// List authWarehouseUsers = authWarehouseUserMapper.selectList(new QueryWrapper().eq("code", orderEntity.getInvCode()));
+// if (CollUtil.isNotEmpty(authWarehouseUsers)) {
+// AuthWarehouseUser authWarehouseUser = authWarehouseUsers.get(0);
+// AuthUserEntity authUserEntity = authUserDao.selectById(orderEntity.getCheckUser());
+// userName = authUserEntity.getUserName() + authUserEntity.getEmployeeName();
+// return userName;
+// }
+// }
+// return userName;
+
+ }
+
+ /**
+ * 获取库存出入库明细 (普耗出库明细)
+ *
+ * @param udiwmsInvProductsRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getInvResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
+ CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
+ ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd"));
+ ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd"));
+
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getMaterialSheet"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(ptxhyyInvRequest));
+
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
+// String response = "{\"code\":20000,\"message\":\"success\",\"data\":{\"list\":[{\"applyNo\":\"74192\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"65\",\"CreditName\":\"急诊科\",\"AccoutDate\":\"2024-02-2210:36:28\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"66666666\",\"materialName\":\"一次性注射器2ml\",\"materialSpec\":\"0.6\",\"materialUnit\":\"支\",\"batchNo\":65212,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":200,\"importPrc\":0.21,\"importMoney\":42,\"factoryCode\":\"0006064349\",\"factoryName\":\"河南曙光汇知康生物科技股份有限公司\"},{\"applyNo\":\"74208\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"70\",\"CreditName\":\"手术室\",\"AccoutDate\":\"2024-02-2315:29:48\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"31585\",\"materialName\":\"一次性使用鼻氧管(吸氧管)\",\"materialSpec\":\"长单鼻/条\",\"materialUnit\":\"条\",\"batchNo\":64113,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":19,\"importPrc\":1.15,\"importMoney\":21.85,\"factoryCode\":\"0006063576\",\"factoryName\":\"苏州市麦克林医疗器械制品有限公司\"},{\"applyNo\":\"74208\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"70\",\"CreditName\":\"手术室\",\"AccoutDate\":\"2024-02-2315:29:48\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"31585\",\"materialName\":\"一次性使用鼻氧管(吸氧管)\",\"materialSpec\":\"长单鼻/条\",\"materialUnit\":\"条\",\"batchNo\":65526,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":81,\"importPrc\":1.15,\"importMoney\":93.15,\"factoryCode\":\"0006063576\",\"factoryName\":\"苏州市麦克林医疗器械制品有限公司\"},{\"applyNo\":\"74209\",\"ioFlag\":\"出库业务\",\"ioType\":\"104\",\"ioTypeName\":\"科室领用\",\"Debit\":\"50\",\"DebitName\":\"供应室仓库\",\"Credit\":\"92\",\"CreditName\":\"儿科\",\"AccoutDate\":\"2024-02-2315:31:58\",\"Accoutant\":\"徐秀娥/160\",\"receiveOper\":\"\",\"materialCode\":\"30936\",\"materialName\":\"一次性静脉输液针5(1/2)\",\"materialSpec\":\"/条\",\"materialUnit\":\"条\",\"batchNo\":64898,\"invoiceNo\":\"\",\"invoiceDate\":\"\",\"quantity\":250,\"importPrc\":0.17,\"importMoney\":42.5,\"factoryCode\":\"0006063565\",\"factoryName\":\"浙江康康\"}],\"total\":4}}";
+
+ BaseResponse> baseResponse =
+ JSONObject.parseObject(response, new TypeReference>>() {
+ });
+ if (baseResponse.getCode() == 20000) {
+ List ptxhInvResponses = baseResponse.getData().getList();
+ List thrInvResultResponses = new ArrayList<>();
+ if (CollUtil.isNotEmpty(ptxhInvResponses)) {
+ for (InvResultEntity ptxhInvResponse : ptxhInvResponses) {
+ ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
+ thrInvResultResponse.setThrCode(ptxhInvResponse.getMaterialCode());
+ thrInvResultResponse.setCpmctymc(ptxhInvResponse.getMaterialName());
+ thrInvResultResponse.setGgxh(ptxhInvResponse.getMaterialSpec());
+ thrInvResultResponse.setBatchNo(ptxhInvResponse.getBatchNo());
+ thrInvResultResponse.setMeasname(ptxhInvResponse.getMaterialUnit());
+ thrInvResultResponse.setPrice(BigDecimal.valueOf(ptxhInvResponse.getImportPrc()));
+ thrInvResultResponse.setAmount(BigDecimal.valueOf(ptxhInvResponse.getImportMoney()));
+// thrInvResultResponse.setDeptName(ptxhInvResponse.getDebitName());
+// thrInvResultResponse.setDeptCode(ptxhInvResponse.getDebit());
+// thrInvResultResponse.setInvName(ptxhInvResponse.getCreditName());
+// thrInvResultResponse.setInvCode(ptxhInvResponse.getCredit());
+
+ thrInvResultResponse.setDeptName(ptxhInvResponse.getDebitName());
+ thrInvResultResponse.setDeptCode("1002");
+ thrInvResultResponse.setInvName(ptxhInvResponse.getCreditName());
+ thrInvResultResponse.setInvCode("1000003");
+
+ thrInvResultResponse.setManufacturer(ptxhInvResponse.getFactoryName());
+ thrInvResultResponse.setManufactoryCode(ptxhInvResponse.getFactoryCode());
+ thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
+ thrInvResultResponse.setBillType(ptxhInvResponse.getIoType());
+ thrInvResultResponse.setType("1");
+ thrInvResultResponse.setOutCount(ptxhInvResponse.getQuantity() + "");
+ thrInvResultResponse.setReCount(ptxhInvResponse.getQuantity() + "");
+ thrInvResultResponses.add(thrInvResultResponse);
+ }
+ }
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(thrInvResultResponses.size() + 0l);
+ pageSimpleResponse.setList(thrInvResultResponses);
+ return ResultVOUtils.success(pageSimpleResponse);
+ }
+ return baseResponse;
+ }
+
+
+ /**
+ * 获取库存扫码出入库明细(高值耗材出库明细)
+ *
+ * @param udiwmsInvProductsRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getInvCodeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
+ CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
+ ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd"));
+ ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd"));
+
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getSickHighitem"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(ptxhyyInvRequest));
+
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
+// String response =
+// "{\"code\": 20000,\"message\": \"success\",\"data\": {\"list\": [{\"recordNo\": 391,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63374\",\"materialName\": \"调节杠\",\"materialPrc\": 2100,\"dictBarcode\": \"0106971221560052\",\"Barcode\": \"111704022117000188340055\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 390,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63374\",\"materialName\": \"调节杠\",\"materialPrc\": 2100,\"dictBarcode\": \"0106946149100093\",\"Barcode\": \"111704022117000188340007\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 408,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63182\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106938695502193\",\"Barcode\": \"111703012117000076800035\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 401,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106938695522023\",\"Barcode\": \"111612212116120902040009\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 423,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106938695525055\",\"Barcode\": \"111701062116122700670005\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 400,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106921814249918\",\"Barcode\": \"111612212116120902040047\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"},{\"recordNo\": 422,\"visitNo\": \"1711088001\",\"sickName\": \"黄瑞梅\",\"inDept\": \"88\",\"deptName\": \"骨科\",\"materialCode\": \"63186\",\"materialName\": \"椎弓根螺钉\",\"materialPrc\": 4000,\"dictBarcode\": \"0106921814249918\",\"Barcode\": \"111701062116122700670013\",\"feeTime\": \"2024-03-01 19:29:02\",\"feeOper\": \"郑淑环/2032\"}],\"total\": 7}}";
+// String response = null;
+// try {
+// response = FileUtils.getFileContent("E://ghresponse.json");
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
+
+ BaseResponse> baseResponse =
+ JSONObject.parseObject(response, new TypeReference>>() {
+ });
+ if (baseResponse.getCode() == 20000) {
+ Map mapArry = new HashMap<>();
+ List newArry = new ArrayList<>();
+ List ptxhInvResponses = baseResponse.getData().getList();
+ List thrInvResultResponses = new ArrayList<>();
+ if (CollUtil.isNotEmpty(ptxhInvResponses)) {
+ for (InvCodeResultEntity ptxhInvResponse : ptxhInvResponses) {
+ ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
+ thrInvResultResponse.setThrCode(ptxhInvResponse.getMaterialCode());
+ thrInvResultResponse.setCpmctymc(ptxhInvResponse.getMaterialName());
+ thrInvResultResponse.setPrice(BigDecimal.valueOf(ptxhInvResponse.getMaterialPrc()));
+
+
+ thrInvResultResponse.setInvName(ptxhInvResponse.getDeptName());
+
+// AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper().eq(AuthWarehouseEntity::getThirdId, ptxhInvResponse.getInDept()));
+// if (warehouseEntity != null)
+// thrInvResultResponse.setInvCode(warehouseEntity.getCode());
+// else
+// thrInvResultResponse.setInvCode(ptxhInvResponse.getInDept());
+
+ thrInvResultResponse.setInvCode("1000003");
+ thrInvResultResponse.setDeptCode("1002");
+ thrInvResultResponse.setSickerCode(ptxhInvResponse.getVisitNo());
+ thrInvResultResponse.setSickerName(ptxhInvResponse.getSickName());
+ thrInvResultResponse.setBillType("SC71090077430919");
+ thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
+ thrInvResultResponse.setType("1");
+ thrInvResultResponse.setOutCount("1");
+ thrInvResultResponse.setReCount("1");
+ IoCodeEntity codeEntity = codeDao.selectOne(new LambdaQueryWrapper().eq(IoCodeEntity::getCode, ptxhInvResponse.getBarcode()).last("limit 1"));
+ if (codeEntity == null) {
+ codeEntity = codeDao.selectOne(new LambdaQueryWrapper().eq(IoCodeEntity::getErrUdiCode, ptxhInvResponse.getBarcode()).last("limit 1"));
+ }
+ if (codeEntity != null)
+ thrInvResultResponse.setUdiCode(codeEntity.getCode());
+ else
+ thrInvResultResponse.setUdiCode(ptxhInvResponse.getBarcode());
+ thrInvResultResponses.add(thrInvResultResponse);
+ }
+
+ for (ThrInvResultResponse thrInvResultResponse : thrInvResultResponses) {
+ mapArry.merge(thrInvResultResponse.getUdiCode(), thrInvResultResponse, (existingValue, newValue) -> {
+ // Assuming reCount can be directly handled as an integer to avoid String to Integer conversions
+ int updatedReCount = Integer.parseInt(existingValue.getReCount()) + Integer.parseInt(newValue.getReCount());
+ existingValue.setReCount(String.valueOf(updatedReCount));
+ existingValue.setOutCount(existingValue.getReCount());
+ return existingValue;
+ });
+ }
+ for (String key : mapArry.keySet()) {
+ newArry.add(mapArry.get(key));
+ }
+
+ }
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(newArry.size() + 0l);
+ pageSimpleResponse.setList(newArry);
+ return ResultVOUtils.success(pageSimpleResponse);
+ }
+ return baseResponse;
+ }
+
+ @Resource
+ BasicSkProjectMapper basicSkProjectMapper;
+ @Resource
+ UdiRlSupDao udiRlSupDao;
+ @Resource
+ BasicDestinyRelMapper basicDestinyRelMapper;
+
+ @Override
+ public BaseResponse getInvFeeResult(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
+ CtqyyInvRequest ptxhyyInvRequest = new CtqyyInvRequest();
+ ptxhyyInvRequest.setStartdate(DateUtil.formatDate(udiwmsInvProductsRequest.getStartDate(), "yyyy-MM-dd"));
+ ptxhyyInvRequest.setEnddate(DateUtil.formatDate(udiwmsInvProductsRequest.getEndDate(), "yyyy-MM-dd"));
+
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("getSickPriceitem"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(ptxhyyInvRequest));
+
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_GET_INV_RESULT), ctqyyRequest);
+// String response =
+// "{\"code\": 20000,\"message\": \"success\",\"data\": {\"list\": [{\"seqNo\": \"97425947\",\"visitNo\": \"1471827014\",\"sickName\": \"杨玉聪\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 00:53:56\"},{\"seqNo\": \"97425950\",\"visitNo\": \"1471827014\",\"sickName\": \"杨玉聪\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 00:53:56\"},{\"seqNo\": \"97426036\",\"visitNo\": \"1940696001\",\"sickName\": \"郑良屹\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950057000000\",\"itemName\": \"热敏胶片 8in*10in/HQ-KX411 A型\",\"Price\": 7.8,\"quantity\": 4,\"Cost\": 31.2,\"materialCode\": \"00087\",\"materialName\": \"热敏胶片\",\"OperTime\": \"2024-02-21 01:39:39\"},{\"seqNo\": \"97426048\",\"visitNo\": \"1746585006\",\"sickName\": \"张杨妍\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950030000005\",\"itemName\": \"一次性注射器2ml(/支)\",\"Price\": 0.21,\"quantity\": 1,\"Cost\": 0.21,\"materialCode\": \"77375\",\"materialName\": \"一次性注射器2ml\",\"OperTime\": \"2024-02-21 02:06:05\"},{\"seqNo\": \"97426113\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 04:49:46\"},{\"seqNo\": \"97426233\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 04:54:51\"},{\"seqNo\": \"97426247\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 04:54:55\"},{\"seqNo\": \"97426250\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950029000010\",\"itemName\": \"一次性使用输液器BI-IT带针0.7# /支)\",\"Price\": 0.81,\"quantity\": 1,\"Cost\": 0.81,\"materialCode\": \"02585\",\"materialName\": \"一次性使用输液器 带针\",\"OperTime\": \"2024-02-21 04:56:20\"},{\"seqNo\": \"97426251\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950030000006\",\"itemName\": \"一次性无菌注射器20ml(/支)\",\"Price\": 0.48,\"quantity\": 2,\"Cost\": 0.96,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 04:56:21\"},{\"seqNo\": \"97426252\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950031000025\",\"itemName\": \"一次性使用静脉留置针22GII型A(直型连接座式安全型)Y型2225601\",\"Price\": 4.82,\"quantity\": 1,\"Cost\": 4.82,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 04:56:21\"},{\"seqNo\": \"97426258\",\"visitNo\": \"1735717004\",\"sickName\": \"林文秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950030000005\",\"itemName\": \"一次性注射器2ml(/支)\",\"Price\": 0.21,\"quantity\": 1,\"Cost\": 0.21,\"materialCode\": \"77375\",\"materialName\": \"一次性注射器2ml\",\"OperTime\": \"2024-02-21 04:56:24\"},{\"seqNo\": \"97426284\",\"visitNo\": \"1801137003\",\"sickName\": \"杨立群\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950030000005\",\"itemName\": \"一次性注射器2ml(/支)\",\"Price\": 0.21,\"quantity\": 1,\"Cost\": 0.21,\"materialCode\": \"77375\",\"materialName\": \"一次性注射器2ml\",\"OperTime\": \"2024-02-21 05:03:40\"},{\"seqNo\": \"97426357\",\"visitNo\": \"1940699001\",\"sickName\": \"严明祥\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950031000025\",\"itemName\": \"一次性使用静脉留置针22GII型A(直型连接座式安全型)Y型2225601\",\"Price\": 4.82,\"quantity\": 1,\"Cost\": 4.82,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 05:28:40\"},{\"seqNo\": \"97426358\",\"visitNo\": \"1940699001\",\"sickName\": \"严明祥\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950030000006\",\"itemName\": \"一次性无菌注射器20ml(/支)\",\"Price\": 0.48,\"quantity\": 2,\"Cost\": 0.96,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 05:28:40\"},{\"seqNo\": \"97426359\",\"visitNo\": \"1940699001\",\"sickName\": \"严明祥\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950029000010\",\"itemName\": \"一次性使用输液器BI-IT带针0.7# /支)\",\"Price\": 0.81,\"quantity\": 1,\"Cost\": 0.81,\"materialCode\": \"02585\",\"materialName\": \"一次性使用输液器 带针\",\"OperTime\": \"2024-02-21 05:28:40\"},{\"seqNo\": \"97426433\",\"visitNo\": \"1940702001\",\"sickName\": \"伍邦柏\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950030000005\",\"itemName\": \"一次性注射器2ml(/支)\",\"Price\": 0.21,\"quantity\": 1,\"Cost\": 0.21,\"materialCode\": \"77375\",\"materialName\": \"一次性注射器2ml\",\"OperTime\": \"2024-02-21 06:51:25\"},{\"seqNo\": \"97426478\",\"visitNo\": \"1927463002\",\"sickName\": \"林海龙\",\"applyDept\": \"187\",\"deptName\": \"门诊呼吸与危重症医学科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:42:23\"},{\"seqNo\": \"97426486\",\"visitNo\": \"1927463002\",\"sickName\": \"林海龙\",\"applyDept\": \"187\",\"deptName\": \"门诊呼吸与危重症医学科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:42:24\"},{\"seqNo\": \"97426518\",\"visitNo\": \"1940705001\",\"sickName\": \"姚连菊\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:48:31\"},{\"seqNo\": \"97426521\",\"visitNo\": \"1940705001\",\"sickName\": \"姚连菊\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:48:31\"},{\"seqNo\": \"97426523\",\"visitNo\": \"1940703001\",\"sickName\": \"薛连辉\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:49:10\"},{\"seqNo\": \"97426529\",\"visitNo\": \"1940703001\",\"sickName\": \"薛连辉\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000007\",\"itemName\": \"一次性使用人体静脉血样采集容器(肝素锂 绿色 5ml/支)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68972\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:49:11\"},{\"seqNo\": \"97426535\",\"visitNo\": \"1940703001\",\"sickName\": \"薛连辉\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:49:13\"},{\"seqNo\": \"97426537\",\"visitNo\": \"1940703001\",\"sickName\": \"薛连辉\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:49:15\"},{\"seqNo\": \"97426557\",\"visitNo\": \"1629086067\",\"sickName\": \"杨培恭\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:50:11\"},{\"seqNo\": \"97426559\",\"visitNo\": \"1629086067\",\"sickName\": \"杨培恭\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:50:12\"},{\"seqNo\": \"97426561\",\"visitNo\": \"1629086067\",\"sickName\": \"杨培恭\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:50:14\"},{\"seqNo\": \"97426567\",\"visitNo\": \"1629086067\",\"sickName\": \"杨培恭\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950046000007\",\"itemName\": \"一次性使用人体静脉血样采集容器(肝素锂 绿色 5ml/支)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68972\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:50:15\"},{\"seqNo\": \"97426570\",\"visitNo\": \"1407999064\",\"sickName\": \"蔡美花\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:50:24\"},{\"seqNo\": \"97426572\",\"visitNo\": \"1407999064\",\"sickName\": \"蔡美花\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:50:24\"},{\"seqNo\": \"97426574\",\"visitNo\": \"1407999064\",\"sickName\": \"蔡美花\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:50:24\"},{\"seqNo\": \"97426576\",\"visitNo\": \"1547551020\",\"sickName\": \"黄靖宇\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:50:44\"},{\"seqNo\": \"97426581\",\"visitNo\": \"1547551020\",\"sickName\": \"黄靖宇\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950046000007\",\"itemName\": \"一次性使用人体静脉血样采集容器(肝素锂 绿色 5ml/支)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68972\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:50:46\"},{\"seqNo\": \"97426583\",\"visitNo\": \"1547551020\",\"sickName\": \"黄靖宇\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:50:47\"},{\"seqNo\": \"97426591\",\"visitNo\": \"1547551020\",\"sickName\": \"黄靖宇\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:50:48\"},{\"seqNo\": \"97426642\",\"visitNo\": \"1613276019\",\"sickName\": \"黄英连\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:56:13\"},{\"seqNo\": \"97426649\",\"visitNo\": \"1613276019\",\"sickName\": \"黄英连\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:56:16\"},{\"seqNo\": \"97426654\",\"visitNo\": \"1613276019\",\"sickName\": \"黄英连\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:56:18\"},{\"seqNo\": \"97426704\",\"visitNo\": \"1408701039\",\"sickName\": \"胡玮坤\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:56:40\"},{\"seqNo\": \"97426705\",\"visitNo\": \"1408701039\",\"sickName\": \"胡玮坤\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:56:40\"},{\"seqNo\": \"97426713\",\"visitNo\": \"1408701039\",\"sickName\": \"胡玮坤\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:56:40\"},{\"seqNo\": \"97426714\",\"visitNo\": \"1408701039\",\"sickName\": \"胡玮坤\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000007\",\"itemName\": \"一次性使用人体静脉血样采集容器(肝素锂 绿色 5ml/支)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68972\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:56:40\"},{\"seqNo\": \"97426719\",\"visitNo\": \"1900545011\",\"sickName\": \"李光婷\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 07:56:42\"},{\"seqNo\": \"97426724\",\"visitNo\": \"1900545011\",\"sickName\": \"李光婷\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950046000007\",\"itemName\": \"一次性使用人体静脉血样采集容器(肝素锂 绿色 5ml/支)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68972\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 07:56:42\"},{\"seqNo\": \"97426934\",\"visitNo\": \"1719779006\",\"sickName\": \"吴玉秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 08:00:20\"},{\"seqNo\": \"97427072\",\"visitNo\": \"1719779006\",\"sickName\": \"吴玉秀\",\"applyDept\": \"65\",\"deptName\": \"急诊科\",\"itemCode\": \"950046000007\",\"itemName\": \"一次性使用人体静脉血样采集容器(肝素锂 绿色 5ml/支)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68972\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 08:00:22\"},{\"seqNo\": \"97427377\",\"visitNo\": \"1537583008\",\"sickName\": \"刘阿花\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950027000004\",\"itemName\": \"一次性使用静脉采血针\",\"Price\": 0.19,\"quantity\": 1,\"Cost\": 0.19,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 08:02:37\"},{\"seqNo\": \"97427380\",\"visitNo\": \"1537583008\",\"sickName\": \"刘阿花\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 08:02:39\"},{\"seqNo\": \"97427383\",\"visitNo\": \"1537583008\",\"sickName\": \"刘阿花\",\"applyDept\": \"113\",\"deptName\": \"内一门诊\",\"itemCode\": \"950046000004\",\"itemName\": \"一次性使用人体静脉血样采集容器(血常规管 2ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"\",\"materialName\": \"\",\"OperTime\": \"2024-02-21 08:02:41\"},{\"seqNo\": \"97427390\",\"visitNo\": \"1398769053\",\"sickName\": \"徐丽松\",\"applyDept\": \"56\",\"deptName\": \"门诊内科\",\"itemCode\": \"950046000005\",\"itemName\": \"一次性使用人体静脉血样采集容器(生化管 5ml)\",\"Price\": 0.59,\"quantity\": 1,\"Cost\": 0.59,\"materialCode\": \"68973\",\"materialName\": \"一次性使用人体静脉血样采集容器\",\"OperTime\": \"2024-02-21 08:02:48\"}],\"total\": 12296}}";
+ BaseResponse> baseResponse =
+ JSONObject.parseObject(response, new TypeReference>>() {
+ });
+ if (baseResponse.getCode() == 20000) {
+ List ptxhInvResponses = baseResponse.getData().getList();
+ List thrInvResultResponses = new ArrayList<>();
+ Set seenNames = new HashSet<>();
+ List itemData = new ArrayList<>();
+ if (CollUtil.isNotEmpty(ptxhInvResponses)) {
+ for (InvProjectResultEntity ptxhInvResponse : ptxhInvResponses) {
+ ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
+ thrInvResultResponse.setThrCode(ptxhInvResponse.getMaterialCode());
+ thrInvResultResponse.setCpmctymc(ptxhInvResponse.getItemName());
+ thrInvResultResponse.setSickerCode(ptxhInvResponse.getVisitNo());
+ thrInvResultResponse.setSickerName(ptxhInvResponse.getSickName());
+ thrInvResultResponse.setPrice(BigDecimal.valueOf(ptxhInvResponse.getPrice()));
+ thrInvResultResponse.setAmount(BigDecimal.valueOf(ptxhInvResponse.getCost()));
+ thrInvResultResponse.setDeptName(ptxhInvResponse.getDeptName());
+ thrInvResultResponse.setDeptCode("1002");
+ thrInvResultResponse.setInvName(ptxhInvResponse.getDeptName());
+ thrInvResultResponse.setInvCode("1000003");
+ thrInvResultResponse.setThrCode(ptxhInvResponse.getItemCode());
+ thrInvResultResponse.setMainAction(ConstantType.TYPE_OUT);
+ thrInvResultResponse.setType("1");
+ thrInvResultResponse.setOutCount(ptxhInvResponse.getQuantity() + "");
+ thrInvResultResponse.setReCount(ptxhInvResponse.getQuantity() + "");
+ thrInvResultResponses.add(thrInvResultResponse);
+ if (seenNames.add(ptxhInvResponse.getItemCode())) {
+ itemData.add(ptxhInvResponse);
+ }
+ }
+ }
+ for (InvProjectResultEntity invProjectResultEntity : itemData) {
+ if (!basicSkProjectMapper.exists(new QueryWrapper().eq("code", invProjectResultEntity.getItemCode()))) {
+ BasicSkProjectEntity basicSkProjectEntity = new BasicSkProjectEntity();
+ basicSkProjectEntity.setCode(invProjectResultEntity.getItemCode());
+ basicSkProjectEntity.setName(invProjectResultEntity.getItemName());
+ basicSkProjectEntity.setType(2);
+ basicSkProjectEntity.setCreateTime(new Date());
+ basicSkProjectEntity.setUpdateTime(new Date());
+ basicSkProjectEntity.setRemark("出入库明细自动生成");
+ basicSkProjectEntity.setId(IdUtil.getSnowflakeNextId());
+ basicSkProjectMapper.insert(basicSkProjectEntity);
+ List thrProductsEntitys = thrProductsDao.selectList(new QueryWrapper().eq("prcitmcode", invProjectResultEntity.getItemCode()));
+ if (CollUtil.isNotEmpty(thrProductsEntitys)) {
+ for (ThrProductsEntity thrProductsEntity : thrProductsEntitys) {
+ CompanyProductRelevanceRequest companyProductRelevanceRequest = new CompanyProductRelevanceRequest();
+ companyProductRelevanceRequest.setThirdId(thrProductsEntity.getCode());
+ List udiRlSupResponses = udiRlSupDao.filterUdiGp(companyProductRelevanceRequest);
+ if (CollUtil.isNotEmpty(udiRlSupResponses)) {
+ UdiRlSupResponse udiRlSupResponse = udiRlSupResponses.get(0);
+ BasicSkProjectDetailEntity basicSkProjectDetailEntity = new BasicSkProjectDetailEntity();
+ basicSkProjectDetailEntity.setId(IdUtil.getSnowflakeNextId());
+ basicSkProjectDetailEntity.setRelId(udiRlSupResponse.getRlId());
+ basicSkProjectDetailEntity.setSupId(udiRlSupResponse.getCustomerId());
+ basicSkProjectDetailEntity.setPId(basicSkProjectEntity.getId());
+ basicSkProjectDetailEntity.setThrCode(thrProductsEntity.getCode());
+ basicSkProjectDetailEntity.setThrName(thrProductsEntity.getName());
+ basicSkProjectDetailEntity.setCreateTime(DateUtil.formatDateTime(new Date()));
+ basicSkProjectDetailEntity.setCreateUser("1");
+ basicSkProjectDetailEntity.setUpdateTime(DateUtil.formatDateTime(new Date()));
+ basicSkProjectDetailEntity.setUpdateUser("1");
+ basicSkProjectDetailEntity.setRemark("出入库明细自动生成");
+ basicSkProjectDetailEntity.setCount(1);
+ basicDestinyRelMapper.insert(basicSkProjectDetailEntity);
+ }
+ }
+ }
+
+ }
+ }
+
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(thrInvResultResponses.size() + 0l);
+ pageSimpleResponse.setList(thrInvResultResponses);
+ return ResultVOUtils.success(pageSimpleResponse);
+ }
+ return baseResponse;
+ }
+
+ @Override
+ public BaseResponse getInvProducts(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse testConnect() {
+ UdiwmsUnitRequest udiwmsUnitRequest = new UdiwmsUnitRequest();
+ udiwmsUnitRequest.setPage(1);
+ udiwmsUnitRequest.setLimit(1);
+ BaseResponse baseResponse = getUnit(udiwmsUnitRequest);
+ if (baseResponse.getCode() == 20000) {
+ return ResultVOUtils.success("连接成功!");
+ }
+ return ResultVOUtils.error(500, "连接失败!");
+ }
+
+ @Override
+ public BaseResponse queryUdiInvProducts(UdiwmsQueryUdiInvProductsRequest queryUdiInvProductsRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse submitProducts(UdiwmsAddProductsRequest udiwmsAddProductsRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse submitUnit(UdiwmsAddUnitRequest udiwmsAddUnitRequest) {
+
+
+ CtqyyRequest ctqyyRequest = new CtqyyRequest();
+ ctqyyRequest.setMsgHeader(getMsgHeader("addSupplierDict"));
+ ctqyyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsAddUnitRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_PRODUCT_SUBMIT_URL), ctqyyRequest);
+ response = parserResult(response);
+ try {
+ log.error("提交往来单位/生产厂家:" + ctqyyRequest.getMsgBody());
+ CtBaseResponse baseResponse = JSONObject.parseObject(response, CtBaseResponse.class);
+ if (baseResponse.getCode() != 20000) {
+ String errMsg = "提交往来单位/生产厂家,异常:{}" + response;
+ log.error(errMsg);
+ return ResultVOUtils.error(500, "提交往来单位/生产厂家失败!");
+ } else {
+ BasicCorpEntity basicCorpEntity = new BasicCorpEntity();
+ basicCorpEntity.setErpId(CustomUtil.getUnitId());
+ basicCorpEntity.setName(udiwmsAddUnitRequest.getSupplierName());
+ basicCorpEntity.setCorpType(2);
+ basicCorpEntity.setThirdId(baseResponse.getSupplierCode());
+ basicCorpDao.insert(basicCorpEntity);
+ log.error("提交往来单位/生产厂家,成功:{}", response);
+ return ResultVOUtils.success(baseResponse.getMaterialNo());
+ }
+ } catch (Exception e) {
+ String errMsg = "提交往来单位/生产厂家,异常:{}" + response;
+ log.error(errMsg);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, errMsg);
+
+ }
+ }
+
+ @Override
+ public BaseResponse postProducts(PostThrProductsRequest postThrProductsRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse postCorps(PostThrCorpRequest postThrCorpRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse postOrderDetail(PostFileThrOrderRequest postFileThrOrderRequest) {
+ return null;
+ }
+
+ @Override
+ public BaseResponse postInvProducts(PostThrInvProductsRequest postThrInvProductsRequest) {
+ return null;
+ }
+
+
+ /**
+ * 封装单据详情参数
+ *
+ * @param ioCodeEntities 单据码明细
+ * @param orderDetailRequests 单据详情参数
+ * @param detailBizEntities 单据业务详情
+ */
+ private String setOrderDetailList(List ioCodeEntities, List orderDetailRequests, List detailBizEntities) {
+ String errMsg = "";
+ for (IoOrderDetailBizEntity detailBizEntity : detailBizEntities) {
+
+ IoOrderDetailCodeEntity orderDetailCodeEntity = orderDetailCodeDao
+ .selectOne(new QueryWrapper()
+ .eq("orderIdFk", detailBizEntity.getOrderIdFk())
+ .eq("bindRlFk", detailBizEntity.getBindRlFk())
+ .eq(StrUtil.isNotEmpty(detailBizEntity.getBatchNo()), "batchNo", detailBizEntity.getBatchNo())
+ .isNull(StrUtil.isEmpty(detailBizEntity.getBatchNo()), "batchNo").last("LIMIT 1"));
+ if (orderDetailCodeEntity != null && IntUtil.value(orderDetailCodeEntity.getReCount()) > 0) {
+ detailBizEntity.setCount(orderDetailCodeEntity.getReCount());
+ UdiwmsOrderDetailRequest item = buildProductInfo(detailBizEntity);
+ if (item != null) {
+ //封装条码信息
+ submitOrderUtil.setCodeList(ioCodeEntities, detailBizEntity, item);
+ orderDetailRequests.add(item);
+ } else {
+ errMsg = detailBizEntity.getCoName() + "," + "第三方产品编码未关联";
+ }
+ }
+ }
+ return errMsg;
+ }
+
+
+ @Resource
+ private ThrProductsDao thrProductsDao;
+
+ public UdiwmsOrderDetailRequest buildProductInfo(IoOrderDetailBizEntity detailBizEntity) {
+ //查询产品信息
+ BasicUdirelEntity basicUdirel = basicUdirelDao.selectById(detailBizEntity.getBindRlFk());
+ BasicProductsEntity basicProducts = basicProductsDao.selectOne(new LambdaQueryWrapper().eq(BasicProductsEntity::getUuid, basicUdirel.getUuid()).last("limit 1"));
+
+ UdiwmsOrderDetailRequest item = new UdiwmsOrderDetailRequest();
+ BeanUtil.copyProperties(detailBizEntity, item);
+
+ item.setProductDate(DateUtil.formatExpireTime(StrUtil.isBlank(detailBizEntity.getProductDate()) ? null : "20" + detailBizEntity.getProductDate()));
+ item.setExpireDate(DateUtil.formatExpireTime(StrUtil.isBlank(detailBizEntity.getExpireDate()) ? null : "20" + detailBizEntity.getExpireDate()));
+
+ String thirdProductId = (String) ReflectUtil.getFieldValue(basicUdirel, thirdSysConfig.getThirdId());
+ item.setProductId(thirdProductId); //产品ID
+ //查询第三方产品名称
+ ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new LambdaQueryWrapper()
+ .eq(ThrProductsEntity::getCode, thirdProductId).last("limit 1"));
+ if (thrProductsEntity == null) {
+ log.error("第三方产品编码未关联");
+ return null;
+ }
+ item.setProductName(thrProductsEntity.getName()); //产品名称
+ item.setBindRlFk(detailBizEntity.getBindRlFk());
+ item.setStandard(detailBizEntity.getSpec()); //规格型号
+ item.setBillNo(detailBizEntity.getOrderIdFk()); //单据号
+ item.setRegisterNo(detailBizEntity.getCertCode()); //注册/备案证号
+ item.setManufactory(basicProducts.getManufactory()); //生产厂家
+ item.setMeasname(thrProductsEntity.getMeasname()); //计量单位
+ item.setAllowNoBatch(IntUtil.value(basicProducts.getAllowNoBatch())); //是否允许无批次号
+ if (StrUtil.isNotEmpty(item.getManufactory())) {
+ ThrCorpEntity thrCorpEntity = thrCorpService.getThrCorpByName(item.getManufactory());
+ if (thrCorpEntity != null)
+ item.setManufactoryCode(thrCorpEntity.getUnitId());
+ }
+ item.setSupCode(thrProductsEntity.getSupCode());
+ item.setCplb(thrProductsEntity.getFlbm());
+ item.setHslb(thrProductsEntity.getCplb());
+ item.setCount(detailBizEntity.getCount());
+ return item;
+ }
+
+
+ /**
+ * 处理提交单据,记录日志,解析结果逻辑
+ *
+ * @param orderEntity
+ * @param zaZyRequest
+ * @return
+ */
+ private BaseResponse submitOrder(IoOrderEntity orderEntity, ZzzyyRequest zaZyRequest) {
+ //记录日志
+ IoOrderUploadLogEntity uploadLog = new IoOrderUploadLogEntity();
+ uploadLog.setBillDate(orderEntity.getCreateTime());
+ uploadLog.setBillType(orderEntity.getAction());
+ uploadLog.setSubmitTime(new Date());
+ uploadLog.setBillNo(orderEntity.getBillNo());
+ uploadLog.setFromType(Constants.THIRD_ORDER_UPLOAD);
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_ORDER_SUBMIT_URL), zaZyRequest);
+ response = parserResult(response);
+ if (StrUtil.isNotBlank(response)) {
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ if (baseResponse.getCode() == 20000) {
+ String thirdBillNo = String.valueOf(baseResponse.getData());
+ orderEntity.setThirdBillNo(thirdBillNo);
+ orderEntity.setExportStatus(1); //提交成功
+ uploadLog.setStatus(2);
+ uploadLog.setThrBillNo(thirdBillNo);
+ uploadLog.setResult("提交成功");
+ orderDao.updateById(orderEntity);
+ orderUploadLogDao.insert(uploadLog);
+ return ResultVOUtils.success("提交成功");
+ }
+ uploadLog.setStatus(3);
+ uploadLog.setResult("提交失败,错误信息:" + baseResponse.getMessage());
+ orderEntity.setExportStatus(2); //上传失败
+ orderDao.updateById(orderEntity);
+ orderUploadLogDao.insert(uploadLog);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析提交到智业单据返回结果异常,结果信息:{}", response);
+ log.error("异常信息:{}", e);
+ uploadLog.setStatus(3);
+ uploadLog.setResult("提交失败,错误信息:" + response);
+ orderEntity.setExportStatus(2); //上传失败
+ orderDao.updateById(orderEntity);
+ orderUploadLogDao.insert(uploadLog);
+ return ResultVOUtils.error(500, "提交失败");
+ }
+ } else {
+ uploadLog.setStatus(3);
+ uploadLog.setResult("提交失败,调用接口返回为空");
+ orderEntity.setExportStatus(2); //上传失败
+ orderDao.updateById(orderEntity);
+ orderUploadLogDao.insert(uploadLog);
+ return ResultVOUtils.error(500, "提交失败");
+ }
+ }
+
+
+ @Override
+ public BaseResponse submitPreInOrders(UdiwmsPreInOrderRequest udiwmsPreInOrderRequest) {
+ ZzzyyRequest zaZyRequest = new ZzzyyRequest();
+ zaZyRequest.setMsgHeader(getMsgHeader("saveMaterialHight"));
+ zaZyRequest.setMsgBody(JSONUtil.toJsonStr(udiwmsPreInOrderRequest));
+ String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(Constants.URL_NAME_PRE_IN_ORDER_SUBMIT_URL), zaZyRequest);
+ response = parserResult(response);
+ try {
+ BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
+ return baseResponse;
+ } catch (Exception e) {
+ log.error("解析湖里医院智业接口提交单据返回数湖里据异常,返回结果:{}", response);
+ log.error("异常信息:{}", e);
+ return ResultVOUtils.error(500, "网络错误,或远程服务器异常无法返回正确结果(" + response + ")");
+ }
+ }
+
+
+ /**
+ * 转换提交单据参数
+ *
+ * @param udiwmsOrderRequest
+ * @param orderEntity
+ * @return
+ */
+ public UdiwmsPreInOrderRequest submitPreInOrderToThirdSys(ZaxzyyOrderRequest udiwmsOrderRequest, IoOrderEntity orderEntity) {
+ UdiwmsPreInOrderRequest udiwmsPreInOrderRequest = new UdiwmsPreInOrderRequest();
+ if (udiwmsOrderRequest != null) {
+ BeanUtils.copyProperties(udiwmsOrderRequest, udiwmsPreInOrderRequest);
+ udiwmsPreInOrderRequest.setLocInvCode(udiwmsOrderRequest.getLocStorageCode());
+ udiwmsPreInOrderRequest.setLocInvName(udiwmsOrderRequest.getLocStorageName());
+ String deptCode = "70";
+ if (StrUtil.isNotEmpty(orderEntity.getOriginUllageSupNo())) {
+ IoOrderEntity temp = orderDao.selectOne(new QueryWrapper().eq("billNo", orderEntity.getOriginUllageSupNo()).last("limit 1"));
+ if (temp != null && StrUtil.isNotEmpty(temp.getFromInvCode())) {
+ AuthWarehouseEntity authWarehouseEntity =
+ authWarehouseDao.selectOne(new QueryWrapper().eq("code", temp.getFromInvCode()).last("limit 1"));
+ deptCode = authWarehouseEntity.getThirdId();
+ }
+ }
+ udiwmsPreInOrderRequest.setDeptCode(deptCode);
+ if (orderEntity.getReviewUser() != null) {
+ AuthUserEntity authUser = authUserDao.selectById(orderEntity.getReviewUser());
+ udiwmsPreInOrderRequest.setActor(authUser.getEmployeeName());
+ } else if (orderEntity.getCreateUser() != null) {
+ AuthUserEntity authUser = authUserDao.selectById(orderEntity.getCreateUser());
+ udiwmsPreInOrderRequest.setActor(authUser.getEmployeeName());
+ }
+ List itemDTOS = new ArrayList<>();
+ if (CollUtil.isNotEmpty(udiwmsOrderRequest.getItem())) {
+ for (UdiwmsOrderDetailRequest udiwmsOrderDetail : udiwmsOrderRequest.getItem()) {
+ if (CollUtil.isNotEmpty(udiwmsOrderDetail.getCodeList())) {
+ for (UdiwmsOrderDetailRequest.CodeDetailEntity codeDetaiEntity : udiwmsOrderDetail.getCodeList()) {
+ UdiwmsPreInOrderRequest.ItemDTO itemDTO = new UdiwmsPreInOrderRequest.ItemDTO();
+ BeanUtils.copyProperties(udiwmsOrderDetail, itemDTO);
+ if (StrUtil.isNotEmpty(itemDTO.getManufactory())) {
+ ThrCorpEntity thrCorpEntity = thrCorpService.getThrCorpByName(itemDTO.getManufactory());
+ if (thrCorpEntity != null)
+ itemDTO.setManufactoryCode(thrCorpEntity.getUnitId());
+ }
+ String code = codeDetaiEntity.getCode();
+ if (code.contains("\u001D")) {
+// code = code.replace("\u001D", "zysoft"); 智业无法识别GS1符号
+ code = code.replace("\u001D", "");
+ }
+ itemDTO.setCode(code);
+ itemDTO.setNameCode(codeDetaiEntity.getNameCode());
+
+ if (IntUtil.value(codeDetaiEntity.getCount()) > 1) {
+ for (int i = 0; i < codeDetaiEntity.getCount(); i++) {
+ itemDTO.setCount(1);
+ itemDTOS.add(itemDTO);
+ }
+ } else {
+ itemDTO.setCount(codeDetaiEntity.getCount());
+ itemDTOS.add(itemDTO);
+ }
+
+
+ }
+ }
+ }
+ }
+ udiwmsPreInOrderRequest.setItems(itemDTOS);
+ }
+ return udiwmsPreInOrderRequest;
+ }
+
+
+ /**
+ * ------------------------------------------现场管理医保相关接口方法--------------------------------------------------------------
+ */
+ /**
+ * 处方拉取视图
+ *
+ * @param udiwmsBasicSkPrescribeRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getPrescribes(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest) {
+ if (IntUtil.value(udiwmsBasicSkPrescribeRequest.getInOutType()) == 0) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+
+ String startTime = udiwmsBasicSkPrescribeRequest.getStartTime();
+ String endTime = udiwmsBasicSkPrescribeRequest.getEndTime();
+ wrapper.ge(StrUtil.isNotEmpty(startTime), VInsurNationGoodsPhysic::getSEL_RETN_TIME, startTime);
+ wrapper.le(StrUtil.isNotEmpty(endTime), VInsurNationGoodsPhysic::getSEL_RETN_TIME, endTime);
+
+ String code = udiwmsBasicSkPrescribeRequest.getCode();
+ String fromCorpName = udiwmsBasicSkPrescribeRequest.getFromCorpName();
+ String key = udiwmsBasicSkPrescribeRequest.getKey();
+ wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsPhysic::getSTOOUT_NO, code).or().eq(VInsurNationGoodsPhysic::getRXNO, code));
+ wrapper.and(StrUtil.isNotEmpty(key), t -> t.like(VInsurNationGoodsPhysic::getSTOOUT_NO, key)
+ .or().like(VInsurNationGoodsPhysic::getRXNO, key)
+ .or().like(VInsurNationGoodsPhysic::getPSN_NAME, key)
+ .or().like(VInsurNationGoodsPhysic::getPSN_NO, key)
+ );
+ wrapper.and(StrUtil.isNotEmpty(fromCorpName), t -> t.eq(VInsurNationGoodsPhysic::getPSN_NAME, fromCorpName));
+ // 拉取处方时,改成拉取v_ypzs_pres_info
+ IPage page = vYpzsPresInfoMapper.selectGroupedWithPagination(new Page(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
+ udiwmsBasicSkPrescribeRequest);
+
+ return this.covertSellOrder(udiwmsBasicSkPrescribeRequest, page);
+ } else {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+
+ String startTime = udiwmsBasicSkPrescribeRequest.getStartTime();
+ String endTime = udiwmsBasicSkPrescribeRequest.getEndTime();
+ wrapper.ge(StrUtil.isNotEmpty(startTime), VInsurNationGoodsReturn::getSEL_RETN_TIME, startTime);
+ wrapper.le(StrUtil.isNotEmpty(endTime), VInsurNationGoodsReturn::getSEL_RETN_TIME, endTime);
+
+
+ String code = udiwmsBasicSkPrescribeRequest.getCode();
+ String fromCorpName = udiwmsBasicSkPrescribeRequest.getFromCorpName();
+ String key = udiwmsBasicSkPrescribeRequest.getKey();
+ wrapper.and(StrUtil.isNotEmpty(key), t -> t.like(VInsurNationGoodsReturn::getAPPLY_NO, key)
+ .or().like(VInsurNationGoodsReturn::getPSN_NAME, key)
+ .or().like(VInsurNationGoodsReturn::getPSN_NO, key)
+ );
+ wrapper.and(StrUtil.isNotEmpty(code), t -> t.eq(VInsurNationGoodsReturn::getAPPLY_NO, code));
+ wrapper.and(StrUtil.isNotEmpty(fromCorpName), t -> t.eq(VInsurNationGoodsReturn::getPSN_NAME, fromCorpName));
+ //拉取处方退货时,改成拉取v_ypzs_pres_info_return
+ IPage page = vYpzsPresInfoReturnMapper.selectGroupedWithPagination(new Page(udiwmsBasicSkPrescribeRequest.getPage(), udiwmsBasicSkPrescribeRequest.getLimit()),
+ udiwmsBasicSkPrescribeRequest);
+ return this.covertReturnOrder(udiwmsBasicSkPrescribeRequest, page);
+ }
+
+ }
+
+
+ /**
+ * 采购计划拉取视图
+ *
+ * @param udiwmsThrOrderRequest
+ * @return
+ */
+ @Override
+ public BaseResponse getThrOrders(UdiwmsThrOrderRequest udiwmsThrOrderRequest) {
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ if (BusTypeConstant.CGJH001.getBusType().equals(udiwmsThrOrderRequest.getBusType())) {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+
+// String startTime = udiwmsThrOrderRequest.getStartTime();
+// String endTime = udiwmsThrOrderRequest.getEndTime();
+// wrapper.ge(StrUtil.isNotEmpty(startTime),VYpzsPlanInfo::getKEEP_BOOK_TIME,startTime+" 00:00:00");
+// wrapper.le(StrUtil.isNotEmpty(endTime),VYpzsPlanInfo::getKEEP_BOOK_TIME,endTime+" 23:59:59");
+
+ wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBillNo()), VYpzsPlanInfo::getCGDBH, udiwmsThrOrderRequest.getBillNo());
+ //关键字模糊处理
+ String keywords = udiwmsThrOrderRequest.getKeyWords();
+ wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsPlanInfo::getCGDBH, keywords)//单据号
+ );
+ wrapper.like(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getFromCorpName()), VYpzsPlanInfo::getSCQYMC, udiwmsThrOrderRequest.getFromCorpName());
+
+ Page page = vYpzsPlanInfoMapper.selectGroupedWithPagination(new Page(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), udiwmsThrOrderRequest);
+
+ List planInfos = page.getRecords();
+ List ioCollectOrders = new ArrayList<>();
+ if (CollUtil.isNotEmpty(planInfos)) {
+
+ List collect = planInfos.stream().map(VYpzsPlanInfo::getCGDBH).collect(Collectors.toList());
+ LambdaQueryWrapper wrapper1 = new LambdaQueryWrapper<>();
+ wrapper1.in(VYpzsPlanInfo::getCGDBH, collect);
+ List vYpzsPlanInfos = vYpzsPlanInfoMapper.selectList(wrapper1);
+
+ Map> groupedByBz = vYpzsPlanInfos.stream()
+ .collect(Collectors.groupingBy(VYpzsPlanInfo::getCGDBH));
+ groupedByBz.forEach((key, value) -> {
+ VYpzsPlanInfo planInfo = value.get(0);
+ StringBuilder errorMsg = new StringBuilder();
+ IoCollectOrder ioCollectOrder = new IoCollectOrder();
+ ioCollectOrder.setBillNo(planInfo.getCGDBH());
+// ioCollectOrder.setBilldate(planInfo.());
+ ioCollectOrder.setFromType("HIS系统");
+ ioCollectOrder.setBillTime(new Date());
+ ioCollectOrder.setFromCorp(planInfo.getSCQYBM());
+ ioCollectOrder.setFromCorpName(planInfo.getSCQYMC());
+ ioCollectOrder.setBusType(udiwmsThrOrderRequest.getBusType());
+ ioCollectOrder.setWorkPlaceCode(udiwmsThrOrderRequest.getWorkPlaceCode());
+ ioCollectOrder.setCreateTime(new Date());
+ ioCollectOrder.setUpdateTime(new Date());
+ ioCollectOrder.setSplitStatus(0);
+ ioCollectOrder.setTagStatus(0);
+ List bizList = new ArrayList<>();
+ value.forEach(entity -> {
+ IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
+ BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper().eq(BasicUdirelEntity::getMainId, entity.getYPBM()));
+ if (basicUdirelEntity != null) {
+ collectOrderBiz.setRelId(basicUdirelEntity.getId());
+ } else {
+ errorMsg.append(entity.getYPMC()).append("字典未对照").append(";");
+ }
+ collectOrderBiz.setThrCode(entity.getYPBM());
+ collectOrderBiz.setCpmctymc(entity.getYPMC());
+ collectOrderBiz.setBatchNo(entity.getYPBM());
+ collectOrderBiz.setGgxh(entity.getGGMC());
+ collectOrderBiz.setCount(entity.getGMSL());
+ collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
+ collectOrderBiz.setMeasureUnit(entity.getBZDW());
+ collectOrderBiz.setTagStatus(1);
+ collectOrderBiz.setUnTagCount(0);
+ bizList.add(collectOrderBiz);
+ });
+ ioCollectOrder.setBizList(bizList);
+ ioCollectOrders.add(ioCollectOrder);
+ });
+ }
+ pageSimpleResponse.setTotal(page.getTotal());
+ pageSimpleResponse.setList(ioCollectOrders);
+ } else {
+ LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
+
+ String startTime = udiwmsThrOrderRequest.getStartTime();
+ String endTime = udiwmsThrOrderRequest.getEndTime();
+ wrapper.ge(StrUtil.isNotEmpty(startTime), VYpzsIoInfo::getKEEP_BOOK_TIME, startTime);
+ wrapper.le(StrUtil.isNotEmpty(endTime), VYpzsIoInfo::getKEEP_BOOK_TIME, endTime);
+ wrapper.and(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getCorpName()), t -> t.like(VYpzsIoInfo::getCONSIGNEE_NAME, udiwmsThrOrderRequest.getCorpName()).or().eq(VYpzsIoInfo::getCONSIGNOR_NAME, udiwmsThrOrderRequest.getCorpName()));
+
+ wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBillNo()), VYpzsIoInfo::getPHYSIC_CODE, udiwmsThrOrderRequest.getBillNo());
+ wrapper.eq(StrUtil.isNotBlank(udiwmsThrOrderRequest.getBusType()), VYpzsIoInfo::getIO_SORT, udiwmsThrOrderRequest.getBusType());
+
+ wrapper.like(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getFromCorpName()), VYpzsIoInfo::getCONSIGNEE_NAME, udiwmsThrOrderRequest.getFromCorpName());
+ wrapper.like(StrUtil.isNotEmpty(udiwmsThrOrderRequest.getShipperName()), VYpzsIoInfo::getCONSIGNOR_NAME, udiwmsThrOrderRequest.getShipperName());
+ //关键字模糊处理
+ String keywords = udiwmsThrOrderRequest.getKeyWords();
+ wrapper.and(StrUtil.isNotEmpty(keywords), t -> t.like(VYpzsIoInfo::getPHYSIC_CODE, keywords)//单据号
+ .or().like(VYpzsIoInfo::getCONSIGNOR_NAME, keywords)//发货方
+ .or().like(VYpzsIoInfo::getCONSIGNEE_NAME, keywords)//收货方
+ .or().like(VYpzsIoInfo::getKEEP_BOOK_TIME, keywords)//收货方
+ .or().like(VYpzsIoInfo::getIO_SORT, keywords)//收货方
+ );
+
+ Page page = vYpzsIoInfoMapper.selectGroupedWithPagination(new Page(udiwmsThrOrderRequest.getPage(), udiwmsThrOrderRequest.getLimit()), udiwmsThrOrderRequest);
+
+ List ioInfos = page.getRecords();
+ List ioCollectOrders = new ArrayList<>();
+ if (CollUtil.isNotEmpty(ioInfos)) {
+ List collect = ioInfos.stream().map(VYpzsIoInfo::getRECEIPT_NUMBER).collect(Collectors.toList());
+ LambdaQueryWrapper vYpzsIoInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
+ vYpzsIoInfoLambdaQueryWrapper.in(VYpzsIoInfo::getRECEIPT_NUMBER, collect);
+ List vYpzsIoInfos = vYpzsIoInfoMapper.selectList(vYpzsIoInfoLambdaQueryWrapper);
+
+ Map> groupedByPhysicCode = vYpzsIoInfos.stream()
+ .collect(Collectors.groupingBy(VYpzsIoInfo::getRECEIPT_NUMBER));
+ groupedByPhysicCode.forEach((key, value) -> {
+ VYpzsIoInfo info = value.get(0);
+ StringBuilder errorMsg = new StringBuilder();
+ IoCollectOrder ioCollectOrder = new IoCollectOrder();
+ ioCollectOrder.setBillNo(info.getRECEIPT_NUMBER());
+ ioCollectOrder.setFromType("HIS系统");
+ ioCollectOrder.setBillTime(DateUtil.parseDate(info.getKEEP_BOOK_TIME()));
+ ioCollectOrder.setFromCorp(info.getCONSIGNEE());
+ ioCollectOrder.setFromCorpName(info.getCONSIGNEE_NAME());
+
+ ioCollectOrder.setShipper(info.getCONSIGNOR());
+ ioCollectOrder.setShipperName(info.getCONSIGNOR_NAME());
+
+ ioCollectOrder.setBusType(udiwmsThrOrderRequest.getBusType());
+ ioCollectOrder.setWorkPlaceCode(udiwmsThrOrderRequest.getWorkPlaceCode());
+ ioCollectOrder.setCreateTime(new Date());
+ ioCollectOrder.setUpdateTime(new Date());
+ ioCollectOrder.setSplitStatus(0);
+ ioCollectOrder.setTagStatus(0);
+ List bizList = new ArrayList<>();
+ value.forEach(entity -> {
+ IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
+ BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()).last("limit 1"));
+ if (basicUdirelEntity != null) {
+ collectOrderBiz.setRelId(basicUdirelEntity.getId());
+ } else {
+ errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
+ }
+ collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
+ collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
+ collectOrderBiz.setBatchNo(entity.getBATCH_NO());
+ collectOrderBiz.setCount(entity.getQUANTITY());
+ collectOrderBiz.setYbbm(entity.getCOUNTRY_CODE());
+ collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
+ collectOrderBiz.setMeasureUnit(entity.getPACK_UNIT1());
+ collectOrderBiz.setGgxh(entity.getPACK_SPEC() + ":" + entity.getPHYSIC_UNIT());
+ collectOrderBiz.setTagStatus(1);
+ collectOrderBiz.setUnTagCount(0);
+ collectOrderBiz.setRemark1(entity.getRETAIL_PRICE().toString());
+ collectOrderBiz.setRemark2(entity.getRETAIL_MONEY().toString());
+ collectOrderBiz.setRemark3(entity.getIMPORT_PRICE().toString());
+ collectOrderBiz.setRemark4(entity.getIMPORT_MONEY().toString());
+ collectOrderBiz.setRemark5(entity.getFIXMEDINS_BCHNO());
+ collectOrderBiz.setRemark6(entity.getRX_FLAG());
+ collectOrderBiz.setRemark7(entity.getINV_CHG_TYPE());
+ bizList.add(collectOrderBiz);
+ });
+ if (StrUtil.isNotBlank(errorMsg)) {
+ ioCollectOrder.setErrorMsg(errorMsg.toString());
+ ioCollectOrder.setTagStatus(4);
+ }
+ ioCollectOrder.setBizList(bizList);
+ ioCollectOrders.add(ioCollectOrder);
+ });
+ }
+ pageSimpleResponse.setTotal(page.getTotal());
+ pageSimpleResponse.setList(ioCollectOrders);
+ }
+ return ResultVOUtils.success(pageSimpleResponse);
+ }
+
+
+ /**
+ * 业务单据上传医保
+ *
+ * @param postCollectOrderRequest
+ * @return
+ */
+ @Override
+ public BaseResponse uploadCollectOrder(PostCollectOrderRequest postCollectOrderRequest) {
+
+
+ List collectOrderList = postCollectOrderRequest.getCollectOrderList();
+
+ if (CollUtil.isNotEmpty(collectOrderList)) {
+ for (IoCollectOrder ioCollectOrder : collectOrderList) {
+ String busType = ioCollectOrder.getBusType();
+
+ if (matchBusType(busType, buyType_3501)) {
+ optionUploadCollectOrder3501(ioCollectOrder);
+ } else if (matchBusType(busType, buyType_3502)) {
+ optionUploadCollectOrder3502(ioCollectOrder);
+ } else if (matchBusType(busType, buyType_3505)) {
+ return optionUploadCollectOrder3505(ioCollectOrder);
+ } else if (matchBusType(busType, buyType_3506)) {
+ optionUploadCollectOrder3506(ioCollectOrder);
+ } else {
+ return ResultVOUtils.error(500, "业务类型未找到对应上传接口");
+ }
+ }
+ }
+ return ResultVOUtils.success();
+ }
+
+ // 辅助方法,用于检查busType是否存在于指定的buyType数组中
+ private static boolean matchBusType(String busType, String[] buyTypes) {
+ for (String buyType : buyTypes) {
+ if (busType.equals(buyType)) {
+ return true; // 如果找到匹配项,则返回true
+ }
+ }
+ return false; // 如果没有找到匹配项,则返回false
+ }
+
+ /**
+ * 单据
+ *
+ * @param udiwmsBasicSkPrescribeRequest
+ * @return
+ */
+ private BaseResponse covertSellOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage page) {
+ List presInfoEntities = page.getRecords();
+ List vInsurNationGoodsPhysics = new ArrayList<>();
+ if (CollUtil.isNotEmpty(presInfoEntities)) {
+ List collect = presInfoEntities.stream().map(VYpzsPresInfo::getPRESCRIBE_NUMBER).collect(Collectors.toList());
+ LambdaQueryWrapper wrapper1 = new LambdaQueryWrapper<>();
+ wrapper1.in(VYpzsPresInfo::getPRESCRIBE_NUMBER, collect);
+ vInsurNationGoodsPhysics = vYpzsPresInfoMapper.selectList(wrapper1);
+ }
+
+ // TODO: 2024/9/19 这边在转换的时候就不能用VInsurNationGoodsPhysic
+ if (CollUtil.isNotEmpty(vInsurNationGoodsPhysics)) {
+ Map> groupedByPrescribeNumber = vInsurNationGoodsPhysics.stream()
+ .collect(Collectors.groupingBy(VYpzsPresInfo::getPHYSIC_CODE));
+ List ioCollectOrders = new ArrayList<>();
+ groupedByPrescribeNumber.forEach((key, value) -> {
+ VYpzsPresInfo presInfoEntity = value.get(0);
+ StringBuilder errorMsg = new StringBuilder();
+ IoCollectOrder ioCollectOrder = new IoCollectOrder();
+ ioCollectOrder.setBillNo(presInfoEntity.getPRESCRIBE_NUMBER());
+ ioCollectOrder.setFromType("HIS系统");
+ ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
+ ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
+ ioCollectOrder.setFromCorpName(presInfoEntity.getSICK_NAME());
+ Date date = DateUtil.parseDate(presInfoEntity.getLAY_TIME());
+ ioCollectOrder.setBillTime(date);
+ ioCollectOrder.setCreateTime(new Date());
+ ioCollectOrder.setCreateUser(udiwmsBasicSkPrescribeRequest.getCreateUser());
+ ioCollectOrder.setBackupOrderRemark1(presInfoEntity.getSTOOUT_NO());
+ ioCollectOrder.setBackupOrderRemark2(presInfoEntity.getSICK_ID());
+// ioCollectOrder.setBackupOrderRemark3(presInfoEntity.getPSN_NAME());
+// ioCollectOrder.setBackupOrderRemark4(presInfoEntity.getPSN_NO());
+ ioCollectOrder.setUpdateTime(new Date());
+ ioCollectOrder.setSplitStatus(0);
+ ioCollectOrder.setTagStatus(0);
+ List bizList = new ArrayList<>();
+ value.forEach(entity -> {
+ IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
+ List basicUdirelEntities = basicUdirelDao.selectList(new LambdaQueryWrapper().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
+ if (CollUtil.isNotEmpty(basicUdirelEntities)) {
+ BasicUdirelEntity basicUdirelEntity = basicUdirelEntities.get(0);
+ collectOrderBiz.setRelId(basicUdirelEntity.getId());
+ } else {
+ errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
+ }
+
+// List vYpzsPresInfos = vYpzsPresInfoMapper.selectList(new LambdaQueryWrapper().eq(VYpzsPresInfo::getPRESCRIBE_NUMBER, entity.getPRESCRIBE_NUMBER()).eq(VYpzsPresInfo::getPHYSIC_CODE, entity.getPHYSIC_CODE()));
+
+// if (CollUtil.isNotEmpty(vYpzsPresInfos)) {
+// VYpzsPresInfo vYpzsPresInfo = vYpzsPresInfos.get(0);
+//
+// }
+ collectOrderBiz.setGgxh(entity.getPACK_SPEC());
+ collectOrderBiz.setMeasureUnit(entity.getPHYSIC_UNIT());
+ collectOrderBiz.setCount(IntUtil.value(entity.getLAY_PHYSIC_QUANTITY()));
+ collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
+ collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
+ collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
+ collectOrderBiz.setYbbm(entity.getCOUNTRY_CODE());
+// collectOrderBiz.setRemark1(entity.get() + "");
+
+ collectOrderBiz.setTagStatus(1);
+ collectOrderBiz.setUnTagCount(0);
+ bizList.add(collectOrderBiz);
+ });
+ if (StrUtil.isNotBlank(errorMsg)) {
+ ioCollectOrder.setErrorMsg(errorMsg.toString());
+ ioCollectOrder.setTagStatus(4);
+ }
+ ioCollectOrder.setBizList(bizList);
+ ioCollectOrders.add(ioCollectOrder);
+ });
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(page.getTotal());
+ pageSimpleResponse.setList(ioCollectOrders);
+ return ResultVOUtils.success(pageSimpleResponse);
+ } else {
+ return ResultVOUtils.error(500, "下载失败!");
+ }
+ }
+
+ private BaseResponse covertReturnOrder(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest, IPage page) {
+ List presInfoEntities = page.getRecords();
+ List vInsurNationGoodsReturns = new ArrayList<>();
+ if (CollUtil.isNotEmpty(presInfoEntities)) {
+ List collect = presInfoEntities.stream().map(VYpzsPresInfoReturn::getAPPLY_NO).collect(Collectors.toList());
+ LambdaQueryWrapper wrapper1 = new LambdaQueryWrapper<>();
+ wrapper1.in(VYpzsPresInfoReturn::getAPPLY_NO, collect);
+ vInsurNationGoodsReturns = vYpzsPresInfoReturnMapper.selectList(wrapper1);
+ }
+ // TODO: 2024/9/19 这边在转换的时候就不能用vInsurNationGoodsReturns
+ if (CollUtil.isNotEmpty(vInsurNationGoodsReturns)) {
+ Map> groupedByPrescribeNumber = vInsurNationGoodsReturns.stream()
+ .collect(Collectors.groupingBy(VYpzsPresInfoReturn::getAPPLY_NO));
+ List ioCollectOrders = new ArrayList<>();
+ groupedByPrescribeNumber.forEach((key, value) -> {
+ VYpzsPresInfoReturn presInfoEntity = value.get(0);
+ StringBuilder errorMsg = new StringBuilder();
+ IoCollectOrder ioCollectOrder = new IoCollectOrder();
+ ioCollectOrder.setBillNo(presInfoEntity.getAPPLY_NO());
+ ioCollectOrder.setFromType("HIS系统");
+ ioCollectOrder.setFromCorp(presInfoEntity.getSICK_ID());
+ ioCollectOrder.setWorkPlaceCode(udiwmsBasicSkPrescribeRequest.getWorkPlaceCode());
+ ioCollectOrder.setFromCorpName(presInfoEntity.getSICK_NAME());
+// Date date = DateUtil.parseDate(presInfoEntity.get());
+ ioCollectOrder.setBillTime(presInfoEntity.getKEEP_BOOK_TIME());
+ ioCollectOrder.setCreateTime(new Date());
+ ioCollectOrder.setCreateUser(udiwmsBasicSkPrescribeRequest.getCreateUser());
+ ioCollectOrder.setUpdateTime(new Date());
+ ioCollectOrder.setSplitStatus(0);
+ ioCollectOrder.setTagStatus(0);
+ List bizList = new ArrayList<>();
+ value.forEach(entity -> {
+ IoCollectOrderBiz collectOrderBiz = new IoCollectOrderBiz();
+ BasicUdirelEntity basicUdirelEntity = basicUdirelDao.selectOne(new LambdaQueryWrapper().eq(BasicUdirelEntity::getMainId, entity.getPHYSIC_CODE()));
+ if (basicUdirelEntity != null) {
+ collectOrderBiz.setRelId(basicUdirelEntity.getId());
+ } else {
+ errorMsg.append(entity.getPHYSIC_NAME()).append("字典未对照").append(";");
+ }
+ List vYpzsPresInfoReturns = vYpzsPresInfoReturnMapper.selectList(new LambdaQueryWrapper().eq(VYpzsPresInfoReturn::getAPPLY_NO, entity.getAPPLY_NO()).eq(VYpzsPresInfoReturn::getPHYSIC_CODE, entity.getPHYSIC_CODE()));
+
+ if (CollUtil.isNotEmpty(vYpzsPresInfoReturns)) {
+ VYpzsPresInfoReturn vYpzsPresInfo = vYpzsPresInfoReturns.get(0);
+ collectOrderBiz.setGgxh(vYpzsPresInfo.getPHYSIC_SPEC());
+ collectOrderBiz.setMeasureUnit(vYpzsPresInfo.getPHYSIC_UNIT());
+ }
+ collectOrderBiz.setThrCode(entity.getPHYSIC_CODE());
+ collectOrderBiz.setCpmctymc(entity.getPHYSIC_NAME());
+// collectOrderBiz.setBatchNo(entity.getBATCH_NUMBER());
+ collectOrderBiz.setOrderIdFk(ioCollectOrder.getBillNo());
+ collectOrderBiz.setYbbm(entity.getFEE_SEQUENCE_NO());
+ collectOrderBiz.setCount(entity.getQUANTITY());
+ collectOrderBiz.setTagStatus(1);
+ collectOrderBiz.setUnTagCount(0);
+ bizList.add(collectOrderBiz);
+ });
+ if (StrUtil.isNotBlank(errorMsg)) {
+ ioCollectOrder.setErrorMsg(errorMsg.toString());
+ ioCollectOrder.setTagStatus(4);
+ }
+ ioCollectOrder.setBizList(bizList);
+ ioCollectOrders.add(ioCollectOrder);
+ });
+ PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>();
+ pageSimpleResponse.setTotal(page.getTotal());
+ pageSimpleResponse.setList(ioCollectOrders);
+ return ResultVOUtils.success(pageSimpleResponse);
+ } else {
+ return ResultVOUtils.error(500, "下载失败!");
+ }
+ }
+
+
+ public BaseResponse optionUploadCollectOrder3505(IoCollectOrder ioCollectOrder) {
+ //摆药流水号
+// String stoout_no = ioCollectOrder.getBackupOrderRemark1();
+ String stoout_no = StringUtils.isBlank(ioCollectOrder.getBackupOrderRemark1()) ? ioCollectOrder.getBackupOrderRemark2() : ioCollectOrder.getBackupOrderRemark1();
+ List vInsurNationGoodsPhysics = goodsPhysicMapper.selectList(new LambdaQueryWrapper().eq(VInsurNationGoodsPhysic::getSTOOUT_NO, stoout_no));
+ if (CollUtil.isNotEmpty(vInsurNationGoodsPhysics)) {
+ List collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
+ List xsck3505Requests = 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 drugTraceList = new ArrayList<>();
+ // 遍历fruits数组
+ for (String code : codes) {
+ if (StrUtil.isNotBlank(code)) {
+ List 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);
+ }
+
+ }
+
+ }
+
+ }
+ Xsck3505Request xsck3505Request = Xsck3505Request.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();
+ xsck3505Requests.add(xsck3505Request);
+ }
+ }
+ }
+ BaseXsck3505Request baseXsck3505Request = new BaseXsck3505Request();
+ baseXsck3505Request.setSelinfoDetail(xsck3505Requests);
+ String jsonStr = JSONUtil.toJsonStr(baseXsck3505Request);
+ JSONObject dataJson = JSONObject.parseObject(jsonStr);
+
+
+ return ybClient.ybPostScyh("3505A", dataJson);
+
+ } else {
+ return ResultVOUtils.error(500, "医保视图数据查不到,请核实");
+ }
+
+ }
+
+
+ public void optionUploadCollectOrder3501(IoCollectOrder ioCollectOrder) {
+ List bizList = ioCollectOrder.getBizList();
+ if (CollUtil.isNotEmpty(bizList)) {
+ List collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
+ List pcsc3501Requests = new ArrayList<>();
+ 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 drugTraceList = new ArrayList<>();
+ // 遍历fruits数组
+ for (String code : codes) {
+ if (StrUtil.isNotBlank(code)) {
+ List relCodeDetailList = relCodeDetailService.getAllNext(code);
+ if (relCodeDetailList != null && relCodeDetailList.size() > 0) {
+ DrugInfoRequest request = new DrugInfoRequest();
+ request.setDrug_trac_codg(code);
+ drugTraceList.add(request);
+ }
+ }
+ }
+ // TODO: 2024/9/10 字段未完全正确对应
+ Pcsc3501Request pcsc3501Request = Pcsc3501Request.builder()
+ .med_list_codg(item.getYbbm())
+ .fixmedins_hilist_id(item.getThrCode())
+ .fixmedins_hilist_name(item.getCpmctymc())
+ .fixmedins_bchno(item.getRemark5())
+ .rx_flag(item.getRemark6())
+ .invdate(item.getUpdateTime())
+ .inv_cnt(item.getActCount())
+ .manu_lotnum(item.getBatchNo())
+ .manu_date(item.getProductDate())
+ .expy_end(item.getExpireDate())
+ .memo(item.getRemark())
+ .drugtracinfo(drugTraceList).build();
+ pcsc3501Requests.add(pcsc3501Request);
+ }
+ }
+ }
+ BasePcsc3501Request basePcsc3501Request = new BasePcsc3501Request();
+ basePcsc3501Request.setSelinfoDetail(pcsc3501Requests);
+ String jsonStr = JSONUtil.toJsonStr(basePcsc3501Request);
+ JSONObject dataJson = JSONObject.parseObject(jsonStr);
+ ybClient.ybPostScyh("3501A", dataJson);
+ }
+ }
+
+
+ public void optionUploadCollectOrder3502(IoCollectOrder ioCollectOrder) {
+ List bizList = ioCollectOrder.getBizList();
+ if (CollUtil.isNotEmpty(bizList)) {
+ List collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
+ List kcbg3502Requests = new ArrayList<>();
+ 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 drugTraceList = new ArrayList<>();
+ // 遍历fruits数组
+ for (String code : codes) {
+ if (StrUtil.isNotBlank(code)) {
+ List relCodeDetailList = relCodeDetailService.getAllNext(code);
+ if (relCodeDetailList != null && relCodeDetailList.size() > 0) {
+ DrugInfoRequest request = new DrugInfoRequest();
+ request.setDrug_trac_codg(code);
+ drugTraceList.add(request);
+ }
+ }
+ }
+ // TODO: 2024/9/10 字段未完全正确对应
+ Kcbg3502Request kcbg3502Request = Kcbg3502Request.builder()
+ .med_list_codg(item.getYbbm())
+ .inv_chg_type(item.getRemark7())
+ .fixmedins_hilist_id(item.getThrCode())
+ .fixmedins_hilist_name(item.getCpmctymc())
+ .fixmedins_bchno(item.getRemark5())
+ .pric(item.getRemark1())
+ .cnt(item.getActCount())
+ .rx_flag(item.getRemark6())
+ .inv_chg_time(item.getUpdateTime())
+ .inv_chg_opter_name(ioCollectOrder.getCreateUser())
+ .memo(item.getRemark())
+ .trdn_flag("0")
+ .drugtracinfo(drugTraceList).build();
+ kcbg3502Requests.add(kcbg3502Request);
+ }
+ }
+ }
+ BaseKcbg3502Request baseKcbg3502Request = new BaseKcbg3502Request();
+ baseKcbg3502Request.setSelinfoDetail(kcbg3502Requests);
+ String jsonStr = JSONUtil.toJsonStr(baseKcbg3502Request);
+ JSONObject dataJson = JSONObject.parseObject(jsonStr);
+ ybClient.ybPostScyh("3502A", dataJson);
+ }
+ }
+
+ public void optionUploadCollectOrder3506(IoCollectOrder ioCollectOrder) {
+// List bizList = ioCollectOrder.getBizList();
+ List collectOrderBizResponseList = ioCollectOrder.getCollectOrderBizResponseList();
+ List xsth3506Requests = new ArrayList<>();
+ List vInsurNationGoodsReturns = vInsurNationGoodsReturnMapper.selectList(new LambdaQueryWrapper().eq(VInsurNationGoodsReturn::getAPPLY_NO, ioCollectOrder.getBillNo()));
+ if (CollUtil.isEmpty(vInsurNationGoodsReturns)) {
+ log.error("申请单号{}不存在", ioCollectOrder.getBillNo());
+ return;
+ }
+
+ 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 drugTraceList = new ArrayList<>();
+ // 遍历fruits数组
+ for (String code : codes) {
+ if (StrUtil.isNotBlank(code)) {
+ List relCodeDetailList = relCodeDetailService.getAllNext(code);
+ if (relCodeDetailList != null && relCodeDetailList.size() > 0) {
+ 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.getMDTRT_SN())
+ .drugtracinfo(drugTraceList).build();
+
+ xsth3506Requests.add(xsth3506Request);
+ }
+ }
+ }
+
+
+ BaseXsth3506Request baseXsth3506Request = new BaseXsth3506Request();
+ baseXsth3506Request.setSelinfoDetail(xsth3506Requests);
+ String jsonStr = JSONUtil.toJsonStr(baseXsth3506Request);
+ JSONObject dataJson = JSONObject.parseObject(jsonStr);
+ ybClient.ybPostScyh("3506A", dataJson);
+ }
+
+ @Override
+ public BaseResponse getBuyType() {
+ Map buyTypeMap= new HashMap<>();
+ buyTypeMap.put("buyType_3501",buyType_3501);
+ buyTypeMap.put("buyType_3502",buyType_3502);
+ buyTypeMap.put("buyType_3505",buyType_3505);
+ buyTypeMap.put("buyType_3506",buyType_3506);
+ return ResultVOUtils.success(buyTypeMap);
+ }
+}
diff --git a/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvCodeResultEntity.java b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvCodeResultEntity.java
new file mode 100644
index 0000000..ab787d6
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvCodeResultEntity.java
@@ -0,0 +1,41 @@
+package com.glxp.mipsdl.client.hlhyxyy.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 高值耗材出入库明细
+ */
+@NoArgsConstructor
+@Data
+public class InvCodeResultEntity {
+
+
+ @JsonProperty("recordNo")
+ private Integer recordNo;
+ @JsonProperty("visitNo")
+ private String visitNo;
+ @JsonProperty("sickName")
+ private String sickName;
+ @JsonProperty("inDept")
+ private String inDept;
+ @JsonProperty("deptName")
+ private String deptName;
+ @JsonProperty("materialCode")
+ private String materialCode;
+ @JsonProperty("materialName")
+ private String materialName;
+ @JsonProperty("materialPrc")
+ private Integer materialPrc;
+ @JsonProperty("dictBarcode")
+ private String dictBarcode;
+ @JsonProperty("Barcode")
+ private String barcode;
+ @JsonProperty("feeTime")
+ private String feeTime;
+ @JsonProperty("feeOper")
+ private String feeOper;
+}
+
+
diff --git a/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvProjectResultEntity.java b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvProjectResultEntity.java
new file mode 100644
index 0000000..6a57f3d
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvProjectResultEntity.java
@@ -0,0 +1,41 @@
+package com.glxp.mipsdl.client.hlhyxyy.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 收费项目出入库明细
+ */
+@NoArgsConstructor
+@Data
+public class InvProjectResultEntity {
+
+
+ @JsonProperty("seqNo")
+ private String seqNo;
+ @JsonProperty("visitNo")
+ private String visitNo;
+ @JsonProperty("sickName")
+ private String sickName;
+ @JsonProperty("applyDept")
+ private String applyDept;
+ @JsonProperty("deptName")
+ private String deptName;
+ @JsonProperty("itemCode")
+ private String itemCode;
+ @JsonProperty("itemName")
+ private String itemName;
+ @JsonProperty("Price")
+ private Double price;
+ @JsonProperty("quantity")
+ private Integer quantity;
+ @JsonProperty("Cost")
+ private Double cost;
+ @JsonProperty("materialCode")
+ private String materialCode;
+ @JsonProperty("materialName")
+ private String materialName;
+ @JsonProperty("OperTime")
+ private String operTime;
+}
diff --git a/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvResultEntity.java b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvResultEntity.java
new file mode 100644
index 0000000..d680664
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/client/hlhyxyy/entity/InvResultEntity.java
@@ -0,0 +1,60 @@
+package com.glxp.mipsdl.client.hlhyxyy.entity;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 库存出入库明细
+ */
+@NoArgsConstructor
+@Data
+public class InvResultEntity {
+
+ @JsonProperty("applyNo")
+ private String applyNo;
+ @JsonProperty("ioFlag")
+ private String ioFlag;
+ @JsonProperty("ioType")
+ private String ioType;
+ @JsonProperty("ioTypeName")
+ private String ioTypeName;
+ @JsonProperty("Debit")
+ private String debit;
+ @JsonProperty("DebitName")
+ private String debitName;
+ @JsonProperty("Credit")
+ private String credit;
+ @JsonProperty("CreditName")
+ private String creditName;
+ @JsonProperty("AccoutDate")
+ private String accoutDate;
+ @JsonProperty("Accoutant")
+ private String accoutant;
+ @JsonProperty("receiveOper")
+ private String receiveOper;
+ @JsonProperty("materialCode")
+ private String materialCode;
+ @JsonProperty("materialName")
+ private String materialName;
+ @JsonProperty("materialSpec")
+ private String materialSpec;
+ @JsonProperty("materialUnit")
+ private String materialUnit;
+ @JsonProperty("batchNo")
+ private String batchNo;
+ @JsonProperty("invoiceNo")
+ private String invoiceNo;
+ @JsonProperty("invoiceDate")
+ private String invoiceDate;
+ @JsonProperty("quantity")
+ private Integer quantity;
+ @JsonProperty("importPrc")
+ private Double importPrc;
+ @JsonProperty("importMoney")
+ private Integer importMoney;
+ @JsonProperty("factoryCode")
+ private String factoryCode;
+ @JsonProperty("factoryName")
+ private String factoryName;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA001.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA001.java
new file mode 100644
index 0000000..87c3ad4
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA001.java
@@ -0,0 +1,45 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 单位往来信息查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a001")
+public class VA001 implements Serializable {
+ @TableField(value = "UNITID")
+ private String unitid;
+
+ @TableField(value = "`NAME`")
+ private String name;
+
+ @TableField(value = "LASTUPDATETIME")
+ private String lastupdatetime;
+
+ @TableField(value = "ADDR")
+ private String addr;
+
+ @TableField(value = "CREDITNO")
+ private String creditno;
+
+ @TableField(value = "SPELL")
+ private String spell;
+
+ @TableField(value = "CONTACT")
+ private String contact;
+
+ @TableField(value = "MOBILE")
+ private String mobile;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA002.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA002.java
new file mode 100644
index 0000000..bb45aa7
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA002.java
@@ -0,0 +1,114 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 医疗器械产品信息查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a002")
+public class VA002 implements Serializable {
+ @TableField(value = "LASTUPDATETIME")
+ private String lastupdatetime;
+
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "`NAME`")
+ private String name;
+
+ @TableField(value = "MEASNAME")
+ private String measname;
+
+ @TableField(value = "`STANDARD`")
+ private String standard;
+
+ @TableField(value = "REGISTERNO")
+ private String registerno;
+
+ @TableField(value = "MANUFACTORYCODE")
+ private String manufactorycode;
+
+ @TableField(value = "MANUFACTORY")
+ private String manufactory;
+
+ @TableField(value = "SUPCODE")
+ private String SUPCODE;
+
+ @TableField(value = "SUPNAME")
+ private String SUPNAME;
+
+ @TableField(value = "CPLB")
+ private String CPLB;
+
+ @TableField(value = "FLBM")
+ private String FLBM;
+
+ @TableField(value = "QXLB")
+ private String QXLB;
+
+ @TableField(value = "YBBM")
+ private String YBBM;
+
+ @TableField(value = "SPTM")
+ private String SPTM;
+
+ @TableField(value = "TYSHXYDM")
+ private String TYSHXYDM;
+
+ @TableField(value = "YLQXZCRBARMC")
+ private String YLQXZCRBARMC;
+
+ @TableField(value = "YLQXZCRBARYWMC")
+ private String YLQXZCRBARYWMC;
+
+ @TableField(value = "CPMS")
+ private String CPMS;
+
+ @TableField(value = "SPMC")
+ private String SPMC;
+
+ @TableField(value = "QTBM")
+ private String QTBM;
+
+ @TableField(value = "ZCZYXQZ")
+ private String ZCZYXQZ;
+
+ @TableField(value = "PRICE")
+ private String PRICE;
+
+ @TableField(value = "RETAILPRICE")
+ private String RETAILPRICE;
+
+ @TableField(value = "INVCODE")
+ private String INVCODE;
+
+ @TableField(value = "REMARK")
+ private String REMARK;
+
+ @TableField(value = "REMARK1")
+ private String REMARK1;
+
+ @TableField(value = "REMARK2")
+ private String REMARK2;
+
+ @TableField(value = "REMARK3")
+ private String REMARK3;
+
+ @TableField(value = "REMARK4")
+ private String REMARK4;
+
+ @TableField(value = "REMARK5")
+ private String REMARK5;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA003.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA003.java
new file mode 100644
index 0000000..2290796
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA003.java
@@ -0,0 +1,111 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 药品产品信息查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a003")
+public class VA003 implements Serializable {
+ @TableField(value = "LASTUPDATETIME")
+ private String lastupdatetime;
+
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "`NAME`")
+ private String name;
+
+ @TableField(value = "NAMECODE")
+ private String namecode;
+
+ @TableField(value = "MEASNAME")
+ private String measname;
+
+ @TableField(value = "BZGG")
+ private String bzgg;
+
+ @TableField(value = "PACKUNIT")
+ private String packunit;
+
+ @TableField(value = "PREPNSPEC")
+ private String prepnspec;
+
+ @TableField(value = "PREPNUNIT")
+ private String prepnunit;
+
+ @TableField(value = "ZXBZSL")
+ private String zxbzsl;
+
+ @TableField(value = "REGISTERNO")
+ private String registerno;
+
+ @TableField(value = "MANUFACTORYCODE")
+ private String manufactorycode;
+
+ @TableField(value = "MANUFACTORY")
+ private String manufactory;
+
+ @TableField(value = "SUPCODE")
+ private String supcode;
+
+ @TableField(value = "SUPNAME")
+ private String supname;
+
+ @TableField(value = "CPLB")
+ private String cplb;
+
+ @TableField(value = "FLBM")
+ private String flbm;
+
+ @TableField(value = "YBBM")
+ private String ybbm;
+
+ @TableField(value = "SPTM")
+ private String sptm;
+
+ @TableField(value = "TYSHXYDM")
+ private String tyshxydm;
+
+ @TableField(value = "CPMS")
+ private String cpms;
+
+ @TableField(value = "SPMC")
+ private String spmc;
+
+ @TableField(value = "ZCZYXQZ")
+ private String zczyxqz;
+
+ @TableField(value = "PRICE")
+ private String price;
+
+ @TableField(value = "RETAILPRICE")
+ private String retailprice;
+
+ @TableField(value = "INVCODE")
+ private String invcode;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ @TableField(value = "REMARK1")
+ private String remark1;
+
+ @TableField(value = "REMARK2")
+ private String remark2;
+
+ @TableField(value = "REMARK3")
+ private String remark3;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA004.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA004.java
new file mode 100644
index 0000000..d7dd476
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA004.java
@@ -0,0 +1,30 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 仓库(科室)信息查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a004")
+public class VA004 implements Serializable {
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "`NAME`")
+ private String name;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA005.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA005.java
new file mode 100644
index 0000000..ef0681e
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA005.java
@@ -0,0 +1,33 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 单据类型信息查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a005")
+public class VA005 implements Serializable {
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "`NAME`")
+ private String name;
+
+ @TableField(value = "INOUTTYPE")
+ private String inouttype;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA006.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA006.java
new file mode 100644
index 0000000..5b60ec4
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA006.java
@@ -0,0 +1,51 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 耗材处方查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a006")
+public class VA006 implements Serializable {
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "SICKCODE")
+ private String sickcode;
+
+ @TableField(value = "SICKNAME")
+ private String sickname;
+
+ @TableField(value = "PRESCRIBEDATE")
+ private String prescribedate;
+
+ @TableField(value = "CREATEDR")
+ private String createdr;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "DEPTCODE")
+ private String deptcode;
+
+ @TableField(value = "DEPTNAME")
+ private String deptname;
+
+ @TableField(value = "DIAGNOSIS")
+ private String diagnosis;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA006Mx.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA006Mx.java
new file mode 100644
index 0000000..4343a22
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA006Mx.java
@@ -0,0 +1,63 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 耗材处方查询-明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a006_mx")
+public class VA006Mx implements Serializable {
+ @TableField(value = "CODEFK")
+ private String codefk;
+
+ @TableField(value = "THRID")
+ private String thrid;
+
+ @TableField(value = "ITEMNAME")
+ private String itemname;
+
+ @TableField(value = "ITEMCODE")
+ private String itemcode;
+
+ @TableField(value = "MEASURECOUNT")
+ private String measurecount;
+
+ @TableField(value = "MEASUREUNIT")
+ private String measureunit;
+
+ @TableField(value = "CATEGORY")
+ private String category;
+
+ @TableField(value = "FREQUENCY")
+ private String frequency;
+
+ @TableField(value = "GGXH")
+ private String ggxh;
+
+ @TableField(value = "`COUNT`")
+ private String count;
+
+ @TableField(value = "PRICE")
+ private String price;
+
+ @TableField(value = "RETAILPRICE")
+ private String retailprice;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA010.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA010.java
new file mode 100644
index 0000000..8572c43
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA010.java
@@ -0,0 +1,51 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 药品处方查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a010")
+public class VA010 implements Serializable {
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "SICKCODE")
+ private String sickcode;
+
+ @TableField(value = "SICKNAME")
+ private String sickname;
+
+ @TableField(value = "PRESCRIBEDATE")
+ private String prescribedate;
+
+ @TableField(value = "CREATEDR")
+ private String createdr;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "DEPTCODE")
+ private String deptcode;
+
+ @TableField(value = "DEPTNAME")
+ private String deptname;
+
+ @TableField(value = "DIAGNOSIS")
+ private String diagnosis;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA011.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA011.java
new file mode 100644
index 0000000..141fafa
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA011.java
@@ -0,0 +1,60 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 药品处方退费查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a011")
+public class VA011 implements Serializable {
+ @TableField(value = "CODEFK")
+ private String codefk;
+
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "SICKCODE")
+ private String sickcode;
+
+ @TableField(value = "SICKNAME")
+ private String sickname;
+
+ @TableField(value = "PRESCRIBEDATE")
+ private String prescribedate;
+
+ @TableField(value = "CREATEDR")
+ private String createdr;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "DEPTCODE")
+ private String deptcode;
+
+ @TableField(value = "DEPTNAME")
+ private String deptname;
+
+ @TableField(value = "INVCODE")
+ private String invcode;
+
+ @TableField(value = "SETTLENO")
+ private String settleno;
+
+ @TableField(value = "DIAGNOSIS")
+ private String diagnosis;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA011Mx.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA011Mx.java
new file mode 100644
index 0000000..056ec23
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA011Mx.java
@@ -0,0 +1,78 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 药品处方退费查询-明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a011_mx")
+public class VA011Mx implements Serializable {
+ @TableField(value = "CODEFK")
+ private String codefk;
+
+ @TableField(value = "THRID")
+ private String thrid;
+
+ @TableField(value = "ITEMNAME")
+ private String itemname;
+
+ @TableField(value = "ITEMCODE")
+ private String itemcode;
+
+ @TableField(value = "MEASURECOUNT")
+ private String measurecount;
+
+ @TableField(value = "MEASUREUNIT")
+ private String measureunit;
+
+ @TableField(value = "CATEGORY")
+ private String category;
+
+ @TableField(value = "FREQUENCY")
+ private String frequency;
+
+ @TableField(value = "`COUNT`")
+ private String count;
+
+ @TableField(value = "BZGG")
+ private String bzgg;
+
+ @TableField(value = "PACKUNIT")
+ private String packunit;
+
+ @TableField(value = "PREPNSPEC")
+ private String prepnspec;
+
+ @TableField(value = "PREPNUNIT")
+ private String prepnunit;
+
+ @TableField(value = "MEASNAME")
+ private String measname;
+
+ @TableField(value = "PRICE")
+ private String price;
+
+ @TableField(value = "RETAILPRICE")
+ private String retailprice;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ @TableField(value = "DRUGLIST")
+ private String druglist;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA015.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA015.java
new file mode 100644
index 0000000..d175037
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA015.java
@@ -0,0 +1,51 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 耗材处方退费查询
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a015")
+public class VA015 implements Serializable {
+ @TableField(value = "CODE")
+ private String code;
+
+ @TableField(value = "SICKCODE")
+ private String sickcode;
+
+ @TableField(value = "SICKNAME")
+ private String sickname;
+
+ @TableField(value = "PRESCRIBEDATE")
+ private String prescribedate;
+
+ @TableField(value = "CREATEDR")
+ private String createdr;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "DEPTCODE")
+ private String deptcode;
+
+ @TableField(value = "DEPTNAME")
+ private String deptname;
+
+ @TableField(value = "DIAGNOSIS")
+ private String diagnosis;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA015Mx.java b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA015Mx.java
new file mode 100644
index 0000000..1409ac2
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/entity/hlhyxyy/VA015Mx.java
@@ -0,0 +1,63 @@
+package com.glxp.mipsdl.entity.hlhyxyy;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 耗材处方退费查询-明细
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName(value = "v_a015_mx")
+public class VA015Mx implements Serializable {
+ @TableField(value = "CODEFK")
+ private String codefk;
+
+ @TableField(value = "THRID")
+ private String thrid;
+
+ @TableField(value = "ITEMNAME")
+ private String itemname;
+
+ @TableField(value = "ITEMCODE")
+ private String itemcode;
+
+ @TableField(value = "MEASURECOUNT")
+ private String measurecount;
+
+ @TableField(value = "MEASUREUNIT")
+ private String measureunit;
+
+ @TableField(value = "CATEGORY")
+ private String category;
+
+ @TableField(value = "FREQUENCY")
+ private String frequency;
+
+ @TableField(value = "GGXH")
+ private String ggxh;
+
+ @TableField(value = "`COUNT`")
+ private String count;
+
+ @TableField(value = "PRICE")
+ private String price;
+
+ @TableField(value = "RETAILPRICE")
+ private String retailprice;
+
+ @TableField(value = "AMOUNT")
+ private String amount;
+
+ @TableField(value = "REMARK")
+ private String remark;
+
+ private static final long serialVersionUID = 1L;
+}
diff --git a/src/main/java/com/glxp/mipsdl/req/base/UdiwmsUnitRequest.java b/src/main/java/com/glxp/mipsdl/req/base/UdiwmsUnitRequest.java
index 0c1c0d8..1cb7e05 100644
--- a/src/main/java/com/glxp/mipsdl/req/base/UdiwmsUnitRequest.java
+++ b/src/main/java/com/glxp/mipsdl/req/base/UdiwmsUnitRequest.java
@@ -33,5 +33,6 @@ public class UdiwmsUnitRequest extends ListPageRequest {
*/
private String unitType;
+ private String databaseProductName;
}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA001Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA001Service.java
new file mode 100644
index 0000000..c1a07cf
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA001Service.java
@@ -0,0 +1,23 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.github.pagehelper.PageHelper;
+import com.glxp.mipsdl.req.base.UdiwmsUnitRequest;
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA001Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.Collections;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA001;
+@Service
+public class VA001Service extends ServiceImpl {
+ public List filterList(UdiwmsUnitRequest udiwmsUnitRequest) {
+ if (null == udiwmsUnitRequest) {
+ return Collections.emptyList();
+ }
+ if (null != udiwmsUnitRequest.getPage() && null != udiwmsUnitRequest.getLimit()) {
+ PageHelper.offsetPage((udiwmsUnitRequest.getPage() - 1) * udiwmsUnitRequest.getLimit(), udiwmsUnitRequest.getLimit());
+ }
+ return this.baseMapper.filterList(udiwmsUnitRequest);
+ }
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA002Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA002Service.java
new file mode 100644
index 0000000..cb7404a
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA002Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA002Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA002;
+@Service
+public class VA002Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA003Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA003Service.java
new file mode 100644
index 0000000..e141f1e
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA003Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA003Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA003;
+@Service
+public class VA003Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA004Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA004Service.java
new file mode 100644
index 0000000..4ae3849
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA004Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA004Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA004;
+@Service
+public class VA004Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA005Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA005Service.java
new file mode 100644
index 0000000..cd429dd
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA005Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA005Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA005;
+@Service
+public class VA005Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA006MxService.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA006MxService.java
new file mode 100644
index 0000000..dcbc5c6
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA006MxService.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA006MxMapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA006Mx;
+@Service
+public class VA006MxService extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA006Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA006Service.java
new file mode 100644
index 0000000..d2b5b6d
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA006Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA006Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA006;
+@Service
+public class VA006Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA010Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA010Service.java
new file mode 100644
index 0000000..7650ddb
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA010Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA010Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA010;
+@Service
+public class VA010Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA011MxService.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA011MxService.java
new file mode 100644
index 0000000..aaa81bd
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA011MxService.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA011MxMapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA011Mx;
+@Service
+public class VA011MxService extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA011Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA011Service.java
new file mode 100644
index 0000000..30acd17
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA011Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA011Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA011;
+@Service
+public class VA011Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA015MxService.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA015MxService.java
new file mode 100644
index 0000000..2424e8c
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA015MxService.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA015MxMapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA015Mx;
+@Service
+public class VA015MxService extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA015Service.java b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA015Service.java
new file mode 100644
index 0000000..1a6a7e8
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/service/hlhyxyy/VA015Service.java
@@ -0,0 +1,12 @@
+package com.glxp.mipsdl.service.hlhyxyy;
+
+import com.glxp.mipsdl.thirddao.hlhyxyy.VA015Mapper;
+import org.springframework.stereotype.Service;
+import javax.annotation.Resource;
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.glxp.mipsdl.entity.hlhyxyy.VA015;
+@Service
+public class VA015Service extends ServiceImpl {
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA001Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA001Mapper.java
new file mode 100644
index 0000000..6451769
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA001Mapper.java
@@ -0,0 +1,14 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA001;
+import com.glxp.mipsdl.req.base.UdiwmsUnitRequest;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+@Mapper
+public interface VA001Mapper extends BaseMapper {
+ List filterList(UdiwmsUnitRequest udiwmsUnitRequest);
+
+}
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA002Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA002Mapper.java
new file mode 100644
index 0000000..33ef6a0
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA002Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA002;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA002Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA003Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA003Mapper.java
new file mode 100644
index 0000000..49aab61
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA003Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA003;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA003Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA004Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA004Mapper.java
new file mode 100644
index 0000000..1de42cf
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA004Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA004;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA004Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA005Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA005Mapper.java
new file mode 100644
index 0000000..e2694d8
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA005Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA005;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA005Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA006Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA006Mapper.java
new file mode 100644
index 0000000..d465be9
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA006Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA006;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA006Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA006MxMapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA006MxMapper.java
new file mode 100644
index 0000000..17a3088
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA006MxMapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA006Mx;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA006MxMapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA010Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA010Mapper.java
new file mode 100644
index 0000000..022d4c6
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA010Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA010;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA010Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA011Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA011Mapper.java
new file mode 100644
index 0000000..7b178a8
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA011Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA011;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA011Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA011MxMapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA011MxMapper.java
new file mode 100644
index 0000000..258faec
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA011MxMapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA011Mx;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA011MxMapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA015Mapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA015Mapper.java
new file mode 100644
index 0000000..5760680
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA015Mapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA015;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA015Mapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA015MxMapper.java b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA015MxMapper.java
new file mode 100644
index 0000000..a2c9ebb
--- /dev/null
+++ b/src/main/java/com/glxp/mipsdl/thirddao/hlhyxyy/VA015MxMapper.java
@@ -0,0 +1,9 @@
+package com.glxp.mipsdl.thirddao.hlhyxyy;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.glxp.mipsdl.entity.hlhyxyy.VA015Mx;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface VA015MxMapper extends BaseMapper {
+}
\ No newline at end of file
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 81a1b7c..9de8256 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -5,39 +5,16 @@ spring:
strict: false
datasource:
master:
- url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
+ url: jdbc:p6spy:mysql://127.0.0.1:3306/udiwma81?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
- njsql:
+ hlhyxyySql:
# jdbc-url: jdbc:oracle:thin:@192.168.10.8:1521/njxyy
# username: SD_UDIJK
# password: SD_UDIJK
# driver-class-name: oracle.jdbc.driver.OracleDrive
- url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_ywj?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- driver-class-name: com.p6spy.engine.spy.P6SpyDriver
- # thirdSql:
- # url: jdbc:p6spy:mysql://dm.xmglxp.com:33066/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
- # username: root
- # password: 123456
- # driver-class-name: com.p6spy.engine.spy.P6SpyDriver
- ptxhSql:
- # jdbc-url: jdbc:oracle:thin:@192.168.10.8:1521/njxyy
- # username: SD_UDIJK
- # password: SD_UDIJK
- # driver-class-name: oracle.jdbc.driver.OracleDrive
- url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_ywj?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
- username: root
- password: 123456
- driver-class-name: com.p6spy.engine.spy.P6SpyDriver
- ctqyySql:
- # jdbc-url: jdbc:oracle:thin:@192.168.10.8:1521/njxyy
- # username: I_YPZS
- # password: zy02v4ys
- # driver-class-name: oracle.jdbc.driver.OracleDrive
- url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
+ url: jdbc:p6spy:mysql://127.0.0.1:3306/udiwma81?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: 123456
driver-class-name: com.p6spy.engine.spy.P6SpyDriver
diff --git a/src/main/resources/application-pro.yml b/src/main/resources/application-pro.yml
index 9843b51..5c928ee 100644
--- a/src/main/resources/application-pro.yml
+++ b/src/main/resources/application-pro.yml
@@ -9,21 +9,11 @@ spring:
username: root
password: Glxp@6066
driver-class-name: com.mysql.cj.jdbc.Driver
- njsql:
- url: jdbc:mysql://127.0.0.1:3306/udi_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
- username: root
- password: Glxp@6066
- driver-class-name: com.mysql.cj.jdbc.Driver
- ptxhSql:
- url: jdbc:mysql://127.0.0.1:3306/udi_wms?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
- username: root
- password: Glxp@6066
- driver-class-name: com.mysql.cj.jdbc.Driver
- ctqyySql:
+ hlhyxyySql:
driver-class-name: oracle.jdbc.driver.OracleDriver
- url: jdbc:oracle:thin:@192.168.0.3:1521/yxfybjy
- username: I_YPZS
- password: zy02v4ys
+ url: jdbc:oracle:thin:@192.168.158.251:1521/hlfy
+ username: PZH
+ password: zy02v4ph
hikari:
connection-timeout: 60000
maximum-pool-size: 60
diff --git a/src/main/resources/hosp_dict.json b/src/main/resources/hosp_dict.json
index 7cbc9b0..8f68ea2 100644
--- a/src/main/resources/hosp_dict.json
+++ b/src/main/resources/hosp_dict.json
@@ -58,5 +58,9 @@
{
"code": "100014",
"name": "四川平武县医院"
+ },
+ {
+ "code": "100015",
+ "name": "湖里妇幼医院"
}
]
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA001Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA001Mapper.xml
new file mode 100644
index 0000000..816e67d
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA001Mapper.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UNITID, `NAME`, LASTUPDATETIME, ADDR, CREDITNO, SPELL, CONTACT, MOBILE
+
+
+
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA002Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA002Mapper.xml
new file mode 100644
index 0000000..37e70bd
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA002Mapper.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LASTUPDATETIME, CODE, `NAME`, MEASNAME, `STANDARD`, REGISTERNO, MANUFACTORYCODE,
+ MANUFACTORY, SUPCODE, SUPNAME, CPLB, FLBM, QXLB, YBBM, SPTM, TYSHXYDM, YLQXZCRBARMC,
+ YLQXZCRBARYWMC, CPMS, SPMC, QTBM, ZCZYXQZ, PRICE, RETAILPRICE, INVCODE, REMARK, REMARK1,
+ REMARK2, REMARK3, REMARK4, REMARK5
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA003Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA003Mapper.xml
new file mode 100644
index 0000000..ddaeea2
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA003Mapper.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LASTUPDATETIME, CODE, `NAME`, NAMECODE, MEASNAME, BZGG, PACKUNIT, PREPNSPEC, PREPNUNIT,
+ ZXBZSL, REGISTERNO, MANUFACTORYCODE, MANUFACTORY, SUPCODE, SUPNAME, CPLB, FLBM, YBBM,
+ SPTM, TYSHXYDM, CPMS, SPMC, ZCZYXQZ, PRICE, RETAILPRICE, INVCODE, REMARK, REMARK1,
+ REMARK2, REMARK3
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA004Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA004Mapper.xml
new file mode 100644
index 0000000..364ac99
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA004Mapper.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ CODE, `NAME`, REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA005Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA005Mapper.xml
new file mode 100644
index 0000000..7a200ea
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA005Mapper.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODE, `NAME`, INOUTTYPE, REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA006Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA006Mapper.xml
new file mode 100644
index 0000000..3761018
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA006Mapper.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODE, SICKCODE, SICKNAME, PRESCRIBEDATE, CREATEDR, AMOUNT, DEPTCODE, DEPTNAME, DIAGNOSIS,
+ REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA006MxMapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA006MxMapper.xml
new file mode 100644
index 0000000..6062375
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA006MxMapper.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODEFK, THRID, ITEMNAME, ITEMCODE, MEASURECOUNT, MEASUREUNIT, CATEGORY, FREQUENCY,
+ GGXH, `COUNT`, PRICE, RETAILPRICE, AMOUNT, REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA010Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA010Mapper.xml
new file mode 100644
index 0000000..7f966bd
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA010Mapper.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODE, SICKCODE, SICKNAME, PRESCRIBEDATE, CREATEDR, AMOUNT, DEPTCODE, DEPTNAME, DIAGNOSIS,
+ REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA011Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA011Mapper.xml
new file mode 100644
index 0000000..c42b21d
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA011Mapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODEFK, CODE, SICKCODE, SICKNAME, PRESCRIBEDATE, CREATEDR, AMOUNT, DEPTCODE, DEPTNAME,
+ INVCODE, SETTLENO, DIAGNOSIS, REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA011MxMapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA011MxMapper.xml
new file mode 100644
index 0000000..73689c9
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA011MxMapper.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODEFK, THRID, ITEMNAME, ITEMCODE, MEASURECOUNT, MEASUREUNIT, CATEGORY, FREQUENCY,
+ `COUNT`, BZGG, PACKUNIT, PREPNSPEC, PREPNUNIT, MEASNAME, PRICE, RETAILPRICE, AMOUNT,
+ REMARK, DRUGLIST
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA015Mapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA015Mapper.xml
new file mode 100644
index 0000000..db8b303
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA015Mapper.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODE, SICKCODE, SICKNAME, PRESCRIBEDATE, CREATEDR, AMOUNT, DEPTCODE, DEPTNAME, DIAGNOSIS,
+ REMARK
+
+
\ No newline at end of file
diff --git a/src/main/resources/mybatis/mapper/master/hlhyxyy/VA015MxMapper.xml b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA015MxMapper.xml
new file mode 100644
index 0000000..2a54c50
--- /dev/null
+++ b/src/main/resources/mybatis/mapper/master/hlhyxyy/VA015MxMapper.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CODEFK, THRID, ITEMNAME, ITEMCODE, MEASURECOUNT, MEASUREUNIT, CATEGORY, FREQUENCY,
+ GGXH, `COUNT`, PRICE, RETAILPRICE, AMOUNT, REMARK
+
+
\ No newline at end of file