fix: 分切业务修改

This commit is contained in:
2024-03-04 18:08:34 +08:00
parent 2586cb6405
commit 317f6a848f
16 changed files with 162 additions and 23 deletions

View File

@@ -32,7 +32,6 @@ public class WmsToAcsController {
@PostMapping
@Log(value = "WMS给ACS发送任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> issueTaskToAcs(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.issueTaskToAcs(arr), HttpStatus.OK);
@@ -40,7 +39,6 @@ public class WmsToAcsController {
@PostMapping("/cancel")
@Log(value = "WMS主动取消ACS任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> cancelToAcs(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.cancelToAcs(arr), HttpStatus.OK);
@@ -48,7 +46,6 @@ public class WmsToAcsController {
@PostMapping("/updatePointStatus")
@Log(value = "WMS更新ACS点位状态", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> updatePointStatus(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.updatePointStatus(arr), HttpStatus.OK);
@@ -56,7 +53,6 @@ public class WmsToAcsController {
@PostMapping("/order")
@Log(value = "WMS开工向acs下发工单", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> startWork(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.order(arr), HttpStatus.OK);
@@ -64,7 +60,6 @@ public class WmsToAcsController {
@PostMapping("/orderStatusUpdate")
@Log(value = "WMS向acs发送强制完成", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> orderStatusUpdate(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.orderStatusUpdate(arr), HttpStatus.OK);
@@ -72,7 +67,6 @@ public class WmsToAcsController {
@PostMapping("/querydevice")
@Log(value = "WMS向acs发送获取点位状态", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> getPointStatus(@RequestBody JSONArray whereJson) {
return new ResponseEntity<>(wmsToAcsService.getPointStatus(whereJson), HttpStatus.OK);
}
@@ -80,7 +74,6 @@ public class WmsToAcsController {
@PostMapping("/updateTask")
@Log(value = "WMS向acs发送更新任务状态", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> updateTask(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.updateTask(arr), HttpStatus.OK);
@@ -88,7 +81,6 @@ public class WmsToAcsController {
@PostMapping("/action")
@Log(value = "给ACS下发修改PLC的值", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> action(@RequestBody Map whereJson) {
JSONArray arr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("data")));
return new ResponseEntity<>(wmsToAcsService.updateTask(arr), HttpStatus.OK);
@@ -96,49 +88,42 @@ public class WmsToAcsController {
@PostMapping("/putPlusPullAction")
@Log(value = "给ACS下发修改PLC的值", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> putPlusPullAction(@RequestBody JSONObject jo) {
return new ResponseEntity<>(wmsToAcsService.putPlusPullAction(jo), HttpStatus.OK);
}
@PostMapping("/unLock")
@Log(value = "给ACS下发修立库点位解锁", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> unLock(@RequestBody JSONObject jo) {
return new ResponseEntity<>(wmsToAcsService.unLock(jo), HttpStatus.OK);
}
@PostMapping("/queryDeviceInfo")
@Log(value = "LMS向acs请求设备信息", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> queryDeviceInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(wmsToAcsService.queryDeviceInfo(jo), HttpStatus.OK);
}
@PostMapping("/sendAgvChargeTask")
@Log(value = "LMS下发AGV充电任务", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> sendAgvChargeTask(@RequestBody JSONObject jo) {
return new ResponseEntity<>(wmsToAcsService.sendAgvChargeTask(jo), HttpStatus.OK);
}
@PostMapping("/syncfaultInfo")
@Log(value = "LMS同步ACS报警码信息", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> syncfaultInfo() {
return new ResponseEntity<>(wmsToAcsService.syncfaultInfo(), HttpStatus.OK);
}
@PostMapping("/realTimefaultInfo")
@Log(value = "LMS查看ACS实时报警信息", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> realTimefaultInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(wmsToAcsService.realTimefaultInfo(jo), HttpStatus.OK);
}
@PostMapping("/PaperTubeAction")
@Log(value = "LMS下发纸管库指令", isInterfaceLog = true, interfaceLogType = InterfaceLogType.LMS_TO_ACS)
public ResponseEntity<Object> PaperTubeAction(@RequestBody JSONObject jo) {
return new ResponseEntity<>(wmsToAcsService.PaperTubeAction(jo), HttpStatus.OK);
}

View File

@@ -0,0 +1,33 @@
package org.nl.wms.pda.authorization.controller;
import cn.dev33.satoken.annotation.SaIgnore;
import lombok.extern.slf4j.Slf4j;
import org.nl.system.service.menu.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* @Author: lyd
* @Description: 手持鉴权
* @Date: 2023/7/31
*/
@Slf4j
@RestController
@RequestMapping("/api/pda")
public class AuthorizationsController {
@Autowired
private ISysMenuService menuService;
@PostMapping(value = "/authority")
@SaIgnore
public ResponseEntity<Object> queryAuthority(@RequestBody Map<String, String> param) {
return new ResponseEntity<>(menuService.queryAuthority(param), HttpStatus.OK);
}
}

View File

@@ -44,8 +44,7 @@ public class AcsUtil {
if (StrUtil.isEmpty(product_area)) {
throw new BadRequestException("区域不能为空!下发信息:" + jo.toString());
}
//String acs_url = URLEnum.find(product_area);
String acs_url = "http://192.168.81.65:8011/";
String acs_url = URLEnum.find(product_area);
if (StrUtil.isEmpty(acs_url)) {
log.info(product_area);
throw new BadRequestException("未查询到区域对应的acs地址");

View File

@@ -15,7 +15,8 @@ public enum URLEnum {
ACS_URL_A2("A2", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A2").getValue()),
ACS_URL_A3("A3", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A3").getValue()),
ACS_URL_A4("A4", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_A4").getValue()),
ACS_URL_LK("LK", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_LK").getValue());
ACS_URL_LK("LK", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_LK").getValue()),
ACS_URL_Test("Test", () -> SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("ACS_URL_Test").getValue());
private final String product_area;