1/25 龙海新增接口1.0

Lhxyy
wangwei 2 months ago
parent 8c05e1a1e2
commit b3236b80ae

@ -3,6 +3,7 @@ package com.glxp.mipsdl.client.lhzyy;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -25,6 +26,7 @@ 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.ctqyy.MaterialDictEntity;
import com.glxp.mipsdl.entity.inout.IoCodeEntity; import com.glxp.mipsdl.entity.inout.IoCodeEntity;
import com.glxp.mipsdl.entity.inout.IoOrderDetailBizEntity; import com.glxp.mipsdl.entity.inout.IoOrderDetailBizEntity;
import com.glxp.mipsdl.entity.inout.IoOrderEntity; import com.glxp.mipsdl.entity.inout.IoOrderEntity;
@ -35,17 +37,17 @@ import com.glxp.mipsdl.entity.thrsys.ThrProductsEntity;
import com.glxp.mipsdl.entity.thrsys.ThrSystemBusApiEntity; 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.ctqyy.CtqyyRequest;
import com.glxp.mipsdl.req.dsxyy.DsOrderRequest; import com.glxp.mipsdl.req.dsxyy.DsOrderRequest;
import com.glxp.mipsdl.req.lhzyy.LhProductRequest; import com.glxp.mipsdl.req.lhzyy.LhProductRequest;
import com.glxp.mipsdl.req.lhzyy.LhUnitRequest; import com.glxp.mipsdl.req.lhzyy.LhUnitRequest;
import com.glxp.mipsdl.req.post.PostFileThrOrderRequest; import com.glxp.mipsdl.req.post.*;
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.req.yxzyy.YxBusTypeRequest; import com.glxp.mipsdl.req.yxzyy.YxBusTypeRequest;
import com.glxp.mipsdl.req.yxzyy.YxProductRequest; import com.glxp.mipsdl.req.yxzyy.YxProductRequest;
import com.glxp.mipsdl.req.yxzyy.YxUnitRequest; import com.glxp.mipsdl.req.yxzyy.YxUnitRequest;
import com.glxp.mipsdl.res.BaseResponse; import com.glxp.mipsdl.res.BaseResponse;
import com.glxp.mipsdl.res.ctqyy.CtBaseResponse;
import com.glxp.mipsdl.res.udiwms.UdiRelevanceResponse;
import com.glxp.mipsdl.service.auth.AuthWarehouseService; import com.glxp.mipsdl.service.auth.AuthWarehouseService;
import com.glxp.mipsdl.service.thrsys.ThrCorpService; import com.glxp.mipsdl.service.thrsys.ThrCorpService;
import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService; import com.glxp.mipsdl.service.thrsys.ThrSystemDetailService;
@ -361,4 +363,46 @@ public class LhzyyClient extends CommonHttpClient {
public BaseResponse submitPreInOrders(UdiwmsPreInOrderRequest udiwmsPreInOrderRequest) { public BaseResponse submitPreInOrders(UdiwmsPreInOrderRequest udiwmsPreInOrderRequest) {
return null; return null;
} }
@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()))
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());
return null;
}
} }

Loading…
Cancel
Save