| | |
| | | @ManagerAuth |
| | | public R edit(BasWrkIotype basWrkIotype) { |
| | | if (Cools.isEmpty(basWrkIotype)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | if (null == basWrkIotype.getIoType()){ |
| | | basWrkIotypeService.insert(basWrkIotype); |
| | |
| | | @ManagerAuth(memo = "入出库类型修改") |
| | | public R update(BasWrkIotype basWrkIotype){ |
| | | if (Cools.isEmpty(basWrkIotype) || null==basWrkIotype.getIoType()){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | basWrkIotype.setModiUser(getUserId()); |
| | | basWrkIotype.setModiTime(new Date()); |
| | |
| | | public R delete(@RequestParam String param){ |
| | | List<BasWrkIotype> list = JSONArray.parseArray(param, BasWrkIotype.class); |
| | | if (Cools.isEmpty(list)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | for (BasWrkIotype entity : list){ |
| | | basWrkIotypeService.delete(new EntityWrapper<>(entity)); |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<BasWrkIotype> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("io_desc", condition); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<BasWrkIotype> page = basWrkIotypeService.selectPage(new Page<>(0, 30), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (BasWrkIotype basWrkIotype : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |