Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -1,12 +1,20 @@
|
|||||||
package org.nl.modules.mnt.service.impl;
|
package org.nl.modules.mnt.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.modules.mnt.service.AutoRiKuService;
|
import org.nl.modules.mnt.service.AutoRiKuService;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AutoRiKuServiceImpl implements AutoRiKuService {
|
public class AutoRiKuServiceImpl implements AutoRiKuService {
|
||||||
@@ -18,21 +26,22 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
JSONArray dataArr = new JSONArray();
|
JSONArray dataArr = new JSONArray();
|
||||||
|
|
||||||
// 获取有货货位
|
// 获取有货货位
|
||||||
JSONArray haveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') <> '' and layer_num = '1' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray haveArr = WQL.getWO("AUTORIKU").addParam("flag", "1").addParam("layer_num", "1").process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
|
||||||
JSONObject jsonHave = new JSONObject();
|
JSONObject jsonHave = new JSONObject();
|
||||||
jsonHave.put("name", "有货");
|
jsonHave.put("name", "有货");
|
||||||
jsonHave.put("value", haveArr.size());
|
jsonHave.put("value", haveArr.size());
|
||||||
|
|
||||||
// 获取无货货位
|
// 获取无货货位
|
||||||
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') = '' and layer_num = '1' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and IFNULL(storagevehicle_code,'') = '' and layer_num = '1' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonNotHave = new JSONObject();
|
JSONObject jsonNotHave = new JSONObject();
|
||||||
jsonNotHave.put("name", "空闲");
|
jsonNotHave.put("name", "空闲");
|
||||||
jsonNotHave.put("value", notHaveArr.size());
|
jsonNotHave.put("value", notHaveArr.size());
|
||||||
|
|
||||||
// 获取禁用货位
|
// 获取禁用货位
|
||||||
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and layer_num = '1' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and layer_num = '1' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonUsed = new JSONObject();
|
JSONObject jsonUsed = new JSONObject();
|
||||||
jsonUsed.put("name", "禁用");
|
jsonUsed.put("name", "禁用");
|
||||||
@@ -43,7 +52,15 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
dataArr.add(jsonUsed);
|
dataArr.add(jsonUsed);
|
||||||
|
|
||||||
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
||||||
jsonAll.put("pieSubTest", "总仓位:"+num);
|
|
||||||
|
// 获取净重
|
||||||
|
BigDecimal net_weight = haveArr.stream()
|
||||||
|
.map(row -> (JSONObject) row)
|
||||||
|
.filter(row -> !StrUtil.equals(row.getString("sect_code"), "KTP01") && ObjectUtil.isNotEmpty(row.getString("net_weight")))
|
||||||
|
.map(row -> row.getBigDecimal("net_weight"))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
jsonAll.put("pieSubTest", "总仓位: "+num+" "+"总净重: "+ NumberUtil.round(net_weight,2)+"KG");
|
||||||
jsonAll.put("data", dataArr);
|
jsonAll.put("data", dataArr);
|
||||||
jsonAll.put("name", "立库1层统计");
|
jsonAll.put("name", "立库1层统计");
|
||||||
|
|
||||||
@@ -58,21 +75,21 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
JSONArray dataArr = new JSONArray();
|
JSONArray dataArr = new JSONArray();
|
||||||
|
|
||||||
// 获取有货货位
|
// 获取有货货位
|
||||||
JSONArray haveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') <> '' and layer_num = '2' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray haveArr = WQL.getWO("AUTORIKU").addParam("flag", "1").addParam("layer_num", "2").process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonHave = new JSONObject();
|
JSONObject jsonHave = new JSONObject();
|
||||||
jsonHave.put("name", "有货");
|
jsonHave.put("name", "有货");
|
||||||
jsonHave.put("value", haveArr.size());
|
jsonHave.put("value", haveArr.size());
|
||||||
|
|
||||||
// 获取无货货位
|
// 获取无货货位
|
||||||
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') = '' and layer_num = '2' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and IFNULL(storagevehicle_code,'') = '' and layer_num = '2' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonNotHave = new JSONObject();
|
JSONObject jsonNotHave = new JSONObject();
|
||||||
jsonNotHave.put("name", "空闲");
|
jsonNotHave.put("name", "空闲");
|
||||||
jsonNotHave.put("value", notHaveArr.size());
|
jsonNotHave.put("value", notHaveArr.size());
|
||||||
|
|
||||||
// 获取禁用货位
|
// 获取禁用货位
|
||||||
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and layer_num = '2' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and layer_num = '2' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonUsed = new JSONObject();
|
JSONObject jsonUsed = new JSONObject();
|
||||||
jsonUsed.put("name", "禁用");
|
jsonUsed.put("name", "禁用");
|
||||||
@@ -83,7 +100,15 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
dataArr.add(jsonUsed);
|
dataArr.add(jsonUsed);
|
||||||
|
|
||||||
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
||||||
jsonAll.put("pieSubTest", "总仓位:"+num);
|
|
||||||
|
// 获取净重
|
||||||
|
BigDecimal net_weight = haveArr.stream()
|
||||||
|
.map(row -> (JSONObject) row)
|
||||||
|
.filter(row -> !StrUtil.equals(row.getString("sect_code"), "KTP01") && ObjectUtil.isNotEmpty(row.getString("net_weight")))
|
||||||
|
.map(row -> row.getBigDecimal("net_weight"))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
jsonAll.put("pieSubTest", "总仓位: "+num+" "+"总净重: "+ NumberUtil.round(net_weight,2)+"KG");
|
||||||
jsonAll.put("data", dataArr);
|
jsonAll.put("data", dataArr);
|
||||||
jsonAll.put("name", "立库2层统计");
|
jsonAll.put("name", "立库2层统计");
|
||||||
|
|
||||||
@@ -98,21 +123,20 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
JSONArray dataArr = new JSONArray();
|
JSONArray dataArr = new JSONArray();
|
||||||
|
|
||||||
// 获取有货货位
|
// 获取有货货位
|
||||||
JSONArray haveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') <> '' and layer_num = '3' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray haveArr = WQL.getWO("AUTORIKU").addParam("flag", "1").addParam("layer_num", "3").process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonHave = new JSONObject();
|
JSONObject jsonHave = new JSONObject();
|
||||||
jsonHave.put("name", "有货");
|
jsonHave.put("name", "有货");
|
||||||
jsonHave.put("value", haveArr.size());
|
jsonHave.put("value", haveArr.size());
|
||||||
|
|
||||||
// 获取无货货位
|
// 获取无货货位
|
||||||
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') = '' and layer_num = '3' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and IFNULL(storagevehicle_code,'') = '' and layer_num = '3' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonNotHave = new JSONObject();
|
JSONObject jsonNotHave = new JSONObject();
|
||||||
jsonNotHave.put("name", "空闲");
|
jsonNotHave.put("name", "空闲");
|
||||||
jsonNotHave.put("value", notHaveArr.size());
|
jsonNotHave.put("value", notHaveArr.size());
|
||||||
|
|
||||||
// 获取禁用货位
|
// 获取禁用货位
|
||||||
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and layer_num = '3' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and layer_num = '3' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonUsed = new JSONObject();
|
JSONObject jsonUsed = new JSONObject();
|
||||||
jsonUsed.put("name", "禁用");
|
jsonUsed.put("name", "禁用");
|
||||||
@@ -123,7 +147,15 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
dataArr.add(jsonUsed);
|
dataArr.add(jsonUsed);
|
||||||
|
|
||||||
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
||||||
jsonAll.put("pieSubTest", "总仓位:"+num);
|
|
||||||
|
// 获取净重
|
||||||
|
BigDecimal net_weight = haveArr.stream()
|
||||||
|
.map(row -> (JSONObject) row)
|
||||||
|
.filter(row -> !StrUtil.equals(row.getString("sect_code"), "KTP01") && ObjectUtil.isNotEmpty(row.getString("net_weight")))
|
||||||
|
.map(row -> row.getBigDecimal("net_weight"))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
jsonAll.put("pieSubTest", "总仓位: "+num+" "+"总净重: "+ NumberUtil.round(net_weight,2)+"KG");
|
||||||
jsonAll.put("data", dataArr);
|
jsonAll.put("data", dataArr);
|
||||||
jsonAll.put("name", "立库3层统计");
|
jsonAll.put("name", "立库3层统计");
|
||||||
|
|
||||||
@@ -138,21 +170,20 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
JSONArray dataArr = new JSONArray();
|
JSONArray dataArr = new JSONArray();
|
||||||
|
|
||||||
// 获取有货货位
|
// 获取有货货位
|
||||||
JSONArray haveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') <> '' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray haveArr = WQL.getWO("AUTORIKU").addParam("flag", "1").process().getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonHave = new JSONObject();
|
JSONObject jsonHave = new JSONObject();
|
||||||
jsonHave.put("name", "有货");
|
jsonHave.put("name", "有货");
|
||||||
jsonHave.put("value", haveArr.size());
|
jsonHave.put("value", haveArr.size());
|
||||||
|
|
||||||
// 获取无货货位
|
// 获取无货货位
|
||||||
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and IFNULL(storagevehicle_code,'') = '' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray notHaveArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and IFNULL(storagevehicle_code,'') = '' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonNotHave = new JSONObject();
|
JSONObject jsonNotHave = new JSONObject();
|
||||||
jsonNotHave.put("name", "空闲");
|
jsonNotHave.put("name", "空闲");
|
||||||
jsonNotHave.put("value", notHaveArr.size());
|
jsonNotHave.put("value", notHaveArr.size());
|
||||||
|
|
||||||
// 获取禁用货位
|
// 获取禁用货位
|
||||||
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and is_delete = '0'").getResultJSONArray(0);
|
JSONArray usedArr = attrTab.query("sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01') and is_used = '0' and IFNULL(storagevehicle_code,'') = '' and is_delete = '0'").getResultJSONArray(0);
|
||||||
|
|
||||||
JSONObject jsonUsed = new JSONObject();
|
JSONObject jsonUsed = new JSONObject();
|
||||||
jsonUsed.put("name", "禁用");
|
jsonUsed.put("name", "禁用");
|
||||||
@@ -163,7 +194,15 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
|||||||
dataArr.add(jsonUsed);
|
dataArr.add(jsonUsed);
|
||||||
|
|
||||||
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
int num = haveArr.size() + notHaveArr.size() + usedArr.size();
|
||||||
jsonAll.put("pieSubTest", "总仓位:"+num);
|
|
||||||
|
// 获取净重
|
||||||
|
BigDecimal net_weight = haveArr.stream()
|
||||||
|
.map(row -> (JSONObject) row)
|
||||||
|
.filter(row -> !StrUtil.equals(row.getString("sect_code"), "KTP01") && ObjectUtil.isNotEmpty(row.getString("net_weight")))
|
||||||
|
.map(row -> row.getBigDecimal("net_weight"))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
jsonAll.put("pieSubTest", "总仓位: "+num+" "+"总净重: "+ NumberUtil.round(net_weight,2)+"KG");
|
||||||
jsonAll.put("data", dataArr);
|
jsonAll.put("data", dataArr);
|
||||||
jsonAll.put("name", "立库汇总统计");
|
jsonAll.put("name", "立库汇总统计");
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 立库监控
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.layer_num TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
attr.*,
|
||||||
|
sub.net_weight
|
||||||
|
FROM
|
||||||
|
st_ivt_structattr attr
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
SUM(net_weight) AS net_weight,
|
||||||
|
package_box_sn
|
||||||
|
FROM
|
||||||
|
pdm_bi_subpackagerelation
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
group by package_box_sn
|
||||||
|
) sub ON attr.storagevehicle_code = sub.package_box_sn
|
||||||
|
WHERE
|
||||||
|
attr.sect_code in ('ZC01','KTP01','ZZ01','PD01','FTD01')
|
||||||
|
and IFNULL(attr.storagevehicle_code,'') <> ''
|
||||||
|
and attr.is_delete = '0'
|
||||||
|
|
||||||
|
OPTION 输入.layer_num <> ""
|
||||||
|
attr.layer_num = 输入.layer_num
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -2,18 +2,20 @@ package org.nl.modules.system.util;
|
|||||||
|
|
||||||
import org.nl.modules.system.service.GenCodeService;
|
import org.nl.modules.system.service.GenCodeService;
|
||||||
import org.nl.modules.system.service.impl.GenCodeServiceImpl;
|
import org.nl.modules.system.service.impl.GenCodeServiceImpl;
|
||||||
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class CodeUtil {
|
public class CodeUtil {
|
||||||
|
|
||||||
public static String getNewCode(String ruleCode){
|
public static String getNewCode(String ruleCode){
|
||||||
GenCodeService service=new GenCodeServiceImpl();
|
GenCodeService bean = SpringContextHolder.getBean(GenCodeService.class);
|
||||||
String flag = "1";
|
String flag = "1";
|
||||||
HashMap<String,String> map = new HashMap<>();
|
HashMap<String,String> map = new HashMap<>();
|
||||||
map.put("flag",flag);
|
map.put("flag",flag);
|
||||||
map.put("code",ruleCode);
|
map.put("code",ruleCode);
|
||||||
return service.codeDemo(map);
|
return bean.codeDemo(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,11 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author zhouz
|
* @author zhouz
|
||||||
@@ -58,6 +60,7 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
map.put("stor_id", (String) whereJson.get("stor_id"));
|
map.put("stor_id", (String) whereJson.get("stor_id"));
|
||||||
map.put("sect_id", (String) whereJson.get("sect_id"));
|
map.put("sect_id", (String) whereJson.get("sect_id"));
|
||||||
map.put("lock_type", (String) whereJson.get("lock_type"));
|
map.put("lock_type", (String) whereJson.get("lock_type"));
|
||||||
|
map.put("layer_num", (String) whereJson.get("layer_num"));
|
||||||
|
|
||||||
//获取人员对应的仓库
|
//获取人员对应的仓库
|
||||||
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
UserStorServiceImpl userStorService = new UserStorServiceImpl();
|
||||||
@@ -264,6 +267,17 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
.addParamMap(MapOf.of("struct_id", struct_id, "flag", "1"))
|
.addParamMap(MapOf.of("struct_id", struct_id, "flag", "1"))
|
||||||
.process()
|
.process()
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
|
// 计算合计
|
||||||
|
JSONObject json = array.getJSONObject(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(json.getString("net_weight"))) {
|
||||||
|
BigDecimal container_weight = array.stream().map(row -> ((JSONObject) row).getBigDecimal("net_weight")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
|
||||||
|
for (int j = 0; j < array.size(); j++) {
|
||||||
|
JSONObject jsonObject = array.getJSONObject(j);
|
||||||
|
jsonObject.put("container_weight",container_weight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 获取仓位表中的信息
|
// 获取仓位表中的信息
|
||||||
JSONObject strInfo = attrTab
|
JSONObject strInfo = attrTab
|
||||||
.query("struct_id = '" + struct_id + "'")
|
.query("struct_id = '" + struct_id + "'")
|
||||||
@@ -271,6 +285,9 @@ public class StructattrServiceImpl implements StructattrService {
|
|||||||
if (strInfo.getString("is_used").equals("0")) {
|
if (strInfo.getString("is_used").equals("0")) {
|
||||||
// 被禁用
|
// 被禁用
|
||||||
struct_status = 4;
|
struct_status = 4;
|
||||||
|
} else if (strInfo.getString("sect_code").equals("PD01")) {
|
||||||
|
// 盘点位
|
||||||
|
struct_status = 5;
|
||||||
} else if (ObjectUtil.isEmpty(strInfo.getString("storagevehicle_code"))) {
|
} else if (ObjectUtil.isEmpty(strInfo.getString("storagevehicle_code"))) {
|
||||||
// 空位
|
// 空位
|
||||||
struct_status = 3;
|
struct_status = 3;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
输入.is_used TYPEAS s_string
|
输入.is_used TYPEAS s_string
|
||||||
输入.is_delete TYPEAS s_string
|
输入.is_delete TYPEAS s_string
|
||||||
输入.have_vehicle TYPEAS s_string
|
输入.have_vehicle TYPEAS s_string
|
||||||
|
输入.layer_num TYPEAS s_string
|
||||||
输入.in_stor_id TYPEAS f_string
|
输入.in_stor_id TYPEAS f_string
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -71,6 +72,9 @@
|
|||||||
OPTION 输入.lock_type <> ""
|
OPTION 输入.lock_type <> ""
|
||||||
struct.lock_type = 输入.lock_type
|
struct.lock_type = 输入.lock_type
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.layer_num <> ""
|
||||||
|
struct.layer_num = 输入.layer_num
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.lock_type = "1"
|
OPTION 输入.lock_type = "1"
|
||||||
(struct.storagevehicle_code is null or struct.storagevehicle_code = '')
|
(struct.storagevehicle_code is null or struct.storagevehicle_code = '')
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.ext.acs.service.impl;
|
package org.nl.wms.ext.acs.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -169,7 +170,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
result.put("message", "下发成功,但未连接ACS!");
|
result.put("message", "下发成功,但未连接ACS!");
|
||||||
result.put("data", new JSONArray());
|
result.put("data", new JSONArray());
|
||||||
|
|
||||||
/* // 测试数据
|
// 测试数据
|
||||||
JSONArray data = result.getJSONArray("data");
|
JSONArray data = result.getJSONArray("data");
|
||||||
JSONObject a = new JSONObject();
|
JSONObject a = new JSONObject();
|
||||||
a.put("electricity", "86");
|
a.put("electricity", "86");
|
||||||
@@ -199,9 +200,15 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
JSONArray ArrA1 = new JSONArray(); // A1车间
|
JSONArray ArrA1 = new JSONArray(); // A1车间
|
||||||
JSONArray ArrLk = new JSONArray(); // LK车间
|
JSONArray ArrLk = new JSONArray(); // LK车间
|
||||||
|
|
||||||
|
String run_time = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("AGV_RUN_TIME").getValue();
|
||||||
|
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
JSONObject json = data.getJSONObject(i);
|
JSONObject json = data.getJSONObject(i);
|
||||||
|
|
||||||
|
// 工作时长:电量百分比*6
|
||||||
|
String electricity = json.getString("electricity");
|
||||||
|
json.put("run_time", NumberUtil.round(NumberUtil.div(NumberUtil.mul(electricity, run_time),100), 1));
|
||||||
|
|
||||||
if ("2,3".contains(json.getString("car_no"))) {
|
if ("2,3".contains(json.getString("car_no"))) {
|
||||||
ArrA1.add(json);
|
ArrA1.add(json);
|
||||||
}
|
}
|
||||||
@@ -211,7 +218,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
}
|
}
|
||||||
nowJson.put("jsonA1",ArrA1);
|
nowJson.put("jsonA1",ArrA1);
|
||||||
nowJson.put("jsonLK",ArrLk);
|
nowJson.put("jsonLK",ArrLk);
|
||||||
result.put("data", nowJson);*/
|
result.put("data", nowJson);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -233,9 +240,16 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
JSONArray ArrA1 = new JSONArray(); // A1车间
|
JSONArray ArrA1 = new JSONArray(); // A1车间
|
||||||
JSONArray ArrLk = new JSONArray(); // LK车间
|
JSONArray ArrLk = new JSONArray(); // LK车间
|
||||||
|
|
||||||
|
String run_time = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("AGV_RUN_TIME").getValue();
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < data.size(); i++) {
|
for (int i = 0; i < data.size(); i++) {
|
||||||
JSONObject json = data.getJSONObject(i);
|
JSONObject json = data.getJSONObject(i);
|
||||||
|
|
||||||
|
// 工作时长:电量百分比*6
|
||||||
|
String electricity = json.getString("electricity");
|
||||||
|
json.put("run_time", NumberUtil.round(NumberUtil.div(NumberUtil.mul(electricity, run_time),100), 1));
|
||||||
|
|
||||||
if ("2,3".contains(json.getString("car_no"))) {
|
if ("2,3".contains(json.getString("car_no"))) {
|
||||||
ArrA1.add(json);
|
ArrA1.add(json);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3660,11 +3660,11 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
for (int i = 0; i < arr.size(); i++) {
|
for (int i = 0; i < arr.size(); i++) {
|
||||||
JSONObject json = arr.getJSONObject(i);
|
JSONObject json = arr.getJSONObject(i);
|
||||||
String struct_code = json.getString("struct_code");
|
String struct_code = json.getString("struct_code");
|
||||||
|
String vehicle_code = json.getString("storagevehicle_code");
|
||||||
|
|
||||||
JSONObject jsonTask1 = taskTab.query("point_code1 = '" + struct_code + "' and task_status in ('05','06')").uniqueResult(0);
|
JSONObject jsonTask1 = taskTab.query("point_code1 = '" + struct_code + "' and task_status in ('05','06','07') and vehicle_code = '"+vehicle_code+"'").uniqueResult(0);
|
||||||
JSONObject jsonTask2 = taskTab.query("point_code2 = '" + struct_code + "' and task_status in ('05','06')").uniqueResult(0);
|
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(jsonTask1) || ObjectUtil.isNotEmpty(jsonTask2)) {
|
if (ObjectUtil.isNotEmpty(jsonTask1)) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
result.add(json);
|
result.add(json);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import green from '../../../image/green.svg'
|
|||||||
import yellow from '../../../image/yellow.svg'
|
import yellow from '../../../image/yellow.svg'
|
||||||
import grey from '../../../image/grey.svg'
|
import grey from '../../../image/grey.svg'
|
||||||
import blue from '../../../image/blue.svg'
|
import blue from '../../../image/blue.svg'
|
||||||
|
import red from '../../../image/red.svg'
|
||||||
|
|
||||||
class ButtonNodeModel extends HtmlResize.model {
|
class ButtonNodeModel extends HtmlResize.model {
|
||||||
initNodeData(data) {
|
initNodeData(data) {
|
||||||
@@ -47,6 +48,9 @@ class ButtonNode extends HtmlResize.view {
|
|||||||
case 4:
|
case 4:
|
||||||
imageUrl = grey
|
imageUrl = grey
|
||||||
break
|
break
|
||||||
|
case 5:
|
||||||
|
imageUrl = red
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1681192570476" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2046" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M891.050667 248.149333A101.888 101.888 0 0 0 820.352 213.333333H205.056a114.773333 114.773333 0 0 0-73.088 33.536C112.426667 266.410667 0 447.914667 0 486.144v244.053333c0.170667 18.432 7.68 36.053333 20.821333 48.896 13.397333 12.970667 31.317333 20.181333 49.92 20.053334h882.56c18.56 0.128 36.522667-7.082667 49.877334-20.096 13.141333-12.885333 20.650667-30.378667 20.821333-48.810667v-244.053333c0-38.272-132.992-238.037333-132.992-238.037334z m-227.669334 216.362667a32.981333 32.981333 0 0 0-33.792 23.765333v4.992a115.285333 115.285333 0 0 1-230.4-6.570666 36.437333 36.437333 0 0 0-32.682666-22.442667H76.288l98.901333-167.253333s19.797333-32.426667 38.613334-32.213334h616.021333c13.866667 7.296 25.344 18.346667 33.237333 31.914667l97.066667 167.808h-296.874667 0.128z" fill="#FF0000" p-id="2047"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -33,7 +33,7 @@
|
|||||||
<!-- <div v-if="agvObj.car_no === '' || agvObj.car_no == null" class="grid-content bg-purple" style="height: 250px;background-color: white;border-bottom:3px solid rgb(240, 242, 245)">-->
|
<!-- <div v-if="agvObj.car_no === '' || agvObj.car_no == null" class="grid-content bg-purple" style="height: 250px;background-color: white;border-bottom:3px solid rgb(240, 242, 245)">-->
|
||||||
<!-- 请添加更多AGV设备-->
|
<!-- 请添加更多AGV设备-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<div v-if="agvObj.car_no !== '' && agvObj.car_no != null" class="grid-content bg-purple" style="height: 350px;background-color: white;border-bottom:0px solid rgb(240, 242, 245)">
|
<div v-if="agvObj.car_no !== '' && agvObj.car_no != null" class="grid-content bg-purple" style="height: 400px;background-color: white;border-bottom:0px solid rgb(240, 242, 245)">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<img
|
<img
|
||||||
@@ -91,6 +91,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="grid-content bg-purple" style="height: 50px;">
|
||||||
|
<el-col :span="8" style="line-height: 40px; text-align: center">
|
||||||
|
运行时长:
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="16" style="line-height: 40px; text-align: center">
|
||||||
|
{{ agvObj.run_time }}
|
||||||
|
</el-col>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div v-if="form.flag === '5'" class="grid-content bg-purple" style="padding-left: 400px; padding-top: 30px">
|
<div v-if="form.flag === '5'" class="grid-content bg-purple" style="padding-left: 400px; padding-top: 30px">
|
||||||
<el-button
|
<el-button
|
||||||
|
|||||||
@@ -9,18 +9,24 @@
|
|||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<el-row>
|
<el-form
|
||||||
<el-col :span="6">
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="库区">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
v-model="query.sect"
|
v-model="defaultList"
|
||||||
placeholder="所属库区"
|
placeholder="所属库区"
|
||||||
:options="sects"
|
:options="sects"
|
||||||
:props="{ checkStrictly: true }"
|
:props="{ checkStrictly: true }"
|
||||||
clearable
|
clearable
|
||||||
@change="sectQueryChange"
|
@change="sectQueryChange"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="6">
|
<el-form-item label="货位">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
clearable
|
clearable
|
||||||
@@ -29,12 +35,11 @@
|
|||||||
placeholder="输入货位编码、名称"
|
placeholder="输入货位编码、名称"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
/> </el-col>
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-col :span="6">
|
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-col>
|
</el-form>
|
||||||
</el-row>
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -94,7 +99,11 @@ export default {
|
|||||||
},
|
},
|
||||||
storId: {
|
storId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null
|
default: String
|
||||||
|
},
|
||||||
|
layerNum: {
|
||||||
|
type: String,
|
||||||
|
default: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -106,7 +115,8 @@ export default {
|
|||||||
checkrow: {},
|
checkrow: {},
|
||||||
rows: [],
|
rows: [],
|
||||||
dialogDis: true,
|
dialogDis: true,
|
||||||
lock: ''
|
lock: '',
|
||||||
|
defaultList: ['1582991156504039424', '1645705331612979200']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -117,7 +127,6 @@ export default {
|
|||||||
},
|
},
|
||||||
sectProp: {
|
sectProp: {
|
||||||
handler(newValue, oldValue) {
|
handler(newValue, oldValue) {
|
||||||
debugger
|
|
||||||
this.sect = newValue
|
this.sect = newValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,33 +141,21 @@ export default {
|
|||||||
this.lock = '1'
|
this.lock = '1'
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
this.crud.query.stor_id = this.storId
|
||||||
|
this.crud.query.layer_num = this.layerNum
|
||||||
this.query.lock_type = this.lock
|
this.query.lock_type = this.lock
|
||||||
|
if (this.storId === this.defaultList[0]) {
|
||||||
|
this.crud.query.sect_id = this.defaultList[1]
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
|
crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
})
|
})
|
||||||
if (this.sect) {
|
|
||||||
this.query.sect = this.sect
|
|
||||||
if (this.sect.length === 1) {
|
|
||||||
this.query.stor_id = this.sect[0]
|
|
||||||
this.query.stor_id = this.storId
|
|
||||||
}
|
|
||||||
if (this.sect.length === 0) {
|
|
||||||
this.query.sect_id = ''
|
|
||||||
this.query.stor_id = ''
|
|
||||||
}
|
|
||||||
if (this.sect.length === 2) {
|
|
||||||
this.query.stor_id = this.sect[0]
|
|
||||||
this.query.sect_id = this.sect[1]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.query.is_lock = '1'
|
this.query.is_lock = '1'
|
||||||
this.query.lock_type = this.lock
|
this.query.lock_type = this.lock
|
||||||
this.query.is_used = '1'
|
this.query.is_used = '1'
|
||||||
debugger
|
|
||||||
this.query.stor_id = this.storId
|
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
@@ -182,6 +179,7 @@ export default {
|
|||||||
this.crud.query.stor_id = val[0]
|
this.crud.query.stor_id = val[0]
|
||||||
this.crud.query.sect_id = val[1]
|
this.crud.query.sect_id = val[1]
|
||||||
}
|
}
|
||||||
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
onSelectAll() {
|
onSelectAll() {
|
||||||
this.$refs.table.clearSelection()
|
this.$refs.table.clearSelection()
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<el-row style="padding-top: 10px;padding-left: 10px;padding-bottom: 30px">
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="立库层数">
|
||||||
|
<el-select
|
||||||
|
v-model="stageParam"
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
@change="changeStage"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in layerList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div id="container" className="container" />
|
<div id="container" className="container" />
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -70,7 +96,12 @@ export default {
|
|||||||
},
|
},
|
||||||
allStructMsg: [],
|
allStructMsg: [],
|
||||||
msgTop: '200px',
|
msgTop: '200px',
|
||||||
msgLeft: '200px'
|
msgLeft: '200px',
|
||||||
|
layerList: [
|
||||||
|
{ 'label': '立库1层', 'value': 'AS_1' },
|
||||||
|
{ 'label': '立库2层', 'value': 'AS_2' },
|
||||||
|
{ 'label': '立库3层', 'value': 'AS_3' }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -188,9 +219,14 @@ export default {
|
|||||||
// 以下是设置参数显示值
|
// 以下是设置参数显示值
|
||||||
for (const val in data1) {
|
for (const val in data1) {
|
||||||
if (val === 'storagevehicle_code' && data1.storagevehicle_code) {
|
if (val === 'storagevehicle_code' && data1.storagevehicle_code) {
|
||||||
|
if (data1.sect_code === 'KTP01') {
|
||||||
|
const obj = { name: '托盘号', value: data1[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else {
|
||||||
const obj = { name: '木箱号', value: data1[val] }
|
const obj = { name: '木箱号', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (val === 'quanlity_in_box' && data1.quanlity_in_box) {
|
if (val === 'quanlity_in_box' && data1.quanlity_in_box) {
|
||||||
const obj = { name: '子卷数', value: data1[val] }
|
const obj = { name: '子卷数', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
@@ -207,6 +243,10 @@ export default {
|
|||||||
const obj = { name: '木箱总重', value: data1[val] }
|
const obj = { name: '木箱总重', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
|
if (val === 'container_weight' && data1.container_weight) {
|
||||||
|
const obj = { name: '子卷净重', value: data1[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.length > 1) { // 显示子卷
|
if (data.length > 1) { // 显示子卷
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
@@ -227,6 +267,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
changeStage() {
|
||||||
|
this.initStageData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
text: this.chartData.name,
|
text: this.chartData.name,
|
||||||
subtext: this.chartData.pieSubTest,
|
subtext: this.chartData.pieSubTest,
|
||||||
|
subtextStyle: {
|
||||||
|
'color': '#333'
|
||||||
|
},
|
||||||
left: 'center'
|
left: 'center'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
@@ -83,6 +86,13 @@ export default {
|
|||||||
type: 'pie',
|
type: 'pie',
|
||||||
radius: '70%',
|
radius: '70%',
|
||||||
center: ['50%', '58%'],
|
center: ['50%', '58%'],
|
||||||
|
avoidLabelOverlap: true,
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'outside',
|
||||||
|
formatter: `{b}:{c}`,
|
||||||
|
fontSize: 14
|
||||||
|
},
|
||||||
data: this.chartData.data,
|
data: this.chartData.data,
|
||||||
emphasis: {
|
emphasis: {
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
|
|||||||
@@ -188,9 +188,14 @@ export default {
|
|||||||
// 以下是设置参数显示值
|
// 以下是设置参数显示值
|
||||||
for (const val in data1) {
|
for (const val in data1) {
|
||||||
if (val === 'storagevehicle_code' && data1.storagevehicle_code) {
|
if (val === 'storagevehicle_code' && data1.storagevehicle_code) {
|
||||||
|
if (data1.sect_code === 'KTP01') {
|
||||||
|
const obj = { name: '托盘号', value: data1[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else {
|
||||||
const obj = { name: '木箱号', value: data1[val] }
|
const obj = { name: '木箱号', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (val === 'quanlity_in_box' && data1.quanlity_in_box) {
|
if (val === 'quanlity_in_box' && data1.quanlity_in_box) {
|
||||||
const obj = { name: '子卷数', value: data1[val] }
|
const obj = { name: '子卷数', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
@@ -207,6 +212,10 @@ export default {
|
|||||||
const obj = { name: '木箱总重', value: data1[val] }
|
const obj = { name: '木箱总重', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
|
if (val === 'container_weight' && data1.container_weight) {
|
||||||
|
const obj = { name: '子卷净重', value: data1[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.length > 1) { // 显示子卷
|
if (data.length > 1) { // 显示子卷
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
|||||||
@@ -188,9 +188,14 @@ export default {
|
|||||||
// 以下是设置参数显示值
|
// 以下是设置参数显示值
|
||||||
for (const val in data1) {
|
for (const val in data1) {
|
||||||
if (val === 'storagevehicle_code' && data1.storagevehicle_code) {
|
if (val === 'storagevehicle_code' && data1.storagevehicle_code) {
|
||||||
|
if (data1.sect_code === 'KTP01') {
|
||||||
|
const obj = { name: '托盘号', value: data1[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
} else {
|
||||||
const obj = { name: '木箱号', value: data1[val] }
|
const obj = { name: '木箱号', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (val === 'quanlity_in_box' && data1.quanlity_in_box) {
|
if (val === 'quanlity_in_box' && data1.quanlity_in_box) {
|
||||||
const obj = { name: '子卷数', value: data1[val] }
|
const obj = { name: '子卷数', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
@@ -207,6 +212,10 @@ export default {
|
|||||||
const obj = { name: '木箱总重', value: data1[val] }
|
const obj = { name: '木箱总重', value: data1[val] }
|
||||||
this.arr.push(obj)
|
this.arr.push(obj)
|
||||||
}
|
}
|
||||||
|
if (val === 'container_weight' && data1.container_weight) {
|
||||||
|
const obj = { name: '子卷净重', value: data1[val] }
|
||||||
|
this.arr.push(obj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.length > 1) { // 显示子卷
|
if (data.length > 1) { // 显示子卷
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
<AddDtl :dialog-show.sync="dtlShow" :stor-id="storId" @tableChanged="tableChanged" />
|
||||||
<StructDiv ref="child" :dialog-show.sync="structShow" @tableChanged="structChanged" />
|
<StructDiv ref="child" :layer-num="layer_num" :stor-id="storId" :dialog-show.sync="structShow" @tableChanged="structChanged" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
|||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
bill_code: '',
|
bill_code: '',
|
||||||
stor_id: '',
|
stor_id: '1582991156504039424',
|
||||||
stor_code: '',
|
stor_code: '',
|
||||||
stor_name: '',
|
stor_name: '',
|
||||||
bill_status: '10',
|
bill_status: '10',
|
||||||
@@ -278,6 +278,7 @@ export default {
|
|||||||
nowindex: '',
|
nowindex: '',
|
||||||
storlist: [],
|
storlist: [],
|
||||||
invtypelist: [],
|
invtypelist: [],
|
||||||
|
layer_num: null,
|
||||||
rules: {
|
rules: {
|
||||||
stor_id: [
|
stor_id: [
|
||||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||||
@@ -350,6 +351,7 @@ export default {
|
|||||||
this.form.stor_name = item.stor_name
|
this.form.stor_name = item.stor_name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.form.tableData = []
|
||||||
},
|
},
|
||||||
async queryDtl() {
|
async queryDtl() {
|
||||||
if (!this.form.stor_id) {
|
if (!this.form.stor_id) {
|
||||||
@@ -359,6 +361,7 @@ export default {
|
|||||||
this.dtlShow = true
|
this.dtlShow = true
|
||||||
},
|
},
|
||||||
async queryStruct(index, row) {
|
async queryStruct(index, row) {
|
||||||
|
this.layer_num = row.turnout_struct_code.charAt(row.turnout_struct_code.length - 1)
|
||||||
this.structShow = true
|
this.structShow = true
|
||||||
this.$refs.child.getMsg(false)
|
this.$refs.child.getMsg(false)
|
||||||
this.nowindex = index
|
this.nowindex = index
|
||||||
|
|||||||
@@ -9,18 +9,36 @@
|
|||||||
@close="close"
|
@close="close"
|
||||||
@open="open"
|
@open="open"
|
||||||
>
|
>
|
||||||
<el-row>
|
|
||||||
<el-col :span="5">
|
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="库区">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
|
v-model="defaultList"
|
||||||
placeholder="库区"
|
placeholder="库区"
|
||||||
:options="sects"
|
:options="sects"
|
||||||
:props="{ checkStrictly: true }"
|
:props="{ checkStrictly: true }"
|
||||||
clearable
|
clearable
|
||||||
@change="sectQueryChange"
|
@change="sectQueryChange"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="5">
|
<el-form-item label="木箱">
|
||||||
|
<el-input
|
||||||
|
v-model="query.package_box_sn"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="木箱号模糊查询"
|
||||||
|
style="width: 200px;"
|
||||||
|
class="filter-item"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="货位">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.struct_code"
|
v-model="query.struct_code"
|
||||||
clearable
|
clearable
|
||||||
@@ -30,8 +48,8 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="5">
|
<el-form-item label="物料">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.remark"
|
v-model="query.remark"
|
||||||
clearable
|
clearable
|
||||||
@@ -41,8 +59,8 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
<el-col :span="5">
|
<el-form-item label="批次">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.pcsn"
|
v-model="query.pcsn"
|
||||||
clearable
|
clearable
|
||||||
@@ -52,12 +70,9 @@
|
|||||||
class="filter-item"
|
class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
|
|
||||||
<el-col :span="4">
|
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-col>
|
</el-form>
|
||||||
</el-row>
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<div style="padding: 10px" />
|
<div style="padding: 10px" />
|
||||||
<el-table
|
<el-table
|
||||||
@@ -135,7 +150,8 @@ export default {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
opendtlParam: '',
|
opendtlParam: '',
|
||||||
sects: [],
|
sects: [],
|
||||||
rows: []
|
rows: [],
|
||||||
|
defaultList: ['1582991156504039424', '1582991348217286656']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -153,6 +169,9 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
this.crud.query.stor_id = this.storId
|
this.crud.query.stor_id = this.storId
|
||||||
|
if (this.storId === this.defaultList[0]) {
|
||||||
|
this.crud.query.sect_id = this.defaultList[1]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
|
crudUserStor.getSect({ 'stor_id': this.storId }).then(res => {
|
||||||
@@ -186,6 +205,7 @@ export default {
|
|||||||
this.crud.query.stor_id = val[0]
|
this.crud.query.stor_id = val[0]
|
||||||
this.crud.query.sect_id = val[1]
|
this.crud.query.sect_id = val[1]
|
||||||
}
|
}
|
||||||
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
debugger
|
debugger
|
||||||
|
|||||||
Reference in New Issue
Block a user