package com.ld.igds.inout.controller;
|
|
import com.bstek.bdf2.core.business.IUser;
|
import com.ld.igds.common.manager.CommonManager;
|
import com.ld.igds.constant.BizType;
|
import com.ld.igds.constant.Constant;
|
import com.ld.igds.constant.RespCodeEnum;
|
import com.ld.igds.data.Page;
|
import com.ld.igds.data.PageResponse;
|
import com.ld.igds.data.SimpleDepot;
|
import com.ld.igds.file.dto.FileData;
|
import com.ld.igds.inout.InoutConstant;
|
import com.ld.igds.inout.dto.InoutData;
|
import com.ld.igds.inout.dto.InoutParam;
|
import com.ld.igds.inout.dto.InoutRecordItemData;
|
import com.ld.igds.inout.dto.InoutRecordItemParam;
|
import com.ld.igds.inout.manager.InoutCommonManager;
|
import com.ld.igds.inout.manager.InoutManager2;
|
import com.ld.igds.io.dto.WeightDto;
|
import com.ld.igds.m.dto.NoticeParam;
|
import com.ld.igds.models.*;
|
import com.ld.igds.util.ContextUtil;
|
import com.ld.igds.util.DateUtil;
|
import lombok.extern.slf4j.Slf4j;
|
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.servlet.ModelAndView;
|
|
import javax.annotation.Resource;
|
import java.net.URLDecoder;
|
import java.util.Date;
|
import java.util.HashMap;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 出入库管理入口2
|
*
|
* @author
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("basic/inout")
|
public class InoutController2 {
|
|
@Resource
|
private CommonManager commonManager;
|
@Resource
|
private InoutManager2 inoutManager2;
|
@Resource
|
private InoutCommonManager inoutCommonManager;
|
|
/**
|
* 出入库流程中的实时数据页面,直接从缓存中获取
|
*
|
* @param deptId 当前人所在分库
|
* @param type 出入库类型
|
* @return
|
*/
|
@RequestMapping("/inout-progress")
|
public ModelAndView inoutProgress(@RequestParam(value = "deptId", required = false) String deptId,
|
@RequestParam(value = "type", required = false) String type) {
|
|
ModelAndView view = new ModelAndView();
|
view.addObject("type", type);
|
|
if (StringUtils.isEmpty(deptId)) {
|
deptId = ContextUtil.subDeptId(null);
|
}
|
view.addObject("deptId", deptId);
|
|
//流程字典表,用于存放路程阶段和名称关系
|
view.addObject("mapProgress", DicTrigger.mapProgressName);
|
|
//登录人所在分库下的仓库列表
|
List<Depot> listDepot = commonManager.listDepot(true, deptId);
|
Map<String, String> mapDept = new HashMap<>();
|
if (null != listDepot) {
|
for (Depot d : listDepot) {
|
mapDept.put(d.getId(), d.getName());
|
}
|
}
|
view.addObject("mapDept", mapDept);
|
|
view.setViewName("admin/inout/inout-progress");
|
return view;
|
}
|
|
/**
|
* 出入库流程中的实时数据,直接从缓存中获取
|
*
|
* @param param 包含type和deptId两个参数
|
* @return
|
*/
|
@RequestMapping("/list-progress")
|
public PageResponse<Map<String, List<InoutData>>> listProgress(@RequestBody InoutParam param) {
|
IUser user = ContextUtil.getLoginUser();
|
if (StringUtils.isEmpty(param.getDeptId())) {
|
param.setDeptId(ContextUtil.subDeptId(user));
|
}
|
if (StringUtils.isEmpty(param.getCompanyId())) {
|
param.setCompanyId(user.getCompanyId());
|
}
|
|
return inoutManager2.listProgress(param);
|
}
|
|
/**
|
* 出入库流程中的实时数据,值获取流程中的数据
|
*
|
* @param param 包含type和deptId两个参数
|
* @return
|
*/
|
@RequestMapping("/list-only-progress")
|
public PageResponse<List<InoutData>> listOnlyProgress(@RequestBody InoutParam param) {
|
IUser user = ContextUtil.getLoginUser();
|
if (StringUtils.isEmpty(param.getDeptId())) {
|
param.setDeptId(ContextUtil.subDeptId(user));
|
}
|
if (StringUtils.isEmpty(param.getCompanyId())) {
|
param.setCompanyId(user.getCompanyId());
|
}
|
return inoutManager2.listOnlyProgress(param);
|
}
|
|
/**
|
* 入库简易操作页面
|
*
|
* @param sort 表示使用的出入库设备配套号,不传递默认为1
|
* @return
|
*/
|
@RequestMapping("/in-easy")
|
public ModelAndView inEasy(@RequestParam(value = "sort", required = false) String sort) {
|
ModelAndView view = new ModelAndView();
|
|
IUser user = ContextUtil.getLoginUser();
|
view.addObject(Constant.MODEL_KEY_LOGIN_USER, user);
|
|
view.addObject("bizType", BizType.INOUT_IN.getCode());
|
view.addObject("type", InoutConstant.TYPE_IN);
|
String deptId = ContextUtil.subDeptId(user);
|
view.addObject("deptId", deptId);
|
|
// 仓库列表做下拉框使用
|
List<SimpleDepot> listDepot = commonManager.getCacheDeptIn(user.getCompanyId(), deptId);
|
view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
|
|
//入库流程
|
String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(),
|
ContextUtil.subDeptId(user), InoutConstant.TYPE_IN);
|
view.addObject("inoutProgress", inoutProgress);
|
|
|
// 粮食品种下拉框
|
List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
|
view.addObject("listFoodVariety", listFoodVariety);
|
|
// 粮食等级下拉框
|
List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
|
view.addObject("listFoodLevel", listFoodLevel);
|
|
// 当前流程标签
|
view.addObject("progress", InoutConstant.PROGRESS_WEIGHT_TAG);
|
|
// 获取出入库配置信息
|
List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(
|
user.getCompanyId(), deptId);
|
|
// 获取地磅信息
|
InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_30,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("weightDto", null == conf ? new WeightDto() : new WeightDto(conf));
|
|
// 获取车牌识别信息
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_10,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("lprDto", conf);
|
|
// 抓拍摄像头1
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("snapDto1", conf);
|
|
// 获取摄像头信息2
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 2);
|
view.addObject("snapDto2", conf);
|
|
//默认查询时间
|
view.addObject("endTime",
|
DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
|
view.addObject("startTime", DateFormatUtils.format(
|
DateUtil.getNewByDay(null, -30), "yyyy-MM-dd"));
|
|
view.setViewName("admin/inout/in-easy");
|
return view;
|
}
|
|
/**
|
* 出库简易操作页面
|
*
|
* @param sort 表示使用的出入库设备配套号,不传递默认为1
|
* @return
|
*/
|
@RequestMapping("/out-easy")
|
public ModelAndView outEasy(@RequestParam(value = "sort", required = false) String sort) {
|
ModelAndView view = new ModelAndView();
|
|
|
IUser user = ContextUtil.getLoginUser();
|
view.addObject(Constant.MODEL_KEY_LOGIN_USER, user);
|
|
view.addObject("bizType", BizType.INOUT_IN.getCode());
|
view.addObject("type", InoutConstant.TYPE_OUT);
|
String deptId = ContextUtil.subDeptId(user);
|
view.addObject("deptId", deptId);
|
|
// 仓库列表做下拉框使用
|
List<SimpleDepot> listDepot = commonManager.getCacheDeptOut(user.getCompanyId(), deptId);
|
view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
|
|
//入库流程
|
String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(),
|
ContextUtil.subDeptId(user), InoutConstant.TYPE_IN);
|
view.addObject("inoutProgress", inoutProgress);
|
|
|
// 粮食品种下拉框
|
List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
|
view.addObject("listFoodVariety", listFoodVariety);
|
|
// 粮食等级下拉框
|
List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
|
view.addObject("listFoodLevel", listFoodLevel);
|
|
// 当前流程标签
|
view.addObject("progress", InoutConstant.PROGRESS_WEIGHT_TAG);
|
|
// 获取出入库配置信息
|
List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(
|
user.getCompanyId(), deptId);
|
|
// 获取地磅信息
|
InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_30,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("weightDto", null == conf ? new WeightDto() : new WeightDto(conf));
|
|
// 获取车牌识别信息
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_10,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("lprDto", conf);
|
|
// 抓拍摄像头1
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("snapDto1", conf);
|
|
// 获取摄像头信息2
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 2);
|
view.addObject("snapDto2", conf);
|
|
//默认查询时间
|
view.addObject("endTime",
|
DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
|
view.addObject("startTime", DateFormatUtils.format(
|
DateUtil.getNewByDay(null, -30), "yyyy-MM-dd"));
|
|
view.setViewName("admin/inout/out-easy");
|
return view;
|
}
|
|
/**
|
* 出入库简易操作-分页获取流程未完成的数据
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/page-inout-data")
|
public PageResponse<Page<InoutData>> pageInoutData(
|
@RequestBody InoutParam param) {
|
return inoutManager2.pageInoutData(param);
|
}
|
|
|
/**
|
* 入库通知单-获取没有完成的通知单列表
|
*
|
* @return
|
*/
|
@RequestMapping("/list-notice-in")
|
public PageResponse<List<InoutNoticeIn>> listNoticeIn(@RequestBody NoticeParam param) {
|
return inoutManager2.listNoticeIn(param);
|
}
|
|
|
/**
|
* 出库通知单-获取没有完成的通知单列表
|
*
|
* @return
|
*/
|
@RequestMapping("/list-notice-out")
|
public PageResponse<List<InoutNoticeOut>> listNoticeOut(@RequestBody NoticeParam param) {
|
return inoutManager2.listNoticeOut(param);
|
}
|
|
/**
|
* 船运登记页面 -- 入库
|
*
|
* @param sort 表示使用的出入库设备配套号,不传递默认为1
|
* @return
|
*/
|
@RequestMapping("/in-ship-register")
|
public ModelAndView inShipRegister(
|
@RequestParam(value = "sort", required = false) String sort) {
|
|
ModelAndView view = new ModelAndView();
|
IUser user = ContextUtil.getLoginUser();
|
view.addObject(Constant.MODEL_KEY_LOGIN_USER, user);
|
|
String deptId = ContextUtil.subDeptId(user);
|
view.addObject("bizType", BizType.INOUT_IN.getCode());
|
view.addObject("type", InoutConstant.TYPE_IN);
|
view.addObject("deptId", deptId);
|
|
// 仓库列表做下拉框使用
|
List<SimpleDepot> listDepot = commonManager.getCacheDeptIn(user.getCompanyId(), deptId);
|
view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
|
|
// 粮食品种下拉框
|
List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
|
view.addObject("listFoodVariety", listFoodVariety);
|
|
// 粮食等级下拉框
|
List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
|
view.addObject("listFoodLevel", listFoodLevel);
|
|
view.addObject("checkUser", ContextUtil.getLoginUserCName());
|
|
// 当前流程节点
|
view.addObject("progress", InoutConstant.PROGRESS_REGISTER);
|
|
view.setViewName("admin/inout/in-ship-register");
|
return view;
|
}
|
|
/**
|
* 船运称重页面 -- 入库
|
*
|
* @param sort 表示使用的出入库设备配套号,不传递默认为1
|
* @return
|
*/
|
@RequestMapping("/in-ship-weight")
|
public ModelAndView inShipWeight(@RequestParam(value = "sort", required = false) String sort) {
|
|
ModelAndView view = new ModelAndView();
|
IUser user = ContextUtil.getLoginUser();
|
view.addObject(Constant.MODEL_KEY_LOGIN_USER, user);
|
|
String deptId = ContextUtil.subDeptId(user);
|
view.addObject("bizType", BizType.INOUT_IN.getCode());
|
view.addObject("type", InoutConstant.TYPE_IN);
|
view.addObject("deptId", deptId);
|
|
// 仓库列表做下拉框使用
|
List<SimpleDepot> listDepot = commonManager.getCacheDeptIn(user.getCompanyId(), deptId);
|
view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
|
|
//入库流程
|
String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(),
|
ContextUtil.subDeptId(user), InoutConstant.TYPE_IN);
|
view.addObject("inoutProgress", inoutProgress);
|
|
//地磅是否可编辑
|
String weightEditTag = inoutCommonManager.getWeightEditTag(user.getCompanyId(), ContextUtil.subDeptId(user));
|
view.addObject("weightEditTag", weightEditTag);
|
|
// 当前流程标签
|
view.addObject("progress", InoutConstant.PROGRESS_WEIGHT_TAG);
|
view.addObject("ship", "ship");
|
|
// 粮食品种下拉框
|
List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
|
view.addObject("listFoodVariety", listFoodVariety);
|
|
// 粮食等级下拉框
|
List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
|
view.addObject("listFoodLevel", listFoodLevel);
|
|
// 获取出入库配置信息
|
List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(user
|
.getCompanyId(), deptId);
|
|
//获取所有的地磅列表用于页面用户选择
|
List<InoutConf> listWeight = inoutCommonManager.getInoutConf(listInoutConf, InoutConstant.CONF_TYPE_30);
|
view.addObject("listWeight", listWeight);
|
|
// 获取当前地磅信息
|
InoutConf weightDto = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_30);
|
view.addObject("weightDto", weightDto);
|
|
// 过程摄像头1
|
InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("snapDto1", conf);
|
|
// 过程摄像头2
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 2);
|
view.addObject("snapDto2", conf);
|
|
// 过程摄像头3
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 3);
|
view.addObject("snapDto3", conf);
|
|
view.setViewName("admin/inout/in-ship-weight");
|
return view;
|
}
|
|
/**
|
* 船运登记页面 -- 出库
|
*
|
* @param sort 表示使用的出入库设备配套号,不传递默认为1
|
* @return
|
*/
|
@RequestMapping("/out-ship-register")
|
public ModelAndView outShipRegister(
|
@RequestParam(value = "sort", required = false) String sort) {
|
|
ModelAndView view = new ModelAndView();
|
IUser user = ContextUtil.getLoginUser();
|
view.addObject(Constant.MODEL_KEY_LOGIN_USER, user);
|
|
String deptId = ContextUtil.subDeptId(user);
|
view.addObject("bizType", BizType.INOUT_OUT.getCode());
|
view.addObject("type", InoutConstant.TYPE_OUT);
|
view.addObject("deptId", deptId);
|
|
// 仓库列表做下拉框使用
|
List<SimpleDepot> listDepot = commonManager.getCacheDeptOut(user.getCompanyId(), deptId);
|
view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
|
|
// 粮食品种下拉框
|
List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
|
view.addObject("listFoodVariety", listFoodVariety);
|
|
// 粮食等级下拉框
|
List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
|
view.addObject("listFoodLevel", listFoodLevel);
|
|
// 当前流程节点
|
view.addObject("progress", InoutConstant.PROGRESS_REGISTER);
|
|
view.setViewName("admin/inout/out-ship-register");
|
return view;
|
}
|
|
/**
|
* 船运称重页面 -- 出库
|
*
|
* @param sort 表示使用的出入库设备配套号,不传递默认为1
|
* @return
|
*/
|
@RequestMapping("/out-ship-weight")
|
public ModelAndView outShipWeight(@RequestParam(value = "sort", required = false) String sort) {
|
|
ModelAndView view = new ModelAndView();
|
IUser user = ContextUtil.getLoginUser();
|
view.addObject(Constant.MODEL_KEY_LOGIN_USER, user);
|
|
String deptId = ContextUtil.subDeptId(user);
|
view.addObject("bizType", BizType.INOUT_OUT.getCode());
|
view.addObject("type", InoutConstant.TYPE_OUT);
|
view.addObject("deptId", deptId);
|
|
// 仓库列表做下拉框使用
|
List<SimpleDepot> listDepot = commonManager.getCacheDeptOut(user.getCompanyId(),deptId);
|
view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
|
|
//入库流程
|
String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(),
|
ContextUtil.subDeptId(user), InoutConstant.TYPE_IN);
|
view.addObject("inoutProgress", inoutProgress);
|
|
// 当前流程标签
|
view.addObject("progress", InoutConstant.PROGRESS_WEIGHT_TAG);
|
view.addObject("ship", "ship");
|
|
// 粮食品种下拉框
|
List<DicTrigger> listFoodVariety = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
|
view.addObject("listFoodVariety", listFoodVariety);
|
|
//地磅是否可编辑
|
String weightEditTag = inoutCommonManager.getWeightEditTag(user.getCompanyId(), ContextUtil.subDeptId(user));
|
view.addObject("weightEditTag", weightEditTag);
|
|
// 粮食等级下拉框
|
List<DicTrigger> listFoodLevel = inoutCommonManager.getDicTrigger(
|
Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
|
view.addObject("listFoodLevel", listFoodLevel);
|
|
// 获取出入库配置信息
|
List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(user
|
.getCompanyId(), deptId);
|
|
//获取所有的地磅列表用于页面用户选择
|
List<InoutConf> listWeight = inoutCommonManager.getInoutConf(listInoutConf, InoutConstant.CONF_TYPE_30);
|
view.addObject("listWeight", listWeight);
|
|
// 获取当前地磅信息
|
InoutConf weightDto = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_30);
|
view.addObject("weightDto", weightDto);
|
|
// 过程摄像头1
|
InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 1);
|
view.addObject("snapDto1", conf);
|
|
// 过程摄像头2
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 2);
|
view.addObject("snapDto2", conf);
|
|
// 过程摄像头3
|
conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_60,
|
InoutConstant.PROGRESS_WEIGHT_TAG, 3);
|
view.addObject("snapDto3", conf);
|
|
view.setViewName("admin/inout/out-ship-weight");
|
return view;
|
}
|
|
/**
|
* 船运登记提交
|
*
|
* @param data
|
* @return
|
*/
|
@RequestMapping("/inout-ship-register")
|
public PageResponse<InoutData> inoutShipRegister(@RequestBody InoutData data) {
|
try {
|
return inoutManager2.inoutShipRegister(data);
|
} catch (Exception e) {
|
log.error("后台异常:{}", e);
|
return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
|
"后台异常:" + e.getMessage());
|
}
|
}
|
|
|
/**
|
* 船运称重页面--列表查看运输车辆流程信息(分页获取船运信息子表信息-主从查询)
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/list-inout-record-item")
|
public PageResponse<List<InoutRecordItemData>> listInoutItem(@RequestBody InoutRecordItemParam param) {
|
|
return inoutManager2.listInoutItem(param);
|
}
|
|
/**
|
* 船运称重页面--查看运输车辆详细信息
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/get-inout-record-item")
|
public PageResponse<InoutRecordItemData> getInoutItem(@RequestBody InoutRecordItemParam param) {
|
|
return inoutManager2.getInoutItemByCarNum(param);
|
}
|
|
/**
|
* 船运车辆绑定时,验证车辆是否在流程中
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/check-car-num")
|
public PageResponse<InoutRecordItemData> checkCarNum(@RequestBody InoutRecordItemParam param) {
|
|
return inoutManager2.checkCarNum(param);
|
}
|
|
/**
|
* 船运称重页面 - 车辆登记及称重提交
|
*
|
* @param data
|
* @return
|
*/
|
@RequestMapping("/inout-ship-next-step")
|
public PageResponse<String> inoutItemNextStep(@RequestBody InoutRecordItemData data) {
|
try {
|
return inoutManager2.inoutItemNextStep(data);
|
} catch (Exception e) {
|
log.error("后台异常:{}", e);
|
return new PageResponse<String>(RespCodeEnum.CODE_1111.getCode(),
|
"后台异常:" + e.getMessage(), null);
|
}
|
}
|
|
/**
|
* 获取流程未结束的船运流水信息 -- 用于船运称重页面的车辆登记使用
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/un-ship-inout-record")
|
public PageResponse<List<InoutRecordItemData>> unShipInoutRecord(@RequestBody InoutRecordItemParam param) {
|
|
return inoutManager2.unShipInoutRecord(param);
|
}
|
|
/**
|
* 获取船运车辆信息
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/list-Ship-Car")
|
public PageResponse<List<InoutCarConf>> listShipCar(@RequestBody InoutRecordItemParam param) {
|
|
return inoutManager2.listShipCar(param.getCompanyId(), param.getDeptId());
|
}
|
|
/**
|
* 获取船运流水信息 -- 默认获取一个月的
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/ship-inout-record")
|
public PageResponse<List<InoutRecordItemData>> getShipInoutRecord(@RequestBody InoutRecordItemParam param) {
|
|
return inoutManager2.getShipInoutRecord(param);
|
}
|
|
/**
|
* 结束船运信息流程,统计相关重量信息
|
*
|
* @param data
|
* @return
|
*/
|
@RequestMapping("/ship-to-complete")
|
public PageResponse<InoutRecordItemData> shipComplete(@RequestBody InoutRecordItemData data) {
|
|
try {
|
return inoutManager2.shipComplete(data);
|
} catch (Exception e) {
|
log.error("后台异常:{}", e);
|
return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
|
"后台异常:" + e.getMessage(), data);
|
}
|
}
|
|
/**
|
* 结束船运信息流程,统计相关重量信息
|
*
|
* @param data
|
* @return
|
*/
|
@RequestMapping("/del-ship-item")
|
public PageResponse<String> delShipItem(@RequestBody InoutRecordItemData data) {
|
|
try {
|
return inoutManager2.delShipItem(data);
|
} catch (Exception e) {
|
log.error("后台异常:{}", e);
|
return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
|
"后台异常:" + e.getMessage());
|
}
|
}
|
|
/**
|
* 出入库详单页面的可视化追踪页面
|
*
|
* @return
|
*/
|
@RequestMapping("/inout-img")
|
public ModelAndView inoutImg(@RequestParam(value = "id", required = true) String id,
|
@RequestParam(value = "plateNum", required = false) String plateNum,
|
@RequestParam(value = "user", required = false) String userName) {
|
|
ModelAndView view = new ModelAndView();
|
try {
|
view.addObject("id", id);
|
|
if (StringUtils.isNotEmpty(plateNum)) {
|
view.addObject("plateNum", URLDecoder.decode(plateNum, "UtF-8"));
|
}
|
if (StringUtils.isNotEmpty(userName)) {
|
view.addObject("userName", URLDecoder.decode(userName, "UtF-8"));
|
}
|
|
view.setViewName("admin/inout/inout-img");
|
} catch (Exception e) {
|
log.error("后台异常:{}", e);
|
}
|
return view;
|
}
|
|
/**
|
* 根据参数获取出入库的图片,文件流展示
|
*
|
* @param param
|
* @return
|
*/
|
@RequestMapping("/cut-img-list")
|
public PageResponse<List<FileData>> cutImgList(@RequestBody InoutParam param) {
|
return inoutManager2.cutImgList(param);
|
}
|
}
|