From 01107e8aadfaf1e84a971d8eeb9ab37e1c5569f3 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期五, 01 十二月 2023 09:38:56 +0800
Subject: [PATCH] feat: 部门退回/报废公用接口

---
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel.java         |  465 ++++---
 consum-base/src/main/java/com/consum/base/controller/LWhProcureModelController.java   |   60 
 consum-base/src/main/java/com/consum/base/pojo/query/LWhProcureModelQry.java          |   28 
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java  |  337 ++--
 consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel.java              |   72 
 consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java     |   68 
 consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java     |   18 
 consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java                |    2 
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped.java              |  293 +--
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods_mapper.java  |  207 +-
 consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java          |   22 
 consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java   |   38 
 consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel_mapper.java       |   26 
 consum-base/src/main/java/com/consum/base/core/WarehouseBusinessServiceBAK.java       | 1706 ++++++++++++------------
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods.java         |  235 +-
 consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser_mapper.java   |   22 
 consum-base/src/main/java/com/consum/base/service/LWhProcureModelService.java         |   49 
 consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser.java          |   22 
 consum-base/src/main/java/com/consum/base/pojo/LDeptFormScrappedParam.java            |   55 
 consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped_mapper.java       |  219 +--
 consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java |    4 
 21 files changed, 2,070 insertions(+), 1,878 deletions(-)

diff --git a/consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java b/consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java
index df5e542..0141f0d 100644
--- a/consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java
+++ b/consum-base/src/main/java/com/consum/base/controller/LWhFormScrappedController.java
@@ -23,14 +23,6 @@
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.net.URLEncoder;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.compress.utils.Lists;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.springframework.beans.BeanUtils;
@@ -39,6 +31,15 @@
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
 
 /**
  * @Description 鎶ュ簾鍗�
@@ -70,26 +71,7 @@
         CommonUtil.copyProperties(param, query);
         param = query;
         FinSysTenantUser sysInfo = this.getSysInfo();
-        int result = this.lWhFormScrappedService.add(param, 0, this.getCurrentUser(), sysInfo);
-        if (result > 0) {
-            return ResponseValue.success(1);
-        }
-        return ResponseValue.error("鏂板澶辫触锛�");
-    }
-
-    @ApiOperation(value = "鏂板鎶ュ簾鍗�", notes = "鏂板鎶ュ簾鍗�")
-    @ApiImplicitParams({
-        @ApiImplicitParam(name = "param")
-    })
-    @PostMapping("/deprAdd")
-    public ResponseValue deprAdd() {
-        LWhFormScrappedParam param = CommonUtil.getObjFromReqBody(LWhFormScrappedParam.class);
-        LWhFormScrappedParam query = new LWhFormScrappedParam();
-        CommonUtil.copyProperties(param, query);
-        param = query;
-
-        FinSysTenantUser sysInfo = this.getSysInfo();
-        int result = this.lWhFormScrappedService.add(param, 1, this.getCurrentUser(), sysInfo);
+        int result = this.lWhFormScrappedService.add(param, this.getCurrentUser(), sysInfo);
         if (result > 0) {
             return ResponseValue.success(1);
         }
diff --git a/consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java b/consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java
index fa93227..8393fb5 100644
--- a/consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java
+++ b/consum-base/src/main/java/com/consum/base/controller/LWhHomeStatisticsController.java
@@ -4,6 +4,7 @@
 import com.consum.base.BaseController;
 import com.consum.base.service.LWhGoodsService;
 import com.consum.model.po.FinSysTenantUser;
+import com.walker.infrastructure.utils.CollectionUtils;
 import com.walker.web.ResponseValue;
 import io.swagger.annotations.Api;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -40,6 +41,9 @@
         FinSysTenantUser sysInfo = this.getSysInfo();
         String tenantId = sysInfo.getTenantId();
         List<Map<String, Object>> goodsNumPrice = lWhGoodsService.getGoodsNumPrice(Convert.toLong(tenantId, 0l));
+        if (CollectionUtils.isEmpty(goodsNumPrice)){
+            return ResponseValue.success();
+        }
         return ResponseValue.success(goodsNumPrice.get(0));
     }
 
diff --git a/consum-base/src/main/java/com/consum/base/controller/LWhProcureModelController.java b/consum-base/src/main/java/com/consum/base/controller/LWhProcureModelController.java
new file mode 100644
index 0000000..d15bf4c
--- /dev/null
+++ b/consum-base/src/main/java/com/consum/base/controller/LWhProcureModelController.java
@@ -0,0 +1,60 @@
+package com.consum.base.controller;
+
+
+import com.consum.base.BaseController;
+import com.consum.base.core.utils.CommonUtil;
+import com.consum.base.pojo.query.LWhProcureModelQry;
+import com.consum.base.service.LWhProcureModelService;
+import com.walker.infrastructure.utils.CollectionUtils;
+import com.walker.web.ResponseValue;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@RestController
+@RequestMapping("/pc/warehouse/procureModel")
+public class LWhProcureModelController extends BaseController {
+    @Resource
+    private LWhProcureModelService lWhProcureModelService;
+
+    @GetMapping("getFfOrderByGoodsIdAndDept")
+    /**
+     * 鏍规嵁閮ㄩ棬銆佺墿鍝佹煡璇㈣皟鎷ㄥ崟
+     */
+    public ResponseValue getFfOrderByGoodsIdAndDept() {
+        LWhProcureModelQry param = CommonUtil.getObjFromReq(LWhProcureModelQry.class);
+        LWhProcureModelQry param2 = new LWhProcureModelQry();
+        CommonUtil.copyProperties(param, param2);
+        param = param2;
+        List<Map<String, Object>> ffOrderByGoodsIdAndDept = lWhProcureModelService.getFfOrderByGoodsIdAndDept(param.getBaseGoodsTemplateId(), param.getDepartmentId());
+        if (CollectionUtils.isEmpty(ffOrderByGoodsIdAndDept)) {
+            return ResponseValue.success();
+        }
+        return ResponseValue.success(ffOrderByGoodsIdAndDept);
+    }
+
+    @GetMapping("getGoodsUseInfoByFfOrderAndGoodId")
+    /**
+     * 鏍规嵁鍒嗗彂鍗昳d銆佺墿鍝両D鏌ヨ鍦ㄧ敤鏁伴噺 浠ュ強浣跨敤浜轰俊鎭�
+     */
+    public ResponseValue getGoodsUseInfoByFfOrderAndGoodId() {
+        LWhProcureModelQry param = CommonUtil.getObjFromReq(LWhProcureModelQry.class);
+        LWhProcureModelQry param2 = new LWhProcureModelQry();
+        CommonUtil.copyProperties(param, param2);
+        param = param2;
+        List<Map<String, Object>> ffOrderByGoodsIdAndDept = lWhProcureModelService.getGoodsUseInfoByFfOrderAndGoodId(param.getBaseGoodsTemplateId(), param.getTransBusinessId());
+        if (CollectionUtils.isEmpty(ffOrderByGoodsIdAndDept)) {
+            return ResponseValue.success();
+        }
+        // 鎸夊瀷鍙峰垎缁勮繑鍥�
+        return ResponseValue.success(ffOrderByGoodsIdAndDept.stream()
+                .collect(Collectors.groupingBy(map -> map.get("baseGoodsModelsId"))));
+    }
+
+
+}
diff --git a/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java b/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
index 621d496..3d2b8f5 100644
--- a/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
+++ b/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessService.java
@@ -761,7 +761,7 @@
                 "	AND A.WAREHOUSE_ID = B.WAREHOUSE_ID \n" +
                 "	AND A.WAREHOUSE_ID = :WAREHOUSE_ID";
 
-        List<Map> list = select(sql,new SqlParameter("DEP_FORM_SCRAPPED_ID",scrapped.getId()).add("WAREHOUSE_ID",scrapped.getWarehouseId()));
+        List<Map> list = select(sql,new SqlParameter("DEP_FORM_SCRAPPED_ID",scrapped.getId()).add("WAREHOUSE_ID",scrapped.getOutWarehouseId()));
         for (Map _map : list) {
             SuperMap map = new SuperMap(_map);
 
@@ -792,8 +792,8 @@
                 his.setWhGoodsId(result.getLendingModel().getWhGoodsId());
                 his.setInitialCount(result.getInitial_count());
                 his.setEndCount(result.getEnd_count());
-                his.setWarehouseId(scrapped.getWarehouseId());
-                his.setWarehouseName(scrapped.getWarehouseName());
+                his.setWarehouseId(scrapped.getOutWarehouseId());
+                his.setWarehouseName(scrapped.getOutWarehouseName());
                 his.setDepartmentId(scrapped.getDepartmentId());
                 his.setDepartmentName(scrapped.getDepartmentName());
                 insert(his);
@@ -804,14 +804,14 @@
                 model.setDepFormScrappedGoodsId(map.getLong("DEP_FORM_SCRAPPED_GOODS_ID"));
                 model.setScrappedCode(map.getString("SCRAPPED_CODE"));
                 model.setScrappedName(map.getString("SCRAPPED_NAME"));
-                model.setUsingGoodsHisId(his.getId());
-                model.setDepFormScrappedId(scrapped.getId());
-                model.setWhGoodsId(his.getWhGoodsId());
-                model.setScrappedCounts(his.getThisCount());
-                model.setInitCount(his.getInitialCount());
-                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
-                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
-                model.setDepFormLendingId(his.getDepFormLendingId());
+//                model.setUsingGoodsHisId(his.getId());
+//                model.setDepFormScrappedId(scrapped.getId());
+//                model.setWhGoodsId(his.getWhGoodsId());
+//                model.setScrappedCounts(his.getThisCount());
+//                model.setInitCount(his.getInitialCount());
+//                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
+//                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
+//                model.setDepFormLendingId(his.getDepFormLendingId());
                 insert(model);
             }
         }
diff --git a/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessServiceBAK.java b/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessServiceBAK.java
index 3ace85a..1660943 100644
--- a/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessServiceBAK.java
+++ b/consum-base/src/main/java/com/consum/base/core/WarehouseBusinessServiceBAK.java
@@ -1,853 +1,853 @@
-package com.consum.base.core;
-
-import com.consum.base.core.param.BaseWarehouseParam;
-import com.consum.base.core.param.DepBackWarehouseParam;
-import com.consum.base.core.utils.SqlParameter;
-import com.consum.base.core.utils.SuperMap;
-import com.consum.base.core.utils.DateUtil;
-import com.consum.model.po.*;
-import com.walker.infrastructure.utils.NumberGenerator;
-import com.walker.jdbc.service.BaseServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 杩涘嚭搴� 涓氬姟澶� 绫�
- */
-@Service
-public class WarehouseBusinessServiceBAK extends BaseServiceImpl {
-
-
-    @Autowired
-    private WarehouseCoreService coreService;
-
-    /**
-     * 鎵ц閲囪喘鍏ュ簱
-     * 绗竴姝ワ細閫氳繃閲囪喘鍗曘�怶H_FORM_PROCURE銆戞煡璇㈤噰璐崟鍨嬪彿銆怶H_FORM_PROCURE_MODEL銆戞暟鎹�
-     * 绗簩姝ワ細缁勭粐CheckWarehouseParam锛岃皟鐢╓arehouseCoreService.unifyCheck()鎵ц鍏ュ簱
-     * 绗笁姝ワ細鏇存柊閲囪喘鍗曞瀷鍙枫�怶H_FORM_PROCURE_MODEL銆戝簱瀛樼墿鍝佺紪鍙峰瓧娈靛強涓昏〃WH_FORM_PROCURE鐘舵�佷俊鎭�
-     * 绗洓姝ワ細鏇存柊 杩涘嚭搴撴祦姘达紙浠撳簱锛夈�怶H_GOODS_DETAILS銆�
-     * @param procure
-     */
-    public void doProcure(WhFormProcure procure){
-
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_PROCURE_MODEL A \n" +
-                "WHERE\n" +
-                "	A.WH_FORM_PROCURE_ID = :PROCURE_ID";
-
-        List<WhFormProcureModel>  modelList = this.select(sql,new SqlParameter().put("PROCURE_ID",procure.getId()),new WhFormProcureModel());
-
-        for (WhFormProcureModel model : modelList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(true);
-            param.setWarehouseId(procure.getId());
-            param.setCount(model.getCounts());
-            param.setFirstInputCode(model.getId().toString());
-            param.setFirst_input_type(1);
-            param.setModelId(model.getBaseGoodsModelsId());
-            CheckWarehouseResult result =  coreService.unifyCheck(param).get(0);
-
-
-            WhGoodsDetails details = new WhGoodsDetails();
-            details.setId(result.getWhGoods().getFirstInputHisId());
-            details.setBusinessFormId(procure.getId());
-            details.setBusinessFormCode(procure.getBusinessFormCode());
-            details.setBusinessFormName(procure.getWarehouseName() + "閲囪喘鍏ュ簱鍗�:" + details.getBusinessFormCode());
-            details.setInitialCount(result.getInitial_count());
-            details.setThisType(1);
-            details.setEndCount(result.getEnd_count());
-            details.setWarehouseId(param.getWarehouseId());
-            details.setWarehouseName(procure.getWarehouseName());
-            details.setClassification(1);
-            details.setOperatorId(procure.getOperatorId2());
-            details.setOperatorName(procure.getOperatorName2());
-            details.setDealTime(procure.getIncomeTime());
-            details.setWhGoodsId(result.getWhGoods().getId());
-
-            this.insert(details);
-
-
-            model.setInWhGoodsDetailsId(details.getId());
-            update(model);
-
-            procure.setStates(2);
-            update(procure);
-        }
-    }
-    public void doOutPut(WhFormOutput output){
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_OUTPUT_GOODS A \n" +
-                "WHERE\n" +
-                "	A.WH_FORM_OUTPUT_ID = :OUTPUT_ID";
-
-        List<WhFormOutputGoods>  goodsList = this.select(sql,new SqlParameter()
-                .put("OUTPUT_ID",output.getId()),new WhFormOutputGoods());
-
-        for (WhFormOutputGoods goods : goodsList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(false);
-            param.setWarehouseId(output.getWarehouseId());
-            param.setModelId(goods.getBaseGoodsModelsId());
-            param.setCount(goods.getCounts());
-
-            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
-            for (CheckWarehouseResult result : results){
-                WhFormOutputModel model = new WhFormOutputModel();
-                model.setId(NumberGenerator.getLongSequenceNumber());
-                model.setCounts(result.getInitial_count() - result.getEnd_count());
-                model.setOutWhGoodsDetailsId(result.getWhGoods().getId());
-                model.setWhGoodsId(result.getWhGoods().getId());
-                model.setWhFormOutputId(output.getId());
-                model.setWhFormOutputGoodsId(goods.getId());
-                insert(model);
-
-                WhGoodsDetails details = new WhGoodsDetails();
-                details.setBusinessFormId(output.getId());
-                details.setBusinessFormCode(output.getBusinessFormCode());
-                details.setBusinessFormName("鍑哄簱鍗曪細" + output.getBusinessFormCode());
-                details.setInitialCount(result.getInitial_count());
-                details.setThisType(2);
-                details.setThisCount(result.getInitial_count() - result.getEnd_count());
-                details.setEndCount(result.getEnd_count());
-                details.setWarehouseId(result.getWhGoods().getWarehouseId());
-                details.setWarehouseName(result.getWhGoods().getWarehouseName());
-                details.setClassification(3);
-                details.setOperatorId(output.getOperatorId());
-                details.setOperatorName(output.getOperatorName());
-                details.setDealTime(output.getDealTime());
-                details.setWhGoodsId(result.getWhGoods().getId());
-                this.insert(details);
-            }
-        }
-    }
-
-
-    /**
-     * 鎵ц璋冩嫧鍑哄簱鎿嶄綔
-     * 1. 閫氳繃璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戙�佽皟鎷ㄥ崟鐗╁搧銆怶H_FORM_TRANSFER_GOODS銆戠粍缁嘋heckWarehouseParam
-     * 2. 璋冪敤璋冪敤WarehouseCoreService.unifyCheck()鎵ц鍑哄簱
-     * 3. 鏇存柊杩涘嚭搴撴祦姘达紙浠撳簱锛夈�怶H_GOODS_DETAILS銆�
-     * 4. 鏇存柊璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戜负寰呮帴鏀讹紝鏇存柊璋冩嫧鍗曠墿鍝併�怶H_FORM_TRANSFER_MODEL銆戝嚭搴撴祦姘碔D
-     * @param transfer
-     */
-    public void doTransferOutPut(WhFormTransfer transfer){
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_TRANSFER_GOODS A \n" +
-                "WHERE\n" +
-                "	A.WH_FORM_TRANSFER_ID = :TRANSFER_ID";
-
-        List<WhFormTransferGoods>  goodsList = this.select(sql,new SqlParameter()
-                .put("TRANSFER_ID",transfer.getId()),new WhFormTransferGoods());
-
-        for (WhFormTransferGoods goods : goodsList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(false);
-            param.setWarehouseId(transfer.getOutWarehouseId());
-            param.setCount(goods.getCounts());
-            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
-            for (CheckWarehouseResult result : results){
-                WhFormTransferModel model = new WhFormTransferModel();
-                model.setId(NumberGenerator.getLongSequenceNumber());
-                model.setWhFormTransferId(transfer.getId());
-                model.setWorehouseCount(result.getInitial_count());
-                model.setCounts(result.getInitial_count() - result.getEnd_count());
-                model.setOutWhGoodsDetailsId(result.getWhGoods().getId());
-                model.setWhFormTransferGoodsId(goods.getId());
-                insert(model);
-
-                WhGoodsDetails details = new WhGoodsDetails();
-                details.setBusinessFormId(transfer.getId());
-                details.setBusinessFormCode(transfer.getBusinessFormCode());
-                details.setBusinessFormName("璋冩嫧鍑哄簱鍗曪細" + transfer.getBusinessFormCode());
-                details.setInitialCount(result.getInitial_count());
-                details.setThisType(2);
-                details.setThisCount(result.getInitial_count() - result.getEnd_count());
-                details.setEndCount(result.getEnd_count());
-                details.setWarehouseId(result.getWhGoods().getWarehouseId());
-                details.setWarehouseName(result.getWhGoods().getWarehouseName());
-                details.setClassification(5);
-                details.setOperatorId(transfer.getOperatorId());
-                details.setOperatorName(transfer.getOperatorName());
-                details.setDealTime(transfer.getOutputTime());
-                details.setWhGoodsId(result.getWhGoods().getId());
-                this.insert(details);
-            }
-        }
-    }
-
-    /**
-     * 鎵ц璋冩嫧鍏ュ簱鎿嶄綔
-     * 1. 閫氳繃璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戙�佽皟鎷ㄥ崟鐗╁搧銆怶H_FORM_TRANSFER_GOODS銆戠粍缁嘋heckWarehouseParam
-     * 2. 璋冪敤璋冪敤WarehouseCoreService.unifyCheck()鎵ц鍑哄簱
-     * 3. 鏇存柊杩涘嚭搴撴祦姘达紙浠撳簱锛夈�怶H_GOODS_DETAILS銆�
-     * 4. 鏇存柊璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戜负宸插叆搴擄紝锛屾洿鏂拌皟鎷ㄥ崟鐗╁搧銆怶H_FORM_TRANSFER_MODEL銆戝叆搴撴祦姘碔D
-     * @param transfer
-     */
-    public void doTransferInPut(WhFormTransfer transfer){
-
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_TRANSFER_MODEL A \n" +
-                "WHERE\n" +
-                "	A.WH_FORM_TRANSFER_ID = :TRANSFER_ID";
-
-        List<WhFormTransferModel>  modelsList = this.select(sql,new SqlParameter()
-                                    .put("TRANSFER_ID",transfer.getId()),new WhFormTransferModel());
-
-        for (WhFormTransferModel model : modelsList) {
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(true);
-            param.setWarehouseId(transfer.getInWarehouseId());
-            param.setCount(model.getCounts());
-            param.setWh_goods_id(model.getWhGoodsId());
-            CheckWarehouseResult result = coreService.unifyCheck(param).get(0);
-
-            WhGoodsDetails details = new WhGoodsDetails();
-            details.setBusinessFormId(transfer.getId());
-            details.setBusinessFormCode(transfer.getBusinessFormCode());
-            details.setBusinessFormName("璋冩嫧鍏ュ簱鍗曪細" + transfer.getBusinessFormCode());
-            details.setInitialCount(result.getInitial_count());
-            details.setThisType(1);
-            details.setThisCount(result.getEnd_count()-result.getInitial_count());
-            details.setEndCount(result.getEnd_count());
-            details.setWarehouseId(result.getWhGoods().getWarehouseId());
-            details.setWarehouseName(result.getWhGoods().getWarehouseName());
-            details.setClassification(4);
-            details.setOperatorId(transfer.getOperatorId2());
-            details.setOperatorName(transfer.getOperatorName2());
-            details.setDealTime(transfer.getIninputTime());
-            details.setWhGoodsId(result.getWhGoods().getId());
-            this.insert(details);
-
-            model.setInWhGoodsDetailsId(details.getId());
-            update(model);
-        }
-    }
-
-    /**
-     * 鎶ュ簾鍗�
-     * @param scrapped
-     */
-    public void doScrapped(WhFormScrapped scrapped){
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_SCRAPPED_GOODS A \n" +
-                "WHERE\n" +
-                "	A.DEP_FORM_SCRAPPED_ID = :SCRAPPED_ID";
-
-        List<WhFormScrappedGoods>  goodsList = this.select(sql,new SqlParameter()
-                .put("SCRAPPED_ID",scrapped.getId()),new WhFormScrappedGoods());
-
-        for (WhFormScrappedGoods goods : goodsList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(false);
-            param.setWarehouseId(scrapped.getWarehouseId());
-            param.setCount(goods.getCounts());
-            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
-            for (CheckWarehouseResult result : results){
-
-
-                WhGoodsDetails details = new WhGoodsDetails();
-                details.setBusinessFormId(scrapped.getId());
-                details.setBusinessFormCode(scrapped.getBusinessFormCode());
-                details.setBusinessFormName("鎶ュ簾鍗曪細" + scrapped.getBusinessFormCode());
-                details.setInitialCount(result.getInitial_count());
-                details.setThisType(2);
-                details.setThisCount(result.getInitial_count() - result.getEnd_count());
-                details.setEndCount(result.getEnd_count());
-                details.setWarehouseId(result.getWhGoods().getWarehouseId());
-                details.setWarehouseName(result.getWhGoods().getWarehouseName());
-                details.setClassification(10);
-                details.setOperatorId(scrapped.getOperatorId());
-                details.setOperatorName(scrapped.getOperatorName());
-                details.setDealTime(scrapped.getDealTime());
-                details.setWhGoodsId(result.getWhGoods().getId());
-                this.insert(details);
-
-
-                WhFormScrappedModel model = new WhFormScrappedModel();
-                model.setId(NumberGenerator.getLongSequenceNumber());
-                model.setCounts(result.getWhGoods().getWhCount());
-                model.setScrappedCode(goods.getScrappedCode());
-                model.setScrappedName(goods.getScrappedName());
-                model.setDepGoodsDetailsId(details.getId());
-                model.setDepFormScrappedId(scrapped.getId());
-                model.setWhGoodsId(result.getWhGoods().getId());
-                model.setWhFormScrappedGoodsId(goods.getId());
-                insert(model);
-            }
-        }
-    }
-
-    /**
-     * 鍒涘缓鐩樼偣浠诲姟锛屽垱寤虹洏鐐逛换鍔℃椂锛屾牴鎹綋鏃舵椂闂翠細灏嗗簱瀛樻暟鎹喕缁撲竴浠芥斁鍏ュ緟鐩樼偣鍗曘��
-     * 1.浠庡簱瀛樼墿鍝併�怶H_GOODS銆戜腑鎸夌収浠撳簱灏嗘暟鎹斁鍏ョ洏鐐瑰崟鐗╁搧銆怶H_FORM_INVENTORY_GOODS銆戯紝涓昏鏄�
-     * 鏈熷垵鏁伴噺INIT_COUNTS锛屽拰 搴撳瓨鐗╁搧缂栧彿WH_GOODS_ID瀛楁
-     * @param inventory
-     */
-    public void createInventoryForm(WhFormInventory inventory){
-        String sql =
-                "SELECT\n" +
-                        "	b.BASE_GOODS_TEMPLATE_ID,\n" +
-                        "	b.GOODS_TEMPLATE_NAME,\n" +
-                        "	SUM( b.WH_COUNT ) AS WH_COUNT,\n" +
-                        "	b.BASE_GOODS_MODELS_ID,\n" +
-                        "	b.BASE_GOODS_MODELS_NAME,\n" +
-                        "	b.UNIT \n" +
-                        "FROM\n" +
-                        "	(\n" +
-                        "	SELECT\n" +
-                        "		ID \n" +
-                        "	FROM\n" +
-                        "		BASE_GOODS_MODELS m \n" +
-                        "	WHERE\n" +
-                        "		STATES != 3 \n" +
-                        "		AND EXISTS ( SELECT 1 FROM BASE_GOODS_TEMPLATE t WHERE t.ID = m.GOODS_TEMPLATES_ID AND t.STATES != 3 ) \n" +
-                        "	) a\n" +
-                        "	LEFT JOIN wh_goods b ON a.ID = b.BASE_GOODS_MODELS_ID \n" +
-                        "WHERE\n" +
-                        "	b.STATES = 1 \n" +
-                        "	AND b.WAREHOUSE_ID =:WAREHOUSE_ID \n" +
-                        "GROUP BY\n" +
-                        "	b.BASE_GOODS_TEMPLATE_ID,\n" +
-                        "	b.GOODS_TEMPLATE_NAME,\n" +
-                        "	b.BASE_GOODS_MODELS_ID,\n" +
-                        "	b.BASE_GOODS_MODELS_NAME";
-
-        List<WhGoods> goodsList = select(sql,new SqlParameter().add("WAREHOUSE_ID",inventory.getWarehouseId()));
-        List<WhFormInventoryGoods> list = new ArrayList<>();
-        for (WhGoods goods : goodsList) {
-            WhFormInventoryGoods inventoryGoods = new WhFormInventoryGoods();
-            inventoryGoods.setId(NumberGenerator.getLongSequenceNumber());
-            inventoryGoods.setWhFormInventoryId(inventory.getId());
-            inventoryGoods.setBaseGoodsTemplateId(goods.getBaseGoodsTemplateId());
-            inventoryGoods.setGoodsTemplateName(goods.getGoodsTemplateName());
-            inventoryGoods.setUnit(goods.getUnit());
-            inventoryGoods.setBaseGoodsModelsId(goods.getBaseGoodsModelsId());
-            inventoryGoods.setBaseGoodsModelsName(goods.getBaseGoodsModelsName());
-            inventoryGoods.setInitCounts(goods.getWhCount());
-            inventoryGoods.setInitCounts(null);
-            inventoryGoods.setErrorCounts(null);
-            inventoryGoods.setInventoryResult(1);
-            list.add(inventoryGoods);
-        }
-        insertBatch(list);
-
-    }
-
-    /**
-     * 鐩樼偣鍑哄簱
-     * @param inventory
-     */
-    public void doInventoryOutput(WhFormInventory inventory){
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_INVENTORY_GOODS A \n" +
-                "WHERE\n" +
-                "	A.WH_FORM_INVENTORY_ID = :INVENTORY_ID \n" +
-                "  AND A.INVENTORY_RESULT =3 ";
-
-        List<WhFormInventoryGoods>  goodsList = this.select(sql,new SqlParameter()
-                .put("INVENTORY_ID",inventory.getId()),new WhFormInventoryGoods());
-
-        for (WhFormInventoryGoods goods : goodsList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(false);
-            param.setWarehouseId(inventory.getWarehouseId());
-            param.setCount(goods.getErrorCounts());
-            param.setModelId(goods.getBaseGoodsModelsId());
-            param.setOutput_type(3);
-            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
-            for (CheckWarehouseResult result : results){
-
-                WhGoodsDetails details = new WhGoodsDetails();
-                details.setBusinessFormId(inventory.getId());
-                details.setBusinessFormCode(inventory.getBusinessFormCode());
-                details.setBusinessFormName("鐩樼偣鍑哄崟锛�" + inventory.getBusinessFormCode());
-
-                details.setInitialCount(result.getInitial_count());
-                details.setThisType(2);
-                details.setThisCount(result.getInitial_count() - result.getEnd_count());
-                details.setEndCount(result.getEnd_count());
-                details.setWarehouseId(result.getWhGoods().getWarehouseId());
-                details.setWarehouseName(result.getWhGoods().getWarehouseName());
-                details.setClassification(9);
-                details.setOperatorId(inventory.getOperatorId());
-                details.setOperatorName(inventory.getOperatorName());
-                details.setDealTime(inventory.getStopTime());
-                details.setWhGoodsId(result.getWhGoods().getId());
-                this.insert(details);
-
-
-                WhFormInventoryModel model = new WhFormInventoryModel();
-                model.setId(NumberGenerator.getLongSequenceNumber());
-                model.setCounts(result.getWhGoods().getWhCount());
-                model.setWhFormInventoryId(inventory.getId());
-                model.setInventoryResult(3);
-                model.setWhGoodsDetailsId(details.getId());
-                model.setWhFormInventoryGoodsId(goods.getId());
-                model.setWhGoodsId(result.getWhGoods().getId());
-                insert(model);
-            }
-        }
-    }
-
-    /**
-     * 鐩樼偣鍏ュ簱
-     * @param inventory
-     */
-    public void doInventoryInput(WhFormInventory inventory){
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	WH_FORM_INVENTORY_GOODS A \n" +
-                "WHERE\n" +
-                "	A.WH_FORM_INVENTORY_ID = :INVENTORY_ID \n" +
-                "  AND A.INVENTORY_RESULT =2 ";
-
-        List<WhFormInventoryGoods>  goodsList = this.select(sql,new SqlParameter()
-                .put("INVENTORY_ID",inventory.getId()),new WhFormInventoryGoods());
-
-        for (WhFormInventoryGoods goods : goodsList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(true);
-            param.setWarehouseId(inventory.getWarehouseId());
-            param.setCount(goods.getErrorCounts());
-            param.setModelId(goods.getBaseGoodsModelsId());
-            param.setFirst_input_type(3);
-            CheckWarehouseResult result =  coreService.unifyCheck(param).get(0);
-
-            WhGoodsDetails details = new WhGoodsDetails();
-            details.setBusinessFormId(inventory.getId());
-            details.setBusinessFormCode(inventory.getBusinessFormCode());
-            details.setBusinessFormName("鐩樼偣鍏ュ簱鍗曪細" + inventory.getBusinessFormCode());
-
-            details.setInitialCount(result.getInitial_count());
-            details.setThisType(1);
-            details.setThisCount(result.getEnd_count()-result.getInitial_count());
-            details.setEndCount(result.getEnd_count());
-            details.setWarehouseId(result.getWhGoods().getWarehouseId());
-            details.setWarehouseName(result.getWhGoods().getWarehouseName());
-            details.setClassification(8);
-            details.setOperatorId(inventory.getOperatorId());
-            details.setOperatorName(inventory.getOperatorName());
-            details.setDealTime(inventory.getStopTime());
-            details.setWhGoodsId(result.getWhGoods().getId());
-            this.insert(details);
-
-
-            WhFormInventoryModel model = new WhFormInventoryModel();
-            model.setId(NumberGenerator.getLongSequenceNumber());
-            model.setCounts(result.getWhGoods().getWhCount());
-            model.setWhFormInventoryId(inventory.getId());
-            model.setInventoryResult(3);
-            model.setWhGoodsDetailsId(details.getId());
-            model.setWhFormInventoryGoodsId(goods.getId());
-            model.setWhGoodsId(result.getWhGoods().getId());
-            insert(model);
-        }
-    }
-
-    /**
-     * 缁熶竴澶勭悊搴撳瓨棰勮锛堝畾鏃朵换鍔¤皟鐢ㄦ湇鍔★級
-     * 璁″垝锛氭瘡澶╀腑鍗�13锛�00銆佹櫄涓�1:00鎵ц涓ゆ
-     */
-    public void insertWarning(){
-
-        String sql = "SELECT\n" +
-                "	SUM(b.WH_COUNT) AS WH_COUNT,\n" +
-                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
-                "	b.GOODS_TEMPLATE_NAME,\n" +
-                "   b.WAREHOUSE_ID,\n" +
-                "	a.UPPER_LIMIT,\n" +
-                "	a.LOWER_LIMIT \n" +
-                "FROM\n" +
-                "	WH_WARNING_CONFIG a\n" +
-                "	LEFT JOIN wh_goods b ON a.BASE_GOODS_TEMPLATE_ID = b.BASE_GOODS_TEMPLATE_ID \n" +
-                "WHERE\n" +
-                "	a.BASE_WAREHOUSE_ID = b.WAREHOUSE_ID \n" +
-                "	AND b.STATES = 1 \n" +
-                "	AND a.GOODS_TYPE=1\n" +
-                " 	AND  ( a.UPPER_LIMIT <= WH_COUNT OR a.LOWER_LIMIT >= WH_COUNT ) \n" +
-                "GROUP BY\n" +
-                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
-                "	b.GOODS_TEMPLATE_NAME,\n" +
-                "   b.WAREHOUSE_ID,\n" +
-                "	a.UPPER_LIMIT,\n" +
-                "	a.LOWER_LIMIT";
-
-        List<Map> goodslist = select(sql,new SqlParameter());
-
-        sql = "SELECT\n" +
-                "	SUM(b.WH_COUNT) AS WH_COUNT,\n" +
-                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
-                "	b.GOODS_TEMPLATE_NAME,\n" +
-                "	b.BASE_GOODS_MODELS_ID,\n" +
-                "	b.BASE_GOODS_MODELS_NAME,\n" +
-                "   b.WAREHOUSE_ID,\n" +
-                "	a.UPPER_LIMIT,\n" +
-                "	a.LOWER_LIMIT \n" +
-                "FROM\n" +
-                "	WH_WARNING_CONFIG a\n" +
-                "	LEFT JOIN wh_goods b ON a.BASE_GOODS_MODELS_ID = b.BASE_GOODS_MODELS_ID \n" +
-                "WHERE\n" +
-                "	a.BASE_WAREHOUSE_ID = b.WAREHOUSE_ID \n" +
-                "	AND b.STATES = 1 \n" +
-                "	AND a.GOODS_TYPE=2\n" +
-                " 	AND  ( a.UPPER_LIMIT <= WH_COUNT OR a.LOWER_LIMIT >= WH_COUNT ) \n" +
-                "GROUP BY\n" +
-                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
-                "	b.GOODS_TEMPLATE_NAME,\n" +
-                "	b.BASE_GOODS_MODELS_ID,\n" +
-                "	b.BASE_GOODS_MODELS_NAME,\n" +
-                "   b.WAREHOUSE_ID,\n" +
-                "	a.UPPER_LIMIT,\n" +
-                "	a.LOWER_LIMIT";
-
-        List<Map> modeslist = select(sql,new SqlParameter());
-
-        List<Map> list = new ArrayList<>();
-        list.addAll(goodslist);
-        list.addAll(modeslist);
-
-        List<WhWarning> warningList = new ArrayList<>();
-        for (Map map : list) {
-            SuperMap superMap = new SuperMap(map);
-            BaseWarehouse warehouse = get(new BaseWarehouse(),"ID=?",new Object[]{superMap.get("WAREHOUSE_ID")});
-
-            WhWarning warning = new WhWarning();
-            warning.setId(NumberGenerator.getLongSequenceNumber());
-            warning.setBaseWarehouseId(warehouse.getId());
-            warning.setBaseWarehouseName(warehouse.getWarehouseName());
-            warning.setBaseGoodsTemplateId(superMap.getLong("BASE_GOODS_TEMPLATE_ID"));
-            warning.setBaseGoodsTemplateName(superMap.getString("GOODS_TEMPLATE_NAME"));
-            if (superMap.getString("BASE_GOODS_MODELS_ID") == null){
-                warning.setGoodsType(1);
-            } else {
-                warning.setBaseGoodsModelsId(superMap.getLong("BASE_GOODS_MODELS_ID"));
-                warning.setBaseGoodsModelsName(superMap.getString("BASE_GOODS_MODELS_NAME"));
-                warning.setGoodsType(2);
-            }
-
-            int whCount = superMap.getInteger("WH_COUNT");
-            int upCount = superMap.getInteger("UPPER_LIMIT");
-            int lowCount = superMap.getInteger("LOWER_LIMIT");
-
-            if (whCount >= upCount){
-                warning.setWarningType(1);
-            }
-            if (whCount<=lowCount){
-                warning.setWarningType(2);
-            }
-
-            warning.setUpperLimit(upCount);
-            warning.setLowerLimit(lowCount);
-            warning.setWarehouseCount(whCount);
-            warning.setStates(1);
-            warning.setWarningTime(DateUtil.getCurrentDateFor14());
-            warning.setAgencyId(warehouse.getAgencyId());
-            warning.setAgencyName(warehouse.getAgencyName());
-
-            warningList.add(warning);
-        }
-
-        insertBatch(warningList);
-    }
-
-    public void doDepBack(String depFormBackId){
-
-        DepFormBack back = get(new DepFormBack(),"ID=?",new Object[]{depFormBackId});
-
-        String sql = "SELECT\n" +
-                "	B.*,\n" +
-                "	A.BACK_COUNTS, \n" +
-                "	A.ID AS DEP_FORM_BACK_GOODS_ID \n" +
-                "FROM\n" +
-                "	DEP_FORM_BACK_GOODS A\n" +
-                "	LEFT JOIN DEP_FORM_LENDING_GOODS B ON A.DEP_FORM_LENDING_GOODS_ID = B.ID \n" +
-                "WHERE\n" +
-                "	A.DEP_FORM_BACK_ID = :DEP_FORM_BACK_ID \n" +
-                "	AND A.WAREHOUSE_ID = B.WAREHOUSE_ID \n" +
-                "	AND A.WAREHOUSE_ID = :WAREHOUSE_ID";
-
-        List<Map> list = select(sql,new SqlParameter("DEP_FORM_BACK_ID",back.getId()).add("WAREHOUSE_ID",back.getWarehouseId()));
-
-        for (Map myMap : list) {
-            SuperMap map = new SuperMap(myMap);
-
-            CheckUsingParam param = new CheckUsingParam();
-            param.setIsCheckIn(false);
-            param.setLending_id(map.getLong("DEP_FORM_LENDING_ID"));
-            param.setModel_id(map.getLong("BASE_GOODS_MODELS_ID"));
-            param.setUser_name(map.getString("GOODS_USER_NAME"));
-
-            List<CheckUsingResult> resultList = coreService.unifyUsingCheck(param);
-            for (CheckUsingResult result : resultList) {
-                BaseWarehouseParam param1 = new DepBackWarehouseParam();
-                param1.setIsCheckIn(true);
-                param1.setWarehouseId(result.getLendingModel().getWarehouseId());
-                param1.setModelId(result.getLendingModel().getBaseGoodsModelsId());
-                param1.setCount(result.getEnd_count() - result.getInitial_count());
-                param1.setFirst_input_type(4);
-
-                //鍏ュ簱骞跺瓨鍏ユ祦姘�
-                CheckWarehouseResult result1  = coreService.unifyCheck(param1).get(0);
-                WhGoodsDetails details = new WhGoodsDetails();
-                details.setId(result1.getWhGoods().getFirstInputHisId());
-                details.setBusinessFormId(back.getId());
-                details.setBusinessFormCode(back.getBusinessFormCode());
-                details.setBusinessFormName(back.getWarehouseName() + "杩斿簱鍏ュ簱鍗�:" + details.getBusinessFormCode());
-                details.setInitialCount(result.getInitial_count());
-                details.setThisType(1);
-                details.setEndCount(result.getEnd_count());
-                details.setWarehouseId(back.getWarehouseId());
-                details.setWarehouseName(back.getWarehouseName());
-                details.setClassification(1);
-                details.setOperatorId(back.getOperatorId());
-                details.setOperatorName(back.getOperatorName());
-                details.setDealTime(back.getDealTime());
-                details.setWhGoodsId(result1.getWhGoods().getId());
-
-                this.insert(details);
-
-
-                //瀛樺叆鍦ㄧ敤娴佹按
-                UsingGoodsHis his  = new UsingGoodsHis();
-                his.setId(NumberGenerator.getLongSequenceNumber());
-                his.setBusinessFormId(back.getId());
-                his.setBusinessFormCode(back.getBusinessFormCode());
-                his.setBusinessFormName("杩斿簱鍗曪細" + back.getBusinessFormCode());
-                his.setClassification(3);
-                his.setOperatorId(back.getOperatorId());
-                his.setOperatorName(back.getOperatorName());
-                his.setDealTime(back.getDealTime());
-                his.setDepFormLendingModelId(result.getLendingModel().getId());
-                his.setDepFormLendingGoodsId(result.getLendingModel().getDepFormLendingGoodsId());
-                his.setDepFormLendingId(result.getLendingModel().getDepFormLendingId());
-                his.setWhGoodsId(result.getLendingModel().getWhGoodsId());
-                his.setInitialCount(result.getInitial_count());
-                his.setEndCount(result.getEnd_count());
-                his.setWarehouseId(back.getWarehouseId());
-                his.setWarehouseName(back.getWarehouseName());
-                his.setDepartmentId(back.getDepartmentId());
-                his.setDepartmentName(back.getDepartmentName());
-                insert(his);
-
-                DepFormBackModel model = new DepFormBackModel();
-                model.setId(NumberGenerator.getLongSequenceNumber());
-                model.setDepFormBackGoodsId(map.getLong("DEP_FORM_BACK_GOODS_ID"));
-                model.setDepFormBackId(back.getId());
-                model.setWhGoodsDetailsId(result1.getWh_goods_detail_id());
-                model.setUsingGoodsHisId(his.getId());
-                model.setWhGoodsId(his.getWhGoodsId());
-                model.setCounts(his.getThisCount());
-                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
-                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
-                model.setDepFormLendingId(his.getDepFormLendingId());
-                model.setWhGoodsId(his.getWhGoodsId());
-                insert(model);
-            }
-
-        }
-
-
-    }
-
-
-    /**
-     * 閮ㄩ棬鐗╁搧鍒嗗彂
-     */
-    public void doDepLending(DepFormLending lending){
-        String sql = "SELECT\n" +
-                "	* \n" +
-                "FROM\n" +
-                "	DEP_FORM_LENDING_GOODS A \n" +
-                "WHERE\n" +
-                "	A.DEP_FORM_LENDING_ID = :LENDING_ID";
-
-        List<DepFormLendingGoods>  goodsList = this.select(sql,new SqlParameter()
-                .put("LENDING_ID",lending.getId()),new DepFormLendingGoods());
-
-        for (DepFormLendingGoods goods : goodsList){
-            BaseWarehouseParam param = new BaseWarehouseParam();
-            param.setIsCheckIn(false);
-            param.setWarehouseId(lending.getWarehouseId());
-            param.setModelId(goods.getBaseGoodsModelsId());
-            param.setCount(goods.getCounts());
-
-            //棣栧厛浠庢満鏋勪粨搴撳嚭搴�
-            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
-            for (CheckWarehouseResult result : results){
-                WhGoodsDetails details = new WhGoodsDetails();
-                details.setId(NumberGenerator.getLongSequenceNumber());
-                details.setBusinessFormId(lending.getId());
-                details.setBusinessFormCode(lending.getBusinessFormCode());
-                details.setBusinessFormName("鍒嗗彂鍗曪細" + lending.getBusinessFormCode());
-                details.setInitialCount(result.getInitial_count());
-                details.setThisType(2);
-                details.setThisCount(result.getInitial_count() - result.getEnd_count());
-                details.setEndCount(result.getEnd_count());
-                details.setWarehouseId(result.getWhGoods().getWarehouseId());
-                details.setWarehouseName(result.getWhGoods().getWarehouseName());
-                details.setClassification(11);
-                details.setOperatorId(lending.getOperatorId());
-                details.setOperatorName(lending.getOperatorName());
-                details.setDealTime(lending.getDealTime());
-                details.setWhGoodsId(result.getWhGoods().getId());
-                this.insert(details);
-
-                //鍥炲~鍑哄簱娴佹按ID锛岀敤浜庡垎鍙戞椂浣跨敤
-                result.setWh_goods_detail_id(details.getId());
-            }
-
-            CheckUsingParam usingParam = new CheckUsingParam();
-            usingParam.setIsCheckIn(true);
-            usingParam.setInput_type(1);
-            usingParam.setOutputList(results);
-
-            List<CheckUsingResult> usingResults = coreService.unifyUsingCheck(usingParam);
-            for (CheckUsingResult usingResult : usingResults) {
-                UsingGoodsHis his  = new UsingGoodsHis();
-                his.setId(NumberGenerator.getLongSequenceNumber());
-                his.setBusinessFormId(lending.getId());
-                his.setBusinessFormCode(lending.getBusinessFormCode());
-                his.setBusinessFormName("鍒嗗彂鍗曪細" + lending.getBusinessFormCode());
-                his.setClassification(1);
-                his.setOperatorId(lending.getOperatorId());
-                his.setOperatorName(lending.getOperatorName());
-                his.setDealTime(lending.getDealTime());
-                his.setDepFormLendingModelId(usingResult.getLendingModel().getId());
-                his.setDepFormLendingGoodsId(usingResult.getLendingModel().getDepFormLendingGoodsId());
-                his.setDepFormLendingId(lending.getId());
-                his.setWhGoodsId(usingResult.getLendingModel().getWhGoodsId());
-                his.setInitialCount(usingResult.getInitial_count());
-                his.setEndCount(usingResult.getEnd_count());
-                his.setWarehouseId(lending.getWarehouseId());
-                his.setWarehouseName(lending.getWarehouseName());
-                his.setDepartmentId(lending.getDepartmentId());
-                his.setDepartmentName(lending.getDepartmentName());
-                insert(his);
-            }
-        }
-    }
-
-    public void doDepScrapped(String dep_form_scrapped_id){
-
-        DepFormScrapped scrapped = get(new DepFormScrapped(),"ID=?",new Object[]{dep_form_scrapped_id});
-
-        String sql = "SELECT\n" +
-                "	B.*,\n" +
-                "	A.SCRAPPED_COUNTS, \n" +
-                "	A.ID AS DEP_FORM_SCRAPPED_GOODS_ID \n" +
-                "FROM\n" +
-                "	DEP_FORM_SCRAPPED_GOODS A\n" +
-                "	LEFT JOIN DEP_FORM_LENDING_GOODS B ON A.DEP_FORM_LENDING_GOODS_ID = B.ID \n" +
-                "WHERE\n" +
-                "	A.DEP_FORM_SCRAPPED_ID = :DEP_FORM_SCRAPPED_ID \n" +
-                "	AND A.WAREHOUSE_ID = B.WAREHOUSE_ID \n" +
-                "	AND A.WAREHOUSE_ID = :WAREHOUSE_ID";
-
-        List<Map> list = select(sql,new SqlParameter("DEP_FORM_SCRAPPED_ID",scrapped.getId()).add("WAREHOUSE_ID",scrapped.getWarehouseId()));
-        for (Map _map : list) {
-            SuperMap map = new SuperMap(_map);
-
-            CheckUsingParam param = new CheckUsingParam();
-            param.setIsCheckIn(false);
-            param.setOutputCount(map.getInteger("SCRAPPED_COUNTS"));
-            param.setLending_id(map.getLong("DEP_FORM_LENDING_ID"));
-            param.setModel_id(map.getLong("BASE_GOODS_MODELS_ID"));
-            param.setUser_name(map.getString("GOODS_USER_NAME"));
-
-            List<CheckUsingResult> resultList = coreService.unifyUsingCheck(param);
-
-            for (CheckUsingResult result : resultList) {
-
-                //瀛樺叆鍦ㄧ敤娴佹按
-                UsingGoodsHis his  = new UsingGoodsHis();
-                his.setId(NumberGenerator.getLongSequenceNumber());
-                his.setBusinessFormId(scrapped.getId());
-                his.setBusinessFormCode(scrapped.getBusinessFormCode());
-                his.setBusinessFormName("閮ㄩ棬鎶ュ簾鍗曪細" + scrapped.getBusinessFormCode());
-                his.setClassification(4);
-                his.setOperatorId(scrapped.getOperatorId());
-                his.setOperatorName(scrapped.getOperatorName());
-                his.setDealTime(scrapped.getDealTime());
-                his.setDepFormLendingModelId(result.getLendingModel().getId());
-                his.setDepFormLendingGoodsId(result.getLendingModel().getDepFormLendingGoodsId());
-                his.setDepFormLendingId(result.getLendingModel().getDepFormLendingId());
-                his.setWhGoodsId(result.getLendingModel().getWhGoodsId());
-                his.setInitialCount(result.getInitial_count());
-                his.setEndCount(result.getEnd_count());
-                his.setWarehouseId(scrapped.getWarehouseId());
-                his.setWarehouseName(scrapped.getWarehouseName());
-                his.setDepartmentId(scrapped.getDepartmentId());
-                his.setDepartmentName(scrapped.getDepartmentName());
-                insert(his);
-
-
-                DepFormScrappedModel model = new DepFormScrappedModel();
-                model.setId(NumberGenerator.getLongSequenceNumber());
-                model.setDepFormScrappedGoodsId(map.getLong("DEP_FORM_SCRAPPED_GOODS_ID"));
-                model.setScrappedCode(map.getString("SCRAPPED_CODE"));
-                model.setScrappedName(map.getString("SCRAPPED_NAME"));
-                model.setUsingGoodsHisId(his.getId());
-                model.setDepFormScrappedId(scrapped.getId());
-                model.setWhGoodsId(his.getWhGoodsId());
-                model.setScrappedCounts(his.getThisCount());
-                model.setInitCount(his.getInitialCount());
-                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
-                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
-                model.setDepFormLendingId(his.getDepFormLendingId());
-                insert(model);
-            }
-        }
-    }
-
-    /**
-     * 鐢ㄤ簬鍙樻洿鐗╁搧浣跨敤浜哄悗锛屾洿鏂板簱瀛樼墿鍝佷娇鐢ㄤ汉淇℃伅銆�
-     * @param dep_form_lending_goods_user_id
-     */
-    public void changeUser(Long dep_form_lending_goods_user_id){
-        DepFormLendingGoodsUser user = get(new DepFormLendingGoodsUser(),"ID=?",new Object[]{dep_form_lending_goods_user_id});
-        DepFormLendingGoods goods = get(new DepFormLendingGoods(),"ID=?",new Object[]{user.getDepFormLendingGoodsId()});
-
-
-        String sql =
-                "UPDATE DEP_FORM_LENDING_MODEL \n" +
-                        "SET NOW_USER_NAME =:NOW_USER_NAME,\n" +
-                        "NOW_USER_PHONE =:NOW_USER_PHONE \n" +
-                        "WHERE\n" +
-                        "	DEP_FORM_LENDING_GOODS_ID =:DEP_FORM_LENDING_GOODS_ID \n" +
-                        "	AND BASE_GOODS_MODELS_ID =:BASE_GOODS_MODELS_ID \n" +
-                        "	AND NOW_USER_NAME =:OLD_USER_NAME\n" +
-                        "	AND USING_COUNT > 0";
-
-        List<SqlParameter> parameterList = new ArrayList<>();
-        List<DepFormLendingModel> modelList = select(new DepFormLendingModel(),"DEP_FORM_LENDING_GOODS_ID=?",new Object[]{goods.getId()});
-        for (DepFormLendingModel model : modelList) {
-            if (model.getUsingCount() == 0) continue;
-            SqlParameter parameter = new SqlParameter();
-            parameter.add("NOW_USER_NAME",user.getNowUserName())
-                    .add("NOW_USER_PHONE",user.getNowUserPhone())
-                    .add("DEP_FORM_LENDING_GOODS_ID",goods.getId())
-                    .add("BASE_GOODS_MODELS_ID",goods.getBaseGoodsModelsId())
-                    .add("OLD_USER_NAME",goods.getGoodsUserName());
-            parameterList.add(parameter);
-        }
-        execBatchUpdate(sql,parameterList);
-    }
-}
+//package com.consum.base.core;
+//
+//import com.consum.base.core.param.BaseWarehouseParam;
+//import com.consum.base.core.param.DepBackWarehouseParam;
+//import com.consum.base.core.utils.SqlParameter;
+//import com.consum.base.core.utils.SuperMap;
+//import com.consum.base.core.utils.DateUtil;
+//import com.consum.model.po.*;
+//import com.walker.infrastructure.utils.NumberGenerator;
+//import com.walker.jdbc.service.BaseServiceImpl;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//
+//import java.util.ArrayList;
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * 杩涘嚭搴� 涓氬姟澶� 绫�
+// */
+//@Service
+//public class WarehouseBusinessServiceBAK extends BaseServiceImpl {
+//
+//
+//    @Autowired
+//    private WarehouseCoreService coreService;
+//
+//    /**
+//     * 鎵ц閲囪喘鍏ュ簱
+//     * 绗竴姝ワ細閫氳繃閲囪喘鍗曘�怶H_FORM_PROCURE銆戞煡璇㈤噰璐崟鍨嬪彿銆怶H_FORM_PROCURE_MODEL銆戞暟鎹�
+//     * 绗簩姝ワ細缁勭粐CheckWarehouseParam锛岃皟鐢╓arehouseCoreService.unifyCheck()鎵ц鍏ュ簱
+//     * 绗笁姝ワ細鏇存柊閲囪喘鍗曞瀷鍙枫�怶H_FORM_PROCURE_MODEL銆戝簱瀛樼墿鍝佺紪鍙峰瓧娈靛強涓昏〃WH_FORM_PROCURE鐘舵�佷俊鎭�
+//     * 绗洓姝ワ細鏇存柊 杩涘嚭搴撴祦姘达紙浠撳簱锛夈�怶H_GOODS_DETAILS銆�
+//     * @param procure
+//     */
+//    public void doProcure(WhFormProcure procure){
+//
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_PROCURE_MODEL A \n" +
+//                "WHERE\n" +
+//                "	A.WH_FORM_PROCURE_ID = :PROCURE_ID";
+//
+//        List<WhFormProcureModel>  modelList = this.select(sql,new SqlParameter().put("PROCURE_ID",procure.getId()),new WhFormProcureModel());
+//
+//        for (WhFormProcureModel model : modelList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(true);
+//            param.setWarehouseId(procure.getId());
+//            param.setCount(model.getCounts());
+//            param.setFirstInputCode(model.getId().toString());
+//            param.setFirst_input_type(1);
+//            param.setModelId(model.getBaseGoodsModelsId());
+//            CheckWarehouseResult result =  coreService.unifyCheck(param).get(0);
+//
+//
+//            WhGoodsDetails details = new WhGoodsDetails();
+//            details.setId(result.getWhGoods().getFirstInputHisId());
+//            details.setBusinessFormId(procure.getId());
+//            details.setBusinessFormCode(procure.getBusinessFormCode());
+//            details.setBusinessFormName(procure.getWarehouseName() + "閲囪喘鍏ュ簱鍗�:" + details.getBusinessFormCode());
+//            details.setInitialCount(result.getInitial_count());
+//            details.setThisType(1);
+//            details.setEndCount(result.getEnd_count());
+//            details.setWarehouseId(param.getWarehouseId());
+//            details.setWarehouseName(procure.getWarehouseName());
+//            details.setClassification(1);
+//            details.setOperatorId(procure.getOperatorId2());
+//            details.setOperatorName(procure.getOperatorName2());
+//            details.setDealTime(procure.getIncomeTime());
+//            details.setWhGoodsId(result.getWhGoods().getId());
+//
+//            this.insert(details);
+//
+//
+//            model.setInWhGoodsDetailsId(details.getId());
+//            update(model);
+//
+//            procure.setStates(2);
+//            update(procure);
+//        }
+//    }
+//    public void doOutPut(WhFormOutput output){
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_OUTPUT_GOODS A \n" +
+//                "WHERE\n" +
+//                "	A.WH_FORM_OUTPUT_ID = :OUTPUT_ID";
+//
+//        List<WhFormOutputGoods>  goodsList = this.select(sql,new SqlParameter()
+//                .put("OUTPUT_ID",output.getId()),new WhFormOutputGoods());
+//
+//        for (WhFormOutputGoods goods : goodsList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(false);
+//            param.setWarehouseId(output.getWarehouseId());
+//            param.setModelId(goods.getBaseGoodsModelsId());
+//            param.setCount(goods.getCounts());
+//
+//            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
+//            for (CheckWarehouseResult result : results){
+//                WhFormOutputModel model = new WhFormOutputModel();
+//                model.setId(NumberGenerator.getLongSequenceNumber());
+//                model.setCounts(result.getInitial_count() - result.getEnd_count());
+//                model.setOutWhGoodsDetailsId(result.getWhGoods().getId());
+//                model.setWhGoodsId(result.getWhGoods().getId());
+//                model.setWhFormOutputId(output.getId());
+//                model.setWhFormOutputGoodsId(goods.getId());
+//                insert(model);
+//
+//                WhGoodsDetails details = new WhGoodsDetails();
+//                details.setBusinessFormId(output.getId());
+//                details.setBusinessFormCode(output.getBusinessFormCode());
+//                details.setBusinessFormName("鍑哄簱鍗曪細" + output.getBusinessFormCode());
+//                details.setInitialCount(result.getInitial_count());
+//                details.setThisType(2);
+//                details.setThisCount(result.getInitial_count() - result.getEnd_count());
+//                details.setEndCount(result.getEnd_count());
+//                details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//                details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//                details.setClassification(3);
+//                details.setOperatorId(output.getOperatorId());
+//                details.setOperatorName(output.getOperatorName());
+//                details.setDealTime(output.getDealTime());
+//                details.setWhGoodsId(result.getWhGoods().getId());
+//                this.insert(details);
+//            }
+//        }
+//    }
+//
+//
+//    /**
+//     * 鎵ц璋冩嫧鍑哄簱鎿嶄綔
+//     * 1. 閫氳繃璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戙�佽皟鎷ㄥ崟鐗╁搧銆怶H_FORM_TRANSFER_GOODS銆戠粍缁嘋heckWarehouseParam
+//     * 2. 璋冪敤璋冪敤WarehouseCoreService.unifyCheck()鎵ц鍑哄簱
+//     * 3. 鏇存柊杩涘嚭搴撴祦姘达紙浠撳簱锛夈�怶H_GOODS_DETAILS銆�
+//     * 4. 鏇存柊璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戜负寰呮帴鏀讹紝鏇存柊璋冩嫧鍗曠墿鍝併�怶H_FORM_TRANSFER_MODEL銆戝嚭搴撴祦姘碔D
+//     * @param transfer
+//     */
+//    public void doTransferOutPut(WhFormTransfer transfer){
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_TRANSFER_GOODS A \n" +
+//                "WHERE\n" +
+//                "	A.WH_FORM_TRANSFER_ID = :TRANSFER_ID";
+//
+//        List<WhFormTransferGoods>  goodsList = this.select(sql,new SqlParameter()
+//                .put("TRANSFER_ID",transfer.getId()),new WhFormTransferGoods());
+//
+//        for (WhFormTransferGoods goods : goodsList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(false);
+//            param.setWarehouseId(transfer.getOutWarehouseId());
+//            param.setCount(goods.getCounts());
+//            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
+//            for (CheckWarehouseResult result : results){
+//                WhFormTransferModel model = new WhFormTransferModel();
+//                model.setId(NumberGenerator.getLongSequenceNumber());
+//                model.setWhFormTransferId(transfer.getId());
+//                model.setWorehouseCount(result.getInitial_count());
+//                model.setCounts(result.getInitial_count() - result.getEnd_count());
+//                model.setOutWhGoodsDetailsId(result.getWhGoods().getId());
+//                model.setWhFormTransferGoodsId(goods.getId());
+//                insert(model);
+//
+//                WhGoodsDetails details = new WhGoodsDetails();
+//                details.setBusinessFormId(transfer.getId());
+//                details.setBusinessFormCode(transfer.getBusinessFormCode());
+//                details.setBusinessFormName("璋冩嫧鍑哄簱鍗曪細" + transfer.getBusinessFormCode());
+//                details.setInitialCount(result.getInitial_count());
+//                details.setThisType(2);
+//                details.setThisCount(result.getInitial_count() - result.getEnd_count());
+//                details.setEndCount(result.getEnd_count());
+//                details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//                details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//                details.setClassification(5);
+//                details.setOperatorId(transfer.getOperatorId());
+//                details.setOperatorName(transfer.getOperatorName());
+//                details.setDealTime(transfer.getOutputTime());
+//                details.setWhGoodsId(result.getWhGoods().getId());
+//                this.insert(details);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 鎵ц璋冩嫧鍏ュ簱鎿嶄綔
+//     * 1. 閫氳繃璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戙�佽皟鎷ㄥ崟鐗╁搧銆怶H_FORM_TRANSFER_GOODS銆戠粍缁嘋heckWarehouseParam
+//     * 2. 璋冪敤璋冪敤WarehouseCoreService.unifyCheck()鎵ц鍑哄簱
+//     * 3. 鏇存柊杩涘嚭搴撴祦姘达紙浠撳簱锛夈�怶H_GOODS_DETAILS銆�
+//     * 4. 鏇存柊璋冩嫧鍗曘�怶H_FORM_TRANSFER銆戜负宸插叆搴擄紝锛屾洿鏂拌皟鎷ㄥ崟鐗╁搧銆怶H_FORM_TRANSFER_MODEL銆戝叆搴撴祦姘碔D
+//     * @param transfer
+//     */
+//    public void doTransferInPut(WhFormTransfer transfer){
+//
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_TRANSFER_MODEL A \n" +
+//                "WHERE\n" +
+//                "	A.WH_FORM_TRANSFER_ID = :TRANSFER_ID";
+//
+//        List<WhFormTransferModel>  modelsList = this.select(sql,new SqlParameter()
+//                                    .put("TRANSFER_ID",transfer.getId()),new WhFormTransferModel());
+//
+//        for (WhFormTransferModel model : modelsList) {
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(true);
+//            param.setWarehouseId(transfer.getInWarehouseId());
+//            param.setCount(model.getCounts());
+//            param.setWh_goods_id(model.getWhGoodsId());
+//            CheckWarehouseResult result = coreService.unifyCheck(param).get(0);
+//
+//            WhGoodsDetails details = new WhGoodsDetails();
+//            details.setBusinessFormId(transfer.getId());
+//            details.setBusinessFormCode(transfer.getBusinessFormCode());
+//            details.setBusinessFormName("璋冩嫧鍏ュ簱鍗曪細" + transfer.getBusinessFormCode());
+//            details.setInitialCount(result.getInitial_count());
+//            details.setThisType(1);
+//            details.setThisCount(result.getEnd_count()-result.getInitial_count());
+//            details.setEndCount(result.getEnd_count());
+//            details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//            details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//            details.setClassification(4);
+//            details.setOperatorId(transfer.getOperatorId2());
+//            details.setOperatorName(transfer.getOperatorName2());
+//            details.setDealTime(transfer.getIninputTime());
+//            details.setWhGoodsId(result.getWhGoods().getId());
+//            this.insert(details);
+//
+//            model.setInWhGoodsDetailsId(details.getId());
+//            update(model);
+//        }
+//    }
+//
+//    /**
+//     * 鎶ュ簾鍗�
+//     * @param scrapped
+//     */
+//    public void doScrapped(WhFormScrapped scrapped){
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_SCRAPPED_GOODS A \n" +
+//                "WHERE\n" +
+//                "	A.DEP_FORM_SCRAPPED_ID = :SCRAPPED_ID";
+//
+//        List<WhFormScrappedGoods>  goodsList = this.select(sql,new SqlParameter()
+//                .put("SCRAPPED_ID",scrapped.getId()),new WhFormScrappedGoods());
+//
+//        for (WhFormScrappedGoods goods : goodsList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(false);
+//            param.setWarehouseId(scrapped.getWarehouseId());
+//            param.setCount(goods.getCounts());
+//            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
+//            for (CheckWarehouseResult result : results){
+//
+//
+//                WhGoodsDetails details = new WhGoodsDetails();
+//                details.setBusinessFormId(scrapped.getId());
+//                details.setBusinessFormCode(scrapped.getBusinessFormCode());
+//                details.setBusinessFormName("鎶ュ簾鍗曪細" + scrapped.getBusinessFormCode());
+//                details.setInitialCount(result.getInitial_count());
+//                details.setThisType(2);
+//                details.setThisCount(result.getInitial_count() - result.getEnd_count());
+//                details.setEndCount(result.getEnd_count());
+//                details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//                details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//                details.setClassification(10);
+//                details.setOperatorId(scrapped.getOperatorId());
+//                details.setOperatorName(scrapped.getOperatorName());
+//                details.setDealTime(scrapped.getDealTime());
+//                details.setWhGoodsId(result.getWhGoods().getId());
+//                this.insert(details);
+//
+//
+//                WhFormScrappedModel model = new WhFormScrappedModel();
+//                model.setId(NumberGenerator.getLongSequenceNumber());
+//                model.setCounts(result.getWhGoods().getWhCount());
+//                model.setScrappedCode(goods.getScrappedCode());
+//                model.setScrappedName(goods.getScrappedName());
+//                model.setDepGoodsDetailsId(details.getId());
+//                model.setDepFormScrappedId(scrapped.getId());
+//                model.setWhGoodsId(result.getWhGoods().getId());
+//                model.setWhFormScrappedGoodsId(goods.getId());
+//                insert(model);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 鍒涘缓鐩樼偣浠诲姟锛屽垱寤虹洏鐐逛换鍔℃椂锛屾牴鎹綋鏃舵椂闂翠細灏嗗簱瀛樻暟鎹喕缁撲竴浠芥斁鍏ュ緟鐩樼偣鍗曘��
+//     * 1.浠庡簱瀛樼墿鍝併�怶H_GOODS銆戜腑鎸夌収浠撳簱灏嗘暟鎹斁鍏ョ洏鐐瑰崟鐗╁搧銆怶H_FORM_INVENTORY_GOODS銆戯紝涓昏鏄�
+//     * 鏈熷垵鏁伴噺INIT_COUNTS锛屽拰 搴撳瓨鐗╁搧缂栧彿WH_GOODS_ID瀛楁
+//     * @param inventory
+//     */
+//    public void createInventoryForm(WhFormInventory inventory){
+//        String sql =
+//                "SELECT\n" +
+//                        "	b.BASE_GOODS_TEMPLATE_ID,\n" +
+//                        "	b.GOODS_TEMPLATE_NAME,\n" +
+//                        "	SUM( b.WH_COUNT ) AS WH_COUNT,\n" +
+//                        "	b.BASE_GOODS_MODELS_ID,\n" +
+//                        "	b.BASE_GOODS_MODELS_NAME,\n" +
+//                        "	b.UNIT \n" +
+//                        "FROM\n" +
+//                        "	(\n" +
+//                        "	SELECT\n" +
+//                        "		ID \n" +
+//                        "	FROM\n" +
+//                        "		BASE_GOODS_MODELS m \n" +
+//                        "	WHERE\n" +
+//                        "		STATES != 3 \n" +
+//                        "		AND EXISTS ( SELECT 1 FROM BASE_GOODS_TEMPLATE t WHERE t.ID = m.GOODS_TEMPLATES_ID AND t.STATES != 3 ) \n" +
+//                        "	) a\n" +
+//                        "	LEFT JOIN wh_goods b ON a.ID = b.BASE_GOODS_MODELS_ID \n" +
+//                        "WHERE\n" +
+//                        "	b.STATES = 1 \n" +
+//                        "	AND b.WAREHOUSE_ID =:WAREHOUSE_ID \n" +
+//                        "GROUP BY\n" +
+//                        "	b.BASE_GOODS_TEMPLATE_ID,\n" +
+//                        "	b.GOODS_TEMPLATE_NAME,\n" +
+//                        "	b.BASE_GOODS_MODELS_ID,\n" +
+//                        "	b.BASE_GOODS_MODELS_NAME";
+//
+//        List<WhGoods> goodsList = select(sql,new SqlParameter().add("WAREHOUSE_ID",inventory.getWarehouseId()));
+//        List<WhFormInventoryGoods> list = new ArrayList<>();
+//        for (WhGoods goods : goodsList) {
+//            WhFormInventoryGoods inventoryGoods = new WhFormInventoryGoods();
+//            inventoryGoods.setId(NumberGenerator.getLongSequenceNumber());
+//            inventoryGoods.setWhFormInventoryId(inventory.getId());
+//            inventoryGoods.setBaseGoodsTemplateId(goods.getBaseGoodsTemplateId());
+//            inventoryGoods.setGoodsTemplateName(goods.getGoodsTemplateName());
+//            inventoryGoods.setUnit(goods.getUnit());
+//            inventoryGoods.setBaseGoodsModelsId(goods.getBaseGoodsModelsId());
+//            inventoryGoods.setBaseGoodsModelsName(goods.getBaseGoodsModelsName());
+//            inventoryGoods.setInitCounts(goods.getWhCount());
+//            inventoryGoods.setInitCounts(null);
+//            inventoryGoods.setErrorCounts(null);
+//            inventoryGoods.setInventoryResult(1);
+//            list.add(inventoryGoods);
+//        }
+//        insertBatch(list);
+//
+//    }
+//
+//    /**
+//     * 鐩樼偣鍑哄簱
+//     * @param inventory
+//     */
+//    public void doInventoryOutput(WhFormInventory inventory){
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_INVENTORY_GOODS A \n" +
+//                "WHERE\n" +
+//                "	A.WH_FORM_INVENTORY_ID = :INVENTORY_ID \n" +
+//                "  AND A.INVENTORY_RESULT =3 ";
+//
+//        List<WhFormInventoryGoods>  goodsList = this.select(sql,new SqlParameter()
+//                .put("INVENTORY_ID",inventory.getId()),new WhFormInventoryGoods());
+//
+//        for (WhFormInventoryGoods goods : goodsList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(false);
+//            param.setWarehouseId(inventory.getWarehouseId());
+//            param.setCount(goods.getErrorCounts());
+//            param.setModelId(goods.getBaseGoodsModelsId());
+//            param.setOutput_type(3);
+//            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
+//            for (CheckWarehouseResult result : results){
+//
+//                WhGoodsDetails details = new WhGoodsDetails();
+//                details.setBusinessFormId(inventory.getId());
+//                details.setBusinessFormCode(inventory.getBusinessFormCode());
+//                details.setBusinessFormName("鐩樼偣鍑哄崟锛�" + inventory.getBusinessFormCode());
+//
+//                details.setInitialCount(result.getInitial_count());
+//                details.setThisType(2);
+//                details.setThisCount(result.getInitial_count() - result.getEnd_count());
+//                details.setEndCount(result.getEnd_count());
+//                details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//                details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//                details.setClassification(9);
+//                details.setOperatorId(inventory.getOperatorId());
+//                details.setOperatorName(inventory.getOperatorName());
+//                details.setDealTime(inventory.getStopTime());
+//                details.setWhGoodsId(result.getWhGoods().getId());
+//                this.insert(details);
+//
+//
+//                WhFormInventoryModel model = new WhFormInventoryModel();
+//                model.setId(NumberGenerator.getLongSequenceNumber());
+//                model.setCounts(result.getWhGoods().getWhCount());
+//                model.setWhFormInventoryId(inventory.getId());
+//                model.setInventoryResult(3);
+//                model.setWhGoodsDetailsId(details.getId());
+//                model.setWhFormInventoryGoodsId(goods.getId());
+//                model.setWhGoodsId(result.getWhGoods().getId());
+//                insert(model);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 鐩樼偣鍏ュ簱
+//     * @param inventory
+//     */
+//    public void doInventoryInput(WhFormInventory inventory){
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	WH_FORM_INVENTORY_GOODS A \n" +
+//                "WHERE\n" +
+//                "	A.WH_FORM_INVENTORY_ID = :INVENTORY_ID \n" +
+//                "  AND A.INVENTORY_RESULT =2 ";
+//
+//        List<WhFormInventoryGoods>  goodsList = this.select(sql,new SqlParameter()
+//                .put("INVENTORY_ID",inventory.getId()),new WhFormInventoryGoods());
+//
+//        for (WhFormInventoryGoods goods : goodsList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(true);
+//            param.setWarehouseId(inventory.getWarehouseId());
+//            param.setCount(goods.getErrorCounts());
+//            param.setModelId(goods.getBaseGoodsModelsId());
+//            param.setFirst_input_type(3);
+//            CheckWarehouseResult result =  coreService.unifyCheck(param).get(0);
+//
+//            WhGoodsDetails details = new WhGoodsDetails();
+//            details.setBusinessFormId(inventory.getId());
+//            details.setBusinessFormCode(inventory.getBusinessFormCode());
+//            details.setBusinessFormName("鐩樼偣鍏ュ簱鍗曪細" + inventory.getBusinessFormCode());
+//
+//            details.setInitialCount(result.getInitial_count());
+//            details.setThisType(1);
+//            details.setThisCount(result.getEnd_count()-result.getInitial_count());
+//            details.setEndCount(result.getEnd_count());
+//            details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//            details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//            details.setClassification(8);
+//            details.setOperatorId(inventory.getOperatorId());
+//            details.setOperatorName(inventory.getOperatorName());
+//            details.setDealTime(inventory.getStopTime());
+//            details.setWhGoodsId(result.getWhGoods().getId());
+//            this.insert(details);
+//
+//
+//            WhFormInventoryModel model = new WhFormInventoryModel();
+//            model.setId(NumberGenerator.getLongSequenceNumber());
+//            model.setCounts(result.getWhGoods().getWhCount());
+//            model.setWhFormInventoryId(inventory.getId());
+//            model.setInventoryResult(3);
+//            model.setWhGoodsDetailsId(details.getId());
+//            model.setWhFormInventoryGoodsId(goods.getId());
+//            model.setWhGoodsId(result.getWhGoods().getId());
+//            insert(model);
+//        }
+//    }
+//
+//    /**
+//     * 缁熶竴澶勭悊搴撳瓨棰勮锛堝畾鏃朵换鍔¤皟鐢ㄦ湇鍔★級
+//     * 璁″垝锛氭瘡澶╀腑鍗�13锛�00銆佹櫄涓�1:00鎵ц涓ゆ
+//     */
+//    public void insertWarning(){
+//
+//        String sql = "SELECT\n" +
+//                "	SUM(b.WH_COUNT) AS WH_COUNT,\n" +
+//                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
+//                "	b.GOODS_TEMPLATE_NAME,\n" +
+//                "   b.WAREHOUSE_ID,\n" +
+//                "	a.UPPER_LIMIT,\n" +
+//                "	a.LOWER_LIMIT \n" +
+//                "FROM\n" +
+//                "	WH_WARNING_CONFIG a\n" +
+//                "	LEFT JOIN wh_goods b ON a.BASE_GOODS_TEMPLATE_ID = b.BASE_GOODS_TEMPLATE_ID \n" +
+//                "WHERE\n" +
+//                "	a.BASE_WAREHOUSE_ID = b.WAREHOUSE_ID \n" +
+//                "	AND b.STATES = 1 \n" +
+//                "	AND a.GOODS_TYPE=1\n" +
+//                " 	AND  ( a.UPPER_LIMIT <= WH_COUNT OR a.LOWER_LIMIT >= WH_COUNT ) \n" +
+//                "GROUP BY\n" +
+//                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
+//                "	b.GOODS_TEMPLATE_NAME,\n" +
+//                "   b.WAREHOUSE_ID,\n" +
+//                "	a.UPPER_LIMIT,\n" +
+//                "	a.LOWER_LIMIT";
+//
+//        List<Map> goodslist = select(sql,new SqlParameter());
+//
+//        sql = "SELECT\n" +
+//                "	SUM(b.WH_COUNT) AS WH_COUNT,\n" +
+//                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
+//                "	b.GOODS_TEMPLATE_NAME,\n" +
+//                "	b.BASE_GOODS_MODELS_ID,\n" +
+//                "	b.BASE_GOODS_MODELS_NAME,\n" +
+//                "   b.WAREHOUSE_ID,\n" +
+//                "	a.UPPER_LIMIT,\n" +
+//                "	a.LOWER_LIMIT \n" +
+//                "FROM\n" +
+//                "	WH_WARNING_CONFIG a\n" +
+//                "	LEFT JOIN wh_goods b ON a.BASE_GOODS_MODELS_ID = b.BASE_GOODS_MODELS_ID \n" +
+//                "WHERE\n" +
+//                "	a.BASE_WAREHOUSE_ID = b.WAREHOUSE_ID \n" +
+//                "	AND b.STATES = 1 \n" +
+//                "	AND a.GOODS_TYPE=2\n" +
+//                " 	AND  ( a.UPPER_LIMIT <= WH_COUNT OR a.LOWER_LIMIT >= WH_COUNT ) \n" +
+//                "GROUP BY\n" +
+//                "	b.BASE_GOODS_TEMPLATE_ID,\n" +
+//                "	b.GOODS_TEMPLATE_NAME,\n" +
+//                "	b.BASE_GOODS_MODELS_ID,\n" +
+//                "	b.BASE_GOODS_MODELS_NAME,\n" +
+//                "   b.WAREHOUSE_ID,\n" +
+//                "	a.UPPER_LIMIT,\n" +
+//                "	a.LOWER_LIMIT";
+//
+//        List<Map> modeslist = select(sql,new SqlParameter());
+//
+//        List<Map> list = new ArrayList<>();
+//        list.addAll(goodslist);
+//        list.addAll(modeslist);
+//
+//        List<WhWarning> warningList = new ArrayList<>();
+//        for (Map map : list) {
+//            SuperMap superMap = new SuperMap(map);
+//            BaseWarehouse warehouse = get(new BaseWarehouse(),"ID=?",new Object[]{superMap.get("WAREHOUSE_ID")});
+//
+//            WhWarning warning = new WhWarning();
+//            warning.setId(NumberGenerator.getLongSequenceNumber());
+//            warning.setBaseWarehouseId(warehouse.getId());
+//            warning.setBaseWarehouseName(warehouse.getWarehouseName());
+//            warning.setBaseGoodsTemplateId(superMap.getLong("BASE_GOODS_TEMPLATE_ID"));
+//            warning.setBaseGoodsTemplateName(superMap.getString("GOODS_TEMPLATE_NAME"));
+//            if (superMap.getString("BASE_GOODS_MODELS_ID") == null){
+//                warning.setGoodsType(1);
+//            } else {
+//                warning.setBaseGoodsModelsId(superMap.getLong("BASE_GOODS_MODELS_ID"));
+//                warning.setBaseGoodsModelsName(superMap.getString("BASE_GOODS_MODELS_NAME"));
+//                warning.setGoodsType(2);
+//            }
+//
+//            int whCount = superMap.getInteger("WH_COUNT");
+//            int upCount = superMap.getInteger("UPPER_LIMIT");
+//            int lowCount = superMap.getInteger("LOWER_LIMIT");
+//
+//            if (whCount >= upCount){
+//                warning.setWarningType(1);
+//            }
+//            if (whCount<=lowCount){
+//                warning.setWarningType(2);
+//            }
+//
+//            warning.setUpperLimit(upCount);
+//            warning.setLowerLimit(lowCount);
+//            warning.setWarehouseCount(whCount);
+//            warning.setStates(1);
+//            warning.setWarningTime(DateUtil.getCurrentDateFor14());
+//            warning.setAgencyId(warehouse.getAgencyId());
+//            warning.setAgencyName(warehouse.getAgencyName());
+//
+//            warningList.add(warning);
+//        }
+//
+//        insertBatch(warningList);
+//    }
+//
+//    public void doDepBack(String depFormBackId){
+//
+//        DepFormBack back = get(new DepFormBack(),"ID=?",new Object[]{depFormBackId});
+//
+//        String sql = "SELECT\n" +
+//                "	B.*,\n" +
+//                "	A.BACK_COUNTS, \n" +
+//                "	A.ID AS DEP_FORM_BACK_GOODS_ID \n" +
+//                "FROM\n" +
+//                "	DEP_FORM_BACK_GOODS A\n" +
+//                "	LEFT JOIN DEP_FORM_LENDING_GOODS B ON A.DEP_FORM_LENDING_GOODS_ID = B.ID \n" +
+//                "WHERE\n" +
+//                "	A.DEP_FORM_BACK_ID = :DEP_FORM_BACK_ID \n" +
+//                "	AND A.WAREHOUSE_ID = B.WAREHOUSE_ID \n" +
+//                "	AND A.WAREHOUSE_ID = :WAREHOUSE_ID";
+//
+//        List<Map> list = select(sql,new SqlParameter("DEP_FORM_BACK_ID",back.getId()).add("WAREHOUSE_ID",back.getWarehouseId()));
+//
+//        for (Map myMap : list) {
+//            SuperMap map = new SuperMap(myMap);
+//
+//            CheckUsingParam param = new CheckUsingParam();
+//            param.setIsCheckIn(false);
+//            param.setLending_id(map.getLong("DEP_FORM_LENDING_ID"));
+//            param.setModel_id(map.getLong("BASE_GOODS_MODELS_ID"));
+//            param.setUser_name(map.getString("GOODS_USER_NAME"));
+//
+//            List<CheckUsingResult> resultList = coreService.unifyUsingCheck(param);
+//            for (CheckUsingResult result : resultList) {
+//                BaseWarehouseParam param1 = new DepBackWarehouseParam();
+//                param1.setIsCheckIn(true);
+//                param1.setWarehouseId(result.getLendingModel().getWarehouseId());
+//                param1.setModelId(result.getLendingModel().getBaseGoodsModelsId());
+//                param1.setCount(result.getEnd_count() - result.getInitial_count());
+//                param1.setFirst_input_type(4);
+//
+//                //鍏ュ簱骞跺瓨鍏ユ祦姘�
+//                CheckWarehouseResult result1  = coreService.unifyCheck(param1).get(0);
+//                WhGoodsDetails details = new WhGoodsDetails();
+//                details.setId(result1.getWhGoods().getFirstInputHisId());
+//                details.setBusinessFormId(back.getId());
+//                details.setBusinessFormCode(back.getBusinessFormCode());
+//                details.setBusinessFormName(back.getWarehouseName() + "杩斿簱鍏ュ簱鍗�:" + details.getBusinessFormCode());
+//                details.setInitialCount(result.getInitial_count());
+//                details.setThisType(1);
+//                details.setEndCount(result.getEnd_count());
+//                details.setWarehouseId(back.getWarehouseId());
+//                details.setWarehouseName(back.getWarehouseName());
+//                details.setClassification(1);
+//                details.setOperatorId(back.getOperatorId());
+//                details.setOperatorName(back.getOperatorName());
+//                details.setDealTime(back.getDealTime());
+//                details.setWhGoodsId(result1.getWhGoods().getId());
+//
+//                this.insert(details);
+//
+//
+//                //瀛樺叆鍦ㄧ敤娴佹按
+//                UsingGoodsHis his  = new UsingGoodsHis();
+//                his.setId(NumberGenerator.getLongSequenceNumber());
+//                his.setBusinessFormId(back.getId());
+//                his.setBusinessFormCode(back.getBusinessFormCode());
+//                his.setBusinessFormName("杩斿簱鍗曪細" + back.getBusinessFormCode());
+//                his.setClassification(3);
+//                his.setOperatorId(back.getOperatorId());
+//                his.setOperatorName(back.getOperatorName());
+//                his.setDealTime(back.getDealTime());
+//                his.setDepFormLendingModelId(result.getLendingModel().getId());
+//                his.setDepFormLendingGoodsId(result.getLendingModel().getDepFormLendingGoodsId());
+//                his.setDepFormLendingId(result.getLendingModel().getDepFormLendingId());
+//                his.setWhGoodsId(result.getLendingModel().getWhGoodsId());
+//                his.setInitialCount(result.getInitial_count());
+//                his.setEndCount(result.getEnd_count());
+//                his.setWarehouseId(back.getWarehouseId());
+//                his.setWarehouseName(back.getWarehouseName());
+//                his.setDepartmentId(back.getDepartmentId());
+//                his.setDepartmentName(back.getDepartmentName());
+//                insert(his);
+//
+//                DepFormBackModel model = new DepFormBackModel();
+//                model.setId(NumberGenerator.getLongSequenceNumber());
+//                model.setDepFormBackGoodsId(map.getLong("DEP_FORM_BACK_GOODS_ID"));
+//                model.setDepFormBackId(back.getId());
+//                model.setWhGoodsDetailsId(result1.getWh_goods_detail_id());
+//                model.setUsingGoodsHisId(his.getId());
+//                model.setWhGoodsId(his.getWhGoodsId());
+//                model.setCounts(his.getThisCount());
+//                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
+//                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
+//                model.setDepFormLendingId(his.getDepFormLendingId());
+//                model.setWhGoodsId(his.getWhGoodsId());
+//                insert(model);
+//            }
+//
+//        }
+//
+//
+//    }
+//
+//
+//    /**
+//     * 閮ㄩ棬鐗╁搧鍒嗗彂
+//     */
+//    public void doDepLending(DepFormLending lending){
+//        String sql = "SELECT\n" +
+//                "	* \n" +
+//                "FROM\n" +
+//                "	DEP_FORM_LENDING_GOODS A \n" +
+//                "WHERE\n" +
+//                "	A.DEP_FORM_LENDING_ID = :LENDING_ID";
+//
+//        List<DepFormLendingGoods>  goodsList = this.select(sql,new SqlParameter()
+//                .put("LENDING_ID",lending.getId()),new DepFormLendingGoods());
+//
+//        for (DepFormLendingGoods goods : goodsList){
+//            BaseWarehouseParam param = new BaseWarehouseParam();
+//            param.setIsCheckIn(false);
+//            param.setWarehouseId(lending.getWarehouseId());
+//            param.setModelId(goods.getBaseGoodsModelsId());
+//            param.setCount(goods.getCounts());
+//
+//            //棣栧厛浠庢満鏋勪粨搴撳嚭搴�
+//            List<CheckWarehouseResult> results =  coreService.unifyCheck(param);
+//            for (CheckWarehouseResult result : results){
+//                WhGoodsDetails details = new WhGoodsDetails();
+//                details.setId(NumberGenerator.getLongSequenceNumber());
+//                details.setBusinessFormId(lending.getId());
+//                details.setBusinessFormCode(lending.getBusinessFormCode());
+//                details.setBusinessFormName("鍒嗗彂鍗曪細" + lending.getBusinessFormCode());
+//                details.setInitialCount(result.getInitial_count());
+//                details.setThisType(2);
+//                details.setThisCount(result.getInitial_count() - result.getEnd_count());
+//                details.setEndCount(result.getEnd_count());
+//                details.setWarehouseId(result.getWhGoods().getWarehouseId());
+//                details.setWarehouseName(result.getWhGoods().getWarehouseName());
+//                details.setClassification(11);
+//                details.setOperatorId(lending.getOperatorId());
+//                details.setOperatorName(lending.getOperatorName());
+//                details.setDealTime(lending.getDealTime());
+//                details.setWhGoodsId(result.getWhGoods().getId());
+//                this.insert(details);
+//
+//                //鍥炲~鍑哄簱娴佹按ID锛岀敤浜庡垎鍙戞椂浣跨敤
+//                result.setWh_goods_detail_id(details.getId());
+//            }
+//
+//            CheckUsingParam usingParam = new CheckUsingParam();
+//            usingParam.setIsCheckIn(true);
+//            usingParam.setInput_type(1);
+//            usingParam.setOutputList(results);
+//
+//            List<CheckUsingResult> usingResults = coreService.unifyUsingCheck(usingParam);
+//            for (CheckUsingResult usingResult : usingResults) {
+//                UsingGoodsHis his  = new UsingGoodsHis();
+//                his.setId(NumberGenerator.getLongSequenceNumber());
+//                his.setBusinessFormId(lending.getId());
+//                his.setBusinessFormCode(lending.getBusinessFormCode());
+//                his.setBusinessFormName("鍒嗗彂鍗曪細" + lending.getBusinessFormCode());
+//                his.setClassification(1);
+//                his.setOperatorId(lending.getOperatorId());
+//                his.setOperatorName(lending.getOperatorName());
+//                his.setDealTime(lending.getDealTime());
+//                his.setDepFormLendingModelId(usingResult.getLendingModel().getId());
+//                his.setDepFormLendingGoodsId(usingResult.getLendingModel().getDepFormLendingGoodsId());
+//                his.setDepFormLendingId(lending.getId());
+//                his.setWhGoodsId(usingResult.getLendingModel().getWhGoodsId());
+//                his.setInitialCount(usingResult.getInitial_count());
+//                his.setEndCount(usingResult.getEnd_count());
+//                his.setWarehouseId(lending.getWarehouseId());
+//                his.setWarehouseName(lending.getWarehouseName());
+//                his.setDepartmentId(lending.getDepartmentId());
+//                his.setDepartmentName(lending.getDepartmentName());
+//                insert(his);
+//            }
+//        }
+//    }
+//
+//    public void doDepScrapped(String dep_form_scrapped_id){
+//
+//        DepFormScrapped scrapped = get(new DepFormScrapped(),"ID=?",new Object[]{dep_form_scrapped_id});
+//
+//        String sql = "SELECT\n" +
+//                "	B.*,\n" +
+//                "	A.SCRAPPED_COUNTS, \n" +
+//                "	A.ID AS DEP_FORM_SCRAPPED_GOODS_ID \n" +
+//                "FROM\n" +
+//                "	DEP_FORM_SCRAPPED_GOODS A\n" +
+//                "	LEFT JOIN DEP_FORM_LENDING_GOODS B ON A.DEP_FORM_LENDING_GOODS_ID = B.ID \n" +
+//                "WHERE\n" +
+//                "	A.DEP_FORM_SCRAPPED_ID = :DEP_FORM_SCRAPPED_ID \n" +
+//                "	AND A.WAREHOUSE_ID = B.WAREHOUSE_ID \n" +
+//                "	AND A.WAREHOUSE_ID = :WAREHOUSE_ID";
+//
+//        List<Map> list = select(sql,new SqlParameter("DEP_FORM_SCRAPPED_ID",scrapped.getId()).add("WAREHOUSE_ID",scrapped.getWarehouseId()));
+//        for (Map _map : list) {
+//            SuperMap map = new SuperMap(_map);
+//
+//            CheckUsingParam param = new CheckUsingParam();
+//            param.setIsCheckIn(false);
+//            param.setOutputCount(map.getInteger("SCRAPPED_COUNTS"));
+//            param.setLending_id(map.getLong("DEP_FORM_LENDING_ID"));
+//            param.setModel_id(map.getLong("BASE_GOODS_MODELS_ID"));
+//            param.setUser_name(map.getString("GOODS_USER_NAME"));
+//
+//            List<CheckUsingResult> resultList = coreService.unifyUsingCheck(param);
+//
+//            for (CheckUsingResult result : resultList) {
+//
+//                //瀛樺叆鍦ㄧ敤娴佹按
+//                UsingGoodsHis his  = new UsingGoodsHis();
+//                his.setId(NumberGenerator.getLongSequenceNumber());
+//                his.setBusinessFormId(scrapped.getId());
+//                his.setBusinessFormCode(scrapped.getBusinessFormCode());
+//                his.setBusinessFormName("閮ㄩ棬鎶ュ簾鍗曪細" + scrapped.getBusinessFormCode());
+//                his.setClassification(4);
+//                his.setOperatorId(scrapped.getOperatorId());
+//                his.setOperatorName(scrapped.getOperatorName());
+//                his.setDealTime(scrapped.getDealTime());
+//                his.setDepFormLendingModelId(result.getLendingModel().getId());
+//                his.setDepFormLendingGoodsId(result.getLendingModel().getDepFormLendingGoodsId());
+//                his.setDepFormLendingId(result.getLendingModel().getDepFormLendingId());
+//                his.setWhGoodsId(result.getLendingModel().getWhGoodsId());
+//                his.setInitialCount(result.getInitial_count());
+//                his.setEndCount(result.getEnd_count());
+//                his.setWarehouseId(scrapped.getWarehouseId());
+//                his.setWarehouseName(scrapped.getWarehouseName());
+//                his.setDepartmentId(scrapped.getDepartmentId());
+//                his.setDepartmentName(scrapped.getDepartmentName());
+//                insert(his);
+//
+//
+//                DepFormScrappedModel model = new DepFormScrappedModel();
+//                model.setId(NumberGenerator.getLongSequenceNumber());
+//                model.setDepFormScrappedGoodsId(map.getLong("DEP_FORM_SCRAPPED_GOODS_ID"));
+//                model.setScrappedCode(map.getString("SCRAPPED_CODE"));
+//                model.setScrappedName(map.getString("SCRAPPED_NAME"));
+//                model.setUsingGoodsHisId(his.getId());
+//                model.setDepFormScrappedId(scrapped.getId());
+//                model.setWhGoodsId(his.getWhGoodsId());
+//                model.setScrappedCounts(his.getThisCount());
+//                model.setInitCount(his.getInitialCount());
+//                model.setDepFormLendingModelId(his.getDepFormLendingModelId());
+//                model.setDepFormLendingGoodsId(his.getDepFormLendingGoodsId());
+//                model.setDepFormLendingId(his.getDepFormLendingId());
+//                insert(model);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * 鐢ㄤ簬鍙樻洿鐗╁搧浣跨敤浜哄悗锛屾洿鏂板簱瀛樼墿鍝佷娇鐢ㄤ汉淇℃伅銆�
+//     * @param dep_form_lending_goods_user_id
+//     */
+//    public void changeUser(Long dep_form_lending_goods_user_id){
+//        DepFormLendingGoodsUser user = get(new DepFormLendingGoodsUser(),"ID=?",new Object[]{dep_form_lending_goods_user_id});
+//        DepFormLendingGoods goods = get(new DepFormLendingGoods(),"ID=?",new Object[]{user.getDepFormLendingGoodsId()});
+//
+//
+//        String sql =
+//                "UPDATE DEP_FORM_LENDING_MODEL \n" +
+//                        "SET NOW_USER_NAME =:NOW_USER_NAME,\n" +
+//                        "NOW_USER_PHONE =:NOW_USER_PHONE \n" +
+//                        "WHERE\n" +
+//                        "	DEP_FORM_LENDING_GOODS_ID =:DEP_FORM_LENDING_GOODS_ID \n" +
+//                        "	AND BASE_GOODS_MODELS_ID =:BASE_GOODS_MODELS_ID \n" +
+//                        "	AND NOW_USER_NAME =:OLD_USER_NAME\n" +
+//                        "	AND USING_COUNT > 0";
+//
+//        List<SqlParameter> parameterList = new ArrayList<>();
+//        List<DepFormLendingModel> modelList = select(new DepFormLendingModel(),"DEP_FORM_LENDING_GOODS_ID=?",new Object[]{goods.getId()});
+//        for (DepFormLendingModel model : modelList) {
+//            if (model.getUsingCount() == 0) continue;
+//            SqlParameter parameter = new SqlParameter();
+//            parameter.add("NOW_USER_NAME",user.getNowUserName())
+//                    .add("NOW_USER_PHONE",user.getNowUserPhone())
+//                    .add("DEP_FORM_LENDING_GOODS_ID",goods.getId())
+//                    .add("BASE_GOODS_MODELS_ID",goods.getBaseGoodsModelsId())
+//                    .add("OLD_USER_NAME",goods.getGoodsUserName());
+//            parameterList.add(parameter);
+//        }
+//        execBatchUpdate(sql,parameterList);
+//    }
+//}
diff --git a/consum-base/src/main/java/com/consum/base/pojo/LDeptFormScrappedParam.java b/consum-base/src/main/java/com/consum/base/pojo/LDeptFormScrappedParam.java
new file mode 100644
index 0000000..9dc76c5
--- /dev/null
+++ b/consum-base/src/main/java/com/consum/base/pojo/LDeptFormScrappedParam.java
@@ -0,0 +1,55 @@
+package com.consum.base.pojo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel(value = "鏂板鎶ュ簾鍗曚俊鎭�")
+public class LDeptFormScrappedParam {
+
+    @ApiModelProperty(value = "閮ㄩ棬id")
+    private Long departmentId;
+
+    @ApiModelProperty(value = "閮ㄩ棬ID")
+    private Long outWarehouseId;
+
+    /**
+     * 鎶ュ簾鏃堕棿
+     */
+    @ApiModelProperty(value = "鎶ュ簾鏃堕棿")
+    private Long dealTime;
+    /**
+     * 鎵嬬画
+     */
+    @ApiModelProperty(value = "鎵嬬画")
+    private String procureDoc;
+
+
+
+    /**
+     * 鏈烘瀯id
+     */
+    @ApiModelProperty(value = "鏈烘瀯id")
+    private Long agencyId;
+
+    /**
+     * 浠撳簱缂栧彿
+     */
+    @ApiModelProperty(value = "浠撳簱缂栧彿")
+    private Long warehouseId;
+    /**
+     * 鎿嶄綔浜�
+     */
+    @ApiModelProperty(value = "鎿嶄綔浜�")
+    private Long operatorId;
+
+
+
+    @ApiModelProperty(value = "鎶ュ簾鍟嗗搧淇℃伅")
+    private List<LWhFormScrappedGoodsInfoParam> scrappedGoodsInfo;
+
+
+}
diff --git a/consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java b/consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java
index dec3830..229a3fa 100644
--- a/consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java
+++ b/consum-base/src/main/java/com/consum/base/pojo/query/LWhLedgerQry.java
@@ -31,7 +31,7 @@
 
     @ApiModelProperty("鐗╁搧鍚嶇О")
     private String goodsTemplateName;
-    private String goodsTemplateId;
+    private Long goodsTemplateId;
 
     @ApiModelProperty("鍒嗙被")
     private Long categoryId;
diff --git a/consum-base/src/main/java/com/consum/base/pojo/query/LWhProcureModelQry.java b/consum-base/src/main/java/com/consum/base/pojo/query/LWhProcureModelQry.java
new file mode 100644
index 0000000..871c225
--- /dev/null
+++ b/consum-base/src/main/java/com/consum/base/pojo/query/LWhProcureModelQry.java
@@ -0,0 +1,28 @@
+package com.consum.base.pojo.query;
+
+import com.walker.web.param.ParamRequest;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @ClassName LWhProcureModelQry
+ * @Author cy
+ * @Date 2023/11/30
+ * @Description
+ * @Version 1.0
+ **/
+@Data
+@ApiModel(value = "鍙傛暟")
+public class LWhProcureModelQry extends ParamRequest {
+
+    @ApiModelProperty("鐗╁搧鍚嶇О")
+    private String goodsTemplateName;
+    private Long baseGoodsTemplateId;
+
+    @ApiModelProperty("閮ㄩ棬ID")
+    private Long departmentId;
+
+    @ApiModelProperty("鍒嗗彂鍗旾D")
+    private Long transBusinessId;
+}
diff --git a/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java
index 29710be..5fb144f 100644
--- a/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java
+++ b/consum-base/src/main/java/com/consum/base/service/LWhFormScrappedServiceImpl.java
@@ -15,30 +15,20 @@
 import com.consum.base.pojo.response.FormScrappedGoodsVO;
 import com.consum.base.pojo.response.GoodsModelVO;
 import com.consum.base.pojo.response.LWhFormScrappedExtendVO;
-import com.consum.model.po.BaseGoodsModels;
-import com.consum.model.po.BaseGoodsTemplate;
-import com.consum.model.po.BaseWarehouse;
-import com.consum.model.po.FinSysTenantDepartment;
-import com.consum.model.po.FinSysTenantUser;
-import com.consum.model.po.LWhFormScrapped;
-import com.consum.model.po.LWhFormScrappedGoods;
-import com.consum.model.po.SDictData;
+import com.consum.model.po.*;
 import com.iplatform.model.po.S_user_core;
 import com.walker.db.page.GenericPager;
 import com.walker.infrastructure.utils.StringUtils;
 import com.walker.jdbc.service.BaseServiceImpl;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.stream.Collectors;
 import org.apache.commons.compress.utils.Lists;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.util.CollectionUtils;
+
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * @Description 鎶ュ簾鍗�
@@ -82,38 +72,46 @@
      * @return 1.鏂板鎶ュ簾鍗�  2.鏂板鎶ュ簾鍗曠墿鍝�
      */
 
-    public int add(LWhFormScrappedParam param, int warehouseType, S_user_core currentUser, FinSysTenantUser sysInfo) {
+    public int add(LWhFormScrappedParam param,  S_user_core currentUser, FinSysTenantUser sysInfo) {
         //1.鏂板鎶ュ簾鍗曡褰�
         LWhFormScrapped lWhFormScrapped = new LWhFormScrapped();
         //鎶ュ簾鍗昳d
         long lWhFormScrappedId = IdUtil.generateId();
         lWhFormScrapped.setId(lWhFormScrappedId);
         lWhFormScrapped.setBusinessFormCode(codeGeneratorService.createBusinessFormCode(CodeGeneratorEnum.Scrapped));
-        lWhFormScrapped.setWarehouseType(warehouseType);
+        lWhFormScrapped.setWarehouseType(0);
 
         // 鍏敤
         Long warehouseId = null;
         //浠撳簱鍚嶇О
         String wareHouseName = null;
-        if (warehouseType == 0) {
-            warehouseId = param.getWarehouseId();
-            //鏍规嵁浠撳簱id鏌ヨ浠撳簱
-            BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId);
-            if (warehouse == null) {
-                log.error("浠撳簱涓嶅瓨鍦�");
-                return 0;
-            }
-            wareHouseName = warehouse.getWarehouseName();
-        } else {
-            // 鏌ヨ閮ㄩ棬鍚嶇О
-            warehouseId = param.getDepartmentId();
-            FinSysTenantDepartment sysTenantDepartment = departmentService.getById(warehouseId);
-            if (sysTenantDepartment == null) {
-                log.error("閮ㄩ棬涓嶅瓨鍦�");
-                return 0;
-            }
-            wareHouseName = sysTenantDepartment.getName();
+        warehouseId = param.getWarehouseId();
+        //鏍规嵁浠撳簱id鏌ヨ浠撳簱
+        BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId);
+        if (warehouse == null) {
+            log.error("浠撳簱涓嶅瓨鍦�");
+            return 0;
         }
+        wareHouseName = warehouse.getWarehouseName();
+//        if (0 == 0) {
+//            warehouseId = param.getWarehouseId();
+//            //鏍规嵁浠撳簱id鏌ヨ浠撳簱
+//            BaseWarehouse warehouse = this.baseWarehouseService.getById(warehouseId);
+//            if (warehouse == null) {
+//                log.error("浠撳簱涓嶅瓨鍦�");
+//                return 0;
+//            }
+//            wareHouseName = warehouse.getWarehouseName();
+//        } else {
+//            // 鏌ヨ閮ㄩ棬鍚嶇О
+//            warehouseId = param.getDepartmentId();
+//            FinSysTenantDepartment sysTenantDepartment = departmentService.getById(warehouseId);
+//            if (sysTenantDepartment == null) {
+//                log.error("閮ㄩ棬涓嶅瓨鍦�");
+//                return 0;
+//            }
+//            wareHouseName = sysTenantDepartment.getName();
+//        }
         lWhFormScrapped.setWarehouseId(warehouseId);
         lWhFormScrapped.setWarehouseName(wareHouseName);
         lWhFormScrapped.setAgencyId(Long.valueOf(sysInfo.getTenantId()));
@@ -167,7 +165,7 @@
                 LWhFormScrappedGoods scrappedGoods = new LWhFormScrappedGoods();
                 scrappedGoods.setId(IdUtil.generateId());
                 //鏍规嵁鐗╁搧鍨嬪彿鏌ヨ鐗╁搧搴撳瓨
-                int goodsNum = this.lWhGoodsService.queryGoodsModelNum(warehouseType, warehouseId, scrappedGoods.getBaseGoodsModelsId(), 1, null);
+                int goodsNum = this.lWhGoodsService.queryGoodsModelNum(0, warehouseId, scrappedGoods.getBaseGoodsModelsId(), 1, null);
                 if (params.getCounts() > goodsNum) {
                     log.error("鎶ュ簾鏁伴噺澶т簬搴撳瓨鏁伴噺");
                     return 0;
diff --git a/consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java
index 0d11dcc..50e486f 100644
--- a/consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java
+++ b/consum-base/src/main/java/com/consum/base/service/LWhFormTransferServiceImpl.java
@@ -15,29 +15,19 @@
 import com.consum.base.pojo.response.FormTransferGoodsVO;
 import com.consum.base.pojo.response.GoodsModelVO;
 import com.consum.base.pojo.response.LWHFromTransferExtendVO;
-import com.consum.model.po.BaseWarehouse;
-import com.consum.model.po.BaseWarehouseManager;
-import com.consum.model.po.FinSysTenant;
-import com.consum.model.po.FinSysTenantUser;
-import com.consum.model.po.LWhFormTransfer;
-import com.consum.model.po.LWhProcureModel;
-import com.consum.model.po.LWhProcureModelUser;
-import com.consum.model.po.LWhProcureModelUserRecord;
+import com.consum.model.po.*;
 import com.walker.db.page.GenericPager;
 import com.walker.infrastructure.utils.DateUtils;
 import com.walker.infrastructure.utils.StringUtils;
 import com.walker.jdbc.service.BaseServiceImpl;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
 import org.apache.commons.compress.utils.Lists;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.util.CollectionUtils;
+
+import java.util.*;
 
 /**
  * @Description 璋冩嫧绠$悊
@@ -201,6 +191,7 @@
                     lWhProcureModel.setBusinessType(4);
                 }
                 lWhProcureModel.setCounts(model.getCounts());
+                lWhProcureModel.setUseCount(model.getCounts());
                 lWhProcureModel.setBusinessId(lWhFormTransferId);
                 lWhProcureModel.setBaseGoodsModelsId(baseGoodsModelsId);
                 //鏍规嵁鍨嬪彿id鏌ヨ鍨嬪彿
@@ -233,6 +224,7 @@
                         lWhProcureModelUser.setNowUserName(lWhProcureModelUserParam.getNowUserName());
                         lWhProcureModelUser.setNowUserPhone(lWhProcureModelUserParam.getNowUserPhone());
                         lWhProcureModelUser.setGoodsNum(lWhProcureModelUserParam.getGoodsNum());
+                        lWhProcureModelUser.setUseCount(lWhProcureModelUser.getGoodsNum());
                         lWhProcureModelUser.setProcureModelUserRecordId(lWhProcureModelUserRecord.getId());
                         procureModelUserList.add(lWhProcureModelUser);
                     }
diff --git a/consum-base/src/main/java/com/consum/base/service/LWhProcureModelService.java b/consum-base/src/main/java/com/consum/base/service/LWhProcureModelService.java
index 83e813c..5b8b6e3 100644
--- a/consum-base/src/main/java/com/consum/base/service/LWhProcureModelService.java
+++ b/consum-base/src/main/java/com/consum/base/service/LWhProcureModelService.java
@@ -1,16 +1,17 @@
 package com.consum.base.service;
 
 import com.consum.base.core.WhBusinessEnum;
+import com.consum.base.core.utils.MapperUtil;
 import com.consum.model.po.LWhProcureModel;
 import com.walker.jdbc.service.BaseServiceImpl;
 import org.springframework.stereotype.Service;
 
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @ClassName LWhProcureModelService
-
  * @Date 2023/10/24
  * @Description
  * @Version 1.0
@@ -39,4 +40,50 @@
         }
         return this.select(sql.toString(), paramts, new LWhProcureModel());
     }
+
+    /**
+     * 鏍规嵁閮ㄩ棬銆佺墿鍝佹煡璇㈣皟鎷ㄥ崟
+     *
+     * @param goodsTemplateId 鐗╁搧ID
+     * @param departmentId 閮ㄩ棬ID
+     * @return
+     */
+    private static String GET_FF_ORDER_BY_GOODS_ID_AND_DEPT = "SELECT trans.ID TRANS_BUSINESS_ID,trans.BUSINESS_FORM_CODE,baseTemp.ID BASE_GOODS_TEMPLATE_ID,baseTemp.GOODS_NAME BASE_GOODS_TEMPLATE_NAME,sum(proModel.COUNTS) total_count,sum(proModel.USE_COUNT) use_count,trans.IN_TIME FROM L_WH_FORM_TRANSFER trans LEFT JOIN L_WH_PROCURE_MODEL proModel ON proModel.BUSINESS_ID=trans.id LEFT JOIN BASE_GOODS_MODELS baseModel ON proModel.BASE_GOODS_MODELS_ID=baseModel.id LEFT JOIN BASE_GOODS_TEMPLATE baseTemp ON baseTemp.id=baseModel.GOODS_TEMPLATES_ID WHERE proModel.BUSINESS_TYPE=4 AND proModel.USE_COUNT> 0 ";
+    private static String GET_FF_ORDER_BY_GOODS_ID_AND_DEPT_END = " GROUP BY trans.ID,trans.BUSINESS_FORM_CODE,baseTemp.ID,baseTemp.GOODS_NAME,trans.IN_TIME";
+
+    public List<Map<String, Object>> getFfOrderByGoodsIdAndDept(Long goodsTemplateId, Long departmentId) {
+        StringBuilder sql = new StringBuilder(GET_FF_ORDER_BY_GOODS_ID_AND_DEPT);
+        HashMap<String, Object> paramts = new HashMap<>();
+        //椤圭洰闃舵id
+        if (goodsTemplateId != null) {
+            sql.append(" AND baseTemp.ID=:goodsTemplateId ");
+            paramts.put("goodsTemplateId", goodsTemplateId);
+        }
+        if (departmentId != null) {
+            sql.append(" AND trans.IN_WAREHOUSE_TYPE=1 and trans.IN_WAREHOUSE_ID=:departmentId ");
+            paramts.put("departmentId", departmentId);
+        }
+        return select(sql.append(GET_FF_ORDER_BY_GOODS_ID_AND_DEPT_END).toString(), paramts, new MapperUtil());
+    }  /**
+     * 鏍规嵁閮ㄩ棬銆佺墿鍝佹煡璇㈣皟鎷ㄥ崟
+     *
+     * @param goodsTemplateId 鐗╁搧ID
+     * @param departmentId 鍒嗗彂鍗旾D
+     * @return
+     */
+    private static String GET_GOODS_USE_INFO_BY_FF_ORDER_AND_GOOD_ID = "SELECT baseModel.GOODS_TEMPLATES_ID,proModel.BASE_GOODS_MODELS_ID,baseModel.MODEL_NAME,baseModel.UNIT,CONCAT(baseCate.CLASSIFICATION,'绫�') CLASSIFICATION,modelUser.id MODEL_USER_id,modelUser.NOW_USER_PHONE,modelUser.NOW_USER_NAME,CASE WHEN modelUser.id IS NULL THEN proModel.USE_COUNT ELSE modelUser.USE_COUNT END AS user_Use_Count,CASE WHEN modelUser.id IS NULL THEN proModel.COUNTS ELSE modelUser.GOODS_NUM END AS GOODS_NUM FROM L_WH_PROCURE_MODEL proModel LEFT JOIN BASE_GOODS_MODELS baseModel ON proModel.BASE_GOODS_MODELS_ID=baseModel.id LEFT JOIN BASE_GOODS_TEMPLATE baseTemp ON baseTemp.id=baseModel.GOODS_TEMPLATES_ID LEFT JOIN BASE_CATEGORY baseCate ON baseCate.id=baseTemp.CATEGORY_ID LEFT JOIN L_WH_PROCURE_MODEL_USER modelUser ON modelUser.WH_PROCURE_MODEL_ID=proModel.id WHERE proModel.BUSINESS_TYPE=4 AND proModel.USE_COUNT> 0 ";
+
+    public List<Map<String, Object>> getGoodsUseInfoByFfOrderAndGoodId(Long goodsTemplateId, Long transBusinessId) {
+        StringBuilder sql = new StringBuilder(GET_GOODS_USE_INFO_BY_FF_ORDER_AND_GOOD_ID);
+        HashMap<String, Object> paramts = new HashMap<>();
+        if (goodsTemplateId != null) {
+            sql.append(" AND baseModel.GOODS_TEMPLATES_ID=:goodsTemplateId ");
+            paramts.put("goodsTemplateId", goodsTemplateId);
+        }
+        if (transBusinessId != null) {
+            sql.append(" AND proModel.BUSINESS_ID=:transBusinessId ");
+            paramts.put("transBusinessId", transBusinessId);
+        }
+        return select(sql.toString(), paramts, new MapperUtil());
+    }
 }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped.java
index 96ff69a..370cfd9 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped.java
@@ -6,7 +6,8 @@
 import com.walker.jdbc.BasePo;
 
 /**
- * 琛ㄥ悕:DEP_FORM_SCRAPPED *
+ * 琛ㄥ悕:DEP_FORM_SCRAPPED
+ *
  * @author genrator
  */
 @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
@@ -24,13 +25,21 @@
     @JsonIgnore
     protected boolean isset_businessFormCode = false;
 
-    private Long agencyId = null;
+    private String procureDoc = null;
     @JsonIgnore
-    protected boolean isset_agencyId = false;
+    protected boolean isset_procureDoc = false;
 
-    private String agencyName = null;
+    private Integer outWarehouseType = null;
     @JsonIgnore
-    protected boolean isset_agencyName = false;
+    protected boolean isset_outWarehouseType = false;
+
+    private Long outWarehouseId = null;
+    @JsonIgnore
+    protected boolean isset_outWarehouseId = false;
+
+    private String outWarehouseName = null;
+    @JsonIgnore
+    protected boolean isset_outWarehouseName = false;
 
     private Long operatorId = null;
     @JsonIgnore
@@ -52,41 +61,17 @@
     @JsonIgnore
     protected boolean isset_departmentName = false;
 
-    private Long reviewerId = null;
+    private Long createTime = null;
     @JsonIgnore
-    protected boolean isset_reviewerId = false;
+    protected boolean isset_createTime = false;
 
-    private String reviewerName = null;
+    private Integer states = null;
     @JsonIgnore
-    protected boolean isset_reviewerName = false;
-
-    private Long reviewDate = null;
-    @JsonIgnore
-    protected boolean isset_reviewDate = false;
-
-    private Integer reviewStates = null;
-    @JsonIgnore
-    protected boolean isset_reviewStates = false;
+    protected boolean isset_states = false;
 
     private String beiz = null;
     @JsonIgnore
     protected boolean isset_beiz = false;
-
-    private String beiz2 = null;
-    @JsonIgnore
-    protected boolean isset_beiz2 = false;
-
-    private String uploadFiles = null;
-    @JsonIgnore
-    protected boolean isset_uploadFiles = false;
-
-    private Long warehouseId = null;
-    @JsonIgnore
-    protected boolean isset_warehouseId = false;
-
-    private String warehouseName = null;
-    @JsonIgnore
-    protected boolean isset_warehouseName = false;
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -137,32 +122,60 @@
         return this.businessFormCode == null || this.businessFormCode.length() == 0;
     }
 
-    public Long getAgencyId() {
-        return this.agencyId;
+    public String getProcureDoc() {
+        return this.procureDoc;
     }
 
-    public void setAgencyId(Long agencyId) {
-        this.agencyId = agencyId;
-        this.isset_agencyId = true;
+    public void setProcureDoc(String procureDoc) {
+        this.procureDoc = procureDoc;
+        this.isset_procureDoc = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyAgencyId() {
-        return this.agencyId == null;
+    public boolean isEmptyProcureDoc() {
+        return this.procureDoc == null || this.procureDoc.length() == 0;
     }
 
-    public String getAgencyName() {
-        return this.agencyName;
+    public Integer getOutWarehouseType() {
+        return this.outWarehouseType;
     }
 
-    public void setAgencyName(String agencyName) {
-        this.agencyName = agencyName;
-        this.isset_agencyName = true;
+    public void setOutWarehouseType(Integer outWarehouseType) {
+        this.outWarehouseType = outWarehouseType;
+        this.isset_outWarehouseType = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyAgencyName() {
-        return this.agencyName == null || this.agencyName.length() == 0;
+    public boolean isEmptyOutWarehouseType() {
+        return this.outWarehouseType == null;
+    }
+
+    public Long getOutWarehouseId() {
+        return this.outWarehouseId;
+    }
+
+    public void setOutWarehouseId(Long outWarehouseId) {
+        this.outWarehouseId = outWarehouseId;
+        this.isset_outWarehouseId = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyOutWarehouseId() {
+        return this.outWarehouseId == null;
+    }
+
+    public String getOutWarehouseName() {
+        return this.outWarehouseName;
+    }
+
+    public void setOutWarehouseName(String outWarehouseName) {
+        this.outWarehouseName = outWarehouseName;
+        this.isset_outWarehouseName = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyOutWarehouseName() {
+        return this.outWarehouseName == null || this.outWarehouseName.length() == 0;
     }
 
     public Long getOperatorId() {
@@ -235,60 +248,32 @@
         return this.departmentName == null;
     }
 
-    public Long getReviewerId() {
-        return this.reviewerId;
+    public Long getCreateTime() {
+        return this.createTime;
     }
 
-    public void setReviewerId(Long reviewerId) {
-        this.reviewerId = reviewerId;
-        this.isset_reviewerId = true;
+    public void setCreateTime(Long createTime) {
+        this.createTime = createTime;
+        this.isset_createTime = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyReviewerId() {
-        return this.reviewerId == null;
+    public boolean isEmptyCreateTime() {
+        return this.createTime == null;
     }
 
-    public String getReviewerName() {
-        return this.reviewerName;
+    public Integer getStates() {
+        return this.states;
     }
 
-    public void setReviewerName(String reviewerName) {
-        this.reviewerName = reviewerName;
-        this.isset_reviewerName = true;
+    public void setStates(Integer states) {
+        this.states = states;
+        this.isset_states = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyReviewerName() {
-        return this.reviewerName == null || this.reviewerName.length() == 0;
-    }
-
-    public Long getReviewDate() {
-        return this.reviewDate;
-    }
-
-    public void setReviewDate(Long reviewDate) {
-        this.reviewDate = reviewDate;
-        this.isset_reviewDate = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyReviewDate() {
-        return this.reviewDate == null;
-    }
-
-    public Integer getReviewStates() {
-        return this.reviewStates;
-    }
-
-    public void setReviewStates(Integer reviewStates) {
-        this.reviewStates = reviewStates;
-        this.isset_reviewStates = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyReviewStates() {
-        return this.reviewStates == null;
+    public boolean isEmptyStates() {
+        return this.states == null;
     }
 
     public String getBeiz() {
@@ -305,62 +290,6 @@
         return this.beiz == null || this.beiz.length() == 0;
     }
 
-    public String getBeiz2() {
-        return this.beiz2;
-    }
-
-    public void setBeiz2(String beiz2) {
-        this.beiz2 = beiz2;
-        this.isset_beiz2 = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyBeiz2() {
-        return this.beiz2 == null || this.beiz2.length() == 0;
-    }
-
-    public String getUploadFiles() {
-        return this.uploadFiles;
-    }
-
-    public void setUploadFiles(String uploadFiles) {
-        this.uploadFiles = uploadFiles;
-        this.isset_uploadFiles = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyUploadFiles() {
-        return this.uploadFiles == null || this.uploadFiles.length() == 0;
-    }
-
-    public Long getWarehouseId() {
-        return this.warehouseId;
-    }
-
-    public void setWarehouseId(Long warehouseId) {
-        this.warehouseId = warehouseId;
-        this.isset_warehouseId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyWarehouseId() {
-        return this.warehouseId == null;
-    }
-
-    public String getWarehouseName() {
-        return this.warehouseName;
-    }
-
-    public void setWarehouseName(String warehouseName) {
-        this.warehouseName = warehouseName;
-        this.isset_warehouseName = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyWarehouseName() {
-        return this.warehouseName == null || this.warehouseName.length() == 0;
-    }
-
     /**
      * 閲嶅啓 toString() 鏂规硶
      */
@@ -369,22 +298,18 @@
         return new StringBuilder()
                 .append("id=").append(this.id)
                 .append("businessFormCode=").append(this.businessFormCode)
-                .append("agencyId=").append(this.agencyId)
-                .append("agencyName=").append(this.agencyName)
+                .append("procureDoc=").append(this.procureDoc)
+                .append("outWarehouseType=").append(this.outWarehouseType)
+                .append("outWarehouseId=").append(this.outWarehouseId)
+                .append("outWarehouseName=").append(this.outWarehouseName)
                 .append("operatorId=").append(this.operatorId)
                 .append("operatorName=").append(this.operatorName)
                 .append("dealTime=").append(this.dealTime)
                 .append("departmentId=").append(this.departmentId)
                 .append("departmentName=").append(this.departmentName)
-                .append("reviewerId=").append(this.reviewerId)
-                .append("reviewerName=").append(this.reviewerName)
-                .append("reviewDate=").append(this.reviewDate)
-                .append("reviewStates=").append(this.reviewStates)
+                .append("createTime=").append(this.createTime)
+                .append("states=").append(this.states)
                 .append("beiz=").append(this.beiz)
-                .append("beiz2=").append(this.beiz2)
-                .append("uploadFiles=").append(this.uploadFiles)
-                .append("warehouseId=").append(this.warehouseId)
-                .append("warehouseName=").append(this.warehouseName)
                 .toString();
     }
 
@@ -392,66 +317,54 @@
      * 鍏嬮殕
      */
     public DepFormScrapped $clone() {
-        DepFormScrapped dep_form_scrapped = new DepFormScrapped();
+DepFormScrapped dep_form_scrapped = new DepFormScrapped();
 
         // 鏁版嵁搴撳悕绉�
         //dep_form_scrapped.setDatabaseName_(this.getDatabaseName_());
 
         // 涓婚敭
         if (this.isset_id) {
-            dep_form_scrapped.setId(this.getId());
+dep_form_scrapped.setId(this.getId());
         }
         // 鏅�氬睘鎬�
         if (this.isset_businessFormCode) {
-            dep_form_scrapped.setBusinessFormCode(this.getBusinessFormCode());
+dep_form_scrapped.setBusinessFormCode(this.getBusinessFormCode());
         }
-        if (this.isset_agencyId) {
-            dep_form_scrapped.setAgencyId(this.getAgencyId());
+        if (this.isset_procureDoc) {
+dep_form_scrapped.setProcureDoc(this.getProcureDoc());
         }
-        if (this.isset_agencyName) {
-            dep_form_scrapped.setAgencyName(this.getAgencyName());
+        if (this.isset_outWarehouseType) {
+dep_form_scrapped.setOutWarehouseType(this.getOutWarehouseType());
+        }
+        if (this.isset_outWarehouseId) {
+dep_form_scrapped.setOutWarehouseId(this.getOutWarehouseId());
+        }
+        if (this.isset_outWarehouseName) {
+dep_form_scrapped.setOutWarehouseName(this.getOutWarehouseName());
         }
         if (this.isset_operatorId) {
-            dep_form_scrapped.setOperatorId(this.getOperatorId());
+dep_form_scrapped.setOperatorId(this.getOperatorId());
         }
         if (this.isset_operatorName) {
-            dep_form_scrapped.setOperatorName(this.getOperatorName());
+dep_form_scrapped.setOperatorName(this.getOperatorName());
         }
         if (this.isset_dealTime) {
-            dep_form_scrapped.setDealTime(this.getDealTime());
+dep_form_scrapped.setDealTime(this.getDealTime());
         }
         if (this.isset_departmentId) {
-            dep_form_scrapped.setDepartmentId(this.getDepartmentId());
+dep_form_scrapped.setDepartmentId(this.getDepartmentId());
         }
         if (this.isset_departmentName) {
-            dep_form_scrapped.setDepartmentName(this.getDepartmentName());
+dep_form_scrapped.setDepartmentName(this.getDepartmentName());
         }
-        if (this.isset_reviewerId) {
-            dep_form_scrapped.setReviewerId(this.getReviewerId());
+        if (this.isset_createTime) {
+dep_form_scrapped.setCreateTime(this.getCreateTime());
         }
-        if (this.isset_reviewerName) {
-            dep_form_scrapped.setReviewerName(this.getReviewerName());
-        }
-        if (this.isset_reviewDate) {
-            dep_form_scrapped.setReviewDate(this.getReviewDate());
-        }
-        if (this.isset_reviewStates) {
-            dep_form_scrapped.setReviewStates(this.getReviewStates());
+        if (this.isset_states) {
+dep_form_scrapped.setStates(this.getStates());
         }
         if (this.isset_beiz) {
-            dep_form_scrapped.setBeiz(this.getBeiz());
-        }
-        if (this.isset_beiz2) {
-            dep_form_scrapped.setBeiz2(this.getBeiz2());
-        }
-        if (this.isset_uploadFiles) {
-            dep_form_scrapped.setUploadFiles(this.getUploadFiles());
-        }
-        if (this.isset_warehouseId) {
-            dep_form_scrapped.setWarehouseId(this.getWarehouseId());
-        }
-        if (this.isset_warehouseName) {
-            dep_form_scrapped.setWarehouseName(this.getWarehouseName());
+dep_form_scrapped.setBeiz(this.getBeiz());
         }
         return dep_form_scrapped;
     }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods.java
index 0628cd2..77ff1f4 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods.java
@@ -6,7 +6,8 @@
 import com.walker.jdbc.BasePo;
 
 /**
- * 琛ㄥ悕:DEP_FORM_SCRAPPED_GOODS *
+ * 琛ㄥ悕:DEP_FORM_SCRAPPED_GOODS
+ *
  * @author genrator
  */
 @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
@@ -20,41 +21,41 @@
     protected boolean isset_id = false;
 
     // 灞炴�у垪琛�
-    private Integer scrappedCounts = null;
-    @JsonIgnore
-    protected boolean isset_scrappedCounts = false;
-
-    private Integer initCount = null;
-    @JsonIgnore
-    protected boolean isset_initCount = false;
-
     private Long depFormScrappedId = null;
     @JsonIgnore
     protected boolean isset_depFormScrappedId = false;
 
-    private String beiz = null;
+    private Long baseGoodsTemplateId = null;
     @JsonIgnore
-    protected boolean isset_beiz = false;
+    protected boolean isset_baseGoodsTemplateId = false;
 
-    private String scrappedCode = null;
+    private String baseGoodsTemplateName = null;
     @JsonIgnore
-    protected boolean isset_scrappedCode = false;
+    protected boolean isset_baseGoodsTemplateName = false;
 
-    private String scrappedName = null;
+    private String categoryName = null;
     @JsonIgnore
-    protected boolean isset_scrappedName = false;
+    protected boolean isset_categoryName = false;
 
-    private Long depFormLendingGoodsId = null;
+    private String classification = null;
     @JsonIgnore
-    protected boolean isset_depFormLendingGoodsId = false;
+    protected boolean isset_classification = false;
 
-    private Long depFormLendingId = null;
+    private Long transBusinessId = null;
     @JsonIgnore
-    protected boolean isset_depFormLendingId = false;
+    protected boolean isset_transBusinessId = false;
 
-    private Long warehouseId = null;
+    private String businessFormCode = null;
     @JsonIgnore
-    protected boolean isset_warehouseId = false;
+    protected boolean isset_businessFormCode = false;
+
+    private Integer transOutWarehouseType = null;
+    @JsonIgnore
+    protected boolean isset_transOutWarehouseType = false;
+
+    private Long transOutWarehouseId = null;
+    @JsonIgnore
+    protected boolean isset_transOutWarehouseId = false;
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -91,34 +92,6 @@
         return this.id == null;
     }
 
-    public Integer getScrappedCounts() {
-        return this.scrappedCounts;
-    }
-
-    public void setScrappedCounts(Integer scrappedCounts) {
-        this.scrappedCounts = scrappedCounts;
-        this.isset_scrappedCounts = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyScrappedCounts() {
-        return this.scrappedCounts == null;
-    }
-
-    public Integer getInitCount() {
-        return this.initCount;
-    }
-
-    public void setInitCount(Integer initCount) {
-        this.initCount = initCount;
-        this.isset_initCount = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyInitCount() {
-        return this.initCount == null;
-    }
-
     public Long getDepFormScrappedId() {
         return this.depFormScrappedId;
     }
@@ -133,88 +106,116 @@
         return this.depFormScrappedId == null;
     }
 
-    public String getBeiz() {
-        return this.beiz;
+    public Long getBaseGoodsTemplateId() {
+        return this.baseGoodsTemplateId;
     }
 
-    public void setBeiz(String beiz) {
-        this.beiz = beiz;
-        this.isset_beiz = true;
+    public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) {
+        this.baseGoodsTemplateId = baseGoodsTemplateId;
+        this.isset_baseGoodsTemplateId = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyBeiz() {
-        return this.beiz == null || this.beiz.length() == 0;
+    public boolean isEmptyBaseGoodsTemplateId() {
+        return this.baseGoodsTemplateId == null;
     }
 
-    public String getScrappedCode() {
-        return this.scrappedCode;
+    public String getBaseGoodsTemplateName() {
+        return this.baseGoodsTemplateName;
     }
 
-    public void setScrappedCode(String scrappedCode) {
-        this.scrappedCode = scrappedCode;
-        this.isset_scrappedCode = true;
+    public void setBaseGoodsTemplateName(String baseGoodsTemplateName) {
+        this.baseGoodsTemplateName = baseGoodsTemplateName;
+        this.isset_baseGoodsTemplateName = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyScrappedCode() {
-        return this.scrappedCode == null || this.scrappedCode.length() == 0;
+    public boolean isEmptyBaseGoodsTemplateName() {
+        return this.baseGoodsTemplateName == null || this.baseGoodsTemplateName.length() == 0;
     }
 
-    public String getScrappedName() {
-        return this.scrappedName;
+    public String getCategoryName() {
+        return this.categoryName;
     }
 
-    public void setScrappedName(String scrappedName) {
-        this.scrappedName = scrappedName;
-        this.isset_scrappedName = true;
+    public void setCategoryName(String categoryName) {
+        this.categoryName = categoryName;
+        this.isset_categoryName = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyScrappedName() {
-        return this.scrappedName == null || this.scrappedName.length() == 0;
+    public boolean isEmptyCategoryName() {
+        return this.categoryName == null || this.categoryName.length() == 0;
     }
 
-    public Long getDepFormLendingGoodsId() {
-        return this.depFormLendingGoodsId;
+    public String getClassification() {
+        return this.classification;
     }
 
-    public void setDepFormLendingGoodsId(Long depFormLendingGoodsId) {
-        this.depFormLendingGoodsId = depFormLendingGoodsId;
-        this.isset_depFormLendingGoodsId = true;
+    public void setClassification(String classification) {
+        this.classification = classification;
+        this.isset_classification = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyDepFormLendingGoodsId() {
-        return this.depFormLendingGoodsId == null;
+    public boolean isEmptyClassification() {
+        return this.classification == null || this.classification.length() == 0;
     }
 
-    public Long getDepFormLendingId() {
-        return this.depFormLendingId;
+    public Long getTransBusinessId() {
+        return this.transBusinessId;
     }
 
-    public void setDepFormLendingId(Long depFormLendingId) {
-        this.depFormLendingId = depFormLendingId;
-        this.isset_depFormLendingId = true;
+    public void setTransBusinessId(Long transBusinessId) {
+        this.transBusinessId = transBusinessId;
+        this.isset_transBusinessId = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyDepFormLendingId() {
-        return this.depFormLendingId == null;
+    public boolean isEmptyTransBusinessId() {
+        return this.transBusinessId == null;
     }
 
-    public Long getWarehouseId() {
-        return this.warehouseId;
+    public String getBusinessFormCode() {
+        return this.businessFormCode;
     }
 
-    public void setWarehouseId(Long warehouseId) {
-        this.warehouseId = warehouseId;
-        this.isset_warehouseId = true;
+    public void setBusinessFormCode(String businessFormCode) {
+        this.businessFormCode = businessFormCode;
+        this.isset_businessFormCode = true;
     }
 
     @JsonIgnore
-    public boolean isEmptyWarehouseId() {
-        return this.warehouseId == null;
+    public boolean isEmptyBusinessFormCode() {
+        return this.businessFormCode == null || this.businessFormCode.length() == 0;
+    }
+
+    public Integer getTransOutWarehouseType() {
+        return this.transOutWarehouseType;
+    }
+
+    public void setTransOutWarehouseType(Integer transOutWarehouseType) {
+        this.transOutWarehouseType = transOutWarehouseType;
+        this.isset_transOutWarehouseType = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyTransOutWarehouseType() {
+        return this.transOutWarehouseType == null;
+    }
+
+    public Long getTransOutWarehouseId() {
+        return this.transOutWarehouseId;
+    }
+
+    public void setTransOutWarehouseId(Long transOutWarehouseId) {
+        this.transOutWarehouseId = transOutWarehouseId;
+        this.isset_transOutWarehouseId = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyTransOutWarehouseId() {
+        return this.transOutWarehouseId == null;
     }
 
     /**
@@ -224,15 +225,15 @@
     public String toString() {
         return new StringBuilder()
                 .append("id=").append(this.id)
-                .append("scrappedCounts=").append(this.scrappedCounts)
-                .append("initCount=").append(this.initCount)
                 .append("depFormScrappedId=").append(this.depFormScrappedId)
-                .append("beiz=").append(this.beiz)
-                .append("scrappedCode=").append(this.scrappedCode)
-                .append("scrappedName=").append(this.scrappedName)
-                .append("depFormLendingGoodsId=").append(this.depFormLendingGoodsId)
-                .append("depFormLendingId=").append(this.depFormLendingId)
-                .append("warehouseId=").append(this.warehouseId)
+                .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId)
+                .append("baseGoodsTemplateName=").append(this.baseGoodsTemplateName)
+                .append("categoryName=").append(this.categoryName)
+                .append("classification=").append(this.classification)
+                .append("transBusinessId=").append(this.transBusinessId)
+                .append("businessFormCode=").append(this.businessFormCode)
+                .append("transOutWarehouseType=").append(this.transOutWarehouseType)
+                .append("transOutWarehouseId=").append(this.transOutWarehouseId)
                 .toString();
     }
 
@@ -250,32 +251,32 @@
             dep_form_scrapped_goods.setId(this.getId());
         }
         // 鏅�氬睘鎬�
-        if (this.isset_scrappedCounts) {
-            dep_form_scrapped_goods.setScrappedCounts(this.getScrappedCounts());
-        }
-        if (this.isset_initCount) {
-            dep_form_scrapped_goods.setInitCount(this.getInitCount());
-        }
         if (this.isset_depFormScrappedId) {
             dep_form_scrapped_goods.setDepFormScrappedId(this.getDepFormScrappedId());
         }
-        if (this.isset_beiz) {
-            dep_form_scrapped_goods.setBeiz(this.getBeiz());
+        if (this.isset_baseGoodsTemplateId) {
+            dep_form_scrapped_goods.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId());
         }
-        if (this.isset_scrappedCode) {
-            dep_form_scrapped_goods.setScrappedCode(this.getScrappedCode());
+        if (this.isset_baseGoodsTemplateName) {
+            dep_form_scrapped_goods.setBaseGoodsTemplateName(this.getBaseGoodsTemplateName());
         }
-        if (this.isset_scrappedName) {
-            dep_form_scrapped_goods.setScrappedName(this.getScrappedName());
+        if (this.isset_categoryName) {
+            dep_form_scrapped_goods.setCategoryName(this.getCategoryName());
         }
-        if (this.isset_depFormLendingGoodsId) {
-            dep_form_scrapped_goods.setDepFormLendingGoodsId(this.getDepFormLendingGoodsId());
+        if (this.isset_classification) {
+            dep_form_scrapped_goods.setClassification(this.getClassification());
         }
-        if (this.isset_depFormLendingId) {
-            dep_form_scrapped_goods.setDepFormLendingId(this.getDepFormLendingId());
+        if (this.isset_transBusinessId) {
+            dep_form_scrapped_goods.setTransBusinessId(this.getTransBusinessId());
         }
-        if (this.isset_warehouseId) {
-            dep_form_scrapped_goods.setWarehouseId(this.getWarehouseId());
+        if (this.isset_businessFormCode) {
+            dep_form_scrapped_goods.setBusinessFormCode(this.getBusinessFormCode());
+        }
+        if (this.isset_transOutWarehouseType) {
+            dep_form_scrapped_goods.setTransOutWarehouseType(this.getTransOutWarehouseType());
+        }
+        if (this.isset_transOutWarehouseId) {
+            dep_form_scrapped_goods.setTransOutWarehouseId(this.getTransOutWarehouseId());
         }
         return dep_form_scrapped_goods;
     }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods_mapper.java
index 20cfde6..4b5c405 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedGoods_mapper.java
@@ -7,8 +7,6 @@
 import com.walker.jdbc.sqlgen.InsertBuilder;
 import com.walker.jdbc.sqlgen.SelectBuilder;
 import com.walker.jdbc.sqlgen.UpdateBuilder;
-import com.walker.jdbc.util.StringUtils;
-
 import org.springframework.jdbc.core.RowMapper;
 
 import java.sql.ResultSet;
@@ -16,7 +14,8 @@
 import java.util.Map;
 
 /**
- * 琛ㄥ悕:DEP_FORM_SCRAPPED_GOODS *
+ * 琛ㄥ悕:DEP_FORM_SCRAPPED_GOODS
+ *
  * @author genrator
  */
 public class DepFormScrappedGoods_mapper extends DepFormScrappedGoods implements BaseMapper<DepFormScrappedGoods> {
@@ -28,15 +27,15 @@
     // 涓婚敭
     public static final String Id = "id";
     // 鏅�氬睘鎬�
-    public static final String ScrappedCounts = "scrapped_counts";
-    public static final String InitCount = "init_count";
     public static final String DepFormScrappedId = "dep_form_scrapped_id";
-    public static final String Beiz = "beiz";
-    public static final String ScrappedCode = "scrapped_code";
-    public static final String ScrappedName = "scrapped_name";
-    public static final String DepFormLendingGoodsId = "dep_form_lending_goods_id";
-    public static final String DepFormLendingId = "dep_form_lending_id";
-    public static final String WarehouseId = "warehouse_id";
+    public static final String BaseGoodsTemplateId = "base_goods_template_id";
+    public static final String BaseGoodsTemplateName = "base_goods_template_name";
+    public static final String CategoryName = "category_name";
+    public static final String Classification = "classification";
+    public static final String TransBusinessId = "trans_business_id";
+    public static final String BusinessFormCode = "business_form_code";
+    public static final String TransOutWarehouseType = "trans_out_warehouse_type";
+    public static final String TransOutWarehouseId = "trans_out_warehouse_id";
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -50,32 +49,32 @@
             this.setId(depFormScrappedGoods.getId());
         }
         //鏅�氬睘鎬�
-        if (depFormScrappedGoods.isset_scrappedCounts) {
-            this.setScrappedCounts(depFormScrappedGoods.getScrappedCounts());
-        }
-        if (depFormScrappedGoods.isset_initCount) {
-            this.setInitCount(depFormScrappedGoods.getInitCount());
-        }
         if (depFormScrappedGoods.isset_depFormScrappedId) {
             this.setDepFormScrappedId(depFormScrappedGoods.getDepFormScrappedId());
         }
-        if (depFormScrappedGoods.isset_beiz) {
-            this.setBeiz(depFormScrappedGoods.getBeiz());
+        if (depFormScrappedGoods.isset_baseGoodsTemplateId) {
+            this.setBaseGoodsTemplateId(depFormScrappedGoods.getBaseGoodsTemplateId());
         }
-        if (depFormScrappedGoods.isset_scrappedCode) {
-            this.setScrappedCode(depFormScrappedGoods.getScrappedCode());
+        if (depFormScrappedGoods.isset_baseGoodsTemplateName) {
+            this.setBaseGoodsTemplateName(depFormScrappedGoods.getBaseGoodsTemplateName());
         }
-        if (depFormScrappedGoods.isset_scrappedName) {
-            this.setScrappedName(depFormScrappedGoods.getScrappedName());
+        if (depFormScrappedGoods.isset_categoryName) {
+            this.setCategoryName(depFormScrappedGoods.getCategoryName());
         }
-        if (depFormScrappedGoods.isset_depFormLendingGoodsId) {
-            this.setDepFormLendingGoodsId(depFormScrappedGoods.getDepFormLendingGoodsId());
+        if (depFormScrappedGoods.isset_classification) {
+            this.setClassification(depFormScrappedGoods.getClassification());
         }
-        if (depFormScrappedGoods.isset_depFormLendingId) {
-            this.setDepFormLendingId(depFormScrappedGoods.getDepFormLendingId());
+        if (depFormScrappedGoods.isset_transBusinessId) {
+            this.setTransBusinessId(depFormScrappedGoods.getTransBusinessId());
         }
-        if (depFormScrappedGoods.isset_warehouseId) {
-            this.setWarehouseId(depFormScrappedGoods.getWarehouseId());
+        if (depFormScrappedGoods.isset_businessFormCode) {
+            this.setBusinessFormCode(depFormScrappedGoods.getBusinessFormCode());
+        }
+        if (depFormScrappedGoods.isset_transOutWarehouseType) {
+            this.setTransOutWarehouseType(depFormScrappedGoods.getTransOutWarehouseType());
+        }
+        if (depFormScrappedGoods.isset_transOutWarehouseId) {
+            this.setTransOutWarehouseId(depFormScrappedGoods.getTransOutWarehouseId());
         }
         // 鍘绘帀锛�2022-09-07
         // this.setDatabaseName_(dep_form_scrapped_goods.getDatabaseName_());
@@ -88,12 +87,12 @@
     public String getTableName_() {
         String tableName = "dep_form_scrapped_goods";
         /**
-        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
-            return this.getDatabaseName_() + "." + tableName;
-        } else {
-            return tableName;
-        }
-        */
+         if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
+         return this.getDatabaseName_() + "." + tableName;
+         } else {
+         return tableName;
+         }
+         */
         return tableName;
     }
 
@@ -120,15 +119,15 @@
     public SqlAndParameters<Map<String, Object>> getInsertSql_() {
         InsertBuilder ib = new InsertBuilder(this.getTableName_());
         ib.set(Id, this.getId());
-        ib.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ib.set(InitCount, this.getInitCount(), this.isset_initCount);
         ib.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ib.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ib.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
-        ib.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
-        ib.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ib.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ib.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
+        ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ib.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ib.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
+        ib.set(Classification, this.getClassification(), this.isset_classification);
+        ib.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId);
+        ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
+        ib.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType);
+        ib.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId);
         return ib.genMapSql();
     }
 
@@ -138,15 +137,15 @@
     @Override
     public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
-        ub.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ub.set(InitCount, this.getInitCount(), this.isset_initCount);
         ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
-        ub.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
-        ub.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ub.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
+        ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
+        ub.set(Classification, this.getClassification(), this.isset_classification);
+        ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId);
+        ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
+        ub.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType);
+        ub.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId);
         ub.where(this.getPkName_(), this.getPkValue_());
         return ub.genMapSql();
     }
@@ -157,15 +156,15 @@
     @Override
     public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
-        ub.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ub.set(InitCount, this.getInitCount(), this.isset_initCount);
         ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
-        ub.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
-        ub.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ub.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
+        ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
+        ub.set(Classification, this.getClassification(), this.isset_classification);
+        ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId);
+        ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
+        ub.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType);
+        ub.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId);
         return ub.genMapSql(where, parameters);
     }
 
@@ -175,15 +174,15 @@
     @Override
     public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
-        ub.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ub.set(InitCount, this.getInitCount(), this.isset_initCount);
         ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
-        ub.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
-        ub.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ub.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
+        ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ub.set(CategoryName, this.getCategoryName(), this.isset_categoryName);
+        ub.set(Classification, this.getClassification(), this.isset_classification);
+        ub.set(TransBusinessId, this.getTransBusinessId(), this.isset_transBusinessId);
+        ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
+        ub.set(TransOutWarehouseType, this.getTransOutWarehouseType(), this.isset_transOutWarehouseType);
+        ub.set(TransOutWarehouseId, this.getTransOutWarehouseId(), this.isset_transOutWarehouseId);
         return ub.genArraySql(where, parameters);
     }
 
@@ -231,7 +230,7 @@
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, scrapped_counts, init_count, dep_form_scrapped_id, beiz, scrapped_code, scrapped_name, dep_form_lending_goods_id, dep_form_lending_id, warehouse_id from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, dep_form_scrapped_id, base_goods_template_id, base_goods_template_name, category_name, classification, trans_business_id, business_form_code, trans_out_warehouse_type, trans_out_warehouse_id from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -239,7 +238,7 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, scrapped_counts, init_count, dep_form_scrapped_id, beiz, scrapped_code, scrapped_name, dep_form_lending_goods_id, dep_form_lending_id, warehouse_id from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, dep_form_scrapped_id, base_goods_template_id, base_goods_template_name, category_name, classification, trans_business_id, business_form_code, trans_out_warehouse_type, trans_out_warehouse_id from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -276,22 +275,6 @@
             dep_form_scrapped_goods.setId(rs.getLong(columnIndex));
         }
         //鏅�氬睘鎬�
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.ScrappedCounts);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_goods.setScrappedCounts(null);
-            } else {
-                dep_form_scrapped_goods.setScrappedCounts(rs.getInt(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.InitCount);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_goods.setInitCount(null);
-            } else {
-                dep_form_scrapped_goods.setInitCount(rs.getInt(columnIndex));
-            }
-        }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.DepFormScrappedId);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
@@ -300,40 +283,52 @@
                 dep_form_scrapped_goods.setDepFormScrappedId(rs.getLong(columnIndex));
             }
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.Beiz);
-        if (columnIndex > 0) {
-            dep_form_scrapped_goods.setBeiz(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.ScrappedCode);
-        if (columnIndex > 0) {
-            dep_form_scrapped_goods.setScrappedCode(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.ScrappedName);
-        if (columnIndex > 0) {
-            dep_form_scrapped_goods.setScrappedName(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.DepFormLendingGoodsId);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.BaseGoodsTemplateId);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_goods.setDepFormLendingGoodsId(null);
+                dep_form_scrapped_goods.setBaseGoodsTemplateId(null);
             } else {
-                dep_form_scrapped_goods.setDepFormLendingGoodsId(rs.getLong(columnIndex));
+                dep_form_scrapped_goods.setBaseGoodsTemplateId(rs.getLong(columnIndex));
             }
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.DepFormLendingId);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.BaseGoodsTemplateName);
+        if (columnIndex > 0) {
+            dep_form_scrapped_goods.setBaseGoodsTemplateName(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.CategoryName);
+        if (columnIndex > 0) {
+            dep_form_scrapped_goods.setCategoryName(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.Classification);
+        if (columnIndex > 0) {
+            dep_form_scrapped_goods.setClassification(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.TransBusinessId);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_goods.setDepFormLendingId(null);
+                dep_form_scrapped_goods.setTransBusinessId(null);
             } else {
-                dep_form_scrapped_goods.setDepFormLendingId(rs.getLong(columnIndex));
+                dep_form_scrapped_goods.setTransBusinessId(rs.getLong(columnIndex));
             }
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.WarehouseId);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.BusinessFormCode);
+        if (columnIndex > 0) {
+            dep_form_scrapped_goods.setBusinessFormCode(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.TransOutWarehouseType);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_goods.setWarehouseId(null);
+                dep_form_scrapped_goods.setTransOutWarehouseType(null);
             } else {
-                dep_form_scrapped_goods.setWarehouseId(rs.getLong(columnIndex));
+                dep_form_scrapped_goods.setTransOutWarehouseType(rs.getInt(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedGoods_mapper.TransOutWarehouseId);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_goods.setTransOutWarehouseId(null);
+            } else {
+                dep_form_scrapped_goods.setTransOutWarehouseId(rs.getLong(columnIndex));
             }
         }
         return dep_form_scrapped_goods;
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel.java
index d5b38be..38d4545 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel.java
@@ -6,7 +6,8 @@
 import com.walker.jdbc.BasePo;
 
 /**
- * 琛ㄥ悕:DEP_FORM_SCRAPPED_MODEL *
+ * 琛ㄥ悕:DEP_FORM_SCRAPPED_MODEL
+ *
  * @author genrator
  */
 @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
@@ -20,6 +21,10 @@
     protected boolean isset_id = false;
 
     // 灞炴�у垪琛�
+    private Long depFormScrappedId = null;
+    @JsonIgnore
+    protected boolean isset_depFormScrappedId = false;
+
     private Long depFormScrappedGoodsId = null;
     @JsonIgnore
     protected boolean isset_depFormScrappedGoodsId = false;
@@ -32,45 +37,53 @@
     @JsonIgnore
     protected boolean isset_scrappedName = false;
 
+    private Long baseGoodsTemplateId = null;
+    @JsonIgnore
+    protected boolean isset_baseGoodsTemplateId = false;
+
+    private String baseGoodsTemplateName = null;
+    @JsonIgnore
+    protected boolean isset_baseGoodsTemplateName = false;
+
+    private String classification = null;
+    @JsonIgnore
+    protected boolean isset_classification = false;
+
+    private String unit = null;
+    @JsonIgnore
+    protected boolean isset_unit = false;
+
+    private Long baseGoodsModelsId = null;
+    @JsonIgnore
+    protected boolean isset_baseGoodsModelsId = false;
+
+    private String baseGoodsModelsName = null;
+    @JsonIgnore
+    protected boolean isset_baseGoodsModelsName = false;
+
+    private Long procureModelUserId = null;
+    @JsonIgnore
+    protected boolean isset_procureModelUserId = false;
+
+    private Integer initialCount = null;
+    @JsonIgnore
+    protected boolean isset_initialCount = false;
+
+    private Integer useCount = null;
+    @JsonIgnore
+    protected boolean isset_useCount = false;
+
+    private Integer counts = null;
+    @JsonIgnore
+    protected boolean isset_counts = false;
+
+    private String goodsUserName = null;
+    @JsonIgnore
+    protected boolean isset_goodsUserName = false;
+
     private String beiz = null;
     @JsonIgnore
     protected boolean isset_beiz = false;
-
-    private Long usingGoodsHisId = null;
-    @JsonIgnore
-    protected boolean isset_usingGoodsHisId = false;
-
-    private Long depFormScrappedId = null;
-    @JsonIgnore
-    protected boolean isset_depFormScrappedId = false;
-
-    private Long whGoodsId = null;
-    @JsonIgnore
-    protected boolean isset_whGoodsId = false;
-
-    private Integer scrappedCounts = null;
-    @JsonIgnore
-    protected boolean isset_scrappedCounts = false;
-
-    private Integer initCount = null;
-    @JsonIgnore
-    protected boolean isset_initCount = false;
-
-    private Long depFormLendingModelId = null;
-    @JsonIgnore
-    protected boolean isset_depFormLendingModelId = false;
-
-    private Long depFormLendingGoodsId = null;
-    @JsonIgnore
-    protected boolean isset_depFormLendingGoodsId = false;
-
-    private Long depFormLendingId = null;
-    @JsonIgnore
-    protected boolean isset_depFormLendingId = false;
-
-    private Long warehouseId = null;
-    @JsonIgnore
-    protected boolean isset_warehouseId = false;
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -105,6 +118,20 @@
     @JsonIgnore
     public boolean isEmptyId() {
         return this.id == null;
+    }
+
+    public Long getDepFormScrappedId() {
+        return this.depFormScrappedId;
+    }
+
+    public void setDepFormScrappedId(Long depFormScrappedId) {
+        this.depFormScrappedId = depFormScrappedId;
+        this.isset_depFormScrappedId = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyDepFormScrappedId() {
+        return this.depFormScrappedId == null;
     }
 
     public Long getDepFormScrappedGoodsId() {
@@ -149,6 +176,160 @@
         return this.scrappedName == null || this.scrappedName.length() == 0;
     }
 
+    public Long getBaseGoodsTemplateId() {
+        return this.baseGoodsTemplateId;
+    }
+
+    public void setBaseGoodsTemplateId(Long baseGoodsTemplateId) {
+        this.baseGoodsTemplateId = baseGoodsTemplateId;
+        this.isset_baseGoodsTemplateId = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyBaseGoodsTemplateId() {
+        return this.baseGoodsTemplateId == null;
+    }
+
+    public String getBaseGoodsTemplateName() {
+        return this.baseGoodsTemplateName;
+    }
+
+    public void setBaseGoodsTemplateName(String baseGoodsTemplateName) {
+        this.baseGoodsTemplateName = baseGoodsTemplateName;
+        this.isset_baseGoodsTemplateName = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyBaseGoodsTemplateName() {
+        return this.baseGoodsTemplateName == null || this.baseGoodsTemplateName.length() == 0;
+    }
+
+    public String getClassification() {
+        return this.classification;
+    }
+
+    public void setClassification(String classification) {
+        this.classification = classification;
+        this.isset_classification = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyClassification() {
+        return this.classification == null || this.classification.length() == 0;
+    }
+
+    public String getUnit() {
+        return this.unit;
+    }
+
+    public void setUnit(String unit) {
+        this.unit = unit;
+        this.isset_unit = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyUnit() {
+        return this.unit == null || this.unit.length() == 0;
+    }
+
+    public Long getBaseGoodsModelsId() {
+        return this.baseGoodsModelsId;
+    }
+
+    public void setBaseGoodsModelsId(Long baseGoodsModelsId) {
+        this.baseGoodsModelsId = baseGoodsModelsId;
+        this.isset_baseGoodsModelsId = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyBaseGoodsModelsId() {
+        return this.baseGoodsModelsId == null;
+    }
+
+    public String getBaseGoodsModelsName() {
+        return this.baseGoodsModelsName;
+    }
+
+    public void setBaseGoodsModelsName(String baseGoodsModelsName) {
+        this.baseGoodsModelsName = baseGoodsModelsName;
+        this.isset_baseGoodsModelsName = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyBaseGoodsModelsName() {
+        return this.baseGoodsModelsName == null || this.baseGoodsModelsName.length() == 0;
+    }
+
+    public Long getProcureModelUserId() {
+        return this.procureModelUserId;
+    }
+
+    public void setProcureModelUserId(Long procureModelUserId) {
+        this.procureModelUserId = procureModelUserId;
+        this.isset_procureModelUserId = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyProcureModelUserId() {
+        return this.procureModelUserId == null;
+    }
+
+    public Integer getInitialCount() {
+        return this.initialCount;
+    }
+
+    public void setInitialCount(Integer initialCount) {
+        this.initialCount = initialCount;
+        this.isset_initialCount = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyInitialCount() {
+        return this.initialCount == null;
+    }
+
+    public Integer getUseCount() {
+        return this.useCount;
+    }
+
+    public void setUseCount(Integer useCount) {
+        this.useCount = useCount;
+        this.isset_useCount = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyUseCount() {
+        return this.useCount == null;
+    }
+
+    public Integer getCounts() {
+        return this.counts;
+    }
+
+    public void setCounts(Integer counts) {
+        this.counts = counts;
+        this.isset_counts = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyCounts() {
+        return this.counts == null;
+    }
+
+    public String getGoodsUserName() {
+        return this.goodsUserName;
+    }
+
+    public void setGoodsUserName(String goodsUserName) {
+        this.goodsUserName = goodsUserName;
+        this.isset_goodsUserName = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyGoodsUserName() {
+        return this.goodsUserName == null || this.goodsUserName.length() == 0;
+    }
+
     public String getBeiz() {
         return this.beiz;
     }
@@ -163,132 +344,6 @@
         return this.beiz == null || this.beiz.length() == 0;
     }
 
-    public Long getUsingGoodsHisId() {
-        return this.usingGoodsHisId;
-    }
-
-    public void setUsingGoodsHisId(Long usingGoodsHisId) {
-        this.usingGoodsHisId = usingGoodsHisId;
-        this.isset_usingGoodsHisId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyUsingGoodsHisId() {
-        return this.usingGoodsHisId == null;
-    }
-
-    public Long getDepFormScrappedId() {
-        return this.depFormScrappedId;
-    }
-
-    public void setDepFormScrappedId(Long depFormScrappedId) {
-        this.depFormScrappedId = depFormScrappedId;
-        this.isset_depFormScrappedId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyDepFormScrappedId() {
-        return this.depFormScrappedId == null;
-    }
-
-    public Long getWhGoodsId() {
-        return this.whGoodsId;
-    }
-
-    public void setWhGoodsId(Long whGoodsId) {
-        this.whGoodsId = whGoodsId;
-        this.isset_whGoodsId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyWhGoodsId() {
-        return this.whGoodsId == null;
-    }
-
-    public Integer getScrappedCounts() {
-        return this.scrappedCounts;
-    }
-
-    public void setScrappedCounts(Integer scrappedCounts) {
-        this.scrappedCounts = scrappedCounts;
-        this.isset_scrappedCounts = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyScrappedCounts() {
-        return this.scrappedCounts == null;
-    }
-
-    public Integer getInitCount() {
-        return this.initCount;
-    }
-
-    public void setInitCount(Integer initCount) {
-        this.initCount = initCount;
-        this.isset_initCount = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyInitCount() {
-        return this.initCount == null;
-    }
-
-    public Long getDepFormLendingModelId() {
-        return this.depFormLendingModelId;
-    }
-
-    public void setDepFormLendingModelId(Long depFormLendingModelId) {
-        this.depFormLendingModelId = depFormLendingModelId;
-        this.isset_depFormLendingModelId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyDepFormLendingModelId() {
-        return this.depFormLendingModelId == null;
-    }
-
-    public Long getDepFormLendingGoodsId() {
-        return this.depFormLendingGoodsId;
-    }
-
-    public void setDepFormLendingGoodsId(Long depFormLendingGoodsId) {
-        this.depFormLendingGoodsId = depFormLendingGoodsId;
-        this.isset_depFormLendingGoodsId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyDepFormLendingGoodsId() {
-        return this.depFormLendingGoodsId == null;
-    }
-
-    public Long getDepFormLendingId() {
-        return this.depFormLendingId;
-    }
-
-    public void setDepFormLendingId(Long depFormLendingId) {
-        this.depFormLendingId = depFormLendingId;
-        this.isset_depFormLendingId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyDepFormLendingId() {
-        return this.depFormLendingId == null;
-    }
-
-    public Long getWarehouseId() {
-        return this.warehouseId;
-    }
-
-    public void setWarehouseId(Long warehouseId) {
-        this.warehouseId = warehouseId;
-        this.isset_warehouseId = true;
-    }
-
-    @JsonIgnore
-    public boolean isEmptyWarehouseId() {
-        return this.warehouseId == null;
-    }
-
     /**
      * 閲嶅啓 toString() 鏂规硶
      */
@@ -296,19 +351,22 @@
     public String toString() {
         return new StringBuilder()
                 .append("id=").append(this.id)
+                .append("depFormScrappedId=").append(this.depFormScrappedId)
                 .append("depFormScrappedGoodsId=").append(this.depFormScrappedGoodsId)
                 .append("scrappedCode=").append(this.scrappedCode)
                 .append("scrappedName=").append(this.scrappedName)
+                .append("baseGoodsTemplateId=").append(this.baseGoodsTemplateId)
+                .append("baseGoodsTemplateName=").append(this.baseGoodsTemplateName)
+                .append("classification=").append(this.classification)
+                .append("unit=").append(this.unit)
+                .append("baseGoodsModelsId=").append(this.baseGoodsModelsId)
+                .append("baseGoodsModelsName=").append(this.baseGoodsModelsName)
+                .append("procureModelUserId=").append(this.procureModelUserId)
+                .append("initialCount=").append(this.initialCount)
+                .append("useCount=").append(this.useCount)
+                .append("counts=").append(this.counts)
+                .append("goodsUserName=").append(this.goodsUserName)
                 .append("beiz=").append(this.beiz)
-                .append("usingGoodsHisId=").append(this.usingGoodsHisId)
-                .append("depFormScrappedId=").append(this.depFormScrappedId)
-                .append("whGoodsId=").append(this.whGoodsId)
-                .append("scrappedCounts=").append(this.scrappedCounts)
-                .append("initCount=").append(this.initCount)
-                .append("depFormLendingModelId=").append(this.depFormLendingModelId)
-                .append("depFormLendingGoodsId=").append(this.depFormLendingGoodsId)
-                .append("depFormLendingId=").append(this.depFormLendingId)
-                .append("warehouseId=").append(this.warehouseId)
                 .toString();
     }
 
@@ -326,6 +384,9 @@
             dep_form_scrapped_model.setId(this.getId());
         }
         // 鏅�氬睘鎬�
+        if (this.isset_depFormScrappedId) {
+            dep_form_scrapped_model.setDepFormScrappedId(this.getDepFormScrappedId());
+        }
         if (this.isset_depFormScrappedGoodsId) {
             dep_form_scrapped_model.setDepFormScrappedGoodsId(this.getDepFormScrappedGoodsId());
         }
@@ -335,35 +396,41 @@
         if (this.isset_scrappedName) {
             dep_form_scrapped_model.setScrappedName(this.getScrappedName());
         }
+        if (this.isset_baseGoodsTemplateId) {
+            dep_form_scrapped_model.setBaseGoodsTemplateId(this.getBaseGoodsTemplateId());
+        }
+        if (this.isset_baseGoodsTemplateName) {
+            dep_form_scrapped_model.setBaseGoodsTemplateName(this.getBaseGoodsTemplateName());
+        }
+        if (this.isset_classification) {
+            dep_form_scrapped_model.setClassification(this.getClassification());
+        }
+        if (this.isset_unit) {
+            dep_form_scrapped_model.setUnit(this.getUnit());
+        }
+        if (this.isset_baseGoodsModelsId) {
+            dep_form_scrapped_model.setBaseGoodsModelsId(this.getBaseGoodsModelsId());
+        }
+        if (this.isset_baseGoodsModelsName) {
+            dep_form_scrapped_model.setBaseGoodsModelsName(this.getBaseGoodsModelsName());
+        }
+        if (this.isset_procureModelUserId) {
+            dep_form_scrapped_model.setProcureModelUserId(this.getProcureModelUserId());
+        }
+        if (this.isset_initialCount) {
+            dep_form_scrapped_model.setInitialCount(this.getInitialCount());
+        }
+        if (this.isset_useCount) {
+            dep_form_scrapped_model.setUseCount(this.getUseCount());
+        }
+        if (this.isset_counts) {
+            dep_form_scrapped_model.setCounts(this.getCounts());
+        }
+        if (this.isset_goodsUserName) {
+            dep_form_scrapped_model.setGoodsUserName(this.getGoodsUserName());
+        }
         if (this.isset_beiz) {
             dep_form_scrapped_model.setBeiz(this.getBeiz());
-        }
-        if (this.isset_usingGoodsHisId) {
-            dep_form_scrapped_model.setUsingGoodsHisId(this.getUsingGoodsHisId());
-        }
-        if (this.isset_depFormScrappedId) {
-            dep_form_scrapped_model.setDepFormScrappedId(this.getDepFormScrappedId());
-        }
-        if (this.isset_whGoodsId) {
-            dep_form_scrapped_model.setWhGoodsId(this.getWhGoodsId());
-        }
-        if (this.isset_scrappedCounts) {
-            dep_form_scrapped_model.setScrappedCounts(this.getScrappedCounts());
-        }
-        if (this.isset_initCount) {
-            dep_form_scrapped_model.setInitCount(this.getInitCount());
-        }
-        if (this.isset_depFormLendingModelId) {
-            dep_form_scrapped_model.setDepFormLendingModelId(this.getDepFormLendingModelId());
-        }
-        if (this.isset_depFormLendingGoodsId) {
-            dep_form_scrapped_model.setDepFormLendingGoodsId(this.getDepFormLendingGoodsId());
-        }
-        if (this.isset_depFormLendingId) {
-            dep_form_scrapped_model.setDepFormLendingId(this.getDepFormLendingId());
-        }
-        if (this.isset_warehouseId) {
-            dep_form_scrapped_model.setWarehouseId(this.getWarehouseId());
         }
         return dep_form_scrapped_model;
     }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java
index c5cc65f..1927f70 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrappedModel_mapper.java
@@ -7,8 +7,6 @@
 import com.walker.jdbc.sqlgen.InsertBuilder;
 import com.walker.jdbc.sqlgen.SelectBuilder;
 import com.walker.jdbc.sqlgen.UpdateBuilder;
-import com.walker.jdbc.util.StringUtils;
-
 import org.springframework.jdbc.core.RowMapper;
 
 import java.sql.ResultSet;
@@ -16,7 +14,8 @@
 import java.util.Map;
 
 /**
- * 琛ㄥ悕:DEP_FORM_SCRAPPED_MODEL *
+ * 琛ㄥ悕:DEP_FORM_SCRAPPED_MODEL
+ *
  * @author genrator
  */
 public class DepFormScrappedModel_mapper extends DepFormScrappedModel implements BaseMapper<DepFormScrappedModel> {
@@ -28,19 +27,22 @@
     // 涓婚敭
     public static final String Id = "id";
     // 鏅�氬睘鎬�
+    public static final String DepFormScrappedId = "dep_form_scrapped_id";
     public static final String DepFormScrappedGoodsId = "dep_form_scrapped_goods_id";
     public static final String ScrappedCode = "scrapped_code";
     public static final String ScrappedName = "scrapped_name";
+    public static final String BaseGoodsTemplateId = "base_goods_template_id";
+    public static final String BaseGoodsTemplateName = "base_goods_template_name";
+    public static final String Classification = "classification";
+    public static final String Unit = "unit";
+    public static final String BaseGoodsModelsId = "base_goods_models_id";
+    public static final String BaseGoodsModelsName = "base_goods_models_name";
+    public static final String ProcureModelUserId = "procure_model_user_id";
+    public static final String InitialCount = "initial_count";
+    public static final String UseCount = "use_count";
+    public static final String Counts = "counts";
+    public static final String GoodsUserName = "goods_user_name";
     public static final String Beiz = "beiz";
-    public static final String UsingGoodsHisId = "using_goods_his_id";
-    public static final String DepFormScrappedId = "dep_form_scrapped_id";
-    public static final String WhGoodsId = "wh_goods_id";
-    public static final String ScrappedCounts = "scrapped_counts";
-    public static final String InitCount = "init_count";
-    public static final String DepFormLendingModelId = "dep_form_lending_model_id";
-    public static final String DepFormLendingGoodsId = "dep_form_lending_goods_id";
-    public static final String DepFormLendingId = "dep_form_lending_id";
-    public static final String WarehouseId = "warehouse_id";
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -54,6 +56,9 @@
             this.setId(depFormScrappedModel.getId());
         }
         //鏅�氬睘鎬�
+        if (depFormScrappedModel.isset_depFormScrappedId) {
+            this.setDepFormScrappedId(depFormScrappedModel.getDepFormScrappedId());
+        }
         if (depFormScrappedModel.isset_depFormScrappedGoodsId) {
             this.setDepFormScrappedGoodsId(depFormScrappedModel.getDepFormScrappedGoodsId());
         }
@@ -63,35 +68,41 @@
         if (depFormScrappedModel.isset_scrappedName) {
             this.setScrappedName(depFormScrappedModel.getScrappedName());
         }
+        if (depFormScrappedModel.isset_baseGoodsTemplateId) {
+            this.setBaseGoodsTemplateId(depFormScrappedModel.getBaseGoodsTemplateId());
+        }
+        if (depFormScrappedModel.isset_baseGoodsTemplateName) {
+            this.setBaseGoodsTemplateName(depFormScrappedModel.getBaseGoodsTemplateName());
+        }
+        if (depFormScrappedModel.isset_classification) {
+            this.setClassification(depFormScrappedModel.getClassification());
+        }
+        if (depFormScrappedModel.isset_unit) {
+            this.setUnit(depFormScrappedModel.getUnit());
+        }
+        if (depFormScrappedModel.isset_baseGoodsModelsId) {
+            this.setBaseGoodsModelsId(depFormScrappedModel.getBaseGoodsModelsId());
+        }
+        if (depFormScrappedModel.isset_baseGoodsModelsName) {
+            this.setBaseGoodsModelsName(depFormScrappedModel.getBaseGoodsModelsName());
+        }
+        if (depFormScrappedModel.isset_procureModelUserId) {
+            this.setProcureModelUserId(depFormScrappedModel.getProcureModelUserId());
+        }
+        if (depFormScrappedModel.isset_initialCount) {
+            this.setInitialCount(depFormScrappedModel.getInitialCount());
+        }
+        if (depFormScrappedModel.isset_useCount) {
+            this.setUseCount(depFormScrappedModel.getUseCount());
+        }
+        if (depFormScrappedModel.isset_counts) {
+            this.setCounts(depFormScrappedModel.getCounts());
+        }
+        if (depFormScrappedModel.isset_goodsUserName) {
+            this.setGoodsUserName(depFormScrappedModel.getGoodsUserName());
+        }
         if (depFormScrappedModel.isset_beiz) {
             this.setBeiz(depFormScrappedModel.getBeiz());
-        }
-        if (depFormScrappedModel.isset_usingGoodsHisId) {
-            this.setUsingGoodsHisId(depFormScrappedModel.getUsingGoodsHisId());
-        }
-        if (depFormScrappedModel.isset_depFormScrappedId) {
-            this.setDepFormScrappedId(depFormScrappedModel.getDepFormScrappedId());
-        }
-        if (depFormScrappedModel.isset_whGoodsId) {
-            this.setWhGoodsId(depFormScrappedModel.getWhGoodsId());
-        }
-        if (depFormScrappedModel.isset_scrappedCounts) {
-            this.setScrappedCounts(depFormScrappedModel.getScrappedCounts());
-        }
-        if (depFormScrappedModel.isset_initCount) {
-            this.setInitCount(depFormScrappedModel.getInitCount());
-        }
-        if (depFormScrappedModel.isset_depFormLendingModelId) {
-            this.setDepFormLendingModelId(depFormScrappedModel.getDepFormLendingModelId());
-        }
-        if (depFormScrappedModel.isset_depFormLendingGoodsId) {
-            this.setDepFormLendingGoodsId(depFormScrappedModel.getDepFormLendingGoodsId());
-        }
-        if (depFormScrappedModel.isset_depFormLendingId) {
-            this.setDepFormLendingId(depFormScrappedModel.getDepFormLendingId());
-        }
-        if (depFormScrappedModel.isset_warehouseId) {
-            this.setWarehouseId(depFormScrappedModel.getWarehouseId());
         }
         // 鍘绘帀锛�2022-09-07
         // this.setDatabaseName_(dep_form_scrapped_model.getDatabaseName_());
@@ -104,12 +115,12 @@
     public String getTableName_() {
         String tableName = "dep_form_scrapped_model";
         /**
-        if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
-            return this.getDatabaseName_() + "." + tableName;
-        } else {
-            return tableName;
-        }
-        */
+         if (StringUtils.isNotEmpty(this.getDatabaseName_())) {
+         return this.getDatabaseName_() + "." + tableName;
+         } else {
+         return tableName;
+         }
+         */
         return tableName;
     }
 
@@ -136,19 +147,22 @@
     public SqlAndParameters<Map<String, Object>> getInsertSql_() {
         InsertBuilder ib = new InsertBuilder(this.getTableName_());
         ib.set(Id, this.getId());
+        ib.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
         ib.set(DepFormScrappedGoodsId, this.getDepFormScrappedGoodsId(), this.isset_depFormScrappedGoodsId);
         ib.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
         ib.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
+        ib.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ib.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ib.set(Classification, this.getClassification(), this.isset_classification);
+        ib.set(Unit, this.getUnit(), this.isset_unit);
+        ib.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId);
+        ib.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName);
+        ib.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId);
+        ib.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
+        ib.set(UseCount, this.getUseCount(), this.isset_useCount);
+        ib.set(Counts, this.getCounts(), this.isset_counts);
+        ib.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ib.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ib.set(UsingGoodsHisId, this.getUsingGoodsHisId(), this.isset_usingGoodsHisId);
-        ib.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ib.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
-        ib.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ib.set(InitCount, this.getInitCount(), this.isset_initCount);
-        ib.set(DepFormLendingModelId, this.getDepFormLendingModelId(), this.isset_depFormLendingModelId);
-        ib.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ib.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ib.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
         return ib.genMapSql();
     }
 
@@ -158,19 +172,22 @@
     @Override
     public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
+        ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
         ub.set(DepFormScrappedGoodsId, this.getDepFormScrappedGoodsId(), this.isset_depFormScrappedGoodsId);
         ub.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
         ub.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
+        ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ub.set(Classification, this.getClassification(), this.isset_classification);
+        ub.set(Unit, this.getUnit(), this.isset_unit);
+        ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId);
+        ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName);
+        ub.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId);
+        ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
+        ub.set(Counts, this.getCounts(), this.isset_counts);
+        ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(UsingGoodsHisId, this.getUsingGoodsHisId(), this.isset_usingGoodsHisId);
-        ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
-        ub.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ub.set(InitCount, this.getInitCount(), this.isset_initCount);
-        ub.set(DepFormLendingModelId, this.getDepFormLendingModelId(), this.isset_depFormLendingModelId);
-        ub.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ub.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
         ub.where(this.getPkName_(), this.getPkValue_());
         return ub.genMapSql();
     }
@@ -181,19 +198,22 @@
     @Override
     public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
+        ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
         ub.set(DepFormScrappedGoodsId, this.getDepFormScrappedGoodsId(), this.isset_depFormScrappedGoodsId);
         ub.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
         ub.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
+        ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ub.set(Classification, this.getClassification(), this.isset_classification);
+        ub.set(Unit, this.getUnit(), this.isset_unit);
+        ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId);
+        ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName);
+        ub.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId);
+        ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
+        ub.set(Counts, this.getCounts(), this.isset_counts);
+        ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(UsingGoodsHisId, this.getUsingGoodsHisId(), this.isset_usingGoodsHisId);
-        ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
-        ub.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ub.set(InitCount, this.getInitCount(), this.isset_initCount);
-        ub.set(DepFormLendingModelId, this.getDepFormLendingModelId(), this.isset_depFormLendingModelId);
-        ub.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ub.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
         return ub.genMapSql(where, parameters);
     }
 
@@ -203,19 +223,22 @@
     @Override
     public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
+        ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
         ub.set(DepFormScrappedGoodsId, this.getDepFormScrappedGoodsId(), this.isset_depFormScrappedGoodsId);
         ub.set(ScrappedCode, this.getScrappedCode(), this.isset_scrappedCode);
         ub.set(ScrappedName, this.getScrappedName(), this.isset_scrappedName);
+        ub.set(BaseGoodsTemplateId, this.getBaseGoodsTemplateId(), this.isset_baseGoodsTemplateId);
+        ub.set(BaseGoodsTemplateName, this.getBaseGoodsTemplateName(), this.isset_baseGoodsTemplateName);
+        ub.set(Classification, this.getClassification(), this.isset_classification);
+        ub.set(Unit, this.getUnit(), this.isset_unit);
+        ub.set(BaseGoodsModelsId, this.getBaseGoodsModelsId(), this.isset_baseGoodsModelsId);
+        ub.set(BaseGoodsModelsName, this.getBaseGoodsModelsName(), this.isset_baseGoodsModelsName);
+        ub.set(ProcureModelUserId, this.getProcureModelUserId(), this.isset_procureModelUserId);
+        ub.set(InitialCount, this.getInitialCount(), this.isset_initialCount);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
+        ub.set(Counts, this.getCounts(), this.isset_counts);
+        ub.set(GoodsUserName, this.getGoodsUserName(), this.isset_goodsUserName);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(UsingGoodsHisId, this.getUsingGoodsHisId(), this.isset_usingGoodsHisId);
-        ub.set(DepFormScrappedId, this.getDepFormScrappedId(), this.isset_depFormScrappedId);
-        ub.set(WhGoodsId, this.getWhGoodsId(), this.isset_whGoodsId);
-        ub.set(ScrappedCounts, this.getScrappedCounts(), this.isset_scrappedCounts);
-        ub.set(InitCount, this.getInitCount(), this.isset_initCount);
-        ub.set(DepFormLendingModelId, this.getDepFormLendingModelId(), this.isset_depFormLendingModelId);
-        ub.set(DepFormLendingGoodsId, this.getDepFormLendingGoodsId(), this.isset_depFormLendingGoodsId);
-        ub.set(DepFormLendingId, this.getDepFormLendingId(), this.isset_depFormLendingId);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
         return ub.genArraySql(where, parameters);
     }
 
@@ -263,7 +286,7 @@
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, beiz, using_goods_his_id, dep_form_scrapped_id, wh_goods_id, scrapped_counts, init_count, dep_form_lending_model_id, dep_form_lending_goods_id, dep_form_lending_id, warehouse_id from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, dep_form_scrapped_id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -271,7 +294,7 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, beiz, using_goods_his_id, dep_form_scrapped_id, wh_goods_id, scrapped_counts, init_count, dep_form_lending_model_id, dep_form_lending_goods_id, dep_form_lending_id, warehouse_id from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, dep_form_scrapped_id, dep_form_scrapped_goods_id, scrapped_code, scrapped_name, base_goods_template_id, base_goods_template_name, classification, unit, base_goods_models_id, base_goods_models_name, procure_model_user_id, initial_count, use_count, counts, goods_user_name, beiz from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -308,6 +331,14 @@
             dep_form_scrapped_model.setId(rs.getLong(columnIndex));
         }
         //鏅�氬睘鎬�
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormScrappedId);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setDepFormScrappedId(null);
+            } else {
+                dep_form_scrapped_model.setDepFormScrappedId(rs.getLong(columnIndex));
+            }
+        }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormScrappedGoodsId);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
@@ -324,81 +355,77 @@
         if (columnIndex > 0) {
             dep_form_scrapped_model.setScrappedName(rs.getString(columnIndex));
         }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.BaseGoodsTemplateId);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setBaseGoodsTemplateId(null);
+            } else {
+                dep_form_scrapped_model.setBaseGoodsTemplateId(rs.getLong(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.BaseGoodsTemplateName);
+        if (columnIndex > 0) {
+            dep_form_scrapped_model.setBaseGoodsTemplateName(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.Classification);
+        if (columnIndex > 0) {
+            dep_form_scrapped_model.setClassification(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.Unit);
+        if (columnIndex > 0) {
+            dep_form_scrapped_model.setUnit(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.BaseGoodsModelsId);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setBaseGoodsModelsId(null);
+            } else {
+                dep_form_scrapped_model.setBaseGoodsModelsId(rs.getLong(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.BaseGoodsModelsName);
+        if (columnIndex > 0) {
+            dep_form_scrapped_model.setBaseGoodsModelsName(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.ProcureModelUserId);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setProcureModelUserId(null);
+            } else {
+                dep_form_scrapped_model.setProcureModelUserId(rs.getLong(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.InitialCount);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setInitialCount(null);
+            } else {
+                dep_form_scrapped_model.setInitialCount(rs.getInt(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.UseCount);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setUseCount(null);
+            } else {
+                dep_form_scrapped_model.setUseCount(rs.getInt(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.Counts);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                dep_form_scrapped_model.setCounts(null);
+            } else {
+                dep_form_scrapped_model.setCounts(rs.getInt(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.GoodsUserName);
+        if (columnIndex > 0) {
+            dep_form_scrapped_model.setGoodsUserName(rs.getString(columnIndex));
+        }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.Beiz);
         if (columnIndex > 0) {
             dep_form_scrapped_model.setBeiz(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.UsingGoodsHisId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setUsingGoodsHisId(null);
-            } else {
-                dep_form_scrapped_model.setUsingGoodsHisId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormScrappedId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setDepFormScrappedId(null);
-            } else {
-                dep_form_scrapped_model.setDepFormScrappedId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.WhGoodsId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setWhGoodsId(null);
-            } else {
-                dep_form_scrapped_model.setWhGoodsId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.ScrappedCounts);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setScrappedCounts(null);
-            } else {
-                dep_form_scrapped_model.setScrappedCounts(rs.getInt(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.InitCount);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setInitCount(null);
-            } else {
-                dep_form_scrapped_model.setInitCount(rs.getInt(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormLendingModelId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setDepFormLendingModelId(null);
-            } else {
-                dep_form_scrapped_model.setDepFormLendingModelId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormLendingGoodsId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setDepFormLendingGoodsId(null);
-            } else {
-                dep_form_scrapped_model.setDepFormLendingGoodsId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.DepFormLendingId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setDepFormLendingId(null);
-            } else {
-                dep_form_scrapped_model.setDepFormLendingId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrappedModel_mapper.WarehouseId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped_model.setWarehouseId(null);
-            } else {
-                dep_form_scrapped_model.setWarehouseId(rs.getLong(columnIndex));
-            }
         }
         return dep_form_scrapped_model;
     }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped_mapper.java
index dc42b7b..2747ad5 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/DepFormScrapped_mapper.java
@@ -7,8 +7,6 @@
 import com.walker.jdbc.sqlgen.InsertBuilder;
 import com.walker.jdbc.sqlgen.SelectBuilder;
 import com.walker.jdbc.sqlgen.UpdateBuilder;
-import com.walker.jdbc.util.StringUtils;
-
 import org.springframework.jdbc.core.RowMapper;
 
 import java.sql.ResultSet;
@@ -16,7 +14,8 @@
 import java.util.Map;
 
 /**
- * 琛ㄥ悕:DEP_FORM_SCRAPPED *
+ * 琛ㄥ悕:DEP_FORM_SCRAPPED
+ *
  * @author genrator
  */
 public class DepFormScrapped_mapper extends DepFormScrapped implements BaseMapper<DepFormScrapped> {
@@ -29,22 +28,18 @@
     public static final String Id = "id";
     // 鏅�氬睘鎬�
     public static final String BusinessFormCode = "business_form_code";
-    public static final String AgencyId = "agency_id";
-    public static final String AgencyName = "agency_name";
+    public static final String ProcureDoc = "procure_doc";
+    public static final String OutWarehouseType = "out_warehouse_type";
+    public static final String OutWarehouseId = "out_warehouse_id";
+    public static final String OutWarehouseName = "out_warehouse_name";
     public static final String OperatorId = "operator_id";
     public static final String OperatorName = "operator_name";
     public static final String DealTime = "deal_time";
     public static final String DepartmentId = "department_id";
     public static final String DepartmentName = "department_name";
-    public static final String ReviewerId = "reviewer_id";
-    public static final String ReviewerName = "reviewer_name";
-    public static final String ReviewDate = "review_date";
-    public static final String ReviewStates = "review_states";
+    public static final String CreateTime = "create_time";
+    public static final String States = "states";
     public static final String Beiz = "beiz";
-    public static final String Beiz2 = "beiz2";
-    public static final String UploadFiles = "upload_files";
-    public static final String WarehouseId = "warehouse_id";
-    public static final String WarehouseName = "warehouse_name";
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -61,11 +56,17 @@
         if (depFormScrapped.isset_businessFormCode) {
             this.setBusinessFormCode(depFormScrapped.getBusinessFormCode());
         }
-        if (depFormScrapped.isset_agencyId) {
-            this.setAgencyId(depFormScrapped.getAgencyId());
+        if (depFormScrapped.isset_procureDoc) {
+            this.setProcureDoc(depFormScrapped.getProcureDoc());
         }
-        if (depFormScrapped.isset_agencyName) {
-            this.setAgencyName(depFormScrapped.getAgencyName());
+        if (depFormScrapped.isset_outWarehouseType) {
+            this.setOutWarehouseType(depFormScrapped.getOutWarehouseType());
+        }
+        if (depFormScrapped.isset_outWarehouseId) {
+            this.setOutWarehouseId(depFormScrapped.getOutWarehouseId());
+        }
+        if (depFormScrapped.isset_outWarehouseName) {
+            this.setOutWarehouseName(depFormScrapped.getOutWarehouseName());
         }
         if (depFormScrapped.isset_operatorId) {
             this.setOperatorId(depFormScrapped.getOperatorId());
@@ -82,32 +83,14 @@
         if (depFormScrapped.isset_departmentName) {
             this.setDepartmentName(depFormScrapped.getDepartmentName());
         }
-        if (depFormScrapped.isset_reviewerId) {
-            this.setReviewerId(depFormScrapped.getReviewerId());
+        if (depFormScrapped.isset_createTime) {
+            this.setCreateTime(depFormScrapped.getCreateTime());
         }
-        if (depFormScrapped.isset_reviewerName) {
-            this.setReviewerName(depFormScrapped.getReviewerName());
-        }
-        if (depFormScrapped.isset_reviewDate) {
-            this.setReviewDate(depFormScrapped.getReviewDate());
-        }
-        if (depFormScrapped.isset_reviewStates) {
-            this.setReviewStates(depFormScrapped.getReviewStates());
+        if (depFormScrapped.isset_states) {
+            this.setStates(depFormScrapped.getStates());
         }
         if (depFormScrapped.isset_beiz) {
             this.setBeiz(depFormScrapped.getBeiz());
-        }
-        if (depFormScrapped.isset_beiz2) {
-            this.setBeiz2(depFormScrapped.getBeiz2());
-        }
-        if (depFormScrapped.isset_uploadFiles) {
-            this.setUploadFiles(depFormScrapped.getUploadFiles());
-        }
-        if (depFormScrapped.isset_warehouseId) {
-            this.setWarehouseId(depFormScrapped.getWarehouseId());
-        }
-        if (depFormScrapped.isset_warehouseName) {
-            this.setWarehouseName(depFormScrapped.getWarehouseName());
         }
         // 鍘绘帀锛�2022-09-07
         // this.setDatabaseName_(dep_form_scrapped.getDatabaseName_());
@@ -153,22 +136,18 @@
         InsertBuilder ib = new InsertBuilder(this.getTableName_());
         ib.set(Id, this.getId());
         ib.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
-        ib.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
-        ib.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
+        ib.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc);
+        ib.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType);
+        ib.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId);
+        ib.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName);
         ib.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
         ib.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
         ib.set(DealTime, this.getDealTime(), this.isset_dealTime);
         ib.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId);
         ib.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName);
-        ib.set(ReviewerId, this.getReviewerId(), this.isset_reviewerId);
-        ib.set(ReviewerName, this.getReviewerName(), this.isset_reviewerName);
-        ib.set(ReviewDate, this.getReviewDate(), this.isset_reviewDate);
-        ib.set(ReviewStates, this.getReviewStates(), this.isset_reviewStates);
+        ib.set(CreateTime, this.getCreateTime(), this.isset_createTime);
+        ib.set(States, this.getStates(), this.isset_states);
         ib.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ib.set(Beiz2, this.getBeiz2(), this.isset_beiz2);
-        ib.set(UploadFiles, this.getUploadFiles(), this.isset_uploadFiles);
-        ib.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
-        ib.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         return ib.genMapSql();
     }
 
@@ -179,22 +158,18 @@
     public SqlAndParameters<Map<String, Object>> getUpdateSql_() {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
         ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
-        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
-        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
+        ub.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc);
+        ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType);
+        ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId);
+        ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName);
         ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
         ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
         ub.set(DealTime, this.getDealTime(), this.isset_dealTime);
         ub.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId);
         ub.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName);
-        ub.set(ReviewerId, this.getReviewerId(), this.isset_reviewerId);
-        ub.set(ReviewerName, this.getReviewerName(), this.isset_reviewerName);
-        ub.set(ReviewDate, this.getReviewDate(), this.isset_reviewDate);
-        ub.set(ReviewStates, this.getReviewStates(), this.isset_reviewStates);
+        ub.set(CreateTime, this.getCreateTime(), this.isset_createTime);
+        ub.set(States, this.getStates(), this.isset_states);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(Beiz2, this.getBeiz2(), this.isset_beiz2);
-        ub.set(UploadFiles, this.getUploadFiles(), this.isset_uploadFiles);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
-        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         ub.where(this.getPkName_(), this.getPkValue_());
         return ub.genMapSql();
     }
@@ -206,22 +181,18 @@
     public SqlAndParameters<Map<String, Object>> getUpdateSql_(String where, Map<String, Object> parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
         ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
-        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
-        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
+        ub.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc);
+        ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType);
+        ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId);
+        ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName);
         ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
         ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
         ub.set(DealTime, this.getDealTime(), this.isset_dealTime);
         ub.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId);
         ub.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName);
-        ub.set(ReviewerId, this.getReviewerId(), this.isset_reviewerId);
-        ub.set(ReviewerName, this.getReviewerName(), this.isset_reviewerName);
-        ub.set(ReviewDate, this.getReviewDate(), this.isset_reviewDate);
-        ub.set(ReviewStates, this.getReviewStates(), this.isset_reviewStates);
+        ub.set(CreateTime, this.getCreateTime(), this.isset_createTime);
+        ub.set(States, this.getStates(), this.isset_states);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(Beiz2, this.getBeiz2(), this.isset_beiz2);
-        ub.set(UploadFiles, this.getUploadFiles(), this.isset_uploadFiles);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
-        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         return ub.genMapSql(where, parameters);
     }
 
@@ -232,22 +203,18 @@
     public SqlAndParameters<Object[]> getUpdateSql_(String where, Object[] parameters) {
         UpdateBuilder ub = new UpdateBuilder(this.getTableName_());
         ub.set(BusinessFormCode, this.getBusinessFormCode(), this.isset_businessFormCode);
-        ub.set(AgencyId, this.getAgencyId(), this.isset_agencyId);
-        ub.set(AgencyName, this.getAgencyName(), this.isset_agencyName);
+        ub.set(ProcureDoc, this.getProcureDoc(), this.isset_procureDoc);
+        ub.set(OutWarehouseType, this.getOutWarehouseType(), this.isset_outWarehouseType);
+        ub.set(OutWarehouseId, this.getOutWarehouseId(), this.isset_outWarehouseId);
+        ub.set(OutWarehouseName, this.getOutWarehouseName(), this.isset_outWarehouseName);
         ub.set(OperatorId, this.getOperatorId(), this.isset_operatorId);
         ub.set(OperatorName, this.getOperatorName(), this.isset_operatorName);
         ub.set(DealTime, this.getDealTime(), this.isset_dealTime);
         ub.set(DepartmentId, this.getDepartmentId(), this.isset_departmentId);
         ub.set(DepartmentName, this.getDepartmentName(), this.isset_departmentName);
-        ub.set(ReviewerId, this.getReviewerId(), this.isset_reviewerId);
-        ub.set(ReviewerName, this.getReviewerName(), this.isset_reviewerName);
-        ub.set(ReviewDate, this.getReviewDate(), this.isset_reviewDate);
-        ub.set(ReviewStates, this.getReviewStates(), this.isset_reviewStates);
+        ub.set(CreateTime, this.getCreateTime(), this.isset_createTime);
+        ub.set(States, this.getStates(), this.isset_states);
         ub.set(Beiz, this.getBeiz(), this.isset_beiz);
-        ub.set(Beiz2, this.getBeiz2(), this.isset_beiz2);
-        ub.set(UploadFiles, this.getUploadFiles(), this.isset_uploadFiles);
-        ub.set(WarehouseId, this.getWarehouseId(), this.isset_warehouseId);
-        ub.set(WarehouseName, this.getWarehouseName(), this.isset_warehouseName);
         return ub.genArraySql(where, parameters);
     }
 
@@ -295,7 +262,7 @@
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, business_form_code, agency_id, agency_name, operator_id, operator_name, deal_time, department_id, department_name, reviewer_id, reviewer_name, review_date, review_states, beiz, beiz2, upload_files, warehouse_id, warehouse_name from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, business_form_code, procure_doc, out_warehouse_type, out_warehouse_id, out_warehouse_name, operator_id, operator_name, deal_time, department_id, department_name, create_time, states, beiz from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -303,7 +270,7 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, business_form_code, agency_id, agency_name, operator_id, operator_name, deal_time, department_id, department_name, reviewer_id, reviewer_name, review_date, review_states, beiz, beiz2, upload_files, warehouse_id, warehouse_name from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, business_form_code, procure_doc, out_warehouse_type, out_warehouse_id, out_warehouse_name, operator_id, operator_name, deal_time, department_id, department_name, create_time, states, beiz from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -332,113 +299,93 @@
     @Override
     public DepFormScrapped mapRow(ResultSet rs, int i) throws SQLException {
         ResultSetUtils resultSetUtils = new ResultSetUtils();
-        DepFormScrapped dep_form_scrapped = new DepFormScrapped();
+DepFormScrapped dep_form_scrapped = new DepFormScrapped();
         Integer columnIndex;
         //涓婚敭
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.Id);
         if (columnIndex > 0) {
-            dep_form_scrapped.setId(rs.getLong(columnIndex));
+dep_form_scrapped.setId(rs.getLong(columnIndex));
         }
         //鏅�氬睘鎬�
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.BusinessFormCode);
         if (columnIndex > 0) {
-            dep_form_scrapped.setBusinessFormCode(rs.getString(columnIndex));
+dep_form_scrapped.setBusinessFormCode(rs.getString(columnIndex));
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.AgencyId);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.ProcureDoc);
+        if (columnIndex > 0) {
+dep_form_scrapped.setProcureDoc(rs.getString(columnIndex));
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.OutWarehouseType);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setAgencyId(null);
+dep_form_scrapped.setOutWarehouseType(null);
             } else {
-                dep_form_scrapped.setAgencyId(rs.getLong(columnIndex));
+dep_form_scrapped.setOutWarehouseType(rs.getInt(columnIndex));
             }
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.AgencyName);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.OutWarehouseId);
         if (columnIndex > 0) {
-            dep_form_scrapped.setAgencyName(rs.getString(columnIndex));
+            if (rs.getBigDecimal(columnIndex) == null) {
+dep_form_scrapped.setOutWarehouseId(null);
+            } else {
+dep_form_scrapped.setOutWarehouseId(rs.getLong(columnIndex));
+            }
+        }
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.OutWarehouseName);
+        if (columnIndex > 0) {
+dep_form_scrapped.setOutWarehouseName(rs.getString(columnIndex));
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.OperatorId);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setOperatorId(null);
+dep_form_scrapped.setOperatorId(null);
             } else {
-                dep_form_scrapped.setOperatorId(rs.getLong(columnIndex));
+dep_form_scrapped.setOperatorId(rs.getLong(columnIndex));
             }
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.OperatorName);
         if (columnIndex > 0) {
-            dep_form_scrapped.setOperatorName(rs.getString(columnIndex));
+dep_form_scrapped.setOperatorName(rs.getString(columnIndex));
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.DealTime);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setDealTime(null);
+dep_form_scrapped.setDealTime(null);
             } else {
-                dep_form_scrapped.setDealTime(rs.getLong(columnIndex));
+dep_form_scrapped.setDealTime(rs.getLong(columnIndex));
             }
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.DepartmentId);
         if (columnIndex > 0) {
-            dep_form_scrapped.setDepartmentId(rs.getString(columnIndex));
+dep_form_scrapped.setDepartmentId(rs.getString(columnIndex));
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.DepartmentName);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setDepartmentName(null);
+dep_form_scrapped.setDepartmentName(null);
             } else {
-                dep_form_scrapped.setDepartmentName(rs.getLong(columnIndex));
+dep_form_scrapped.setDepartmentName(rs.getLong(columnIndex));
             }
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.ReviewerId);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.CreateTime);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setReviewerId(null);
+dep_form_scrapped.setCreateTime(null);
             } else {
-                dep_form_scrapped.setReviewerId(rs.getLong(columnIndex));
+dep_form_scrapped.setCreateTime(rs.getLong(columnIndex));
             }
         }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.ReviewerName);
-        if (columnIndex > 0) {
-            dep_form_scrapped.setReviewerName(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.ReviewDate);
+        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.States);
         if (columnIndex > 0) {
             if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setReviewDate(null);
+dep_form_scrapped.setStates(null);
             } else {
-                dep_form_scrapped.setReviewDate(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.ReviewStates);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setReviewStates(null);
-            } else {
-                dep_form_scrapped.setReviewStates(rs.getInt(columnIndex));
+dep_form_scrapped.setStates(rs.getInt(columnIndex));
             }
         }
         columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.Beiz);
         if (columnIndex > 0) {
-            dep_form_scrapped.setBeiz(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.Beiz2);
-        if (columnIndex > 0) {
-            dep_form_scrapped.setBeiz2(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.UploadFiles);
-        if (columnIndex > 0) {
-            dep_form_scrapped.setUploadFiles(rs.getString(columnIndex));
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.WarehouseId);
-        if (columnIndex > 0) {
-            if (rs.getBigDecimal(columnIndex) == null) {
-                dep_form_scrapped.setWarehouseId(null);
-            } else {
-                dep_form_scrapped.setWarehouseId(rs.getLong(columnIndex));
-            }
-        }
-        columnIndex = resultSetUtils.findColumn(rs, DepFormScrapped_mapper.WarehouseName);
-        if (columnIndex > 0) {
-            dep_form_scrapped.setWarehouseName(rs.getString(columnIndex));
+dep_form_scrapped.setBeiz(rs.getString(columnIndex));
         }
         return dep_form_scrapped;
     }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel.java
index cb04dac..c09f0ce 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel.java
@@ -6,13 +6,12 @@
 import com.walker.jdbc.BasePo;
 
 /**
- * 琛ㄥ悕:L_WH_PROCURE_MODEL *
+ * 琛ㄥ悕:L_WH_PROCURE_MODEL
  *
  * @author genrator
  */
 @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY)
 public class LWhProcureModel extends BasePo<LWhProcureModel> {
-
     // 搴忓垪鍖栫増鏈彿
     private static final long serialVersionUID = 1L;
 
@@ -61,6 +60,10 @@
     private Long totalAmount;
     @JsonIgnore
     protected boolean isset_totalAmount = false;
+
+    private Integer useCount = null;
+    @JsonIgnore
+    protected boolean isset_useCount = false;
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -237,68 +240,87 @@
         return this.totalAmount == null;
     }
 
+    public Integer getUseCount() {
+        return this.useCount;
+    }
+
+    public void setUseCount(Integer useCount) {
+        this.useCount = useCount;
+        this.isset_useCount = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyUseCount() {
+        return this.useCount == null;
+    }
+
     /**
      * 閲嶅啓 toString() 鏂规硶
      */
     @Override
     public String toString() {
         return new StringBuilder()
-            .append("id=").append(this.id)
-            .append("fromProcureGoodsId=").append(this.fromProcureGoodsId)
-            .append("businessType=").append(this.businessType)
-            .append("businessId=").append(this.businessId)
-            .append("baseGoodsModelsId=").append(this.baseGoodsModelsId)
-            .append("baseGoodsModelsName=").append(this.baseGoodsModelsName)
-            .append("price=").append(this.price)
-            .append("counts=").append(this.counts)
-            .append("worehouseCount=").append(this.worehouseCount)
-            .append("supplier=").append(this.supplier)
-            .toString();
+                .append("id=").append(this.id)
+                .append("fromProcureGoodsId=").append(this.fromProcureGoodsId)
+                .append("businessType=").append(this.businessType)
+                .append("businessId=").append(this.businessId)
+                .append("baseGoodsModelsId=").append(this.baseGoodsModelsId)
+                .append("baseGoodsModelsName=").append(this.baseGoodsModelsName)
+                .append("price=").append(this.price)
+                .append("counts=").append(this.counts)
+                .append("worehouseCount=").append(this.worehouseCount)
+                .append("supplier=").append(this.supplier)
+                .append("totalAmount=").append(this.totalAmount)
+                .append("useCount=").append(this.useCount)
+                .toString();
     }
 
     /**
      * 鍏嬮殕
      */
     public LWhProcureModel $clone() {
-        LWhProcureModel l_wh_procure_model = new LWhProcureModel();
+LWhProcureModel l_wh_procure_model = new LWhProcureModel();
 
         // 鏁版嵁搴撳悕绉�
         //l_wh_procure_model.setDatabaseName_(this.getDatabaseName_());
 
         // 涓婚敭
         if (this.isset_id) {
-            l_wh_procure_model.setId(this.getId());
+l_wh_procure_model.setId(this.getId());
         }
         // 鏅�氬睘鎬�
         if (this.isset_fromProcureGoodsId) {
-            l_wh_procure_model.setFromProcureGoodsId(this.getFromProcureGoodsId());
+l_wh_procure_model.setFromProcureGoodsId(this.getFromProcureGoodsId());
         }
         if (this.isset_businessType) {
-            l_wh_procure_model.setBusinessType(this.getBusinessType());
+l_wh_procure_model.setBusinessType(this.getBusinessType());
         }
         if (this.isset_businessId) {
-            l_wh_procure_model.setBusinessId(this.getBusinessId());
+l_wh_procure_model.setBusinessId(this.getBusinessId());
         }
         if (this.isset_baseGoodsModelsId) {
-            l_wh_procure_model.setBaseGoodsModelsId(this.getBaseGoodsModelsId());
+l_wh_procure_model.setBaseGoodsModelsId(this.getBaseGoodsModelsId());
         }
         if (this.isset_baseGoodsModelsName) {
-            l_wh_procure_model.setBaseGoodsModelsName(this.getBaseGoodsModelsName());
+l_wh_procure_model.setBaseGoodsModelsName(this.getBaseGoodsModelsName());
         }
         if (this.isset_price) {
-            l_wh_procure_model.setPrice(this.getPrice());
+l_wh_procure_model.setPrice(this.getPrice());
         }
         if (this.isset_counts) {
-            l_wh_procure_model.setCounts(this.getCounts());
+l_wh_procure_model.setCounts(this.getCounts());
         }
         if (this.isset_worehouseCount) {
-            l_wh_procure_model.setWorehouseCount(this.getWorehouseCount());
+l_wh_procure_model.setWorehouseCount(this.getWorehouseCount());
         }
         if (this.isset_supplier) {
-            l_wh_procure_model.setSupplier(this.getSupplier());
+l_wh_procure_model.setSupplier(this.getSupplier());
         }
         if (this.isset_totalAmount) {
-            l_wh_procure_model.setTotalAmount(this.getTotalAmount());
+l_wh_procure_model.setTotalAmount(this.getTotalAmount());
+        }
+        if (this.isset_useCount) {
+l_wh_procure_model.setUseCount(this.getUseCount());
         }
         return l_wh_procure_model;
     }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser.java
index d67103f..7f561d8 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser.java
@@ -48,6 +48,10 @@
     @JsonIgnore
     protected boolean isset_goodsNum = false;
 
+    private Integer useCount = null;
+    @JsonIgnore
+    protected boolean isset_useCount = false;
+
     /**
      * 榛樿鏋勯�犲嚱鏁�
      */
@@ -181,6 +185,20 @@
         return this.goodsNum == null;
     }
 
+    public Integer getUseCount() {
+        return this.useCount;
+    }
+
+    public void setUseCount(Integer useCount) {
+        this.useCount = useCount;
+        this.isset_useCount = true;
+    }
+
+    @JsonIgnore
+    public boolean isEmptyUseCount() {
+        return this.useCount == null;
+    }
+
     /**
      * 閲嶅啓 toString() 鏂规硶
      */
@@ -195,6 +213,7 @@
                 .append("nowUserPhone=").append(this.nowUserPhone)
                 .append("nowUserName=").append(this.nowUserName)
                 .append("goodsNum=").append(this.goodsNum)
+                .append("useCount=").append(this.useCount)
                 .toString();
     }
 
@@ -233,6 +252,9 @@
         if (this.isset_goodsNum) {
             l_wh_procure_model_user.setGoodsNum(this.getGoodsNum());
         }
+        if (this.isset_useCount) {
+            l_wh_procure_model_user.setUseCount(this.getUseCount());
+        }
         return l_wh_procure_model_user;
     }
 }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser_mapper.java
index 8589382..5baed7b 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModelUser_mapper.java
@@ -7,8 +7,6 @@
 import com.walker.jdbc.sqlgen.InsertBuilder;
 import com.walker.jdbc.sqlgen.SelectBuilder;
 import com.walker.jdbc.sqlgen.UpdateBuilder;
-import com.walker.jdbc.util.StringUtils;
-
 import org.springframework.jdbc.core.RowMapper;
 
 import java.sql.ResultSet;
@@ -35,6 +33,7 @@
     public static final String NowUserPhone = "now_user_phone";
     public static final String NowUserName = "now_user_name";
     public static final String GoodsNum = "goods_num";
+    public static final String UseCount = "use_count";
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -68,6 +67,9 @@
         }
         if (lWhProcureModelUser.isset_goodsNum) {
             this.setGoodsNum(lWhProcureModelUser.getGoodsNum());
+        }
+        if (lWhProcureModelUser.isset_useCount) {
+            this.setUseCount(lWhProcureModelUser.getUseCount());
         }
         // 鍘绘帀锛�2022-09-07
         // this.setDatabaseName_(l_wh_procure_model_user.getDatabaseName_());
@@ -119,6 +121,7 @@
         ib.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone);
         ib.set(NowUserName, this.getNowUserName(), this.isset_nowUserName);
         ib.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum);
+        ib.set(UseCount, this.getUseCount(), this.isset_useCount);
         return ib.genMapSql();
     }
 
@@ -135,6 +138,7 @@
         ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone);
         ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName);
         ub.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
         ub.where(this.getPkName_(), this.getPkValue_());
         return ub.genMapSql();
     }
@@ -152,6 +156,7 @@
         ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone);
         ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName);
         ub.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
         return ub.genMapSql(where, parameters);
     }
 
@@ -168,6 +173,7 @@
         ub.set(NowUserPhone, this.getNowUserPhone(), this.isset_nowUserPhone);
         ub.set(NowUserName, this.getNowUserName(), this.isset_nowUserName);
         ub.set(GoodsNum, this.getGoodsNum(), this.isset_goodsNum);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
         return ub.genArraySql(where, parameters);
     }
 
@@ -215,7 +221,7 @@
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, trans_business_id, procure_model_user_record_id, wh_procure_model_id, base_goods_models_id, now_user_phone, now_user_name, goods_num from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, trans_business_id, procure_model_user_record_id, wh_procure_model_id, base_goods_models_id, now_user_phone, now_user_name, goods_num, use_count from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -223,7 +229,7 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, trans_business_id, procure_model_user_record_id, wh_procure_model_id, base_goods_models_id, now_user_phone, now_user_name, goods_num from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, trans_business_id, procure_model_user_record_id, wh_procure_model_id, base_goods_models_id, now_user_phone, now_user_name, goods_num, use_count from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -312,6 +318,14 @@
                 l_wh_procure_model_user.setGoodsNum(rs.getInt(columnIndex));
             }
         }
+        columnIndex = resultSetUtils.findColumn(rs, LWhProcureModelUser_mapper.UseCount);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                l_wh_procure_model_user.setUseCount(null);
+            } else {
+                l_wh_procure_model_user.setUseCount(rs.getInt(columnIndex));
+            }
+        }
         return l_wh_procure_model_user;
     }
 }
diff --git a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel_mapper.java b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel_mapper.java
index cf1b78e..5ba06f0 100644
--- a/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel_mapper.java
+++ b/consum-model-pojo/src/main/java/com/consum/model/po/LWhProcureModel_mapper.java
@@ -7,13 +7,15 @@
 import com.walker.jdbc.sqlgen.InsertBuilder;
 import com.walker.jdbc.sqlgen.SelectBuilder;
 import com.walker.jdbc.sqlgen.UpdateBuilder;
+import org.springframework.jdbc.core.RowMapper;
+
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Map;
-import org.springframework.jdbc.core.RowMapper;
 
 /**
- * 琛ㄥ悕:L_WH_PROCURE_MODEL *
+ * 琛ㄥ悕:L_WH_PROCURE_MODEL
+ *
  * @author genrator
  */
 public class LWhProcureModel_mapper extends LWhProcureModel implements BaseMapper<LWhProcureModel> {
@@ -35,6 +37,7 @@
     public static final String WorehouseCount = "worehouse_count";
     public static final String Supplier = "supplier";
     public static final String TotalAmount = "total_amount";
+    public static final String UseCount = "use_count";
 
     /**
      * 榛樿鏋勯�犲嚱鏁�
@@ -77,6 +80,9 @@
         }
         if (lWhProcureModel.isset_totalAmount) {
             this.setTotalAmount(lWhProcureModel.getTotalAmount());
+        }
+        if (lWhProcureModel.isset_useCount) {
+            this.setUseCount(lWhProcureModel.getUseCount());
         }
         // 鍘绘帀锛�2022-09-07
         // this.setDatabaseName_(l_wh_procure_model.getDatabaseName_());
@@ -131,6 +137,7 @@
         ib.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount);
         ib.set(Supplier, this.getSupplier(), this.isset_supplier);
         ib.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
+        ib.set(UseCount, this.getUseCount(), this.isset_useCount);
         return ib.genMapSql();
     }
 
@@ -150,6 +157,7 @@
         ub.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount);
         ub.set(Supplier, this.getSupplier(), this.isset_supplier);
         ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
         ub.where(this.getPkName_(), this.getPkValue_());
         return ub.genMapSql();
     }
@@ -170,6 +178,7 @@
         ub.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount);
         ub.set(Supplier, this.getSupplier(), this.isset_supplier);
         ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
         return ub.genMapSql(where, parameters);
     }
 
@@ -189,6 +198,7 @@
         ub.set(WorehouseCount, this.getWorehouseCount(), this.isset_worehouseCount);
         ub.set(Supplier, this.getSupplier(), this.isset_supplier);
         ub.set(TotalAmount, this.getTotalAmount(), this.isset_totalAmount);
+        ub.set(UseCount, this.getUseCount(), this.isset_useCount);
         return ub.genArraySql(where, parameters);
     }
 
@@ -236,7 +246,7 @@
      */
     @Override
     public SqlAndParameters<Map<String, Object>> getSelectSql_(String where, Map<String, Object> parameters) {
-        return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier, total_amount from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier, total_amount, use_count from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -244,7 +254,7 @@
      */
     @Override
     public SqlAndParameters<Object[]> getSelectSql_(String where, Object[] parameters) {
-        return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier, total_amount from " + this.getTableName_() + " " + where, parameters);
+        return new SqlAndParameters<>("select id, from_procure_goods_id, business_type, business_id, base_goods_models_id, base_goods_models_name, price, counts, worehouse_count, supplier, total_amount, use_count from " + this.getTableName_() + " " + where, parameters);
     }
 
     /**
@@ -353,6 +363,14 @@
                 l_wh_procure_model.setTotalAmount(rs.getLong(columnIndex));
             }
         }
+        columnIndex = resultSetUtils.findColumn(rs, LWhProcureModel_mapper.UseCount);
+        if (columnIndex > 0) {
+            if (rs.getBigDecimal(columnIndex) == null) {
+                l_wh_procure_model.setUseCount(null);
+            } else {
+                l_wh_procure_model.setUseCount(rs.getInt(columnIndex));
+            }
+        }
         return l_wh_procure_model;
     }
 }

--
Gitblit v1.9.1