Merge branch 'master' of http://121.40.234.130:8899/root/yongYuJiaJu
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
package org.nl.wms.ext.acs.rest;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -32,6 +32,7 @@ public class AcsToWmsController {
|
||||
@PostMapping("/status")
|
||||
@Log("ACS给WMS反馈任务状态")
|
||||
@ApiOperation("ACS给WMS反馈任务状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String string) {
|
||||
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
||||
}
|
||||
@@ -39,6 +40,7 @@ public class AcsToWmsController {
|
||||
@PostMapping("/orderFinish")
|
||||
@Log("ACS给WMS下发工单完成状态")
|
||||
@ApiOperation("ACS给WMS下发工单完成状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> orderFinish(@RequestBody String string) {
|
||||
return new ResponseEntity<>(acsToWmsService.orderFinish(string), HttpStatus.OK);
|
||||
}
|
||||
@@ -46,7 +48,7 @@ public class AcsToWmsController {
|
||||
@PostMapping("/apply")
|
||||
@Log("申请任务")
|
||||
@ApiOperation("申请任务")
|
||||
@SaCheckPermission("menu:list")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@@ -54,7 +56,7 @@ public class AcsToWmsController {
|
||||
@PostMapping("/againApply")
|
||||
@Log("二次申请任务")
|
||||
@ApiOperation("二次申请任务")
|
||||
@SaCheckPermission("menu:list")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> againApply(@RequestBody String task_id) {
|
||||
return new ResponseEntity<>(acsToWmsService.againApply(task_id), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
JSONArray errArr = new JSONArray();
|
||||
for (int i = 0; i < array.size(); i++) {
|
||||
JSONObject row = array.getJSONObject(i);
|
||||
String task_id = row.getString("task_id");
|
||||
String task_id = row.getString("ext_task_id");
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
// 任务处理类
|
||||
String processing_class = taskObj.getString("handle_class");
|
||||
@@ -62,10 +62,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String message = "";
|
||||
String status = "";
|
||||
if ("1".equals(acs_task_status)) {
|
||||
status = TaskStatusEnum.EXECUTING.getCode();
|
||||
status = "1";
|
||||
}
|
||||
if ("2".equals(acs_task_status)) {
|
||||
status = TaskStatusEnum.FINISHED.getCode();
|
||||
status = "2";
|
||||
}
|
||||
if ("3".equals(acs_task_status)) {
|
||||
status = "0";
|
||||
@@ -76,7 +76,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
Object obj = clz.newInstance();
|
||||
// 调用每个任务类的forceFinishInst()强制结束方法
|
||||
Method m = obj.getClass().getDeclaredMethod("updateTaskStatus", JSONObject.class, String.class);
|
||||
m.invoke(obj, row, status);
|
||||
m.invoke(obj, taskObj, status);
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
//空指针
|
||||
|
||||
@@ -27,6 +27,7 @@ public class CallMaterialController {
|
||||
@PostMapping("/queryPoint")
|
||||
@Log("查询区域点位")
|
||||
@ApiOperation("查询区域点位")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryPoint() {
|
||||
return new ResponseEntity<>(callMaterialService.queryPoint(), HttpStatus.OK);
|
||||
}
|
||||
@@ -34,6 +35,7 @@ public class CallMaterialController {
|
||||
@PostMapping("/confirm")
|
||||
@Log("叫料确定")
|
||||
@ApiOperation("叫料确定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(callMaterialService.confirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ public class CallVehicleController {
|
||||
@PostMapping("/queryPoint")
|
||||
@Log("查询区域点位")
|
||||
@ApiOperation("查询区域点位")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryPoint() {
|
||||
return new ResponseEntity<>(callVehicleService.queryPoint(), HttpStatus.OK);
|
||||
}
|
||||
@@ -35,6 +36,7 @@ public class CallVehicleController {
|
||||
@PostMapping("/confirm")
|
||||
@Log("呼叫空托盘确定")
|
||||
@ApiOperation("呼叫空托盘确定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(callVehicleService.confirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ public class SendMaterialController {
|
||||
@PostMapping("/queryPoint")
|
||||
@Log("查询区域点位")
|
||||
@ApiOperation("查询区域点位")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryPoint() {
|
||||
return new ResponseEntity<>(sendMaterialService.queryPoint(), HttpStatus.OK);
|
||||
}
|
||||
@@ -34,6 +35,7 @@ public class SendMaterialController {
|
||||
@PostMapping("/confirm")
|
||||
@Log("送料确定")
|
||||
@ApiOperation("送料确定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(sendMaterialService.confirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
JSONObject resultJson = new JSONObject();
|
||||
for (int i = 0; i < regionArr.size(); i++) {
|
||||
JSONObject jsonRegion = regionArr.getJSONObject(i);
|
||||
JSONArray pointArr = WQL.getWO("PDA_SENDMATERIAL_01").addParam("flag", "2").addParam("region_id", jsonRegion.getString("region_id")).process().getResultJSONArray(0);
|
||||
JSONArray pointArr = WQL.getWO("PDA_SENDMATERIAL_01").addParam("flag", "2").addParam("region_code", jsonRegion.getString("region_code")).process().getResultJSONArray(0);
|
||||
jsonRegion.put("pointArr", pointArr);
|
||||
}
|
||||
resultJson.put("regionja", regionArr);
|
||||
@@ -43,7 +43,7 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject confirm(JSONObject whereJson) {
|
||||
JSONObject result = new JSONObject();
|
||||
// 1、准备参数:point_code、type:2为共挤区域,8为豪凯区域
|
||||
// 1、准备参数:point_code、type:2为共挤区域,8为豪凯区域,7为油漆线满料
|
||||
JSONObject param = new JSONObject();
|
||||
|
||||
String region_id = whereJson.getString("region_id");
|
||||
@@ -51,6 +51,7 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
String region_code = jsonObject.getString("region_code");
|
||||
if (StrUtil.equals(region_code, "GJQY01")) param.put("type", "2");
|
||||
if (StrUtil.equals(region_code, "HKQY01")) param.put("type", "8");
|
||||
if (StrUtil.equals(region_code, "YQQY01")) param.put("type", "7");
|
||||
|
||||
param.put("point_code", whereJson.getString("point_code"));
|
||||
param.put("material_num", whereJson.getString("qty"));
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#################################################
|
||||
输入.flag TYPEAS s_string
|
||||
输入.region_id TYPEAS s_string
|
||||
输入.region_code TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -47,7 +48,7 @@
|
||||
FROM
|
||||
sch_base_region
|
||||
WHERE
|
||||
region_code in ('HKQY01','GJQY01')
|
||||
region_code in ('HKQY01','GJQY01','YQQY01')
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
@@ -64,11 +65,17 @@
|
||||
WHERE
|
||||
is_used = '1'
|
||||
AND is_delete = '0'
|
||||
AND point_type = '3'
|
||||
|
||||
OPTION 输入.region_id <> ""
|
||||
region_id = 输入.region_id
|
||||
OPTION 输入.region_code = "YQQY01"
|
||||
point_type = '4'
|
||||
ENDOPTION
|
||||
OPTION 输入.region_code <> "YQQY01"
|
||||
point_type = '3'
|
||||
ENDOPTION
|
||||
|
||||
OPTION 输入.region_code <> ""
|
||||
region_code = 输入.region_code
|
||||
ENDOPTION
|
||||
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
|
||||
@@ -29,6 +29,7 @@ public class SendVehicleController {
|
||||
@PostMapping("/queryPoint")
|
||||
@Log("查询区域点位")
|
||||
@ApiOperation("查询区域点位")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> queryPoint() {
|
||||
return new ResponseEntity<>(sendVehicleService.queryPoint(), HttpStatus.OK);
|
||||
}
|
||||
@@ -36,6 +37,7 @@ public class SendVehicleController {
|
||||
@PostMapping("/confirm")
|
||||
@Log("送空托盘确定")
|
||||
@ApiOperation("送空托盘确定")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(sendVehicleService.confirm(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class WorkorderServiceImpl implements WorkordeService {
|
||||
JSONArray orderArr = wo.query("device_id = '" + param.getString("device_id") + "' and order_status = '02'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(orderArr)) throw new BadRequestException("当前设备正在生产中");
|
||||
|
||||
json.put("order_status", "02");
|
||||
json.put("order_status", "2");
|
||||
json.put("update_optid", currentUserId);
|
||||
json.put("update_optname", nickName);
|
||||
json.put("update_time", now);
|
||||
@@ -271,7 +271,7 @@ public class WorkorderServiceImpl implements WorkordeService {
|
||||
JSONObject produceorderMap = new JSONObject();
|
||||
produceorderMap.put("workorder_id", workorder_id);
|
||||
produceorderMap.put("device_id", device_id);
|
||||
produceorderMap.put("order_status", "02");
|
||||
produceorderMap.put("order_status", "2");
|
||||
produceorderMap.put("update_optid", currentUserId);
|
||||
produceorderMap.put("update_optname", nickName);
|
||||
produceorderMap.put("update_time", now);
|
||||
|
||||
@@ -69,7 +69,6 @@ public abstract class AbstractAcsTask {
|
||||
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
/**
|
||||
* @param form 创建任务需要的参数
|
||||
|
||||
@@ -108,9 +108,12 @@ public class AutoCreateTask {
|
||||
//处理下发失败的任务
|
||||
for (int i = 0; i < errArr.size(); i++) {
|
||||
JSONObject taskObj = errArr.getJSONObject(i);
|
||||
taskObj.put("remark", "下发失败:"+taskObj.getString("message"));
|
||||
taskObj.put("update_time", DateUtil.now());
|
||||
taskTab.update(taskObj);
|
||||
|
||||
JSONObject param=new JSONObject();
|
||||
param.put("remark", "下发失败:"+taskObj.getString("message"));
|
||||
param.put("update_time", DateUtil.now());
|
||||
param.put("task_id", taskObj.getString("ext_task_id"));
|
||||
taskTab.update(param);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@ public class PointServiceImpl implements PointService {
|
||||
map.put("point_status", whereJson.get("point_status"));
|
||||
map.put("is_used", whereJson.get("is_used"));
|
||||
map.put("point_type", whereJson.get("point_type"));
|
||||
map.put("block_num", whereJson.get("block_num"));
|
||||
map.put("row_num", whereJson.get("row_num"));
|
||||
map.put("col_num", whereJson.get("col_num"));
|
||||
map.put("layer_num", whereJson.get("layer_num"));
|
||||
map.put("name", whereJson.get("name"));
|
||||
JSONObject json = WQL.getWO("QSCH_BASE_POINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "point_code asc");
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
|
||||
@@ -398,7 +398,7 @@ public class GjxCallEmpVehicleTask extends AbstractAcsTask {
|
||||
//判断起点是否属于养生A区
|
||||
if (point_code1.startsWith("2")) {
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
point_code1 = point_code1.substring(0, 4) + "1" + point_code1.substring(4, 9);
|
||||
point_code1 = point_code1.substring(0, 4) + "2" + point_code1.substring(4, 10);
|
||||
}
|
||||
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
|
||||
@@ -405,8 +405,8 @@ public class YqxCallEmpVehicleTask extends AbstractAcsTask {
|
||||
String point_code1 = json.getString("point_code1");
|
||||
//判断起点是否属于养生A区
|
||||
if (point_code1.startsWith("2")) {
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
point_code1 = point_code1.substring(0, 4) + "1" + point_code1.substring(4, 9);
|
||||
//养生A区发给ACS需要新的点位(21012-03-1----->21011-03-1)
|
||||
point_code1 = point_code1.substring(0, 4) + "2" + point_code1.substring(4, 10);
|
||||
}
|
||||
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
|
||||
@@ -165,7 +165,7 @@ public class YqxCallMaterialTask extends AbstractAcsTask {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
String point_code =json.getString("point_code1");
|
||||
String newPoint = point_code.substring(0, 4) + "1" + point_code.substring(4, 9);
|
||||
String newPoint = point_code.substring(0, 4) + "2" + point_code.substring(4, 10);
|
||||
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.task_id(json.getString("task_id"))
|
||||
|
||||
@@ -407,7 +407,7 @@ public class HtSendEmpVehicleTask extends AbstractAcsTask {
|
||||
//判断点位是否属于养生A区
|
||||
if (point_code.startsWith("2")) {
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
point_code = point_code.substring(0, 4) + "1" + point_code.substring(4, 9);
|
||||
point_code = point_code.substring(0, 4) + "1" + point_code.substring(4, 10);
|
||||
}
|
||||
return point_code;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ public class HtSendEmpVehicleTask extends AbstractAcsTask {
|
||||
//判断终点是否属于养生A区
|
||||
if (point_code3.startsWith("2")) {
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
point_code3 = point_code3.substring(0, 4) + "1" + point_code3.substring(4, 9);
|
||||
point_code3 = point_code3.substring(0, 4) + "1" + point_code3.substring(4, 10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ public class YqxSendEmpVehicleTask extends AbstractAcsTask {
|
||||
//判断点位是否属于养生A区
|
||||
if (point_code.startsWith("2")) {
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
point_code = point_code.substring(0, 4) + "1" + point_code.substring(4, 9);
|
||||
point_code = point_code.substring(0, 4) + "1" + point_code.substring(4, 10);
|
||||
}
|
||||
return point_code;
|
||||
}
|
||||
@@ -379,7 +379,7 @@ public class YqxSendEmpVehicleTask extends AbstractAcsTask {
|
||||
//判断终点是否属于养生A区
|
||||
if (point_code3.startsWith("2")) {
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
point_code3 = point_code3.substring(0, 4) + "1" + point_code3.substring(4, 9);
|
||||
point_code3 = point_code3.substring(0, 4) + "1" + point_code3.substring(4, 10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ public class GjxSendMaterialTask extends AbstractAcsTask {
|
||||
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
String point_code = json.getString("point_code2");
|
||||
String newPoint = point_code.substring(0, 4) + "1" + point_code.substring(4, 9);
|
||||
String newPoint = point_code.substring(0, 4) + "1" + point_code.substring(4, 10);
|
||||
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.task_id(json.getString("task_id"))
|
||||
@@ -373,7 +373,7 @@ public class GjxSendMaterialTask extends AbstractAcsTask {
|
||||
|
||||
//养生A区发给ACS需要新的点位(2101-03-1----->21011-03-1)
|
||||
String point_code = taskObj.getString("point_code3");
|
||||
String newPoint = point_code.substring(0, 4) + "1" + point_code.substring(4, 9);
|
||||
String newPoint = point_code.substring(0, 4) + "1" + point_code.substring(4, 10);
|
||||
return newPoint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
输入.name TYPEAS s_string
|
||||
输入.point_type TYPEAS s_string
|
||||
输入.point_status TYPEAS s_string
|
||||
输入.block_num TYPEAS s_string
|
||||
输入.row_num TYPEAS s_string
|
||||
输入.col_num TYPEAS s_string
|
||||
输入.layer_num TYPEAS s_string
|
||||
输入.is_used TYPEAS s_string
|
||||
输入.ids TYPEAS f_string
|
||||
|
||||
@@ -79,6 +83,18 @@
|
||||
OPTION 输入.is_used <> ""
|
||||
point.is_used = 输入.is_used
|
||||
ENDOPTION
|
||||
OPTION 输入.block_num <> ""
|
||||
point.block_num = 输入.block_num
|
||||
ENDOPTION
|
||||
OPTION 输入.row_num <> ""
|
||||
point.row_num = 输入.row_num
|
||||
ENDOPTION
|
||||
OPTION 输入.col_num <> ""
|
||||
point.col_num = 输入.col_num
|
||||
ENDOPTION
|
||||
OPTION 输入.layer_num <> ""
|
||||
point.layer_num = 输入.layer_num
|
||||
ENDOPTION
|
||||
OPTION 输入.name <> ""
|
||||
( point.point_code like "%" 输入.name "%" or point.point_name like "%" 输入.name "%" )
|
||||
ENDOPTION
|
||||
|
||||
@@ -162,4 +162,4 @@ sa-token:
|
||||
|
||||
loki:
|
||||
url: http://localhost:3100/loki/api/v1
|
||||
systemName: lms
|
||||
systemName: lms
|
||||
@@ -122,7 +122,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
|
||||
<!--生产环境:打印控制台和输出到文件-->
|
||||
<springProfile name="prod">
|
||||
<root level="debug">
|
||||
<root level="info">
|
||||
<appender-ref ref="asyncFileAppender"/>
|
||||
<appender-ref ref="lokiAppender"/>
|
||||
</root>
|
||||
|
||||
Reference in New Issue
Block a user