From c8ec0494e03be47ec0f1b3a89ad5e0a004bd7501 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期三, 20 九月 2023 12:41:37 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/tzskasrs' into tzskasrs
---
src/main/webapp/static/js/agvLocDetl/locDetl.js | 71
src/main/java/com/zy/asrs/entity/param/CombParam.java | 9
src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java | 31
src/main/webapp/static/js/saas/locDetl.js | 557 ++++
src/main/java/com/zy/asrs/entity/param/InitPakoutParam.java | 17
src/main/java/com/zy/system/service/impl/SaasLogServiceImpl.java | 12
src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java | 203 +
src/main/webapp/views/saas/matQuery.html | 194 +
src/main/java/com/zy/asrs/entity/param/PakinParam.java | 19
src/main/java/com/zy/system/entity/UserLogin.java | 2
src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 2
src/main/webapp/views/saasLog/saasLog.html | 113
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 20
src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java | 16
src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java | 227 +
src/main/webapp/static/js/common.js | 79
src/main/java/com/zy/common/entity/NodeExcelListener.java | 146 +
src/main/java/com/zy/asrs/utils/SaasUtils.java | 22
src/main/java/com/zy/common/model/OrderMergeVo.java | 6
src/main/java/com/zy/asrs/entity/param/FullStoreParam.java | 9
src/main/webapp/static/js/saas/locMove.js | 135 +
src/main/java/com/zy/asrs/service/LocDetlService.java | 2
src/main/webapp/static/js/pakStore/stockAdjust.js | 7
src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java | 4
src/main/java/com/zy/common/model/TaskDto.java | 5
src/main/webapp/static/js/manLocDetl/manLocDetl.js | 578 ++++
src/main/java/com/zy/common/model/LocDto.java | 9
src/main/java/com/zy/asrs/mapper/ManLocDetlMapper.java | 92
src/main/resources/mapper/ManLocDetlMapper.xml | 377 ++
src/main/webapp/views/saas/locDetl.html | 77
src/main/webapp/views/manLocDetl/manLocDetl.html | 136 +
src/main/java/com/zy/system/entity/SaasLog.java | 101
src/main/java/com/zy/asrs/controller/NodeController.java | 474 +++
src/main/java/com/zy/asrs/controller/AgvMobileController.java | 3
src/main/java/com/zy/common/utils/TreeUtils.java | 52
src/main/java/com/zy/common/utils/NodeUtils.java | 17
src/main/java/com/zy/system/mapper/SaasLogMapper.java | 12
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java | 15
src/main/java/com/zy/asrs/entity/AdjDetl.java | 15
src/main/java/com/zy/common/web/BaseController.java | 46
src/main/webapp/views/saas/locMove.html | 130 +
src/main/webapp/views/saas/stockAdjust.html | 133 +
src/main/webapp/static/js/node/node.js | 370 ++
src/main/java/com/zy/asrs/service/AgvLocDetlService.java | 2
src/main/webapp/static/js/saas/stockAdjust.js | 243 +
src/main/java/com/zy/asrs/entity/param/MatnrDto.java | 19
src/main/webapp/static/js/nodeLoc/nodeLoc.js | 488 +++
src/main/java/com/zy/asrs/entity/param/NodeInitPatam.java | 29
src/main/webapp/views/nodeLoc/nodeLoc.html | 430 +++
src/main/java/com/zy/asrs/entity/param/StockOutParam.java | 2
src/main/webapp/static/js/adjDetl/adjDetl.js | 7
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 87
src/main/java/com/zy/common/model/DetlDto.java | 35
src/main/webapp/static/js/nodeLoc/nodeLocTree.js | 86
src/main/java/com/zy/asrs/controller/OutController.java | 8
src/main/java/com/zy/common/entity/NodeExcel.java | 18
src/main/java/com/zy/asrs/service/MobileService.java | 2
src/main/java/com/zy/asrs/controller/ManLocDetlController.java | 115
src/main/java/com/zy/asrs/mapper/NodeMapper.java | 20
src/main/java/com/zy/asrs/entity/Node.java | 437 +++
src/main/webapp/static/js/saasLog/saasLog.js | 252 +
src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 11
src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java | 23
src/main/java/com/zy/asrs/controller/MobileController.java | 31
src/main/java/com/zy/asrs/entity/ManLocDetl.java | 346 ++
src/main/java/com/zy/system/service/SaasLogService.java | 8
src/main/webapp/static/js/locDetl/locDetl.js | 76
src/main/webapp/views/node/node.html | 203 +
src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java | 12
src/main/java/com/zy/asrs/service/ManLocDetlService.java | 72
src/main/java/com/zy/asrs/service/NodeService.java | 32
src/main/java/com/zy/system/controller/SaasLogController.java | 126
src/main/resources/application.yml | 4
73 files changed, 7,623 insertions(+), 146 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index d7b10ae..4e751e0 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -6,6 +6,7 @@
import com.zy.asrs.service.AgvBasDevpService;
import com.zy.asrs.service.AgvMobileService;
import com.zy.asrs.service.AgvWorkService;
+import com.zy.asrs.service.OrderDetlService;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@@ -31,6 +32,8 @@
private AgvBasDevpService agvBasDevpService;
@Autowired
private AgvWorkService workService;
+ @Autowired
+ private OrderDetlService orderDetlService;
/*
diff --git a/src/main/java/com/zy/asrs/controller/ManLocDetlController.java b/src/main/java/com/zy/asrs/controller/ManLocDetlController.java
new file mode 100644
index 0000000..2c091db
--- /dev/null
+++ b/src/main/java/com/zy/asrs/controller/ManLocDetlController.java
@@ -0,0 +1,115 @@
+package com.zy.asrs.controller;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.core.annotations.ManagerAuth;
+import com.core.common.Cools;
+import com.core.common.DateUtils;
+import com.core.common.R;
+import com.zy.asrs.entity.ManLocDetl;
+import com.zy.asrs.entity.param.LocDetlAdjustParam;
+import com.zy.asrs.service.ManLocDetlService;
+import com.zy.common.web.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+@RestController
+public class ManLocDetlController extends BaseController {
+
+ @Autowired
+ private ManLocDetlService manLocDetlService;
+
+ @RequestMapping(value = "/manLocDetl/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){
+ Long hostId = getHostId();
+ if (hostId != null) {
+ param.put("host_id", hostId);
+ }
+ Object nodeId = param.get("node_id");
+ if (Cools.isEmpty(nodeId)) {
+ nodeId = getOriginNode().getId();
+ param.put("node_id", String.valueOf(nodeId));
+ }
+ Object tagId = param.get("tag_id");
+ if (Cools.isEmpty(tagId)) {
+ tagId = getOriginTag().getId();
+ param.put("tag_id", String.valueOf(tagId));
+ }
+ if (!Cools.isEmpty(param.get("update_time"))){
+ String val = String.valueOf(param.get("update_time"));
+ if (val.contains(RANGE_TIME_LINK)) {
+ String[] dates = val.split(RANGE_TIME_LINK);
+ param.put("startTime", DateUtils.convert(dates[0]));
+ param.put("endTime", DateUtils.convert(dates[1]));
+ param.remove("update_time");
+ }
+ }
+ Page<ManLocDetl> page = manLocDetlService.getPage(toPage(curr, limit, param, ManLocDetl.class));
+ return R.ok(page);
+ }
+
+
+ @RequestMapping("/manLocDetl/list")
+ public R outList(@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){
+
+ Page<ManLocDetl> manLocDetlPage = toPage(curr, limit, param, ManLocDetl.class);
+ Page<ManLocDetl> outPage = manLocDetlService.getOutPage(manLocDetlPage);
+// Page<ManLocDetl> page = manLocDetlService.getPage(manLocDetlPage);
+ return R.ok(outPage);
+ }
+
+ @RequestMapping("/manLocDetl/adjust/start")
+ @ManagerAuth(memo = "搴撳瓨璋冩暣")
+ public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) {
+ manLocDetlService.adjustLocDetl(param, getUserId(),getUser());
+ return R.ok("搴撳瓨璋冩暣鎴愬姛");
+ }
+
+ @RequestMapping(value = "/manLocDetl/asrsAndSaas/list")
+ @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(required = false)String condition,
+ @RequestParam Map<String, Object> param){
+
+ Page<ManLocDetl> manLocDetlPage = toPage(curr, limit, param, ManLocDetl.class);
+ Page<ManLocDetl> all = manLocDetlService.selectAllPage(manLocDetlPage);
+ return R.ok().add(all);
+ }
+ private <T> void convert(Map<String, Object> map, EntityWrapper<T> 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 {
+ if (entry.getKey().equals("locNo")) {
+ wrapper.eq("loc_no", String.valueOf(entry.getValue()));
+ } else {
+ wrapper.like(entry.getKey(), String.valueOf(entry.getValue()));
+ }
+ }
+ }
+ }
+
+
+
+
+}
diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java
index d712978..1d05c39 100644
--- a/src/main/java/com/zy/asrs/controller/MobileController.java
+++ b/src/main/java/com/zy/asrs/controller/MobileController.java
@@ -47,6 +47,8 @@
private BasDevpService basDevpService;
@Autowired
private PackService packService;
+ @Autowired
+ private ManLocDetlService manLocDetlService;
// 缁勬墭 ----------------------------------------------------------------------------------------------------
@@ -88,6 +90,8 @@
combMat.setAnfme(orderDetl.getAnfme()-orderDetl.getQty());
combMat.setMaktx(orderDetl.getMaktx());
combMat.setSpecs(orderDetl.getSpecs());
+ combMat.setCsocode(orderDetl.getColor());
+ combMat.setIsoseq(orderDetl.getOrigin());
combMats.add(combMat);
}
combParam.setCombMats(combMats);
@@ -318,5 +322,32 @@
return R.ok("鐩樼偣鎴愬姛");
}
+ /*
+ 骞冲簱 搴撲綅鎺ㄨ崘
+ */
+ @RequestMapping("/node/recommend/loc")
+ @ManagerAuth(memo = "搴撲綅鎺ㄨ崘")
+ public R recommendNodeLoc(){
+
+
+ return R.ok();
+ }
+
+ /*
+ 骞冲簱 璁㈠崟涓婃灦
+ */
+ @RequestMapping("/node/puttway")
+ @ManagerAuth(memo = "璁㈠崟涓婃灦")
+ public R putway(@RequestBody HashMap<String,String> params){
+ String zpallet = params.get("zpallet");
+ String locNo = params.get("locNo");
+
+ mobileService.nodePutway(zpallet,locNo,getUser());
+
+
+ return R.ok();
+ }
+
+
}
diff --git a/src/main/java/com/zy/asrs/controller/NodeController.java b/src/main/java/com/zy/asrs/controller/NodeController.java
new file mode 100644
index 0000000..2c87cdd
--- /dev/null
+++ b/src/main/java/com/zy/asrs/controller/NodeController.java
@@ -0,0 +1,474 @@
+package com.zy.asrs.controller;
+
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+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 com.core.exception.CoolException;
+import com.zy.asrs.entity.Node;
+import com.zy.asrs.entity.param.InitPakoutParam;
+import com.zy.asrs.entity.param.NodeInitPatam;
+import com.zy.asrs.entity.param.PakinParam;
+import com.zy.asrs.entity.result.KeyValueVo;
+import com.zy.asrs.mapper.ManLocDetlMapper;
+import com.zy.asrs.service.NodeService;
+import com.zy.common.entity.NodeExcel;
+import com.zy.common.entity.NodeExcelListener;
+import com.zy.common.entity.Parameter;
+import com.zy.common.utils.ListUtils;
+import com.zy.common.utils.NodeUtils;
+import com.zy.common.utils.TreeUtils;
+import com.zy.common.web.BaseController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.*;
+
+@RestController
+public class NodeController extends BaseController {
+
+ @Autowired
+ private NodeService nodeService;
+ @Autowired
+ private TreeUtils treeUtils;
+ @Autowired
+ private ManLocDetlMapper manLocDetlMapper;
+
+ @RequestMapping(value = "/node/{id}/auth")
+ @ManagerAuth
+ public R get(@PathVariable("id") String id) {
+ return R.ok(nodeService.selectById(String.valueOf(id)));
+ }
+
+ @RequestMapping(value = "/node/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<Node> wrapper = new EntityWrapper<>();
+ wrapper.eq("type",3);
+ excludeTrash(param);
+ convert(param, wrapper);
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ return R.ok(nodeService.selectPage(new Page<>(curr, limit), wrapper));
+ }
+
+ @RequestMapping(value = "/node/list/tree/auth")
+ @ManagerAuth
+ public R listTree(@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<Node> wrapper = new EntityWrapper<>();
+ wrapper.ne("type",3);
+ excludeTrash(param);
+ convert(param, wrapper);
+ hostEq(wrapper);
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ return R.parse("0-鎿嶄綔鎴愬姛").add(nodeService.selectList(wrapper));
+ }
+
+ @RequestMapping(value = "/node/tree/auth")
+ @ManagerAuth
+ public R tree(@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<Node> wrapper = new EntityWrapper<>();
+ excludeTrash(param);
+ convert(param, wrapper);
+ hostEq(wrapper);
+ if (!Cools.isEmpty(orderByField)){
+ wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
+ }
+ return R.parse("0-鎴愬姛").add(nodeService.selectList(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 = "/node/add/auth")
+ @ManagerAuth
+ public R add(Node node) {
+ Node node1 = nodeService.selectByUuid(node.getName());
+ if (!Cools.isEmpty(node1)) {
+ throw new CoolException("璇ョ紪鍙�/鍚嶇О宸插瓨鍦�");
+ }
+ if (node.getType() != 1) {
+ Node parentNode = nodeService.selectById(node.getParentId());
+ if (parentNode == null || parentNode.getStatus() == 0) {
+ return R.error(node.getType()==2?"鎵�灞炰粨搴撲笉瀛樺湪":"鎵�灞炲簱鍖轰笉瀛樺湪");
+ }
+ node.setParentName(parentNode.getName());
+ node.setLevel(parentNode.getLevel() + 1);
+ }
+ // path
+ NodeUtils nodeUtils = new NodeUtils();
+ nodeUtils.executePath(node);
+ node.setHostId(getHostId());
+ node.setUuid(node.getName().toString());
+ node.setPath(nodeUtils.path.toString());
+ node.setNamePath(nodeUtils.pathName.toString());
+ node.setLevel(node.getType());
+ node.setCreateBy(getUserId());
+ node.setCreateTime(new Date());
+ node.setUpdateBy(getUserId());
+ node.setUpdateTime(new Date());
+ node.setStatus(1);
+ nodeService.insert(node);
+ return R.ok();
+ }
+
+
+
+ @RequestMapping(value = "/node/update/auth")
+ @ManagerAuth
+ public R update(Node node){
+ Node node1 = nodeService.selectByUuid(node.getName());
+ if (!Cools.isEmpty(node1)) {
+ throw new CoolException("璇ョ紪鍙�/鍚嶇О宸插瓨鍦�");
+ }
+ if (Cools.isEmpty(node) || null==node.getId()){
+ return R.error();
+ }
+ if (node.getType() != 1) {
+ Node parentNode = nodeService.selectById(node.getParentId());
+ if (parentNode == null || parentNode.getStatus() == 0) {
+ return R.error(node.getType()==2?"鎵�灞炰粨搴撲笉瀛樺湪":"鎵�灞炲簱鍖轰笉瀛樺湪");
+ }
+ node.setParentName(parentNode.getName());
+ node.setLevel(parentNode.getLevel() + 1);
+ }
+ // path
+ NodeUtils nodeUtils = new NodeUtils();
+ nodeUtils.executePath(node);
+ node.setPath(nodeUtils.path.toString());
+ node.setNamePath(nodeUtils.pathName.toString());
+ node.setUuid(node.getName());
+
+ manLocDetlMapper.updateLocNo0(node.getId(),node.getName());
+ node.setUpdateBy(getUserId());
+ node.setUpdateTime(new Date());
+ nodeService.updateById(node);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/node/delete/auth")
+ @ManagerAuth
+ public R delete(@RequestParam String param){
+ List<Node> list = JSONArray.parseArray(param, Node.class);
+ if (Cools.isEmpty(list)){
+ return R.error();
+ }
+ for (Node entity : list){
+ nodeService.delete(new EntityWrapper<>(entity));
+ }
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/node/delete0/auth")
+ @ManagerAuth
+ public R delete(@RequestParam(value="ids[]") Long[] ids){
+ for (Long id : ids){
+ nodeService.deleteById(id);
+ }
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/node/export/auth")
+ @ManagerAuth
+ public R export(@RequestBody JSONObject param){
+ EntityWrapper<Node> wrapper = new EntityWrapper<>();
+ List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
+ Map<String, Object> map = excludeTrash(param.getJSONObject("node"));
+ convert(map, wrapper);
+ List<Node> list = nodeService.selectList(wrapper);
+ return R.ok(exportSupport(list, fields));
+ }
+
+ @RequestMapping(value = "/nodeQuery/auth")
+ @ManagerAuth
+ public R query(String condition) {
+ EntityWrapper<Node> wrapper = new EntityWrapper<>();
+ wrapper.like("name", condition).or().like("uuid", condition).eq("type", 3);
+ hostEq(wrapper);
+ Page<Node> page = nodeService.selectPage(new Page<>(0, 10), wrapper);
+ List<Map<String, Object>> result = new ArrayList<>();
+ for (Node node : page.getRecords()){
+ Map<String, Object> map = new HashMap<>();
+ map.put("id", node.getId());
+ map.put("value", node.getUuid() + "锛�" +node.getName()+ "锛�");
+ result.add(map);
+ }
+ return R.ok(result);
+ }
+
+ @RequestMapping(value = "/node/check/column/auth")
+ @ManagerAuth
+ public R query(@RequestBody JSONObject param) {
+ Wrapper<Node> wrapper = new EntityWrapper<Node>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
+ if (null != nodeService.selectOne(wrapper)){
+ return R.parse(BaseRes.REPEAT).add(getComment(Node.class, String.valueOf(param.get("key"))));
+ }
+ return R.ok();
+ }
+
+ @PostMapping(value = "/parent/node/group")
+ @ManagerAuth
+ public R getParentNodeGroup(@RequestParam(required = false) String condition,
+ @RequestParam Integer type) {
+ EntityWrapper<Node> wrapper = new EntityWrapper<>();
+ wrapper.eq("type", type).eq("status", 1);
+ hostEq(wrapper);
+ List<Node> nodes = nodeService.selectList(wrapper);
+
+ List<Map<String, Object>> result = new ArrayList<>();
+ for (Node node : nodes) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("key", node.getId());
+ map.put("val", node.getName());
+ result.add(map);
+ }
+ return R.ok().add(result);
+ }
+
+ @PostMapping(value = "/node/tree/auth")
+ @ManagerAuth
+ public R tree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException {
+ ArrayList<Map> tree = treeUtils.getNodeTree(String.valueOf(getOriginNode().getId()), getHostId());
+ // 娣辨嫹璐�
+ List<Map> result = ListUtils.deepCopy(tree);
+ if (!Cools.isEmpty(condition)) {
+ treeUtils.remove(condition, result);
+ treeUtils.remove(condition, result);
+ }
+ return R.ok(result);
+ }
+
+ /*************************************** 鏁版嵁鐩稿叧 ***********************************************/
+
+ /**
+ * excel瀵煎叆妯℃澘涓嬭浇
+ */
+ @RequestMapping(value = "/node/excel/import/mould")
+ public void nodeExcelImportMould(HttpServletResponse response) throws IOException {
+ List<NodeExcel> excels = new ArrayList<>();
+ response.setContentType("application/vnd.ms-excel");
+ response.setCharacterEncoding("utf-8");
+ String fileName = URLEncoder.encode("璐т綅妗fExcel瀵煎叆妯℃澘", "UTF-8");
+ response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+ EasyExcel.write(response.getOutputStream(), NodeExcel.class)
+ .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
+ .sheet("sheet1")
+ .doWrite(excels);
+ }
+
+ // excel瀵煎叆
+ @PostMapping(value = "/node/excel/import/auth")
+ @ManagerAuth(memo = "璐т綅妗f鏁版嵁瀵煎叆")
+ @Transactional
+ public R nodeExcelImport(MultipartFile file) throws IOException {
+ NodeExcelListener listener = new NodeExcelListener(getUserId(), getHostId());
+ EasyExcel.read(file.getInputStream(), NodeExcel.class, listener).sheet().doRead();
+ return R.ok("鎴愬姛鍚屾"+listener.getTotal()+"涓揣浣�");
+ }
+
+ /*************************************** 鍏ュ簱鍑虹浉鍏� ***********************************************/
+
+ @RequestMapping("/work/stock/pakin")
+ @ManagerAuth(memo = "鍏ュ簱")
+ public R stockPakin(@RequestBody PakinParam number) {
+ Node node = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("id", number.getNodeId()));
+ if (node.getType() != 3) {
+ return R.error("浠呭彲閫夋嫨璐т綅");
+ }
+ return nodeService.stockPakin(number, getUserId(), getHostId(),getUser());
+ }
+
+ @RequestMapping("/work/stock/pakout")
+ @ManagerAuth(memo = "鍑哄簱")
+ public R initPakout(@RequestBody List<InitPakoutParam> params) {
+ return nodeService.initPakout(params, getUserId(), getHostId(),getUser());
+ }
+
+ @PostMapping(value = "/work/empty/stock")
+ public R getGroupEmptyStock(@RequestParam(required = false) String sourceLocNo) {
+ List<Node> allEmptys = nodeService.selectList(new EntityWrapper<Node>()
+ .eq("type","3"));
+ return R.ok().add(allEmptys);
+ }
+ @RequestMapping("/work/move/start")
+ @ManagerAuth(memo = "搴撲綅绉昏浆")
+ public R locMoveStart(@RequestParam String sourceLocNo,
+ @RequestParam String targetLocNo) {
+ nodeService.locMove(sourceLocNo, targetLocNo, getUserId(),getUser());
+ return R.ok("绉诲簱鍚姩鎴愬姛");
+ }
+ @RequestMapping(value = "/node/select/{id}/auth")
+ @ManagerAuth
+ public R getById(@PathVariable("id") String id) {
+ Node node = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("uuid",id));
+ return R.ok(node);
+ }
+
+ @RequestMapping(value = "/node/init/auth")
+ @ManagerAuth(memo = "骞冲簱搴撲綅鍒濆鍖�")
+ @Transactional
+ public R init(NodeInitPatam param) {
+ List<Node> list = new ArrayList<>();
+ EntityWrapper<Node> nodeEntityWrapper = new EntityWrapper<>();
+ nodeEntityWrapper.eq("id",param.getValue());
+ nodeEntityWrapper.eq("name",param.getName());
+ // nodeService.delete(new EntityWrapper<Node>().eq("parent_id",param.getValue()));
+ Node node = nodeService.selectOne(nodeEntityWrapper);
+ String[] string = node.getNamePath().split(",");
+ int tno=1; int no=1;
+ for (int b=param.getStartBay(); b<=param.getEndBay(); b++) {
+ for (int r=param.getStartRow(); r<=param.getEndRow(); r++){
+ for (int l=param.getStartLev(); l<=param.getEndLev(); l++) {
+ // 鑾峰彇搴撲綅鍙�
+ String locNo;
+
+ if (param.getName().equals("DT-B")){
+ if (b == 2 || b ==4 || b == 7){
+ if (l == 1){
+ locNo = param.getName()+"T-" +String.format("%02d", tno) + String.format("%02d", r) + String.format("%02d", l);
+ }else {
+ locNo = null;
+ }
+
+
+ }else {
+ locNo = param.getName()+"-" +String.format("%02d", no) + String.format("%02d", r) + String.format("%02d", l);
+
+ }
+ }else if (param.getName().equals("DT-C") || param.getName().equals("DT-D")){
+ if (b == 3 || b ==6 || b == 9 || b == 12 || b == 15 || b == 17 || b == 20 || b == 23){
+ if (l == 1){
+ locNo = param.getName()+"T-" +String.format("%02d", tno) + String.format("%02d", r) + String.format("%02d", l);
+ }else {
+ locNo = null;
+ }
+
+ }else {
+ locNo = param.getName()+"-" +String.format("%02d", no) + String.format("%02d", r) + String.format("%02d", l);
+
+ }
+
+ }else {
+ locNo = param.getName()+"-" +String.format("%02d", r) + String.format("%02d", b) + String.format("%02d", l);
+ }
+
+
+
+
+ if (locNo == null){
+ continue;
+ }
+
+ Date now = new Date();
+ Node node1 = new Node();
+ node1.setUuid(locNo);
+ node1.setName(locNo);
+ node1.setParentId(node.getId());
+ node1.setParentName(node.getName());
+ node1.setType(3);
+ node1.setPath(node.getPath()+","+node.getId());
+ node1.setNamePath(node.getNamePath()+","+node.getName());
+ node1.setLevel(3);
+ node1.setStatus(1);
+ node1.setCreateBy(getUserId());
+ node1.setCreateTime(now);
+ node1.setUpdateBy(getUserId());
+ node1.setUpdateTime(now);
+ node1.setRow1(r);
+ node1.setBay1(b);
+ node1.setLev1(l);
+ if (!nodeService.insert(node1)){
+ return R.error("鏁版嵁鎻掑叆澶辫触");
+ }
+
+ }
+ }
+ if (param.getName().equals("DT-B")){
+ if (b == 2 || b ==4 || b == 7){
+ tno++;
+ }else {
+ no++;
+ }
+ }else if (param.getName().equals("DT-C") || param.getName().equals("DT-D")){
+ if (b == 3 || b ==6 || b == 9 || b == 12 || b == 15 || b == 17 || b == 20 || b == 23){
+ tno++;
+ }else {
+ no++;
+ }
+
+ }
+
+
+ }
+//
+// nodeService.delete(new EntityWrapper<Node>().eq("parent_id",param.getValue()));
+
+// if (nodeService.insertBatch(list)){
+// return R.error("鏁版嵁鎻掑叆澶辫触");
+// }
+ return R.ok("鍒濆鍖栨垚鍔�");
+ }
+
+ @RequestMapping(value = "/node/init/pwd")
+ public R locMastInitPwd(@RequestParam(required = false) String pwd) {
+ if (Cools.isEmpty(pwd)) {
+ return R.error("璇疯緭鍏ュ彛浠�");
+ }
+ return R.ok().add(Parameter.get().getLocMastInitPwd().equals(pwd));
+ }
+
+ @RequestMapping(value = "/node/all/get/loc")
+ public R getarea(){
+ EntityWrapper<Node> nodeEntityWrapper = new EntityWrapper<>();
+ nodeEntityWrapper.eq("type",2);
+ List<Node> list = nodeService.selectList(nodeEntityWrapper);
+ List<KeyValueVo> keyValueVoList = new ArrayList<>();
+ for (Node node : list){
+ KeyValueVo vo = new KeyValueVo();
+ vo.setName(node.getName());
+ vo.setValue(node.getId());
+ keyValueVoList.add(vo);
+ }
+ return R.ok(keyValueVoList);
+
+ }
+
+
+
+}
diff --git a/src/main/java/com/zy/asrs/controller/OutController.java b/src/main/java/com/zy/asrs/controller/OutController.java
index 9317ec6..efaaee0 100644
--- a/src/main/java/com/zy/asrs/controller/OutController.java
+++ b/src/main/java/com/zy/asrs/controller/OutController.java
@@ -76,10 +76,10 @@
if (issued <= 0.0D) { continue; }
//鍏堟壘AGV鐨勫簱瀛橈紝濡傛灉杩斿洖鐨刬ssued澶т簬0锛屽垯鍘诲洓椤瑰簱鎵�
- issued = agvLocDetlService.queryStockAndSetLocDto(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOrderNo(),locDtoList,issued);
+ issued = agvLocDetlService.queryStockAndSetLocDto(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOrderNo(),locDtoList,issued,orderDetl.getThreeCode(),orderDetl.getDeadTime());
//浠庡洓椤瑰簱鐨勫簱瀛橀噷闈㈡壘锛�
- issued = locDetlService.queryStockAndSetLocDto(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOrderNo(),locDtoList,issued);
+ issued = locDetlService.queryStockAndSetLocDto(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOrderNo(),locDtoList,issued,orderDetl.getThreeCode(),orderDetl.getDeadTime());
if (issued > 0) {
LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued);
@@ -286,9 +286,9 @@
continue;
}
//鍏堟壘AGV鐨勫簱瀛橈紝濡傛灉杩斿洖鐨刬ssued澶т簬0锛屽垯鍘诲洓椤瑰簱鎵�
- issued = agvLocDetlService.queryStockAndSetLocDto(vo.getMatnr(),vo.getBatch(),JSON.toJSONString(vo.getOrderDtos()),locDtoList,issued);
+ issued = agvLocDetlService.queryStockAndSetLocDto(vo.getMatnr(),vo.getBatch(),JSON.toJSONString(vo.getOrderDtos()),locDtoList,issued, vo.getCsocode(), vo.getIsoseq());
//浠庡洓椤瑰簱鐨勫簱瀛橀噷闈㈡壘锛�
- issued = locDetlService.queryStockAndSetLocDto(vo.getMatnr(),vo.getBatch(),JSON.toJSONString(vo.getOrderDtos()),locDtoList,issued);
+ issued = locDetlService.queryStockAndSetLocDto(vo.getMatnr(),vo.getBatch(),JSON.toJSONString(vo.getOrderDtos()),locDtoList,issued, vo.getCsocode(), vo.getIsoseq());
if (issued > 0) {
LocDto locDto = new LocDto(null, vo.getMatnr(), vo.getMaktx(), vo.getBatch(), JSON.toJSONString(vo.getOrderDtos()), issued);
diff --git a/src/main/java/com/zy/asrs/entity/AdjDetl.java b/src/main/java/com/zy/asrs/entity/AdjDetl.java
index c76f4be..385e3ba 100644
--- a/src/main/java/com/zy/asrs/entity/AdjDetl.java
+++ b/src/main/java/com/zy/asrs/entity/AdjDetl.java
@@ -125,6 +125,21 @@
@TableField("appe_time")
private Date appeTime;
+ /*
+ 璁㈠崟鍙�
+ */
+ private String orderNo;
+
+ /*
+ 閿�鍞鍗曞彿
+ */
+ private String csocode;
+
+ /*
+ 閿�鍞鍗曡鍙�
+ */
+ private String isoseq;
+
public AdjDetl() {}
public AdjDetl(String locNo, String matnr, String batch, Double oriCtns, Double oriQty, Double oriWt, Double adjCtns, Double adjQty, Double adjWt, String memo, Long modiUser, Date modiTime, Long appeUser, Date appeTime) {
diff --git a/src/main/java/com/zy/asrs/entity/ManLocDetl.java b/src/main/java/com/zy/asrs/entity/ManLocDetl.java
new file mode 100644
index 0000000..a63fe8b
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/ManLocDetl.java
@@ -0,0 +1,346 @@
+package com.zy.asrs.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.zy.system.entity.Host;
+import com.zy.system.entity.User;
+import com.zy.system.service.HostService;
+import com.zy.system.service.UserService;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Data
+@TableName("man_loc_detl")
+public class ManLocDetl implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 鎵�灞為」鐩�
+ */
+ @ApiModelProperty(value= "鎵�灞為」鐩�")
+ @TableField("host_id")
+ private Long hostId;
+
+ /**
+ * 璐т綅缂栧彿
+ */
+ @ApiModelProperty(value= "璐т綅缂栧彿")
+ @TableField("loc_no")
+ private String locNo;
+
+ /**
+ * 鎵�灞炶揣浣�
+ */
+ @ApiModelProperty(value= "鎵�灞炶揣浣�")
+ @TableField("node_id")
+ private Long nodeId;
+
+ /**
+ * 鎵樼洏鐮�
+ */
+ @ApiModelProperty(value= "鎵樼洏鐮�")
+ private String zpallet;
+
+ /**
+ * 搴撳瓨浣欓噺
+ */
+ @ApiModelProperty(value= "搴撳瓨浣欓噺")
+ @ExcelProperty(value = "搴撳瓨鎬婚噺")
+ private Double anfme;
+
+ /**
+ * 鍟嗗搧缂栧彿
+ */
+ @ApiModelProperty(value= "鍟嗗搧缂栧彿")
+ @TableId(value = "matnr", type = IdType.INPUT)
+ @ExcelProperty(value = "鍟嗗搧缂栧彿")
+ private String matnr;
+
+ /**
+ * 鍟嗗搧鍚嶇О
+ */
+ @ApiModelProperty(value= "鍟嗗搧鍚嶇О")
+ @ExcelProperty(value = "鍟嗗搧鍚嶇О")
+ private String maktx;
+
+ /**
+ * 鍚嶇О
+ */
+ @ApiModelProperty(value= "鍚嶇О")
+ private String name;
+
+ /**
+ * 瑙勬牸
+ */
+ @ApiModelProperty(value= "瑙勬牸")
+ @ExcelProperty(value = "瑙勬牸")
+ private String specs;
+
+ /**
+ * 鍨嬪彿
+ */
+ @ApiModelProperty(value= "鍨嬪彿")
+ private String model;
+
+ /**
+ * 鎵瑰彿
+ */
+ @ApiModelProperty(value= "鎵瑰彿")
+ @TableId(value = "batch", type = IdType.INPUT)
+ private String batch;
+
+ /**
+ * 鍗曚綅
+ */
+ @ApiModelProperty(value= "鍗曚綅")
+ @ExcelProperty(value = "鍗曚綅")
+ private String unit;
+
+ /**
+ * SKC
+ */
+ @ApiModelProperty(value= "SKC")
+ @ExcelProperty(value = "SKC")
+ private String barcode;
+
+ /**
+ * 鍗曟嵁绫诲瀷
+ */
+ @ApiModelProperty(value= "鍗曟嵁绫诲瀷")
+ @TableField("doc_id")
+ private Long docId;
+
+ /**
+ * 鍗曟嵁缂栧彿
+ */
+ @ApiModelProperty(value= "鍗曟嵁缂栧彿")
+ @TableField("doc_num")
+ private String docNum;
+
+ /**
+ * 瀹㈡埛鍚嶇О
+ */
+ @ApiModelProperty(value= "瀹㈡埛鍚嶇О")
+ @TableField("cust_name")
+ private String custName;
+
+ /**
+ * 鍝侀」鏁�
+ */
+ @ApiModelProperty(value= "鍝侀」鏁�")
+ @TableField("item_num")
+ private Integer itemNum;
+
+ /**
+ * 鏁伴噺
+ */
+ @ApiModelProperty(value= "鏁伴噺")
+ private Integer count;
+
+
+ /**
+ * 鍗曚环
+ */
+ @ApiModelProperty(value= "鍗曚环")
+ private Double price;
+
+ /**
+ * 閲嶉噺
+ */
+ @ApiModelProperty(value= "閲嶉噺")
+ private Double weight;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 绂佺敤
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ")
+ private Integer status;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @ApiModelProperty(value= "娣诲姞浜哄憳")
+ @TableField("create_by")
+ private Long createBy;
+
+ /**
+ * 娣诲姞鏃堕棿
+ */
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @TableField("create_time")
+ private Date createTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ @TableField("update_by")
+ private Long updateBy;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @TableField("modi_time")
+ private Date modiTime;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ /**
+ * 鎷ユ湁鑰�
+ */
+ @ApiModelProperty(value= "鎷ユ湁鑰� 1: 鏉板厠 ")
+ private Integer owner;
+
+ /**
+ * 璐х墿褰㈡��:0锛氫唬閲囥��1锛氫粨鍌�
+ */
+ @ApiModelProperty(value= "璐х墿褰㈡��:0锛氫唬閲囥��1锛氫粨鍌�")
+ private Integer payment;
+
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @TableField("real_anfme")
+ private Date realAnfme;
+
+ @ApiModelProperty(value= "璁㈠崟鍙�")
+ @TableField("order_no")
+ private String orderNo;
+
+ @TableField("container_code")
+ private String containerCode;
+
+ private String csocode;
+
+ private String isoseq;
+
+// LocDetl locDetl = new LocDetl(
+// null, // 璐т綅缂栧彿[闈炵┖]
+// null, // 鎵�灞炶揣浣�
+// null, // 鎵樼洏鐮�
+// null, // 搴撳瓨浣欓噺[闈炵┖]
+// null, // 鍟嗗搧缂栧彿[闈炵┖]
+// null, // 鍟嗗搧鍚嶇О
+// null, // 鍚嶇О
+// null, // 瑙勬牸
+// null, // 鍨嬪彿
+// null, // 鎵瑰彿
+// null, // 鍗曚綅
+// null, // SKC
+// null, // 鍗曟嵁绫诲瀷
+// null, // 鍗曟嵁缂栧彿
+// null, // 瀹㈡埛鍚嶇О
+// null, // 鍝侀」鏁�
+// null, // 鏁伴噺
+// null, // 閲嶉噺
+// null, // 鐘舵��
+// null, // 娣诲姞浜哄憳
+// null, // 娣诲姞鏃堕棿
+// null, // 淇敼浜哄憳
+// null, // 淇敼鏃堕棿
+// null // 澶囨敞
+// );
+
+// public String getOwner$(){
+// LocOwnerService service = SpringUtils.getBean(LocOwnerService.class);
+// LocOwner locOwner = service.selectById(this.owner);
+// if (!Cools.isEmpty(locOwner)){
+// return String.valueOf(locOwner.getOwner());
+// }
+// return null;
+// }
+
+ public String getPayment$(){
+ if (null == this.payment){ return null; }
+ switch (this.payment){
+ case 1:
+ return "浠撳偍";
+ case 0:
+ return "浠i噰";
+ default:
+ return String.valueOf(this.payment);
+ }
+ }
+
+ public String getHostId$(){
+ HostService service = SpringUtils.getBean(HostService.class);
+ Host host = service.selectById(this.hostId);
+ if (!Cools.isEmpty(host)){
+ return String.valueOf(host.getName());
+ }
+ return null;
+ }
+
+ public Long getNodeId() {
+ return nodeId;
+ }
+
+// public String getNodeId$(){
+// NodeService service = SpringUtils.getBean(NodeService.class);
+// Node node = service.selectById(this.nodeId);
+// if (!Cools.isEmpty(node)){
+// return String.valueOf(node.getName());
+// }
+// return null;
+// }
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "姝e父";
+ case 0:
+ return "绂佺敤";
+ default:
+ return String.valueOf(this.status);
+ }
+ }
+
+ public String getCreateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.selectById(this.createBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getCreateTime$(){
+ if (Cools.isEmpty(this.createTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+ }
+
+ public String getUpdateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.selectById(this.updateBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getNickname());
+ }
+ return null;
+ }
+
+ public String getModiTime$(){
+ if (Cools.isEmpty(this.modiTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
+ }
+
+
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/Node.java b/src/main/java/com/zy/asrs/entity/Node.java
new file mode 100644
index 0000000..c7632b2
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/Node.java
@@ -0,0 +1,437 @@
+package com.zy.asrs.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.zy.system.entity.Host;
+import com.zy.system.entity.User;
+import com.zy.system.service.HostService;
+import com.zy.system.service.UserService;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Data
+@TableName("man_node")
+public class Node implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ @ApiModelProperty(value= "ID")
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 鎵�灞為」鐩�
+ */
+ @ApiModelProperty(value= "鎵�灞為」鐩�")
+ @TableField("host_id")
+ private Long hostId;
+
+ /**
+ * 缂栧彿
+ */
+ @ApiModelProperty(value= "缂栧彿")
+ private String uuid;
+
+ /**
+ * 鍚嶇О
+ */
+ @ApiModelProperty(value= "鍚嶇О")
+ private String name;
+
+ /**
+ * 鐖剁骇
+ */
+ @ApiModelProperty(value= "鐖剁骇")
+ @TableField("parent_id")
+ private Long parentId;
+
+ /**
+ * 鐖剁骇鍚嶇О
+ */
+ @ApiModelProperty(value= "鐖剁骇鍚嶇О")
+ @TableField("parent_name")
+ private String parentName;
+
+ /**
+ * 绫诲瀷 1: 浠撳簱 2: 搴撳尯 3: 璐т綅
+ */
+ @ApiModelProperty(value= "绫诲瀷 1: 浠撳簱 2: 搴撳尯 3: 璐т綅 ")
+ private Integer type;
+
+ /**
+ * 鍏宠仈璺緞
+ */
+ @ApiModelProperty(value= "鍏宠仈璺緞")
+ private String path;
+
+ /**
+ * 鍏宠仈璺緞鍚�
+ */
+ @ApiModelProperty(value= "鍏宠仈璺緞鍚�")
+ @TableField("name_path")
+ private String namePath;
+
+ /**
+ * 绛夌骇
+ */
+ @ApiModelProperty(value= "绛夌骇")
+ private Integer level;
+
+ /**
+ * 璐熻矗浜�
+ */
+ @ApiModelProperty(value= "璐熻矗浜�")
+ private String leading;
+
+ /**
+ * 鎺掑簭
+ */
+ @ApiModelProperty(value= "鎺掑簭")
+ private Integer sort;
+
+ /**
+ * 鎺�
+ */
+ @ApiModelProperty(value= "鎺�")
+ private Integer row1;
+ /**
+ * 鍒�
+ */
+ @ApiModelProperty(value= "鍒�")
+ private Integer bay1;
+ /**
+ * 灞�
+ */
+ @ApiModelProperty(value= "灞�")
+ private Integer lev1;
+
+ /**
+ * 鏉$爜
+ */
+ @ApiModelProperty(value= "鏉$爜")
+ private String barcode;
+
+ /**
+ * 鎺ㄨ崘浣�
+ */
+ @ApiModelProperty(value= "鎺ㄨ崘浣�")
+ private Integer major;
+
+ /**
+ * 鐘舵�� 1: 姝e父 0: 绂佺敤
+ */
+ @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ")
+ private Integer status;
+
+ /**
+ * 娣诲姞鏃堕棿
+ */
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @TableField("create_time")
+ private Date createTime;
+
+ /**
+ * 娣诲姞浜哄憳
+ */
+ @ApiModelProperty(value= "娣诲姞浜哄憳")
+ @TableField("create_by")
+ private Long createBy;
+
+ /**
+ * 淇敼鏃堕棿
+ */
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ @TableField("update_time")
+ private Date updateTime;
+
+ /**
+ * 淇敼浜哄憳
+ */
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ @TableField("update_by")
+ private Long updateBy;
+
+ /**
+ * 澶囨敞
+ */
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+
+
+
+// Node node = new Node(
+// null, // 缂栧彿
+// null, // 鍚嶇О
+// null, // 鐖剁骇
+// null, // 鐖剁骇鍚嶇О
+// null, // 绫诲瀷
+// null, // 鍏宠仈璺緞
+// null, // 鍏宠仈璺緞鍚�
+// null, // 绛夌骇
+// null, // 璐熻矗浜�
+// null, // 鎺掑簭
+// null, // 鏉$爜
+// null, // 鎺ㄨ崘浣�
+// null, // 鐘舵��
+// null, // 娣诲姞鏃堕棿
+// null, // 娣诲姞浜哄憳
+// null, // 淇敼鏃堕棿
+// null, // 淇敼浜哄憳
+// null // 澶囨敞
+// );
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getHostId() {
+ return hostId;
+ }
+
+ public void setHostId(Long hostId) {
+ this.hostId = hostId;
+ }
+
+ public String getHostId$(){
+ HostService service = SpringUtils.getBean(HostService.class);
+ Host host = service.selectById(this.hostId);
+ if (!Cools.isEmpty(host)){
+ return String.valueOf(host.getName());
+ }
+ return null;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Long getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(Long parentId) {
+ this.parentId = parentId;
+ }
+
+ public String getParentName() {
+ return parentName;
+ }
+
+ public void setParentName(String parentName) {
+ this.parentName = parentName;
+ }
+
+ public Integer getType() {
+ return type;
+ }
+
+ public String getType$(){
+ if (null == this.type){ return null; }
+ switch (this.type){
+ case 1:
+ return "浠撳簱";
+ case 2:
+ return "搴撳尯";
+ case 3:
+ return "璐т綅";
+ default:
+ return String.valueOf(this.type);
+ }
+ }
+
+ public void setType(Integer type) {
+ this.type = type;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public String getNamePath() {
+ return namePath;
+ }
+
+ public void setNamePath(String namePath) {
+ this.namePath = namePath;
+ }
+
+ public Integer getLevel() {
+ return level;
+ }
+
+ public void setLevel(Integer level) {
+ this.level = level;
+ }
+
+ public String getLeading() {
+ return leading;
+ }
+
+ public void setLeading(String leading) {
+ this.leading = leading;
+ }
+
+ public Integer getSort() {
+ return sort;
+ }
+
+ public void setSort(Integer sort) {
+ this.sort = sort;
+ }
+
+ public String getBarcode() {
+ return barcode;
+ }
+
+ public void setBarcode(String barcode) {
+ this.barcode = barcode;
+ }
+
+ public Integer getMajor() {
+ return major;
+ }
+
+ public void setMajor(Integer major) {
+ this.major = major;
+ }
+
+ public Integer getStatus() {
+ return status;
+ }
+
+ public String getStatus$(){
+ if (null == this.status){ return null; }
+ switch (this.status){
+ case 1:
+ return "姝e父";
+ case 0:
+ return "绂佺敤";
+ default:
+ return String.valueOf(this.status);
+ }
+ }
+
+ public String getRow1$(){
+ if (null == this.row1){ return null; }
+ return String.valueOf(this.row1);
+ }
+
+ public String getBay1$(){
+ if (null == this.lev1){ return null; }
+ return String.valueOf(this.lev1);
+ }
+
+ public String getLev1$(){
+ if (null == this.bay1){ return null; }
+ return String.valueOf(this.bay1);
+ }
+
+ 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 Long getCreateBy() {
+ return createBy;
+ }
+
+ public String getCreateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.selectById(this.createBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getUsername());
+ }
+ return null;
+ }
+
+ public void setCreateBy(Long createBy) {
+ this.createBy = createBy;
+ }
+
+ 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 Long getUpdateBy() {
+ return updateBy;
+ }
+
+ public String getUpdateBy$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.selectById(this.updateBy);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getUsername());
+ }
+ return null;
+ }
+
+ public void setUpdateBy(Long updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public String getMemo() {
+ return memo;
+ }
+
+ public void setMemo(String memo) {
+ this.memo = memo;
+ }
+
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/param/CombParam.java b/src/main/java/com/zy/asrs/entity/param/CombParam.java
index ac61a0b..ff8690d 100644
--- a/src/main/java/com/zy/asrs/entity/param/CombParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/CombParam.java
@@ -24,6 +24,15 @@
@Data
public static class CombMat {
+ //鏂欐兂鐮�
+ private String containerCode;
+
+ //閿�鍞鍗曞彿
+ private String csocode;
+
+ //閿�鍞鍗曡鍙�
+ private String isoseq;
+
// 鐗╂枡缂栧彿
private String matnr;
diff --git a/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java b/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java
index 674ae15..aee3742 100644
--- a/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/FullStoreParam.java
@@ -25,12 +25,21 @@
// 鐗╂枡缂栧彿
private String matnr;
+ //鏂欐兂鐮�
+ private String containerCode;
+
// 搴忓垪鐮�
private String batch;
// 鐗╂枡鏁伴噺
private Double anfme;
+ //閿�鍞鍗曞彿
+ private String csocode;
+
+ //閿�鍞鍗曡鍙�
+ private String isoseq;
+
}
}
diff --git a/src/main/java/com/zy/asrs/entity/param/InitPakoutParam.java b/src/main/java/com/zy/asrs/entity/param/InitPakoutParam.java
new file mode 100644
index 0000000..75a2218
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/param/InitPakoutParam.java
@@ -0,0 +1,17 @@
+package com.zy.asrs.entity.param;
+
+import lombok.Data;
+
+/**
+ * Created by vincent on 2021/3/10
+ */
+@Data
+public class InitPakoutParam {
+
+ private Long nodeId;
+
+ private String matnr;
+
+ private Double count;
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
index c654988..a00c9ed 100644
--- a/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/LocDetlAdjustParam.java
@@ -30,10 +30,18 @@
// 鍙樻洿鏁伴噺
private Double count;
- public LocDetlAdjust(String matnr, String batch, Double count) {
+ // 閿�鍞鍗曞彿
+ private String threeCode;
+
+ //閿�鍞鍗曡鍙�
+ private String deadTime;
+
+ public LocDetlAdjust(String matnr, String batch, Double count, String threeCode, String deadTime) {
this.matnr = matnr;
this.batch = batch;
this.count = count;
+ this.threeCode = threeCode;
+ this.deadTime = deadTime;
}
}
@@ -52,7 +60,7 @@
}
}
if (!exit) {
- copyList.add(new LocDetlAdjustParam.LocDetlAdjust(adjust.getMatnr(), adjust.getBatch(), adjust.getCount()));
+ copyList.add(new LocDetlAdjustParam.LocDetlAdjust(adjust.getMatnr(), adjust.getBatch(), adjust.getCount(), adjust.getThreeCode(), adjust.getDeadTime()));
}
}
list = copyList;
diff --git a/src/main/java/com/zy/asrs/entity/param/MatnrDto.java b/src/main/java/com/zy/asrs/entity/param/MatnrDto.java
new file mode 100644
index 0000000..195550d
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/param/MatnrDto.java
@@ -0,0 +1,19 @@
+package com.zy.asrs.entity.param;
+
+import lombok.Data;
+
+/**
+ * Created by vincent on 2021/3/31
+ */
+@Data
+public class MatnrDto {
+
+ private String matnr;
+
+ private Double count;
+
+ private String orderNo;
+
+
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/param/NodeInitPatam.java b/src/main/java/com/zy/asrs/entity/param/NodeInitPatam.java
new file mode 100644
index 0000000..f6cc4d7
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/param/NodeInitPatam.java
@@ -0,0 +1,29 @@
+package com.zy.asrs.entity.param;
+
+import lombok.Data;
+
+@Data
+public class NodeInitPatam {
+
+ private Integer startRow;
+
+ // 缁堟鎺�
+ private Integer endRow;
+
+ // 璧峰鍒�
+ private Integer startBay;
+
+ // 缁堟鍒�
+ private Integer endBay;
+
+ // 璧峰灞�
+ private Integer startLev;
+
+ // 缁堟灞�
+ private Integer endLev;
+
+ private Integer value;
+
+ private String name;
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/param/PakinParam.java b/src/main/java/com/zy/asrs/entity/param/PakinParam.java
new file mode 100644
index 0000000..33935f3
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/param/PakinParam.java
@@ -0,0 +1,19 @@
+package com.zy.asrs.entity.param;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * Created by vincent on 2021/3/26
+ */
+@Data
+public class PakinParam {
+
+ private String nodeId;
+
+ private List<MatnrDto> mats;
+
+ private Integer docType;
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
index 2c3ef14..22cc462 100644
--- a/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
+++ b/src/main/java/com/zy/asrs/entity/param/StockOutParam.java
@@ -34,6 +34,8 @@
// 鏁伴噺
private Double count;
+ //
+
}
}
diff --git a/src/main/java/com/zy/asrs/mapper/ManLocDetlMapper.java b/src/main/java/com/zy/asrs/mapper/ManLocDetlMapper.java
new file mode 100644
index 0000000..f0ad47e
--- /dev/null
+++ b/src/main/java/com/zy/asrs/mapper/ManLocDetlMapper.java
@@ -0,0 +1,92 @@
+package com.zy.asrs.mapper;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.zy.asrs.entity.ManLocDetl;
+import com.zy.asrs.entity.result.StockVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+@Mapper
+@Repository
+public interface ManLocDetlMapper extends BaseMapper<ManLocDetl> {
+ List<ManLocDetl> listByPage(Map<String, Object> map);
+
+ Integer listByPageCount(Map<String, Object> map);
+
+ ManLocDetl selectItem(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch);
+
+ int deleteItem(@Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch);
+
+ int updateAnfme(@Param("anfme")Double anfme, @Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch);
+
+ List<ManLocDetl> getStockOutPage(Map<String, Object> map);
+
+ Integer getStockOutPageCount(Map<String, Object> map);
+
+ @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}")
+ int updateLocNo(String newLocNo, String oldLocNo);
+
+ @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, lm.appe_time, getdate()) = 0) ORDER BY lm.appe_time ASC")
+ List<String> selectSameDetlToday(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end);
+
+ List<ManLocDetl> getStockStatis(Map<String, Object> map);
+
+ Integer getStockStatisCount(Map<String, Object> map);
+
+ List<ManLocDetl> getStockStatisExcel();
+
+ @Select("select sum(a.anfme) as sum from asr_loc_detl a left join asr_loc_mast b on a.loc_no = b.loc_no where b.loc_sts = 'F' and a.matnr = #{matnr}")
+ Double selectSumAnfmeByMatnr(@Param("matnr") String matnr);
+
+ List<ManLocDetl> selectPakoutByRule(String matnr);
+
+ List<ManLocDetl> getAsrsLocDetl(String matnr);
+
+ Integer countLocNoNum(String locNo);
+
+ // -------------------------------------------------
+
+ List<ManLocDetl> queryStock(@Param("matnr")String matnr, @Param("batch")String batch, @Param("orderNo")String orderNo, @Param("locNos") Set<String> locNos);
+
+ Double queryStockAnfme(String matnr, String batch);
+
+ List<StockVo> queryStockTotal();
+
+
+ Integer sum();
+
+ List<ManLocDetl> unreason();
+
+ Double selectLocDetlSumQty(String locNo);
+
+ int updateLocNo0(Long nodeId, String locNo);
+
+ ManLocDetl selectLocNo0(String locNo, String matnr);
+
+ List<ManLocDetl> selectItem0(String locNo, String matnr);
+
+ int deleteLocNo0(String locNo, String matnr);
+
+ int updateAnfme0(double anfme, Long nodeId);
+
+ List<ManLocDetl> listByOutPage(Map<String, Object> condition);
+
+ long listByOutPageCount(Map<String, Object> condition);
+
+ List<ManLocDetl> selectAllPage(Map<String, Object> condition);
+
+ long selectAllPageSize(Map<String, Object> condition);
+
+ ManLocDetl selectInventory(String LocNo, String Matnr, String batch);
+
+ int deleteDatailed (String locNo, String matnr,String batch);
+
+ int increase(Double anfme,String locNo, String matnr,String batch,Double weight);
+}
diff --git a/src/main/java/com/zy/asrs/mapper/NodeMapper.java b/src/main/java/com/zy/asrs/mapper/NodeMapper.java
new file mode 100644
index 0000000..cca9d62
--- /dev/null
+++ b/src/main/java/com/zy/asrs/mapper/NodeMapper.java
@@ -0,0 +1,20 @@
+package com.zy.asrs.mapper;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.zy.asrs.entity.Node;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+@Repository
+public interface NodeMapper extends BaseMapper<Node> {
+ Node selectByUuid(@Param("uuid") String uuid, @Param("hostId") Long hostId);
+
+ List<Node> listByPage(Map<String, Object> map);
+
+ Integer listByPageCount(Map<String, Object> map);
+}
diff --git a/src/main/java/com/zy/asrs/service/AgvLocDetlService.java b/src/main/java/com/zy/asrs/service/AgvLocDetlService.java
index eb52bf6..301da48 100644
--- a/src/main/java/com/zy/asrs/service/AgvLocDetlService.java
+++ b/src/main/java/com/zy/asrs/service/AgvLocDetlService.java
@@ -11,7 +11,7 @@
public void addLocDetlInfo(String locNo, int taskCode);
- public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued);
+ public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq);
public void updateStock(String sourceLoc, String targetLoc);
diff --git a/src/main/java/com/zy/asrs/service/LocDetlService.java b/src/main/java/com/zy/asrs/service/LocDetlService.java
index 62d7438..803ac71 100644
--- a/src/main/java/com/zy/asrs/service/LocDetlService.java
+++ b/src/main/java/com/zy/asrs/service/LocDetlService.java
@@ -52,7 +52,7 @@
List<LocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos);
- double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued);
+ double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq);
Double queryStockAnfme(String matnr, String batch);
diff --git a/src/main/java/com/zy/asrs/service/ManLocDetlService.java b/src/main/java/com/zy/asrs/service/ManLocDetlService.java
new file mode 100644
index 0000000..2cbf39f
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/ManLocDetlService.java
@@ -0,0 +1,72 @@
+package com.zy.asrs.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.baomidou.mybatisplus.service.IService;
+import com.zy.asrs.entity.ManLocDetl;
+import com.zy.asrs.entity.param.LocDetlAdjustParam;
+import com.zy.asrs.entity.result.StockVo;
+import com.zy.system.entity.User;
+
+import java.util.List;
+import java.util.Set;
+
+public interface ManLocDetlService extends IService<ManLocDetl> {
+ Page<ManLocDetl> getPage(Page<ManLocDetl> page);
+
+ ManLocDetl selectItem(String locNo, String matnr, String batch);
+
+ Page<ManLocDetl> getStockOut(Page<ManLocDetl> page);
+
+ /**
+ * 淇敼搴撳瓨鏄庣粏鏁伴噺锛屽鏋滄暟閲忎负0锛屽垯鍒犻櫎璁板綍
+ */
+ boolean updateAnfme(Double anfme, String locNo, String matnr, String batch);
+
+ boolean updateLocNo(String newLocNo, String oldLocNo);
+
+ /**
+ * 鑾峰彇褰撳ぉ鐩稿悓瑙勬牸璐х墿鐨勬繁搴撲綅鍙�
+ * @param matnr 鍟嗗搧缂栧彿
+ * @return locNo 搴撲綅鍙�
+ */
+ List<String> getSameDetlToday(String matnr, Integer start, Integer end);
+
+ Page<ManLocDetl> getStockStatis(Page<ManLocDetl> page);
+
+ Double getSumAnfme(String matnr);
+
+ List<ManLocDetl> selectPakoutByRule(String matnr);
+
+ List<ManLocDetl> getAsrsLocDetl(String matnr);
+
+ Integer countLocNoNum(String locNo);
+
+ // --------------------------------------------------
+
+ List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos);
+
+ Double queryStockAnfme(String matnr, String batch);
+
+ List<StockVo> queryStockTotal();
+
+
+ Integer sum();
+
+ List<ManLocDetl> unreason();
+
+ Double getLocDetlSumQty(String locNo);
+
+ Page<ManLocDetl> getOutPage(Page<ManLocDetl> manLocDetlPage);
+
+
+ void adjustLocDetl(LocDetlAdjustParam param, Long userId ,User user);
+
+ Page<ManLocDetl> selectAllPage(Page<ManLocDetl> param);
+
+ ManLocDetl selectInventory(String LocNo,String Matnr,String batch);
+
+ int deleteDatailed (String locNo, String matnr,String batch);
+
+ int increase(Double anfme,String locNo, String matnr,String batch,Double weight);
+
+}
diff --git a/src/main/java/com/zy/asrs/service/MobileService.java b/src/main/java/com/zy/asrs/service/MobileService.java
index 51e6c59..a5e1182 100644
--- a/src/main/java/com/zy/asrs/service/MobileService.java
+++ b/src/main/java/com/zy/asrs/service/MobileService.java
@@ -2,6 +2,7 @@
import com.zy.asrs.entity.param.CombParam;
import com.zy.asrs.entity.param.MobileAdjustParam;
+import com.zy.system.entity.User;
public interface MobileService {
@@ -17,4 +18,5 @@
void packComb(CombParam param, Long userId);
+ void nodePutway(String zpallet, String locNo, User user);
}
diff --git a/src/main/java/com/zy/asrs/service/NodeService.java b/src/main/java/com/zy/asrs/service/NodeService.java
new file mode 100644
index 0000000..ae259d8
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/NodeService.java
@@ -0,0 +1,32 @@
+package com.zy.asrs.service;
+
+import com.baomidou.mybatisplus.plugins.Page;
+import com.baomidou.mybatisplus.service.IService;
+import com.core.common.R;
+import com.zy.asrs.entity.Node;
+import com.zy.asrs.entity.param.InitPakoutParam;
+import com.zy.asrs.entity.param.PakinParam;
+import com.zy.system.entity.User;
+
+import java.util.List;
+
+public interface NodeService extends IService<Node> {
+
+ Node getTop();
+
+ Node selectByUuid(String uuid);
+
+ Node selectByUuid(String uuid, Long hostId);
+
+ Node selectByUuid(String uuid, Long hostId, Integer type);
+
+ Node selectByUuid(String uuid, Long hostId, Integer type, Long parentId);
+
+ R stockPakin(PakinParam number, Long userId, Long hostId, User user);
+
+ R initPakout(List<InitPakoutParam> params, Long userId, Long hostId,User user);
+
+ void locMove(String sourceLocNo, String targetLocNo, Long userId,User user);
+
+ Page<Node> getPage(Page<Node> page);
+}
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java
index 597f97d..c55a5d6 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvLocDetlServiceImpl.java
@@ -44,14 +44,25 @@
}
- public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued) {
+ public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq) {
//鏍规嵁鐗╂枡鍙峰拰鎵规鎵惧埌瀵瑰簲鐨勫簱瀛橈紝骞朵笖鎸夌収淇敼鏃堕棿鎺掑簭
Wrapper<AgvLocDetl> wrapper = new EntityWrapper<AgvLocDetl>().eq("matnr", matnr).orderBy("modi_time");
- if(Cools.isEmpty(batch)){
- wrapper.isNull("batch");
- }else {
- wrapper.eq("batch",batch);
- }
+
+ wapperSetCondition(wrapper,"batch",batch);
+ wapperSetCondition(wrapper,"three_code",csocode);
+ wapperSetCondition(wrapper,"dead_time",isoseq);
+
+// if(Cools.isEmpty(batch)){
+// wrapper.isNull("batch");
+// }else {
+// wrapper.eq("batch",batch);
+// }
+// if(!Cools.isEmpty(csocode)){
+// wrapper.eq("three_code",csocode);
+// }
+// if(Cools.isEmpty(isoseq)){
+// wrapper.eq("dead_time",isoseq);
+// }
List<AgvLocDetl> agvLocDetls = this.selectList(wrapper);
for (AgvLocDetl agvLocDetl: agvLocDetls) {
@@ -141,4 +152,12 @@
return agvStaNos;
}
+
+ private void wapperSetCondition(Wrapper wrapper,String column, String condition){
+ if(Cools.isEmpty(condition)){
+ wrapper.isNull(column);
+ }else {
+ wrapper.eq(column,condition);
+ }
+ }
}
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
index bf873fb..a8bf17a 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -122,10 +122,10 @@
checkOrderQty(order,combMat);
}
- DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme());
+ DetlDto detlDto = new DetlDto(combMat.getMatnr(), combMat.getBatch(), combMat.getAnfme(), combMat.getCsocode(), combMat.getIsoseq());
//鍚屼竴鎵樼洏涓嬬浉鍚岀墿鏂欎俊鎭拰鎵瑰彿杞负涓�涓叆搴撻�氱煡妗�
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
+ DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(), detlDto.getCsocode(), detlDto.getIsoseq(),null);
assert one != null;
one.setAnfme(one.getAnfme() + detlDto.getAnfme());
} else {
@@ -170,6 +170,13 @@
waitPakin.setIoStatus("N"); // 鍏ュ嚭鐘舵��
waitPakin.setAnfme(detlDto.getAnfme()); // 鏁伴噺
waitPakin.setStatus("Y"); // 鐘舵��
+
+ ////閿�鍞鍗曞彿
+ waitPakin.setThreeCode(detlDto.getCsocode());
+ //閿�鍞鍗曡鍙�
+ waitPakin.setDeadTime(detlDto.getIsoseq());
+
+
waitPakin.setAppeUser(userId);
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
index faa8d95..75991c2 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
@@ -84,7 +84,7 @@
//鐢熸垚宸ヤ綔妗f槑缁�
//createWrkDetlReWrite(agvWaitPakinList,wrkMast,userId);
agvWaitPakinList.forEach(wp -> {
- createWrkDetlReWrite(wp.getMatnr(),wrkMast.getWrkNo(),wp.getOrderNo(),wp.getBatch(),wp.getAnfme(),wp.getZpallet(),now,userId);
+ createWrkDetlReWrite(wp.getMatnr(),wrkMast.getWrkNo(),wp.getOrderNo(),wp.getBatch(),wp.getAnfme(),wp.getZpallet(),now,userId,wp.getThreeCode(),wp.getDeadTime());
});
//鏇存柊婧愮珯鐐逛俊鎭�
updateAgvBasDevp(agvBasDevp,"R");
@@ -120,12 +120,15 @@
String orderNo = taskDto.getLocDtos().get(0).getOrderNo();
String batch = taskDto.getLocDtos().get(0).getBatch();
+ String csocode = agvLocDetl.getThreeCode();
+ String isoseq = agvLocDetl.getDeadTime();
+
//鍒ゆ柇鏄惁鍏ㄦ澘鍑哄簱
int ioType = isPakOut(sourceLocNo,anfme) ? 101 : 103;
//鐢熸垚宸ヤ綔妗�
AgvWrkMast wrkMast = createWrkMast(ioType,wrkSts,sourceLocNo,targetLocNo,barcode,now,userId);
//鐢熸垚宸ヤ綔妗f槑缁�
- createWrkDetlReWrite(mantr,wrkMast.getWrkNo(),orderNo,batch,anfme,barcode,now,userId);
+ createWrkDetlReWrite(mantr,wrkMast.getWrkNo(),orderNo,batch,anfme,barcode,now,userId,csocode,isoseq);
//淇敼璁㈠崟淇℃伅
modifyOrderDetl(taskDto.getLocDtos().get(0), userId);
//鏇存柊婧愮珯鐐逛俊鎭�
@@ -203,7 +206,7 @@
//鐢熸垚宸ヤ綔鍏�
AgvWrkMast wrkMast = createWrkMast(107, 21L, locDetl.getLocNo(), agvBasDevp.getDevNo(), agvLocDetl.getZpallet(), now, userId);
//鐢熸垚宸ヤ綔鏄庣粏妗�
- createWrkDetlReWrite(locDetl.getMatnr(),wrkMast.getWrkNo(),null,locDetl.getBatch(),locDetl.getCount(),wrkMast.getBarcode(),now,userId);
+ createWrkDetlReWrite(locDetl.getMatnr(),wrkMast.getWrkNo(),null,locDetl.getBatch(),locDetl.getCount(),wrkMast.getBarcode(),now,userId,agvLocDetl.getThreeCode(),agvLocDetl.getDeadTime());
//淇敼搴撲綅淇℃伅
updateAgvLocMast(agvLocMast,"P");
//淇敼绔欑偣淇℃伅
@@ -233,7 +236,7 @@
//鐢熸垚绉诲簱宸ヤ綔妗�
AgvWrkMast wrkMast = createWrkMast(11, 21L, sourceLocNo, targetLocNo, sourceLocDetl.getZpallet(), now, userId);
//鐢熸垚宸ヤ綔鍏氭槑缁�
- createWrkDetlReWrite(sourceLocDetl.getMatnr(),wrkMast.getWrkNo(),null,sourceLocDetl.getBatch(),sourceLocDetl.getAnfme(),sourceLocDetl.getZpallet(),now,userId);
+ createWrkDetlReWrite(sourceLocDetl.getMatnr(),wrkMast.getWrkNo(),null,sourceLocDetl.getBatch(),sourceLocDetl.getAnfme(),sourceLocDetl.getZpallet(),now,userId,sourceLocDetl.getThreeCode(),sourceLocDetl.getDeadTime());
//淇敼鐩爣搴撲綅鐘舵��
updateAgvLocMast(targetLocMast,"S");
//淇敼鍘熷簱浣嶇姸鎬�
@@ -312,7 +315,7 @@
/*
鐢熸垚宸ヤ綔妗f槑缁�
*/
- private void createWrkDetlReWrite(String matnr, int wrkNo, String orderNo,String batch, double anfme, String zpallet, Date now, Long userId){
+ private void createWrkDetlReWrite(String matnr, int wrkNo, String orderNo,String batch, double anfme, String zpallet, Date now, Long userId, String csocode, String isoseq){
Mat mat = matService.selectByMatnr(matnr);
if (Cools.isEmpty(mat)) {
throw new CoolException(matnr + "鍟嗗搧缁存姢澶辫触");
@@ -329,6 +332,9 @@
wrkDetl.setAppeTime(now);
wrkDetl.setModiUser(userId);
wrkDetl.setModiTime(now);
+
+ wrkDetl.setThreeCode(csocode);
+ wrkDetl.setDeadTime(isoseq);
if (!agvWrkDetlService.insert(wrkDetl)) {
throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触");
}
diff --git a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
index 3ab967b..8ceecf8 100644
--- a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java
@@ -100,13 +100,16 @@
}
//鍑哄簱
- public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued) {
+ public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq) {
Wrapper<LocDetl> wrapper = new EntityWrapper<LocDetl>().eq("matnr", matnr).orderBy("modi_time");
- if(Cools.isEmpty(batch)){
- wrapper.isNull("batch");
- }else {
- wrapper.eq("batch",batch);
- }
+ wapperSetCondition(wrapper,"batch",batch);
+ wapperSetCondition(wrapper,"three_code",csocode);
+ wapperSetCondition(wrapper,"dead_time",isoseq);
+// if(Cools.isEmpty(batch)){
+// wrapper.isNull("batch");
+// }else {
+// wrapper.eq("batch",batch);
+// }
List<LocDetl> locDetlList = this.selectList(wrapper);
for (LocDetl locDetl : locDetlList) {
@@ -178,4 +181,12 @@
public int updateStockFreeze(String matnr, String locNo, Integer stockFreeze) {
return this.baseMapper.updateStockFreeze(matnr, locNo, stockFreeze);
}
+
+ private void wapperSetCondition(Wrapper wrapper,String column, String condition){
+ if(Cools.isEmpty(condition)){
+ wrapper.isNull(column);
+ }else {
+ wrapper.eq(column,condition);
+ }
+ }
}
diff --git a/src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java
new file mode 100644
index 0000000..c9af0a1
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java
@@ -0,0 +1,203 @@
+package com.zy.asrs.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.core.exception.CoolException;
+import com.zy.asrs.entity.ManLocDetl;
+import com.zy.asrs.entity.Mat;
+import com.zy.asrs.entity.Node;
+import com.zy.asrs.entity.param.LocDetlAdjustParam;
+import com.zy.asrs.entity.result.StockVo;
+import com.zy.asrs.mapper.ManLocDetlMapper;
+import com.zy.asrs.service.ManLocDetlService;
+import com.zy.asrs.service.MatService;
+import com.zy.asrs.service.NodeService;
+import com.zy.asrs.service.WaitPakinService;
+import com.zy.asrs.utils.SaasUtils;
+import com.zy.system.entity.User;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+@Service("manLocDetlService")
+public class ManLocDetlServiceImpl extends ServiceImpl<ManLocDetlMapper, ManLocDetl> implements ManLocDetlService {
+ @Autowired
+ private MatService matService;
+ @Autowired
+ private NodeService nodeService;
+ @Autowired
+ private WaitPakinService waitPakinService;
+
+ @Override
+ public Page<ManLocDetl> getPage(Page<ManLocDetl> page) {
+ Map<String, Object> condition = page.getCondition();
+ List<ManLocDetl> manLocDetls = baseMapper.listByPage(condition);
+ page.setRecords(manLocDetls);
+ page.setTotal(baseMapper.listByPageCount(page.getCondition()));
+ return page;
+ }
+
+ @Override
+ public Page<ManLocDetl> getStockOut(Page<ManLocDetl> page) {
+ page.setRecords(baseMapper.getStockOutPage(page.getCondition()));
+ page.setTotal(baseMapper.getStockOutPageCount(page.getCondition()));
+ return page;
+ }
+
+ @Override
+ public boolean updateAnfme(Double anfme, String locNo, String matnr, String batch) {
+ if (anfme <= 0) {
+ return this.baseMapper.deleteItem(locNo, matnr, batch) > 0;
+ } else {
+ return baseMapper.updateAnfme(anfme, locNo, matnr, batch) > 0;
+ }
+ }
+
+
+ @Override
+ public boolean updateLocNo(String newLocNo, String oldLocNo) {
+ return baseMapper.updateLocNo(newLocNo, oldLocNo) > 0;
+ }
+
+ @Override
+ public List<String> getSameDetlToday(String matnr, Integer start, Integer end) {
+ return this.baseMapper.selectSameDetlToday(matnr, start, end);
+ }
+
+
+ @Override
+ public Page<ManLocDetl> getStockStatis(Page<ManLocDetl> page) {
+ page.setRecords(baseMapper.getStockStatis(page.getCondition()));
+ page.setTotal(baseMapper.getStockStatisCount(page.getCondition()));
+ return page;
+ }
+
+ @Override
+ public Double getSumAnfme(String matnr) {
+ return this.baseMapper.selectSumAnfmeByMatnr(matnr);
+ }
+
+ @Override
+ public List<ManLocDetl> selectPakoutByRule(String matnr) {
+ return this.baseMapper.selectPakoutByRule(matnr);
+ }
+
+ @Override
+ public List<ManLocDetl> getAsrsLocDetl(String matnr) {
+ return this.baseMapper.getAsrsLocDetl(matnr);
+ }
+
+ @Override
+ public Integer countLocNoNum(String locNo) {
+ return this.baseMapper.countLocNoNum(locNo);
+ }
+
+ @Override
+ public List<ManLocDetl> queryStock(String matnr, String batch, String orderNo, Set<String> locNos) {
+ return this.baseMapper.queryStock(matnr, batch, orderNo, locNos);
+ }
+
+ @Override
+ public Double queryStockAnfme(String matnr, String batch) {
+ return this.baseMapper.queryStockAnfme(matnr, batch);
+ }
+
+ @Override
+ public List<StockVo> queryStockTotal() {
+ return this.baseMapper.queryStockTotal();
+ }
+
+ /**
+ * 鑾峰彇搴撳瓨鎬绘暟
+ *
+ * @return
+ */
+ @Override
+ public Integer sum() {
+
+ return this.baseMapper.sum();
+ }
+
+ @Override
+ public List<ManLocDetl> unreason() {
+ return this.baseMapper.unreason();
+ }
+
+
+ @Override
+ public ManLocDetl selectItem(String locNo, String matnr, String batch) {
+ return this.baseMapper.selectItem(locNo, matnr, batch);
+ }
+
+ @Override
+ public Double getLocDetlSumQty(String locNo) {
+ return this.baseMapper.selectLocDetlSumQty(locNo);
+ }
+
+ @Override
+ public Page<ManLocDetl> getOutPage(Page<ManLocDetl> manLocDetlPage) {
+ Map<String, Object> condition = manLocDetlPage.getCondition();
+ List<ManLocDetl> manLocDetls = baseMapper.listByOutPage(condition);
+ manLocDetlPage.setRecords(manLocDetls);
+ manLocDetlPage.setTotal(baseMapper.listByOutPageCount(manLocDetlPage.getCondition()));
+ return manLocDetlPage;
+ }
+
+ @Transactional
+ @Override
+ public void adjustLocDetl(LocDetlAdjustParam param, Long userId, User user) {
+ Date now = new Date();
+ for (LocDetlAdjustParam.LocDetlAdjust locDetlAdjust : param.getList()) {
+ ManLocDetl manLocDetl = this.baseMapper.selectItem(param.getLocNo(), locDetlAdjust.getMatnr(), locDetlAdjust.getBatch());
+ this.baseMapper.delete(new EntityWrapper<ManLocDetl>()
+ .eq("loc_no", param.getLocNo()).eq("matnr",locDetlAdjust.getMatnr()));
+ Mat mat = matService.selectOne(new EntityWrapper<Mat>()
+ .eq("matnr", locDetlAdjust.getMatnr()));
+ if (mat == null) {
+ throw new CoolException("鏃犳硶鎵惧埌闇�瑕佽皟鏁寸殑鐗╂枡,璇疯仈绯荤鐞嗗憳");
+ }
+ Node node = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("uuid", param.getLocNo()));
+ if (node == null) {
+ throw new CoolException("鏃犳硶鎵惧埌闇�瑕佽皟鏁寸殑搴撲綅,璇疯仈绯荤鐞嗗憳");
+
+ }
+ manLocDetl.setAnfme(locDetlAdjust.getCount());
+ manLocDetl.setUpdateBy(userId);
+ manLocDetl.setModiTime(now);
+ SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername());
+ this.baseMapper.insert(manLocDetl);
+ }
+ }
+
+ @Override
+ public Page<ManLocDetl> selectAllPage(Page<ManLocDetl> param) {
+ Map<String, Object> condition = param.getCondition();
+ List<ManLocDetl> manLocDetls = baseMapper.selectAllPage(condition);
+ param.setRecords(manLocDetls);
+ param.setTotal(baseMapper.selectAllPageSize(condition));
+ return param;
+ }
+
+ @Override
+ public ManLocDetl selectInventory(String LocNo, String Matnr, String batch) {
+ return baseMapper.selectInventory(LocNo,Matnr,batch);
+ }
+
+ @Override
+ public int deleteDatailed(String locNo, String matnr, String batch) {
+ return baseMapper.deleteDatailed(locNo,matnr,batch);
+ }
+
+ @Override
+ public int increase(Double anfme,String locNo, String matnr, String batch,Double weight) {
+ return baseMapper.increase(anfme,locNo,matnr,batch,weight);
+ }
+
+}
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 74ac54a..fd8233c 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -16,12 +16,15 @@
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.WorkLogHandler;
import com.zy.asrs.utils.MatUtils;
+import com.zy.asrs.utils.SaasUtils;
import com.zy.common.constant.MesConstant;
import com.zy.common.entity.Parameter;
import com.zy.common.model.DetlDto;
import com.zy.common.model.MesCombParam;
import com.zy.common.utils.HttpHandler;
+import com.zy.system.entity.User;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -63,6 +66,10 @@
private ApiLogService apiLogService;
@Autowired
private WorkLogHandler workLogHandler;
+ @Autowired
+ private ManLocDetlService manLocDetlService;
+ @Autowired
+ private WaitPakinLogService waitPakinLogService;
@Override
@Transactional
@@ -93,9 +100,11 @@
// 鐢熸垚鍏ュ簱閫氱煡妗�
List<DetlDto> detlDtos = new ArrayList<>();
param.getCombMats().forEach(elem -> {
- DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getCsocode(), elem.getIsoseq());
+ detlDto.setContainerCode(elem.getContainerCode());
+
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
+ DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode());
assert one != null;
one.setAnfme(one.getAnfme() + detlDto.getAnfme());
} else {
@@ -120,6 +129,10 @@
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
waitPakin.setModiTime(now);
+
+ waitPakin.setThreeCode(detlDto.getCsocode());
+ waitPakin.setDeadTime(detlDto.getIsoseq());
+ waitPakin.setSuppCode(detlDto.getContainerCode());
if (!waitPakinService.insert(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
@@ -144,9 +157,11 @@
throw new CoolException("淇敼鍗曟嵁鏄庣粏鏁伴噺澶辫触");
}
- DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(),elem.getCsocode(),elem.getIsoseq());
+ detlDto.setContainerCode(elem.getContainerCode());
+
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
+ DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode());
assert one != null;
one.setAnfme(one.getAnfme() + detlDto.getAnfme());
} else {
@@ -170,6 +185,11 @@
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
waitPakin.setModiTime(now);
+
+ waitPakin.setThreeCode(detlDto.getCsocode());
+ waitPakin.setDeadTime(detlDto.getIsoseq());
+ waitPakin.setSuppCode(detlDto.getContainerCode());
+
if (!waitPakinService.insert(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
@@ -290,10 +310,12 @@
}
Mat analyse = MatUtils.analyseMat(elem.getMatnr());
// 鏉$爜銆佺墿鏂欎唬鐮併�佸簭鍒楀彿銆佹暟閲�
- DetlDto detlDto = new DetlDto(elem.getMatnr(), analyse.getMatnr(), analyse.getBarcode(), elem.getAnfme());
+ DetlDto detlDto = new DetlDto(elem.getMatnr(), analyse.getMatnr(), analyse.getBarcode(), elem.getAnfme(),elem.getCsocode(),elem.getIsoseq());
// DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ detlDto.setContainerCode(elem.getContainerCode());
+
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
+ DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode());
assert one != null;
one.setAnfme(one.getAnfme() + detlDto.getAnfme());
} else {
@@ -398,6 +420,10 @@
waitPakin.setAppeTime(now);
waitPakin.setModiUser(userId);
waitPakin.setModiTime(now);
+
+ waitPakin.setThreeCode(detlDto.getCsocode());
+ waitPakin.setDeadTime(detlDto.getIsoseq());
+ waitPakin.setSuppCode(detlDto.getContainerCode());
if (!waitPakinService.insert(waitPakin)) {
throw new CoolException("淇濆瓨鍏ュ簱閫氱煡妗eけ璐�");
}
@@ -414,4 +440,53 @@
}
}
+ @Transactional
+ public void nodePutway(String zpallet, String locNo, User user) {
+ Date now = new Date();
+
+ //澧炲姞骞冲簱搴撳瓨
+ List<WaitPakin> waitPakinList = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", zpallet));
+ waitPakinList.forEach(waitPakin -> {
+
+ //鏂欐兂鐮�
+ String containerCode = waitPakin.getSuppCode();
+ //濡傛灉褰撳墠鏂欐兂鐮佸凡瀛樺湪锛屽垯淇敼璇ユ枡鎯崇殑鐗╂枡鏁伴噺
+ ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>().eq("container_code", containerCode));
+ if(Cools.isEmpty(manLocDetl)){
+ saveManlocDetl(manLocDetl,waitPakin,now,locNo);
+ }else{
+ if(Cools.eq(manLocDetl.getMatnr(),waitPakin.getMatnr())
+ && Cools.eq(manLocDetl.getCsocode(),waitPakin.getThreeCode())
+ && Cools.eq(manLocDetl.getIsoseq(),waitPakin.getDeadTime())){
+ manLocDetl.setAnfme(manLocDetl.getAnfme() + waitPakin.getAnfme());
+ manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>()
+ .eq("loc_no",manLocDetl.getLocNo())
+ .eq("container_code",manLocDetl.getContainerCode()));
+ }else{
+ saveManlocDetl(manLocDetl,waitPakin,now,locNo);
+ }
+ }
+ //鐢熸垚骞冲簱鍏ュ嚭搴撴棩蹇�
+ SaasUtils.insertLog(0,locNo,waitPakin.getMatnr(), waitPakin.getAnfme(),user.getUsername());
+
+ });
+ //鐢熸垚鍏ュ簱閫氱煡鍘嗗彶妗�
+ waitPakinLogService.save(zpallet);
+ //鍒犻櫎鍏ュ簱閫氱煡妗�
+ waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet", zpallet));
+
+ }
+
+ private void saveManlocDetl(ManLocDetl manLocDetl, WaitPakin waitPakin, Date now, String locNo){
+ manLocDetl = new ManLocDetl();
+ BeanUtils.copyProperties(waitPakin,manLocDetl);
+ manLocDetl.setContainerCode(waitPakin.getSuppCode());
+ manLocDetl.setCsocode(waitPakin.getThreeCode());
+ manLocDetl.setIsoseq(waitPakin.getDeadTime());
+ manLocDetl.setCreateTime(now);
+ manLocDetl.setModiTime(now);
+ manLocDetl.setLocNo(locNo);
+ manLocDetlService.insert(manLocDetl);
+ }
+
}
diff --git a/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
new file mode 100644
index 0000000..8cbfb19
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
@@ -0,0 +1,227 @@
+package com.zy.asrs.service.impl;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.plugins.Page;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.core.common.Cools;
+import com.core.common.R;
+import com.core.common.SnowflakeIdWorker;
+import com.core.exception.CoolException;
+import com.zy.asrs.entity.ManLocDetl;
+import com.zy.asrs.entity.Mat;
+import com.zy.asrs.entity.Node;
+import com.zy.asrs.entity.OrderDetl;
+import com.zy.asrs.entity.param.InitPakoutParam;
+import com.zy.asrs.entity.param.MatnrDto;
+import com.zy.asrs.entity.param.PakinParam;
+import com.zy.asrs.mapper.NodeMapper;
+import com.zy.asrs.service.*;
+import com.zy.asrs.utils.SaasUtils;
+import com.zy.system.entity.User;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Service("nodeService")
+public class NodeServiceImpl extends ServiceImpl<NodeMapper, Node> implements NodeService {
+ @Autowired
+ private NodeService nodeService;
+ @Autowired
+ private MatService matService;
+ @Autowired
+ private SnowflakeIdWorker snowflakeIdWorker;
+ @Autowired
+ private ManLocDetlService manLocDetlService;
+ @Autowired
+ private OrderDetlService orderDetlService;
+ @Autowired
+ private OrderService orderService;
+ @Override
+ public Node getTop() {
+ Node top = this.selectOne(new EntityWrapper<Node>().eq("type", 0).eq("level", 0));
+ if (top == null) {
+ top = new Node();
+ top.setName("鍏ㄩ儴");
+ top.setUuid("鍏ㄩ儴");
+ top.setType(0);
+ top.setLevel(0);
+ top.setSort(0);
+ top.setStatus(1);
+ top.setCreateTime(new Date());
+ top.setUpdateTime(new Date());
+ Integer insert = this.baseMapper.insert(top);
+ if (insert == 0) {
+ throw new CoolException("鏈嶅姟鍣ㄥ紓甯�");
+ }
+ }
+ return top;
+ }
+
+ @Override
+ public Node selectByUuid(String uuid) {
+ return selectOne(new EntityWrapper<Node>().eq("uuid", uuid));
+ }
+
+ @Override
+ public Node selectByUuid(String uuid, Long hostId) {
+ return this.baseMapper.selectByUuid(uuid, hostId);
+ }
+
+ @Override
+ public Node selectByUuid(String uuid, Long hostId, Integer type) {
+ return selectOne(new EntityWrapper<Node>().eq("host_id", hostId).eq("uuid", uuid).eq("type", type));
+ }
+
+ @Override
+ public Node selectByUuid(String uuid, Long hostId, Integer type, Long parentId) {
+ return selectOne(new EntityWrapper<Node>().eq("host_id", hostId).eq("uuid", uuid).eq("type", type).eq("parent_id", parentId));
+ }
+
+ @Override
+ public R stockPakin(PakinParam param, Long userId, Long hostId, User user) {
+ Node node = nodeService.selectByUuid(param.getNodeId(), hostId);
+ if (node == null) {
+ node = nodeService.selectById(param.getNodeId());
+ }
+ if (node == null) {
+ return R.error("璐т綅涓嶅瓨鍦�");
+ }
+ if (Cools.isEmpty(param.getMats())) {
+ return R.error("鍏ュ簱鐗╂枡涓嶈兘涓虹┖");
+ }
+ Date now = new Date();
+ for (MatnrDto dto : param.getMats()) {
+
+ Mat mat = matService.selectByMatnr(dto.getMatnr());
+ if (mat == null) {
+ throw new CoolException("鐗╂枡鏁版嵁閿欒锛岃鑱旂郴绠$悊鍛�");
+ }
+ ManLocDetl check = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>()
+ .eq("loc_no", node.getUuid())
+ .eq("matnr", dto.getMatnr()));
+ if (check == null) {
+ ManLocDetl manLocDetl = new ManLocDetl();
+ manLocDetl.setLocNo(node.getUuid());
+ manLocDetl.setNodeId(node.getId());
+ manLocDetl.setZpallet(node.getUuid());
+ manLocDetl.setAnfme(dto.getCount());
+ manLocDetl.setMatnr(mat.getMatnr());
+ manLocDetl.setMaktx(mat.getMaktx());
+ manLocDetl.setName(mat.getName());
+ manLocDetl.setBatch(null);
+ manLocDetl.setSpecs(mat.getSpecs());
+ manLocDetl.setModel(mat.getModel());
+ manLocDetl.setCreateTime(now);
+ manLocDetl.setModiTime(now);
+ manLocDetl.setCreateBy(userId);
+ manLocDetl.setStatus(1);
+ manLocDetl.setPayment(1);
+ SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername());
+ manLocDetlService.insert(manLocDetl);
+ }else {
+// check.setAnfme(dto.getCount() + check.getAnfme());
+// manLocDetlService.update(check,new EntityWrapper<ManLocDetl>()
+// .eq("loc_no", node.getUuid())
+// .eq("matnr", dto.getMatnr()));
+ return R.error("搴撲綅瀛樺湪鐗╂枡锛岃鍕块噸澶嶅叆搴�");
+ }
+ if (!Cools.isEmpty(dto.getOrderNo())) {
+ OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>()
+ .eq("order_no", dto.getOrderNo())
+ .eq("matnr", dto.getMatnr()));
+ orderDetl.setQty(orderDetl.getQty() + dto.getCount());
+ orderDetlService.updateById(orderDetl);
+ //orderService.checkSettleUpdate(orderDetl.getOrderId());
+ }
+ }
+ return R.ok("鍏ュ簱鎴愬姛");
+ }
+
+ @Transactional
+ @Override
+ public R initPakout(List<InitPakoutParam> params, Long userId, Long hostId,User user) {
+ if (!Cools.isEmpty(params)) {
+ Date now = new Date();
+ for (InitPakoutParam param : params) {
+ ManLocDetl manLocDetl = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>()
+ .eq("node_id", param.getNodeId())
+ .eq("matnr", param.getMatnr()));
+ Node node = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("id", param.getNodeId()));
+ if (node == null) {
+ return R.error("鎵句笉鍒拌搴撲綅,璇疯仈绯荤鐞嗗憳:" + param.getNodeId() );
+ }
+ if (manLocDetl == null) {
+ return R.error("鐗╂枡:"+ param.getMatnr() + " 鍦ㄥ簱浣嶄腑涓嶅瓨鍦�");
+ }
+ if (manLocDetl.getAnfme() - param.getCount() < 0) {
+ return R.error("鐗╂枡:"+ param.getMatnr() + " 鍦ㄥ簱浣嶄腑鏁伴噺涓嶈冻");
+ } else if (manLocDetl.getAnfme() - param.getCount() == 0) {
+ SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername());
+ manLocDetlService.delete(new EntityWrapper<ManLocDetl>()
+ .eq("loc_no",node.getUuid())
+ .eq("matnr",param.getMatnr()));
+ } else {
+
+ manLocDetl.setAnfme(manLocDetl.getAnfme() - param.getCount());
+ manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>()
+ .eq("loc_no",node.getUuid())
+ .eq("matnr",param.getMatnr()));
+ SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername());
+ }
+ }
+ }
+ return R.ok("鍑哄簱鎴愬姛");
+ }
+
+ @Transactional
+ @Override
+ public void locMove(String sourceLocNo, String targetLocNo, Long userId,User user) {
+ List<ManLocDetl> sourceManDetl = manLocDetlService.selectList(new EntityWrapper<ManLocDetl>()
+ .eq("loc_no", sourceLocNo));
+ for (ManLocDetl source : sourceManDetl) {
+ Node targetNode = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("uuid", targetLocNo));
+ Node sourceNode = nodeService.selectOne(new EntityWrapper<Node>()
+ .eq("uuid", sourceLocNo));
+ if (targetNode == null || targetNode.equals("")) {
+ throw new RuntimeException("鏃犳硶鏌ヨ鍒扮Щ搴撶殑鐩爣搴撲綅");
+ }
+ ManLocDetl check = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>()
+ .eq("loc_no", targetNode.getUuid())
+ .eq("matnr", source.getMatnr()));
+ if (check == null) {
+ manLocDetlService.delete(new EntityWrapper<ManLocDetl>().eq("loc_no", source.getLocNo())
+ .eq("matnr", source.getMatnr()));
+ source.setLocNo(targetNode.getUuid());
+ source.setNodeId(targetNode.getId());
+
+ SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme(),user.getUsername());
+ manLocDetlService.insert(source);
+ }else {
+// check.setAnfme(check.getAnfme() + source.getAnfme());
+// manLocDetlService.update(check,new EntityWrapper<ManLocDetl>()
+// .eq("loc_no", targetNode.getUuid())
+// .eq("matnr", check.getMatnr()));
+// manLocDetlService.delete(new EntityWrapper<ManLocDetl>()
+// .eq("loc_no", sourceNode.getUuid())
+// .eq("matnr", source.getMatnr()));
+ throw new RuntimeException("鐩爣搴撲綅鏈夌墿");
+ }
+
+ }
+ }
+
+ @Override
+ public Page<Node> getPage(Page<Node> page) {
+ Map<String, Object> condition = page.getCondition();
+ List<Node> manLocDetls = baseMapper.listByPage(condition);
+ page.setRecords(manLocDetls);
+ page.setTotal(baseMapper.listByPageCount(page.getCondition()));
+ return page;
+ }
+}
diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
index 19cd7bc..cbb903c 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -116,7 +116,7 @@
for (DetlDto detail : orderDetails) {
DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme());
if (DetlDto.has(list, dto)) {
- DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch());
+ DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch(),dto.getCsocode(),dto.getIsoseq(),null);
assert detlDto != null;
detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme());
} else {
@@ -161,7 +161,7 @@
result.setOrderType(order.getDocType$());
List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId());
for (OrderDetl orderDetl : orderDetls) {
- result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
+ //result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
}
if (order.getSettle() == 4L) {
// 淇敼璁㈠崟鐘舵�� 4.瀹屾垚 ===>> 6.宸蹭笂鎶�
@@ -181,7 +181,7 @@
result.setOrderType(order.getDocType$());
List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId());
for (OrderDetl orderDetl : orderDetls) {
- result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
+ //result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
}
// 淇敼璁㈠崟鐘舵�� 4.瀹屾垚 ===>> 6.宸蹭笂鎶�
if (!orderService.updateSettle(order.getId(), 6L, null)) {
@@ -251,7 +251,7 @@
for (DetlDto detail : orderDetails) {
DetlDto dto = new DetlDto(detail.getMatnr(), detail.getBatch(), detail.getAnfme());
if (DetlDto.has(list, dto)) {
- DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch());
+ DetlDto detlDto = DetlDto.find(list, dto.getMatnr(), dto.getBatch(),dto.getCsocode(),dto.getIsoseq(),null);
assert detlDto != null;
detlDto.setAnfme(detlDto.getAnfme() + detail.getAnfme());
} else {
@@ -295,7 +295,7 @@
result.setOrderType(order.getDocType$());
List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId());
for (OrderDetl orderDetl : orderDetls) {
- result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
+ //result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
}
if (order.getSettle() == 4L) {
// 淇敼璁㈠崟鐘舵�� 4.瀹屾垚 ===>> 6.宸蹭笂鎶�
@@ -315,7 +315,7 @@
result.setOrderType(order.getDocType$());
List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId());
for (OrderDetl orderDetl : orderDetls) {
- result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
+ //result.getOrderDetails().add(new DetlDto(orderDetl.getOrderNo(), orderDetl.getMatnr(), orderDetl.getBatch(), orderDetl.getQty()));
}
// 淇敼璁㈠崟鐘舵�� 4.瀹屾垚 ===>> 6.宸蹭笂鎶�
if (!orderService.updateSettle(order.getId(), 6L, null)) {
@@ -532,8 +532,9 @@
List<DetlDto> detlDtos = new ArrayList<>();
param.getCombMats().forEach(elem -> {
DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ detlDto.setContainerCode(elem.getContainerCode());
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
+ DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode());
assert one != null;
one.setAnfme(one.getAnfme() + detlDto.getAnfme());
} else {
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index d5b8dd5..8e78cae 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -124,9 +124,10 @@
// 鐢熸垚宸ヤ綔妗f槑缁�
List<DetlDto> detlDtos = new ArrayList<>();
param.getList().forEach(elem -> {
- DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
+ DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getCsocode(), elem.getIsoseq());
+ detlDto.setContainerCode(elem.getContainerCode());
if (DetlDto.has(detlDtos, detlDto)) {
- DetlDto detlDto1 = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
+ DetlDto detlDto1 = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode());
assert detlDto1 != null;
detlDto1.setAnfme(detlDto1.getAnfme() + detlDto.getAnfme());
} else {
@@ -821,6 +822,12 @@
adjDetl.setModiUser(userId);
adjDetl.setAppeTime(now);
adjDetl.setAppeUser(userId);
+
+ UUID uuid = UUID.randomUUID();
+ adjDetl.setOrderNo(uuid.toString());
+ adjDetl.setCsocode(locDetl.getThreeCode());
+ adjDetl.setIsoseq(locDetl.getDeadTime());
+
adjDetlService.save(adjDetl, userId);
}
iterator.remove();
@@ -846,6 +853,7 @@
adjDetl.setModiUser(userId);
adjDetl.setAppeTime(now);
adjDetl.setAppeUser(userId);
+
adjDetlService.save(adjDetl, userId);
}
@@ -862,6 +870,8 @@
locDetl.setModiTime(now);
locDetl.setAppeUser(userId);
locDetl.setAppeTime(now);
+ locDetl.setThreeCode(adjust.getThreeCode());
+ locDetl.setDeadTime(adjust.getDeadTime());
if (!locDetlService.insert(locDetl)) {
throw new CoolException("娣诲姞" + locDetl.getLocNo() + "搴撲綅锛�" + locDetl.getMatnr() + "鍟嗗搧锛�" + locDetl.getBatch() + "搴忓垪鐮佸簱瀛樻槑缁嗗け璐�");
}
@@ -876,6 +886,12 @@
adjDetl.setModiUser(userId);
adjDetl.setAppeTime(now);
adjDetl.setAppeUser(userId);
+
+ UUID uuid = UUID.randomUUID();
+ adjDetl.setOrderNo(uuid.toString());
+ adjDetl.setCsocode(locDetl.getThreeCode());
+ adjDetl.setIsoseq(locDetl.getDeadTime());
+
adjDetlService.save(adjDetl, userId);
}
// 淇敼搴撲綅鐘舵��
diff --git a/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java
index 47bede0..89c9603 100644
--- a/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java
@@ -46,6 +46,10 @@
wrkDetl.setAppeTime(now);
wrkDetl.setModiUser(userId);
wrkDetl.setModiTime(now);
+
+ wrkDetl.setThreeCode(dto.getCsocode());
+ wrkDetl.setDeadTime(dto.getIsoseq());
+ wrkDetl.setSuppCode(dto.getContainerCode());
if (!this.insert(wrkDetl)) {
throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触");
}
diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
index c49c3ec..c19448b 100644
--- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -64,7 +64,7 @@
agvWrkMastService.deleteById(wrkNo);
//鍒犻櫎AGV宸ヤ綔鏄庣粏妗�
agvWrkDetlService.delete(new EntityWrapper<AgvWrkDetl>().eq("wrk_no",wrkNo));
- //绫诲瀷涓哄嚭搴撴椂
+ //绫诲瀷涓哄叆搴撴椂
if(agvWrkMast.getIoType() == 1){
//鏇存柊鐩爣搴撲綅鏄庣粏
agvLocDetlService.addLocDetlInfo(agvWrkMast.getLocNo(),wrkNo);
diff --git a/src/main/java/com/zy/asrs/utils/SaasUtils.java b/src/main/java/com/zy/asrs/utils/SaasUtils.java
new file mode 100644
index 0000000..40589f4
--- /dev/null
+++ b/src/main/java/com/zy/asrs/utils/SaasUtils.java
@@ -0,0 +1,22 @@
+package com.zy.asrs.utils;
+
+import com.core.common.SpringUtils;
+import com.zy.system.entity.SaasLog;
+import com.zy.system.service.SaasLogService;
+
+import java.util.Date;
+
+public class SaasUtils {
+ public static void insertLog(Integer type, String locNo, String matnr,Double anfme,String user){
+ SaasLogService bean = SpringUtils.getBean(SaasLogService.class);
+ SaasLog saasLog = new SaasLog();
+ saasLog.setType(type);
+ saasLog.setLocNo(locNo);
+ saasLog.setMatnr(matnr);
+ saasLog.setIoTime(new Date());
+ saasLog.setAnfme(anfme);
+ saasLog.setCreateBy(1L);
+ saasLog.setCreateByName(user);
+ bean.insert(saasLog);
+ }
+}
diff --git a/src/main/java/com/zy/common/entity/NodeExcel.java b/src/main/java/com/zy/common/entity/NodeExcel.java
new file mode 100644
index 0000000..8547df8
--- /dev/null
+++ b/src/main/java/com/zy/common/entity/NodeExcel.java
@@ -0,0 +1,18 @@
+package com.zy.common.entity;
+
+import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Data;
+
+@Data
+@ExcelIgnoreUnannotated
+public class NodeExcel {
+ @ExcelProperty(index = 0, value = "浠撳簱")
+ private String warehouse;
+
+ @ExcelProperty(index = 1, value = "搴撳尯")
+ private String area;
+
+ @ExcelProperty(index = 2, value = "璐т綅")
+ private String allo;
+}
diff --git a/src/main/java/com/zy/common/entity/NodeExcelListener.java b/src/main/java/com/zy/common/entity/NodeExcelListener.java
new file mode 100644
index 0000000..7cd45bf
--- /dev/null
+++ b/src/main/java/com/zy/common/entity/NodeExcelListener.java
@@ -0,0 +1,146 @@
+package com.zy.common.entity;
+
+import com.alibaba.excel.context.AnalysisContext;
+import com.alibaba.excel.event.AnalysisEventListener;
+import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.core.exception.CoolException;
+import com.zy.asrs.entity.Node;
+import com.zy.asrs.mapper.NodeMapper;
+import com.zy.asrs.service.NodeService;
+import com.zy.common.utils.NodeUtils;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+public class NodeExcelListener extends AnalysisEventListener<NodeExcel> {
+ private int total = 0;
+ private Long userId;
+ private Long hostId;
+
+ public NodeExcelListener() {
+ }
+
+ public NodeExcelListener(Long userId, Long hostId) {
+ this.userId = userId;
+ this.hostId = hostId;
+ }
+
+ /**
+ * 姣忛殧5鏉″瓨鍌ㄦ暟鎹簱锛屽疄闄呬娇鐢ㄤ腑鍙互3000鏉★紝鐒跺悗娓呯悊list 锛屾柟渚垮唴瀛樺洖鏀�
+ */
+ private static final int BATCH_COUNT = 50;
+
+ private final List<NodeExcel> list = new ArrayList<>();
+
+ /**
+ * 杩欓噷浼氫竴琛岃鐨勮繑鍥炲ご
+ */
+ @Override
+ public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
+ }
+
+ /**
+ * 杩欎釜姣忎竴鏉℃暟鎹В鏋愰兘浼氭潵璋冪敤
+ */
+ @Override
+ public void invoke(NodeExcel excel, AnalysisContext ctx) {
+ NodeService nodeService = SpringUtils.getBean(NodeService.class);
+ NodeMapper nodeMapper = SpringUtils.getBean(NodeMapper.class);
+ Date now = new Date();
+ Node top = nodeService.getTop();
+ // 浠撳簱
+ if (!Cools.isEmpty(excel.getWarehouse())) {
+ Node wareHouse = nodeService.selectByUuid(excel.getWarehouse(), hostId, 1, top.getId());
+ if (wareHouse == null) {
+ wareHouse = new Node();
+ wareHouse.setHostId(this.hostId);
+ wareHouse.setUuid(excel.getWarehouse());
+ wareHouse.setName(excel.getWarehouse());
+ wareHouse.setType(1);
+ wareHouse.setParentId(top.getId());
+ wareHouse.setParentName(top.getName());
+ wareHouse.setLevel(top.getLevel() + 1);
+ NodeUtils nodeUtils = new NodeUtils();
+ nodeUtils.executePath(wareHouse);
+ wareHouse.setPath(nodeUtils.path.toString());
+ wareHouse.setNamePath(nodeUtils.pathName.toString());
+ wareHouse.setStatus(1);
+ wareHouse.setCreateTime(now);
+ wareHouse.setUpdateTime(now);
+ if (nodeMapper.insert(wareHouse) == 0) {
+ throw new CoolException("淇濆瓨浠撳簱鏁版嵁澶辫触");
+ }
+ total ++;
+ }
+
+ // 搴撳尯
+ if (!Cools.isEmpty(excel.getArea())) {
+ Node area = nodeService.selectByUuid(excel.getArea(), hostId, 2, wareHouse.getId());
+ if (area == null) {
+ area = new Node();
+ area.setHostId(this.hostId);
+ area.setUuid(excel.getArea());
+ area.setName(excel.getArea());
+ area.setType(2);
+ area.setParentId(wareHouse.getId());
+ area.setParentName(wareHouse.getName());
+ area.setLevel(wareHouse.getLevel() + 1);
+ NodeUtils nodeUtils = new NodeUtils();
+ nodeUtils.executePath(area);
+ area.setPath(nodeUtils.path.toString());
+ area.setNamePath(nodeUtils.pathName.toString());
+ area.setStatus(1);
+ area.setCreateTime(now);
+ area.setUpdateTime(now);
+ if (nodeMapper.insert(area) == 0) {
+ throw new CoolException("淇濆瓨搴撳尯鏁版嵁澶辫触");
+ }
+ total ++;
+ }
+
+ // 璐т綅
+ if (!Cools.isEmpty(excel.getAllo())) {
+ Node allo = nodeService.selectByUuid(excel.getAllo(), hostId, 3);
+ if (allo == null) {
+ allo = new Node();
+ allo.setHostId(this.hostId);
+ allo.setUuid(excel.getAllo());
+ allo.setName(excel.getAllo());
+ allo.setType(3);
+ allo.setParentId(area.getId());
+ allo.setParentName(area.getName());
+ allo.setLevel(area.getLevel() + 1);
+ NodeUtils nodeUtils = new NodeUtils();
+ nodeUtils.executePath(allo);
+ allo.setPath(nodeUtils.path.toString());
+ allo.setNamePath(nodeUtils.pathName.toString());
+ allo.setStatus(1);
+ allo.setCreateTime(now);
+ allo.setUpdateTime(now);
+ if (nodeMapper.insert(allo) == 0) {
+ throw new CoolException("淇濆瓨璐т綅鏁版嵁澶辫触");
+ }
+ total ++;
+ }
+ }
+
+ }
+ }
+ }
+
+ /**
+ * 鎵�鏈夋暟鎹В鏋愬畬鎴愪簡璋冪敤
+ * 閫傚悎浜嬪姟
+ */
+ @Override
+ public void doAfterAllAnalysed(AnalysisContext ctx) {
+ //log.info("鏂板{}鏉$墿鏂欎俊鎭紒", total);
+ }
+
+ public int getTotal() {
+ return total;
+ }
+}
diff --git a/src/main/java/com/zy/common/model/DetlDto.java b/src/main/java/com/zy/common/model/DetlDto.java
index 650e884..40c59e0 100644
--- a/src/main/java/com/zy/common/model/DetlDto.java
+++ b/src/main/java/com/zy/common/model/DetlDto.java
@@ -15,11 +15,20 @@
private String orderNo;
+ //鏂欐兂鐮�
+ private String containerCode;
+
private String matnr;
private String batch;
private Double anfme;
+
+ //閿�鍞鍗曞彿
+ private String csocode;
+
+ //閿�鍞鍗曡鍙�
+ private String isoseq;
public DetlDto() {
}
@@ -40,11 +49,21 @@
this.anfme = anfme;
}
- public DetlDto(String orderNo, String matnr, String batch, Double anfme) {
+ public DetlDto(String matnr, String batch, Double anfme, String csocode, String isoseq) {
+ this.matnr = matnr;
+ this.batch = batch;
+ this.anfme = anfme;
+ this.csocode = csocode;
+ this.isoseq = isoseq;
+ }
+
+ public DetlDto(String orderNo, String matnr, String batch, Double anfme, String csocode, String isoseq) {
this.orderNo = orderNo;
this.matnr = matnr;
this.batch = batch;
this.anfme = anfme;
+ this.csocode = csocode;
+ this.isoseq = isoseq;
}
public static boolean hasList(Set<DetlDto> detlDtos, OrderDetl orderDetl) {
@@ -66,19 +85,27 @@
public static boolean has(List<DetlDto> detlDtos, DetlDto detlDto) {
for (DetlDto dto : detlDtos) {
- if (dto.getMatnr().equals(detlDto.getMatnr()) && Cools.eq(dto.getBatch(), detlDto.getBatch())) {
+ if (dto.getMatnr().equals(detlDto.getMatnr())
+ && Cools.eq(dto.getContainerCode(), detlDto.getContainerCode())
+ && Cools.eq(dto.getBatch(), detlDto.getBatch())
+ && Cools.eq(dto.getCsocode(),detlDto.getCsocode())
+ && Cools.eq(dto.getIsoseq(),detlDto.getIsoseq())) {
return true;
}
}
return false;
}
- public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch) {
+ public static DetlDto find(List<DetlDto> detlDtos, String matnr, String batch, String csocode, String isoseq, String containerCode) {
if (Cools.isEmpty(matnr)) {
return null;
}
for (DetlDto detlDto : detlDtos) {
- if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())) {
+ if (matnr.equals(detlDto.getMatnr())
+ && Cools.eq(containerCode, detlDto.getContainerCode())
+ && Cools.eq(batch, detlDto.getBatch())
+ && Cools.eq(csocode,detlDto.getCsocode())
+ && Cools.eq(isoseq,detlDto.getIsoseq())) {
return detlDto;
}
}
diff --git a/src/main/java/com/zy/common/model/LocDto.java b/src/main/java/com/zy/common/model/LocDto.java
index cc84b06..7a341df 100644
--- a/src/main/java/com/zy/common/model/LocDto.java
+++ b/src/main/java/com/zy/common/model/LocDto.java
@@ -35,6 +35,15 @@
private String specs;
+ //閿�鍞鍗曞彿
+ private String csocode;
+
+ //閿�鍞鍗曡鍙�
+ private String isoseq;
+
+ //鏂欐兂鐮�
+ private String containerCode;
+
public LocDto() {
}
diff --git a/src/main/java/com/zy/common/model/OrderMergeVo.java b/src/main/java/com/zy/common/model/OrderMergeVo.java
index bb619d4..3b27d1e 100644
--- a/src/main/java/com/zy/common/model/OrderMergeVo.java
+++ b/src/main/java/com/zy/common/model/OrderMergeVo.java
@@ -22,6 +22,12 @@
private Double anfme;
+ //閿�鍞鍗曞彿
+ private String csocode;
+
+ //閿�鍞鍗曡鍙�
+ private String isoseq;
+
private List<OrderDto> orderDtos = new ArrayList<>();
public OrderMergeVo(String matnr, String batch, Double anfme) {
diff --git a/src/main/java/com/zy/common/model/TaskDto.java b/src/main/java/com/zy/common/model/TaskDto.java
index 723d633..02baec6 100644
--- a/src/main/java/com/zy/common/model/TaskDto.java
+++ b/src/main/java/com/zy/common/model/TaskDto.java
@@ -79,9 +79,10 @@
// 姹囨�讳笉鑰冭檻搴忓垪鐮�
List<DetlDto> detlDtos = new ArrayList<>();
for (LocDto locDto : this.getLocDtos()) {
- DetlDto dto = new DetlDto(locDto.getMatnr(), locDto.getBatch(), locDto.getAnfme());
+ DetlDto dto = new DetlDto(locDto.getMatnr(), locDto.getBatch(), locDto.getAnfme(), locDto.getCsocode(), locDto.getIsoseq());
+ dto.setContainerCode(locDto.getContainerCode());
if (DetlDto.has(detlDtos, dto)) {
- DetlDto detlDto = DetlDto.find(detlDtos, locDto.getMatnr(), dto.getBatch());
+ DetlDto detlDto = DetlDto.find(detlDtos, locDto.getMatnr(), dto.getBatch(),dto.getCsocode(),dto.getIsoseq(),dto.getContainerCode());
assert detlDto != null;
detlDto.setAnfme(detlDto.getAnfme() + locDto.getAnfme());
} else {
diff --git a/src/main/java/com/zy/common/utils/NodeUtils.java b/src/main/java/com/zy/common/utils/NodeUtils.java
index 1703cdb..1c986d1 100644
--- a/src/main/java/com/zy/common/utils/NodeUtils.java
+++ b/src/main/java/com/zy/common/utils/NodeUtils.java
@@ -1,7 +1,9 @@
package com.zy.common.utils;
import com.core.common.SpringUtils;
+import com.zy.asrs.entity.Node;
import com.zy.asrs.entity.Tag;
+import com.zy.asrs.service.NodeService;
import com.zy.asrs.service.TagService;
/**
@@ -43,4 +45,19 @@
}
}
+ public void executePath(Node node) {
+ NodeService bean = SpringUtils.getBean(NodeService.class);
+ Node parent = bean.selectById(node.getParentId());
+ if (null != parent) {
+ path.insert(0, parent.getId()).insert(0,",");
+ pathName.insert(0, parent.getName()).insert(0,",");
+ if (parent.getParentId() != null) {
+ executePath(parent);
+ } else {
+ path.deleteCharAt(0);
+ pathName.deleteCharAt(0);
+ }
+ }
+ }
+
}
diff --git a/src/main/java/com/zy/common/utils/TreeUtils.java b/src/main/java/com/zy/common/utils/TreeUtils.java
index 271ee28..76f567c 100644
--- a/src/main/java/com/zy/common/utils/TreeUtils.java
+++ b/src/main/java/com/zy/common/utils/TreeUtils.java
@@ -1,7 +1,10 @@
package com.zy.common.utils;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.zy.asrs.entity.Node;
import com.zy.asrs.entity.Tag;
+import com.zy.asrs.service.NodeService;
import com.zy.asrs.service.TagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
@@ -18,6 +21,8 @@
@Autowired
private TagService tagService;
+ @Autowired
+ private NodeService nodeService;
/******************************** 褰掔被鏍� *********************************/
@@ -86,4 +91,51 @@
}
}
+ /**
+ * 鑾峰彇鏍戝浘鏁版嵁缁撴瀯
+ */
+ @Cacheable(cacheNames="nodeTree",key="#id")
+ public ArrayList<Map> getNodeTree(String id, Long hostId){
+ ArrayList<Map> result = new ArrayList<>();
+ Node node = nodeService.selectById(id);
+ // 涓昏妭鐐�
+ Map<String, Object> map = new HashMap<>();
+ map.put("title", node.getName());
+ map.put("id", node.getId());
+ map.put("spread", true);
+ List<Map> childrens = new ArrayList<>();
+ map.put("children", childrens);
+ dealNode(node, childrens, hostId);
+ result.add(map);
+ // 寮�濮嬪鐞嗗瓧鑺傜偣
+// deal(tag, childrens);
+ return result;
+ }
+
+ /**
+ * 閫掑綊鑾峰彇瀛愯妭鐐规暟鎹�
+ */
+ public void dealNode(Node parent, List<Map> list, Long hostId) {
+ Wrapper<Node> wrapper = new EntityWrapper<Node>()
+ .eq("parent_id", parent.getId())
+ .eq("status", "1")
+ .ne("type",3);
+ if (hostId != null) {
+ wrapper.eq("host_id", hostId);
+ }
+ List<Node> nodes = nodeService.selectList(wrapper);
+ for (Node node : nodes) {
+ Map<String, Object> map = new HashMap<>();
+ map.put("title", node.getName());
+ map.put("id", node.getId());
+ map.put("spread", true);
+ List<Map> childrens = new ArrayList<>();
+ map.put("children", childrens);
+ dealNode(node, childrens, hostId);
+ list.add(map);
+ }
+ }
+
+
+
}
diff --git a/src/main/java/com/zy/common/web/BaseController.java b/src/main/java/com/zy/common/web/BaseController.java
index a61e965..42e2e08 100644
--- a/src/main/java/com/zy/common/web/BaseController.java
+++ b/src/main/java/com/zy/common/web/BaseController.java
@@ -1,6 +1,5 @@
package com.zy.common.web;
-import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
@@ -8,9 +7,13 @@
import com.core.common.Cools;
import com.core.controller.AbstractBaseController;
import com.core.exception.CoolException;
+import com.zy.asrs.entity.Node;
import com.zy.asrs.entity.Tag;
+import com.zy.asrs.service.NodeService;
import com.zy.asrs.service.TagService;
import com.zy.system.entity.User;
+import com.zy.system.entity.UserLogin;
+import com.zy.system.service.UserLoginService;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
@@ -33,6 +36,11 @@
private UserService userService;
@Autowired
private TagService tagService;
+ @Autowired
+ private NodeService nodeService;
+
+ @Autowired
+ private UserLoginService userLoginService;
protected Long getUserId(){
return Long.parseLong(String.valueOf(request.getAttribute("userId")));
@@ -58,6 +66,14 @@
protected Tag getOriginTag(){
return tagService.getTop();
+ }
+
+ protected Node getOriginNode(){
+ Node node = nodeService.getTop();
+ if (node == null) {
+ throw new CoolException("搴撳尯鏁版嵁閿欒");
+ }
+ return node;
}
/**
@@ -158,4 +174,32 @@
}
}
}
+
+ protected <T> void hostEq(EntityWrapper<T> wrapper){
+ Long hostId = getHostId();
+ if (hostId != null) {
+ wrapper.eq("host_id", hostId);
+ }
+ }
+
+ protected Long getHostId(){
+ if (getUserId() == 9527) {
+ return null;
+ }
+ User user = getUser();
+ if (user.getRoleId() == 1) {
+ String hostId = String.valueOf(request.getAttribute("hostId"));
+ if (Cools.isEmpty(hostId)) {
+ UserLogin userLogin = userLoginService.selectOne(new EntityWrapper<UserLogin>().eq("user_id", user.getId()));
+ if (userLogin != null) {
+ //return userLogin.getHostId();
+ return 1L;
+ }
+ }
+ return Long.parseLong(hostId);
+ } else {
+ return user.getHostId();
+ }
+ }
+
}
diff --git a/src/main/java/com/zy/system/controller/SaasLogController.java b/src/main/java/com/zy/system/controller/SaasLogController.java
new file mode 100644
index 0000000..95eff11
--- /dev/null
+++ b/src/main/java/com/zy/system/controller/SaasLogController.java
@@ -0,0 +1,126 @@
+package com.zy.system.controller;
+
+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 com.zy.common.web.BaseController;
+import com.zy.system.entity.SaasLog;
+import com.zy.system.service.SaasLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class SaasLogController extends BaseController {
+
+ @Autowired
+ private SaasLogService saasLogService;
+
+ @RequestMapping(value = "/saasLog/{id}/auth")
+ @ManagerAuth
+ public R get(@PathVariable("id") String id) {
+ return R.ok(saasLogService.selectById(String.valueOf(id)));
+ }
+
+ @RequestMapping(value = "/saasLog/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<SaasLog> wrapper = new EntityWrapper<>();
+ excludeTrash(param);
+ convert(param, wrapper);
+ if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+ wrapper.orderBy("io_time",false);
+ return R.ok(saasLogService.selectPage(new Page<>(curr, limit), wrapper));
+ }
+
+ private <T> void convert(Map<String, Object> map, EntityWrapper<T> 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 = "/saasLog/add/auth")
+ @ManagerAuth
+ public R add(SaasLog saasLog) {
+ saasLogService.insert(saasLog);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/saasLog/update/auth")
+ @ManagerAuth
+ public R update(SaasLog saasLog){
+ if (Cools.isEmpty(saasLog) || null==saasLog.getId()){
+ return R.error();
+ }
+ saasLogService.updateById(saasLog);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/saasLog/delete/auth")
+ @ManagerAuth
+ public R delete(@RequestParam(value="ids[]") Long[] ids){
+ for (Long id : ids){
+ saasLogService.deleteById(id);
+ }
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/saasLog/export/auth")
+ @ManagerAuth
+ public R export(@RequestBody JSONObject param){
+ EntityWrapper<SaasLog> wrapper = new EntityWrapper<>();
+ List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
+ Map<String, Object> map = excludeTrash(param.getJSONObject("saasLog"));
+ convert(map, wrapper);
+ List<SaasLog> list = saasLogService.selectList(wrapper);
+ return R.ok(exportSupport(list, fields));
+ }
+
+ @RequestMapping(value = "/saasLogQuery/auth")
+ @ManagerAuth
+ public R query(String condition) {
+ EntityWrapper<SaasLog> wrapper = new EntityWrapper<>();
+ wrapper.like("id", condition);
+ Page<SaasLog> page = saasLogService.selectPage(new Page<>(0, 10), wrapper);
+ List<Map<String, Object>> result = new ArrayList<>();
+ for (SaasLog saasLog : page.getRecords()){
+ Map<String, Object> map = new HashMap<>();
+ map.put("id", saasLog.getId());
+ map.put("value", saasLog.getId());
+ result.add(map);
+ }
+ return R.ok(result);
+ }
+
+ @RequestMapping(value = "/saasLog/check/column/auth")
+ @ManagerAuth
+ public R query(@RequestBody JSONObject param) {
+ Wrapper<SaasLog> wrapper = new EntityWrapper<SaasLog>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
+ if (null != saasLogService.selectOne(wrapper)){
+ return R.parse(BaseRes.REPEAT).add(getComment(SaasLog.class, String.valueOf(param.get("key"))));
+ }
+ return R.ok();
+ }
+
+}
diff --git a/src/main/java/com/zy/system/entity/SaasLog.java b/src/main/java/com/zy/system/entity/SaasLog.java
new file mode 100644
index 0000000..63dd39a
--- /dev/null
+++ b/src/main/java/com/zy/system/entity/SaasLog.java
@@ -0,0 +1,101 @@
+package com.zy.system.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.baomidou.mybatisplus.enums.IdType;
+import com.core.common.Cools;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+@Data
+@TableName("sys_saas_log")
+public class SaasLog implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @ApiModelProperty(value= "id")
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * {0:鍏ュ簱,1:鍑哄簱}
+ */
+ @ApiModelProperty(value= "{0:鍏ュ簱,1:鍑哄簱}")
+ private Integer type;
+
+ @ApiModelProperty(value= "")
+ @TableField("loc_no")
+ private String locNo;
+
+ @ApiModelProperty(value= "")
+ private String matnr;
+
+ @ApiModelProperty(value= "")
+ @TableField("io_time")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+ private Date ioTime;
+
+ @ApiModelProperty(value= "")
+ @TableField("create_by")
+ private Long createBy;
+
+ @TableField("anfme")
+ private Double anfme;
+
+ @ApiModelProperty(value= "")
+ @TableField("create_by_name")
+ private String createByName;
+
+ public SaasLog() {}
+
+ public SaasLog(Long id, Integer type, String locNo, String matnr, Date ioTime, Long createBy) {
+ this.id = id;
+ this.type = type;
+ this.locNo = locNo;
+ this.matnr = matnr;
+ this.ioTime = ioTime;
+ this.createBy = createBy;
+ }
+
+// SaasLog saasLog = new SaasLog(
+// null, // id[闈炵┖]
+// null, // {0:鍏ュ簱,1:鍑哄簱}
+// null, //
+// null, //
+// null, //
+// null //
+// );
+
+ public String getIoTime$(){
+ if (Cools.isEmpty(this.ioTime)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
+ }
+
+ public String getType$(){
+ if (this.type ==0) {
+ return "鍏ュ簱";
+ } else if (this.type == 1) {
+ return "鍑哄簱";
+ } else if (this.type == 2) {
+ return "搴撲綅绉昏浆";
+ } else if (this.type == 3) {
+ return "搴撳瓨璋冩暣";
+ }else {
+ return "";
+ }
+
+ }
+
+
+}
diff --git a/src/main/java/com/zy/system/entity/UserLogin.java b/src/main/java/com/zy/system/entity/UserLogin.java
index 52d5a5a..550db54 100644
--- a/src/main/java/com/zy/system/entity/UserLogin.java
+++ b/src/main/java/com/zy/system/entity/UserLogin.java
@@ -7,12 +7,14 @@
import com.zy.system.service.UserService;
import com.core.common.Cools;
import com.core.common.SpringUtils;
+import lombok.Data;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
@TableName("sys_user_login")
+@Data
public class UserLogin implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/src/main/java/com/zy/system/mapper/SaasLogMapper.java b/src/main/java/com/zy/system/mapper/SaasLogMapper.java
new file mode 100644
index 0000000..e99397e
--- /dev/null
+++ b/src/main/java/com/zy/system/mapper/SaasLogMapper.java
@@ -0,0 +1,12 @@
+package com.zy.system.mapper;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.zy.system.entity.SaasLog;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface SaasLogMapper extends BaseMapper<SaasLog> {
+
+}
diff --git a/src/main/java/com/zy/system/service/SaasLogService.java b/src/main/java/com/zy/system/service/SaasLogService.java
new file mode 100644
index 0000000..1d8693b
--- /dev/null
+++ b/src/main/java/com/zy/system/service/SaasLogService.java
@@ -0,0 +1,8 @@
+package com.zy.system.service;
+
+import com.baomidou.mybatisplus.service.IService;
+import com.zy.system.entity.SaasLog;
+
+public interface SaasLogService extends IService<SaasLog> {
+
+}
diff --git a/src/main/java/com/zy/system/service/impl/SaasLogServiceImpl.java b/src/main/java/com/zy/system/service/impl/SaasLogServiceImpl.java
new file mode 100644
index 0000000..733913b
--- /dev/null
+++ b/src/main/java/com/zy/system/service/impl/SaasLogServiceImpl.java
@@ -0,0 +1,12 @@
+package com.zy.system.service.impl;
+
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.zy.system.entity.SaasLog;
+import com.zy.system.mapper.SaasLogMapper;
+import com.zy.system.service.SaasLogService;
+import org.springframework.stereotype.Service;
+
+@Service("saasLogService")
+public class SaasLogServiceImpl extends ServiceImpl<SaasLogMapper, SaasLog> implements SaasLogService {
+
+}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index d84dd0c..264e07c 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -10,8 +10,8 @@
enabled: false
datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
- #url: jdbc:sqlserver://192.168.4.15:1433;databasename=tzskasrs
- url: jdbc:sqlserver://localhost:1433;databasename=tzskasrs
+ url: jdbc:sqlserver://192.168.4.15:1433;databasename=tzskasrs
+ #url: jdbc:sqlserver://localhost:1433;databasename=tzskasrs
username: sa
password: sa@123
mvc:
diff --git a/src/main/resources/mapper/ManLocDetlMapper.xml b/src/main/resources/mapper/ManLocDetlMapper.xml
new file mode 100644
index 0000000..395c9db
--- /dev/null
+++ b/src/main/resources/mapper/ManLocDetlMapper.xml
@@ -0,0 +1,377 @@
+<?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="com.zy.asrs.mapper.ManLocDetlMapper">
+
+ <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+ <resultMap id="BaseResultMap" type="com.zy.asrs.entity.ManLocDetl">
+ <result column="host_id" property="hostId" />
+ <result column="loc_no" property="locNo" />
+ <result column="node_id" property="nodeId" />
+ <result column="zpallet" property="zpallet" />
+ <result column="anfme" property="anfme" />
+ <result column="matnr" property="matnr" />
+ <result column="maktx" property="maktx" />
+ <result column="name" property="name" />
+ <result column="specs" property="specs" />
+ <result column="model" property="model" />
+ <result column="batch" property="batch" />
+ <result column="unit" property="unit" />
+ <result column="barcode" property="barcode" />
+ <result column="doc_id" property="docId" />
+ <result column="doc_num" property="docNum" />
+ <result column="cust_name" property="custName" />
+ <result column="item_num" property="itemNum" />
+ <result column="count" property="count" />
+ <result column="price" property="price" />
+ <result column="weight" property="weight" />
+ <result column="status" property="status" />
+ <result column="create_by" property="createBy" />
+ <result column="create_time" property="createTime" />
+ <result column="update_by" property="updateBy" />
+ <result column="modi_time" property="modiTime" />
+ <result column="memo" property="memo" />
+ <result column="owner" property="owner" />
+ <result column="payment" property="payment" />
+ <result column="real_anfme" property="realAnfme" />
+ <result column="order_no" property="orderNo" />
+ </resultMap>
+
+ <sql id="locDetlCondition">
+ <if test="host_id != null and host_id != ''">
+ and mld.host_id = #{host_id}
+ </if>
+ <if test="loc_no != null and loc_no != ''">
+ and mld.loc_no like concat('%',#{loc_no},'%')
+ </if>
+ <if test="locNo != null and locNo != ''">
+ and mld.loc_no like concat('%',#{loc_no},'%')
+ </if>
+ <if test="matnr != null and matnr != ''">
+ and mld.matnr like concat('%',#{matnr},'%')
+ </if>
+ <if test="maktx != null and maktx != ''">
+ and mld.maktx like concat('%',#{maktx},'%')
+ </if>
+ <if test="zpallet != null and zpallet != ''">
+ and mld.zpallet like concat('%',#{zpallet},'%')
+ </if>
+ <if test="startTime!=null and endTime!=null">
+ and mld.update_time between #{startTime} and #{endTime}
+ </if>
+ </sql>
+ <sql id="locDetlCondition2">
+ <if test="host_id != null and host_id != ''">
+ and v.host_id = #{host_id}
+ </if>
+ <if test="loc_no != null and loc_no != ''">
+ and v.loc_no like concat('%',#{loc_no},'%')
+ </if>
+ <if test="locNo != null and locNo != ''">
+ and v.loc_no like concat('%',#{loc_no},'%')
+ </if>
+ <if test="matnr != null and matnr != ''">
+ and v.matnr like concat('%',#{matnr},'%')
+ </if>
+ <if test="maktx != null and maktx != ''">
+ and v.maktx like concat('%',#{maktx},'%')
+ </if>
+ <if test="startTime!=null and endTime!=null">
+ and v.update_time between #{startTime} and #{endTime}
+ </if>
+ </sql>
+
+ <select id="listByPage" resultMap="BaseResultMap" parameterType="java.util.Map">
+ select * from
+ (
+ SELECT
+ ROW_NUMBER() over (order by mld.create_time desc) as row,
+ mld.*
+ FROM man_loc_detl mld
+ LEFT JOIN man_node mn ON mld.node_id = mn.id
+ LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
+ LEFT JOIN man_tag mt ON mm.tag_id = mt.id
+ WHERE 1=1
+ AND (CHARINDEX(#{node_id}, mn.path) > 0 OR mn.id = #{node_id})
+ <include refid="locDetlCondition"></include>
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+
+ <select id="listByPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
+ select
+ count(1)
+ FROM man_loc_detl mld
+ LEFT JOIN man_node mn ON mld.node_id = mn.id
+ LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
+ LEFT JOIN man_tag mt ON mm.tag_id = mt.id
+ WHERE 1=1
+ AND (CHARINDEX(#{node_id}, mn.path) > 0 OR mn.id = #{node_id})
+ <include refid="locDetlCondition"></include>
+ </select>
+
+ <select id="selectByLocNoAndMatnr" resultMap="BaseResultMap">
+ select top 1 *
+ from man_loc_detl
+ where 1=1
+ and anfme > 0
+ <if test="nodeId != null and nodeId != ''">
+ and node_id = #{nodeId}
+ </if>
+ <if test="matnr != null and matnr != ''">
+ and matnr = #{matnr}
+ </if>
+ order by create_time asc
+ </select>
+
+ <select id="selectCountByMatnr" resultType="java.lang.Double">
+ select sum(anfme) as count from man_loc_detl where 1=1 and matnr = #{matnr} and host_id = #{hostId}
+ </select>
+
+ <update id="reduceStock">
+ update man_loc_detl
+ set anfme = anfme - #{anfme}
+ , update_time = getdate()
+ where 1=1
+ and node_id = #{nodeId}
+ and matnr = #{matnr}
+ </update>
+
+ <update id="incrementStock">
+ update man_loc_detl
+ set anfme = anfme + #{anfme}
+ , update_time = getdate()
+ where 1=1
+ and node_id = #{nodeId}
+ and matnr = #{matnr}
+ </update>
+
+ <update id="removeStock">
+ delete from man_loc_detl
+ where 1=1
+ and node_id = #{nodeId}
+ and matnr = #{matnr}
+ </update>
+
+ <select id="selectByPrior" resultMap="BaseResultMap">
+ select
+ mld.*
+ from man_loc_detl mld
+ left join man_prior mp on mld.node_id = mp.node_id and mld.matnr = mp.matnr
+ where 1=1
+ <if test="hostId != null and hostId != ''">
+ and mld.host_id = #{hostId}
+ </if>
+ <if test="nodeId != null and nodeId != ''">
+ and mld.node_id = #{nodeId}
+ </if>
+ <if test="matnr != null and matnr != ''">
+ and mld.matnr = #{matnr}
+ </if>
+ and mld.anfme > 0
+ and mp.status = 1
+ order by mp.prio desc, mld.create_time asc
+ </select>
+
+ <select id="getLocDetlStatis" resultMap="BaseResultMap">
+ select
+ ROW_NUMBER() over (order by sum(a.anfme) desc) as row
+ , a.matnr
+ , sum(a.anfme) as anfme
+ from man_loc_detl a
+ where 1=1
+ group by a.matnr
+ </select>
+
+ <select id="selectByNodeUuid" resultMap="BaseResultMap">
+ select * from man_loc_detl mld left join man_node mn on mld.node_id = mn.id
+ where 1=1
+ and mn.uuid = #{uuid}
+ and mld.hostId = #{hostId}
+ and mld.status = 1
+ order by mld.create_time
+ </select>
+
+ <select id="getStockStatis" resultMap="BaseResultMap">
+ select * from
+ (
+ select
+ ROW_NUMBER() over (order by a.matnr, sum(a.anfme) desc) as row
+ , a.matnr
+ , sum(a.anfme) as anfme
+ from man_loc_detl a
+ where 1=1
+ <include refid="stockOutCondition"></include>
+ group by a.matnr
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+
+ <select id="getStockStatisCount" parameterType="java.util.Map" resultType="java.lang.Integer">
+ select count(1) as count from
+ (
+ select
+ a.matnr
+ from man_loc_detl a
+ where 1=1
+ <include refid="stockOutCondition"></include>
+ group by a.matnr
+ ) b
+ </select>
+
+ <sql id="stockOutCondition">
+ <if test="host_id!=null and host_id!='' ">
+ and a.host_id = #{host_id}
+ </if>
+ <if test="node_id!=null and node_id!='' ">
+ and a.node_id like '%' + #{node_id} + '%'
+ </if>
+ <if test="loc_no!=null and loc_no!='' ">
+ and a.loc_no like '%' + #{loc_no} + '%'
+ </if>
+ <if test="matnr!=null and matnr!='' ">
+ and a.matnr like '%' + #{matnr} + '%'
+ </if>
+ <if test="maktx!=null and maktx!='' ">
+ and a.maktx like '%' + #{maktx} + '%'
+ </if>
+ </sql>
+
+ <select id="getStockStatisExcel" resultMap="BaseResultMap">
+ select
+ ROW_NUMBER() over (order by a.matnr, sum(a.anfme) desc) as row
+ , a.matnr
+ , sum(a.anfme) as anfme
+ from man_loc_detl a
+ where 1=1
+ and a.host_id = #{hostId}
+ group by a.matnr
+ </select>
+ <select id="selectLocDetlSumQty" resultType="java.lang.Double"></select>
+
+ <select id="selectLocNo0" resultMap="BaseResultMap">
+ select * from man_loc_detl
+ where loc_no = #{locNo}
+ and matnr = #{matnr}
+ </select>
+ <select id="selectItem" resultMap="BaseResultMap">
+ select top 1 * from man_loc_detl
+ where loc_no = #{locNo}
+ and matnr = #{matnr}
+ <if test="batch!=null and batch!='' ">
+ and batch = #{batch}
+ </if>
+ <!-- <choose>-->
+ <!-- <when test="batch != null and batch != ''">-->
+ <!-- and batch = #{batch}-->
+ <!-- </when>-->
+ <!-- <otherwise>-->
+ <!-- and (batch IS NULL OR batch = '')-->
+ <!-- </otherwise>-->
+ <!-- </choose>-->
+ </select>
+
+ <select id="listByOutPage" resultMap="BaseResultMap">
+ select * from
+ (
+ SELECT
+ ROW_NUMBER() over (order by mld.create_time desc) as row,
+ mld.*
+ FROM man_loc_detl mld
+ LEFT JOIN man_node mn ON mld.node_id = mn.id
+ LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
+ LEFT JOIN man_tag mt ON mm.tag_id = mt.id
+ WHERE 1=1
+ <include refid="locDetlCondition"></include>
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+ <select id="listByOutPageCount" resultType="java.lang.Long">
+ select
+ count(1)
+ FROM man_loc_detl mld
+ LEFT JOIN man_node mn ON mld.node_id = mn.id
+ LEFT JOIN man_mat mm ON mld.matnr = mm.matnr
+ LEFT JOIN man_tag mt ON mm.tag_id = mt.id
+ WHERE 1=1
+ <include refid="locDetlCondition"></include>
+ </select>
+ <select id="selectAllPage" resultMap="BaseResultMap">
+ select * from
+ (
+ SELECT
+ ROW_NUMBER() over (order by v.loc_no desc) as row,
+ v.*
+ FROM [dbo].[man_view_asrs_saas] v
+ WHERE 1=1
+ <include refid="locDetlCondition2"></include>
+ ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+ </select>
+ <select id="selectAllPageSize" resultType="java.lang.Long">
+ select
+ count(1)
+ FROM [dbo].[man_view_asrs_saas] v
+ WHERE 1=1
+ <include refid="locDetlCondition2"></include>
+ </select>
+
+
+ <update id="updateLocNo0">
+ update man_loc_detl set loc_no = #{locNo}
+ where node_id = #{nodeId}
+ </update>
+
+ <delete id="deleteLocNo0">
+ delete from man_loc_detl
+ where loc_no = #{locNo}
+ and matnr = #{matnr}
+ </delete>
+
+ <update id="updateAnfme0">
+ update man_loc_detl set anfme = #{anfme}
+ where node_id = #{nodeId} ;
+ </update>
+
+ <select id="selectInventory" resultMap="BaseResultMap">
+ select top 1 * from man_loc_detl
+ where loc_no=#{LocNo}
+ and 1=1
+ and matnr=#{Matnr}
+ <choose>
+ <when test="batch != null and batch != ''">
+ and batch = #{batch}
+ </when>
+ <otherwise>
+ and (batch IS NULL OR batch = '')
+ </otherwise>
+ </choose>
+ </select>
+ <delete id="deleteDatailed">
+ delete from man_loc_detl
+ where loc_no = #{locNo}
+ and matnr = #{matnr}
+ <choose>
+ <when test="batch != null and batch != ''">
+ and batch = #{batch}
+ </when>
+ <otherwise>
+ and (batch IS NULL OR batch = '')
+ </otherwise>
+ </choose>
+ </delete>
+
+ <update id="increase">
+ update man_loc_detl
+ set anfme= #{anfme}
+ , modi_time = getdate()
+ ,weight=#{weight}
+ where 1=1
+ and loc_no = #{locNo}
+ and matnr = #{matnr}
+<!-- <choose>-->
+<!-- <when test="batch != null and batch!='' ">-->
+<!-- and batch = #{batch}-->
+<!-- </when>-->
+<!-- <otherwise>-->
+<!-- and (batch IS NULL OR batch = '')-->
+<!-- </otherwise>-->
+<!-- </choose>-->
+ </update>
+
+</mapper>
diff --git a/src/main/webapp/static/js/adjDetl/adjDetl.js b/src/main/webapp/static/js/adjDetl/adjDetl.js
index 299230f..93703be 100644
--- a/src/main/webapp/static/js/adjDetl/adjDetl.js
+++ b/src/main/webapp/static/js/adjDetl/adjDetl.js
@@ -21,9 +21,12 @@
// {type: 'checkbox'}
// ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
// {field: 'adjId', align: 'center',title: '搴忓彿'}
- {field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
+ {field: 'orderNo', align: 'center',title: '璁㈠崟鍙�'}
+ ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
,{field: 'matnr', align: 'center',title: '鐗╂枡鍙�'}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮�'}
+ ,{field: 'csocode', align: 'center',title: '閿�鍞鍗曞彿'}
+ ,{field: 'isoseq', align: 'center',title: '閿�鍞鍗曡鍙�'}
+ ,{field: 'batch', align: 'center',title: '搴忓垪鐮�',hide: true}
// ,{field: 'oriCtns', align: 'center',title: '鍘熺鏁�'}
,{field: 'oriQty', align: 'center',title: '鍘熸暟閲�'}
// ,{field: 'oriWt', align: 'center',title: '鍘熼噸閲�'}
diff --git a/src/main/webapp/static/js/agvLocDetl/locDetl.js b/src/main/webapp/static/js/agvLocDetl/locDetl.js
index 7081a55..d6482fd 100644
--- a/src/main/webapp/static/js/agvLocDetl/locDetl.js
+++ b/src/main/webapp/static/js/agvLocDetl/locDetl.js
@@ -3,39 +3,52 @@
function getCol() {
var cols = [
{field: 'locNo', align: 'center',title: '搴撲綅鍙�'},
- {field: 'matnr', align: 'center',title: '鐗╂枡鍙�', sort:true}
- ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', sort:true}
+ {field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜', sort:true}
+ ,{field: 'maktx', align: 'center',title: '瀛樿揣鍚嶇О', sort:true}
,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300, sort:true}
+ ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300, sort:true, hide: true}
,{field: 'anfme', align: 'center',title: '鏁伴噺'}
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
+ ,{field: 'threeCode', align: 'center',title: '閿�鍞鍗曞彿'}
+ ,{field: 'dead_time', align: 'center',title: '閿�鍞鍗曡鍙�'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸鍨嬪彿', hide: false}
+ ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: false}
- ,{field: 'specs', align: 'center',title: '瑙勬牸'}
- ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
- ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
- ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
- ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
- ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
- ,{field: 'sku', align: 'center',title: 'sku', hide: true}
- ,{field: 'units', align: 'center',title: '鍖呮暟', hide: true}
- ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
- ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
- ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
- ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: true}
- ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
- ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
- ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
- ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
- ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
- ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
- ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
- ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
- ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
- ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
- ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
- ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
- ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
- ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+ ,{field: 'brand', align: 'center',title: '瀛樿揣鍒嗙被缂栫爜', hide: true}
+ ,{field: 'color', align: 'center',title: '瀛樿揣鍒嗙被鍚嶇О', hide: true}
+ ,{field: 'unit', align: 'center',title: '璁¢噺鍗曚綅', hide: true}
+ ,{field: 'price', align: 'center',title: '杩涢」绋�', hide: true}
+ ,{field: 'units', align: 'center',title: '閿�椤圭◣', hide: true}
+ ,{field: 'dsDate', align: 'center',title: '鍚敤鏃ユ湡', hide: true}
+ ,{field: 'supp', align: 'center',title: '寤烘。浜�', hide: true}
+ ,{field: 'dInvCreateDatetime', align: 'center',title: '寤烘。鏃ユ湡', hide: true}
+
+ // ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ // ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
+ // ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ // ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+ // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
+ // ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
+ // ,{field: 'sku', align: 'center',title: 'sku', hide: true}
+ // ,{field: 'units', align: 'center',title: '鍖呮暟', hide: true}
+ // ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
+ // ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
+ // ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+ // ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: true}
+ // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+ // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+ // ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
+ // ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+ // ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+ // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+ // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+ // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+ // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+ // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+ // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+ // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+ // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+ // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
];
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index c2f1ccb..448053b 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -225,39 +225,54 @@
var detlCols = [
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: true}
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: false}
- ,{field: 'matnr', align: 'center',title: '鐗╂枡鍙�',hide: true}
- ,{field: 'matnr', align: 'center',title: '鐗╂枡鍙�'}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300, sort:true, hide: false}
- ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О'}
- ,{field: 'specs', align: 'center',title: '瑙勬牸'}
- ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
- ,{field: 'name', align: 'center',title: '绉诲姩绫诲瀷', hide: true}
+ ,{field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜',hide: true}
+ ,{field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜'}
+ ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300, sort:true, hide: true}
+ ,{field: 'maktx', align: 'center',title: '瀛樿揣鍚嶇О'}
,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
- ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
- ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: true}
- ,{field: 'weight', align: 'center',title: '閲嶉噺', hide: true}
- ,{field: 'units', align: 'center',title: '鏀暟', hide: true}
- ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
- ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
- ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
- ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
- ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
- ,{field: 'sku', align: 'center',title: 'sku', hide: true}
- ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
- ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
- ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
- ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
- ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
- ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
- ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
- ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
- ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
- ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
- ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
- ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
- ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
- ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
- ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+ ,{field: 'threeCode', align: 'center',title: '閿�鍞鍗曞彿'}
+ ,{field: 'deadTime', align: 'center',title: '閿�鍞鍗曡鍙�'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸鍨嬪彿', hide: false}
+ ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: false}
+
+ ,{field: 'brand', align: 'center',title: '瀛樿揣鍒嗙被缂栫爜', hide: true}
+ ,{field: 'color', align: 'center',title: '瀛樿揣鍒嗙被鍚嶇О', hide: true}
+ ,{field: 'unit', align: 'center',title: '璁¢噺鍗曚綅', hide: true}
+ ,{field: 'price', align: 'center',title: '杩涢」绋�', hide: true}
+ ,{field: 'units', align: 'center',title: '閿�椤圭◣', hide: true}
+ ,{field: 'dsDate', align: 'center',title: '鍚敤鏃ユ湡', hide: true}
+ ,{field: 'supp', align: 'center',title: '寤烘。浜�', hide: true}
+ ,{field: 'dInvCreateDatetime', align: 'center',title: '寤烘。鏃ユ湡', hide: true}
+
+ // ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ // ,{field: 'name', align: 'center',title: '绉诲姩绫诲瀷', hide: true}
+ // ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
+ // ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
+ // ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: true}
+ // ,{field: 'weight', align: 'center',title: '閲嶉噺', hide: true}
+ // ,{field: 'units', align: 'center',title: '鏀暟', hide: true}
+ // ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
+ // ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ // ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+ // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
+ // ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
+ // ,{field: 'sku', align: 'center',title: 'sku', hide: true}
+ // ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
+ // ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+ // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+ // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+ // ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+ // ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+ // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+ // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+ // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+ // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+ // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+ // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+ // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+ // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+ // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
]
function getQueryVariable(variable)
diff --git a/src/main/webapp/static/js/locDetl/locDetl.js b/src/main/webapp/static/js/locDetl/locDetl.js
index 67f93de..b3063d8 100644
--- a/src/main/webapp/static/js/locDetl/locDetl.js
+++ b/src/main/webapp/static/js/locDetl/locDetl.js
@@ -2,40 +2,56 @@
var tableData;
function getCol() {
var cols = [
- {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'},
- {field: 'matnr', align: 'center',title: '鐗╂枡鍙�', sort:true}
- ,{field: 'maktx', align: 'center',title: '鐗╂枡鍚嶇О', sort:true}
+ {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
+ ,{field: 'matnr', align: 'center',title: '鏂欑鐮�', sort:true}
+ ,{field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜', sort:true}
+ ,{field: 'maktx', align: 'center',title: '瀛樿揣鍚嶇О', sort:true}
,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', width: 300, sort:true}
+ ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', sort:true}
,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ,{field: 'units', align: 'center',title: '閿�鍞鍗曞彿', hide: true}
+ ,{field: 'units', align: 'center',title: '閿�鍞鍗曡鍙�', hide: true}
,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
-
- ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸鍨嬪彿', hide: true}
,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
- ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
- ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
- ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
- ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
- ,{field: 'sku', align: 'center',title: 'sku', hide: true}
- ,{field: 'units', align: 'center',title: '鍖呮暟', hide: true}
- ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
- ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
- ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
- ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: true}
- ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
- ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
- ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
- ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
- ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
- ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
- ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
- ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
- ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
- ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
- ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
- ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
- ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
- ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+ ,{field: 'brand', align: 'center',title: '瀛樿揣鍒嗙被缂栫爜', hide: true}
+ ,{field: 'color', align: 'center',title: '瀛樿揣鍒嗙被鍚嶇О', hide: true}
+ ,{field: 'unit', align: 'center',title: '璁¢噺鍗曚綅', hide: true}
+ ,{field: 'price', align: 'center',title: '杩涢」绋�', hide: true}
+ ,{field: 'units', align: 'center',title: '閿�椤圭◣', hide: true}
+ //,{field: 'dsDate', align: 'center',title: '鍚敤鏃ユ湡', hide: true}
+ //,{field: 'supp', align: 'center',title: '寤烘。浜�', hide: true}
+ //,{field: 'dInvCreateDatetime', align: 'center',title: '寤烘。鏃ユ湡', hide: true}
+ //,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
+ //,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+
+ // ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ // ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: true}
+ // ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ // ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+ // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
+ // ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
+ // ,{field: 'sku', align: 'center',title: 'sku', hide: true}
+ // ,{field: 'units', align: 'center',title: '鍖呮暟', hide: true}
+ // ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
+ // ,{field: 'origin', align: 'center',title: '鐗╂枡鐘舵��', hide: true}
+ // ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+ // ,{field: 'manuDate', align: 'center',title: '鍗曟嵁鏃堕棿', hide: true}
+ // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+ // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+ // ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
+ // ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+ // ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+ // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+ // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+ // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+ // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+ // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+ // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+ // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+ // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+ // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
];
diff --git a/src/main/webapp/static/js/manLocDetl/manLocDetl.js b/src/main/webapp/static/js/manLocDetl/manLocDetl.js
new file mode 100644
index 0000000..e1d3c38
--- /dev/null
+++ b/src/main/webapp/static/js/manLocDetl/manLocDetl.js
@@ -0,0 +1,578 @@
+var pageCurr;
+function getCol() {
+ var cols = [
+ {field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
+ ,{field: 'suppCode', align: 'center',title: '鏂欐兂鐮�', sort:true}
+ ,{field: 'matnr', align: 'center',title: '瀛樿揣缂栫爜', sort:true}
+ ,{field: 'maktx', align: 'center',title: '瀛樿揣鍚嶇О', sort:true}
+ ,{field: 'docNum', align: 'center',title: '鍗曟嵁缂栧彿', hide: true}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ,{field: 'threeCode', align: 'center',title: '閿�鍞鍗曞彿'}
+ ,{field: 'dead_time', align: 'center',title: '閿�鍞鍗曡鍙�'}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸鍨嬪彿', hide: false}
+ ,{field: 'model', align: 'center',title: '閫氱敤鍨嬪彿', hide: false}
+ ,{field: 'brand', align: 'center',title: '瀛樿揣鍒嗙被缂栫爜', hide: true}
+ ,{field: 'color', align: 'center',title: '瀛樿揣鍒嗙被鍚嶇О', hide: true}
+ ,{field: 'unit', align: 'center',title: '璁¢噺鍗曚綅', hide: true}
+ ,{field: 'price', align: 'center',title: '杩涢」绋�', hide: true}
+ ,{field: 'units', align: 'center',title: '閿�椤圭◣', hide: true}
+ ,{field: 'dsDate', align: 'center',title: '鍚敤鏃ユ湡', hide: true}
+ ,{field: 'supp', align: 'center',title: '寤烘。浜�', hide: true}
+ ,{field: 'dInvCreateDatetime', align: 'center',title: '寤烘。鏃ユ湡', hide: true}
+
+ // ,{field: 'specs', align: 'center',title: '瑙勬牸'}
+ // ,{field: 'weight', align: 'center',title: '搴撲綅鎬婚噸閲�', hide: false}
+ //
+ // ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true, hide: true}
+ // ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ // ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
+ // ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
+ // ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ // ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+ // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
+ // ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
+ // ,{field: 'sku', align: 'center',title: 'sku', hide: true}
+ // ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true}
+ // ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
+ // ,{field: 'origin', align: 'center',title: '浜у湴', hide: true}
+ // ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+ // ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
+ // ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+ // ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+ // ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+ // ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+ // ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+ // ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+ // ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+ // ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+ // ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+ // ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+ // ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+ // ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+ // ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+ // ,{field: 'owner$', align: 'center',title: '璐т富', hide: false}
+ // ,{field: 'status$', align: 'center',title: '鏄庣粏閿�', hide: false}
+ // ,{field: 'payment$', align: 'center',title: '璐х墿褰㈡��', hide: false}
+
+ ];
+
+ // cols.push.apply(cols, detlCols);
+ cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',hide: true}
+ ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
+ )
+ 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;
+
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#locDetl',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/manLocDetl/list/auth',
+ page: true,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [getCol()],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
+ },
+ parseData: function (res) {
+ console.log(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;
+ limit();
+ form.on('checkbox(tableCheckbox)', function (data) {
+ var _index = $(data.elem).attr('table-index')||0;
+ if(data.elem.checked){
+ res.data[_index][data.value] = 'Y';
+ }else{
+ res.data[_index][data.value] = 'N';
+ }
+ });
+ }
+ });
+
+ // 鐩戝惉鎺掑簭浜嬩欢
+ table.on('sort(locDetl)', 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(locDetl)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch(obj.event) {
+ case 'addData':
+ layer.open({
+ type: 2,
+ title: '鏂板',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: 'locDetl_detail.html',
+ success: function(layero, index){
+ layer.getChildFrame('#data-detail-submit-edit', index).hide();
+ clearFormVal(layer.getChildFrame('#detail', index));
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ }
+ });
+ break;
+ case 'refreshData':
+ tableIns.reload({
+ page: {
+ curr: pageCurr
+ }
+ });
+ limit();
+ break;
+ case 'deleteData':
+ var data = checkStatus.data;
+ if (data.length === 0){
+ layer.msg('璇烽�夋嫨鏁版嵁');
+ } else {
+ layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
+ $.ajax({
+ url: baseUrl+"/locDetl/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();
+ tableReload(false);
+ } 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 = {
+ 'locDetl': exportData,
+ 'fields': fields
+ };
+ var loadIndex = layer.msg('姝e湪瀵煎嚭...', {icon: 16, shade: 0.01, time: false});
+ $.ajax({
+ url: baseUrl+"/locDetl/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.close(loadIndex);
+ 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(locDetl)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ // 璇︽儏
+ case 'detail':
+ layer.open({
+ type: 2,
+ title: '璇︽儏',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: 'locDetl_detail.html',
+ success: function(layero, index){
+ setFormVal(layer.getChildFrame('#detail', index), data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ }
+ });
+ break;
+ // 缂栬緫
+ case 'edit':
+ layer.open({
+ type: 2,
+ title: '淇敼',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: 'locDetl_detail.html',
+ success: function(layero, index){
+ layer.getChildFrame('#data-detail-submit-save', index).hide();
+ setFormVal(layer.getChildFrame('#detail', index), data, false);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
+ top.convertDisabled(layer.getChildFrame('#locNo,#matnr', index), true);
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ }
+ });
+ break;
+ case 'locNo':
+ var param = top.reObject(data).locNo;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: '搴撲綅鍙疯鎯�',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../locMast/locMast_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/locMast/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+ case 'modiUser':
+ var param = top.reObject(data).modiUser;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: '淇敼浜哄憳璇︽儏',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+ case 'appeUser':
+ var param = top.reObject(data).appeUser;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: '鍒涘缓鑰呰鎯�',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+
+ }
+ });
+
+ // 鏁版嵁淇濆瓨鍔ㄤ綔
+ 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(),
+ locNo: $('#locNo').val(),
+ matnr: $('#matnr').val(),
+ lgnum: $('#lgnum').val(),
+ tbnum: $('#tbnum').val(),
+ tbpos: $('#tbpos').val(),
+ zmatid: $('#zmatid').val(),
+ maktx: $('#maktx').val(),
+ werks: $('#werks').val(),
+ anfme: $('#anfme').val(),
+ altme: $('#altme').val(),
+ zpallet: $('#zpallet').val(),
+ bname: $('#bname').val(),
+ memo: $('#memo').val(),
+ modiUser: $('#modiUser').val(),
+ modiTime: top.strToDate($('#modiTime\\$').val()),
+ appeUser: $('#appeUser').val(),
+ appeTime: top.strToDate($('#appeTime\\$').val()),
+
+ };
+ $.ajax({
+ url: baseUrl+"/locDetl/"+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: '#modiTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '#appeTime\\$',
+ 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
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ if (res.data.length === 0 && count !== 0) {
+ tableIns.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr-1
+ }
+ });
+ pageCurr -= 1;
+ }
+ limit(child);
+ }
+ });
+}
+
+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/static/js/node/node.js b/src/main/webapp/static/js/node/node.js
new file mode 100644
index 0000000..e53d167
--- /dev/null
+++ b/src/main/webapp/static/js/node/node.js
@@ -0,0 +1,370 @@
+var insTb;
+var admin;
+var areas;
+var matXmSelect;
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).extend({
+ dropdown: 'dropdown/dropdown',
+}).use(['form','treeTable', 'admin', 'xmSelect', 'dropdown', 'element','layer'], function() {
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var form = layui.form;
+ admin = layui.admin;
+ var treeTable = layui.treeTable;
+ var xmSelect = layui.xmSelect;
+ var tbDataList = [];
+
+ insTb = treeTable.render({
+ elem: '#node',
+ url: baseUrl+'/node/list/tree/auth',
+ headers: {token: localStorage.getItem('token')},
+ height: 'full-200',
+ toolbar: '#toolbar',
+ treeLinkage:false,
+ tree: {
+ iconIndex: 2, // 鎶樺彔鍥炬爣鏄剧ず鍦ㄧ鍑犲垪
+ isPidData: true, // 鏄惁鏄痠d銆乸id褰㈠紡鏁版嵁
+ idName: 'id', // id瀛楁鍚嶇О
+ pidName: 'parentId' // pid瀛楁鍚嶇О
+ },
+ cols: [[
+ {type: 'checkbox'},
+ {type: 'numbers'}
+ ,{field: 'name', align: 'left',title: '缂栧彿/鍚嶇О', minWidth: 150}
+ // ,{field: 'uuid', left: 'center',title: '缂栧彿/鍚嶇О', minWidth: 150}
+ ,{field: 'type$', align: 'center',title: '绫诲瀷', templet: '#typeTpl'}
+ // ,{field: 'leading', align: 'center',title: '璐熻矗浜�'}
+ // ,{field: 'img', align: 'center',title: '鍥剧墖', hide: true}
+ // ,{field: 'brief', align: 'center',title: '绠�瑕佹弿杩�'}
+ // ,{field: 'count', align: 'center',title: '鏁伴噺'}
+ // ,{field: 'sort', align: 'center',title: '鎺掑簭'}
+ ,{field: 'status$', align: 'center',title: '鐘舵��', hide: true}
+ ,{field: 'row1$', align: 'center',title: '鎺�'}
+ ,{field: 'bay1$', align: 'center',title: '鍒�'}
+ ,{field: 'lev1$', align: 'center',title: '灞�'}
+ ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
+ ,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳'}
+ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+
+ ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
+ ]],
+ done: function (data) {
+ console.log(data)
+ $('.ew-tree-table-box').css('height', '100%');
+ insTb.expandAll();
+ tbDataList = data;
+
+ }
+ });
+
+ /* 琛ㄦ牸澶村伐鍏锋爮鐐瑰嚮浜嬩欢 */
+ treeTable.on('toolbar(node)', function (obj) {
+ var checkRows = insTb.checkStatus();
+ if (obj.event === 'add') { // 娣诲姞
+ showEditModel();
+ } else if (obj.event === 'del') { // 鍒犻櫎
+ if (checkRows.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+ return;
+ }
+ var ids = checkRows.map(function (d) {
+ if (!d.LAY_INDETERMINATE) {
+ return d.id;
+ } else {
+ return null;
+ }
+ });
+ doDel({ids: ids});
+ } else if (obj.event === 'printBatch') {
+ if (checkRows.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佹墦鍗扮殑鏁版嵁', {icon: 2});
+ return;
+ }
+ var printContent = checkRows.map(function (d) {
+ if (!d.LAY_INDETERMINATE && d.type === 3) {
+ return d.name;
+ } else {
+ return null;
+ }
+ });
+ printBatch(printContent, 1);
+ }else if (obj.event === 'nodeInit'){
+ nodeInit();
+ }
+ });
+
+ /* 琛ㄦ牸鎿嶄綔鍒楃偣鍑讳簨浠� */
+ treeTable.on('tool(node)', function (obj) {
+ if (obj.event === 'edit') { // 淇敼
+ showEditModel(obj.data);
+ } else if (obj.event === 'del') { // 鍒犻櫎
+ doDel(obj);
+ }
+ });
+
+ /* 鏄剧ず琛ㄥ崟寮圭獥 */
+ function showEditModel(mData) {
+ admin.open({
+ type: 1,
+ area: '600px',
+ title: (mData ? '淇敼' : '娣诲姞') + '璐т綅',
+ content: $('#editDialog').html(),
+ success: function (layero, dIndex) {
+ // 鍥炴樉琛ㄥ崟鏁版嵁
+ form.val('detail', mData);
+ // 琛ㄥ崟鎻愪氦浜嬩欢
+ form.on('submit(editSubmit)', function (data) {
+ data.field.parentId = insXmSel.getValue('valueStr');
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/node/"+(mData?'update':'add')+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: data.field,
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.close(dIndex);
+ layer.msg(res.msg, {icon: 1});
+ insTb.refresh();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ return false;
+ });
+ // 娓叉煋涓嬫媺鏍�
+ var insXmSel = xmSelect.render({
+ el: '#nodeParentSel',
+ height: '250px',
+ data: insTb.options.data,
+ initValue: mData ? [mData.parentId] : [],
+ model: {label: {type: 'text'}},
+ prop: {
+ name: 'name',
+ value: 'id'
+ },
+ radio: true,
+ clickClose: true,
+ tree: {
+ show: true,
+ indent: 15,
+ strict: false,
+ expandedKeys: true
+ }
+ });
+ // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ }
+ });
+ }
+
+ /* 鍒犻櫎 */
+ function doDel(obj) {
+ layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+ skin: 'layui-layer-admin',
+ shade: .1
+ }, function (i) {
+ layer.close(i);
+ var loadIndex = layer.load(2);
+ var ids;
+ if (obj.data) {
+ ids = [];
+ ids[0] = obj.data.id;
+ } else {
+ ids = obj.ids;
+ }
+ $.ajax({
+ url: baseUrl+"/node/delete0/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {ids: ids},
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1});
+ insTb.refresh();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ });
+ }
+
+ // 鎵归噺鎵撳嵃
+ function printBatch(printMsgList, type) {
+ var data = [];
+ for (var i = 0; i<printMsgList.length; i ++) {
+ if (printMsgList[i] != null && printMsgList[i] !== '') {
+ var barcodeUrl;
+ if (type === 1) {
+ barcodeUrl = baseUrl+"/barcode/qrcode/auth?type="+type+"¶m="+printMsgList[i]+"&width="+200+"&height="+70;
+ } else {
+ barcodeUrl = baseUrl+"/barcode/qrcode/auth?type="+type+"¶m="+printMsgList[i]+"&width="+400+"&height="+180;
+ }
+ data.push({
+ item: printMsgList[i],
+ barcodeUrl: barcodeUrl
+ })
+ }
+ }
+ var tpl = $('#locPrintTpl').html();
+ var template = Handlebars.compile(tpl);
+ var html = template({data: data});
+ var box = $("#printBox");
+ box.html(html);
+ box.show();
+ box.print({mediaPrint:true});
+ box.hide();
+ }
+
+
+ function nodeInit(){
+ layer.prompt({title: '璇疯緭鍏ュ彛浠わ紝骞堕噸缃簱浣�', formType: 1, shadeClose: true}, function(pass, idx){
+ http.get(baseUrl+"/node/init/pwd", {pwd: pass}, function (res) {
+ if (res.data) {
+ layer.open({
+ type: 1,
+ title: '鍒濆鍖栧簱浣�',
+ area: ["400px"],
+ maxmin: true,
+ shadeClose: true,
+ content: $("#resetLocDiv"),
+ success: function (layero, index) {
+
+
+ // 娓叉煋鐗╂枡閫夋嫨
+ matXmSelect = xmSelect.render({
+ el: '#mat',
+ style: {
+ width: '200px' ,
+ height: 'auto'
+ },
+ autoRow: true,
+ toolbar: { show: true },
+ filterable: true,
+ remoteSearch: true,
+ radio: true,
+ clickClose: true,
+ remoteMethod: function(val, cb, show){
+ $.ajax({
+ url: baseUrl+"/node/all/get/loc",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ cb(res.data)
+ } else {
+ cb([]);
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ });
+ }
+ })
+ }
+ })
+ } else {
+ layer.msg("鍙d护閿欒");
+ }
+ layer.close(idx);
+ })
+ });
+ }
+
+ // 鍒濆鍖栦繚瀛�
+ form.on('submit(initDo)', function (data) {
+ areas = matXmSelect.getValue();
+ data.field.value = areas[0].value;
+ data.field.name = areas[0].name;
+ console.log(data.field);
+ $.ajax({
+ url: baseUrl+"/node/init/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: data.field,
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ layer.msg(res.msg);
+ layer.closeAll();
+ // tableReload(false);
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ });
+
+
+
+});
+
+// excel瀵煎叆妯℃澘涓嬭浇
+function excelMouldDownload(){
+ layer.load(1, {shade: [0.1,'#fff']});
+ location.href = baseUrl + "/node/excel/import/mould";
+ layer.closeAll('loading');
+}
+
+// excel瀵煎叆
+function importExcel() {
+ $("#importExcel").trigger("click");
+}
+function upload(obj){
+ if(!obj.files) {
+ return;
+ }
+ var file = obj.files[0];
+ admin.confirm('纭鍚屾 [' + file.name +'] 鏂囦欢鍚楋紵', function (index) {
+ layer.load(1, {shade: [0.1,'#fff']});
+ var url = baseUrl + "/node/excel/import/auth";
+ var form = new FormData();
+ form.append("file", file);
+ xhr = new XMLHttpRequest();
+ xhr.open("post", url, true); //post鏂瑰紡锛寀rl涓烘湇鍔″櫒璇锋眰鍦板潃锛宼rue 璇ュ弬鏁拌瀹氳姹傛槸鍚﹀紓姝ュ鐞嗐��
+ xhr.setRequestHeader('token', localStorage.getItem('token'));
+ xhr.onload = uploadComplete; //璇锋眰瀹屾垚
+ xhr.onerror = uploadFailed; //璇锋眰澶辫触
+ xhr.onloadend = function () { // // 涓婁紶瀹屾垚閲嶇疆鏂囦欢娴�
+ layer.closeAll('loading');
+ $("#importExcel").val("");
+ };
+ // xhr.upload.onprogress = progressFunction;//銆愪笂浼犺繘搴﹁皟鐢ㄦ柟娉曞疄鐜般��
+ xhr.upload.onloadstart = function(){//涓婁紶寮�濮嬫墽琛屾柟娉�
+ ot = new Date().getTime(); //璁剧疆涓婁紶寮�濮嬫椂闂�
+ oloaded = 0;//璁剧疆涓婁紶寮�濮嬫椂锛屼互涓婁紶鐨勬枃浠跺ぇ灏忎负0
+ };
+ xhr.send(form);
+ }, function(index){
+ $("#importExcel").val("");
+ });
+}
+function uploadComplete(evt) {
+ var res = JSON.parse(evt.target.responseText);
+ if(res.code === 200) {
+ layer.msg(res.msg, {icon: 1});
+ insTb.refresh();
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+}
+function uploadFailed(evt) {
+ var res = JSON.parse(evt.target.responseText);
+ layer.msg(res.msg, {icon: 2});
+}
+
+// excel瀵煎嚭
+function exportExcel() {
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/static/js/nodeLoc/nodeLoc.js b/src/main/webapp/static/js/nodeLoc/nodeLoc.js
new file mode 100644
index 0000000..d144f92
--- /dev/null
+++ b/src/main/webapp/static/js/nodeLoc/nodeLoc.js
@@ -0,0 +1,488 @@
+var pageCurr;
+var printMatCodeNos = [];
+var admin;
+function getCol() {
+ var cols = [
+ {type: 'checkbox'}
+ ,{field: 'tagId$', align: 'center',title: '褰掔被', templet: '#tagTpl'}
+ ];
+ cols.push.apply(cols, matCols);
+ cols.push(
+ {fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150}
+ )
+ return cols;
+}
+
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).extend({
+ dropdown: 'dropdown/dropdown',
+}).use(['table','laydate', 'form', 'treeTable', 'admin', 'xmSelect', 'dropdown', 'element'], function(){
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var layDate = layui.laydate;
+ var form = layui.form;
+ admin = layui.admin;
+ var treeTable = layui.treeTable;
+ var xmSelect = layui.xmSelect;
+
+ // 鍟嗗搧鍒嗙被鏁版嵁
+ var insTb = treeTable.render({
+ elem: '#tag',
+ url: baseUrl+'/node/list/auth',
+ headers: {token: localStorage.getItem('token')},
+ tree: {
+ iconIndex: 2, // 鎶樺彔鍥炬爣鏄剧ず鍦ㄧ鍑犲垪
+ isPidData: true, // 鏄惁鏄痠d銆乸id褰㈠紡鏁版嵁
+ idName: 'id', // id瀛楁鍚嶇О
+ pidName: 'parentId' // pid瀛楁鍚嶇О
+ },
+ cols: [],
+ done: function (data) {
+ $('.ew-tree-table-box').css('height', '100%');
+ insTb.expandAll();
+ }
+ });
+
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#mat',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/node/list/auth',
+ page: true,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ height: 'full-105',
+ cols: [[
+ {type: 'checkbox'},
+ {field: 'name', align: 'center',title: '搴撲綅鍚�', hide: false},
+ {field: 'parentName', align: 'center',title: '搴撳尯', hide: false},
+ {field: 'createBy$', align: 'center',title: '鍒涘缓浜�', hide: false},
+ {field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿', hide: false},
+ {field: 'type$', align: 'center',title: '绫诲瀷', templet: '#tagTpl', hide: false}
+ ]],
+ 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;
+ limit();
+ form.on('checkbox(tableCheckbox)', function (data) {
+ var _index = $(data.elem).attr('table-index')||0;
+ if(data.elem.checked){
+ res.data[_index][data.value] = 'Y';
+ }else{
+ res.data[_index][data.value] = 'N';
+ }
+ });
+ }
+ });
+
+ // 鐩戝惉鎺掑簭浜嬩欢
+ 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(mat)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch(obj.event) {
+ case 'addData':
+ showEditModel()
+ break;
+ case 'deleteData':
+ var data = checkStatus.data;
+ if (data.length === 0){
+ layer.msg('璇烽�夋嫨鏁版嵁');
+ } else {
+ layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
+ $.ajax({
+ url: baseUrl+"/node/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();
+ tableReload(false);
+ } 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 = {
+ 'mat': exportData,
+ 'fields': fields
+ };
+ $.ajax({
+ url: baseUrl+"/node/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;
+ // 鎵归噺鎵撳嵃
+ case "btnPrintBatch":
+ printMatCodeNos = [];
+ var data = checkStatus.data;
+ if (data.length === 0){
+ layer.msg('璇烽�夋嫨鎵撳嵃鏁版嵁');
+ } else {
+ layer.open({
+ type: 1,
+ title: '鎵归噺鎵撳嵃 [鏁伴噺'+ data.length +']',
+ area: ['500px'],
+ shadeClose: true,
+ content: $('#printDataDiv'),
+ success: function(layero, index){
+ for (var i = 0; i<data.length;i++) {
+ printMatCodeNos.push(data[i].matnr);
+ }
+ },
+ end: function () {
+ }
+ });
+ }
+ break;
+ }
+ });
+
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(mat)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ // 鎵撳嵃
+ case "btnPrint":
+ printMatCodeNos = [];
+ layer.open({
+ type: 1,
+ title: data.matnr + ' [鏁伴噺锛�1]',
+ area: ['500px'],
+ shadeClose: true,
+ content: $('#printDataDiv'),
+ success: function(layero, index){
+ layer.iframeAuto(index);
+ printMatCodeNos.push(data.matnr);
+ },
+ end: function () {
+ }
+ });
+ break;
+ // 缂栬緫
+ case 'edit':
+ showEditModel(data)
+ break;
+ }
+ });
+
+ /* 鏄剧ず琛ㄥ崟寮圭獥 */
+ function showEditModel(mData) {
+ admin.open({
+ type: 1,
+ area: '600px',
+ title: (mData ? '淇敼' : '娣诲姞') + '鍟嗗搧',
+ content: $('#editDialog').html(),
+ success: function (layero, dIndex) {
+ // 鍥炴樉琛ㄥ崟鏁版嵁
+ form.val('detail', mData);
+ // 鏂板鑷姩鐢熸垚鍟嗗搧缂栧彿
+ if (!mData) {
+ http.get(baseUrl + "/node/auto/matnr/auth", null, function (res) {
+ $('#matnr').val(res.data);
+ })
+ }
+ // 琛ㄥ崟鎻愪氦浜嬩欢
+ form.on('submit(editSubmit)', function (data) {
+ console.log(data)
+ data.field.tagId = insXmSel.getValue('valueStr');
+ if (isEmpty(data.field.tagId)) {
+ layer.msg('鍒嗙被涓嶈兘涓虹┖', {icon: 2});
+ return false;
+ }
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/node/"+(mData?'update':'add')+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: data.field,
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.close(dIndex);
+ layer.msg(res.msg, {icon: 1});
+ $(".layui-laypage-btn")[0].click();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ return false;
+ });
+ // 娓叉煋涓嬫媺鏍�
+ var insXmSel = xmSelect.render({
+ el: '#tagSel',
+ height: '250px',
+ data: insTb.options.data,
+ initValue: mData ? [mData.tagId] : [],
+ model: {label: {type: 'text'}},
+ prop: {
+ name: 'name',
+ value: 'id'
+ },
+ radio: true,
+ clickClose: true,
+ tree: {
+ show: true,
+ indent: 15,
+ strict: false,
+ expandedKeys: true
+ }
+ });
+ // 寮圭獥涓嶅嚭鐜版粴鍔ㄦ潯
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ }
+ });
+ }
+
+ // 妯℃澘閫夋嫨
+ form.on('radio(selectTemplateRadio)', function (data) {
+ $('.template-preview').hide();
+ $('#template-preview-'+data.value).show();
+ });
+
+ // 寮�濮嬫墦鍗�
+ form.on('submit(doPrint)', function (data) {
+ var templateNo = data.field.selectTemplate;
+ $.ajax({
+ url: baseUrl+"/node/print/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {param: printMatCodeNos},
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ layer.closeAll();
+ for (let i=0;i<res.data.length;i++){
+ var templateDom = $("#templatePreview"+templateNo);
+ var className = templateDom.attr("class");
+ if (className === 'template-barcode') {
+ res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=1¶m="+res.data[i].matnr;
+ } else {
+ res.data[i]["barcodeUrl"]=baseUrl+"/mac/code/auth?type=2¶m="+res.data[i].matnr;
+ }
+ }
+ var tpl = templateDom.html();
+ var template = Handlebars.compile(tpl);
+ var html = template(res);
+ var box = $("#box");
+ box.html(html);box.show();
+ box.print({mediaPrint:true});
+ box.hide();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ });
+
+ // 鎼滅储鏍忔悳绱簨浠�
+ 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'
+ });
+
+
+});
+
+// excel瀵煎叆妯℃澘涓嬭浇
+function excelMouldDownload(){
+ layer.load(1, {shade: [0.1,'#fff']});
+ location.href = baseUrl + "/node/excel/import/mould";
+ layer.closeAll('loading');
+}
+
+// excel瀵煎叆
+function importExcel() {
+ $("#importExcel").trigger("click");
+}
+function upload(obj){
+ if(!obj.files) {
+ return;
+ }
+ var file = obj.files[0];
+ admin.confirm('纭鍚屾 [' + file.name +'] 鏂囦欢鍚楋紵', function (index) {
+ layer.load(1, {shade: [0.1,'#fff']});
+ var url = baseUrl + "/node/excel/import/auth";
+ var form = new FormData();
+ form.append("file", file);
+ xhr = new XMLHttpRequest();
+ xhr.open("post", url, true); //post鏂瑰紡锛寀rl涓烘湇鍔″櫒璇锋眰鍦板潃锛宼rue 璇ュ弬鏁拌瀹氳姹傛槸鍚﹀紓姝ュ鐞嗐��
+ xhr.setRequestHeader('token', localStorage.getItem('token'));
+ xhr.onload = uploadComplete; //璇锋眰瀹屾垚
+ xhr.onerror = uploadFailed; //璇锋眰澶辫触
+ xhr.onloadend = function () { // // 涓婁紶瀹屾垚閲嶇疆鏂囦欢娴�
+ layer.closeAll('loading');
+ $("#importExcel").val("");
+ };
+ // xhr.upload.onprogress = progressFunction;//銆愪笂浼犺繘搴﹁皟鐢ㄦ柟娉曞疄鐜般��
+ xhr.upload.onloadstart = function(){//涓婁紶寮�濮嬫墽琛屾柟娉�
+ ot = new Date().getTime(); //璁剧疆涓婁紶寮�濮嬫椂闂�
+ oloaded = 0;//璁剧疆涓婁紶寮�濮嬫椂锛屼互涓婁紶鐨勬枃浠跺ぇ灏忎负0
+ };
+ xhr.send(form);
+ }, function(index){
+ $("#importExcel").val("");
+ });
+}
+function uploadComplete(evt) {
+ var res = JSON.parse(evt.target.responseText);
+ if(res.code === 200) {
+ layer.msg(res.msg, {icon: 1});
+ loadTree("");
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+}
+function uploadFailed(evt) {
+ var res = JSON.parse(evt.target.responseText);
+ layer.msg(res.msg, {icon: 2});
+}
+
+// excel瀵煎嚭
+function exportExcel() {
+
+}
+
+
+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
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ if (res.data.length === 0 && count !== 0) {
+ tableIns.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr-1
+ }
+ });
+ pageCurr -= 1;
+ }
+ limit(child);
+ }
+ });
+}
+
+function clearFormVal(el) {
+ $(':input', el)
+ .val('')
+ .removeAttr('checked')
+ .removeAttr('selected');
+}
+
+$('body').keydown(function () {
+ if (event.keyCode === 13) {
+ $("#search").click();
+ }
+});
diff --git a/src/main/webapp/static/js/nodeLoc/nodeLocTree.js b/src/main/webapp/static/js/nodeLoc/nodeLocTree.js
new file mode 100644
index 0000000..72b511e
--- /dev/null
+++ b/src/main/webapp/static/js/nodeLoc/nodeLocTree.js
@@ -0,0 +1,86 @@
+var currentTemId;
+var currentTemName;
+var currentTemSsbm;
+var init = false;
+
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/" // 閰嶇疆妯″潡鎵�鍦ㄧ殑鐩綍
+}).use(['table','laydate', 'form', 'tree', 'xmSelect'], function() {
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var layDate = layui.laydate;
+ var form = layui.form;
+ var tree = layui.tree;
+ var xmSelect = layui.xmSelect;
+ var selObj, treeData; // 宸︽爲閫変腑鏁版嵁
+
+ var organizationTree;
+ window.loadTree = function(condition){
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/node/tree/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {
+ 'condition': condition
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200){
+ layer.close(loadIndex);
+ // 鏍戝舰鍥�
+ organizationTree = tree.render({
+ elem: '#organizationTree',
+ id: 'organizationTree',
+ onlyIconControl: true,
+ data: res.data,
+ click: function (obj) {
+ currentTemId = obj.data.id;
+ currentTemName = obj.data.title.split(" - ")[0];
+ currentTemSsbm = obj.data.title.split(" - ")[1];
+ selObj = obj;
+ $('#organizationTree').find('.ew-tree-click').removeClass('ew-tree-click');
+ $(obj.elem).children('.layui-tree-entry').addClass('ew-tree-click');
+ tableIns.reload({
+ where: {parent_id: obj.data.id},
+ page: {curr: 1}
+ });
+ }
+ });
+ treeData = res.data;
+ if (isEmpty(condition) && init) {
+ tableIns.reload({
+ where: {parent_id: ""},
+ page: {curr: 1}
+ });
+ }
+ if (!init) {
+ init = true;
+ }
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ loadTree();
+
+ /* 鏍戝舰鍥鹃噸缃� */
+ $('#treeReset').click(function () {
+ $("#condition").val("");
+ loadTree("");
+ })
+
+})
+
+function closeDialog() {
+ layer.closeAll();
+}
+
+/* 鏍戝舰鍥炬悳绱� */
+function findData(el) {
+ var condition = $(el).val();
+ loadTree(condition)
+}
\ No newline at end of file
diff --git a/src/main/webapp/static/js/pakStore/stockAdjust.js b/src/main/webapp/static/js/pakStore/stockAdjust.js
index 52d8db1..f6be988 100644
--- a/src/main/webapp/static/js/pakStore/stockAdjust.js
+++ b/src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -7,10 +7,15 @@
var cols = [
{fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
,{field: 'anfme', align: 'center',title: '鏁伴噺'}
- ,{field: 'batch', align: 'center',title: '搴忓垪鐮侊紙缂栬緫锛�', edit: true, style: 'font-weight:bold'}
+ ,{field: 'batch', align: 'center',title: '搴忓垪鐮�', edit: true, style: 'font-weight:bold'}
+ ,{field: 'threeCode', align: 'center',title: '閿�鍞鍗曞彿', edit: true, style: 'font-weight:bold'}
+ ,{field: 'deadTime', align: 'center',title: '閿�鍞鍗曡鍙�', edit: true, style: 'font-weight:bold'}
];
+ arrRemove(detlCols, "field", "zpallet");
arrRemove(detlCols, "field", "anfme");
arrRemove(detlCols, "field", "batch");
+ arrRemove(detlCols, "field", "threeCode");
+ arrRemove(detlCols, "field", "dead_time");
cols.push.apply(cols, detlCols);
cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
return cols;
diff --git a/src/main/webapp/static/js/saas/locDetl.js b/src/main/webapp/static/js/saas/locDetl.js
new file mode 100644
index 0000000..9bd259e
--- /dev/null
+++ b/src/main/webapp/static/js/saas/locDetl.js
@@ -0,0 +1,557 @@
+var pageCurr;
+function getCol() {
+ var cols = [
+ {field: 'locNo', align: 'center',title: '搴撲綅鍙�'},
+ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿', sort:true}
+ ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true}
+ ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false, hide: true}
+ ,{field: 'batch', align: 'center',title: '鎵瑰彿', width: 300, sort:true , hide: true}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: true}
+ ,{field: 'specs', align: 'center',title: '閰嶇疆' , hide: true}
+ ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
+ ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
+ ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
+ ,{field: 'sku', align: 'center',title: 'sku', hide: true}
+ ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true}
+ ,{field: 'barcode', align: 'center',title: '鏉$爜', hide: true}
+ ,{field: 'origin', align: 'center',title: '浜у湴', hide: true}
+ ,{field: 'manu', align: 'center',title: '鍘傚', hide: true}
+ ,{field: 'manuDate', align: 'center',title: '鐢熶骇鏃ユ湡', hide: true}
+ ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
+ ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
+ ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
+ ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
+ ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
+ ,{field: 'threeCode', align: 'center',title: '绠卞瓙灏哄', hide: true}
+ ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+ ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: true}
+ ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
+ ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
+ ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
+ ,{field: 'source$', align: 'center',title: '鍒惰喘', hide: true}
+ ,{field: 'check$', align: 'center',title: '瑕佹眰妫�楠�', hide: true}
+ ,{field: 'danger$', align: 'center',title: '鍗遍櫓鍝�', hide: true}
+
+ ];
+
+ // cols.push.apply(cols, detlCols);
+ cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳',hide: true}
+ ,{field: 'modiTime$', 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;
+
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#locDetl',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/manLocDetl/asrsAndSaas/list',
+ page: true,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ 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;
+ limit();
+ form.on('checkbox(tableCheckbox)', function (data) {
+ var _index = $(data.elem).attr('table-index')||0;
+ if(data.elem.checked){
+ res.data[_index][data.value] = 'Y';
+ }else{
+ res.data[_index][data.value] = 'N';
+ }
+ });
+ }
+ });
+
+ // 鐩戝惉鎺掑簭浜嬩欢
+ table.on('sort(locDetl)', 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(locDetl)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch(obj.event) {
+ case 'addData':
+ layer.open({
+ type: 2,
+ title: '鏂板',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: 'locDetl_detail.html',
+ success: function(layero, index){
+ layer.getChildFrame('#data-detail-submit-edit', index).hide();
+ clearFormVal(layer.getChildFrame('#detail', index));
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ }
+ });
+ break;
+ case 'refreshData':
+ tableIns.reload({
+ page: {
+ curr: pageCurr
+ }
+ });
+ limit();
+ break;
+ case 'deleteData':
+ var data = checkStatus.data;
+ if (data.length === 0){
+ layer.msg('璇烽�夋嫨鏁版嵁');
+ } else {
+ layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
+ $.ajax({
+ url: baseUrl+"/locDetl/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();
+ tableReload(false);
+ } 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 = {
+ 'locDetl': exportData,
+ 'fields': fields
+ };
+ var loadIndex = layer.msg('姝e湪瀵煎嚭...', {icon: 16, shade: 0.01, time: false});
+ $.ajax({
+ url: baseUrl+"/locDetl/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.close(loadIndex);
+ 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(locDetl)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ // 璇︽儏
+ case 'detail':
+ layer.open({
+ type: 2,
+ title: '璇︽儏',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: 'locDetl_detail.html',
+ success: function(layero, index){
+ setFormVal(layer.getChildFrame('#detail', index), data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ }
+ });
+ break;
+ // 缂栬緫
+ case 'edit':
+ layer.open({
+ type: 2,
+ title: '淇敼',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: 'locDetl_detail.html',
+ success: function(layero, index){
+ layer.getChildFrame('#data-detail-submit-save', index).hide();
+ setFormVal(layer.getChildFrame('#detail', index), data, false);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false);
+ top.convertDisabled(layer.getChildFrame('#locNo,#matnr', index), true);
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ }
+ });
+ break;
+ case 'locNo':
+ var param = top.reObject(data).locNo;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: '搴撲綅鍙疯鎯�',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../locMast/locMast_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/locMast/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+ case 'modiUser':
+ var param = top.reObject(data).modiUser;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: '淇敼浜哄憳璇︽儏',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+ case 'appeUser':
+ var param = top.reObject(data).appeUser;
+ if (param === undefined) {
+ layer.msg("鏃犳暟鎹�");
+ } else {
+ layer.open({
+ type: 2,
+ title: '鍒涘缓鑰呰鎯�',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: false,
+ content: '../user/user_detail.html',
+ success: function(layero, index){
+ $.ajax({
+ url: baseUrl+"/user/"+ param +"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ method: 'GET',
+ success: function (res) {
+ if (res.code === 200){
+ setFormVal(layer.getChildFrame('#detail', index), res.data, true);
+ top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true);
+ layer.getChildFrame('#data-detail-submit-save,#data-detail-submit-edit,#prompt', index).hide();
+ layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"});
+ layero.find('iframe')[0].contentWindow.layui.form.render('select');
+ layero.find('iframe')[0].contentWindow.layui.form.render('checkbox');
+ } else if (res.code === 403){
+ parent.location.href = "/";
+ }else {
+ layer.msg(res.msg)
+ }
+ }
+ })
+ }
+ });
+ }
+ break;
+
+ }
+ });
+
+ // 鏁版嵁淇濆瓨鍔ㄤ綔
+ 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(),
+ locNo: $('#locNo').val(),
+ matnr: $('#matnr').val(),
+ lgnum: $('#lgnum').val(),
+ tbnum: $('#tbnum').val(),
+ tbpos: $('#tbpos').val(),
+ zmatid: $('#zmatid').val(),
+ maktx: $('#maktx').val(),
+ werks: $('#werks').val(),
+ anfme: $('#anfme').val(),
+ altme: $('#altme').val(),
+ zpallet: $('#zpallet').val(),
+ bname: $('#bname').val(),
+ memo: $('#memo').val(),
+ modiUser: $('#modiUser').val(),
+ modiTime: top.strToDate($('#modiTime\\$').val()),
+ appeUser: $('#appeUser').val(),
+ appeTime: top.strToDate($('#appeTime\\$').val()),
+
+ };
+ $.ajax({
+ url: baseUrl+"/locDetl/"+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: '#modiTime\\$',
+ type: 'datetime'
+ });
+ layDate.render({
+ elem: '#appeTime\\$',
+ 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
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ if (res.data.length === 0 && count !== 0) {
+ tableIns.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr-1
+ }
+ });
+ pageCurr -= 1;
+ }
+ limit(child);
+ }
+ });
+}
+
+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/static/js/saas/locMove.js b/src/main/webapp/static/js/saas/locMove.js
new file mode 100644
index 0000000..fb558bf
--- /dev/null
+++ b/src/main/webapp/static/js/saas/locMove.js
@@ -0,0 +1,135 @@
+var pageCurr = 0;
+var tableIns;
+function getCol() {
+ var cols = [
+ {field: 'locNo', align: 'center',title: '搴撲綅鍙�', merge: true, style: 'font-weight: bold'}
+ ];
+ cols.push.apply(cols, detlCols);
+ return cols;
+}
+
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).use(['table','laydate', 'form', 'tableMerge'], function() {
+ var table = layui.table;
+ var $ = layui.jquery;
+ var form = layui.form;
+ var tableMerge = layui.tableMerge;
+
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#locMatCode',
+ headers: {token: localStorage.getItem('token')},
+ // url: baseUrl+'/locDetl/list/auth',
+ data:[],
+ page: true,
+ limit: 16,
+ limits: [16, 50, 100, 200, 500],
+ even: true,
+ 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) {
+ tableMerge.render(this);
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ limit();
+ clearSelect();
+ }
+ });
+
+});
+
+// 鎼滅储搴撲綅鐗╂枡
+function getLoc(el) {
+ tableIns.reload({
+ url: baseUrl+'/manLocDetl/list'
+ , where: {loc_no: el.value}
+ , done:function (res) {
+ limit();
+ clearSelect();
+ // 鑾峰彇鍚屼竴鍫嗗灈鏈虹殑绌哄簱浣�
+ http.post(baseUrl + "/work/empty/stock", {sourceLocNo: el.value}, function (res) {
+ if (res.data != null) {
+ var tpl = $("#emptyLocStock").html();
+ var template = Handlebars.compile(tpl);
+ var html = template(res);
+ $('#targetLocNo').append(html);
+ layui.form.render('select');
+ }
+ });
+ }
+ });
+}
+
+// 绉诲簱鍚姩
+function locMove() {
+ var sourceLocNo = $("#sourceLocNo").val();
+ var targetLocNo = $("#targetLocNo").val();
+ if (sourceLocNo === null || sourceLocNo === ""){
+ $("#sourceLocNo").css("border-color", "red");
+ setTimeout(function () {
+ $("#sourceLocNo").css("border-color", "#b8b8b8");
+ }, 1000);
+ layer.msg("璇疯緭鍏ユ簮搴撲綅");
+ return;
+ }
+ if (targetLocNo === null || targetLocNo === "") {
+ $(".layui-select-title .layui-input").css("border-color", "red");
+ setTimeout(function () {
+ $(".layui-select-title .layui-input").css("border-color", "#b8b8b8");
+ }, 1000);
+ layer.msg("璇疯緭鍏ョ洰鏍囧簱浣�");
+ return;
+ }
+ $.ajax({
+ url: baseUrl + "/work/move/start",
+ headers: {'token': localStorage.getItem('token')},
+ dataType: 'json',
+ data: {
+ sourceLocNo: sourceLocNo,
+ targetLocNo: targetLocNo
+ },
+ method: 'POST',
+ success: function (res) {
+ if (res.code === 200) {
+ $("#sourceLocNo").val("");
+ $("#targetLocNo").empty();
+ layui.form.render('select');
+ tableIns.reload({
+ data: [],
+ url: '',
+ done:function (res) {
+ limit();clearSelect();
+ }
+ });
+ layer.msg(res.msg);
+ } else if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ } else {
+ layer.msg(res.msg);
+ }
+ }
+ })
+}
+
+function clearSelect() {
+ $("#targetLocNo").empty();
+ layui.form.render('select');
+}
diff --git a/src/main/webapp/static/js/saas/stockAdjust.js b/src/main/webapp/static/js/saas/stockAdjust.js
new file mode 100644
index 0000000..cb68ae0
--- /dev/null
+++ b/src/main/webapp/static/js/saas/stockAdjust.js
@@ -0,0 +1,243 @@
+var initCountVal = 0;
+var initAnfmeVal = "-";
+var matCodeData = [];
+var currLocNo;
+var matCodeLayerIdx;
+function getCol() {
+ var cols = [
+ {fixed: 'left', field: 'count', title: '瀹為檯鏁伴噺', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ,{field: 'batch', align: 'center',title: '鎵瑰彿锛堢紪杈戯級', edit: true, style: 'font-weight:bold'}
+ ];
+ arrRemove(detlCols, "field", "anfme");
+ arrRemove(detlCols, "field", "batch");
+ cols.push.apply(cols, detlCols);
+ cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:80})
+ return cols;
+}
+
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).use(['table','laydate', 'form', 'admin'], function() {
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var layDate = layui.laydate;
+ var form = layui.form;
+ var admin = layui.admin;
+
+ tableIns = table.render({
+ elem: '#chooseData',
+ data: [],
+ even: true,
+ limit: 500,
+ cellMinWidth: 50,
+ toolbar: '#toolbar',
+ cols: [getCol()],
+ done: function (res, curr, count) {
+ limit();
+ }
+ });
+
+ // 椤甸潰淇敼
+ table.on('edit(chooseData)', function (obj) {
+ let index = obj.tr.attr("data-index");
+ let data = matCodeData[index];
+ let modify = true;
+ if (obj.field === 'count'){
+ let vle = Number(obj.value);
+ if (isNaN(vle)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2});
+ modify = false;
+ } else {
+ if (vle <= 0) {
+ layer.msg("鏁伴噺蹇呴』澶т簬闆�", {icon: 2});
+ modify = false;
+ }
+ }
+ }
+ if (modify) {
+ data[obj.field] = obj.value;
+ }
+ tableIns.reload({data: matCodeData});
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(chooseData)', function (obj) {
+ switch(obj.event) {
+ case 'adjust':
+ if (isEmpty(currLocNo)) {
+ layer.msg("璇峰厛妫�绱㈠簱浣�", {icon: 2})
+ inputTip($("#searchLocNo"));
+ return;
+ }
+ if (matCodeData.length === 0) {
+ layer.msg("璇峰厛娣诲姞鏄庣粏", {icon: 2});
+ return;
+ }
+ for (var i=0;i<matCodeData.length;i++){
+ if (isNaN(matCodeData[i].count)) {
+ layer.msg("璇疯緭鍏ユ暟瀛�", {icon: 2});
+ return;
+ }
+ if (matCodeData[i].count < 0){
+ layer.msg("鏁伴噺涓嶈兘灏忎簬闆�", {icon: 2});
+ return;
+ }
+ }
+ layer.confirm('纭畾璋冩暣'+currLocNo+'搴撲綅鐨勬槑缁嗗悧锛�', {shadeClose: true}, function(){
+ $.ajax({
+ url: baseUrl+"/manLocDetl/adjust/start",
+ headers: {'token': localStorage.getItem('token')},
+ data: JSON.stringify({
+ locNo: currLocNo,
+ list: matCodeData
+ }),
+ contentType:'application/json;charset=UTF-8',
+ method: 'POST',
+ async: false,
+ success: function (res) {
+ if (res.code === 200){
+ layer.msg(currLocNo + res.msg, {icon: 1});
+ init(currLocNo)
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2})
+ }
+ }
+ })
+ });
+ break;
+ }
+ });
+
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(chooseData)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ case 'remove':
+ let index = obj.tr.attr("data-index");
+ matCodeData.splice(index, 1);
+ tableIns.reload({data: matCodeData});
+ break;
+ }
+ });
+
+ // 妫�绱簨浠�
+ form.on('submit(search)', function (data) {
+ let loc_no = data.field.loc_no;
+ if (loc_no === "") {
+ inputTip($("#searchLocNo"));
+ layer.msg("璇疯緭鍏ュ簱浣嶅彿");
+ return;
+ }
+ init(loc_no);
+ });
+
+ // 閲嶇疆浜嬩欢
+ form.on('submit(reset)', function (data) {
+ reset();
+ });
+
+ function init(locNo) {
+ http.post(baseUrl + "/manLocDetl/list", {loc_no: locNo,limit: 1000}, function (res) {
+ matCodeData = [];
+ matCodeData = res.data.records;
+ for (var i = 0; i<matCodeData.length; i++) {
+ matCodeData[i]["count"] = matCodeData[i]["anfme"];
+ }
+ locTips(true, locNo);
+ tableReload();
+ })
+ }
+
+ function reset() {
+ clearFormVal($('#search-box'));
+ matCodeData = [];
+ tableReload();
+ locTips(false);
+ }
+
+ // 閲嶈浇琛ㄦ牸
+ function tableReload() {
+ tableIns.reload({data: matCodeData});
+ }
+
+ // 搴撲綅鎻愮ず妗�
+ function locTips(retrieve, locNo) {
+ if (retrieve) {
+ http.post(baseUrl+"/node/select/"+locNo+"/auth", null, function (res) {
+ console.log(res);
+ let data = res.data;
+ if (data != null) {
+ $(".retrieve").show();
+ // $("#locMsg").html(locNo + " ,搴撲綅鐘舵�侊細" + data.locSts$);
+ $("#locMsg").html(locNo + " ");
+ $('.not-retrieve').hide();
+ currLocNo = locNo;
+ } else {
+ layer.msg("璇疯緭鍏ユ湁鏁堝簱浣嶅彿", {icon: 2});
+ $('.not-retrieve').show();
+ $("#locMsg").html("");
+ $(".retrieve").hide();
+ currLocNo = null;
+ inputTip($("#searchLocNo"));
+ }
+ })
+ } else {
+ $('.not-retrieve').show();
+ $("#locMsg").html("");
+ $(".retrieve").hide();
+ currLocNo = null;
+ }
+ }
+
+ $(document).on('click','#mat-query', function () {
+ if (isEmpty(currLocNo)) {
+ layer.msg("璇峰厛妫�绱㈠簱浣�")
+ inputTip($("#searchLocNo"));
+ return;
+ }
+ let loadIndex = layer.msg('璇锋眰涓�...', {icon: 16, shade: 0.01, time: false});
+ matCodeLayerIdx = admin.open({
+ type: 2,
+ title: false,
+ closeBtn: false,
+ maxmin: false,
+ area: ['90%', '85%'],
+ shadeClose: true,
+ content: 'matQuery.html',
+ success: function(layero, index){
+ layer.close(loadIndex);
+ }
+ });
+ })
+
+})
+
+// 鎼滅储妗嗙┖鍊兼彁绀�
+function inputTip(el) {
+ el.css("border-color", "red");
+ setTimeout(function () {
+ el.css("border-color", "#b8b8b8");
+ }, 1000);
+}
+
+// 娣诲姞琛ㄦ牸鏁版嵁
+function addTableData(data) {
+ for (let i=0;i<data.length;i++){
+ for (let j=0;j<matCodeData.length;j++){
+ if (data[i].matnr === matCodeData[j].matnr && data[i].batch === matCodeData[j].batch) {
+ data.splice(i, 1);
+ break;
+ } else {
+ data[i]['anfme'] = initAnfmeVal;
+ data[i]['count'] = initCountVal;
+ }
+ }
+ }
+ matCodeData.push.apply(matCodeData, data);
+ tableIns.reload({data: matCodeData});
+ layer.close(matCodeLayerIdx);
+}
diff --git a/src/main/webapp/static/js/saasLog/saasLog.js b/src/main/webapp/static/js/saasLog/saasLog.js
new file mode 100644
index 0000000..1c6c43e
--- /dev/null
+++ b/src/main/webapp/static/js/saasLog/saasLog.js
@@ -0,0 +1,252 @@
+var pageCurr;
+layui.config({
+ base: baseUrl + "/static/layui/lay/modules/"
+}).use(['table','laydate', 'form', 'admin'], function(){
+ var table = layui.table;
+ var $ = layui.jquery;
+ var layer = layui.layer;
+ var layDate = layui.laydate;
+ var form = layui.form;
+ var admin = layui.admin;
+
+ // 鏁版嵁娓叉煋
+ tableIns = table.render({
+ elem: '#saasLog',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl+'/saasLog/list/auth',
+ page: true,
+ limit: 15,
+ limits: [15, 30, 50, 100, 200, 500],
+ // toolbar: '#toolbar',
+ cellMinWidth: 50,
+ height: 'full-120',
+ cols: [[
+ {type: 'checkbox'}
+ ,{field: 'id', align: 'center',title: 'id', hide:true}
+ ,{field: 'locNo', align: 'center',title: '搴撲綅'}
+ ,{field: 'type$', align: 'center',title: '鎿嶄綔绫诲瀷'}
+ ,{field: 'matnr', align: 'center',title: '鐗╂枡鍙�'}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
+ ,{field: 'createByName', align: 'center',title: '鎿嶄綔浜�'}
+ ,{field: 'ioTime$', align: 'center',title: '鎿嶄綔鏃堕棿'}
+ ,{field: 'createBy', align: 'center',title: '', hide:true}
+
+
+ ]],
+ 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;
+ limit();
+ }
+ });
+
+ // 鐩戝惉鎺掑簭浜嬩欢
+ table.on('sort(saasLog)', 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}
+ });
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(saasLog)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id).data;
+ switch(obj.event) {
+ case 'addData':
+ showEditModel();
+ break;
+ case 'deleteData':
+ if (checkStatus.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+ return;
+ }
+ del(checkStatus.map(function (d) {
+ return d.id;
+ }));
+ break;
+ case 'exportData':
+ admin.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 = {
+ 'saasLog': exportData,
+ 'fields': fields
+ };
+ $.ajax({
+ url: baseUrl+"/saasLog/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, {icon: 2})
+ }
+ }
+ });
+ });
+ break;
+ }
+ });
+
+ // 鐩戝惉琛屽伐鍏蜂簨浠�
+ table.on('tool(saasLog)', function(obj){
+ var data = obj.data;
+ switch (obj.event) {
+ case 'edit':
+ showEditModel(data);
+ break;
+ case "del":
+ del([data.id]);
+ break;
+ }
+ });
+
+ /* 寮圭獥 - 鏂板銆佷慨鏀� */
+ function showEditModel(mData) {
+ admin.open({
+ type: 1,
+ area: '600px',
+ title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
+ content: $('#editDialog').html(),
+ success: function (layero, dIndex) {
+ layDateRender(mData);
+ form.val('detail', mData);
+ form.on('submit(editSubmit)', function (data) {
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/saasLog/"+(mData?'update':'add')+"/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: data.field,
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.close(dIndex);
+ layer.msg(res.msg, {icon: 1});
+ tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ }else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ return false;
+ });
+ $(layero).children('.layui-layer-content').css('overflow', 'visible');
+ layui.form.render('select');
+ }
+ });
+ }
+
+ /* 鍒犻櫎 */
+ function del(ids) {
+ layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+ skin: 'layui-layer-admin',
+ shade: .1
+ }, function (i) {
+ layer.close(i);
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/saasLog/delete/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {ids: ids},
+ method: 'POST',
+ success: function (res) {
+ layer.close(loadIndex);
+ if (res.code === 200){
+ layer.msg(res.msg, {icon: 1});
+ tableReload();
+ } else if (res.code === 403){
+ top.location.href = baseUrl+"/";
+ } else {
+ layer.msg(res.msg, {icon: 2});
+ }
+ }
+ })
+ });
+ }
+
+ // 鎼滅储
+ form.on('submit(search)', function (data) {
+ pageCurr = 1;
+ tableReload(false);
+ });
+
+ // 閲嶇疆
+ form.on('submit(reset)', function (data) {
+ pageCurr = 1;
+ clearFormVal($('#search-box'));
+ tableReload(false);
+ });
+
+ // 鏃堕棿閫夋嫨鍣�
+ function layDateRender(data) {
+ setTimeout(function () {
+ layDate.render({
+ elem: '#ioTime\\$',
+ type: 'datetime',
+ value: data!==undefined?data['ioTime\\$']:null
+ });
+
+ }, 300);
+ }
+ layDateRender();
+
+});
+
+// 鍏抽棴鍔ㄤ綔
+$(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;
+ });
+ tableIns.reload({
+ where: searchData,
+ page: {curr: pageCurr}
+ });
+}
diff --git a/src/main/webapp/views/manLocDetl/manLocDetl.html b/src/main/webapp/views/manLocDetl/manLocDetl.html
new file mode 100644
index 0000000..60039c9
--- /dev/null
+++ b/src/main/webapp/views/manLocDetl/manLocDetl.html
@@ -0,0 +1,136 @@
+<!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/admin.css?v=318" media="all">
+ <link rel="stylesheet" href="../../static/css/cool.css" media="all">
+ <link rel="stylesheet" href="../../static/css/tree.css" media="all">
+ <style>
+ body {
+ color: #595959;
+ background-color: #f5f7f9;
+ }
+ .layui-fluid {
+ padding: 15px;
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ /*margin: 15px 0 35px 0;*/
+ width: 100%;
+ border-width: 1px;
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ height: calc(100vh - 160px);
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ margin: 0;
+ }
+ #search-box {
+ padding: 30px 30px 10px 0px;
+ margin-left: 0px;
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ height: 100%;
+ }
+ </style>
+</head>
+<body>
+
+<div class="layui-fluid">
+ <!-- 宸� -->
+ <div class="layui-row layui-col-space15">
+ <div class="layui-col-md3">
+ <div class="layui-card">
+ <div class="layui-card-body" style="padding: 10px;">
+ <!-- 鏍戝伐鍏锋爮 -->
+ <div class="layui-form toolbar" id="organizationTreeBar">
+ <div class="layui-inline" style="max-width: 200px;">
+ <input id="condition" onkeyup="findData(this)" type="text" class="layui-input" placeholder="璇疯緭鍏ュ叧閿瓧" autocomplete="off">
+ </div>
+ <div class="layui-inline">
+ <button class="layui-btn icon-btn layui-btn-sm" id="treeReset" style="padding: 0 10px;">
+ <i class="layui-icon layui-icon-close"></i>
+ </button>
+ </div>
+ </div>
+ <!-- 鏍� -->
+ <div class="layui-form toolbar" id="organizationTree"></div>
+ </div>
+ </div>
+ </div>
+ <!-- 鍙� -->
+ <div class="layui-col-md9">
+ <div class="layui-card">
+ <div class="layui-card-body" style="padding: 10px;">
+ <!-- 琛ㄦ牸宸ュ叿鏍�2 -->
+ <div id="search-box" class="layui-form toolbar" style="padding-top: 5px">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="padding: 8px 15px 8px 15px">璐т綅:</label>
+ <div class="layui-input-inline">
+ <input name="loc_no" style="width: 120px" class="layui-input" placeholder="杈撳叆璐т綅"/>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="padding: 8px 15px 8px 15px">鍟嗗搧缂栧彿:</label>
+ <div class="layui-input-inline">
+ <input name="matnr" style="width: 120px" class="layui-input" placeholder="杈撳叆鍟嗗搧缂栧彿"/>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="padding: 8px 15px 8px 15px">鍟嗗搧鍚嶇О:</label>
+ <div class="layui-input-inline">
+ <input name="maktx" style="width: 120px" class="layui-input" placeholder="杈撳叆鍟嗗搧鍚嶇О"/>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="padding: 8px 15px 8px 15px">鎵樼洏鐮�:</label>
+ <div class="layui-input-inline">
+ <input name="zpallet" style="width: 120px" class="layui-input" placeholder="杈撳叆鎵樼洏鐮�"/>
+ </div>
+ </div>
+ <div class="layui-inline"> 
+ <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
+ <i class="layui-icon"></i>鎼滅储
+ </button>
+ <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
+ <i class="layui-icon"></i>閲嶇疆
+ </button>
+ </div>
+ </div>
+ <table class="layui-hide" id="locDetl" lay-filter="locDetl"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>-->
+ <!--<button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>-->
+ <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right;margin-right: -10px">瀵煎嚭</button>
+ </div>
+</script>
+<script type="text/html" id="locNoTpl">
+ <span name="locNo" class="layui-badge layui-badge-gray">{{d.locNo}}</span>
+</script>
+<script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">璇︽儏</a>
+ <!-- <a class="layui-btn layui-btn-xs btn-edit" lay-event="edit">缂栬緫</a>-->
+</script>
+
+<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/manLocDetl/manLocDetl.js" charset="utf-8"></script>
+<!--<script type="text/javascript" src="../../static/js/tagTree.js" charset="utf-8"></script>-->
+<script type="text/javascript" src="../../static/js/nodeTree.js" charset="utf-8"></script>
+
+</body>
+</html>
+
diff --git a/src/main/webapp/views/node/node.html b/src/main/webapp/views/node/node.html
new file mode 100644
index 0000000..b049dd7
--- /dev/null
+++ b/src/main/webapp/views/node/node.html
@@ -0,0 +1,203 @@
+<!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/admin.css?v=318" media="all">
+ <link rel="stylesheet" href="../../static/css/cool.css" media="all">
+ <style>
+ #detail {
+ padding: 25px 30px 0 0;
+ }
+ .ew-tree-table-box {
+ height: 100%;
+ }
+ </style>
+</head>
+<body>
+
+<!-- 姝f枃寮�濮� -->
+<div class="layui-fluid">
+ <div class="layui-card">
+ <div class="layui-card-body">
+ <!-- 鏁版嵁琛ㄦ牸 -->
+ <table id="node"></table>
+ </div>
+ </div>
+</div>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container" style="width: 100%">
+ <button lay-event="add" class="layui-btn layui-btn-sm layui-btn-normal icon-btn"><i class="layui-icon"></i>娣诲姞</button>
+ <button lay-event="del" class="layui-btn layui-btn-sm layui-btn-danger icon-btn"><i class="layui-icon"></i>鍒犻櫎</button>
+ <button class="layui-btn layui-btn-sm" id="btn-print-batch" lay-event="printBatch">鎵归噺鎵撳嵃</button>
+ <button class="layui-btn layui-btn-sm layui-btn-warm" id="btn-node-init" lay-event="nodeInit">搴撲綅鍒濆鍖�</button>
+
+ </div>
+</script>
+
+<script type="text/html" id="typeTpl">
+ {{# if( d.type === 1){ }}
+ <span name="type" class="layui-badge layui-badge-red" ><span style="display: none">{{d.number}}</span>浠撳簱</span>
+ {{# } else if(d.type === 2){ }}
+ <span name="type" class="layui-badge layui-badge-blue" ><span style="display: none">{{d.number}}</span>搴撳尯</span>
+ {{# } else if(d.type === 3){ }}
+ <span name="type" class="layui-badge layui-badge-green" ><span style="display: none">{{d.number}}</span>璐т綅</span>
+ {{# } else { }}
+ <span name="type" class="layui-badge layui-badge-gray" ><span style="display: none">{{d.number}}</span>鍏朵粬</span>
+ {{# } }}
+</script>
+
+<script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>
+ <a class="layui-btn layui-btn-danger layui-btn-xs btn-del" lay-event="del">鍒犻櫎</a>
+</script>
+
+<!-- 琛ㄥ崟寮圭獥 -->
+<script type="text/html" id="editDialog">
+ <form id="detail" lay-filter="detail" class="layui-form">
+ <input name="id" type="hidden">
+ <input name="uuid" type="hidden">
+ <input name="path" type="hidden">
+ <input name="pathName" type="hidden">
+ <input name="level" type="hidden">
+ <input name="sort" type="hidden">
+ <input name="leading" type="hidden">
+ <input name="barcode" type="hidden">
+ <input name="major" type="hidden">
+ <input name="createTime$" type="hidden">
+ <input name="createBy" type="hidden">
+ <input name="updateTime$" type="hidden">
+ <input name="updateBy" type="hidden">
+ <div class="layui-row">
+ <div class="layui-col-md6">
+ <div class="layui-form-item">
+ <label class="layui-form-label">涓婄骇鑿滃崟</label>
+ <div class="layui-input-block">
+ <div id="nodeParentSel" class="ew-xmselect-tree"></div>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">绫诲瀷</label>
+ <div class="layui-input-block">
+ <select name="type" lay-vertype="tips" lay-verify="required" required="">
+ <option value="">璇烽�夋嫨绫诲瀷</option>
+ <option value="1">浠撳簱</option>
+ <option value="2">搴撳尯</option>
+ <option value="3">璐т綅</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="layui-col-md6">
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">缂栧彿/鍚嶇О</label>
+ <div class="layui-input-block">
+ <input name="name" placeholder="璇疯緭鍏ョ紪鍙�/鍚嶇О" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">澶囨敞</label>
+ <div class="layui-input-block">
+ <input name="memo" placeholder="璇疯緭鍏ュ娉�" class="layui-input">
+ </div>
+ </div>
+ </div>
+ </div>
+ <hr class="layui-bg-gray">
+ <div class="layui-form-item text-right">
+ <button class="layui-btn" lay-filter="editSubmit" lay-submit="">淇濆瓨</button>
+ <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
+ </div>
+ </form>
+</script>
+<!-- 鎵撳嵃妯℃澘 -->
+<script type="text/template" id="locPrintTpl">
+ {{#each data}}
+ <img class="template-code" src="{{this.barcodeUrl}}" width="100%">
+ <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
+ <span>{{this.item}}</span>
+ </div>
+ {{/each}}
+</script>
+<div id="printBox" style="display: none;"></div>
+<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/node/node.js" charset="utf-8"></script>
+
+<!-- 閲嶇疆搴撲綅寮圭獥 -->
+<div id="resetLocDiv" style="margin: 20px 0 10px 30px; display: none">
+ <div class="layui-form layui-form-pane">
+
+ <!-- 搴撲綅绫诲瀷 -->
+ <div class="layui-form-item">
+ <label class="layui-form-label">搴撳尯</label>
+ <div class="layui-input-inline">
+ <div id="mat" name="areaId">
+ </div>
+ </div>
+ </div>
+
+ <!-- 鎺� -->
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">璧锋鎺�</label>
+ <div class="layui-input-inline" style="width: 100px;">
+ <input type="text" name="startRow" autocomplete="off" class="layui-input" lay-verify="required|number">
+ </div>
+ <div class="layui-form-mid">-</div>
+ <div class="layui-input-inline" style="width: 100px;">
+ <input type="text" name="endRow" autocomplete="off" class="layui-input" lay-verify="required|number">
+ </div>
+ </div>
+ </div>
+ <!-- 鍒� -->
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">璧锋鍒�</label>
+ <div class="layui-input-inline" style="width: 100px;">
+ <input type="text" name="startBay" autocomplete="off" class="layui-input" lay-verify="required|number">
+ </div>
+ <div class="layui-form-mid">-</div>
+ <div class="layui-input-inline" style="width: 100px;">
+ <input type="text" name="endBay" autocomplete="off" class="layui-input" lay-verify="required|number">
+ </div>
+ </div>
+ </div>
+ <!-- 灞� -->
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">璧锋灞�</label>
+ <div class="layui-input-inline" style="width: 100px;">
+ <input type="text" name="startLev" autocomplete="off" class="layui-input" lay-verify="required|number">
+ </div>
+ <div class="layui-form-mid">-</div>
+ <div class="layui-input-inline" style="width: 100px;">
+ <input type="text" name="endLev" autocomplete="off" class="layui-input" lay-verify="required|number">
+ </div>
+ </div>
+ </div>
+
+
+ <div id="prompt" style="text-indent: 10px;">
+ <span class="not-null">鍒濆鍖栧簱浣嶅悗灏嗗垹闄ゅ簱瀛樻槑缁嗭紝璇疯皑鎱庢搷浣滐紒</span>
+ </div>
+ <!-- 鎸夐挳 -->
+ <div style="text-align: center; margin-top: 20px">
+ <button class="layui-btn layui-btn-radius layui-btn-normal" id="initDo" lay-submit lay-filter="initDo">纭畾</button>
+ </div>
+ </div>
+</div>
+
+
+</body>
+</html>
+
diff --git a/src/main/webapp/views/nodeLoc/nodeLoc.html b/src/main/webapp/views/nodeLoc/nodeLoc.html
new file mode 100644
index 0000000..3b14a5c
--- /dev/null
+++ b/src/main/webapp/views/nodeLoc/nodeLoc.html
@@ -0,0 +1,430 @@
+<!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/admin.css?v=318" media="all">
+ <link rel="stylesheet" href="../../static/css/cool.css" media="all">
+ <link rel="stylesheet" href="../../static/css/tree.css" media="all">
+ <style>
+ body {
+ color: #595959;
+ background-color: #f5f7f9;
+ }
+ .layui-fluid {
+ padding: 15px;
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ /*margin: 15px 0 35px 0;*/
+ width: 100%;
+ border-width: 1px;
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ height: calc(100vh - 160px);
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ margin: 0;
+ }
+ #search-box {
+ padding: 30px 30px 10px 0px;
+ margin-left: 0px;
+ }
+ .layui-form.layui-border-box.layui-table-view {
+ height: 100%;
+ }
+
+ .admin-form {
+ padding: 25px 30px 0 0 !important;
+ margin: 0 !important;
+ }
+
+ /* ------------------------- 鎵撳嵃琛ㄦ牸 ----------------------- */
+ .template-preview {
+ height: 200px;
+ display: inline-block;
+ }
+ .contain td {
+ border: 1px solid #000;
+ /*font-family: 榛戜綋;*/
+ /*font-weight: bold;*/
+ /*color: #000000;*/
+ }
+ </style>
+</head>
+<body>
+
+<div class="layui-fluid">
+ <!-- 宸� -->
+ <div class="layui-row layui-col-space15">
+ <div class="layui-col-md3">
+ <div class="layui-card">
+ <div class="layui-card-body" style="padding: 10px;">
+ <!-- 鏍戝伐鍏锋爮 -->
+ <div class="layui-form toolbar" id="organizationTreeBar">
+ <div class="layui-inline" style="max-width: 200px;">
+ <input id="condition" onkeyup="findData(this)" type="text" class="layui-input" placeholder="璇疯緭鍏ュ叧閿瓧" autocomplete="off">
+ </div>
+ <div class="layui-inline">
+ <button class="layui-btn icon-btn layui-btn-sm" id="treeReset" style="padding: 0 10px">
+ <i class="layui-icon layui-icon-close"></i>
+ </button>
+ </div>
+ </div>
+ <!-- 鏍� -->
+ <div class="layui-form toolbar" id="organizationTree"></div>
+ </div>
+ </div>
+ </div>
+ <!-- 鍙� -->
+ <div class="layui-col-md9">
+ <div class="layui-card">
+ <div class="layui-card-body" style="padding: 10px;">
+ <!-- 琛ㄦ牸宸ュ叿鏍�2 -->
+ <div id="search-box" class="layui-form toolbar" style="padding-top: 5px">
+ <div class="layui-inline">
+ <label class="layui-form-label" style="padding: 8px 15px 8px 15px">搴撳尯:</label>
+ <div class="layui-input-inline">
+ <input name="parent_name" class="layui-input" placeholder="杈撳叆鍟嗗搧缂栧彿"/>
+ </div>
+ </div>
+ <div class="layui-inline"> 
+ <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
+ <i class="layui-icon"></i>鎼滅储
+ </button>
+ <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
+ <i class="layui-icon"></i>閲嶇疆
+ </button>
+ </div>
+ </div>
+ <table class="layui-hide" id="mat" lay-filter="mat"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script type="text/html" id="tagTpl">
+ <span name="tagId" class="layui-badge layui-badge-blue">{{d.type$}}</span>
+</script>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>
+ <!-- 鍟嗗搧/鐗╂枡 鏁版嵁涓績 -->
+<!-- <div class="dropdown-menu" style="float: right">-->
+<!-- <button class="layui-btn layui-btn-primary layui-border-black icon-btn layui-btn-sm"> 鏁版嵁鍚屾 <i class="layui-icon layui-icon-drop"></i></button>-->
+<!-- <ul class="dropdown-menu-nav dark">-->
+<!-- <div class="dropdown-anchor"></div>-->
+<!-- <li class="title">1st menu</li>-->
+<!-- <li><a onclick="excelMouldDownload()" style="font-size: 12px"><i class="layui-icon layui-icon-template-1"></i>妯℃澘涓嬭浇</a></li>-->
+<!-- <li><a onclick="importExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-upload"></i>瀵煎叆 Excel</a></li>-->
+<!-- <li style="display: none"><input id="importExcel" type="file" onchange="upload(this)" ></li>-->
+<!-- <hr>-->
+<!-- <li class="title">2nd menu</li>-->
+<!-- <li><a onclick="exportExcel()" style="font-size: 12px"><i class="layui-icon layui-icon-export"></i>瀵煎嚭 Excel</a></li>-->
+<!-- </ul>-->
+<!-- </div>-->
+ <!-- <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right;margin-right: -10px">瀵煎嚭</button>-->
+ </div>
+</script>
+
+<script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-xs btn-edit layui-btn-primary" lay-event="edit">淇敼</a>
+ <button class="layui-btn layui-btn-xs btn-print" lay-event="btnPrint">鎵撳嵃</button>
+</script>
+
+<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/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/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/nodeLoc/nodeLoc.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/nodeLoc/nodeLocTree.js" charset="utf-8"></script>
+
+<!-- 琛ㄥ崟寮圭獥 -->
+<script type="text/html" id="editDialog">
+ <form id="detail" lay-filter="detail" class="layui-form admin-form">
+ <input name="id" type="hidden">
+ <input name="uuid" type="hidden">
+ <input name="nodeId" type="hidden">
+ <input name="tag_id" type="hidden">
+ <input name="model" type="hidden">
+ <input name="name" type="hidden">
+ <input name="batch" type="hidden">
+ <input name="docId" type="hidden">
+ <input name="docNum" type="hidden">
+ <input name="custName" type="hidden">
+ <input name="itemNum" type="hidden">
+ <input name="count" type="hidden">
+ <input name="weight" type="hidden">
+ <input name="status" type="hidden">
+ <input name="createBy" type="hidden">
+ <input name="updateTime$" type="hidden">
+ <input name="updateBy" type="hidden">
+ <div class="layui-row">
+
+ <div class="layui-col-md6">
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍒嗙被</label>
+ <div class="layui-input-block">
+ <div id="tagSel" class="ew-xmselect-tree"></div>
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">鍟嗗搧鍚嶇О</label>
+ <div class="layui-input-block">
+ <input name="maktx" placeholder="璇疯緭鍏ュ晢鍝佸悕绉�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">閰嶇疆</label>
+ <div class="layui-input-block">
+ <input name="specs" placeholder="璇疯緭鍏ラ厤缃�" class="layui-input">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曠鍑�閲�</label>
+ <div class="layui-input-block">
+ <input name="weight" placeholder="璇疯緭鍏ュ崟绠卞噣閲嶆牸" class="layui-input">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曠浣撶Н</label>
+ <div class="layui-input-block">
+ <input name="volume" placeholder="璇疯緭鍏ュ崟绠变綋绉�" class="layui-input">
+ </div>
+ </div>
+
+ </div>
+
+ <div class="layui-col-md6">
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">鍟嗗搧缂栧彿</label>
+ <div class="layui-input-block">
+ <input id="matnr" name="matnr" placeholder="璇疯緭鍏ュ晢鍝佺紪鍙�" class="layui-input" lay-vertype="tips" lay-verify="required" required="">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">瑙勬牸</label>
+ <div class="layui-input-block">
+ <input name="specs" placeholder="璇疯緭鍏ヤ唬鐮�" class="layui-input">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">澶囨敞</label>
+ <div class="layui-input-block">
+ <input name="memo" placeholder="璇疯緭鍏ュ娉�" class="layui-input">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曠姣涢噸</label>
+ <div class="layui-input-block">
+ <input name="length" placeholder="璇疯緭鍏ュ崟绠辨瘺閲�" class="layui-input">
+ </div>
+ </div>
+
+ <div class="layui-form-item">
+ <label class="layui-form-label">鍗曠浣撶Н</label>
+ <div class="layui-input-block">
+ <input name="threeCode" placeholder="璇疯緭鍏ョ瀛愬昂瀵�" class="layui-input">
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <hr class="layui-bg-gray">
+ <div class="layui-form-item text-right">
+ <button class="layui-btn" lay-filter="editSubmit" lay-submit="">淇濆瓨</button>
+ <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
+ </div>
+ </form>
+</script>
+
+<!-- 鎵撳嵃鎿嶄綔寮圭獥 -->
+<div id="printDataDiv" style="display: none;padding: 20px">
+ <div class="layui-form" style="text-align: center">
+ <hr>
+ <!--鍗曢�夋-->
+ <div class="layui-form-item" style="display: inline-block; margin-bottom: 10px">
+ <input type="radio" name="selectTemplate" value="1" title="妯℃澘涓�" lay-filter="selectTemplateRadio" checked="">
+ <input type="radio" name="selectTemplate" value="2" title="妯℃澘浜�" lay-filter="selectTemplateRadio">
+ <input type="radio" name="selectTemplate" value="3" title="妯℃澘涓�" lay-filter="selectTemplateRadio">
+ </div>
+ <fieldset class="layui-elem-field site-demo-button" style="margin-top: 30px;text-align: left;">
+ <legend>鎵撳嵃棰勮</legend>
+ <div id="template-container" style="margin: 20px;text-align: center">
+
+ <!-- 棰勮鍥� 1 -->
+ <div id="template-preview-1" class="template-preview" style="display: inline-block">
+ <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
+ <tr style="height: 74px">
+ <td colspan="3" align="center" scope="col">鍟嗗搧缂栫爜</td>
+ <td class="barcode" colspan="9" align="center" scope="col">
+ <img class="template-code template-barcode" src="" width="90%;">
+ <div style="letter-spacing: 2px;margin-top: 1px; text-align: center;">
+ <span>xxxxxx</span>
+ </div>
+ </td>
+ </tr>
+ <tr style="height: 74px">
+ <td align="center" colspan="3">鍟嗗搧</td>
+ <td align="center" colspan="5">xxxxxx-xx/xx</td>
+ <td align="center" colspan="2">澶囨敞</td>
+ <td align="center" colspan="2">xx</td>
+ </tr>
+ </table>
+ </div>
+
+ <!-- 棰勮鍥� 2 -->
+ <div id="template-preview-2" class="template-preview" style="display: none">
+ <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
+ <tr style="height: 30px">
+ <td align="center" width="20%">鍟嗗搧</td>
+ <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td>
+ </tr>
+ <tr style="height: 30px">
+ <td align="center" width="20%">澶囨敞</td>
+ <td align="center" width="80%">xxxxxxxx</td>
+ </tr>
+ <tr style="height: 75px;">
+ <td align="center" colspan="2" width="100%" style="border: none">
+ <img class="template-code template-barcode" src="" width="80%">
+ <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
+ <span>xxxxxx</span>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <!-- 棰勮鍥� 3 -->
+ <div id="template-preview-3" class="template-preview" style="display: none">
+ <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
+ <tr style="height: 74px">
+ <td align="center" scope="col" colspan="1">鍟嗗搧</td>
+ <td align="center" scope="col" colspan="1" style="">xxxxxx-xx/xx</td>
+ <td align="center" scope="col" colspan="2" rowspan="2">
+ <img class="template-code template-qrcode" src="" width="80%">
+ <div style="letter-spacing: 1px;margin-top: 1px; text-align: center">
+ <span>xxxxxx</span>
+ </div>
+ </td>
+ </tr>
+ <tr style="height: 74px">
+ <td align="center" colspan="1">澶囨敞</td>
+ <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">xxxxxxx</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </fieldset>
+
+ <button class="layui-btn" id="doPrint" lay-submit lay-filter="doPrint" style="margin-top: 20px">纭畾</button>
+ </div>
+</div>
+
+<div id="box" style="display: block"></div>
+
+<!-- 鍒濆鍖栨墦鍗版ā鏉跨殑鏉″舰鐮� -->
+<script type="text/javascript">
+ $('.template-barcode').attr("src", baseUrl+"/mac/code/auth?type=1¶m=123");
+ $('.template-qrcode').attr("src", baseUrl+"/mac/code/auth?type=2¶m=123");
+</script>
+
+<!-- 妯℃澘寮曟搸 -->
+<!-- 妯℃澘1 -->
+<script type="text/template" id="templatePreview1" class="template-barcode">
+ {{#each data}}
+ <table class="contain" width="280" style="overflow: hidden;font-size: small;table-layout: fixed;">
+ <tr style="height: 74px">
+ <td align="center" colspan="3" scope="col">鍟嗗搧缂栫爜</td>
+ <td align="center" class="barcode" colspan="9" scope="col">
+ <img class="template-code" src="{{this.barcodeUrl}}" width="90%">
+ <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
+ <span>{{this.matnr}}</span>
+ </div>
+ </td>
+ </tr>
+ <tr style="height: 74px">
+ <td align="center" colspan="3">鍟嗗搧</td>
+ <td align="center" colspan="5" style="overflow: hidden; white-space: nowrap;text-overflow: ellipsis;">{{this.maktx}}</td>
+ <td align="center" colspan="2">澶囨敞</td>
+ <td align="center" colspan="2">{{this.memo}}</td>
+ </tr>
+ </table>
+ {{/each}}
+</script>
+<!-- 妯℃澘2 -->
+<script type="text/template" id="templatePreview2" class="template-barcode">
+ {{#each data}}
+ <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
+ <tr style="height: 35px">
+ <td align="center" width="20%">鍟嗗搧</td>
+ <td align="center" width="80%" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.maktx}}</td>
+ </tr>
+ <tr style="height: 35px">
+ <td align="center" width="20%">澶囨敞</td>
+ <td align="center" width="80%">{{this.memo}}</td>
+ </tr>
+ <tr style="height: 79px;">
+ <td align="center" colspan="2" width="100%" style="border: none">
+ <img class="template-code" src="{{this.barcodeUrl}}" width="80%">
+ <div style="letter-spacing: 2px;margin-top: 1px; text-align: center">
+ <span>{{this.matnr}}</span>
+ </div>
+ </td>
+ </tr>
+ </table>
+ {{/each}}
+</script>
+<!-- 妯℃澘3 -->
+<script type="text/template" id="templatePreview3" class="template-qrcode">
+ {{#each data}}
+ <table class="contain" width="280" style="overflow: hidden;font-size: xx-small;table-layout: fixed;">
+ <tr style="height: 74px" >
+ <td align="center" scope="col" colspan="1">鍟嗗搧</td>
+ <td align="center" scope="col" colspan="1" style="
+ display: inline-block;
+ line-height: 20px;
+ vertical-align: middle;
+ border: none;
+ border-top: 1px solid #000;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 3;
+ -webkit-box-orient: vertical;
+ ">
+ {{this.maktx}}
+ </td>
+ <td align="center" scope="col" colspan="2" rowspan="2">
+ <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%">
+ <div style="letter-spacing: 1px;margin-top: 1px; text-align: center">
+ <span>{{this.matnr}}</span>
+ </div>
+ </td>
+ </tr>
+ <tr style="height: 74px">
+ <td align="center" colspan="1">澶囨敞</td>
+ <td align="center" colspan="1" style="overflow:hidden; white-space:nowrap; text-overflow:ellipsis;">{{this.memo}}</td>
+ </tr>
+ </table>
+ {{/each}}
+</script>
+
+</body>
+</html>
+
diff --git a/src/main/webapp/views/saas/locDetl.html b/src/main/webapp/views/saas/locDetl.html
new file mode 100644
index 0000000..4b127b0
--- /dev/null
+++ b/src/main/webapp/views/saas/locDetl.html
@@ -0,0 +1,77 @@
+<!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="search-box" class="layui-form layui-card-header">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
+ </div>
+ </div>
+<!-- <div class="layui-inline">-->
+<!-- <div class="layui-input-inline">-->
+<!-- <input class="layui-input" type="text" name="zpallet" placeholder="鎵樼洏鐮�" autocomplete="off">-->
+<!-- </div>-->
+<!-- </div>-->
+ <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="row" placeholder="鎺掓暟" autocomplete="off">-->
+<!-- </div>-->
+<!-- </div>-->
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="condition" 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>
+<!-- <button id="unreason" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="unreason">鏌ョ湅寮傚父鏁版嵁</button>-->
+ </div>
+
+</div>
+
+<!-- 琛ㄦ牸 -->
+<div class="layui-form">
+ <table class="layui-hide" id="locDetl" lay-filter="locDetl"></table>
+</div>
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">瀵煎嚭</button>
+ </div>
+</script>
+
+<script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">璇︽儏</a>
+</script>
+
+<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/saas/locDetl.js" charset="utf-8"></script>
+
+<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe>
+
+</body>
+</html>
+
diff --git a/src/main/webapp/views/saas/locMove.html b/src/main/webapp/views/saas/locMove.html
new file mode 100644
index 0000000..d28fbec
--- /dev/null
+++ b/src/main/webapp/views/saas/locMove.html
@@ -0,0 +1,130 @@
+<!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/admin.css?v=318" 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;
+ box-sizing: border-box;
+ }
+ body {
+ background-color: #fff;
+ border-radius: 5px;
+ box-shadow: 0 0 3px rgba(0,0,0,.3);
+ padding-bottom: 20px;
+ }
+ .function-area {
+ padding: 50px 80px 50px 70px;
+ display: inline-block;
+ }
+ .cool-auto-complete-div {
+ height: 40px;
+ border-radius: 5px;
+ border: 1px solid #b8b8b8;
+ color: #888;
+ box-shadow: inset 0 1px 2px #ECECEC;
+ -moz-box-shadow: inset 0 1px 2px #ECECEC;
+ -webkit-box-shadow: inset 0 1px 2px #ECECEC;
+ }
+
+ .function-btn {
+ margin-left: 15px;
+ background: #E27575;
+ border: none;
+ padding: 10px 25px 10px 25px;
+ color: #FFF;
+ box-shadow: 1px 1px 5px #B6B6B6;
+ border-radius: 3px;
+ text-shadow: 1px 1px 1px #9E3F3F;
+ cursor: pointer;
+ }
+ .function-btn:hover {
+ opacity: 0.8
+ }
+
+ .layui-layer-lan .layui-layer-btn a {
+ background: #4476A7;
+ border-color: #4476A7;
+ color: #fff;
+ }
+ .layui-layer-lan .layui-layer-btn .layui-layer-btn1 {
+ background: #fff;
+ color: #333;
+ border-color: #E9E7E7;
+ }
+ .layui-layer-lan .layui-layer-btn .layui-layer-btn1:hover {
+ background-color: #f7f7f7;
+ }
+
+ #loc-move-btn {
+ /*display: none;*/
+ }
+ </style>
+</head>
+<body>
+
+<div class="function-area layui-form">
+ <!-- 婧愬簱浣� -->
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input id="sourceLocNo" class="layui-input" onkeyup="getLoc(this)" type="text" placeholder="婧愬簱浣�" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-form-mid" style="float: none; display: inline-block; margin-left: 10px">-</div>
+ <div class="layui-input-inline">
+ <select id="targetLocNo" name="modules" lay-verify="required" lay-search="">
+ <option value="">鐩爣绌哄簱浣�</option>
+ </select>
+ </div>
+ <button id="loc-move-btn" class="function-btn" onclick="locMove()" style="background: #4476A7;text-shadow: inherit;height: 45px;font-size: 15px;margin-left: 20px">搴撲綅绉昏浆</button>
+</div>
+
+<hr>
+
+<table class="layui-table" id="locMatCode" lay-filter="locMatCode"></table>
+
+<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/saas/locMove.js" charset="utf-8"></script>
+
+<script type="text/template" id="emptyLocStock">
+ <option value="">璇疯緭鍏ュ苟閫夋嫨</option>
+ {{#each data}}
+ <option value="{{this.uuid}}">{{this.uuid}}</option>
+ {{/each}}
+</script>
+
+<div id="locMoveWindow" style="height: 100%;display: none">
+ <div style="float: left;width: 35%;height: 100%">
+ <div>
+ <span style="display: block">婧愬簱浣�</span>
+ <input type="text">
+ </div>
+ </div>
+ <div style="float: left;width: 30%;height: 100%;position: relative;">
+ <span style="position:absolute;top: 45%;left: 50%;color: #666;transform: translateX(-50%);;display: block">绉昏浆鑷�</span>
+ <hr style="position: absolute; top: 50%;width: 100%;border: none;height: 1px;background-color: #666">
+
+ </div>
+ <div style="float: right;width: 35%;height: 100%">
+ <div>
+ <span style="display: block">鐩爣搴撲綅</span>
+ <input type="text">
+ </div>
+ </div>
+</div>
+</body>
+</html>
diff --git a/src/main/webapp/views/saas/matQuery.html b/src/main/webapp/views/saas/matQuery.html
new file mode 100644
index 0000000..351d3d1
--- /dev/null
+++ b/src/main/webapp/views/saas/matQuery.html
@@ -0,0 +1,194 @@
+<!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/admin.css?v=318" 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;
+ }
+ </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 class="layui-inline" style="width: 300px">
+ <div class="layui-input-inline">
+ <input class="layui-input layui-laydate-range" name="update_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
+ </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="matCode" lay-filter="matCode"></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>
+ function getCol() {
+ var cols = [
+ {type: 'checkbox', fixed: 'left'}
+ ];
+ cols.push.apply(cols, matCols);
+ cols.push(
+ {field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true},
+ {field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'}
+ )
+ return cols;
+ }
+ var pageCurr;
+ 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;
+ // 鐗╂枡鏌ヨ鏁版嵁琛�
+ matQueryTable = table.render({
+ elem: '#matCode',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl + '/mat/list/auth',
+ page: true,
+ limit: 7,
+ limits: [7, 10, 30,50,100],
+ even: true,
+ cellMinWidth: 50,
+ toolbar: '#toolbar',
+ 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 + "/";
+ }
+ }
+ });
+
+ // 鐩戝惉澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(matCode)', 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(false);
+ });
+
+ // 鎼滅储鏍忛噸缃簨浠�
+ 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;
+ });
+ matQueryTable.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ if (res.data.length === 0 && count !== 0) {
+ tableIns.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr-1
+ }
+ });
+ pageCurr -= 1;
+ }
+ }
+ });
+ }
+
+ function clearFormVal(el) {
+ $(':input', el)
+ .val('')
+ .removeAttr('checked')
+ .removeAttr('selected');
+ }
+</script>
+</html>
+
diff --git a/src/main/webapp/views/saas/stockAdjust.html b/src/main/webapp/views/saas/stockAdjust.html
new file mode 100644
index 0000000..63d49fb
--- /dev/null
+++ b/src/main/webapp/views/saas/stockAdjust.html
@@ -0,0 +1,133 @@
+<!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/admin.css?v=318" 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;
+ box-sizing: border-box;
+ }
+ body {
+ background-color: #fff;
+ border-radius: 5px;
+ box-shadow: 0 0 3px rgba(0,0,0,.3);
+ }
+
+ /* search */
+ .layui-card-header {
+ border-bottom: none;
+ }
+ #search-box {
+ padding: 30px 0 10px 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;
+ }
+
+ /* add */
+ .function-area {
+ padding: 15px 0 20px 40px;
+ }
+ .function-btn {
+ font-size: 16px;
+ padding: 1px 1px 1px 1px;
+ width: 120px;
+ height: 40px;
+ border-color: #2b425b;
+ border-radius: 4px;
+ border-width: 1px;
+ background: none;
+ border-style: solid;
+ transition: 0.4s;
+ cursor: pointer;
+ }
+ .function-btn:hover {
+ background-color: #2b425b;
+ color: #fff;
+ }
+
+ #mat-query {
+ /*display: none;*/
+ }
+ #btn-adjust {
+ /*display: none;*/
+ }
+ </style>
+</head>
+<body style="padding-bottom: 30px">
+
+<!-- 鎼滅储鏍� -->
+<div id="search-box" class="layui-form layui-card-header">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input id="searchLocNo" class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off" style="height: 45px;border-color: #b8b8b8">
+ </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 style="display: inline-block; font-size: 20px;font-weight: 300">
+ <div class="not-retrieve" style="color: #ff0000;font-family: '榛戜綋';">
+ 璇峰厛妫�绱㈠簱浣�
+ </div>
+ <div class="retrieve" style="display: none;color: #0097ff;font-family: '榛戜綋';">
+ 褰撳墠妫�绱㈠簱浣�: <span id="locMsg" style=""></span>
+ </div>
+
+ </div>
+</div>
+
+<hr>
+
+<!-- 鍔熻兘鍖� -->
+<div class="function-area">
+ <button id="mat-query" class="function-btn">鏂板搴撳瓨</button>
+</div>
+
+<!-- 澶撮儴 -->
+<script type="text/html" id="toolbar">
+ <button class="layui-btn layui-btn-lg" id="btn-adjust" lay-event="adjust" style="">璋冩暣搴撳瓨</button>
+</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>
+
+<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/saas/stockAdjust.js" charset="utf-8"></script>
+
+</body>
+</html>
+
diff --git a/src/main/webapp/views/saasLog/saasLog.html b/src/main/webapp/views/saasLog/saasLog.html
new file mode 100644
index 0000000..2211671
--- /dev/null
+++ b/src/main/webapp/views/saasLog/saasLog.html
@@ -0,0 +1,113 @@
+<!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/admin.css?v=318" media="all">
+ <link rel="stylesheet" href="../../static/css/cool.css" media="all">
+</head>
+<body>
+
+<div class="layui-fluid">
+ <div class="layui-card">
+ <div class="layui-card-body">
+ <div class="layui-form toolbar" id="search-box">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <label class="layui-form-label">缂栧彿:</label>
+ <div class="layui-input-inline">
+ <input class="layui-input" type="text" name="id" placeholder="缂栧彿" autocomplete="off">
+ </div>
+ </div>
+ <div class="layui-inline"> 
+ <button class="layui-btn icon-btn" lay-filter="search" lay-submit>
+ <i class="layui-icon"></i>鎼滅储
+ </button>
+ <button class="layui-btn icon-btn" lay-filter="reset" lay-submit>
+ <i class="layui-icon"></i>閲嶇疆
+ </button>
+ </div>
+ </div>
+ </div>
+ <table class="layui-hide" id="saasLog" lay-filter="saasLog"></table>
+ </div>
+ </div>
+</div>
+
+<script type="text/html" id="toolbar">
+ <div class="layui-btn-container">
+ <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">鏂板</button>
+ <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">鍒犻櫎</button>
+ <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">瀵煎嚭</button>
+ </div>
+</script>
+
+<script type="text/html" id="operate">
+ <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>
+ <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a>
+</script>
+
+<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/saasLog/saasLog.js" charset="utf-8"></script>
+</body>
+<!-- 琛ㄥ崟寮圭獥 -->
+<script type="text/html" id="editDialog">
+ <form id="detail" lay-filter="detail" class="layui-form admin-form model-form">
+ <input name="id" type="hidden">
+ <div class="layui-row">
+ <div class="layui-col-md12">
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">id: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="id" placeholder="璇疯緭鍏d" lay-vertype="tips" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">{0:鍏ュ簱,1:鍑哄簱}: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="type" placeholder="璇疯緭鍏0:鍏ュ簱,1:鍑哄簱}">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="locNo" placeholder="璇疯緭鍏�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="matnr" placeholder="璇疯緭鍏�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="ioTime" id="ioTime$" placeholder="璇疯緭鍏�">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label">: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="createBy" placeholder="璇疯緭鍏�">
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <hr class="layui-bg-gray">
+ <div class="layui-form-item text-right">
+ <button class="layui-btn" lay-filter="editSubmit" lay-submit="">淇濆瓨</button>
+ <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">鍙栨秷</button>
+ </div>
+ </form>
+</script>
+</html>
+
--
Gitblit v1.9.1