|
|
|
@ -1,18 +1,20 @@
|
|
|
|
|
package com.glxp.mipsdl.controller;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.glxp.mipsdl.req.yb.DictRequest;
|
|
|
|
|
import com.glxp.mipsdl.req.yb.Yljg1201Request;
|
|
|
|
|
import com.glxp.mipsdl.res.BaseResponse;
|
|
|
|
|
import com.glxp.mipsdl.service.yb.YbClient;
|
|
|
|
|
import com.glxp.mipsdl.util.ResultVOUtils;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
@Slf4j
|
|
|
|
|
@RestController
|
|
|
|
|
public class YbApiController {
|
|
|
|
|
@Resource
|
|
|
|
@ -27,7 +29,8 @@ public class YbApiController {
|
|
|
|
|
@PostMapping("/udiwms/erp/yb/1201")
|
|
|
|
|
public BaseResponse getYb1201(@RequestBody Yljg1201Request yljg1201Request) {
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(yljg1201Request);
|
|
|
|
|
return ResultVOUtils.success(ybClient.ybPost("1201", JSON.parseObject(jsonStr)));
|
|
|
|
|
log.error("【1201】医药机构信息获取请求参数:" + jsonStr);
|
|
|
|
|
return ResultVOUtils.success(ybClient.ybPost("1201", jsonStr));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +40,8 @@ public class YbApiController {
|
|
|
|
|
@PostMapping("/udiwms/erp/yb/dict")
|
|
|
|
|
public BaseResponse getYb1301(@RequestBody DictRequest dictRequest) {
|
|
|
|
|
String jsonStr = JSONUtil.toJsonStr(dictRequest.getData());
|
|
|
|
|
return ResultVOUtils.success(ybClient.ybPost(dictRequest.getApiCode(), JSON.parseObject(jsonStr)));
|
|
|
|
|
log.error("【1301】通用字典下载接口请求参数:" + jsonStr);
|
|
|
|
|
return ResultVOUtils.success(ybClient.ybPost(dictRequest.getApiCode(), jsonStr));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|