瀏覽代碼

点检任务管理,添加点检记录导出功能,模板更新字段修改

huangpeng 8 月之前
父節點
當前提交
5bbcdcd8a1

+ 6 - 6
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/PointCheckServiceImpl.java

@@ -491,7 +491,7 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
         //3.获取点检记录模板
         String fullPath = pointCheckItemService.getExcelTempPath(excelData.getPagePartId(),excelData.getFileTemplateName());
 
-      //  fullPath="C:\\360安全浏览器下载\\"+excelData.getFileTemplateName();
+        fullPath="C:\\360安全浏览器下载\\"+excelData.getFileTemplateName();
         XSSFWorkbook workbook =null;
 
         try {
@@ -596,12 +596,12 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
         sheet.getRow(indexstart+2).getCell(0).setCellValue(pointCheckVo.getCheckitemname()); //设备名称
         sheet.getRow(indexstart+2).getCell(2).setCellValue(pointCheckVo.getCheckitemcode()); //设备编号
         sheet.getRow(indexstart+2).getCell(4).setCellValue(pointCheckVo.getTemplatetypename()); //检查类型
-        sheet.getRow(indexstart+3).getCell(0).setCellValue(pointCheckVo.getCreateusername()); //点检人员
-        sheet.getRow(indexstart+3).getCell(2).setCellValue(pointCheckVo.getChecktime()); // 点检时间
+        sheet.getRow(indexstart+3).getCell(0).setCellValue("点检人:"+(pointCheckVo.getCreateusername()==null?"":pointCheckVo.getCreateusername())); //点检人员
+        sheet.getRow(indexstart+3).getCell(2).setCellValue("点检时间:"+(pointCheckVo.getChecktime()==null?"":pointCheckVo.getChecktimestr())); // 点检时间
         sheet.getRow(indexstart+3).getCell(4).setCellValue(pointCheckVo.getShiftname()); //班次
-        sheet.getRow(indexstart+4).getCell(0).setCellValue(pointCheckVo.getConfirmoruser()); //点检确认人
-        sheet.getRow(indexstart+4).getCell(2).setCellValue("点检时是否停机:"+pointCheckVo.getClosingdownname()==null?"":pointCheckVo.getClosingdownname()); //点检是否停机
-        sheet.getRow(indexstart+4).getCell(4).setCellValue("结果:"+pointCheckVo.getCheckresultname()==null?"":pointCheckVo.getCheckresultname()); //点检结果
+        sheet.getRow(indexstart+4).getCell(0).setCellValue("确认人:"+(pointCheckVo.getConfirmoruser()==null?"":pointCheckVo.getConfirmoruser())); //点检确认人
+        sheet.getRow(indexstart+4).getCell(2).setCellValue("点检时是否停机:"+(pointCheckVo.getClosingdownname()==null?"":pointCheckVo.getClosingdownname())); //点检是否停机
+        sheet.getRow(indexstart+4).getCell(4).setCellValue("结果:"+(pointCheckVo.getCheckresultname()==null?"":pointCheckVo.getCheckresultname())); //点检结果
 
         for (int i = 0; i <7; i++) {
             sheet.getRow(indexstart+5).getCell(i).setCellValue(detailTieleRow.getCell(i).getStringCellValue());

+ 2 - 1
cx-safe-check/cx-save-check-common/src/main/resources/mybatis/PointCheckDao.xml

@@ -10,7 +10,8 @@
         c.NAME AS TEMPLATETYPENAME,
         d.NAME AS SHIFTNAME,
         e.NAME AS CLOSINGDOWNNAME,
-        f.NAME AS CHECKRESULTNAME
+        f.NAME AS CHECKRESULTNAME,
+        DATE_FORMAT(a.CHECKTIME, '%Y-%m-%d %H:%i:%s') CHECKTIMESTR
         FROM
             asp_point_check a
              LEFT JOIN asp_check_items b ON a.CHECKITEMID = b.id and b.DELETED='0'

+ 2 - 0
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/vo/PointCheckVo.java

@@ -40,6 +40,8 @@ public class PointCheckVo extends PointCheckDo {
     private String closingdownname;
     // 点检结果 名称
     private String checkresultname;
+    //点检时间字符串
+    private String checktimestr;
 
 
 }