多码融合表增加字段和逻辑

v3
qiuyt 3 months ago
parent 4d4190b5bc
commit 0179e57d73

@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageInfo;
import com.glxp.udidl.admin.entity.collect.ThirdAliDrug;
import com.glxp.udidl.admin.enums.ResultEnum;
@ -18,12 +19,14 @@ import com.glxp.udidl.admin.service.collect.ThirdAliDrugService;
import com.glxp.udidl.admin.util.ResultVOUtils;
import com.glxp.udidl.admin.util.alihealth.AlihealthUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
@RestController
@ -119,12 +122,34 @@ public class ThirdAliDrugController {
@PostMapping("/udiwms/aliDrug/optThirdAliDrug")
public BaseResponse optThirdAliDrug(@RequestBody @Valid ThirdAliDrugRequest thirdAliDrugRequest, BindingResult bindingResult) {
if (StrUtil.isEmpty(thirdAliDrugRequest.getNameCode())) {
return ResultVOUtils.error(ResultEnum.DATA_REPEAT,"标识参数不能为空");
}
ThirdAliDrug thirdAliDrugServiceOne = thirdAliDrugService.getOne(
new QueryWrapper<ThirdAliDrug>().eq("nameCode", thirdAliDrugRequest.getNameCode()).last("limit 1")
);
String str = "";
List<ThirdAliDrug> thirdAliDrugList = new ArrayList<>();
if (thirdAliDrugServiceOne != null) {
thirdAliDrugList = thirdAliDrugService.list(
new QueryWrapper<ThirdAliDrug>().eq(StringUtils.isNotBlank(thirdAliDrugServiceOne.getBzgg()), "bzgg", thirdAliDrugServiceOne.getBzgg())
.eq(StringUtils.isNotBlank(thirdAliDrugServiceOne.getPackRatio()), "packRatio", thirdAliDrugServiceOne.getPackRatio())
.like(StringUtils.isNotBlank(thirdAliDrugRequest.getCpmctymc()), "cpmctymc", thirdAliDrugRequest.getCpmctymc())
.like(StringUtils.isNotBlank(thirdAliDrugRequest.getManufacturer()), "manufacturer", thirdAliDrugRequest.getManufacturer())
.like(StringUtils.isNotBlank(thirdAliDrugRequest.getApprovalNum()), "approvalNum", thirdAliDrugRequest.getApprovalNum())
.like(StringUtils.isNotBlank(thirdAliDrugRequest.getFormSpec()), "formSpec", thirdAliDrugRequest.getFormSpec())
.like(StringUtils.isNotBlank(thirdAliDrugRequest.getBzgg()), "bzgg", thirdAliDrugRequest.getBzgg())
);
}
return ResultVOUtils.success(thirdAliDrugList);
}
@GetMapping("/udiwms/aliDrug/111")
public BaseResponse teest111() {
thirdAliDrugService.updateThirdAliDrugTask();
return ResultVOUtils.success();
}
}

Loading…
Cancel
Save