From 75fe3256789a4c565f27099eba6e2cb34ee1b57d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 14 四月 2021 08:51:14 +0800
Subject: [PATCH] #

---
 /dev/null                                                               |  197 -------
 src/main/java/zy/cloud/wms/common/service/erp/ErpService.java           |  156 ++--
 src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java         | 1144 +++++++++++++++++++++---------------------
 src/main/java/zy/cloud/wms/manager/controller/ConsoleController.java    |    2 
 src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java    |   75 --
 src/main/java/zy/cloud/wms/manager/service/impl/LocDetlServiceImpl.java |    3 
 6 files changed, 653 insertions(+), 924 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java b/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java
index abbf2aa..e40e65a 100644
--- a/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java
+++ b/src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java
@@ -1,574 +1,574 @@
-package zy.cloud.wms.common.service.erp;
-
-import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.core.common.Cools;
-import com.core.common.DateUtils;
-import com.core.common.SnowflakeIdWorker;
-import com.core.exception.CoolException;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-import zy.cloud.wms.common.service.erp.entity.*;
-import zy.cloud.wms.manager.entity.*;
-import zy.cloud.wms.manager.mapper.CustOrderMapper;
-import zy.cloud.wms.manager.mapper.TagMapper;
-import zy.cloud.wms.manager.service.*;
-import zy.cloud.wms.manager.utils.HttpHandler;
-import zy.cloud.wms.manager.utils.NodeUtils;
-
-import java.io.IOException;
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * erp浠诲姟鎺у埗鍣�
- * Created by vincent on 2020/11/27
- */
-@Slf4j
-@Component
-@RestController
-public class ErpScheduler {
-
-    public static final String URI = "http://8.133.182.21:8080/api";
-    public static final String GET_ORDERS = "cM/basis/getOrders";
-    public static final String GET_BASIS = "cM/basis/getBasis";
-    public static final String UPLOAD_BILL = "cM/basis/uploadBill";
-    public static final String UPLOAD_STOCK = "cM/basis/uploadStock";
-    public static final String OVER_BILL = "cM/basis/OverBill";
-    public static final String UPLOAD_CANCEL_RESULT = "cM/basis/cancelOrders";
-
-    @Autowired
-    private CustOrderService custOrderService;
-    @Autowired
-    private MatService matService;
-    @Autowired
-    private CstmrService cstmrService;
-    @Autowired
-    private LocDetlService locDetlService;
-    @Autowired
-    private TagService tagService;
-    @Autowired
-    private TagMapper tagMapper;
-    @Autowired
-    private CustOrderMapper custOrderMapper;
-    @Autowired
-    private SnowflakeIdWorker snowflakeIdWorker;
-
-    /**
-     * 鍟嗗搧涓嬭浇
-     */
-    //    @Scheduled(cron = "0/5 * * * * ? ")
-    @GetMapping("/test1")
-//    @PostConstruct
-    public void getBasis1Execute(){
-        try {
-            Map<String, Object> param = new HashMap<>();
-            param.put("rec", 0);
-            param.put("Flag", 1);
-            String response = new HttpHandler.Builder()
-                    .setUri(URI)
-                    .setPath(GET_BASIS)
-                    .setJson(JSON.toJSONString(param))
-                    .build()
-                    .doPost();
-            if (!Cools.isEmpty(response)) {
-                log.info(response);
-                Date now = new Date();
-                Result result = JSON.parseObject(response, Result.class);
-                if (result.getCode() != 1) {
-                    return;
-                }
-                List<GetBasisResult> list = JSON.parseArray(result.getData(), GetBasisResult.class);
-                Tag first = null;
-                for (GetBasisResult data : list) {
-                    Mat mat = matService.selectByMatnr(data.getUserCode());
-                    String modifyDate = data.getModifyDate();
-                    Date updateTime = null;
-                    if (!Cools.isEmpty(modifyDate)) {
-                        updateTime = DateUtils.convert(data.getModifyDate());
-                    }
-
-                    // 鍒嗙被
-                    Tag second = tagService.selectOne(new EntityWrapper<Tag>().eq("name", data.getYjfl()).eq("level", 2));
-                    if (second == null) {
-                        if (first == null) {
-                            first = tagService.selectOne(new EntityWrapper<Tag>().eq("level", 1));
-                            if (first == null) {
-                                throw new CoolException("鍏ㄩ儴鍒嗙被鍑洪敊");
-                            }
-                        }
-                        NodeUtils nodeUtils = new NodeUtils();
-                        nodeUtils.executePath(first.getId());
-                        second = new Tag(
-                                null,    // 缂栧彿
-                                data.getYjfl(),    // 鍚嶇О
-                                first.getId(),    // 鐖剁骇
-                                first.getName(),    // 鐖剁骇鍚嶇О
-                                nodeUtils.path.toString(),    // 鍏宠仈璺緞
-                                nodeUtils.pathName.toString(),    // 鍏宠仈璺緞鍚�
-                                0,    // 绫诲瀷
-                                null,    // 璐熻矗浜�
-                                null,    // 鍥剧墖
-                                null,    // 绠�瑕佹弿杩�
-                                null,    // 鏁伴噺
-                                2,    // 绛夌骇
-                                null,    // 鎺掑簭
-                                1,    // 鐘舵��
-                                now,    // 娣诲姞鏃堕棿
-                                null,    // 娣诲姞浜哄憳
-                                now,    // 淇敼鏃堕棿
-                                null,    // 淇敼浜哄憳
-                                null    // 澶囨敞
-                        );
-                        if (tagMapper.insert(second) == 0) {
-                            throw new CoolException("鎻掑叆鍒嗙被澶辫触");
-                        }
-                    }
-
-                    Tag third = tagService.selectOne(new EntityWrapper<Tag>().eq("level", 3).eq("name", data.getEjfl()).eq("parent_name", data.getYjfl()));
-                    if (third == null) {
-                        NodeUtils nodeUtils = new NodeUtils();
-                        nodeUtils.executePath(second.getId());
-                        third = new Tag(
-                                null,    // 缂栧彿
-                                data.getEjfl(),    // 鍚嶇О
-                                second.getId(),    // 鐖剁骇
-                                second.getName(),    // 鐖剁骇鍚嶇О
-                                nodeUtils.path.toString(),    // 鍏宠仈璺緞
-                                nodeUtils.pathName.toString(),    // 鍏宠仈璺緞鍚�
-                                0,    // 绫诲瀷
-                                null,    // 璐熻矗浜�
-                                null,    // 鍥剧墖
-                                null,    // 绠�瑕佹弿杩�
-                                null,    // 鏁伴噺
-                                3,    // 绛夌骇
-                                null,    // 鎺掑簭
-                                1,    // 鐘舵��
-                                now,    // 娣诲姞鏃堕棿
-                                null,    // 娣诲姞浜哄憳
-                                now,    // 淇敼鏃堕棿
-                                null,    // 淇敼浜哄憳
-                                null    // 澶囨敞
-                        );
-                        if (tagMapper.insert(third) == 0) {
-                            throw new CoolException("鎻掑叆鍒嗙被澶辫触");
-                        }
-                    }
-
-                    if (null == mat) {
-                        mat = new Mat(
-                                String.valueOf(data.getRec()),    // 缂栧彿
-                                null,    // 鎵�灞炲尯鍩�
-                                third.getId(),    // 鎵�灞炲綊绫�
-                                data.getUserCode(),    // 鍟嗗搧缂栧彿
-                                data.getFullName(),    // 鍟嗗搧鍚嶇О
-                                null,    // 鍚嶇О
-                                data.getStandard(),    // 瑙勬牸
-                                null,    // 鍨嬪彿
-                                null,    // 鎵瑰彿
-                                data.getUnit3(),    // 鍗曚綅
-                                data.getBarcode(),    // 鏉$爜
-                                null,    // 鍗曟嵁绫诲瀷
-                                null,    // 鍗曟嵁缂栧彿
-                                null,    // 瀹㈡埛鍚嶇О
-                                null,    // 鍝侀」鏁�
-                                null,    // 搴撳瓨浣欓噺
-                                null,    // 閲嶉噺
-                                1,    //
-                                null,    // 娣诲姞浜哄憳
-                                now,    // 娣诲姞鏃堕棿
-                                null,    // 淇敼浜哄憳
-                                updateTime,    // 淇敼鏃堕棿
-                                null    // 澶囨敞
-                        );
-                        matService.insert(mat);
-                    } else {
-                        mat.setUuid(String.valueOf(data.getRec()));
-                        mat.setMatnr(data.getUserCode());
-                        mat.setMaktx(data.getFullName());
-                        mat.setSpecs(data.getStandard());
-                        mat.setUpdateTime(updateTime);
-                        mat.setBarcode(data.getBarcode());
-                        mat.setUnit(data.getUnit3());
-                        matService.updateById(mat);
-                    }
-                    log.info("====>> 鏇存柊鐗╂枡锛歿}", data.getUserCode());
-                }
-
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * 瀹㈡埛涓嬭浇
-     */
-    //    @Scheduled(cron = "0/5 * * * * ? ")
-//    @PostConstruct
-    public void getBasis2Execute(){
-        try {
-            Map<String, Object> param = new HashMap<>();
-            param.put("rec", 0);
-            param.put("Flag", 2);
-            String response = new HttpHandler.Builder()
-                    .setUri(URI)
-                    .setPath(GET_BASIS)
-                    .setJson(JSON.toJSONString(param))
-                    .build()
-                    .doPost();
-            if (!Cools.isEmpty(response)) {
-                log.info(response);
-                Date now = new Date();
-                Result result = JSON.parseObject(response, Result.class);
-                if (result.getCode() != 1) {
-                    return;
-                }
-                List<GetBasisResult> list = JSON.parseArray(result.getData(), GetBasisResult.class);
-                for (GetBasisResult data : list) {
-                    Cstmr cstmr = cstmrService.selectOne(new EntityWrapper<Cstmr>().eq("uuid", data.getUserCode()));
-                    String modifyDate = data.getModifyDate();
-                    Date updateTime = null;
-                    if (!Cools.isEmpty(modifyDate)) {
-                        updateTime = DateUtils.convert(data.getModifyDate());
-                    }
-                    if (null == cstmr) {
-                        cstmr = new Cstmr(
-                                data.getUserCode(),    // 瀹㈡埛缂栧彿[闈炵┖]
-                                data.getFullName(),    // 瀹㈡埛鍚嶇О
-                                null,    // 鑱旂郴浜�
-                                null,    // 鑱旂郴鐢佃瘽
-                                null,    // 鑱旂郴鍦板潃
-                                1,    // 鐘舵��
-                                null,    // 娣诲姞浜哄憳
-                                now,    // 娣诲姞鏃堕棿
-                                null,    // 淇敼浜哄憳
-                                updateTime,    // 淇敼鏃堕棿
-                                String.valueOf(data.getRec())    // 澶囨敞
-                        );
-                        cstmrService.insert(cstmr);
-                    } else {
-                        cstmr.setUuid(data.getUserCode());
-                        cstmr.setName(data.getFullName());
-                        cstmr.setUpdateTime(updateTime);
-                        cstmr.setMemo(String.valueOf(data.getRec()));
-                        cstmrService.updateById(cstmr);
-                    }
-                    log.info("====>> 鏇存柊瀹㈡埛璧勬枡锛歿}", data.getUserCode());
-                }
-
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new RuntimeException(e.getMessage());
-        }
-    }
-
-    /**
-     * 鎸佷箙鍖栭攢鍞鍗�
-     */
-    @Scheduled(cron = "0/5 * * * * ? ")
-    @Transactional
-//    @PostConstruct
-    public void getOrdersExecute(){
-        try {
-            Map<String, Object> json = new HashMap<>();
-            json.put("vchType", 151);
-            String response = new HttpHandler.Builder()
-                    .setUri(URI)
-                    .setPath(GET_ORDERS)
-                    .setJson(JSON.toJSONString(json))
-                    .build()
-                    .doPost();
-            if (!Cools.isEmpty(response)) {
+//package zy.cloud.wms.common.service.erp;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.baomidou.mybatisplus.mapper.EntityWrapper;
+//import com.core.common.Cools;
+//import com.core.common.DateUtils;
+//import com.core.common.SnowflakeIdWorker;
+//import com.core.exception.CoolException;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.scheduling.annotation.Scheduled;
+//import org.springframework.stereotype.Component;
+//import org.springframework.transaction.annotation.Transactional;
+//import org.springframework.web.bind.annotation.GetMapping;
+//import org.springframework.web.bind.annotation.RestController;
+//import zy.cloud.wms.common.service.erp.entity.*;
+//import zy.cloud.wms.manager.entity.*;
+//import zy.cloud.wms.manager.mapper.CustOrderMapper;
+//import zy.cloud.wms.manager.mapper.TagMapper;
+//import zy.cloud.wms.manager.service.*;
+//import zy.cloud.wms.manager.utils.HttpHandler;
+//import zy.cloud.wms.manager.utils.NodeUtils;
+//
+//import java.io.IOException;
+//import java.util.*;
+//import java.util.stream.Collectors;
+//
+///**
+// * erp浠诲姟鎺у埗鍣�
+// * Created by vincent on 2020/11/27
+// */
+//@Slf4j
+//@Component
+//@RestController
+//public class ErpScheduler {
+//
+//    public static final String URI = "http://8.133.182.21:8080/api";
+//    public static final String GET_ORDERS = "cM/basis/getOrders";
+//    public static final String GET_BASIS = "cM/basis/getBasis";
+//    public static final String UPLOAD_BILL = "cM/basis/uploadBill";
+//    public static final String UPLOAD_STOCK = "cM/basis/uploadStock";
+//    public static final String OVER_BILL = "cM/basis/OverBill";
+//    public static final String UPLOAD_CANCEL_RESULT = "cM/basis/cancelOrders";
+//
+//    @Autowired
+//    private CustOrderService custOrderService;
+//    @Autowired
+//    private MatService matService;
+//    @Autowired
+//    private CstmrService cstmrService;
+//    @Autowired
+//    private LocDetlService locDetlService;
+//    @Autowired
+//    private TagService tagService;
+//    @Autowired
+//    private TagMapper tagMapper;
+//    @Autowired
+//    private CustOrderMapper custOrderMapper;
+//    @Autowired
+//    private SnowflakeIdWorker snowflakeIdWorker;
+//
+//    /**
+//     * 鍟嗗搧涓嬭浇
+//     */
+//    //    @Scheduled(cron = "0/5 * * * * ? ")
+//    @GetMapping("/test1")
+////    @PostConstruct
+//    public void getBasis1Execute(){
+//        try {
+//            Map<String, Object> param = new HashMap<>();
+//            param.put("rec", 0);
+//            param.put("Flag", 1);
+//            String response = new HttpHandler.Builder()
+//                    .setUri(URI)
+//                    .setPath(GET_BASIS)
+//                    .setJson(JSON.toJSONString(param))
+//                    .build()
+//                    .doPost();
+//            if (!Cools.isEmpty(response)) {
 //                log.info(response);
-                Date now = new Date();
-                Result result = JSON.parseObject(response, Result.class);
-                if (result.getCode() != 1) {
-                    return;
-                }
-                List<GetOrderResult0> list = JSON.parseArray(result.getData(), GetOrderResult0.class);
-                if (!Cools.isEmpty(list)) {
-                    boolean complete = true;
-                    Set<String> existNumbers = new HashSet<>();
-                    for (GetOrderResult0 data : list) {
-                        if (custOrderService.selectCount(new EntityWrapper<CustOrder>()
-                                .eq("number", data.getNumber())
-//                                .ne("bType_id", data.getBTypeID())
-                                ) > 0) {
-//                            log.error("{}鍗曞彿宸插瓨鍦�", data.getNumber());
-//                            complete = false;
-                            existNumbers.add(data.getNumber());
-                            continue;
-                        }
-                        for (GetOrderResultDetl0 detl0 : data.getDetail()) {
-                            CustOrder custOrder = new CustOrder(
-                                    data.getNumber(),    // 閿�鍞崟鍙�
-                                    data.getBillDate(),    // 鍗曟嵁鏃ユ湡[闈炵┖]
-                                    data.getBTypeID(),    // 瀹㈡埛缂栧彿
-                                    data.getETypeID(),    // 缁忔墜浜虹紪鍙穂闈炵┖]
-                                    data.getVchcode(),  // 鍗曟嵁鑷ID
-                                    detl0.getUserCode(),    // 鍟嗗搧缂栧彿
-                                    detl0.getQty(),    // 鍟嗗搧鏁伴噺
-                                    detl0.getQty(),    // 鎬绘暟閲�
-                                    detl0.getPrice(),    // 鍟嗗搧鍗曚环
-                                    detl0.getRowNo(),       // 鍟嗗搧鏄庣粏琛屽彿
-                                    detl0.getComment(),    // 鍟嗗搧澶囨敞[闈炵┖]
-                                    0,    // 鐘舵��
-                                    now,    // 娣诲姞鏃堕棿
-                                    now,    // 淇敼鏃堕棿
-                                    data.getSummary()    // 澶囨敞
-                            );
-                            if (!custOrderService.insert(custOrder)) {
-                                complete = false;
-                                log.error("淇濆瓨閿�鍞鍗曞け璐ワ紒");
-                            }
-                        }
-                    }
-                    if (complete) {
-                        List<String> collect = list.stream().map(GetOrderResult0::getNumber).distinct().collect(Collectors.toList());
-                        for (String number : collect) {
-                            if (!existNumbers.contains(number)) {
-                                custOrderService.updateStatus(number, 1);
-                            }
-                        }
-                    }
-
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-            throw new RuntimeException(e.getMessage());
-        }
-
-    }
-
-    /**
-     * 瀹屾垚閿�鍞鍗�
-     */
-    @Scheduled(cron = "0/10 * * * * ? ")
-    @Transactional
-//    @PostConstruct
-    public void finishOrdersExecute(){
-        try {
-            List<CustOrder> custOrders = custOrderService.selectList(new EntityWrapper<CustOrder>().eq("status", 4).isNotNull("vch_code"));
-            if (!Cools.isEmpty(custOrders)) {
-                List<String> numbers = custOrders.stream().map(CustOrder::getNumber).distinct().collect(Collectors.toList());
-                for (String number : numbers) {
-                    GetOrderResult0 getOrderResult0 = new GetOrderResult0();
-                    List<GetOrderResultDetl0> list = new ArrayList<>();
-                    getOrderResult0.setDetail(list);
-                    // 閬嶅巻閫掑噺
-                    Iterator<CustOrder> iterator = custOrders.iterator();
-                    while (iterator.hasNext()) {
-                        CustOrder custOrder = iterator.next();
-                        if (custOrder.getNumber().equals(number)) {
-                            // 琛ㄥご
-                            if (Cools.isEmpty(getOrderResult0.getNumber())) {
-                                getOrderResult0.setNumber(number);
-                                getOrderResult0.setVchType(11); // todo:luxiaotao
-                                getOrderResult0.setBillDate(custOrder.getBillDate());
-                                getOrderResult0.setBTypeID(custOrder.getBTypeId());
-                                getOrderResult0.setKTypeID("瀹忔尯浠撳簱");
-                                getOrderResult0.setVchcode(custOrder.getVchcode());
-                            }
-                            // 琛ㄤ綋
-                            GetOrderResultDetl0 detl0 = new GetOrderResultDetl0();
-                            detl0.setUserCode(custOrder.getUserCode());
-                            detl0.setQty(custOrder.getTotal());
-                            detl0.setPrice(custOrder.getPrice());
-                            detl0.setComment(custOrder.getComment());
-                            detl0.setRowNo(custOrder.getRowNo());
-                            list.add(detl0);
-                            iterator.remove();
-                        }
-                    }
-
-                    System.out.println(JSON.toJSONString(getOrderResult0));
-
-
-                    String response = new HttpHandler.Builder()
-                            .setUri(URI)
-                            .setPath(UPLOAD_BILL)
-                            .setJson(JSON.toJSONString(getOrderResult0))
-                            .build()
-                            .doPost();
-                    if (!Cools.isEmpty(response)) {
-                        log.warn(response);
-                        Result result = JSON.parseObject(response, Result.class);
-                        if (result.getCode() != 1) {
-                            continue;
-                        }
-                        // 杞巻鍙叉。
-                        int save = custOrderMapper.saveLog(getOrderResult0.getNumber());
-                        if (save > 0) {
-                            if (custOrderMapper.delete(new EntityWrapper<CustOrder>().eq("number", getOrderResult0.getNumber())) == 0) {
-                                throw new CoolException("鍒犻櫎閿�鍞鍗曞け璐�");
-                            }
-                            log.info("{}閿�鍞鍗曟嫞璐х粨鏉�", getOrderResult0.getNumber());
-                        }
-                    }
-
-                }
-            }
-
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new RuntimeException(e.getMessage());
-        }
-
-    }
-
-    /**
-     * 搴撳瓨涓婁紶
-     */
-//    @Scheduled(cron = "0/15 * * * * ? ")
-    @GetMapping("test2")
-    public void uploadStockExecute(){
-        try {
-
-            List<LocDetl> statis = locDetlService.getLocDetlStatis();
-            if (!Cools.isEmpty(statis)) {
-                UploadStock uploadStock = new UploadStock();
-                uploadStock.setNumber(String.valueOf(snowflakeIdWorker.nextId()));
-                uploadStock.setVchType(89);
-                uploadStock.setBillDate(DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F));
-                uploadStock.setDataSize(statis.size());
-                List<UploadStockDtel> detail = new ArrayList<>();
-                uploadStock.setDetail(detail);
-                for (LocDetl locDetl : statis) {
-                    Mat mat = matService.selectByMatnr(locDetl.getMatnr());
-                    if (mat == null) {continue;}
-                    UploadStockDtel detl = new UploadStockDtel();
-                    detl.setUserCode(mat.getMatnr());
-                    detl.setQty(locDetl.getAnfme());
-//                    detl.setPrice(Double.parseDouble());
-                    detl.setComment(mat.getMemo());
-                    detail.add(detl);
-                }
-
-                String response = new HttpHandler.Builder()
-                        .setUri(URI)
-                        .setPath(UPLOAD_STOCK)
-                        .setJson(JSON.toJSONString(uploadStock))
-                        .build()
-                        .doPost();
-                if (!Cools.isEmpty(response)) {
-                    log.info("涓婃姤搴撳瓨鏄庣粏缁熻 ======>> \nrequest:{} \nresponse:{}", JSON.toJSONString(uploadStock), response);
-                    Result result = JSON.parseObject(response, Result.class);
-                    if (result.getCode() != 1) {
-                    }
-                }
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-
-    /**
-     * 鑾峰彇鍙栨秷璁㈠崟
-     */
-    @Scheduled(cron = "0/5 * * * * ? ")
-    @Transactional
-//    @PostConstruct
-    public void getCancelOrdersExecute(){
-        try {
-            Map<String, Object> json = new HashMap<>();
-            String response = new HttpHandler.Builder()
-                    .setUri(URI)
-                    .setPath(OVER_BILL)
-                    .setJson(JSON.toJSONString(json))
-                    .build()
-                    .doPost();
-            if (!Cools.isEmpty(response)) {
+//                Date now = new Date();
+//                Result result = JSON.parseObject(response, Result.class);
+//                if (result.getCode() != 1) {
+//                    return;
+//                }
+//                List<GetBasisResult> list = JSON.parseArray(result.getData(), GetBasisResult.class);
+//                Tag first = null;
+//                for (GetBasisResult data : list) {
+//                    Mat mat = matService.selectByMatnr(data.getUserCode());
+//                    String modifyDate = data.getModifyDate();
+//                    Date updateTime = null;
+//                    if (!Cools.isEmpty(modifyDate)) {
+//                        updateTime = DateUtils.convert(data.getModifyDate());
+//                    }
+//
+//                    // 鍒嗙被
+//                    Tag second = tagService.selectOne(new EntityWrapper<Tag>().eq("name", data.getYjfl()).eq("level", 2));
+//                    if (second == null) {
+//                        if (first == null) {
+//                            first = tagService.selectOne(new EntityWrapper<Tag>().eq("level", 1));
+//                            if (first == null) {
+//                                throw new CoolException("鍏ㄩ儴鍒嗙被鍑洪敊");
+//                            }
+//                        }
+//                        NodeUtils nodeUtils = new NodeUtils();
+//                        nodeUtils.executePath(first.getId());
+//                        second = new Tag(
+//                                null,    // 缂栧彿
+//                                data.getYjfl(),    // 鍚嶇О
+//                                first.getId(),    // 鐖剁骇
+//                                first.getName(),    // 鐖剁骇鍚嶇О
+//                                nodeUtils.path.toString(),    // 鍏宠仈璺緞
+//                                nodeUtils.pathName.toString(),    // 鍏宠仈璺緞鍚�
+//                                0,    // 绫诲瀷
+//                                null,    // 璐熻矗浜�
+//                                null,    // 鍥剧墖
+//                                null,    // 绠�瑕佹弿杩�
+//                                null,    // 鏁伴噺
+//                                2,    // 绛夌骇
+//                                null,    // 鎺掑簭
+//                                1,    // 鐘舵��
+//                                now,    // 娣诲姞鏃堕棿
+//                                null,    // 娣诲姞浜哄憳
+//                                now,    // 淇敼鏃堕棿
+//                                null,    // 淇敼浜哄憳
+//                                null    // 澶囨敞
+//                        );
+//                        if (tagMapper.insert(second) == 0) {
+//                            throw new CoolException("鎻掑叆鍒嗙被澶辫触");
+//                        }
+//                    }
+//
+//                    Tag third = tagService.selectOne(new EntityWrapper<Tag>().eq("level", 3).eq("name", data.getEjfl()).eq("parent_name", data.getYjfl()));
+//                    if (third == null) {
+//                        NodeUtils nodeUtils = new NodeUtils();
+//                        nodeUtils.executePath(second.getId());
+//                        third = new Tag(
+//                                null,    // 缂栧彿
+//                                data.getEjfl(),    // 鍚嶇О
+//                                second.getId(),    // 鐖剁骇
+//                                second.getName(),    // 鐖剁骇鍚嶇О
+//                                nodeUtils.path.toString(),    // 鍏宠仈璺緞
+//                                nodeUtils.pathName.toString(),    // 鍏宠仈璺緞鍚�
+//                                0,    // 绫诲瀷
+//                                null,    // 璐熻矗浜�
+//                                null,    // 鍥剧墖
+//                                null,    // 绠�瑕佹弿杩�
+//                                null,    // 鏁伴噺
+//                                3,    // 绛夌骇
+//                                null,    // 鎺掑簭
+//                                1,    // 鐘舵��
+//                                now,    // 娣诲姞鏃堕棿
+//                                null,    // 娣诲姞浜哄憳
+//                                now,    // 淇敼鏃堕棿
+//                                null,    // 淇敼浜哄憳
+//                                null    // 澶囨敞
+//                        );
+//                        if (tagMapper.insert(third) == 0) {
+//                            throw new CoolException("鎻掑叆鍒嗙被澶辫触");
+//                        }
+//                    }
+//
+//                    if (null == mat) {
+//                        mat = new Mat(
+//                                String.valueOf(data.getRec()),    // 缂栧彿
+//                                null,    // 鎵�灞炲尯鍩�
+//                                third.getId(),    // 鎵�灞炲綊绫�
+//                                data.getUserCode(),    // 鍟嗗搧缂栧彿
+//                                data.getFullName(),    // 鍟嗗搧鍚嶇О
+//                                null,    // 鍚嶇О
+//                                data.getStandard(),    // 瑙勬牸
+//                                null,    // 鍨嬪彿
+//                                null,    // 鎵瑰彿
+//                                data.getUnit3(),    // 鍗曚綅
+//                                data.getBarcode(),    // 鏉$爜
+//                                null,    // 鍗曟嵁绫诲瀷
+//                                null,    // 鍗曟嵁缂栧彿
+//                                null,    // 瀹㈡埛鍚嶇О
+//                                null,    // 鍝侀」鏁�
+//                                null,    // 搴撳瓨浣欓噺
+//                                null,    // 閲嶉噺
+//                                1,    //
+//                                null,    // 娣诲姞浜哄憳
+//                                now,    // 娣诲姞鏃堕棿
+//                                null,    // 淇敼浜哄憳
+//                                updateTime,    // 淇敼鏃堕棿
+//                                null    // 澶囨敞
+//                        );
+//                        matService.insert(mat);
+//                    } else {
+//                        mat.setUuid(String.valueOf(data.getRec()));
+//                        mat.setMatnr(data.getUserCode());
+//                        mat.setMaktx(data.getFullName());
+//                        mat.setSpecs(data.getStandard());
+//                        mat.setUpdateTime(updateTime);
+//                        mat.setBarcode(data.getBarcode());
+//                        mat.setUnit(data.getUnit3());
+//                        matService.updateById(mat);
+//                    }
+//                    log.info("====>> 鏇存柊鐗╂枡锛歿}", data.getUserCode());
+//                }
+//
+//            }
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            throw new RuntimeException(e.getMessage());
+//        }
+//    }
+//
+//    /**
+//     * 瀹㈡埛涓嬭浇
+//     */
+//    //    @Scheduled(cron = "0/5 * * * * ? ")
+////    @PostConstruct
+//    public void getBasis2Execute(){
+//        try {
+//            Map<String, Object> param = new HashMap<>();
+//            param.put("rec", 0);
+//            param.put("Flag", 2);
+//            String response = new HttpHandler.Builder()
+//                    .setUri(URI)
+//                    .setPath(GET_BASIS)
+//                    .setJson(JSON.toJSONString(param))
+//                    .build()
+//                    .doPost();
+//            if (!Cools.isEmpty(response)) {
 //                log.info(response);
-                Date now = new Date();
-                Result result = JSON.parseObject(response, Result.class);
-                if (result.getCode() != 1) {
-                    return;
-                }
-                List<GetOrderResult0> list = JSON.parseArray(result.getData(), GetOrderResult0.class);
-                if (!Cools.isEmpty(list)) {
-                    boolean complete = true;
-                    Set<String> existNumbers = new HashSet<>();
-
-                    String cancelNumber = "";
-                    if (!custOrderService.updateStatus(cancelNumber, 5)) {
-                        throw new CoolException("淇敼璁㈠崟鐘舵�佸け璐�");
-                    }
-
-
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-            throw new RuntimeException(e.getMessage());
-        }
-
-    }
-
-    /**
-     * 涓婁紶閿�鍞鍗曞彇娑堢粨鏋�
-     */
-    @Scheduled(cron = "0/5 * * * * ? ")
-    @Transactional
-//    @PostConstruct
-    public void uploadCancelOrdersExecute(){
-        try {
-            List<CustOrder> custOrders = custOrderService.selectList(new EntityWrapper<CustOrder>().eq("status", 3).isNotNull("vch_code"));
-            if (Cools.isEmpty(custOrders)) {
-                return;
-            }
-            Map<String, Object> json = new HashMap<>();
-            List<UploadCancelResult> list = new ArrayList<>();
-            for (CustOrder custOrder : custOrders) {
-                UploadCancelResult result = new UploadCancelResult();
-                result.setNumber(custOrder.getNumber());
-                result.setUserCode(custOrder.getUserCode());
-                result.setQty(custOrder.getTotal());
-                result.setStatus(1);
-                list.add(result);
-            }
-            json.put("data", list);
-            String response = new HttpHandler.Builder()
-                    .setUri(URI)
-                    .setPath(UPLOAD_CANCEL_RESULT)
-                    .setJson(JSON.toJSONString(json))
-                    .build()
-                    .doPost();
-            if (!Cools.isEmpty(response)) {
-//                log.info(response);
-                Date now = new Date();
-                Result result = JSON.parseObject(response, Result.class);
-                if (result.getCode() != 1) {
-                    return;
-                }
-                for (UploadCancelResult result1 : list) {
-                    // 杞巻鍙叉。
-                    int save = custOrderMapper.saveLog(result1.getNumber(), result1.getUserCode());
-                    if (save > 0) {
-                        if (custOrderMapper.delete(new EntityWrapper<CustOrder>().eq("number", result1.getNumber()).eq("user_code", result1.getUserCode())) == 0) {
-                            throw new CoolException("鍒犻櫎閿�鍞鍗曞け璐�");
-                        }
-                    }
-                }
-            }
-        } catch (IOException e) {
-            e.printStackTrace();
-            throw new RuntimeException(e.getMessage());
-        }
-
-    }
-
-}
+//                Date now = new Date();
+//                Result result = JSON.parseObject(response, Result.class);
+//                if (result.getCode() != 1) {
+//                    return;
+//                }
+//                List<GetBasisResult> list = JSON.parseArray(result.getData(), GetBasisResult.class);
+//                for (GetBasisResult data : list) {
+//                    Cstmr cstmr = cstmrService.selectOne(new EntityWrapper<Cstmr>().eq("uuid", data.getUserCode()));
+//                    String modifyDate = data.getModifyDate();
+//                    Date updateTime = null;
+//                    if (!Cools.isEmpty(modifyDate)) {
+//                        updateTime = DateUtils.convert(data.getModifyDate());
+//                    }
+//                    if (null == cstmr) {
+//                        cstmr = new Cstmr(
+//                                data.getUserCode(),    // 瀹㈡埛缂栧彿[闈炵┖]
+//                                data.getFullName(),    // 瀹㈡埛鍚嶇О
+//                                null,    // 鑱旂郴浜�
+//                                null,    // 鑱旂郴鐢佃瘽
+//                                null,    // 鑱旂郴鍦板潃
+//                                1,    // 鐘舵��
+//                                null,    // 娣诲姞浜哄憳
+//                                now,    // 娣诲姞鏃堕棿
+//                                null,    // 淇敼浜哄憳
+//                                updateTime,    // 淇敼鏃堕棿
+//                                String.valueOf(data.getRec())    // 澶囨敞
+//                        );
+//                        cstmrService.insert(cstmr);
+//                    } else {
+//                        cstmr.setUuid(data.getUserCode());
+//                        cstmr.setName(data.getFullName());
+//                        cstmr.setUpdateTime(updateTime);
+//                        cstmr.setMemo(String.valueOf(data.getRec()));
+//                        cstmrService.updateById(cstmr);
+//                    }
+//                    log.info("====>> 鏇存柊瀹㈡埛璧勬枡锛歿}", data.getUserCode());
+//                }
+//
+//            }
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            throw new RuntimeException(e.getMessage());
+//        }
+//    }
+//
+//    /**
+//     * 鎸佷箙鍖栭攢鍞鍗�
+//     */
+//    @Scheduled(cron = "0/5 * * * * ? ")
+//    @Transactional
+////    @PostConstruct
+//    public void getOrdersExecute(){
+//        try {
+//            Map<String, Object> json = new HashMap<>();
+//            json.put("vchType", 151);
+//            String response = new HttpHandler.Builder()
+//                    .setUri(URI)
+//                    .setPath(GET_ORDERS)
+//                    .setJson(JSON.toJSONString(json))
+//                    .build()
+//                    .doPost();
+//            if (!Cools.isEmpty(response)) {
+////                log.info(response);
+//                Date now = new Date();
+//                Result result = JSON.parseObject(response, Result.class);
+//                if (result.getCode() != 1) {
+//                    return;
+//                }
+//                List<GetOrderResult0> list = JSON.parseArray(result.getData(), GetOrderResult0.class);
+//                if (!Cools.isEmpty(list)) {
+//                    boolean complete = true;
+//                    Set<String> existNumbers = new HashSet<>();
+//                    for (GetOrderResult0 data : list) {
+//                        if (custOrderService.selectCount(new EntityWrapper<CustOrder>()
+//                                .eq("number", data.getNumber())
+////                                .ne("bType_id", data.getBTypeID())
+//                                ) > 0) {
+////                            log.error("{}鍗曞彿宸插瓨鍦�", data.getNumber());
+////                            complete = false;
+//                            existNumbers.add(data.getNumber());
+//                            continue;
+//                        }
+//                        for (GetOrderResultDetl0 detl0 : data.getDetail()) {
+//                            CustOrder custOrder = new CustOrder(
+//                                    data.getNumber(),    // 閿�鍞崟鍙�
+//                                    data.getBillDate(),    // 鍗曟嵁鏃ユ湡[闈炵┖]
+//                                    data.getBTypeID(),    // 瀹㈡埛缂栧彿
+//                                    data.getETypeID(),    // 缁忔墜浜虹紪鍙穂闈炵┖]
+//                                    data.getVchcode(),  // 鍗曟嵁鑷ID
+//                                    detl0.getUserCode(),    // 鍟嗗搧缂栧彿
+//                                    detl0.getQty(),    // 鍟嗗搧鏁伴噺
+//                                    detl0.getQty(),    // 鎬绘暟閲�
+//                                    detl0.getPrice(),    // 鍟嗗搧鍗曚环
+//                                    detl0.getRowNo(),       // 鍟嗗搧鏄庣粏琛屽彿
+//                                    detl0.getComment(),    // 鍟嗗搧澶囨敞[闈炵┖]
+//                                    0,    // 鐘舵��
+//                                    now,    // 娣诲姞鏃堕棿
+//                                    now,    // 淇敼鏃堕棿
+//                                    data.getSummary()    // 澶囨敞
+//                            );
+//                            if (!custOrderService.insert(custOrder)) {
+//                                complete = false;
+//                                log.error("淇濆瓨閿�鍞鍗曞け璐ワ紒");
+//                            }
+//                        }
+//                    }
+//                    if (complete) {
+//                        List<String> collect = list.stream().map(GetOrderResult0::getNumber).distinct().collect(Collectors.toList());
+//                        for (String number : collect) {
+//                            if (!existNumbers.contains(number)) {
+//                                custOrderService.updateStatus(number, 1);
+//                            }
+//                        }
+//                    }
+//
+//                }
+//            }
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//            throw new RuntimeException(e.getMessage());
+//        }
+//
+//    }
+//
+//    /**
+//     * 瀹屾垚閿�鍞鍗�
+//     */
+//    @Scheduled(cron = "0/10 * * * * ? ")
+//    @Transactional
+////    @PostConstruct
+//    public void finishOrdersExecute(){
+//        try {
+//            List<CustOrder> custOrders = custOrderService.selectList(new EntityWrapper<CustOrder>().eq("status", 4).isNotNull("vch_code"));
+//            if (!Cools.isEmpty(custOrders)) {
+//                List<String> numbers = custOrders.stream().map(CustOrder::getNumber).distinct().collect(Collectors.toList());
+//                for (String number : numbers) {
+//                    GetOrderResult0 getOrderResult0 = new GetOrderResult0();
+//                    List<GetOrderResultDetl0> list = new ArrayList<>();
+//                    getOrderResult0.setDetail(list);
+//                    // 閬嶅巻閫掑噺
+//                    Iterator<CustOrder> iterator = custOrders.iterator();
+//                    while (iterator.hasNext()) {
+//                        CustOrder custOrder = iterator.next();
+//                        if (custOrder.getNumber().equals(number)) {
+//                            // 琛ㄥご
+//                            if (Cools.isEmpty(getOrderResult0.getNumber())) {
+//                                getOrderResult0.setNumber(number);
+//                                getOrderResult0.setVchType(11); // todo:luxiaotao
+//                                getOrderResult0.setBillDate(custOrder.getBillDate());
+//                                getOrderResult0.setBTypeID(custOrder.getBTypeId());
+//                                getOrderResult0.setKTypeID("瀹忔尯浠撳簱");
+//                                getOrderResult0.setVchcode(custOrder.getVchcode());
+//                            }
+//                            // 琛ㄤ綋
+//                            GetOrderResultDetl0 detl0 = new GetOrderResultDetl0();
+//                            detl0.setUserCode(custOrder.getUserCode());
+//                            detl0.setQty(custOrder.getTotal());
+//                            detl0.setPrice(custOrder.getPrice());
+//                            detl0.setComment(custOrder.getComment());
+//                            detl0.setRowNo(custOrder.getRowNo());
+//                            list.add(detl0);
+//                            iterator.remove();
+//                        }
+//                    }
+//
+//                    System.out.println(JSON.toJSONString(getOrderResult0));
+//
+//
+//                    String response = new HttpHandler.Builder()
+//                            .setUri(URI)
+//                            .setPath(UPLOAD_BILL)
+//                            .setJson(JSON.toJSONString(getOrderResult0))
+//                            .build()
+//                            .doPost();
+//                    if (!Cools.isEmpty(response)) {
+//                        log.warn(response);
+//                        Result result = JSON.parseObject(response, Result.class);
+//                        if (result.getCode() != 1) {
+//                            continue;
+//                        }
+//                        // 杞巻鍙叉。
+//                        int save = custOrderMapper.saveLog(getOrderResult0.getNumber());
+//                        if (save > 0) {
+//                            if (custOrderMapper.delete(new EntityWrapper<CustOrder>().eq("number", getOrderResult0.getNumber())) == 0) {
+//                                throw new CoolException("鍒犻櫎閿�鍞鍗曞け璐�");
+//                            }
+//                            log.info("{}閿�鍞鍗曟嫞璐х粨鏉�", getOrderResult0.getNumber());
+//                        }
+//                    }
+//
+//                }
+//            }
+//
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            throw new RuntimeException(e.getMessage());
+//        }
+//
+//    }
+//
+//    /**
+//     * 搴撳瓨涓婁紶
+//     */
+////    @Scheduled(cron = "0/15 * * * * ? ")
+//    @GetMapping("test2")
+//    public void uploadStockExecute(){
+//        try {
+//
+//            List<LocDetl> statis = locDetlService.getLocDetlStatis();
+//            if (!Cools.isEmpty(statis)) {
+//                UploadStock uploadStock = new UploadStock();
+//                uploadStock.setNumber(String.valueOf(snowflakeIdWorker.nextId()));
+//                uploadStock.setVchType(89);
+//                uploadStock.setBillDate(DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F));
+//                uploadStock.setDataSize(statis.size());
+//                List<UploadStockDtel> detail = new ArrayList<>();
+//                uploadStock.setDetail(detail);
+//                for (LocDetl locDetl : statis) {
+//                    Mat mat = matService.selectByMatnr(locDetl.getMatnr());
+//                    if (mat == null) {continue;}
+//                    UploadStockDtel detl = new UploadStockDtel();
+//                    detl.setUserCode(mat.getMatnr());
+//                    detl.setQty(locDetl.getAnfme());
+////                    detl.setPrice(Double.parseDouble());
+//                    detl.setComment(mat.getMemo());
+//                    detail.add(detl);
+//                }
+//
+//                String response = new HttpHandler.Builder()
+//                        .setUri(URI)
+//                        .setPath(UPLOAD_STOCK)
+//                        .setJson(JSON.toJSONString(uploadStock))
+//                        .build()
+//                        .doPost();
+//                if (!Cools.isEmpty(response)) {
+//                    log.info("涓婃姤搴撳瓨鏄庣粏缁熻 ======>> \nrequest:{} \nresponse:{}", JSON.toJSONString(uploadStock), response);
+//                    Result result = JSON.parseObject(response, Result.class);
+//                    if (result.getCode() != 1) {
+//                    }
+//                }
+//            }
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//
+//
+//    }
+//
+//
+//    /**
+//     * 鑾峰彇鍙栨秷璁㈠崟
+//     */
+//    @Scheduled(cron = "0/5 * * * * ? ")
+//    @Transactional
+////    @PostConstruct
+//    public void getCancelOrdersExecute(){
+//        try {
+//            Map<String, Object> json = new HashMap<>();
+//            String response = new HttpHandler.Builder()
+//                    .setUri(URI)
+//                    .setPath(OVER_BILL)
+//                    .setJson(JSON.toJSONString(json))
+//                    .build()
+//                    .doPost();
+//            if (!Cools.isEmpty(response)) {
+////                log.info(response);
+//                Date now = new Date();
+//                Result result = JSON.parseObject(response, Result.class);
+//                if (result.getCode() != 1) {
+//                    return;
+//                }
+//                List<GetOrderResult0> list = JSON.parseArray(result.getData(), GetOrderResult0.class);
+//                if (!Cools.isEmpty(list)) {
+//                    boolean complete = true;
+//                    Set<String> existNumbers = new HashSet<>();
+//
+//                    String cancelNumber = "";
+//                    if (!custOrderService.updateStatus(cancelNumber, 5)) {
+//                        throw new CoolException("淇敼璁㈠崟鐘舵�佸け璐�");
+//                    }
+//
+//
+//                }
+//            }
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//            throw new RuntimeException(e.getMessage());
+//        }
+//
+//    }
+//
+//    /**
+//     * 涓婁紶閿�鍞鍗曞彇娑堢粨鏋�
+//     */
+//    @Scheduled(cron = "0/5 * * * * ? ")
+//    @Transactional
+////    @PostConstruct
+//    public void uploadCancelOrdersExecute(){
+//        try {
+//            List<CustOrder> custOrders = custOrderService.selectList(new EntityWrapper<CustOrder>().eq("status", 3).isNotNull("vch_code"));
+//            if (Cools.isEmpty(custOrders)) {
+//                return;
+//            }
+//            Map<String, Object> json = new HashMap<>();
+//            List<UploadCancelResult> list = new ArrayList<>();
+//            for (CustOrder custOrder : custOrders) {
+//                UploadCancelResult result = new UploadCancelResult();
+//                result.setNumber(custOrder.getNumber());
+//                result.setUserCode(custOrder.getUserCode());
+//                result.setQty(custOrder.getTotal());
+//                result.setStatus(1);
+//                list.add(result);
+//            }
+//            json.put("data", list);
+//            String response = new HttpHandler.Builder()
+//                    .setUri(URI)
+//                    .setPath(UPLOAD_CANCEL_RESULT)
+//                    .setJson(JSON.toJSONString(json))
+//                    .build()
+//                    .doPost();
+//            if (!Cools.isEmpty(response)) {
+////                log.info(response);
+//                Date now = new Date();
+//                Result result = JSON.parseObject(response, Result.class);
+//                if (result.getCode() != 1) {
+//                    return;
+//                }
+//                for (UploadCancelResult result1 : list) {
+//                    // 杞巻鍙叉。
+//                    int save = custOrderMapper.saveLog(result1.getNumber(), result1.getUserCode());
+//                    if (save > 0) {
+//                        if (custOrderMapper.delete(new EntityWrapper<CustOrder>().eq("number", result1.getNumber()).eq("user_code", result1.getUserCode())) == 0) {
+//                            throw new CoolException("鍒犻櫎閿�鍞鍗曞け璐�");
+//                        }
+//                    }
+//                }
+//            }
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//            throw new RuntimeException(e.getMessage());
+//        }
+//
+//    }
+//
+//}
diff --git a/src/main/java/zy/cloud/wms/common/service/erp/ErpService.java b/src/main/java/zy/cloud/wms/common/service/erp/ErpService.java
index cc83ab4..1d749fa 100644
--- a/src/main/java/zy/cloud/wms/common/service/erp/ErpService.java
+++ b/src/main/java/zy/cloud/wms/common/service/erp/ErpService.java
@@ -1,78 +1,78 @@
-package zy.cloud.wms.common.service.erp;
-
-import com.alibaba.fastjson.JSON;
-import com.core.common.Cools;
-import com.core.common.DateUtils;
-import com.core.common.SnowflakeIdWorker;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import zy.cloud.wms.common.model.BillDto;
-import zy.cloud.wms.common.service.erp.entity.UploadBill;
-import zy.cloud.wms.common.service.erp.entity.UploadBillDetail;
-import zy.cloud.wms.manager.utils.HttpHandler;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-/**
- * Created by vincent on 2021/3/23
- */
-@Slf4j
-@Service("erpService")
-public class ErpService {
-
-    @Autowired
-    private SnowflakeIdWorker snowflakeIdWorker;
-
-    /**
-     * 鍗曟嵁涓婃姤
-     */
-    public Boolean uploadBill(List<BillDto> dtos, Integer docId, String docNumber){
-        if (true) {
-//            return true;
-        }
-        try {
-            if (Cools.isEmpty(dtos)) {
-                return false;
-            }
-            UploadBill uploadBill = new UploadBill();
-            uploadBill.setNumber(docNumber);
-            uploadBill.setBillDate(DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F));
-            uploadBill.setBTypeID("SHHT");
-            uploadBill.setKTypeID("瀹忔尯浠撳簱");
-            uploadBill.setVchType(docId);
-            List<UploadBillDetail> detail = new ArrayList<>();
-            uploadBill.setDetail(detail);
-            for (BillDto dto : dtos) {
-                UploadBillDetail detl = new UploadBillDetail();
-                detl.setUserCode(dto.getMatnr());
-                detl.setQty(dto.getQty());
-                detl.setPrice(0);
-                detail.add(detl);
-            }
-            System.out.println(JSON.toJSONString(uploadBill));
-            String response = new HttpHandler.Builder()
-                    .setUri(ErpScheduler.URI)
-                    .setPath(ErpScheduler.UPLOAD_BILL)
-                    .setJson(JSON.toJSONString(uploadBill))
-                    .build()
-                    .doPost();
-
-            if (!Cools.isEmpty(response)) {
-                log.warn(response);
-                Result result = JSON.parseObject(response, Result.class);
-                if (result.getCode() != 1) {
-                    return false;
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            return false;
-        }
-        return Boolean.TRUE;
-    }
-
-
-}
+//package zy.cloud.wms.common.service.erp;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.core.common.Cools;
+//import com.core.common.DateUtils;
+//import com.core.common.SnowflakeIdWorker;
+//import lombok.extern.slf4j.Slf4j;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//import zy.cloud.wms.common.model.BillDto;
+//import zy.cloud.wms.common.service.erp.entity.UploadBill;
+//import zy.cloud.wms.common.service.erp.entity.UploadBillDetail;
+//import zy.cloud.wms.manager.utils.HttpHandler;
+//
+//import java.util.ArrayList;
+//import java.util.Date;
+//import java.util.List;
+//
+///**
+// * Created by vincent on 2021/3/23
+// */
+//@Slf4j
+//@Service("erpService")
+//public class ErpService {
+//
+//    @Autowired
+//    private SnowflakeIdWorker snowflakeIdWorker;
+//
+//    /**
+//     * 鍗曟嵁涓婃姤
+//     */
+//    public Boolean uploadBill(List<BillDto> dtos, Integer docId, String docNumber){
+//        if (true) {
+////            return true;
+//        }
+//        try {
+//            if (Cools.isEmpty(dtos)) {
+//                return false;
+//            }
+//            UploadBill uploadBill = new UploadBill();
+//            uploadBill.setNumber(docNumber);
+//            uploadBill.setBillDate(DateUtils.convert(new Date(), DateUtils.yyyyMMdd_F));
+//            uploadBill.setBTypeID("SHHT");
+//            uploadBill.setKTypeID("瀹忔尯浠撳簱");
+//            uploadBill.setVchType(docId);
+//            List<UploadBillDetail> detail = new ArrayList<>();
+//            uploadBill.setDetail(detail);
+//            for (BillDto dto : dtos) {
+//                UploadBillDetail detl = new UploadBillDetail();
+//                detl.setUserCode(dto.getMatnr());
+//                detl.setQty(dto.getQty());
+//                detl.setPrice(0);
+//                detail.add(detl);
+//            }
+//            System.out.println(JSON.toJSONString(uploadBill));
+//            String response = new HttpHandler.Builder()
+//                    .setUri(ErpScheduler.URI)
+//                    .setPath(ErpScheduler.UPLOAD_BILL)
+//                    .setJson(JSON.toJSONString(uploadBill))
+//                    .build()
+//                    .doPost();
+//
+//            if (!Cools.isEmpty(response)) {
+//                log.warn(response);
+//                Result result = JSON.parseObject(response, Result.class);
+//                if (result.getCode() != 1) {
+//                    return false;
+//                }
+//            }
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            return false;
+//        }
+//        return Boolean.TRUE;
+//    }
+//
+//
+//}
diff --git a/src/main/java/zy/cloud/wms/manager/controller/ConsoleController.java b/src/main/java/zy/cloud/wms/manager/controller/ConsoleController.java
index 3bc2464..4d1e4d2 100644
--- a/src/main/java/zy/cloud/wms/manager/controller/ConsoleController.java
+++ b/src/main/java/zy/cloud/wms/manager/controller/ConsoleController.java
@@ -127,7 +127,7 @@
             }
         }
         // 搴撳瓨婊炵暀
-        List<Map<String, Object>> retentionList = jdbcTemplate.queryForList("select top 6 CONVERT(decimal, DATEDIFF(second, man_loc_detl.create_time, GETDATE()) / 86400.0, 9) AS stayDays, * from man_loc_detl order by create_time desc");
+        List<Map<String, Object>> retentionList = jdbcTemplate.queryForList("select top 7 CONVERT(decimal, DATEDIFF(second, man_loc_detl.create_time, GETDATE()) / 86400.0, 9) AS stayDays, * from man_loc_detl order by create_time desc");
         for (int i=0;i<retentionList.size();i++) {
             retentionList.get(i).put("no", i+1);
             Object create_time = combList.get(i).get("create_time");
diff --git a/src/main/java/zy/cloud/wms/manager/controller/CustOrderController.java b/src/main/java/zy/cloud/wms/manager/controller/CustOrderController.java
deleted file mode 100644
index 31c60cf..0000000
--- a/src/main/java/zy/cloud/wms/manager/controller/CustOrderController.java
+++ /dev/null
@@ -1,136 +0,0 @@
-package zy.cloud.wms.manager.controller;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.mapper.EntityWrapper;
-import com.baomidou.mybatisplus.mapper.Wrapper;
-import com.baomidou.mybatisplus.plugins.Page;
-import com.core.annotations.ManagerAuth;
-import com.core.common.BaseRes;
-import com.core.common.Cools;
-import com.core.common.DateUtils;
-import com.core.common.R;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import zy.cloud.wms.common.config.AdminInterceptor;
-import zy.cloud.wms.common.utils.BarcodeUtils;
-import zy.cloud.wms.common.utils.QrCode;
-import zy.cloud.wms.common.web.BaseController;
-import zy.cloud.wms.manager.entity.CustOrder;
-import zy.cloud.wms.manager.service.CustOrderService;
-
-import javax.imageio.ImageIO;
-import javax.servlet.http.HttpServletResponse;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-
-@RestController
-public class CustOrderController extends BaseController {
-
-    @Autowired
-    private CustOrderService custOrderService;
-
-    @RequestMapping(value = "/custOrder/{id}/auth")
-    @ManagerAuth
-    public R get(@PathVariable("id") String id) {
-        return R.ok(custOrderService.selectById(String.valueOf(id)));
-    }
-
-    @RequestMapping(value = "/custOrder/list/auth")
-    @ManagerAuth
-    public R list(@RequestParam(defaultValue = "1")Integer curr,
-                  @RequestParam(defaultValue = "10")Integer limit,
-                  @RequestParam(required = false)String orderByField,
-                  @RequestParam(required = false)String orderByType,
-                  @RequestParam Map<String, Object> param){
-        EntityWrapper<CustOrder> wrapper = new EntityWrapper<>();
-        excludeTrash(param);
-        convert(param, wrapper);
-        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else {
-            wrapper.orderBy("create_time", false);
-        }
-        return R.ok(custOrderService.selectPage(new Page<>(curr, limit), wrapper));
-    }
-
-    private void convert(Map<String, Object> map, EntityWrapper wrapper){
-        for (Map.Entry<String, Object> entry : map.entrySet()){
-            String val = String.valueOf(entry.getValue());
-            if (val.contains(RANGE_TIME_LINK)){
-                String[] dates = val.split(RANGE_TIME_LINK);
-                wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
-                wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
-            } else {
-                wrapper.like(entry.getKey(), val);
-            }
-        }
-    }
-
-    @RequestMapping(value = "/custOrder/add/auth")
-    @ManagerAuth
-    public R add(CustOrder custOrder) {
-        custOrderService.insert(custOrder);
-        return R.ok();
-    }
-
-
-    @RequestMapping(value = "/custOrder/delete/auth")
-    @ManagerAuth
-    public R delete(@RequestParam String param){
-        List<CustOrder> list = JSONArray.parseArray(param, CustOrder.class);
-        if (Cools.isEmpty(list)){
-            return R.error();
-        }
-        for (CustOrder entity : list){
-            custOrderService.delete(new EntityWrapper<>(entity));
-        }
-        return R.ok();
-    }
-
-    @RequestMapping(value = "/custOrder/export/auth")
-    @ManagerAuth
-    public R export(@RequestBody JSONObject param){
-        EntityWrapper<CustOrder> wrapper = new EntityWrapper<>();
-        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
-        Map<String, Object> map = excludeTrash(param.getJSONObject("custOrder"));
-        convert(map, wrapper);
-        List<CustOrder> list = custOrderService.selectList(wrapper);
-        return R.ok(exportSupport(list, fields));
-    }
-
-
-    @RequestMapping(value = "/custOrder/check/column/auth")
-    @ManagerAuth
-    public R query(@RequestBody JSONObject param) {
-        Wrapper<CustOrder> wrapper = new EntityWrapper<CustOrder>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
-        if (null != custOrderService.selectOne(wrapper)){
-            return R.parse(BaseRes.REPEAT).add(getComment(CustOrder.class, String.valueOf(param.get("key"))));
-        }
-        return R.ok();
-    }
-
-    @RequestMapping(value = "/custOrder/code/auth")
-//    @ManagerAuth(memo = "鏉″舰鐮佽幏鍙�(type:1(鏉″舰鐮�);2(浜岀淮鐮�)")
-    public R matCodeBarcode(@RequestParam(defaultValue = "1") Integer type
-            , @RequestParam String param
-            , HttpServletResponse response) throws Exception {
-        AdminInterceptor.cors(response);
-        if (Cools.isEmpty(param)){
-            return R.parse(BaseRes.EMPTY);
-        }
-        BufferedImage img;
-        if (type == 1) {
-            img = BarcodeUtils.encode(param);
-        } else {
-            img = QrCode.createImg(param);
-        }
-        if (!ImageIO.write(img, "jpg", response.getOutputStream())) {
-            throw new IOException("Could not write an image of format jpg");
-        }
-        response.getOutputStream().flush();
-        response.getOutputStream().close();
-        return R.ok();
-    }
-
-}
diff --git a/src/main/java/zy/cloud/wms/manager/entity/CustOrder.java b/src/main/java/zy/cloud/wms/manager/entity/CustOrder.java
deleted file mode 100644
index 2d06e94..0000000
--- a/src/main/java/zy/cloud/wms/manager/entity/CustOrder.java
+++ /dev/null
@@ -1,303 +0,0 @@
-package zy.cloud.wms.manager.entity;
-
-import com.baomidou.mybatisplus.annotations.TableField;
-import com.baomidou.mybatisplus.annotations.TableName;
-import com.core.common.Cools;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-@TableName("man_cust_order")
-public class CustOrder implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 閿�鍞崟鍙�
-     */
-    @ApiModelProperty(value= "閿�鍞崟鍙�")
-    private String number;
-
-    /**
-     * 鍗曟嵁鏃ユ湡
-     */
-    @ApiModelProperty(value= "鍗曟嵁鏃ユ湡")
-    @TableField("bill_date")
-    private String billDate;
-
-    /**
-     * 瀹㈡埛缂栧彿
-     */
-    @ApiModelProperty(value= "瀹㈡埛缂栧彿")
-    @TableField("bType_id")
-    private String bTypeId;
-
-    /**
-     * 缁忔墜浜虹紪鍙�
-     */
-    @ApiModelProperty(value= "缁忔墜浜虹紪鍙�")
-    @TableField("eType_id")
-    private String eTypeId;
-
-    /**
-     * 鍗曟嵁鑷ID
-     */
-    @ApiModelProperty(value= "鍗曟嵁鑷ID")
-    @TableField("vch_code")
-    private Integer vchcode;
-
-    /**
-     * 鍟嗗搧缂栧彿
-     */
-    @ApiModelProperty(value= "鍟嗗搧缂栧彿")
-    @TableField("user_code")
-    private String userCode;
-
-    /**
-     * 鍟嗗搧鏁伴噺
-     */
-    @ApiModelProperty(value= "鍟嗗搧鏁伴噺")
-    private Double qty;
-
-    /**
-     * 鎬绘暟閲�
-     */
-    @ApiModelProperty(value= "鎬绘暟閲�")
-    private Double total;
-
-    /**
-     * 鍟嗗搧鍗曚环
-     */
-    @ApiModelProperty(value= "鍟嗗搧鍗曚环")
-    private Double price;
-
-    /**
-     * 鍟嗗搧鍗曚环
-     */
-    @ApiModelProperty(value= "鍟嗗搧鍗曚环")
-    @TableField("row_no")
-    private Integer rowNo;
-
-    /**
-     * 鍟嗗搧澶囨敞
-     */
-    @ApiModelProperty(value= "鍟嗗搧澶囨敞")
-    private String comment;
-
-    /**
-     * 鐘舵�� 1: 寰呭鐞�  2: 宸插畬鎴�  3: 鍙栨秷  4: 寮傚父  
-     */
-    @ApiModelProperty(value= "鐘舵�� 0: 杞藉叆涓� 1: 寰呭鐞�  2: 鏈嫞璐�  3: 鍙栨秷  4: 宸插畬鎴�  5: 鍑嗗鍙栨秷 ")
-    private Integer status;
-
-    /**
-     * 娣诲姞鏃堕棿
-     */
-    @ApiModelProperty(value= "娣诲姞鏃堕棿")
-    @TableField("create_time")
-    private Date createTime;
-
-    /**
-     * 淇敼鏃堕棿
-     */
-    @ApiModelProperty(value= "淇敼鏃堕棿")
-    @TableField("update_time")
-    private Date updateTime;
-
-    /**
-     * 澶囨敞
-     */
-    @ApiModelProperty(value= "澶囨敞")
-    private String memo;
-
-    public CustOrder() {}
-
-    public CustOrder(String number,String billDate,String bTypeId,String eTypeId,Integer vchcode,String userCode,Double qty,Double total,Double price, Integer rowNo, String comment,Integer status,Date createTime,Date updateTime,String memo) {
-        this.number = number;
-        this.billDate = billDate;
-        this.bTypeId = bTypeId;
-        this.eTypeId = eTypeId;
-        this.vchcode = vchcode;
-        this.userCode = userCode;
-        this.qty = qty;
-        this.total = total;
-        this.price = price;
-        this.rowNo = rowNo;
-        this.comment = comment;
-        this.status = status;
-        this.createTime = createTime;
-        this.updateTime = updateTime;
-        this.memo = memo;
-    }
-
-//    CustOrder custOrder = new CustOrder(
-//            null,    // 閿�鍞崟鍙�
-//            null,    // 鍗曟嵁鏃ユ湡[闈炵┖]
-//            null,    // 瀹㈡埛缂栧彿
-//            null,    // 缁忔墜浜虹紪鍙穂闈炵┖]
-//            null,    // 鍟嗗搧缂栧彿
-//            null,    // 鍟嗗搧鏁伴噺
-//            null,    // 鍟嗗搧鍗曚环
-//            null,    // 鍟嗗搧澶囨敞[闈炵┖]
-//            null,    // 鐘舵��
-//            null,    // 娣诲姞鏃堕棿
-//            null,    // 淇敼鏃堕棿
-//            null    // 澶囨敞
-//    );
-
-    public String getNumber() {
-        return number;
-    }
-
-    public void setNumber(String number) {
-        this.number = number;
-    }
-
-    public String getBillDate() {
-        return billDate;
-    }
-
-    public void setBillDate(String billDate) {
-        this.billDate = billDate;
-    }
-
-    public String getBTypeId() {
-        return bTypeId;
-    }
-
-    public void setBTypeId(String bTypeId) {
-        this.bTypeId = bTypeId;
-    }
-
-    public String getETypeId() {
-        return eTypeId;
-    }
-
-    public void setETypeId(String eTypeId) {
-        this.eTypeId = eTypeId;
-    }
-
-    public String getUserCode() {
-        return userCode;
-    }
-
-    public void setUserCode(String userCode) {
-        this.userCode = userCode;
-    }
-
-    public Double getQty() {
-        return qty;
-    }
-
-    public void setQty(Double qty) {
-        this.qty = qty;
-    }
-
-    public Double getTotal() {
-        return total;
-    }
-
-    public void setTotal(Double total) {
-        this.total = total;
-    }
-
-    public Double getPrice() {
-        return price;
-    }
-
-    public void setPrice(Double price) {
-        this.price = price;
-    }
-
-    public Integer getRowNo() {
-        return rowNo;
-    }
-
-    public void setRowNo(Integer rowNo) {
-        this.rowNo = rowNo;
-    }
-
-    public String getComment() {
-        return comment;
-    }
-
-    public void setComment(String comment) {
-        this.comment = comment;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public String getStatus$(){
-        if (null == this.status){ return null; }
-        switch (this.status){
-            case 0:
-                return "杞藉叆涓�";
-            case 1:
-                return "寰呭鐞�";
-            case 2:
-                return "鏈嫞璐�";
-            case 3:
-                return "鍙栨秷";
-            case 4:
-                return "宸插畬鎴�";
-            case 5:
-                return "鍑嗗鍙栨秷";
-            default:
-                return String.valueOf(this.status);
-        }
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    public String getCreateTime$(){
-        if (Cools.isEmpty(this.createTime)){
-            return "";
-        }
-        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    public Date getUpdateTime() {
-        return updateTime;
-    }
-
-    public String getUpdateTime$(){
-        if (Cools.isEmpty(this.updateTime)){
-            return "";
-        }
-        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
-    }
-
-    public void setUpdateTime(Date updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public String getMemo() {
-        return memo;
-    }
-
-    public void setMemo(String memo) {
-        this.memo = memo;
-    }
-
-    public Integer getVchcode() {
-        return vchcode;
-    }
-
-    public void setVchcode(Integer vchcode) {
-        this.vchcode = vchcode;
-    }
-}
diff --git a/src/main/java/zy/cloud/wms/manager/mapper/CustOrderMapper.java b/src/main/java/zy/cloud/wms/manager/mapper/CustOrderMapper.java
deleted file mode 100644
index fff9ad3..0000000
--- a/src/main/java/zy/cloud/wms/manager/mapper/CustOrderMapper.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package zy.cloud.wms.manager.mapper;
-
-import org.apache.ibatis.annotations.*;
-import zy.cloud.wms.manager.entity.CustOrder;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
-import org.springframework.stereotype.Repository;
-
-@Mapper
-@Repository
-public interface CustOrderMapper extends BaseMapper<CustOrder> {
-
-    int updateStatus(@Param("number") String number, @Param("status") Integer status);
-
-    @Insert("insert into man_cust_order_log select * from man_cust_order where number=#{number}")
-    int saveLog(String number);
-
-    @Insert("insert into man_cust_order_log select * from man_cust_order where number=#{number} and user_code = #{userCode}")
-    int saveLog(@Param("number") String number, @Param("userCode") String userCode);
-
-    @Update("delete from man_cust_order where number=#{number}")
-    int delete(@Param("number") String number);
-
-    @Update("delete from man_cust_order where number=#{number} and user_code = #{userCode}")
-    int delete(@Param("number") String number, @Param("userCode") String userCode);
-
-    @Update("update man_cust_order_log set qty = #{qty} where number=#{number} and user_code=#{userCode}")
-    int updateQty(@Param("number") String number, @Param("userCode") String userCode, @Param("qty") Double qty);
-
-}
diff --git a/src/main/java/zy/cloud/wms/manager/service/CustOrderService.java b/src/main/java/zy/cloud/wms/manager/service/CustOrderService.java
deleted file mode 100644
index 04859aa..0000000
--- a/src/main/java/zy/cloud/wms/manager/service/CustOrderService.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package zy.cloud.wms.manager.service;
-
-import zy.cloud.wms.manager.entity.CustOrder;
-import com.baomidou.mybatisplus.service.IService;
-
-public interface CustOrderService extends IService<CustOrder> {
-
-    boolean updateStatus(String number, Integer status);
-
-    boolean updateQty(String number, String userCode, Double anfme);
-
-}
diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/CustOrderServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/CustOrderServiceImpl.java
deleted file mode 100644
index a2566e7..0000000
--- a/src/main/java/zy/cloud/wms/manager/service/impl/CustOrderServiceImpl.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package zy.cloud.wms.manager.service.impl;
-
-import zy.cloud.wms.manager.mapper.CustOrderMapper;
-import zy.cloud.wms.manager.entity.CustOrder;
-import zy.cloud.wms.manager.service.CustOrderService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-@Service("custOrderService")
-public class CustOrderServiceImpl extends ServiceImpl<CustOrderMapper, CustOrder> implements CustOrderService {
-
-    @Override
-    public boolean updateStatus(String number, Integer status) {
-        return this.baseMapper.updateStatus(number, status) > 0;
-    }
-
-    @Override
-    public boolean updateQty(String number, String userCode, Double anfme) {
-        return this.baseMapper.updateQty(number, userCode, anfme) > 0;
-    }
-}
diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/LocDetlServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/LocDetlServiceImpl.java
index aa84e3c..e10eeb6 100644
--- a/src/main/java/zy/cloud/wms/manager/service/impl/LocDetlServiceImpl.java
+++ b/src/main/java/zy/cloud/wms/manager/service/impl/LocDetlServiceImpl.java
@@ -13,7 +13,6 @@
 import zy.cloud.wms.manager.entity.Prior;
 import zy.cloud.wms.manager.entity.param.StockTransferParam;
 import zy.cloud.wms.manager.mapper.LocDetlMapper;
-import zy.cloud.wms.manager.service.CustOrderService;
 import zy.cloud.wms.manager.service.LocDetlService;
 import zy.cloud.wms.manager.service.MatService;
 import zy.cloud.wms.manager.service.PriorService;
@@ -26,8 +25,6 @@
 @Service("locDetlService")
 public class LocDetlServiceImpl extends ServiceImpl<LocDetlMapper, LocDetl> implements LocDetlService {
 
-    @Autowired
-    private CustOrderService custOrderService;
     @Autowired
     private MatService matService;
     @Autowired
diff --git a/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java b/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java
index 25d03af..b77dece 100644
--- a/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java
+++ b/src/main/java/zy/cloud/wms/manager/service/impl/WorkServiceImpl.java
@@ -9,7 +9,6 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import zy.cloud.wms.common.model.BillDto;
 import zy.cloud.wms.common.model.MatnrDto;
 import zy.cloud.wms.common.model.OrderStoDto;
 import zy.cloud.wms.common.service.MainService;
@@ -37,8 +36,6 @@
     private CombService combService;
     @Autowired
     private LocDetlService locDetlService;
-    @Autowired
-    private CustOrderService custOrderService;
     @Autowired
     private PakoutService pakoutService;
     @Autowired
@@ -104,29 +101,6 @@
             }
         }
 
-        // 涓婃姤缁檈rp
-        List<BillDto> dtos = new ArrayList<>();
-        for (MatnrDto dto : param.getMats()) {
-            BillDto billDto = new BillDto();
-            billDto.setMatnr(dto.getMatnr());
-            billDto.setQty(dto.getCount());
-            dtos.add(billDto);
-        }
-        Integer docId = Optional.ofNullable(param.getDocType()).orElse(34);
-        String docNum = String.valueOf(snowflakeIdWorker.nextId());
-        switch (docId) {
-            case 34:    // 閲囪喘鍗�
-                docNum = "PU-" + String.valueOf(snowflakeIdWorker.nextId()).substring(0, 15);
-                break;
-            case 45:    // 閿�鍞��璐у崟
-                docNum = "SR-" + String.valueOf(snowflakeIdWorker.nextId()).substring(0, 15);
-                break;
-            default:
-                break;
-        }
-        if (!erpService.uploadBill(dtos, docId, docNum)) {
-            throw new CoolException("鏃犳硶涓婃姤鑷砮rp");
-        }
         return R.ok("鍏ュ簱鎴愬姛");
     }
 
@@ -190,19 +164,6 @@
             }
 
         }
-
-        // 涓婃姤缁檈rp
-        List<BillDto> dtos = new ArrayList<>();
-        for (Comb comb : combs) {
-            BillDto billDto = new BillDto();
-            billDto.setMatnr(comb.getMatnr());
-            billDto.setQty(comb.getAnfme());
-            dtos.add(billDto);
-        }
-        if (!erpService.uploadBill(dtos, param.getDocType(), docNum)) {
-            throw new CoolException("鏃犳硶涓婃姤鑷砮rp");
-        }
-
         return R.ok();
     }
 
@@ -414,7 +375,7 @@
                 }
                 if (complete) {
                     // 淇敼鍗曟嵁鐘舵��
-                    if (!custOrderService.updateStatus(pakout.getDocNum(), 4)) {
+                    if (!orderService.updateSettle(pakout.getDocNum(), 4L)) {
                         throw new CoolException("淇敼鍗曟嵁鐘舵�佸け璐�");
                     }
                 }
@@ -429,35 +390,14 @@
     @Transactional
     public R cancelPakout(String wrkNo, Long userId) {
         Pakout pakout = pakoutService.selectOne(new EntityWrapper<Pakout>().eq("wrk_no", wrkNo));
-//        if (null != pakout) {
-//            LocDetl locDetl = locDetlService.getLocDetl(pakout.getNodeId(), pakout.getMatnr());
-//            if (locDetl == null) {
-//                LocDetl oldLocDetl = new LocDetl();
-//                VersionUtils.setLocDetl(oldLocDetl, pakout);
-//                oldLocDetl.setCreateTime(new Date());
-//                oldLocDetl.setCreateBy(userId);
-//                oldLocDetl.setUpdateTime(new Date());
-//                oldLocDetl.setUpdateBy(userId);
-//                if (!locDetlService.insert(oldLocDetl)) {
-//                    throw new CoolException("鎭㈠搴撳瓨鏄庣粏澶辫触");
-//                }
-//            } else {
-//                if (!locDetlService.incrementStock(locDetl.getNodeId(), locDetl.getMatnr(), pakout.getAnfme())) {
-//                   throw new CoolException("鎭㈠搴撳瓨鏄庣粏澶辫触");
-//                }
-//            }
-//        } else {
-//            return R.error("鎷h揣鍗曞凡澶辨晥锛屽彇娑堝け璐ワ紒");
-//        }
         if (!pakoutService.delete(new EntityWrapper<Pakout>().eq("wrk_no", pakout.getWrkNo()))) {
             throw new CoolException("鍒犻櫎鎷h揣鍗曞け璐�");
         }
-
         // 鍙栨秷閿�鍞鍗�
         List<Pakout> pakouts = pakoutService.selectList(new EntityWrapper<Pakout>().eq("doc_num", pakout.getDocNum()));
         if (Cools.isEmpty(pakouts)){
             // 淇敼鍗曟嵁鐘舵��
-            if (!custOrderService.updateStatus(pakout.getDocNum(), 3)) {
+            if (!orderService.updateSettle(pakout.getDocNum(), 3L)) {
                 throw new CoolException("淇敼鍗曟嵁鐘舵�佸け璐�");
             }
         }
@@ -729,17 +669,6 @@
         if (!checkService.updateById(check)) {
             throw new CoolException("淇敼鐩樼偣璁板綍鐘舵�佸け璐�");
         }
-
-        // 涓婃姤缁檈rp
-        List<BillDto> dtos = new ArrayList<>();
-        BillDto billDto = new BillDto();
-        billDto.setMatnr(check.getMatnr());
-        billDto.setQty(Math.abs(check.getDiffQty()));
-        dtos.add(billDto);
-        if (!erpService.uploadBill(dtos, docId.intValue(), docNum)) {
-            throw new CoolException("鏃犳硶涓婃姤鑷砮rp");
-        }
-
         return R.ok();
     }
 
diff --git a/src/main/resources/mapper/CustOrderMapper.xml b/src/main/resources/mapper/CustOrderMapper.xml
deleted file mode 100644
index 352b9bb..0000000
--- a/src/main/resources/mapper/CustOrderMapper.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="zy.cloud.wms.manager.mapper.CustOrderMapper">
-
-    <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
-    <resultMap id="BaseResultMap" type="zy.cloud.wms.manager.entity.CustOrder">
-        <result column="number" property="number" />
-        <result column="bill_date" property="billDate" />
-        <result column="bType_id" property="bTypeId" />
-        <result column="eType_id" property="eTypeId" />
-        <result column="vch_code" property="vchcode" />
-        <result column="user_code" property="userCode" />
-        <result column="qty" property="qty" />
-        <result column="total" property="total" />
-        <result column="price" property="price" />
-        <result column="row_no" property="rowNo" />
-        <result column="comment" property="comment" />
-        <result column="status" property="status" />
-        <result column="create_time" property="createTime" />
-        <result column="update_time" property="updateTime" />
-        <result column="memo" property="memo" />
-
-    </resultMap>
-
-    <update id="updateStatus">
-        update man_cust_order set status = #{status} where 1=1 and number = #{number}
-    </update>
-
-</mapper>
diff --git a/src/main/webapp/static/js/custOrder/custOrder.js b/src/main/webapp/static/js/custOrder/custOrder.js
deleted file mode 100644
index 4227d59..0000000
--- a/src/main/webapp/static/js/custOrder/custOrder.js
+++ /dev/null
@@ -1,567 +0,0 @@
-var pageCurr;
-function right(){
-    top.popupRight = top.layui.admin.popupRight({
-        id: 'LAY_adminPopupLayerTest'
-        , area: '750px'
-        , type: 2
-        , content:'custOrder/matQuery.html'
-        , success: function(){
-            // $('#'+ this.id).html('<div style="padding: 20px;">鏀惧叆鍐呭</div>');
-            //admin.view(this.id).render('system/xxx')
-        }
-        , end: function () {
-            $(".layui-laypage-btn")[0].click();
-        }
-    });
-}
-layui.config({
-    base: baseUrl + "/static/layui/lay/modules/"  // 閰嶇疆妯″潡鎵�鍦ㄧ殑鐩綍
-}).use(['table', 'laydate', 'form', 'tableX', 'tableMerge'], function(){
-    var table = layui.table;
-    var $ = layui.jquery;
-    var layer = layui.layer;
-    var layDate = layui.laydate;
-    var form = layui.form;
-    var tableX = layui.tableX;
-    var tableMerge = layui.tableMerge;
-
-    // 鏁版嵁娓叉煋
-    tableIns = table.render({
-        elem: '#custOrder',
-        headers: {token: localStorage.getItem('token')},
-        url: baseUrl+'/custOrder/list/auth',
-        page: true,
-        limit: 16,
-        limits: [16, 30, 50, 100, 200, 500],
-        even: true,
-        toolbar: '#toolbar',
-        cellMinWidth: 50,
-        cols: [[
-            {type: 'checkbox'}
-//            ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
-            ,{field: 'number', align: 'center', merge: true, title: '鍗曞彿'}
-
-            ,{field: 'btypeId', align: 'center', merge: ['number'], title: '瀹㈡埛缂栧彿'}
-            ,{field: 'etypeId', align: 'center',title: '缁忔墜浜虹紪鍙�', hide: true}
-            ,{field: 'billDate', align: 'center',merge: ['number'],title: '鍗曟嵁鏃ユ湡'}
-            ,{field: 'userCode', align: 'center',title: '鍟嗗搧缂栧彿'}
-            ,{field: 'qty', align: 'center',title: '鍟嗗搧鏁伴噺'}
-            ,{field: 'price', align: 'center',title: '鍟嗗搧鍗曚环', hide: true}
-            ,{field: 'comment', align: 'center',title: '鍟嗗搧澶囨敞', hide: true}
-            ,{field: 'status$', align: 'center',title: '鐘舵��', templet: '#statusTpl', width: 100}
-
-            // ,{field: 'createTime$', align: 'center',title: '娣诲姞鏃堕棿'}
-            ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
-            // ,{field: 'memo', align: 'center',title: '澶囨敞'}
-
-            ,{fixed: 'right', title:'鎿嶄綔', align: 'center', merge: ['number'], toolbar: '#operate', width: 120}
-        ]],
-        request: {
-            pageName: 'curr',
-            pageSize: 'limit'
-        },
-        parseData: function (res) {
-            return {
-                'code': res.code,
-                'msg': res.msg,
-                'count': res.data.total,
-                'data': res.data.records
-            }
-        },
-        response: {
-            statusCode: 200
-        },
-        done: function(res, curr, count) {
-            if (res.code === 403) {
-                top.location.href = baseUrl+"/";
-            }
-            pageCurr=curr;
-            // tableX.merges('custOrder', [1, 11]);
-            tableMerge.render(this);
-            limit();
-        }
-    });
-
-    // 鐩戝惉鎺掑簭浜嬩欢
-    table.on('sort(locMast)', function (obj) {
-        var searchData = {};
-        $.each($('#search-box [name]').serializeArray(), function() {
-            searchData[this.name] = this.value;
-        });
-        searchData['orderByField'] = obj.field;
-        searchData['orderByType'] = obj.type;
-        tableIns.reload({
-            where: searchData,
-            page: {
-                curr: 1
-            },
-            done: function (res, curr, count) {
-                if (res.code === 403) {
-                    top.location.href = baseUrl+"/";
-                }
-                pageCurr=curr;
-                limit();
-            }
-        });
-    });
-
-    // 鐩戝惉澶村伐鍏锋爮浜嬩欢
-    table.on('toolbar(custOrder)', function (obj) {
-        var checkStatus = table.checkStatus(obj.config.id);
-        switch(obj.event) {
-            case 'deleteData':
-                var data = checkStatus.data;
-                if (data.length === 0){
-                    layer.msg('璇烽�夋嫨鏁版嵁');
-                } else {
-                    layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
-                        $.ajax({
-                            url: baseUrl+"/custOrder/delete/auth",
-                            headers: {'token': localStorage.getItem('token')},
-                            data: {param: JSON.stringify(data)},
-                            method: 'POST',
-                            traditional:true,
-                            success: function (res) {
-                                if (res.code === 200){
-                                    layer.closeAll();
-                                    $(".layui-laypage-btn")[0].click();
-                                } else if (res.code === 403){
-                                    top.location.href = baseUrl+"/";
-                                } else {
-                                    layer.msg(res.msg)
-                                }
-                            }
-                        })
-                    });
-                }
-                break;
-            case 'exportData':
-                layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
-                    var titles=[];
-                    var fields=[];
-                    obj.config.cols[0].map(function (col) {
-                        if (col.type === 'normal' && col.hide === false && col.toolbar == null) {
-                            titles.push(col.title);
-                            fields.push(col.field);
-                        }
-                    });
-                    var exportData = {};
-                    $.each($('#search-box [name]').serializeArray(), function() {
-                        exportData[this.name] = this.value;
-                    });
-                    var param = {
-                        'custOrder': exportData,
-                        'fields': fields
-                    };
-                    $.ajax({
-                        url: baseUrl+"/custOrder/export/auth",
-                        headers: {'token': localStorage.getItem('token')},
-                        data: JSON.stringify(param),
-                        dataType:'json',
-                        contentType:'application/json;charset=UTF-8',
-                        method: 'POST',
-                        success: function (res) {
-                            layer.closeAll();
-                            if (res.code === 200) {
-                                table.exportFile(titles,res.data,'xls');
-                            } else if (res.code === 403) {
-                                top.location.href = baseUrl+"/";
-                            } else {
-                                layer.msg(res.msg)
-                            }
-                        }
-                    });
-                });
-                break;
-        }
-    });
-
-    // 鐩戝惉琛屽伐鍏蜂簨浠�
-    table.on('tool(custOrder)', function(obj){
-        var data = obj.data;
-        switch (obj.event) {
-            // 鎷h揣
-            case 'stockOut':
-                var loadIndex = layer.load(2);
-                $.ajax({
-                    url: baseUrl + "/work/stock/out/preview",
-                    headers: {'token': localStorage.getItem('token')},
-                    contentType: 'application/json;charset=UTF-8',
-                    data: JSON.stringify({
-                        number: data.number
-                    }),
-                    method: 'POST',
-                    success: function (res) {
-                        layer.close(loadIndex);
-                        // 鎴愬姛
-                        if (res.code === 200){
-                            layer.open({
-                                type: 1
-                                ,title: false
-                                ,closeBtn: false
-                                ,offset: '100px'
-                                // ,area: ['800px','450px']
-                                ,area: '1000px'
-                                ,shade: 0.5
-                                ,shadeClose: true
-                                ,id: 'LAY_layuipro'
-                                ,btn: ['绔嬪嵆鐢熸垚', '绋嶅悗澶勭悊']
-                                ,btnAlign: 'c'
-                                ,moveType: 1 //鎷栨嫿妯″紡锛�0鎴栬��1
-                                ,content: $('#stoukOutPreview')
-                                ,success: function(layero, index){
-                                    table.render({
-                                        elem: '#stoPreTab',
-                                        data: res.data,
-                                        page: true,
-                                        cellMinWidth: 100,
-                                        // ,width: admin.screen() > 1 ? 892 : ''
-                                        height: 432,
-                                        cols: [[
-                                            {field: 'title', title: '鍟嗗搧', merge: true, align: 'center'},
-                                            {field: 'anfme', title: '鎬绘暟閲�', merge: ['title'], align: 'center', style: 'font-weight: bold', width: 90},
-                                            {field: 'type', title: '浠撳簱', merge: true, align: 'center', templet: '#typeTpl', width: 90},
-                                            {field: 'locNo', title: '璐т綅', align: 'center'},
-                                            {field: 'prior$', title: '鎺ㄨ崘璐т綅', align: 'center', width: 100},
-                                            {field: 'reduce', title: '鏁伴噺', align: 'center', width: 90, style: 'font-weight: bold'},
-                                            // {field: 'remQty', title: '浣欓噺', align: 'center', width: 80},
-                                            {field: 'total', title: '鎬婚噺', align: 'center', width: 90},
-                                        ]],
-                                        done: function () {
-                                            tableMerge.render(this);
-                                            // tableX.merges('stoPreTab', [0,1,2]);
-                                            $('.layui-table-body.layui-table-main').css("overflow", "auto")
-                                        }
-                                    });
-
-                                }
-                                ,yes: function(index, layero){
-                                    //鎸夐挳銆愰┈涓婃嫞璐с�戠殑鍥炶皟
-                                    stockOut(data.number);
-                                }
-                                ,btn2: function(index, layero){
-                                    //鎸夐挳銆愮◢鍚庡鐞嗐�戠殑鍥炶皟
-                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
-                                }
-                            });
-                        // 缂烘枡
-                        } else if (res.code === 20001) {
-                            // layer.confirm(res.msg, {
-                            //         shadeClose: true
-                            //         , area: ['400px']
-                            //         , btn: ['搴撳瓨璋冩嫧', '鍙栨秷']
-                            //     }, function() {
-                            //         // 搴撳瓨璋冩嫧
-                            //         stockTransfer(data.number);
-                            //         layer.closeAll();
-                            //     }, function() {
-                            //         // printPakouts(data.number);
-                            //         layer.closeAll();
-                            //     }
-                            // )
-                            layer.msg(res.msg, {icon: 2})
-                        } else if (res.code === 403){
-                            top.location.href = baseUrl+"/";
-                        } else {
-                            layer.msg(res.msg, {icon: 2})
-                        }
-                    }
-                })
-                break;
-            // 鎵撳嵃
-            case 'print':
-                layer.confirm('寮�濮嬫墦鍗�' +data.number + ' 鎷h揣鍗曪紵', {shadeClose: true}, function(){
-                    layer.closeAll();
-                    printPakouts(data.number);
-                })
-                break;
-
-        }
-    });
-
-    // 寮�濮嬫嫞璐�
-    function stockOut(number) {
-        // layer.confirm(number + ' 璁㈠崟寮�濮嬫嫞璐э紵', {shadeClose: true}, function(){
-            layer.closeAll();
-            $.ajax({
-                url: baseUrl+"/work/stock/out",
-                headers: {'token': localStorage.getItem('token')},
-                contentType:'application/json;charset=UTF-8',
-                data: JSON.stringify({
-                    number: number
-                }),
-                method: 'POST',
-                success: function (res) {
-                    // 鎴愬姛
-                    if (res.code === 200){
-                        layer.confirm(res.msg, {
-                                shadeClose: true
-                                , btn: ['鎵撳嵃鎷h揣鍗�']
-                            }, function() {
-                                layer.closeAll();
-                                printPakouts(number);
-                            }
-                        )
-                    // 缂烘枡
-                    } else if (res.code === 20001) {
-                        layer.confirm(res.msg, {
-                                shadeClose: true
-                                , btn: ['搴撳瓨璋冩嫧', '鍙栨秷']
-                            }, function() {
-                                // 搴撳瓨璋冩嫧
-                                layer.closeAll();
-                            }, function() {
-                            alert(number)
-                                layer.closeAll();
-                            }
-                        )
-                    } else if (res.code === 403){
-                        top.location.href = baseUrl+"/";
-                    } else {
-                        layer.msg(res.msg, {icon: 2})
-                    }
-                    $(".layui-laypage-btn")[0].click();
-                }
-            })
-        // });
-    }
-
-    // 搴撳瓨璋冩嫧
-    function stockTransfer(number) {
-
-        $.ajax({
-            url: baseUrl + "/work/stock/transfer",
-            headers: {'token': localStorage.getItem('token')},
-            data: {
-                number: number
-            },
-            method: 'POST',
-            success: function (res) {
-                if (res.code === 200) {
-                    layer.msg(res.msg, {icon: 1})
-                } else if (res.code === 403) {
-                    top.location.href = baseUrl + "/";
-                } else {
-                    layer.msg(res.msg, {icon: 2})
-                }
-            }
-        });
-    }
-
-    // 鎵撳嵃鎷h揣鍗�
-    function printPakouts(docNumber) {
-        $.ajax({
-            url: baseUrl+"/work/stock/out/print",
-            headers: {'token': localStorage.getItem('token')},
-            data: JSON.stringify({
-                number: docNumber
-            }),
-            contentType:'application/json;charset=UTF-8',
-            method: 'POST',
-            success: function (res) {
-                if (res.code === 200){
-                    res.data["barcodeUrl"]=baseUrl+"/custOrder/code/auth?type=1&param="+res.data.docNum;
-                    var tpl = $('#pakoutPrintTpl').html();
-                    var template = Handlebars.compile(tpl);
-                    var html = template(res);
-                    var box = $("#pakoutPrintBox");
-                    box.html(html);box.show();
-                    box.print({
-                        mediaPrint:true,
-                        deferred: $.Deferred().done(function () {
-                            layer.confirm('[閲嶈] 鎵撳嵃鏄惁鎴愬姛锛�',  {btn: ['Yes', 'No']}, function(){
-                                $.ajax({
-                                    url: baseUrl+"/pakout/print/auth",
-                                    headers: {'token': localStorage.getItem('token')},
-                                    data: {
-                                        docNumber: docNumber
-                                    },
-                                    method: 'POST',
-                                    success: function (res) {
-                                        if (res.code === 200){
-                                            layer.closeAll();
-                                            $(".layui-laypage-btn")[0].click();
-                                            layer.msg(res.msg, {icon: 1})
-                                        } else if (res.code === 403){
-                                            top.location.href = baseUrl+"/";
-                                        } else {
-                                            layer.msg(res.msg, {icon: 2})
-                                        }
-                                    }
-                                })
-                            });
-                        })
-                    });
-                    box.hide();
-                } else if (res.code === 403){
-                    top.location.href = baseUrl+"/";
-                } else {
-                    layer.msg(res.msg, {icon: 2})
-                }
-            }
-        })
-    }
-
-    // 鏁版嵁淇濆瓨鍔ㄤ綔
-    form.on('submit(save)', function () {
-        if (banMsg != null){
-            layer.msg(banMsg);
-            return;
-        }
-        method("add");
-    });
-
-    // 鏁版嵁淇敼鍔ㄤ綔
-    form.on('submit(edit)', function () {
-        method("update")
-    });
-
-    function method(name){
-        var index = layer.load(1, {
-            shade: [0.5,'#000'] //0.1閫忔槑搴︾殑鑳屾櫙
-        });
-        var data = {
-//            id: $('#id').val(),
-            number: $('#number').val(),
-            billDate: $('#billDate').val(),
-            bTypeId: $('#bTypeId').val(),
-            eTypeId: $('#eTypeId').val(),
-            userCode: $('#userCode').val(),
-            qty: $('#qty').val(),
-            price: $('#price').val(),
-            comment: $('#comment').val(),
-            status: $('#status').val(),
-            createTime: top.strToDate($('#createTime\\$').val()),
-            updateTime: top.strToDate($('#updateTime\\$').val()),
-            memo: $('#memo').val(),
-
-        };
-        $.ajax({
-            url: baseUrl+"/custOrder/"+name+"/auth",
-            headers: {'token': localStorage.getItem('token')},
-            data: top.reObject(data),
-            method: 'POST',
-            success: function (res) {
-                if (res.code === 200){
-                    parent.layer.closeAll();
-                    parent.$(".layui-laypage-btn")[0].click();
-                    $("#data-detail :input").each(function () {
-                        $(this).val("");
-                    });
-                } else if (res.code === 403){
-                    top.location.href = baseUrl+"/";
-                }else {
-                    layer.msg(res.msg)
-                }
-                layer.close(index);
-            }
-        })
-    }
-
-    // 澶嶉�夋浜嬩欢
-    form.on('checkbox(detailCheckbox)', function (data) {
-        var el = data.elem;
-        if (el.checked) {
-            $(el).val('Y');
-        } else {
-            $(el).val('N');
-        }
-    });
-
-    // 鎼滅储鏍忔悳绱簨浠�
-    form.on('submit(search)', function (data) {
-        pageCurr = 1;
-        tableReload(false);
-    });
-
-    // 鎼滅储鏍忛噸缃簨浠�
-    form.on('submit(reset)', function (data) {
-        pageCurr = 1;
-        clearFormVal($('#search-box'));
-        tableReload(false);
-    });
-
-    // 鏃堕棿閫夋嫨鍣�
-    layDate.render({
-        elem: '#createTime\\$',
-        type: 'datetime'
-    });
-    layDate.render({
-        elem: '#updateTime\\$',
-        type: 'datetime'
-    });
-
-
-});
-
-// 鍏抽棴鍔ㄤ綔
-$(document).on('click','#data-detail-close', function () {
-    parent.layer.closeAll();
-});
-
-function tableReload(child) {
-    var searchData = {};
-    $.each($('#search-box [name]').serializeArray(), function() {
-        searchData[this.name] = this.value;
-    });
-    (child ? parent.tableIns : tableIns).reload({
-        where: searchData,
-        page: {
-            curr: pageCurr
-        },
-    });
-}
-
-function setFormVal(el, data, showImg) {
-    for (var val in data) {
-        var find = el.find(":input[id='" + val + "']");
-        if (find[0]!=null){
-            if (find[0].type === 'checkbox'){
-                if (data[val]==='Y'){
-                    find.attr("checked","checked");
-                    find.val('Y');
-                } else {
-                    find.remove("checked");
-                    find.val('N');
-                }
-                continue;
-            }
-        }
-        find.val(data[val]);
-        if (showImg){
-            var next = find.next();
-            if (next.get(0)){
-                if (next.get(0).localName === "img") {
-                    find.hide();
-                    next.attr("src", data[val]);
-                    next.show();
-                }
-            }
-        }
-    }
-}
-
-function clearFormVal(el) {
-    $(':input', el)
-        .val('')
-        .removeAttr('checked')
-        .removeAttr('selected');
-}
-
-function detailScreen(index) {
-    var detail = layer.getChildFrame('#data-detail', index);
-    var height = detail.height()+60;
-    if (height > ($(window).height()*0.9)) {
-        height = ($(window).height()*0.8);
-    }
-    layer.style(index, {
-//        top: (($(window).height()-height)/3)+"px",
-        height: height+'px'
-    });
-}
-
-$('body').keydown(function () {
-    if (event.keyCode === 13) {
-        $("#search").click();
-    }
-});
diff --git a/src/main/webapp/views/custOrder/custOrder.html b/src/main/webapp/views/custOrder/custOrder.html
deleted file mode 100644
index 0a1a8f4..0000000
--- a/src/main/webapp/views/custOrder/custOrder.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="utf-8">
-    <title></title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
-    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
-    <link rel="stylesheet" href="../../static/css/common.css" media="all">
-    <style>
-        .layui-table-cell {
-            height:auto;
-            overflow:visible;
-            text-overflow:inherit;
-            white-space:normal;
-        }
-    </style>
-</head>
-<body>
-
-<!-- 鎼滅储鏍� -->
-<div id="search-box" class="layui-form layui-card-header">
-    <div class="layui-inline">
-        <div class="layui-input-inline">
-            <input class="layui-input" type="text" name="number" placeholder="閿�鍞崟鍙�" autocomplete="off">
-        </div>
-    </div>
-    <div class="layui-inline">
-        <div class="layui-input-inline">
-            <input class="layui-input" type="text" name="user_code" placeholder="鍟嗗搧缂栧彿" autocomplete="off">
-        </div>
-    </div>
-    <div class="layui-inline">
-        <div class="layui-input-inline">
-            <select name="status">
-                <option value="" style="display: none">閫夋嫨鐘舵��</option>
-                <option value="1">寰呭鐞�</option>
-                <option value="2">鏈嫞璐�</option>
-                <option value="3">鍙栨秷</option>
-                <option value="4">宸插畬鎴�</option>
-            </select>
-        </div>
-    </div>
-    <!-- 寰呮坊鍔� -->
-    <div id="data-search-btn" class="layui-btn-container layui-form-item">
-        <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>
-        <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button>
-    </div>
-</div>
-
-<!-- 琛ㄦ牸 -->
-<div class="layui-form">
-    <table class="layui-hide" id="custOrder" lay-filter="custOrder"></table>
-</div>
-<script type="text/html" id="toolbar">
-    <div class="layui-btn-container">
-        <button class="layui-btn" onclick="right()" style="background-color: #2F4056">鏂板閲囪喘閫�璐у崟</button>
-<!--        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>-->
-        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>
-        <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">瀵煎嚭</button>
-    </div>
-</script>
-
-<script type="text/html" id="operate">
-    {{#if (d.status == 1){ }}
-        <a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="stockOut" style="font-size: 16px"><span style="display: none">{{d.number}}</span>鎷h揣鍗�</a>
-    {{# } }}
-    {{#if (d.status == 2 || d.status == 4){ }}
-        <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="print" style="font-size: 16px"><span style="display: none">{{d.number}}</span>鎵撳嵃</a>
-    {{# } }}
-</script>
-
-<script type="text/html" id="statusTpl">
-    <span name="status"
-          {{# if( d.status === 1){ }}
-          class="layui-badge layui-badge-blue"
-          {{# } else if(d.status === 2){ }}
-          class="layui-badge layui-badge-red"
-          {{# } else if(d.status === 3){ }}
-          class="layui-badge layui-badge-gray"
-          {{# } else if(d.status === 4){ }}
-          class="layui-badge layui-badge-green"
-          {{# } }}
-    >{{d.status$}}</span>
-</script>
-
-<script type="text/html" id="typeTpl">
-    <span name="type"
-          {{# if( d.type === 1){ }}
-          class="layui-badge layui-badge-blue" ><span style="display: none">{{d.number}}</span>骞充粨</span>
-          {{# } else if(d.type === 2){ }}
-          class="layui-badge layui-badge-green" ><span style="display: none">{{d.number}}</span>绔嬪簱</span>
-          {{# } else if(d.type === 0){ }}
-          class="layui-badge layui-badge-red" ><span style="display: none">{{d.number}}</span>缂鸿揣</span>
-          {{# } }}
-</script>
-
-<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
-<script type="text/javascript" src="../../static/js/jquery/jQuery.print.js"></script>
-<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
-<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/custOrder/custOrder.js" charset="utf-8"></script>
-
-<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe>
-<!-- 鎵撳嵃瀹瑰櫒 -->
-<div id="pakoutPrintBox" style="display: none"></div>
-<!-- 鍑哄簱棰勮瀹瑰櫒 -->
-<div id="stoukOutPreview" style="display: none">
-    <div  style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;">
-        <span style="font-size: large; font-weight: bold">鎷h揣鍗曢瑙�</span>
-    </div>
-    <table id="stoPreTab" lay-filter="stoPreTab"></table>
-</div>
-
-</body>
-
-<script type="text/template" id="pakoutPrintTpl">
-    <!-- 澶� -->
-    <div id="print-header" style="margin: 20px 0">
-        <div style="text-align: center">
-            <div style="text-align: center;margin-bottom: 10px">
-                <span style="font-family: 瀹嬩綋"> 鎷h揣鍗� </span>
-            </div>
-
-            <img class="template-code template-qrcode" src="{{data.barcodeUrl}}" style="width: 80%">
-            <p style="letter-spacing: 2px;margin-top: 5px">{{data.docNum}}</p>
-        </div>
-        <div style="font-size: xx-small; text-align: left; margin-top: 10px">
-            <span style="font-family: 瀹嬩綋">瀹㈡埛锛歿{data.custName}}</span>
-        </div>
-        <div style="margin-top: 10px">
-            <div style="float: left;width: 50%; text-align: left">
-                <span style="font-size: xx-small;font-family: 瀹嬩綋">鎷h揣鏁伴噺锛歿{data.total}}</span>
-            </div>
-            <div style="float: left; width: 50%; text-align: right">
-                <span style="font-size: xx-small;font-family: 瀹嬩綋">鎷h揣浜猴細{{data.workerName}}</span>
-            </div>
-            <div style="clear:both;"></div>
-        </div>
-    </div>
-
-    <!-- 涓讳綋 -->
-    <div style="margin-top: 10px">
-        {{#each data.list}}
-        <div class="pakout-item" style="padding: 10px 5px 10px 5px;border-top: 1px solid #525252">
-            <div class="item-header" style="margin-top: 10px;font-family: 瀹嬩綋; font-size: x-small">
-                {{maktx}}
-            </div>
-            <div class="item-content" style="margin: 10px 0 ">
-                <div style="float: left;font-family: 瀹嬩綋; font-size: xx-small">{{anfme}}{{unit}}</div>
-                <div style="float: right;font-family: 瀹嬩綋; font-size: xx-small">璐т綅锛歿{locNo}}</div>
-                <div style="clear: both;"></div>
-            </div>
-        </div>
-        {{/each}}
-    </div>
-</script>
-
-</html>
-
diff --git a/src/main/webapp/views/custOrder/custOrder_detail.html b/src/main/webapp/views/custOrder/custOrder_detail.html
deleted file mode 100644
index e970a4e..0000000
--- a/src/main/webapp/views/custOrder/custOrder_detail.html
+++ /dev/null
@@ -1,126 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="utf-8">
-    <title></title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
-    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
-    <link rel="stylesheet" href="../../static/css/common.css" media="all">
-</head>
-<body>
-
-<!-- 璇︽儏 -->
-<div id="data-detail" class="layer_self_wrap">
-    <form id="detail" class="layui-form">
-    <!--
-        <div class="layui-inline"  style="display: none">
-            <label class="layui-form-label"><span class="not-null">*</span>缂栥��銆�鍙凤細</label>
-            <div class="layui-input-inline">
-                <input id="id" class="layui-input" type="text" placeholder="缂栧彿">
-            </div>
-        </div>
-    -->
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">閿�鍞崟鍙凤細</label>
-            <div class="layui-input-inline">
-                <input id="number" class="layui-input" type="text">
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label"><span class="not-null">*</span>鍗曟嵁鏃ユ湡锛�</label>
-            <div class="layui-input-inline">
-                <input id="billDate" class="layui-input" type="text" lay-verify="required" >
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">瀹㈡埛缂栧彿锛�</label>
-            <div class="layui-input-inline">
-                <input id="bTypeId" class="layui-input" type="text">
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label"><span class="not-null">*</span>缁忔墜浜虹紪鍙凤細</label>
-            <div class="layui-input-inline">
-                <input id="eTypeId" class="layui-input" type="text" lay-verify="required" >
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">鍟嗗搧缂栧彿锛�</label>
-            <div class="layui-input-inline">
-                <input id="userCode" class="layui-input" type="text">
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">鍟嗗搧鏁伴噺锛�</label>
-            <div class="layui-input-inline">
-                <input id="qty" class="layui-input" type="text" lay-verify="number" >
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">鍟嗗搧鍗曚环锛�</label>
-            <div class="layui-input-inline">
-                <input id="price" class="layui-input" type="text" lay-verify="number" >
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label"><span class="not-null">*</span>鍟嗗搧澶囨敞锛�</label>
-            <div class="layui-input-inline">
-                <input id="comment" class="layui-input" type="text" lay-verify="required" >
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">鐘躲��銆�鎬侊細</label>
-            <div class="layui-input-inline">
-                <select id="status">
-                    <option value="" style="display: none"></option>
-                    <option value="1">寰呭鐞�</option>
-                    <option value="2">宸插畬鎴�</option>
-                    <option value="3">鍙栨秷</option>
-                    <option value="4">寮傚父</option>
-                </select>
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">娣诲姞鏃堕棿锛�</label>
-            <div class="layui-input-inline">
-                <input id="createTime$" class="layui-input" type="text" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">淇敼鏃堕棿锛�</label>
-            <div class="layui-input-inline">
-                <input id="updateTime$" class="layui-input" type="text" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-inline"  style="width:31%;">
-            <label class="layui-form-label">澶囥��銆�娉細</label>
-            <div class="layui-input-inline">
-                <input id="memo" class="layui-input" type="text">
-            </div>
-        </div>
-
-
-        <hr class="layui-bg-gray">
-
-        <div id="data-detail-btn" class="layui-btn-container layui-form-item">
-            <div id="data-detail-submit-save" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="save">淇濆瓨</div>
-            <div id="data-detail-submit-edit" type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="edit">淇敼</div>
-            <div id="data-detail-close" type="button" class="layui-btn" lay-submit lay-filter="close">鍏抽棴</div>
-        </div>
-
-        <div id="prompt">
-            娓╅Θ鎻愮ず锛氳浠旂粏濉啓鐩稿叧淇℃伅锛�<span class="extrude"><span class="not-null">*</span> 涓哄繀濉�夐」銆�</span>
-        </div>
-    </form>
-</div>
-</body>
-<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
-<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/custOrder/custOrder.js" charset="utf-8"></script>
-</html>
-
diff --git a/src/main/webapp/views/custOrder/matQuery.html b/src/main/webapp/views/custOrder/matQuery.html
deleted file mode 100644
index c1c9254..0000000
--- a/src/main/webapp/views/custOrder/matQuery.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="utf-8">
-    <title></title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
-    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
-    <link rel="stylesheet" href="../../static/css/common.css" media="all">
-    <style>
-        html {
-            height: 100%;
-            /*padding: 10px;*/
-            background-color: #f1f1f1;
-        }
-        body {
-            background-color: #fff;
-            /*border-radius: 5px;*/
-            box-shadow: 0 0 3px rgba(0,0,0,.3);
-            padding-bottom: 20px;
-        }
-
-        #staNoSpan {
-            text-align: center;
-            display: inline-block;
-            width: 100px;
-            font-size: 13px;
-        }
-        .layui-btn-container .layui-form-select {
-            display: inline-block;
-            width: 150px;
-            height: 30px;
-        }
-        .layui-btn-container .layui-form-select.layui-form-selected {
-            display: inline-block;
-            width: 150px;
-        }
-        .layui-btn-container .layui-select-title input {
-            font-size: 13px;
-        }
-        .layui-btn-container .layui-anim.layui-anim-upbit dd {
-            font-size: 13px;
-        }
-
-        #btn-outbound {
-            margin-left: 20px;
-        }
-
-        /*----------------------------------*/
-        .function-area {
-            padding: 20px 50px;
-        }
-        .function-btn {
-            font-size: 16px;
-            padding: 1px 1px 1px 1px;
-            width: 100px;
-            height: 50px;
-            border-color: #2b425b;
-            border-radius: 4px;
-            border-width: 2px;
-            background: none;
-            border-style: solid;
-            transition: 0.4s;
-            cursor: pointer;
-            letter-spacing: 3px;
-        }
-        .function-btn:hover {
-            background-color: #2b425b;
-            color: #fff;
-        }
-
-        /* 閿�鍞崟缂栧彿 */
-        #getOrderNo .layui-form {
-            padding: 25px 30px 0 0;
-        }
-        #getOrderNo .layui-form-label {
-            padding: 8px 15px;
-            box-sizing: content-box;
-            -webkit-box-sizing: content-box;
-        }
-        #getOrderNo .layui-form-required:before {
-            content: "*";
-            display: inline-block;
-            font-family: SimSun,serif;
-            margin-right: 4px;
-            font-size: 14px;
-            line-height: 1;
-            color: #ed4014;
-        }
-        #getOrderNo .layui-input {
-            height: 36px;
-            border-radius: 4px;
-        }
-        #getOrderNo .cool-button-contain {
-            text-align: right;
-            margin: 20px 0;
-        }
-        #getOrderNo .layui-form-radio>i:hover, .layui-form-radioed>i {
-            color: #007bff;
-        }
-        #getOrderNo .layui-btn {
-            height: 36px;
-            line-height: 36px;
-            border-radius: 4px;
-            box-shadow: 0 1px 0 rgba(0,0,0,.03);
-        }
-        #getOrderNo .layui-btn-primary:hover {
-            border-color: #777777;
-        }
-    </style>
-</head>
-<body>
-
-<!-- 鍔熻兘鍖� -->
-<div class="function-area">
-    <button id="mat-query" class="function-btn" onclick="getMatDetl()">+ 鐗╂枡</button>
-</div>
-
-<hr>
-
-<!-- 琛ㄦ牸 -->
-<div style="padding-bottom: 5px; margin-bottom: 45px">
-
-    <!-- 澶撮儴 -->
-    <script type="text/html" id="toolbar">
-        <div class="layui-form">
-            <div class="layui-btn-container">
-                <!-- 2.鍚姩鍑哄簱 -->
-                <button class="layui-btn layui-btn-lg" id="btn-outbound" lay-event="createDoc">寮�濮嬬敓鎴�</button>
-            </div>
-        </div>
-    </script>
-
-    <!-- 琛� -->
-    <script type="text/html" id="operate">
-        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">绉婚櫎</a>
-    </script>
-
-    <table class="layui-table" id="chooseData" lay-filter="chooseData"></table>
-</div>
-
-<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
-<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
-<script type="text/javascript" src="../../static/js/ioWorks/matQuery.js" charset="utf-8"></script>
-
-<div id="getOrderNo" style="display: none">
-    <div class="layui-form">
-        <div class="layui-form-item">
-            <label class="layui-form-label layui-form-required">鍗曟嵁缂栧彿:</label>
-            <div class="layui-input-block">
-                <input id="orderNo" name="orderNo" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" class="layui-input" lay-verify="required" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-form-item">
-            <label class="layui-form-label layui-form-required">瀹㈡埛缂栧彿:</label>
-            <div class="layui-input-block">
-                <input id="customerTypeId" name="customerTypeId" placeholder="璇疯緭鍏ュ鎴风紪鍙�" class="layui-input" lay-verify="required" autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-form-item cool-button-contain">
-            <button class="layui-btn layui-btn-normal" id="autoNo" onclick="initOrderNo()">鑷姩鐢熸垚</button>
-            <button class="layui-btn layui-btn-primary" id="confirm" lay-filter="confirm" lay-submit="">纭畾</button>
-        </div>
-    </div>
-</div>
-</body>
-</html>
-
diff --git a/src/main/webapp/views/custOrder/matQueryBox.html b/src/main/webapp/views/custOrder/matQueryBox.html
deleted file mode 100644
index 92ed334..0000000
--- a/src/main/webapp/views/custOrder/matQueryBox.html
+++ /dev/null
@@ -1,197 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="utf-8">
-    <title></title>
-    <meta name="renderer" content="webkit">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
-    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
-    <link rel="stylesheet" href="../../static/css/common.css" media="all">
-    <style>
-        body {
-            padding: 0 20px;
-        }
-        .layui-table-box {
-            border-right: 1px solid #9F9F9F;
-            border-left: 1px solid #9F9F9F;
-        }
-
-        #search-box {
-            padding: 30px 0 20px 0;
-        }
-        #search-box .layui-inline:first-child {
-            margin-left: 30px;
-        }
-        #search-box .layui-inline {
-            margin-right: 5px;
-        }
-
-        #data-search-btn {
-            margin-left: 10px;
-            display: inline-block;
-        }
-        #data-search-btn.layui-btn-container .layui-btn {
-            margin-right: 20px;
-        }
-    </style>
-</head>
-<body>
-
-<!-- 鎼滅储鏍� -->
-<fieldset class="layui-elem-field site-demo-button" style="margin: 20px;">
-    <legend>鎼滅储鏍�</legend>
-    <!-- 鎼滅储鏍� -->
-    <div id="search-box" class="layui-form layui-card-header">
-        <div class="layui-inline">
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿"  autocomplete="off">
-            </div>
-        </div>
-        <div class="layui-inline">
-            <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="maktx" placeholder="鍟嗗搧鍚嶇О" autocomplete="off">
-            </div>
-        </div>
-        <!-- 寰呮坊鍔� -->
-        <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block">
-            <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>
-            <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button>
-        </div>
-    </div>
-</fieldset>
-
-<script type="text/html" id="toolbar">
-    <div class="layui-btn-container">
-        <button class="layui-btn" id="btn-confirm" lay-event="confirm" style="">鎻愬彇</button>
-    </div>
-</script>
-
-<div class="layui-form">
-    <table class="layui-hide" id="stockOut" lay-filter="stockOut"></table>
-</div>
-
-<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
-<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
-
-</body>
-<script>
-
-    var pageCurr;
-    function getCol() {
-        var cols = [
-            {type: 'checkbox'}
-        ];
-        cols.push.apply(cols, matCols);
-        cols.push({field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
-            ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true})
-        return cols;
-    }
-
-    layui.use(['table','laydate', 'form'], function() {
-        var table = layui.table;
-        var $ = layui.jquery;
-        var layer = layui.layer;
-        var layDate = layui.laydate;
-        var form = layui.form;
-        // 鏁版嵁娓叉煋
-        locDetlTableIns = table.render({
-            elem: '#stockOut',
-            headers: {token: localStorage.getItem('token')},
-            url: baseUrl+'/mat/list/auth',
-            page: true,
-            limit: 8,
-            even: true,
-            toolbar: '#toolbar',
-            cellMinWidth: 50,
-            cols: [getCol()],
-            request: {
-                pageName: 'curr',
-                pageSize: 'limit'
-            },
-            parseData: function (res) {
-                return {
-                    'code': res.code,
-                    'msg': res.msg,
-                    'count': res.data.total,
-                    'data': res.data.records
-                }
-            },
-            response: {
-                statusCode: 200
-            },
-            done: function(res, curr, count) {
-                if (res.code === 403) {
-                    top.location.href = baseUrl+"/";
-                }
-                pageCurr=curr;
-            }
-        });
-
-        // 鐩戝惉澶村伐鍏锋爮浜嬩欢
-        table.on('toolbar(stockOut)', function (obj) {
-            var checkStatus = table.checkStatus(obj.config.id);
-            var data = checkStatus.data;
-            switch(obj.event) {
-                case 'confirm':
-                    if (data.length === 0){
-                        layer.msg("璇烽�夋嫨鏁版嵁");
-                        return;
-                    }
-                    parent.addTableData(data);
-                    break;
-            }
-        });
-
-        // 鎼滅储鏍忔悳绱簨浠�
-        form.on('submit(search)', function (data) {
-            pageCurr = 1;
-            tableReload();
-        });
-
-        // 鎼滅储鏍忛噸缃簨浠�
-        form.on('submit(reset)', function (data) {
-            pageCurr = 1;
-            clearFormVal($('#search-box'));
-            tableReload();
-        });
-
-        layDate.render({
-            elem: '.layui-laydate-range'
-            ,type: 'datetime'
-            ,range: true
-        });
-    })
-
-    function tableReload(child) {
-        var searchData = {};
-        $.each($('#search-box [name]').serializeArray(), function() {
-            searchData[this.name] = this.value;
-        });
-        locDetlTableIns.reload({
-            where: searchData,
-            page: {
-                curr: pageCurr
-            },
-            done: function (res, curr, count) {
-                if (res.code === 403) {
-                    top.location.href = baseUrl+"/";
-                }
-                pageCurr=curr;
-            }
-        });
-    }
-
-    function clearFormVal(el) {
-        $(':input', el)
-            .val('')
-            .removeAttr('checked')
-            .removeAttr('selected');
-    }
-</script>
-</html>
-

--
Gitblit v1.9.1