Browse Source

手持更新

master
张江玮 2 years ago
parent
commit
3d2336fa04
  1. 2
      lms/nladmin-system/src/main/java/org/nl/wms/basedata/wql/QMD_PB_VEHICLE_GROUP.wql
  2. 26
      lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  3. 73
      lms/nladmin-system/src/main/java/org/nl/wms/pda/rest/PdaController.java
  4. 31
      lms/nladmin-system/src/main/java/org/nl/wms/pda/service/PdaService.java
  5. 157
      lms/nladmin-system/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java
  6. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/AcsUtil.java
  7. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/wql/MANAGE_QUERY.wql
  8. 22
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java
  9. 1
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/wql/CALL_EMPTY_TASK.wql
  10. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/FJSendMaterialTask.java
  11. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/HLSendMaterialTask.java
  12. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/wql/SEND_MATERIAL_TASK.wql
  13. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/to/pack/BTHCToPackageTask.java
  14. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/to/pack/FJToPackageTask.java
  15. 2
      lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql
  16. BIN
      lms/nladmin-system/src/main/java/org/nl/wms/wms.xls
  17. 9
      lms/nladmin-system/src/test/java/org/nl/test/TempTest.java
  18. 4
      lms/nladmin-ui/.env.production
  19. 4
      lms/nladmin-ui/public/config.js
  20. 35
      lms/nladmin-ui/src/views/wms/basedata/vehicle/group/index.vue
  21. 2
      lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
  22. 2
      lms/nladmin-ui/src/views/wms/sch/point/index.vue
  23. 2
      lms/nladmin-ui/src/views/wms/sch/task/index.vue

2
lms/nladmin-system/src/main/java/org/nl/wms/basedata/wql/QMD_PB_VEHICLE_GROUP.wql

@ -49,7 +49,7 @@
st_ivt_vehicle_detail vd st_ivt_vehicle_detail vd
LEFT JOIN sch_base_point p ON p.point_code = vd.point_code LEFT JOIN sch_base_point p ON p.point_code = vd.point_code
WHERE WHERE
1 = 1 vd.is_delete = '0'
OPTION 输入.vehicle_code <> "" OPTION 输入.vehicle_code <> ""
vd.vehicle_code LIKE '%' 输入.vehicle_code '%' vd.vehicle_code LIKE '%' 输入.vehicle_code '%'
ENDOPTION ENDOPTION

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

@ -20,6 +20,7 @@ import org.nl.wms.basedata.eum.VehicleType;
import org.nl.wms.basedata.service.dto.VehicleDto; import org.nl.wms.basedata.service.dto.VehicleDto;
import org.nl.wms.common.PickType; import org.nl.wms.common.PickType;
import org.nl.wms.ext.acs.service.AcsToWmsService; import org.nl.wms.ext.acs.service.AcsToWmsService;
import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.sch.manage.*; import org.nl.wms.sch.manage.*;
import org.nl.wms.sch.task.call.empty.FJCallEmptyTask; import org.nl.wms.sch.task.call.empty.FJCallEmptyTask;
import org.nl.wms.sch.task.call.empty.GTKCallEmptyTask; import org.nl.wms.sch.task.call.empty.GTKCallEmptyTask;
@ -81,6 +82,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
private final SZCallMaterialTask szCallMaterialTask; private final SZCallMaterialTask szCallMaterialTask;
private final WmsToAcsService wmsToAcsService;
/** /**
* task_id任务标识 * task_id任务标识
* task_code任务编码 * task_code任务编码
@ -89,7 +92,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
* @param string 条件 * @param string 条件
* @return zss * @return zss
*/ */
@Transactional(rollbackFor = Exception.class)
@Override @Override
public Map<String, Object> receiveTaskStatusAcs(String string) { public Map<String, Object> receiveTaskStatusAcs(String string) {
JSONArray array = JSONArray.parseArray(string); JSONArray array = JSONArray.parseArray(string);
@ -261,6 +263,25 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
vd_update.put("update_time", now); vd_update.put("update_time", now);
vd_table.update(vd_update, "vehicle_type = '1' AND vehicle_code = '" + vehicle_code + "' AND is_delete = '0'"); vd_table.update(vd_update, "vehicle_type = '1' AND vehicle_code = '" + vehicle_code + "' AND is_delete = '0'");
String device_code = workorder.getString("device_code");
JSONObject result = wmsToAcsService.getDeviceStatus(
new JSONArray() {{
add(new JSONObject() {{
put("device_code", device_code);
}});
}});
if (!"200".equals(result.getString("status"))) {
throw new BadRequestException("[" + device_code + "] ACS未返回设备信息!");
}
JSONArray data = result.getJSONArray("data");
if (ObjectUtil.isEmpty(data)) {
throw new BadRequestException("[" + device_code + "] ACS未返回设备信息!");
}
String mix_num = data.getJSONObject(0).getString("mix_num");
if (StrUtil.isBlank(mix_num)) {
throw new BadRequestException("未知碾次!");
}
JSONObject vd = new JSONObject(); JSONObject vd = new JSONObject();
vd.put("vd_id", IdUtil.getSnowflake(1L, 1L).nextId()); vd.put("vd_id", IdUtil.getSnowflake(1L, 1L).nextId());
vd.put("vehicle_type", VehicleType.CUP.value()); vd.put("vehicle_type", VehicleType.CUP.value());
@ -274,6 +295,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
vd.put("create_time", now); vd.put("create_time", now);
vd.put("is_in_kiln", "0"); vd.put("is_in_kiln", "0");
vd.put("stand_status", StandStatus.STANDING.value()); vd.put("stand_status", StandStatus.STANDING.value());
vd.put("mix_num", mix_num);
vd_table.insert(vd); vd_table.insert(vd);
method_param.put("vd", vd); method_param.put("vd", vd);
@ -963,7 +985,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
JSONObject info = WQL JSONObject info = WQL
.getWO("ACS_TO_WMS") .getWO("ACS_TO_WMS")
.addParam("flag", "3") .addParam("flag", "3")
.addParam("vehicle_type", vehicle_type) .addParam("vehicle_type", String.valueOf(vehicle_type))
.addParam("vehicle_code", vehicle_code) .addParam("vehicle_code", vehicle_code)
.process() .process()
.uniqueResult(0); .uniqueResult(0);

73
lms/nladmin-system/src/main/java/org/nl/wms/pda/rest/PdaController.java

@ -74,9 +74,22 @@ public class PdaController {
return PdaUtils.buildSuccessResultJSON(pdaService.device(func)); return PdaUtils.buildSuccessResultJSON(pdaService.device(func));
} }
@PostMapping("/vehicleType")
@Log("查询载具类型")
@ApiOperation("查询载具类型")
@PdaAnnotation
public JSONObject vehicleType(@RequestBody JSONObject param) {
String func = param.getString("func");
if (StrUtil.isBlank(func)) {
throw new BadRequestException("未知功能!");
}
return PdaUtils.buildSuccessResultJSON(pdaService.vehicleType(func));
}
@PostMapping("/report") @PostMapping("/report")
@Log("查询设备") @Log("不合格品上报")
@ApiOperation("查询设备") @ApiOperation("不合格品上报")
@PdaAnnotation @PdaAnnotation
public JSONObject report(@RequestBody JSONObject param) { public JSONObject report(@RequestBody JSONObject param) {
String func = param.getString("func"); String func = param.getString("func");
@ -103,7 +116,7 @@ public class PdaController {
public JSONObject sendMaterial(@RequestBody JSONObject param) { public JSONObject sendMaterial(@RequestBody JSONObject param) {
String point_code = param.getString("point_code"); String point_code = param.getString("point_code");
if (StrUtil.isBlank(point_code)) { if (StrUtil.isBlank(point_code)) {
throw new BadRequestException("点位编码不能为空!"); throw new BadRequestException("点位不能为空!");
} }
String vehicle_code = param.getString("vehicle_code"); String vehicle_code = param.getString("vehicle_code");
vehicle_code = TaskUtils.formatVehicleCode(vehicle_code); vehicle_code = TaskUtils.formatVehicleCode(vehicle_code);
@ -134,7 +147,7 @@ public class PdaController {
public JSONObject callMaterial(@RequestBody JSONObject param) { public JSONObject callMaterial(@RequestBody JSONObject param) {
String point_code = param.getString("point_code"); String point_code = param.getString("point_code");
if (StrUtil.isBlank(point_code)) { if (StrUtil.isBlank(point_code)) {
throw new BadRequestException("点位编码不能为空!"); throw new BadRequestException("点位不能为空!");
} }
pdaService.callMaterial(point_code, param.toJSONString()); pdaService.callMaterial(point_code, param.toJSONString());
@ -148,7 +161,7 @@ public class PdaController {
public JSONObject sendEmpty(@RequestBody JSONObject param) { public JSONObject sendEmpty(@RequestBody JSONObject param) {
String point_code = param.getString("point_code"); String point_code = param.getString("point_code");
if (StrUtil.isBlank(point_code)) { if (StrUtil.isBlank(point_code)) {
throw new BadRequestException("点位编码不能为空!"); throw new BadRequestException("点位不能为空!");
} }
String vehicle_code = TaskUtils.formatVehicleCode(param.getString("vehicle_code")); String vehicle_code = TaskUtils.formatVehicleCode(param.getString("vehicle_code"));
if ("0000".equals(vehicle_code)) { if ("0000".equals(vehicle_code)) {
@ -158,4 +171,54 @@ public class PdaController {
pdaService.sendEmpty(point_code, vehicle_code, param.toJSONString()); pdaService.sendEmpty(point_code, vehicle_code, param.toJSONString());
return PdaUtils.buildSuccessResultJSON(null); return PdaUtils.buildSuccessResultJSON(null);
} }
@PostMapping("/callEmpty")
@Log("叫空")
@ApiOperation("叫空")
@PdaAnnotation
public JSONObject callEmpty(@RequestBody JSONObject param) {
String point_code = param.getString("point_code");
if (StrUtil.isBlank(point_code)) {
throw new BadRequestException("点位不能为空!");
}
pdaService.callEmpty(point_code, param.toJSONString());
return PdaUtils.buildSuccessResultJSON(null);
}
@PostMapping("/standStatus")
@Log("困料管理")
@ApiOperation("困料管理")
@PdaAnnotation
public JSONObject standStatus(@RequestBody JSONObject param) {
String vehicle_code = TaskUtils.formatVehicleCode(param.getString("vehicle_code"));
if ("0000".equals(vehicle_code)) {
throw new BadRequestException("载具编码不能为空!");
}
String type = param.getString("type");
if (StrUtil.isBlank(type)) {
throw new BadRequestException("操作类型不能为空!");
}
pdaService.standStatus(vehicle_code, type);
return PdaUtils.buildSuccessResultJSON(null);
}
@PostMapping("/inKiln")
@Log("入窑管理")
@ApiOperation("入窑管理")
@PdaAnnotation
public JSONObject inKiln(@RequestBody JSONObject param) {
String vehicle_code = TaskUtils.formatVehicleCode(param.getString("vehicle_code"));
if ("0000".equals(vehicle_code)) {
throw new BadRequestException("载具编码不能为空!");
}
String type = param.getString("type");
if (StrUtil.isBlank(type)) {
throw new BadRequestException("操作类型不能为空!");
}
pdaService.inKiln(vehicle_code, type);
return PdaUtils.buildSuccessResultJSON(null);
}
} }

31
lms/nladmin-system/src/main/java/org/nl/wms/pda/service/PdaService.java

@ -36,6 +36,14 @@ public interface PdaService {
*/ */
JSONArray device(String func); JSONArray device(String func);
/**
* 查询载具类型
*
* @param func 手持功能
* @return 标签
*/
JSONArray vehicleType(String func);
/** /**
* 不合格品上报 * 不合格品上报
* *
@ -69,4 +77,27 @@ public interface PdaService {
* @param vehicle_code 载具编码 * @param vehicle_code 载具编码
*/ */
void sendEmpty(String point_code, String vehicle_code, String request_param); void sendEmpty(String point_code, String vehicle_code, String request_param);
/**
* 叫空
*
* @param point_code 点位编码
*/
void callEmpty(String point_code, String request_param);
/**
* 困料管理
*
* @param vehicle_code 载具编码
* @param type 操作类型
*/
void standStatus(String vehicle_code, String type);
/**
* 入窑管理
*
* @param vehicle_code 载具编码
* @param type 操作类型
*/
void inKiln(String vehicle_code, String type);
} }

157
lms/nladmin-system/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
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;
@ -14,11 +15,15 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.basedata.eum.TrueOrFalse; import org.nl.wms.basedata.eum.TrueOrFalse;
import org.nl.wms.basedata.eum.VehicleType; import org.nl.wms.basedata.eum.VehicleType;
import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.nl.wms.pda.service.PdaService; import org.nl.wms.pda.service.PdaService;
import org.nl.wms.sch.manage.ACSSystem; import org.nl.wms.sch.manage.ACSSystem;
import org.nl.wms.sch.manage.CreateMode; import org.nl.wms.sch.manage.CreateMode;
import org.nl.wms.sch.manage.PointStatus; import org.nl.wms.sch.manage.PointStatus;
import org.nl.wms.sch.manage.Region; import org.nl.wms.sch.manage.Region;
import org.nl.wms.sch.task.call.empty.FJCallEmptyTask;
import org.nl.wms.sch.task.call.empty.HLCallEmptyTask;
import org.nl.wms.sch.task.call.empty.YZCallEmptyTask;
import org.nl.wms.sch.task.call.material.FJCallMaterialTask; import org.nl.wms.sch.task.call.material.FJCallMaterialTask;
import org.nl.wms.sch.task.call.material.YZCallMaterialTask; import org.nl.wms.sch.task.call.material.YZCallMaterialTask;
import org.nl.wms.sch.task.send.empty.FJSendEmptyTask; import org.nl.wms.sch.task.send.empty.FJSendEmptyTask;
@ -53,9 +58,19 @@ public class PdaServiceImpl implements PdaService {
private final FJSendEmptyTask fjSendEmptyTask; private final FJSendEmptyTask fjSendEmptyTask;
private final HLCallEmptyTask hlCallEmptyTask;
private final YZCallEmptyTask yzCallEmptyTask;
private final FJCallEmptyTask fjCallEmptyTask;
private final WmsToAcsService wmsToAcsService;
@Override @Override
public JSONArray region(String func) { public JSONArray region(String func) {
switch (func) { switch (func) {
case "call_empty":
// 叫空
case "send_material": case "send_material":
// 送料 // 送料
return WQL return WQL
@ -177,6 +192,36 @@ public class PdaServiceImpl implements PdaService {
default: default:
throw new BadRequestException(region.label() + "没有送空点位!"); throw new BadRequestException(region.label() + "没有送空点位!");
} }
case "call_empty":
// 叫空
switch (region) {
case HL:
return WQL
.getWO("PDA")
.addParam("flag", "2")
.addParam("region_code", region_code)
.addParam("point_type", "('1', '2')")
.process()
.getResultJSONArray(0);
case YZ:
return WQL
.getWO("PDA")
.addParam("flag", "2")
.addParam("region_code", region_code)
.addParam("point_type", "('1')")
.process()
.getResultJSONArray(0);
case FJ:
return WQL
.getWO("PDA")
.addParam("flag", "2")
.addParam("region_code", region_code)
.addParam("point_type", "('2')")
.process()
.getResultJSONArray(0);
default:
throw new BadRequestException(region.label() + "没有叫空点位!");
}
default: default:
throw new BadRequestException("未知功能!"); throw new BadRequestException("未知功能!");
} }
@ -191,6 +236,11 @@ public class PdaServiceImpl implements PdaService {
.getResultJSONArray(0); .getResultJSONArray(0);
} }
@Override
public JSONArray vehicleType(String func) {
return WQLObject.getWQLObject("sys_dict_detail").query("name = 'vehicle_type'", "dict_sort ASC").getResultJSONArray(0);
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void report(String device_code, String unqualified_qty) { public void report(String device_code, String unqualified_qty) {
@ -261,13 +311,11 @@ public class PdaServiceImpl implements PdaService {
if (Region.FJ.value().equals(region_code)) { if (Region.FJ.value().equals(region_code)) {
vd.put("is_package", TrueOrFalse.TRUE.value()); vd.put("is_package", TrueOrFalse.TRUE.value());
} }
vd_table.insert(vd);
Region region = Region.get(point.getString("region_code")); Region region = Region.get(point.getString("region_code"));
JSONObject method_param = new JSONObject(); JSONObject method_param = new JSONObject();
method_param.put("point", point); method_param.put("point", point);
method_param.put("workorder", workorder); method_param.put("workorder", workorder);
method_param.put("vd", vd);
method_param.put("create_mode", CreateMode.SCCJ.value()); method_param.put("create_mode", CreateMode.SCCJ.value());
method_param.put("request_param", request_param); method_param.put("request_param", request_param);
method_param.put("create_id", user_id); method_param.put("create_id", user_id);
@ -275,12 +323,37 @@ public class PdaServiceImpl implements PdaService {
switch (region) { switch (region) {
case HL: case HL:
String device_code = workorder.getString("device_code");
JSONObject result = wmsToAcsService.getDeviceStatus(
new JSONArray() {{
add(new JSONObject() {{
put("device_code", device_code);
}});
}});
if (!"200".equals(result.getString("status"))) {
throw new BadRequestException("[" + device_code + "] ACS未返回设备信息!");
}
JSONArray data = result.getJSONArray("data");
if (ObjectUtil.isEmpty(data)) {
throw new BadRequestException("[" + device_code + "] ACS未返回设备信息!");
}
String mix_num = data.getJSONObject(0).getString("mix_num");
if (StrUtil.isBlank(mix_num)) {
throw new BadRequestException("未知碾次!");
}
vd.put("mix_num", mix_num);
vd_table.insert(vd);
method_param.put("vd", vd);
hlSendMaterialTask.createTask(method_param); hlSendMaterialTask.createTask(method_param);
break; break;
case YZ: case YZ:
vd_table.insert(vd);
method_param.put("vd", vd);
yzSendMaterialTask.createTask(method_param); yzSendMaterialTask.createTask(method_param);
break; break;
case FJ: case FJ:
vd_table.insert(vd);
method_param.put("vd", vd);
fjSendMaterialTask.createTask(method_param); fjSendMaterialTask.createTask(method_param);
default: default:
throw new BadRequestException("[" + region.label() + "] 不能发起送料任务!"); throw new BadRequestException("[" + region.label() + "] 不能发起送料任务!");
@ -385,4 +458,84 @@ public class PdaServiceImpl implements PdaService {
throw new BadRequestException("[" + region.label() + "] 不能发起送空任务!"); throw new BadRequestException("[" + region.label() + "] 不能发起送空任务!");
} }
} }
@Override
public void callEmpty(String point_code, String request_param) {
JSONObject point = WQLObject
.getWQLObject("sch_base_point")
.query("is_used = '1' AND point_code = '" + point_code + "'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(point)) {
throw new BadRequestException("[" + point_code + "] 已删除或未启用!");
}
TaskUtils.pointNameIsLocked(point);
Region region = Region.get(point.getString("region_code"));
JSONObject method_param = new JSONObject();
method_param.put("point", point);
method_param.put("create_mode", CreateMode.SCCJ.value());
method_param.put("request_param", request_param);
method_param.put("create_id", SecurityUtils.getCurrentUserId());
method_param.put("create_name", SecurityUtils.getCurrentNickName());
switch (region) {
case HL:
JSONObject workorder = WQLObject
.getWQLObject("pdm_bd_workorder")
.query("is_delete = '0' AND device_code = '" + point.getString("device_code") + "' AND order_status = '3'")
.uniqueResult(0);
method_param.put("workorder", workorder);
hlCallEmptyTask.createTask(method_param);
break;
case YZ:
workorder = WQLObject
.getWQLObject("pdm_bd_workorder")
.query("is_delete = '0' AND device_code = '" + point.getString("device_code") + "' AND order_status = '3'")
.uniqueResult(0);
method_param.put("workorder", workorder);
yzCallEmptyTask.createTask(method_param);
break;
case FJ:
workorder = TaskUtils.hasWorkOrder(point);
method_param.put("workorder", workorder);
fjCallEmptyTask.createTask(method_param);
break;
default:
throw new BadRequestException("[" + region.label() + "] 不能发起叫空任务!");
}
}
@Override
public void standStatus(String vehicle_code, String type) {
JSONObject vehicle_update = new JSONObject();
switch (type) {
case "1":
vehicle_update.put("stand_status", "4");
break;
case "2":
vehicle_update.put("stand_status", "5");
break;
default:
throw new BadRequestException("未知操作!");
}
TaskUtils.addCurrentUpdateColum(vehicle_update);
WQLObject.getWQLObject("st_ivt_vehicle_detail").update(vehicle_update, "vehicle_type = '1' AND vehicle_code = '" + vehicle_code + "'");
}
@Override
public void inKiln(String vehicle_code, String type) {
JSONObject vehicle_update = new JSONObject();
switch (type) {
case "1":
vehicle_update.put("is_in_kiln", "1");
break;
case "2":
vehicle_update.put("is_in_kiln", "0");
break;
default:
throw new BadRequestException("未知操作!");
}
TaskUtils.addCurrentUpdateColum(vehicle_update);
WQLObject.getWQLObject("st_ivt_vehicle_detail").update(vehicle_update, "vehicle_type = '2' AND vehicle_code = '" + vehicle_code + "'");
}
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/AcsUtil.java

@ -40,7 +40,7 @@ public class AcsUtil {
//ConnectException: Connection refused: connect //ConnectException: Connection refused: connect
//网络不通 //网络不通
System.out.println(msg); System.out.println(msg);
result.put("status", HttpStatus.BAD_REQUEST); result.put("status", HttpStatus.BAD_REQUEST.value());
result.put("message", msg); result.put("message", msg);
} }
//acs抛异常这里 //acs抛异常这里

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/manage/wql/MANAGE_QUERY.wql

@ -65,7 +65,7 @@
WHERE WHERE
vd.is_delete = '0' vd.is_delete = '0'
AND vd.vehicle_type = '1' AND vd.vehicle_type = '1'
AND vd.stand_status IN ('3', '4') AND vd.stand_status = '3'
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

22
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java

@ -42,8 +42,10 @@ public class YZCallEmptyTask extends AbstractAcsTask {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
JSONObject work_order = form.getJSONObject("workorder"); JSONObject work_order = form.getJSONObject("workorder");
int priority = 1; int priority = 1;
String material_id = null;
if (ObjectUtil.isNotEmpty(work_order)) { if (ObjectUtil.isNotEmpty(work_order)) {
priority = TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1; priority = TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1;
material_id = work_order.getString("material_id");
} }
JSONObject task = TaskUtils.buildTask( JSONObject task = TaskUtils.buildTask(
@ -53,7 +55,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
null, null,
point.getString("point_code"), point.getString("point_code"),
null, null,
null, material_id,
VehicleType.STEEL_TRAY.value(), VehicleType.STEEL_TRAY.value(),
null, null,
priority, priority,
@ -86,13 +88,19 @@ public class YZCallEmptyTask extends AbstractAcsTask {
for (int i = 0; i < tasks.size(); i++) { for (int i = 0; i < tasks.size(); i++) {
JSONObject task = tasks.getJSONObject(i); JSONObject task = tasks.getJSONObject(i);
JSONObject point = WQL JSONObject point = null;
.getWO("CALL_EMPTY_TASK") String material_id = task.getString("material_id");
.addParam("flag", "1") if (StrUtil.isNotBlank(material_id)) {
.addParam("point_code", task.getString("point_code2")) point = WQL
.process() .getWO("CALL_EMPTY_TASK")
.uniqueResult(0); .addParam("flag", "1")
.addParam("point_code", task.getString("point_code2"))
.addParam("material_id", material_id)
.process()
.uniqueResult(0);
}
if (ObjectUtil.isEmpty(point)) { if (ObjectUtil.isEmpty(point)) {
task.put("material_id", null);
point = WQL point = WQL
.getWO("CALL_EMPTY_TASK") .getWO("CALL_EMPTY_TASK")
.addParam("flag", "2") .addParam("flag", "2")

1
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/wql/CALL_EMPTY_TASK.wql

@ -56,6 +56,7 @@
AND point.vehicle_type = '2' AND point.vehicle_type = '2'
AND vd.is_delete = '0' AND vd.is_delete = '0'
AND vd.point_code = 输入.point_code AND vd.point_code = 输入.point_code
AND vd.material_id = 输入.material_id
AND vd.is_full = '0' AND vd.is_full = '0'
AND vd.is_in_kiln = '0' AND vd.is_in_kiln = '0'
ENDSELECT ENDSELECT

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/FJSendMaterialTask.java

@ -314,11 +314,13 @@ public class FJSendMaterialTask extends AbstractAcsTask {
JSONObject regionIn = TaskUtils.buildRegionInFromTask(task, RegionInType.WGRK); JSONObject regionIn = TaskUtils.buildRegionInFromTask(task, RegionInType.WGRK);
WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn); WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn);
JSONObject vd = WQLObject.getWQLObject("st_ivt_vehicle_detail").query("vd_id = " + task.getString("group_id")).uniqueResult(0);
JSONArray param = new JSONArray(); JSONArray param = new JSONArray();
JSONObject info = new JSONObject(); JSONObject info = new JSONObject();
info.put("device_code", point_code2); info.put("device_code", point_code2);
info.put("vehicle_type", task.getIntValue("vehicle_type") - 2); info.put("vehicle_type", task.getIntValue("vehicle_type") - 2);
info.put("vehicle_code", task.getString("vehicle_code")); info.put("vehicle_code", task.getString("vehicle_code"));
info.put("is_package", vd.getString("is_package"));
param.add(info); param.add(info);
wmsToAcsService.writeVehicle(param); wmsToAcsService.writeVehicle(param);
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/HLSendMaterialTask.java

@ -259,7 +259,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
JSONObject workorder = WQL JSONObject workorder = WQL
.getWO("SEND_MATERIAL_TASK") .getWO("SEND_MATERIAL_TASK")
.addParam("flag", "7") .addParam("flag", "7")
.addParam("vd_id", task.getLongValue("group_id")) .addParam("vd_id", task.getString("group_id"))
.process() .process()
.uniqueResult(0); .uniqueResult(0);

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/wql/SEND_MATERIAL_TASK.wql

@ -156,7 +156,7 @@
QUERY QUERY
SELECT SELECT
vd.weight, vd.weight,
workorder.workorder_id workorder.workorder_id,
workorder.real_qty workorder.real_qty
FROM FROM
st_ivt_vehicle_detail vd st_ivt_vehicle_detail vd

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/to/pack/BTHCToPackageTask.java

@ -231,11 +231,13 @@ public class BTHCToPackageTask extends AbstractAcsTask {
JSONObject regionIn = TaskUtils.buildRegionInFromTask(task, RegionInType.WGRK); JSONObject regionIn = TaskUtils.buildRegionInFromTask(task, RegionInType.WGRK);
WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn); WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn);
JSONObject vd = WQLObject.getWQLObject("st_ivt_vehicle_detail").query("vd_id = " + task.getString("group_id")).uniqueResult(0);
JSONArray param = new JSONArray(); JSONArray param = new JSONArray();
JSONObject info = new JSONObject(); JSONObject info = new JSONObject();
info.put("device_code", point_code2); info.put("device_code", point_code2);
info.put("vehicle_type", task.getIntValue("vehicle_type") - 2); info.put("vehicle_type", task.getIntValue("vehicle_type") - 2);
info.put("vehicle_code", task.getString("vehicle_code")); info.put("vehicle_code", task.getString("vehicle_code"));
info.put("is_package", vd.getString("is_package"));
param.add(info); param.add(info);
wmsToAcsService.writeVehicle(param); wmsToAcsService.writeVehicle(param);
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/to/pack/FJToPackageTask.java

@ -233,11 +233,13 @@ public class FJToPackageTask extends AbstractAcsTask {
JSONObject regionIn = TaskUtils.buildRegionInFromTask(task, RegionInType.WGRK); JSONObject regionIn = TaskUtils.buildRegionInFromTask(task, RegionInType.WGRK);
WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn); WQLObject.getWQLObject("st_ivt_regionio").insert(regionIn);
JSONObject vd = WQLObject.getWQLObject("st_ivt_vehicle_detail").query("vd_id = " + task.getString("group_id")).uniqueResult(0);
JSONArray param = new JSONArray(); JSONArray param = new JSONArray();
JSONObject info = new JSONObject(); JSONObject info = new JSONObject();
info.put("device_code", point_code2); info.put("device_code", point_code2);
info.put("vehicle_type", task.getIntValue("vehicle_type") - 2); info.put("vehicle_type", task.getIntValue("vehicle_type") - 2);
info.put("vehicle_code", task.getString("vehicle_code")); info.put("vehicle_code", task.getString("vehicle_code"));
info.put("is_package", vd.getString("is_package"));
param.add(info); param.add(info);
wmsToAcsService.writeVehicle(param); wmsToAcsService.writeVehicle(param);
} }

2
lms/nladmin-system/src/main/java/org/nl/wms/sch/wql/QSCH_BASE_POINT.wql

@ -53,7 +53,7 @@
material.material_code material.material_code
FROM FROM
sch_base_point point sch_base_point point
LEFT JOIN st_ivt_vehicle_detail vd ON point.vehicle_code = vd.vehicle_code AND vd.is_delete = '0' LEFT JOIN st_ivt_vehicle_detail vd ON point.vehicle_type = vd.vehicle_type AND point.vehicle_code = vd.vehicle_code AND vd.is_delete = '0'
LEFT JOIN md_me_materialbase material ON vd.material_id = material.material_id LEFT JOIN md_me_materialbase material ON vd.material_id = material.material_id
WHERE WHERE
1 = 1 1 = 1

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

Binary file not shown.

9
lms/nladmin-system/src/test/java/org/nl/test/TempTest.java

@ -28,6 +28,13 @@ public class TempTest {
@Test @Test
public void test01() { public void test01() {
System.out.println(8.94 / 1000); JSONObject info = WQL
.getWO("ACS_TO_WMS")
.addParam("flag", "3")
.addParam("vehicle_type", "3")
.addParam("vehicle_code", "0005")
.process()
.uniqueResult(0);
System.out.println(info);
} }
} }

4
lms/nladmin-ui/.env.production

@ -2,6 +2,6 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
VUE_APP_BASE_API = 'http://47.97.157.227:8010' VUE_APP_BASE_API = 'http://192.168.4.220:8010'
# 如果接口是 http 形式, wss 需要改为 ws # 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'ws://47.97.157.227:8010' VUE_APP_WS_API = 'ws://192.168.4.220:8010'

4
lms/nladmin-ui/public/config.js

@ -1,9 +1,9 @@
window.g = { window.g = {
dev: { dev: {
VUE_APP_BASE_API: 'http://127.0.0.1:8010' VUE_APP_BASE_API: 'http://192.168.4.220:8010'
}, },
prod: { prod: {
VUE_APP_BASE_API: 'http://127.0.0.1:8010' VUE_APP_BASE_API: 'http://192.168.4.220:8010'
} }

35
lms/nladmin-ui/src/views/wms/basedata/vehicle/group/index.vue

@ -19,11 +19,11 @@
@keyup.enter.native="crud.toQuery" @keyup.enter.native="crud.toQuery"
/> />
</el-form-item> </el-form-item>
<rrOperation /> <rrOperation/>
</el-form> </el-form>
</div> </div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" /> <crudOperation :permission="permission"/>
<!--表单组件--> <!--表单组件-->
<el-dialog <el-dialog
:close-on-click-modal="false" :close-on-click-modal="false"
@ -51,16 +51,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="载具编码" prop="vehicle_code"> <el-form-item label="载具编码" prop="vehicle_code">
<el-input v-model="form.vehicle_code" style="width: 370px;" /> <el-input v-model="form.vehicle_code" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="数量" prop="qty"> <el-form-item label="数量" prop="qty">
<el-input v-model="form.qty" style="width: 370px;" /> <el-input v-model="form.qty" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="重量" prop="weight"> <el-form-item label="重量" prop="weight">
<el-input v-model="form.weight" style="width: 370px;" /> <el-input v-model="form.weight" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="点位编码"> <el-form-item label="点位编码">
<el-input v-model="form.point_code" style="width: 370px;" /> <el-input v-model="form.point_code" style="width: 370px;"/>
</el-form-item> </el-form-item>
<el-form-item label="是否满垛" prop="is_full"> <el-form-item label="是否满垛" prop="is_full">
<el-radio v-model="form.is_full" label="0"></el-radio> <el-radio v-model="form.is_full" label="0"></el-radio>
@ -85,11 +85,12 @@
style="width: 100%;" style="width: 100%;"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55"/>
<el-table-column <el-table-column
prop="vehicle_type" prop="vehicle_type"
label="载具类型" label="载具类型"
:min-width="flexWidth('vehicle_type',crud.data,'载具类型')"> :min-width="flexWidth('vehicle_type',crud.data,'类型一木托盘')"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} {{ dict.label.vehicle_type[scope.row.vehicle_type] }}
</template> </template>
@ -99,21 +100,17 @@
label="载具编码" label="载具编码"
:min-width="flexWidth('vehicle_code',crud.data,'载具编码')" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')"
/> />
<el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')"> <el-table-column prop="qty" label="数量" :min-width="flexWidth('qty',crud.data,'数量')"/>
<template slot-scope="scope"> <el-table-column prop="weight" label="重量" :min-width="flexWidth('weight',crud.data,'重量')"/>
{{scope.row.qty}}/ <!-- <el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')"/>-->
</template> <el-table-column prop="is_full" label="是否满垛" :min-width="flexWidth('is_full',crud.data,'是否满垛')">
</el-table-column>
<el-table-column prop="weight" label="重量" :min-width="flexWidth('weight',crud.data,'重量')" />
<el-table-column prop="point_name" label="点位名称" :min-width="flexWidth('point_name',crud.data,'点位名称')" />
<el-table-column prop="is_full" label="是否满垛" :min-width="flexWidth('is_full',crud.data,'是否满垛')" >
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.is_full=='1'?'是':'否'}} {{ scope.row.is_full == '1' ? '是' : '否' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="is_fire" label="是否烧制" :min-width="flexWidth('is_fire',crud.data,'是否烧制')"> <el-table-column prop="is_fire" label="是否烧制" :min-width="flexWidth('is_fire',crud.data,'是否烧制')">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.is_fire=='1'?'是':'否'}} {{ scope.row.is_fire == '1' ? '是' : '否' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -146,7 +143,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination/>
</div> </div>
</div> </div>
</template> </template>

2
lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue

@ -209,7 +209,7 @@
<el-table-column <el-table-column
prop="vehicle_type" prop="vehicle_type"
label="载具类型" label="载具类型"
:min-width="flexWidth('vehicle_type',crud.data,'载具类型')" :min-width="flexWidth('vehicle_type',crud.data,'类型一木托盘')"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} {{ dict.label.vehicle_type[scope.row.vehicle_type] }}

2
lms/nladmin-ui/src/views/wms/sch/point/index.vue

@ -259,7 +259,7 @@
{{ dict.label.true_or_false[scope.row.is_used] }} {{ dict.label.true_or_false[scope.row.is_used] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')"> <el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'类型一木托盘')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} {{ dict.label.vehicle_type[scope.row.vehicle_type] }}
</template> </template>

2
lms/nladmin-ui/src/views/wms/sch/task/index.vue

@ -96,7 +96,7 @@
<el-table-column prop="point1_region_name" label="起点区域" :min-width="flexWidth('point1_region_name',crud.data,'起点区域')" /> <el-table-column prop="point1_region_name" label="起点区域" :min-width="flexWidth('point1_region_name',crud.data,'起点区域')" />
<el-table-column prop="point2_name" label="终点" :min-width="flexWidth('point2_name',crud.data,'终点')" /> <el-table-column prop="point2_name" label="终点" :min-width="flexWidth('point2_name',crud.data,'终点')" />
<el-table-column prop="point2_region_name" label="终点区域" :min-width="flexWidth('point2_region_name',crud.data,'终点区域')" /> <el-table-column prop="point2_region_name" label="终点区域" :min-width="flexWidth('point2_region_name',crud.data,'终点区域')" />
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')"> <el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'类型一木托盘')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ dict.label.vehicle_type[scope.row.vehicle_type] }} {{ dict.label.vehicle_type[scope.row.vehicle_type] }}
</template> </template>

Loading…
Cancel
Save