总库删除
This commit is contained in:
parent
96b05f7d57
commit
c1c0f451a8
|
|
@ -81,7 +81,7 @@ public interface SynthesisQueryDao {
|
|||
*/
|
||||
List<ProClassifyStatisticsVo> getProClassifyStatisticsList(QueryParamDto dto);
|
||||
|
||||
void deleteComprehensiveQuery(Long id);
|
||||
void deleteComprehensiveQuery(@Param("id") Long id,@Param("uploadType")String uploadType);
|
||||
|
||||
/**
|
||||
* 项目分类统计-查看图片
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public interface SynthesisQueryService {
|
|||
* 综合查询删除
|
||||
* @param id
|
||||
*/
|
||||
void deleteComprehensiveQuery(Long id);
|
||||
void deleteComprehensiveQuery(Long id,String uploadType);
|
||||
|
||||
/**
|
||||
* 项目分类统计-查看图片
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ public class SynthesisQueryServiceImpl implements SynthesisQueryService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void deleteComprehensiveQuery(Long id) {
|
||||
synthesisQueryDao.deleteComprehensiveQuery(id);
|
||||
public void deleteComprehensiveQuery(Long id,String uploadType) {
|
||||
synthesisQueryDao.deleteComprehensiveQuery(id,uploadType);
|
||||
}
|
||||
|
||||
public String generateWatermarkData(SynthesisQueryVo vo){
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ServerResponse updateQualityInspectionById(SafetyViolationDto bean) {
|
||||
LoginUser loginUser = UserUtil.getLoginUser();
|
||||
bean.setUpdateUserId(loginUser.getId());
|
||||
|
|
@ -116,7 +117,6 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
|
|||
if (delFileList != null && !delFileList.isEmpty()) {
|
||||
int j = safetyViolationDao.delImgPhoto(bean.getDelFileList());
|
||||
}
|
||||
//总库修改 TODO
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
|
||||
|
|
@ -139,8 +139,8 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
|
|||
file.setSourceId(bean.getId());
|
||||
file.setUploadType("2");
|
||||
int j = safetyViolationDao.delImgPhotoBySourceId(file);
|
||||
//总库删除 TODO
|
||||
|
||||
//总库删除
|
||||
synthesisQueryService.deleteComprehensiveQuery(bean.getId(),bean.getUploadType());
|
||||
return ServerResponse.createSuccess("删除成功",num);
|
||||
}else{
|
||||
return ServerResponse.createErroe("删除失败");
|
||||
|
|
|
|||
|
|
@ -54,18 +54,9 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
bean.setCreateUserId(loginUser.getId());
|
||||
bean.setCreateUserName(loginUser.getUsername());
|
||||
List<FileStorageDto> fileList = bean.getFileList();
|
||||
// //判断是否有整改照片,有则为已整改
|
||||
// if (fileList != null && !fileList.isEmpty()) {
|
||||
// fileList.forEach(item -> {
|
||||
// if("2".equals(item.getSourceType()){
|
||||
// bean.setRectStatus("1");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//基础数据存入库
|
||||
int i = dao.insertSafetyViolation(bean);
|
||||
if (i > 0) {
|
||||
|
||||
//照片入库
|
||||
if (fileList != null && !fileList.isEmpty()) {
|
||||
fileList.forEach(item -> {
|
||||
|
|
@ -75,7 +66,6 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
});
|
||||
int j = dao.insertImgPhoto(bean.getFileList());
|
||||
}
|
||||
//存入总库 TODO
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
synthesisQueryService.addComprehensiveQuery(comprehensiveQueryVo);
|
||||
|
|
@ -109,7 +99,6 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
if (num > 0) {
|
||||
List<FileStorageDto> fileList = bean.getFileList();
|
||||
List<FileStorageDto> delFileList = bean.getDelFileList();
|
||||
|
||||
//照片入库
|
||||
if (fileList != null && !fileList.isEmpty()) {
|
||||
fileList.forEach(item -> {
|
||||
|
|
@ -121,20 +110,13 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
}
|
||||
//照片删除
|
||||
if (delFileList != null && !delFileList.isEmpty()) {
|
||||
// delFileList.forEach(item -> {
|
||||
// item.setSourceId(bean.getId());
|
||||
// item.setCreateUser(bean.getUpdateUserId());
|
||||
// item.setCreateUserName(bean.getUpdateUserName());
|
||||
// });
|
||||
int j = dao.delImgPhoto(bean.getDelFileList());
|
||||
}
|
||||
//总库修改 TODO
|
||||
ComprehensiveQueryVo comprehensiveQueryVo = new ComprehensiveQueryVo();
|
||||
BeanUtils.copyProperties(bean,comprehensiveQueryVo);
|
||||
synthesisQueryService.updateComprehensiveQuery(comprehensiveQueryVo);
|
||||
return ServerResponse.createSuccess("修改成功");
|
||||
} else {
|
||||
|
||||
return ServerResponse.createErroe("修改失败");
|
||||
}
|
||||
}
|
||||
|
|
@ -151,8 +133,8 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
|
|||
file.setSourceId(bean.getId());
|
||||
file.setUploadType("1");
|
||||
int j = dao.delImgPhotoBySourceId(file);
|
||||
//总库删除 TODO
|
||||
|
||||
//总库删除
|
||||
synthesisQueryService.deleteComprehensiveQuery(bean.getId(),bean.getUploadType());
|
||||
return ServerResponse.createSuccess("删除成功",num);
|
||||
}else{
|
||||
return ServerResponse.createErroe("删除失败");
|
||||
|
|
|
|||
|
|
@ -81,9 +81,10 @@
|
|||
<if test="tempFilePath != null and tempFilePath != ''">#{tempFilePath},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteComprehensiveQuery">
|
||||
update tb_comprehensive_query set is_active ='0'
|
||||
where id = #{id}
|
||||
where id = #{id} and upload_type = #{uploadType}
|
||||
</delete>
|
||||
|
||||
<!--综合查询-照片综合查询-照片数量-->
|
||||
|
|
|
|||
Loading…
Reference in New Issue