You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.3 KiB
Java
65 lines
2.3 KiB
Java
4 months ago
|
package com.glxp.api.controller.alihealth;
|
||
|
|
||
|
import cn.hutool.core.bean.BeanUtil;
|
||
|
import cn.hutool.core.collection.CollUtil;
|
||
|
import cn.hutool.http.HttpUtil;
|
||
|
import cn.hutool.json.JSONUtil;
|
||
|
import com.alibaba.fastjson.JSONObject;
|
||
|
import com.alibaba.fastjson.TypeReference;
|
||
|
import com.github.pagehelper.PageInfo;
|
||
|
import com.glxp.api.annotation.Log;
|
||
|
import com.glxp.api.common.res.BaseResponse;
|
||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||
|
import com.glxp.api.constant.BusinessType;
|
||
|
import com.glxp.api.controller.BaseController;
|
||
|
|
||
|
import com.glxp.api.dao.collect.IoCollectCodeBackMapper;
|
||
|
import com.glxp.api.entity.collect.IoCollectCodeBackup;
|
||
|
import com.glxp.api.http.sync.SpGetHttpClient;
|
||
|
import com.glxp.api.req.alihealth.local.AlihealthGetRelCodeReqeust;
|
||
|
import com.glxp.api.req.collect.IoCollectCodeRequest;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.apache.commons.lang3.StringUtils;
|
||
|
import org.springframework.beans.factory.annotation.Value;
|
||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
import javax.annotation.Resource;
|
||
|
import java.util.ArrayList;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
import java.util.stream.Collectors;
|
||
|
|
||
|
@Slf4j
|
||
|
@RestController
|
||
|
public class AlihealthBusController extends BaseController {
|
||
|
@Resource
|
||
|
private IoCollectCodeBackMapper ioCollectCodeBackMapper;
|
||
|
@Resource
|
||
|
private SpGetHttpClient spGetHttpClient;
|
||
|
|
||
|
/**
|
||
|
* 阿里手动拉取完成单大级码没有关联关系的接口
|
||
|
*
|
||
|
* @return
|
||
|
*/
|
||
|
@PostMapping("/spms/alihealth/getAliCode")
|
||
|
@Log(title = "获取阿里药品的采购单码明细", businessType = BusinessType.OTHER)
|
||
|
public BaseResponse getAliCode() {
|
||
|
|
||
|
List<IoCollectCodeBackup> list = ioCollectCodeBackMapper.filterNotRelCode(new IoCollectCodeRequest());
|
||
|
if(list!=null && list.size() >1){
|
||
|
AlihealthGetRelCodeReqeust alihealthGetRelCodeReqeust = new AlihealthGetRelCodeReqeust();
|
||
|
alihealthGetRelCodeReqeust.setIoCollectCodeBackupList(list);
|
||
|
BaseResponse baseResponse = spGetHttpClient.getAliCode(alihealthGetRelCodeReqeust);
|
||
|
return baseResponse;
|
||
|
|
||
|
}else {
|
||
|
return ResultVOUtils.success("没有需要调用关联关系的码列表");
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|