feat: 药品关联关系功能
parent
c5fed5f2aa
commit
7b0769acd6
@ -0,0 +1,94 @@
|
|||||||
|
package com.glxp.udidl.admin.controller.collect;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.udidl.admin.entity.collect.RelCodeBatch;
|
||||||
|
import com.glxp.udidl.admin.req.collect.RelCodeBatchRequest;
|
||||||
|
import com.glxp.udidl.admin.req.collect.RelCodeDetailRequest;
|
||||||
|
import com.glxp.udidl.admin.res.BaseResponse;
|
||||||
|
import com.glxp.udidl.admin.res.PageSimpleResponse;
|
||||||
|
import com.glxp.udidl.admin.res.collect.RelCodeBatchResponse;
|
||||||
|
import com.glxp.udidl.admin.service.collect.RelCodeBatchService;
|
||||||
|
import com.glxp.udidl.admin.util.ResultVOUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
public class RelCodeBatchController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private RelCodeBatchService relCodeBatchService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动添加
|
||||||
|
* @param relCodeBatchRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/udiwms/relCode/batch/add")
|
||||||
|
public BaseResponse add(@RequestBody @Valid RelCodeBatchRequest relCodeBatchRequest, BindingResult bindingResult) {
|
||||||
|
relCodeBatchService.add(relCodeBatchRequest);
|
||||||
|
return ResultVOUtils.success("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加拼箱
|
||||||
|
* @param relCodeBatchRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/udiwms/relCode/batch/addList")
|
||||||
|
public BaseResponse addRelCodeSpellBox(@RequestBody @Valid List<RelCodeBatchRequest> relCodeBatchRequest,BindingResult bindingResult) {
|
||||||
|
relCodeBatchService.addRelCodeSpellBox(relCodeBatchRequest);
|
||||||
|
return ResultVOUtils.success("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/filter")
|
||||||
|
public BaseResponse list(RelCodeBatchRequest relCodeBatchRequest, BindingResult bindingResult) {
|
||||||
|
List<RelCodeBatchResponse> relCodeBatchResponses = relCodeBatchService.filterList(relCodeBatchRequest);
|
||||||
|
PageInfo<RelCodeBatchResponse> pageInfo = new PageInfo<>(relCodeBatchResponses);
|
||||||
|
PageSimpleResponse<RelCodeBatchResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(relCodeBatchResponses);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/get")
|
||||||
|
public BaseResponse get(@RequestParam("id") Long id) {
|
||||||
|
RelCodeBatch relCodeBatch = relCodeBatchService.getById(id);
|
||||||
|
return ResultVOUtils.success(relCodeBatch);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/delete")
|
||||||
|
public BaseResponse delete(@RequestParam("id") Long id) {
|
||||||
|
relCodeBatchService.delete(id);
|
||||||
|
return ResultVOUtils.success("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/relCode/batch/update")
|
||||||
|
public BaseResponse update(@RequestBody @Valid RelCodeBatch relCodeBatch) {
|
||||||
|
relCodeBatchService.updateById(relCodeBatch);
|
||||||
|
return ResultVOUtils.success("修改成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/relCode/batch/deleteDetail")
|
||||||
|
public BaseResponse deleteDetail(@RequestParam("curCode") String curCode) {
|
||||||
|
relCodeBatchService.deleteDetail(curCode);
|
||||||
|
return ResultVOUtils.success("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/relCode/batch/deleteAllDetail")
|
||||||
|
public BaseResponse deleteAllDetail(@RequestBody List<RelCodeDetailRequest> detailList) {
|
||||||
|
relCodeBatchService.deleteAllDetail(detailList);
|
||||||
|
return ResultVOUtils.success("清空成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
//package com.glxp.udidl.admin.controller.collect;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//import com.github.pagehelper.PageInfo;
|
||||||
|
//import com.glxp.api.annotation.RepeatSubmit;
|
||||||
|
//import com.glxp.api.common.res.BaseResponse;
|
||||||
|
//import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
//import com.glxp.api.controller.BaseController;
|
||||||
|
//import com.glxp.api.entity.collect.RelCodeDetail;
|
||||||
|
//import com.glxp.api.req.collect.RelCodeDetailRequest;
|
||||||
|
//import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
//import com.glxp.api.res.collect.RelCodeDetailResponse;
|
||||||
|
//import com.glxp.api.service.collect.RelCodeDetailService;
|
||||||
|
//import lombok.extern.slf4j.Slf4j;
|
||||||
|
//import org.springframework.validation.BindingResult;
|
||||||
|
//import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
//import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
//import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
//import org.springframework.web.bind.annotation.RestController;
|
||||||
|
//
|
||||||
|
//import javax.annotation.Resource;
|
||||||
|
//import javax.validation.Valid;
|
||||||
|
//import java.util.List;
|
||||||
|
//
|
||||||
|
//@Slf4j
|
||||||
|
//@RestController
|
||||||
|
//public class RelCodeDetailController extends BaseController {
|
||||||
|
//
|
||||||
|
// @Resource
|
||||||
|
// private RelCodeDetailService relCodeDetailService;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 扫码
|
||||||
|
// * @param relCodeDetailRequest
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @RepeatSubmit()
|
||||||
|
// @PostMapping("/udiwms/relCode/detail/scanCode")
|
||||||
|
// public BaseResponse scanCode(@RequestBody @Valid RelCodeDetailRequest relCodeDetailRequest, BindingResult bindingResult) {
|
||||||
|
// RelCodeDetailResponse relCodeDetailResponse = relCodeDetailService.scanCode(relCodeDetailRequest);
|
||||||
|
// return ResultVOUtils.success(relCodeDetailResponse);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @GetMapping("/udiwms/relCode/detail/filter")
|
||||||
|
// public BaseResponse list(RelCodeDetailRequest relCodeDetailRequest, BindingResult bindingResult) {
|
||||||
|
// List<RelCodeDetailResponse> relCodeDetailResponses = relCodeDetailService.filterList(relCodeDetailRequest);
|
||||||
|
// PageInfo<RelCodeDetailResponse> pageInfo = new PageInfo<>(relCodeDetailResponses);
|
||||||
|
// PageSimpleResponse<RelCodeDetailResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
// pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
// pageSimpleResponse.setList(relCodeDetailResponses);
|
||||||
|
// return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @GetMapping("/udiwms/relCode/detail/get")
|
||||||
|
// public BaseResponse get(Long id) {
|
||||||
|
// RelCodeDetail relCodeDetail = relCodeDetailService.getById(id);
|
||||||
|
// return ResultVOUtils.success(relCodeDetail);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// @PostMapping("/udiwms/relCode/detail/update")
|
||||||
|
// public BaseResponse update(@RequestBody @Valid RelCodeDetail relCodeDetail) {
|
||||||
|
// relCodeDetailService.updateById(relCodeDetail);
|
||||||
|
// return ResultVOUtils.success("修改成功!");
|
||||||
|
// }
|
||||||
|
//}
|
Loading…
Reference in New Issue