feat: 供三方调用接口开发

dev
chenhc 1 year ago
parent f1de91855a
commit ab75ed83b4

@ -1,6 +1,9 @@
package com.glxp.mipsdl.client;
import com.glxp.mipsdl.req.base.*;
import com.glxp.mipsdl.req.base.forthird.ForBasicProductsSearchFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
import com.glxp.mipsdl.req.ctqyy.DlThirdProjectRequest;
import com.glxp.mipsdl.req.ctqyy.FilterThrHslbRequest;
import com.glxp.mipsdl.req.ctqyy.GetSickPrescribeRequest;
@ -229,4 +232,24 @@ public interface BaseHttpClient {
*/
BaseResponse getHsfl(FilterThrHslbRequest hslbRequest);
/**
* B001 /
* @param forInvProductsFilter
* @return
*/
BaseResponse queryUdiInvProductsFilter(ForInvProductsFilter forInvProductsFilter);
/**
* B002
* @param forBasicProductsSearchFilter
* @return
*/
BaseResponse queryUdiBasicProductsSearch(ForBasicProductsSearchFilter forBasicProductsSearchFilter);
/**
* B003 /退
* @param forInvOutScanCodeFilter
* @return
*/
BaseResponse queryUdiInvOutScanCode(ForInvOutScanCodeFilter forInvOutScanCodeFilter);
}

@ -25,6 +25,9 @@ import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity;
import com.glxp.mipsdl.http.HttpClient;
import com.glxp.mipsdl.req.base.*;
import com.glxp.mipsdl.req.base.forthird.ForBasicProductsSearchFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
import com.glxp.mipsdl.req.ctqyy.DlThirdProjectRequest;
import com.glxp.mipsdl.req.ctqyy.FilterThrHslbRequest;
import com.glxp.mipsdl.req.ctqyy.GetSickPrescribeRequest;
@ -235,6 +238,20 @@ public abstract class CommonHttpClient implements BaseHttpClient {
return null;
}
@Override
public BaseResponse queryUdiInvProductsFilter(ForInvProductsFilter forInvProductsFilter) {
return null;
}
@Override
public BaseResponse queryUdiBasicProductsSearch(ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
return null;
}
@Override
public BaseResponse queryUdiInvOutScanCode(ForInvOutScanCodeFilter forInvOutScanCodeFilter) {
return null;
}
/**
*

@ -0,0 +1,554 @@
package com.glxp.mipsdl.client.njxyy;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.glxp.mipsdl.client.CommonHttpClient;
import com.glxp.mipsdl.config.ThirdSysConfig;
import com.glxp.mipsdl.constant.ConstantType;
import com.glxp.mipsdl.constant.Constants;
import com.glxp.mipsdl.dao.auth.AuthWarehouseDao;
import com.glxp.mipsdl.dao.basic.BasicBussinessTypeDao;
import com.glxp.mipsdl.dao.basic.BasicCorpDao;
import com.glxp.mipsdl.dao.basic.BasicUdirelDao;
import com.glxp.mipsdl.dao.inout.IoCodeDao;
import com.glxp.mipsdl.dao.inout.IoOrderDao;
import com.glxp.mipsdl.dao.inout.IoOrderDetailBizDao;
import com.glxp.mipsdl.dao.thrsys.*;
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
import com.glxp.mipsdl.entity.inout.*;
import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
import com.glxp.mipsdl.entity.thrsys.ThrOrderUploadBustypesEntity;
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.base.forthird.ForBasicProductsSearchFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeRequest;
import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
import com.glxp.mipsdl.req.phxyy.PhBusTypeRequest;
import com.glxp.mipsdl.req.phxyy.PhOrderRequest;
import com.glxp.mipsdl.req.phxyy.PhProductRequest;
import com.glxp.mipsdl.req.phxyy.PhUnitRequest;
import com.glxp.mipsdl.req.post.PostFileThrOrderRequest;
import com.glxp.mipsdl.req.post.PostThrCorpRequest;
import com.glxp.mipsdl.req.post.PostThrInvProductsRequest;
import com.glxp.mipsdl.req.post.PostThrProductsRequest;
import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.res.PageSimpleResponse;
import com.glxp.mipsdl.res.udiwms.*;
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
import com.glxp.mipsdl.service.order.OrderUploadLogService;
import com.glxp.mipsdl.service.thrsys.ThrCorpService;
import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
import com.glxp.mipsdl.util.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* Client
*/
@Slf4j
@Service(value = "100012HttpClient") //bean注册名称使用编码 + HttpClient文件接口加 FileClient
public class njxyyClient extends CommonHttpClient {
@Resource
private ThrSystemDetailService thrSystemDetailService;
@Resource
private HttpClient httpClient;
@Resource
private ThrBustypeOriginDao thrBustypeOriginDao;
@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 SubmitOrderUtil submitOrderUtil;
@Resource
private BasicUdirelDao basicUdirelDao;
@Resource
ThrProductsDao thrProductsDao;
@Resource
private OrderUploadLogService orderUploadLogService;
@Resource
private ThrOrderUploadBustypesMapper thrOrderUploadBustypesMapper;
@Override
public BaseResponse getUnit(UdiwmsUnitRequest udiwmsUnitRequest) {
PhUnitRequest phUnitRequest = new PhUnitRequest();
BeanUtil.copyProperties(udiwmsUnitRequest, phUnitRequest);
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_CORP_URL), phUnitRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse getProducts(UdiwmsProductRequest udiwmsProductRequest) {
PhProductRequest phProductRequest = new PhProductRequest();
BeanUtil.copyProperties(udiwmsProductRequest, phProductRequest);
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_PI_QUERY_URL), phProductRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse getOrderTypes(UdiwmsBusTypeRequest udiwmsBusTypeRequest) {
PhBusTypeRequest phBusTypeRequest = new PhBusTypeRequest();
BeanUtil.copyProperties(udiwmsBusTypeRequest, phBusTypeRequest);
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_BUS_TYPE_QUERY_URL), phBusTypeRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse getOrders(UdiwmsOrderQueryRequest udiwmsOrderQueryRequest) {
if (StrUtil.isBlank(udiwmsOrderQueryRequest.getBillType())) {
return ResultVOUtils.error(500, "单据类型不能为空");
}
//查询绑定的第三方单据类型
String thirdAction = thrBustypeOriginDao.findThirdActionByBillType(udiwmsOrderQueryRequest.getBillType(), DictUtl.CURRENT_HOSP_CODE);
udiwmsOrderQueryRequest.setBillType(thirdAction);
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_ORDER_QUERY_URL), udiwmsOrderQueryRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse submitOrders(UdiwmsOrderRequest udiwmsOrderRequest) {
if (StrUtil.isBlank(udiwmsOrderRequest.getBillNo())) {
return ResultVOUtils.error(500, "单据号不能为空");
}
PhOrderRequest phOrderRequest = new PhOrderRequest();
BeanUtil.copyProperties(udiwmsOrderRequest, phOrderRequest);
//查询单据和详情信息,组装第三方系统接口参数
IoOrderEntity orderEntity = orderDao.selectOne(new LambdaQueryWrapper<IoOrderEntity>().eq(IoOrderEntity::getBillNo, udiwmsOrderRequest.getBillNo()).last("limit 1"));
if (orderEntity.getAuditTime() == null)
phOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getCreateTime()));
else {
phOrderRequest.setBillDate(DateUtil.formatDateTime(orderEntity.getAuditTime()));
}
//查询对应的第三方单据类型
ThrSystemBusApiEntity thrSystemBusApiEntity = thrSystemBusApiDao.selectOne(new LambdaQueryWrapper<ThrSystemBusApiEntity>().eq(ThrSystemBusApiEntity::getCode, udiwmsOrderRequest.getBillType()));
if (StrUtil.isBlank(thrSystemBusApiEntity.getUrl())) {
return ResultVOUtils.error(500, "接口未配置,无法提交!");
}
phOrderRequest.setBillType(thrSystemBusApiEntity.getThirdBuyCode());
//查询单据类型,设置往来单位信息
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeDao.selectByAction(udiwmsOrderRequest.getBillType());
if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_HOSPTIAL)) {
//医院客户
phOrderRequest.setCorpId(orderEntity.getFromCorp());
//查询客户名称
String corpName = basicCorpDao.selectNameByErpId(orderEntity.getFromCorp());
phOrderRequest.setCorpName(corpName);
} else if (basicBussinessTypeEntity.getCorpType().equals(Constants.CORP_INTTERNAL)) {
//内部科室
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper<AuthWarehouseEntity>().eq(AuthWarehouseEntity::getCode, udiwmsOrderRequest.getCorpId()));
try {
//根据第三方系统标识,获取对应字段的值
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
.eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
.eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
phOrderRequest.setCorpId(thrInvWarehouseEntity.getCode());
phOrderRequest.setCorpName(thrInvWarehouseEntity.getName());
} catch (Exception e) {
log.error("查询单据对应往来单位的第三方仓库信息异常", e);
}
} else {
//供应商
BasicCorpEntity basicCorpEntity = basicCorpDao.selectByErpId(orderEntity.getFromCorp());
if (null != basicCorpEntity) {
phOrderRequest.setCorpId(basicCorpEntity.getThirdId());
phOrderRequest.setCorpName(basicCorpEntity.getName());
} else {
String msg = "查询单据对应的第三方往来单位信息异常";
orderUploadLogService.updateLocalErr(orderEntity, msg);
log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
return ResultVOUtils.error(500, msg);
}
// ThrCorpEntity thrCorp = thrCorpService.getThrCorp(udiwmsOrderRequest.getCorpId());
// if (null != thrCorp) {
// phOrderRequest.setCorpId(thrCorp.getUnitId());
// phOrderRequest.setCorpName(thrCorp.getName());
// } else {
// String msg = "查询单据对应的第三方往来单位信息异常";
// orderUploadLogService.updateLocalErr(orderEntity, msg);
// log.error("----单据提交-----" + orderEntity.getBillNo() + msg);
// return ResultVOUtils.error(500, msg);
// }
}
//查询仓库信息
AuthWarehouseEntity warehouseEntity = authWarehouseDao.selectOne(new LambdaQueryWrapper<AuthWarehouseEntity>().eq(AuthWarehouseEntity::getCode, orderEntity.getInvCode()));
try {
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>()
.eq(ThrInvWarehouseEntity::getCode, authWarehouseService.getThirdInvCode(warehouseEntity))
.eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
if (thrInvWarehouseEntity != null) {
phOrderRequest.setLocInvCode(thrInvWarehouseEntity.getCode());
phOrderRequest.setLocInvName(thrInvWarehouseEntity.getName());
phOrderRequest.setLocStorageCode(thrInvWarehouseEntity.getCode());
phOrderRequest.setLocStorageName(thrInvWarehouseEntity.getName());
} else {
orderUploadLogService.updateLocalErr(orderEntity, "查询第三方系统仓库信息异常");
return ResultVOUtils.error(500, "查询第三方系统仓库信息异常");
}
} catch (Exception e) {
log.error("查询第三方系统仓库信息异常", ExceptionUtil.stacktraceToString(e));
orderUploadLogService.updateLocalErr(orderEntity, "查询第三方系统仓库信息异常" + ExceptionUtil.stacktraceToString(e));
return ResultVOUtils.error(500, "查询第三方系统仓库信息异常");
}
phOrderRequest.setBillFlag("1");
if (StrUtil.nullToEmpty(thrSystemBusApiEntity.getUrl()).equals("useOut")) {
phOrderRequest.setCorpId(phOrderRequest.getLocStorageCode());
phOrderRequest.setCorpName(phOrderRequest.getLocStorageName());
ThrInvWarehouseEntity thrInvWarehouseEntity = thrInvWarehouseDao.selectOne(new LambdaQueryWrapper<ThrInvWarehouseEntity>().eq(ThrInvWarehouseEntity::getCode, "29")
.eq(ThrInvWarehouseEntity::getThirdSysFk, thirdSysConfig.getThirdId()));
phOrderRequest.setLocStorageCode("29");
phOrderRequest.setLocStorageName(thrInvWarehouseEntity.getName());
}
//设置单据出入库类型
if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
phOrderRequest.setInoutType(1); //入库
} else if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_OUT)) {
phOrderRequest.setInoutType(2); //出库
}
phOrderRequest.setRemark("UDI单据" + udiwmsOrderRequest.getBillNo()); //备注
//组装单据明细数据
List<IoCodeEntity> ioCodeEntities = codeDao.selectList(new LambdaQueryWrapper<IoCodeEntity>()
.eq(IoCodeEntity::getOrderId, orderEntity.getBillNo())
);
List<UdiwmsOrderDetailRequest> items = new ArrayList<>();
//查询业务单据详情
List<IoOrderDetailBizEntity> detailBizEntities = orderDetailBizDao.selectList(new LambdaQueryWrapper<IoOrderDetailBizEntity>().eq(IoOrderDetailBizEntity::getOrderIdFk, orderEntity.getBillNo()));
// setOrderDetailList(ioCodeEntities, items, detailBizEntities);
List<IoOrderDetailBizEntity> stockOrderDetailEntities = transferSerList(detailBizEntities, orderEntity.getBillNo());
// Collections.sort(stockOrderDetailEntities, (o1, o2) -> {
// String o1Str = o1.getCoName() + o1.getSpec() + o1.getBatchNo() + o1.getSerialNo();
// String o2Str = o2.getCoName() + o2.getSpec() + o2.getBatchNo() + o1.getSerialNo();
// Integer cp = o1Str.compareTo(o2Str);
// return cp;
// });
for (IoOrderDetailBizEntity stockOrderDetailEntity : stockOrderDetailEntities) {
BasicUdirelEntity udiRelevanceEntity = basicUdirelDao.selectById(stockOrderDetailEntity.getBindRlFk());
// if (StrUtil.isNotEmpty(udiRelevanceEntity.getMainId())) {
// ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new QueryWrapper<ThrProductsEntity>().eq("code", udiRelevanceEntity.getMainId()).last("limit 1"));
// if (thrProductsEntity != null && StrUtil.isNotEmpty(thrProductsEntity.getRegisterNo())) {
// stockOrderDetailEntity.setCertCode(thrProductsEntity.getRegisterNo());
// }
// }
UdiwmsOrderDetailRequest item = new UdiwmsOrderDetailRequest();
BeanUtil.copyProperties(stockOrderDetailEntity, item);
item.setManufactory(stockOrderDetailEntity.getManufacturer());
item.setProductDate(stockOrderDetailEntity.getProductDate());
item.setExpireDate(stockOrderDetailEntity.getExpireDate());
item.setBatchNo(stockOrderDetailEntity.getBatchNo());
if (StrUtil.isNotEmpty(stockOrderDetailEntity.getProductDate())) {
// item.setProductDate(com.glxp.mipsdl.admin.util.DateUtil.formatExpireTime("20" + stockOrderDetailEntity.getProductDate()));
}
if (StrUtil.isNotEmpty(stockOrderDetailEntity.getExpireDate())) {
// item.setExpireDate(com.glxp.mipsdl.admin.util.DateUtil.formatExpireTime("20" + stockOrderDetailEntity.getExpireDate()));
}
// item.setMeasname(udiRelevanceEntity.getMeasname());
item.setStandard(stockOrderDetailEntity.getSpec());
item.setRegisterNo(stockOrderDetailEntity.getCertCode().replace(";", ""));
IoOrderUploadLogEntity uploadLog = new IoOrderUploadLogEntity();
try {
item.setPrice(stockOrderDetailEntity.getPrice());
// item.setFirstSalesInvNo(stockOrderDetailEntity.getFirstSalesInvNo());
// item.setSecSalesInvNo(stockOrderDetailEntity.getSecSalesInvNo());
// item.setInvoiceDate(stockOrderDetailEntity.getInvoiceDate());
// item.setSecSalesListNo(stockOrderDetailEntity.getSecSalesListNo());
item.setBillNo(orderEntity.getBillNo());
String fphm = "";
String fprq = null;
List<IoOrderInvoiceEntity> invoiceList = IoOrderInvoiceEntity.builder().build()
.selectList(Wrappers.lambdaQuery(IoOrderInvoiceEntity.class).eq(IoOrderInvoiceEntity::getOrderIdFk, orderEntity.getBillNo())
.eq(IoOrderInvoiceEntity::getBindRlFk, stockOrderDetailEntity.getBindRlFk())
.eq(StrUtil.isNotEmpty(stockOrderDetailEntity.getBatchNo()), IoOrderInvoiceEntity::getBatchNo, stockOrderDetailEntity.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());
}
item.setFirstSalesInvNo(fphm);
item.setSecSalesInvNo(fphm);
item.setInvoiceDate(fprq);
boolean isNeedFp = false;
ThrOrderUploadBustypesEntity thrOrderUploadBustypesEntity = thrOrderUploadBustypesMapper.selectOne(new QueryWrapper<ThrOrderUploadBustypesEntity>().eq("action", basicBussinessTypeEntity.getAction()).last("limit 1"));
if (thrOrderUploadBustypesEntity != null && IntUtil.value(thrOrderUploadBustypesEntity.getOrderStatus()) == 3) {
isNeedFp = true;
}
if (basicBussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT) && StrUtil.isEmpty(fphm) && isNeedFp) {
String errMsg = "提交失败,错误信息:" + stockOrderDetailEntity.getCoName() + "发票缺失,请补齐后重新提交";
orderUploadLogService.updateLocalErr(orderEntity, errMsg);
return ResultVOUtils.error(500, errMsg);
}
ThrProductsEntity thrProductsEntity = thrProductsDao.selectOne(new QueryWrapper<ThrProductsEntity>().eq("code", udiRelevanceEntity.getMainId()).last("limit 1"));
if (StrUtil.isEmpty(udiRelevanceEntity.getMainId()) || thrProductsEntity == null || StrUtil.isEmpty(thrProductsEntity.getCode())) {
String errMsg = "提交失败,错误信息:" + "产品DI未关联第三方产品信息";
orderUploadLogService.updateLocalErr(orderEntity, errMsg);
return ResultVOUtils.error(500, errMsg);
} else {
item.setProductId(thrProductsEntity.getCode());
item.setProductName(thrProductsEntity.getName());
}
items.add(item);
} catch (Exception e) {
log.error(e.getMessage(), e);
uploadLog.setStatus(3);
String errMsg = "提交失败,错误信息:" + e.getMessage();
uploadLog.setResult(errMsg);
orderUploadLogService.insertOrUpdate(uploadLog);
return ResultVOUtils.error(500, errMsg);
}
}
Collections.reverse(items);
phOrderRequest.setItem(items);
return submitOrderUtil.submitOrder(orderEntity, phOrderRequest);
}
public List<IoOrderDetailBizEntity> transferSerList(List<IoOrderDetailBizEntity> stockOrderDetailEntities, String orderId) {
List<IoOrderDetailBizEntity> resultList = new ArrayList<>();
List<IoCodeEntity> ioCodeEntities = codeDao.selectList(new LambdaQueryWrapper<IoCodeEntity>()
.eq(IoCodeEntity::getOrderId, orderId)
);
if (CollUtil.isNotEmpty(ioCodeEntities)) {
for (IoCodeEntity codeDetaiEntity : ioCodeEntities) {
if (CollUtil.isNotEmpty(stockOrderDetailEntities)) {
for (IoOrderDetailBizEntity stockOrderDetailEntity : stockOrderDetailEntities) {
if (IntUtil.value(codeDetaiEntity.getRelId()) == IntUtil.value(stockOrderDetailEntity.getBindRlFk())
&& StrUtil.trimToEmpty(codeDetaiEntity.getBatchNo()).equals(StrUtil.trimToEmpty(stockOrderDetailEntity.getBatchNo()))) {
IoOrderDetailBizEntity item = new IoOrderDetailBizEntity();
BeanUtils.copyProperties(stockOrderDetailEntity, item);
item.setSerialNo(codeDetaiEntity.getSerialNo());
item.setCount(codeDetaiEntity.getReCount());
item.setReCount(codeDetaiEntity.getReCount());
resultList.add(item);
break;
}
}
}
}
}
return resultList;
}
@Override
public BaseResponse getInvProducts(UdiwmsInvProductsRequest udiwmsInvProductsRequest) {
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_INV_PI_URL), udiwmsInvProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse getWarehouse(UdiwmsWarehouseRequest udiwmsWarehouseRequest) {
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_WAREHOUSE_QUERY_URL), udiwmsWarehouseRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse postProducts(PostThrProductsRequest postThrProductsRequest) {
postThrProductsRequest.setUploadType("文件导入");
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostPiUrl(), postThrProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse postCorps(PostThrCorpRequest postThrCorpRequest) {
postThrCorpRequest.setUploadType("文件导入");
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostCorpUrl(), postThrCorpRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse postOrderDetail(PostFileThrOrderRequest postFileThrOrderRequest) {
postFileThrOrderRequest.setUploadType("文件导入");
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostOrderUrl(), postFileThrOrderRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse postInvProducts(PostThrInvProductsRequest postThrInvProductsRequest) {
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostInvPiUrl(), postThrInvProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse queryUdiInvProductsFilter(ForInvProductsFilter forInvProductsFilter) {
//入参业务系统字段控制
FilterInvProductRequest filterInvProductRequest = new FilterInvProductRequest();
BeanUtils.copyProperties(forInvProductsFilter,filterInvProductRequest);
//调用业务系统http
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostInvProductsFilterUrl(), filterInvProductRequest);
//业务系统返回参数 字段控制
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
// TODO: 2024/3/15 返回字段过滤控制
if (baseResponse.getCode() == 20000){
PageSimpleResponse<InvProductResponse> pageSimpleResponse =
JSONObject.parseObject(String.valueOf(baseResponse.getData()), PageSimpleResponse.class);
List<InvProductResponse> list = pageSimpleResponse.getList();
//处理list字段 进行实体转换 过滤掉不必要字段
String json = JSON.toJSONString(list);
List<ForInvProductsResponse> newList = JSON.parseArray(json,ForInvProductsResponse.class);
PageSimpleResponse<ForInvProductsResponse> newPageSimpleResponse = new PageSimpleResponse<>();
newPageSimpleResponse.setTotal(pageSimpleResponse.getTotal());
newPageSimpleResponse.setList(newList);
baseResponse.setData(newPageSimpleResponse);
}else {
}
return baseResponse;
}
@Override
public BaseResponse queryUdiBasicProductsSearch(ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
//入参业务系统字段控制
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
BeanUtils.copyProperties(forBasicProductsSearchFilter,filterUdiRelRequest);
//调用业务系统http
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostBasicProductsSearch(), filterUdiRelRequest);
//业务系统返回参数 字段控制
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
// TODO: 2024/3/15 返回字段过滤控制
if (baseResponse.getCode() == 20000){
PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse =
JSONObject.parseObject(String.valueOf(baseResponse.getData()), PageSimpleResponse.class);
List<UdiRelevanceResponse> list = pageSimpleResponse.getList();
//处理list字段 进行实体转换 过滤掉不必要字段
String json = JSON.toJSONString(list);
List<ForBasicProductsSearchResponse> newList = JSON.parseArray(json,ForBasicProductsSearchResponse.class);
PageSimpleResponse<ForBasicProductsSearchResponse> newPageSimpleResponse = new PageSimpleResponse<>();
newPageSimpleResponse.setTotal(pageSimpleResponse.getTotal());
newPageSimpleResponse.setList(newList);
baseResponse.setData(newPageSimpleResponse);
}else {
}
return baseResponse;
}
@Override
public BaseResponse queryUdiInvOutScanCode(ForInvOutScanCodeFilter forInvOutScanCodeFilter) {
ForInvOutScanCodeRequest forInvOutScanCodeRequest = new ForInvOutScanCodeRequest();
System.out.println(JSON.toJSONString(forInvOutScanCodeFilter));
// TODO: 2024/3/15 forInvOutScanCodeFilter 转换为 入参的业务系统的实体 forInvOutScanCodeRequest
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostInvOutScanCode(), forInvOutScanCodeRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
if (baseResponse.getCode() == 20000){
ForInvOutScanCodeResponse forInvOutScanCodeResponse =
JSONObject.parseObject(String.valueOf(baseResponse.getData()), ForInvOutScanCodeResponse.class);
System.out.println(forInvOutScanCodeResponse);
}else {
}
return baseResponse;
}
@Override
public BaseResponse testConnect() {
UdiwmsUnitRequest udiwmsUnitRequest = new UdiwmsUnitRequest();
udiwmsUnitRequest.setPage(1);
udiwmsUnitRequest.setLimit(2);
BaseResponse baseResponse = getUnit(udiwmsUnitRequest);
if (baseResponse.getCode() == 20000) {
return ResultVOUtils.success("连接第三方系统成功!");
}
return ResultVOUtils.success("连接第三方服务成功,连接第三方系统成功!");
}
@Override
public BaseResponse queryUdiInvProducts(UdiwmsQueryUdiInvProductsRequest queryUdiInvProductsRequest) {
String response = httpClient.postUDIWMSJson(thirdSysConfig.getQueryInvUrl(), queryUdiInvProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse submitProducts(UdiwmsAddProductsRequest udiwmsAddProductsRequest) {
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostInvPiUrl(), udiwmsAddProductsRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse submitUnit(UdiwmsAddUnitRequest udiwmsAddUnitRequest) {
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostInvPiUrl(), udiwmsAddUnitRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
@Override
public BaseResponse submitPreInOrders(UdiwmsPreInOrderRequest udiwmsPreInOrderRequest) {
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostInvPiUrl(), udiwmsPreInOrderRequest);
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
return baseResponse;
}
}

@ -92,5 +92,31 @@ public class ThirdSysConfig {
return udiWmsUrl + Constants.URL_NAME_UDIWMS_PRODUCTS_FILTER_URL;
}
/**
* B001 /
*
* @return
*/
public String getPostInvProductsFilterUrl() {
return udiWmsUrl + Constants.URL_NAME_FOR_INV_PRODUCTS_FILTER_URL;
}
/**
* B002
*
* @return
*/
public String getPostBasicProductsSearch() {
return udiWmsUrl + Constants.URL_NAME_FOR_BASiC_PRODUCTS_SEARCH_URL;
}
/**
* B003 /退
*
* @return
*/
public String getPostInvOutScanCode() {
return udiWmsUrl + Constants.URL_NAME_FOR_INV_OUT_SCANCODE_URL;
}
}

@ -114,6 +114,24 @@ public interface Constants {
*/
String URL_NAME_UDIWMS_PRODUCTS_FILTER_URL = "/udiwms/inv/products/filter";
/**
* B001 /
*/
String URL_NAME_FOR_INV_PRODUCTS_FILTER_URL = "/forThirdSysApi/inv/products/filter";
/**
* B002
*/
String URL_NAME_FOR_BASiC_PRODUCTS_SEARCH_URL = "/forThirdSysApi/basic/products/search";
/**
* B003 /退
*/
String URL_NAME_FOR_INV_OUT_SCANCODE_URL = "/forThirdSysApi/inv/out/scanCode";
//往来单位类型

@ -0,0 +1,79 @@
package com.glxp.mipsdl.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.glxp.mipsdl.client.ClientProcessor;
import com.glxp.mipsdl.req.base.UdiwmsQueryUdiInvProductsRequest;
import com.glxp.mipsdl.req.base.forthird.ForBasicProductsSearchFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvOutScanCodeFilter;
import com.glxp.mipsdl.req.base.forthird.ForInvProductsFilter;
import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.util.ResultVOUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
/**
* --
*/
@Slf4j
@RestController
public class ExNjxyyController {
/**
* B001 /
* @param forInvProductsFilter
* @return
*/
@PostMapping("/ex/udiwms/inv/products/filter")
public BaseResponse invProductsFilter(@RequestBody @Valid ForInvProductsFilter forInvProductsFilter) {
if (ObjectUtil.isNull(forInvProductsFilter)) {
return ResultVOUtils.error(500, "查询条件不能为空");
}
if (StrUtil.isEmpty(forInvProductsFilter.getUdiCode()) &&
StrUtil.isEmpty(forInvProductsFilter.getNameCode()) &&
StrUtil.isEmpty(forInvProductsFilter.getCpmctymc()) &&
StrUtil.isEmpty(forInvProductsFilter.getBatchNo())&&
StrUtil.isEmpty(forInvProductsFilter.getInvCode())&&
StrUtil.isEmpty(forInvProductsFilter.getSupName())) {
return ResultVOUtils.error(500, "查询条件不能为空!");
}
return ClientProcessor.getHttpClient().queryUdiInvProductsFilter(forInvProductsFilter);
}
/**
* B002
* @param forBasicProductsSearchFilter
* @return
*/
@PostMapping("/ex/basic/products/search")
public BaseResponse basicProductsSearch(@RequestBody @Valid ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
if (ObjectUtil.isNull(forBasicProductsSearchFilter)) {
return ResultVOUtils.error(500, "查询条件不能为空");
}
if (StrUtil.isEmpty(forBasicProductsSearchFilter.getUdiCode()) &&
StrUtil.isEmpty(forBasicProductsSearchFilter.getNameCode()) &&
StrUtil.isEmpty(forBasicProductsSearchFilter.getCpmctymc()) &&
StrUtil.isEmpty(forBasicProductsSearchFilter.getMainId())&&
StrUtil.isEmpty(forBasicProductsSearchFilter.getGgxh())) {
return ResultVOUtils.error(500, "查询条件不能为空!");
}
return ClientProcessor.getHttpClient().queryUdiBasicProductsSearch(forBasicProductsSearchFilter);
}
/**
* B003 /退
* @param forInvOutScanCodeFilter
* @return
*/
@PostMapping("/ex/inv/out/scanCode")
public BaseResponse invOutScanCode(@RequestBody @Valid ForInvOutScanCodeFilter forInvOutScanCodeFilter) {
return ClientProcessor.getHttpClient().queryUdiInvOutScanCode(forInvOutScanCodeFilter);
}
}

@ -0,0 +1,131 @@
package com.glxp.mipsdl.req.base;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
*
*/
@Data
public class FilterInvProductRequest extends ListPageRequest {
private String id;
/**
*
*/
private String cpmctymc;
/**
* DI
*/
private String nameCode;
/**
* UDI
*/
private String udiCode;
/**
* ID
*/
private String relIdFk;
/**
*
*/
private String ggxh;
/**
*
*/
private String batchNo;
/**
*
*/
private String productionDate;
/**
*
*/
private String expireDate;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String zczbhhzbapzbh;
/**
* ID
*/
private String customerId;
/**
* ID
*/
private String supId;
/**
*
*/
private String supName;
/**
*
*/
private String deptCode;
/**
*
*/
private String invCode;
/**
*
*/
private List<String> invCodes;
/**
*
*/
private String cplb;
/**
*
*/
private String invSpaceCode;
/**
* 0
*/
private Integer filterCount;
private String code;
private String serialNo;
private String manufactory;
private String diCode;
private String basicPrductRemak1;
private String category;
private Integer filterNoInv;
private Date startDate;
private Date endDate;
private String thirdSys;
private String thirdSysUrlValue;
private Long compareId;
}

@ -0,0 +1,117 @@
package com.glxp.mipsdl.req.base;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class FilterUdiRelRequest extends ListPageRequest {
private String ylqxzcrbarmc;
private String cpmctymc;
private String entireCpmctymc;
private String nameCode;
private String uuid;
private String originUuid;
private String ggxh;
private String thirdId;
private Long id;
private String thirdId1;
private String thirdId2;
private String thirdId3;
private String thirdId4;
private Boolean isDisable;
private String thirdCode;
private String thirdSys;
private String lastUpdateTime;
private String zczbhhzbapzbh;
private String packLevel;
private Integer diType;
private String unionCode;
private String udiCode;
private String thrPiId;
private Boolean isCheck;
private Integer filterType; //0:全部1.对照完成2.未对照DI3.未对照产品编码4.未对照其他产品编码
private String customerId;
private String pinyinInitial;
private String code;
private Integer lockStatus;
private String udplatCode;
private String mainId;
private Boolean isAdavence;
/**
* 1:23
*/
private Integer purType;
/**
* 0:1)23.
*/
private Integer attributeType;
/**
* 12.
*/
private Integer hcType;
private String corpId;
private String billType;
private String ybbm;
private String sptm;
private String unionFilterStr;//产品名称,规格,批文,生产厂家联合查询
private String main;
List<String> relIds;
private String uniqueNameCode;
private String supName;
private String unitFk;
private String relId;
private String companyName;
private String bindRlIds;
private String relCode;
private String bindType;
private String certIdFk;
private String manufactory;
private String tyshxydm;
private Boolean dispatch;
private Boolean groupBuy;
private String category;
private List<String> uuids;
private List<Long> ids;
private String flbm;
private String parentCode;
private List<Long> existid;
private String basicPrductRemak1;
private String basicPrductRemak2;
private String basicPrductRemak3;
private String basicPrductRemak4;
private String basicPrductRemak5;
private String basicPrductRemak6;
private String basicPrductRemak7;
private String basicPrductRemak8;
//定数包参数
private String destinyId;
private String destinyNo;
private String billNo;
private Date billDate;
private String invCode;
private String remark;
private String key;
private String deviceRecordKey;
}

@ -0,0 +1,50 @@
package com.glxp.mipsdl.req.base.forthird;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.mipsdl.req.base.ListPageRequest;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
@Data
public class ForBasicProductsSearchFilter{
/**
* UDI
*/
private String udiCode;
/**
*
*/
private String mainId;
/**
* DI
*/
private String nameCode;
/**
*
*/
private String cpmctymc;
/**
*
*/
private String ggxh;
/**
*
*/
@Min(message = "分页参数错误", value = 1)
private Integer page;
/**
*
*/
@Min(value = 1, message = "分页参数不能小于1")
@Max(value = 500, message = "分页参数不能大于500")
private Integer limit;
}

@ -0,0 +1,324 @@
package com.glxp.mipsdl.req.base.forthird;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class ForInvOutScanCodeFilter {
/**
*
*/
@JsonProperty("BILLBASEINFO")
@NotNull(message = "单据基础信息不可为空!")
private Billbaseinfo billbaseinfo;
/**
*
*/
@JsonProperty("PATIENTINFO")
@NotNull(message = "病人相关信息不可为空!")
private Patientinfo patientinfo;
/**
* 使
*/
@JsonProperty("HIGHVALUELIST")
@NotNull(message = "耗材使用信息列表不可为空!")
private List<Highvalue> highvaluelist;
/**
*
*/
@Data
static class Billbaseinfo {
/**
*
*/
@JsonProperty("USERID")
private String userid;
/**
* his
*/
@JsonProperty("DEPTID")
private String deptid;
/**
* yyyy-mm-dd HH:MM:ss
*/
@JsonProperty("APPLYDATE")
private String applydate;
}
/**
*
*/
@Data
static class Patientinfo {
/**
* ID
*/
@JsonProperty("PATIENTID")
private String patientid;
/**
*
*/
@JsonProperty("INPATIENTID")
private String inpatientid;
/**
* 12
*/
@JsonProperty("MZ_ZY")
private String mzZy;
/**
*
*/
@JsonProperty("NAME")
private String name;
/**
* 12
*/
@JsonProperty("SEX")
private String sex;
/**
*
*/
@JsonProperty("INPATIENTDEPT")
private String inpatientdept;
/**
* ,yyyy-mm-dd HH:MM:ss
*/
@JsonProperty("INPATIENTDATE")
private String inpatientdate;
/**
*
*/
@JsonProperty("DIAGNOSIS")
private String diagnosis;
/**
* ,yyyy-mm
*/
@JsonProperty("BIRTHDATE")
private String birthdate;
/**
*
*/
@JsonProperty("ADDRESS")
private String address;
/**
* 使
*/
@JsonProperty("IDTYPE")
private String idtype;
/**
*
*/
@JsonProperty("IDENTITYNO")
private String identityno;
/**
*
*/
@JsonProperty("CELLPHONENO")
private String cellphoneno;
/**
*
*/
@JsonProperty("OTHERCONTENT")
private String othercontent;
/**
*
*/
@JsonProperty("OTHERPHONE")
private String otherphone;
/**
* ID
*/
@JsonProperty("OPERID")
private String operid;
/**
*
*/
@JsonProperty("OPERNAME")
private String opername;
/**
*
*/
@JsonProperty("OPERDOCTORID")
private String operdoctorid;
/**
*
*/
@JsonProperty("OPERDOCTOR")
private String operdoctor;
/**
*
*/
@JsonProperty("OPERDOCTORDEPT")
private String operdoctordept;
/**
*
*/
@JsonProperty("OPERNURSE")
private String opernurse;
/**
*
*/
@JsonProperty("OPERADDRESS")
private String operaddress;
/**
* 使HIS
*/
@JsonProperty("APPLYDEPT")
private String applydept;
/**
*
*/
@JsonProperty("APPLYSTAFFID")
private String applystaffid;
/**
*
*/
@JsonProperty("OPERDEPT")
private String operdept;
/**
*
*/
@JsonProperty("OPERSTAFFID")
private String operstaffid;
/**
* ,yyyy-mm-dd HH:MM:ss
*/
@JsonProperty("OPERDATE")
private String operdate;
/**
*
*/
@JsonProperty("YLZDM")
private String ylzdm;
}
/**
* 使
*/
@Data
static class Highvalue {
/**
* UDI
*/
@JsonProperty("UDICODE")
private String udicode;
/**
*
*/
@JsonProperty("FIRSTID")
private String firstid;
/**
*
*/
@JsonProperty("SECONDID")
private String secondid;
/**
* HIS
*/
@JsonProperty("THIRDID")
private String thirdid;
/**
*
*/
@JsonProperty("FEE")
private String fee;
/**
*
*/
@JsonProperty("PRICE")
private String price;
/**
* 退
*/
@JsonProperty("QUANTITY")
private String quantity;
/**
* ID
*/
@JsonProperty("PROVIDERID")
private String providerid;
/**
* IDHIS
*/
@JsonProperty("CHARGINGID")
private String chargingid;
/**
* ID退 ID
*/
@JsonProperty("CHARGINGOLDID")
private String chargingoldid;
/**
*
*/
@JsonProperty("CHARGINGTIME")
private String chargingtime;
/**
*
*/
@JsonProperty("FEEITEMID")
private String feeitemid;
/**
*
*/
@JsonProperty("PH")
private String ph;
/**
*
*/
@JsonProperty("YXQ")
private String yxq;
}
}

@ -0,0 +1,457 @@
package com.glxp.mipsdl.req.base.forthird;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class ForInvOutScanCodeRequest {
private IoOrderRequest ioOrderRequest;
private List<IoOrderCodeRequest> codeRequestList;
@Data
static class IoOrderRequest{
/**
*
*/
@TableField(value = "billNo")
private String billNo;
/**
*
*/
@TableField(value = "corpOrderId")
private String corpOrderId;
/**
*
*/
@TableField(value = "mainAction")
private String mainAction;
/**
*
*/
@TableField(value = "`action`")
private String action;
/**
*
*/
@TableField(value = "fromCorp")
private String fromCorp;
/**
*
*/
@TableField(value = "fromDeptCode")
private String fromDeptCode;
/**
*
*/
@TableField(value = "fromInvCode")
private String fromInvCode;
/**
* 1.UDIMS2.3.pda4.pda5.pc
*/
@TableField(value = "fromType")
private Integer fromType;
/**
* 1:稿2:;3:;4:;5:;6:;7:;8:
*/
@TableField(value = "`status`")
private Integer status;
/**
* 1.稿2:;3:
*/
@TableField(value = "dealStatus")
private Integer dealStatus;
/**
*
*/
@TableField(value = "`createUser`")
private String createUser;
/**
*
*/
@TableField(value = "createTime")
private Date createTime;
/**
*
*/
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@TableField(value = "updateTime")
private Date updateTime;
/**
*
*/
@TableField(value = "reviewUser")
private String reviewUser;
/**
*
*/
@TableField(value = "auditTime")
private Date auditTime;
@TableField(value = "checkUser")
private String checkUser;
@TableField(value = "checkTime")
private Date checkTime;
/**
* ID
*/
@TableField(value = "customerId")
private String customerId;
/**
*
*/
@TableField(value = "deptCode")
private String deptCode;
/**
*
*/
@TableField(value = "invCode")
private String invCode;
/**
*
*/
@TableField(value = "outChangeEnable")
private Boolean outChangeEnable;
/**
*
*/
@TableField(value = "originUllageSupNo")
private String originUllageSupNo;
/**
*
*/
@TableField(value = "ullageSupNo")
private String ullageSupNo;
/**
*
*/
@TableField(value = "supplementNo")
private String supplementNo;
/**
* (
*/
@TableField(value = "thirdBillNo")
private String thirdBillNo;
/**
* 使,
*/
@TableField(value = "replicateNo")
private String replicateNo;
/**
*
*/
@TableField(value = "printRemark")
private String printRemark;
/**
*
*/
@TableField(value = "remark")
private String remark;
@TableField(value = "errMsg")
private String errMsg;
@TableField(value = "preOutBillNo")
private String preOutBillNo;
@TableField(value = "preInBillNo")
private String preInBillNo;
@TableField(value = "entrustEnd")
private boolean entrustEnd;
@TableField(value = "reviewSp")
private boolean reviewSp; //是否验收外网单据时,需忽略流转更改为待审核
@TableField(value = "confirmUser")
private String confirmUser;
/**
* 1.2:,3. 稿
*/
@TableField(value = "orderType")
private Integer orderType;
//单据同步状态
@TableField(value = "syncStatus")
private Integer syncStatus;
@TableField(value = "fromReceiveBillNo")
private String fromReceiveBillNo;
@TableField(value = "fromThrBillNo")
private String fromThrBillNo;
/**
* /0.1.2.
*/
@TableField(value = "exportStatus")
private Integer exportStatus;
@TableField(value = "busType")
private Integer busType; //1:正常2送货3.到货
@TableField(value = "deliveryStatus")
private Integer deliveryStatus; //单据送货验收状态
@TableField(value = "processStatus")
private Integer processStatus; //退货单据处理状态
@TableField(value = "inCodeStatus")
private Integer inCodeStatus; //内部码生成状态
@TableField(value = "relKey")
private String relKey; //关联单据唯一键
@TableField(value = "suppleCount")
private Integer suppleCount; //补单次数
@TableField(value = "checkStatus")
private Integer checkStatus; //确认状态
// 预验收按单出库,退货
@TableField(value = "checkPreInOrders")
private String checkPreInOrders;
// 预验收按货位出库,退货
@TableField(value = "checkPreInInvCode")
private String checkPreInInvCode;
// 预验收按货位出库,退货
@TableField(value = "checkPreInSpaceCode")
private String checkPreInSpaceCode;
// 当前货位
@TableField(value = "curSpaceCode")
private String curSpaceCode;
// 预验收、寄售当前货位
@TableField(value = "preCurSpaceCode")
private String preCurSpaceCode;
/**
*
*/
@TableField(value = "outSickInfo")
private String outSickInfo;
@TableField(value = "fromSpmsOrders")
private String fromSpmsOrders;
/**
*
*/
@TableField(value = "preInSelected")
private Integer preInSelected;
/**
*
*/
@TableField(value = "sickerAdNum")
private String sickerAdNum;
/**
* code
*/
@TableField(value = "fromPatientCode")
private String fromPatientCode;
}
@Data
static class IoOrderCodeRequest{
/**
* UDI
*/
@TableField(value = "code")
private String code;
public void setCode(String code) {
this.code = code;
this.setErrUdiCode(code.replace("\u001D", ""));
}
/**
* GS1
*/
@TableField(value = "errUdiCode")
private String errUdiCode;
/**
*
*/
@TableField(value = "mainAction")
private String mainAction;
/**
*
*/
@TableField(value = "`action`")
private String action;
/**
*
*/
@TableField(value = "orderId")
private String orderId;
/**
*
*/
@TableField(value = "corpOrderId")
private String corpOrderId;
/**
* DI
*/
@TableField(value = "nameCode")
private String nameCode;
/**
*
*/
@TableField(value = "batchNo")
private String batchNo;
/**
*
*/
@TableField(value = "produceDate")
private String produceDate;
/**
*
*/
@TableField(value = "expireDate")
private String expireDate;
/**
*
*/
@TableField(value = "serialNo")
private String serialNo;
/**
*
*/
@TableField(value = "packageLevel")
private String packageLevel;
/**
* ID
*/
@TableField(value = "supId")
private String supId;
/**
* ID
*/
@TableField(value = "relId")
private Long relId;
/**
*
*/
@TableField(value = "`count`")
private Integer count;
/**
*
*/
@TableField(value = "reCount")
private Integer reCount;
/**
*
*/
@TableField(value = "deptCode")
private String deptCode;
/**
*
*/
@TableField(value = "invCode")
private String invCode;
/**
*
*/
@TableField(value = "warehouseCode")
private String warehouseCode;
/**
*
*/
@TableField(value = "preSpaceCode")
private String preSpaceCode;
@TableField(value = "preInSpaceCode")
private String preInSpaceCode;
/**
*
*/
@TableField(value = "updateTime")
private Date updateTime;
/**
*
*/
@TableField(value = "createTime")
private Date createTime;
/**
*
*/
@TableField(value = "inBatchNo")
private String inBatchNo;
}
}

@ -0,0 +1,55 @@
package com.glxp.mipsdl.req.base.forthird;
import com.glxp.mipsdl.req.base.ListPageRequest;
import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
@Data
public class ForInvProductsFilter {
/**
* UDI+ 01069412732363351123050210D230262121D23026201181
*/
private String udiCode;
/**
* DI 06941273236335
*/
private String nameCode;
/**
* 线
*/
private String cpmctymc;
/**
* 202006
*/
private String batchNo;
/**
* / 1001
*/
private String invCode;
/**
*
*/
private String supName;
/**
*
*/
@Min(message = "分页参数错误", value = 1)
private Integer page;
/**
*
*/
@Min(value = 1, message = "分页参数不能小于1")
@Max(value = 500, message = "分页参数不能大于500")
private Integer limit;
}

@ -0,0 +1,84 @@
package com.glxp.mipsdl.res.udiwms;
import lombok.Data;
@Data
public class ForBasicProductsSearchResponse {
private Long rlId;
private String mainId;
private String nameCode;
private String cpmctymc;
private String cplb;
private String flbm;
private String ggxh;
private String qxlb;
private String tyshxydm;
private String ylqxzcrbarmc;
private String zczbhhzbapzbh;
private String ylqxzcrbarywmc;
private String ybbm;
private String sptm;
private String manufactory;
private String companyName;
private String measname;
private String scbssfbhph;
private String scbssfbhxlh;
private String scbssfbhscrq;
private String scbssfbhsxrq;
private String cpms;
private String spmc;
private String cplx;
private String hchzsb;
private String cpdls;
private String price;
private boolean dispatch;
private boolean groupBuy;
private String sfwblztlcp;
private String cgzmraqxgxx;
private String sfbjwycxsy;
private String zdcfsycs;
private String sfwwjbz;
private String syqsfxyjxmj;
private String mjfs;
private String categoryName;
private String cphhhbh;
}

@ -0,0 +1,13 @@
package com.glxp.mipsdl.res.udiwms;
import lombok.Data;
@Data
public class ForInvOutScanCodeResponse {
/**
* UDI
*/
private String billNo;
}

@ -0,0 +1,51 @@
package com.glxp.mipsdl.res.udiwms;
import lombok.Data;
@Data
public class ForInvProductsResponse {
private Long id;
private String nameCode;
private String cpmctymc;
private String relIdFk;
private String ggxh;
private String batchNo;
private String productionDate;
private String expireDate;
private String ylqxzcrbarmc;
private String zczbhhzbapzbh;
private Integer inCount;
private Integer outCount;
private Integer reCount;
private String customerId;
private String supName;
private String supId;
private String deptName;
private String invName;
private String deptCode;
private String invCode;
private String measname;
private String price;
}

@ -0,0 +1,130 @@
package com.glxp.mipsdl.res.udiwms;
import lombok.Data;
import java.math.BigDecimal;
/**
* VO
*/
@Data
public class InvProductResponse {
private Integer id;
/**
* DI
*/
private String nameCode;
/**
*
*/
private String cpmctymc;
/**
* ID
*/
private String relIdFk;
/**
*
*/
private String ggxh;
/**
*
*/
private String batchNo;
/**
*
*/
private String productionDate;
private String produceDate;
/**
*
*/
private String expireDate;
/**
*
*/
private String ylqxzcrbarmc;
/**
*
*/
private String zczbhhzbapzbh;
/**
*
*/
private int inCount;
/**
*
*/
private int outCount;
/**
*
*/
private int reCount;
/**
* ID
*/
private String customerId;
/**
*
*/
private String supName;
/**
* ID
*/
private String supId;
/**
*
*/
private String deptName;
/**
*
*/
private String invName;
// 货位名称
private String spaceName;
/**
*
*/
private String deptCode;
/**
*
*/
private String invCode;
// 货位编号
private String invSpaceCode;
private String code;
private String serialNo;
private String manufactoryl;
/**
*
*/
private String measname;
private BigDecimal price;
}

@ -46,5 +46,9 @@
{
"code": "100011",
"name": "长泰区医院"
},
{
"code": "100012",
"name": "南靖县医院"
}
]

Loading…
Cancel
Save