提交导出问题修改

This commit is contained in:
15666619788
2025-08-06 14:12:12 +08:00
parent de5ac98d5a
commit 68395d7a94
7 changed files with 89 additions and 54 deletions

View File

@@ -58,7 +58,7 @@ public class DutyRecordController extends BaseController
* 导出交班记录列表 * 导出交班记录列表
*/ */
@ApiOperation("导出交班记录列表") @ApiOperation("导出交班记录列表")
@PreAuthorize("@ss.hasPermi('itsm:dutyRecord:export')") // @PreAuthorize("@ss.hasPermi('itsm:dutyRecord:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DutyRecord dutyRecord) public void export(HttpServletResponse response, DutyRecord dutyRecord)
{ {
@@ -117,7 +117,7 @@ public class DutyRecordController extends BaseController
/** /**
* 删除交班记录 * 删除交班记录
*/ */
@PreAuthorize("@ss.hasPermi('itsm:dutyRecord:remove')") // @PreAuthorize("@ss.hasPermi('itsm:dutyRecord:remove')")
@DeleteMapping("/{dutyIds}") @DeleteMapping("/{dutyIds}")
@ApiOperation("删除交班记录") @ApiOperation("删除交班记录")
public AjaxResult remove(@PathVariable Long[] dutyIds) public AjaxResult remove(@PathVariable Long[] dutyIds)

View File

@@ -56,7 +56,7 @@ public class ExampleReportController extends BaseController
* 导出例报管理列表 * 导出例报管理列表
*/ */
@ApiOperation("导出例报管理列表") @ApiOperation("导出例报管理列表")
@PreAuthorize("@ss.hasPermi('itsm:report:export')") // @PreAuthorize("@ss.hasPermi('itsm:report:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, ExampleReport exampleReport) public void export(HttpServletResponse response, ExampleReport exampleReport)
{ {
@@ -70,7 +70,7 @@ public class ExampleReportController extends BaseController
/** /**
* 获取例报管理详细信息 * 获取例报管理详细信息
*/ */
@PreAuthorize("@ss.hasPermi('itsm:report:query')") // @PreAuthorize("@ss.hasPermi('itsm:report:query')")
@GetMapping(value = "/{exampleReportId}") @GetMapping(value = "/{exampleReportId}")
@ApiOperation("获取例报管理详细信息") @ApiOperation("获取例报管理详细信息")
public AjaxResult getInfo(@PathVariable("exampleReportId") Long exampleReportId) public AjaxResult getInfo(@PathVariable("exampleReportId") Long exampleReportId)
@@ -81,7 +81,7 @@ public class ExampleReportController extends BaseController
/** /**
* 新增例报管理 * 新增例报管理
*/ */
@PreAuthorize("@ss.hasPermi('itsm:report:add')") // @PreAuthorize("@ss.hasPermi('itsm:report:add')")
@PostMapping @PostMapping
@ApiOperation("新增例报管理") @ApiOperation("新增例报管理")
public AjaxResult add(@RequestBody ExampleReport exampleReport) public AjaxResult add(@RequestBody ExampleReport exampleReport)
@@ -94,7 +94,7 @@ public class ExampleReportController extends BaseController
/** /**
* 修改例报管理 * 修改例报管理
*/ */
@PreAuthorize("@ss.hasPermi('itsm:report:edit')") // @PreAuthorize("@ss.hasPermi('itsm:report:edit')")
@PutMapping @PutMapping
@ApiOperation("修改例报管理") @ApiOperation("修改例报管理")
public AjaxResult edit(@RequestBody ExampleReport exampleReport) public AjaxResult edit(@RequestBody ExampleReport exampleReport)

View File

@@ -17,8 +17,8 @@ import com.xinda.common.core.domain.BaseEntity;
@ApiModel(value = "DutyRecord",description = "交班记录 duty_record") @ApiModel(value = "DutyRecord",description = "交班记录 duty_record")
@Data @Data
public class DutyRecord extends BaseEntity public class DutyRecord extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 值班id */ /** 值班id */
private Long dutyId; private Long dutyId;
@@ -38,6 +38,10 @@ private static final long serialVersionUID = 1L;
@ApiModelProperty("值班人员") @ApiModelProperty("值班人员")
private String onDuty; private String onDuty;
/** 值班类型 */
@Excel(name = "值班类型")
@ApiModelProperty("值班类型")
private String type;
/** 值班时间段 */ /** 值班时间段 */
@Excel(name = "值班时间段") @Excel(name = "值班时间段")
@ApiModelProperty("值班时间段") @ApiModelProperty("值班时间段")
@@ -56,16 +60,32 @@ private static final long serialVersionUID = 1L;
@Excel(name = "本班情况") @Excel(name = "本班情况")
@ApiModelProperty("本班情况") @ApiModelProperty("本班情况")
private String situation; private String situation;
/**
* 重新定义remark字段添加Excel注解
* 并通过getter/setter与父类字段关联
*/
@Excel(name = "值班备注")
@ApiModelProperty("备注")
private String remark;
/**
* 覆盖父类的getter方法使用子类的remark字段
*/
@Override
public String getRemark() {
return this.remark;
}
/**
/** 值班类型 */ * 覆盖父类的setter方法设置子类的remark字段
@Excel(name = "值班类型") */
@ApiModelProperty("值班类型") @Override
private String type; public void setRemark(String remark) {
this.remark = remark;
}
/** 值班状态 */ /** 值班状态 */
@Excel(name = "值班状态") // @Excel(name = "值班状态", readConverterExp ="0=进行中,1=已完成")
@ApiModelProperty("值班状态") @ApiModelProperty("值班状态")
private String status; private String status;

View File

@@ -78,7 +78,7 @@ private static final long serialVersionUID = 1L;
private String cycle; private String cycle;
/** 巡检状态(默认值为0待进行) */ /** 巡检状态(默认值为0待进行) */
@Excel(name = "巡检状态(默认值为0待进行)") @Excel(name = "巡检状态", readConverterExp ="0=进行中,1=已完成")
@ApiModelProperty("巡检状态(默认值为0待进行)") @ApiModelProperty("巡检状态(默认值为0待进行)")
private String inspectionStatus; private String inspectionStatus;

View File

@@ -19,17 +19,30 @@ import com.xinda.common.core.domain.BaseEntity;
@ApiModel(value = "RepairOrder",description = "维修工单 repair_order") @ApiModel(value = "RepairOrder",description = "维修工单 repair_order")
@Data @Data
public class RepairOrder extends BaseEntity public class RepairOrder extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** ID */ /** ID */
private Long id; private Long id;
/** 工单编号 */ /** 工单编号 */
@Excel(name = "工单编号") // @Excel(name = "工单编号")
@ApiModelProperty("工单编号") @ApiModelProperty("工单编号")
@Excel(name = "工单编号")
private String orderNo; private String orderNo;
/** 带前缀的工单编号仅用于Excel导出 */
// @Excel(name = "工单编号")
// private String excelOrderNo;
//
// // 在setter方法中自动处理前缀
// public void setOrderNo(String orderNo) {
// this.orderNo = orderNo;
// // 自动生成带前缀的导出值
// this.excelOrderNo = "GKB" + (orderNo != null ? orderNo : "");
// }
/** 工单内容 */ /** 工单内容 */
@Excel(name = "工单内容") @Excel(name = "工单内容")
@ApiModelProperty("工单内容") @ApiModelProperty("工单内容")
@@ -70,7 +83,7 @@ private static final long serialVersionUID = 1L;
private Long userId; private Long userId;
/** 工单状态(默认值为0待进行) */ /** 工单状态(默认值为0待进行) */
@Excel(name = "工单状态(默认值为0待进行)") @Excel(name = "工单状态", readConverterExp ="0=待进行,1=进行中,2=已完成,3=已取消")
@ApiModelProperty("工单状态(默认值为0待进行)") @ApiModelProperty("工单状态(默认值为0待进行)")
private String orderStatus; private String orderStatus;

View File

@@ -77,13 +77,13 @@ public class AlertLogController extends BaseController
List<AlertLog> list = alertLogService.selectAlertLogList(alertLog); List<AlertLog> list = alertLogService.selectAlertLogList(alertLog);
//1=提醒通知2=轻微问题3=严重警告 //1=提醒通知2=轻微问题3=严重警告
List<AlertLog> tlist =list.stream() List<AlertLog> tlist =list.stream()
.filter(log -> log.getAlertLevel() == "1") .filter(log -> log.getAlertLevel().equals("1") )
.collect(Collectors.toList()); .collect(Collectors.toList());
List<AlertLog> qlist =list.stream() List<AlertLog> qlist =list.stream()
.filter(log -> log.getAlertLevel() == "2") .filter(log -> log.getAlertLevel().equals("2") )
.collect(Collectors.toList()); .collect(Collectors.toList());
List<AlertLog> ylist =list.stream() List<AlertLog> ylist =list.stream()
.filter(log -> log.getAlertLevel() == "3") .filter(log -> log.getAlertLevel().equals("3"))
.collect(Collectors.toList()); .collect(Collectors.toList());
map.put("tx",tlist.size()); map.put("tx",tlist.size());
map.put("qw",qlist.size()); map.put("qw",qlist.size());

View File

@@ -161,7 +161,9 @@ public class AlertLogServiceImpl implements IAlertLogService {
@Override @Override
public int insertAlertLogBatch(List<AlertLog> alertLogList) { public int insertAlertLogBatch(List<AlertLog> alertLogList) {
int num = 0;
if(alertLogList.size()>0){ if(alertLogList.size()>0){
num = alertLogMapper.insertAlertLogBatch(alertLogList);
Long deptId = sysUserMapper.getDeptUserByUserId(alertLogList.get(0).getUserId()).getDeptId(); Long deptId = sysUserMapper.getDeptUserByUserId(alertLogList.get(0).getUserId()).getDeptId();
if (deptId != null) { if (deptId != null) {
webSocketAlertServer.sendToUser(deptId, JSON.toJSONString(alertLogList)); webSocketAlertServer.sendToUser(deptId, JSON.toJSONString(alertLogList));
@@ -173,7 +175,7 @@ public class AlertLogServiceImpl implements IAlertLogService {
// webSocketAlertServer.sendToUser(deptId, JSON.toJSONString(alertLog)); // webSocketAlertServer.sendToUser(deptId, JSON.toJSONString(alertLog));
// } // }
// } // }
return alertLogMapper.insertAlertLogBatch(alertLogList); return num;
} }
/** /**