重要事项及宣传照片,新增和修改的时候同步综合查询表

This commit is contained in:
马三炮 2025-04-03 15:11:23 +08:00
parent 1d55e42154
commit e9048e44c5
17 changed files with 807 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package com.bonus.imgTool.backstage.dao;
import com.bonus.imgTool.backstage.entity.ComprehensiveQueryVo;
import com.bonus.imgTool.backstage.entity.QueryParamDto;
import com.bonus.imgTool.backstage.entity.SynthesisNumVo;
import com.bonus.imgTool.backstage.entity.SynthesisQueryVo;
@ -43,4 +44,8 @@ public interface SynthesisQueryDao {
* @date 2025/4/3 11:16
*/
void collectData(QueryParamDto dto);
void addComprehensiveQuery(ComprehensiveQueryVo comprehensiveQueryVo);
void updateComprehensiveQuery(ComprehensiveQueryVo comprehensiveQueryVo);
}

View File

@ -0,0 +1,161 @@
package com.bonus.imgTool.backstage.entity;
import lombok.Data;
import java.util.Date;
/**
* 综合查询
*/
@Data
public class ComprehensiveQueryVo {
/**
* id
*/
private Long id;
/**
* 工程id
*/
private Long proId;
/**
* 工程名称
*/
private String proName;
/**
* 专业id
*/
private Long majorId;
/**
* 专业名称
*/
private String majorName;
/**
* 工序id
*/
private Long gxId;
/**
* 工序名称
*/
private String gxName;
/**
* 检查人
*/
private String checkUserName;
/**
* 违章时间/检查时间/时间
*/
private Date vioDate;
/**
* 违章地点/检查地点/建设地点
*/
private String vioPlace;
/**
* 违章描述/检查描述
*/
private String vioDesc;
/**
* 整改期限
*/
private Date rectDate;
/**
* 整改人
*/
private String rectUserName;
/**
* 整改时间
*/
private Date rectTime;
/**
* 整改说明
*/
private String rectDesc;
/**
* 整改状态 0.待整改 1.已整改
*/
private String rectStatus;
/**
* 建设前描述
*/
private String buildBeforeDesc;
/**
* 建设中描述
*/
private String buildUnderDesc;
/**
* 恢复后描述
*/
private String buildAfterDesc;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 上传类型1.安全违章2.质量检查3.安全措施落实4.协调照片5.重要事项及宣传照片
*/
private String uploadType;
/**
* 创建人
*/
private Long createUserId;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人姓名
*/
private String createUserName;
/**
* 修改人
*/
private Long updateUserId;
/**
* 修改时间
*/
private Date updateTime;
/**
* 修改人姓名
*/
private String updateUserName;
/**
* 数据来源 1.web 2.app
*/
private String dataSource;
}

View File

@ -1,5 +1,6 @@
package com.bonus.imgTool.backstage.service;
import com.bonus.imgTool.backstage.entity.ComprehensiveQueryVo;
import com.bonus.imgTool.backstage.entity.QueryParamDto;
import com.bonus.imgTool.utils.ServerResponse;
@ -38,4 +39,18 @@ public interface SynthesisQueryService {
* @date 2025/4/3 11:14
*/
ServerResponse collectData(QueryParamDto data);
/**
* 综合查询新增
* @param comprehensiveQueryVo
* @return ServerResponse
*/
void addComprehensiveQuery(ComprehensiveQueryVo comprehensiveQueryVo);
/**
* 综合查询修改
* @param comprehensiveQueryVo
* @return ServerResponse
*/
void updateComprehensiveQuery(ComprehensiveQueryVo comprehensiveQueryVo);
}

View File

@ -1,6 +1,7 @@
package com.bonus.imgTool.backstage.service.impl;
import com.bonus.imgTool.backstage.dao.SynthesisQueryDao;
import com.bonus.imgTool.backstage.entity.ComprehensiveQueryVo;
import com.bonus.imgTool.backstage.entity.QueryParamDto;
import com.bonus.imgTool.backstage.entity.SynthesisNumVo;
import com.bonus.imgTool.backstage.entity.SynthesisQueryVo;
@ -83,4 +84,24 @@ public class SynthesisQueryServiceImpl implements SynthesisQueryService {
return ServerResponse.createErroe("操作失败");
}
}
/**
* 综合查询新增
* @param comprehensiveQueryVo
* @return ServerResponse
*/
@Override
public void addComprehensiveQuery(ComprehensiveQueryVo comprehensiveQueryVo) {
synthesisQueryDao.addComprehensiveQuery(comprehensiveQueryVo);
}
/**
* 综合查询修改
* @param comprehensiveQueryVo
* @return ServerResponse
*/
@Override
public void updateComprehensiveQuery(ComprehensiveQueryVo comprehensiveQueryVo) {
synthesisQueryDao.updateComprehensiveQuery(comprehensiveQueryVo);
}
}

View File

@ -0,0 +1,77 @@
package com.bonus.imgTool.imageUpload.controller;
import com.bonus.imgTool.annotation.DecryptAndVerify;
import com.bonus.imgTool.annotation.LogAnnotation;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterReqVo;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterVo;
import com.bonus.imgTool.imageUpload.service.ImportantMatterService;
import com.bonus.imgTool.system.vo.EncryptedReq;
import com.bonus.imgTool.utils.ServerResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 重要事项及宣传照片
*/
@Slf4j
@RestController
@RequestMapping("/importantMatter")
public class ImportantMatterController {
@Resource
private ImportantMatterService importantMatterService;
/**
* 重要事项及宣传照片--查询
* @param data
* @return
*/
@PostMapping(value = "/getImportantMatterList")
@DecryptAndVerify(decryptedClass = ImportantMatterReqVo.class)
@LogAnnotation(operModul = "安全措施落实-查询", operation = "查询照片", operDesc = "系统级事件",operType="查询")
public ServerResponse getImportantMatterList(EncryptedReq<ImportantMatterReqVo> data) {
return importantMatterService.getImportantMatterList(data.getData());
}
/**
* 重要事项及宣传照片--删除
* @param data
* @return
*/
@PostMapping(value = "/deleteImportantMatter")
@DecryptAndVerify(decryptedClass = ImportantMatterReqVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--删除", operation = "查询照片", operDesc = "系统级事件",operType="查询")
public ServerResponse deleteImportantMatter(EncryptedReq<ImportantMatterReqVo> data) {
return importantMatterService.deleteImportantMatter(data.getData());
}
/**
* 重要事项及宣传照片--新增
* @param data
* @return
*/
@PostMapping(value = "/addImportantMatter")
@DecryptAndVerify(decryptedClass = ImportantMatterVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--新增", operation = "查询照片", operDesc = "系统级事件",operType="查询")
public ServerResponse addImportantMatter(EncryptedReq<ImportantMatterVo> data) {
return importantMatterService.addImportantMatter(data.getData());
}
/**
* 重要事项及宣传照片--修改
* @param data
* @return
*/
@PostMapping(value = "/updateImportantMatter")
@DecryptAndVerify(decryptedClass = ImportantMatterVo.class)
@LogAnnotation(operModul = "重要事项及宣传照片--修改", operation = "查询照片", operDesc = "系统级事件",operType="查询")
public ServerResponse updateImportantMatter(EncryptedReq<ImportantMatterVo> data) {
return importantMatterService.updateImportantMatter(data.getData());
}
}

View File

@ -31,5 +31,5 @@ public class CoordinatePhotoReqVo {
private String keyWord;
private int pageNum = 1;
private int pageSize = 15;
private int pageSize = 10;
}

View File

@ -0,0 +1,36 @@
package com.bonus.imgTool.imageUpload.dto;
import lombok.Data;
@Data
public class ImportantMatterReqVo {
/**
* id
*/
private Long id;
/**
* 工程id
*/
private Long proId;
/**
* 专业id
*/
private Long majorId;
/**
* 工序id
*/
private Long gxId;
/**
* 关键字
*/
private String keyWord;
private int pageNum = 1;
private int pageSize = 10;
}

View File

@ -0,0 +1,102 @@
package com.bonus.imgTool.imageUpload.dto;
import com.bonus.imgTool.system.vo.SysFileResourceVo;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class ImportantMatterVo {
/**
* id
*/
private Long id;
/**
* 工程id
*/
private Long proId;
/**
* 工程名称
*/
private String proName;
/**
* 专业id
*/
private Long majorId;
/**
* 专业名称
*/
private String majorName;
/**
* 工序id
*/
private Long gxId;
/**
* 工序名称
*/
private String gxName;
/**
* 时间
*/
private Date time;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 创建人
*/
private Long createUserId;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人姓名
*/
private String createUserName;
/**
* 修改人
*/
private Long updateUserId;
/**
* 修改时间
*/
private Date updateTime;
/**
* 修改人姓名
*/
private String updateUserName;
/**
* 数据来源 1.web 2.app
*/
private String dataSource;
/**
* 图片信息
*/
private List<SysFileResourceVo> sysFileResourceList;
}

View File

@ -31,5 +31,5 @@ public class SafetyMeasuresReqVo {
private String keyWord;
private int pageNum = 1;
private int pageSize = 15;
private int pageSize = 10;
}

View File

@ -0,0 +1,19 @@
package com.bonus.imgTool.imageUpload.mapper;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterReqVo;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterVo;
import java.util.List;
public interface ImportantMatterMapper {
List<ImportantMatterVo> getImportantMatterList(ImportantMatterReqVo data);
void deleteImportantMatter(ImportantMatterReqVo data);
void addImportantMatter(ImportantMatterVo data);
void updateImportantMatter(ImportantMatterVo data);
}

View File

@ -0,0 +1,15 @@
package com.bonus.imgTool.imageUpload.service;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterReqVo;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterVo;
import com.bonus.imgTool.utils.ServerResponse;
public interface ImportantMatterService {
ServerResponse getImportantMatterList(ImportantMatterReqVo data);
ServerResponse deleteImportantMatter(ImportantMatterReqVo data);
ServerResponse addImportantMatter(ImportantMatterVo data);
ServerResponse updateImportantMatter(ImportantMatterVo data);
}

View File

@ -1,6 +1,8 @@
package com.bonus.imgTool.imageUpload.service.impl;
import com.bonus.imgTool.backstage.entity.ComprehensiveQueryVo;
import com.bonus.imgTool.backstage.service.SynthesisQueryService;
import com.bonus.imgTool.imageUpload.dto.CoordinatePhotoReqVo;
import com.bonus.imgTool.imageUpload.dto.CoordinatePhotoVo;
import com.bonus.imgTool.imageUpload.mapper.CoordinatePhotoMapper;
@ -12,6 +14,7 @@ import com.bonus.imgTool.utils.UserUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -29,6 +32,10 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
@Resource
private SysFileResourceService sysFileResourceService;
@Resource
private SynthesisQueryService synthesisQueryService;
/**
* 协调照片--查询
* @param data
@ -69,6 +76,11 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
}
}
/**
* 协调照片--新增
* @param data
* @return
*/
@Override
public ServerResponse addCoordinatePhoto(CoordinatePhotoVo data) {
try {
@ -81,6 +93,9 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getNewUser(): null;
sysFileResourceService.addSysFileResource(sysFileResourceVo,data.getId(),"4",CreateUserId,CreateUserName);
}
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("删除失败");
@ -88,6 +103,11 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
return ServerResponse.createSuccess();
}
/**
* 协调照片--修改
* @param data
* @return
*/
@Override
public ServerResponse updateCoordinatePhoto(CoordinatePhotoVo data) {
try {
@ -102,6 +122,9 @@ public class CoordinatePhotoServiceImpl implements CoordinatePhotoService {
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getNewUser(): null;
sysFileResourceService.addSysFileResource(sysFileResourceVo,data.getId(),"4",CreateUserId,CreateUserName);
}
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("修改失败");

View File

@ -0,0 +1,135 @@
package com.bonus.imgTool.imageUpload.service.impl;
import com.bonus.imgTool.backstage.entity.ComprehensiveQueryVo;
import com.bonus.imgTool.backstage.service.SynthesisQueryService;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterReqVo;
import com.bonus.imgTool.imageUpload.dto.ImportantMatterVo;
import com.bonus.imgTool.imageUpload.mapper.ImportantMatterMapper;
import com.bonus.imgTool.imageUpload.service.ImportantMatterService;
import com.bonus.imgTool.system.service.SysFileResourceService;
import com.bonus.imgTool.system.vo.SysFileResourceVo;
import com.bonus.imgTool.utils.ServerResponse;
import com.bonus.imgTool.utils.UserUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
@Service
@Slf4j
@Transactional
public class ImportantMatterServiceImpl implements ImportantMatterService {
@Resource
private ImportantMatterMapper importantMatterMapper;
@Resource
private SysFileResourceService sysFileResourceService;
@Resource
private SynthesisQueryService synthesisQueryService;
/**
* 重要事项及宣传照片--查询
* @param data
* @return
*/
@Override
public ServerResponse getImportantMatterList(ImportantMatterReqVo data) {
PageHelper.startPage(data.getPageNum(), data.getPageSize());
try {
List<ImportantMatterVo> list = importantMatterMapper.getImportantMatterList(data);
//获取图片信息
for (ImportantMatterVo importantMatterVo : list) {
List<SysFileResourceVo> sysFileResourceList = sysFileResourceService.getSysFileResourceList(importantMatterVo.getId());
importantMatterVo.setSysFileResourceList(sysFileResourceList);
}
PageInfo<ImportantMatterVo> pageInfo = new PageInfo<>(list);
return ServerResponse.createSuccess(pageInfo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("查询失败");
}
}
/**
* 重要事项及宣传照片--删除
* @param data
* @return
*/
@Override
public ServerResponse deleteImportantMatter(ImportantMatterReqVo data) {
try {
importantMatterMapper.deleteImportantMatter(data);
sysFileResourceService.deleteFileResource(data.getId());
return ServerResponse.createSuccess();
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("删除失败");
}
}
/**
* 重要事项及宣传照片--新增
* @param data
* @return
*/
@Override
public ServerResponse addImportantMatter(ImportantMatterVo data) {
try {
//保存
importantMatterMapper.addImportantMatter(data);
//保存附件
List<SysFileResourceVo> sysFileResourceList = data.getSysFileResourceList();
for (SysFileResourceVo sysFileResourceVo: sysFileResourceList ) {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getNewUser(): null;
sysFileResourceService.addSysFileResource(sysFileResourceVo,data.getId(),"4",CreateUserId,CreateUserName);
}
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("删除失败");
}
return ServerResponse.createSuccess();
}
/**
* 重要事项及宣传照片--修改
* @param data
* @return
*/
@Override
public ServerResponse updateImportantMatter(ImportantMatterVo data) {
try {
Long CreateUserId = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getId() : 0;
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getNewUser(): null;
//修改
data.setUpdateUserId(CreateUserId);
data.setUpdateUserName(CreateUserName);
importantMatterMapper.updateImportantMatter(data);
//附件先删除后新增
sysFileResourceService.deleteFileResource(data.getId());
//保存附件
List<SysFileResourceVo> sysFileResourceList = data.getSysFileResourceList();
for (SysFileResourceVo sysFileResourceVo: sysFileResourceList ) {
sysFileResourceService.addSysFileResource(sysFileResourceVo,data.getId(),"4",CreateUserId,CreateUserName);
}
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("修改失败");
}
return ServerResponse.createSuccess();
}
}

View File

@ -1,6 +1,8 @@
package com.bonus.imgTool.imageUpload.service.impl;
import com.bonus.imgTool.Enum.FileSourceTypeEnum;
import com.bonus.imgTool.backstage.entity.ComprehensiveQueryVo;
import com.bonus.imgTool.backstage.service.SynthesisQueryService;
import com.bonus.imgTool.imageUpload.dto.SafetyMeasuresReqVo;
import com.bonus.imgTool.imageUpload.dto.SafetyMeasuresVo;
import com.bonus.imgTool.imageUpload.mapper.SafetyMeasuresMapper;
@ -12,6 +14,7 @@ import com.bonus.imgTool.utils.UserUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -29,6 +32,9 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
@Resource
private SysFileResourceService sysFileResourceService;
@Resource
private SynthesisQueryService synthesisQueryService;
/**
* 安全措施落实获取列表
* @param data
@ -88,6 +94,9 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getNewUser(): null;
sysFileResourceService.addSysFileResource(sysFileResourceVo,data.getId(),"3",CreateUserId,CreateUserName);
}
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("删除失败");
@ -117,6 +126,9 @@ public class SafetyMeasuresServiceImpl implements SafetyMeasuresService {
String CreateUserName = UserUtil.getLoginUser() != null ? UserUtil.getLoginUser().getNewUser(): null;
sysFileResourceService.addSysFileResource(sysFileResourceVo,data.getId(),"3",CreateUserId,CreateUserName);
}
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
BeanUtils.copyProperties(data,comprehensiveQueryVo);
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
} catch (Exception e) {
log.error(e.toString(), e);
return ServerResponse.createErroe("修改失败");

View File

@ -2,6 +2,73 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.imgTool.backstage.dao.SynthesisQueryDao">
<insert id="addComprehensiveQuery">
insert into tb_coordinate_photo
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
<if test="proId != null and proId != ''">pro_id,</if>
<if test="proName != null">pro_name,</if>
<if test="majorId != null and majorId != ''">major_id,</if>
<if test="majorName != null">major_name,</if>
<if test="gxId != null and gxId != ''">gx_id,</if>
<if test="gxName != null">gx_name,</if>
<if test="checkUserName != null">check_user_name,</if>
<if test="vioDate != null">vio_date,</if>
<if test="vioPlace != null">vio_place,</if>
<if test="vioDesc != null">vio_desc,</if>
<if test="rectDate != null">rect_date,</if>
<if test="rectUserName != null">rect_user_name,</if>
<if test="rectTime != null">rect_time,</if>
<if test="rectDesc != null">rect_desc,</if>
<if test="rectStatus != null">rect_status,</if>
<if test="buildBeforeDesc != null">build_before_desc,</if>
<if test="buildUnderDesc != null">build_under_desc,</if>
<if test="buildAfterDesc != null">build_after_desc,</if>
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="uploadType != null">upload_type,</if>
<if test="createUserId != null">create_user_id,</if>
<if test="createTime != null">create_time,</if>
<if test="createUserName != null">create_user_name,</if>
<if test="updateUserid != null">update_user_id,</if>
<if test="updateUserName != null">update_user_name,</if>
<if test="updateTime != null">update_time,</if>
<if test="dataSource != null">data_source,</if>
is_active
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
<if test="proId != null and proId != ''">#{proId},</if>
<if test="proName != null">#{proName},</if>
<if test="majorId != null and majorId != ''">#{majorId},</if>
<if test="majorName != null">#{majorName},</if>
<if test="gxId != null and gxId != ''">#{gxId},</if>
<if test="gxName != null and gxName != ''">#{gxName},</if>
<if test="checkUserName != null">#{checkUserName},</if>
<if test="vioDate != null and vioDate != ''">#{vioDate},</if>
<if test="vioPlace != null">#{vioPlace},</if>
<if test="vioDesc != null">#{vioDesc},</if>
<if test="rectDate != null and rectDate != ''">#{rectDate},</if>
<if test="rectUserName != null">#{rectUserName},</if>
<if test="rectTime != null">#{rectTime},</if>
<if test="rectDesc != null and rectDesc != ''">#{rectDesc},</if>
<if test="rectStatus != null">#{rectStatus},</if>
<if test="buildBeforeDesc != null">#{buildBeforeDesc},</if>
<if test="buildUnderDesc != null">#{buildUnderDesc},</if>
<if test="buildAfterDesc != null">#{buildAfterDesc},</if>
<if test="title != null">#{title},</if>
<if test="content != null">#{content},</if>
<if test="uploadType != null">#{uploadType},</if>
<if test="createUserId != null">#{createUserId},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createUserName != null">#{createUserName},</if>
<if test="updateUserid != null">#{updateUserid},</if>
<if test="updateUserName != null">#{updateUserName},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="dataSource != null">#{dataSource},</if>
1
</trim>
</insert>
<!--综合查询-照片综合查询-照片数量-->
<select id="getImgNum" resultType="com.bonus.imgTool.backstage.entity.SynthesisNumVo">
@ -150,4 +217,35 @@
DELETE FROM tb_photo_collect WHERE file_resource_id = #{id} AND collect_user_id = #{userId}
</if>
</update>
<update id="updateComprehensiveQuery">
update tb_comprehensive_query
<trim prefix="SET" suffixOverrides=",">
<if test="proId != null">pro_id = #{proId},</if>
<if test="proName != null">pro_name = #{proName},</if>
<if test="majorId != null">major_id = #{majorId},</if>
<if test="majorName != null">major_name = #{majorName},</if>
<if test="gxId != null">gx_id = #{gxId},</if>
<if test="gxName != null">gx_name = #{gxName},</if>
<if test="checkUserName != null">check_user_name = #{checkUserName},</if>
<if test="vioDate != null">vio_date = #{vioDate},</if>
<if test="vioPlace != null">vio_place = #{vioPlace},</if>
<if test="vioDesc != null">vio_desc = #{vioDesc},</if>
<if test="rectDate != null">rect_date = #{rectDate},</if>
<if test="rectUserName != null">rect_user_name = #{rectUserName},</if>
<if test="rectTime != null">rect_time = #{rectTime},</if>
<if test="rectDesc != null">rect_desc = #{rectDesc},</if>
<if test="rectStatus != null">rect_status = #{rectStatus},</if>
<if test="buildBeforeDesc != null">build_before_desc = #{buildBeforeDesc},</if>
<if test="buildUnderDesc != null">build_under_desc = #{buildUnderDesc},</if>
<if test="buildAfterDesc != null">build_after_desc = #{buildAfterDesc},</if>
<if test="title != null">title = #{title},</if>
<if test="uploadType != null">upload_type = #{uploadType},</if>
<if test="buildAfterDesc != null">build_after_desc = #{buildAfterDesc},</if>
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
<if test="updateUserName != null">update_user_name = #{updateUserName},</if>
update_time = NOW()
</trim>
where id = #{id}
</update>
</mapper>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.imgTool.imageUpload.mapper.ImportantMatterMapper">
<insert id="addImportantMatter" useGeneratedKeys="true" keyProperty="id">
insert into tb_coordinate_photo
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="proId != null and proId != ''">pro_id,</if>
<if test="proName != null">pro_name,</if>
<if test="majorId != null and majorId != ''">major_id,</if>
<if test="majorName != null">major_name,</if>
<if test="gxId != null and gxId != ''">gx_id,</if>
<if test="gxName != null">gx_name,</if>
<if test="time != null">time,</if>
<if test="title != null">title,</if>
<if test="content != null">content,</if>
<if test="createUserId != null">create_user_id,</if>
<if test="createTime != null">create_time,</if>
<if test="createUserName != null">create_user_name,</if>
<if test="updateUserid != null">update_user_id,</if>
<if test="updateUserName != null">update_user_name,</if>
<if test="updateTime != null">update_time,</if>
<if test="dataSource != null">data_source,</if>
is_active
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="proId != null and proId != ''">#{proId},</if>
<if test="proName != null">#{proName},</if>
<if test="majorId != null and majorId != ''">#{majorId},</if>
<if test="majorName != null">#{majorName},</if>
<if test="gxId != null and gxId != ''">#{gxId},</if>
<if test="gxName != null and gxName != ''">#{gxName},</if>
<if test="time != null">#{time},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="content != null">#{content},</if>
<if test="createUserId != null">#{createUserId},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createUserName != null">#{createUserName},</if>
<if test="updateUserid != null">#{updateUserid},</if>
<if test="updateUserName != null">#{updateUserName},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="dataSource != null">#{dataSource},</if>
1
</trim>
</insert>
<update id="updateImportantMatter">
update tb_main_matter_publicize_photo
<trim prefix="SET" suffixOverrides=",">
<if test="proId != null">pro_id = #{proId},</if>
<if test="proName != null">pro_name = #{proName},</if>
<if test="majorId != null">major_id = #{majorId},</if>
<if test="majorName != null">major_name = #{majorName},</if>
<if test="gxId != null">gx_id = #{gxId},</if>
<if test="gxName != null">gx_name = #{gxName},</if>
<if test="time != null">time = #{time},</if>
<if test="title != null">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
<if test="updateUserName != null">update_user_name = #{updateUserName},</if>
update_time = NOW()
</trim>
</update>
<delete id="deleteImportantMatter">
update tb_coordinate_photo set is_active ='0'
where id = #{id}
</delete>
<select id="getImportantMatterList" resultType="com.bonus.imgTool.imageUpload.dto.ImportantMatterVo">
select * from tb_main_matter_publicize_photo
where is_active = '1'
<if test="proId != '' and proId != null"> and pro_id = #{proId}</if>
<if test="majorId != '' and majorId != null"> and major_id = #{majorId}</if>
<if test="gxId != '' and gxId != null"> and gx_id = #{gxId}</if>
<if test="keyWord != null and keyWord != ''">
and (
check_user_name like concat('%', #{keyWord}, '%') or
check_desc like concat('%', #{keyWord}, '%') or
check_place like concat('%', #{keyWord}, '%') or
)
</if>
</select>
</mapper>

View File

@ -45,7 +45,7 @@
where source_id = #{id}
</delete>
<select id="getSysFileResourceList" resultType="com.bonus.imgTool.system.vo.SysFileResourceVo">
select * from sys_file_resource where source_id = #{id}
select * from sys_file_resource where source_id = #{id} and is_active ='1'
</select>
</mapper>