This commit is contained in:
lgh 2022-07-19 08:42:10 +08:00
rodzic f555907877
commit 189475f09b
5 zmienionych plików z 26 dodań i 3 usunięć

Wyświetl plik

@ -254,6 +254,7 @@ public class CurrTaskServiceImpl extends BaseService implements CurrTaskService
}
return R.ok(idParam.getId().toString());
}else {
currTaskDetServiceBiz.remove(new QueryWrapper<CurrTaskDet>().eq(CurrTaskDet.CURR_TASK_ID,currTask.getId()));
currTaskServiceBiz.removeById(idParam);
return R.ok(idParam.getId().toString());
}

Wyświetl plik

@ -121,11 +121,13 @@ public class OrderInfoServiceImpl extends BaseService implements OrderInfoServic
{
R<OrderInfoVo> info = getTaskInfoByIdenCardNum(e.getIdenCardNum());
e.setFinishWeight(info.getData().getFinishWeight());
e.setFinishQuantity(info.getData().getQuantity());
e.setFinishQuantity(info.getData().getFinishQuantity());
e.setWaitWeight(info.getData().getWaitWeight());
e.setWaitQuantity(info.getData().getWaitQuantity());
e.setReProcessQuantity(info.getData().getReProcessQuantity());
e.setReProcessWeight(info.getData().getReProcessWeight());
e.setSurplusQuantity(e.getQuantity()-e.getFinishQuantity()-e.getWaitQuantity());
e.setSurplusWeight(e.getWeight()-e.getFinishWeight()-e.getWaitWeight());
//当完成数量等于总数量且完成重量等于总重量时订单状态置为2
if (e.getQuantity().equals(e.getFinishQuantity())&&e.getWeight().equals(e.getFinishWeight())){
OrderInfo orderInfo = orderInfoService.getById(e.getId());

Wyświetl plik

@ -159,6 +159,9 @@ public class AsynRunTaskService extends BaseService {
runTask.setStatus(3);
runTask.setUpdateTime(LocalDateTime.now());
runTaskServiceBiz.updateById(runTask);
currTask.setStatus(0);
currTaskServiceBiz.updateById(currTask);
logger.info("===执行任务:" + currTaskId + " ,车辆搬运任务,车辆:" + vehicleId + " ,起点:" + startPoint + " ,终点:" + endPoint + "任务执行失败===");
logger.info("任务 " + currTask.getTaskCode() + " 车辆从起点"+startPoint+"台到加工炉过程中失败。");
webSocketServer.sendtoAll("任务 " + currTask.getTaskCode() + " 车辆从起点"+startPoint+"台到加工炉过程中失败。");

Wyświetl plik

@ -195,10 +195,14 @@ public class RunTaskUtils {
*/
public R runTaskForOutKiln(Long kilnId) throws IOException {
//查询正在该工业炉加工的currTask
CurrTask currTask = currTaskServiceBiz.getOne(new QueryWrapper<CurrTask>()
List<CurrTask> currTaskList = currTaskServiceBiz.list(new QueryWrapper<CurrTask>()
.eq("is_in", 1)
.eq("status", 1)
.eq("kiln_id", kilnId));
.eq("kiln_id", kilnId).orderByAsc(CurrTask.BEGIN_TIME));
if (currTaskList.size()==0){
return R.failed();
}
CurrTask currTask = currTaskList.get(0);
//查询是否为自动任务
if (currTask.getIsAuto() == 1) {
logger.info(currTask.getId() + "为自动任务");

Wyświetl plik

@ -156,4 +156,17 @@ public class OrderInfoVo extends BaseVo implements PageVo.ConvertVo {
@ApiModelProperty(value = "返工数量")
private Float reProcessQuantity;
/**
* 剩余重量
*/
@ApiModelProperty(value = "返工重量")
private Float surplusWeight;
/**
* 剩余数量
*/
@ApiModelProperty(value = "返工数量")
private Float surplusQuantity;
}