Browse Source

rev:代码优化

master
涂强 4 days ago
parent
commit
05f3309554
  1. 4
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java
  2. 4
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/rest/SpxToAcsController.java
  3. 12
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/SpxToAcsServiceImpl.java
  4. 3
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/order/mapper/OrderMapper.xml
  5. 8
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/controller/WorkController.java
  6. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/service/WorkService.java
  7. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/service/dao/mapper/WorkMapper.xml
  8. 16
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/service/impl/WorkServiceImpl.java
  9. 4
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task_manage/task/core/TaskStatus.java
  10. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/domain/Task.java
  11. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/TaskService.java
  12. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/dto/TaskDto.java
  13. 11
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  14. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/controller/HandController.java
  15. 15
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/controller/PdaController.java
  16. 7
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/PdaService.java
  17. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/dao/mapper/PdaMapper.java
  18. 35
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/dao/mapper/PdaMapper.xml
  19. 2
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java
  20. 41
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/PdaServiceImpl.java
  21. 3
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/vo/OrderVo.java
  22. 1
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/vo/WorkVo.java
  23. 2
      acs/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml
  24. 4
      acs/nladmin-ui/src/views/acs/order/AddDialog.vue
  25. 2
      acs/nladmin-ui/src/views/acs/order/index.vue
  26. 20
      acs/nladmin-ui/src/views/acs/work/index.vue
  27. 10
      acs/nladmin-ui/src/views/acs/work/work.js

4
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/auto/run/TwoNDCSocketConnectionAutoRun.java

@ -251,7 +251,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (ObjectUtil.isNotEmpty(device)) {
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
String link_three_lamp = device.getExtraValue().get("link_three_lamp").toString();
String link_three_lamp = (String) device.getExtraValue().get("link_three_lamp");
if (StrUtil.isNotEmpty(link_three_lamp)) {
Device code = deviceAppService.findDeviceByCode(link_three_lamp);
if (code.getDeviceDriver() instanceof LampThreecolorDeviceDriver) {
@ -300,7 +300,7 @@ public class TwoNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
if (ObjectUtil.isNotEmpty(device)) {
if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
String link_three_lamp = device.getExtraValue().get("link_three_lamp").toString();
String link_three_lamp = (String) device.getExtraValue().get("link_three_lamp");
if (StrUtil.isNotEmpty(link_three_lamp)) {
Device code = deviceAppService.findDeviceByCode(link_three_lamp);
if (code.getDeviceDriver() instanceof LampThreecolorDeviceDriver) {

4
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/rest/SpxToAcsController.java

@ -21,10 +21,10 @@ public class SpxToAcsController {
@Autowired
private SpxToAcsService spxToAcsService;
@PostMapping("/task")
@PostMapping("/order")
@Log(value = "ACS接收SPX任务")
@SaIgnore
public ResponseEntity<Object> createFromWms(@RequestBody String whereJson) {
public ResponseEntity<Object> createFromSPX(@RequestBody String whereJson) {
return new ResponseEntity<>(spxToAcsService.crateTask(whereJson), HttpStatus.OK);
}

12
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/ext/wms/service/impl/SpxToAcsServiceImpl.java

@ -60,8 +60,8 @@ public class SpxToAcsServiceImpl implements SpxToAcsService {
// 记录异常日志
log.error("创建工单时发生异常: ", e);
JSONObject resultJson = new JSONObject();
resultJson.put("status", HttpStatus.BAD_REQUEST.value());
resultJson.put("message", "操作失败");
resultJson.put("MSG_CODE", HttpStatus.BAD_REQUEST.value());
resultJson.put("MSG", "操作失败");
return resultJson;
}
}
@ -133,11 +133,11 @@ public class SpxToAcsServiceImpl implements SpxToAcsService {
private JSONObject buildResultJson(JSONArray errArr) {
JSONObject resultJson = new JSONObject();
if (ObjectUtil.isEmpty(errArr)) {
resultJson.put("status", HttpStatus.OK.value());
resultJson.put("message", "操作成功");
resultJson.put("MSG_CODE", HttpStatus.OK.value());
resultJson.put("MSG", "操作成功");
} else {
resultJson.put("status", HttpStatus.BAD_REQUEST.value());
resultJson.put("message", "操作失败");
resultJson.put("MSG_CODE", HttpStatus.BAD_REQUEST.value());
resultJson.put("MSG", "操作失败");
if (ObjectUtil.isNotEmpty(errArr)) {
resultJson.put("errArr", errArr);
}

3
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/order/mapper/OrderMapper.xml

@ -37,7 +37,8 @@
and create_time = #{query.begin_time}
</if>
and is_delete = '0'
and status in ('0','1')
</where>
order by create_time DESC
order by realstart_time ASC
</select>
</mapper>

8
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/controller/WorkController.java

@ -1,5 +1,6 @@
package org.nl.acs.sch.task.controller;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.sch.task.service.WorkService;
import org.nl.acs.sch.task.service.dao.SchBaseTask;
@ -83,4 +84,11 @@ public class WorkController {
workService.confirm(id);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("暂停配料作业")
@PostMapping(value = "/pause/{id}")
public ResponseEntity<Object> pause(@RequestBody String id) {
workService.pause(id);
return new ResponseEntity<>(HttpStatus.OK);
}
}

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/service/WorkService.java

@ -49,4 +49,6 @@ public interface WorkService extends IService<Work> {
void confirm(String id);
Work findByCode(String work_code);
void pause(String id);
}

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/service/dao/mapper/WorkMapper.xml

@ -28,6 +28,6 @@
</if>
AND wo.status != '2'
</where>
ORDER BY work.seq_no asc
ORDER BY work.mfg_order_name asc ,work.seq_no asc
</select>
</mapper>

16
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task/service/impl/WorkServiceImpl.java

@ -1,5 +1,6 @@
package org.nl.acs.sch.task.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
@ -162,6 +163,7 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, Work> implements Wo
taskDto.setNext_device_code(resource_name);
taskDto.setTask_type(CommonFinalParam.TYPE_THREE);
taskDto.setAgv_system_type(CommonFinalParam.TWO);
taskDto.setWork_id(id);
AcsPoint point = acsPointService.findByCode("T1");
if (ObjectUtil.isEmpty(point)) {
throw new BadRequestException("不存在T1点位");
@ -196,4 +198,18 @@ public class WorkServiceImpl extends ServiceImpl<WorkMapper, Work> implements Wo
.eq(Work::getWork_code, work_code);
return workMapper.selectOne(wrapper);
}
@Override
public void pause(String id) {
Work work = workMapper.selectById(id);
if (ObjectUtil.isEmpty(work)) {
throw new BadRequestException("不存在该配料任务");
}
List<TaskDto> list = taskService.findByWorkId(id);
if (CollUtil.isNotEmpty(list)){
throw new BadRequestException("存在正在执行中的agv任务");
}
work.setStatus(TaskStatus.PAUSE.getCode());
workMapper.updateById(work);
}
}

4
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/sch/task_manage/task/core/TaskStatus.java

@ -28,7 +28,9 @@ public enum TaskStatus {
/**
* 未完成
*/
UNFINISHED("7", "未完成", "未完成");
UNFINISHED("7", "未完成", "未完成"),
PAUSE("4", "暂停", "暂停");
TaskStatus(String code, String name, String desc) {

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/domain/Task.java

@ -41,6 +41,11 @@ public class Task extends CommonModel<Task> implements Serializable {
private String ext_task_id;
/**
* 配料作业任务标识
*/
private String work_id;
@NotBlank
private String task_code;

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/TaskService.java

@ -567,4 +567,6 @@ public interface TaskService extends CommonService<Task> {
TaskDto findByTaskCode(String task_code);
List<TaskDto> queryAllHJReadyTask();
List<TaskDto> findByWorkId(String id);
}

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/dto/TaskDto.java

@ -24,6 +24,11 @@ public class TaskDto implements Serializable {
*/
private String ext_task_id;
/**
* 配料作业任务标识
*/
private String work_id;
/**
* 任务号
*/

11
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -1604,6 +1604,17 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
.collect(Collectors.toList());
}
@Override
public List<TaskDto> findByWorkId(String id) {
return Optional
.ofNullable(this.tasks)
.orElse(new CopyOnWriteArrayList<>())
.stream()
.filter(taskDto -> StrUtil.equals(taskDto.getWork_id(), id)
&& StrUtil.equals(taskDto.getTask_status(), TaskStatusEnum.BUSY.getIndex()))
.collect(Collectors.toList());
}
/**
* 把多个字符串拼接的inst_nextDevice_code解析成集合

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/controller/HandController.java

@ -28,7 +28,7 @@ public class HandController {
@Autowired
private HandService handService;
@PostMapping
@PostMapping("/queryWorks")
@Log("配料作业查询")
public ResponseEntity<Object> query() {
return new ResponseEntity<>(handService.query(), HttpStatus.OK);

15
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/controller/PdaController.java

@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
*/
@Slf4j
@RestController
@RequestMapping("/api/pda")
@SaIgnore
public class PdaController {
@ -35,13 +34,15 @@ public class PdaController {
return new ResponseEntity<>(pdaService.queryOrders(), HttpStatus.OK);
}
@PostMapping("/queryWorks")
@Log("配料作业查询")
public ResponseEntity<Object> queryWorks() {
return new ResponseEntity<>(pdaService.queryWorks(), HttpStatus.OK);
public ResponseEntity<Object> queryWorks(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(pdaService.queryWorks(whereJson), HttpStatus.OK);
}
@PostMapping("/queryAllPoints")
@PostMapping("/queryDevices")
@Log("查询所有点位")
@ApiOperation("查询所有点位")
@SaIgnore
@ -82,6 +83,12 @@ public class PdaController {
return new ResponseEntity<>(pdaService.finishWork(whereJson),HttpStatus.OK);
}
@Log("暂停配料作业")
@PostMapping(value = "/pause")
public ResponseEntity<Object> pause(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(pdaService.pause(whereJson),HttpStatus.OK);
}
@PostMapping("/callTask")
@Log("生成退桶任务")
@ApiOperation("生成退桶任务")

7
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/PdaService.java

@ -23,7 +23,9 @@ public interface PdaService {
PdaResponseVo forceFinish(JSONObject whereJson);
List<WorkVo> queryWorks();
List<WorkVo> queryWorks(JSONObject whereJson);
List<WorkVo> getExcWorks();
PdaResponseVo sendWork(JSONObject whereJson);
@ -34,4 +36,7 @@ public interface PdaService {
JSONArray queryAllPoints();
Map<String, Object> callTask(PdaDto dto);
PdaResponseVo pause(JSONObject whereJson);
}

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/dao/mapper/PdaMapper.java

@ -1,5 +1,6 @@
package org.nl.hand.service.dao.mapper;
import org.apache.ibatis.annotations.Param;
import org.nl.hand.service.vo.OrderVo;
import org.nl.hand.service.vo.WorkVo;
@ -9,5 +10,7 @@ public interface PdaMapper {
List<OrderVo> getOrders();
List<WorkVo> getWorks();
List<WorkVo> getWorks(@Param("mfg_order_name") String mfg_order_name);
List<WorkVo> getExcWorks();
}

35
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/dao/mapper/PdaMapper.xml

@ -6,30 +6,61 @@
product_name,
description,
resource_name,
point_code,
total_qty,
Case status
WHEN '0' THEN '就绪'
WHEN '1' THEN '执行中'
ELSE ''
END AS status,
create_name
realstart_time,
create_time
FROM acs_workorder
WHERE status != '2'
order by realstart_time ASC
</select>
<select id="getWorks" resultType="org.nl.hand.service.vo.WorkVo">
SELECT seq_no,
work_code,
mfg_order_name,
material_code,
material_name,
qty,
resource_name,
require_num,
remain_num,
Case status
WHEN '0' THEN '就绪'
WHEN '1' THEN '执行中'
WHEN '2' THEN '完成'
ELSE ''
END AS status
FROM work
WHERE status != '0' AND remain_num > 0
<where>
<if test="mfg_order_name != null and mfg_order_name != ''">
work.mfg_order_name = #{mfg_order_name}
</if>
AND status != '2'
</where>
ORDER BY work.mfg_order_name asc ,work.seq_no asc
</select>
<select id="getExcWorks" resultType="org.nl.hand.service.vo.WorkVo">
SELECT seq_no,
mfg_order_name,
work_code,
material_code,
material_name,
qty,
resource_name,
require_num,
remain_num,
Case status
WHEN '0' THEN '就绪'
WHEN '1' THEN '执行中'
WHEN '2' THEN '完成'
ELSE ''
END AS status
FROM work
where status != '2' ORDER BY work.mfg_order_name asc ,work.seq_no asc
</select>
</mapper>

2
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/HandServiceImpl.java

@ -24,7 +24,7 @@ public class HandServiceImpl implements HandService {
@Override
public List<WorkVo> query() {
return pdaService.queryWorks();
return pdaService.getExcWorks();
}
@Override

41
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/impl/PdaServiceImpl.java

@ -82,8 +82,16 @@ public class PdaServiceImpl implements PdaService {
}
@Override
public List<WorkVo> queryWorks() {
return pdaMapper.getWorks();
public List<WorkVo> queryWorks(JSONObject whereJson) {
if (StrUtil.isEmpty(whereJson.getString("mfg_order_name"))){
throw new BadRequestException("工单号为空!");
}
return pdaMapper.getWorks(whereJson.getString("mfg_order_name"));
}
@Override
public List<WorkVo> getExcWorks() {
return pdaMapper.getExcWorks();
}
@Override
@ -100,12 +108,19 @@ public class PdaServiceImpl implements PdaService {
@Override
public PdaResponseVo reSendWork(JSONObject whereJson) {
String work_code = whereJson.getString("work_code");
String require_num = whereJson.getString("require_num");
if (StrUtil.isEmpty(require_num)){
return PdaResponseVo.pdaResultOk("补发数量为空");
}
if (StrUtil.isEmpty(work_code)){
return PdaResponseVo.pdaResultOk("补发作业号为空");
}
Work work = workService.findByCode(work_code);
if (work == null) {
return PdaResponseVo.pdaResultOk("配料作业不存在");
}
work.setRemain_num(work.getRemain_num() + whereJson.getIntValue("count"));
work.setRequire_num(work.getRequire_num() + whereJson.getIntValue("count"));
work.setRemain_num(work.getRemain_num() + whereJson.getIntValue("require_num"));
work.setRequire_num(work.getRequire_num() + whereJson.getIntValue("require_num"));
workService.updateById(work);
return PdaResponseVo.pdaResultOk("补发成功");
}
@ -147,7 +162,6 @@ public class PdaServiceImpl implements PdaService {
JSONArray errArr = new JSONArray();
String start_device_code = dto.getStart_device_code();
String next_device_code = dto.getNext_device_code();
String task_type = dto.getTask_type();
if (StrUtil.isEmpty(start_device_code)) {
throw new BadRequestException("起点不能为空");
@ -155,22 +169,18 @@ public class PdaServiceImpl implements PdaService {
if (StrUtil.isEmpty(next_device_code)) {
throw new BadRequestException("终点不能为空");
}
if (StrUtil.isEmpty(task_type)) {
throw new BadRequestException("任务类型不能为空");
}
JSONObject jo = new JSONObject();
jo.put("start_device_code", start_device_code);
jo.put("next_device_code", next_device_code);
jo.put("start_point_code", start_device_code);
jo.put("next_point_code", next_device_code);
jo.put("task_type", task_type);
jo.put("task_type", "1");
jo.put("priority", "1");
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
try {
taskserver.create(task_dto);
} catch (Exception e) {
// e.printStackTrace();
JSONObject json = new JSONObject();
json.put("message", e.getMessage());
errArr.add(json);
@ -187,4 +197,15 @@ public class PdaServiceImpl implements PdaService {
}
return resultJson;
}
@Override
public PdaResponseVo pause(JSONObject whereJson) {
String work_code = whereJson.getString("work_code");
Work work = workService.findByCode(work_code);
if (work == null) {
return PdaResponseVo.pdaResultOk("配料作业不存在");
}
workService.pause(work.getWork_id());
return PdaResponseVo.pdaResultOk("暂停成功");
}
}

3
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/vo/OrderVo.java

@ -16,5 +16,6 @@ public class OrderVo {
private String resource_name;
private float total_qty;
private String status;
private String create_name;
private String create_time;
private String realstart_time;
}

1
acs/nladmin-system/nlsso-server/src/main/java/org/nl/hand/service/vo/WorkVo.java

@ -12,6 +12,7 @@ public class WorkVo {
private int seq_no;
private String work_code;
private String mfg_order_name;
private String material_code;
private String material_name;
private float qty;
private String resource_name;

2
acs/nladmin-system/nlsso-server/src/main/resources/config/application-dev.yml

@ -10,7 +10,7 @@ spring:
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:stand_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
# url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lzhl_two_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
url: jdbc:log4jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:niudixiya_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:niudixiya_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
username: ${DB_USER:root}
# password: ${DB_PWD:Root.123456}

4
acs/nladmin-ui/src/views/acs/order/AddDialog.vue

@ -188,9 +188,9 @@
<el-table-column
key="10"
prop="productin_qty"
label="物料单桶重量(kg)"
label="物料重量(kg)"
:formatter="crud.formatNum3"
:min-width="flexWidth('productin_qty',crud.data,'物料单桶重量(kg)')"
:min-width="flexWidth('productin_qty',crud.data,'物料重量(kg)')"
align="center"
/>
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">

2
acs/nladmin-ui/src/views/acs/order/index.vue

@ -185,8 +185,6 @@
<udOperation
:data="scope.row"
:permission="permission"
:disabled-dle="scope.row.status !== '0'"
:disabled-edit="scope.row.status !== '0'"
/>
</template>
</el-table-column>

20
acs/nladmin-ui/src/views/acs/work/index.vue

@ -98,7 +98,7 @@
<el-table-column prop="create_time" label="创建时间" :min-width="flexWidth('create_time',crud.data,'创建时间')" />
<el-table-column prop="update_by" label="修改人" :min-width="flexWidth('update_by',crud.data,'修改人')" />
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" />
<el-table-column v-permission="[]" label="操作" width="250px" align="center" fixed="right">
<el-table-column v-permission="[]" label="操作" width="280px" align="center" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@ -128,6 +128,13 @@
>
确认
</el-button>
<el-button
type="text"
icon="el-icon-pause"
@click="handleCommand(scope.$index, scope.row,'e')"
>
暂停
</el-button>
</template>
</el-table-column>
</el-table>
@ -258,6 +265,14 @@ export default {
this.crud.toQuery()
})
},
pause(index, row) {
crudWork.pause(row.work_id).then(res => {
this.crud.toQuery()
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
}).catch(err => {
console.log(err.response.data.message)
})
},
confirm(index, row) {
crudWork.confirm(row.work_id).then(res => {
this.crud.toQuery()
@ -306,6 +321,9 @@ export default {
case 'd'://
this.confirm('4', row)
break
case 'e'://
this.pause('5', row)
break
}
},
showButton(point_status) {

10
acs/nladmin-ui/src/views/acs/work/work.js

@ -80,4 +80,12 @@ export function confirm(work_id) {
})
}
export default { add, edit, del, changeUsed, getWorkList, changeLock, reSend, send, finish, confirm }
export function pause(work_id) {
return request({
url: 'api/work/pause/' + work_id,
method: 'post',
data: work_id
})
}
export default { add, edit, del, changeUsed, getWorkList, changeLock, reSend, send, finish, confirm, pause }

Loading…
Cancel
Save