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.
udi-wms-java/src/main/java/com/glxp/api/controller/alihealth/AlihealthBusController.java

52 lines
1.8 KiB
Java

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("没有需要调用关联关系的码列表");
}
}
}