| | |
| | | import com.fzzy.common.dto.BaseParam; |
| | | import com.fzzy.igds.constant.Constant; |
| | | import com.fzzy.igds.constant.RespCodeEnum; |
| | | import com.fzzy.igds.data.IgdsBaseParam; |
| | | import com.fzzy.igds.data.InoutParam; |
| | | import com.fzzy.igds.data.NoticeParam; |
| | | import com.fzzy.igds.data.PageResponse; |
| | | import com.fzzy.igds.data.*; |
| | | import com.fzzy.igds.domain.*; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 出入库值仓 |
| | | * @param httpRequest |
| | | * @param sort |
| | | * @param type |
| | | * @param view |
| | | * @return |
| | | */ |
| | | @RequestMapping("/handle") |
| | | public String handle(HttpServletRequest httpRequest, |
| | | @RequestParam(value = "sort", required = false) String sort, |
| | | @RequestParam(value = "type", required = false) String type, |
| | | ModelMap view) { |
| | | |
| | | //如果没有指定地磅,从用户上一个选择中获取 |
| | | if (StringUtils.isEmpty(sort)) { |
| | | sort = "1"; |
| | | } |
| | | if (StringUtils.isEmpty(sort)) { |
| | | sort = inoutManager.getInoutWeightByClient(httpRequest); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(type)) { |
| | | //默认入库 |
| | | type = Constant.TYPE_IN; |
| | | } |
| | | view.put("type", type); |
| | | |
| | | SysUser user = ContextUtil.getLoginUser(); |
| | | view.put(Constant.MODEL_KEY_LOGIN_USER, user); |
| | | String deptId = ContextUtil.subDeptId(user); |
| | | view.put("deptId", deptId); |
| | | |
| | | // 当前流程标签 |
| | | view.put("progress", Constant.PROGRESS_HANDLE); |
| | | |
| | | //入库流程配置 |
| | | String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), deptId, type); |
| | | view.put("inoutProgress", inoutProgress); |
| | | |
| | | // 类型 |
| | | List<SysDictData> listInoutType = commonManager.getInoutType(); |
| | | view.put("listInoutType", listInoutType); |
| | | |
| | | // 仓库列表做下拉框使用 |
| | | List<Depot> listDepot = commonManager.listDepotByDeptId(deptId); |
| | | view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot); |
| | | |
| | | // 粮食品种下拉框 |
| | | List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId()); |
| | | view.put("listFoodVariety", listFoodVariety); |
| | | |
| | | return prefix + "/handle"; |
| | | } |
| | | |
| | | /** |
| | | * 入库称重操作,包括空车称重和满车称重,共用一个页面 |
| | | * |
| | | * @param sort 表示使用的出入库设备配套号,不传递默认为1 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 出入库数据查询,根据条件查询数据,出入库数据信息 |
| | | * 获取待值仓的数据 |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping("/list-handle-data") |
| | | @ResponseBody |
| | | public PageResponse<List<InoutRecord>> listHandleData(@RequestBody InoutParam param) { |
| | | return inoutManager.listHandleData(param); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件查询待称重的数据 |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @RequestMapping("/inout-query") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> inoutQuery(@RequestBody InoutParam param) { |
| | | if (null == param.getCompanyId()) param.setCompanyId(ContextUtil.getCompanyId()); |
| | | |
| | | return inoutManager.inoutQuery(param); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping("/submit-register") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitRegister(@RequestBody InoutRecord data) { |
| | | public PageResponse<InoutData> submitRegister(@RequestBody InoutData data) { |
| | | |
| | | return inoutManager.submitRegister(data); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/submit-check") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitCheck(@RequestBody InoutRecord data) { |
| | | public PageResponse<InoutData> submitCheck(@RequestBody InoutData data) { |
| | | |
| | | return inoutManager.submitCheck(data); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping("/submit-weight") |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitWeight(@RequestBody InoutRecord data) { |
| | | public PageResponse<InoutData> submitWeight(@RequestBody InoutData data) { |
| | | |
| | | return inoutManager.submitWeight(data); |
| | | } |
| | |
| | | @RequestMapping("/submit-handle") |
| | | @Transactional |
| | | @ResponseBody |
| | | public PageResponse<InoutRecord> submitHandle(@RequestBody InoutRecord data) { |
| | | public PageResponse<InoutData> submitHandle(@RequestBody InoutData data) { |
| | | |
| | | log.debug("-------------submitHandle------------------"); |
| | | return inoutManager.submitHandle(data); |