czt
2023-06-01 419e76f6256868851ed245940297f7f5bfd99e55
化验页面优化1
已修改23个文件
1139 ■■■■■ 文件已修改
igds-core/src/main/java/com/ld/igds/check/CheckStandard.view.xml 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/CheckStandardManager.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/CheckStandardPR.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/dto/CheckItemData.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/mapper/CheckStandardMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/service/CoreCheckStandardService.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/service/HCheckStandardService.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/service/impl/CoreCheckStandardServiceImpl.java 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/models/CheckItem.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/models/CheckStandard.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/resources/mapper/CheckStandardMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckData.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java 198 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/resources/mapper/InoutCheckMapper.xml 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-check.js 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-sample.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/in-check.html 247 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/in-sample.html 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/CheckStandard.view.xml
@@ -8,15 +8,10 @@
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">id</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">组织编码</Property>
      </PropertyDef>
      <PropertyDef name="deptId">
        <Property></Property>
        <Property name="label">部门编码</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
@@ -33,40 +28,27 @@
        <Property name="label">化验项编码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="operaSymbol">
        <Property></Property>
        <Property name="label">标准要求</Property>
        <Property name="mapping">
          <Property name="mapValues"></Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="unit">
        <Property></Property>
        <Property name="label">单位</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="standardName">
        <Property></Property>
        <Property name="label">化验项</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="operaSymbol">
        <Property></Property>
        <Property name="label">标准要求</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="upperLimit">
        <Property name="dataType">Double</Property>
        <Property name="label">合格伐值</Property>
      </PropertyDef>
      <PropertyDef name="unit">
        <Property></Property>
        <Property name="label">单位</Property>
      </PropertyDef>
      <PropertyDef name="ruleNum">
        <Property></Property>
        <Property name="label">扣重系数</Property>
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="ruleAdd">
        <Property></Property>
        <Property name="label">增重%</Property>
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="ruleAddEnd">
        <Property></Property>
        <Property name="label">增重上限%</Property>
        <Property name="label">增扣重系数</Property>
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="ruleReduce">
@@ -74,8 +56,14 @@
        <Property name="label">扣重比例</Property>
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="standardPrice">
        <Property name="label">标准单价(元/斤)</Property>
      <PropertyDef name="ruleAdd">
        <Property></Property>
        <Property name="label">增重比例</Property>
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="ruleAddEnd">
        <Property></Property>
        <Property name="label">增重上限%</Property>
        <Property name="dataType">Double</Property>
      </PropertyDef>
      <PropertyDef name="rulePrice">
@@ -312,11 +300,11 @@
                <Property name="cols">*,*</Property>
                <Property name="labelAlign">right</Property>
                <Property name="labelSeparator">:</Property>
                <Property name="labelWidth">120</Property>
                <Property name="labelWidth">140</Property>
                <AutoFormElement>
                  <Property name="name">ruleNum</Property>
                  <Property name="property">ruleNum</Property>
                  <Property name="label">每高出标准</Property>
                  <Property name="label">每高出多少</Property>
                  <Property name="labelAlign">right</Property>
                  <Editor/>
                </AutoFormElement>
@@ -324,7 +312,7 @@
                  <Property name="name">ruleReduce</Property>
                  <Property name="property">ruleReduce</Property>
                  <Property name="labelAlign">right</Property>
                  <Property name="label">扣重(%)</Property>
                  <Property name="label">扣重比例(%)</Property>
                  <Editor/>
                </AutoFormElement>
              </AutoForm>
@@ -340,17 +328,6 @@
                <Property name="labelAlign">right</Property>
                <Property name="labelSeparator">:</Property>
                <Property name="labelWidth">140</Property>
                <AutoFormElement>
                  <Property name="name">standardPrice</Property>
                  <Property name="property">standardPrice</Property>
                  <Editor/>
                </AutoFormElement>
                <Label>
                  <Property name="text">注意:系統仅以水分标准价格为准。</Property>
                  <Property name="style">
                    <Property name="color">blue</Property>
                  </Property>
                </Label>
                <AutoFormElement>
                  <Property name="name">rulePrice</Property>
                  <Property name="property">rulePrice</Property>
igds-core/src/main/java/com/ld/igds/check/CheckStandardManager.java
@@ -30,23 +30,18 @@
     *
     * @param checkId
     * @param companyId
     * @param deptId
     * @param foodVariety
     * @return
     */
    public List<CheckItemData> listCheckItem(String checkId, String companyId,
                                             String deptId, String foodVariety) {
    public List<CheckItemData> listCheckItem(String checkId, String companyId, String foodVariety) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(ContextUtil.getLoginUser());
        }
        List<CheckItemData> list = checkStandardService.getCheckItemById(checkId, companyId);
        if (list == null || list.isEmpty()) {
            list = checkStandardService.getCheckItemByStandard(checkId, companyId, deptId, foodVariety);
            list = checkStandardService.getCheckItemByStandard(checkId, companyId, foodVariety);
        }
        return list;
    }
igds-core/src/main/java/com/ld/igds/check/CheckStandardPR.java
@@ -84,7 +84,7 @@
        String deptId = (String) param.get("deptId");
        String foodVariety = (String) param.get("foodVariety");
        return checkStandardManager.listCheckItem(checkId, null, deptId, foodVariety);
        return checkStandardManager.listCheckItem(checkId, deptId, foodVariety);
    }
    /**
@@ -101,7 +101,7 @@
        String deptId = (String) param.get("deptId");
        String foodVariety = (String) param.get("foodVariety");
        return checkStandardManager.listCheckItem(null, null, deptId, foodVariety);
        return checkStandardManager.listCheckItem(null, null, foodVariety);
    }
igds-core/src/main/java/com/ld/igds/check/dto/CheckItemData.java
@@ -16,7 +16,8 @@
 */
@Data
@EqualsAndHashCode(callSuper=false)
public class CheckItemData extends CheckItem implements Serializable {/**
public class CheckItemData extends CheckItem implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = -570067528303737321L;
igds-core/src/main/java/com/ld/igds/check/mapper/CheckStandardMapper.java
@@ -45,12 +45,10 @@
     * 获取配置的化验项信息
     *
     * @param companyId
     * @param deptId
     * @param foodVariety
     * @return
     */
    List<CheckStandardData> getCheckStandard(@Param("companyId") String companyId,
                                             @Param("deptId") String deptId,
                                             @Param("foodVariety") String foodVariety);
}
igds-core/src/main/java/com/ld/igds/check/service/CoreCheckStandardService.java
@@ -51,14 +51,5 @@
     *
     * @param checkId
     */
    List<CheckItemData> getCheckItemByStandard(String checkId, String companyId, String deptId, String foodVariety);
    /**
     * 获取标准的化验定义,新增化验项目
     *
     * @param companyId
     * @return
     */
    List<CheckStandardData> getCheckStandard(String companyId, String deptId, String foodVariety);
    List<CheckItemData> getCheckItemByStandard(String checkId, String companyId, String foodVariety);
}
igds-core/src/main/java/com/ld/igds/check/service/HCheckStandardService.java
@@ -21,14 +21,6 @@
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("companyId", ContextUtil.getCompanyId());
        if(param != null){
            String str = (String) param.get("deptId");
            if (StringUtils.isEmpty(str)) {
                str = ContextUtil.subDeptId(ContextUtil.getLoginUser());
            }
            hql += " and deptId =:deptId ";
            args.put("deptId", str);
        }
        hql += " order by foodVariety";
@@ -44,10 +36,6 @@
            if(null == data.getId()){
                data.setId(ContextUtil.getTimeId());
            }
// TODO
//            if(null == data.getDeptId()){
//                data.setDeptId(ContextUtil.subDeptId(ContextUtil.getLoginUser()));
//            }
            if(null == data.getUpperLimit()) data.setUpperLimit(0.0);
igds-core/src/main/java/com/ld/igds/check/service/impl/CoreCheckStandardServiceImpl.java
@@ -6,6 +6,7 @@
import com.ld.igds.check.service.CoreCheckStandardService;
import com.ld.igds.util.ContextUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@@ -42,14 +43,16 @@
    }
    @Override
    public List<CheckItemData> getCheckItemByStandard(String checkId, String companyId,
                                                      String deptId, String foodVariety) {
    public List<CheckItemData> getCheckItemByStandard(String checkId, String companyId, String foodVariety) {
        List<CheckItemData> result = new ArrayList<>();
        if (StringUtils.isEmpty(foodVariety)) {
            return result;
        }
        List<CheckStandardData> list = this.getCheckStandard(companyId, deptId, foodVariety);
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getDefaultCompanyId();
        }
        List<CheckStandardData> list = checkStandardMapper.getCheckStandard(companyId, foodVariety);
        if (null == list) {
            return result;
        }
@@ -57,40 +60,16 @@
        CheckItemData item;
        for (CheckStandardData data : list) {
            item = new CheckItemData();
            BeanUtils.copyProperties(data, item);
            item.setCheckId(checkId);
            item.setCompanyId(companyId);
            item.setStandardId(data.getStandardId());
            item.setStandardName(data.getStandardName());
            item.setUnit(data.getUnit());
            item.setUpperLimit(data.getUpperLimit());
            item.setRuleNum(data.getRuleNum());
            item.setRuleAdd(data.getRuleAdd());
            item.setRuleAddEnd(data.getRuleAddEnd());
            item.setRuleReduce(data.getRuleReduce());
            item.setOperaSymbol(data.getOperaSymbol());
// TODO
//            if (data.getUpperLimit() > 0.0) {
//                item.setStandardValue(data.getUpperLimit() + "");
//                if(null != data.getOperaSymbol()){
//                    item.setStandardValue(data.getOperaSymbol() +" " + data.getUpperLimit());
//                }
//            }
            if (data.getUpperLimit() > 0.0 && StringUtils.isNotEmpty(data.getOperaSymbol())) {
                item.setOperaSymbol(data.getOperaSymbol() + " " + data.getUpperLimit());
            }
            result.add(item);
        }
        return result;
    }
    @Override
    public List<CheckStandardData> getCheckStandard(String companyId, String deptId, String foodVariety) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getDefaultCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            companyId = ContextUtil.subDeptId(ContextUtil.getLoginUser());
        }
        return checkStandardMapper.getCheckStandard(companyId, deptId, foodVariety);
    }
}
igds-core/src/main/java/com/ld/igds/models/CheckItem.java
@@ -101,7 +101,7 @@
    private Double addPrice;
    @Column(name = "DE_PRICE_")
    @PropertyDef(label = "扣重", description = "单位:元")
    @PropertyDef(label = "扣价", description = "单位:元")
    private Double dePrice;
    @Column(name = "RESULT_", length = 2)
igds-core/src/main/java/com/ld/igds/models/CheckStandard.java
@@ -56,31 +56,31 @@
    private String operaSymbol;
    @Column(name = "UPPER_LIMIT_")
    @PropertyDef(label = "标准上限")
    @PropertyDef(label = "标准值")
    private Double upperLimit;
    @Column(name = "RULE_NUM_")
    @PropertyDef(label = "扣重系数")
    @PropertyDef(label = "增扣重系数")
    private Double ruleNum;
    @Column(name = "RULE_REDUCE_")
    @PropertyDef(label = "扣重比例")
    private Double ruleReduce;
    @Column(name = "RULE_ADD_")
    @PropertyDef(label = "增重%")
    @PropertyDef(label = "增重比例")
    private Double ruleAdd;
    @Column(name = "RULE_ADD_END_")
    @PropertyDef(label = "增重上限%")
    private Double ruleAddEnd;
    @Column(name = "RULE_REDUCE_")
    @PropertyDef(label = "扣重%")
    private Double ruleReduce;
    @Column(name = "RULE_PRICE_")
    @PropertyDef(label = "扣费系数")
    private Double rulePrice;
    @Column(name = "RULE_REDUCE_PRICE_")
    @PropertyDef(label = "扣费")
    @PropertyDef(label = "扣费比例")
    private Double ruleReducePrice;
    @Column(name = "UPDATE_TIME_")
igds-core/src/main/resources/mapper/CheckStandardMapper.xml
@@ -93,18 +93,20 @@
        STANDARD_NAME_ as standardName,
        UNIT_ as unit,
        UPPER_LIMIT_ as upperLimit,
--         LOWER_LIMIT_ as lowerLimit,
        OPERA_SYMBOL_ as operaSymbol,
        RULE_NUM_ as ruleNum,
        RULE_ADD_ as ruleAdd,
        RULE_ADD_END_ as ruleAddEnd,
        RULE_REDUCE_ as ruleReduce,
        STANDARD_VALUE_ as standardValue,
        VALUE_ as value,
        STANDARD_PRICE_ as standardPrice,
        RULE_PRICE_ as rulePrice,
        RULE_REDUCE_PRICE_ as ruleReducePrice,
        REMARKS_ as remarks,
        OPERA_SYMBOL_ as operaSymbol
        ADD_NUM_ as addNum,
        DE_NUM_ as deNum,
        ADD_PRICE_ as addPrice,
        DE_PRICE_ as dePrice,
        RESULT_ as result,
        REMARKS_ as remarks
        from
        D_CHECK_ITEM
        where COMPANY_ID_ = #{companyId}
@@ -118,28 +120,24 @@
        select
        ID_ as id,
        COMPANY_ID_ as companyId,
        DEPT_ID_ as deptId,
        FOOD_VARIETY_ as foodVariety,
        STANDARD_ID_ as standardId,
        STANDARD_NAME_ as standardName,
        UNIT_ as unit,
        OPERA_SYMBOL_ as operaSymbol,
        UPPER_LIMIT_ as upperLimit,
--         LOWER_LIMIT_ as lowerLimit,
        RULE_NUM_ as ruleNum,
        RULE_REDUCE_ as ruleReduce,
        RULE_ADD_ as ruleAdd,
        RULE_ADD_END_ as ruleAddEnd,
        RULE_REDUCE_ as ruleReduce,
        STANDARD_PRICE_ as standardPrice,
        RULE_PRICE_ as rulePrice,
        RULE_REDUCE_PRICE_ as ruleReducePrice,
        UPDATE_TIME_ as updateTime,
        REMARKS_ as remarks,
        OPERA_SYMBOL_ as operaSymbol
        from D_CHECK_STANDARD
        where
        REMARKS_ as remarks
        FROM D_CHECK_STANDARD
        WHERE
        COMPANY_ID_ = #{companyId}
        and DEPT_ID_ = #{deptId}
        and FOOD_VARIETY_ = #{foodVariety}
        AND FOOD_VARIETY_ = #{foodVariety}
        ORDER by STANDARD_ID_ + 0
    </select>
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
@@ -648,34 +648,34 @@
        }
    }
    /**
     * 根据入库数据信息,获取检查项信息,如果当前数据已经检测完成,查询检测结果,如果没有检测完成则根据检测项配置获取需要检测的项目信息
     *
     * @param data
     * @return
     */
    @RequestMapping("/get-check-item")
    public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutData data) {
        try {
            return inoutManager.getCheckItem(data);
        } catch (Exception e) {
            log.error("后台异常:{}", e);
            return new PageResponse<List<CheckItemData>>(
                    RespCodeEnum.CODE_1111.getCode(), "后台异常:" + e.getMessage());
        }
    }
//    /**
//     * 根据入库数据信息,获取检查项信息,如果当前数据已经检测完成,查询检测结果,如果没有检测完成则根据检测项配置获取需要检测的项目信息
//     *
//     * @param data
//     * @return
//     */
//    @RequestMapping("/get-check-item")
//    public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutData data) {
//        try {
//            return inoutManager.getCheckItem(data);
//        } catch (Exception e) {
//            log.error("后台异常:{}", e);
//            return new PageResponse<List<CheckItemData>>(
//                    RespCodeEnum.CODE_1111.getCode(), "后台异常:" + e.getMessage());
//        }
//    }
    /**
     * 分页获取数据信息
     *
     * @param param
     * @return
     */
    @RequestMapping("/page-check-data")
    public PageResponse<Page<InoutData>> pageCheckData(
            @RequestBody InoutParam param) {
        return inoutManager.pageCheckData(param);
    }
//    /**
//     * 分页获取数据信息
//     *
//     * @param param
//     * @return
//     */
//    @RequestMapping("/page-check-data")
//    public PageResponse<Page<InoutData>> pageCheckData(
//            @RequestBody InoutParam param) {
//        return inoutManager.pageCheckData(param);
//    }
    /**
     * 道闸控制
@@ -776,7 +776,7 @@
    }
    /**
     * 分页获取扦样记录信息
     * 分页获取扦样数据
     *
     * @param param
     * @return
@@ -787,7 +787,7 @@
    }
    /**
     * 扦样页面提交
     * 扦样页面提交更新
     *
     * @param data
     * @return
@@ -797,4 +797,38 @@
        return inoutManager.updateSampleData(data);
    }
    /**
     * 分页获取化验数据
     *
     * @param param
     * @return
     */
    @RequestMapping("/page-check-data")
    public PageResponse<Page<InoutCheckData>> pageCheckData(@RequestBody InoutCheckParam param) {
        return inoutManager.pageCheckData(param);
    }
    /**
     * 获取化验项信息
     *
     * @param param
     * @return
     */
    @RequestMapping("/get-check-item")
    public PageResponse<List<CheckItemData>> getCheckItem(@RequestBody InoutCheckParam param) {
            return inoutManager.getCheckItemData(param);
    }
    /**
     * 化验页面提交更新
     *
     * @param data
     * @return
     */
    @RequestMapping("/update-check1")
    public PageResponse<InoutCheckData> updateCheck1(@RequestBody InoutCheckData data) {
        return inoutManager.updateCheckData(data);
    }
}
igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckData.java
@@ -1,9 +1,12 @@
package com.ld.igds.inout.dto;
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;
import java.util.List;
/**
 * 出入库扦样数据封装
@@ -15,51 +18,66 @@
public class InoutCheckData implements Serializable {
    private static final long serialVersionUID = 1L;
    /*-----基础信息-----*/
    //流水号
    private String id;
    //组织编码
    private String companyId;
    //库区编码
    private String deptId;
    //出入库类型,IN=入库,OUT=出库
    private String type;
    //流程进度
    private String progress;
    //数据状态
    private String recordStatus;
    //智慧卡号
    private String intelCard;
    //登记时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date registerTime;
    //登记人
    private String registerUser;
    //车船号
    private String plateNum;
    //装卸仓库
    private String depotId;
    //粮食品种
    private String foodVariety;
    //质检单号
    private String checkId;
    //单价
    private Double price;
    /*-----扦样信息-----*/
    //扦样人
    private String sampleUser;
    //扦样时间
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date sampleTime;
    //扦样方式:0-人工,1=自动,2=智能随机
    private String sampleType;
    //质检单号
    private String checkId;
    //扦样状态
    //扦样状态(),NONE-未扦样,SAMPLE-已扦样
    private String sampleStatus;
    /*-----化验信息-----*/
    //检验人
    private String checkUser;
    //质检时间
    private Date checkTime;
    //检验结果,NONE-未检验,PASS-已检验,UNPASS-不合格
    private String checkStatus;
    //粮食定等
    private String foodLevel;
    //质检扣重
    private double deCheck = 0.0;
    //质检增重
    private double addCheck = 0.0;
    //化验项数据信息
    private List<CheckItemData> checkItems;
}
igds-inout/src/main/java/com/ld/igds/inout/dto/InoutCheckParam.java
@@ -1,11 +1,8 @@
package com.ld.igds.inout.dto;
import com.bstek.dorado.annotation.PropertyDef;
import com.ld.igds.data.BaseParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
 * 出入库-扦样参数
@@ -18,7 +15,6 @@
@EqualsAndHashCode(callSuper = false)
public class InoutCheckParam extends BaseParam {
    public String plateNum;// 车牌号
    private String id;// 流水号
@@ -28,5 +24,12 @@
    private String checkId;// 化验单号
    /*扦样页面查询条件*/
    public String plateNum;// 车牌号
    private String sampleStatus; //扦样状态
    /*化验页面查询条件*/
    private String checkStatus; //扦样状态
    private String depotId;
    private String foodVariety;
}
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
@@ -572,35 +572,35 @@
        return data;
    }
    public PageResponse<Page<InoutData>> pageRecordData(InoutParam param) {
//    public PageResponse<Page<InoutData>> pageRecordData(InoutParam param) {
//
//        log.debug("分页信息--page={},limit={},cuur={}", param.getPage(),
//                param.getLimit(), param.getCurr());
//
//        Page<InoutData> result = inoutService.pageRecordData(param);
//
//        if (null == result.getRecords() || result.getRecords().isEmpty()) {
//            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
//                    "获取到数据信息为空");
//        }
//
//        return new PageResponse<>(RespCodeEnum.CODE_0000, result);
//    }
        log.debug("分页信息--page={},limit={},cuur={}", param.getPage(),
                param.getLimit(), param.getCurr());
        Page<InoutData> result = inoutService.pageRecordData(param);
        if (null == result.getRecords() || result.getRecords().isEmpty()) {
            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
                    "获取到数据信息为空");
        }
        return new PageResponse<>(RespCodeEnum.CODE_0000, result);
    }
    /**
     * @param param
     * @return
     */
    public PageResponse<Page<InoutData>> pageCheckData(InoutParam param) {
        // 如果是已化验,则将流程状态置空,如果是未化验,则流程状态不处理,仍是CHECK状态
        if (!"NONE".equals(param.getCheckStatus())) {
            param.setProgress(null);
        }
        // 设置分库Id
        String deptId = ContextUtil.subDeptId(null);
        param.setDeptId(deptId);
        return pageRecordData(param);
    }
//    /**
//     * @param param
//     * @return
//     */
//    public PageResponse<Page<InoutData>> pageCheckData(InoutParam param) {
//        // 如果是已化验,则将流程状态置空,如果是未化验,则流程状态不处理,仍是CHECK状态
//        if (!"NONE".equals(param.getCheckStatus())) {
//            param.setProgress(null);
//        }
//        // 设置分库Id
//        String deptId = ContextUtil.subDeptId(null);
//        param.setDeptId(deptId);
//        return pageRecordData(param);
//    }
    public PageResponse<InoutData> inoutComplete(InoutData data) throws Exception {
@@ -642,20 +642,20 @@
        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), null, data);
    }
    /**
     * 扦样化验页面获取检验项条目信息
     *
     * @param data
     * @return
     */
    public PageResponse<List<CheckItemData>> getCheckItem(InoutData data) {
        List<CheckItemData> result = checkStandardManager.listCheckItem(
                data.getCheckId(), data.getCompanyId(), data.getDeptId(),
                data.getFoodVariety());
        return new PageResponse<>(RespCodeEnum.CODE_0000, result);
    }
//    /**
//     * 扦样化验页面获取检验项条目信息
//     *
//     * @param data
//     * @return
//     */
//    public PageResponse<List<CheckItemData>> getCheckItem(InoutData data) {
//
//        List<CheckItemData> result = checkStandardManager.listCheckItem(
//                data.getCheckId(), data.getCompanyId(), data.getDeptId(),
//                data.getFoodVariety());
//
//        return new PageResponse<>(RespCodeEnum.CODE_0000, result);
//    }
    /**
     * 删除并完成
@@ -1091,7 +1091,7 @@
        }
        //若查询条件为已扦样,则流程置空;若未扦样,则流程不处理,仍为扦样化验流程(CHECK)
        if ("SAMPLE".equals(param.getSampleStatus())) {
        if (!"NONE".equals(param.getSampleStatus())) {
            param.setProgress(null);
        }
@@ -1124,12 +1124,14 @@
                        "当前流程已经结束,不支持修改");
            }
            //扦样信息
            curData.setSampleTime(data.getSampleTime());
            curData.setSampleType(data.getSampleType());
            curData.setSampleUser(data.getSampleUser());
            String msg = inoutService.updateSampleData(curData);
            //扦样时间和扦样人
            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);
@@ -1143,4 +1145,102 @@
        }
    }
    /**
     * @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(),
                        "当前流程已经结束,不支持修改");
            }
            curData.setCheckStatus(data.getCheckStatus());
            //更新下一流程状态
            if (InoutConstant.PROGRESS_CHECK.equals(curData.getProgress())) {
                curData = updateInBasicInfo(curData, null);
                // 若化验结果不合格,判断配置后续流程
                if (InoutConstant.STATUS_UNPASS.equals(curData.getCheckStatus())) {
                    curData = checkNoPass(curData);
                }
            }
            data.setCheckStatus(curData.getCheckStatus());
            //化验人、化验时间
            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);
            }
            //TODO 更新化验项信息
            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "执行成功");
        } catch (Exception e) {
            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                    "后台异常:" + e.getMessage(), null);
        }
    }
}
igds-inout/src/main/java/com/ld/igds/inout/mapper/InoutCheckMapper.java
@@ -3,7 +3,6 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.ld.igds.inout.dto.InoutCheckData;
import com.ld.igds.inout.dto.InoutCheckParam;
import com.ld.igds.inout.dto.InoutData;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -24,12 +23,30 @@
    List<InoutCheckData> pageSampleData(@Param("page") Page<InoutCheckData> page,
                                        @Param("param") InoutCheckParam param);
    /**
     * 更新扦样数据
     *
     * @param data
     * @return
     */
    int updateSampleData(@Param("data") InoutData data);
    int updateSampleData(@Param("data") InoutCheckData data);
    /**
     * 分页获取化验数据
     *
     * @param page
     * @param param
     * @return
     */
    List<InoutCheckData> pageCheckData(@Param("page") Page<InoutCheckData> page,
                                        @Param("param") InoutCheckParam param);
    /**
     * 更新化验数据
     *
     * @param data
     * @return
     */
    int updateCheckData(@Param("data") InoutCheckData data);
}
igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java
@@ -259,5 +259,21 @@
     * @return
     * @throws Exception
     */
    String updateSampleData(InoutData data);
    String updateSampleData(InoutCheckData data);
    /**
     * 分页获取化验数据
     *
     * @param param
     * @return
     */
    Page<InoutCheckData> pageCheckData(InoutCheckParam param);
    /**
     * 更新化验信息
     * @param data
     * @return
     * @throws Exception
     */
    String updateCheckData(InoutCheckData data);
}
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
@@ -787,7 +787,7 @@
    }
    @Override
    public String updateSampleData(InoutData data) {
    public String updateSampleData(InoutCheckData data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
@@ -799,4 +799,42 @@
        return null;
    }
    @Override
    public Page<InoutCheckData> pageCheckData(InoutCheckParam param) {
        //设置起始和截止时间
        if (null != param.getStart()) {
            param.setStart(DateUtil.getCurZero(param.getStart()));
        }
        if (null != param.getEnd()) {
            param.setEnd(DateUtil.getNextZero(param.getEnd()));
        }
        // 设置检验单据的模糊查询
        if (StringUtils.isNotEmpty(param.getCheckId())) {
            param.setCheckId("%" + param.getCheckId() + "%");
        }
        Page<InoutCheckData> page = new Page<>(param.getPage(), param.getLimit());
        page.setSearchCount(true);
        List<InoutCheckData> records = inoutCheckMapper.pageCheckData(page, param);
        page.setRecords(records);
        return page;
    }
    @Override
    public String updateCheckData(InoutCheckData data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(data.getDeptId())) {
            data.setCompanyId(ContextUtil.subDeptId(null));
        }
        int num = inoutCheckMapper.updateCheckData(data);
        return null;
    }
}
igds-inout/src/main/resources/mapper/InoutCheckMapper.xml
@@ -5,6 +5,7 @@
<mapper namespace="com.ld.igds.inout.mapper.InoutCheckMapper">
    <!--分页获取扦样数据-->
    <select id="pageSampleData" resultType="com.ld.igds.inout.dto.InoutCheckData"
            parameterType="com.ld.igds.inout.dto.InoutCheckParam">
        select
@@ -41,15 +42,74 @@
        ORDER BY REGISTER_TIME_
    </select>
    <update id="updateSampleData" parameterType="com.ld.igds.inout.dto.InoutData">
        update D_INOUT_RECORD set
    <!--更新扦样信息-->
    <update id="updateSampleData" parameterType="com.ld.igds.inout.dto.InoutCheckData">
        UPDATE D_INOUT_RECORD SET
        <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>
        TYPE_ = #{data.type}
        where
        WHERE
        COMPANY_ID_ =#{data.companyId}
        and ID_ =#{data.id}
        AND ID_ =#{data.id}
    </update>
    <!--分页获取化验数据-->
    <select id="pageCheckData" resultType="com.ld.igds.inout.dto.InoutCheckData"
            parameterType="com.ld.igds.inout.dto.InoutCheckParam">
        select
        ID_ as id,
        COMPANY_ID_ as companyId,
        DEPT_ID_ as deptId,
        TYPE_ as type,
        PROGRESS_ as progress,
        RECORD_STATUS_ as recordStatus,
        INTEL_CARD_ as intelCard,
        REGISTER_TIME_ as registerTime,
        REGISTER_USER_ as registerUser,
        DEPOT_ID_ as depotId,
        FOOD_VARIETY_ as foodVariety,
        PLATE_NUM_ as plateNum,
        SAMPLE_USER_ as sampleUser,
        SAMPLE_TIME_ as sampleTime,
        CHECK_USER_ as checkUser,
        CHECK_TIME_ as checkTime,
        CHECK_ID_ as checkId,
        CHECK_STATUS_ AS checkStatus,
        IF(ISNULL(SAMPLE_TIME_),'NONE','SAMPLE') AS sampleStatus
        from
        D_INOUT_RECORD
        <where>
            <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if>
            <if test="param.deptId != null and  param.deptId != '' ">AND DEPT_ID_ = #{param.deptId}</if>
            <if test="param.checkId != null and param.checkId != '' ">AND CHECK_ID_ like #{param.checkId}</if>
            <if test="param.foodVariety != null and param.foodVariety != '' ">AND FOOD_VARIETY_ = #{param.foodVariety}</if>
            <if test="param.depotId != null and param.depotId != '' ">AND DEPOT_ID_ = #{param.depotId}</if>
            <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if>
            <if test="param.start != null">AND REGISTER_TIME_ <![CDATA[ >= ]]>#{param.start,jdbcType=TIMESTAMP}</if>
            <if test="param.end != null">AND REGISTER_TIME_  <![CDATA[ <= ]]>#{param.end,jdbcType=TIMESTAMP}</if>
            <if test="param.checkStatus != null and param.checkStatus != 'NONE' ">AND CHECK_STATUS_ != 'NONE' AND CHECK_STATUS_ IS NOT NULL</if>
            <if test="param.checkStatus != null and param.checkStatus == 'NONE' ">AND CHECK_STATUS_ = 'NONE'</if>
        </where>
        AND RECORD_STATUS_ != 'DEL'
        AND RECORD_STATUS_ != 'ERROR'
        ORDER BY REGISTER_TIME_
    </select>
    <!--更新化验信息-->
    <update id="updateCheckData" parameterType="com.ld.igds.inout.dto.InoutCheckData">
        UPDATE D_INOUT_RECORD SET
        <if test="data.depotId != null">DEPOT_ID_ = #{data.depotId},</if>
        <if test="data.checkUser != null">CHECK_USER_ = #{data.checkUser},</if>
        <if test="data.checkTime != null">CHECK_TIME_ = #{data.checkTime},</if>
        <if test="data.checkStatus != null">CEHCK_STATUS = #{data.checkStatus},</if>
        <if test="data.foodLevel != null">FOOD_LEVEL = #{data.foodLevel},</if>
        <if test="data.deCheck != null">DE_CHECK_ = #{data.deCheck},</if>
        <if test="data.addCheck != null">ADD_CHECK = #{data.addCheck},</if>
        TYPE_ = #{data.type}
        WHERE
        COMPANY_ID_ =#{data.companyId}
        AND ID_ =#{data.id}
    </update>
</mapper>
igds-web/src/main/resources/static/admin/inout/in-check.js
@@ -1,5 +1,6 @@
//当前节点 入库质检
var layer;
var laydate;
var form;
var table;
var page = 1;
@@ -12,7 +13,7 @@
        layer = layui.layer;
        form = layui.form;
        table = layui.table;
        var laydate = layui.laydate;
        laydate = layui.laydate;
        laydate.render({
            elem: '#start',
@@ -27,9 +28,10 @@
        });
        laydate.render({
            elem: '#foodYear',
            elem: '#checkTime',
            theme: '#7b8e9f',
            type: 'year',
            format: 'yyyy-MM-dd HH:mm:ss',
            type: 'datetime'
        });
        // 初始化表单数据
@@ -295,9 +297,11 @@
function showDetail(obj) {
    curCheckData = obj.data;
    // console.log(curCheckData);
    curCheckData.foodYear = dateFtt("yyyy", new Date());
    curSampleData = obj.data;
    if(!curCheckData.checkTime){
        curCheckData.checkTime = dateFtt("yyyy-MM-dd HH:mm:ss", new Date());
    }
    curCheckData.checkUser = checkUser;
    if (curCheckData.checkStatus == "NONE") {
        //隐藏车牌部分信息
@@ -311,7 +315,7 @@
    layer.open({
        type: 1,
        title: "化验单明细",
        area: ['1400px', '650px'],
        area: ['1400px', '700px'],
        shade: 0,
        content: $('#checkDetail'),
        btnAlign: 'c',
@@ -332,8 +336,7 @@
    // 获取化验项信息
    flushCheckItem(null);
};
}
/**
 * 刷新化验结果项
@@ -341,6 +344,7 @@
function flushCheckItem(foodVariety) {
    curCheckItems = null;
    $("#check-result-tip").text("检验结果:#");
    $("#price-result-tip").text("粮食单价:#元/公斤");
    curCheckData.foodVariety = foodVariety;
    var index = layer.load();
@@ -391,9 +395,9 @@
        }
    });
    if (msg) {
        $("#check-result-tip").text("检验结果:" + msg);
        $("#check-result-tip").text("检验结果:" + msg + ";粮食单价:#元/公斤");
    } else {
        $("#check-result-tip").text("检验结果:合格");
        $("#check-result-tip").text("检验结果:合格" + ";粮食单价:#元/公斤");
    }
};
@@ -411,28 +415,58 @@
        even: true,
        cols: [[{
            field: 'standardName',
            title: '化验项目',
            title: '检验项目',
            align: 'center',
            width: '20%'
            width: '10%'
        }, {
            field: 'value',
            title: '化验结果',
            title: '检验值',
            align: 'center',
            width: '20%',
            width: '10%',
            edit: 'text'
        }, {
            field: 'operaSymbol',
            title: '标准值',
            align: 'center',
            width: '10%'
        }, {
            field: 'unit',
            title: '单位',
            align: 'center',
            width: '10%'
        }, {
            field: 'standardValue',
            title: '化验标准',
            field: 'deNum',
            title: '扣重',
            align: 'center',
            width: '15%'
            width: '10%',
            edit: 'text'
        }, {
            field: 'addNum',
            title: '增重',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'dePrice',
            title: '扣价',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'addPrice',
            title: '增价',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'result',
            title: '检验结果',
            align: 'center',
            width: '10%',
            edit: 'text'
        }, {
            field: 'remarks',
            title: '说  明',
            title: '备注说明',
            align: 'center',
            edit: 'text'
        }]]
@@ -477,7 +511,7 @@
    var index = layer.load();
    $.ajax({
        type: "POST",
        url: "../../basic/inout/update-check",
        url: "../../basic/inout/update-check1",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        data: JSON.stringify(curCheckData),
@@ -516,37 +550,43 @@
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'checkId',
            title: '检验单号',
            width: '13%',
            title: '质检单号',
            width: '10%',
            style: 'color: #f67d06;font-weight: bold'
        }, {
            field: 'plateNum',
            title: '车船号',
            width: '11%',
            style: 'font-weight: bold',
            field: 'registerTime',
            title: '登记时间',
            width: '15%',
            style: 'font-weight: bold'
        }, {
            field: 'sampleStatus',
            title: '是否扦样',
            width: '10%',
            templet: function (item) {
                if (item.checkStatus != "NONE") {
                    return item.plateNum;
                } else {
                    var result = replaceStr(item.plateNum);
                    return result == null ? "" : result;
                if (item.sampleStatus == null) {
                    return "未扦样";
                }
                if (item.sampleStatus == 'NONE') {
                    return "未扦样";
                }
                if (item.sampleStatus == 'SAMPLE') {
                    return "已扦样";
                }
            }
        }, {
            field: 'customerName',
            title: '往来单位',
            templet: function (item) {
                if (item.checkStatus != "NONE") {
                    return item.customerName;
                } else {
                    var result = replaceStr(item.customerName);
                    return result == null ? "" : result;
                }
            }
            field: 'sampleUser',
            title: '扦样人',
            width: '10%',
            style: 'font-weight: bold'
        }, {
            field: 'sampleTime',
            title: '扦样时间',
            width: '15%',
            style: 'font-weight: bold'
        }, {
            field: 'foodVariety',
            title: '粮食品种',
            width: '10%',
            width: '11%',
            templet: function (item) {
                var result = item.foodVariety;
                $.each(listFoodVariety, function (index, data) {
@@ -560,7 +600,7 @@
        }, {
            field: 'depotId',
            title: '装卸仓库',
            width: '10%',
            width: '11%',
            templet: function (item) {
                var result = item.depotId;
                $.each(listDepot, function (index, data) {
@@ -574,7 +614,6 @@
        }, {
            field: 'checkStatus',
            title: '检验结果',
            width: '10%',
            style: 'font-weight: bold',
            templet: function (item) {
                if (item.checkStatus == 'NONE') {
@@ -589,13 +628,9 @@
                return item.checkStatus == null ? "" : item.checkStatus;
            }
        }, {
            field: 'registerTime',
            title: '登记时间',
            width: '14%'
        }, {
            field: '',
            title: '操作',
            width: '9%',
            width: '8%',
            toolbar: "#barControl"
        }]],
        where: param,
igds-web/src/main/resources/static/admin/inout/in-sample.js
@@ -356,36 +356,9 @@
        return time;
}
function formatDateTime(date, format) {
    const o = {
        'M+': date.getMonth() + 1, // 月份
        'd+': date.getDate(), // 日
        'h+': date.getHours() % 12 === 0 ? 12 : date.getHours() % 12, // 小时
        'H+': date.getHours(), // 小时
        'm+': date.getMinutes(), // 分
        's+': date.getSeconds(), // 秒
        'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
        S: date.getMilliseconds(), // 毫秒
        a: date.getHours() < 12 ? '上午' : '下午', // 上午/下午
        A: date.getHours() < 12 ? 'AM' : 'PM', // AM/PM
    };
    if (/(y+)/.test(format)) {
        format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
    }
    for (let k in o) {
        if (new RegExp('(' + k + ')').test(format)) {
            format = format.replace(
                RegExp.$1,
                RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length)
            );
        }
    }
    return format;
}
function showDetail(obj) {
    curSampleData = null;
    var nowTime = formatDateTime(new Date(), "yyyy-MM-dd HH:mm:ss");
    var nowTime = dateFtt("yyyy-MM-dd HH:mm:ss", new Date());
    $("#printTime").html(nowTime);
    curSampleData = obj.data;
igds-web/src/main/resources/templates/admin/inout/in-check.html
@@ -105,6 +105,11 @@
        .layui-elem-quote {
            padding: 10px;
            color: blue;
            margin-bottom: unset;
        }
        .input_ba {
            background: #e7eaec !important;
        }
    </style>
@@ -117,16 +122,6 @@
        <div class="qyzj-btnbox layui-clear">
            <div class="rkbk-quick fl">
                <!--                    <button type="button" class="rkbk-quick-btn layui-btn"-->
                <!--                        onclick="flushData()">-->
                <!--                        <i><img th:src="@{../../static/images/icon-shuaxin.png}" /></i>刷新-->
                <!--                    </button>-->
                <!--                <button type="button" class="rkbk-quick-btn layui-btn"-->
                <!--                        onclick="exportData()">-->
                <!--                    <i><img th:src="@{../../static/images/icon-daochu.png}"/></i>导出-->
                <!--                </button>-->
                <button type="button" class="rkbk-quick-btn layui-btn btn-violet"
                        onclick="checkExe('big')">
                    <i><img th:src="@{../../static/images/icon-hyd.png}"/></i>大车扦样
@@ -194,7 +189,6 @@
                </ul>
            </div>
            <!--流程引导结束-->
        </div>
        <!--qyzj-btnbox end-->
@@ -219,17 +213,15 @@
                                   autocomplete="off" class="layui-input rkbk-search-input">
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">单据编码</label>
                            <label class="layui-form-label">质检单号</label>
                            <div class="layui-input-block">
                                <input type="text" name="checkId" placeholder="请输入"
                                       autocomplete="off" class="layui-input rkbk-search-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">粮食品种</label>
@@ -242,13 +234,11 @@
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">开始时间</label>
                            <label class="layui-form-label">起始时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="start" placeholder="请输入"
                                       autocomplete="off"
                                <input type="text" name="start" placeholder="请输入" autocomplete="off"
                                       class="layui-input rkbk-search-input bg-date" id="start">
                            </div>
                        </div>
@@ -256,15 +246,13 @@
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
                            <label class="layui-form-label">结束时间</label>
                            <label class="layui-form-label">截止时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="end" placeholder="请输入"
                                       autocomplete="off"
                                <input type="text" name="end" placeholder="请输入" autocomplete="off"
                                       class="layui-input rkbk-search-input bg-date" id="end">
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-xs3">
                        <div class="layui-form-item">
@@ -313,39 +301,30 @@
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="10%">
                        <col width="">
                        <col width="15%">
                        <col width="10%">
                    </colgroup>
                    <thead>
                    <tr class="qyzj-table-tit">
                        <th>单据号</th>
                        <th>车牌</th>
                        <th>往来单位</th>
                        <th>品种</th>
                        <th>目标仓库</th>
                        <th>是否合格</th>
                        <th>化验时间</th>
                        <th>粮食产地</th>
                        <th>质检单号</th>
                        <th>登记时间</th>
                        <th>扦样状态</th>
                        <th>扦样人</th>
                        <th>扦样时间</th>
                        <th>粮食品种</th>
                        <th>装卸仓库</th>
                        <th>检验结果</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
            <!--qyzj-tabBox end-->
            <!--qyzj-page-wrap end-->
        </div>
        <!--qyzj-con end-->
    </div>
    <!--rk-main end-->
</div>
<!--l-container end-->
<script th:inline="javascript">
    var progress = [[${progress}]];
@@ -374,7 +353,6 @@
</script>
<script th:src="@{../../static/plugins/layui/layui.js}"></script>
<script th:src="@{../../static/js/jquery.min.js}"></script>
<script th:src="@{../../static/js/constant.js}"></script>
@@ -382,53 +360,61 @@
<script th:src="@{../../static/admin/inout/in-check.js}"></script>
<script type="text/html" id="barControl">
    <a class="layui-btn control-btn" lay-event="edit">编辑</a>
    <a class="layui-btn control-btn" lay-event="edit">化验</a>
</script>
</body>
<!-- 化验信息,包括基本信息和化验结果 -->
<!-- 化验信息 -->
<div class="layui-tab-content" id="checkDetail" style="display: none;">
    <!-- 表单基本信息 -->
    <form class="layui-form" id="form-detail" lay-filter="form-detail">
        <div class="layui-col-xs4" style="display: none;">
        <div class="layui-col-xs12" style="display: none;">
            <div class="layui-form-item">
                <label class="layui-form-label">隐藏字段-客户</label>
                <label class="layui-form-label">隐藏字段-流水编号</label>
                <div class="layui-input-block">
                    <input type="text" name="customerId" autocomplete="off"
                           class="layui-input rkbk-search-input">
                    <input type="text" name="id" autocomplete="off" class="layui-input rkbk-search-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">检验单号</label>
                <label class="layui-form-label">质检单号</label>
                <div class="layui-input-block">
                    <input type="text" name="checkId" autocomplete="off"
                           class="layui-input rkbk-search-input" disabled="">
                           class="layui-input input_ba" disabled="">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">车  牌  号</label>
                <label class="layui-form-label">扦 样 人</label>
                <div class="layui-input-block">
                    <input type="text" name="plateNum" autocomplete="off"
                           class="layui-input rkbk-search-input" disabled="">
                    <input type="text" name="sampleUser" autocomplete="off"
                           class="layui-input input_ba" disabled="">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">检验人员</label>
                <label class="layui-form-label">扦样时间</label>
                <div class="layui-input-block">
                    <input type="text" name="sampleTime" autocomplete="off"
                           class="layui-input input_ba" disabled="">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">质 检 人</label>
                <div class="layui-input-block">
                    <input type="text" name="checkUser" autocomplete="off"
                           class="layui-input rkbk-search-input">
                           class="layui-input">
                </div>
            </div>
        </div>
@@ -456,6 +442,26 @@
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">质检时间</label>
                <div class="layui-input-block">
                    <input type="text" name="checkTime" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">收粮定价</label>
                <div class="layui-input-block">
                    <input type="text" name="price" id="price"
                           class="layui-input rkbk-search-input" placeholder="根据粮食等级带入/手动录入">
                    <em class="kccz-data-dw">元/公斤</em>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">粮食等级</label>
                <div class="layui-input-block">
                    <select id="foodLevel" name="foodLevel" lay-filter="foodLevel">
@@ -466,46 +472,6 @@
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label">粮食产地</label>
                <div class="layui-input-block">
                    <input type="text" name="foodLocation" autocomplete="off"
                           class="layui-input"> <em class="kccz-data-dw cursor"
                                                    onclick="showFoodLocation()">…</em>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">粮食年份</label>
                <div class="layui-input-block">
                    <input type="text" name="foodYear" id="foodYear" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-form-item">
                <label class="layui-form-label red">收粮定价</label>
                <div class="layui-input-block">
                    <input type="text" name="price" id="price"
                           class="layui-input rkbk-search-input" placeholder="请输入单价">
                    <em class="kccz-data-dw">元/公斤</em>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4" style="display: none;">
            <div class="layui-form-item">
                <label class="layui-form-label">隐藏字段-最低保护价格</label>
                <div class="layui-input-block">
                    <input type="text" name="price0"
                           class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-col-xs8">
            <div class="layui-form-item">
                <label class="layui-form-label">备注说明</label>
@@ -527,74 +493,59 @@
                </div>
            </div>
        </div>
        <div class="layui-col-xs12" style="margin-bottom: 10px">
            <div style="padding-left: 50px; color: #2ab5ad;">
                <span style="font-weight: bold; margin-right: 10px;">备注说明:1.结果判定:系统根据各化验项结果判定,最后化验结果需手动选择确认;2.单价复核:根据化验项配置计算相关增扣价,最后单价需手动确认。</span>
            </div>
        </div>
        <div class="layui-col-xs12">
            <blockquote class="layui-elem-quote">
                <div>
                    <span style="font-weight: bold; margin-right: 10px;">系统判定</span>
<!--                    <span id="check-result-level" style="margin-right: 25px;">粮食等级:#</span>-->
<!--                    <span id="check-result-price" style="margin-right: 25px;">市场价:#</span>-->
<!--                    <span id="check-result-price0" style="margin-right: 25px;">最低保护价:#</span>-->
                    <span id="check-result-tip" style="margin-right: 25px;">检验结果:#</span>
<!--                    <button type="button" class="layui-btn layui-btn-sm layui-btn-warm layui-btn-radius fr"-->
<!--                            onclick="">系统验证-->
<!--                    </button>-->
                    <span id="check-result-msg" style="margin-right: 25px;color: red;float: right;"></span>
                    <span style="font-weight: bold; margin-right: 10px;">系统判定:</span>
                    <span id="check-result-tip" style="margin-right: 25px;">化验结果#; 收粮单价:#元/公斤</span>
                    <span id="check-result-msg" style="margin-right: 25px;color: red;float: right;">
                         <button style="margin-top: -6px;" class="rkbk-quick-btn layui-btn btn-blue" onclick="checkReset()">
                            <i><img th:src="@{../../static/images/icon-fuwei.png}"/></i>单价判定
                        </button>
                    </span>
                </div>
            </blockquote>
        </div>
    </form>
    <!-- 化验结果信息 -->
    <table class="layui-table" id="tableCheckItem"
    <table class="layui-table tableCheckItem" id="tableCheckItem"
           lay-filter="tableCheckItem">
        <colgroup>
            <col width="25%">
            <col width="25%">
            <col width="25%">
            <col width="25%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="10%">
            <col width="">
        </colgroup>
        <thead>
        <tr class="qyzj-table-tit">
            <th>化验项目</th>
            <th>化验结果</th>
            <th>检验项目</th>
            <th>检验值</th>
            <th>标准值</th>
            <th>单位</th>
            <th>合格标准</th>
            <th>说明</th>
            <th>扣重</th>
            <th>增重</th>
            <th>扣价</th>
            <th>增价</th>
            <th>检验结果</th>
            <th>备注</th>
        </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</div>
<!-- 弹出往来单位列表 -->
<div class="layui-tab-content" id="listCustomer" style="display: none;">
    <table class="layui-table" lay-skin="nob" id="tableCustomer"
           lay-filter="tableCustomer" style="margin: 0px;"></table>
</div>
<script type="text/html" id="toolbarCustomer">
    <div class="">
        <div class="layui-col-xs6">
            <input type="text" id="key" placeholder="输入编码或者名称……" class="layui-input">
        </div>
        <div class="layui-col-xs6" style="padding-left: 10px;">
            <button class="layui-btn layui-btn-sm" onclick="flushCustomer()">查询</button>
        </div>
    </div>
</script>
<!-- 弹出粮食产地 -->
<div class="layui-tab-content" id="listFoodLocation"
     style="display: none;">
    <table class="layui-table" lay-skin="nob" id="tableFoodLoaction"
           lay-filter="tableFoodLoaction" style="margin: 0px;"></table>
</div>
<!-- 弹出框的信息 -->
@@ -628,16 +579,4 @@
        </tbody>
    </table>
</div>
<script type="text/html" id="toolbarFoodLocaton">
    <div class="">
        <div class="layui-col-xs6">
            <input type="text" id="key2" placeholder="输入编码或者名称……" class="layui-input">
        </div>
        <div class="layui-col-xs6" style="padding-left: 10px;">
            <button class="layui-btn layui-btn-sm" onclick="flushFoodLocation()">查询</button>
        </div>
    </div>
</script>
</html>
igds-web/src/main/resources/templates/admin/inout/in-sample.html
@@ -20,34 +20,20 @@
            width: 100%;
        }
        #layui-table-page1 {
            text-align: right !important;
        }
        .display-none {
            display: none;
        }
        #layui-table-page1 {
            text-align: right !important;
        }
        .control-btn {
            height: 35px;
            line-height: 30px;
            background-color: #f67d06;
        }
        .tip-red {
            text-align: right;
            padding-left: 40px;
            font-size: 16px;
            color: red;
            font-weight: bold;
        }
        thead span {
            font-weight: bold
        }
        #label1, #label4, #label5 {
            color: red;
        }
        .layui-select-disabled .layui-disabled {
@@ -109,6 +95,9 @@
        .input_ba {
            background: #e7eaec !important;
        }
        .layui-table-body {
            height: 450px;
        }
    </style>
@@ -323,12 +312,10 @@
    //所属分库
    var deptId = [[${deptId}]];
    //库区名称
    var deptName = [[${deptName}]];
    var inoutProgress = [[${inoutProgress}]];
</script>
<script th:src="@{../../static/plugins/layui/layui.js}"></script>
<script th:src="@{../../static/js/jquery.min.js}"></script>
@@ -341,7 +328,7 @@
</script>
</body>
<!-- 化验信息,包括基本信息和化验结果 -->
<!-- 扦样信息 -->
<div class="layui-tab-content" id="checkDetail" style="display: none;">
    <!-- 表单基本信息 -->
    <div style="height: 100%; width: 55%; float: left">