Commit 2808b7a3 authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents 22a31111 7d629ffb
package com.zehong.web.controller.supervision;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TPublicSentiment;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import com.zehong.system.service.ITPublicSentimentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 舆情处置Controller
*
* @author zehong
* @date 2025-08-15
*/
@RestController
@RequestMapping("/system/sentiment")
public class TPublicSentimentController extends BaseController
{
@Autowired
private ITPublicSentimentService tPublicSentimentService;
/**
* 查询舆情处置列表
*/
@GetMapping("/list")
public TableDataInfo list(TPublicSentiment tPublicSentiment)
{
startPage();
List<TPublicSentiment> list = tPublicSentimentService.selectTPublicSentimentList(tPublicSentiment);
return getDataTable(list);
}
/**
* 导出舆情处置列表
*/
@Log(title = "舆情处置", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPublicSentiment tPublicSentiment)
{
List<TPublicSentiment> list = tPublicSentimentService.selectTPublicSentimentList(tPublicSentiment);
ExcelUtil<TPublicSentiment> util = new ExcelUtil<TPublicSentiment>(TPublicSentiment.class);
return util.exportExcel(list, "舆情处置数据");
}
/**
* 获取舆情处置详细信息
*/
@GetMapping(value = "/{sentimentId}")
public AjaxResult getInfo(@PathVariable("sentimentId") Long sentimentId)
{
return AjaxResult.success(tPublicSentimentService.selectTPublicSentimentById(sentimentId));
}
/**
* 新增舆情处置
*/
@Log(title = "舆情处置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPublicSentiment tPublicSentiment)
{
return toAjax(tPublicSentimentService.insertTPublicSentiment(tPublicSentiment));
}
/**
* 修改舆情处置
*/
@Log(title = "舆情处置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPublicSentiment tPublicSentiment)
{
return toAjax(tPublicSentimentService.updateTPublicSentiment(tPublicSentiment));
}
/**
* 删除舆情处置
*/
@Log(title = "舆情处置", businessType = BusinessType.DELETE)
@DeleteMapping("/{sentimentIds}")
public AjaxResult remove(@PathVariable Long[] sentimentIds)
{
return toAjax(tPublicSentimentService.deleteTPublicSentimentByIds(sentimentIds));
}
@GetMapping("/sentimentSummaryAnalysisMethodTableViews")
public AjaxResult sentimentSummaryAnalysisMethodTableViews(ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) {
return AjaxResult.success(tPublicSentimentService.sentimentSummaryAnalysisMethodTableViews(complainDealSummaryAnalysisTableVo));
}
/**
* 导出投诉处置列表
*/
@Log(title = "投诉处置", businessType = BusinessType.EXPORT)
@PostMapping("/sentimentSummaryAnalysisExport")
public void sentimentSummaryAnalysisExport(HttpServletResponse httpServletResponse,
@RequestBody ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws Exception
{
tPublicSentimentService.sentimentSummaryAnalysisExport(httpServletResponse,complainDealSummaryAnalysisTableVo);
}
}
......@@ -80,6 +80,12 @@ public class TInsTaskInfor extends BaseEntity
@Excel(name = "修改人")
private String fModifyBy;
@Excel(name = "日常检查频率")
private String inspectionFrequency;
@Excel(name = "对象数量比例")
private String quantityRatio;
public void setfInsTaskInforId(Long fInsTaskInforId)
{
this.fInsTaskInforId = fInsTaskInforId;
......@@ -225,6 +231,22 @@ public class TInsTaskInfor extends BaseEntity
return fModifyBy;
}
public String getInspectionFrequency() {
return inspectionFrequency;
}
public void setInspectionFrequency(String inspectionFrequency) {
this.inspectionFrequency = inspectionFrequency;
}
public String getQuantityRatio() {
return quantityRatio;
}
public void setQuantityRatio(String quantityRatio) {
this.quantityRatio = quantityRatio;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 舆情处置对象 t_public_sentiment
*
* @author zehong
* @date 2025-08-15
*/
public class TPublicSentiment extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 舆情处置id */
private Long sentimentId;
/** 省平台id */
private String shengId;
/** 舆情标题 */
@Excel(name = "舆情标题")
private String title;
/** 舆情内容 */
@Excel(name = "舆情内容")
private String content;
/** 舆情文件 */
@Excel(name = "舆情文件")
private String sentimentFile;
/** 指派企业 */
private String enterpriseId;
@Excel(name = "指派企业")
private String enterpriseName;
/** 状态 0未反馈 1已反馈 */
@Excel(name = "状态 0未反馈 1已反馈")
private String status;
/** 处置标题 */
@Excel(name = "处置标题")
private String disposeTitle;
/** 处置内容 */
@Excel(name = "处置内容")
private String disposeContent;
/** 处置文件 */
@Excel(name = "处置文件")
private String disposeFile;
/** 处置人 */
@Excel(name = "处置人")
private String person;
/** 联系方式 */
@Excel(name = "联系方式")
private String phone;
/** $column.columnComment */
private Long isDel;
private String region;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public void setSentimentId(Long sentimentId)
{
this.sentimentId = sentimentId;
}
public Long getSentimentId()
{
return sentimentId;
}
public void setShengId(String shengId)
{
this.shengId = shengId;
}
public String getShengId()
{
return shengId;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setContent(String content)
{
this.content = content;
}
public String getContent()
{
return content;
}
public void setSentimentFile(String sentimentFile)
{
this.sentimentFile = sentimentFile;
}
public String getSentimentFile()
{
return sentimentFile;
}
public void setEnterpriseId(String enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId()
{
return enterpriseId;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setDisposeTitle(String disposeTitle)
{
this.disposeTitle = disposeTitle;
}
public String getDisposeTitle()
{
return disposeTitle;
}
public void setDisposeContent(String disposeContent)
{
this.disposeContent = disposeContent;
}
public String getDisposeContent()
{
return disposeContent;
}
public void setDisposeFile(String disposeFile)
{
this.disposeFile = disposeFile;
}
public String getDisposeFile()
{
return disposeFile;
}
public void setPerson(String person)
{
this.person = person;
}
public String getPerson()
{
return person;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setIsDel(Long isDel)
{
this.isDel = isDel;
}
public Long getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("sentimentId", getSentimentId())
.append("shengId", getShengId())
.append("title", getTitle())
.append("content", getContent())
.append("sentimentFile", getSentimentFile())
.append("enterpriseId", getEnterpriseId())
.append("status", getStatus())
.append("disposeTitle", getDisposeTitle())
.append("disposeContent", getDisposeContent())
.append("disposeFile", getDisposeFile())
.append("person", getPerson())
.append("phone", getPhone())
.append("createTime", getCreateTime())
.append("isDel", getIsDel())
.toString();
}
}
......@@ -28,4 +28,6 @@ public class TComplainDealDTO {
/*投诉类别 */
private String complainType;
private String township;
}
......@@ -35,6 +35,17 @@ public class ComplainDealSummaryAnalysisTableVo {
*/
private String dynamicTitle;
//所属区域
private String township;
public String getTownship() {
return township;
}
public void setTownship(String township) {
this.township = township;
}
public String getDynamicTitle() {
return dynamicTitle;
}
......
......@@ -60,7 +60,8 @@ public interface TComplainDealMapper
*/
public List<TComplainDealDTO> queryAllByNotDeleteAndCreateTime(@Param("startOfMonth") Date startOfMonth,
@Param("endOfMonth") Date endOfMonth,
@Param("complaintCategory") String complaintCategory);
@Param("complaintCategory") String complaintCategory,
@Param("township") String township);
/**
* 修改投诉处置
*
......
package com.zehong.system.mapper;
import com.zehong.system.domain.TPublicSentiment;
import com.zehong.system.domain.dto.TComplainDealDTO;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* 舆情处置Mapper接口
*
* @author zehong
* @date 2025-08-15
*/
public interface TPublicSentimentMapper
{
/**
* 查询舆情处置
*
* @param sentimentId 舆情处置ID
* @return 舆情处置
*/
public TPublicSentiment selectTPublicSentimentById(Long sentimentId);
/**
* 查询舆情处置列表
*
* @param tPublicSentiment 舆情处置
* @return 舆情处置集合
*/
public List<TPublicSentiment> selectTPublicSentimentList(TPublicSentiment tPublicSentiment);
/**
* 新增舆情处置
*
* @param tPublicSentiment 舆情处置
* @return 结果
*/
public int insertTPublicSentiment(TPublicSentiment tPublicSentiment);
/**
* 修改舆情处置
*
* @param tPublicSentiment 舆情处置
* @return 结果
*/
public int updateTPublicSentiment(TPublicSentiment tPublicSentiment);
/**
* 删除舆情处置
*
* @param sentimentId 舆情处置ID
* @return 结果
*/
public int deleteTPublicSentimentById(Long sentimentId);
/**
* 批量删除舆情处置
*
* @param sentimentIds 需要删除的数据ID
* @return 结果
*/
public int deleteTPublicSentimentByIds(Long[] sentimentIds);
public List<TComplainDealDTO> queryAllByNotDeleteAndCreateTime(@Param("startOfMonth") Date startOfMonth,
@Param("endOfMonth") Date endOfMonth,
@Param("township") String township);
}
package com.zehong.system.service;
import com.zehong.system.domain.TPublicSentiment;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* 舆情处置Service接口
*
* @author zehong
* @date 2025-08-15
*/
public interface ITPublicSentimentService
{
/**
* 查询舆情处置
*
* @param sentimentId 舆情处置ID
* @return 舆情处置
*/
public TPublicSentiment selectTPublicSentimentById(Long sentimentId);
/**
* 查询舆情处置列表
*
* @param tPublicSentiment 舆情处置
* @return 舆情处置集合
*/
public List<TPublicSentiment> selectTPublicSentimentList(TPublicSentiment tPublicSentiment);
/**
* 新增舆情处置
*
* @param tPublicSentiment 舆情处置
* @return 结果
*/
public int insertTPublicSentiment(TPublicSentiment tPublicSentiment);
/**
* 修改舆情处置
*
* @param tPublicSentiment 舆情处置
* @return 结果
*/
public int updateTPublicSentiment(TPublicSentiment tPublicSentiment);
/**
* 批量删除舆情处置
*
* @param sentimentIds 需要删除的舆情处置ID
* @return 结果
*/
public int deleteTPublicSentimentByIds(Long[] sentimentIds);
/**
* 删除舆情处置信息
*
* @param sentimentId 舆情处置ID
* @return 结果
*/
public int deleteTPublicSentimentById(Long sentimentId);
public List<ComplainDealSummaryAnalysisTableVo> sentimentSummaryAnalysisMethodTableViews(ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo);
public void sentimentSummaryAnalysisExport(HttpServletResponse httpServletResponse, ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws IOException;
}
......@@ -186,9 +186,10 @@ public class TComplainDealServiceImpl implements ITComplainDealService
Date startOfMonth = DateUtils.parseDate(date1 + "-01-01 00:00:00");
Date endOfMonth = DateUtils.parseDate(date1 + "-12-31 23:59:59");;
String complaintCategory = complainDealSummaryAnalysisTableVo.getComplainType();
String township = complainDealSummaryAnalysisTableVo.getTownship();
//所有所有发生的投诉
List<TComplainDealDTO> tComplainDeals = tComplainDealMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,complaintCategory);
List<TComplainDealDTO> tComplainDeals = tComplainDealMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,complaintCategory,township);
List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisTableVos = new ArrayList<>();
......@@ -654,6 +655,7 @@ public class TComplainDealServiceImpl implements ITComplainDealService
String date = map.get("date");
String complaintCategory = map.get("complaintCategory");
String township = map.get("township");
// 管理制度
List<TComplainDealManSysSet> tComplainDealManSysSets = tComplainDealManSysSetMapper.selectTComplainDealManSysSetList(new TComplainDealManSysSet());
......@@ -701,7 +703,7 @@ public class TComplainDealServiceImpl implements ITComplainDealService
Date endOfMonth = DateUtils.parseDate(date + "-12-31 23:59:59");
//所有所有发生的投诉
List<TComplainDealDTO> tComplainDeals = tComplainDealMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,complaintCategory);
List<TComplainDealDTO> tComplainDeals = tComplainDealMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,complaintCategory,township);
List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisTableVos = new ArrayList<>();
......
......@@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where is_del = '0'
</select>
<select id="queryAllByNotDeleteAndCreateTime" resultType="com.zehong.system.domain.dto.TComplainDealDTO">
select complain_deal_id as complainDealId,complain_status as complainStatus ,create_time as createTime, update_time as updateTime,MONTH(create_time) as createTimeYear ,complain_type as complainType from t_complain_deal
select complain_deal_id as complainDealId,complain_status as complainStatus ,create_time as createTime, update_time as updateTime,MONTH(create_time) as createTimeYear ,complain_type as complainType,township from t_complain_deal
where is_del = '0'
<if test="startOfMonth != null and endOfMonth != null">
and create_time <![CDATA[>=]]> #{startOfMonth} and create_time <![CDATA[<=]]> #{endOfMonth}
......@@ -97,6 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complaintCategory != null and complaintCategory != '' and complaintCategory != 0 ">
and complain_type = #{complaintCategory}
</if>
<if test="township != null and township != '' and township != 0 ">
and township = #{township}
</if>
order by create_time asc
</select>
......
......@@ -21,10 +21,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="fCreateBy" column="f_create_by" />
<result property="fUpdateTime" column="f_update_time" />
<result property="fModifyBy" column="f_modify_by" />
<result property="inspectionFrequency" column="inspection_frequency" />
<result property="quantityRatio" column="quantity_ratio" />
</resultMap>
<sql id="selectTInsTaskInforVo">
select f_ins_task_infor_id, f_unique_code, f_task_belong, f_task_type, f_distribute_flag, f_name, f_desc, f_start_time, f_end_time, f_status, f_delete_flag, f_remark, f_create_time, f_create_by, f_update_time, f_modify_by from t_ins_task_infor
select f_ins_task_infor_id, f_unique_code, f_task_belong, f_task_type, f_distribute_flag, f_name, f_desc, f_start_time, f_end_time, f_status, f_delete_flag, f_remark, f_create_time, f_create_by, f_update_time, f_modify_by, inspection_frequency, quantity_ratio from t_ins_task_infor
</sql>
<select id="selectTInsTaskInforList" parameterType="TInsTaskInfor" resultMap="TInsTaskInforResult">
......@@ -45,6 +47,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateBy != null and fCreateBy != ''"> and f_create_by = #{fCreateBy}</if>
<if test="fUpdateTime != null and fUpdateTime != ''"> and f_update_time = #{fUpdateTime}</if>
<if test="fModifyBy != null and fModifyBy != ''"> and f_modify_by = #{fModifyBy}</if>
<if test="inspectionFrequency != null and inspectionFrequency != ''"> and inspection_frequency = #{inspectionFrequency}</if>
<if test="quantityRatio != null and quantityRatio != ''"> and quantity_ratio = #{quantityRatio}</if>
</where>
ORDER BY f_create_time DESC
</select>
......@@ -72,6 +76,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateBy != null">f_create_by,</if>
<if test="fUpdateTime != null">f_update_time,</if>
<if test="fModifyBy != null">f_modify_by,</if>
<if test="inspectionFrequency != null">inspection_frequency,</if>
<if test="quantityRatio != null">quantity_ratio,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fUniqueCode != null and fUniqueCode != ''">#{fUniqueCode},</if>
......@@ -89,6 +95,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateBy != null">#{fCreateBy},</if>
<if test="fUpdateTime != null">#{fUpdateTime},</if>
<if test="fModifyBy != null">#{fModifyBy},</if>
<if test="inspectionFrequency != null">#{inspectionFrequency},</if>
<if test="quantityRatio != null">#{quantityRatio},</if>
</trim>
</insert>
......@@ -110,6 +118,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fCreateBy != null">f_create_by = #{fCreateBy},</if>
<if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
<if test="fModifyBy != null">f_modify_by = #{fModifyBy},</if>
<if test="inspectionFrequency != null">inspection_frequency = #{inspectionFrequency},</if>
<if test="quantityRatio != null">quantity_ratio = #{quantityRatio},</if>
</trim>
where f_ins_task_infor_id = #{fInsTaskInforId}
</update>
......@@ -141,7 +151,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f_create_time,
f_create_by,
f_update_time,
f_modify_by
f_modify_by,
inspection_frequency,
quantity_ratio
)values
<foreach collection="list" separator="," item="item">
(
......@@ -159,7 +171,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.fCreateTime},
#{item.fCreateBy},
#{item.fUpdateTime},
#{item.fModifyBy}
#{item.fModifyBy},
#{item.inspectionFrequency},
#{item.quantityRatio}
)
</foreach>
</insert>
......
<?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.zehong.system.mapper.TPublicSentimentMapper">
<resultMap type="com.zehong.system.domain.TPublicSentiment" id="TPublicSentimentResult">
<result property="sentimentId" column="sentiment_id" />
<result property="shengId" column="sheng_id" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="sentimentFile" column="sentiment_file" />
<result property="enterpriseId" column="enterprise_id" />
<result property="status" column="status" />
<result property="disposeTitle" column="dispose_title" />
<result property="disposeContent" column="dispose_content" />
<result property="disposeFile" column="dispose_file" />
<result property="person" column="person" />
<result property="phone" column="phone" />
<result property="createTime" column="create_time" />
<result property="isDel" column="is_del" />
<result property="region" column="region" />
<result property="startTime" column="start_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectTPublicSentimentVo">
select sentiment_id, sheng_id, title, content, sentiment_file, enterprise_id, status,
(SELECT enterprise_name FROM t_enterprise_info e WHERE e.enterprise_id = f.enterprise_id) as enterpriseName,
dispose_title, dispose_content, dispose_file, person, phone, create_time, is_del, region, start_time,update_time from t_public_sentiment f
</sql>
<select id="selectTPublicSentimentList" parameterType="TPublicSentiment" resultMap="TPublicSentimentResult">
<include refid="selectTPublicSentimentVo"/>
<where>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="region != null and region != ''"> and region = #{region}</if>
<if test="startTime != null and startTime != ''"> AND date_format(start_time,'%y') &gt;= date_format(#{startTime},'%y')</if>
</where>
</select>
<select id="selectTPublicSentimentById" parameterType="Long" resultMap="TPublicSentimentResult">
<include refid="selectTPublicSentimentVo"/>
where sentiment_id = #{sentimentId}
</select>
<insert id="insertTPublicSentiment" parameterType="TPublicSentiment" useGeneratedKeys="true" keyProperty="sentimentId">
insert into t_public_sentiment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shengId != null">sheng_id,</if>
<if test="title != null and title != ''">title,</if>
<if test="content != null and content != ''">content,</if>
<if test="sentimentFile != null">sentiment_file,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="status != null">status,</if>
<if test="disposeTitle != null and disposeTitle != ''">dispose_title,</if>
<if test="disposeContent != null and disposeContent != ''">dispose_content,</if>
<if test="disposeFile != null">dispose_file,</if>
<if test="person != null">person,</if>
<if test="phone != null">phone,</if>
<if test="createTime != null">create_time,</if>
<if test="isDel != null">is_del,</if>
<if test="region != null">region,</if>
<if test="startTime != null">start_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="shengId != null">#{shengId},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="sentimentFile != null">#{sentimentFile},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="status != null">#{status},</if>
<if test="disposeTitle != null and disposeTitle != ''">#{disposeTitle},</if>
<if test="disposeContent != null and disposeContent != ''">#{disposeContent},</if>
<if test="disposeFile != null">#{disposeFile},</if>
<if test="person != null">#{person},</if>
<if test="phone != null">#{phone},</if>
<if test="createTime != null">#{createTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="region != null">#{region},</if>
<if test="startTime != null">#{startTime},</if>
</trim>
</insert>
<update id="updateTPublicSentiment" parameterType="TPublicSentiment">
update t_public_sentiment
<trim prefix="SET" suffixOverrides=",">
<if test="shengId != null">sheng_id = #{shengId},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="sentimentFile != null">sentiment_file = #{sentimentFile},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="status != null">status = #{status},</if>
<if test="disposeTitle != null and disposeTitle != ''">dispose_title = #{disposeTitle},</if>
<if test="disposeContent != null and disposeContent != ''">dispose_content = #{disposeContent},</if>
<if test="disposeFile != null">dispose_file = #{disposeFile},</if>
<if test="person != null">person = #{person},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="region != null">region = #{region},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where sentiment_id = #{sentimentId}
</update>
<delete id="deleteTPublicSentimentById" parameterType="Long">
delete from t_public_sentiment where sentiment_id = #{sentimentId}
</delete>
<delete id="deleteTPublicSentimentByIds" parameterType="String">
delete from t_public_sentiment where sentiment_id in
<foreach item="sentimentId" collection="array" open="(" separator="," close=")">
#{sentimentId}
</foreach>
</delete>
<select id="queryAllByNotDeleteAndCreateTime" resultType="com.zehong.system.domain.dto.TComplainDealDTO">
select sentiment_id as complainDealId,status as complainStatus ,start_time as createTime, update_time as updateTime,MONTH(start_time) as createTimeYear ,region as township from t_public_sentiment
where is_del = '0'
<if test="startOfMonth != null and endOfMonth != null">
and start_time <![CDATA[>=]]> #{startOfMonth} and start_time <![CDATA[<=]]> #{endOfMonth}
</if>
<if test="township != null and township != '' and township != 0 ">
and region = #{township}
</if>
order by create_time asc
</select>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询舆情处置列表
export function listSentiment(query) {
return request({
url: '/system/sentiment/list',
method: 'get',
params: query
})
}
// 查询舆情处置详细
export function getSentiment(sentimentId) {
return request({
url: '/system/sentiment/' + sentimentId,
method: 'get'
})
}
// 新增舆情处置
export function addSentiment(data) {
return request({
url: '/system/sentiment',
method: 'post',
data: data
})
}
// 修改舆情处置
export function updateSentiment(data) {
return request({
url: '/system/sentiment',
method: 'put',
data: data
})
}
// 删除舆情处置
export function delSentiment(sentimentId) {
return request({
url: '/system/sentiment/' + sentimentId,
method: 'delete'
})
}
// 导出舆情处置
export function exportSentiment(query) {
return request({
url: '/system/sentiment/export',
method: 'get',
params: query
})
}
export function sentimentSummaryAnalysisMethodTableViews(query) {
return request({
url: '/system/sentiment/sentimentSummaryAnalysisMethodTableViews' ,
method: 'get',
params: query
})
}
export function sentimentSummaryAnalysisExport(data) {
return request({
url: '/system/sentiment/sentimentSummaryAnalysisExport' ,
method: 'post',
data: data,
responseType:'blob'
})
}
......@@ -74,6 +74,20 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日常检查频率">
<span v-if="detailInfo.inspectionFrequency">{{ detailInfo.inspectionFrequency }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="对象数量比例">
<span v-if="detailInfo.quantityRatio">{{ detailInfo.quantityRatio }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述">
<span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
......
......@@ -279,6 +279,17 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="日常检查频率" prop="inspectionFrequency">
<el-input v-model="form.inspectionFrequency" placeholder="请输入日常检查频率" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="对象数量比例" prop="quantityRatio">
<el-input v-model="form.quantityRatio" placeholder="请输入对象数量比例" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="描述" prop="fRemark">
<el-input type="textarea" v-model="form.fRemark" placeholder="请输入描述" />
......@@ -430,7 +441,9 @@ export default {
fCreateTime: null,
fCreateBy: null,
fUpdateTime: null,
fModifyBy: null
fModifyBy: null,
inspectionFrequency:null,
quantityRatio:null
};
this.resetForm("form");
},
......
<template>
<div class="app-container">
<el-form :model="statisticalAnalysisForm" ref="statisticalAnalysisForm" :rules="rules" :inline="true">
<el-form-item label="年度" prop="date" >
<el-form-item label="年度" prop="date" >
<el-date-picker clearable size="small"
v-model="statisticalAnalysisForm.date"
type="year"
......@@ -9,25 +9,37 @@
placeholder="请选择年度">
</el-date-picker>
</el-form-item>
<!-- 1-投诉举报,2-服务申请,3-咨询建议 -->
<el-form-item label="投诉类别" prop="complainType">
<el-form-item label="投诉类别" prop="complainType">
<el-select style="width: 100%" v-model="statisticalAnalysisForm.complainType">
<el-option label="全部" value="0"/>
<el-option label="投诉举报" value="1"/>
<el-option label="服务申请" value="2"/>
<el-option label="咨询建议" value="3"/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item label="所属区域" prop="township">
<el-select style="width: 100%" v-model="statisticalAnalysisForm.township" clearable size="small">
<el-option label="全部" value="0"/>
<el-option
v-for="dict in townshipOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini"
<el-button type="primary" icon="el-icon-search" size="mini"
@click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</el-form-item>
</el-form>
<el-table style="width: 100%" border :data="summaryAnalysisDataList">
<el-table style="width: 100%" border :data="summaryAnalysisDataList">
<el-table-column align="center" :label="dynamicTitle">
<el-table-column fixed prop="date" label="日期">
......@@ -37,29 +49,32 @@
<el-table-column prop="completionRate" label="办结率">
</el-table-column>
<el-table-column prop="timelyCompletionRate" label="办结及时率">
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</div>
</template>
<script>
<script>
import { complainDealSummaryAnalysisMethodTableViews,complainDealSummaryAnalysisExport } from "@/api/complainDeal/complainDeal";
import axios from "axios";
export default {
name: "complainSummaryAnalysis",
name: "complainSummaryAnalysis",
data() {
return{
statisticalAnalysisForm:{
complainType:'',
date: '',
township:''
},
// 所属乡镇字典
townshipOptions: [],
summaryAnalysisDataList:[],
dynamicTitle:"",
// 导出遮罩层
exportLoading: false,
rules: {
......@@ -77,12 +92,16 @@ export default {
}
},
created(){
this.getDicts("t_township").then(response => {
this.townshipOptions = response.data;
});
this.statisticalAnalysisForm.date = this.currentYear;
this.statisticalAnalysisForm.complainType = '0';
this.statisticalAnalysisForm.township = '0';
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 投诉类别为全部统计分析数据"
complainDealSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
})
},
methods:{
handleQuery(){
......@@ -101,22 +120,22 @@ export default {
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 投诉类别为" + complainTypeValue + "统计分析数据";
complainDealSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
} else {
})
} else {
return false;
}
});
},
handleExport(){
const queryParams = this.statisticalAnalysisForm;
queryParams.dynamicTitle = this.dynamicTitle;
queryParams.dynamicTitle = this.dynamicTitle;
this.$confirm('是否确认导出?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
complainDealSummaryAnalysisExport(queryParams).then((response) => {
}).then(() => {
complainDealSummaryAnalysisExport(queryParams).then((response) => {
// console.log("res data = "+response.data);
// const str = response.headers["content-disposition"];
// console.log("response.headers = "+str);
......@@ -133,11 +152,11 @@ export default {
document.body.appendChild(aLink); // 将a标签挂载上去
aLink.click(); // a标签click事件
document.body.removeChild(aLink); // 移除a标签
window.URL.revokeObjectURL(url); // 销毁下载链接
window.URL.revokeObjectURL(url); // 销毁下载链接
}).catch(error => {
console.error('导出失败', error);
});
});
}).catch(() => {});
},
exportExcel(){
......
This diff is collapsed.
<template>
<div class="app-container">
<el-form :model="statisticalAnalysisForm" ref="statisticalAnalysisForm" :rules="rules" :inline="true">
<el-form-item label="年度" prop="date" >
<el-date-picker clearable size="small"
v-model="statisticalAnalysisForm.date"
type="year"
value-format="yyyy"
placeholder="请选择年度">
</el-date-picker>
</el-form-item>
<el-form-item label="所属区域" prop="township">
<el-select style="width: 100%" v-model="statisticalAnalysisForm.township" clearable size="small">
<el-option label="全部" value="0"/>
<el-option
v-for="dict in townshipOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button type="primary" icon="el-icon-search" size="mini"
@click="handleExport">导出</el-button>
</el-form-item>
</el-form>
<el-table style="width: 100%" border :data="summaryAnalysisDataList">
<el-table-column align="center" :label="dynamicTitle">
<el-table-column fixed prop="date" label="日期">
</el-table-column>
<el-table-column prop="amount" label="发生量">
</el-table-column>
<el-table-column prop="completionRate" label="办结率">
</el-table-column>
<el-table-column prop="timelyCompletionRate" label="办结及时率">
</el-table-column>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { sentimentSummaryAnalysisMethodTableViews,sentimentSummaryAnalysisExport } from "@/api/system/sentiment";
import axios from "axios";
export default {
name: "complainSummaryAnalysis",
data() {
return{
statisticalAnalysisForm:{
date: '',
township:''
},
// 所属乡镇字典
townshipOptions: [],
summaryAnalysisDataList:[],
dynamicTitle:"",
// 导出遮罩层
exportLoading: false,
rules: {
date: [
{ required: true, message: '请选择时间', trigger: 'change' }
]
}
}
},
mounted() {
},
computed: {
currentYear() {
return new Date().getFullYear().toString();
}
},
created(){
this.getDicts("t_township").then(response => {
this.townshipOptions = response.data;
});
this.statisticalAnalysisForm.date = this.currentYear;
this.statisticalAnalysisForm.township = '0';
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 所属区域为全部统计分析数据"
sentimentSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
},
methods:{
handleQuery(){
this.$refs.statisticalAnalysisForm.validate(valid => {
if (valid) {
let townshipValue = this.statisticalAnalysisForm.township;
if (townshipValue == '0') {
townshipValue = "全部"
} else{
townshipValue = this.selectDictLabel(this.townshipOptions, townshipValue)
}
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 所属区域为" + townshipValue + "统计分析数据";
sentimentSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
} else {
return false;
}
});
},
handleExport(){
const queryParams = this.statisticalAnalysisForm;
queryParams.dynamicTitle = this.dynamicTitle;
this.$confirm('是否确认导出?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
sentimentSummaryAnalysisExport(queryParams).then((response) => {
// console.log("res data = "+response.data);
// const str = response.headers["content-disposition"];
// console.log("response.headers = "+str);
let blob = new Blob([response], {type: 'application/vnd.ms-excel;charset=utf-8'}) // 文件类型
// console.log(response.headers['Content-disposition']); // 从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx") 设置的文件名;
//以=分割取数组[1]元素为文件名
// let filename = window.decodeURI(response.headers['Content-disposition'].split('=')[1])
let url = window.URL.createObjectURL(blob); // 创建下载链接
let aLink = document.createElement("a"); // 赋值给a标签的href属性
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", "投诉汇总分析.xlsx");
document.body.appendChild(aLink); // 将a标签挂载上去
aLink.click(); // a标签click事件
document.body.removeChild(aLink); // 移除a标签
window.URL.revokeObjectURL(url); // 销毁下载链接
}).catch(error => {
console.error('导出失败', error);
});
}).catch(() => {});
},
exportExcel(){
}
}
}
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment