Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -130,4 +130,28 @@ public class IStivtlostorivnCpInController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/delTask")
|
||||
@Log("删除任务")
|
||||
@ApiOperation("删除任务")
|
||||
public ResponseEntity<Object> delTask(@RequestBody JSONObject whereJson){
|
||||
iStIvtIostorinvCpService.delTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/sendTask")
|
||||
@Log("下发任务")
|
||||
@ApiOperation("下发任务")
|
||||
public ResponseEntity<Object> sendTask(@RequestBody JSONObject whereJson){
|
||||
iStIvtIostorinvCpService.sendTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmTask")
|
||||
@Log("标识完成任务")
|
||||
@ApiOperation("标识完成任务")
|
||||
public ResponseEntity<Object> confirmTask(@RequestBody JSONObject whereJson){
|
||||
iStIvtIostorinvCpService.confirmTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -117,5 +117,29 @@ public class IStivtlostorivnCpOutController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/delTask")
|
||||
@Log("删除任务")
|
||||
@ApiOperation("删除任务")
|
||||
public ResponseEntity<Object> delTask(@RequestBody JSONObject whereJson){
|
||||
iStIvtIostorinvCpOutService.delTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/sendTask")
|
||||
@Log("下发任务")
|
||||
@ApiOperation("下发任务")
|
||||
public ResponseEntity<Object> sendTask(@RequestBody JSONObject whereJson){
|
||||
iStIvtIostorinvCpOutService.sendTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/confirmTask")
|
||||
@Log("标识完成任务")
|
||||
@ApiOperation("标识完成任务")
|
||||
public ResponseEntity<Object> confirmTask(@RequestBody JSONObject whereJson){
|
||||
iStIvtIostorinvCpOutService.confirmTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -151,4 +151,31 @@ public interface IStIvtIostorinvCpOutService extends IService<StIvtIostorinvCp>
|
||||
* }
|
||||
*/
|
||||
void taskOperate(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
* @param whereJson
|
||||
* {
|
||||
* iostorinvdis_id : 分配明细标识
|
||||
* }
|
||||
*/
|
||||
void delTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 下发任务
|
||||
* @param whereJson
|
||||
* {
|
||||
* task_id : 任务标识
|
||||
* }
|
||||
*/
|
||||
void sendTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 标识完成任务
|
||||
* @param whereJson
|
||||
* {
|
||||
* task_id : 任务标识
|
||||
* }
|
||||
*/
|
||||
void confirmTask(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -163,4 +163,30 @@ public interface IStIvtIostorinvCpService extends IService<StIvtIostorinvCp> {
|
||||
*/
|
||||
void taskOperate(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
* @param whereJson
|
||||
* {
|
||||
* iostorinvdis_id : 分配明细标识
|
||||
* }
|
||||
*/
|
||||
void delTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 下发任务
|
||||
* @param whereJson
|
||||
* {
|
||||
* task_id : 任务标识
|
||||
* }
|
||||
*/
|
||||
void sendTask(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 标识完成任务
|
||||
* @param whereJson
|
||||
* {
|
||||
* task_id : 任务标识
|
||||
* }
|
||||
*/
|
||||
void confirmTask(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -20,6 +22,8 @@ import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.masterdata_manage.MasterEnum;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||
@@ -584,6 +588,52 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delTask(JSONObject whereJson) {
|
||||
StIvtIostorinvdisCp disDao = iostorinvdisCpService.getById(whereJson.getString("iostorinvdis_id"));
|
||||
|
||||
// 1.删除任务
|
||||
iSchBaseTaskService.update(
|
||||
new UpdateWrapper<SchBaseTask>().lambda()
|
||||
.set(SchBaseTask::getTask_status,TaskStatusEnum.CANCEL.getCode())
|
||||
.eq(SchBaseTask::getTask_id, disDao.getTask_id())
|
||||
);
|
||||
|
||||
// 2.更新分配
|
||||
disDao.setTask_id("");
|
||||
disDao.setPoint_code("");
|
||||
disDao.setPoint_id("");
|
||||
disDao.setPoint_name("");
|
||||
disDao.setWork_status(IOSEnum.WORK_STATUS.code("未生成"));
|
||||
iostorinvdisCpService.updateById(disDao);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sendTask(JSONObject whereJson) {
|
||||
|
||||
SchBaseTask taskDao = iSchBaseTaskService.getById(whereJson.getString("task_id"));
|
||||
JSONArray paramArr = new JSONArray();
|
||||
paramArr.add(JSON.parseObject(JSONUtil.toJsonStr(taskDao)));
|
||||
|
||||
// 1.下发任务
|
||||
WmsToAcsService bean = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||
bean.issueTaskToAcs2(paramArr);
|
||||
|
||||
// 2.更新任务状态
|
||||
taskDao.setTask_status(TaskStatusEnum.ISSUE.getCode());
|
||||
iSchBaseTaskService.updateById(taskDao);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void confirmTask(JSONObject whereJson) {
|
||||
whereJson.put("status", AcsTaskEnum.STATUS_FINISH.getCode());
|
||||
taskOperate(whereJson);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private StIvtIostorinvCp packageMstForm(StIvtIostorinvCp stIvtIostorinvCp,JSONObject whereJson,Boolean isUpdate) {
|
||||
JSONArray rows = whereJson.getJSONArray("tableData");
|
||||
|
||||
@@ -4,6 +4,8 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -17,10 +19,13 @@ import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.enums.AcsTaskEnum;
|
||||
import org.nl.common.publish.BussEventMulticaster;
|
||||
import org.nl.common.publish.event.PointEvent;
|
||||
import org.nl.common.utils.AcsUtil;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.masterdata_manage.MasterEnum;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbBucketrecordService;
|
||||
import org.nl.wms.masterdata_manage.service.vehicle.IMdPbStoragevehicleextService;
|
||||
@@ -707,6 +712,51 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delTask(JSONObject whereJson) {
|
||||
StIvtIostorinvdisCp disDao = iostorinvdisCpService.getById(whereJson.getString("iostorinvdis_id"));
|
||||
|
||||
// 1.删除任务
|
||||
iSchBaseTaskService.update(
|
||||
new UpdateWrapper<SchBaseTask>().lambda()
|
||||
.set(SchBaseTask::getTask_status,TaskStatusEnum.CANCEL.getCode())
|
||||
.eq(SchBaseTask::getTask_id, disDao.getTask_id())
|
||||
);
|
||||
|
||||
// 2.更新分配
|
||||
disDao.setTask_id("");
|
||||
disDao.setPoint_code("");
|
||||
disDao.setPoint_id("");
|
||||
disDao.setPoint_name("");
|
||||
disDao.setWork_status(IOSEnum.WORK_STATUS.code("未生成"));
|
||||
iostorinvdisCpService.updateById(disDao);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void sendTask(JSONObject whereJson) {
|
||||
SchBaseTask taskDao = iSchBaseTaskService.getById(whereJson.getString("task_id"));
|
||||
JSONArray paramArr = new JSONArray();
|
||||
paramArr.add(JSON.parseObject(JSONUtil.toJsonStr(taskDao)));
|
||||
|
||||
// 1.下发任务
|
||||
WmsToAcsService bean = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||
bean.issueTaskToAcs2(paramArr);
|
||||
|
||||
// 2.更新任务状态
|
||||
taskDao.setTask_status(TaskStatusEnum.ISSUE.getCode());
|
||||
iSchBaseTaskService.updateById(taskDao);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void confirmTask(JSONObject whereJson) {
|
||||
whereJson.put("status", AcsTaskEnum.STATUS_FINISH.getCode());
|
||||
taskOperate(whereJson);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private StIvtIostorinvCp packageMstForm(StIvtIostorinvCp stIvtIostorinvCp,JSONObject whereJson,Boolean isUpdate) {
|
||||
JSONArray rows = whereJson.getJSONArray("tableData");
|
||||
|
||||
@@ -1,228 +1,261 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/productOut',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: 'api/semiProductOut',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/productOut/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
return request({
|
||||
url: 'api/semiProductOut/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/productOut',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: 'api/semiProductOut',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getOutBillDtl(data) {
|
||||
return request({
|
||||
url: '/api/productOut/getOutBillDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getOutBillDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getOutBillDis(data) {
|
||||
return request({
|
||||
url: '/api/productOut/getOutBillDis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getOutBillDis',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getOutBillDisDtl(params) {
|
||||
return request({
|
||||
url: '/api/productOut/getOutBillDisDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getOutBillDisDtl',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getOutBillTask(params) {
|
||||
return request({
|
||||
url: '/api/productOut/getOutBillTask',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getOutBillTask',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function getInvTypes() {
|
||||
return request({
|
||||
url: '/api/productOut/getInvTypes',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getInvTypes',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function insertDtl(data) {
|
||||
return request({
|
||||
url: '/api/productOut/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/insertDtl',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function allDiv(data) {
|
||||
return request({
|
||||
url: '/api/productOut/allDiv',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/allDiv',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function allDivOne(data) {
|
||||
return request({
|
||||
url: '/api/productOut/allDivOne',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/allDivOne',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function allCancel(data) {
|
||||
return request({
|
||||
url: '/api/productOut/allCancel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/allCancel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function oneCancel(data) {
|
||||
return request({
|
||||
url: '/api/productOut/oneCancel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/oneCancel',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function setPoint(data) {
|
||||
return request({
|
||||
url: '/api/productOut/setPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/api/semiProductOut/setPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function oneSetPoint(data) {
|
||||
return request({
|
||||
url: '/api/productOut/oneSetPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/oneSetPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getStructIvt(params) {
|
||||
return request({
|
||||
url: '/api/productOut/getStructIvt',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getStructIvt',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
export function manualDiv(data) {
|
||||
return request({
|
||||
url: '/api/productOut/manualDiv',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/manualDiv',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function confirm(data) {
|
||||
return request({
|
||||
url: '/api/productOut/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/confirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function issueTask(data) {
|
||||
return request({
|
||||
url: '/api/productOut/issueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/issueTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function finishTask(data) {
|
||||
return request({
|
||||
url: '/api/productOut/finishTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/finishTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function cancleTaskfinish(data) {
|
||||
return request({
|
||||
url: '/api/productOut/cancleTaskfinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/cancleTaskfinish',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function paramByCodeType(data) {
|
||||
return request({
|
||||
url: '/api/productOut/paramByCodeType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/paramByCodeType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function schAreaType(data) {
|
||||
return request({
|
||||
url: '/api/productOut/schAreaType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/schAreaType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function backConfirm(data) {
|
||||
return request({
|
||||
url: '/api/productOut/backConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/backConfirm',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getType() {
|
||||
return request({
|
||||
url: '/api/productOut/getType',
|
||||
method: 'get'
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getType',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
export function moneySubmit(data) {
|
||||
return request({
|
||||
url: '/api/productOut/moneySubmit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/moneySubmit',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getDisNum(data) {
|
||||
return request({
|
||||
url: '/api/productOut/getDisNum',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getDisNum',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function queryBox(data) {
|
||||
return request({
|
||||
url: '/api/productOut/queryBox',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/queryBox',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getOutBillTask2(data) {
|
||||
return request({
|
||||
url: '/api/productOut/getOutBillTask2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/getOutBillTask2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function cancelTask(data) {
|
||||
return request({
|
||||
url: '/api/productOut/cancelTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/cancelTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function allSetPoint(data) {
|
||||
return request({
|
||||
url: '/api/productOut/allSetPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/allSetPoint',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function oneSetPoint2(data) {
|
||||
return request({
|
||||
url: '/api/productOut/oneSetPoint2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
return request({
|
||||
url: '/api/semiProductOut/oneSetPoint2',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
del,
|
||||
allDiv,
|
||||
allCancel,
|
||||
getOutBillDtl,
|
||||
getOutBillDis,
|
||||
setPoint,
|
||||
oneSetPoint,
|
||||
getOutBillTask,
|
||||
getStructIvt,
|
||||
manualDiv,
|
||||
confirm,
|
||||
issueTask,
|
||||
finishTask,
|
||||
cancleTaskfinish,
|
||||
getInvTypes,
|
||||
paramByCodeType,
|
||||
schAreaType,
|
||||
backConfirm,
|
||||
getOutBillDisDtl,
|
||||
getType,
|
||||
allDivOne,
|
||||
moneySubmit,
|
||||
getDisNum,
|
||||
queryBox,
|
||||
getOutBillTask2,
|
||||
oneCancel,
|
||||
cancelTask,
|
||||
allSetPoint,
|
||||
oneSetPoint2
|
||||
}
|
||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, oneSetPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType, allDivOne, moneySubmit, getDisNum, queryBox, getOutBillTask2, oneCancel, cancelTask, allSetPoint, oneSetPoint2 }
|
||||
|
||||
@@ -35,51 +35,34 @@
|
||||
@row-click="clcikRow"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bill_code" label="单据号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="子卷号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="sap_pcsn" label="SAP批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="assign_qty"
|
||||
:formatter="crud.formatNum3"
|
||||
label="已分配数量"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-card>-->
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据任务项</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<!-- <el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="updateTask()"
|
||||
>
|
||||
修改
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="dis_del"
|
||||
@click="delTask()"
|
||||
>
|
||||
删除
|
||||
@@ -90,7 +73,8 @@
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="reIssueTask()"
|
||||
:disabled="dis_send"
|
||||
@click="sendTask()"
|
||||
>
|
||||
下发
|
||||
</el-button>
|
||||
@@ -100,20 +84,11 @@
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="dis_confirm"
|
||||
@click="confirmTask()"
|
||||
>
|
||||
标识完成
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
@click="cancelTask()"
|
||||
>
|
||||
取消完成
|
||||
</el-button>-->
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
@@ -130,33 +105,30 @@
|
||||
@row-click="clcikDisRow"
|
||||
>
|
||||
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
|
||||
<el-table-column width="150" prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column width="150" prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column width="170" prop="pcsn" label="子卷号" align="center" />
|
||||
<el-table-column width="120" prop="sap_pcsn" label="SAP批次" align="center" />
|
||||
<el-table-column width="230" prop="box_no" label="木箱码" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="分配货位" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="work_status" label="指令状态" :formatter="statusFormat" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="指令操作号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点位编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_name" label="入库点位名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
<el-table-column show-overflow-tooltip prop="task_type" label="任务类型" align="center" width="150px" :formatter="formatType"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<StructUpdateDiv :dialog-show.sync="structShow" :sect-prop="sectProp" :bucket-form="bucketForm" @updateCommit="updateCommit" />
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: { StructUpdateDiv },
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
dicts: ['io_bill_status', 'task_status'],
|
||||
dicts: ['SCH_TASK_TYPE_DTL', 'task_status'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -173,23 +145,16 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible2: false,
|
||||
tableDtl: [],
|
||||
stor_id: '',
|
||||
sect_id: '',
|
||||
sectProp: null,
|
||||
structShow: false,
|
||||
sects: [],
|
||||
dis_row: null,
|
||||
dis_del: true,
|
||||
dis_send: true,
|
||||
dis_confirm: true,
|
||||
fullscreenLoading: false,
|
||||
bucketParam: null,
|
||||
bucketForm: null,
|
||||
bucketDtlShow: false,
|
||||
form: {
|
||||
tableMater: [],
|
||||
dtl_row: null,
|
||||
checked: '1'
|
||||
},
|
||||
storlist: [],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
@@ -209,154 +174,81 @@ export default {
|
||||
this.form.dtl_row = null
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
clcikRow(row) {
|
||||
this.form.dtl_row = row
|
||||
this.queryTableDdis()
|
||||
},
|
||||
clcikDisRow(row) {
|
||||
debugger
|
||||
this.dis_row = row
|
||||
if (this.dis_row.task_status < 5) {
|
||||
this.dis_del = false
|
||||
this.dis_send = false
|
||||
} else {
|
||||
this.dis_del = true
|
||||
this.dis_send = true
|
||||
}
|
||||
if (this.dis_row.task_status < 7) {
|
||||
this.dis_confirm = false
|
||||
} else {
|
||||
this.dis_confirm = true
|
||||
}
|
||||
},
|
||||
delTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status !== '04') {
|
||||
this.crud.notify('只能对状态为生成的任务进行删除!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.delTask(this.dis_row).then(res => {
|
||||
crudProductIn.delTask({ 'iostorinvdis_id': this.dis_row.iostorinvdis_id }).then(res => {
|
||||
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
crudRawAssist.getIODtl({ 'bill_code': this.currentRow.bill_code, 'open_flag': '2' }).then(res => {
|
||||
this.openParam = res
|
||||
this.dis_row = null
|
||||
this.crud.notify('删除任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
this.queryTableDdis()
|
||||
this.initFlag()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
statusFormat(row, column) {
|
||||
return this.dict.label.task_status[row.work_status]
|
||||
sendTask() {
|
||||
this.fullscreenLoading = true
|
||||
crudProductIn.sendTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||
this.crud.notify('下发成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.queryTableDdis()
|
||||
this.initFlag()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
confirmTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status === '99' || this.dis_row.work_status === '00') {
|
||||
this.crud.notify('只能已生成或下发进行中的任务完成!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.confirmTask(this.dis_row).then(res => {
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
||||
this.form.tableMater = res2
|
||||
this.fullscreenLoading = false
|
||||
this.crud.notify('强制确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
crudProductIn.confirmTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.queryTableDdis()
|
||||
this.initFlag()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
cancelTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status !== '99') {
|
||||
this.crud.notify('只能对状态为完成的任务进行取消!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.cancelTask(this.dis_row).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
||||
this.form.tableMater = res2
|
||||
this.crud.notify('取消确认任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
reIssueTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
if (this.dis_row.work_status !== '04') {
|
||||
this.crud.notify('只能对状态为生成的任务进行下发!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.fullscreenLoading = true
|
||||
crudRawAssist.reIssueTask(this.dis_row).then(res => {
|
||||
this.fullscreenLoading = false
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res2 => {
|
||||
this.form.tableMater = res2
|
||||
this.crud.notify('下发任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
updateTask() {
|
||||
if (!this.dis_row) {
|
||||
this.crud.notify('请选择一条任务项', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
debugger
|
||||
if (this.dis_row.work_status !== '01') {
|
||||
this.crud.notify('只能对状态为生成的任务进行修改!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
this.structShow = true
|
||||
this.bucketForm = this.dis_row
|
||||
},
|
||||
updateCommit() {
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
this.crud.notify('修改任务成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
checkedChange(val) {
|
||||
this.form.dtl_row.checked = this.form.checked
|
||||
crudRawAssist.queryTask(this.form.dtl_row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
clcikRow(row, column, event) {
|
||||
this.form.dtl_row = row
|
||||
row.checked = this.form.checked
|
||||
crudRawAssist.queryTask(row).then(res => {
|
||||
this.form.tableMater = res
|
||||
})
|
||||
},
|
||||
clcikDisRow(row, column, event) {
|
||||
this.dis_row = row
|
||||
},
|
||||
assignFormat(row, column) {
|
||||
if (!row.assign_qty) {
|
||||
return '0'
|
||||
} else {
|
||||
return row.assign_qty
|
||||
}
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
bucketDtl(row) {
|
||||
crudRawAssist.bucketDtl(row).then(res => {
|
||||
this.bucketParam = res
|
||||
this.bucketDtlShow = true
|
||||
})
|
||||
queryTableDdis() {
|
||||
if (this.form.dtl_row !== null) {
|
||||
crudProductIn.getIosInvDis({ 'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id }).then(res => {
|
||||
this.form.tableMater = res
|
||||
}).catch(() => {
|
||||
this.form.tableMater = []
|
||||
})
|
||||
}
|
||||
},
|
||||
formatStatus(row) {
|
||||
return this.dict.label.task_status[row.task_status]
|
||||
},
|
||||
formatType(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.task_type]
|
||||
},
|
||||
initFlag() {
|
||||
this.dis_del = true
|
||||
this.dis_send = true
|
||||
this.dis_confirm = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,17 +141,17 @@
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
:disabled="dis_flag"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
@click="divOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -220,6 +220,7 @@
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :stor-id="storId" :open-param="openParam" @AddChanged="querytable" />
|
||||
<TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -237,10 +238,11 @@ import DivDialog from '@/views/wms/storage_manage/product/productIn/DivDialog'
|
||||
import ViewDialog from '@/views/wms/storage_manage/product/productIn/ViewDialog'
|
||||
import crudStorattr, { getStor } from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import { mapGetters } from 'vuex'
|
||||
import TaskDialog from '@/views/wms/storage_manage/product/productIn/TaskDialog'
|
||||
|
||||
export default {
|
||||
name: 'ProductIn',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
|
||||
components: { TaskDialog, ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DateRangePicker, DivDialog },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '',
|
||||
@@ -258,15 +260,18 @@ export default {
|
||||
height: document.documentElement.clientHeight - 180 + 'px;',
|
||||
permission: {},
|
||||
dis_flag: true,
|
||||
task_flag: true,
|
||||
confirm_flag: true,
|
||||
disShow: false,
|
||||
viewShow: false,
|
||||
mstrow: {},
|
||||
divShow: false,
|
||||
openParam: [],
|
||||
taskOpenParam: [],
|
||||
currentRow: null,
|
||||
storlist: [],
|
||||
storId: null
|
||||
storId: null,
|
||||
taskShow: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -320,12 +325,18 @@ export default {
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
}
|
||||
if (currentRow.bill_status !== '99') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.confirm_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
@@ -357,6 +368,12 @@ export default {
|
||||
this.divShow = true
|
||||
})
|
||||
},
|
||||
taskOpen() {
|
||||
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||
this.taskOpenParam = res
|
||||
})
|
||||
this.taskShow = true
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
this.crud.toQuery()
|
||||
|
||||
@@ -104,6 +104,30 @@ export function cancelConfirmvehicle(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sendTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/sendTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/productIn/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -117,5 +141,8 @@ export default {
|
||||
unDivStruct,
|
||||
setPoint,
|
||||
confirm,
|
||||
cancelConfirmvehicle
|
||||
cancelConfirmvehicle,
|
||||
delTask,
|
||||
sendTask,
|
||||
confirmTask
|
||||
}
|
||||
|
||||
@@ -0,0 +1,281 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
:visible.sync="dialogVisible2"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@close="close"
|
||||
>
|
||||
|
||||
<span slot="title" class="dialog-footer">
|
||||
<div class="crud-opts2">
|
||||
<span class="el-dialog__title2">入库单任务操作</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="info" @click="dialogVisible2 = false">关闭</el-button>
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据明细项</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="this.openParam"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
border
|
||||
highlight-current-row
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikRow"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip type="index" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="assign_qty" :formatter="crud.formatNum3" label="已分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="unassign_qty" :formatter="crud.formatNum3" label="未分配数量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="qty_unit_name" label="重量单位" align="center" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
<!-- <el-card class="box-card" shadow="never" :body-style="{padding:'20px 20px 0 20px'}">
|
||||
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="mini">
|
||||
<el-form-item prop="checked">
|
||||
<el-checkbox v-model="form.checked" true-label="1" false-label="0" @change="checkedChange()">仅显示未完成的任务</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>-->
|
||||
<div class="crud-opts2">
|
||||
<span class="role-span">入库单据任务项</span>
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
:disabled="dis_del"
|
||||
@click="delTask()"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="dis_send"
|
||||
@click="sendTask()"
|
||||
>
|
||||
下发
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="warning"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:disabled="dis_confirm"
|
||||
@click="confirmTask()"
|
||||
>
|
||||
标识完成
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<el-card class="box-card" shadow="never" :body-style="{padding:'0'}">
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="disTable"
|
||||
:data="form.tableMater"
|
||||
style="width: 100%;"
|
||||
max-height="300"
|
||||
:row-class-name="tableRowClassName"
|
||||
highlight-current-row
|
||||
border
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@row-click="clcikDisRow"
|
||||
>
|
||||
<el-table-column width="60" prop="seq_no" label="序号" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="150" prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column show-overflow-tooltip width="170" prop="pcsn" label="批次" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code1" label="起始位置" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code2" label="目的位置" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
<el-table-column show-overflow-tooltip prop="task_type" label="任务类型" align="center" width="150px" :formatter="formatType"/>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud } from '@crud/crud'
|
||||
import crudProductOut from '@/views/wms/storage_manage/product/productOut/productout'
|
||||
|
||||
export default {
|
||||
name: 'TaskDialog',
|
||||
components: {},
|
||||
mixins: [crud()],
|
||||
dicts: ['SCH_TASK_TYPE_DTL', 'task_status'],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
bussConfig: {
|
||||
type: Object
|
||||
},
|
||||
openParam: {
|
||||
type: Array,
|
||||
default: () => { return [] }
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible2: false,
|
||||
dis_row: null,
|
||||
dis_del: true,
|
||||
dis_send: true,
|
||||
dis_confirm: true,
|
||||
fullscreenLoading: false,
|
||||
form: {
|
||||
tableMater: [],
|
||||
dtl_row: null,
|
||||
checked: '1'
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogShow: {
|
||||
handler(newValue, oldValue) {
|
||||
this.dialogVisible2 = newValue
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form.tableMater = []
|
||||
this.form.checked = '1'
|
||||
this.form.dtl_row = null
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
clcikRow(row) {
|
||||
this.form.dtl_row = row
|
||||
this.queryTableDdis()
|
||||
},
|
||||
clcikDisRow(row) {
|
||||
debugger
|
||||
this.dis_row = row
|
||||
if (this.dis_row.task_status < 5) {
|
||||
this.dis_del = false
|
||||
this.dis_send = false
|
||||
} else {
|
||||
this.dis_del = true
|
||||
this.dis_send = true
|
||||
}
|
||||
if (this.dis_row.task_status < 7) {
|
||||
this.dis_confirm = false
|
||||
} else {
|
||||
this.dis_confirm = true
|
||||
}
|
||||
},
|
||||
delTask() {
|
||||
this.fullscreenLoading = true
|
||||
crudProductOut.delTask({ 'iostorinvdis_id': this.dis_row.iostorinvdis_id }).then(res => {
|
||||
this.crud.notify('删除成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.queryTableDdis()
|
||||
this.initFlag()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
sendTask() {
|
||||
this.fullscreenLoading = true
|
||||
crudProductOut.sendTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||
this.crud.notify('下发成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.queryTableDdis()
|
||||
this.initFlag()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
confirmTask() {
|
||||
this.fullscreenLoading = true
|
||||
crudProductOut.confirmTask({ 'task_id': this.dis_row.task_id }).then(res => {
|
||||
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.fullscreenLoading = false
|
||||
this.queryTableDdis()
|
||||
this.initFlag()
|
||||
}).catch(() => {
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.form.dtl_row !== null) {
|
||||
crudProductOut.getIosInvDis({ 'iostorinvdtl_id': this.form.dtl_row.iostorinvdtl_id }).then(res => {
|
||||
this.form.tableMater = res
|
||||
}).catch(() => {
|
||||
this.form.tableMater = []
|
||||
})
|
||||
}
|
||||
},
|
||||
formatStatus(row) {
|
||||
return this.dict.label.task_status[row.task_status]
|
||||
},
|
||||
formatType(row) {
|
||||
return this.dict.label.SCH_TASK_TYPE_DTL[row.task_type]
|
||||
},
|
||||
initFlag() {
|
||||
this.dis_del = true
|
||||
this.dis_send = true
|
||||
this.dis_confirm = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.crud-opts2 {
|
||||
padding: 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.crud-opts2 .el-dialog__title2 {
|
||||
line-height: 24px;
|
||||
font-size:20px;
|
||||
color:#303133;
|
||||
}
|
||||
|
||||
.crud-opts2 .role-span {
|
||||
padding: 10px 0px 10px 0px;
|
||||
}
|
||||
.crud-opts2 .crud-opts-form {
|
||||
padding: 10px 0px 0px 20px;
|
||||
}
|
||||
|
||||
.input-with-select {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -101,6 +101,17 @@
|
||||
>
|
||||
分配
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="task_flag"
|
||||
@click="taskOpen"
|
||||
>
|
||||
作业任务
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -170,6 +181,7 @@
|
||||
<AddDialog @AddChanged="querytable" />
|
||||
<ViewDialog :dialog-show.sync="viewShow" :rowmst="mstrow" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :open-array="openParam" :stor-id="storId" :row-mst="mstrow" @DivChanged="querytable" />
|
||||
<TaskDialog :dialog-show.sync="taskShow" :open-param="taskOpenParam" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -184,10 +196,11 @@ import AddDialog from '@/views/wms/storage_manage/product/productOut/AddDialog'
|
||||
import DivDialog from '@/views/wms/storage_manage/product/productOut/DivDialog'
|
||||
import ViewDialog from '@//views/wms/storage_manage/product/productOut/ViewDialog'
|
||||
import crudStorattr from '@/views/wms/storage_manage/basedata/basedata'
|
||||
import TaskDialog from '@/views/wms/storage_manage/product/productOut/TaskDialog'
|
||||
|
||||
export default {
|
||||
name: 'ProductOut',
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog },
|
||||
components: { ViewDialog, AddDialog, crudOperation, rrOperation, udOperation, pagination, DivDialog, TaskDialog },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', idField: 'iostorinv_id', url: 'api/productOut', crudMethod: { ...productOut },
|
||||
optShow: {
|
||||
@@ -209,10 +222,12 @@ export default {
|
||||
edit: ['admin', 'checkoutbill:edit'],
|
||||
del: ['admin', 'checkoutbill:del']
|
||||
},
|
||||
task_flag: true,
|
||||
openMoneyDialog: false,
|
||||
loadingConfirm: false,
|
||||
divShow: false,
|
||||
taskShow: false,
|
||||
taskOpenParam: [],
|
||||
dis_flag: true,
|
||||
work_flag: true,
|
||||
confirm_flag: true,
|
||||
@@ -281,6 +296,11 @@ export default {
|
||||
} else {
|
||||
this.confirm_flag = true
|
||||
}
|
||||
if (current.bill_status !== '99') {
|
||||
this.task_flag = false
|
||||
} else {
|
||||
this.task_flag = true
|
||||
}
|
||||
}
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
@@ -294,6 +314,7 @@ export default {
|
||||
this.dis_flag = true
|
||||
this.confirm_flag = true
|
||||
this.work_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
@@ -308,6 +329,12 @@ export default {
|
||||
this.mstrow = this.currentRow
|
||||
})
|
||||
},
|
||||
taskOpen() {
|
||||
productOut.getIosInvDtl({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
this.taskOpenParam = res
|
||||
})
|
||||
this.taskShow = true
|
||||
},
|
||||
confirm() {
|
||||
this.loadingConfirm = true
|
||||
productOut.confirm({ 'iostorinv_id': this.currentRow.iostorinv_id }).then(res => {
|
||||
|
||||
@@ -88,6 +88,30 @@ export function manualDiv(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function delTask(data) {
|
||||
return request({
|
||||
url: '/api/productOut/delTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function sendTask(data) {
|
||||
return request({
|
||||
url: '/api/productOut/sendTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function confirmTask(data) {
|
||||
return request({
|
||||
url: '/api/productOut/confirmTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -99,5 +123,8 @@ export default {
|
||||
setPoint,
|
||||
confirm,
|
||||
getStructIvt,
|
||||
manualDiv
|
||||
manualDiv,
|
||||
delTask,
|
||||
sendTask,
|
||||
confirmTask
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package org.nl.acs.device_driver.basedriver.hailiang_one;
|
||||
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
|
||||
/**
|
||||
* @author: geng by
|
||||
* @createDate: 2023/6/9
|
||||
*/
|
||||
public interface RemoveDevicePhase {
|
||||
public void set(int agvphase, int index, Instruction inst);
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -41,7 +42,7 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||
|
||||
@@ -12,8 +12,11 @@ import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
@@ -39,7 +42,7 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||
@@ -51,6 +54,8 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
@Autowired
|
||||
TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
@Autowired
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
|
||||
|
||||
int mode = 0;
|
||||
//储料仓运行中
|
||||
@@ -140,10 +145,14 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号is_open:" + last_is_open + "->" + is_open);
|
||||
}
|
||||
if (silo_weight != last_silo_weight) {
|
||||
Map<String, Integer> feedNumMap = new HashMap<>();
|
||||
feedNumMap.put("qty", this.getFull_number());
|
||||
feedNumMap.put("weight", this.getSilo_weight());
|
||||
MonitoringLargeScreenData.deviceNumData.put(this.device_code, feedNumMap);
|
||||
if (is_open == 1) {
|
||||
Map<String, Integer> feedNumMap = new HashMap<>();
|
||||
feedNumMap.put("qty", this.getFull_number());
|
||||
feedNumMap.put("weight", this.getSilo_weight());
|
||||
Map<String, Map<String, Integer>> fm = new HashMap<>();
|
||||
fm.put(this.device_code, feedNumMap);
|
||||
acsToWmsService.feedDeviceNum2(fm);
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号silo_weight:" + last_silo_weight + "->" + silo_weight);
|
||||
}
|
||||
if (full_number != last_full_number) {
|
||||
@@ -162,16 +171,16 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
//this.setIserror(true);
|
||||
message = "信号量同步异常";
|
||||
//未联机
|
||||
} /*else if (mode == 0) {
|
||||
} else if (mode == 0) {
|
||||
message = "未联机";
|
||||
} */ else {
|
||||
this.setIsonline(true);
|
||||
this.setIserror(false);
|
||||
} else {
|
||||
//this.setIsonline(true);
|
||||
//this.setIserror(false);
|
||||
message = null;
|
||||
//agv到达倒料点
|
||||
if (agvphase == 0x0B || agvphase == 0x0F) {
|
||||
//判断储料仓联机、无故障、agv执行执行物料编号和上次倒料编号一致或者上次物料清空才允许倒料
|
||||
if (ObjectUtil.isNotEmpty(inst)) {
|
||||
if (mode == 1 && ObjectUtil.isNotEmpty(inst)) {
|
||||
inst.setExecute_status(InstActionEnum.EXECUTE_TO_PUT_FALL_SEND_FULL.getCode());
|
||||
instructionService.update(inst);
|
||||
byte[] data = agvService.sendAgvTwoModeInst(agvphase, index, 0);
|
||||
@@ -182,6 +191,9 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
logServer.deviceExecuteLog(device_code, "", "", this.messageInfo(agvphase));
|
||||
} else {
|
||||
String notFeedAgvMessage = "";
|
||||
if (mode != 1) {
|
||||
notFeedAgvMessage += "设备未联机,";
|
||||
}
|
||||
if (inst == null) {
|
||||
notFeedAgvMessage += "AGV指令为空,";
|
||||
}
|
||||
@@ -191,7 +203,7 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
|
||||
//agv倒料完成
|
||||
if (agvphase == 0x0D || agvphase == 0x11) {
|
||||
if (ObjectUtil.isNotEmpty(inst)) {
|
||||
if (mode == 1 && ObjectUtil.isNotEmpty(inst)) {
|
||||
//下发储料仓倒料数量及开始称重
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_dumping_num", inst.getQuantity());
|
||||
@@ -215,6 +227,9 @@ public class HailiangCleaningMachineStorageStationDeviceDriver extends AbstractO
|
||||
logServer.deviceExecuteLog(device_code, "", "", this.messageInfo(agvphase));
|
||||
} else {
|
||||
String notFeedAgvMessage = "";
|
||||
if (mode != 1) {
|
||||
notFeedAgvMessage += "设备未联机,";
|
||||
}
|
||||
if (inst == null) {
|
||||
notFeedAgvMessage += "AGV指令为空,";
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.ApplyTaskTime;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -52,7 +53,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, IssuedDeviceOrderInfo {
|
||||
public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, IssuedDeviceOrderInfo, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
@@ -140,8 +140,10 @@ public class HailiangOldSpecialDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
}
|
||||
if (now_order_prod_num != last_now_order_prod_num) {
|
||||
if (mode == 1 && order > 0) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), now_order_prod_num);
|
||||
if (mode == 1 && order > 0 && order_prod_allnum > 0) {
|
||||
if (produceshiftorderService.findByCodeFromCache(String.valueOf(order)) != null) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), now_order_prod_num);
|
||||
}
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_order_prod_num:" + last_now_order_prod_num + "->" + now_order_prod_num);
|
||||
}
|
||||
@@ -329,8 +331,8 @@ public class HailiangOldSpecialDeviceDriver extends AbstractOpcDeviceDriver impl
|
||||
} else {
|
||||
map.put("to_confirm_finished", "1");
|
||||
}
|
||||
//map.put("to_order", "0");
|
||||
//map.put("to_clear", "1");
|
||||
map.put("to_order", "0");
|
||||
map.put("to_clear", "1");
|
||||
this.writing(map);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
@@ -36,7 +37,7 @@ import java.util.HashMap;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangOldSpecialEmptyStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangOldSpecialEmptyStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.ApplyTaskTime;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -47,7 +48,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangOldSpecialFullStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangOldSpecialFullStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||
@@ -287,9 +288,9 @@ public class HailiangOldSpecialFullStationDeviceDriver extends AbstractOpcDevice
|
||||
redisUtils.setExpire(this.device_code, null, ApplyTaskTime.APPLY_TIME, TimeUnit.SECONDS);
|
||||
//判断是否需要AGV搬运 需要就申请任务 不需要不申请
|
||||
ProduceshiftorderDto produceshiftorderDto = produceshiftorderService.findByCodeFromCache(String.valueOf(this.getOrder()));
|
||||
if (produceshiftorderDto == null) {
|
||||
produceshiftorderDto = produceshiftorderService.findByCode(String.valueOf(this.getOrder()));
|
||||
}
|
||||
// if (produceshiftorderDto == null) {
|
||||
// produceshiftorderDto = produceshiftorderService.findByCode(String.valueOf(this.getOrder()));
|
||||
// }
|
||||
if (produceshiftorderDto != null && StrUtil.equals(produceshiftorderDto.getIs_needmove(), StatusEnum.NEED_MOVE.getCode())) {
|
||||
JSONObject reqParam = new JSONObject();
|
||||
reqParam.put("device_code", this.getDevice_code());
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.ApplyTaskTime;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -49,7 +50,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangOldSpecialPourStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangOldSpecialPourStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.ApplyTaskTime;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.IssuedDeviceOrderInfo;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -53,7 +54,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, IssuedDeviceOrderInfo {
|
||||
public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, IssuedDeviceOrderInfo, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
@@ -53,6 +53,8 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
@Autowired
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
|
||||
int heartbeat = 0;
|
||||
int mode = 0;
|
||||
int error = 0;
|
||||
int now_one_box_num = 0;
|
||||
@@ -63,6 +65,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
int order = 0;
|
||||
int order_prod_allnum = 0;
|
||||
|
||||
int last_heartbeat = 0;
|
||||
int last_mode = 0;
|
||||
int last_error = 0;
|
||||
int last_finish = 0;
|
||||
@@ -97,6 +100,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
public synchronized void execute() {
|
||||
try {
|
||||
device_code = this.getDeviceCode();
|
||||
heartbeat = this.itemProtocol.getHeartbeat();
|
||||
error = this.itemProtocol.getError();
|
||||
order = this.itemProtocol.getOrder();
|
||||
mode = this.itemProtocol.getItem_mode();
|
||||
@@ -137,6 +141,13 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
if (order_compel_finish != last_order_compel_finish) {
|
||||
if (order_compel_finish == 1) {
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("to_confirm_finished", "1");
|
||||
map.put("to_clear", "1");
|
||||
map.put("to_order", "0");
|
||||
this.writing(map);
|
||||
}
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_order_compel_finish, String.valueOf(this.last_order_compel_finish), String.valueOf(this.order_compel_finish)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order_compel_finish:" + last_order_compel_finish + "->" + order_compel_finish);
|
||||
}
|
||||
@@ -145,8 +156,10 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号order:" + last_order + "->" + order);
|
||||
}
|
||||
if (now_order_prod_num != last_now_order_prod_num) {
|
||||
if (mode == 1 && order > 0) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), now_order_prod_num);
|
||||
if (mode == 1 && order > 0 && order_prod_allnum > 0) {
|
||||
if (produceshiftorderService.findByCodeFromCache(String.valueOf(order)) != null) {
|
||||
MonitoringLargeScreenData.orderData.put(String.valueOf(order), now_order_prod_num);
|
||||
}
|
||||
}
|
||||
luceneExecuteLogService.deviceExecuteLog(new LuceneLogDto(this.getDevice().getOpc_server_code(), this.getDevice().getOpc_plc_code(), this.device_code, ItemProtocol.item_now_order_prod_num, String.valueOf(this.last_now_order_prod_num), String.valueOf(this.now_order_prod_num)));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号now_order_prod_num:" + last_now_order_prod_num + "->" + now_order_prod_num);
|
||||
@@ -171,6 +184,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
feedDeviceStatusFlag = false;
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号isonline:" + last_isonline + "->" + isonline);
|
||||
}
|
||||
|
||||
if (!this.itemProtocol.getIsonline() && !feedDeviceStatusFlag) {
|
||||
JSONObject chm = new JSONObject();
|
||||
chm.put("device_code", this.getDevice_code());
|
||||
@@ -189,7 +203,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
chm.put("error_code", String.valueOf(error));
|
||||
acsToWmsService.feedDeviceStatusType(chm);
|
||||
feedDeviceStatusFlag = true;
|
||||
} else if (this.itemProtocol.getIsonline() && mode == 1 && order > 0 && !feedDeviceStatusFlag) {
|
||||
} else if (this.itemProtocol.getIsonline() && mode == 1 && order > 0 && order_prod_allnum > 0 && !feedDeviceStatusFlag) {
|
||||
JSONObject chm = new JSONObject();
|
||||
chm.put("device_code", this.getDevice_code());
|
||||
//设备生产中
|
||||
@@ -198,7 +212,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
chm.put("error_code", "0");
|
||||
acsToWmsService.feedDeviceStatusType(chm);
|
||||
feedDeviceStatusFlag = true;
|
||||
} else if (this.itemProtocol.getIsonline() && mode == 0 && order > 0 && !feedDeviceStatusFlag) {
|
||||
} else if (this.itemProtocol.getIsonline() && mode == 0 && order > 0 && order_prod_allnum > 0 && !feedDeviceStatusFlag) {
|
||||
JSONObject chm = new JSONObject();
|
||||
chm.put("device_code", this.getDevice_code());
|
||||
//设备待生产
|
||||
@@ -230,7 +244,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
|
||||
//修改工单状态为自动完成
|
||||
if (mode == 1 && finish != last_finish && finish == 1 && order > 0 && now_order_prod_num == order_prod_allnum) {
|
||||
if (mode == 1 && finish != last_finish && finish == 1 && order_compel_finish != 1 && order > 0 && now_order_prod_num == order_prod_allnum) {
|
||||
ProduceshiftorderDto pdto = produceshiftorderService.findByCodeFromCache(String.valueOf(order));
|
||||
if (pdto != null) {
|
||||
if (pdto.getOrder_status().equals(WorkerOrderEnum.PRODUCTING.getCode())) {
|
||||
@@ -269,6 +283,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
last_line_stock_num = line_stock_num;
|
||||
last_order_prod_allnum = order_prod_allnum;
|
||||
last_isonline = isonline;
|
||||
last_heartbeat = heartbeat;
|
||||
}
|
||||
|
||||
|
||||
@@ -299,12 +314,12 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
if (StrUtil.equals(autoFinish, WorkerOrderEnum.FORCEFINISH.getCode())) {
|
||||
map.put("to_order_compel_finished", "1");
|
||||
map.put("to_confirm_finished", "1");
|
||||
//map.put("to_confirm_finished", "1");
|
||||
} else {
|
||||
map.put("to_confirm_finished", "1");
|
||||
map.put("to_order", "0");
|
||||
map.put("to_clear", "1");
|
||||
}
|
||||
//map.put("to_order", "0");
|
||||
//map.put("to_clear", "1");
|
||||
this.writing(map);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.nl.acs.agv.server.impl.NDCAgvServiceImpl;
|
||||
import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
@@ -35,7 +36,7 @@ import java.util.HashMap;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangSpecialEmptyStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangSpecialEmptyStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.nl.acs.auto.run.NDCSocketConnectionAutoRun;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.ApplyTaskTime;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -47,7 +48,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
|
||||
@@ -291,9 +292,9 @@ public class HailiangSpecialFullStationDeviceDriver extends AbstractOpcDeviceDri
|
||||
//判断是否需要AGV搬运 需要就申请任务 不需要不申请
|
||||
JSONObject reqParam = new JSONObject();
|
||||
ProduceshiftorderDto produceshiftorderDto = produceshiftorderService.findByCodeFromCache(String.valueOf(this.getOrder()));
|
||||
if (produceshiftorderDto == null) {
|
||||
produceshiftorderDto = produceshiftorderService.findByCode(String.valueOf(this.getOrder()));
|
||||
}
|
||||
// if (produceshiftorderDto == null) {
|
||||
// produceshiftorderDto = produceshiftorderService.findByCode(String.valueOf(this.getOrder()));
|
||||
// }
|
||||
if (produceshiftorderDto != null && StrUtil.equals(produceshiftorderDto.getIs_needmove(), StatusEnum.NEED_MOVE.getCode())) {
|
||||
reqParam.put("type", StatusEnum.FULL_REQ.getCode());
|
||||
reqParam.put("device_code", this.getDevice_code());
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.ApplyTaskTime;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.MonitoringLargeScreenData;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
@@ -49,7 +50,7 @@ import java.util.concurrent.TimeUnit;
|
||||
@Slf4j
|
||||
@Data
|
||||
@RequiredArgsConstructor
|
||||
public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
public class HailiangSpecialPourStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor, RemoveDevicePhase {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
@Autowired
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
@@ -54,6 +54,14 @@ public interface AcsToWmsService {
|
||||
*/
|
||||
HttpResponse feedDeviceNum(Map<String, Map<String,Integer>> map);
|
||||
|
||||
/**
|
||||
* 反馈储料仓料口数量
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
HttpResponse feedDeviceNum2(Map<String, Map<String,Integer>> map);
|
||||
|
||||
|
||||
/**
|
||||
* 申请扫码器任务
|
||||
|
||||
@@ -201,6 +201,33 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResponse feedDeviceNum2(Map<String, Map<String, Integer>> map) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
|
||||
log.info("acs开始向mes反馈储料仓重量和数量,请求参数:{}", JSON.toJSONString(map));
|
||||
String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("feedDeviceNum2");
|
||||
String methods_url = addressDto.getMethods_url();
|
||||
String url = wmsUrl + methods_url;
|
||||
HttpResponse result = null;
|
||||
try {
|
||||
result = HttpRequest.post(url)
|
||||
.body(JSON.toJSONString(map))
|
||||
.execute();
|
||||
log.info("acs向mes反馈储料仓重量和数量成功,请求参数:{},请求路径:{},响应参数:{}", JSON.toJSONString(map), url, JSON.toJSONString(result));
|
||||
} catch (Exception e) {
|
||||
log.error("acs向mes反馈储料仓重量和数量失败,请求参数:{},请求路径:{},失败原因:{}", JSON.toJSONString(map), url, e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResponse applyScannerTask(JSONObject map) {
|
||||
try {
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.nl.acs.agv.server.XianGongAgvService;
|
||||
import org.nl.acs.auto.initial.ApplicationAutoInitial;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.RemoveDevicePhase;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_auto_cache_line.HailiangAutoCacheLineDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||
@@ -1431,20 +1432,24 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
Device start_device = deviceAppService.findDeviceByCode(start_point_code);
|
||||
Device next_device = deviceAppService.findDeviceByCode(next_point_code);
|
||||
Device put_device = deviceAppService.findDeviceByCode(put_point_code);
|
||||
HailiangAutoCacheLineDeviceDriver hailiangAutoCacheLineDeviceDriver;
|
||||
if (put_device != null && put_device.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
|
||||
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) put_device.getDeviceDriver();
|
||||
hailiangAutoCacheLineDeviceDriver.set(0, 0, null);
|
||||
if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 && hailiangAutoCacheLineDeviceDriver.getTask() == Integer.parseInt(dto.getInstruction_code())) {
|
||||
hailiangAutoCacheLineDeviceDriver.writing("to_task_finish", "1");
|
||||
}
|
||||
RemoveDevicePhase removeDevicePhase;
|
||||
if (put_device != null && put_device.getDeviceDriver() instanceof RemoveDevicePhase) {
|
||||
removeDevicePhase = (RemoveDevicePhase) put_device.getDeviceDriver();
|
||||
removeDevicePhase.set(0, 0, null);
|
||||
// if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 && hailiangAutoCacheLineDeviceDriver.getTask() == Integer.parseInt(dto.getInstruction_code())) {
|
||||
// hailiangAutoCacheLineDeviceDriver.writing("to_task_finish", "1");
|
||||
// }
|
||||
}
|
||||
if (start_device != null && next_device != null && start_device.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver && next_device.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
|
||||
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) start_device.getDeviceDriver();
|
||||
hailiangAutoCacheLineDeviceDriver.set(0, 0, null);
|
||||
if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 && hailiangAutoCacheLineDeviceDriver.getTask() == Integer.parseInt(dto.getInstruction_code())) {
|
||||
hailiangAutoCacheLineDeviceDriver.writing("to_task_finish", "1");
|
||||
}
|
||||
if (start_device != null && start_device.getDeviceDriver() instanceof RemoveDevicePhase) {
|
||||
removeDevicePhase = (RemoveDevicePhase) start_device.getDeviceDriver();
|
||||
removeDevicePhase.set(0, 0, null);
|
||||
// if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 && hailiangAutoCacheLineDeviceDriver.getTask() == Integer.parseInt(dto.getInstruction_code())) {
|
||||
// hailiangAutoCacheLineDeviceDriver.writing("to_task_finish", "1");
|
||||
// }
|
||||
}
|
||||
if (next_device != null && next_device.getDeviceDriver() instanceof RemoveDevicePhase) {
|
||||
removeDevicePhase = (RemoveDevicePhase) put_device.getDeviceDriver();
|
||||
removeDevicePhase.set(0, 0, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class AutoCreateInst {
|
||||
Device device = deviceAppService.findDeviceByCode(put_device_code);
|
||||
if (device != null && device.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
|
||||
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) device.getDeviceDriver();
|
||||
if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 || instructionService.findInstByDeviceCode(put_device_code) != null) {
|
||||
if (hailiangAutoCacheLineDeviceDriver.getMode() != 1 || hailiangAutoCacheLineDeviceDriver.getTask() != 0 || instructionService.findInstByDeviceCode(put_device_code) != null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public class AutoCreateInst {
|
||||
Device device = deviceAppService.findDeviceByCode(start_device_code);
|
||||
if (device != null && device.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
|
||||
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) device.getDeviceDriver();
|
||||
if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 || instructionService.findInstByDeviceCode(start_device_code) != null) {
|
||||
if (hailiangAutoCacheLineDeviceDriver.getMode() != 1 || hailiangAutoCacheLineDeviceDriver.getTask() != 0 || instructionService.findInstByDeviceCode(start_device_code) != null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,7 @@ public class AutoCreateInst {
|
||||
Device device = deviceAppService.findDeviceByCode(taskDto1.getPut_device_code());
|
||||
if (device != null && device.getDeviceDriver() instanceof HailiangAutoCacheLineDeviceDriver) {
|
||||
hailiangAutoCacheLineDeviceDriver = (HailiangAutoCacheLineDeviceDriver) device.getDeviceDriver();
|
||||
if (hailiangAutoCacheLineDeviceDriver.getTask() != 0 || instructionService.findInstByDeviceCode(taskDto1.getPut_device_code()) != null) {
|
||||
if (hailiangAutoCacheLineDeviceDriver.getMode() != 1 || hailiangAutoCacheLineDeviceDriver.getTask() != 0 || instructionService.findInstByDeviceCode(taskDto1.getPut_device_code()) != null) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user