| File was renamed from zy-asrs-wms/src/main/java/com/zy/asrs/wms/controller/ManMatController.java |
| | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class ManMatController extends BaseController { |
| | | public class MatController extends BaseController { |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @RequestMapping(value = "/manMat/{id}/auth") |
| | | @RequestMapping(value = "/mat/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok(matService.getById(id)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manMat/page/auth") |
| | | @RequestMapping(value = "/mat/page/auth") |
| | | @ManagerAuth |
| | | public R page(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/manMat/add/auth") |
| | | @RequestMapping(value = "/mat/add/auth") |
| | | @ManagerAuth |
| | | public R add(Mat mat) { |
| | | matService.save(mat); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manMat/update/auth") |
| | | @RequestMapping(value = "/mat/update/auth") |
| | | @ManagerAuth |
| | | public R update(Mat mat){ |
| | | if (Cools.isEmpty(mat) || null== mat.getId()){ |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manMat/delete/auth") |
| | | @RequestMapping(value = "/mat/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/manMatQuery/auth") |
| | | @RequestMapping(value = "/matQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | LambdaQueryWrapper<Mat> wrapper = new LambdaQueryWrapper<>(); |
| | |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping("/manMat/all/get/kv") |
| | | @RequestMapping("/mat/all/get/kv") |
| | | @ManagerAuth |
| | | public R getDataKV(@RequestParam(required = false) String condition) { |
| | | List<KeyValueVo> vos = new ArrayList<>(); |