From 587fcf4a73c44330a5d75ced8ccf0274666c3cbe Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 16 三月 2021 08:17:59 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/home/console.html                         |    2 
 src/main/webapp/views/ioWorks/stockIn.html                      |  131 ++++++++++++++++++++++++++
 src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java |  123 ------------------------
 3 files changed, 132 insertions(+), 124 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 b91bc0c..ee72258 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
@@ -16,11 +16,9 @@
 import zy.cloud.wms.manager.entity.Cstmr;
 import zy.cloud.wms.manager.entity.CustOrder;
 import zy.cloud.wms.manager.entity.Mat;
-import zy.cloud.wms.manager.entity.Tag;
 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.Date;
@@ -74,128 +72,7 @@
                     .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) {
diff --git a/src/main/webapp/views/home/console.html b/src/main/webapp/views/home/console.html
index e561c5f..f680d35 100644
--- a/src/main/webapp/views/home/console.html
+++ b/src/main/webapp/views/home/console.html
@@ -204,7 +204,7 @@
         <div class="layui-col-sm6" style="padding-bottom: 0;">
             <div class="layui-row layui-col-space15">
                 <div class="layui-col-xs6 layui-col-sm3">
-                    <a class="console-app-group" lay-href="mat/mat.html?resourceId=20414" lay-text="浜у搧璧勬枡绠$悊">
+                    <a class="console-app-group" lay-href="mat/mat.html?resourceId=20414" lay-text="鍟嗗搧璧勬枡绠$悊">
                         <i class="console-app-icon layui-icon layui-icon-cart" style="color: #ff9c6e;"></i>
                         <div class="console-app-name">鍟嗗搧</div>
                     </a>
diff --git a/src/main/webapp/views/ioWorks/stockIn.html b/src/main/webapp/views/ioWorks/stockIn.html
new file mode 100644
index 0000000..2387f41
--- /dev/null
+++ b/src/main/webapp/views/ioWorks/stockIn.html
@@ -0,0 +1,131 @@
+<!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);
+        }
+
+        .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;
+        }
+
+        .layui-layer-page .layui-layer-content {
+            position: relative;
+            overflow: visible !important;
+        }
+
+        #mat-query {
+            display: none;
+        }
+
+        #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-comb {
+            margin-left: 60px;
+            display: none;
+        }
+    </style>
+</head>
+<body>
+<!-- 鍔熻兘鍖� -->
+<div class="function-area">
+    <button id="mat-query" class="function-btn" onclick="getMat()">鏂板</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">
+                <!-- 1.閫夋嫨鍏ュ簱鍙� -->
+                <span id="staNoSpan">鍏ュ簱鍙o細</span>
+                <select id="putSiteSelect" lay-verify="required">
+                    <option value="">璇烽�夋嫨绔欑偣</option>
+                </select>
+                <!-- 2.鍚姩鍑哄簱 -->
+                <button class="layui-btn layui-btn-normal layui-btn-lg" id="btn-comb" lay-event="comb" style="">鍚姩鍏ュ簱</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/pakStore/pakStore.js" charset="utf-8"></script>
+
+<script type="text/template" id="putSiteSelectTemplate">
+    {{#each data}}
+        <option value="{{this}}">{{this}}</option>
+    {{/each}}
+</script>
+</body>
+</html>
+

--
Gitblit v1.9.1