Browse Source

修改

master
18188916393 2 years ago
parent
commit
7a30f2ccf3
  1. 12
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  2. 1
      wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java
  3. 9
      wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java
  4. 53
      wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/wql/QPADSERVICE.wql
  5. BIN
      wms/hd/nladmin-system/src/main/java/org/nl/wms/wms.xls
  6. 8
      wms/hd/nladmin-system/src/main/resources/config/application-dev.yml

12
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -178,12 +178,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
String material_id = (String) produceInfoByCode.get("material_id");
String cust_id = (String) produceInfoByCode.get("cust_id");
String producetask_id = (String) produceInfoByCode.get("producetask_id");
WQLObject.getWQLObject("st_buss_vehiclegroup").delete("vehicle_code ='"+vehicle_code+"'");
//如果上报不了,则去点位上取(木托盘情况)
if (StrUtil.equals("0", vehicle_code)) {
vehicle_code = produceInfoByCode.getString("vehicle_code");
}
JSONObject materialObj = WQLObject
.getWQLObject("MD_ME_Material")
.query("material_id='" + material_id + "'")
.uniqueResult(0);
JSONObject groubObj = new JSONObject();
groubObj.put("group_id", IdUtil.getSnowflake(1, 1).nextId());
groubObj.put("vehicle_code", vehicle_code);
groubObj.put("material_uuid", material_id);
groubObj.put("material_code", materialObj.getString("material_code"));
@ -352,7 +358,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
}
JSONObject vehicleObj = WQLObject.getWQLObject("st_buss_vehiclegroup").query("vehicle_code='" + vehicle_code + "' AND is_delete='0'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicleObj)) {
throw new BadRequestException("未找到托盘号为'" + vehicle_code + "'的托盘信息!");
//去找对应排产单物料的垛型参数
WQLObject infoTable = WQLObject.getWQLObject("MD_ME_CribbingInfo");
JSONObject produceInfoByCodeObj = this.getProduceInfoByCode(device_code);
String material_id = produceInfoByCodeObj.getString("material_id");
vehicleObj = infoTable.query("material_id='" + material_id + "'").uniqueResult(0);
}
JSONObject result = new JSONObject();
result.put("status", HttpStatus.OK.value());

1
wms/hd/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/WmsToAcsServiceImpl.java

@ -44,7 +44,6 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
public JSONObject queryPointStatus(JSONArray arr) {
String api = "api/wms/querydevice";
return AcsUtil.notifyAcs(api, arr);
}

9
wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/service/impl/SendMaterialServiceImpl.java

@ -11,6 +11,7 @@ import org.nl.exception.BadRequestException;
import org.nl.wms.pda.exception.PdaRequestException;
import org.nl.wms.pda.sendMaterial.service.SendMaterialService;
import org.nl.wms.sch.manage.buss.SendMaterialTask;
import org.nl.wql.WQL;
import org.nl.wql.core.bean.WQLObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -28,19 +29,19 @@ public class SendMaterialServiceImpl implements SendMaterialService {
public Map<String, Object> queryDevice(Map<String, String> jsonObject) {
JSONObject returnjo = new JSONObject();
//查询工序
JSONArray workprocedureArr = WQLObject.getWQLObject("pdm_base_workprocedure").query("1=1").getResultJSONArray(0);
JSONArray workprocedureArr = WQL.getWO("QPADSERVICE").addParam("flag", "16").process().getResultJSONArray(0);
//根据工序查询设备
JSONArray deviceja = new JSONArray();
JSONArray workprocedureja = new JSONArray();
for (int i = 0; i < workprocedureArr.size(); i++) {
JSONObject workprocedureObj = workprocedureArr.getJSONObject(i);
String workprocedure_id = workprocedureObj.getString("workprocedure_id");
JSONArray deviceArr = WQLObject.getWQLObject("pdm_base_device").query("workprocedure_id='" + workprocedure_id + "'").getResultJSONArray(0);
JSONArray deviceArr = WQL.getWO("QPADSERVICE").addParam("flag", "17").addParam("workprocedure_id", workprocedure_id).process().getResultJSONArray(0);
JSONArray deviceja = new JSONArray();
for (int j = 0; j < deviceArr.size(); j++) {
JSONObject deviceObj = deviceArr.getJSONObject(j);
//根据设备查询点位
String device_id = deviceObj.getString("device_id");
JSONArray pointArr = WQLObject.getWQLObject("sch_base_point").query("device_id='" + device_id + "'").getResultJSONArray(0);
JSONArray pointArr = WQL.getWO("QPADSERVICE").addParam("flag", "18").addParam("device_id", device_id).process().getResultJSONArray(0);
deviceObj.put("pointArr", pointArr);
deviceja.add(deviceObj);
}

53
wms/hd/nladmin-system/src/main/java/org/nl/wms/pda/sendMaterial/wql/QPADSERVICE.wql

@ -28,6 +28,8 @@
输入.search_bar TYPEAS s_string
输入.buss_area_type TYPEAS s_string
输入.height TYPEAS s_string
输入.workprocedure_id TYPEAS s_string
输入.device_id TYPEAS s_string
[临时表]
@ -387,3 +389,54 @@ IF 输入.flag = "13"
ENDSELECT
ENDPAGEQUERY
ENDIF
IF 输入.flag = "16"
PAGEQUERY
SELECT
workpro.workprocedure_id,
workpro.workprocedure_code,
workpro.workprocedure_name
FROM
pdm_base_workprocedure workpro
WHERE
workprocedure_code < '05'
ORDER BY
seq_no
ENDSELECT
ENDPAGEQUERY
ENDIF
IF 输入.flag = "17"
PAGEQUERY
SELECT
device.device_id,
device.device_code,
device.device_name
FROM
pdm_base_device device
WHERE
1 = 1
OPTION 输入.workprocedure_id <> ""
device.workprocedure_id = 输入.workprocedure_id
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF
IF 输入.flag = "18"
PAGEQUERY
SELECT
point.point_id,
point.point_code,
point.point_name
FROM
sch_base_point point
WHERE
1 = 1
OPTION 输入.device_id <> ""
point.device_id = 输入.device_id
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF

BIN
wms/hd/nladmin-system/src/main/java/org/nl/wms/wms.xls

Binary file not shown.

8
wms/hd/nladmin-system/src/main/resources/config/application-dev.yml

@ -8,12 +8,12 @@ spring:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
#url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:llsh_wms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
username: ${DB_USER:root}
#password: ${DB_PWD:P@ssw0rd}
# password: ${DB_PWD:Root.123456}
password: ${DB_PWD:zjw123}
password: ${DB_PWD:Root.123456}
#password: ${DB_PWD:zjw123}
# 初始连接数
initial-size: 5
# 最小连接数

Loading…
Cancel
Save