jiazx0107@163.com
2023-06-24 6f45f4a29ce38525f3f9e3931bcedfc77bde765e
出入库流程优化-入库详单优化
已删除1个文件
已修改27个文件
2702 ■■■■ 文件已修改
igds-api-inte/src/main/java/com/ld/igds/sh/service/ApiShServiceImpl1302.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-inte/src/main/java/com/ld/igds/sh/service/ApiShServiceImpl1306.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-inte/src/main/java/com/ld/igds/sh/service/impl/HApiShServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-basic/src/main/java/com/ld/igds/basic/controller/CommonController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/CheckStandardManager.java 121 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/CheckStandardPR.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/service/CoreCheckStandardService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/check/service/impl/CoreCheckStandardServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/CoreCommonService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/impl/CommonDataServiceImpl.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/manager/CommonManager.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/inout/InoutConstant.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/sys/DicTriggerPR.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/view/service/HDicAreaService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-doc/sql/update-v35-to-v40.sql 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java 178 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/service/JInoutReportService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/InoutDataPR.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/InoutList-bak20111110.view.xml 1502 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml 458 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/service/JInoutCheckService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/models/inout.model.xml 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/resources/mapper/InoutRecordMapper.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-api-inte/src/main/java/com/ld/igds/sh/service/ApiShServiceImpl1302.java
@@ -117,8 +117,7 @@
            dto.setRkdnm(StringUtils.isEmpty(inoutRecord.getNoticeId())?"0":inoutRecord.getNoticeId());
            dto.setZznm(inoutRecord.getDepotId().substring(0, 21));
            dto.setSxh(inoutRecord.getId().substring(10));
            if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus()) ||
                    InoutConstant.RECORD_STATUS_ERROR.equals(inoutRecord.getRecordStatus())){
            if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus())){
                dto.setDjzt("4"); //已作废
            }else {
                dto.setDjzt("2"); //入库完成
igds-api-inte/src/main/java/com/ld/igds/sh/service/ApiShServiceImpl1306.java
@@ -116,8 +116,7 @@
            dto.setZznm(inoutRecord.getDepotId().substring(0, 21));
            dto.setDjbh(inoutRecord.getId());
            dto.setSxh(inoutRecord.getId().substring(10));
            if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus()) ||
                    InoutConstant.RECORD_STATUS_ERROR.equals(inoutRecord.getRecordStatus())){
            if(InoutConstant.RECORD_STATUS_DEL.equals(inoutRecord.getRecordStatus()) ){
                dto.setDjzt("4"); //已作废
            }else {
                dto.setDjzt("2"); //出库完成
igds-api-inte/src/main/java/com/ld/igds/sh/service/impl/HApiShServiceImpl.java
@@ -289,7 +289,6 @@
        args.put("companyId", companyId);
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
        if(StringUtils.isNotEmpty(depotId)){
            hql += " and depotId =:depotId";
@@ -805,7 +804,6 @@
        args.put("companyId", companyId);
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
        if(null != startTime){
            hql += " and registerTime >:startTime";
igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/HPhoneServiceImpl.java
@@ -97,7 +97,6 @@
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("companyId", param.getCompanyId());
        args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
        if (StringUtils.isNotEmpty(param.getDeptId())) {
            hql += " and deptId =:deptId";
@@ -147,8 +146,7 @@
        Map<String, Object> args = new HashMap<String, Object>();
        args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR);
        if (StringUtils.isNotEmpty(companyId)) {
            hql += " and companyId =:companyId";
            args.put("companyId", companyId);
igds-basic/src/main/java/com/ld/igds/basic/controller/CommonController.java
@@ -9,7 +9,6 @@
import com.ld.igds.data.Page;
import com.ld.igds.data.PageResponse;
import com.ld.igds.grain.dto.GrainData;
import com.ld.igds.inout.dto.InoutParam;
import com.ld.igds.models.Depot;
import com.ld.igds.models.DicArea;
import com.ld.igds.models.DicSysConf;
igds-core/src/main/java/com/ld/igds/check/CheckStandardManager.java
@@ -18,71 +18,76 @@
@Component(CheckStandardManager.BEAN_ID)
public class CheckStandardManager {
    public static final String BEAN_ID = "check.checkStandardManager";
    public static final String BEAN_ID = "check.checkStandardManager";
    @Autowired
    private CoreCheckStandardService checkStandardService;
    @Autowired
    private CoreCheckStandardService checkStandardService;
    /**
     * æ ¹æ®å‚数获取化验项列表
     *
     * @param checkId
     * @param companyId
     * @param foodVariety
     * @return
     */
    public List<CheckItemData> listCheckItem(String companyId, String checkId,
            String foodVariety) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
    /**
     * æ ¹æ®å‚数获取化验项列表
     *
     * @param checkId
     * @param companyId
     * @param foodVariety
     * @return
     */
    public List<CheckItemData> listCheckItem(String checkId, String companyId, String foodVariety) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<CheckItemData> list = null;
        if (null != checkId)
            list = checkStandardService.getCheckItemById(checkId, companyId);
        List<CheckItemData> list = checkStandardService.getCheckItemById(checkId, companyId);
        if (list == null || list.isEmpty()) {
            list = checkStandardService.getCheckItemByStandard(companyId,checkId, foodVariety);
        }
        return list;
    }
        if (list == null || list.isEmpty()) {
            list = checkStandardService.getCheckItemByStandard(checkId, companyId, foodVariety);
        }
        return list;
    }
    public CheckUpdateResult updateCheckItems(String checkId, String companyId,
            List<CheckItemData> checkItems) {
    public CheckUpdateResult updateCheckItems(String checkId, String companyId, List<CheckItemData> checkItems) {
        CheckUpdateResult result = new CheckUpdateResult();
        if (null == checkItems || checkItems.isEmpty()) {
            return result;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        CheckUpdateResult result = new CheckUpdateResult();
        if (null == checkItems || checkItems.isEmpty()) {
            return result;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        for (CheckItemData item : checkItems) {
            if (null == item.getCheckId()) {
                item.setCheckId(checkId);
            }
            item.setCompanyId(companyId);
            if (item.getUpperLimit() == null) {
                item.setUpperLimit(0.0);
            }
        for (CheckItemData item : checkItems) {
            if (null == item.getCheckId()) {
                item.setCheckId(checkId);
            }
            item.setCompanyId(companyId);
            if (item.getUpperLimit() == null) {
                item.setUpperLimit(0.0);
            }
            if (null != item.getDeNum() && item.getDeNum() > 0) {
                result.setDeSum(result.getDeSum() + item.getDeNum());
            }
            if (null != item.getAddNum() && item.getAddNum() > 0) {
                result.setAddSum(result.getAddSum() + item.getAddNum());
            }
            if (null != item.getAddPrice() && item.getAddPrice() > 0) {
                result.setAddPriceSum(result.getAddPriceSum()
                        + item.getAddPrice());
            }
            if (null != item.getDePrice() && item.getDePrice() > 0) {
                result.setDePriceSum(result.getDePriceSum() + item.getDePrice());
            }
            if (null != item.getDeNum() && item.getDeNum() > 0) {
                result.setDeSum(result.getDeSum() + item.getDeNum());
            }
            if (null != item.getAddNum() && item.getAddNum() > 0) {
                result.setAddSum(result.getAddSum() + item.getAddNum());
            }
            if (null != item.getAddPrice() && item.getAddPrice() > 0) {
                result.setAddPriceSum(result.getAddPriceSum() + item.getAddPrice());
            }
            if (null != item.getDePrice() && item.getDePrice() > 0) {
                result.setDePriceSum(result.getDePriceSum() + item.getDePrice());
            }
            //先更新,更新失败则新增
            int i = checkStandardService.updateCheckItem(item);
            if (i < 1) {
                checkStandardService.insertCheckItem(item);
            }
        }
        return result;
    }
            // å…ˆæ›´æ–°ï¼Œæ›´æ–°å¤±è´¥åˆ™æ–°å¢ž
            int i = checkStandardService.updateCheckItem(item);
            if (i < 1) {
                checkStandardService.insertCheckItem(item);
            }
        }
        return result;
    }
}
igds-core/src/main/java/com/ld/igds/check/CheckStandardPR.java
@@ -72,36 +72,18 @@
    /**
     * æ ¹æ®checkId获取检验项信息
     *
     * checkStandardPR#listCheckItemsByCheckId
     * checkStandardPR#listCheckItemsByParam
     *
     * @param param
     * @return
     */
    @DataProvider
    public List<CheckItemData> listCheckItemsByCheckId(Map<String, Object> param) {
    public List<CheckItemData> listCheckItemsByParam(Map<String, Object> param) {
        String checkId = (String) param.get("checkId");
        String deptId = (String) param.get("deptId");
        String foodVariety = (String) param.get("foodVariety");
        return checkStandardManager.listCheckItem(checkId, deptId, foodVariety);
    }
    /**
     * æ ¹æ®foodVariety获取检验项信息
     *
     * checkStandardPR#listCheckItemsByFoodVariety
     *
     * @param param
     * @return
     */
    @Expose
    public List<CheckItemData> listCheckItemsByFoodVariety(Map<String, Object> param) {
        String deptId = (String) param.get("deptId");
        String foodVariety = (String) param.get("foodVariety");
        return checkStandardManager.listCheckItem(null, null, foodVariety);
        return checkStandardManager.listCheckItem(ContextUtil.getCompanyId(),checkId, foodVariety);
    }
igds-core/src/main/java/com/ld/igds/check/service/CoreCheckStandardService.java
@@ -2,7 +2,6 @@
import com.ld.igds.check.dto.CheckItemData;
import com.ld.igds.check.dto.CheckStandardData;
import java.util.List;
/**
@@ -51,5 +50,5 @@
     *
     * @param checkId
     */
    List<CheckItemData> getCheckItemByStandard(String checkId, String companyId, String foodVariety);
    List<CheckItemData> getCheckItemByStandard(String companyId,String checkId,  String foodVariety);
}
igds-core/src/main/java/com/ld/igds/check/service/impl/CoreCheckStandardServiceImpl.java
@@ -48,15 +48,18 @@
    }
    @Override
    public List<CheckItemData> getCheckItemByStandard(String checkId, String companyId, String foodVariety) {
    public List<CheckItemData> getCheckItemByStandard(String companyId,String checkId,String foodVariety) {
        List<CheckItemData> result = new ArrayList<>();
        if (StringUtils.isEmpty(foodVariety)) {
            return result;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getDefaultCompanyId();
        }
        List<CheckStandardData> list = checkStandardMapper.getCheckStandard(companyId, foodVariety);
        if (null == list) {
            return result;
@@ -65,10 +68,8 @@
        CheckItemData item;
        for (CheckStandardData data : list) {
            item = new CheckItemData();
            BeanUtils.copyProperties(data, item);
            item.setCheckId(checkId);
            if (data.getUpperLimit() > 0.0 && StringUtils.isNotEmpty(data.getOperaSymbol())) {
                item.setOperaSymbolValue(data.getOperaSymbol() + " " + data.getUpperLimit());
            }
igds-core/src/main/java/com/ld/igds/common/CoreCommonService.java
@@ -219,15 +219,6 @@
    List<DefaultCompany> getCompanyList();
    /**
     * åªåœ¨æ–°ä¸€è½®å‡ºå…¥åº“第一车进行初始化,获取最后一个库存记录进行判断,并生成一个新的记录以便记录第一车出入库作业时间,
     * <p>
     * å½“前方法只记录出库第一车和入库第一车的事件和判断,满仓和空仓需要人为记录
     *
     * @param data
     */
    void initInoutDepotStore(InoutData data);
    /**
     * æ ¹æ®ä»“库编码获取当前仓库最后一条记录
     *
     * @param depotId
igds-core/src/main/java/com/ld/igds/common/impl/CommonDataServiceImpl.java
@@ -8,8 +8,6 @@
import com.ld.igds.common.mapper.CommonMapper;
import com.ld.igds.constant.Constant;
import com.ld.igds.constant.RedisConst;
import com.ld.igds.inout.InoutConstant;
import com.ld.igds.inout.dto.InoutData;
import com.ld.igds.models.Depot;
import com.ld.igds.models.DepotConf;
import com.ld.igds.models.DepotStore;
@@ -312,56 +310,6 @@
        String key = RedisConst.buildKey(Constant.DEFAULT_PARENT_CODE, "COMPANY_LIST");
        return (List<DefaultCompany>) redisUtil.get(key);
    }
    @Override
    public void initInoutDepotStore(InoutData data) {
        //先从缓存中获取下信息,查看是否已经初始化过数据,如果有则直接跳过,如果没有则重新验证
       // String key = RedisConst.buildKey(data.getDepotId(), "DEPOT_STORE", depotStatus);
//        String tag = (String) redisUtil.get(key);
//        if (null != tag) return;
        //获取当前仓库最后一个库存记录
        DepotStore depotStore = getLastDepotStore(data.getDepotId());
        //如果有数据,并且状态类一致,表示缓存没有了,但是已经做过初始化
//        if (null != depotStore && depotStatus.equals(depotStore.getDepotStatus())) {
//            redisUtil.set(key, depotStatus, 5 * 24 * 60 * 60);
//            return;
//        }
        //从来没有做个库存管理调整
//        if (null == depotStore) {
//            Depot depot = this.getCacheDepot(data.getCompanyId(), data.getDepotId());
//            depotStore = new DepotStore(depot, depotStatus);
//            if (null != data.getFoodYear()) {
//                depotStore.setFoodYear(data.getFoodYear());
//            }
//
//        } else { //有记录,但是状态与当前作业不一致,也需要初始化
//            depotStore.setDepotStatus(depotStatus);
//            depotStore.setUpdateDate(new Date());
//            depotStore.setUpdateUser(null);
//        }
        depotStore.setId(null);
        if (InoutConstant.TYPE_OUT.equals(data.getType())) {
            depotStore.setOutDate(new Date());
        } else {
            depotStore.setStoreDate(new Date());
        }
        if (null != data.getFoodYear()) {
            depotStore.setFoodYear(data.getFoodYear());
        }
        depotStore.setRemark("系统生成记录,确认调整");
        addDepotStore(depotStore, false);
        commonMapper.updateDepotStatus(depotStore.getCompanyId(), depotStore.getDepotId(), depotStore.getDepotStatus());
       // redisUtil.set(key, depotStatus, 5 * 24 * 60 * 60);
    }
    @Override
igds-core/src/main/java/com/ld/igds/common/manager/CommonManager.java
@@ -14,7 +14,6 @@
import com.ld.igds.data.SimpleDepot;
import com.ld.igds.grain.dto.GrainData;
import com.ld.igds.grain.service.CoreGrainService;
import com.ld.igds.inout.dto.InoutParam;
import com.ld.igds.models.*;
import com.ld.igds.sys.service.DicTriggerService;
import com.ld.igds.sys.service.SysDeptService;
@@ -26,13 +25,16 @@
import com.ld.igds.warn.data.WarnParam;
import com.ld.igds.warn.service.CoreWarnService;
import com.ld.igds.weather.CoreWeatherService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
@@ -63,6 +65,7 @@
    private CoreWarnService coreWarnService;
    @Resource
    private RedisUtil redisUtil;
    /**
     * èŽ·å–å…¥åº“ä½œä¸šä¸­ï¼Œä»“åº“ä¸‹æ‹‰æ¡†ï¼Œå€¼èŽ·å–çŠ¶æ€=非满仓的粮库
igds-core/src/main/java/com/ld/igds/inout/InoutConstant.java
@@ -139,8 +139,7 @@
    // æ•°æ®çŠ¶æ€-正常
    public static final String RECORD_STATUS_NORMAL = "NORMAL";
    // æ•°æ®çŠ¶æ€-异常
    public static final String RECORD_STATUS_ERROR = "ERROR";
    // æ•°æ®çŠ¶æ€-补录
    public static final String RECORD_STATUS_ADD = "ADD";
    // æ•°æ®çŠ¶æ€-已删除
@@ -165,15 +164,6 @@
    // æµç¨‹-备案(表示流程整体完成后备案)
    public static final String PROGRESS_RECORD = "RECORD";
    public static final String CHECK_ITEM_C01 = "C01";//水分
    public static final String CHECK_ITEM_C020101 = "020101";//水分
    public static final String CHECK_ITEM_C01010301 = "01010301";//杂质
    public static final String CHECK_ITEM_C02 = "C02";//杂质
    /**
@@ -239,5 +229,4 @@
        return "";
    }
}
igds-core/src/main/java/com/ld/igds/sys/DicTriggerPR.java
@@ -3,7 +3,6 @@
import com.bstek.bdf2.core.context.ContextHolder;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.ld.igds.camera.CameraUtil;
import com.ld.igds.constant.BizType;
import com.ld.igds.constant.Constant;
@@ -16,7 +15,6 @@
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
igds-core/src/main/java/com/ld/igds/view/service/HDicAreaService.java
@@ -28,7 +28,6 @@
    public String saveDicArea(DicArea data) {
        Session session = this.getSessionFactory().openSession();
        try {
            session.saveOrUpdate(data);
        } finally {
            session.flush();
igds-doc/sql/update-v35-to-v40.sql
@@ -45,3 +45,6 @@
UPDATE D_DEPOT_STORE SET DEPOT_STATUS_ = '33' WHERE DEPOT_STATUS_ ='07';
UPDATE D_DEPOT_STORE SET DEPOT_STATUS_ = '34' WHERE DEPOT_STATUS_ ='09';
-- è°ƒæ•´å‡ºå…¥åº“数据状态
UPDATE D_INOUT_RECORD SET RECORD_STATUS_ ='DEL' WHERE RECORD_STATUS_='ERROR';
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
@@ -25,6 +25,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -168,15 +169,6 @@
        }
    }
    public InoutData inoutProgressQuery(InoutData data) throws Exception {
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
        param.setPlateNum(data.getPlateNum());
        param.setIntelCard(data.getIntelCard());
        param.setType(data.getType());
        return inoutService.inoutProgressQuery(param);
    }
    /**
     * åŒ–验结果不通过时校验配置信息
@@ -301,75 +293,6 @@
            data.setCompleteTime(DateUtils.addMinutes(new Date(), 2));
            data.setCompleteUser(ContextUtil.getLoginUserCName());
            data.setProgress(nextProgress);
        }
        return data;
    }
    /**
     * å½“前方法需要删除
     * <p>
     * æ ¹æ®éœ€è¦ä¿å­˜çš„æ•°æ®ï¼Œè°ƒæ•´ä¸‹ä¸€ä¸ªæµç¨‹çŠ¶æ€ ä¸åŒçš„仓库组织流程可能不一样,需要根据实际调整
     *
     * @param data
     * @return
     */
    private InoutData updateBasicInfo(InoutData data, InoutSysConf sysConf) {
        if (InoutConstant.PROGRESS_REGISTER.equals(data.getProgress())) {
            data.setRegisterTime(new Date());
            data.setRegisterUser(ContextUtil.getLoginUserCName());
            data.setProgress(getNextProgress(data.getProgress(),
                    data.getType(), sysConf));
            return data;
        }
        if (InoutConstant.PROGRESS_CHECK.equals(data.getProgress())) {
            data.setCheckUser(ContextUtil.getLoginUserCName());
            data.setProgress(getNextProgress(data.getProgress(),
                    data.getType(), sysConf));
            return data;
        }
        if (InoutConstant.PROGRESS_WEIGHT_EMPTY.equals(data.getProgress())) {
            data.setEmptyWeightTime(new Date());
            data.setEmptyWeightUser(ContextUtil.getLoginUserCName());
            data.setProgress(getNextProgress(data.getProgress(),
                    data.getType(), sysConf));
            return data;
        }
        if (InoutConstant.PROGRESS_HANDLE.equals(data.getProgress())) {
            // æŸ¥è¯¢ç¼“存中仓库信息,根据仓库id设置值仓人为仓库保管员
            Depot depot = commonService.getCacheDepot(data.getCompanyId(),
                    data.getDepotId());
            data.setHandleUser(depot == null ? "" : depot.getStoreKeeperName());
            data.setProgress(getNextProgress(data.getProgress(),
                    data.getType(), sysConf));
            return data;
        }
        if (InoutConstant.PROGRESS_WEIGHT_FULL.equals(data.getProgress())) {
            data.setFullWeightTime(new Date());
            data.setFullWeightUser(ContextUtil.getLoginUserCName());
            data.setProgress(getNextProgress(data.getProgress(),
                    data.getType(), sysConf));
            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
                data.setCompleteTime(DateUtils.addMinutes(new Date(), 2));
                data.setCompleteUser(ContextUtil.getLoginUserCName());
            }
            return data;
        }
        if (InoutConstant.PROGRESS_CARD_BACK.equals(data.getProgress())) {
            data.setCompleteTime(new Date());
            data.setCompleteUser(ContextUtil.getLoginUserCName());
            data.setProgress(getNextProgress(data.getProgress(),
                    data.getType(), sysConf));
            return data;
        }
        return data;
@@ -530,8 +453,6 @@
        // æ·»åŠ è¡¥å•æ•°æ®
        String msg = inoutService.insertData(data);
        // åˆå§‹åŒ–验证出入库库存
        commonService.initInoutDepotStore(data);
        return msg;
    }
@@ -547,9 +468,6 @@
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "系统:已经删除的数据不支持修改!";
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
            return "系统:异常终止的数据不支持修改!";
        }
        // å¦‚果流程未结束,只更新数据
@@ -572,9 +490,6 @@
        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())) {
@@ -595,49 +510,6 @@
        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());
        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;
    }
    /**
     * å¼‚常终止操作 è®¾ç½®å¼‚常 ä¸ºäº†é¿å…é¡µé¢æ•°æ®ç¼“存,需要重新获取最新数据判断
@@ -646,26 +518,25 @@
     * @return
     * @throws Exception
     */
    @Transactional
    public String errorInoutData(InoutData data) {
    public String errorInoutData(InoutData data) throws Exception {
        InoutParam param = new InoutParam();
        param.setCompanyId(data.getCompanyId());
        param.setId(data.getId());
        param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]执行异常终止,原因:"
                + data.getRemarks());
        param.setMsg(" äºŽ" + DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm") + " è¢« " + 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 "流程结束的数据不支持异常处理!";
        }
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "当前信息已做异常处理,不支持重复执行!";
        }
        param.setDeptId(data.getDeptId());
        param.setType(data.getType());
        return inoutService.inoutStop(param);
    }
@@ -676,27 +547,25 @@
     * @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);
        InoutData cuData = inoutService.inoutQueryById(param);
        if (null == cuData) {
            return "当前车辆流程状态已经变化,请刷新页面重新操作!";
        }
        if (!cuData.getProgress().equals(data.getProgress())) {
            return "当前车辆流程状态已经变化,请刷新页面重新操作!";
        }
        if (InoutConstant.RECORD_STATUS_DEL.equals(cuData.getRecordStatus())) {
            return "当前信息已经被异常终止,不支持当前处理!";
        }
        if (InoutConstant.PROGRESS_RECORD.equals(cuData.getProgress())) {
            return "流程已完成的数据,不支持完成!";
        }
        if (null == data.getCompleteTime()) {
@@ -718,10 +587,7 @@
        String msg = inoutService.quickComplete(data);
        if (null == msg) {
            data.setProgress(InoutConstant.PROGRESS_RECORD);
            commonService.initInoutDepotStore(data);
        }
        return msg;
    }
@@ -1093,8 +959,6 @@
                    + e.getMessage(), null);
        }
    }
    /**
igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java
@@ -47,7 +47,7 @@
     * @return
     * @throws Exception
     */
    String inoutStop(InoutParam param);
    String inoutStop(InoutParam param) throws Exception;
    /**
     * æ ¹æ®æ•°æ®æ·»åŠ ï¼Œ
igds-inout/src/main/java/com/ld/igds/inout/service/JInoutReportService.java
@@ -126,7 +126,6 @@
        args.put("typeOver", Constant.LOSS_OVER_OVER);
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        args.put("start", DateUtil.getCurZero(start));
        args.put("end", DateUtil.getNextZero(end));
@@ -182,7 +181,6 @@
        args.put("companyId", ContextUtil.getCompanyId());
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        // èŽ·å–è·ç¦»å¼€å§‹æ—¶é—´ä¹…æœ€è¿‘çš„æ•°æ®ï¼Œå½“å‰å¤©çš„ç¬¬äº”åˆ†é’Ÿ
        Date date = DateUtil.getCurZero(start);
        args.put("start", DateUtils.addMinutes(date, 5));
@@ -234,7 +232,6 @@
        args.put("companyId", ContextUtil.getCompanyId());
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        args.put("end", DateUtil.getNextZero(end));
        log.debug("====执行SLQ3={}", sql.toString());
@@ -436,7 +433,6 @@
        args.put("typeOver", Constant.LOSS_OVER_OVER);
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        args.put("start", DateUtil.getCurZero(start));
        args.put("end", DateUtil.getNextZero(end));
@@ -488,7 +484,6 @@
        args.put("companyId", ContextUtil.getCompanyId());
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        // èŽ·å–è·ç¦»å¼€å§‹æ—¶é—´ä¹…æœ€è¿‘çš„æ•°æ®ï¼Œå½“å‰å¤©çš„ç¬¬äº”åˆ†é’Ÿ
        Date date = DateUtil.getCurZero(start);
        args.put("start", DateUtils.addMinutes(date, 5));
@@ -541,7 +536,6 @@
        args.put("companyId", ContextUtil.getCompanyId());
        args.put("progress", InoutConstant.PROGRESS_RECORD);
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        args.put("end", DateUtil.getNextZero(end));
        log.debug("====执行SLQ3={}", sql.toString());
@@ -709,7 +703,6 @@
        Map<String, Object> args = new HashMap<>();
        args.put("transType", TransType.TYPE_3.getCode());
        args.put("recordStatusDel", InoutConstant.RECORD_STATUS_DEL);
        args.put("recordStatusError", InoutConstant.RECORD_STATUS_ERROR);
        args.put("typeNone", InoutConstant.TYPE_NONE);
        args.put("typeLoss", Constant.LOSS_OVER_LOSS);
        args.put("typeOver", Constant.LOSS_OVER_OVER);
igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
@@ -15,7 +15,6 @@
import com.ld.igds.inout.mapper.InoutCheckMapper;
import com.ld.igds.inout.mapper.InoutRecordMapper;
import com.ld.igds.inout.service.InoutService;
import com.ld.igds.models.Depot;
import com.ld.igds.models.InoutPrice;
import com.ld.igds.util.ContextUtil;
import com.ld.igds.util.DateUtil;
@@ -57,8 +56,6 @@
        if (null != result) {
            return result;
        }
        List<InoutData> list = inoutMapper.inoutProgressQuery(param);
        if (null == list || list.size() == 0)
            return null;
@@ -106,16 +103,18 @@
    }
    @Override
    public String inoutStop(InoutParam param) {
    public String inoutStop(InoutParam param) throws Exception {
        if (StringUtils.isEmpty(param.getCompanyId())) {
            param.setCompanyId(ContextUtil.getCompanyId());
            param.setCompanyId(ContextUtil.getDefaultCompanyId());
        }
        param.setProgress(InoutConstant.PROGRESS_RECORD);
        param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
        // ç¼“存中删除
        delFromCache(param.getDeptId(), param.getType(), param.getId());
        param.setProgress(InoutConstant.PROGRESS_RECORD);
        param.setRecordStatus(InoutConstant.RECORD_STATUS_ERROR);
        inoutMapper.inoutStop(param);
@@ -299,7 +298,7 @@
    @Override
    public String quickComplete(InoutData data) throws Exception {
        if (null == data.getCompanyId()) {
            data.setCompanyId(ContextUtil.getCompanyId());
            data.setCompanyId(ContextUtil.getDefaultCompanyId());
        }
        if (null == data.getCompleteTime()) {
            data.setCompleteTime(new Date());
@@ -310,7 +309,6 @@
        if (null == data.getEmptyWeightTime()) {
            data.setEmptyWeightTime(new Date());
        }
        //调整时间差
        if (InoutConstant.TYPE_IN.equals(data.getType())) {
@@ -339,15 +337,10 @@
        // è®¾ç½®æµç¨‹ç»“束
        data.setProgress(InoutConstant.PROGRESS_RECORD);
        if (null == data.getFoodType()) {
            // æ ¹æ®ä»“库信息获取缓存
            Depot depot = commonService.getCacheDepot(data.getCompanyId(), data.getDepotId());
            data.setFoodType(depot.getFoodType());
        }
        //执行更新
        inoutMapper.updateData(data);
        //更新缓存
        updateInoutCache(data);
        return null;
@@ -368,8 +361,6 @@
        } else {
            setInoutCache(data.getDeptId(), data);
        }
    }
igds-inout/src/main/java/com/ld/igds/inout/view/InoutDataPR.java
@@ -73,14 +73,6 @@
    }
    /**
     * åˆ é™¤æ•°æ® inoutDataPR#delInoutData
     */
    @DataResolver
    public String delInoutData(InoutData data) throws Exception {
        return inoutManager.delInoutData(data, false);
    }
    /**
     * inoutDataPR#errorInoutData å‡ºå…¥åº“数据执行 å¼‚常终止
     *
     * @param data
@@ -88,6 +80,7 @@
     * @throws Exception
     */
    @DataResolver
    @Transactional
    public String errorInoutData(InoutData data) throws Exception {
        return inoutManager.errorInoutData(data);
    }
@@ -119,9 +112,6 @@
        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 "未完成的数据不支持打印!";
        }
@@ -145,9 +135,6 @@
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return null;
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
            return null;
        }
        if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
            return null;
        }
@@ -166,9 +153,6 @@
    public String printCheckBill(InoutData data) throws Exception {
        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
            return "删除的数据不支持打印!";
        }
        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
            return "异常终止的数据不支持打印!";
        }
        return inoutReportManager.inCheckBill(data);
    }
igds-inout/src/main/java/com/ld/igds/inout/view/InoutList-bak20111110.view.xml
ÎļþÒÑɾ³ý
igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.js
@@ -23,16 +23,9 @@
printCheck = function(){
    var data = view.get("#dataGridMain.currentEntity");
    if(!data) return;
    if("OUT" == data.get("type")){
        $alert("出库数据不支持打印!");
        return;
    }
    if("DEL" == data.get("recordStatus")){
        $alert("删除的数据不支持打印!");
        return;
    }
    if("ERROR" == data.get("recordStatus")){
        $alert("异常终止的数据不支持打印!");
        $alert("异常处理的信息不支持打印!");
        return;
    }
    view.get("#ajaxPrintCheck").set("parameter",data).execute(function(result){
@@ -40,52 +33,13 @@
    });
};
/**
 * æ‰¹é‡æ‰“印,多选
 */
printBatchCheck = function(){
    var datas = view.get("#dataGridMain").get("selection");
    if(datas){
        if(datas.length <= 0){
            $alert("尚未选择数据!");
            return;
        }
        var LODOP = CLODOP;
        LODOP.PRINT_INIT("称重单");
        LODOP.SET_PRINT_PAGESIZE(1,2100,1400, "A4");
        datas.each(function(data){
            //console.log(data);
            if("DEL" == data.get("recordStatus")){
                $notify("删除的数据不支持打印!");
                return true;
            }
            if("ERROR" == data.get("recordStatus")){
                $notify("异常终止的数据不支持打印!");
                return true;
            }
            view.get("#ajaxPrintCheck").set("parameter",data).execute(function(result){
                LODOP.NewPage();
                LODOP.ADD_PRINT_HTM(0, 0, "100%","100%", result);
            });
        });
        $notify("开始调用打印机程序!");
        LODOP.PREVIEW();
    }else{
        $alert("请勾选数据!");
    }
};
//打印称重单
//打印过磅单
printWeight = function(){
    var data = view.get("#dataGridMain.currentEntity");
    if(!data) return;
    if("DEL" == data.get("recordStatus")){
        $alert("删除的数据不支持打印!");
        return;
    }
    if("ERROR" == data.get("recordStatus")){
        $alert("异常终止的数据不支持打印!");
        $alert("异常处理的信息不支持打印!");
        return;
    }
    if("RECORD" != data.get("progress")){
@@ -106,12 +60,7 @@
printShipWeight = function(){
    var data = view.get("#dataGridMain.currentEntity");
    if(!data) return;
    if("DEL" == data.get("recordStatus")){
        $alert("删除的数据不支持打印!");
        return;
    }
    if("ERROR" == data.get("recordStatus")){
        $alert("异常终止的数据不支持打印!");
        return;
    }
@@ -133,54 +82,6 @@
    $notify("开始调用打印机程序!");
    LODOP.PREVIEW();
};
/**
 * æ‰¹é‡æ‰“印,多选
 */
printBatchWeight = function(){
    var datas = view.get("#dataGridMain").get("selection");
    if(datas){
        if(datas.length <= 0){
            $alert("尚未选择数据!");
            return;
        }
        var LODOP = CLODOP;
        LODOP.PRINT_INIT("称重单");
        var companyId = datas[0].get("companyId");
        if(companyId && companyId == "5016"){
            //大湾区定制
            LODOP.SET_PRINT_PAGESIZE(1,1050,1400, "");
        }else {
            LODOP.SET_PRINT_PAGESIZE(1,2100,1400, "A4");
        }
        datas.each(function(data){
            //console.log(data);
            if("DEL" == data.get("recordStatus")){
                $notify("删除的数据不支持打印!");
                return true;
            }
            if("ERROR" == data.get("recordStatus")){
                $notify("异常终止的数据不支持打印!");
                return true;
            }
            if("RECORD" != data.get("progress")){
                $notify("流程未完成不支持打印!");
                return true;
            }
            view.get("#ajaxPrint").set("parameter",data).execute(function(result){
                //console.log(result);
                LODOP.NewPage();
                LODOP.ADD_PRINT_HTM(0, 0, "100%","100%", result);
            });
        });
        $notify("开始调用打印机程序!");
        LODOP.PREVIEW();
    }else{
        $alert("请勾选数据!");
    }
};
//打印结算单
printPay = function(){
igds-inout/src/main/java/com/ld/igds/inout/view/InoutList.view.xml
@@ -4,26 +4,14 @@
  <Context/>
  <Model>
    <DataType name="dtMain" parent="dtInoutRecord">
      <ClientEvent name="onDataChange">if(arg.property ==&quot;depotId&quot;){&#xD;
    autoByDepot(arg.newValue);&#xD;
}&#xD;
if(arg.property ==&quot;foodVariety&quot;){&#xD;
    checkByFood(arg.newValue);&#xD;
}</ClientEvent>
      <PropertyDef name="price">
        <Property name="dataType">Double</Property>
        <Property name="label">粮食定价</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <Reference name="checkItems">
        <Property name="parameter">
          <Entity>
            <Property name="checkId">$${this.checkId}</Property>
            <Property name="foodVariety">$${this.foodVariety}</Property>
            <Property name="deptId">$${this.deptId}</Property>
          </Entity>
        </Property>
        <Property name="dataProvider">checkStandardPR#listCheckItemsByCheckId</Property>
        <Property name="dataProvider">checkStandardPR#listCheckItemsByParam</Property>
        <Property name="dataType">[dtCheckItems]</Property>
      </Reference>
    </DataType>
@@ -118,9 +106,6 @@
    </DataType>
    <DataType name="dtCheckItems">
      <Property name="creationType">com.ld.igds.check.dto.CheckItemData</Property>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
      </PropertyDef>
      <PropertyDef name="checkId">
        <Property></Property>
        <Property name="label">检测编码</Property>
@@ -165,17 +150,9 @@
        <Property name="dataType">Double</Property>
        <Property name="label">增重%</Property>
      </PropertyDef>
      <PropertyDef name="ruleAddEnd">
        <Property name="dataType">Double</Property>
        <Property name="label">增重上限%</Property>
      </PropertyDef>
      <PropertyDef name="ruleReduce">
        <Property name="dataType">Double</Property>
        <Property name="label">扣重值%</Property>
      </PropertyDef>
      <PropertyDef name="standardPrice">
        <Property name="dataType">Double</Property>
        <Property name="label">标准单价(元/斤)</Property>
      </PropertyDef>
      <PropertyDef name="rulePrice">
        <Property name="dataType">Double</Property>
@@ -189,12 +166,34 @@
        <Property></Property>
        <Property name="label">运算符号</Property>
      </PropertyDef>
      <PropertyDef name="addNum">
        <Property name="dataType">Double</Property>
        <Property name="label">增重</Property>
      </PropertyDef>
      <PropertyDef name="deNum">
        <Property name="dataType">Double</Property>
        <Property name="label">扣重</Property>
      </PropertyDef>
      <PropertyDef name="addPrice">
        <Property name="dataType">Double</Property>
        <Property name="label">增价</Property>
      </PropertyDef>
      <PropertyDef name="dePrice">
        <Property name="dataType">Double</Property>
        <Property name="label">扣价</Property>
      </PropertyDef>
      <PropertyDef name="result">
        <Property/>
        <Property name="label">检验结果</Property>
      </PropertyDef>
      <PropertyDef name="operaSymbolValue">
        <Property/>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">var TYPE = &quot;${request.getParameter('type')}&quot;;&#xD;
var EDIT = &quot;${request.getParameter('edit')}&quot;;&#xD;
&#xD;
var deptId = window.parent.DEPT_ID;//父页面中的分库编码&#xD;
&#xD;
//如果edit有值表示隐藏ADD和编辑按钮&#xD;
@@ -202,15 +201,6 @@
    view.get(&quot;#btnEdit&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#btnDel&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#btn2End&quot;).set(&quot;visible&quot;,false);&#xD;
}&#xD;
&#xD;
//类型切换&#xD;
if(&quot;OUT&quot; == TYPE){&#xD;
    view.get(&quot;#dataGridCheckItem&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#deWet&quot;).set(&quot;label&quot;,&quot;水分增重&quot;);&#xD;
}else{&#xD;
    view.get(&quot;#deWet&quot;).set(&quot;label&quot;,&quot;水分扣重&quot;);&#xD;
    view.get(&quot;#dataGridCheckItem&quot;).set(&quot;visible&quot;,true);&#xD;
}&#xD;
&#xD;
//默认查询查询提条件&#xD;
@@ -256,28 +246,6 @@
    view.get(&quot;#textAbnormal&quot;).set(&quot;value&quot;,null);&#xD;
};&#xD;
&#xD;
//删除&#xD;
del = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
    if(!data) return;&#xD;
    &#xD;
    var textDel = view.get(&quot;#textAbnormal.text&quot;);&#xD;
    if(!textDel){&#xD;
        $notify(&quot;请填写异常删除原因!&quot;);&#xD;
        return;&#xD;
    }&#xD;
    data.set(&quot;remarks&quot;,textDel);&#xD;
    view.get(&quot;#ajaxDel&quot;).execute(function(result){&#xD;
        if(result){&#xD;
            $alert(result);&#xD;
            return;&#xD;
        }else{&#xD;
            data.remove();&#xD;
            view.get(&quot;#dialogAbnormal&quot;).close();&#xD;
        }&#xD;
    });&#xD;
};&#xD;
&#xD;
//追踪&#xD;
showImg = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
@@ -289,6 +257,7 @@
    view.get(&quot;#dialogImg&quot;).show();&#xD;
};&#xD;
&#xD;
//异常执行&#xD;
todoError = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
    if(!data) return;&#xD;
@@ -304,8 +273,8 @@
            $alert(result);&#xD;
            return;&#xD;
        }else{&#xD;
            data.remove();&#xD;
            view.get(&quot;#dialogAbnormal&quot;).close();&#xD;
            query();&#xD;
            $alert(&quot;执行成功,自动刷新数据!&quot;);&#xD;
        }&#xD;
    });&#xD;
@@ -324,6 +293,7 @@
    view.get(&quot;#btnOK&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#dialogMain&quot;).show();&#xD;
};&#xD;
&#xD;
//流程完成-执行&#xD;
completeExe = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
@@ -346,29 +316,21 @@
    });&#xD;
};&#xD;
&#xD;
//根据仓库自动回填粮食品种,登记,产地新&#xD;
autoByDepot = function(depotId){&#xD;
    view.get(&quot;#ajaxGetDepot&quot;).set(&quot;parameter&quot;,depotId).execute(function(result){&#xD;
        if(result){&#xD;
            var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
            data.set(&quot;foodLocation&quot;,result.foodLocation);&#xD;
            data.set(&quot;foodLevel&quot;,result.foodLevel);&#xD;
            data.set(&quot;foodVariety&quot;,result.foodVariety);&#xD;
            data.set(&quot;foodYear&quot;,result.foodYear);&#xD;
        }&#xD;
    });&#xD;
};&#xD;
&#xD;
//根据粮食品种查询化验项并回显&#xD;
checkByFood = function(foodVariety){&#xD;
    if(TYPE == &quot;IN&quot;){&#xD;
        view.get(&quot;#ajaxGetCheck&quot;).set(&quot;parameter&quot;,{foodVariety:foodVariety,deptId:deptId}).execute(function(result){&#xD;
            if(result){&#xD;
            var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
            data.set(&quot;checkItems&quot;,result);&#xD;
            }&#xD;
        });&#xD;
    }&#xD;
//根据粮食品种获取系统配置检测项目&#xD;
flushCheckList = function(){&#xD;
    var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
    if (!data.get(&quot;foodVariety&quot;)) {&#xD;
        $alert(&quot;没有配置粮食品种,无法获取质检项!&quot;);&#xD;
        return;&#xD;
    }&#xD;
   view.get(&quot;#ajaxGetCheck&quot;).set(&quot;parameter&quot;,{checkId:data.get(&quot;checkId&quot;),foodVariety:data.get(&quot;foodVariety&quot;)}).execute(function(result){&#xD;
        if(result){&#xD;
            data.set(&quot;checkItems&quot;,result);&#xD;
        }else{&#xD;
            $alert(&quot;当前粮食品种未配置质检项,请联系管理员&quot;);&#xD;
        }&#xD;
   });&#xD;
};&#xD;
</ClientEvent>
    <ClientEvent name="onCreate">&#xD;
@@ -405,34 +367,13 @@
     //汇总结果&#xD;
    var deSum = 0, addSum = 0, settleWeight = 0, recordWeight = 0;&#xD;
    //扣水杂&#xD;
    var deWet = curData.get(&quot;deWet&quot;), deImpurity = curData.get(&quot;deImpurity&quot;);&#xD;
    var deWet = 0;&#xD;
    &#xD;
    var impurity = curData.get(&quot;impurity&quot;), wet = curData.get(&quot;wet&quot;);&#xD;
    var impurity = 0;&#xD;
    &#xD;
    &#xD;
     var deBase = 0, multiple = 0;&#xD;
     var checkItems = curData.get(&quot;checkItems&quot;);&#xD;
    //水分杂质,更改比例并且水分扣重还没计算情况下&#xD;
    if (&quot;wet&quot; == name) {&#xD;
        var checkItem = this.getCheckItem(checkItems,&quot;C01&quot;, &quot;C020101&quot;);&#xD;
        if (checkItem) {&#xD;
            deBase = Number(wet) - Number(checkItem.get(&quot;upperLimit&quot;));&#xD;
            if (deBase == 0) return;&#xD;
            multiple = parseInt(deBase / checkItem.get(&quot;ruleNum&quot;));//倍数&#xD;
            deWet = (netWeight * multiple * checkItem.get(&quot;ruleReduce&quot;) / 100.00).toFixed(0);&#xD;
        }&#xD;
    }&#xD;
    &#xD;
    //杂质&#xD;
    if (&quot;impurity&quot; == name) {&#xD;
        checkItem = this.getCheckItem(recordData.checkItems, &quot;C02&quot;,&quot;C01010301&quot;);&#xD;
        if (checkItem) {&#xD;
            deBase = Number(impurity) - Number(checkItem.get(&quot;upperLimit&quot;));&#xD;
            if (deBase == 0) return;&#xD;
            multiple = parseInt(deBase / checkItem.get(&quot;ruleNum&quot;));&#xD;
            deImpurity = (netWeight * multiple * checkItem.get(&quot;ruleReduce&quot;) / 100.00).toFixed(0);&#xD;
        }&#xD;
    }&#xD;
&#xD;
    /** æ€»æ‰£é‡ï¼Œä¸å«å¢žé‡*/&#xD;
    deSum = Number(curData.get(&quot;deOther&quot;)) + Number(curData.get(&quot;deHandle&quot;));&#xD;
@@ -473,16 +414,10 @@
    /** ç»“算重量 = å‡€é‡ - æ€»æ‰£é‡ + å¢žé‡ */&#xD;
    settleWeight = Number(netWeight) - Number(deSum) + Number(addSum);&#xD;
    &#xD;
    curData.set(&quot;impurity&quot;,impurity);&#xD;
    curData.set(&quot;wet&quot;,wet);&#xD;
    curData.set(&quot;deImpurity&quot;,deImpurity);&#xD;
    curData.set(&quot;deWet&quot;,deWet);&#xD;
    curData.set(&quot;deSum&quot;,deSum);&#xD;
    curData.set(&quot;netWeight&quot;,netWeight);&#xD;
    curData.set(&quot;settleWeight&quot;,settleWeight);&#xD;
    curData.set(&quot;recordWeight&quot;,recordWeight);&#xD;
};&#xD;
&#xD;
&#xD;
/**&#xD;
 * æ ¹æ®åŒ–验项和传递过来的参数获取当前参数的配置信息&#xD;
@@ -666,7 +601,6 @@
        </DataColumn>
        <DataColumn>
          <Property name="property">customerName</Property>
          <Property name="width">250</Property>
          <Property name="name">customerName</Property>
          <Property name="align">center</Property>
          <Property name="caption">客户名称</Property>
@@ -687,40 +621,27 @@
          <Property name="property">fullWeight</Property>
          <Property name="caption">毛重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn name="emptyWeight">
          <Property name="property">emptyWeight</Property>
          <Property name="caption">皮重</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn name="netWeight">
          <Property name="property">netWeight</Property>
          <Property name="align">center</Property>
          <Property name="caption">净重</Property>
          <Property name="width">100</Property>
        </DataColumn>
        <DataColumn id="columnDeSum">
          <Property name="property">deSum</Property>
          <Property name="width">100</Property>
          <Property name="caption">总扣重</Property>
          <Property name="align">center</Property>
          <Property name="name">deSum</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn name="settleWeight">
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">settleWeight</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
          <Property name="width">120</Property>
        </DataColumn>
        <DataColumn>
          <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
          <Property name="property">recordWeight</Property>
          <Property name="align">center</Property>
          <Property name="width">100</Property>
          <Property name="width">120</Property>
          <Property name="visible">true</Property>
          <Property name="name">recordWeight</Property>
        </DataColumn>
@@ -744,13 +665,13 @@
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="exClassName">bg-color</Property>
      <DataPilot layoutConstraint="right">
    <ToolBar layoutConstraint="bottom">
      <Fill/>
      <DataPilot>
        <Property name="itemCodes">pageSize,pages</Property>
        <Property name="dataSet">dsMain</Property>
      </DataPilot>
    </Container>
    </ToolBar>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">表单信息</Property>
@@ -784,30 +705,25 @@
          <Property name="hideMode">display</Property>
          <Property name="visible">false</Property>
        </Button>
        <Button id="btnAddCheck">
          <ClientEvent name="onClick">var data = view.get(&quot;#dataGridMain.currentEntity&quot;);&#xD;
var list = data.get(&quot;checkItems&quot;);&#xD;
&#xD;
list.insert({});&#xD;
console.log(list);&#xD;
</ClientEvent>
          <Property name="caption">新增化验项</Property>
          <Property name="iconClass">fa fa-plus</Property>
          <Property name="hideMode">display</Property>
          <Property name="visible">true</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">cancelMain();</ClientEvent>
          <Property name="caption">取消操作</Property>
          <Property name="iconClass">fa fa-times</Property>
        </Button>
        <Button id="btnFlushCheck" layoutConstraint="left">
          <ClientEvent name="onClick">flushCheckList();</ClientEvent>
          <Property name="caption">获取质检项</Property>
          <Property name="exClassName">btn-default</Property>
          <Property name="iconClass">fa fa-gavel</Property>
          <Property name="visible">false</Property>
        </Button>
      </Buttons>
      <Children>
        <TabControl>
          <ClientEvent name="onTabChange">if(arg.newTab.get(&quot;name&quot;) == &quot;tabCheck&quot;){&#xD;
    view.get(&quot;#btnAddCheck&quot;).set(&quot;visible&quot;,true);&#xD;
    view.get(&quot;#btnFlushCheck&quot;).set(&quot;visible&quot;,true);&#xD;
}else{&#xD;
    view.get(&quot;#btnAddCheck&quot;).set(&quot;visible&quot;,false);&#xD;
    view.get(&quot;#btnFlushCheck&quot;).set(&quot;visible&quot;,false);&#xD;
}</ClientEvent>
          <ControlTab>
            <Property name="caption">基础信息</Property>
@@ -889,26 +805,6 @@
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">specType</Property>
                      <Property name="property">specType</Property>
                      <Editor>
                        <RadioGroup>
                          <RadioButton>
                            <Property name="text">散粮</Property>
                            <Property name="value">散粮</Property>
                          </RadioButton>
                            <RadioButton>
                                <Property name="text">25kg</Property>
                                <Property name="value">25kg</Property>
                            </RadioButton>
                          <RadioButton>
                            <Property name="text">50kg</Property>
                            <Property name="value">50kg</Property>
                          </RadioButton>
                        </RadioGroup>
                      </Editor>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">foodLevel</Property>
                      <Property name="property">foodLevel</Property>
                      <Editor/>
@@ -939,7 +835,7 @@
                <Children>
                  <AutoForm>
                    <Property name="dataSet">dsMain</Property>
                    <Property name="cols">*,*,*,*,*,*</Property>
                    <Property name="cols">*,50,*,50,*,50</Property>
                    <Property name="labelAlign">right</Property>
                    <Property name="labelWidth">100</Property>
                    <Property name="labelSeparator">:</Property>
@@ -953,6 +849,17 @@
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">emptyWeightTime</Property>
                      <Property name="property">emptyWeightTime</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">fullWeightUser</Property>
                      <Property name="property">fullWeightUser</Property>
                      <Property name="label">称重人</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <ClientEvent name="onBlur">//id è§„则 d_prop&#xD;
var id = self.getDom().id;&#xD;
var prop = id.substring(2,id.length);&#xD;
@@ -963,50 +870,14 @@
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">netWeight</Property>
                      <Property name="property">netWeight</Property>
                      <Property name="readOnly">true</Property>
                      <Property name="name">fullWeightTime</Property>
                      <Property name="property">fullWeightTime</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <ClientEvent name="onBlur">//id è§„则 d_prop&#xD;
var id = self.getDom().id;&#xD;
var prop = id.substring(2,id.length);&#xD;
deAutoByWeight(prop);</ClientEvent>
                      <Property name="name">deImpurity</Property>
                      <Property name="property">deImpurity</Property>
                      <Property name="showHint">false</Property>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">completeTime</Property>
                      <Property name="property">completeTime</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">impurity</Property>
                      <Property name="property">impurity</Property>
                      <Property name="showLabel">false</Property>
                      <Editor>
                        <TextEditor>
                          <Property name="blankText"> -- % --</Property>
                        </TextEditor>
                      </Editor>
                    </AutoFormElement>
                    <AutoFormElement id="deWet">
                      <ClientEvent name="onBlur">//id è§„则 d_prop&#xD;
var id = self.getDom().id;&#xD;
var prop = id.substring(2,id.length);&#xD;
deAutoByWeight(prop);</ClientEvent>
                      <Property name="name">deWet</Property>
                      <Property name="property">deWet</Property>
                      <Property name="showHint">false</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">wet</Property>
                      <Property name="property">wet</Property>
                      <Property name="showLabel">false</Property>
                      <Editor>
                        <TextEditor>
                          <Property name="blankText"> -- % --</Property>
                        </TextEditor>
                      </Editor>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <ClientEvent name="onBlur">//id è§„则 d_prop&#xD;
@@ -1015,6 +886,7 @@
deAutoByWeight(prop);</ClientEvent>
                      <Property name="name">deHandle</Property>
                      <Property name="property">deHandle</Property>
                      <Property name="label">现场扣重</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
@@ -1027,8 +899,31 @@
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">deSum</Property>
                      <Property name="property">deSum</Property>
                      <Property name="name">deOtherInfo</Property>
                      <Property name="property">deOtherInfo</Property>
                      <Property name="label">其他原因</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">deCheck</Property>
                      <Property name="property">deCheck</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">addCheck</Property>
                      <Property name="property">addCheck</Property>
                      <Editor/>
                    </AutoFormElement>
                    <Label layoutConstraint="colSpan:2">
                      <Property name="style">
                        <Property name="color">blue</Property>
                        <Property name="padding-left">80px</Property>
                      </Property>
                      <Property name="text">说明:质检增扣重请查看质检信息栏位详细</Property>
                    </Label>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">netWeight</Property>
                      <Property name="property">netWeight</Property>
                      <Property name="readOnly">true</Property>
                      <Editor/>
                    </AutoFormElement>
@@ -1039,51 +934,88 @@
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">fullWeightTime</Property>
                      <Property name="property">fullWeightTime</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">emptyWeightTime</Property>
                      <Property name="property">emptyWeightTime</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">recordWeight</Property>
                      <Property name="property">recordWeight</Property>
                      <Property name="readOnly">true</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:2">
                      <Property name="name">completeTime</Property>
                      <Property name="property">completeTime</Property>
                      <Editor/>
                    </AutoFormElement>
                    <Label layoutConstraint="colSpan:4">
                      <Property name="style">
                        <Property name="color">blue</Property>
                        <Property name="padding-left">80px</Property>
                      </Property>
                      <Property name="text">说明:结算重量=净重-扣重+增重;入库重量=净重-扣重;扣水杂:正数=扣重,负数=增重</Property>
                    </Label>
                  </AutoForm>
                </Children>
              </FieldSet>
              <FieldSet layout="regionPadding:5" layoutConstraint="padding:10">
                <Property name="caption">备注说明</Property>
                <Property name="caption">其他需要补充信息</Property>
                <Buttons/>
                <Children>
                  <AutoForm>
                    <Property name="dataSet">dsMain</Property>
                    <Property name="cols">*,*</Property>
                    <Property name="cols">*,*,*</Property>
                    <Property name="labelAlign">right</Property>
                    <Property name="labelSeparator">:</Property>
                    <Property name="labelWidth">100</Property>
                    <AutoFormElement layoutConstraint="colSpan:2">
                    <AutoFormElement>
                      <Property name="name">jjlx</Property>
                      <Property name="property">jjlx</Property>
                      <Editor>
                        <RadioGroup>
                          <RadioButton>
                            <Property name="text">称重入库</Property>
                            <Property name="value">0</Property>
                          </RadioButton>
                          <RadioButton>
                            <Property name="value">1</Property>
                            <Property name="text">标准包入库</Property>
                          </RadioButton>
                        </RadioGroup>
                      </Editor>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">bzw</Property>
                      <Property name="property">bzw</Property>
                      <Editor>
                        <RadioGroup>
                          <RadioButton>
                            <Property name="text">麻袋</Property>
                            <Property name="value">1</Property>
                          </RadioButton>
                          <RadioButton>
                            <Property name="text">编织袋</Property>
                            <Property name="value">2</Property>
                          </RadioButton>
                          <RadioButton>
                            <Property name="text">散装</Property>
                            <Property name="value">3</Property>
                          </RadioButton>
                          <RadioButton>
                            <Property name="value">9</Property>
                            <Property name="text">其他</Property>
                          </RadioButton>
                        </RadioGroup>
                      </Editor>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">dbz</Property>
                      <Property name="property">dbz</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">bzbjs</Property>
                      <Property name="property">bzbjs</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">dePackage</Property>
                      <Property name="property">dePackage</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement>
                      <Property name="name">price</Property>
                      <Property name="property">price</Property>
                      <Editor/>
                    </AutoFormElement>
                    <AutoFormElement layoutConstraint="colSpan:3">
                      <Property name="name">remarks</Property>
                      <Property name="property">remarks</Property>
                      <Property name="editorType">TextArea</Property>
                      <Property name="showLabel">false</Property>
                      <Editor/>
                    </AutoFormElement>
                  </AutoForm>
@@ -1092,14 +1024,14 @@
            </Container>
          </ControlTab>
          <ControlTab id="tabCheck">
            <Property name="caption">扦样化验</Property>
            <Property name="caption">质检信息</Property>
            <Property name="iconClass">fa fa-gavel</Property>
            <Property name="width">150</Property>
            <Property name="name">tabCheck</Property>
            <Container layout="padding:10">
              <AutoForm>
                <Property name="dataSet">dsMain</Property>
                <Property name="cols">*,*,*,*</Property>
                <Property name="cols">*,*,*</Property>
                <Property name="labelAlign">right</Property>
                <Property name="labelWidth">100</Property>
                <Property name="labelSeparator">:</Property>
@@ -1140,19 +1072,14 @@
                  <Property name="label">化验结果</Property>
                  <Editor/>
                </AutoFormElement>
                <AutoFormElement>
                  <Property name="name">checkTime</Property>
                  <Property name="property">checkTime</Property>
                  <Property name="label">质检时间</Property>
                  <Editor/>
                </AutoFormElement>
              </AutoForm>
              <DataGrid id="dataGridCheckItem" layoutConstraint="padding:10">
                <ClientEvent name="onCellValueEdit">//实现化验项目调整,更新主表中值&#xD;
var entity = arg.entity;&#xD;
var inoutData = view.get(&quot;#dsMain.data:#&quot;);&#xD;
&#xD;
if(entity.get(&quot;standardId&quot;) ==&quot;C01&quot;){//水分&#xD;
    inoutData.set(&quot;wet&quot;,entity.get(&quot;value&quot;));&#xD;
}&#xD;
&#xD;
if(entity.get(&quot;standardId&quot;) ==&quot;C02&quot;){//雜志&#xD;
    inoutData.set(&quot;impurity&quot;,entity.get(&quot;value&quot;));&#xD;
}</ClientEvent>
                <Property name="dataSet">dsMain</Property>
                <Property name="dataPath">#.checkItems</Property>
                <Property name="highlightCurrentRow">false</Property>
@@ -1210,12 +1137,6 @@
      <Property name="closeable">false</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">del();</ClientEvent>
          <Property name="caption">确定删除</Property>
          <Property name="iconClass">fa fa-check</Property>
          <Property name="exClassName">btn-warn</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">todoError();</ClientEvent>
          <Property name="caption">异常终止</Property>
          <Property name="iconClass">fa fa-check</Property>
@@ -1258,15 +1179,6 @@
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <UpdateAction id="ajaxDel">
      <Property name="dataResolver">inoutDataPR#delInoutData</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="validateData">false</Property>
      </UpdateItem>
    </UpdateAction>
    <UpdateAction id="ajaxError">
      <Property name="dataResolver">inoutDataPR#errorInoutData</Property>
      <UpdateItem>
@@ -1298,14 +1210,8 @@
      <Property name="executingMessage">正在执行打印……</Property>
      <Property name="async">false</Property>
    </AjaxAction>
    <AjaxAction id="ajaxInitAdd">
      <Property name="service">inoutDataPR#initAddData</Property>
    </AjaxAction>
    <AjaxAction id="ajaxGetDepot">
      <Property name="service">depotPR#getDepot</Property>
    </AjaxAction>
    <AjaxAction id="ajaxGetCheck">
      <Property name="service">checkStandardPR#listCheckItemsByFoodVariety</Property>
      <Property name="service">checkStandardPR#listCheckItemsByParam</Property>
    </AjaxAction>
    <Export2ReportAction id="exportExcel">
      <Property name="extension">xls</Property>
@@ -1474,24 +1380,12 @@
      </MenuItem>
      <MenuItem>
        <ClientEvent name="onClick">printCheck();</ClientEvent>
        <Property name="caption">打印检验单</Property>
        <Property name="caption">打印质检单</Property>
        <Property name="iconClass">fa fa-print</Property>
      </MenuItem>
      <MenuItem>
        <ClientEvent name="onClick">printPay();</ClientEvent>
        <Property name="caption">打印结算单</Property>
        <Property name="iconClass">fa fa-print</Property>
        <Property name="disabled">true</Property>
      </MenuItem>
      <Separator/>
      <MenuItem>
        <ClientEvent name="onClick">printBatchWeight();</ClientEvent>
        <Property name="caption">批量过磅单</Property>
        <Property name="iconClass">fa fa-print</Property>
      </MenuItem>
      <MenuItem>
        <ClientEvent name="onClick">printBatchCheck();</ClientEvent>
        <Property name="caption">批量化验单</Property>
        <Property name="iconClass">fa fa-print</Property>
      </MenuItem>
      <MenuItem>
igds-inout/src/main/java/com/ld/igds/inout/view/InoutSettlePR.java
@@ -19,7 +19,6 @@
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.Expose;
import com.bstek.dorado.data.provider.Page;
import com.ld.igds.inout.InoutConstant;
import com.ld.igds.inout.service.HInoutSettleService;
import com.ld.igds.models.InoutSettle;
igds-inout/src/main/java/com/ld/igds/m/service/JInoutCheckService.java
@@ -81,7 +81,6 @@
        arg.add(ContextUtil.getCompanyId());
        arg.add(InoutConstant.TYPE_IN);
        arg.add(InoutConstant.RECORD_STATUS_ERROR);
        arg.add(InoutConstant.RECORD_STATUS_DEL);
        arg.add(InoutConstant.PROGRESS_RECORD);
igds-inout/src/main/java/models/inout.model.xml
@@ -156,14 +156,6 @@
      <Property></Property>
      <Property name="label">运输方式</Property>
    </PropertyDef>
    <PropertyDef name="specType">
      <Property></Property>
      <Property name="label">规格</Property>
    </PropertyDef>
    <PropertyDef name="customerId">
      <Property></Property>
      <Property name="label">往来单位ID</Property>
    </PropertyDef>
    <PropertyDef name="customerName">
      <Property></Property>
      <Property name="label">往来单位</Property>
@@ -178,26 +170,6 @@
      <Property name="label">粮食年份</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="impurity">
      <Property name="dataType">Double</Property>
      <Property name="label">杂质</Property>
      <Property name="displayFormat">0.00 %</Property>
    </PropertyDef>
    <PropertyDef name="wet">
      <Property name="dataType">Double</Property>
      <Property name="label">水分</Property>
      <Property name="displayFormat">0.00 %</Property>
    </PropertyDef>
    <PropertyDef name="deImpurity">
      <Property name="dataType">Double</Property>
      <Property name="label">杂质扣重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="deWet">
      <Property name="dataType">Double</Property>
      <Property name="label">水分增重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="deHandle">
      <Property name="dataType">Double</Property>
      <Property name="label">值仓扣重</Property>
@@ -206,11 +178,6 @@
    <PropertyDef name="deOther">
      <Property name="dataType">Double</Property>
      <Property name="label">其他扣重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="deSum">
      <Property name="dataType">Double</Property>
      <Property name="label">总扣重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="fullWeight">
@@ -271,7 +238,7 @@
    </PropertyDef>
    <PropertyDef name="completeTime">
      <Property name="dataType">DateTime</Property>
      <Property name="label">完成时间</Property>
      <Property name="label">离库时间</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="completeUser">
@@ -336,7 +303,7 @@
    </PropertyDef>
    <PropertyDef name="foodLevel">
      <Property></Property>
      <Property name="label">粮食等级</Property>
      <Property name="label">粮食定等</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicTriggerPR#dicTrigger&quot;).getResult(&quot;FOOD_LEVEL_&quot;)}</Property>
        <Property name="keyProperty">code</Property>
@@ -345,23 +312,16 @@
    </PropertyDef>
    <PropertyDef name="checkUser">
      <Property></Property>
      <Property name="label">化验人</Property>
      <Property name="label">质检人</Property>
    </PropertyDef>
    <PropertyDef name="checkId">
      <Property></Property>
      <Property name="label">化验单号</Property>
    </PropertyDef>
    <PropertyDef name="curStorage">
      <Property name="dataType">double</Property>
      <Property name="label">当前库存</Property>
    </PropertyDef>
    <PropertyDef name="price">
      <Property name="dataType">double</Property>
      <Property name="label">单价</Property>
    </PropertyDef>
    <PropertyDef name="settleMoney">
      <Property name="dataType">double</Property>
      <Property name="label">结算金额</Property>
      <Property name="label">粮食定价</Property>
      <Property name="displayFormat">#.00 å…ƒ/公斤</Property>
    </PropertyDef>
    <PropertyDef name="foodType">
      <Property></Property>
@@ -371,22 +331,73 @@
      <Property></Property>
      <Property name="label">通知单编码</Property>
    </PropertyDef>
    <PropertyDef name="noticeName">
      <Property></Property>
      <Property name="label">通知单</Property>
    </PropertyDef>
    <PropertyDef name="price">
      <Property name="dataType">Double</Property>
      <Property name="label">单价</Property>
      <Property name="displayFormat">#.00 å…ƒ/公斤</Property>
    </PropertyDef>
    <PropertyDef name="settleTag">
      <Property></Property>
      <Property name="label">是否结算</Property>
    </PropertyDef>
    <PropertyDef name="remarks">
      <Property name="label">备注说明</Property>
    </PropertyDef>
    <PropertyDef name="foodLocationId">
      <Property></Property>
      <Property name="label">产地名称代码</Property>
    </PropertyDef>
    <PropertyDef name="checkTime">
      <Property name="dataType">Date</Property>
      <Property name="label">质检时间</Property>
    </PropertyDef>
    <PropertyDef name="sampleUser">
      <Property></Property>
      <Property name="label">扦样人</Property>
    </PropertyDef>
    <PropertyDef name="sampleTime">
      <Property name="dataType">Date</Property>
      <Property name="label">扦样时间</Property>
    </PropertyDef>
    <PropertyDef name="sampleType">
      <Property></Property>
      <Property name="label">扦样方式</Property>
    </PropertyDef>
    <PropertyDef name="deCheck">
      <Property name="dataType">double</Property>
      <Property name="label">质检扣重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="addCheck">
      <Property name="dataType">double</Property>
      <Property name="label">质检增重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="jjlx">
      <Property></Property>
      <Property name="label">检斤类型</Property>
    </PropertyDef>
    <PropertyDef name="dePackage">
      <Property name="dataType">double</Property>
      <Property name="label">包装扣重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="deOtherInfo">
      <Property></Property>
      <Property name="label">其他扣重原因</Property>
    </PropertyDef>
    <PropertyDef name="settleId">
      <Property></Property>
      <Property name="label">结算单号</Property>
    </PropertyDef>
    <PropertyDef name="bzw">
      <Property></Property>
      <Property name="label">包装物</Property>
    </PropertyDef>
    <PropertyDef name="dbz">
      <Property name="dataType">Double</Property>
      <Property name="label">单包重</Property>
      <Property name="displayFormat">0.0 KG</Property>
    </PropertyDef>
    <PropertyDef name="bzbjs">
      <Property name="dataType">int</Property>
      <Property name="label">包件数</Property>
    </PropertyDef>
    <PropertyDef name="updateTime">
      <Property name="dataType">Date</Property>
      <Property name="label">数据更新时间</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtInoutSettle">
    <Property name="matchType">com.ld.igds.models.InoutSettle</Property>
igds-inout/src/main/resources/mapper/InoutRecordMapper.xml
@@ -83,7 +83,6 @@
            <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if>
            <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if>
            AND PROGRESS_ != 'RECORD'
            AND RECORD_STATUS_ != 'ERROR'
            AND RECORD_STATUS_ != 'DEL'
        </where>
    </select>
@@ -110,7 +109,6 @@
                COMPLETE_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP}
            </if>
            AND PROGRESS_ = 'RECORD'
            AND RECORD_STATUS_ != 'ERROR'
            AND RECORD_STATUS_ != 'DEL'
            ORDER BY COMPLETE_TIME_
        </where>
@@ -156,7 +154,6 @@
                COMPLETE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP}
            </if>
        </where>
        AND RECORD_STATUS_ != 'ERROR'
        AND RECORD_STATUS_ != 'DEL'
        ORDER BY COMPLETE_TIME_ DESC
        LIMIT 1
@@ -171,7 +168,7 @@
            <if test="param.intelCard != null and param.plateNum != null">
                AND ( INTEL_CARD_ = #{param.intelCard} OR PLATE_NUM_ = #{param.plateNum} )
            </if>
            and PROGRESS_ &lt;&gt; 'RECORD' and RECORD_STATUS_ != 'DEL' and RECORD_STATUS_ != 'ERROR'
            and PROGRESS_ &lt;&gt; 'RECORD' and RECORD_STATUS_ != 'DEL'
        </where>
    </select>
@@ -189,16 +186,16 @@
    <update id="inoutStop" parameterType="com.ld.igds.inout.dto.InoutParam">
        update D_INOUT_RECORD
        <set>
            RECORD_STATUS_ ='ERROR',
            PROGRESS_ = 'RECORD',
            <if test="param.recordStatus != null and param.recordStatus != '' ">RECORD_STATUS_ = #{param.recordStatus},</if>
            <if test="param.checkStatus != null and param.checkStatus != '' ">CHECK_STATUS_ = #{param.checkStatus},</if>
            <if test="param.msg != null and param.msg != '' ">REMARKS_ = concat(REMARKS_,#{param.msg})</if>
        </set>
        <where>
            <if test="param.companyId != null and param.companyId != '' ">COMPANY_ID_ = #{param.companyId}</if>
            <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if>
        </where>
        <where>
            COMPANY_ID_ = #{param.companyId},
           AND ID_ = #{param.id}
        </where>
    </update>
@@ -476,7 +473,6 @@
        and TYPE_ = #{param.type}
        and COMPANY_ID_ = #{param.companyId}
        and RECORD_STATUS_ != 'DEL'
        and RECORD_STATUS_ != 'ERROR'
    </update>
    <!-- æŸ¥è¯¢æµç¨‹æœªå®Œæˆçš„æµæ°´ä¿¡æ¯ -->
@@ -505,7 +501,6 @@
        AND RECORD_STATUS_ != 'DEL'
        AND PROGRESS_ != 'RECORD'
        AND PROGRESS_ != 'PAY'
        AND RECORD_STATUS_ != 'ERROR'
    </select>
@@ -517,7 +512,6 @@
        where
        PROGRESS_ = 'RECORD'
        AND RECORD_STATUS_ != 'DEL'
        AND RECORD_STATUS_ != 'ERROR'
        <if test="param.type != null and param.type != ''">AND TYPE_ = #{param.type}</if>
        <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>
@@ -542,7 +536,6 @@
        AND TYPE_ = #{param.type}
        AND (PLATE_NUM_ = #{param.plateNum} or INTEL_CARD_ = #{param.intelCard})
        AND PROGRESS_ != 'RECORD'
        AND RECORD_STATUS_ != 'ERROR'
        AND RECORD_STATUS_ != 'DEL'
        <if test="param.start != null">
            AND REGISTER_TIME_  <![CDATA[ > ]]> #{param.start,jdbcType=TIMESTAMP}