liweidong
张乾翔 1 day ago
parent 491d7916f3
commit 6f57cd0431
  1. 6
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/controller/BsEpciuInspectionPointController.java
  2. 9
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/controller/BsSafeInspectionPointController.java
  3. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/excel/BsEpciuInspectionPointExcel.java
  4. 8
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/mapper/EpciuInspectionPointMapper.xml
  5. 12
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/mapper/EpciuPatrolInspectionMapper.xml
  6. 8
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/mapper/SafeInspectionPointMapper.xml
  7. 12
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/mapper/SafePatrolInspectionMapper.xml
  8. 15
      blade-service/blade-desk/src/main/java/org/springblade/desk/energy/pojo/entity/BsSafeInspectionPointEntity.java
  9. BIN
      blade-service/blade-desk/src/main/resources/Excel/QA/环保巡检点配置导入模板.xls

@ -25,6 +25,7 @@
*/
package org.springblade.desk.energy.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@ -188,11 +189,14 @@ public class BsEpciuInspectionPointController extends BladeController {
List<BsEpciuInspectionPointExcel> list = ExcelUtil.read(file, BsEpciuInspectionPointExcel.class);
list.forEach(noticeExcel -> {
if (cn.hutool.core.bean.BeanUtil.isEmpty(noticeExcel) || StrUtil.isEmpty(noticeExcel.getInsNum())
|| noticeExcel.getInsNum().contains("注")){
return;
}
BsEpciuInspectionPointEntity notice = BeanUtil.copy(noticeExcel, BsEpciuInspectionPointEntity.class);
noticeList.add(notice);
});
// R checkR = ExcelExtUtil.importExcelCheck(file);
// if (checkR != null) {
// return checkR;

@ -193,6 +193,15 @@ public class BsSafeInspectionPointController {
List<BsSafeInspectionPointEntity> importList = ExcelUtil.read(
file, 0, 1, BsSafeInspectionPointEntity.class
);
// 过滤空行和说明文字行(包含"注"字符的行)
importList = importList.stream()
.filter(item -> item != null
&& item.getInsNum() != null
&& !item.getInsNum().trim().isEmpty()
&& !item.getInsNum().contains("注"))
.toList();
return R.status(bsSafeInspectionPointService.saveBatch(importList));
}
/**

@ -83,7 +83,7 @@ public class BsEpciuInspectionPointExcel implements Serializable {
* 巡检点类型
*/
@ColumnWidth(20)
@ExcelProperty("巡检点类型")
@ExcelProperty("巡检点类型(1为废水;2为废气)")
private String insType;
/**
* 巡检周期

@ -25,11 +25,11 @@
select * from BS_EPCIU_INSPECTION_POINT n
<where>
n.is_deleted = 0
<if test="bsEpciuInspectionPoint.insNum!=null">
and n.INS_NUM = #{bsEpciuInspectionPoint.insNum}
<if test="bsEpciuInspectionPoint.insNum!=null and bsEpciuInspectionPoint.insNum!=''">
and n.INS_NUM like '%' || #{bsEpciuInspectionPoint.insNum} || '%'
</if>
<if test="bsEpciuInspectionPoint.insSite!=null">
and n.INS_SITE = #{bsEpciuInspectionPoint.insSite}
<if test="bsEpciuInspectionPoint.insSite!=null and bsEpciuInspectionPoint.insSite!=''">
and n.INS_SITE like '%' || #{bsEpciuInspectionPoint.insSite} || '%'
</if>
<if test="bsEpciuInspectionPoint.insType!=null">
and n.INS_TYPE = #{bsEpciuInspectionPoint.insType}

@ -33,17 +33,17 @@
<if test="bsEpciuPatrolInspection.taskStatus!=null">
and n.TASK_STATUS = #{bsEpciuPatrolInspection.taskStatus}
</if>
<if test="bsEpciuPatrolInspection.insNum!=null">
and n.INS_NUM = #{bsEpciuPatrolInspection.insNum}
<if test="bsEpciuPatrolInspection.insNum!=null and bsEpciuPatrolInspection.insNum!=''">
and n.INS_NUM like '%' || #{bsEpciuPatrolInspection.insNum} || '%'
</if>
<if test="bsEpciuPatrolInspection.insSite!=null">
and n.INS_SITE = #{bsEpciuPatrolInspection.insSite}
<if test="bsEpciuPatrolInspection.insSite!=null and bsEpciuPatrolInspection.insSite!=''">
and n.INS_SITE like '%' || #{bsEpciuPatrolInspection.insSite} || '%'
</if>
<if test="bsEpciuPatrolInspection.insType!=null">
and n.INS_TYPE = #{bsEpciuPatrolInspection.insType}
</if>
<if test="bsEpciuPatrolInspection.insMan!=null">
and n.INS_MAN = #{bsEpciuPatrolInspection.insMan}
<if test="bsEpciuPatrolInspection.insMan!=null and bsEpciuPatrolInspection.insMan!=''">
and n.INS_MAN like '%' || #{bsEpciuPatrolInspection.insMan} || '%'
</if>
<if test="bsEpciuPatrolInspection.insType!=null">
and n.INS_TYPE = #{bsEpciuPatrolInspection.insType}

@ -23,11 +23,11 @@
select * from BS_SAFE_INSPECTION_POINT n
<where>
n.is_deleted = 0
<if test="bsSafeInspectionPoint.insNum!=null">
and n.ins_num = #{bsSafeInspectionPoint.insNum}
<if test="bsSafeInspectionPoint.insNum!=null and bsSafeInspectionPoint.insNum!=''">
and n.ins_num like '%' || #{bsSafeInspectionPoint.insNum} || '%'
</if>
<if test="bsSafeInspectionPoint.insSite!=null">
and n.ins_site = #{bsSafeInspectionPoint.insSite}
<if test="bsSafeInspectionPoint.insSite!=null and bsSafeInspectionPoint.insSite!=''">
and n.ins_site like '%' || #{bsSafeInspectionPoint.insSite} || '%'
</if>
</where>
</select>

@ -29,14 +29,14 @@
select * from BS_SAFE_PATROL_INSPECTION n
<where>
n.is_deleted = 0
<if test="bsSafePatrolInspection.insNum!=null">
and n.ins_num = #{bsSafePatrolInspection.insNum}
<if test="bsSafePatrolInspection.insNum!=null and bsSafePatrolInspection.insNum!=''">
and n.ins_num like '%' || #{bsSafePatrolInspection.insNum} || '%'
</if>
<if test="bsSafePatrolInspection.insSite!=null">
and n.ins_site = #{bsSafePatrolInspection.insSite}
<if test="bsSafePatrolInspection.insSite!=null and bsSafePatrolInspection.insSite!=''">
and n.ins_site like '%' || #{bsSafePatrolInspection.insSite} || '%'
</if>
<if test="bsSafePatrolInspection.insMan!=null">
and n.INS_MAN = #{bsSafePatrolInspection.insMan}
<if test="bsSafePatrolInspection.insMan!=null and bsSafePatrolInspection.insMan!=''">
and n.INS_MAN like '%' || #{bsSafePatrolInspection.insMan} || '%'
</if>
<if test="bsSafePatrolInspection.taskStatus!=null">
and n.TASK_STATUS = #{bsSafePatrolInspection.taskStatus}

@ -59,14 +59,19 @@ public class BsSafeInspectionPointEntity extends BaseEntity {
/**
* 巡检点编号
*/
@Schema(description = "巡点编号")
@Schema(description = "巡点编号")
private String insNum;
/**
* 巡检点位置
*/
@Schema(description = "巡点位置")
@Schema(description = "巡点位置")
private String insSite;
/**
* 备注
*/
@Schema(description = "备注")
private String memo;
/**
* 巡检器
*/
@ -85,11 +90,7 @@ public class BsSafeInspectionPointEntity extends BaseEntity {
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@Schema(description = "上次检验日期")
private Date lastInsCycle;
/**
* 备注
*/
@Schema(description = "备注")
private String memo;
@TableField(exist = false)
private String ids;

Loading…
Cancel
Save