| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.common.web.BaseController; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(locDetlService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/stock/out/list/auth") |
| | | @ManagerAuth |
| | | public R stockOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | return R.ok(locDetlService.getStockOut(new Page<LocDetl>(curr, limit).setCondition(param))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/list/auth") |
| | |
| | | } else if (entry.getKey().endsWith("<")) { |
| | | wrapper.le(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue()))); |
| | | } else { |
| | | wrapper.eq(entry.getKey(), String.valueOf(entry.getValue())); |
| | | wrapper.like(entry.getKey(), String.valueOf(entry.getValue())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细添加") |
| | | public R add(LocDetl locDetl) { |
| | | locDetl.setModiUser(getUserId()); |
| | | locDetl.setModiTime(new Date()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细修改") |
| | | public R update(LocDetl locDetl){ |
| | | if (Cools.isEmpty(locDetl) || null==locDetl.getMatnr()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细删除") |
| | | public R delete(@RequestParam String param){ |
| | | List<LocDetl> list = JSONArray.parseArray(param, LocDetl.class); |
| | | if (Cools.isEmpty(list)){ |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "库位明细导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |