|
@@ -175,7 +175,7 @@ public class ChargerButtService {
|
|
|
String taskNo = "";
|
|
|
// 充电机号
|
|
|
Integer chargerNo = chargingSite;
|
|
|
- boolean xx = !(chargerNo == 1004);
|
|
|
+ ChargingMachineClient.MACHINE_NO xx = ChargingMachineClient.MACHINE_NO.getByValue(chargerNo.toString());
|
|
|
// 从Redis拿到充电信息
|
|
|
Map<String, Object> agvInfoMap = redisCache.getCacheMap(KEY_PREFIX + agvNo);
|
|
|
if (agvInfoMap == null) {
|
|
@@ -284,7 +284,7 @@ public class ChargerButtService {
|
|
|
WcsTask wcsTask = null;
|
|
|
// 充电机号
|
|
|
Integer chargerNo = chargingSite;
|
|
|
- boolean xx = !(chargerNo == 1004);
|
|
|
+ ChargingMachineClient.MACHINE_NO xx = ChargingMachineClient.MACHINE_NO.getByValue(chargerNo.toString());
|
|
|
// 从节点ID
|
|
|
Integer slaveId = CHARGING_SLAVEID_MAPPING.getSlaveIdByChargerNo(chargingSite);
|
|
|
// 从Redis拿到充电信息
|
|
@@ -313,8 +313,8 @@ public class ChargerButtService {
|
|
|
// if (wcsTask != null) {
|
|
|
// boolean con = wcsTask.getExt4().equals("1") ? true : false;
|
|
|
// if (!con) {
|
|
|
- // 反馈TS结束充电
|
|
|
- this.feedbackTSLog(taskNo, index, AGV_STOP, agvNo + ",AGV结束充电!", xx);
|
|
|
+ // 反馈TS结束充电
|
|
|
+ this.feedbackTSLog(taskNo, index, AGV_STOP, agvNo + ",AGV结束充电!", xx);
|
|
|
// }
|
|
|
// }
|
|
|
// 下发一个TS101的任务
|
|
@@ -364,7 +364,7 @@ public class ChargerButtService {
|
|
|
* @return
|
|
|
* @see com.ruoyi.hard.modbus.tcp.ChargingMachineClient.CHARGER_ADDRESS_MEANING
|
|
|
*/
|
|
|
- private boolean operation(ChargingMachineClient.CHARGER_ADDRESS_MEANING op, boolean xx) {
|
|
|
+ private boolean operation(ChargingMachineClient.CHARGER_ADDRESS_MEANING op, ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean con = false;
|
|
|
con = chargingMachineClient.operation(op, xx);
|
|
|
// 如果失败 再重复三次
|
|
@@ -395,7 +395,7 @@ public class ChargerButtService {
|
|
|
* @param remarks
|
|
|
*/
|
|
|
private void feedbackTSLog(String taskNo, Integer index
|
|
|
- , FeedbackTS.FEEDBACK_TS_STATUS tsStatus, String remarks, boolean xx) {
|
|
|
+ , FeedbackTS.FEEDBACK_TS_STATUS tsStatus, String remarks, ChargingMachineClient.MACHINE_NO xx) {
|
|
|
// 打印日志
|
|
|
if (StringUtils.isNotEmpty(remarks)) {
|
|
|
Map<String, Boolean> statusNameMapping = chargingMachineClient.getStatusNameMapping(xx);
|
|
@@ -422,11 +422,11 @@ public class ChargerButtService {
|
|
|
private Integer slaveId;
|
|
|
private Integer agvNo;
|
|
|
private String taskNo;
|
|
|
- private boolean xx;
|
|
|
+ private ChargingMachineClient.MACHINE_NO xx;
|
|
|
|
|
|
public CyclicJudgmentOfChargerStatus(IWcsTaskService wcsTaskService, IAmsTaskService amsTaskService
|
|
|
, ChargerButtService chargerButtService, FeedbackTS feedbackTS, ChargingMachineClient chargingMachineClient
|
|
|
- , Integer index, Integer chargingSite, Integer slaveId, Integer agvNo, String taskNo, boolean xx) {
|
|
|
+ , Integer index, Integer chargingSite, Integer slaveId, Integer agvNo, String taskNo, ChargingMachineClient.MACHINE_NO xx) {
|
|
|
this.wcsTaskService = wcsTaskService;
|
|
|
this.amsTaskService = amsTaskService;
|
|
|
this.chargerButtService = chargerButtService;
|
|
@@ -542,7 +542,7 @@ public class ChargerButtService {
|
|
|
* @return
|
|
|
*/
|
|
|
private boolean confirmChargerStatus(CHARGER_ASSEMBLY_STATUS status, Date startTime
|
|
|
- , boolean isRecursion, boolean xx) {
|
|
|
+ , boolean isRecursion, ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean con = false;
|
|
|
DateUnit unit = DateUnit.SECOND;
|
|
|
int timeout = 1; // 超时时间
|
|
@@ -599,7 +599,7 @@ public class ChargerButtService {
|
|
|
*
|
|
|
* @return true 正常
|
|
|
*/
|
|
|
- private boolean confirmChargerStatusIsOnline(boolean xx) {
|
|
|
+ private boolean confirmChargerStatusIsOnline(ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean[] status = chargingMachineClient.getStatus(xx);
|
|
|
if (status == null) {
|
|
|
// 再去拿一次
|
|
@@ -626,7 +626,7 @@ public class ChargerButtService {
|
|
|
*
|
|
|
* @return true 正常
|
|
|
*/
|
|
|
- private boolean confirmChargerStatusIsReady(boolean xx) {
|
|
|
+ private boolean confirmChargerStatusIsReady(ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean[] status = chargingMachineClient.getStatus(xx);
|
|
|
if (status == null) {
|
|
|
// 再去拿一次
|
|
@@ -651,7 +651,7 @@ public class ChargerButtService {
|
|
|
*
|
|
|
* @return true 有故障 false无故障
|
|
|
*/
|
|
|
- private boolean confirmChargerStatusIsFault(boolean xx) {
|
|
|
+ private boolean confirmChargerStatusIsFault(ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean[] status = chargingMachineClient.getStatus(xx);
|
|
|
if (status == null) {
|
|
|
// 再去拿一次
|
|
@@ -697,7 +697,7 @@ public class ChargerButtService {
|
|
|
*
|
|
|
* @return true 已压紧
|
|
|
*/
|
|
|
- private boolean confirmChargerStatusIsCompacting(boolean xx) {
|
|
|
+ private boolean confirmChargerStatusIsCompacting(ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean[] status = chargingMachineClient.getStatus(xx);
|
|
|
if (status == null) {
|
|
|
// 再去拿一次
|
|
@@ -721,7 +721,7 @@ public class ChargerButtService {
|
|
|
*
|
|
|
* @return true 正常
|
|
|
*/
|
|
|
- private boolean confirmChargerStatusIsEnd(boolean xx) {
|
|
|
+ private boolean confirmChargerStatusIsEnd(ChargingMachineClient.MACHINE_NO xx) {
|
|
|
boolean[] status = chargingMachineClient.getStatus(xx);
|
|
|
if (status == null) {
|
|
|
// 再去拿一次
|