| | |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocNormal; |
| | | import com.zy.asrs.entity.LocNormalLog; |
| | | import com.zy.asrs.entity.LocNormalReport; |
| | |
| | | allLike(LocNormal.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } else { |
| | | wrapper.orderBy("appe_time", false); |
| | | } |
| | | if (Cools.isEmpty(param.get("state"))) { |
| | | wrapper.in("state", "1,2"); |
| | |
| | | locNormalService.outLocNormal(param.getMatnr(), modiUser, modiTime, param.getId()); |
| | | } |
| | | |
| | | /** |
| | | * 批量修改物料状态 |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/locNormal/getAllLocDetlData") |
| | | @ManagerAuth(memo = "批量修改物料状态") |
| | | public R getAllLocDetlData(@RequestBody JSONObject param) { |
| | | List<LocNormal> list = JSONObject.parseArray(param.getJSONArray("list").toJSONString(), LocNormal.class); |
| | | Integer result = locNormalService.getAllLocDetlData(list); |
| | | return R.ok().add(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locNormal/removeLoc/auth") |
| | | @ManagerAuth |
| | | public void removeLoc(LocNormal param) { |
| | |
| | | LocNormalExcelListener listener = new LocNormalExcelListener(getUserId()); |
| | | EasyExcel.read(file.getInputStream(), LocNormalExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功导入" + listener.getTotal() + "条物料信息"); |
| | | } |
| | | |
| | | /* 导出 */ |
| | | @RequestMapping(value = "/locNormal/export/auth") |
| | | @ManagerAuth(memo = "平仓管理导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<LocNormal> wrapper = new EntityWrapper<LocNormal>(); |
| | | wrapper.ne("state", "3"); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("exportData")); |
| | | convert(map, wrapper); |
| | | List<LocNormal> list = locNormalService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | /* 平仓入库 成品 */ |
| | |
| | | allLike(LocNormalLog.class, param.keySet(), wrapper, condition); |
| | | return R.ok(locNormalLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/locNomal/normalReportExport.action") |
| | | @ManagerAuth(memo = "日入库明细统计导出") |
| | | public R normalReportExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | List<LocNormalLog> list = JSONObject.parseArray(param.getJSONArray("exportData").toJSONString(), LocNormalLog.class); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | } |