|
|
|
@ -37,11 +37,17 @@ import com.glxp.mipsdl.entity.inout.*;
|
|
|
|
|
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.UdiwmsInvProductsRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.base.UdiwmsOrderDetailRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.base.UdiwmsOrderRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.ptxhyy.PtxhyyInvRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.ptxhyy.PtxhyyOrderDetailRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.ptxhyy.PtxhyyOrderRequest;
|
|
|
|
|
import com.glxp.mipsdl.res.BaseResponse;
|
|
|
|
|
import com.glxp.mipsdl.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.mipsdl.res.ptxhyy.PtxhInvResponse;
|
|
|
|
|
import com.glxp.mipsdl.res.udiwms.InvProductRequest;
|
|
|
|
|
import com.glxp.mipsdl.res.udiwms.ThrInvResultResponse;
|
|
|
|
|
import com.glxp.mipsdl.service.auth.AuthWarehouseService;
|
|
|
|
|
import com.glxp.mipsdl.service.order.OrderUploadLogService;
|
|
|
|
|
import com.glxp.mipsdl.service.thrsys.ThrCorpService;
|
|
|
|
@ -288,6 +294,7 @@ public class PtxhyyClient extends CommonHttpClient {
|
|
|
|
|
return submitOrder(orderEntity, ptxhyyOrderRequest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 本地提交错误
|
|
|
|
|
*
|
|
|
|
@ -370,6 +377,13 @@ public class PtxhyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 提交单据
|
|
|
|
|
*
|
|
|
|
|
* @param orderEntity
|
|
|
|
|
* @param udiwmsOrderRequest
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public BaseResponse submitOrder(IoOrderEntity orderEntity, Object udiwmsOrderRequest) {
|
|
|
|
|
//记录日志
|
|
|
|
|
IoOrderUploadLogEntity uploadLog = new IoOrderUploadLogEntity();
|
|
|
|
@ -422,6 +436,45 @@ public class PtxhyyClient extends CommonHttpClient {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取库存/出入库明细信息
|
|
|
|
|
*/
|
|
|
|
|
public BaseResponse getInvResult(InvProductRequest invProductRequest) {
|
|
|
|
|
PtxhyyInvRequest ptxhyyInvRequest = new PtxhyyInvRequest();
|
|
|
|
|
ptxhyyInvRequest.setKssj(DateUtil.formatDate(invProductRequest.getStartDate(), "yyyy-MM-dd"));
|
|
|
|
|
ptxhyyInvRequest.setJssj(DateUtil.formatDate(invProductRequest.getEndDate(), "yyyy-MM-dd"));
|
|
|
|
|
|
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(null) + "/api/foreign/CKCX", ptxhyyInvRequest);
|
|
|
|
|
|
|
|
|
|
BaseResponse<PageSimpleResponse<PtxhInvResponse>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<PtxhInvResponse>>>() {
|
|
|
|
|
});
|
|
|
|
|
if (baseResponse.getCode() == 20000) {
|
|
|
|
|
List<PtxhInvResponse> ptxhInvResponses = baseResponse.getData().getList();
|
|
|
|
|
List<ThrInvResultResponse> thrInvResultResponses = new ArrayList<>();
|
|
|
|
|
if (CollUtil.isNotEmpty(ptxhInvResponses)) {
|
|
|
|
|
for (PtxhInvResponse ptxhInvResponse : ptxhInvResponses) {
|
|
|
|
|
ThrInvResultResponse thrInvResultResponse = new ThrInvResultResponse();
|
|
|
|
|
thrInvResultResponse.setThrCode(ptxhInvResponse.getFyxh());
|
|
|
|
|
thrInvResultResponse.setCpmctymc(ptxhInvResponse.getFymc());
|
|
|
|
|
thrInvResultResponse.setPrice(ptxhInvResponse.getFydj());
|
|
|
|
|
thrInvResultResponse.setMeasname(ptxhInvResponse.getDw());
|
|
|
|
|
thrInvResultResponse.setDeptName(ptxhInvResponse.getZxks());
|
|
|
|
|
thrInvResultResponse.setInvName(ptxhInvResponse.getZxks());
|
|
|
|
|
thrInvResultResponse.setType(ptxhInvResponse.getLb());
|
|
|
|
|
thrInvResultResponse.setRelCount(ptxhInvResponse.getZsl());
|
|
|
|
|
thrInvResultResponses.add(thrInvResultResponse);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
PageSimpleResponse<ThrInvResultResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
pageSimpleResponse.setTotal(thrInvResultResponses.size() + 0l);
|
|
|
|
|
pageSimpleResponse.setList(thrInvResultResponses);
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
return baseResponse;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// public void getHslb() {
|
|
|
|
|
// String response = httpClient.postJson(thrSystemDetailService.getUrl(null), udiwmsUnitRequest);
|
|
|
|
|
// BaseResponse baseResponse = JSONObject.parseObject(response, BaseResponse.class);
|
|
|
|
|