# Conflicts:
#	yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/SmzSspProblemmodifyController.java
#	yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/ISmzSspProblemmodifyService.java
dev_xd
姜玉琦 2025-03-08 16:18:10 +08:00
commit 4635d42aa4
7 changed files with 171 additions and 7 deletions

View File

@ -145,6 +145,19 @@ public class SmzSspProblemmodify extends BaseEntity
@Excel(name = "问题类型", readConverterExp = "1=常规问题2专项问题")
private String problemType;
/**
* (1-(id))
*/
private Long isNew;
public Long getIsNew() {
return isNew;
}
public void setIsNew(Long isNew) {
this.isNew = isNew;
}
private String problemTypeName;
private String dangerTypeName;
private String createUserName;

View File

@ -58,4 +58,5 @@ public interface SmzSspAuditinfoMapper
* @return
*/
public int deleteSmzSspAuditinfoByIds(Long[] ids);
}

View File

@ -81,4 +81,18 @@ public interface SmzSspProblemmodifyMapper
* @return
*/
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
/**
* (ssp_proble_type)
* @param where
* @return
*/
public List<SmzSspProblemmodify> groupByProblemType(SmzSspProblemmodify where);
/**
* (ssp_proble_sub_type)
* @param where
* @return
*/
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where);
}

View File

@ -410,5 +410,66 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.checkState not in (4) and date(nickedTime) &lt;= curdate()
</if>
<include refid="countUserWhere"></include>
<if test="isNew!=null and isNew!=0">
order by a.id desc
</if>
</select>
<select id="groupByProblemType" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
select a.dict_value nickedInfo,a.dict_label problemType,b.cnt id
from (SELECT * from sys_dict_data dic WHERE dict_type='ssp_proble_type') a
left join (
SELECT dic.dict_value,count(1) cnt
from smz_ssp_problemmodify ssp,sys_dict_data dic
where ssp.problemType=dic.dict_value and dic.dict_type='ssp_proble_type'
and ssp.isDel=0
<if test="comId != null "> and ssp.comId = #{comId}</if>
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
group by dic.dict_value )b on a.dict_value =b.dict_value
</select>
<select id="groupByDangerType" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
SELECT
a.cnt id,
b.cnt comId,
dic.dict_value nickedInfo,
dic.dict_label danger_type
FROM
( SELECT * FROM sys_dict_data dic WHERE dict_type = 'ssp_proble_sub_type' ) dic
LEFT JOIN (
SELECT
dic.dict_value,
count( 1 ) cnt
FROM
smz_ssp_problemmodify ssp,
sys_dict_data dic
WHERE
ssp.danger_type = dic.dict_value
and ssp.isDel=0
<if test="comId != null "> and ssp.comId = #{comId}</if>
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
AND dic.dict_type = 'ssp_proble_sub_type'
GROUP BY
dic.dict_value
) a ON a.dict_value = dic.dict_value
LEFT JOIN (
SELECT
dic.dict_value,
count( 1 ) cnt
FROM
smz_ssp_problemmodify ssp,
sys_dict_data dic
WHERE
ssp.danger_type = dic.dict_value
and ssp.isDel=0
<if test="comId != null "> and ssp.comId = #{comId}</if>
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
AND dic.dict_type = 'ssp_proble_sub_type'
AND ssp.checkState IN ( 0, 3 )
GROUP BY
dic.dict_value
) b ON b.dict_value = dic.dict_value
</select>
</mapper>

View File

@ -229,6 +229,7 @@ public class SmzSspProblemmodifyController extends BaseController
}
/**
<<<<<<< HEAD
*
* @param id
* @return
@ -284,4 +285,50 @@ public class SmzSspProblemmodifyController extends BaseController
return success(smzSspAuditinfoService.insertSmzSspAuditinfo(smzSspAuditinfo));
}
/** (ssp_proble_type)
* @param where
* @return
*/
@RequiresPermissions("trouble:problemmodify:list")
@PostMapping("/groupByProblemType")
public AjaxResult groupByProblemType(@RequestBody SmzSspProblemmodify where){
return success(smzSspProblemmodifyService.groupByProblemType(where));
}
/**
* (ssp_proble_sub_type)
* @param where
* @return
*/
@RequiresPermissions("trouble:problemmodify:list")
@PostMapping("/groupByDangerType")
public AjaxResult groupByDangerType(@RequestBody SmzSspProblemmodify where){
return success(smzSspProblemmodifyService.groupByDangerType(where));
}
/**
*
* @param where
* @return
*/
@RequiresPermissions("trouble:problemmodify:list")
@GetMapping("/listCountForBG")
public AjaxResult listCountForBG(SmzSspProblemmodify where){
List<SmzSspProblemmodify> result=smzSspProblemmodifyService.getListCount(where);
return AjaxResult.success(result);
}
/**
*
*/
@RequiresPermissions("trouble:problemmodify:list")
@GetMapping("/listForBG")
public TableDataInfo listForBG(SmzSspProblemmodify where)
{
where.setIsNew(1L);
startPage();
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectList(where);
return getDataTable(list);
}
}

View File

@ -85,4 +85,18 @@ public interface ISmzSspProblemmodifyService
*/
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
/**
* (ssp_proble_type)
* @param where
* @return
*/
public List<SmzSspProblemmodify> groupByProblemType(SmzSspProblemmodify where);
/**
* (ssp_proble_sub_type)
* @param where
* @return
*/
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where);
}

View File

@ -1,12 +1,7 @@
package com.yanzhu.manage.service.impl;
import com.yanzhu.common.core.enums.IsDelEnums;
import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.manage.domain.SmzSspAuditinfo;
import com.yanzhu.manage.domain.SmzSspFileinfo;
import com.yanzhu.manage.domain.SmzSspProblemmodify;
import com.yanzhu.manage.enums.CheckStateEnums;
import com.yanzhu.manage.mapper.SmzSspAuditinfoMapper;
@ -18,7 +13,6 @@ import com.yanzhu.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@ -30,7 +24,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* @date 2025-02-15
*/
@Service
public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyService
public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyService
{
@Autowired
private SmzSspAuditinfoMapper smzSspAuditinfoMapper;
@ -164,4 +158,24 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where) {
return smzSspProblemmodifyMapper.selectList(where);
}
/**
* (ssp_proble_type)
* @param where
* @return
*/
@Override
public List<SmzSspProblemmodify> groupByProblemType(SmzSspProblemmodify where) {
return smzSspProblemmodifyMapper.groupByProblemType(where);
}
/**
* (ssp_proble_sub_type)
* @param where
* @return
*/
@Override
public List<SmzSspProblemmodify> groupByDangerType(SmzSspProblemmodify where) {
return smzSspProblemmodifyMapper.groupByDangerType(where);
}
}