新增小程序医保单位返回,药品字典编辑问题

dev_drug_dmyh250207
yewj 2 weeks ago
parent 66a6d5b776
commit 36323cdd88

@ -3,6 +3,7 @@ package com.glxp.api.controller.basic;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.annotation.Log;
@ -16,6 +17,7 @@ import com.glxp.api.constant.SyncDelType;
import com.glxp.api.controller.BaseController;
import com.glxp.api.controller.sync.SpsSyncWebSocket;
import com.glxp.api.dao.basic.UdiRelevanceDao;
import com.glxp.api.dao.thrsys.YbDrugMapper;
import com.glxp.api.dto.DictDto;
import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.sync.SocketMsgEntity;
@ -23,6 +25,7 @@ import com.glxp.api.entity.system.SystemParamConfigEntity;
import com.glxp.api.entity.thrsys.CodeRel;
import com.glxp.api.entity.thrsys.ThrProductsEntity;
import com.glxp.api.entity.thrsys.ThrSystemEntity;
import com.glxp.api.entity.thrsys.YbDrug;
import com.glxp.api.httpClient.serviceClient.ErpBasicClient;
import com.glxp.api.req.basic.*;
import com.glxp.api.req.system.DeleteRequest;
@ -39,6 +42,7 @@ import com.glxp.api.service.inv.InvProductService;
import com.glxp.api.service.system.SystemParamConfigService;
import com.glxp.api.service.thrsys.ThrDataService;
import com.glxp.api.service.thrsys.ThrSystemService;
import com.glxp.api.util.IntUtil;
import com.glxp.api.util.udi.FilterUdiUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult;
@ -83,8 +87,7 @@ public class UdiRelevanceController extends BaseController {
//手持终端下载UDI产品信息
@AuthRuleAnnotation("")
@GetMapping("/udi/udirel/download")
public BaseResponse downloadProducts(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse downloadProducts(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
@ -100,8 +103,7 @@ public class UdiRelevanceController extends BaseController {
@AuthRuleAnnotation("")
@GetMapping("/udi/udirel/mutil/download")
public BaseResponse downloadMutilProducts(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse downloadMutilProducts(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
@ -126,8 +128,7 @@ public class UdiRelevanceController extends BaseController {
//基础信息-耗材字典-查询页面、业务单据-选入耗材字典-查询页面
@AuthRuleAnnotation("")
@GetMapping("/udi/udirel/filterUdi")
public BaseResponse filterUdiGp(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse filterUdiGp(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
@ -156,7 +157,16 @@ public class UdiRelevanceController extends BaseController {
} else {
filterUdiRelRequest.setDiType(1);
}
List<UdiRelevanceResponse> udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiRelRequest);
if (IntUtil.value(filterUdiRelRequest.getMiniApp())) {
for (UdiRelevanceResponse udiRelevanceResponse : udiRelevanceResponses) {
YbDrug ybDrug = ybDrugMapper.selectOne(new LambdaQueryWrapper<YbDrug>().eq(YbDrug::getGoodsCode, udiRelevanceResponse.getYbbm()).last("limit 1"));
if (ybDrug != null)
udiRelevanceResponse.setYbUnit(ybDrug.getFactor() + "/" + ybDrug.getUnit() + "/" + ybDrug.getMinUnit());
}
}
PageInfo<UdiRelevanceResponse> pageInfo = new PageInfo<>(udiRelevanceResponses);
PageSimpleResponse<UdiRelevanceResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
@ -164,12 +174,13 @@ public class UdiRelevanceController extends BaseController {
return ResultVOUtils.success(pageSimpleResponse);
}
@Resource
YbDrugMapper ybDrugMapper;
//供应商器械信息选入
@AuthRuleAnnotation("")
@GetMapping("/udi/udirel/filterSmUdi")
public BaseResponse filterSmUdi(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse filterSmUdi(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
@ -196,8 +207,7 @@ public class UdiRelevanceController extends BaseController {
udiRelevanceResponses = udiRelevanceService.filterUdiGp(filterUdiRelRequest);
if (udiRelevanceResponses != null && udiRelevanceResponses.size() > 0) {
for (UdiRelevanceResponse udiRelevanceResponse : udiRelevanceResponses) {
UdiRlSupEntity companyProductRelevanceEntity =
udiRlSupService.findCompanyProductRelevanceByUdiRlIdFk(udiRelevanceResponse.getId() + "", filterUdiRelRequest.getCustomerId());
UdiRlSupEntity companyProductRelevanceEntity = udiRlSupService.findCompanyProductRelevanceByUdiRlIdFk(udiRelevanceResponse.getId() + "", filterUdiRelRequest.getCustomerId());
if (companyProductRelevanceEntity != null) {
udiRelevanceResponse.setIsSelect(true);
} else {
@ -504,8 +514,7 @@ public class UdiRelevanceController extends BaseController {
if (!udiCombineRequest.getSupEnable()) {
errMsg = basicUpdateProductService.addLocalProduct(udiCombineRequest);
}
if (StrUtil.isEmpty(errMsg))
return ResultVOUtils.success("添加成功!");
if (StrUtil.isEmpty(errMsg)) return ResultVOUtils.success("添加成功!");
else {
return ResultVOUtils.error(500, errMsg);
}
@ -531,8 +540,7 @@ public class UdiRelevanceController extends BaseController {
//获取产品信息详情(多平台)
@AuthRuleAnnotation("")
@GetMapping("/udiwms/udirel/thirdSys/filter")
public BaseResponse getThirdSysfilter(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse getThirdSysfilter(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
@ -561,8 +569,7 @@ public class UdiRelevanceController extends BaseController {
//获取产品信息详情(多平台)
@AuthRuleAnnotation("")
@GetMapping("/udiwms/udirel/thirdSys/filterOptimize")
public BaseResponse getThirdSysfilterOptimize(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse getThirdSysfilterOptimize(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
@ -592,8 +599,7 @@ public class UdiRelevanceController extends BaseController {
//获取对照过滤列表
@AuthRuleAnnotation("")
@GetMapping("/udiwms/udirel/thirdSys/detail")
public BaseResponse getThirdSysDetail(FilterUdiRelRequest filterUdiRelRequest,
BindingResult bindingResult) {
public BaseResponse getThirdSysDetail(FilterUdiRelRequest filterUdiRelRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());

@ -329,4 +329,6 @@ public class AddProductRequest {
@TableField(value = "hangingNetType")
private Integer hangingNetType;
private Boolean miniApp;
}

@ -137,5 +137,7 @@ public class FilterUdiRelRequest extends ListPageRequest {
*/
private Integer manuReview;
private Boolean miniApp;
}

@ -342,8 +342,6 @@ public class UdiRelevanceResponse {
private Integer manuReview;
/**
* 01
*/
@ -361,5 +359,9 @@ public class UdiRelevanceResponse {
private Integer hangingNetType;
/**
*
*/
private String ybUnit;
}

@ -188,8 +188,8 @@ public class UdiProductServiceImpl implements UdiProductService {
udiRelevanceEntity = udiRelevanceDao.selectById(addProductRequest.getRelId());
List<UdiProductEntity> udiProductEntities = udiProductDao.findByUuids(udiRelevanceEntity.getUuid());
for (UdiProductEntity udiProductEntity : udiProductEntities) {
if (StrUtil.isNotEmpty(addProductRequest.getNameCode()) && StrUtil.isNotEmpty(udiProductEntity.getNameCode())
&& udiProductEntity.getNameCode().equals(udiProductEntity.getNameCode())) {
if (IntUtil.value(addProductRequest.getMiniApp()) && StrUtil.isNotEmpty(addProductRequest.getNameCode()) && StrUtil.isNotEmpty(udiProductEntity.getNameCode())
&& addProductRequest.getNameCode().equals(udiProductEntity.getNameCode())) {
udiProductEntity.setBhxjsl(addProductRequest.getBhxjsl());
}
addProductRequest.setNameCode(udiProductEntity.getNameCode());

Loading…
Cancel
Save