From d320b9ae40b3dfc1942ea484c8893ba1404c73ec Mon Sep 17 00:00:00 2001
From: jiazx0107@163.com <jiazx0107@163.com>
Date: 星期三, 21 六月 2023 23:36:19 +0800
Subject: [PATCH] 调整卡回收页面操作逻辑

---
 igds-inout/src/main/resources/mapper/InoutRecordMapper.xml                                |   27 
 igds-web/src/main/resources/static/img/areation/default/pfc2_a.png                        |    0 
 igds-base/src/main/java/com/ld/igds/constant/RespCodeEnum.java                            |    3 
 igds-web/src/main/resources/templates/admin/inout/in-card-back.html                       |   64 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java |    4 
 igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java                      | 1548 +++++++++++++++++++-------------------------
 igds-web/src/main/resources/static/img/areation/default/pfc_a.png                         |    0 
 igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java             |   48 -
 igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5207.java          |   12 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5201.java |    4 
 igds-web/src/main/resources/static/img/areation/default/pfc2_b.png                        |    0 
 igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5205.java          |    5 
 igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java                      |   32 
 igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java                      |  107 +-
 igds-web/src/main/resources/static/img/areation/default/pfc_b.png                         |    0 
 igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5202.java |    2 
 igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java                |  120 ---
 igds-web/src/main/resources/static/admin/inout/in-card-back.js                            |   99 --
 igds-web/src/main/resources/verb-conf.properties                                          |    8 
 19 files changed, 840 insertions(+), 1,243 deletions(-)

diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5205.java b/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5205.java
index 09f5ce1..0d16c7e 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5205.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5205.java
@@ -79,8 +79,11 @@
             files.add(fileData1);
             files.add(fileData2);
             data.setFiles(files);
+
+
             //杩涜涓嬩竴娴佺▼鏇存柊
-            PageResponse<InoutData> stringPageResponse = inoutManager.inNextStep(data);
+            PageResponse<InoutData> stringPageResponse = inoutManager.submitHandle(data);
+          //  PageResponse<InoutData> stringPageResponse = inoutManager.inNextStep(data);
 
             return PhoneRespUtil.success(stringPageResponse.getData(), req);
         }
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5207.java b/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5207.java
index adffa5d..03be311 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5207.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone/service/impl/ServiceImpl5207.java
@@ -58,15 +58,15 @@
         InoutData data = inoutMapper.inoutQueryById(inoutParam);
 
         //鍒ゆ柇鍗曞瓙鏄惁鍦ㄥ�间粨娴佺▼
-        if(!data.getProgress().equals(InoutConstant.PROGRESS_HANDLE)){
-            return PhoneRespUtil.error(RespCodeEnum.CODE_2000,"璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨鎻愪氦锛�");
+        if (!data.getProgress().equals(InoutConstant.PROGRESS_HANDLE)) {
+            return PhoneRespUtil.error(RespCodeEnum.CODE_2000, "璇ュ崟瀛愪笉鍦ㄥ�间粨鐘舵�侊紝涓嶈兘杩涜鍊间粨鎻愪氦锛�");
         }
 
-        if(param.getType().equals(PhoneConstant.PHONE_INOUT_START)){
+        if (param.getType().equals(PhoneConstant.PHONE_INOUT_START)) {
             //鍊间粨寮�濮嬫彁浜わ紝鍙洿鏂板�间粨寮�濮嬫椂闂�
             String msg = inoutService.updateData(data);
             return PhoneRespUtil.success(msg, req);
-        }else{
+        } else {
             //鍊间粨缁撴潫鎻愪氦,闇�鏇存柊娴佺▼鐘舵�併�佸�间粨缁撴潫鏃堕棿銆佸�间粨浜恒�佸�间粨鎵i噸绛�
             data.setDeHandle(param.getDeHandle());
             data.setHandleUser(authUser.getCname());
@@ -80,7 +80,9 @@
             files.add(fileData2);
             data.setFiles(files);
             //杩涜涓嬩竴娴佺▼鏇存柊
-            PageResponse<InoutData> stringPageResponse = inoutManager.inNextStep(data);
+            //  PageResponse<InoutData> stringPageResponse = inoutManager.inNextStep(data);
+
+            PageResponse<InoutData> stringPageResponse = inoutManager.submitHandle(data);
 
             return PhoneRespUtil.success(stringPageResponse.getData(), req);
         }
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5201.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5201.java
index 5798d68..0697545 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5201.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5201.java
@@ -63,7 +63,9 @@
         data.setRegisterTime(new Date());
         data.setRegisterUser(phone35AuthUser.getCname());
         data.setProgress(InoutConstant.PROGRESS_REGISTER);
-        PageResponse<InoutData> result = inoutManager.inNextStep(data);
+
+        PageResponse<InoutData> result = inoutManager.submitRegisterInout(data);
+        //PageResponse<InoutData> result = inoutManager.inNextStep(data);
 
         if (RespCodeEnum.CODE_0000.getCode().equals(result.getCode())) {
             return PhoneRespUtil.success("鍏ュ簱鐧昏鎴愬姛锛�", req);
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5202.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5202.java
index a101136..494b886 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5202.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5202.java
@@ -64,7 +64,7 @@
         data.setRegisterTime(new Date());
         data.setRegisterUser(phone35AuthUser.getCname());
         data.setProgress(InoutConstant.PROGRESS_REGISTER);
-        PageResponse<InoutData> result = inoutManager.outNextStep(data);
+        PageResponse<InoutData> result = inoutManager.submitRegisterInout(data);
 
         if (RespCodeEnum.CODE_0000.getCode().equals(result.getCode())) {
             return PhoneRespUtil.success("鍑哄簱鐧昏鎴愬姛锛�", req);
diff --git a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java
index 7b2cea3..a1460d3 100644
--- a/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java
+++ b/igds-api-phone/src/main/java/com/ld/igds/phone35/service/impl/Phone35ServiceImpl5207.java
@@ -87,8 +87,10 @@
             files.add(fileData2);
             //TODO 璁剧疆姘村嵃
             data.setFiles(files);
+
+            PageResponse<InoutData> stringPageResponse = inoutManager.submitHandle(data);
             //杩涜涓嬩竴娴佺▼鏇存柊
-            PageResponse<InoutData> stringPageResponse = inoutManager.inNextStep(data);
+           // PageResponse<InoutData> stringPageResponse = inoutManager.inNextStep(data);
 
             return PhoneRespUtil.success(stringPageResponse.getData(), req);
         }
diff --git a/igds-base/src/main/java/com/ld/igds/constant/RespCodeEnum.java b/igds-base/src/main/java/com/ld/igds/constant/RespCodeEnum.java
index 65f0a0b..87ac5ef 100644
--- a/igds-base/src/main/java/com/ld/igds/constant/RespCodeEnum.java
+++ b/igds-base/src/main/java/com/ld/igds/constant/RespCodeEnum.java
@@ -16,7 +16,6 @@
 	 */
 	CODE_0000("0000", "鎴愬姛"),
 	CODE_1111("1111", "鍚庣鏈嶅姟寮傚父"),
-
 	CODE_1001("1001","鏁版嵁鏍煎紡鏍¢獙澶辫触"),
 	CODE_1002("1002","璇ュ簲鐢ㄦ棤婵�娲绘巿鏉�"),
 	CODE_1003("1003","璇ュ簲鐢ㄥ凡缁忔巿鏉冩垚鍔�"),
@@ -24,7 +23,7 @@
 	CODE_1005("1005","璇ヨ澶囦笉瀛樺湪"),
 	CODE_1006("1006","褰撳墠鐧诲綍浜哄凡鎺夌嚎"),
 	CODE_1007("1007","璇锋眰鍙傛暟寮傚父"),
-	CODE_1008("1008","涓氬姟鏁版嵁杩斿洖涓虹┖"),
+	CODE_1008("1008","娴佺▼涓嶆纭�"),
 	CODE_2000("2000","鍝嶅簲鏁版嵁涓虹┖")
 	;
 
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
index e37641b..759bdcc 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
@@ -537,7 +537,7 @@
     }
 
     /**
-     * 鍗″洖鏀舵暟鎹煡璇紝娌℃湁娴佺▼鐘舵�佺殑鏁版嵁鐩存帴杩斿洖
+     * 鍑哄簱鏀跺崱淇℃伅鏌ヨ
      *
      * @param param
      * @return
@@ -545,41 +545,7 @@
     @RequestMapping("/inout-query-back")
     public PageResponse<InoutData> inoutQueryBack(@RequestBody InoutParam param) {
         param.setProgress(null);
-        return inoutManager.inoutQuery(param);
-    }
-
-    /**
-     * 鍑哄叆搴撴暟鎹洿鏂帮紝鎻愪氦鍒颁笅涓祦绋�
-     *
-     * @param data
-     * @return
-     */
-    @RequestMapping("/inout-next-step")
-    @Transactional
-    public PageResponse<InoutData> inoutNextStep(@RequestBody InoutData data) {
-        try {
-            IUser user = ContextUtil.getLoginUser();
-            if (StringUtils.isEmpty(data.getCompanyId())) {
-                data.setCompanyId(user.getCompanyId());
-            }
-            if (StringUtils.isEmpty(data.getDeptId())) {
-                data.setDeptId(ContextUtil.subDeptId(user));
-            }
-
-            if (InoutConstant.TYPE_IN.equals(data.getType())) {
-                return inoutManager.inNextStep(data);
-            } else {
-                return inoutManager.outNextStep(data);
-            }
-        } catch (Exception e) {
-            log.error("鍚庡彴寮傚父:{}", e);
-
-            //鎵嬪姩鍥炴粴
-            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鍚庡彴寮傚父锛�" + e.getMessage());
-        }
+        return inoutManager.inoutQueryBack(param);
     }
 
     /**
@@ -639,32 +605,16 @@
     }
 
     /**
-     * 鍗″洖鏀堕〉闈㈡彁浜わ紝濡傛灉鏄甯告祦绋嬪崱鍥炴敹鍒欒蛋姝e父瀹屾垚娴佺▼锛屽惁鍒欐墽琛屽垹闄ら�昏緫骞跺洖鏀跺崱
+     * 鍑哄叆搴撳崱鍥炴敹鎻愪氦锛屽鏋滄暟鎹凡缁忔槸瀹屾垚锛岀洿鎺ヤ笉鍋氭洿鏂帮紝濡傛灉鏈畬鎴愬垯鎵ц瀹屾垚
      *
      * @param data
      * @return
      */
-    @RequestMapping("/inout-back-submit")
-    public PageResponse<InoutData> inoutBackSubmit(@RequestBody InoutData data) {
-        return inoutManager.inoutBack(data);
+    @RequestMapping("/submit-card-back")
+    @Transactional
+    public PageResponse<InoutData> submitCardBack(@RequestBody InoutData data) throws Exception {
+        return inoutManager.submitCardBack(data);
     }
-
-//    /**
-//     * 鍖栭獙椤甸潰鏁版嵁鎻愪氦
-//     *
-//     * @param data
-//     * @return
-//     */
-//    @RequestMapping("/update-check")
-//    public PageResponse<InoutData> updateCheck(@RequestBody InoutData data) {
-//        try {
-//            return inoutManager.updateCheck(data);
-//        } catch (Exception e) {
-//            log.error("鍚庡彴寮傚父:{}", e);
-//            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-//                    "鍚庡彴寮傚父锛�" + e.getMessage(), null);
-//        }
-//    }
 
     /**
      * 鏍规嵁鍗″彿鍜岀被鍨嬶紝鐩存帴瀹屾垚褰撳墠娴佺▼
@@ -672,57 +622,10 @@
      * @param data
      * @return
      */
-    @RequestMapping("/inout-to-complete")
-    public PageResponse<InoutData> inoutComplete(@RequestBody InoutData data) {
-        try {
-            return inoutManager.inoutComplete(data);
-        } catch (Exception e) {
-            log.error("鍚庡彴寮傚父:{}", e);
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鍚庡彴寮傚父锛�" + e.getMessage(), data);
-        }
-    }
-
-//    /**
-//     * 鏍规嵁鍏ュ簱鏁版嵁淇℃伅锛岃幏鍙栨鏌ラ」淇℃伅锛屽鏋滃綋鍓嶆暟鎹凡缁忔娴嬪畬鎴愶紝鏌ヨ妫�娴嬬粨鏋滐紝濡傛灉娌℃湁妫�娴嬪畬鎴愬垯鏍规嵁妫�娴嬮」閰嶇疆鑾峰彇闇�瑕佹娴嬬殑椤圭洰淇℃伅
-//     *
-//     * @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("/gate-ctrl")
-    public PageResponse<String> gateCtrl(
-            @RequestBody InoutGateDto param) {
-
-        return null;
+    @RequestMapping("/submit-complete")
+    @Transactional
+    public PageResponse<InoutData> submitComplete(@RequestBody InoutData data) throws Exception {
+        return inoutManager.submitComplete(data);
     }
 
     /**
@@ -869,6 +772,7 @@
 
     /**
      * 鏍规嵁绮绛夌骇鍙婄伯椋熷搧绉嶈幏鍙栫伯椋熷畾浠�
+     *
      * @param param
      * @return
      */
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
index 417080f..74162dc 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager.java
@@ -1,6 +1,5 @@
 package com.ld.igds.inout.manager;
 
-import com.bstek.bdf2.core.business.IUser;
 import com.ld.igds.check.CheckStandardManager;
 import com.ld.igds.check.dto.CheckItemData;
 import com.ld.igds.check.dto.CheckUpdateResult;
@@ -9,9 +8,11 @@
 import com.ld.igds.data.Page;
 import com.ld.igds.data.PageResponse;
 import com.ld.igds.file.CoreFileService;
-import com.ld.igds.file.dto.FileData;
 import com.ld.igds.inout.InoutConstant;
-import com.ld.igds.inout.dto.*;
+import com.ld.igds.inout.dto.InoutCheckData;
+import com.ld.igds.inout.dto.InoutCheckParam;
+import com.ld.igds.inout.dto.InoutData;
+import com.ld.igds.inout.dto.InoutParam;
 import com.ld.igds.inout.service.InoutService;
 import com.ld.igds.m.service.InoutCommonService;
 import com.ld.igds.models.Depot;
@@ -20,15 +21,16 @@
 import com.ld.igds.models.InoutSysConf;
 import com.ld.igds.util.ContextUtil;
 import com.ld.igds.util.DateUtil;
-import com.ld.igds.util.NumberUtil;
+
 import lombok.extern.slf4j.Slf4j;
+
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.time.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -42,18 +44,57 @@
 @Component
 public class InoutManager {
 
-    @Autowired
+    @Resource
     private InoutService inoutService;
-    @Autowired
+    @Resource
     private CoreFileService fileService;
-    @Autowired
+    @Resource
     private CoreCommonService commonService;
     @Resource
     private InoutCommonService inoutCommonService;
-    @Autowired
+    @Resource
     private CheckStandardManager checkStandardManager;
     @Resource
     private InoutDeviceManager inoutDeviceManager;
+
+
+    /**
+     * 鐩存帴浠庢暟鎹簱鏌ヨ锛屼笉鑰冭檻淇℃伅鐘舵��
+     *
+     * @param param
+     * @return
+     */
+    public PageResponse<InoutData> inoutQueryBack(InoutParam param) {
+        if (StringUtils.isEmpty(param.getPlateNum())
+                && StringUtils.isEmpty(param.getIntelCard())
+                && StringUtils.isEmpty(param.getUserId())) {
+
+            return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(),
+                    "鏌ヨ鍙傛暟涓嶅畬鏁达紝鏌ヨ澶辫触锛�");
+        }
+
+        //鑾峰彇涓夊ぉ浠ュ唴鏈�鍚庝竴澶╄褰�
+        param.setStart(DateUtil.getNewByDay(new Date(), -3));
+        param.setType(null);
+        param.setProgress(null);
+
+        InoutData result = inoutService.getLastRecord(param);
+
+        if (null == result) {
+            return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(),
+                    "鏍规嵁褰撳墠鏉′欢鏈煡璇㈠埌杞﹁締淇℃伅锛�");
+        }
+
+        if (InoutConstant.PROGRESS_RECORD.equals(result.getProgress())) {
+            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(), "褰撳墠杞﹁締娴佺▼宸茬粡缁撴潫", result);
+        }
+
+        if (!InoutConstant.PROGRESS_CARD_BACK.equals(result.getProgress())) {
+            return new PageResponse<>(RespCodeEnum.CODE_1008.getCode(), "褰撳墠杞﹁締娴佺▼涓嶅湪褰撳墠鐜妭锛屾棤娉曟墽琛屽嚭搴�", result);
+        }
+
+        return new PageResponse<>(RespCodeEnum.CODE_0000, result);
+    }
 
     /**
      * 棣栧厛浠庣紦瀛樹腑鑾峰彇锛岀紦瀛樹腑锛屼粠鏁版嵁搴撲腑鑾峰彇
@@ -126,153 +167,6 @@
         }
     }
 
-    public PageResponse<InoutData> outNextStep(InoutData data) throws Exception {
-        String msg;
-        IUser user = ContextUtil.getLoginUser();
-        if (StringUtils.isEmpty(data.getCompanyId())) {
-            data.setCompanyId(user.getCompanyId());
-        }
-        if (StringUtils.isEmpty(data.getDeptId())) {
-            data.setDeptId(ContextUtil.subDeptId(user));
-        }
-        if (StringUtils.isEmpty(data.getIntelCard())) {
-            data.setIntelCard(data.getUserId());
-        }
-
-        String curProgress = data.getProgress();
-        List<FileData> files = data.getFiles();
-
-        // 鏇存柊涓嬩竴涓姸鎬佸拰鍩烘湰淇℃伅
-        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(
-                data.getCompanyId(), data.getDeptId());
-        if (null == inoutSysConf
-                || StringUtils.isEmpty(inoutSysConf.getProgressIn())) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "褰撳墠搴撳尯鏈厤缃嚭搴撴祦绋嬩俊鎭紝璇疯仈绯荤鐞嗗憳閰嶇疆銆�", data);
-        }
-        data = updateBasicInfo(data, inoutSysConf);
-
-        // 濡傛灉褰撳墠鑺傜偣鏄敞鍐岋紝鍒欓渶瑕侀獙璇佷笅锛屾槸鍚︽湁涓哄畬鎴愮殑娴佺▼鍦ㄦ墽琛屼腑
-        if (InoutConstant.PROGRESS_REGISTER.equals(curProgress)) {
-            InoutData progressData = this.inoutProgressQuery(data);
-            if (null != progressData) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "褰撳墠鍗$墖/杞︾墝鍙锋湁娴佺▼鏈粨鏉熴��", progressData);
-            }
-        }
-
-        if (null != data.getPrice() && null != data.getRecordWeight()) {
-            data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2));
-        }
-
-        // 娴佺▼瀹屾垚锛岀洿鎺ヨ皟鐢ㄦ祦绋嬪畬鎴愭帴鍙�
-        if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
-            inoutService.updateData(data);
-            // 鎵ц闄勪欢淇℃伅
-            if (null != files) {
-                fileService.saveInoutFiles(files, data.getCompanyId(),
-                        data.getId(), curProgress);
-            }
-
-            // 閫氱煡绉伴噸涓绘帶娴佺▼缁撴潫
-            inoutDeviceManager.noticeProgressComplete(data);
-
-            return inoutComplete(data);
-        }
-
-        // 璋冪敤淇濆瓨鏂规硶鎵ц
-        if (StringUtils.isEmpty(data.getId())) {
-            msg = inoutService.insertData(data);
-        } else {
-            msg = inoutService.updateData(data);
-        }
-
-        // 鎵ц闄勪欢淇℃伅
-        if (null != files) {
-            fileService.saveInoutFiles(files, data.getCompanyId(),
-                    data.getId(), curProgress);
-        }
-
-        if (null != msg) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg,
-                    data);
-        }
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛",
-                data);
-    }
-
-    public PageResponse<InoutData> inNextStep(InoutData data) throws Exception {
-        String msg;
-
-        String curProgress = data.getProgress();
-        List<FileData> files = data.getFiles();
-        if (StringUtils.isEmpty(data.getIntelCard())) {
-            data.setIntelCard(data.getUserId());
-        }
-
-        // 鏇存柊涓嬩竴涓姸鎬佸拰鍩烘湰淇℃伅
-        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
-
-        if (null == inoutSysConf
-                || StringUtils.isEmpty(inoutSysConf.getProgressIn())) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "褰撳墠搴撳尯鏈厤缃叆搴撴祦绋嬩俊鎭紝璇疯仈绯荤鐞嗗憳閰嶇疆銆�", data);
-        }
-
-        data = updateBasicInfo(data, inoutSysConf);
-
-        // 濡傛灉褰撳墠鑺傜偣鏄敞鍐岋紝鍒欓渶瑕侀獙璇佷笅锛屾槸鍚︽湁涓哄畬鎴愮殑娴佺▼鍦ㄦ墽琛屼腑
-        if (InoutConstant.PROGRESS_REGISTER.equals(curProgress)) {
-            InoutData progressData = this.inoutProgressQuery(data);
-            if (null != progressData) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "褰撳墠鍗$墖/杞︾墝鍙锋湁娴佺▼鏈粨鏉熴��", progressData);
-            }
-        }
-
-        if (null != data.getPrice() && null != data.getRecordWeight()) {
-            data.setSettleMoney(NumberUtil.keepPrecision(data.getPrice() * data.getRecordWeight(), 2));
-        }
-
-        // 娴佺▼瀹屾垚锛岀洿鎺ヨ皟鐢ㄦ祦绋嬪畬鎴愭帴鍙�
-        if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
-            if (StringUtils.isEmpty(data.getCompanyId())) {
-                data.setCompanyId(ContextUtil.getCompanyId());
-            }
-
-            inoutService.updateData(data);
-            // 鎵ц闄勪欢淇℃伅
-            if (null != files) {
-                fileService.saveInoutFiles(files, data.getCompanyId(),
-                        data.getId(), curProgress);
-            }
-
-            // 閫氱煡绉伴噸涓绘帶娴佺▼缁撴潫
-            inoutDeviceManager.noticeProgressComplete(data);
-
-            return inoutComplete(data);
-        }
-
-        // 璋冪敤淇濆瓨鏂规硶鎵ц
-        if (StringUtils.isEmpty(data.getId())) {
-            msg = inoutService.insertData(data);
-        } else {
-            msg = inoutService.updateData(data);
-        }
-
-        // 鎵ц闄勪欢淇℃伅
-        if (null != files) {
-            fileService.saveInoutFiles(files, data.getCompanyId(),
-                    data.getId(), curProgress);
-        }
-
-        if (null != msg) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
-        }
-
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛",
-                data);
-    }
 
     public InoutData inoutProgressQuery(InoutData data) throws Exception {
         InoutParam param = new InoutParam();
@@ -283,85 +177,6 @@
 
         return inoutService.inoutProgressQuery(param);
     }
-
-//    @Transactional(rollbackFor = Exception.class)
-//    public PageResponse<InoutData> updateCheck(InoutData data) throws Exception {
-//
-//        if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
-//            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-//                    "褰撳墠娴佺▼宸茬粡缁撴潫锛屼笉鏀寔淇敼", data);
-//        }
-//
-//        CheckUpdateResult checkResult = this.updateCheckItems(data);
-//        String tag = checkResult.getMsg();
-//
-//        if (null != tag) {
-//            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-//                    "鍚庡彴鎵ц寮傚父锛�" + tag, data);
-//        }
-//
-//        // 鑾峰彇涓氬姟鏁版嵁淇℃伅
-//        InoutParam param = new InoutParam();
-//        param.setCompanyId(data.getCompanyId());
-//        param.setId(data.getId());
-//        InoutData progressData = inoutService.inoutProgressQuery(param);
-//        if (null == progressData) {
-//            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-//                    "娌℃湁鑾峰彇鍒板嚭鍏ュ簱涓氬姟鏁版嵁淇℃伅锛屾洿鏂板け璐�", data);
-//        }
-//        if (InoutConstant.PROGRESS_RECORD.equals(progressData.getProgress())) {
-//            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-//                    "褰撳墠娴佺▼宸茬粡缁撴潫锛屼笉鏀寔淇敼");
-//        }
-//        progressData.setCheckStatus(data.getCheckStatus());
-//
-//        // 鏇存柊涓嬩竴涓姸鎬佸拰鍩烘湰淇℃伅
-//        if (InoutConstant.PROGRESS_CHECK.equals(progressData.getProgress())) {
-//            progressData = updateBasicInfo(progressData, null);
-//            // 鑻ュ寲楠岀粨鏋滀笉鍚堟牸锛屽垽鏂厤缃悗缁祦绋�
-//            if (InoutConstant.STATUS_UNPASS.equals(progressData
-//                    .getCheckStatus())) {
-//                progressData = checkNoPass(progressData);
-//            }
-//        }
-//        progressData.setCheckUser(ContextUtil.getLoginUserCName());
-//
-//        if (StringUtils.isNotEmpty(data.getDepotId())) {
-//            progressData.setDepotId(data.getDepotId());
-//        }
-//        if (StringUtils.isNotEmpty(data.getFoodVariety())) {
-//            progressData.setFoodVariety(data.getFoodVariety());
-//        }
-//        if (StringUtils.isNotEmpty(data.getFoodLevel())) {
-//            progressData.setFoodLevel(data.getFoodLevel());
-//        }
-//        if (StringUtils.isNotEmpty(data.getFoodLocation())) {
-//            progressData.setFoodLocation(data.getFoodLocation());
-//        }
-//        if (StringUtils.isNotEmpty(data.getFoodYear())) {
-//            progressData.setFoodYear(data.getFoodYear());
-//        }
-//        if (null != data.getPrice()) {
-//            progressData.setPrice(data.getPrice());
-//        }
-//        if (StringUtils.isNotEmpty(data.getRemarks())) {
-//            progressData.setRemarks(data.getRemarks());
-//        }
-//        if (StringUtils.isNotEmpty(data.getNoticeId())) {
-//            progressData.setNoticeId(data.getNoticeId());
-//        }
-//
-//        String msg = inoutService.updateData(progressData);
-//
-//        if (null != msg) {
-//            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
-//        }
-//        if (InoutConstant.PROGRESS_RECORD.equals(progressData.getProgress())) {
-//
-//            inoutComplete(progressData);
-//        }
-//        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛");
-//    }
 
     /**
      * 鍖栭獙缁撴灉涓嶉�氳繃鏃舵牎楠岄厤缃俊鎭�
@@ -556,81 +371,45 @@
     }
 
 
-    public PageResponse<InoutData> inoutComplete(InoutData data) throws Exception {
+    public PageResponse<InoutData> submitComplete(InoutData data) throws Exception {
 
         if (StringUtils.isEmpty(data.getId())
-                || StringUtils.isEmpty(data.getType())) {
+                || StringUtils.isEmpty(data.getType())
+                || StringUtils.isEmpty(data.getProgress())) {
 
             return new PageResponse<>(RespCodeEnum.CODE_1007.getCode(),
                     "娌℃湁鑾峰彇鍒拌溅杈嗕俊鎭��", data);
         }
 
+
+        data.setUpdateTime(new Date());
+        if (null == data.getCompleteTime()) {
+            data.setCompleteTime(DateUtil.getNewByMinute(new Date(), 2));
+        }
+        if (null == data.getCompleteUser()) {
+            data.setCompleteUser(ContextUtil.getLoginUserCName());
+        }
+
+        // 璁剧疆娴佺▼鑺傜偣鐩存帴瀹屾垚
         InoutParam param = new InoutParam();
         param.setCompanyId(data.getCompanyId());
         param.setId(data.getId());
         param.setType(data.getType());
         param.setDeptId(data.getDeptId());
         param.setIntelCard(data.getIntelCard());
-        param.setUserId(ContextUtil.getLoginUserCName());
+        param.setUserId(data.getCompleteUser());
         param.setDepotId(data.getDepotId());
         param.setCompleteTime(data.getCompleteTime());
-        if (null == param.getCompleteTime()) {
-            param.setCompleteTime(new Date());
-        }
-        // 璁剧疆娴佺▼鑺傜偣鐩存帴瀹屾垚
         param.setProgress(InoutConstant.PROGRESS_RECORD);
 
-        if (null == data.getCompleteTime()) {
-            data.setCompleteTime(DateUtil.getNewByMinute(new Date(), 2));
-        }
+
         String msg = inoutService.toComplete(param);
 
         if (null != msg) {
             return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
         }
 
-        // 搴撳瓨璋冩暣
-        commonService.initInoutDepotStore(data);
-
         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<InoutData> deleteInoutData(InoutData data, String msg) {
-        try {
-            data.setRemarks(msg);
-            String result = this.delInoutData(data, false);
-            if (null != result) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        result, data);
-            }
-        } catch (Exception e) {
-            log.error("鍚庡彴寮傚父:{}", e);
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�"
-                    + e.getMessage(), data);
-        }
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц瀹屾垚",
-                data);
     }
 
     /**
@@ -639,619 +418,333 @@
      * @param data
      * @return
      */
-    public PageResponse<InoutData> inoutBack(InoutData data) {
+    public PageResponse<InoutData> submitCardBack(InoutData data) {
         try {
-            // 浠庣紦瀛樹腑鑾峰彇鏈�鏂扮殑鏁版嵁锛屽鏋滄病鏈夊垯琛ㄧず娴佺▼宸茬粡缁撴潫銆�
-            InoutParam param = new InoutParam();
-            param.setCompanyId(data.getCompanyId());
-            param.setId(data.getId());
-            InoutData curData = inoutService.inoutProgressQuery(param);
-            if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
-                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
-                        "褰撳墠鍗℃祦绋嬪凡缁忓畬鎴愶紝鏃犻渶鎵ц鍗″洖鏀�", data);
+            //濡傛灉褰撳墠鏁版嵁宸茬粡缁撴潫
+            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
+
+                //鍒犻櫎缂撳瓨
+                inoutService.delFromCache(data.getDeptId(), data.getType(), data.getId());
+
+                return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(),
+                        "褰撹溅杈嗘祦绋嬪凡缁忓畬鎴愶紝鍗$墖宸插洖鏀�", data);
             }
-            if (InoutConstant.RECORD_STATUS_DEL.equals(curData
-                    .getRecordStatus())) {
-                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
-                        "褰撳墠鍗′俊鎭凡琚垹闄わ紝涓嶈兘鎵ц鍗″洖鏀�", data);
+
+
+            //濡傛灉褰撳墠娴佺▼涓嶆槸鍗″洖鏀�
+            if (!InoutConstant.PROGRESS_CARD_BACK.equals(data.getProgress())) {
+
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "褰撳墠娴佺▼鐜妭涓嶆纭紝涓嶈兘鎵ц鍗″洖鏀�", data);
             }
 
             // 濡傛灉褰撳墠娴佺▼鐘舵�佹槸鍗″洖鏀剁姸鎬侊紝灏辨槸瀹屾垚娴佺▼銆�
-            if (InoutConstant.PROGRESS_CARD_BACK.equals(curData.getProgress())) {
-                return inoutComplete(curData);
+            if (InoutConstant.PROGRESS_CARD_BACK.equals(data.getProgress())) {
+                return submitComplete(data);
             }
-
-            // 濡傛灉鏄叾浠栫姸鎬侊紝鍒欐墽琛屽垹闄ら�昏緫
-            return deleteInoutData(curData, "鍗″洖鏀跺垹闄�");
 
         } catch (Exception e) {
             return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                     "鍚庣鎵ц寮傚父锛�" + e.getMessage());
         }
+        
+        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(),
+                "鎵ц鎴愬姛", data);
     }
 
-    /* ============================== 璇﹀崟椤甸潰鐩稿叧鎿嶄綔 ================================= */
 
-    /**
-     * 琛ュ崟鎿嶄綔 琛ュ崟鍥犱负瀹屾垚鏃堕棿涓嶇‘瀹氾紝鎵�浠ラ渶瑕佺郴缁熸牴鎹綋鍓嶆暟鎹繘琛岃嚜鍔ㄦ娴嬶紝璋冩暣鍘熸潵娴佹按淇℃伅鍜屽簱瀛�
-     *
-     * @param data
-     * @return
-     * @throws Exception
-     */
-    @Transactional
-    public String addInoutData(InoutData data) throws Exception {
+        /**
+         * 琛ュ崟鎿嶄綔 琛ュ崟鍥犱负瀹屾垚鏃堕棿涓嶇‘瀹氾紝鎵�浠ラ渶瑕佺郴缁熸牴鎹綋鍓嶆暟鎹繘琛岃嚜鍔ㄦ娴嬶紝璋冩暣鍘熸潵娴佹按淇℃伅鍜屽簱瀛�
+         *
+         * @param data
+         * @return
+         * @throws Exception
+         */
+        public String addInoutData(InoutData data) throws Exception {
 
-        if (data.getSettleWeight() <= 0.0) {
-            return "琛ュ崟鏁版嵁瑕佹眰缁撶畻閲嶉噺蹇呴』澶т簬0";
-        }
-
-        // 琛ュ崟鏁版嵁鐩存帴鍒扮粨鏋滅姸鎬�
-        data.setRecordStatus(InoutConstant.RECORD_STATUS_ADD);
-        data.setProgress(InoutConstant.PROGRESS_RECORD);
-        if (InoutConstant.STATUS_NONE.equals(data.getCheckStatus())) {
-            data.setCheckStatus(InoutConstant.STATUS_PASS);
-        }
-
-        String loginUser = ContextUtil.getLoginUserCName();
-        data.setRegisterUser(loginUser);
-        data.setFullWeightUser(loginUser);
-        data.setEmptyWeightUser(loginUser);
-        data.setHandleUser(loginUser);
-        data.setCompleteUser(loginUser);
-        if (null == data.getCompleteTime()) {
-            data.setCompleteTime(new Date());
-        }
-        // 娉ㄥ唽鏃堕棿姣斿畬鎴愭椂闂存棭涓�涓皬鏃�
-        data.setRegisterTime(DateUtil.getNewByMinute(new Date(), -60));
-
-        if (StringUtils.isEmpty(data.getUserId())) {
-            data.setUserId(InoutConstant.DEFAULT_ID_CARD);
-        }
-        if (null == data.getIntelCard()) {
-            data.setIntelCard(data.getUserId());
-        }
-        if (null != data.getCheckItems()) {
-            data.setCheckUser(loginUser);
-        }
-
-        // 淇濆瓨妫�娴嬮」鐩�
-        if (InoutConstant.TYPE_IN.equals(data.getType())) {
-
-            if (null == data.getFullWeightTime()) {
-                data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -50));
-            }
-            if (null == data.getEmptyWeightTime()) {
-                data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -10));
+            if (data.getSettleWeight() <= 0.0) {
+                return "琛ュ崟鏁版嵁瑕佹眰缁撶畻閲嶉噺蹇呴』澶т簬0";
             }
 
-            // 鍏堟墽琛屽寲楠屼俊鎭繚瀛�
-            CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
-            if (null != checkResult) {
+            // 琛ュ崟鏁版嵁鐩存帴鍒扮粨鏋滅姸鎬�
+            data.setRecordStatus(InoutConstant.RECORD_STATUS_ADD);
+            data.setProgress(InoutConstant.PROGRESS_RECORD);
+            if (InoutConstant.STATUS_NONE.equals(data.getCheckStatus())) {
+                data.setCheckStatus(InoutConstant.STATUS_PASS);
+            }
+
+            String loginUser = ContextUtil.getLoginUserCName();
+            data.setRegisterUser(loginUser);
+            data.setFullWeightUser(loginUser);
+            data.setEmptyWeightUser(loginUser);
+            data.setHandleUser(loginUser);
+            data.setCompleteUser(loginUser);
+            if (null == data.getCompleteTime()) {
+                data.setCompleteTime(new Date());
+            }
+            // 娉ㄥ唽鏃堕棿姣斿畬鎴愭椂闂存棭涓�涓皬鏃�
+            data.setRegisterTime(DateUtil.getNewByMinute(new Date(), -60));
+
+            if (StringUtils.isEmpty(data.getUserId())) {
+                data.setUserId(InoutConstant.DEFAULT_ID_CARD);
+            }
+            if (null == data.getIntelCard()) {
+                data.setIntelCard(data.getUserId());
+            }
+            if (null != data.getCheckItems()) {
+                data.setCheckUser(loginUser);
+            }
+
+            // 淇濆瓨妫�娴嬮」鐩�
+            if (InoutConstant.TYPE_IN.equals(data.getType())) {
+
+                if (null == data.getFullWeightTime()) {
+                    data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -50));
+                }
+                if (null == data.getEmptyWeightTime()) {
+                    data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -10));
+                }
+
+                // 鍏堟墽琛屽寲楠屼俊鎭繚瀛�
+                CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
+                if (null != checkResult) {
 //				if (null == data.getWet())data.setWet(checkResult.getWet());
 //				if (null == data.getImpurity())data.setImpurity(checkResult.getImpurity());
+                }
+            } else {
+                if (null == data.getEmptyWeightTime()) {
+                    data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -50));
+                }
+                if (null == data.getFullWeightTime()) {
+                    data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -10));
+                }
             }
-        } else {
-            if (null == data.getEmptyWeightTime()) {
-                data.setEmptyWeightTime(DateUtil.getNewByMinute(new Date(), -50));
+
+            // 娣诲姞琛ュ崟鏁版嵁
+            String msg = inoutService.insertData(data);
+
+            // 鍒濆鍖栭獙璇佸嚭鍏ュ簱搴撳瓨
+            commonService.initInoutDepotStore(data);
+            return msg;
+        }
+
+        /**
+         * 淇敼鎿嶄綔 淇敼閫昏緫璇存槑锛氫慨鏀规暟鎹渶瑕佽幏鍙栧師鏁版嵁搴撲腑鐨勬暟鎹繘琛屽姣斻��
+         *
+         * @param data
+         * @return
+         * @throws Exception
+         */
+        @Transactional
+        public String updateInoutData(InoutData data)throws Exception {
+
+            if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
+                return "绯荤粺锛氬凡缁忓垹闄ょ殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
             }
-            if (null == data.getFullWeightTime()) {
-                data.setFullWeightTime(DateUtil.getNewByMinute(new Date(), -10));
+            if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
+                return "绯荤粺锛氬紓甯哥粓姝㈢殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
             }
-        }
 
-        // 娣诲姞琛ュ崟鏁版嵁
-        String msg = inoutService.insertData(data);
+            // 濡傛灉娴佺▼鏈粨鏉燂紝鍙洿鏂版暟鎹�
+            if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
+                return inoutService.updateData(data);
+            }
 
-        // 鍒濆鍖栭獙璇佸嚭鍏ュ簱搴撳瓨
-        commonService.initInoutDepotStore(data);
-        return msg;
-    }
+            // 濡傛灉鏄凡缁忓畬鎴愮殑鏁版嵁锛屽厛鑾峰彇鍒颁慨鏀圭洿鎺ョ殑鏁版嵁鏍规嵁鏁版嵁杩涜瀵规瘮
+            InoutParam param = new InoutParam();
+            param.setId(data.getId());
+            param.setCompanyId(data.getCompanyId());
+            param.setType(data.getType());
+            InoutData record = inoutService.inoutQueryById(param);
 
-    /**
-     * 淇敼鎿嶄綔 淇敼閫昏緫璇存槑锛氫慨鏀规暟鎹渶瑕佽幏鍙栧師鏁版嵁搴撲腑鐨勬暟鎹繘琛屽姣斻��
-     *
-     * @param data
-     * @return
-     * @throws Exception
-     */
-    @javax.transaction.Transactional(rollbackOn = Exception.class)
-    public String updateInoutData(InoutData data) throws Exception {
+            if (null == record) {
+                return "褰撳墠淇敼鏁版嵁宸茬粡涓嶅瓨鍦紒";
+            }
 
-        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
-            return "绯荤粺锛氬凡缁忓垹闄ょ殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
-        }
-        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
-            return "绯荤粺锛氬紓甯哥粓姝㈢殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
-        }
+            // 閬垮厤鏁版嵁搴撲腑鐨勬暟鎹凡缁忚鍏朵粬浜轰慨鏀�
+            if (InoutConstant.RECORD_STATUS_DEL.equals(record.getRecordStatus())) {
+                return "绯荤粺锛氬凡缁忓垹闄ょ殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
+            }
+            if (InoutConstant.RECORD_STATUS_ERROR.equals(record.getRecordStatus())) {
+                return "绯荤粺锛氬紓甯哥粓姝㈢殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
+            }
 
-        // 濡傛灉娴佺▼鏈粨鏉燂紝鍙洿鏂版暟鎹�
-        if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
-            return inoutService.updateData(data);
-        }
-
-        // 濡傛灉鏄凡缁忓畬鎴愮殑鏁版嵁锛屽厛鑾峰彇鍒颁慨鏀圭洿鎺ョ殑鏁版嵁鏍规嵁鏁版嵁杩涜瀵规瘮
-        InoutParam param = new InoutParam();
-        param.setId(data.getId());
-        param.setCompanyId(data.getCompanyId());
-        param.setType(data.getType());
-        InoutData record = inoutService.inoutQueryById(param);
-
-        if (null == record) {
-            return "褰撳墠淇敼鏁版嵁宸茬粡涓嶅瓨鍦紒";
-        }
-
-        // 閬垮厤鏁版嵁搴撲腑鐨勬暟鎹凡缁忚鍏朵粬浜轰慨鏀�
-        if (InoutConstant.RECORD_STATUS_DEL.equals(record.getRecordStatus())) {
-            return "绯荤粺锛氬凡缁忓垹闄ょ殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
-        }
-        if (InoutConstant.RECORD_STATUS_ERROR.equals(record.getRecordStatus())) {
-            return "绯荤粺锛氬紓甯哥粓姝㈢殑鏁版嵁涓嶆敮鎸佷慨鏀癸紒";
-        }
-
-        // 淇濆瓨妫�娴嬮」鐩�
-        if (InoutConstant.TYPE_IN.equals(data.getType())) {
-            // 鍏堟墽琛屽寲楠屼俊鎭繚瀛�
-            CheckUpdateResult checkResult = checkStandardManager
-                    .updateCheckItems(data.getCheckId(), data.getCompanyId(),
-                            data.getCheckItems());
-            if (null != checkResult) {
+            // 淇濆瓨妫�娴嬮」鐩�
+            if (InoutConstant.TYPE_IN.equals(data.getType())) {
+                // 鍏堟墽琛屽寲楠屼俊鎭繚瀛�
+                CheckUpdateResult checkResult = checkStandardManager
+                        .updateCheckItems(data.getCheckId(), data.getCompanyId(),
+                                data.getCheckItems());
+                if (null != checkResult) {
 //				if (null == data.getWet())
 //					data.setWet(checkResult.getWet());
 //				if (null == data.getImpurity())
 //					data.setImpurity(checkResult.getImpurity());
+                }
             }
+
+            // 鏇存柊鏁版嵁
+            inoutService.updateData(data);
+            return null;
         }
 
-        // 鏇存柊鏁版嵁
-        inoutService.updateData(data);
-        return null;
-    }
-
-    /**
-     * 鍒犻櫎鎿嶄綔 鍒犻櫎鏁版嵁涓鸿蒋鍒犻櫎锛屽垹闄ゆ暟鎹悗闇�瑕佹牴鎹垹闄ゆ儏鍐佃仈鍔ㄥ簱瀛樼瓑淇℃伅
-     *
-     * @param data
-     * @param selected 鏄惁宸茬粡鏌ヨ杩囨暟鎹�
-     * @return
-     * @throws Exception
-     */
-    @Transactional
-    public String delInoutData(InoutData data, boolean selected)
+        /**
+         * 鍒犻櫎鎿嶄綔 鍒犻櫎鏁版嵁涓鸿蒋鍒犻櫎锛屽垹闄ゆ暟鎹悗闇�瑕佹牴鎹垹闄ゆ儏鍐佃仈鍔ㄥ簱瀛樼瓑淇℃伅
+         *
+         * @param data
+         * @param selected 鏄惁宸茬粡鏌ヨ杩囨暟鎹�
+         * @return
+         * @throws Exception
+         */
+        @Transactional
+        public String delInoutData (InoutData data,boolean selected)
             throws Exception {
 
-        // 閬垮厤椤甸潰缂撳瓨棣栧厛鑾峰彇鏁版嵁搴撲腑鏈�鏂扮殑褰撳墠鏁版嵁淇℃伅
-        InoutParam param = new InoutParam();
-        param.setCompanyId(data.getCompanyId());
-        param.setId(data.getId());
-        param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]鎵ц鍒犻櫎锛屽師鍥狅細"
-                + data.getRemarks());
+            // 閬垮厤椤甸潰缂撳瓨棣栧厛鑾峰彇鏁版嵁搴撲腑鏈�鏂扮殑褰撳墠鏁版嵁淇℃伅
+            InoutParam param = new InoutParam();
+            param.setCompanyId(data.getCompanyId());
+            param.setId(data.getId());
+            param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]鎵ц鍒犻櫎锛屽師鍥狅細"
+                    + data.getRemarks());
 
-        if (!selected) {
+            if (!selected) {
+                data = inoutService.inoutQueryById(param);
+
+                if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
+                    return "宸茬粡鍒犻櫎鐨勬暟鎹紝涓嶆敮鎸侀噸澶嶅垹闄わ紒";
+                }
+                if (InoutConstant.RECORD_STATUS_ERROR
+                        .equals(data.getRecordStatus())) {
+                    return "褰撳墠鏁版嵁宸茬粡琚爣璁颁负寮傚父锛屼笉鏀寔鍒犻櫎锛�";
+                }
+            }
+
+            // 鎵ц鍒犻櫎
+            param.setProgress(InoutConstant.PROGRESS_RECORD);
+            param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
+            param.setType(data.getType());
+            inoutService.deleteData(param);
+
+            // 濡傛灉娴佺▼鏈粨鏉燂紝鐩存帴鍒犻櫎锛屼笉鐗垫壇鍒拌仈鍔ㄨ皟鏁�
+            if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
+                return null;
+            }
+            return null;
+        }
+
+        /**
+         * 寮傚父缁堟鎿嶄綔 璁剧疆寮傚父 涓轰簡閬垮厤椤甸潰鏁版嵁缂撳瓨锛岄渶瑕侀噸鏂拌幏鍙栨渶鏂版暟鎹垽鏂�
+         *
+         * @param data
+         * @return
+         * @throws Exception
+         */
+        @Transactional
+        public String errorInoutData (InoutData data){
+
+            InoutParam param = new InoutParam();
+            param.setCompanyId(data.getCompanyId());
+            param.setId(data.getId());
+            param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]鎵ц寮傚父缁堟锛屽師鍥狅細"
+                    + data.getRemarks());
             data = inoutService.inoutQueryById(param);
 
             if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
-                return "宸茬粡鍒犻櫎鐨勬暟鎹紝涓嶆敮鎸侀噸澶嶅垹闄わ紒";
+                return "宸茬粡鍒犻櫎鐨勬暟鎹紝涓嶆敮鎸佸紓甯稿鐞嗭紒";
             }
-            if (InoutConstant.RECORD_STATUS_ERROR
-                    .equals(data.getRecordStatus())) {
-                return "褰撳墠鏁版嵁宸茬粡琚爣璁颁负寮傚父锛屼笉鏀寔鍒犻櫎锛�";
+            if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
+                return "涓嶆敮鎸侀噸澶嶅紓甯稿鐞嗭紒";
             }
+            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
+                return "娴佺▼缁撴潫鐨勬暟鎹笉鏀寔寮傚父澶勭悊锛�";
+            }
+
+            return inoutService.inoutStop(param);
         }
 
-        // 鎵ц鍒犻櫎
-        param.setProgress(InoutConstant.PROGRESS_RECORD);
-        param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
-        param.setType(data.getType());
-        inoutService.deleteData(param);
+        /**
+         * 蹇�熺粨鏉熸搷浣� 娴佺▼娌℃湁缁撴潫鐨勫崟鎹繘琛岀粨鏉�
+         *
+         * @param data
+         * @return
+         */
+        public String completeInoutData (InoutData data) throws Exception {
+            if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
+                return "宸茬粡鍒犻櫎鐨勬暟鎹紝涓嶆敮鎸佸畬鎴愶紒";
+            }
+            if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
+                return "寮傚父缁堟鐨勬暟鎹紝涓嶆敮鎸佸畬鎴愶紒";
+            }
+            if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
+                return "娴佺▼宸插畬鎴愮殑鏁版嵁锛屼笉鏀寔瀹屾垚锛�";
+            }
 
-        // 濡傛灉娴佺▼鏈粨鏉燂紝鐩存帴鍒犻櫎锛屼笉鐗垫壇鍒拌仈鍔ㄨ皟鏁�
-        if (!InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
-            return null;
-        }
-        return null;
-    }
+            // 浠庢柊鏌ヨ鏁版嵁
+            InoutParam param = new InoutParam();
+            param.setId(data.getId());
+            param.setCompanyId(data.getCompanyId());
+            param.setType(data.getType());
+            InoutData cuData = inoutService.inoutProgressQuery(param);
+            if (null == cuData) {
+                return "褰撳墠杞﹁締娴佺▼鐘舵�佸凡缁忓彉鍖栵紝璇峰埛鏂伴〉闈㈤噸鏂版搷浣滐紒";
+            }
+            if (!cuData.getProgress().equals(data.getProgress())) {
+                return "褰撳墠杞﹁締娴佺▼鐘舵�佸凡缁忓彉鍖栵紝璇峰埛鏂伴〉闈㈤噸鏂版搷浣滐紒";
+            }
 
-    /**
-     * 寮傚父缁堟鎿嶄綔 璁剧疆寮傚父 涓轰簡閬垮厤椤甸潰鏁版嵁缂撳瓨锛岄渶瑕侀噸鏂拌幏鍙栨渶鏂版暟鎹垽鏂�
-     *
-     * @param data
-     * @return
-     * @throws Exception
-     */
-    @Transactional
-    public String errorInoutData(InoutData data) {
+            if (null == data.getCompleteTime()) {
+                return "璇峰~鍐欏畬鎴愭椂闂达紒锛�";
+            }
+            if (StringUtils.isEmpty(data.getDepotId())) {
+                return "璇峰~鍐欎粨搴撲俊鎭紒";
+            }
+            if (StringUtils.isEmpty(data.getFoodYear())) {
+                return "璇峰~鍐欑伯椋熷勾浠戒俊鎭紒";
+            }
+            if (StringUtils.isEmpty(data.getFoodVariety())) {
+                return "璇峰~鍐欑伯椋熷搧绉嶄俊鎭紒";
+            }
 
-        InoutParam param = new InoutParam();
-        param.setCompanyId(data.getCompanyId());
-        param.setId(data.getId());
-        param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]鎵ц寮傚父缁堟锛屽師鍥狅細"
-                + data.getRemarks());
-        data = inoutService.inoutQueryById(param);
+            if (data.getSettleWeight() <= 0) {
+                return "璇峰~鍐欑粨绠楀噣閲嶄俊鎭紒";
+            }
 
-        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 "娴佺▼缁撴潫鐨勬暟鎹笉鏀寔寮傚父澶勭悊锛�";
+            String msg = inoutService.quickComplete(data);
+
+            if (null == msg) {
+                data.setProgress(InoutConstant.PROGRESS_RECORD);
+                commonService.initInoutDepotStore(data);
+            }
+            return msg;
         }
 
-        return inoutService.inoutStop(param);
-    }
-
-    /**
-     * 蹇�熺粨鏉熸搷浣� 娴佺▼娌℃湁缁撴潫鐨勫崟鎹繘琛岀粨鏉�
-     *
-     * @param data
-     * @return
-     */
-    public String completeInoutData(InoutData data) throws Exception {
-        if (InoutConstant.RECORD_STATUS_DEL.equals(data.getRecordStatus())) {
-            return "宸茬粡鍒犻櫎鐨勬暟鎹紝涓嶆敮鎸佸畬鎴愶紒";
-        }
-        if (InoutConstant.RECORD_STATUS_ERROR.equals(data.getRecordStatus())) {
-            return "寮傚父缁堟鐨勬暟鎹紝涓嶆敮鎸佸畬鎴愶紒";
-        }
-        if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
-            return "娴佺▼宸插畬鎴愮殑鏁版嵁锛屼笉鏀寔瀹屾垚锛�";
+        public void initLpr (InoutConf conf){
+            inoutDeviceManager.initLpr(conf);
         }
 
-        // 浠庢柊鏌ヨ鏁版嵁
-        InoutParam param = new InoutParam();
-        param.setId(data.getId());
-        param.setCompanyId(data.getCompanyId());
-        param.setType(data.getType());
-        InoutData cuData = inoutService.inoutProgressQuery(param);
-        if (null == cuData) {
-            return "褰撳墠杞﹁締娴佺▼鐘舵�佸凡缁忓彉鍖栵紝璇峰埛鏂伴〉闈㈤噸鏂版搷浣滐紒";
-        }
-        if (!cuData.getProgress().equals(data.getProgress())) {
-            return "褰撳墠杞﹁締娴佺▼鐘舵�佸凡缁忓彉鍖栵紝璇峰埛鏂伴〉闈㈤噸鏂版搷浣滐紒";
-        }
+        /**
+         * 鍑哄叆搴撴敞鍐屾暟鎹彁浜わ紝鍏ュ簱鐧昏鍜屽嚭鍏ュ簱鐧昏浣跨敤鍚屼竴涓柟娉�
+         *
+         * @param data
+         * @return
+         * @throws Exception
+         */
+        public PageResponse<InoutData> submitRegisterInout (InoutData data) throws Exception {
 
-        if (null == data.getCompleteTime()) {
-            return "璇峰~鍐欏畬鎴愭椂闂达紒锛�";
-        }
-        if (StringUtils.isEmpty(data.getDepotId())) {
-            return "璇峰~鍐欎粨搴撲俊鎭紒";
-        }
-        if (StringUtils.isEmpty(data.getFoodYear())) {
-            return "璇峰~鍐欑伯椋熷勾浠戒俊鎭紒";
-        }
-        if (StringUtils.isEmpty(data.getFoodVariety())) {
-            return "璇峰~鍐欑伯椋熷搧绉嶄俊鎭紒";
-        }
-
-        if (data.getSettleWeight() <= 0) {
-            return "璇峰~鍐欑粨绠楀噣閲嶄俊鎭紒";
-        }
-
-        String msg = inoutService.quickComplete(data);
-
-        if (null == msg) {
-            data.setProgress(InoutConstant.PROGRESS_RECORD);
-            commonService.initInoutDepotStore(data);
-        }
-        return msg;
-    }
-
-    public void initLpr(InoutConf conf) {
-        inoutDeviceManager.initLpr(conf);
-    }
-
-    /**
-     * 鍑哄叆搴撴敞鍐屾暟鎹彁浜わ紝鍏ュ簱鐧昏鍜屽嚭鍏ュ簱鐧昏浣跨敤鍚屼竴涓柟娉�
-     *
-     * @param data
-     * @return
-     * @throws Exception
-     */
-    public PageResponse<InoutData> submitRegisterInout(InoutData data) throws Exception {
-
-        //棣栧厛鍒ゆ柇娴佺▼涓槸鍚︽湁宸茬粡瀛樺湪鐨勮溅杈嗕俊鎭湭鎵ц瀹屾垚锛岀洿鎺ヤ粠鏁版嵁搴撲腑鏌ヨ
-        InoutParam param = new InoutParam();
-        param.setCompanyId(data.getCompanyId());
-        param.setPlateNum(data.getPlateNum());
-        param.setIntelCard(data.getIntelCard());
-        param.setType(data.getType());
-        param.setStart(DateUtil.getNewByDay(null, -10));
-
-        int num = inoutService.checkExist(param);
-        if (num > 0) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "褰撳墠杞︾墝鎴栨櫤鎱у崱鏈夋鍦ㄦ墽琛屾祦绋嬫湭缁撴潫锛岃鑱旂郴绠$悊鍛�", data);
-        }
-
-
-        //鑾峰彇绯荤粺鍙傛暟閰嶇疆
-        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
-        if (null == inoutSysConf) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鎻愮ず锛氬綋鍓嶅簱鍖烘湭閰嶇疆鍑哄叆搴撴祦绋嬩俊鎭紝璇疯仈绯荤鐞嗗憳", data);
-        }
-
-
-        //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
-        String curProgress = data.getProgress();
-        String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
-
-
-        data = updateBasicInfo(data, curProgress, nextProgress);
-
-        String msg = inoutService.insertData(data);
-
-        if (null != msg) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    msg, data);
-        }
-
-        // 鎵ц闄勪欢淇℃伅
-        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
-
-
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
-    }
-
-    public PageResponse<InoutData> submitWeightIn(InoutData data) throws Exception {
-        //鑾峰彇绯荤粺鍙傛暟閰嶇疆
-        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
-        if (null == inoutSysConf) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鎻愮ず锛氬綋鍓嶇郴缁熶腑娴佺▼閰嶇疆寮傚父锛岃鑱旂郴绠$悊鍛�", data);
-        }
-
-
-        //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
-        String curProgress = data.getProgress();
-        String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
-        data = updateBasicInfo(data, curProgress, nextProgress);
-
-
-        //鍏ュ簱绉伴噸鍙兘璋冩暣璐ㄦ鍗�
-        CheckUpdateResult checkUpdateResult = updateCheckItems(data);
-        if (data.getDeCheck() == 0) {
-            data.setDeCheck(checkUpdateResult.getDeSum());
-        }
-        if (data.getAddCheck() == 0) {
-            data.setAddCheck(checkUpdateResult.getAddSum());
-        }
-
-        //鎵ц鏁版嵁鏇存柊
-        String msg = inoutService.updateData(data);
-
-        if (null != msg) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
-        }
-
-        // 鎵ц闄勪欢淇℃伅
-        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
-
-        //绉伴噸瀹屾垚锛岃皟鐢ㄥ嚭鍏ュ簱鎺у埗閫昏緫澶勭悊
-        inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
-
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
-    }
-
-
-    public PageResponse<InoutData> submitWeightOut(InoutData data) throws Exception {
-        //鑾峰彇绯荤粺鍙傛暟閰嶇疆
-        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
-        if (null == inoutSysConf) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鎻愮ず锛氬綋鍓嶇郴缁熶腑娴佺▼閰嶇疆寮傚父锛岃鑱旂郴绠$悊鍛�", data);
-        }
-
-
-        //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
-        String curProgress = data.getProgress();
-        String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
-        data = updateBasicInfo(data, curProgress, nextProgress);
-
-        //鎵ц鏁版嵁鏇存柊
-        String msg = inoutService.updateData(data);
-
-        if (null != msg) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
-        }
-
-        // 鎵ц闄勪欢淇℃伅
-        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
-
-        //绉伴噸鍚庢牴鎹綋鍓嶆祦绋嬬姸鎬佸拰涓嬩竴涓姸鎬侊紝閫氱煡绉伴噸鎺у埗鍣�
-        inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
-
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
-    }
-
-    public PageResponse<InoutData> submitHandle(InoutData data) throws Exception {
-
-
-        if (null == data.getHandleUser()) {
-            data.setHandleUser(ContextUtil.getLoginUserCName());
-        }
-
-        //鑾峰彇绯荤粺鍙傛暟閰嶇疆
-        InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
-        if (null == inoutSysConf) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鎻愮ず锛氬綋鍓嶇郴缁熶腑娴佺▼閰嶇疆寮傚父锛岃鑱旂郴绠$悊鍛�", data);
-        }
-
-        //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
-        String curProgress = data.getProgress();
-        String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
-        data = updateBasicInfo(data, curProgress, nextProgress);
-
-
-        //鎵ц鏁版嵁鏇存柊
-        String msg = inoutService.updateDataByHandle(data);
-
-        if (null != msg) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
-        }
-
-        // 鎵ц闄勪欢淇℃伅
-        fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
-
-        return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
-    }
-
-
-    /**
-     * 鏍规嵁鏉′欢鑾峰彇鎵︽牱鏁版嵁
-     *
-     * @param param
-     * @return
-     */
-    public PageResponse<Page<InoutCheckData>> pageSampleData(InoutCheckParam param) {
-
-        if (StringUtils.isEmpty(param.getCompanyId())) {
-            param.setCompanyId(ContextUtil.getCompanyId());
-        }
-        if (StringUtils.isEmpty(param.getDeptId())) {
-            param.setDeptId(ContextUtil.subDeptId(null));
-        }
-
-        //鑻ユ煡璇㈡潯浠朵负宸叉墻鏍凤紝鍒欐祦绋嬬疆绌猴紱鑻ユ湭鎵︽牱锛屽垯娴佺▼涓嶅鐞嗭紝浠嶄负鎵︽牱鍖栭獙娴佺▼(CHECK)
-        if (!"NONE".equals(param.getSampleStatus())) {
-            param.setProgress(null);
-        }
-
-        //鑾峰彇鎵︽牱鏁版嵁
-        Page<InoutCheckData> sampleList = inoutService.pageSampleData(param);
-
-
-        if (null == sampleList.getRecords() || sampleList.getRecords().isEmpty()) {
-            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
-                    "鑾峰彇鍒版暟鎹俊鎭负绌�");
-        }
-        return new PageResponse<>(RespCodeEnum.CODE_0000, sampleList);
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    public PageResponse<InoutCheckData> updateSampleData(InoutCheckData data) {
-
-        try {
-            // 鑾峰彇涓氬姟鏁版嵁淇℃伅
+            //棣栧厛鍒ゆ柇娴佺▼涓槸鍚︽湁宸茬粡瀛樺湪鐨勮溅杈嗕俊鎭湭鎵ц瀹屾垚锛岀洿鎺ヤ粠鏁版嵁搴撲腑鏌ヨ
             InoutParam param = new InoutParam();
             param.setCompanyId(data.getCompanyId());
-            param.setId(data.getId());
-            InoutData curData = inoutService.inoutProgressQuery(param);
-            if (null == curData) {
+            param.setPlateNum(data.getPlateNum());
+            param.setIntelCard(data.getIntelCard());
+            param.setType(data.getType());
+            param.setStart(DateUtil.getNewByDay(null, -10));
+
+            int num = inoutService.checkExist(param);
+            if (num > 0) {
                 return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "娌℃湁鑾峰彇鍒板叆搴撲笟鍔℃暟鎹俊鎭紝鏇存柊澶辫触", data);
-            }
-            if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "褰撳墠娴佺▼宸茬粡缁撴潫锛屼笉鏀寔淇敼");
+                        "褰撳墠杞︾墝鎴栨櫤鎱у崱鏈夋鍦ㄦ墽琛屾祦绋嬫湭缁撴潫锛岃鑱旂郴绠$悊鍛�", data);
             }
 
-            //鎵︽牱鏃堕棿鍜屾墻鏍蜂汉
-            if (StringUtils.isEmpty(data.getSampleUser())) {
-                data.setSampleUser(ContextUtil.getLoginUserCName());
-            }
-            if (null == data.getSampleTime()) {
-                data.setSampleTime(new Date());
-            }
-            String msg = inoutService.updateSampleData(data);
-
-            if (null != msg) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
-            }
-
-            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛");
-        } catch (Exception e) {
-            log.error("鍚庡彴寮傚父:{}", e);
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鍚庡彴寮傚父锛�" + e.getMessage(), null);
-        }
-    }
-
-    /**
-     * @param param
-     * @return
-     */
-    public PageResponse<Page<InoutCheckData>> pageCheckData(InoutCheckParam param) {
-
-        if (StringUtils.isEmpty(param.getCompanyId())) {
-            param.setCompanyId(ContextUtil.getCompanyId());
-        }
-        if (StringUtils.isEmpty(param.getDeptId())) {
-            param.setDeptId(ContextUtil.subDeptId(null));
-        }
-        // 濡傛灉鏄凡鍖栭獙锛屽垯灏嗘祦绋嬬姸鎬佺疆绌猴紝濡傛灉鏄湭鍖栭獙锛屽垯娴佺▼鐘舵�佷笉澶勭悊锛屼粛鏄疌HECK鐘舵��
-        if (!"NONE".equals(param.getCheckStatus())) {
-            param.setProgress(null);
-        }
-
-        Page<InoutCheckData> checkList = inoutService.pageCheckData(param);
-
-
-        if (null == checkList.getRecords() || checkList.getRecords().isEmpty()) {
-            return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
-                    "鑾峰彇鍒版暟鎹俊鎭负绌�");
-        }
-        return new PageResponse<>(RespCodeEnum.CODE_0000, checkList);
-    }
-
-    /**
-     * 鑾峰彇鍖栭獙椤逛俊鎭�
-     *
-     * @param param
-     * @return
-     */
-    public PageResponse<List<CheckItemData>> getCheckItemData(InoutCheckParam param) {
-
-        try {
-            List<CheckItemData> result = checkStandardManager.listCheckItem(param.getCheckId(),
-                    param.getCompanyId(), param.getFoodVariety());
-
-            return new PageResponse<>(RespCodeEnum.CODE_0000, result);
-        } catch (Exception e) {
-            return new PageResponse<>(
-                    RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage(), null);
-        }
-    }
-
-    @Transactional(rollbackFor = Exception.class)
-    public PageResponse<InoutCheckData> updateCheckData(InoutCheckData data) {
-        try {
-
-            // 鑾峰彇涓氬姟鏁版嵁淇℃伅
-            InoutParam param = new InoutParam();
-            param.setCompanyId(data.getCompanyId());
-            param.setId(data.getId());
-            InoutData curData = inoutService.inoutProgressQuery(param);
-            if (null == curData) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "娌℃湁鑾峰彇鍒板叆搴撲笟鍔℃暟鎹俊鎭紝鏇存柊澶辫触", data);
-            }
-            if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "褰撳墠娴佺▼宸茬粡缁撴潫锛屼笉鏀寔淇敼");
-            }
-
-            //鏇存柊鍖栭獙椤逛俊鎭�
-            CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
-            if (StringUtils.isNotEmpty(checkResult.getMsg())) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                        "鍚庡彴鎵ц寮傚父锛�" + checkResult.getMsg(), data);
-            }
-
-            //璁剧疆鍖栭獙淇℃伅
-            if (checkResult.getDeSum() > 0) {
-                data.setDeCheck(checkResult.getDeSum());
-            }
-            if (checkResult.getAddSum() > 0) {
-                data.setAddCheck(checkResult.getAddSum());
-            }
-            if (null == data.getCheckTime()) {
-                data.setCheckTime(new Date());
-            }
-            curData.setCheckStatus(data.getCheckStatus());
 
             //鑾峰彇绯荤粺鍙傛暟閰嶇疆
             InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
@@ -1259,55 +752,344 @@
                 return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
                         "鎻愮ず锛氬綋鍓嶅簱鍖烘湭閰嶇疆鍑哄叆搴撴祦绋嬩俊鎭紝璇疯仈绯荤鐞嗗憳", data);
             }
-            //鏇存柊涓嬩竴娴佺▼鐘舵��
-            if (InoutConstant.PROGRESS_CHECK.equals(curData.getProgress())) {
-                curData = updateBasicInfo(curData, inoutSysConf);
-                // 鑻ュ寲楠岀粨鏋滀笉鍚堟牸锛屽垽鏂厤缃悗缁祦绋�
-                if (InoutConstant.STATUS_UNPASS.equals(curData.getCheckStatus())) {
-                    curData = checkNoPass(curData);
-                }
-            }
 
-            //鍖栭獙浜恒�佸寲楠屾椂闂�
-            data.setCheckStatus(curData.getCheckStatus());
-            data.setProgress(curData.getProgress());
-            if (StringUtils.isEmpty(data.getCheckUser())) {
-                data.setCheckUser(ContextUtil.getLoginUserCName());
-            }
-            if (null == data.getCheckTime()) {
-                data.setCheckTime(new Date());
-            }
 
-            String msg = inoutService.updateCheckData(data);
+            //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
+            String curProgress = data.getProgress();
+            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
+
+
+            data = updateBasicInfo(data, curProgress, nextProgress);
+
+            String msg = inoutService.insertData(data);
+
             if (null != msg) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        msg, data);
             }
 
-            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛");
-        } catch (Exception e) {
-            return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
-                    "鍚庡彴寮傚父锛�" + e.getMessage(), null);
+            // 鎵ц闄勪欢淇℃伅
+            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
+
+
+            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
         }
-    }
 
-    /**
-     * 鑾峰彇鍗曚环淇℃伅
-     *
-     * @param param
-     * @return
-     */
-    public PageResponse<InoutPrice> getPrice(InoutCheckParam param) {
-        try {
-
-            List<InoutPrice> price = inoutService.getPrice(param);
-            if (null == price || price.isEmpty()) {
-                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "鏈幏鍙栧埌绮瀹氫环閰嶇疆淇℃伅");
+        public PageResponse<InoutData> submitWeightIn (InoutData data) throws Exception {
+            //鑾峰彇绯荤粺鍙傛暟閰嶇疆
+            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
+            if (null == inoutSysConf) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "鎻愮ず锛氬綋鍓嶇郴缁熶腑娴佺▼閰嶇疆寮傚父锛岃鑱旂郴绠$悊鍛�", data);
             }
-            return new PageResponse<>(RespCodeEnum.CODE_0000, price.get(0));
 
-        } catch (Exception e) {
-            return new PageResponse<>(
-                    RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage(), null);
+
+            //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
+            String curProgress = data.getProgress();
+            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
+            data = updateBasicInfo(data, curProgress, nextProgress);
+
+
+            //鍏ュ簱绉伴噸鍙兘璋冩暣璐ㄦ鍗�
+            CheckUpdateResult checkUpdateResult = updateCheckItems(data);
+            if (data.getDeCheck() == 0) {
+                data.setDeCheck(checkUpdateResult.getDeSum());
+            }
+            if (data.getAddCheck() == 0) {
+                data.setAddCheck(checkUpdateResult.getAddSum());
+            }
+
+            //鎵ц鏁版嵁鏇存柊
+            String msg = inoutService.updateData(data);
+
+            if (null != msg) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
+            }
+
+            // 鎵ц闄勪欢淇℃伅
+            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
+
+            //绉伴噸瀹屾垚锛岃皟鐢ㄥ嚭鍏ュ簱鎺у埗閫昏緫澶勭悊
+            inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
+
+            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
         }
-    }
-}
\ No newline at end of file
+
+
+        public PageResponse<InoutData> submitWeightOut (InoutData data) throws Exception {
+            //鑾峰彇绯荤粺鍙傛暟閰嶇疆
+            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
+            if (null == inoutSysConf) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "鎻愮ず锛氬綋鍓嶇郴缁熶腑娴佺▼閰嶇疆寮傚父锛岃鑱旂郴绠$悊鍛�", data);
+            }
+
+
+            //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
+            String curProgress = data.getProgress();
+            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
+            data = updateBasicInfo(data, curProgress, nextProgress);
+
+            //鎵ц鏁版嵁鏇存柊
+            String msg = inoutService.updateData(data);
+
+            if (null != msg) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
+            }
+
+            // 鎵ц闄勪欢淇℃伅
+            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
+
+            //绉伴噸鍚庢牴鎹綋鍓嶆祦绋嬬姸鎬佸拰涓嬩竴涓姸鎬侊紝閫氱煡绉伴噸鎺у埗鍣�
+            inoutDeviceManager.controlWeight(data, curProgress, nextProgress);
+
+            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
+        }
+
+        public PageResponse<InoutData> submitHandle (InoutData data) throws Exception {
+
+
+            if (null == data.getHandleUser()) {
+                data.setHandleUser(ContextUtil.getLoginUserCName());
+            }
+
+            //鑾峰彇绯荤粺鍙傛暟閰嶇疆
+            InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
+            if (null == inoutSysConf) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "鎻愮ず锛氬綋鍓嶇郴缁熶腑娴佺▼閰嶇疆寮傚父锛岃鑱旂郴绠$悊鍛�", data);
+            }
+
+            //鑾峰彇涓嬩竴涓祦绋嬬姸鎬�
+            String curProgress = data.getProgress();
+            String nextProgress = getNextProgress(curProgress, data.getType(), inoutSysConf);
+            data = updateBasicInfo(data, curProgress, nextProgress);
+
+
+            //鎵ц鏁版嵁鏇存柊
+            String msg = inoutService.updateDataByHandle(data);
+
+            if (null != msg) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg, data);
+            }
+
+            // 鎵ц闄勪欢淇℃伅
+            fileService.saveInoutFiles(data.getFiles(), data.getCompanyId(), data.getId(), curProgress);
+
+            return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛", data);
+        }
+
+
+        /**
+         * 鏍规嵁鏉′欢鑾峰彇鎵︽牱鏁版嵁
+         *
+         * @param param
+         * @return
+         */
+        public PageResponse<Page<InoutCheckData>> pageSampleData (InoutCheckParam param){
+
+            if (StringUtils.isEmpty(param.getCompanyId())) {
+                param.setCompanyId(ContextUtil.getCompanyId());
+            }
+            if (StringUtils.isEmpty(param.getDeptId())) {
+                param.setDeptId(ContextUtil.subDeptId(null));
+            }
+
+            //鑻ユ煡璇㈡潯浠朵负宸叉墻鏍凤紝鍒欐祦绋嬬疆绌猴紱鑻ユ湭鎵︽牱锛屽垯娴佺▼涓嶅鐞嗭紝浠嶄负鎵︽牱鍖栭獙娴佺▼(CHECK)
+            if (!"NONE".equals(param.getSampleStatus())) {
+                param.setProgress(null);
+            }
+
+            //鑾峰彇鎵︽牱鏁版嵁
+            Page<InoutCheckData> sampleList = inoutService.pageSampleData(param);
+
+
+            if (null == sampleList.getRecords() || sampleList.getRecords().isEmpty()) {
+                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
+                        "鑾峰彇鍒版暟鎹俊鎭负绌�");
+            }
+            return new PageResponse<>(RespCodeEnum.CODE_0000, sampleList);
+        }
+
+        @Transactional(rollbackFor = Exception.class)
+        public PageResponse<InoutCheckData> updateSampleData (InoutCheckData data){
+
+            try {
+                // 鑾峰彇涓氬姟鏁版嵁淇℃伅
+                InoutParam param = new InoutParam();
+                param.setCompanyId(data.getCompanyId());
+                param.setId(data.getId());
+                InoutData curData = inoutService.inoutProgressQuery(param);
+                if (null == curData) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                            "娌℃湁鑾峰彇鍒板叆搴撲笟鍔℃暟鎹俊鎭紝鏇存柊澶辫触", data);
+                }
+                if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                            "褰撳墠娴佺▼宸茬粡缁撴潫锛屼笉鏀寔淇敼");
+                }
+
+                //鎵︽牱鏃堕棿鍜屾墻鏍蜂汉
+                if (StringUtils.isEmpty(data.getSampleUser())) {
+                    data.setSampleUser(ContextUtil.getLoginUserCName());
+                }
+                if (null == data.getSampleTime()) {
+                    data.setSampleTime(new Date());
+                }
+                String msg = inoutService.updateSampleData(data);
+
+                if (null != msg) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
+                }
+
+                return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛");
+            } catch (Exception e) {
+                log.error("鍚庡彴寮傚父:{}", e);
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "鍚庡彴寮傚父锛�" + e.getMessage(), null);
+            }
+        }
+
+        /**
+         * @param param
+         * @return
+         */
+        public PageResponse<Page<InoutCheckData>> pageCheckData (InoutCheckParam param){
+
+            if (StringUtils.isEmpty(param.getCompanyId())) {
+                param.setCompanyId(ContextUtil.getCompanyId());
+            }
+            if (StringUtils.isEmpty(param.getDeptId())) {
+                param.setDeptId(ContextUtil.subDeptId(null));
+            }
+            // 濡傛灉鏄凡鍖栭獙锛屽垯灏嗘祦绋嬬姸鎬佺疆绌猴紝濡傛灉鏄湭鍖栭獙锛屽垯娴佺▼鐘舵�佷笉澶勭悊锛屼粛鏄疌HECK鐘舵��
+            if (!"NONE".equals(param.getCheckStatus())) {
+                param.setProgress(null);
+            }
+
+            Page<InoutCheckData> checkList = inoutService.pageCheckData(param);
+
+
+            if (null == checkList.getRecords() || checkList.getRecords().isEmpty()) {
+                return new PageResponse<>(RespCodeEnum.CODE_2000.getCode(),
+                        "鑾峰彇鍒版暟鎹俊鎭负绌�");
+            }
+            return new PageResponse<>(RespCodeEnum.CODE_0000, checkList);
+        }
+
+        /**
+         * 鑾峰彇鍖栭獙椤逛俊鎭�
+         *
+         * @param param
+         * @return
+         */
+        public PageResponse<List<CheckItemData>> getCheckItemData (InoutCheckParam param){
+
+            try {
+                List<CheckItemData> result = checkStandardManager.listCheckItem(param.getCheckId(),
+                        param.getCompanyId(), param.getFoodVariety());
+
+                return new PageResponse<>(RespCodeEnum.CODE_0000, result);
+            } catch (Exception e) {
+                return new PageResponse<>(
+                        RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage(), null);
+            }
+        }
+
+        @Transactional(rollbackFor = Exception.class)
+        public PageResponse<InoutCheckData> updateCheckData (InoutCheckData data){
+            try {
+
+                // 鑾峰彇涓氬姟鏁版嵁淇℃伅
+                InoutParam param = new InoutParam();
+                param.setCompanyId(data.getCompanyId());
+                param.setId(data.getId());
+                InoutData curData = inoutService.inoutProgressQuery(param);
+                if (null == curData) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                            "娌℃湁鑾峰彇鍒板叆搴撲笟鍔℃暟鎹俊鎭紝鏇存柊澶辫触", data);
+                }
+                if (InoutConstant.PROGRESS_RECORD.equals(curData.getProgress())) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                            "褰撳墠娴佺▼宸茬粡缁撴潫锛屼笉鏀寔淇敼");
+                }
+
+                //鏇存柊鍖栭獙椤逛俊鎭�
+                CheckUpdateResult checkResult = checkStandardManager.updateCheckItems(data.getCheckId(), data.getCompanyId(), data.getCheckItems());
+                if (StringUtils.isNotEmpty(checkResult.getMsg())) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                            "鍚庡彴鎵ц寮傚父锛�" + checkResult.getMsg(), data);
+                }
+
+                //璁剧疆鍖栭獙淇℃伅
+                if (checkResult.getDeSum() > 0) {
+                    data.setDeCheck(checkResult.getDeSum());
+                }
+                if (checkResult.getAddSum() > 0) {
+                    data.setAddCheck(checkResult.getAddSum());
+                }
+                if (null == data.getCheckTime()) {
+                    data.setCheckTime(new Date());
+                }
+                curData.setCheckStatus(data.getCheckStatus());
+
+                //鑾峰彇绯荤粺鍙傛暟閰嶇疆
+                InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(data.getCompanyId(), data.getDeptId());
+                if (null == inoutSysConf) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                            "鎻愮ず锛氬綋鍓嶅簱鍖烘湭閰嶇疆鍑哄叆搴撴祦绋嬩俊鎭紝璇疯仈绯荤鐞嗗憳", data);
+                }
+                //鏇存柊涓嬩竴娴佺▼鐘舵��
+                if (InoutConstant.PROGRESS_CHECK.equals(curData.getProgress())) {
+                    curData = updateBasicInfo(curData, inoutSysConf);
+                    // 鑻ュ寲楠岀粨鏋滀笉鍚堟牸锛屽垽鏂厤缃悗缁祦绋�
+                    if (InoutConstant.STATUS_UNPASS.equals(curData.getCheckStatus())) {
+                        curData = checkNoPass(curData);
+                    }
+                }
+
+                //鍖栭獙浜恒�佸寲楠屾椂闂�
+                data.setCheckStatus(curData.getCheckStatus());
+                data.setProgress(curData.getProgress());
+                if (StringUtils.isEmpty(data.getCheckUser())) {
+                    data.setCheckUser(ContextUtil.getLoginUserCName());
+                }
+                if (null == data.getCheckTime()) {
+                    data.setCheckTime(new Date());
+                }
+
+                String msg = inoutService.updateCheckData(data);
+                if (null != msg) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), msg);
+                }
+
+                return new PageResponse<>(RespCodeEnum.CODE_0000.getCode(), "鎵ц鎴愬姛");
+            } catch (Exception e) {
+                return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(),
+                        "鍚庡彴寮傚父锛�" + e.getMessage(), null);
+            }
+        }
+
+        /**
+         * 鑾峰彇鍗曚环淇℃伅
+         *
+         * @param param
+         * @return
+         */
+        public PageResponse<InoutPrice> getPrice (InoutCheckParam param){
+            try {
+
+                List<InoutPrice> price = inoutService.getPrice(param);
+                if (null == price || price.isEmpty()) {
+                    return new PageResponse<>(RespCodeEnum.CODE_1111.getCode(), "鏈幏鍙栧埌绮瀹氫环閰嶇疆淇℃伅");
+                }
+                return new PageResponse<>(RespCodeEnum.CODE_0000, price.get(0));
+
+            } catch (Exception e) {
+                return new PageResponse<>(
+                        RespCodeEnum.CODE_1111.getCode(), "鍚庡彴寮傚父锛�" + e.getMessage(), null);
+            }
+        }
+
+
+    }
\ No newline at end of file
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java b/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java
index 6997400..774ea94 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/service/InoutService.java
@@ -1,6 +1,5 @@
 package com.ld.igds.inout.service;
 
-import com.ld.igds.check.dto.CheckItemData;
 import com.ld.igds.data.Page;
 import com.ld.igds.inout.dto.*;
 import com.ld.igds.models.InoutPrice;
@@ -135,14 +134,6 @@
 
 
     /**
-     * 鏍规嵁鏁版嵁杩涜鎺ㄩ��
-     *
-     * @param result
-     */
-    void notifyWeb(InoutData result);
-
-
-    /**
      * 鎺ㄩ�佸ぇ灞�
      *
      * @param companyId
@@ -179,11 +170,10 @@
     /**
      * 鑾峰彇褰撳墠浠撳簱涓嬫渶鍚庝竴鏉¤褰曚俊鎭�
      *
-     * @param companyId
-     * @param depotId
+     * @param param
      * @return
      */
-    InoutData getLastRecord(String companyId, String depotId);
+    InoutData getLastRecord(InoutParam param);
 
     /**
      * 鏍规嵁鎹熸孩璁板綍锛屾坊鍔犲嚭鍏ュ簱璁板綍淇℃伅
@@ -206,15 +196,6 @@
      * @param data
      */
     void setCheckCache(InoutData data);
-
-    /**
-     * 鏍规嵁缁勭粐缂栫爜鍜屽寲楠岋缉锛よ幏鍙栧寲楠岀粨鏋滀俊鎭�
-     *
-     * @param companyId
-     * @param checkId
-     * @return
-     */
-    List<CheckItemData> getCheckCache(String companyId, String checkId);
 
     /**
      * 鑾峰彇鍑哄叆搴撴祦姘碔D搴忓彿
@@ -277,9 +258,18 @@
 
     /**
      * 鑾峰彇绮瀹氫环
+     *
      * @param param
      * @return
      */
     List<InoutPrice> getPrice(InoutCheckParam param);
 
+    /**
+     * 浠庣紦瀛樹腑鍒犻櫎
+     *
+     * @param deptId
+     * @param type
+     * @param id
+     */
+    void delFromCache(String deptId, String type, String id);
 }
diff --git a/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java b/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
index 66ea5e9..864fa2a 100644
--- a/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
+++ b/igds-inout/src/main/java/com/ld/igds/inout/service/impl/InoutServiceImpl.java
@@ -1,7 +1,6 @@
 package com.ld.igds.inout.service.impl;
 
 import com.bstek.dorado.data.entity.EntityUtils;
-import com.ld.igds.check.dto.CheckItemData;
 import com.ld.igds.common.CoreCommonService;
 import com.ld.igds.constant.BizType;
 import com.ld.igds.constant.Constant;
@@ -9,20 +8,18 @@
 import com.ld.igds.data.CommonData;
 import com.ld.igds.data.Page;
 import com.ld.igds.inout.InoutConstant;
-import com.ld.igds.inout.dto.InoutData;
-import com.ld.igds.inout.dto.InoutParam;
 import com.ld.igds.inout.dto.InoutCheckData;
 import com.ld.igds.inout.dto.InoutCheckParam;
+import com.ld.igds.inout.dto.InoutData;
+import com.ld.igds.inout.dto.InoutParam;
 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.io.constant.OrderRespEnum;
 import com.ld.igds.models.Depot;
 import com.ld.igds.models.InoutPrice;
 import com.ld.igds.util.ContextUtil;
 import com.ld.igds.util.DateUtil;
 import com.ld.igds.util.RedisUtil;
-import com.ld.igds.websocket.WebSocketPacket;
 import com.ld.igds.websocket.WebSocketServer;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -103,7 +100,7 @@
 
         inoutMapper.deleteData(param);
 
-        delInoutFromCache(param.getDeptId(), param.getType(), param.getId());
+        delFromCache(param.getDeptId(), param.getType(), param.getId());
 
         return null;
     }
@@ -115,7 +112,7 @@
         }
 
         // 缂撳瓨涓垹闄�
-        delInoutFromCache(param.getDeptId(), param.getType(), param.getId());
+        delFromCache(param.getDeptId(), param.getType(), param.getId());
 
         param.setProgress(InoutConstant.PROGRESS_RECORD);
         param.setRecordStatus(InoutConstant.RECORD_STATUS_ERROR);
@@ -285,11 +282,11 @@
     public String toComplete(InoutParam param) throws Exception {
 
         if (null == param.getCompanyId()) {
-            param.setCompanyId(ContextUtil.getCompanyId());
+            param.setCompanyId(ContextUtil.getDefaultCompanyId());
         }
 
         // 娓呴櫎缂撳瓨
-        this.delInoutFromCache(param.getDeptId(), param.getType(), param.getId());
+        this.delFromCache(param.getDeptId(), param.getType(), param.getId());
 
         inoutMapper.toComplete(param);
 
@@ -361,7 +358,7 @@
 
         if (InoutConstant.PROGRESS_RECORD.equals(data.getProgress())) {
 
-            delInoutFromCache(data.getDeptId(), data.getType(), data.getId());
+            delFromCache(data.getDeptId(), data.getType(), data.getId());
 
             setCompleteInoutCache(data.getDeptId(), data);
 
@@ -373,7 +370,7 @@
     }
 
 
-    public void delInoutFromCache(String deptId, String type, String id) {
+    public void delFromCache(String deptId, String type, String id) {
         if (StringUtils.isEmpty(deptId)) {
             return;
         }
@@ -450,22 +447,6 @@
     }
 
     @Override
-    public void notifyWeb(InoutData result) {
-        // 濡傛灉褰撳墠涓烘弧杞︾О閲嶆墽琛屾帹閫�
-        if (result.getType().equals(InoutConstant.TYPE_IN) && result.getProgress().equals(InoutConstant.PROGRESS_WEIGHT_FULL)) {
-            WebSocketPacket packet = new WebSocketPacket();
-            packet.setBizType(BizType.SCREEN_CHECK.getCode());
-            packet.setCompanyId(result.getCompanyId());
-            packet.setOrderResp(OrderRespEnum.MSG_SUCCESS.getCode());
-            packet.setData(result);
-            packet.setBizTag(InoutConstant.PROGRESS_WEIGHT_FULL);
-            log.debug("----鍚戝寲楠屽ぇ灞忔帹閫佹弧杞︾О閲嶄俊鎭� ----{}", result.getPlateNum());
-            WebSocketServer.sendByBizTag(packet);
-        }
-
-    }
-
-    @Override
     public Page<InoutData> pageUnCompleteData(InoutParam param) {
 
         if (StringUtils.isEmpty(param.getCompanyId())) {
@@ -498,10 +479,7 @@
     }
 
     @Override
-    public InoutData getLastRecord(String companyId, String depotId) {
-        InoutParam param = new InoutParam();
-        param.setCompanyId(companyId);
-        param.setDepotId(depotId);
+    public InoutData getLastRecord(InoutParam param) {
         return inoutMapper.getLastRecord(param);
     }
 
@@ -509,7 +487,7 @@
     public String addInoutDataByLossOver(InoutData data) {
 
         // 鑾峰彇涓婁竴杞︾殑娴佹按鏁版嵁
-        InoutData inoutData = this.getLastRecord(data.getCompanyId(), data.getDepotId());
+    //    InoutData inoutData = this.getLastRecord(data.getCompanyId(), data.getDepotId());
 
 //        // 璁剧疆娴佹按鐨勫簱瀛�
 //        if (InoutConstant.TYPE_IN.equals(inoutData.getType())) {
@@ -540,12 +518,6 @@
         redisUtil.set(cacheKey, data.getCheckItems(), 60 * 60 * 24 * 3);
     }
 
-    @SuppressWarnings("unchecked")
-    @Override
-    public List<CheckItemData> getCheckCache(String companyId, String checkId) {
-        String cacheKey = RedisConst.buildKey(companyId, checkId);
-        return (List<CheckItemData>) redisUtil.get(cacheKey);
-    }
 
     /**
      * 鍑哄叆搴撴祦绋婭D鍒涘缓 202001030001 202001030001
diff --git a/igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java b/igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java
index 518e455..0b3adf1 100644
--- a/igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java
+++ b/igds-inout/src/main/java/com/ld/igds/m/service/HLossOverService.java
@@ -4,6 +4,7 @@
 import java.util.HashMap;
 import java.util.Map;
 import javax.transaction.Transactional;
+
 import com.ld.igds.inout.InoutConstant;
 import com.ld.igds.inout.dto.InoutData;
 import com.ld.igds.inout.dto.InoutParam;
@@ -76,7 +77,13 @@
         data.setUpdateTime(new Date());
         data.setUpdateUser(ContextUtil.getLoginUserCName());
 
-        InoutData inoutData = inoutService.getLastRecord(ContextUtil.getCompanyId(), data.getDepotId());
+
+        InoutParam param = new InoutParam();
+        param.setCompanyId(ContextUtil.getCompanyId());
+        param.setDepotId(data.getDepotId());
+        param.setProgress(InoutConstant.PROGRESS_RECORD);
+
+        InoutData inoutData = inoutService.getLastRecord(param);
 
         if (null != inoutData && null != inoutData.getCompleteTime() &&
                 data.getSubmitTime().before(inoutData.getCompleteTime())) {
@@ -94,9 +101,9 @@
 
                 //鑾峰彇鎻愪氦鏃堕棿鏃ユ湡鐨�01:00:00鏃堕棿
                 Date curDate = DateUtil.getCurZero(data.getSubmitTime());
-                curDate = DateUtils.addHours(curDate,1);
+                curDate = DateUtils.addHours(curDate, 1);
                 //濡傛灉瀹屾垚鏃堕棿鍦╟urDate涔嬪墠锛屽垯灏嗗畬鎴愭椂闂磋涓哄綋鍓嶅ぉ鐨�01:00:00
-                if(data.getSubmitTime().before(curDate)){
+                if (data.getSubmitTime().before(curDate)) {
                     data.setSubmitTime(curDate);
                 }
 
@@ -116,45 +123,45 @@
         }
     }
 
-    private String addInoutDataByLossOver(InoutLossOver lossOver){
-    	if (null == lossOver.getSubmitTime()) {
-			lossOver.setSubmitTime(new Date());
-		}
-    	
-		InoutData data = new InoutData();
-		data.setRecordStatus(InoutConstant.RECORD_STATUS_ADD);
-		data.setProgress(InoutConstant.PROGRESS_RECORD);
-		data.setType(lossOver.getType());
-		data.setSettleWeight(lossOver.getAmount());
-		data.setDepotId(lossOver.getDepotId());
-		data.setDeptId(lossOver.getDeptId());
-		data.setCompanyId(lossOver.getCompanyId());
-		//data.setFoodVariety(lossOver.getFoodVariety());
-		data.setCheckStatus(InoutConstant.STATUS_PASS);
+    private String addInoutDataByLossOver(InoutLossOver lossOver) {
+        if (null == lossOver.getSubmitTime()) {
+            lossOver.setSubmitTime(new Date());
+        }
 
-		String loginUser = lossOver.getUpdateUser();
-		data.setRegisterUser(loginUser);
-		data.setFullWeightUser(loginUser);
-		data.setEmptyWeightUser(loginUser);
-		data.setHandleUser(loginUser);
-		data.setCompleteUser(loginUser);
-		data.setCompleteTime(lossOver.getSubmitTime());
-		data.setRegisterTime(data.getCompleteTime());
-		data.setFullWeightTime(data.getCompleteTime());
-		data.setEmptyWeightTime(data.getCompleteTime());
-		if (StringUtils.isEmpty(data.getUserId())) {
-			data.setUserId(InoutConstant.DEFAULT_ID_CARD);
-		}
-		
-		return inoutService.addInoutDataByLossOver(data);
-	}
+        InoutData data = new InoutData();
+        data.setRecordStatus(InoutConstant.RECORD_STATUS_ADD);
+        data.setProgress(InoutConstant.PROGRESS_RECORD);
+        data.setType(lossOver.getType());
+        data.setSettleWeight(lossOver.getAmount());
+        data.setDepotId(lossOver.getDepotId());
+        data.setDeptId(lossOver.getDeptId());
+        data.setCompanyId(lossOver.getCompanyId());
+        //data.setFoodVariety(lossOver.getFoodVariety());
+        data.setCheckStatus(InoutConstant.STATUS_PASS);
 
-	@Transactional(rollbackOn = Exception.class)
+        String loginUser = lossOver.getUpdateUser();
+        data.setRegisterUser(loginUser);
+        data.setFullWeightUser(loginUser);
+        data.setEmptyWeightUser(loginUser);
+        data.setHandleUser(loginUser);
+        data.setCompleteUser(loginUser);
+        data.setCompleteTime(lossOver.getSubmitTime());
+        data.setRegisterTime(data.getCompleteTime());
+        data.setFullWeightTime(data.getCompleteTime());
+        data.setEmptyWeightTime(data.getCompleteTime());
+        if (StringUtils.isEmpty(data.getUserId())) {
+            data.setUserId(InoutConstant.DEFAULT_ID_CARD);
+        }
+
+        return inoutService.addInoutDataByLossOver(data);
+    }
+
+    @Transactional(rollbackOn = Exception.class)
     public String delData(InoutLossOver data) throws Exception {
         Session session = this.getSessionFactory().openSession();
         try {
             if (null != data.getId()) {
-            	this.delInoutDataByLossOver(data);
+                this.delInoutDataByLossOver(data);
                 session.delete(data);
             }
         } catch (Exception e) {
@@ -166,19 +173,19 @@
         return null;
     }
 
-	private void delInoutDataByLossOver(InoutLossOver lossOver) {
-		InoutParam param = new InoutParam();
-		param.setCompanyId(lossOver.getCompanyId());
-		param.setId(lossOver.getId());
-		param.setProgress(InoutConstant.PROGRESS_RECORD);
-		param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
-		param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]鎵ц鍒犻櫎");
-		param.setType(lossOver.getType());
-		param.setDepotId(lossOver.getDepotId());
-		param.setWeight(lossOver.getAmount());
-		
-		
-		inoutService.delInoutDataByLossOver(param);
-	}
+    private void delInoutDataByLossOver(InoutLossOver lossOver) {
+        InoutParam param = new InoutParam();
+        param.setCompanyId(lossOver.getCompanyId());
+        param.setId(lossOver.getId());
+        param.setProgress(InoutConstant.PROGRESS_RECORD);
+        param.setRecordStatus(InoutConstant.RECORD_STATUS_DEL);
+        param.setMsg(" [" + ContextUtil.getLoginUserCName() + "]鎵ц鍒犻櫎");
+        param.setType(lossOver.getType());
+        param.setDepotId(lossOver.getDepotId());
+        param.setWeight(lossOver.getAmount());
+
+
+        inoutService.delInoutDataByLossOver(param);
+    }
 
 }
diff --git a/igds-inout/src/main/resources/mapper/InoutRecordMapper.xml b/igds-inout/src/main/resources/mapper/InoutRecordMapper.xml
index 84cec39..b240655 100644
--- a/igds-inout/src/main/resources/mapper/InoutRecordMapper.xml
+++ b/igds-inout/src/main/resources/mapper/InoutRecordMapper.xml
@@ -143,12 +143,19 @@
         <where>
             <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if>
             <if test="param.depotId != null and param.depotId != '' ">AND DEPOT_ID_ = #{param.depotId}</if>
+            <if test="param.type != null and param.type != '' ">AND TYPE_ = #{param.type}</if>
+            <if test="param.plateNum != null and param.plateNum != '' ">AND PLATE_NUM_ = #{param.plateNum}</if>
+            <if test="param.intelCard != null and param.intelCard != '' ">AND INTEL_CARD_ = #{param.intelCard}</if>
+            <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if>
+            <if test="param.userId != null and param.userId != '' ">AND USER_ID_ = #{param.userId}</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
                 COMPLETE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP}
             </if>
-            <if test="param.curStorage > 0">AND CUR_STORAGE_ > 0</if>
         </where>
-        AND PROGRESS_ = 'RECORD'
         AND RECORD_STATUS_ != 'ERROR'
         AND RECORD_STATUS_ != 'DEL'
         ORDER BY COMPLETE_TIME_ DESC
@@ -463,20 +470,8 @@
         update D_INOUT_RECORD
         set PROGRESS_ = #{param.progress},
         COMPLETE_TIME_ =#{param.completeTime},
-        <if test="param.fullWeight != null and param.fullWeight > 0">FULL_WEIGHT_ = #{param.fullWeight},</if>
-        <if test="param.fullWeightUser != null">FULL_WEIGHT_USER_ = #{param.fullWeightUser},</if>
-        <if test="param.fullWeightTime != null">FULL_WEIGHT_TIME_ = #{param.fullWeightTime},</if>
-        <if test="param.emptyWeight != null and param.fullWeight > 0">EMPTY_WEIGHT_ = #{param.emptyWeight},</if>
-        <if test="param.emptyWeightTime != null">EMPTY_WEIGHT_TIME_ = #{param.emptyWeightTime},</if>
-        <if test="param.emptyWeightUser != null">EMPTY_WEIGHT_USER_ = #{param.emptyWeightUser},</if>
-        <if test="param.netWeight != null and param.fullWeight > 0">NET_WEIGHT_ = #{param.netWeight},</if>
-        <if test="param.settleWeight != null and param.settleWeight > 0">SETTLE_WEIGHT_ = #{param.settleWeight},</if>
-        <if test="param.recordWeight != null and param.recordWeight > 0">RECORD_WEIGHT_ = #{param.recordWeight},</if>
-        <if test="param.de != null and param.de > 0">DE_SUM_ = #{param.de},</if>
-        <if test="param.depotId != null and param.depotId != ''">DEPOT_ID_ = #{param.depotId},</if>
-        <if test="param.price != null and param.price > 0">PRICE_ = #{param.price},</if>
-        <if test="param.settleMoney != null and param.settleMoney > 0">SETTLE_MONEY_ = #{param.settleMoney},</if>
-        COMPLETE_USER_ = #{param.userId}
+        COMPLETE_USER_ = #{param.userId},
+        UPDATE_TIME_ = sysdate
         where ID_ = #{param.id}
         and TYPE_ = #{param.type}
         and COMPANY_ID_ = #{param.companyId}
diff --git a/igds-web/src/main/resources/static/admin/inout/in-card-back.js b/igds-web/src/main/resources/static/admin/inout/in-card-back.js
index 16cba9e..2eca8e8 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-card-back.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-card-back.js
@@ -16,36 +16,10 @@
 	showProgress();
 });
 
-//鎺у埗娴佺▼鐜妭鏄剧ず
-function showProgress() {
-	if(!inoutProgress){
-		return;
-	}
-
-	if(inoutProgress.indexOf("REGISTER") == -1){
-		$("#progress-register").css("display", "none");
-	}
-	if(inoutProgress.indexOf("CHECK") == -1){
-		$("#progress-check").css("display", "none");
-	}
-	if(inoutProgress.indexOf("WEIGHT_FULL") == -1){
-		$("#progress-fullWeight").css("display", "none");
-	}
-	if(inoutProgress.indexOf("HANDLE") == -1){
-		$("#progress-hand").css("display", "none");
-	}
-	if(inoutProgress.indexOf("WEIGHT_EMPTY") == -1){
-		$("#progress-emptyWeight").css("display", "none");
-	}
-	if(inoutProgress.indexOf("CARD_BACK") == -1){
-		$("#progress-cardBack").css("display", "none");
-	}
-}
-
-//鏂扮殑璇诲崱鏂瑰紡
+//浣跨敤鎻掍欢璇诲彇鏅烘収鍗″彿
 function flushICCard() {
+	var index = layer.load();
 	$("#intelCard").val(null);
-	resetForm();
 	$.ajax({
 		type: "GET",
 		async: true,
@@ -55,23 +29,26 @@
 		jsonp: "callback",
 		jsonpCallback: "jsonpCallback",
 		success: function (json) {
-			//console.log(json);
+			layer.close(index);
 			var data = json.no;
-			//console.log(data);
 			if (data === "not found") {
-				layer.alert("璇烽噸鏂拌鍗★紒", {offset: ['300px', '300px']});
+				alertError("璇烽噸鏂拌鍗★紒");
 			} else {
 				$("#intelCard").val(data);
+
+				//鐩存帴鍒锋柊鏁版嵁
 				flushData();
 			}
 		},
 		error: function () {
-			layer.alert("IC鍗¤鍙栧嚭閿欙紒", {offset: ['300px', '300px']});
+			layer.close(index);
+			alertError("IC鍗¤鍙栧嚭閿欙紒");
 		}
 	});
 }
 
-// 浣跨敤鎻掍欢鑾峰彇鐪佷唤璇�
+
+//浣跨敤鎻掍欢璇诲彇韬唤璇�
 function flushIdCard() {
 	var index = layer.load();
 	$.ajax({
@@ -86,64 +63,17 @@
 			layer.close(index);
 			var data = json.content;
 			if (data === "not found") {
-				layer.alert("娌℃湁璇诲彇鍒拌韩浠借瘉淇℃伅锛岃鎵嬪姩褰曞叆锛�", {
-					offset: ['300px', '300px']
-				});
+				alertError("娌℃湁鑾峰彇鍒拌韩浠借瘉淇℃伅锛�");
 				return;
 			}
 			$("#userId").val(data.idNum);
 			flushData();
 		},
 		error: function () {
-			layer.alert("韬唤璇佽鍙栧け璐ワ紝璇锋墜鍔ㄥ綍鍏ワ紒", {
-				offset: ['300px', '300px']
-			});
 			layer.close(index);
+			alertError("韬唤璇佽鍙栧け璐ワ紒");
 		}
 	});
-}
-
-// 鎵撳嵃杩囩鍗�
-function printBill() {
-	if (!recordData) {
-		layer.alert("娌℃湁鑾峰彇鍒颁笟鍔℃暟鎹紝涓嶆敮鎸佹墦鍗帮紒");
-		return;
-	}
-
-	if(InoutProgress.CARD_BACK != recordData.progress){
-		layer.alert("褰撳墠鏁版嵁涓嶅畬鏁达紝涓嶆敮鎸佹墦鍗帮紒");
-		return;
-	}
-
-	//浠庡悗鍙拌幏鍙栨ā鐗堝苟鎵撳嵃
-	var index = layer.load();
-	$.ajax({
-		type : "POST",
-		url : "../../basic/inout-report/inout-bill-weight",
-		dataType : "json",
-		contentType : "application/json;charset=UTF-8",
-		data : JSON.stringify(recordData),
-		success : function(result) {
-			if (result.code != "0000") {
-				layer.msg(result.msg);
-			} else {
-				layer.msg("寮�濮嬫覆鏌撴墦鍗板崟鈥︹��");
-				printWeight(result.data);
-			}
-			layer.close(index);
-		},
-		error : function() {
-			layer.close(index);
-			layer.msg("鑾峰彇鎵撳嵃妯$増澶辫触锛岃鑱旂郴绠$悊鍛樻煡鐪嬪師鍥狅紒锛�");
-		}
-	});
-}
-
-// 鎵撳嵃鎶芥牱鍗�
-function showCheck() {
-	if (null == recordData) {
-		layer.alert("娌℃湁鑾峰彇鍒颁笟鍔℃暟鎹紝鏃犳硶鏌ョ湅锛�");
-	}
 }
 
 // 琛ㄥ崟娓呯┖
@@ -162,6 +92,7 @@
 	var plateNum = $("#plateNum").val();
 	var userId2 = $("#userId").val();
 	var intelCard = $("#intelCard").val();
+
 	var param = {
 		type : type,
 		progress : progress,
@@ -190,7 +121,7 @@
 		},
 		error : function() {
 			layer.close(index);
-			layer.alert("鏌ヨ澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
+			alertError("鏌ヨ澶辫触锛岃閲嶆柊灏濊瘯锛�")
 		}
 	});
 }
@@ -198,7 +129,7 @@
 // 褰撳墠瀹屾垚
 function submit() {
 	if (!recordData) {
-		layer.alert("娌℃湁鏁版嵁鍙互鎻愪氦锛侊紒锛�");
+		alertError("娌℃湁鏁版嵁鍙互鎻愪氦锛�");
 		return;
 	}
 
diff --git a/igds-web/src/main/resources/static/img/areation/default/pfc2_a.png b/igds-web/src/main/resources/static/img/areation/default/pfc2_a.png
index 3d404fa..8fa743b 100644
--- a/igds-web/src/main/resources/static/img/areation/default/pfc2_a.png
+++ b/igds-web/src/main/resources/static/img/areation/default/pfc2_a.png
Binary files differ
diff --git a/igds-web/src/main/resources/static/img/areation/default/pfc2_b.png b/igds-web/src/main/resources/static/img/areation/default/pfc2_b.png
index 3d404fa..8fa743b 100644
--- a/igds-web/src/main/resources/static/img/areation/default/pfc2_b.png
+++ b/igds-web/src/main/resources/static/img/areation/default/pfc2_b.png
Binary files differ
diff --git a/igds-web/src/main/resources/static/img/areation/default/pfc_a.png b/igds-web/src/main/resources/static/img/areation/default/pfc_a.png
index 8fa743b..3d404fa 100644
--- a/igds-web/src/main/resources/static/img/areation/default/pfc_a.png
+++ b/igds-web/src/main/resources/static/img/areation/default/pfc_a.png
Binary files differ
diff --git a/igds-web/src/main/resources/static/img/areation/default/pfc_b.png b/igds-web/src/main/resources/static/img/areation/default/pfc_b.png
index 8fa743b..3d404fa 100644
--- a/igds-web/src/main/resources/static/img/areation/default/pfc_b.png
+++ b/igds-web/src/main/resources/static/img/areation/default/pfc_b.png
Binary files differ
diff --git a/igds-web/src/main/resources/templates/admin/inout/in-card-back.html b/igds-web/src/main/resources/templates/admin/inout/in-card-back.html
index 0c7eb14..3adde1b 100644
--- a/igds-web/src/main/resources/templates/admin/inout/in-card-back.html
+++ b/igds-web/src/main/resources/templates/admin/inout/in-card-back.html
@@ -39,17 +39,9 @@
         <div class="qyzj-btnbox layui-clear">
 
             <div class="rkbk-quick fl">
-                <button class="rkbk-quick-btn layui-btn" onclick="showCheck()">
-                    <i><img th:src="@{../../static/images/icon-hyd.png}"/></i> 鏌ョ湅鍖栭獙鍗�
-                </button>
                 <button class="rkbk-quick-btn layui-btn btn-green"
                         onclick="submit()">
                     <i><img th:src="@{../../static/images/icon-ok.png}"/></i> 鏀跺崱鍑哄簱
-                </button>
-                <button class="rkbk-quick-btn layui-btn btn-violet"
-                        onclick="printBill()">
-                    <i><img th:src="@{../../static/images/icon-dayin.png}"/></i>
-                    鎵撳嵃杩囩鍗�
                 </button>
             </div>
 
@@ -188,7 +180,7 @@
                             <div class="rkbk-quick layui-text-center">
                                 <button id="button_readID" type="button"
                                         onclick="flushIdCard()"
-                                        class="rkbk-quick-btn layui-btn btn-blue">璇诲彇韬唤璇�
+                                        class="rkbk-quick-btn layui-btn btn-blue">璇昏韩浠借瘉鏌ヨ
                                 </button>
                             </div>
                             <!--rkbk-form-box2 end-->
@@ -211,33 +203,35 @@
                     <div class="rkbk-left-form rkbk-right-form">
                         <form class="layui-form" action="" id="form-data"
                               lay-filter="form-data">
-
                             <div class="layui-form-item display-none">
-                                <label class="layui-form-label">闅愯棌瀛楁-ID</label>
                                     <input type="text" name="id">
                             </div>
                             <div class="layui-form-item display-none">
-                                <label class="layui-form-label">闅愯棌瀛楁-娴佺▼鑺傜偣</label>
                                 <input type="text" name="progress">
                             </div>
                             <div class="layui-form-item display-none">
-                                <label class="layui-form-label">闅愯棌瀛楁-涓氬姟绫诲瀷</label>
                                 <input type="text" name="type">
+                            </div>
+                            <div class="layui-form-item display-none">
+                                <input type="text" name="deptId">
+                            </div>
+                            <div class="layui-form-item display-none">
+                                <input type="text" name="noticeId">
                             </div>
 
                             <div class="layui-form-item">
-                                <input type="button" value="璇诲崱" class="rkbk-r-btn fr layui-btn" onclick="flushICCard()">
+                                <input type="button" value="璇诲崱鏌ヨ" class="rkbk-r-btn fr layui-btn" onclick="flushICCard()">
                                 <label class="layui-form-label">鏅烘収鍗″彿</label>
                                 <div class="layui-input-block">
                                     <input type="text" name="intelCard" id="intelCard"
-                                           placeholder="鍏堢偣鍑昏鍗★紝鍚庢斁鍗�......" autocomplete="off"
+                                           placeholder="璇诲崱鑾峰彇" autocomplete="off"
                                            class="layui-input">
                                 </div>
 
                             </div>
                             <div class="layui-form-item">
 
-                                <input type="button" value="鏌ヨ" class="rkbk-r-btn fr layui-btn" onclick="flushData()">
+                                <input type="button" value="杞︾墝鏌ヨ" class="rkbk-r-btn fr layui-btn" onclick="flushData()">
                                 <label class="layui-form-label">杞︾墝鍙�</label>
                                 <div class="layui-input-block">
                                     <input type="text" name="plateNum" id="plateNum"
@@ -258,23 +252,27 @@
                             </div>
 
                             <div class="layui-form-item">
-                                <label class="layui-form-label">绮鍝佺</label>
+                                <label class="layui-form-label">鍑哄叆搴撶被鍨�</label>
                                 <div class="layui-input-block">
-                                    <select name="foodVariety" disabled>
-                                        <option value="">鑷姩鑾峰彇</option>
-                                        <option th:each="dic,dicSet:${listFoodVariety}"
-                                                th:value="${dic.code}" th:text="${dic.name}"></option>
+                                    <select name="type" disabled>
+                                        <option value="IN">鍏ュ簱浣滀笟</option>
+                                        <option value="OUT">鍑哄簱浣滀笟</option>
                                     </select>
                                 </div>
                             </div>
 
                             <div class="layui-form-item">
-                                <label class="layui-form-label">绮绛夌骇</label>
+                                <label class="layui-form-label">娴佺▼杩涘害</label>
                                 <div class="layui-input-block">
-                                    <select name="foodLevel" disabled>
-                                        <option value="">鑷姩鑾峰彇</option>
-                                        <option th:each="dic,dicSet:${listFoodLevel}"
-                                                th:value="${dic.code}" th:text="${dic.name}"></option>
+                                    <select name="progress" disabled>
+                                        <option value="REGISTER">鐧昏鐜妭</option>
+                                        <option value="CHECK">璐ㄦ鐜妭</option>
+                                        <option value="HANDLE">鍊间粨鐜妭</option>
+                                        <option value="WEIGHT_TAG">绉伴噸鐜妭</option>
+                                        <option value="WEIGHT_FULL">绉伴噸鐜妭</option>
+                                        <option value="WEIGHT_EMPTY">绉伴噸鐜妭</option>
+                                        <option value="CARD_BACK">绂诲簱纭</option>
+                                        <option value="RECORD">娴佺▼瀹屾垚</option>
                                     </select>
                                 </div>
                             </div>
@@ -293,6 +291,15 @@
                                            autocomplete="off" class="layui-input rkbk-search-input" disabled>
                                 </div>
                             </div>
+
+
+                            <div class="rkbk-quick layui-text-center">
+                                <button class="rkbk-quick-btn layui-btn btn-green"
+                                        onclick="submit()">
+                                    <i><img th:src="@{../../static/images/icon-ok.png}"/></i> 鏀跺崱鍑哄簱
+                                </button>
+                            </div>
+
                         </form>
                     </div>
                 </div>
@@ -322,9 +329,6 @@
     var companyId = [[${loginUser.companyId}]];
     //鍑哄叆搴撶被鍨�
     var type = [[${type}]];
-    //鍝佺
-    var listFoodVariety = [[${listFoodVariety}]];
-    var listFoodLevel = [[${listFoodLevel}]];
 </script>
 
 
@@ -332,7 +336,7 @@
 <script th:src="@{../../static/js/jquery.min.js}"></script>
 <script th:src="@{../../static/js/constant.js}"></script>
 <script th:src="@{../../static/js/igds-common.js}"></script>
-<script th:src="@{../../static/admin/inout/inout-print.js}"></script>
+<script th:src="@{../../static/admin/inout/inout-common.js}"></script>
 <script th:src="@{../../static/admin/inout/in-card-back.js}"></script>
 
 <!-- 寮瑰嚭妗嗙殑淇℃伅 -->
diff --git a/igds-web/src/main/resources/verb-conf.properties b/igds-web/src/main/resources/verb-conf.properties
index 6b6f3ac..1603509 100644
--- a/igds-web/src/main/resources/verb-conf.properties
+++ b/igds-web/src/main/resources/verb-conf.properties
@@ -134,12 +134,16 @@
 verb.mapImg.5307_001.a=default_qyc_a.png
 verb.mapImg.5307_001.b=default_qyc_b.png
 ## 5000_001
-verb.mapImg.5000_001.a=default_pfc_a.png
-verb.mapImg.5000_001.b=default_pfc_b.png
+
+verb.mapImg.5000_001.a=default_pfc2_a.png
+verb.mapImg.5000_001.b=default_pfc2_b.png
+
 verb.mapImg.5000_0137.a=default_qyc_a.png
 verb.mapImg.5000_0137.b=default_qyc_b.png
 verb.mapImg.5000_0138.a=default_qyc_a.png
 verb.mapImg.5000_0138.b=default_qyc_b.png
+
+
 ## 5322_001 广东徐闻
 verb.mapImg.5322_001.a=default_pfc_a.png
 verb.mapImg.5322_001.b=default_pfc_b.png

--
Gitblit v1.9.3