From c08978952af26b2cc38aa100074478c025f9282d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 05 三月 2021 11:11:26 +0800
Subject: [PATCH] #
---
src/main/webapp/views/home/console.html | 63 ++++++++++----------
src/main/java/zy/cloud/wms/common/service/erp/ErpScheduler.java | 82 +++++++++++++++++++++++++++
2 files changed, 114 insertions(+), 31 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 ae8f32a..6706377 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
@@ -15,6 +15,7 @@
import zy.cloud.wms.manager.entity.Mat;
import zy.cloud.wms.manager.service.CstmrService;
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.utils.HttpHandler;
@@ -36,6 +37,7 @@
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_STOCK = "cM/basis/uploadStock";
@Autowired
private CustOrderService custOrderService;
@@ -43,6 +45,8 @@
private MatService matService;
@Autowired
private CstmrService cstmrService;
+ @Autowired
+ private LocDetlService locDetlService;
/**
* 鍟嗗搧涓嬭浇
@@ -242,5 +246,83 @@
}
+ /**
+ * 鏇存柊搴撳瓨
+ */
+// @Scheduled(cron = "0/3 * * * * ? ")
+ public void uploadStockExecute(){
+ try {
+
+// locDetlService
+
+ 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);
+ 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());
+ }
+ if (null == mat) {
+ mat = new Mat(
+ String.valueOf(data.getRec()), // 缂栧彿
+ null, // 鎵�灞炲尯鍩�
+ null, // 鎵�灞炲綊绫�
+ data.getUserCode(), // 鍟嗗搧缂栧彿
+ data.getFullName(), // 鍟嗗搧鍚嶇О
+ null, // 鍚嶇О
+ null, // 瑙勬牸
+ null, // 鍨嬪彿
+ null, // 鎵瑰彿
+ null, // 鍗曚綅
+ null, // 鏉$爜
+ 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.setUpdateTime(updateTime);
+ matService.updateById(mat);
+ }
+ log.info("====>> 鏇存柊鐗╂枡锛歿}", data.getUserCode());
+ }
+
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ }
+
}
diff --git a/src/main/webapp/views/home/console.html b/src/main/webapp/views/home/console.html
index 2d401e6..3832800 100644
--- a/src/main/webapp/views/home/console.html
+++ b/src/main/webapp/views/home/console.html
@@ -202,28 +202,26 @@
<div class="layui-col-sm6" style="padding-bottom: 0;">
<div class="layui-row layui-col-space15">
<div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group" ew-href="page/system/user.html" ew-title="鐢ㄦ埛绠$悊">
- <i class="console-app-icon layui-icon layui-icon-group"
- style="font-size: 26px;padding-top: 3px;margin-right: 6px;"></i>
+ <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>
+ </div>
+ <div class="layui-col-xs6 layui-col-sm3">
+ <div class="console-app-group" lay-href="locDetl/locDetl.html?resourceId=20429" lay-text="搴撳瓨璧勬枡鏌ヨ">
+ <i class="console-app-icon layui-icon layui-icon-chart" style="color: #95de64;"></i>
+ <div class="console-app-name">搴撳瓨</div>
+ </div>
+ </div>
+ <div class="layui-col-xs6 layui-col-sm3">
+ <div class="console-app-group" lay-href="user/user.html?resourceId=4" lay-text="绯荤粺鐢ㄦ埛">
+ <i class="console-app-icon layui-icon layui-icon-group" style="font-size: 26px;padding-top: 3px;margin-right: 6px;"></i>
<div class="console-app-name">鐢ㄦ埛</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
- <i class="console-app-icon layui-icon layui-icon-chart" style="color: #95de64;"></i>
- <div class="console-app-name">鍒嗘瀽</div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
- <i class="console-app-icon layui-icon layui-icon-cart" style="color: #ff9c6e;"></i>
- <div class="console-app-name">鍟嗗搧</div>
- </div>
- </div>
- <div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
- <i class="console-app-icon layui-icon layui-icon-form"
- style="color: #b37feb;font-size: 30px;"></i>
+ <div class="console-app-group" lay-href="custOrder/custOrder.html?resourceId=30442" lay-text="閿�鍞鍗�">
+ <i class="console-app-icon layui-icon layui-icon-form" style="color: #b37feb;font-size: 30px;"></i>
<div class="console-app-name">璁㈠崟</div>
</div>
</div>
@@ -232,30 +230,28 @@
<div class="layui-col-sm6" style="padding-bottom: 0;">
<div class="layui-row layui-col-space15">
<div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
- <i class="console-app-icon layui-icon layui-icon-layer"
- style="color: #ffd666;font-size: 34px;"></i>
- <div class="console-app-name">绁ㄦ嵁</div>
+ <div class="console-app-group" lay-href="prior/prior.html?resourceId=30421" lay-text="鎺ㄨ崘璐т綅">
+ <i class="console-app-icon layui-icon layui-icon-layer" style="color: #ffd666;font-size: 34px;"></i>
+ <div class="console-app-name">鎺ㄨ崘璐т綅</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
- <i class="console-app-icon layui-icon layui-icon-email"
- style="color: #5cdbd3;font-size: 36px;"></i>
- <div class="console-app-name">娑堟伅</div>
+ <div class="console-app-group" lay-href="allo/allo.html?resourceId=20402" lay-text="璐т綅淇℃伅">
+ <i class="console-app-icon layui-icon layui-icon-templeate-1" style="color: #5cdbd3;font-size: 36px;"></i>
+ <div class="console-app-name">璐т綅</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
+ <div class="console-app-group" lay-href="tag/tag.html?resourceId=20408" lay-text="褰掔被绠$悊">
<i class="console-app-icon layui-icon layui-icon-note"
style="color: #ff85c0;font-size: 28px;"></i>
- <div class="console-app-name">鏍囩</div>
+ <div class="console-app-name">褰掔被</div>
</div>
</div>
<div class="layui-col-xs6 layui-col-sm3">
- <div class="console-app-group">
+ <div class="console-app-group" lay-href="detail.html?resourceId=8" lay-text="鍩烘湰璧勬枡">
<i class="console-app-icon layui-icon layui-icon-slider" style="color: #ffc069;"></i>
- <div class="console-app-name">閰嶇疆</div>
+ <div class="console-app-name">璁剧疆</div>
</div>
</div>
</div>
@@ -606,7 +602,12 @@
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../assets/js/common.js?v=318"></script>
<script>
- layui.use(['layer', 'carousel', 'element'], function () {
+ layui.config({
+ base: '../../static/layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['layer', 'carousel', 'element', 'index'], function () {
+ var element = layui.element;
var $ = layui.jquery;
var layer = layui.layer;
var carousel = layui.carousel;
--
Gitblit v1.9.1