| | |
| | | * @return |
| | | */ |
| | | @RequestMapping("/in-handle") |
| | | public ModelAndView inHandle() { |
| | | public ModelAndView inHandle(HttpServletRequest httpRequest, @RequestParam(value = "sort", required = false) String sort) { |
| | | |
| | | //如果没有指定地磅,从用户上一个选择中获取 |
| | | if (StringUtils.isEmpty(sort)) { |
| | | sort = commonManager.getInoutWeightByClient(httpRequest); |
| | | } |
| | | |
| | | ModelAndView view = new ModelAndView(); |
| | | |
| | |
| | | // 当前流程节点 |
| | | view.addObject("progress", InoutConstant.PROGRESS_HANDLE); |
| | | |
| | | // 粮食品种下拉框 |
| | | List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger( |
| | | Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId()); |
| | | view.addObject("listFoodVariety", listFoodVariety); |
| | | // 远程智慧卡 |
| | | // 获取出入库设备配置信息 |
| | | List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(user.getCompanyId(), deptId); |
| | | InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_80, InoutConstant.PROGRESS_WEIGHT_TAG, 1); |
| | | if (null != conf) conf.setSort(sort); |
| | | view.addObject("cardDto", conf); |
| | | |
| | | // 粮食等级下拉框 |
| | | List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger( |
| | | Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId()); |
| | | view.addObject("listFoodLevel", listFoodLevel); |
| | | |
| | | view.setViewName("admin/inout/in-handle"); |
| | | return view; |
| | |
| | | @Transactional |
| | | public PageResponse<InoutData> submitWeight(@RequestBody InoutData data) throws Exception { |
| | | |
| | | if(null == data.getJjlx()) data.setJjlx("0"); |
| | | if (null == data.getJjlx()) data.setJjlx("0"); |
| | | |
| | | if (InoutConstant.TYPE_IN.equals(data.getType())) { |
| | | return inoutManager.submitWeightIn(data); |
| | | } else { |
| | | return inoutManager.submitWeightOut(data); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 出入库称重环节提交,请注意:值仓挑提交的数据非出入库流水完整信息,不能直接调用update方法 |
| | | * |
| | | * @param data |
| | | * @return |
| | | */ |
| | | @RequestMapping("/submit-handle") |
| | | @Transactional |
| | | public PageResponse<InoutData> submitHandle(@RequestBody InoutData data) throws Exception { |
| | | |
| | | return inoutManager.submitHandle(data); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping("/get-check-item") |
| | | public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutCheckParam param) { |
| | | return inoutManager.getCheckItemData(param); |
| | | return inoutManager.getCheckItemData(param); |
| | | } |
| | | |
| | | /** |