feat: 修复

dtxyy
chenhc 6 months ago
parent 876223c3ab
commit e87eaf7ae3

@ -12,7 +12,9 @@ import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.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.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.mipsdl.client.CommonHttpClient;
import com.glxp.mipsdl.client.yxfuyy.entity.InvCodeResultEntity;
import com.glxp.mipsdl.client.yxfuyy.entity.InvProjectResultEntity;
@ -31,15 +33,9 @@ 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.BasicSkPrescribeItemEntity;
import com.glxp.mipsdl.entity.ctqyy.MaterialDictEntity;
import com.glxp.mipsdl.entity.ctqyy.PriceClassEntity;
import com.glxp.mipsdl.entity.ctqyy.ThrHslbEntity;
import com.glxp.mipsdl.entity.ctqyy.*;
import com.glxp.mipsdl.entity.inout.*;
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.entity.thrsys.*;
import com.glxp.mipsdl.http.HttpClient;
import com.glxp.mipsdl.req.base.*;
import com.glxp.mipsdl.req.ctqyy.*;
@ -49,12 +45,15 @@ 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.ctqyy.ThrOrderResponse;
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.system.SysParamConfigService;
import com.glxp.mipsdl.service.thrsys.ThrCorpService;
import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
import com.glxp.mipsdl.thirddao.ctqyy.PlanInfoMapper;
import com.glxp.mipsdl.thirddao.ctqyy.PresInfoMapper;
import com.glxp.mipsdl.util.*;
import lombok.extern.slf4j.Slf4j;
import org.dom4j.Document;
@ -115,6 +114,10 @@ public class YxfyyyClient extends CommonHttpClient {
BasicProductsDao basicProductsDao;
@Resource
private OrderUploadLogService orderUploadLogService;
@Resource
private PresInfoMapper presInfoMapper;
@Resource
private PlanInfoMapper planInfoMapper;
/**
* xml
@ -1286,4 +1289,70 @@ public class YxfyyyClient extends CommonHttpClient {
}
return udiwmsPreInOrderRequest;
}
/**
*
* @param udiwmsBasicSkPrescribeRequest
* @return
*/
@Override
public BaseResponse getPrescribes(UdiwmsBasicSkPrescribeRequest udiwmsBasicSkPrescribeRequest) {
LambdaQueryWrapper<PresInfoEntity> wrapper = new LambdaQueryWrapper();
//补充其他查询条件
IPage<PresInfoEntity> page = presInfoMapper.selectPage(new Page<PresInfoEntity>(udiwmsBasicSkPrescribeRequest.getPage(),udiwmsBasicSkPrescribeRequest.getLimit()),wrapper);
List<PresInfoEntity> presInfoEntities = page.getRecords();
List<BasicSkPrescribeResponse> basicSkPrescribeResponses = null;
if(CollUtil.isNotEmpty(presInfoEntities)){
//数据处理以basic_sk_prescribebasic_sk_prescribe_item 主子返回
basicSkPrescribeResponses = presInfoEntities.stream().map(pres -> {
BasicSkPrescribeResponse basicSkPrescribeResponse = new BasicSkPrescribeResponse();
List<BasicSkPrescribeItemEntity> itemList = new ArrayList<>();
BasicSkPrescribeItemEntity item = new BasicSkPrescribeItemEntity();
//TODO 封装数据
itemList.add(item);
basicSkPrescribeResponse.setItemList(itemList);
return basicSkPrescribeResponse;
}).collect(Collectors.toList());
}
PageSimpleResponse<BasicSkPrescribeResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal());
pageSimpleResponse.setList(basicSkPrescribeResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
/**
*
* @param udiwmsThrOrderRequest
* @return
*/
@Override
public BaseResponse getThrOrders(UdiwmsThrOrderRequest udiwmsThrOrderRequest) {
LambdaQueryWrapper<PlanInfoEntity> wrapper = new LambdaQueryWrapper<>();
//补充其他查询条件
IPage<PlanInfoEntity> page = planInfoMapper.selectPage(new Page<PlanInfoEntity>(udiwmsThrOrderRequest.getPage(),udiwmsThrOrderRequest.getLimit()),wrapper);
List<PlanInfoEntity> planInfoEntities = page.getRecords();
List<ThrOrderResponse> thrOrderResponses = null;
if(CollUtil.isNotEmpty(planInfoEntities)){
//数据处理以thr_orderthr_order_detail 主子返回
thrOrderResponses = planInfoEntities.stream().map(plan->{
ThrOrderResponse thrOrderResponse = new ThrOrderResponse();
List<ThrOrderDetailEntity> detailList = new ArrayList<>();
ThrOrderDetailEntity detail = new ThrOrderDetailEntity();
//TODO 封装数据
detailList.add(detail);
thrOrderResponse.setDetailList(detailList);
return thrOrderResponse;
}).collect(Collectors.toList());
}
PageSimpleResponse<ThrOrderResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal());
pageSimpleResponse.setList(thrOrderResponses);
return ResultVOUtils.success(pageSimpleResponse);
}
}

Loading…
Cancel
Save