opt: 下发任务时候状态判断使用枚举,前端显示完成类型后移

This commit is contained in:
2023-03-31 10:43:05 +08:00
parent 0646a9d6ee
commit a4886fe4bf
2 changed files with 8 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.enums.StatusEnum;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.core.bean.WQLObject; import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.SpringContextHolder;
@@ -23,9 +24,9 @@ public class AcsUtil {
public static JSONObject notifyAcs(String api, JSONArray list) { public static JSONObject notifyAcs(String api, JSONArray list) {
log.info("下发ACS参数----------------------------------------+"+api+",---"+list.toString()); log.info("下发ACS参数----------------------------------------+"+api+",---"+list.toString());
//判断是否连接ACS系统 //判断是否连接ACS系统
String isConnect = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("is_connect_acs").getValue(); String isConnect = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_ACS").getValue();
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
if (StrUtil.equals("0", isConnect)) { if (StrUtil.equals(StatusEnum.STATUS_FLASE.getCode(), isConnect)) {
result.put("status", HttpStatus.OK.value()); result.put("status", HttpStatus.OK.value());
result.put("message", "下发成功但未连接ACS!"); result.put("message", "下发成功但未连接ACS!");
result.put("data", new JSONObject()); result.put("data", new JSONObject());

View File

@@ -140,11 +140,6 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="task_name" label="任务描述" min-width="120" show-overflow-tooltip /> <el-table-column prop="task_name" label="任务描述" min-width="120" show-overflow-tooltip />
<el-table-column prop="finished_type" label="任务完成类型" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.task_finished_type[scope.row.finished_type] }}
</template>
</el-table-column>
<el-table-column v-if="false" prop="task_type_name" label="任务类型" min-width="120" show-overflow-tooltip /> <el-table-column v-if="false" prop="task_type_name" label="任务类型" min-width="120" show-overflow-tooltip />
<el-table-column v-if="false" prop="task_status" label="任务状态" /> <el-table-column v-if="false" prop="task_status" label="任务状态" />
<el-table-column prop="product_area" label="生产区域" /> <el-table-column prop="product_area" label="生产区域" />
@@ -165,6 +160,11 @@
<el-table-column prop="vehicle_code" label="载具编码1" min-width="100" show-overflow-tooltip /> <el-table-column prop="vehicle_code" label="载具编码1" min-width="100" show-overflow-tooltip />
<el-table-column prop="vehicle_code2" label="载具编码2" min-width="100" show-overflow-tooltip /> <el-table-column prop="vehicle_code2" label="载具编码2" min-width="100" show-overflow-tooltip />
<el-table-column prop="remark" label="提示" width="120" show-overflow-tooltip /> <el-table-column prop="remark" label="提示" width="120" show-overflow-tooltip />
<el-table-column prop="finished_type" label="任务完成类型" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ dict.label.task_finished_type[scope.row.finished_type] }}
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" width="135" /> <el-table-column prop="create_time" label="创建时间" width="135" />
<el-table-column prop="update_time" label="修改时间" width="135" /> <el-table-column prop="update_time" label="修改时间" width="135" />
<el-table-column <el-table-column