feat: 多码融合

dev_unify
chenhc 6 months ago
parent bbf9d799c1
commit 5a395d84f7

@ -20,6 +20,8 @@ import com.glxp.api.entity.inv.DeviceInspectTaskDetailEntity;
import com.glxp.api.entity.inv.DeviceInspectTaskEntity;
import com.glxp.api.entity.sync.SyncEditLogEntity;
import com.glxp.api.entity.sync.SyncEditTypeEntity;
import com.glxp.api.entity.thrsys.CodeRel;
import com.glxp.api.http.ErpBasicClient;
import com.glxp.api.req.basic.*;
import com.glxp.api.req.system.DeleteCompanyFileRequest;
import com.glxp.api.req.system.DeleteRequest;
@ -271,4 +273,24 @@ public class SyncDelController extends BaseController {
return ResultVOUtils.success("同步删除成功");
}
@Resource
ErpBasicClient erpBasicClient;
/**
*
*/
@PostMapping("/spms/udchs/codeRe/list")
public BaseResponse getCodeRelDetail(@RequestBody CodeRel codeRel) {
return erpBasicClient.getCodeRelDetail(codeRel);
}
/**
*
*/
@PostMapping("/spms/udchs/codeRe/update")
public BaseResponse updateCodeRelDetail(@RequestBody CodeRel codeRel) {
return erpBasicClient.updateCodeRelDetail(codeRel);
}
}

@ -0,0 +1,63 @@
package com.glxp.api.entity.thrsys;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName(value = "code_rel")
public class CodeRel {
public Integer id;
/**
*
*/
public String dinamecode;
/**
*
*/
public String drugcode;
/**
*
*/
public String ybbm;
/**
*
*/
public String yccode;
/**
*
*/
public String sptm;
/**
*
*/
public String ypbwm;
/**
*
*/
public String tyshxyh;
/**
* 9
*/
public String gjbm;
public String status;
public Date updatetime;
public Date createtime;
public Byte fromtype;
}

@ -6,10 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.thrsys.ThrManufacturerEntity;
import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity;
import com.glxp.api.entity.thrsys.ThrSystemEntity;
import com.glxp.api.entity.thrsys.YbDrug;
import com.glxp.api.entity.thrsys.*;
import com.glxp.api.http.req.UdiwmsBusTypeRequest;
import com.glxp.api.http.req.UdiwmsUnitRequest;
import com.glxp.api.req.basic.YbDrugDetailFilterRequest;
@ -26,6 +23,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* HttpClient
@ -218,17 +216,43 @@ public class ErpBasicClient {
}
}
public BaseResponse<PageSimpleResponse<YbDrug>> getYbDrugDetail(YbDrugDetailFilterRequest ybHcflDetailFilterRequest) {
String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/ybDrug/list";
/**
*
* @param codeRel
* @return
*/
public BaseResponse<List<CodeRel>> getCodeRelDetail(CodeRel codeRel) {
String url = "https://www.udims.com/UDI_DL_Server_test" + "/udchs/codeRel/list";
try {
String response = httpOkClient.uCloudPost(url, ybHcflDetailFilterRequest);
BaseResponse<PageSimpleResponse<YbDrug>> listBaseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<YbDrug>>>() {
String response = httpOkClient.uCloudPost(url, codeRel);
BaseResponse<List<CodeRel>> listBaseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<List<CodeRel>>>() {
});
return listBaseResponse;
} catch (Exception e) {
log.error("医保药品详情", e);
log.error("获取多码融合表", e);
return ResultVOUtils.error(500, "连接第三方系统接口服务出错");
}
}
/**
*
* @param codeRel
* @return
*/
public BaseResponse updateCodeRelDetail(CodeRel codeRel) {
String url = "https://www.udims.com/UDI_DL_Server_test"+ "/udchs/codeRel/update";
try {
String response = httpOkClient.uCloudPost(url, codeRel);
BaseResponse listBaseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
return listBaseResponse;
} catch (Exception e) {
log.error("更新多码融合表", e);
return ResultVOUtils.error(500, "连接第三方系统接口服务出错");
}
}
}

Loading…
Cancel
Save