手动补救有些码没拉到关联关系
parent
234177ec75
commit
7937b1fa73
@ -0,0 +1,64 @@
|
|||||||
|
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("没有需要调用关联关系的码列表");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package com.glxp.api.req.alihealth.local;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.collect.IoCollectCodeBackup;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AlihealthGetRelCodeReqeust {
|
||||||
|
|
||||||
|
private List<IoCollectCodeBackup> ioCollectCodeBackupList;
|
||||||
|
}
|
Loading…
Reference in New Issue