rev 混料机下工单依旧使用物料号
This commit is contained in:
@@ -1,18 +1,33 @@
|
||||
package org.nl.config;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.mnt.util.DataTypeEnum;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class DataBaseConfig {
|
||||
|
||||
@Value("${erp.sqlserver.enabled}")
|
||||
private boolean sqlserverIsConnect;
|
||||
@Value("${erp.sqlserver.jdbcurl}")
|
||||
private String sqlserverJdbcUrl;
|
||||
@Value("${erp.sqlserver.username}")
|
||||
private String sqlserverUserName;
|
||||
@Value("${erp.sqlserver.password}")
|
||||
private String sqlserverPassword;
|
||||
|
||||
@Primary
|
||||
@Bean(name = "dataSource")
|
||||
@ConfigurationProperties(prefix = "spring.datasource.druid")
|
||||
@@ -20,4 +35,51 @@ public class DataBaseConfig {
|
||||
return new DruidDataSource();
|
||||
}
|
||||
|
||||
@Bean("dataSource1")
|
||||
@ConditionalOnExpression("${erp.sqlserver.enabled:true}")
|
||||
public DataSource dataSource1() {
|
||||
log.info("是否连接Sqlserver" + sqlserverIsConnect);
|
||||
String jdbcUrl = sqlserverJdbcUrl;
|
||||
String userName = sqlserverUserName;
|
||||
String password = sqlserverPassword;
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
String className;
|
||||
try {
|
||||
className = DriverManager.getDriver(jdbcUrl.trim()).getClass().getName();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("Get class name error: =" + jdbcUrl);
|
||||
}
|
||||
if (StrUtil.isEmpty(className)) {
|
||||
DataTypeEnum dataTypeEnum = DataTypeEnum.urlOf(jdbcUrl);
|
||||
if (null == dataTypeEnum) {
|
||||
throw new RuntimeException("Not supported data type: jdbcUrl=" + jdbcUrl);
|
||||
}
|
||||
druidDataSource.setDriverClassName(dataTypeEnum.getDriver());
|
||||
} else {
|
||||
druidDataSource.setDriverClassName(className);
|
||||
}
|
||||
|
||||
|
||||
druidDataSource.setUrl(jdbcUrl);
|
||||
druidDataSource.setUsername(userName);
|
||||
druidDataSource.setPassword(password);
|
||||
// 配置获取连接等待超时的时间
|
||||
druidDataSource.setMaxWait(3000);
|
||||
// 配置初始化大小、最小、最大
|
||||
druidDataSource.setInitialSize(5);
|
||||
druidDataSource.setMinIdle(5);
|
||||
druidDataSource.setMaxActive(10);
|
||||
|
||||
// 如果链接出现异常则直接判定为失败而不是一直重试
|
||||
druidDataSource.setBreakAfterAcquireFailure(true);
|
||||
try {
|
||||
druidDataSource.init();
|
||||
} catch (SQLException e) {
|
||||
log.error("Exception during pool initialization", e);
|
||||
throw new RuntimeException(e.getMessage());
|
||||
}
|
||||
|
||||
return druidDataSource;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,11 +50,29 @@ public class MaterialbaseDto implements Serializable {
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
* 是否删除
|
||||
*/
|
||||
private String is_used;
|
||||
private String is_delete;
|
||||
|
||||
private Double weight;
|
||||
|
||||
private String material_type;
|
||||
|
||||
private Double qty;
|
||||
|
||||
private Double aux_qty;
|
||||
|
||||
private Double current_qty;
|
||||
|
||||
private Double current_aux_qty;
|
||||
|
||||
private String order_code;
|
||||
|
||||
private String furnace;
|
||||
|
||||
private String material_brick_type;
|
||||
|
||||
private String product_grade;
|
||||
|
||||
private Double unqualified_qty;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhouz
|
||||
@@ -51,6 +52,9 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
||||
map.put("flag", "1");
|
||||
map.put("search", name);
|
||||
map.put("material_type", MapUtil.getStr(whereJson, "material_type"));
|
||||
map.put("order_code", MapUtil.getStr(whereJson, "order_code"));
|
||||
map.put("product_grade", MapUtil.getStr(whereJson, "product_grade"));
|
||||
map.put("brick_type", MapUtil.getStr(whereJson, "brick_type"));
|
||||
|
||||
return WQL.getWO("QMD_ME_MATERIAL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time DESC");
|
||||
}
|
||||
@@ -106,52 +110,6 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
||||
dto.setCreate_time(now);
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||
wo.insert(json);
|
||||
|
||||
// 解析物料编码
|
||||
JSONObject material_detail = new JSONObject();
|
||||
material_detail.put("material_id", id);
|
||||
material_detail.put("material_code", material_code);
|
||||
WQLObject dict_detail_table = WQLObject.getWQLObject("sys_dict_detail");
|
||||
String furnace_code = material_code.substring(0, 2);
|
||||
JSONObject furnace_name = dict_detail_table.query("name = 'furnace' AND value = '" + furnace_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(furnace_name)) {
|
||||
throw new BadRequestException("物料编码解析错误:未知炉型!");
|
||||
}
|
||||
material_detail.put("furnace", furnace_name.getString("label"));
|
||||
String material_brick_code = material_code.substring(2, 5);
|
||||
JSONObject material_brick_type = dict_detail_table.query("name = 'material_brick_type' AND value = '" + material_brick_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(material_brick_type)) {
|
||||
throw new BadRequestException("物料编码解析错误:未知物料砖类型!");
|
||||
}
|
||||
material_detail.put("material_brick_type", material_brick_type.getString("label"));
|
||||
|
||||
String bom_code = material_code.substring(5, 11);
|
||||
JSONObject old_bom = wo.query("material_code = '" + bom_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(old_bom)) {
|
||||
JSONObject bom = new JSONObject();
|
||||
bom.put("material_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
bom.put("material_code", bom_code);
|
||||
bom.put("material_type", "2");
|
||||
bom.put("create_id", currentUserId);
|
||||
bom.put("create_name", nickName);
|
||||
bom.put("create_time", now);
|
||||
wo.insert(bom);
|
||||
}
|
||||
|
||||
material_detail.put("bom_code", bom_code);
|
||||
material_detail.put("order_code", material_code.substring(11, 16));
|
||||
material_detail.put("customer_code", material_code.substring(16, 21));
|
||||
String product_grade_code = material_code.substring(21, 23);
|
||||
JSONObject product_grade = dict_detail_table.query("name = 'product_grade' AND value = '" + product_grade_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(product_grade)) {
|
||||
throw new BadRequestException("物料编码解析错误:未知牌号!");
|
||||
}
|
||||
material_detail.put("product_grade", product_grade.getString("label"));
|
||||
material_detail.put("brick_type", material_code.substring(23));
|
||||
material_detail.put("create_id", currentUserId);
|
||||
material_detail.put("create_name", nickName);
|
||||
material_detail.put("create_time", now);
|
||||
WQLObject.getWQLObject("md_me_material_detail").insert(material_detail);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -199,8 +157,59 @@ public class MaterialbaseServiceImpl implements MaterialbaseService {
|
||||
|
||||
@Override
|
||||
public void synchronize(Map whereJson) {
|
||||
/* wmsToErpService.getClassInfo(null);
|
||||
wmsToErpService.getMaterialInfo(null);*/
|
||||
JSONArray erp_materials = WQL.getWO("QMD_ME_MATERIAL").setDbname("dataSource1").addParam("flag", "2").process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(erp_materials)) {
|
||||
WQLObject material_table = WQLObject.getWQLObject("md_me_materialbase");
|
||||
List<String> material_codes = material_table.query().getResultJSONArray(0).stream().map(o -> ((JSONObject) o).getString("material_code")).collect(Collectors.toList());
|
||||
WQLObject dict_detail_table = WQLObject.getWQLObject("sys_dict_detail");
|
||||
|
||||
Long user_id = SecurityUtils.getCurrentUserId();
|
||||
String nick_name = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
erp_materials.forEach(o -> {
|
||||
JSONObject erp_material = (JSONObject) o;
|
||||
String material_code = erp_material.getString("cinvcode").substring(1);
|
||||
if (!material_codes.contains(material_code)) {
|
||||
JSONObject material = new JSONObject();
|
||||
long id = IdUtil.getSnowflake(1L, 1L).nextId();
|
||||
material.put("material_id", id);
|
||||
material.put("material_code", material_code);
|
||||
material.put("material_name", erp_material.getString("cinvname"));
|
||||
material.put("weight", String.format("%.2f", erp_material.getDoubleValue("changerate") * 1000));
|
||||
String qty = String.format("%.0f", erp_material.getDoubleValue("qty") * 1000);
|
||||
material.put("qty", qty);
|
||||
material.put("surplus_qty", qty);
|
||||
String aux_qty = String.format("%.0f", erp_material.getDoubleValue("auxqty"));
|
||||
material.put("aux_qty", aux_qty);
|
||||
material.put("surplus_aux_qty", aux_qty);
|
||||
material.put("order_code", erp_material.getString("free1"));
|
||||
|
||||
String furnace_code = material_code.substring(0, 2);
|
||||
JSONObject furnace_name = dict_detail_table.query("name = 'furnace' AND value = '" + furnace_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(furnace_name)) {
|
||||
material.put("furnace", furnace_name.getString("label"));
|
||||
} else {
|
||||
material.put("furnace", furnace_code);
|
||||
}
|
||||
String material_brick_code = material_code.substring(2, 5);
|
||||
JSONObject material_brick_type = dict_detail_table.query("name = 'material_brick_type' AND value = '" + material_brick_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(material_brick_type)) {
|
||||
material.put("material_brick_type", material_brick_type.getString("label"));
|
||||
} else {
|
||||
material.put("material_brick_type", material_brick_code);
|
||||
}
|
||||
material.put("product_grade", erp_material.getString("free3"));
|
||||
material.put("brick_type", erp_material.getString("free4"));
|
||||
|
||||
material.put("create_id", user_id);
|
||||
material.put("create_name", nick_name);
|
||||
material.put("create_time", now);
|
||||
|
||||
material_table.insert(material);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
输入.class_code TYPEAS s_string
|
||||
输入.idssql TYPEAS f_string
|
||||
输入.classIds TYPEAS f_string
|
||||
输入.material_type TYPEAS f_string
|
||||
输入.material_type TYPEAS s_string
|
||||
输入.order_code TYPEAS s_string
|
||||
输入.product_grade TYPEAS s_string
|
||||
输入.brick_type TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -55,10 +58,31 @@
|
||||
ENDOPTION
|
||||
OPTION 输入.material_type <> ""
|
||||
mb.material_type = 输入.material_type
|
||||
ENDOPTION
|
||||
OPTION 输入.order_code <> ""
|
||||
mb.order_code LIKE '%' order_code '%'
|
||||
ENDOPTION
|
||||
OPTION 输入.product_grade <> ""
|
||||
mb.product_grade LIKE '%' 输入.product_grade '%'
|
||||
ENDOPTION
|
||||
OPTION 输入.brick_type <> ""
|
||||
mb.brick_type LIKE '%' 输入.brick_type '%'
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
dbo.EFV_MO_ORDER
|
||||
WHERE
|
||||
STATUS = 3
|
||||
AND AuxQty > QualifiedInNum
|
||||
AND LEFT ( cinvcode, 1 ) <> '1'
|
||||
AND cInvCode LIKE 'W%'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -915,7 +915,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
throw new BadRequestException("载具编码不能为空!");
|
||||
}
|
||||
|
||||
boolean to_package = false;
|
||||
boolean to_package = true;
|
||||
|
||||
WQLObject vd_table = WQLObject.getWQLObject("st_ivt_vehicle_detail");
|
||||
JSONObject vd = vd_table
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
AND vd.is_delete = '0'
|
||||
AND vd.point_code = 输入.point_code
|
||||
AND vd.is_full = '0'
|
||||
AND vd.is_in_kiln = '0'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -116,9 +116,6 @@
|
||||
AND point.vehicle_code = vd.vehicle_code
|
||||
AND vd.is_delete = '0'
|
||||
LEFT JOIN md_me_materialbase mb1 ON vd.material_id = mb1.material_id
|
||||
LEFT JOIN md_me_material_detail md ON mb1.material_code = md.bom_code
|
||||
LEFT JOIN md_me_materialbase mb2 ON md.material_id = mb2.material_id
|
||||
LEFT JOIN pdm_bd_workorder workorder ON vd.workorder_id = workorder.workorder_id
|
||||
WHERE
|
||||
point.is_used = '1'
|
||||
AND point.lock_type = '1'
|
||||
@@ -126,10 +123,10 @@
|
||||
AND point.point_type = '1'
|
||||
AND point.point_status = '1'
|
||||
AND point.vehicle_type = '1'
|
||||
AND mb2.material_id = 输入.material_id
|
||||
AND mb1.material_id = 输入.material_id
|
||||
AND vd.stand_status IN ('3', '4')
|
||||
ORDER BY
|
||||
workorder.is_urgent DESC, vd.create_time ASC
|
||||
vd.create_time ASC
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -109,15 +109,13 @@
|
||||
JOIN pdm_bi_device device ON point.device_code = device.device_code
|
||||
LEFT JOIN pdm_bd_workorder workorder ON device.device_id = workorder.device_id AND workorder.order_status = '3'
|
||||
LEFT JOIN md_me_materialbase mb1 ON workorder.material_id = mb1.material_id AND mb1.material_type = '1'
|
||||
LEFT JOIN md_me_material_detail md1 ON mb1.material_id = md1.material_id
|
||||
LEFT JOIN md_me_materialbase mb2 ON md1.bom_code = mb2.material_code AND mb2.material_type = '2'
|
||||
WHERE
|
||||
point.is_used = '1'
|
||||
AND point.lock_type = '1'
|
||||
AND point.region_code = 'KLHJ'
|
||||
AND point.point_type = '2'
|
||||
AND point.point_status = '0'
|
||||
AND mb2.material_id = 输入.material_id
|
||||
AND mb1.material_id = 输入.material_id
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Binary file not shown.
@@ -158,3 +158,11 @@ sa-token:
|
||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||
# token 前缀
|
||||
token-prefix: Bearer
|
||||
|
||||
#erp
|
||||
erp:
|
||||
sqlserver:
|
||||
enabled: true
|
||||
jdbcurl: jdbc:sqlserver://192.168.0.251:1433;DatabaseName=UFDATA_001_2023;
|
||||
username: rl
|
||||
password: SH123
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.nl.test;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -8,18 +7,14 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.nl.modules.common.utils.CommonUtils;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.basedata.eum.StandStatus;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.sch.manage.LockType;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhangjiangwei
|
||||
@@ -31,58 +26,58 @@ public class TempTest {
|
||||
|
||||
@Test
|
||||
public void test01() {
|
||||
JSONArray vds = WQL.getWO("MANAGE_QUERY").addParam("flag", "1").process().getResultJSONArray(0);
|
||||
JSONArray erp_materials = WQL.getWO("QMD_ME_MATERIAL").setDbname("dataSource1").addParam("flag", "2").process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(erp_materials)) {
|
||||
WQLObject material_table = WQLObject.getWQLObject("md_me_materialbase");
|
||||
List<String> material_codes = material_table.query().getResultJSONArray(0).stream().map(o -> ((JSONObject) o).getString("material_code")).collect(Collectors.toList());
|
||||
WQLObject dict_detail_table = WQLObject.getWQLObject("sys_dict_detail");
|
||||
|
||||
if (ObjectUtil.isNotEmpty(vds)) {
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
for (int i = 0; i < vds.size(); i++) {
|
||||
JSONObject vd = vds.getJSONObject(i);
|
||||
DateTime create_time = DateUtil.parse(vd.getString("create_time"));
|
||||
DateTime time = DateUtil.offsetMinute(create_time, vd.getIntValue("standing_time"));
|
||||
int compare = DateUtil.compare(DateUtil.date(), time);
|
||||
if (compare >= 0) {
|
||||
ids.add(vd.getLong("vd_id"));
|
||||
}
|
||||
}
|
||||
Long user_id = 1L;
|
||||
String nick_name = "管理员";
|
||||
String now = DateUtil.now();
|
||||
|
||||
JSONObject update = new JSONObject();
|
||||
update.put("stand_status", StandStatus.COMPLETED.value());
|
||||
WQLObject.getWQLObject("st_ivt_vehicle_detail").update(update, "vd_id IN " + CommonUtils.idsArrayToInStr(ids.toArray(new Long[0])));
|
||||
}
|
||||
erp_materials.forEach(o -> {
|
||||
JSONObject erp_material = (JSONObject) o;
|
||||
String material_code = erp_material.getString("cinvcode").substring(1);
|
||||
if (!material_codes.contains(material_code)) {
|
||||
JSONObject material = new JSONObject();
|
||||
long id = IdUtil.getSnowflake(1L, 1L).nextId();
|
||||
material.put("material_id", id);
|
||||
material.put("material_code", material_code);
|
||||
material.put("material_name", erp_material.getString("cinvname"));
|
||||
material.put("weight", String.format("%.2f", erp_material.getDoubleValue("changerate") * 1000));
|
||||
String qty = String.format("%.0f", erp_material.getDoubleValue("qty") * 1000);
|
||||
material.put("qty", qty);
|
||||
material.put("surplus_qty", qty);
|
||||
String aux_qty = String.format("%.0f", erp_material.getDoubleValue("auxqty"));
|
||||
material.put("aux_qty", aux_qty);
|
||||
material.put("surplus_aux_qty", aux_qty);
|
||||
material.put("order_code", erp_material.getString("free1"));
|
||||
|
||||
vds = WQL.getWO("MANAGE_QUERY").addParam("flag", "2").process().getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(vds)) {
|
||||
ArrayList<Long> ids = new ArrayList<>();
|
||||
for (int i = 0; i < vds.size(); i++) {
|
||||
JSONObject vd = vds.getJSONObject(i);
|
||||
DateTime create_time = DateUtil.parse(vd.getString("create_time"));
|
||||
int threshold_time = vd.getIntValue("threshold_time");
|
||||
int standing_time = vd.getIntValue("standing_time");
|
||||
if (threshold_time != 0 && threshold_time < standing_time) {
|
||||
DateTime time = DateUtil.offsetMinute(create_time, threshold_time);
|
||||
int compare = DateUtil.compare(DateUtil.date(), time);
|
||||
if (compare >= 0) {
|
||||
ids.add(vd.getLong("vd_id"));
|
||||
String furnace_code = material_code.substring(0, 2);
|
||||
JSONObject furnace_name = dict_detail_table.query("name = 'furnace' AND value = '" + furnace_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(furnace_name)) {
|
||||
material.put("furnace", furnace_name.getString("label"));
|
||||
} else {
|
||||
material.put("furnace", furnace_code);
|
||||
}
|
||||
String material_brick_code = material_code.substring(2, 5);
|
||||
JSONObject material_brick_type = dict_detail_table.query("name = 'material_brick_type' AND value = '" + material_brick_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(material_brick_type)) {
|
||||
material.put("material_brick_type", material_brick_type.getString("label"));
|
||||
} else {
|
||||
material.put("material_brick_type", material_brick_code);
|
||||
}
|
||||
material.put("product_grade", erp_material.getString("free3"));
|
||||
material.put("brick_type", erp_material.getString("free4"));
|
||||
|
||||
material.put("create_id", user_id);
|
||||
material.put("create_name", nick_name);
|
||||
material.put("create_time", now);
|
||||
|
||||
material_table.insert(material);
|
||||
}
|
||||
}
|
||||
|
||||
if (!ids.isEmpty()) {
|
||||
JSONObject update = new JSONObject();
|
||||
update.put("stand_status", StandStatus.TIMEOUT.value());
|
||||
WQLObject.getWQLObject("st_ivt_vehicle_detail").update(update, "vd_id IN " + CommonUtils.idsArrayToInStr(ids.toArray(new Long[0])));
|
||||
}
|
||||
}
|
||||
|
||||
JSONArray points = WQL.getWO("MANAGE_QUERY").addParam("flag", "3").process().getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(vds)) {
|
||||
JSONArray point_codes = new JSONArray();
|
||||
for (int i = 0; i < points.size(); i++) {
|
||||
JSONObject point = points.getJSONObject(i);
|
||||
point_codes.add(point.getString("point_code"));
|
||||
}
|
||||
SpringContextHolder.getBean(WmsToAcsService.class).light(point_codes);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user