rev:增加报警信息
This commit is contained in:
@@ -550,6 +550,30 @@
|
||||
<version>3.0.13</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
|
||||
<!-- itext7 pdf核心 -->
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>kernel</artifactId>
|
||||
<version>7.2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>layout</artifactId>
|
||||
<version>7.2.5</version>
|
||||
</dependency>
|
||||
<!-- 解决中文!必须引入中文字体 -->
|
||||
<dependency>
|
||||
<groupId>com.itextpdf</groupId>
|
||||
<artifactId>font-asian</artifactId>
|
||||
<version>7.2.5</version>
|
||||
</dependency>
|
||||
<!-- hutool继续保留 -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.22</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ public class HkToAcsServiceImpl implements HkToAcsService {
|
||||
instruction.setExecute_device_code(instruction.getStart_point_code());
|
||||
instruction.setUpdate_time(now);
|
||||
instructionService.update(instruction);
|
||||
taskDto.setCar_no(robotCode);
|
||||
taskService.update(taskDto);
|
||||
}
|
||||
//method 回调2、任务完成/结束end
|
||||
else if (StrUtil.equals(method, "end")) {
|
||||
|
||||
@@ -301,6 +301,9 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
//(不需要WCS反馈)
|
||||
if (phase == 0x67) {
|
||||
device = deviceAppService.findDeviceByCode(Integer.toString(arr[27]));
|
||||
} else if (phase == 0x73 || phase == 0x74) {
|
||||
// 电量上报、异常信息上报
|
||||
device = deviceAppService.findDeviceByCode(String.valueOf(agvaddr));
|
||||
} else {
|
||||
device = deviceAppService.findDeviceByCode(Integer.toString(arr[20]));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.basedriver.agv.ndcone;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@@ -22,6 +23,12 @@ import org.nl.acs.device_driver.storage.standard_storage.StandardStorageDeviceDr
|
||||
import org.nl.acs.ext.wms.data.one.feedBackTaskStatus.FeedBackTaskStatusRequest;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
|
||||
import org.nl.acs.history.AgvFaultEnum;
|
||||
import org.nl.acs.history.domain.AcsDeviceErrorLog;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
|
||||
import org.nl.acs.history.service.mapper.AcsDeviceErrorLogMapper;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.impl.InstructionServiceImpl;
|
||||
@@ -32,6 +39,7 @@ import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.acs.task.service.impl.TaskServiceImpl;
|
||||
import org.nl.config.IdUtil;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||
import org.nl.system.service.lucene.LuceneExecuteLogService;
|
||||
@@ -39,9 +47,7 @@ import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
@@ -64,11 +70,13 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
@Autowired
|
||||
TaskService taskserver = SpringContextHolder.getBean(TaskService.class);
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
private final static ThreadPoolExecutor EXECUTOR = ThreadPoolExecutorUtil.getPoll();
|
||||
int agvaddr = 0;
|
||||
int agvaddr_copy = 0;
|
||||
int weight = 0;
|
||||
String device_code = "";
|
||||
String errorCode = "7,8,9,10,11,12";
|
||||
int phase = 0;
|
||||
boolean flag = false;
|
||||
int x = 0; //x坐标
|
||||
@@ -147,6 +155,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
transportOrder = inst.getTask_code();
|
||||
//车辆分配任务时 状态为1 执行中
|
||||
task.setTask_status("1");
|
||||
task.setCar_no(String.valueOf(carno));
|
||||
taskserver.update(task);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + "反馈:" + data);
|
||||
//车辆状态归零
|
||||
@@ -585,6 +594,16 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
// isCharge = true;
|
||||
// }
|
||||
} else if (phase == 0x74) {
|
||||
Set<String> codeSet = new HashSet<>(Arrays.asList(errorCode.split(",")));
|
||||
if (codeSet.contains(String.valueOf(ikey)) && status != ikey) {
|
||||
DeviceErrorLogDto acsDeviceErrorLog = new DeviceErrorLogDto();
|
||||
acsDeviceErrorLog.setError_log_uuid(IdUtil.getStringId());
|
||||
acsDeviceErrorLog.setDevice_code(String.valueOf(agvaddr));
|
||||
acsDeviceErrorLog.setError_code(String.valueOf(ikey));
|
||||
acsDeviceErrorLog.setError_info(AgvFaultEnum.getDescByCode(ikey));
|
||||
acsDeviceErrorLog.setError_time(DateUtil.now());
|
||||
deviceErrorLogService.create(acsDeviceErrorLog);
|
||||
}
|
||||
status = ikey;
|
||||
} else if (phase == 0x75) {
|
||||
is_have = ikey;
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.nl.acs.history;
|
||||
|
||||
public enum AgvFaultEnum {
|
||||
|
||||
FAULT_7(7, "急停触发"),
|
||||
FAULT_8(8, "避障触发"),
|
||||
FAULT_9(9, "货叉防撞开关触发"),
|
||||
FAULT_10(10, "触边触发"),
|
||||
FAULT_11(11, "手动模式"),
|
||||
FAULT_12(12, "导航丢失");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
AgvFaultEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取描述,找不到返回空或者自定义文本
|
||||
*/
|
||||
public static String getDescByCode(Integer code) {
|
||||
for (AgvFaultEnum value : AgvFaultEnum.values()) {
|
||||
if (value.getCode().equals(code)) {
|
||||
return value.getDesc();
|
||||
}
|
||||
}
|
||||
return "未知故障";
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,23 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.itextpdf.kernel.font.PdfFont;
|
||||
import com.itextpdf.kernel.font.PdfFontFactory;
|
||||
import com.itextpdf.kernel.geom.PageSize;
|
||||
import com.itextpdf.kernel.pdf.PdfDocument;
|
||||
import com.itextpdf.kernel.pdf.PdfWriter;
|
||||
import com.itextpdf.layout.Document;
|
||||
import com.itextpdf.layout.element.Cell;
|
||||
import com.itextpdf.layout.element.Paragraph;
|
||||
import com.itextpdf.layout.element.Table;
|
||||
import com.itextpdf.layout.properties.TextAlignment;
|
||||
import com.itextpdf.layout.properties.UnitValue;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -18,6 +31,7 @@ import org.nl.acs.history.domain.AcsDeviceErrorLog;
|
||||
import org.nl.acs.history.service.DeviceErrorLogService;
|
||||
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
|
||||
import org.nl.acs.history.service.mapper.AcsDeviceErrorLogMapper;
|
||||
import org.nl.acs.task.enums.TaskStatusEnum;
|
||||
import org.nl.acs.utils.PageUtil;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.FileUtil;
|
||||
@@ -64,7 +78,7 @@ public class DeviceErrorLogServiceImpl extends CommonServiceImpl<AcsDeviceErrorL
|
||||
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||
String error_code = MapUtil.getStr(whereJson, "error_code");
|
||||
String error_info = MapUtil.getStr(whereJson, "error_info");
|
||||
String start_time = MapUtil.getStr(whereJson, "start_time");
|
||||
String start_time = MapUtil.getStr(whereJson, "begin_time");
|
||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||
LambdaQueryWrapper<AcsDeviceErrorLog> wrapper = new LambdaQueryWrapper<>();
|
||||
if (StrUtil.isNotEmpty(device_code)) {
|
||||
@@ -134,7 +148,7 @@ public class DeviceErrorLogServiceImpl extends CommonServiceImpl<AcsDeviceErrorL
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
/* @Override
|
||||
public void download(List<DeviceErrorLogDto> all, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (DeviceErrorLogDto acsDeviceErrorLog : all) {
|
||||
@@ -146,5 +160,62 @@ public class DeviceErrorLogServiceImpl extends CommonServiceImpl<AcsDeviceErrorL
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void download(List<DeviceErrorLogDto> all, HttpServletResponse response) throws IOException {
|
||||
// 设置响应头【前端文件下载】
|
||||
response.setContentType("application/pdf");
|
||||
String fileName = "AGV报警记录.pdf";
|
||||
fileName = new String(fileName.getBytes("GBK"), "ISO-8859-1");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
|
||||
// 构建PDF,设置【A4横向】核心改动
|
||||
PdfWriter writer = new PdfWriter(response.getOutputStream());
|
||||
PdfDocument pdfDoc = new PdfDocument(writer);
|
||||
// A4横向旋转
|
||||
pdfDoc.setDefaultPageSize(PageSize.A4.rotate());
|
||||
Document document = new Document(pdfDoc);
|
||||
|
||||
// 中文字体
|
||||
PdfFont font = PdfFontFactory.createFont("STSong-Light", "UniGB-UCS2-H", PdfFontFactory.EmbeddingStrategy.PREFER_EMBEDDED);
|
||||
|
||||
// 标题
|
||||
Paragraph title = new Paragraph("AGV报警记录列表")
|
||||
.setFont(font)
|
||||
.setFontSize(14)
|
||||
.setTextAlignment(TextAlignment.CENTER);
|
||||
document.add(title);
|
||||
document.add(new Paragraph("\n"));
|
||||
// 表头
|
||||
String[] headers = {"设备编码", "报警编码", "报警信息", "报警时间"};
|
||||
// 等分列宽,不再使用固定宽度
|
||||
float[] columnWidths = new float[headers.length];
|
||||
Arrays.fill(columnWidths, 1);
|
||||
Table table = new Table(UnitValue.createPercentArray(columnWidths))
|
||||
.useAllAvailableWidth();
|
||||
// 渲染表头
|
||||
for (String header : headers) {
|
||||
Cell cell = new Cell()
|
||||
.add(new Paragraph(header)
|
||||
.setFont(font)
|
||||
.setFontSize(9)
|
||||
.setTextAlignment(TextAlignment.CENTER));
|
||||
table.addCell(cell);
|
||||
}
|
||||
// 渲染数据(空值兜底 + 字体9号)
|
||||
for (DeviceErrorLogDto dto : all) {
|
||||
// 设备编码
|
||||
table.addCell(new Cell().add(new Paragraph(dto.getDevice_code()).setFont(font)));
|
||||
// 报警编码
|
||||
table.addCell(new Cell().add(new Paragraph(dto.getError_code()).setFont(font)));
|
||||
// 报警信息
|
||||
table.addCell(new Cell().add(new Paragraph(dto.getError_info()).setFont(font)));
|
||||
// 报警时间
|
||||
table.addCell(new Cell().add(new Paragraph(dto.getError_time()).setFont(font)));
|
||||
}
|
||||
document.add(table);
|
||||
document.close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,6 +226,9 @@ public class Task extends CommonModel<Task> implements Serializable {
|
||||
/** 时间 */
|
||||
private String oven_time;
|
||||
|
||||
/** 车号 */
|
||||
private String car_no;
|
||||
|
||||
/** 交互字段 */
|
||||
private String interaction_json;
|
||||
|
||||
|
||||
@@ -68,5 +68,16 @@ public enum TaskStatusEnum {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static TaskStatusEnum getByIndex(String index) {
|
||||
if (index == null || index.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
for (TaskStatusEnum status : TaskStatusEnum.values()) {
|
||||
if (status.getIndex().equals(index)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -311,4 +311,9 @@ public class TaskDto implements Serializable {
|
||||
* 行架任务类型
|
||||
*/
|
||||
private String truss_type;
|
||||
|
||||
/**
|
||||
* 车号
|
||||
*/
|
||||
private String car_no;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
@@ -14,6 +15,17 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.itextpdf.kernel.font.PdfFont;
|
||||
import com.itextpdf.kernel.font.PdfFontFactory;
|
||||
import com.itextpdf.kernel.geom.PageSize;
|
||||
import com.itextpdf.kernel.pdf.PdfDocument;
|
||||
import com.itextpdf.kernel.pdf.PdfWriter;
|
||||
import com.itextpdf.layout.Document;
|
||||
import com.itextpdf.layout.element.Cell;
|
||||
import com.itextpdf.layout.element.Paragraph;
|
||||
import com.itextpdf.layout.element.Table;
|
||||
import com.itextpdf.layout.properties.TextAlignment;
|
||||
import com.itextpdf.layout.properties.UnitValue;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.nl.acs.AcsConfig;
|
||||
@@ -309,6 +321,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
String point_code = (String) whereJson.get("point_code");
|
||||
String create_time = (String) whereJson.get("createTime");
|
||||
String end_time = (String) whereJson.get("end_time");
|
||||
String car_no = (String) whereJson.get("car_no");
|
||||
|
||||
IPage<Task> queryPage = PageUtil.toMybatisPage(page);
|
||||
LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -321,6 +334,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
if (!StrUtil.isEmpty(material_type)) {
|
||||
wrapper.eq(Task::getMaterial, material_type);
|
||||
}
|
||||
if (!StrUtil.isEmpty(car_no)) {
|
||||
wrapper.eq(Task::getCar_no, car_no);
|
||||
}
|
||||
if (!StrUtil.isEmpty(status)) {
|
||||
wrapper.eq(Task::getTask_status, status);
|
||||
}
|
||||
@@ -1275,6 +1291,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
String point_code = (String) whereJson.get("point_code");
|
||||
String create_time = (String) whereJson.get("createTime");
|
||||
String end_time = (String) whereJson.get("end_time");
|
||||
String car_no = (String) whereJson.get("car_no");
|
||||
|
||||
LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
|
||||
if (!StrUtil.isEmpty(task_code)) {
|
||||
@@ -1283,6 +1300,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
if (!StrUtil.isEmpty(vehicle_code)) {
|
||||
wrapper.like(Task::getVehicle_code, vehicle_code);
|
||||
}
|
||||
if (!StrUtil.isEmpty(car_no)) {
|
||||
wrapper.like(Task::getCar_no, car_no);
|
||||
}
|
||||
if (!StrUtil.isEmpty(material_type)) {
|
||||
wrapper.eq(Task::getMaterial, material_type);
|
||||
}
|
||||
@@ -1322,7 +1342,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
/* @Override
|
||||
public void downloadTaskLogging(List<JSONObject> taskAndInst, HttpServletResponse response) throws IOException {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (JSONObject jsonObject : taskAndInst) {
|
||||
@@ -1342,6 +1362,83 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
list.add(map);
|
||||
}
|
||||
FileUtil.downloadExcel(list, response);
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public void downloadTaskLogging(List<JSONObject> dataList, HttpServletResponse response) throws IOException {
|
||||
// 设置响应头【前端文件下载】
|
||||
response.setContentType("application/pdf");
|
||||
String fileName = "任务历史记录.pdf";
|
||||
fileName = new String(fileName.getBytes("GBK"), "ISO-8859-1");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
|
||||
// 构建PDF,设置【A4横向】核心改动
|
||||
PdfWriter writer = new PdfWriter(response.getOutputStream());
|
||||
PdfDocument pdfDoc = new PdfDocument(writer);
|
||||
// A4横向旋转
|
||||
pdfDoc.setDefaultPageSize(PageSize.A4.rotate());
|
||||
Document document = new Document(pdfDoc);
|
||||
|
||||
// 中文字体
|
||||
PdfFont font = PdfFontFactory.createFont("STSong-Light", "UniGB-UCS2-H", PdfFontFactory.EmbeddingStrategy.PREFER_EMBEDDED);
|
||||
|
||||
// 标题
|
||||
Paragraph title = new Paragraph("任务历史记录列表")
|
||||
.setFont(font)
|
||||
.setFontSize(14)
|
||||
.setTextAlignment(TextAlignment.CENTER);
|
||||
document.add(title);
|
||||
document.add(new Paragraph("\n"));
|
||||
// 表头
|
||||
String[] headers = {"任务号", "载具号", "任务状态", "任务优先级", "起点", "终点", "车号","备注",
|
||||
"创建人","创建时间","完成时间"
|
||||
};
|
||||
// 等分列宽,不再使用固定宽度
|
||||
float[] columnWidths = new float[headers.length];
|
||||
Arrays.fill(columnWidths, 1);
|
||||
Table table = new Table(UnitValue.createPercentArray(columnWidths))
|
||||
.useAllAvailableWidth();
|
||||
// 渲染表头
|
||||
for (String header : headers) {
|
||||
Cell cell = new Cell()
|
||||
.add(new Paragraph(header)
|
||||
.setFont(font)
|
||||
.setFontSize(9)
|
||||
.setTextAlignment(TextAlignment.CENTER));
|
||||
table.addCell(cell);
|
||||
}
|
||||
// 渲染数据(空值兜底 + 字体9号)
|
||||
for (JSONObject json : dataList) {
|
||||
// 任务号
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("task_code")).setFont(font)));
|
||||
// 载具号
|
||||
String vehicleCode = json.getString("vehicle_code");
|
||||
table.addCell(new Cell().add(new Paragraph(ObjectUtil.isNotEmpty(vehicleCode) ? vehicleCode : "-").setFont(font)));
|
||||
// 任务状态
|
||||
TaskStatusEnum taskStatus = TaskStatusEnum.getByIndex(json.getString("task_status"));
|
||||
table.addCell(new Cell().add(new Paragraph(taskStatus.getName()).setFont(font)));
|
||||
// 任务优先级
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("priority")).setFont(font)));
|
||||
// 起点
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("start_point_code")).setFont(font)));
|
||||
// 终点
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("next_point_code")).setFont(font)));
|
||||
// 车号
|
||||
String car_no = json.getString("car_no");
|
||||
table.addCell(new Cell().add(new Paragraph(ObjectUtil.isNotEmpty(car_no) ? car_no : "-").setFont(font)));
|
||||
// 备注
|
||||
String remark = json.getString("remark");
|
||||
table.addCell(new Cell().add(new Paragraph(ObjectUtil.isNotEmpty(remark) ? remark : "-").setFont(font)));
|
||||
// 创建人
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("create_by")).setFont(font)));
|
||||
// 创建时间
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("create_time")).setFont(font)));
|
||||
// 完成时间
|
||||
table.addCell(new Cell().add(new Paragraph(json.getString("update_time")).setFont(font)));
|
||||
}
|
||||
document.add(table);
|
||||
document.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1360,8 +1457,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
ins.put("priority", task.getPriority());
|
||||
ins.put("start_point_code", task.getStart_point_code());
|
||||
ins.put("next_point_code", task.getNext_point_code());
|
||||
ins.put("matarial", task.getMaterial());
|
||||
ins.put("quantity", task.getQuantity());
|
||||
ins.put("car_no", task.getCar_no());
|
||||
ins.put("remark", task.getRemark());
|
||||
ins.put("create_by", task.getCreate_by());
|
||||
ins.put("create_time", task.getCreate_time());
|
||||
|
||||
Reference in New Issue
Block a user