diff --git a/ruoyi-ui/src/api/project/checkDetection.js b/ruoyi-ui/src/api/project/checkDetection.js new file mode 100644 index 00000000..14bdd303 --- /dev/null +++ b/ruoyi-ui/src/api/project/checkDetection.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询材料送检列表 +export function listCheckDetection(query) { + return request({ + url: '/project/checkDetection/list', + method: 'get', + params: query + }) +} + +// 查询材料送检详细 +export function getCheckDetection(id) { + return request({ + url: '/project/checkDetection/' + id, + method: 'get' + }) +} + +// 新增材料送检 +export function addCheckDetection(data) { + return request({ + url: '/project/checkDetection', + method: 'post', + data: data + }) +} + +// 修改材料送检 +export function updateCheckDetection(data) { + return request({ + url: '/project/checkDetection', + method: 'put', + data: data + }) +} + +// 删除材料送检 +export function delCheckDetection(id) { + return request({ + url: '/project/checkDetection/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/views/project/checkDetection/index.vue b/ruoyi-ui/src/views/project/checkDetection/index.vue new file mode 100644 index 00000000..6701f6f6 --- /dev/null +++ b/ruoyi-ui/src/views/project/checkDetection/index.vue @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.checkTime, '{y}-{m}-{d}') }} + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/project/surProject/index.vue b/ruoyi-ui/src/views/project/surProject/index.vue index e9834e80..8510a4e7 100644 --- a/ruoyi-ui/src/views/project/surProject/index.vue +++ b/ruoyi-ui/src/views/project/surProject/index.vue @@ -446,6 +446,12 @@ v-hasPermi="['project:surProjectAttendance:add']" >今日出勤 + 视频配置 - ({{ form.longitude }},{{ form.latitude }}) - 选择经纬度 - - - - - + ({{ form.longitude }},{{ form.latitude }}) + 选择经纬度 + + + + @@ -783,6 +793,7 @@ + @@ -810,6 +821,7 @@ import insuranceDrawer from "../surProjectInsurance/insuranceDrawer.vue"; import projectCheckingDrawer from "../projectChecking/projectCheckingDrawer.vue"; import materialSealDrawer from "../materialSeal/projectMaterialSealDrawer.vue"; import projectMeasureDrawer from "../projectMeasure/projectMeasureDrawer.vue"; +import videoConfigDrawer from "@/views/project/videoConfig/videoConfigDrawer"; import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数 export default { @@ -829,6 +841,7 @@ export default { projectCheckingDrawer, materialSealDrawer, projectMeasureDrawer, + videoConfigDrawer, }, dicts: [ "sys_check_state", @@ -1075,6 +1088,9 @@ export default { case "handleProjectMaterialSeal": this.$refs.materialSeal.show(row); break; + case "handVideoConfig": + this.$refs.videoConfig.show(row); + break; default: break; } @@ -1195,8 +1211,8 @@ export default { .prj-suprj-edit-dialog { .el-dialog__body { padding-bottom: 0px; - .fi-longitude{ - .el-form-item__content{ + .fi-longitude { + .el-form-item__content { display: flex; } } diff --git a/ruoyi-ui/src/views/project/videoConfig/index.vue b/ruoyi-ui/src/views/project/videoConfig/index.vue index abe70cdd..4c001642 100644 --- a/ruoyi-ui/src/views/project/videoConfig/index.vue +++ b/ruoyi-ui/src/views/project/videoConfig/index.vue @@ -11,19 +11,41 @@ - + + + + + + + + + 搜索 - - - - + + + + + + + - - - + + + + + + + + + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} + + @@ -142,38 +193,29 @@ - - + + - - + + - - + + - - - - - + + - - - - - - 视频通道信息 + 设备通道信息 - + - + - + @@ -233,7 +280,7 @@ import { export default { name: "VideoConfig", - dicts: ["sys_common_isdel"], + dicts: ["project_video_type", "project_video_signal_state", "sys_common_isdel"], data() { return { // 遮罩层 @@ -263,6 +310,8 @@ export default { pageNum: 1, pageSize: 10, projectId: null, + projectName: null, + videoName: null, videoOnlyType: null, videoDvrNumber: null, videoDvrSecurity: null, @@ -275,7 +324,28 @@ export default { // 表单参数 form: {}, // 表单校验 - rules: {}, + rules: { + videoName: [ + { required: true, message: "请输入设备名称", trigger: "blur" }, + { maxlength: 20, message: "设备名称最多20字符", trigger: "blur" }, + ], + videoDvrNumber: [ + { required: true, message: "请输入设备编号", trigger: "blur" }, + { maxlength: 20, message: "设备编号最多20字符", trigger: "blur" }, + ], + videoDvrSecurity: [ + { required: false, message: "请输入DVR信令", trigger: "blur" }, + { maxlength: 200, message: "DVR信令最多200字符", trigger: "blur" }, + ], + signalCode: [ + { required: false, message: "请输入通信密码", trigger: "blur" }, + { maxlength: 200, message: "通信密码最多200字符", trigger: "blur" }, + ], + remark: [ + { required: false, message: "请输入备注", trigger: "blur" }, + { maxlength: 200, message: "备注最多200字符", trigger: "blur" }, + ], + }, }; }, created() { diff --git a/ruoyi-ui/src/views/project/videoConfig/videoConfigDrawer.vue b/ruoyi-ui/src/views/project/videoConfig/videoConfigDrawer.vue index 86fc9234..2bb5da4b 100644 --- a/ruoyi-ui/src/views/project/videoConfig/videoConfigDrawer.vue +++ b/ruoyi-ui/src/views/project/videoConfig/videoConfigDrawer.vue @@ -74,13 +74,13 @@ > - + - + {{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }} - - - - - - - - + + - - + + + + + @@ -172,7 +169,7 @@ - 视频通道信息 + 设备通道信息 - + - + @@ -237,7 +235,7 @@ import { export default { name: "VideoConfig", - dicts: ["project_video_type", "project_video_signal_state", "sys_common_isdel"], + dicts: ["project_video_type", "project_video_signal_state"], data() { return { // 遮罩层 @@ -284,20 +282,24 @@ export default { form: {}, // 表单校验 rules: { + videoName: [ + { required: true, message: "请输入设备名称", trigger: "blur" }, + { maxlength: 20, message: "设备名称最多20字符", trigger: "blur" }, + ], videoDvrNumber: [ - { required: true, message: "请输入视频编号", trigger: "blur" }, - { maxlength: 10, message: "视频编号最多10字符", trigger: "blur" }, + { required: true, message: "请输入设备编号", trigger: "blur" }, + { maxlength: 20, message: "设备编号最多20字符", trigger: "blur" }, ], videoDvrSecurity: [ - { required: false, message: "请输入通讯信令", trigger: "blur" }, - { maxlength: 200, message: "通讯信令最多200字符", trigger: "blur" }, + { required: false, message: "请输入DVR信令", trigger: "blur" }, + { maxlength: 200, message: "DVR信令最多200字符", trigger: "blur" }, ], signalCode: [ { required: false, message: "请输入通讯密码", trigger: "blur" }, { maxlength: 200, message: "通讯密码最多200字符", trigger: "blur" }, ], remark: [ - { required: true, message: "请输入备注", trigger: "blur" }, + { required: false, message: "请输入备注", trigger: "blur" }, { maxlength: 200, message: "备注最多200字符", trigger: "blur" }, ], }, @@ -372,6 +374,8 @@ export default { this.reset(); this.open = true; this.title = "添加视频配置"; + this.form.projectId = this.project.id; + this.form.projectName = this.project.projectName; }, /** 修改按钮操作 */ handleUpdate(row) { diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/SurProjectCheckDetectionController.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/SurProjectCheckDetectionController.java new file mode 100644 index 00000000..dc41b40e --- /dev/null +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/controller/SurProjectCheckDetectionController.java @@ -0,0 +1,104 @@ +package com.yanzhu.jh.project.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.yanzhu.jh.project.domain.SurProjectCheckDetection; +import com.yanzhu.jh.project.service.ISurProjectCheckDetectionService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 材料送检Controller + * + * @author JiangYuQi + * @date 2023-08-26 + */ +@RestController +@RequestMapping("/project/checkDetection") +public class SurProjectCheckDetectionController extends BaseController +{ + @Autowired + private ISurProjectCheckDetectionService surProjectCheckDetectionService; + + /** + * 查询材料送检列表 + */ + @PreAuthorize("@ss.hasPermi('project:checkDetection:list')") + @GetMapping("/list") + public TableDataInfo list(SurProjectCheckDetection surProjectCheckDetection) + { + startPage(); + List list = surProjectCheckDetectionService.selectSurProjectCheckDetectionList(surProjectCheckDetection); + return getDataTable(list); + } + + /** + * 导出材料送检列表 + */ + @PreAuthorize("@ss.hasPermi('project:checkDetection:export')") + @Log(title = "材料送检", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SurProjectCheckDetection surProjectCheckDetection) + { + List list = surProjectCheckDetectionService.selectSurProjectCheckDetectionList(surProjectCheckDetection); + ExcelUtil util = new ExcelUtil(SurProjectCheckDetection.class); + util.exportExcel(response, list, "材料送检数据"); + } + + /** + * 获取材料送检详细信息 + */ + @PreAuthorize("@ss.hasPermi('project:checkDetection:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(surProjectCheckDetectionService.selectSurProjectCheckDetectionById(id)); + } + + /** + * 新增材料送检 + */ + @PreAuthorize("@ss.hasPermi('project:checkDetection:add')") + @Log(title = "材料送检", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SurProjectCheckDetection surProjectCheckDetection) + { + return toAjax(surProjectCheckDetectionService.insertSurProjectCheckDetection(surProjectCheckDetection)); + } + + /** + * 修改材料送检 + */ + @PreAuthorize("@ss.hasPermi('project:checkDetection:edit')") + @Log(title = "材料送检", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SurProjectCheckDetection surProjectCheckDetection) + { + return toAjax(surProjectCheckDetectionService.updateSurProjectCheckDetection(surProjectCheckDetection)); + } + + /** + * 删除材料送检 + */ + @PreAuthorize("@ss.hasPermi('project:checkDetection:remove')") + @Log(title = "材料送检", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(surProjectCheckDetectionService.deleteSurProjectCheckDetectionByIds(ids)); + } +} diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCheckDetection.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCheckDetection.java new file mode 100644 index 00000000..a3c0f0ca --- /dev/null +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectCheckDetection.java @@ -0,0 +1,143 @@ +package com.yanzhu.jh.project.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 材料送检对象 sur_project_check_detection + * + * @author JiangYuQi + * @date 2023-08-26 + */ +public class SurProjectCheckDetection extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 项目主键 */ + @Excel(name = "项目主键") + private Long projectId; + + /** 单位主键 */ + @Excel(name = "单位主键") + private Long deptId; + + /** 送检类型 */ + @Excel(name = "送检类型") + private String checkType; + + /** 送检时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "送检时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date checkTime; + + /** 送检状态 */ + @Excel(name = "送检状态") + private String checkState; + + /** 检测结果 */ + @Excel(name = "检测结果") + private String detectionResult; + + /** 检测报告 */ + @Excel(name = "检测报告") + private String detectionFile; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setProjectId(Long projectId) + { + this.projectId = projectId; + } + + public Long getProjectId() + { + return projectId; + } + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + public Long getDeptId() + { + return deptId; + } + public void setCheckType(String checkType) + { + this.checkType = checkType; + } + + public String getCheckType() + { + return checkType; + } + public void setCheckTime(Date checkTime) + { + this.checkTime = checkTime; + } + + public Date getCheckTime() + { + return checkTime; + } + public void setCheckState(String checkState) + { + this.checkState = checkState; + } + + public String getCheckState() + { + return checkState; + } + public void setDetectionResult(String detectionResult) + { + this.detectionResult = detectionResult; + } + + public String getDetectionResult() + { + return detectionResult; + } + public void setDetectionFile(String detectionFile) + { + this.detectionFile = detectionFile; + } + + public String getDetectionFile() + { + return detectionFile; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("projectId", getProjectId()) + .append("deptId", getDeptId()) + .append("checkType", getCheckType()) + .append("checkTime", getCheckTime()) + .append("checkState", getCheckState()) + .append("detectionResult", getDetectionResult()) + .append("detectionFile", getDetectionFile()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectVideoConfig.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectVideoConfig.java index 9f215012..72136b3a 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectVideoConfig.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/domain/SurProjectVideoConfig.java @@ -23,6 +23,10 @@ public class SurProjectVideoConfig extends BaseEntity @Excel(name = "项目主键") private Long projectId; + /** 视频名称 */ + @Excel(name = "视频名称") + private String videoName; + /** 视频类型 */ @Excel(name = "视频类型") private String videoOnlyType; @@ -37,7 +41,7 @@ public class SurProjectVideoConfig extends BaseEntity /** 通道数量 */ @Excel(name = "通道数量") - private Long videoPassageCount; + private int videoPassageCount; /** 通信类型 */ @Excel(name = "通信类型") @@ -105,12 +109,13 @@ public class SurProjectVideoConfig extends BaseEntity { return videoDvrSecurity; } - public void setVideoPassageCount(Long videoPassageCount) + + public void setVideoPassageCount(int videoPassageCount) { this.videoPassageCount = videoPassageCount; } - public Long getVideoPassageCount() + public int getVideoPassageCount() { return videoPassageCount; } @@ -169,11 +174,20 @@ public class SurProjectVideoConfig extends BaseEntity this.projectName = projectName; } + public String getVideoName() { + return videoName; + } + + public void setVideoName(String videoName) { + this.videoName = videoName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("projectId", getProjectId()) + .append("videoName", getVideoName()) .append("videoOnlyType", getVideoOnlyType()) .append("videoDvrNumber", getVideoDvrNumber()) .append("videoDvrSecurity", getVideoDvrSecurity()) diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectCheckDetectionMapper.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectCheckDetectionMapper.java new file mode 100644 index 00000000..f2054a83 --- /dev/null +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/mapper/SurProjectCheckDetectionMapper.java @@ -0,0 +1,61 @@ +package com.yanzhu.jh.project.mapper; + +import java.util.List; +import com.yanzhu.jh.project.domain.SurProjectCheckDetection; + +/** + * 材料送检Mapper接口 + * + * @author JiangYuQi + * @date 2023-08-26 + */ +public interface SurProjectCheckDetectionMapper +{ + /** + * 查询材料送检 + * + * @param id 材料送检主键 + * @return 材料送检 + */ + public SurProjectCheckDetection selectSurProjectCheckDetectionById(Long id); + + /** + * 查询材料送检列表 + * + * @param surProjectCheckDetection 材料送检 + * @return 材料送检集合 + */ + public List selectSurProjectCheckDetectionList(SurProjectCheckDetection surProjectCheckDetection); + + /** + * 新增材料送检 + * + * @param surProjectCheckDetection 材料送检 + * @return 结果 + */ + public int insertSurProjectCheckDetection(SurProjectCheckDetection surProjectCheckDetection); + + /** + * 修改材料送检 + * + * @param surProjectCheckDetection 材料送检 + * @return 结果 + */ + public int updateSurProjectCheckDetection(SurProjectCheckDetection surProjectCheckDetection); + + /** + * 删除材料送检 + * + * @param id 材料送检主键 + * @return 结果 + */ + public int deleteSurProjectCheckDetectionById(Long id); + + /** + * 批量删除材料送检 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSurProjectCheckDetectionByIds(Long[] ids); +} diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/ISurProjectCheckDetectionService.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/ISurProjectCheckDetectionService.java new file mode 100644 index 00000000..173fc8bc --- /dev/null +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/ISurProjectCheckDetectionService.java @@ -0,0 +1,61 @@ +package com.yanzhu.jh.project.service; + +import java.util.List; +import com.yanzhu.jh.project.domain.SurProjectCheckDetection; + +/** + * 材料送检Service接口 + * + * @author JiangYuQi + * @date 2023-08-26 + */ +public interface ISurProjectCheckDetectionService +{ + /** + * 查询材料送检 + * + * @param id 材料送检主键 + * @return 材料送检 + */ + public SurProjectCheckDetection selectSurProjectCheckDetectionById(Long id); + + /** + * 查询材料送检列表 + * + * @param surProjectCheckDetection 材料送检 + * @return 材料送检集合 + */ + public List selectSurProjectCheckDetectionList(SurProjectCheckDetection surProjectCheckDetection); + + /** + * 新增材料送检 + * + * @param surProjectCheckDetection 材料送检 + * @return 结果 + */ + public int insertSurProjectCheckDetection(SurProjectCheckDetection surProjectCheckDetection); + + /** + * 修改材料送检 + * + * @param surProjectCheckDetection 材料送检 + * @return 结果 + */ + public int updateSurProjectCheckDetection(SurProjectCheckDetection surProjectCheckDetection); + + /** + * 批量删除材料送检 + * + * @param ids 需要删除的材料送检主键集合 + * @return 结果 + */ + public int deleteSurProjectCheckDetectionByIds(Long[] ids); + + /** + * 删除材料送检信息 + * + * @param id 材料送检主键 + * @return 结果 + */ + public int deleteSurProjectCheckDetectionById(Long id); +} diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectCheckDetectionServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectCheckDetectionServiceImpl.java new file mode 100644 index 00000000..828b9522 --- /dev/null +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectCheckDetectionServiceImpl.java @@ -0,0 +1,98 @@ +package com.yanzhu.jh.project.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.yanzhu.jh.project.mapper.SurProjectCheckDetectionMapper; +import com.yanzhu.jh.project.domain.SurProjectCheckDetection; +import com.yanzhu.jh.project.service.ISurProjectCheckDetectionService; +import com.ruoyi.common.utils.SecurityUtils; +/** + * 材料送检Service业务层处理 + * + * @author JiangYuQi + * @date 2023-08-26 + */ +@Service +public class SurProjectCheckDetectionServiceImpl implements ISurProjectCheckDetectionService +{ + @Autowired + private SurProjectCheckDetectionMapper surProjectCheckDetectionMapper; + + /** + * 查询材料送检 + * + * @param id 材料送检主键 + * @return 材料送检 + */ + @Override + public SurProjectCheckDetection selectSurProjectCheckDetectionById(Long id) + { + return surProjectCheckDetectionMapper.selectSurProjectCheckDetectionById(id); + } + + /** + * 查询材料送检列表 + * + * @param surProjectCheckDetection 材料送检 + * @return 材料送检 + */ + @Override + public List selectSurProjectCheckDetectionList(SurProjectCheckDetection surProjectCheckDetection) + { + return surProjectCheckDetectionMapper.selectSurProjectCheckDetectionList(surProjectCheckDetection); + } + + /** + * 新增材料送检 + * + * @param surProjectCheckDetection 材料送检 + * @return 结果 + */ + @Override + public int insertSurProjectCheckDetection(SurProjectCheckDetection surProjectCheckDetection) + { + surProjectCheckDetection.setCreateBy(SecurityUtils.getUsername()); + surProjectCheckDetection.setCreateTime(DateUtils.getNowDate()); + return surProjectCheckDetectionMapper.insertSurProjectCheckDetection(surProjectCheckDetection); + } + + /** + * 修改材料送检 + * + * @param surProjectCheckDetection 材料送检 + * @return 结果 + */ + @Override + public int updateSurProjectCheckDetection(SurProjectCheckDetection surProjectCheckDetection) + { + surProjectCheckDetection.setUpdateBy(SecurityUtils.getUsername()); + surProjectCheckDetection.setUpdateTime(DateUtils.getNowDate()); + return surProjectCheckDetectionMapper.updateSurProjectCheckDetection(surProjectCheckDetection); + } + + /** + * 批量删除材料送检 + * + * @param ids 需要删除的材料送检主键 + * @return 结果 + */ + @Override + public int deleteSurProjectCheckDetectionByIds(Long[] ids) + { + return surProjectCheckDetectionMapper.deleteSurProjectCheckDetectionByIds(ids); + } + + /** + * 删除材料送检信息 + * + * @param id 材料送检主键 + * @return 结果 + */ + @Override + public int deleteSurProjectCheckDetectionById(Long id) + { + return surProjectCheckDetectionMapper.deleteSurProjectCheckDetectionById(id); + } +} diff --git a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectVideoConfigServiceImpl.java b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectVideoConfigServiceImpl.java index 26544a75..883207c5 100644 --- a/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectVideoConfigServiceImpl.java +++ b/yanzhu-jh/src/main/java/com/yanzhu/jh/project/service/impl/SurProjectVideoConfigServiceImpl.java @@ -1,6 +1,8 @@ package com.yanzhu.jh.project.service.impl; import java.util.List; + +import com.ruoyi.common.enums.PublicStateEnum; import com.ruoyi.common.utils.DateUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -58,6 +60,8 @@ public class SurProjectVideoConfigServiceImpl implements ISurProjectVideoConfigS @Override public int insertSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig) { + surProjectVideoConfig.setVideoPassageCount(surProjectVideoConfig.getSurProjectVideoPassageList().size()); + surProjectVideoConfig.setIsDel(PublicStateEnum.OK.getCode()); surProjectVideoConfig.setCreateBy(SecurityUtils.getUsername()); surProjectVideoConfig.setCreateTime(DateUtils.getNowDate()); int rows = surProjectVideoConfigMapper.insertSurProjectVideoConfig(surProjectVideoConfig); @@ -75,6 +79,8 @@ public class SurProjectVideoConfigServiceImpl implements ISurProjectVideoConfigS @Override public int updateSurProjectVideoConfig(SurProjectVideoConfig surProjectVideoConfig) { + + surProjectVideoConfig.setVideoPassageCount(surProjectVideoConfig.getSurProjectVideoPassageList().size()); surProjectVideoConfig.setUpdateBy(SecurityUtils.getUsername()); surProjectVideoConfig.setUpdateTime(DateUtils.getNowDate()); surProjectVideoConfigMapper.deleteSurProjectVideoPassageByVideoId(surProjectVideoConfig.getId()); @@ -125,6 +131,7 @@ public class SurProjectVideoConfigServiceImpl implements ISurProjectVideoConfigS for (SurProjectVideoPassage surProjectVideoPassage : surProjectVideoPassageList) { surProjectVideoPassage.setVideoId(id); + surProjectVideoPassage.setVideoDvrNumber(surProjectVideoConfig.getVideoDvrNumber()); list.add(surProjectVideoPassage); } if (list.size() > 0) diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectCheckDetectionMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectCheckDetectionMapper.xml new file mode 100644 index 00000000..700e1a82 --- /dev/null +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectCheckDetectionMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + select id, project_id, dept_id, check_type, check_time, check_state, detection_result, detection_file, create_by, create_time, update_by, update_time, remark from sur_project_check_detection + + + + + + and project_id = #{projectId} + and dept_id = #{deptId} + and check_type = #{checkType} + and check_time between #{params.beginCheckTime} and #{params.endCheckTime} + and check_state = #{checkState} + and detection_result = #{detectionResult} + and detection_file = #{detectionFile} + + + + + + where id = #{id} + + + + insert into sur_project_check_detection + + project_id, + dept_id, + check_type, + check_time, + check_state, + detection_result, + detection_file, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{projectId}, + #{deptId}, + #{checkType}, + #{checkTime}, + #{checkState}, + #{detectionResult}, + #{detectionFile}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sur_project_check_detection + + project_id = #{projectId}, + dept_id = #{deptId}, + check_type = #{checkType}, + check_time = #{checkTime}, + check_state = #{checkState}, + detection_result = #{detectionResult}, + detection_file = #{detectionFile}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from sur_project_check_detection where id = #{id} + + + + delete from sur_project_check_detection where id in + + #{id} + + + \ No newline at end of file diff --git a/yanzhu-jh/src/main/resources/mapper/project/SurProjectVideoConfigMapper.xml b/yanzhu-jh/src/main/resources/mapper/project/SurProjectVideoConfigMapper.xml index 32510464..d36c35c2 100644 --- a/yanzhu-jh/src/main/resources/mapper/project/SurProjectVideoConfigMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/project/SurProjectVideoConfigMapper.xml @@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select spvc.id, spvc.project_id, spvc.video_only_type, spvc.video_dvr_number, spvc.video_dvr_security, spvc.video_passage_count, spvc.signal_type, spvc.signal_state, spvc.signal_code, spvc.is_del, spvc.create_by, spvc.create_time, spvc.update_by, spvc.update_time, spvc.remark, sp.projectName from sur_project_video_config spvc + select spvc.id, spvc.project_id, spvc.video_name, spvc.video_only_type, spvc.video_dvr_number, spvc.video_dvr_security, spvc.video_passage_count, spvc.signal_type, spvc.signal_state, spvc.signal_code, spvc.is_del, spvc.create_by, spvc.create_time, spvc.update_by, spvc.update_time, spvc.remark, sp.projectName from sur_project_video_config spvc left join sur_project sp on sp.id=spvc.project_id @@ -46,10 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and spvc.is_del='0' and spvc.project_id = #{projectId} and sp.projectName like concat('%', #{projectName}, '%') + and spvc.video_name like concat('%', #{videoName}, '%') and spvc.video_only_type = #{videoOnlyType} and spvc.video_dvr_number like concat('%', #{videoDvrNumber}, '%') and spvc.video_dvr_security = #{videoDvrSecurity} - and spvc.video_passage_count = #{videoPassageCount} and spvc.signal_type = #{signalType} and spvc.signal_state = #{signalState} and spvc.signal_code = #{signalCode} @@ -65,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select a.id, a.project_id, a.video_only_type, a.video_dvr_number, a.video_dvr_security, a.video_passage_count, a.signal_type, a.signal_state, a.signal_code, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, p.projectName, + select a.id, a.project_id, a.video_name, a.video_only_type, a.video_dvr_number, a.video_dvr_security, a.video_passage_count, a.signal_type, a.signal_state, a.signal_code, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, p.projectName, b.id as sub_id, b.video_id as sub_video_id, b.video_dvr_number as sub_video_dvr_number, b.passage_name as sub_passage_name, b.passage_value as sub_passage_value from sur_project_video_config a left join sur_project p on a.project_id=p.id @@ -77,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into sur_project_video_config project_id, + video_name, video_only_type, video_dvr_number, video_dvr_security, @@ -93,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{projectId}, + #{videoName}, #{videoOnlyType}, #{videoDvrNumber}, #{videoDvrSecurity}, @@ -113,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update sur_project_video_config project_id = #{projectId}, + video_name = #{videoName}, video_only_type = #{videoOnlyType}, video_dvr_number = #{videoDvrNumber}, video_dvr_security = #{videoDvrSecurity},