jiazx0107@163.com
2023-06-22 a4d556ff6f8191637be669e7884fc3e500021516
测试入库流程
已修改13个文件
1761 ■■■■ 文件已修改
igds-core/src/main/java/com/ld/igds/inout/dto/InoutParam.java 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java 153 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckData.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/CheckManager.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java 1300 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/resources/mapper/InoutCheckMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/resources/mapper/InoutRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-card-back.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-sample.js 160 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/inout-common.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/in-card-back.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/in-sample.html 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/inout/dto/InoutParam.java
@@ -10,79 +10,80 @@
/**
 * 出入库的页面参数定义
 *
 * @author jiazx
 *
 * @author jiazx
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class InoutParam extends BaseParam {
    public String plateNum;// 车牌号
    public String plateNum;// 车牌号
    private String intelCard;// 智慧卡号
    private String intelCard;// 智慧卡号
    private String id;// 流水号
    private String id;// 流水号
    private String progress;// 当前所在流程
    private String progress;// 当前所在流程
    private String type;// 业务数据类型,出库或者入库
    private String type;// 业务数据类型,出库或者入库
    private String checkId;// 化验单号
    private String checkId;// 化验单号
    @PropertyDef(label = "品种")
    private String foodVariety;
    @PropertyDef(label = "品种")
    private String foodVariety;
    @PropertyDef(label = "类型")
    private String foodType;
    @PropertyDef(label = "类型")
    private String foodType;
    private String checkStatus;
    private String checkStatus;
    private String customerName;
    private String customerName;
    private String customerId;
    private String customerId;
    private String recordStatus;
    private String recordStatus;
    private String msg;
    private String userId;//登陆人ID
    private String msg;
    private double curStorage=0.0;//当前库存获取损溢的库存
    private String userId;//登陆人ID
    private String year; // 年份
    private String deptId;// 所属分库
    private String orderTag = "DESC";
    private double weight;//重量信息
    private double curStorage = 0.0;//当前库存获取损溢的库存
    private Double de;
    private String year; // 年份
    private Double fullWeight;
    private String deptId;// 所属分库
    private String fullWeightUser;
    private String orderTag = "DESC";
    private Date fullWeightTime;
    private double weight;//重量信息
    private Double emptyWeight;
    private Double de;
    private Date emptyWeightTime;
    private Double fullWeight;
    private Date completeTime;
    private String fullWeightUser;
    private String emptyWeightUser;
    private Date fullWeightTime;
    private Double netWeight;
    private Double emptyWeight;
    private Double settleWeight;
    private Double recordWeight;
    private Date emptyWeightTime;
    //是否结算
    private String settleTag;
    private Date completeTime;
    private Double price;
    private String emptyWeightUser;
    private Double settleMoney;
    private Double netWeight;
    private Double settleWeight;
    private Double recordWeight;
    //是否结算
    private String settleTag;
    private Double price;
    private Double settleMoney;
    private Date updateTime = new Date();
}
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
@@ -25,7 +25,6 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -100,9 +99,69 @@
        view.setViewName("admin/inout/in-register");
        return view;
    }
    /**
     * 扦样页面
     *
     * @param sort 表示使用的出入库设备配套号,不传递默认为1
     * @return
     */
    @RequestMapping("/in-sample")
    public ModelAndView inSample(HttpServletRequest httpRequest, @RequestParam(value = "sort", required = false) String sort) {
        if (StringUtils.isEmpty(sort)) {
            sort = commonManager.getInoutWeightByClient(httpRequest);
        }
        ModelAndView view = new ModelAndView();
        // 仓库列表做下拉框使用
        List<Depot> listDepot = commonManager.listDepot(true);
        view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
        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);
        DefaultDept dept = commonManager.getSubDept(user, deptId);
        view.addObject("deptName", dept.getName());
        //入库流程
        String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(), deptId, InoutConstant.TYPE_IN);
        view.addObject("inoutProgress", inoutProgress);
        // 当前流程节点
        view.addObject("progress", InoutConstant.PROGRESS_CHECK);
        // 粮食品种下拉框
        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("endTime",
                DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
        view.addObject("startTime", DateFormatUtils.format(
                DateUtil.getNewByDay(null, -10), "yyyy-MM-dd"));
        // 获取出入库配置信息
        List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(user.getCompanyId(), deptId);
        // 获取扦样机信息
        InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_20, InoutConstant.PROGRESS_CHECK, 1);
        view.addObject("checkDto", conf);
        view.setViewName("admin/inout/in-sample");
        return view;
    }
    /**
     * 扦样化验页面
     * 质检页面
     *
     * @param sort 表示使用的出入库设备配套号,不传递默认为1
     * @return
@@ -309,15 +368,6 @@
        // 当前流程节点
        view.addObject("progress", InoutConstant.PROGRESS_CARD_BACK);
        // 粮食品种下拉框
        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.setViewName("admin/inout/in-card-back");
        return view;
@@ -574,6 +624,18 @@
    }
    /**
     * 扦样页面提交更新
     *
     * @param data
     * @return
     */
    @RequestMapping("/submit-sample")
    @Transactional
    public PageResponse<InoutCheckData> submitSample(@RequestBody InoutCheckData data) throws Exception {
        return inoutManager.submitSample(data);
    }
    /**
     * 出入库称重环节提交
     *
     * @param data
@@ -654,64 +716,7 @@
    }
    /**
     * 扦样页面
     *
     * @param sort 表示使用的出入库设备配套号,不传递默认为1
     * @return
     */
    @RequestMapping("/in-sample")
    public ModelAndView inSample(HttpServletRequest httpRequest, @RequestParam(value = "sort", required = false) String sort) {
        if (StringUtils.isEmpty(sort)) {
            sort = commonManager.getInoutWeightByClient(httpRequest);
        }
        ModelAndView view = new ModelAndView();
        // 仓库列表做下拉框使用
        List<Depot> listDepot = commonManager.listDepot(true);
        view.addObject(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
        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);
        DefaultDept dept = commonManager.getSubDept(user, deptId);
        view.addObject("deptName", dept.getName());
        //入库流程
        String inoutProgress = inoutCommonManager.getInoutProgressConf(user.getCompanyId(), deptId, InoutConstant.TYPE_IN);
        view.addObject("inoutProgress", inoutProgress);
        // 当前流程节点
        view.addObject("progress", InoutConstant.PROGRESS_CHECK);
        // 粮食品种下拉框
        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("endTime",
                DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
        view.addObject("startTime", DateFormatUtils.format(
                DateUtil.getNewByDay(null, -10), "yyyy-MM-dd"));
        // 获取出入库配置信息
        List<InoutConf> listInoutConf = inoutCommonManager.getListInoutConf(user.getCompanyId(), deptId);
        // 获取扦样机信息
        InoutConf conf = inoutCommonManager.getInoutConf(listInoutConf, sort, InoutConstant.CONF_TYPE_20, InoutConstant.PROGRESS_CHECK, 1);
        view.addObject("checkDto", conf);
        view.setViewName("admin/inout/in-sample");
        return view;
    }
    /**
     * 分页获取扦样数据
@@ -724,17 +729,7 @@
        return inoutManager.pageSampleData(param);
    }
    /**
     * 扦样页面提交更新
     *
     * @param data
     * @return
     */
    @RequestMapping("/update-sample")
    public PageResponse<InoutCheckData> updateSample(@RequestBody InoutCheckData data) {
        return inoutManager.updateSampleData(data);
    }
    /**
     * 分页获取化验数据
igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckData.java
@@ -2,7 +2,6 @@
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ld.igds.check.dto.CheckItemData;
import com.ld.igds.inout.InoutConstant;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@@ -81,6 +80,8 @@
    private String remarks;
    private Date updateTime;
    //化验项数据信息
    private List<CheckItemData> checkItems;
}
igds-inout/src/main/java/com/ld/igds/inout/manager/CheckManager.java
@@ -1,17 +1,12 @@
package com.ld.igds.inout.manager;
import com.ld.igds.inout.InoutConstant;
import com.ld.igds.io.dto.CheckResultParam;
import com.ld.igds.io.sample.ApiSampleManager;
import com.ld.igds.io.sample.ApiSampleService;
import com.ld.igds.io.sample.data.SampleDto;
import com.ld.igds.m.service.InoutCommonService;
import com.ld.igds.util.ContextUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
@Component("inout.checkManager")
public class CheckManager {
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
@@ -57,7 +57,6 @@
    @Resource
    private InoutDeviceManager inoutDeviceManager;
    /**
     * 直接从数据库查询,不考虑信息状态
     *
@@ -73,7 +72,7 @@
                    "查询参数不完整,查询失败!");
        }
        //获取三天以内最后一天记录
        // 获取三天以内最后一天记录
        param.setStart(DateUtil.getNewByDay(new Date(), -3));
        param.setType(null);
        param.setProgress(null);
@@ -86,11 +85,13 @@
        }
        if (InoutConstant.PROGRESS_RECORD.equals(result.getProgress())) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "当前车辆流程已经结束", result);
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                    "当前车辆流程已经结束", result);
        }
        if (!InoutConstant.PROGRESS_CARD_BACK.equals(result.getProgress())) {
            return new PageResponse<>(RespCodeEnum.CODE_1008.getCode(), "当前车辆流程不在当前环节,无法执行出库", result);
            return new PageResponse<>(RespCodeEnum.CODE_1008.getCode(),
                    "当前车辆流程不在当前环节,无法执行出库", result);
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, result);
@@ -126,16 +127,16 @@
                return new PageResponse<>(RespCodeEnum.CODE_0000, result);
            }
            //流程类型验证
            // 流程类型验证
            if (!result.getType().equals(param.getType())) {
                String msg = "流程错误:当前车辆流程为【入库】";
                if (InoutConstant.TYPE_OUT.equals(result.getType())) msg = "流程错误:当前车辆流程为【出库】";
                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), msg, result);
                if (InoutConstant.TYPE_OUT.equals(result.getType()))
                    msg = "流程错误:当前车辆流程为【出库】";
                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                        msg, result);
            }
            //流程环节验证
            // 流程环节验证
            if (progress.equals(InoutConstant.PROGRESS_WEIGHT_TAG)) {
                if (result.getProgress().equals(
                        InoutConstant.PROGRESS_WEIGHT_EMPTY)
@@ -167,7 +168,6 @@
        }
    }
    public InoutData inoutProgressQuery(InoutData data) throws Exception {
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
@@ -188,18 +188,19 @@
        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(
                data.getCompanyId(), data.getDeptId());
        if (inoutSysConf.getNoPassNext().equals(InoutConstant.CHECK_NOPASS_RECORD)) {
        if (inoutSysConf.getNoPassNext().equals(
                InoutConstant.CHECK_NOPASS_RECORD)) {
            // 流程结束
            data.setProgress(InoutConstant.PROGRESS_RECORD);
            data.setCompleteTime(new Date());
        }
        if (inoutSysConf.getNoPassNext().equals(InoutConstant.CHECK_NOPASS_BACK)) {
        if (inoutSysConf.getNoPassNext()
                .equals(InoutConstant.CHECK_NOPASS_BACK)) {
            // 离库收卡
            data.setProgress(InoutConstant.PROGRESS_CARD_BACK);
        }
        return data;
    }
    /**
     * 更新质检信息
@@ -209,11 +210,13 @@
     */
    private CheckUpdateResult updateCheckItems(InoutData data) {
        CheckUpdateResult result = new CheckUpdateResult();
        if (null == data.getCheckItems()) return result;
        if (null == data.getCheckItems())
            return result;
        try {
            // 更新检验项数据
            result = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
            result = checkStandardManager.updateCheckItems(data.getCheckId(),
                    data.getCompanyId(), data.getCheckItems());
            // 将化验数据存入缓存中
            inoutService.setCheckCache(data);
@@ -232,7 +235,8 @@
     *
     * @return
     */
    private String getNextProgress(String curProgress, String type, InoutSysConf sysConf) {
    private String getNextProgress(String curProgress, String type,
                                   InoutSysConf sysConf) {
        String nextProgress = null;
        List<String> list = null;
        if (InoutConstant.TYPE_IN.equals(type)) {
@@ -258,7 +262,8 @@
     * @param data
     * @return
     */
    private InoutData updateBasicInfo(InoutData data, String curProgress, String nextProgress) {
    private InoutData updateBasicInfo(InoutData data, String curProgress,
                                      String nextProgress) {
        if (InoutConstant.PROGRESS_REGISTER.equals(curProgress)) {
            data.setRegisterTime(new Date());
@@ -291,7 +296,7 @@
            data.setProgress(nextProgress);
        }
        //如果下一个数据状态=流程结束,直接补充完整信息
        // 如果下一个数据状态=流程结束,直接补充完整信息
        if (InoutConstant.PROGRESS_RECORD.equals(nextProgress)) {
            data.setCompleteTime(DateUtils.addMinutes(new Date(), 2));
            data.setCompleteUser(ContextUtil.getLoginUserCName());
@@ -370,8 +375,8 @@
        return data;
    }
    public PageResponse<InoutData> submitComplete(InoutData data) throws Exception {
    public PageResponse<InoutData> submitComplete(InoutData data)
            throws Exception {
        if (StringUtils.isEmpty(data.getId())
                || StringUtils.isEmpty(data.getType())
@@ -380,7 +385,6 @@
            return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(),
                    "没有获取到车辆信息。", data);
        }
        data.setUpdateTime(new Date());
        if (null == data.getCompleteTime()) {
@@ -402,7 +406,6 @@
        param.setCompleteTime(data.getCompleteTime());
        param.setProgress(InoutConstant.PROGRESS_RECORD);
        String msg = inoutService.toComplete(param);
        if (null != msg) {
@@ -420,18 +423,18 @@
     */
    public PageResponse<InoutData> submitCardBack(InoutData data) {
        try {
            //如果当前数据已经结束
            // 如果当前数据已经结束
            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
                //删除缓存
                inoutService.delFromCache(data.getDeptId(), data.getType(), data.getId());
                // 删除缓存
                inoutService.delFromCache(data.getDeptId(), data.getType(),
                        data.getId());
                return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(),
                        "当车辆流程已经完成,卡片已回收", data);
            }
            //如果当前流程不是卡回收
            // 如果当前流程不是卡回收
            if (!InoutConstant.PROGRESS_CARD_BACK.equals(data.getProgress())) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
@@ -447,649 +450,670 @@
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "后端执行异常:" + e.getMessage());
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(),
                "执行成功", data);
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功",
                data);
    }
    /**
     * 补单操作 补单因为完成时间不确定,所以需要系统根据当前数据进行自动检测,调整原来流水信息和库存
     *
     * @param data
     * @return
     * @throws Exception
     */
    public String addInoutData(InoutData data) throws Exception {
        /**
         * 补单操作 补单因为完成时间不确定,所以需要系统根据当前数据进行自动检测,调整原来流水信息和库存
         *
         * @param data
         * @return
         * @throws Exception
         */
        public String addInoutData(InoutData data) throws Exception {
            if (data.getSettleWeight() <= 0.0) {
                return "补单数据要求结算重量必须大于0";
            }
            // 补单数据直接到结果状态
            data.setRecordStatus(InoutConstant.RECORD_STATUS_ADD);
            data.setProgress(InoutConstant.PROGRESS_RECORD);
            if (InoutConstant.STATUS_NONE.equals(data.getCheckStatus())) {
                data.setCheckStatus(InoutConstant.STATUS_PASS);
            }
            String loginUser = ContextUtil.getLoginUserCName();
            data.setRegisterUser(loginUser);
            data.setFullWeightUser(loginUser);
            data.setEmptyWeightUser(loginUser);
            data.setHandleUser(loginUser);
            data.setCompleteUser(loginUser);
            if (null == data.getCompleteTime()) {
                data.setCompleteTime(new Date());
            }
            // 注册时间比完成时间早一个小时
            data.setRegisterTime(DateUtil.getNewByMinute(new Date(), -60));
            if (StringUtils.isEmpty(data.getUserId())) {
                data.setUserId(InoutConstant.DEFAULT_ID_CARD);
            }
            if (null == data.getIntelCard()) {
                data.setIntelCard(data.getUserId());
            }
            if (null != data.getCheckItems()) {
                data.setCheckUser(loginUser);
            }
            // 保存检测项目
            if (InoutConstant.TYPE_IN.equals(data.getType())) {
                if (null == data.getFullWeightTime()) {
                    data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -50));
                }
                if (null == data.getEmptyWeightTime()) {
                    data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -10));
                }
                // 先执行化验信息保存
                CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
                if (null != checkResult) {
//                if (null == data.getWet())data.setWet(checkResult.getWet());
//                if (null == data.getImpurity())data.setImpurity(checkResult.getImpurity());
                }
            } else {
                if (null == data.getEmptyWeightTime()) {
                    data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -50));
                }
                if (null == data.getFullWeightTime()) {
                    data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -10));
                }
            }
            // 添加补单数据
            String msg = inoutService.insertData(data);
            // 初始化验证出入库库存
            commonService.initInoutDepotStore(data);
            return msg;
        if (data.getSettleWeight() <= 0.0) {
            return "补单数据要求结算重量必须大于0";
        }
        /**
         * 修改操作 修改逻辑说明:修改数据需要获取原数据库中的数据进行对比。
         *
         * @param data
         * @return
         * @throws Exception
         */
        @Transactional
        public String updateInoutData(InoutData data)throws Exception {
            if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
                return "系统:已经删除的数据不支持修改!";
            }
            if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
                return "系统:异常终止的数据不支持修改!";
            }
            // 如果流程未结束,只更新数据
            if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
                return inoutService.updateData(data);
            }
            // 如果是已经完成的数据,先获取到修改直接的数据根据数据进行对比
            InoutParam param = new InoutParam();
            param.setId(data.getId());
            param.setCompanyId(data.getCompanyId());
            param.setType(data.getType());
            InoutData record = inoutService.inoutQueryById(param);
            if (null == record) {
                return "当前修改数据已经不存在!";
            }
            // 避免数据库中的数据已经被其他人修改
            if (InoutConstant.RECORD_STATUS_DEL.equals(record.getRecordStatus())) {
                return "系统:已经删除的数据不支持修改!";
            }
            if (InoutConstant.RECORD_STATUS_ERROR.equals(record.getRecordStatus())) {
                return "系统:异常终止的数据不支持修改!";
            }
            // 保存检测项目
            if (InoutConstant.TYPE_IN.equals(data.getType())) {
                // 先执行化验信息保存
                CheckUpdateResult checkResult = checkStandardManager
                        .updateCheckItems(data.getCheckId(), data.getCompanyId(),
                                data.getCheckItems());
                if (null != checkResult) {
//                if (null == data.getWet())
//                    data.setWet(checkResult.getWet());
//                if (null == data.getImpurity())
//                    data.setImpurity(checkResult.getImpurity());
                }
            }
            // 更新数据
            inoutService.updateData(data);
            return null;
        // 补单数据直接到结果状态
        data.setRecordStatus(InoutConstant.RECORD_STATUS_ADD);
        data.setProgress(InoutConstant.PROGRESS_RECORD);
        if (InoutConstant.STATUS_NONE.equals(data.getCheckStatus())) {
            data.setCheckStatus(InoutConstant.STATUS_PASS);
        }
        /**
         * 删除操作 删除数据为软删除,删除数据后需要根据删除情况联动库存等信息
         *
         * @param data
         * @param selected 是否已经查询过数据
         * @return
         * @throws Exception
         */
        @Transactional
        public String delInoutData (InoutData data,boolean selected)
        String loginUser = ContextUtil.getLoginUserCName();
        data.setRegisterUser(loginUser);
        data.setFullWeightUser(loginUser);
        data.setEmptyWeightUser(loginUser);
        data.setHandleUser(loginUser);
        data.setCompleteUser(loginUser);
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
        }
        // 注册时间比完成时间早一个小时
        data.setRegisterTime(DateUtil.getNewByMinute(new Date(), -60));
        if (StringUtils.isEmpty(data.getUserId())) {
            data.setUserId(InoutConstant.DEFAULT_ID_CARD);
        }
        if (null == data.getIntelCard()) {
            data.setIntelCard(data.getUserId());
        }
        if (null != data.getCheckItems()) {
            data.setCheckUser(loginUser);
        }
        // 保存检测项目
        if (InoutConstant.TYPE_IN.equals(data.getType())) {
            if (null == data.getFullWeightTime()) {
                data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -50));
            }
            if (null == data.getEmptyWeightTime()) {
                data.setEmptyWeightTime(DateUtil
                        .getNewByMinute(new Date(), -10));
            }
            // 先执行化验信息保存
            CheckUpdateResult checkResult = checkStandardManager
                    .updateCheckItems(data.getCheckId(), data.getCompanyId(),
                            data.getCheckItems());
            if (null != checkResult) {
                // if (null == data.getWet())data.setWet(checkResult.getWet());
                // if (null ==
                // data.getImpurity())data.setImpurity(checkResult.getImpurity());
            }
        } else {
            if (null == data.getEmptyWeightTime()) {
                data.setEmptyWeightTime(DateUtil
                        .getNewByMinute(new Date(), -50));
            }
            if (null == data.getFullWeightTime()) {
                data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -10));
            }
        }
        // 添加补单数据
        String msg = inoutService.insertData(data);
        // 初始化验证出入库库存
        commonService.initInoutDepotStore(data);
        return msg;
    }
    /**
     * 修改操作 修改逻辑说明:修改数据需要获取原数据库中的数据进行对比。
     *
     * @param data
     * @return
     * @throws Exception
     */
    @Transactional
    public String updateInoutData(InoutData data) throws Exception {
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "系统:已经删除的数据不支持修改!";
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
            return "系统:异常终止的数据不支持修改!";
        }
        // 如果流程未结束,只更新数据
        if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
            return inoutService.updateData(data);
        }
        // 如果是已经完成的数据,先获取到修改直接的数据根据数据进行对比
        InoutParam param = new InoutParam();
        param.setId(data.getId());
        param.setCompanyId(data.getCompanyId());
        param.setType(data.getType());
        InoutData record = inoutService.inoutQueryById(param);
        if (null == record) {
            return "当前修改数据已经不存在!";
        }
        // 避免数据库中的数据已经被其他人修改
        if (InoutConstant.RECORD_STATUS_DEL.equals(record.getRecordStatus())) {
            return "系统:已经删除的数据不支持修改!";
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(record.getRecordStatus())) {
            return "系统:异常终止的数据不支持修改!";
        }
        // 保存检测项目
        if (InoutConstant.TYPE_IN.equals(data.getType())) {
            // 先执行化验信息保存
            CheckUpdateResult checkResult = checkStandardManager
                    .updateCheckItems(data.getCheckId(), data.getCompanyId(),
                            data.getCheckItems());
            if (null != checkResult) {
                // if (null == data.getWet())
                // data.setWet(checkResult.getWet());
                // if (null == data.getImpurity())
                // data.setImpurity(checkResult.getImpurity());
            }
        }
        // 更新数据
        inoutService.updateData(data);
        return null;
    }
    /**
     * 删除操作 删除数据为软删除,删除数据后需要根据删除情况联动库存等信息
     *
     * @param data
     * @param selected 是否已经查询过数据
     * @return
     * @throws Exception
     */
    @Transactional
    public String delInoutData(InoutData data, boolean selected)
            throws Exception {
            // 避免页面缓存首先获取数据库中最新的当前数据信息
            InoutParam param = new InoutParam();
            param.setCompanyId(data.getCompanyId());
            param.setId(data.getId());
            param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]执行删除,原因:"
                    + data.getRemarks());
        // 避免页面缓存首先获取数据库中最新的当前数据信息
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
        param.setId(data.getId());
        param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]执行删除,原因:"
                + data.getRemarks());
            if (!selected) {
                data = inoutService.inoutQueryById(param);
                if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
                    return "已经删除的数据,不支持重复删除!";
                }
                if (InoutConstant.RECORD_STATUS_ERROR
                        .equals(data.getRecordStatus())) {
                    return "当前数据已经被标记为异常,不支持删除!";
                }
            }
            // 执行删除
            param.setProgress(InoutConstant.PROGRESS_RECORD);
            param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
            param.setType(data.getType());
            inoutService.deleteData(param);
            // 如果流程未结束,直接删除,不牵扯到联动调整
            if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
                return null;
            }
            return null;
        }
        /**
         * 异常终止操作 设置异常 为了避免页面数据缓存,需要重新获取最新数据判断
         *
         * @param data
         * @return
         * @throws Exception
         */
        @Transactional
        public String errorInoutData (InoutData data){
            InoutParam param = new InoutParam();
            param.setCompanyId(data.getCompanyId());
            param.setId(data.getId());
            param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]执行异常终止,原因:"
                    + data.getRemarks());
        if (!selected) {
            data = inoutService.inoutQueryById(param);
            if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
                return "已经删除的数据,不支持异常处理!";
                return "已经删除的数据,不支持重复删除!";
            }
            if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
                return "不支持重复异常处理!";
            if (InoutConstant.RECORD_STATUS_ERROR
                    .equals(data.getRecordStatus())) {
                return "当前数据已经被标记为异常,不支持删除!";
            }
            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
                return "流程结束的数据不支持异常处理!";
            }
            return inoutService.inoutStop(param);
        }
        /**
         * 快速结束操作 流程没有结束的单据进行结束
         *
         * @param data
         * @return
         */
        public String completeInoutData (InoutData data) throws Exception {
            if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
                return "已经删除的数据,不支持完成!";
            }
            if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
                return "异常终止的数据,不支持完成!";
            }
            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
                return "流程已完成的数据,不支持完成!";
            }
        // 执行删除
        param.setProgress(InoutConstant.PROGRESS_RECORD);
        param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
        param.setType(data.getType());
        inoutService.deleteData(param);
            // 从新查询数据
        // 如果流程未结束,直接删除,不牵扯到联动调整
        if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
            return null;
        }
        return null;
    }
    /**
     * 异常终止操作 设置异常 为了避免页面数据缓存,需要重新获取最新数据判断
     *
     * @param data
     * @return
     * @throws Exception
     */
    @Transactional
    public String errorInoutData(InoutData data) {
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
        param.setId(data.getId());
        param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]执行异常终止,原因:"
                + data.getRemarks());
        data = inoutService.inoutQueryById(param);
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "已经删除的数据,不支持异常处理!";
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
            return "不支持重复异常处理!";
        }
        if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "流程结束的数据不支持异常处理!";
        }
        return inoutService.inoutStop(param);
    }
    /**
     * 快速结束操作 流程没有结束的单据进行结束
     *
     * @param data
     * @return
     */
    public String completeInoutData(InoutData data) throws Exception {
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "已经删除的数据,不支持完成!";
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
            return "异常终止的数据,不支持完成!";
        }
        if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
            return "流程已完成的数据,不支持完成!";
        }
        // 从新查询数据
        InoutParam param = new InoutParam();
        param.setId(data.getId());
        param.setCompanyId(data.getCompanyId());
        param.setType(data.getType());
        InoutData cuData = inoutService.inoutProgressQuery(param);
        if (null == cuData) {
            return "当前车辆流程状态已经变化,请刷新页面重新操作!";
        }
        if (!cuData.getProgress().equals(data.getProgress())) {
            return "当前车辆流程状态已经变化,请刷新页面重新操作!";
        }
        if (null == data.getCompleteTime()) {
            return "请填写完成时间!!";
        }
        if (StringUtils.isEmpty(data.getDepotId())) {
            return "请填写仓库信息!";
        }
        if (StringUtils.isEmpty(data.getFoodYear())) {
            return "请填写粮食年份信息!";
        }
        if (StringUtils.isEmpty(data.getFoodVariety())) {
            return "请填写粮食品种信息!";
        }
        if (data.getSettleWeight() <= 0) {
            return "请填写结算净重信息!";
        }
        String msg = inoutService.quickComplete(data);
        if (null == msg) {
            data.setProgress(InoutConstant.PROGRESS_RECORD);
            commonService.initInoutDepotStore(data);
        }
        return msg;
    }
    public void initLpr(InoutConf conf) {
        inoutDeviceManager.initLpr(conf);
    }
    /**
     * 出入库注册数据提交,入库登记和出入库登记使用同一个方法
     *
     * @param data
     * @return
     * @throws Exception
     */
    public PageResponse<InoutData> submitRegisterInout(InoutData data)
            throws Exception {
        // 首先判断流程中是否有已经存在的车辆信息未执行完成,直接从数据库中查询
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
        param.setPlateNum(data.getPlateNum());
        param.setIntelCard(data.getIntelCard());
        param.setType(data.getType());
        param.setStart(DateUtil.getNewByDay(null, -10));
        int num = inoutService.checkExist(param);
        if (num > 0) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "当前车牌或智慧卡有正在执行流程未结束,请联系管理员", data);
        }
        // 获取系统参数配置
        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(
                data.getCompanyId(), data.getDeptId());
        if (null == inoutSysConf) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "提示:当前库区未配置出入库流程信息,请联系管理员", data);
        }
        // 获取下一个流程状态
        String curProgress = data.getProgress();
        String nextProgress = getNextProgress(curProgress, data.getType(),
                inoutSysConf);
        data = updateBasicInfo(data, curProgress, nextProgress);
        String msg = inoutService.insertData(data);
        if (null != msg) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg,
                    data);
        }
        // 执行附件信息
        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(),
                data.getId(), curProgress);
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功",
                data);
    }
    public PageResponse<InoutData> submitWeightIn(InoutData data)
            throws Exception {
        // 获取系统参数配置
        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(
                data.getCompanyId(), data.getDeptId());
        if (null == inoutSysConf) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "提示:当前系统中流程配置异常,请联系管理员", data);
        }
        // 获取下一个流程状态
        String curProgress = data.getProgress();
        String nextProgress = getNextProgress(curProgress, data.getType(),
                inoutSysConf);
        data = updateBasicInfo(data, curProgress, nextProgress);
        // 入库称重可能调整质检单
        CheckUpdateResult checkUpdateResult = updateCheckItems(data);
        if (data.getDeCheck() == 0) {
            data.setDeCheck(checkUpdateResult.getDeSum());
        }
        if (data.getAddCheck() == 0) {
            data.setAddCheck(checkUpdateResult.getAddSum());
        }
        // 执行数据更新
        String msg = inoutService.updateData(data);
        if (null != msg) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg,
                    data);
        }
        // 执行附件信息
        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(),
                data.getId(), curProgress);
        // 称重完成,调用出入库控制逻辑处理
        inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功",
                data);
    }
    public PageResponse<InoutData> submitWeightOut(InoutData data)
            throws Exception {
        // 获取系统参数配置
        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(
                data.getCompanyId(), data.getDeptId());
        if (null == inoutSysConf) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "提示:当前系统中流程配置异常,请联系管理员", data);
        }
        // 获取下一个流程状态
        String curProgress = data.getProgress();
        String nextProgress = getNextProgress(curProgress, data.getType(),
                inoutSysConf);
        data = updateBasicInfo(data, curProgress, nextProgress);
        // 执行数据更新
        String msg = inoutService.updateData(data);
        if (null != msg) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg,
                    data);
        }
        // 执行附件信息
        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(),
                data.getId(), curProgress);
        // 称重后根据当前流程状态和下一个状态,通知称重控制器
        inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功",
                data);
    }
    public PageResponse<InoutData> submitHandle(InoutData data)
            throws Exception {
        if (null == data.getHandleUser()) {
            data.setHandleUser(ContextUtil.getLoginUserCName());
        }
        // 获取系统参数配置
        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(
                data.getCompanyId(), data.getDeptId());
        if (null == inoutSysConf) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "提示:当前系统中流程配置异常,请联系管理员", data);
        }
        // 获取下一个流程状态
        String curProgress = data.getProgress();
        String nextProgress = getNextProgress(curProgress, data.getType(),
                inoutSysConf);
        data = updateBasicInfo(data, curProgress, nextProgress);
        // 执行数据更新
        String msg = inoutService.updateDataByHandle(data);
        if (null != msg) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg,
                    data);
        }
        // 执行附件信息
        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(),
                data.getId(), curProgress);
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功",
                data);
    }
    /**
     * 根据条件获取扦样数据
     *
     * @param param
     * @return
     */
    public PageResponse<Page<InoutCheckData>> pageSampleData(
            InoutCheckParam param) {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        // 若查询条件为已扦样,则流程置空;若未扦样,则流程不处理,仍为扦样化验流程(CHECK)
        if (!"NONE".equals(param.getSampleStatus())) {
            param.setProgress(null);
        }
        // 获取扦样数据
        Page<InoutCheckData> sampleList = inoutService.pageSampleData(param);
        if (null == sampleList.getRecords()
                || sampleList.getRecords().isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                    "获取到数据信息为空");
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, sampleList);
    }
    public PageResponse<InoutCheckData> submitSample(InoutCheckData data) throws Exception {
        // 获取业务数据信息
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
        param.setId(data.getId());
        InoutData curData = inoutService.inoutProgressQuery(param);
        if (null == curData) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "没有获取到入库业务数据信息,更新失败", data);
        }
        if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "当前流程已经结束,不支持修改");
        }
        // 扦样时间和扦样人
        if (StringUtils.isEmpty(data.getSampleUser())) {
            data.setSampleUser(ContextUtil.getLoginUserCName());
        }
        if (null == data.getSampleTime()) {
            data.setSampleTime(new Date());
        }
        String msg = inoutService.updateSampleData(data);
        if (null != msg) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功");
    }
    /**
     * @param param
     * @return
     */
    public PageResponse<Page<InoutCheckData>> pageCheckData(
            InoutCheckParam param) {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(param.getDeptId())) {
            param.setDeptId(ContextUtil.subDeptId(null));
        }
        // 如果是已化验,则将流程状态置空,如果是未化验,则流程状态不处理,仍是CHECK状态
        if (!"NONE".equals(param.getCheckStatus())) {
            param.setProgress(null);
        }
        Page<InoutCheckData> checkList = inoutService.pageCheckData(param);
        if (null == checkList.getRecords() || checkList.getRecords().isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                    "获取到数据信息为空");
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, checkList);
    }
    /**
     * 获取化验项信息
     *
     * @param param
     * @return
     */
    public PageResponse<List<CheckItemData>> getCheckItemData(
            InoutCheckParam param) {
        try {
            List<CheckItemData> result = checkStandardManager.listCheckItem(
                    param.getCheckId(), param.getCompanyId(),
                    param.getFoodVariety());
            return new PageResponse<>(RespCodeEnum.CODE_0000, result);
        } catch (Exception e) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "后台异常:"
                    + e.getMessage(), null);
        }
    }
    @Transactional(rollbackFor = Exception.class)
    public PageResponse<InoutCheckData> updateCheckData(InoutCheckData data) {
        try {
            // 获取业务数据信息
            InoutParam param = new InoutParam();
            param.setCompanyId(data.getCompanyId());
            param.setId(data.getId());
            param.setCompanyId(data.getCompanyId());
            param.setType(data.getType());
            InoutData cuData = inoutService.inoutProgressQuery(param);
            if (null == cuData) {
                return "当前车辆流程状态已经变化,请刷新页面重新操作!";
            }
            if (!cuData.getProgress().equals(data.getProgress())) {
                return "当前车辆流程状态已经变化,请刷新页面重新操作!";
            }
            if (null == data.getCompleteTime()) {
                return "请填写完成时间!!";
            }
            if (StringUtils.isEmpty(data.getDepotId())) {
                return "请填写仓库信息!";
            }
            if (StringUtils.isEmpty(data.getFoodYear())) {
                return "请填写粮食年份信息!";
            }
            if (StringUtils.isEmpty(data.getFoodVariety())) {
                return "请填写粮食品种信息!";
            }
            if (data.getSettleWeight() <= 0) {
                return "请填写结算净重信息!";
            }
            String msg = inoutService.quickComplete(data);
            if (null == msg) {
                data.setProgress(InoutConstant.PROGRESS_RECORD);
                commonService.initInoutDepotStore(data);
            }
            return msg;
        }
        public void initLpr (InoutConf conf){
            inoutDeviceManager.initLpr(conf);
        }
        /**
         * 出入库注册数据提交,入库登记和出入库登记使用同一个方法
         *
         * @param data
         * @return
         * @throws Exception
         */
        public PageResponse<InoutData> submitRegisterInout (InoutData data) throws Exception {
            //首先判断流程中是否有已经存在的车辆信息未执行完成,直接从数据库中查询
            InoutParam param = new InoutParam();
            param.setCompanyId(data.getCompanyId());
            param.setPlateNum(data.getPlateNum());
            param.setIntelCard(data.getIntelCard());
            param.setType(data.getType());
            param.setStart(DateUtil.getNewByDay(null, -10));
            int num = inoutService.checkExist(param);
            if (num > 0) {
            InoutData curData = inoutService.inoutProgressQuery(param);
            if (null == curData) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "当前车牌或智慧卡有正在执行流程未结束,请联系管理员", data);
                        "没有获取到入库业务数据信息,更新失败", data);
            }
            if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "当前流程已经结束,不支持修改");
            }
            // 更新化验项信息
            CheckUpdateResult checkResult = checkStandardManager
                    .updateCheckItems(data.getCheckId(), data.getCompanyId(),
                            data.getCheckItems());
            if (StringUtils.isNotEmpty(checkResult.getMsg())) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "后台执行异常:" + checkResult.getMsg(), data);
            }
            //获取系统参数配置
            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
            // 设置化验信息
            if (checkResult.getDeSum() > 0) {
                data.setDeCheck(checkResult.getDeSum());
            }
            if (checkResult.getAddSum() > 0) {
                data.setAddCheck(checkResult.getAddSum());
            }
            if (null == data.getCheckTime()) {
                data.setCheckTime(new Date());
            }
            curData.setCheckStatus(data.getCheckStatus());
            // 获取系统参数配置
            InoutSysConf inoutSysConf = inoutCommonService
                    .getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
            if (null == inoutSysConf) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "提示:当前库区未配置出入库流程信息,请联系管理员", data);
            }
            // 更新下一流程状态
            if (InoutConstant.PROGRESS_CHECK.equals(curData.getProgress())) {
                curData = updateBasicInfo(curData, inoutSysConf);
                // 若化验结果不合格,判断配置后续流程
                if (InoutConstant.STATUS_UNPASS
                        .equals(curData.getCheckStatus())) {
                    curData = checkNoPass(curData);
                }
            }
            // 化验人、化验时间
            data.setCheckStatus(curData.getCheckStatus());
            data.setProgress(curData.getProgress());
            if (StringUtils.isEmpty(data.getCheckUser())) {
                data.setCheckUser(ContextUtil.getLoginUserCName());
            }
            if (null == data.getCheckTime()) {
                data.setCheckTime(new Date());
            }
            //获取下一个流程状态
            String curProgress = data.getProgress();
            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
            data = updateBasicInfo(data, curProgress, nextProgress);
            String msg = inoutService.insertData(data);
            String msg = inoutService.updateCheckData(data);
            if (null != msg) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
            }
            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功");
        } catch (Exception e) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "后台异常:"
                    + e.getMessage(), null);
        }
    }
    /**
     * 获取单价信息
     *
     * @param param
     * @return
     */
    public PageResponse<InoutPrice> getPrice(InoutCheckParam param) {
        try {
            List<InoutPrice> price = inoutService.getPrice(param);
            if (null == price || price.isEmpty()) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        msg, data);
                        "未获取到粮食定价配置信息");
            }
            return new PageResponse<>(RespCodeEnum.CODE_0000, price.get(0));
            // 执行附件信息
            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功", data);
        } catch (Exception e) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "后台异常:"
                    + e.getMessage(), null);
        }
    }
        public PageResponse<InoutData> submitWeightIn (InoutData data) throws Exception {
            //获取系统参数配置
            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
            if (null == inoutSysConf) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "提示:当前系统中流程配置异常,请联系管理员", data);
            }
            //获取下一个流程状态
            String curProgress = data.getProgress();
            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
            data = updateBasicInfo(data, curProgress, nextProgress);
            //入库称重可能调整质检单
            CheckUpdateResult checkUpdateResult = updateCheckItems(data);
            if (data.getDeCheck() == 0) {
                data.setDeCheck(checkUpdateResult.getDeSum());
            }
            if (data.getAddCheck() == 0) {
                data.setAddCheck(checkUpdateResult.getAddSum());
            }
            //执行数据更新
            String msg = inoutService.updateData(data);
            if (null != msg) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
            }
            // 执行附件信息
            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
            //称重完成,调用出入库控制逻辑处理
            inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功", data);
        }
        public PageResponse<InoutData> submitWeightOut (InoutData data) throws Exception {
            //获取系统参数配置
            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
            if (null == inoutSysConf) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "提示:当前系统中流程配置异常,请联系管理员", data);
            }
            //获取下一个流程状态
            String curProgress = data.getProgress();
            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
            data = updateBasicInfo(data, curProgress, nextProgress);
            //执行数据更新
            String msg = inoutService.updateData(data);
            if (null != msg) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
            }
            // 执行附件信息
            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
            //称重后根据当前流程状态和下一个状态,通知称重控制器
            inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功", data);
        }
        public PageResponse<InoutData> submitHandle (InoutData data) throws Exception {
            if (null == data.getHandleUser()) {
                data.setHandleUser(ContextUtil.getLoginUserCName());
            }
            //获取系统参数配置
            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
            if (null == inoutSysConf) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "提示:当前系统中流程配置异常,请联系管理员", data);
            }
            //获取下一个流程状态
            String curProgress = data.getProgress();
            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
            data = updateBasicInfo(data, curProgress, nextProgress);
            //执行数据更新
            String msg = inoutService.updateDataByHandle(data);
            if (null != msg) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
            }
            // 执行附件信息
            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功", data);
        }
        /**
         * 根据条件获取扦样数据
         *
         * @param param
         * @return
         */
        public PageResponse<Page<InoutCheckData>> pageSampleData (InoutCheckParam param){
            if (StringUtils.isEmpty(param.getCompanyId())) {
                param.setCompanyId(ContextUtil.getCompanyId());
            }
            if (StringUtils.isEmpty(param.getDeptId())) {
                param.setDeptId(ContextUtil.subDeptId(null));
            }
            //若查询条件为已扦样,则流程置空;若未扦样,则流程不处理,仍为扦样化验流程(CHECK)
            if (!"NONE".equals(param.getSampleStatus())) {
                param.setProgress(null);
            }
            //获取扦样数据
            Page<InoutCheckData> sampleList = inoutService.pageSampleData(param);
            if (null == sampleList.getRecords() || sampleList.getRecords().isEmpty()) {
                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                        "获取到数据信息为空");
            }
            return new PageResponse<>(RespCodeEnum.CODE_0000, sampleList);
        }
        @Transactional(rollbackFor = Exception.class)
        public PageResponse<InoutCheckData> updateSampleData (InoutCheckData data){
            try {
                // 获取业务数据信息
                InoutParam param = new InoutParam();
                param.setCompanyId(data.getCompanyId());
                param.setId(data.getId());
                InoutData curData = inoutService.inoutProgressQuery(param);
                if (null == curData) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                            "没有获取到入库业务数据信息,更新失败", data);
                }
                if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                            "当前流程已经结束,不支持修改");
                }
                //扦样时间和扦样人
                if (StringUtils.isEmpty(data.getSampleUser())) {
                    data.setSampleUser(ContextUtil.getLoginUserCName());
                }
                if (null == data.getSampleTime()) {
                    data.setSampleTime(new Date());
                }
                String msg = inoutService.updateSampleData(data);
                if (null != msg) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
                }
                return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功");
            } catch (Exception e) {
                log.error("后台异常:{}", e);
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "后台异常:" + e.getMessage(), null);
            }
        }
        /**
         * @param param
         * @return
         */
        public PageResponse<Page<InoutCheckData>> pageCheckData (InoutCheckParam param){
            if (StringUtils.isEmpty(param.getCompanyId())) {
                param.setCompanyId(ContextUtil.getCompanyId());
            }
            if (StringUtils.isEmpty(param.getDeptId())) {
                param.setDeptId(ContextUtil.subDeptId(null));
            }
            // 如果是已化验,则将流程状态置空,如果是未化验,则流程状态不处理,仍是CHECK状态
            if (!"NONE".equals(param.getCheckStatus())) {
                param.setProgress(null);
            }
            Page<InoutCheckData> checkList = inoutService.pageCheckData(param);
            if (null == checkList.getRecords() || checkList.getRecords().isEmpty()) {
                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                        "获取到数据信息为空");
            }
            return new PageResponse<>(RespCodeEnum.CODE_0000, checkList);
        }
        /**
         * 获取化验项信息
         *
         * @param param
         * @return
         */
        public PageResponse<List<CheckItemData>> getCheckItemData (InoutCheckParam param){
            try {
                List<CheckItemData> result = checkStandardManager.listCheckItem(param.getCheckId(),
                        param.getCompanyId(), param.getFoodVariety());
                return new PageResponse<>(RespCodeEnum.CODE_0000, result);
            } catch (Exception e) {
                return new PageResponse<>(
                        RespCodeEnum.CODE_1111.getCode(), "后台异常:" + e.getMessage(), null);
            }
        }
        @Transactional(rollbackFor = Exception.class)
        public PageResponse<InoutCheckData> updateCheckData (InoutCheckData data){
            try {
                // 获取业务数据信息
                InoutParam param = new InoutParam();
                param.setCompanyId(data.getCompanyId());
                param.setId(data.getId());
                InoutData curData = inoutService.inoutProgressQuery(param);
                if (null == curData) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                            "没有获取到入库业务数据信息,更新失败", data);
                }
                if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                            "当前流程已经结束,不支持修改");
                }
                //更新化验项信息
                CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
                if (StringUtils.isNotEmpty(checkResult.getMsg())) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                            "后台执行异常:" + checkResult.getMsg(), data);
                }
                //设置化验信息
                if (checkResult.getDeSum() > 0) {
                    data.setDeCheck(checkResult.getDeSum());
                }
                if (checkResult.getAddSum() > 0) {
                    data.setAddCheck(checkResult.getAddSum());
                }
                if (null == data.getCheckTime()) {
                    data.setCheckTime(new Date());
                }
                curData.setCheckStatus(data.getCheckStatus());
                //获取系统参数配置
                InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
                if (null == inoutSysConf) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                            "提示:当前库区未配置出入库流程信息,请联系管理员", data);
                }
                //更新下一流程状态
                if (InoutConstant.PROGRESS_CHECK.equals(curData.getProgress())) {
                    curData = updateBasicInfo(curData, inoutSysConf);
                    // 若化验结果不合格,判断配置后续流程
                    if (InoutConstant.STATUS_UNPASS.equals(curData.getCheckStatus())) {
                        curData = checkNoPass(curData);
                    }
                }
                //化验人、化验时间
                data.setCheckStatus(curData.getCheckStatus());
                data.setProgress(curData.getProgress());
                if (StringUtils.isEmpty(data.getCheckUser())) {
                    data.setCheckUser(ContextUtil.getLoginUserCName());
                }
                if (null == data.getCheckTime()) {
                    data.setCheckTime(new Date());
                }
                String msg = inoutService.updateCheckData(data);
                if (null != msg) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
                }
                return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功");
            } catch (Exception e) {
                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                        "后台异常:" + e.getMessage(), null);
            }
        }
        /**
         * 获取单价信息
         *
         * @param param
         * @return
         */
        public PageResponse<InoutPrice> getPrice (InoutCheckParam param){
            try {
                List<InoutPrice> price = inoutService.getPrice(param);
                if (null == price || price.isEmpty()) {
                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "未获取到粮食定价配置信息");
                }
                return new PageResponse<>(RespCodeEnum.CODE_0000, price.get(0));
            } catch (Exception e) {
                return new PageResponse<>(
                        RespCodeEnum.CODE_1111.getCode(), "后台异常:" + e.getMessage(), null);
            }
        }
    }
}
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
@@ -281,12 +281,17 @@
    @Override
    public String toComplete(InoutParam param) throws Exception {
        param.setUpdateTime(new Date());
        if (null == param.getCompanyId()) {
            param.setCompanyId(ContextUtil.getDefaultCompanyId());
        }
        // 清除缓存
        this.delFromCache(param.getDeptId(), param.getType(), param.getId());
        inoutMapper.toComplete(param);
@@ -719,6 +724,7 @@
        }
        int num = inoutCheckMapper.updateSampleData(data);
        return null;
    }
@@ -756,6 +762,9 @@
            data.setCompanyId(ContextUtil.subDeptId(null));
        }
        data.setUpdateTime(new Date());
        int num = inoutCheckMapper.updateCheckData(data);
        return null;
    }
igds-inout/src/main/resources/mapper/InoutCheckMapper.xml
@@ -44,7 +44,8 @@
    <!--更新扦样信息-->
    <update id="updateSampleData" parameterType="com.ld.igds.inout.dto.InoutCheckData">
        UPDATE D_INOUT_RECORD SET
        UPDATE D_INOUT_RECORD
        set UPDATE_TIME_ = #{data.updateTime} ,
        <if test="data.sampleUser != null">SAMPLE_USER_ = #{data.sampleUser},</if>
        <if test="data.sampleTime != null">SAMPLE_TIME_ = #{data.sampleTime},</if>
        <if test="data.sampleType != null">SAMPLE_TYPE_ = #{data.sampleType},</if>
igds-inout/src/main/resources/mapper/InoutRecordMapper.xml
@@ -471,7 +471,7 @@
        set PROGRESS_ = #{param.progress},
        COMPLETE_TIME_ =#{param.completeTime},
        COMPLETE_USER_ = #{param.userId},
        UPDATE_TIME_ = sysdate
        UPDATE_TIME_ = #{param.updateTime}
        where ID_ = #{param.id}
        and TYPE_ = #{param.type}
        and COMPANY_ID_ = #{param.companyId}
igds-web/src/main/resources/static/admin/inout/in-card-back.js
@@ -127,7 +127,7 @@
}
// 当前完成
function submit() {
function submitData() {
    if (!recordData) {
        alertError("没有数据可以提交!");
        return;
@@ -140,7 +140,7 @@
    $.ajax({
        type : "POST",
        url : "../../basic/inout/inout-back-submit",
        url : "../../basic/inout/submit-card-back",
        dataType : "json",
        contentType : "application/json;charset=UTF-8",
        data : JSON.stringify(recordData),
igds-web/src/main/resources/static/admin/inout/in-sample.js
@@ -14,7 +14,6 @@
        form = layui.form;
        table = layui.table;
        laydate = layui.laydate;
        laydate.render({
            elem: '#start',
            theme: '#7b8e9f',
@@ -44,31 +43,11 @@
                showDetail(obj);
            }
        });
        //监听粮食品种
        layui.form.on('select(select_foodVariety)', function (data) {
            updateFoodVariety(data.value);
        });
        //监听化验结果单填写数据,并给出提示结果
        table.on('edit(tableCheckItem)', function (obj) {
            getResult(obj);
        });
    });
    //显示入库流程
    showProgress();
    // 初始化WebSocket
    initInoutWS(deptId, bizType, progress, userId);
});
// socket信息返回處理
function socketOnMessage(packet) {
    layer.alert(packet.data);
    window.parent.sysNotify(packet.data);
}
/**
 * 条件查询
@@ -193,55 +172,6 @@
    form.render();
};
//根据填写化验数据,给出提醒是否合格
function getResult(obj) {
    var data = obj.data;
    //填写的数据值
    var newValue = data.value;
    //标准值
    var limit = data.upperLimit;
    //运算符
    var symbol = data.operaSymbol;
    if (symbol && limit) {
        if (">=" == symbol) {
            if (newValue < limit) {
                data.remarks = "不合格";
            } else {
                data.remarks = "合格";
            }
        }
        if ("<=" == symbol) {
            if (newValue > limit) {
                data.remarks = "不合格";
            } else {
                data.remarks = "合格";
            }
        }
        if ("==" == symbol) {
            if (newValue != limit) {
                data.remarks = "不合格";
            } else {
                data.remarks = "合格";
            }
        }
    }
    obj.update(data);
    //根据化验结果提醒是否合格
    updateCheckResultTip();
}
//根据选择仓库显示粮食品种
function updateFoodVariety(foodVariety) {
    if (null == foodVariety || "" == foodVariety) return;
    form.val("form-detail", {
        foodVariety: foodVariety
    });
    form.render();
    flushCheckItem(foodVariety);
}
// 根据模式启动开始扦样
function checkExe(type) {
@@ -257,14 +187,14 @@
        success: function (result) {
            layer.close(index);
            if (result.code != "0000") {
                layer.alert(result.msg);
                alertError(result.msg);
            } else {
                layer.msg("操作命令发送成功!");
                alertSuccess("操作命令发送成功!");
            }
        },
        error: function () {
            layer.close(index);
            layer.alert("后台异常,操作命令发送失败!");
            alertError("后台异常,操作命令发送失败!");
        }
    });
};
@@ -348,12 +278,11 @@
 * 时间等
 */
function getTime() {
        var now = new Date();
        var time = now.toLocaleString('chinese', {
            hour12: false
        });
        return time;
    var now = new Date();
    var time = now.toLocaleString('chinese', {
        hour12: false
    });
    return time;
}
function showDetail(obj) {
@@ -362,10 +291,10 @@
    $("#printTime").html(nowTime);
    curSampleData = obj.data;
    if(!curSampleData.sampleTime){
    if (!curSampleData.sampleTime) {
        curSampleData.sampleTime = nowTime;
    }
    if(!curSampleData.sampleUser){
    if (!curSampleData.sampleUser) {
        curSampleData.sampleUser = sampleUser;
    }
    // 赋值
@@ -379,9 +308,9 @@
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
        btn: ['保存并打印', '保存提交','关闭取消'],
        btn: ['保存并打印', '保存提交', '关闭取消'],
        yes: function () {
            layer.alert("条形码待确定!");
            alertSuccess("条形码待确定!");
        }, btn2: function () {
            // 更新到页面
            var data = form.val("form-detail");
@@ -409,11 +338,10 @@
        layer.alert("请输入扦样时间!!");
        return;
    }
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/update-sample",
        url: "../../basic/inout/submit-sample",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(curSampleData),
@@ -430,67 +358,7 @@
        },
        error: function () {
            layer.close(index);
            layer.alert("提交失败,请重新尝试!");
            alertError("提交失败,请重新尝试");
        }
    });
}
//控制流程环节显示
function showProgress() {
    if (!inoutProgress) {
        return;
    }
    if (inoutProgress.indexOf("REGISTER") == -1) {
        $("#progress-register").css("display", "none");
    }
    if (inoutProgress.indexOf("CHECK") == -1) {
        $("#progress-check").css("display", "none");
    }
    if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
        $("#progress-fullWeight").css("display", "none");
    }
    if (inoutProgress.indexOf("HANDLE") == -1) {
        $("#progress-hand").css("display", "none");
    }
    if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
        $("#progress-emptyWeight").css("display", "none");
    }
    if (inoutProgress.indexOf("CARD_BACK") == -1) {
        $("#progress-cardBack").css("display", "none");
    }
}
/**
 * 弹出提醒框
 * @param msg 提醒信息
 * @param data 数据信息,可能为空
 */
function notify(msg, data) {
    if (data) {
        //赋值
        $("#resultMsg").text(msg);
        $("#resultUserName").text(data.userName);
        $("#resultPlateNum").text(data.plateNum);
        if ("IN" == data.type) {
            $("#resultType").text("入库-" + INOUT_PROGRESS_MSG(data.progress));
        } else {
            $("#resultType").text("出库-" + INOUT_PROGRESS_MSG(data.progress));
        }
        $("#resultIntelCard").text(data.intelCard);
        layer.open({
            type: 1,
            offset: ['150px', '200px'],
            area: '450px;',
            shade: 0.8,
            id: 'dialog_notify_info',
            btn: ['确定'],
            content: $('#dialog-from-notify'),
            yes: function (index) {
                layer.closeAll();
            }
        });
    } else {
        layer.alert(msg, {offset: ['300px', '300px']});
    }
}
igds-web/src/main/resources/static/admin/inout/inout-common.js
@@ -31,6 +31,13 @@
    });
}
function alertSuccess(msg) {
    layer.alert(msg, {
        icon: 1,
        offset: ['300px', '300px']
    });
}
/**
 * 弹出提醒框
 * @param msg 提醒信息
igds-web/src/main/resources/templates/admin/inout/in-card-back.html
@@ -294,8 +294,8 @@
                            <div class="rkbk-quick layui-text-center">
                                <button class="rkbk-quick-btn layui-btn btn-green"
                                        onclick="submit()">
                                <button class="rkbk-quick-btn layui-btn btn-green" type='button'
                                        onclick="submitData()">
                                    <i><img th:src="@{../../static/images/icon-ok.png}"/></i> 收卡出库
                                </button>
                            </div>
igds-web/src/main/resources/templates/admin/inout/in-sample.html
@@ -177,21 +177,17 @@
        <div class="qyzj-con radius-6">
            <div class="qyzj-con-top layui-row">
                <form class="layui-form" action="" id="form-param" lay-filter="form-param">
                    <div class="layui-form-item display-none">
                        <label class="layui-form-label">隐藏-类型</label>
                        <div class="layui-input-block">
                            <input type="text" name="type" th:value="${type}" autocomplete="off"
                                   class="layui-input rkbk-search-input">
                        </div>
                            <input type="text" name="type" th:value="${type}">
                    </div>
                    <div class="layui-form-item display-none">
                        <label class="layui-form-label">隐藏-流程</label>
                        <div class="layui-input-block">
                            <input type="text" name="progress" th:value="${progress}" autocomplete="off"
                                   class="layui-input rkbk-search-input">
                        </div>
                            <input type="text" name="progress" th:value="${progress}">
                    </div>
                    <div class="layui-form-item display-none">
                        <input type="text" name="companyId" th:value="${companyId}">
                    </div>
                    <div class="layui-form-item display-none">
                        <input type="text" name="deptId" th:value="${deptId}">
                    </div>
                    <div class="layui-col-xs3">
@@ -299,17 +295,12 @@
    var type = [[${type}]];
    //userId
    var userId = [[${loginUser.username}]];
    var sampleUser = [[${loginUser.cname}]];
    var companyId = [[${loginUser.companyId}]];
    //品种
    var listFoodVariety = [[${listFoodVariety}]];
    var startTime = [[${startTime}]];
    var endTime = [[${endTime}]];
    //扦样机信息
    var checkDto = [[${checkDto}]];
    //所属分库
    var deptId = [[${deptId}]];
    //库区名称
@@ -321,6 +312,7 @@
<script th:src="@{../../static/js/jquery.min.js}"></script>
<script th:src="@{../../static/js/constant.js}"></script>
<script th:src="@{../../static/js/igds-common.js}"></script>
<script th:src="@{../../static/admin/inout/inout-common.js}"></script>
<script th:src="@{../../static/admin/inout/in-sample.js}"></script>
<script type="text/html" id="barControl">