提交导出问题修改
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -17,20 +17,20 @@ 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;
|
||||||
|
|
||||||
/** 值班日期 */
|
/** 值班日期 */
|
||||||
@Excel(name = "值班日期")
|
@Excel(name = "值班日期")
|
||||||
@ApiModelProperty("值班日期")
|
@ApiModelProperty("值班日期")
|
||||||
private String dutyDate;
|
private String dutyDate;
|
||||||
|
|
||||||
/** 值班人员id */
|
/** 值班人员id */
|
||||||
// @Excel(name = "值班人员id")
|
// @Excel(name = "值班人员id")
|
||||||
@ApiModelProperty("值班人员id")
|
@ApiModelProperty("值班人员id")
|
||||||
private Long onId;
|
private Long onId;
|
||||||
|
|
||||||
/** 值班人员 */
|
/** 值班人员 */
|
||||||
@@ -38,9 +38,13 @@ 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("值班时间段")
|
||||||
private String dutyPeriod;
|
private String dutyPeriod;
|
||||||
|
|
||||||
|
|
||||||
@@ -53,25 +57,41 @@ private static final long serialVersionUID = 1L;
|
|||||||
@ApiModelProperty("替班人员")
|
@ApiModelProperty("替班人员")
|
||||||
private String relief;
|
private String relief;
|
||||||
|
|
||||||
@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;
|
||||||
|
|
||||||
/** 机构id */
|
/** 机构id */
|
||||||
// @Excel(name = "机构id")
|
// @Excel(name = "机构id")
|
||||||
@ApiModelProperty("机构id")
|
@ApiModelProperty("机构id")
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -19,66 +19,79 @@ 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("工单内容")
|
||||||
private String orderContent;
|
private String orderContent;
|
||||||
|
|
||||||
/** 项目名称 */
|
/** 项目名称 */
|
||||||
@Excel(name = "项目名称")
|
@Excel(name = "项目名称")
|
||||||
@ApiModelProperty("项目名称")
|
@ApiModelProperty("项目名称")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
/** 派单时间 */
|
/** 派单时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "派单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "派单时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("派单时间")
|
@ApiModelProperty("派单时间")
|
||||||
private Date assignTime;
|
private Date assignTime;
|
||||||
|
|
||||||
/** 完成时间 */
|
/** 完成时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ApiModelProperty("完成时间")
|
@ApiModelProperty("完成时间")
|
||||||
private Date finishTime;
|
private Date finishTime;
|
||||||
|
|
||||||
/** 完成人 */
|
/** 完成人 */
|
||||||
@Excel(name = "完成人")
|
@Excel(name = "完成人")
|
||||||
@ApiModelProperty("完成人")
|
@ApiModelProperty("完成人")
|
||||||
private String finishBy;
|
private String finishBy;
|
||||||
|
|
||||||
private String respon;
|
private String respon;
|
||||||
|
|
||||||
/** 附件 */
|
/** 附件 */
|
||||||
@Excel(name = "附件")
|
@Excel(name = "附件")
|
||||||
@ApiModelProperty("附件")
|
@ApiModelProperty("附件")
|
||||||
private String annex;
|
private String annex;
|
||||||
|
|
||||||
/** 完成人id */
|
/** 完成人id */
|
||||||
// @Excel(name = "完成人id")
|
// @Excel(name = "完成人id")
|
||||||
@ApiModelProperty("完成人id")
|
@ApiModelProperty("完成人id")
|
||||||
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;
|
||||||
|
|
||||||
/** 工单备注 */
|
/** 工单备注 */
|
||||||
@Excel(name = "工单备注")
|
@Excel(name = "工单备注")
|
||||||
@ApiModelProperty("工单备注")
|
@ApiModelProperty("工单备注")
|
||||||
private String orderRemark;
|
private String orderRemark;
|
||||||
/** 租户id */
|
/** 租户id */
|
||||||
// @Excel(name = "租户id")
|
// @Excel(name = "租户id")
|
||||||
private Long tenantId;
|
private Long tenantId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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());
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user