liweidong
张乾翔 1 week 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; 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; 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<BsEpciuInspectionPointExcel> list = ExcelUtil.read(file, BsEpciuInspectionPointExcel.class);
list.forEach(noticeExcel -> { 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); BsEpciuInspectionPointEntity notice = BeanUtil.copy(noticeExcel, BsEpciuInspectionPointEntity.class);
noticeList.add(notice); noticeList.add(notice);
}); });
// R checkR = ExcelExtUtil.importExcelCheck(file); // R checkR = ExcelExtUtil.importExcelCheck(file);
// if (checkR != null) { // if (checkR != null) {
// return checkR; // return checkR;

@ -193,6 +193,15 @@ public class BsSafeInspectionPointController {
List<BsSafeInspectionPointEntity> importList = ExcelUtil.read( List<BsSafeInspectionPointEntity> importList = ExcelUtil.read(
file, 0, 1, BsSafeInspectionPointEntity.class 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)); return R.status(bsSafeInspectionPointService.saveBatch(importList));
} }
/** /**

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

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

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

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

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

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

Loading…
Cancel
Save