优化代码

dev_drug_dm
qiuyt 1 month ago
parent d68671387a
commit 38b7c5fe54

@ -31,6 +31,7 @@ import com.glxp.api.req.thrsys.ThirdAliDrugRequest;
import com.glxp.api.res.PageSimpleResponse;
import com.glxp.api.res.alihealth.AlihealthKytGetentinfoResponse;
import com.glxp.api.service.alihealth.AlihealthBusService;
import com.glxp.api.service.basic.UdiContrastService;
import com.glxp.api.service.collect.RelCodeBatchService;
import com.glxp.api.service.inout.IoOrderService;
import com.glxp.api.util.alihealth.AlihealthUtils;
@ -269,6 +270,25 @@ public class AlihealthBusController extends BaseController {
return ResultVOUtils.success("成功");
}
@Resource
private UdiContrastService udiContrastService;
@PostMapping("/spms/alihealth/codeRelUpdateBatch")
@Log(title = "上传国家库多码融合库", businessType = BusinessType.OTHER)
public BaseResponse codeRelUpdateBatch(@RequestBody List<CodeRel> list) {
return udiContrastService.codeRelUpdateBatch(list);
}
@PostMapping("/spms/alihealth/deleteRelCode")
@Log(title = "删除多玛融合库", businessType = BusinessType.OTHER)
public BaseResponse deleteRelCode(@RequestBody CodeRel codeRel) {
return udiContrastService.deleteRelCode(codeRel);
}
@PostMapping("/spms/alihealth/optThirdAliDrug")
@Log(title = "删除多玛融合库", businessType = BusinessType.OTHER)
public BaseResponse optThirdAliDrug(@RequestBody ThirdAliDrugRequest thirdAliDrugRequest) {
return ResultVOUtils.success(udiContrastService.optThirdAliDrug(thirdAliDrugRequest));
}
}

@ -485,7 +485,7 @@ public class UdiContrastService {
*
* @param list
*/
public void codeRelUpdateBatch(List<CodeRel> list) {
public BaseResponse codeRelUpdateBatch(List<CodeRel> list) {
if (list != null && list.size() > 0) {
try {
@ -494,18 +494,23 @@ public class UdiContrastService {
if (baseResponse.getCode() == 20000) {
log.error("国家库===上传多码关系===" + list.get(0).getYbbm() + "成功===");
return ResultVOUtils.success("国家库===上传多码关系===" + list.get(0).getYbbm() + "成功===");
} else {
log.error("国家库===上传多码关系===出现错误===" + baseResponse.getMessage());
return ResultVOUtils.error(500,"国家库===上传多码关系===出现错误===" + baseResponse.getMessage());
}
} catch (Exception e) {
log.error("国家库===上传多码关系===出现错误===" + e.getMessage());
return ResultVOUtils.error(500,"国家库===上传多码关系===出现错误==="+e.getMessage());
}
} else {
log.error("国家库===上传多码关系===出现错误===数据为空");
return ResultVOUtils.error(500,"国家库===上传多码关系===出现错误===数据为空");
}
@ -516,21 +521,24 @@ public class UdiContrastService {
*
* @param codeRel
*/
public void deleteRelCode(CodeRel codeRel) {
public BaseResponse deleteRelCode(CodeRel codeRel) {
try {
String response = HttpUtil.post(udiUrl + "/udchs/codeRel/delete", JSONUtil.toJsonStr(codeRel));
BaseResponse<String> baseResponse = JSONUtil.toBean(response, BaseResponse.class);
if (baseResponse.getCode() == 20000) {
return ResultVOUtils.success("国家库===删除多玛关系===成功");
} else {
log.error("国家库===删除多玛关系===出现错误===" + baseResponse.getMessage());
return ResultVOUtils.error(500,"国家库===上传多码关系===出现错误===" + baseResponse.getMessage());
}
} catch (Exception e) {
log.error("国家库===删除多玛关系===出现错误===" + e.getMessage());
return ResultVOUtils.error(500,"国家库===上传多码关系===出现错误==="+e.getMessage());
}
}

@ -1309,3 +1309,12 @@ call Modify_index('io_code', 'code', 'idex_code_query', 'BTREE');
call Modify_index('io_code_temp', 'code', 'idex_code_temp_query', 'BTREE');
CALL Modify_index('io_order_detail_code', 'orderIdFk', 'idex_query_orderIdFk', 'BTREE');
CALL Modify_index('io_order_detail_biz', 'orderIdFk', 'idex_query_orderIdFk', 'BTREE');
CALL Modify_index('rel_code_detail', 'curCode', 'rel_code_detail_curCode', 'BTREE');
CALL Modify_index('rel_code_detail', 'curCode', 'rel_code_detail_parentCode', 'BTREE');
CALL Modify_index('rel_code_batch', 'productCode', 'rel_code_batch_productCode', 'BTREE');
CALL Modify_index('rel_code_batch', 'curCode', 'rel_code_batch_curCode', 'BTREE');
CALL Modify_index('rel_code_batch', 'packageSpec', 'rel_code_batch_packageSpec', 'BTREE');

Loading…
Cancel
Save