检验方法新增方法名改为可重复

feature_ymf_dev
yangmaofu 2 weeks ago
parent 40253c9b25
commit cc27e3c79b
  1. 31
      lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineWayController.java

@ -98,14 +98,15 @@ public class ExamineWayController extends BladeController {
*/
@PostMapping("/insert")
public boolean insertExamine(@RequestBody ExamineWay entry) throws Exception {
List<ExamineWay> list = service.list();
if (list != null && list.size() > 0) {
for (ExamineWay examineWay : list) {
if (entry.getName().equals(examineWay.getName())) {
throw new Exception("名称重复");
}
}
}
//注掉原因:新需求 添加动物种类字段,相同名称不同动物种类使用仪器会有所不同
// List<ExamineWay> list = service.list();
// if (list != null && list.size() > 0) {
// for (ExamineWay examineWay : list) {
// if (entry.getName().equals(examineWay.getName())) {
// throw new Exception("名称重复");
// }
// }
// }
// if (entry.getInstrumentId() != null) {
// Instrument instrument = instrumentService.getById(entry.getInstrumentId());
// entry.setInstrumentName(instrument.getName());
@ -122,4 +123,18 @@ public class ExamineWayController extends BladeController {
public R deleteByIds(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids)));
}
/**
* 明细
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 2)
public R<Object> detail(ExamineWay entry) {
LambdaQueryWrapper<ExamineWay> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ExamineWay::getId, entry.getId());
ExamineWay page = service.getById(entry.getId());
return R.data(page);
}
}

Loading…
Cancel
Save