|
|
|
@ -5,6 +5,8 @@ import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
import com.alibaba.fastjson2.TypeReference;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
@ -13,6 +15,7 @@ import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.glxp.mipsdl.client.CommonHttpClient;
|
|
|
|
|
import com.glxp.mipsdl.client.ctqyy.entity.InvProjectResultEntity;
|
|
|
|
|
import com.glxp.mipsdl.client.ptxhyy.entity.HisProductEntity;
|
|
|
|
|
import com.glxp.mipsdl.client.ptxhyy.entity.OrderUploadResponse;
|
|
|
|
|
import com.glxp.mipsdl.client.ptxhyy.entity.ThrHslbEntity;
|
|
|
|
|
import com.glxp.mipsdl.client.ptxhyy.entity.ThrHslbService;
|
|
|
|
@ -48,12 +51,15 @@ import com.glxp.mipsdl.req.base.CompanyProductRelevanceRequest;
|
|
|
|
|
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.ctqyy.CtqyyRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.ctqyy.DlThirdProjectRequest;
|
|
|
|
|
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.BasicSkProjectResponse;
|
|
|
|
|
import com.glxp.mipsdl.res.udiwms.InvProductRequest;
|
|
|
|
|
import com.glxp.mipsdl.res.udiwms.ThrInvResultResponse;
|
|
|
|
|
import com.glxp.mipsdl.res.udiwms.UdiRlSupResponse;
|
|
|
|
@ -567,4 +573,47 @@ public class PtxhyyClient extends CommonHttpClient {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取项目组套字典
|
|
|
|
|
*
|
|
|
|
|
* @param dlThirdProjectRequest
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public BaseResponse getBasicProject(DlThirdProjectRequest dlThirdProjectRequest) {
|
|
|
|
|
|
|
|
|
|
dlThirdProjectRequest.setFygb("14");
|
|
|
|
|
String response = httpClient.postJson(thrSystemDetailService.getUrlExclude(null) + "/YLSF", dlThirdProjectRequest);
|
|
|
|
|
BaseResponse<PageSimpleResponse<HisProductEntity>> baseResponse =
|
|
|
|
|
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<HisProductEntity>>>() {
|
|
|
|
|
});
|
|
|
|
|
if (baseResponse.getCode() == 20000) {
|
|
|
|
|
PageSimpleResponse<HisProductEntity> pageSimpleResponse = baseResponse.getData();
|
|
|
|
|
List<HisProductEntity> list = pageSimpleResponse.getList();
|
|
|
|
|
List<BasicSkProjectEntity> basicSkProjectEntities = new ArrayList<>();
|
|
|
|
|
for (HisProductEntity hisProductEntity : list) {
|
|
|
|
|
BasicSkProjectEntity basicSkProjectEntity = new BasicSkProjectEntity();
|
|
|
|
|
basicSkProjectEntity.setCode(hisProductEntity.getFyxh());
|
|
|
|
|
basicSkProjectEntity.setName(hisProductEntity.getFymc());
|
|
|
|
|
basicSkProjectEntity.setType(2);
|
|
|
|
|
basicSkProjectEntity.setCreateTime(new Date());
|
|
|
|
|
basicSkProjectEntity.setUpdateTime(new Date());
|
|
|
|
|
basicSkProjectEntity.setRemark("自动下载");
|
|
|
|
|
basicSkProjectEntity.setCategory(hisProductEntity.getFydw());
|
|
|
|
|
basicSkProjectEntity.setGgxh(hisProductEntity.getSm());
|
|
|
|
|
basicSkProjectEntity.setUnit(hisProductEntity.getFydw());
|
|
|
|
|
basicSkProjectEntity.setPrice(hisProductEntity.getFydj());
|
|
|
|
|
basicSkProjectEntities.add(basicSkProjectEntity);
|
|
|
|
|
}
|
|
|
|
|
PageSimpleResponse<BasicSkProjectEntity> dataResponse = new PageSimpleResponse<>();
|
|
|
|
|
dataResponse.setTotal(basicSkProjectEntities.size() + 0l);
|
|
|
|
|
dataResponse.setList(basicSkProjectEntities);
|
|
|
|
|
return ResultVOUtils.success(dataResponse);
|
|
|
|
|
}
|
|
|
|
|
return ResultVOUtils.error(500, "获取项目组套字典失败!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|