|
|
@ -4,14 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
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.StringUtils;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import com.glxp.mipsdl.client.CommonHttpClient;
|
|
|
|
import com.glxp.mipsdl.client.CommonHttpClient;
|
|
|
|
import com.glxp.mipsdl.config.ThirdSysConfig;
|
|
|
|
import com.glxp.mipsdl.config.ThirdSysConfig;
|
|
|
|
import com.glxp.mipsdl.constant.ConstantType;
|
|
|
|
import com.glxp.mipsdl.constant.ConstantType;
|
|
|
@ -23,16 +25,22 @@ import com.glxp.mipsdl.dao.basic.BasicUdirelDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoCodeDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoCodeDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoOrderDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoOrderDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoOrderDetailBizDao;
|
|
|
|
import com.glxp.mipsdl.dao.inout.IoOrderDetailBizDao;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.entity.ctqyy.MaterialDictEntity;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.entity.njxyy.ProductEntity;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.entity.njxyy.SickerEntity;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.req.ctqyy.CtqyyRequest;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.req.ctqyy.GetSickRequest;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.req.njxyy.PostThrProductRequest;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.req.post.*;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.res.ctqyy.CtBaseResponse;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.thirddao.njxyy.ThrCorpMapper;
|
|
|
|
import com.glxp.mipsdl.dao.thrsys.*;
|
|
|
|
import com.glxp.mipsdl.dao.thrsys.*;
|
|
|
|
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
|
|
|
import com.glxp.mipsdl.entity.auth.AuthWarehouseEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicBussinessTypeEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicCorpEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
|
|
|
import com.glxp.mipsdl.entity.basic.BasicUdirelEntity;
|
|
|
|
import com.glxp.mipsdl.entity.inout.*;
|
|
|
|
import com.glxp.mipsdl.entity.inout.*;
|
|
|
|
import com.glxp.mipsdl.entity.thrsys.ThrInvWarehouseEntity;
|
|
|
|
import com.glxp.mipsdl.entity.thrsys.*;
|
|
|
|
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.http.HttpClient;
|
|
|
|
import com.glxp.mipsdl.req.base.*;
|
|
|
|
import com.glxp.mipsdl.req.base.*;
|
|
|
|
import com.glxp.mipsdl.req.base.forthird.*;
|
|
|
|
import com.glxp.mipsdl.req.base.forthird.*;
|
|
|
@ -40,17 +48,14 @@ import com.glxp.mipsdl.req.phxyy.PhBusTypeRequest;
|
|
|
|
import com.glxp.mipsdl.req.phxyy.PhOrderRequest;
|
|
|
|
import com.glxp.mipsdl.req.phxyy.PhOrderRequest;
|
|
|
|
import com.glxp.mipsdl.req.phxyy.PhProductRequest;
|
|
|
|
import com.glxp.mipsdl.req.phxyy.PhProductRequest;
|
|
|
|
import com.glxp.mipsdl.req.phxyy.PhUnitRequest;
|
|
|
|
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.BaseResponse;
|
|
|
|
import com.glxp.mipsdl.res.PageSimpleResponse;
|
|
|
|
import com.glxp.mipsdl.res.PageSimpleResponse;
|
|
|
|
import com.glxp.mipsdl.res.udiwms.*;
|
|
|
|
import com.glxp.mipsdl.res.udiwms.*;
|
|
|
|
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
|
|
|
|
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
|
|
|
|
import com.glxp.mipsdl.service.order.OrderUploadLogService;
|
|
|
|
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.service.thrsys.ThrSystemDetailService;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.thirddao.njxyy.ThrProductsMapper;
|
|
|
|
|
|
|
|
import com.glxp.mipsdl.thirddao.njxyy.ThrSickerMapper;
|
|
|
|
import com.glxp.mipsdl.util.*;
|
|
|
|
import com.glxp.mipsdl.util.*;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
@ -60,6 +65,7 @@ import javax.annotation.Resource;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -94,8 +100,6 @@ public class NjxyyClient extends CommonHttpClient {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ThirdSysConfig thirdSysConfig;
|
|
|
|
private ThirdSysConfig thirdSysConfig;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ThrCorpService thrCorpService;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private IoOrderDetailBizDao orderDetailBizDao;
|
|
|
|
private IoOrderDetailBizDao orderDetailBizDao;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private SubmitOrderUtil submitOrderUtil;
|
|
|
|
private SubmitOrderUtil submitOrderUtil;
|
|
|
@ -108,24 +112,147 @@ public class NjxyyClient extends CommonHttpClient {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private ThrOrderUploadBustypesMapper thrOrderUploadBustypesMapper;
|
|
|
|
private ThrOrderUploadBustypesMapper thrOrderUploadBustypesMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
ThrCorpMapper thrCorpMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
ThrProductsMapper thrProductsMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
ThrSickerMapper thrSickerMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取产品信息---(A001产品信息查询)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param udiwmsProductRequest
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public BaseResponse getUnit(UdiwmsUnitRequest udiwmsUnitRequest) {
|
|
|
|
public BaseResponse getProducts(UdiwmsProductRequest udiwmsProductRequest) {
|
|
|
|
PhUnitRequest phUnitRequest = new PhUnitRequest();
|
|
|
|
IPage<ProductEntity> page = new Page<>(udiwmsProductRequest.getPage(), udiwmsProductRequest.getLimit());
|
|
|
|
BeanUtil.copyProperties(udiwmsUnitRequest, phUnitRequest);
|
|
|
|
IPage<ProductEntity> productEntityIPage = thrProductsMapper.selectPage(page, new QueryWrapper<ProductEntity>()
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_CORP_URL), phUnitRequest);
|
|
|
|
.lambda()
|
|
|
|
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
.like(StringUtils.isNotBlank(udiwmsProductRequest.getCode()), ProductEntity::getCode, udiwmsProductRequest.getCode())
|
|
|
|
return baseResponse;
|
|
|
|
.like(StringUtils.isNotBlank(udiwmsProductRequest.getName()), ProductEntity::getName, udiwmsProductRequest.getName()));
|
|
|
|
|
|
|
|
PageSimpleResponse<ProductEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
|
|
|
pageSimpleResponse.setTotal(productEntityIPage.getTotal());
|
|
|
|
|
|
|
|
pageSimpleResponse.setList(productEntityIPage.getRecords());
|
|
|
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取患者信息--( A003病人信息视图)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param getSickRequest
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public BaseResponse getSickInfo(GetSickRequest getSickRequest) {
|
|
|
|
|
|
|
|
IPage<SickerEntity> page = new Page<>(getSickRequest.getPage(), getSickRequest.getLimit());
|
|
|
|
|
|
|
|
IPage<SickerEntity> productEntityIPage = thrSickerMapper.selectPage(page, new QueryWrapper<SickerEntity>()
|
|
|
|
|
|
|
|
.lambda()
|
|
|
|
|
|
|
|
.like(StringUtils.isNotBlank(getSickRequest.getCode()), SickerEntity::getIdentityNo, getSickRequest.getCode())
|
|
|
|
|
|
|
|
.like(StringUtils.isNotBlank(getSickRequest.getName()), SickerEntity::getName, getSickRequest.getName()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
productEntityIPage.getRecords().forEach(sickerEntity -> {
|
|
|
|
|
|
|
|
BasicSkSickerResponse.builder()
|
|
|
|
|
|
|
|
.sickerId(sickerEntity.getInpatientID())
|
|
|
|
|
|
|
|
.code(sickerEntity.getCurno())
|
|
|
|
|
|
|
|
.name(sickerEntity.getName())
|
|
|
|
|
|
|
|
.adNum(sickerEntity.getInpatientID())
|
|
|
|
|
|
|
|
.idNum(sickerEntity.getIdentityNo())
|
|
|
|
|
|
|
|
.phone(sickerEntity.getCellPhoneNo())
|
|
|
|
|
|
|
|
.gender(sickerEntity.getSex())
|
|
|
|
|
|
|
|
.bornDate(sickerEntity.getBirthDate())
|
|
|
|
|
|
|
|
.guardianName(sickerEntity.getOperName())
|
|
|
|
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageSimpleResponse<SickerEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
|
|
|
pageSimpleResponse.setTotal(productEntityIPage.getTotal());
|
|
|
|
|
|
|
|
pageSimpleResponse.setList(productEntityIPage.getRecords());
|
|
|
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 提交关联产品更新--(A004接收新增产品信息)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public BaseResponse getProducts(UdiwmsProductRequest udiwmsProductRequest) {
|
|
|
|
public BaseResponse postRelProduct(PostRelProductRequest postThrInvProductsRequest) {
|
|
|
|
PhProductRequest phProductRequest = new PhProductRequest();
|
|
|
|
List<UdiRelevanceResponse> datas = postThrInvProductsRequest.getDatas();
|
|
|
|
BeanUtil.copyProperties(udiwmsProductRequest, phProductRequest);
|
|
|
|
BaseResponse baseResponse = null;
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_PI_QUERY_URL), phProductRequest);
|
|
|
|
if (CollUtil.isNotEmpty(datas)) {
|
|
|
|
|
|
|
|
for (UdiRelevanceResponse udiRelevanceResponse : datas) {
|
|
|
|
|
|
|
|
PostThrProductRequest postThrProductsRequest = new PostThrProductRequest();
|
|
|
|
|
|
|
|
BeanUtil.copyProperties(udiRelevanceResponse, postThrProductsRequest);
|
|
|
|
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrl(Constants.URL_NAME_POST_THR_PRODUCTS_URL), postThrProductsRequest);
|
|
|
|
|
|
|
|
baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
|
|
|
|
log.error(baseResponse.getMessage());
|
|
|
|
|
|
|
|
// return baseResponse;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return ResultVOUtils.success(baseResponse);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* B001 查询指定科室高值/普耗库存
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param forInvProductsFilter
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@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);
|
|
|
|
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
|
|
|
|
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;
|
|
|
|
return baseResponse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 获取往来单位
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param udiwmsUnitRequest
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public BaseResponse getUnit(UdiwmsUnitRequest udiwmsUnitRequest) {
|
|
|
|
|
|
|
|
PhUnitRequest phUnitRequest = new PhUnitRequest();
|
|
|
|
|
|
|
|
BeanUtil.copyProperties(udiwmsUnitRequest, phUnitRequest);
|
|
|
|
|
|
|
|
IPage<ThrCorpEntity> page = new Page<>(udiwmsUnitRequest.getPage(), udiwmsUnitRequest.getLimit());
|
|
|
|
|
|
|
|
IPage<ThrCorpEntity> thrCorpEntityPage = thrCorpMapper.selectPage(page, new QueryWrapper<ThrCorpEntity>()
|
|
|
|
|
|
|
|
.lambda()
|
|
|
|
|
|
|
|
.like(StringUtils.isNotBlank(phUnitRequest.getUnitId()), ThrCorpEntity::getUnitId, phUnitRequest.getUnitId())
|
|
|
|
|
|
|
|
.like(StringUtils.isNotBlank(phUnitRequest.getName()), ThrCorpEntity::getName, phUnitRequest.getName()));
|
|
|
|
|
|
|
|
PageSimpleResponse<ThrCorpEntity> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
|
|
|
pageSimpleResponse.setTotal(thrCorpEntityPage.getTotal());
|
|
|
|
|
|
|
|
pageSimpleResponse.setList(thrCorpEntityPage.getRecords());
|
|
|
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public BaseResponse getOrderTypes(UdiwmsBusTypeRequest udiwmsBusTypeRequest) {
|
|
|
|
public BaseResponse getOrderTypes(UdiwmsBusTypeRequest udiwmsBusTypeRequest) {
|
|
|
|
PhBusTypeRequest phBusTypeRequest = new PhBusTypeRequest();
|
|
|
|
PhBusTypeRequest phBusTypeRequest = new PhBusTypeRequest();
|
|
|
@ -434,55 +561,29 @@ public class NjxyyClient extends CommonHttpClient {
|
|
|
|
return baseResponse;
|
|
|
|
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);
|
|
|
|
|
|
|
|
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
|
|
|
|
@Override
|
|
|
|
public BaseResponse queryUdiBasicProductsSearch(ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
|
|
|
|
public BaseResponse queryUdiBasicProductsSearch(ForBasicProductsSearchFilter forBasicProductsSearchFilter) {
|
|
|
|
//入参业务系统字段控制
|
|
|
|
//入参业务系统字段控制
|
|
|
|
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
|
|
|
|
FilterUdiRelRequest filterUdiRelRequest = new FilterUdiRelRequest();
|
|
|
|
BeanUtils.copyProperties(forBasicProductsSearchFilter,filterUdiRelRequest);
|
|
|
|
BeanUtils.copyProperties(forBasicProductsSearchFilter, filterUdiRelRequest);
|
|
|
|
//调用业务系统http
|
|
|
|
//调用业务系统http
|
|
|
|
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostBasicProductsSearch(), filterUdiRelRequest);
|
|
|
|
String response = httpClient.postUDIWMSJson(thirdSysConfig.getPostBasicProductsSearch(), filterUdiRelRequest);
|
|
|
|
//业务系统返回参数 字段控制
|
|
|
|
//业务系统返回参数 字段控制
|
|
|
|
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
if (baseResponse.getCode() == 20000){
|
|
|
|
if (baseResponse.getCode() == 20000) {
|
|
|
|
PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse =
|
|
|
|
PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse =
|
|
|
|
JSONObject.parseObject(String.valueOf(baseResponse.getData()), PageSimpleResponse.class);
|
|
|
|
JSONObject.parseObject(String.valueOf(baseResponse.getData()), PageSimpleResponse.class);
|
|
|
|
List<UdiRelevanceResponse> list = pageSimpleResponse.getList();
|
|
|
|
List<UdiRelevanceResponse> list = pageSimpleResponse.getList();
|
|
|
|
//处理list字段 进行实体转换 过滤掉不必要字段
|
|
|
|
//处理list字段 进行实体转换 过滤掉不必要字段
|
|
|
|
String json = JSON.toJSONString(list);
|
|
|
|
String json = JSON.toJSONString(list);
|
|
|
|
List<ForBasicProductsSearchResponse> newList = JSON.parseArray(json,ForBasicProductsSearchResponse.class);
|
|
|
|
List<ForBasicProductsSearchResponse> newList = JSON.parseArray(json, ForBasicProductsSearchResponse.class);
|
|
|
|
|
|
|
|
|
|
|
|
PageSimpleResponse<ForBasicProductsSearchResponse> newPageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
PageSimpleResponse<ForBasicProductsSearchResponse> newPageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
newPageSimpleResponse.setTotal(pageSimpleResponse.getTotal());
|
|
|
|
newPageSimpleResponse.setTotal(pageSimpleResponse.getTotal());
|
|
|
|
newPageSimpleResponse.setList(newList);
|
|
|
|
newPageSimpleResponse.setList(newList);
|
|
|
|
baseResponse.setData(newPageSimpleResponse);
|
|
|
|
baseResponse.setData(newPageSimpleResponse);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return baseResponse;
|
|
|
|
return baseResponse;
|
|
|
@ -560,4 +661,5 @@ public class NjxyyClient extends CommonHttpClient {
|
|
|
|
return baseResponse;
|
|
|
|
return baseResponse;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|