|
|
|
package com.glxp.api.controller.alihealth;
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
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.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@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(CollUtil.isNotEmpty(list)){
|
|
|
|
AlihealthGetRelCodeReqeust alihealthGetRelCodeReqeust = new AlihealthGetRelCodeReqeust();
|
|
|
|
alihealthGetRelCodeReqeust.setIoCollectCodeBackupList(list);
|
|
|
|
BaseResponse baseResponse = spGetHttpClient.getAliCode(alihealthGetRelCodeReqeust);
|
|
|
|
return baseResponse;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
return ResultVOUtils.success("没有需要调用关联关系的码列表");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|