Commit b5547c89 authored by 耿迪迪's avatar 耿迪迪
parents d65ff157 a635f0d9
...@@ -221,6 +221,12 @@ ...@@ -221,6 +221,12 @@
<version>1.2.9</version> <version>1.2.9</version>
</dependency> </dependency>
<!--ureport2-->
<dependency>
<groupId>com.bstek.ureport</groupId>
<artifactId>ureport2-console</artifactId>
<version>2.2.9</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
...@@ -3,12 +3,14 @@ package com.zehong; ...@@ -3,12 +3,14 @@ package com.zehong;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ImportResource;
/** /**
* 启动程序 * 启动程序
* *
* @author zehong * @author zehong
*/ */
@ImportResource("classpath:ureport-console-context.xml")
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class GassafetyProgressApplication public class GassafetyProgressApplication
{ {
......
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import com.zehong.common.core.domain.model.LoginUser; import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.framework.web.service.TokenService; import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -24,6 +25,7 @@ import com.zehong.common.utils.poi.ExcelUtil; ...@@ -24,6 +25,7 @@ import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo; import com.zehong.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/** /**
* 投诉处置Controller * 投诉处置Controller
...@@ -116,4 +118,32 @@ public class TComplainDealController extends BaseController ...@@ -116,4 +118,32 @@ public class TComplainDealController extends BaseController
return AjaxResult.success(tComplainDealService.selectUserByenterproseId(enterproseId)); return AjaxResult.success(tComplainDealService.selectUserByenterproseId(enterproseId));
} }
/**
* 投诉处置统计分析
* @return r
*/
@GetMapping("/complainDealSummaryAnalysisMethod")
public AjaxResult complainDealSummaryAnalysisMethod() {
return AjaxResult.success(tComplainDealService.complainDealSummaryAnalysisMethod());
}
/**
* 投诉处置统计分析 - 表格形式
* @return r
*/
@GetMapping("/complainDealSummaryAnalysisMethodTableViews")
public AjaxResult complainDealSummaryAnalysisMethodTableViews(ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) {
return AjaxResult.success(tComplainDealService.complainDealSummaryAnalysisMethodTableViews(complainDealSummaryAnalysisTableVo));
}
/**
* 导出投诉处置列表
*/
@Log(title = "投诉处置", businessType = BusinessType.EXPORT)
@PostMapping("/complainDealSummaryAnalysisExport")
public void complainDealSummaryAnalysisExport(HttpServletResponse httpServletResponse,
@RequestBody ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws Exception
{
tComplainDealService.complainDealSummaryAnalysisExport(httpServletResponse,complainDealSummaryAnalysisTableVo);
}
} }
package com.zehong.web.controller.complainDeal;
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.TComplainDealEvaluate;
import com.zehong.system.service.ITComplainDealEvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 燃气投诉处置-评价Controller
*
* @author zehong
* @date 2024-06-06
*/
@RestController
@RequestMapping("/complainDeal/evaluate")
public class TComplainDealEvaluateController extends BaseController
{
@Autowired
private ITComplainDealEvaluateService tComplainDealEvaluateService;
/**
* 查询燃气投诉处置-评价列表
*/
@GetMapping("/list")
public TableDataInfo list(TComplainDealEvaluate tComplainDealEvaluate)
{
startPage();
List<TComplainDealEvaluate> list = tComplainDealEvaluateService.selectTComplainDealEvaluateList(tComplainDealEvaluate);
return getDataTable(list);
}
/**
* 导出燃气投诉处置-评价列表
*/
@Log(title = "燃气投诉处置-评价", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TComplainDealEvaluate tComplainDealEvaluate)
{
List<TComplainDealEvaluate> list = tComplainDealEvaluateService.selectTComplainDealEvaluateList(tComplainDealEvaluate);
ExcelUtil<TComplainDealEvaluate> util = new ExcelUtil<TComplainDealEvaluate>(TComplainDealEvaluate.class);
return util.exportExcel(list, "燃气投诉处置-评价数据");
}
/**
* 获取燃气投诉处置-评价详细信息
*/
@GetMapping(value = "/{complainDealEvaluateId}")
public AjaxResult getInfo(@PathVariable("complainDealEvaluateId") Long complainDealEvaluateId)
{
return AjaxResult.success(tComplainDealEvaluateService.selectTComplainDealEvaluateById(complainDealEvaluateId));
}
/**
* 获取燃气投诉处置-评价详细信息
*/
@GetMapping(value = "/getByComplainDealId/{complainDealId}")
public AjaxResult getByComplainDealId(@PathVariable("complainDealId") Long complainDealId)
{
return AjaxResult.success(tComplainDealEvaluateService.selectTComplainDealEvaluateByComplainDealId(complainDealId));
}
/**
* 新增燃气投诉处置-评价
*/
@Log(title = "燃气投诉处置-评价", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TComplainDealEvaluate tComplainDealEvaluate)
{
return toAjax(tComplainDealEvaluateService.insertTComplainDealEvaluate(tComplainDealEvaluate));
}
/**
* 修改燃气投诉处置-评价
*/
@Log(title = "燃气投诉处置-评价", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TComplainDealEvaluate tComplainDealEvaluate)
{
return toAjax(tComplainDealEvaluateService.updateTComplainDealEvaluate(tComplainDealEvaluate));
}
/**
* 删除燃气投诉处置-评价
*/
@Log(title = "燃气投诉处置-评价", businessType = BusinessType.DELETE)
@DeleteMapping("/{complainDealEvaluateIds}")
public AjaxResult remove(@PathVariable Long[] complainDealEvaluateIds)
{
return toAjax(tComplainDealEvaluateService.deleteTComplainDealEvaluateByIds(complainDealEvaluateIds));
}
}
package com.zehong.web.controller.complainDeal;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TComplainDealManSysSet;
import com.zehong.system.service.ITComplainDealManSysSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 燃气投诉处置的管理制度维护Controller
*
* @author zehong
* @date 2024-06-05
*/
@RestController
@RequestMapping("/complainDeal/set")
public class TComplainDealManSysSetController extends BaseController
{
@Autowired
private ITComplainDealManSysSetService tComplainDealManSysSetService;
/**
* 查询燃气投诉处置的管理制度维护列表
*/
@GetMapping("/list")
public AjaxResult list(TComplainDealManSysSet tComplainDealManSysSet)
{
List<TComplainDealManSysSet> list = tComplainDealManSysSetService.selectTComplainDealManSysSetList(tComplainDealManSysSet);
return AjaxResult.success(list);
}
/**
* 查询燃气投诉处置的管理制度维护列表
*/
@PostMapping("/batchUpdate")
public AjaxResult batchUpdate(@RequestBody List<TComplainDealManSysSet> tComplainDealManSysSets)
{
tComplainDealManSysSetService.batchUpdate(tComplainDealManSysSets);
return AjaxResult.success(tComplainDealManSysSets);
}
/**
* 导出燃气投诉处置的管理制度维护列表
*/
@Log(title = "燃气投诉处置的管理制度维护", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TComplainDealManSysSet tComplainDealManSysSet)
{
List<TComplainDealManSysSet> list = tComplainDealManSysSetService.selectTComplainDealManSysSetList(tComplainDealManSysSet);
ExcelUtil<TComplainDealManSysSet> util = new ExcelUtil<TComplainDealManSysSet>(TComplainDealManSysSet.class);
return util.exportExcel(list, "燃气投诉处置的管理制度维护数据");
}
/**
* 获取燃气投诉处置的管理制度维护详细信息
*/
@GetMapping(value = "/{fComplainDealManSysSetId}")
public AjaxResult getInfo(@PathVariable("fComplainDealManSysSetId") Long fComplainDealManSysSetId)
{
return AjaxResult.success(tComplainDealManSysSetService.selectTComplainDealManSysSetById(fComplainDealManSysSetId));
}
/**
* 新增燃气投诉处置的管理制度维护
*/
@Log(title = "燃气投诉处置的管理制度维护", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TComplainDealManSysSet tComplainDealManSysSet)
{
return toAjax(tComplainDealManSysSetService.insertTComplainDealManSysSet(tComplainDealManSysSet));
}
/**
* 修改燃气投诉处置的管理制度维护
*/
@Log(title = "燃气投诉处置的管理制度维护", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TComplainDealManSysSet tComplainDealManSysSet)
{
return toAjax(tComplainDealManSysSetService.updateTComplainDealManSysSet(tComplainDealManSysSet));
}
/**
* 删除燃气投诉处置的管理制度维护
*/
@Log(title = "燃气投诉处置的管理制度维护", businessType = BusinessType.DELETE)
@DeleteMapping("/{fComplainDealManSysSetIds}")
public AjaxResult remove(@PathVariable Long[] fComplainDealManSysSetIds)
{
return toAjax(tComplainDealManSysSetService.deleteTComplainDealManSysSetByIds(fComplainDealManSysSetIds));
}
}
package com.zehong.web.controller.complainDeal;
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.domain.entity.SysUser;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.ServletUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.domain.TComplainDealOverSuper;
import com.zehong.system.service.ITComplainDealOverSuperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 燃气投诉处置-超时督办Controller
*
* @author zehong
* @date 2024-06-13
*/
@RestController
@RequestMapping("/complainDeal/super")
public class TComplainDealOverSuperController extends BaseController
{
@Autowired
private ITComplainDealOverSuperService tComplainDealOverSuperService;
@Autowired
private TokenService tokenService;
/**
* 查询燃气投诉处置-超时督办列表
*/
@GetMapping("/list")
public TableDataInfo list(TComplainDealOverSuper tComplainDealOverSuper)
{
startPage();
List<TComplainDealOverSuper> list = tComplainDealOverSuperService.selectTComplainDealOverSuperList(tComplainDealOverSuper);
return getDataTable(list);
}
/**
* 导出燃气投诉处置-超时督办列表
*/
@Log(title = "燃气投诉处置-超时督办", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TComplainDealOverSuper tComplainDealOverSuper)
{
List<TComplainDealOverSuper> list = tComplainDealOverSuperService.selectTComplainDealOverSuperList(tComplainDealOverSuper);
ExcelUtil<TComplainDealOverSuper> util = new ExcelUtil<TComplainDealOverSuper>(TComplainDealOverSuper.class);
return util.exportExcel(list, "燃气投诉处置-超时督办数据");
}
/**
* 获取燃气投诉处置-超时督办详细信息
*/
@GetMapping(value = "/{complainDealOverSuperId}")
public AjaxResult getInfo(@PathVariable("complainDealOverSuperId") Long complainDealOverSuperId)
{
return AjaxResult.success(tComplainDealOverSuperService.selectTComplainDealOverSuperById(complainDealOverSuperId));
}
/**
* 新增燃气投诉处置-超时督办
*/
@Log(title = "燃气投诉处置-超时督办", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TComplainDealOverSuper tComplainDealOverSuper)
{
return toAjax(tComplainDealOverSuperService.insertTComplainDealOverSuper(tComplainDealOverSuper));
}
/**
* 修改燃气投诉处置-超时督办
*/
@Log(title = "燃气投诉处置-超时督办", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TComplainDealOverSuper tComplainDealOverSuper)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
//说明是企业反馈了
if (!"-2".equals(user.getDeptId())) {
tComplainDealOverSuper.setOvertimeSupervision("1");
}
return toAjax(tComplainDealOverSuperService.updateTComplainDealOverSuper(tComplainDealOverSuper));
}
/**
* 删除燃气投诉处置-超时督办
*/
@Log(title = "燃气投诉处置-超时督办", businessType = BusinessType.DELETE)
@DeleteMapping("/{complainDealOverSuperIds}")
public AjaxResult remove(@PathVariable Long[] complainDealOverSuperIds)
{
return toAjax(tComplainDealOverSuperService.deleteTComplainDealOverSuperByIds(complainDealOverSuperIds));
}
/**
* 查询燃气投诉处置-超时督办列表-根据处置id 和 状态
*/
@GetMapping("/getOverSuperByComplainDealIdAndStatus")
public AjaxResult getOverSuperByComplainDealIdAndStatus(TComplainDealOverSuper tComplainDealOverSuper) {
return AjaxResult.success(tComplainDealOverSuperService.getOverSuperByComplainDealIdAndStatus(tComplainDealOverSuper));
}
/**
*
* 超时督办确认反馈
* @param tComplainDealOverSuper t
* @return a
*/
@PostMapping("/overtimeSupervisionFeedbackConfirmation")
public AjaxResult overtimeSupervisionFeedbackConfirmation(@RequestBody TComplainDealOverSuper tComplainDealOverSuper){
return toAjax(tComplainDealOverSuperService.overtimeSupervisionFeedbackConfirmation(tComplainDealOverSuper));
}
}
package com.zehong.web.controller.complainDeal;
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.TComplainDealTransfer;
import com.zehong.system.service.ITComplainDealTransferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 燃气投诉处置-转办记录Controller
*
* @author zehong
* @date 2024-06-06
*/
@RestController
@RequestMapping("/complainDeal/transfer")
public class TComplainDealTransferController extends BaseController
{
@Autowired
private ITComplainDealTransferService tComplainDealTransferService;
/**
* 查询燃气投诉处置-转办记录列表
*/
@GetMapping("/list")
public TableDataInfo list(TComplainDealTransfer tComplainDealTransfer)
{
startPage();
List<TComplainDealTransfer> list = tComplainDealTransferService.selectTComplainDealTransferList(tComplainDealTransfer);
return getDataTable(list);
}
/**
* 导出燃气投诉处置-转办记录列表
*/
@Log(title = "燃气投诉处置-转办记录", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TComplainDealTransfer tComplainDealTransfer)
{
List<TComplainDealTransfer> list = tComplainDealTransferService.selectTComplainDealTransferList(tComplainDealTransfer);
ExcelUtil<TComplainDealTransfer> util = new ExcelUtil<TComplainDealTransfer>(TComplainDealTransfer.class);
return util.exportExcel(list, "燃气投诉处置-转办记录数据");
}
/**
* 获取燃气投诉处置-转办记录详细信息-根据 投诉处置id查
*/
@GetMapping(value = "/{complainDealTransferId}")
public AjaxResult getInfo(@PathVariable("complainDealTransferId") Long complainDealTransferId)
{
return AjaxResult.success(tComplainDealTransferService.selectTComplainDealTransferById(complainDealTransferId));
}
/**
* 获取燃气投诉处置-转办记录详细信息-根据 投诉处置id查
*/
@GetMapping(value = "/queryByComplainDealId/{complainDealId}")
public AjaxResult queryComplainDealTransferListByComplainDealId(@PathVariable("complainDealId") Long complainDealId)
{
return AjaxResult.success(tComplainDealTransferService.queryComplainDealTransferListByComplainDealId(complainDealId));
}
/**
* 新增燃气投诉处置-转办记录
*/
@Log(title = "燃气投诉处置-转办记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TComplainDealTransfer tComplainDealTransfer)
{
return tComplainDealTransferService.insertTComplainDealTransfer(tComplainDealTransfer);
}
/**
* 修改燃气投诉处置-转办记录
*/
@Log(title = "燃气投诉处置-转办记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TComplainDealTransfer tComplainDealTransfer)
{
return toAjax(tComplainDealTransferService.updateTComplainDealTransfer(tComplainDealTransfer));
}
/**
* 删除燃气投诉处置-转办记录
*/
@Log(title = "燃气投诉处置-转办记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{complainDealTransferIds}")
public AjaxResult remove(@PathVariable Long[] complainDealTransferIds)
{
return toAjax(tComplainDealTransferService.deleteTComplainDealTransferByIds(complainDealTransferIds));
}
}
...@@ -95,3 +95,5 @@ zehong: ...@@ -95,3 +95,5 @@ zehong:
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
captchaType: math captchaType: math
# ureport访问路径-测试
ureporturl: http://127.0.0.1:8905/gassafety
...@@ -95,3 +95,5 @@ zehong: ...@@ -95,3 +95,5 @@ zehong:
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
captchaType: math captchaType: math
# ureport访问路径-测试
ureporturl: http://127.0.0.1:8905/gassafety
...@@ -94,6 +94,8 @@ zehong: ...@@ -94,6 +94,8 @@ zehong:
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
captchaType: math captchaType: math
# ureport访问路径-测试
ureporturl: http://127.0.0.1:8905/gassafety
zhengfu: zhengfu:
#appId #appId
appId: 6e2c7b5a4g1h0fd9 appId: 6e2c7b5a4g1h0fd9
......
ureport.disableHttpSessionReportCache=false
ureport.disableFileProvider=true
ureport.fileStoreDir=${zehong.profile}/ureport2
ureport.debug=true
...@@ -134,6 +134,18 @@ ...@@ -134,6 +134,18 @@
<version>4.5.2</version> <version>4.5.2</version>
</dependency> </dependency>
<!-- easyexcel-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.3.4</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -121,6 +121,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -121,6 +121,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/common/download/resource**").anonymous() .antMatchers("/common/download/resource**").anonymous()
.antMatchers("/swagger-ui.html").anonymous() .antMatchers("/swagger-ui.html").anonymous()
.antMatchers("/swagger-resources/**").anonymous() .antMatchers("/swagger-resources/**").anonymous()
.antMatchers("/ureport/**").anonymous()
.antMatchers("/webjars/**").anonymous() .antMatchers("/webjars/**").anonymous()
.antMatchers("/*/api-docs").anonymous() .antMatchers("/*/api-docs").anonymous()
.antMatchers("/druid/**").anonymous() .antMatchers("/druid/**").anonymous()
......
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
</dependency> </dependency>
<!--ureport2 依赖-->
<dependency>
<groupId>com.bstek.ureport</groupId>
<artifactId>ureport2-console</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
package com.zehong.system.config.easyexcel;
import com.alibaba.excel.write.handler.context.RowWriteHandlerContext;
import com.alibaba.excel.write.style.row.AbstractRowHeightStyleStrategy;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row;
import org.springframework.util.ObjectUtils;
import java.util.Iterator;
public class CustomCellWriteHeightConfig extends AbstractRowHeightStyleStrategy {
/**
* 默认高度
*/
private static final Integer DEFAULT_HEIGHT = 300;
@Override
protected void setHeadColumnHeight(Row row, int relativeRowIndex) {
row.setHeight((short) (2 * DEFAULT_HEIGHT));
}
@Override
protected void setContentColumnHeight(Row row, int relativeRowIndex) {
Iterator<Cell> cellIterator = row.cellIterator();
if (!cellIterator.hasNext()) {
return;
}
// 默认为 1 行高度
int maxHeight = 1;
while (cellIterator.hasNext()) {
Cell cell = cellIterator.next();
if (cell.getCellType() == CellType.STRING) {
String value = cell.getStringCellValue();
for (int i = 0; i < value.length(); i += 10) {
if (i + 10 < value.length()) {
value = value.substring(0, i) + "\n" + value.substring(i, i + 10) + value.substring(i + 10);
} else {
value = value.substring(0, i) + "\n" + value.substring(i);
}
}
if (value.contains("\n")) {
int length = value.split("\n").length;
maxHeight = Math.max(maxHeight, length);
}
}
}
row.setHeight((short) (maxHeight * DEFAULT_HEIGHT));
}
@Override
public void afterRowDispose(RowWriteHandlerContext context) {
if (context.getHead() != null) {
if(ObjectUtils.isEmpty(context.getRelativeRowIndex())){
return;
}
if (Boolean.TRUE.equals(context.getHead())) {
this.setHeadColumnHeight(context.getRow(), context.getRelativeRowIndex());
} else {
this.setContentColumnHeight(context.getRow(), context.getRelativeRowIndex());
}
}
}
}
package com.zehong.system.config.easyexcel;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.Head;
import com.alibaba.excel.metadata.data.CellData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import com.alibaba.excel.write.style.column.AbstractColumnWidthStyleStrategy;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Sheet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class CustomCellWriteWidthConfig extends AbstractColumnWidthStyleStrategy {
private final Map<Integer, Map<Integer, Integer>> CACHE = new HashMap<>();
@Override
protected void setColumnWidth(WriteSheetHolder writeSheetHolder, List<WriteCellData<?>> cellDataList, Cell cell, Head head, Integer integer, Boolean isHead) {
boolean needSetWidth = isHead || !CollectionUtils.isEmpty(cellDataList);
if (needSetWidth) {
Map<Integer, Integer> maxColumnWidthMap = CACHE.computeIfAbsent(writeSheetHolder.getSheetNo(), k -> new HashMap<>());
Integer columnWidth = this.dataLength(cellDataList, cell, isHead);
if (columnWidth > 0) {
if (columnWidth > 10) {
columnWidth = 20;
}else{
columnWidth = 10;
}
Integer maxColumnWidth = maxColumnWidthMap.get(cell.getColumnIndex());
if (maxColumnWidth == null || columnWidth > maxColumnWidth) {
maxColumnWidthMap.put(cell.getColumnIndex(), columnWidth);
Sheet sheet = writeSheetHolder.getSheet();
sheet.setColumnWidth(cell.getColumnIndex(), 256 * columnWidth + 184);
}
}
}
}
/**
* 计算长度
*
* @param cellDataList
* @param cell
* @param isHead
* @return
*/
private Integer dataLength(List<WriteCellData<?>> cellDataList, Cell cell, Boolean isHead) {
if (isHead) {
return cell.getStringCellValue().getBytes().length;
} else {
CellData<?> cellData = cellDataList.get(0);
CellDataTypeEnum type = cellData.getType();
if (type == null) {
return -1;
} else {
switch (type) {
case STRING:
// 换行符(数据需要提前解析好)
int index = cellData.getStringValue().indexOf("\n");
return index != -1 ?
cellData.getStringValue().substring(0, index).getBytes().length + 1 : cellData.getStringValue().getBytes().length + 1;
case BOOLEAN:
return cellData.getBooleanValue().toString().getBytes().length;
case NUMBER:
return cellData.getNumberValue().toString().getBytes().length;
default:
return -1;
}
}
}
}
}
package com.zehong.system.config.ureport;
import com.bstek.ureport.exception.ReportException;
import com.bstek.ureport.provider.report.ReportFile;
import com.bstek.ureport.provider.report.ReportProvider;
import com.zehong.common.utils.ServletUtils;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.util.*;
@Component
@PropertySource(value = { "classpath:ureport.properties" })
public abstract class FileReportProvider implements ReportProvider {
private String prefix="file:";
private boolean disabled;
@Getter
@Setter
@Value("${ureport.fileStoreDir}")
private String fileStoreDir;
@PostConstruct
public void init(){
File file = new File(fileStoreDir);
if(!file.exists()){
file.mkdirs();
}
}
@Override
public InputStream loadReport(String file) {
HttpServletRequest request = ServletUtils.getRequest();
if(file.startsWith(prefix)){
file=file.substring(prefix.length(),file.length());
}
String fullPath=fileStoreDir+"/"+file;
try {
return new FileInputStream(fullPath);
} catch (FileNotFoundException e) {
throw new ReportException(e);
}
}
public abstract void deleteReport(String file);
// @Override
// public void deleteReport(String file) {
// if(file.startsWith(prefix)){
// file=file.substring(prefix.length(),file.length());
// }
// String fullPath=fileStoreDir+"/"+file;
// File f=new File(fullPath);
// if(f.exists()){
// f.delete();
// }
// }
@Override
public List<ReportFile> getReportFiles() {
File file=new File(fileStoreDir);
List<ReportFile> list=new ArrayList<ReportFile>();
for(File f:file.listFiles()){
Calendar calendar=Calendar.getInstance();
calendar.setTimeInMillis(f.lastModified());
list.add(new ReportFile(f.getName(),calendar.getTime()));
}
Collections.sort(list, new Comparator<ReportFile>(){
@Override
public int compare(ReportFile f1, ReportFile f2) {
return f2.getUpdateDate().compareTo(f1.getUpdateDate());
}
});
return list;
}
public abstract void saveReport(String file, String content);
// @Override
// public void saveReport(String file, String content) {
// if(file.startsWith(prefix)){
// file=file.substring(prefix.length(),file.length());
// }
// String fullPath=fileStoreDir+"/"+file;
// FileOutputStream outStream=null;
// try{
// outStream=new FileOutputStream(new File(fullPath));
// IOUtils.write(content, outStream,"utf-8");
// }catch(Exception ex){
// throw new ReportException(ex);
// }finally{
// if(outStream!=null){
// try {
// outStream.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
// }
// }
// }
@Override
public String getName() {
return "自定义文件系统";
}
@Override
public boolean disabled() {
return false;
}
@Override
public String getPrefix() {
return prefix;
}
}
package com.zehong.system.config.ureport;
import com.zehong.common.constant.HttpStatus;
import lombok.Data;
@Data
public class ResponseData<T> {
private Boolean success;
private Integer code;
private String msg;
private T data;
public ResponseData(){
}
public ResponseData(Boolean success, Integer code, String msg, T data) {
this.success = success;
this.code = code;
this.msg = msg;
this.data = data;
}
public static <T> ResponseData<T> success(String msg, T data){
return new ResponseData<T>(true, HttpStatus.SUCCESS,msg,data);
}
public static <T> ResponseData<T> success(String msg){
return ResponseData.success(msg,null);
}
public static <T> ResponseData<T> success(T data){
return ResponseData.success(null,data);
}
public static <T> ResponseData<T> success(){
return ResponseData.success("请求成功",null);
}
public static <T> ResponseData<T> error(Integer code, String msg, T data){
return new ResponseData<T>(false,code,msg,data);
}
public static <T> ResponseData<T> error(Integer code, String msg){
return ResponseData.error(code,msg,null);
}
public static <T> ResponseData<T> error(String msg){
return ResponseData.error(HttpStatus.ERROR,msg,null);
}
public static <T> ResponseData<T> error(){
return ResponseData.error(HttpStatus.ERROR,"操作失败",null);
}
}
package com.zehong.system.config.ureport;
import com.bstek.ureport.console.UReportServlet;
import com.bstek.ureport.definition.datasource.BuildinDatasource;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.sql.DataSource;
import java.sql.Connection;
@Configuration
public class UReportConfig implements BuildinDatasource {
@Autowired
private DataSource datasource;
@Bean
public ServletRegistrationBean ureport2Servlet() {
ServletRegistrationBean registrationBean = new ServletRegistrationBean(new UReportServlet(), "/ureport/*");
return registrationBean;
}
@Override
public String name() {
return "内部数据源";
}
@SneakyThrows
@Override
public Connection getConnection() {
return datasource.getConnection();
}
}
package com.zehong.system.config.ureport;
import com.bstek.ureport.exception.ReportException;
import com.zehong.system.domain.BaseExportTemp;
import com.zehong.system.mapper.BaseExportTempMapper;
import org.apache.commons.io.IOUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;
@Service
public class UreportBusinessService extends FileReportProvider{
@Resource
private BaseExportTempMapper baseExportTempMapper;
@Override
public void deleteReport(String file) {
if(file.startsWith(getPrefix())){
file=file.substring(getPrefix().length(),file.length());
}
String fullPath=getFileStoreDir()+"/"+file;
//删除数据库记录
BaseExportTemp baseExportTemp = baseExportTempMapper.selectSignleByFullPath(fullPath);
if(baseExportTemp!=null){
baseExportTempMapper.deleteBaseExportTempById(baseExportTemp.getId());
}
File f=new File(fullPath);
if(f.exists()){
f.delete();
}
}
@Override
public void saveReport(String file, String content) {
if(file.startsWith(getPrefix())){
file=file.substring(getPrefix().length(),file.length());
}
String fullPath=getFileStoreDir()+"/"+file;
FileOutputStream outStream=null;
try{
outStream=new FileOutputStream(new File(fullPath));
IOUtils.write(content, outStream,"utf-8");
//判断模板是否已存在---根据模板fullPath查询
BaseExportTemp baseExportTemp = baseExportTempMapper.selectSignleByFullPath(fullPath);
if(baseExportTemp!=null){
//更新模板数据库
baseExportTemp.setContent(content);
baseExportTemp.setUpdateTime(new Date());
baseExportTempMapper.updateBaseExportTemp(baseExportTemp);
}else{
//将模板数据保存在数据库中
baseExportTemp = new BaseExportTemp();
baseExportTemp.setContent(content);
baseExportTemp.setFileStoreDir(getFileStoreDir());
baseExportTemp.setFullPath(fullPath);
baseExportTemp.setName(file.replaceAll("\\.ureport\\.xml",""));
baseExportTemp.setPrefix(getPrefix());
baseExportTemp.setTempFileName(file);
baseExportTemp.setCreateTime(new Date());
baseExportTempMapper.insertBaseExportTemp(baseExportTemp);
}
}catch(Exception ex){
throw new ReportException(ex);
}finally{
if(outStream!=null){
try {
outStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
package com.zehong.system.controller;
import com.zehong.common.annotation.RepeatSubmit;
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.utils.DateUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.config.ureport.ResponseData;
import com.zehong.system.domain.BaseExportTemp;
import com.zehong.system.domain.dto.BaseTempExportDTO;
import com.zehong.system.service.IBaseExportTempService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;
import java.util.stream.Collectors;
/**
* ureport2模板管理Controller
*
* @author wanghao
* @date 2024-06-11
*/
@RestController
@RequestMapping("/base/baseExportTemp")
public class BaseExportTempController extends BaseController
{
@Autowired
private IBaseExportTempService baseExportTempService;
@Autowired
Environment environment;
/**
* 查询ureport2模板管理列表
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:list')")
@GetMapping("/list")
public TableDataInfo list(BaseExportTemp baseExportTemp)
{
startPage();
List<BaseExportTemp> list = baseExportTempService.selectBaseExportTempList(baseExportTemp);
return getDataTable(list);
}
/**
* 导出ureport2模板管理列表
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:export')")
@PostMapping("/export")
public void export(HttpServletResponse response, BaseExportTemp baseExportTemp)
{
List<BaseExportTemp> list = baseExportTempService.selectBaseExportTempList(baseExportTemp);
ExcelUtil<BaseExportTemp> util = new ExcelUtil<BaseExportTemp>(BaseExportTemp.class);
util.exportExcel(list, "ureport2模板管理数据");
}
/**
* 获取ureport2模板管理详细信息
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:query')")
@GetMapping(value = "/{id}")
public ResponseData<BaseExportTemp> getInfo(@PathVariable("id") Long id)
{
return ResponseData.success(baseExportTempService.selectBaseExportTempById(id));
}
/**
* 新增ureport2模板管理
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:add')")
@PostMapping
@RepeatSubmit
public ResponseData add(@RequestBody @Valid BaseExportTemp baseExportTemp)
{
int i = baseExportTempService.insertBaseExportTemp(baseExportTemp);
if(i>0){
//返回主键
return ResponseData.success(baseExportTemp.getId());
}else{
return ResponseData.error();
}
}
/**
* 修改ureport2模板管理
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:edit')")
@PutMapping
@RepeatSubmit
public ResponseData edit(@RequestBody @Valid BaseExportTemp baseExportTemp)
{
int i = baseExportTempService.updateBaseExportTemp(baseExportTemp);
if(i>0){
//返回主键
return ResponseData.success(baseExportTemp.getId());
}else{
return ResponseData.error();
}
}
/**
* 删除ureport2模板管理
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:remove')")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
//return toResult(baseExportTempService.deleteBaseExportTempByIds(ids));
//逻辑删除
return AjaxResult.success(baseExportTempService.setDeleteByIds(ids));
}
/**
* 查询ureport2模板管理列表---不进行分页
*/
@PreAuthorize("@ss.hasPermi('base:baseExportTemp:list')")
@PostMapping("/getDataList")
public ResponseData<List<BaseExportTemp>> getDataList(@RequestBody BaseExportTemp baseExportTemp)
{
List<BaseExportTemp> list = baseExportTempService.selectBaseExportTempList(baseExportTemp);
return ResponseData.success(list);
}
/**
* 跳转到添加模板页面
* @return
*/
@GetMapping("/addTemp")
@PreAuthorize("@ss.hasPermi('baseExportTemp:baseExportTemp:add')")
public String addTemp(){
// return "http://"+ IpUtils.getHostIp() +":"+environment.getProperty("server.port")+"/ureport/designer";
return environment.getProperty("zehong.ureporturl")+"/ureport/designer";
}
/**
* 跳转到修改模板页面
* @return
*/
@GetMapping("/editTemp/{id}")
@PreAuthorize("@ss.hasPermi('baseExportTemp:baseExportTemp:edit')")
public String editTemp(@PathVariable Long id){
BaseExportTemp baseExportTemp1 = baseExportTempService.selectBaseExportTempById(id);
if(baseExportTemp1==null){
throw new SecurityException("当前模板不存在");
}
// return "http://"+ IpUtils.getHostIp() +":"+environment.getProperty("server.port")+"/ureport/designer"+"?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
return environment.getProperty("zehong.ureporturl")+"/ureport/designer"+"?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
}
/**
* 跳转到预览模板页面
* @return
*/
@GetMapping("/previwTemp/{id}")
@PreAuthorize("@ss.hasPermi('baseExportTemp:baseExportTemp:list')")
public String previwTemp(@PathVariable Long id){
BaseExportTemp baseExportTemp1 = baseExportTempService.selectBaseExportTempById(id);
if(baseExportTemp1==null){
throw new SecurityException("当前模板不存在");
}
// return "http://"+ IpUtils.getHostIp() +":"+environment.getProperty("server.port")+"/ureport/preview?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
return environment.getProperty("zehong.ureporturl")+"/ureport/preview?_u="+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName();
}
/**
* 实际业务--跳转到预览模板页面
* @return
*/
@GetMapping("/businessPreviwTemp")
public String businessPreviwTemp(@Valid BaseTempExportDTO baseTempExportDTO){
BaseExportTemp baseExportTemp1 = baseExportTempService.selectParamByCode(baseTempExportDTO.getCode());
if(baseExportTemp1==null){
throw new SecurityException("当前模板不存在");
}
String extraStr = "";
if(StringUtils.isNotBlank(baseTempExportDTO.getOrderNo())){
extraStr = extraStr+"&orderNo="+baseTempExportDTO.getOrderNo();
}
if(baseTempExportDTO.getExtraParams()!=null){
String extraParams = baseTempExportDTO.getExtraParams().stream().collect(Collectors.joining(","));
extraStr = extraStr+"&extraParams="+extraParams;
}
// return "http://"+ IpUtils.getHostIp() +":"
// +environment.getProperty("server.port")+"/ureport/preview?_u="
// +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
// +"&orderNo="+orderNo;
//直接跳转到PDF预览页面
// return "http://"+ IpUtils.getHostIp() +":"
// +environment.getProperty("server.port")+"/ureport/pdf/show?_u="
// +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
// +"&orderNo="+orderNo;
return environment.getProperty("zehong.ureporturl")+"/ureport/pdf/show?_u="
+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+extraStr;
}
/**
* 实际业务--导出excel
* @return
*/
@GetMapping("/businessExportExcel")
public String businessExportExcel(@Valid BaseTempExportDTO baseTempExportDTO){
BaseExportTemp baseExportTemp1 = baseExportTempService.selectParamByCode(baseTempExportDTO.getCode());
if(baseExportTemp1==null){
throw new SecurityException("当前模板不存在");
}
// return "http://"+ IpUtils.getHostIp() +":"
// +environment.getProperty("server.port")+"/ureport/preview?_u="
// +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
// +"&orderNo="+orderNo;
//直接跳转到PDF预览页面
// return "http://"+ IpUtils.getHostIp() +":"
// +environment.getProperty("server.port")+"/ureport/excel?_u="
// +baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
// +"&orderNo="+orderNo;
String extraStr = "";
if(StringUtils.isNotBlank(baseTempExportDTO.getOrderNo())){
extraStr = extraStr+"&orderNo="+baseTempExportDTO.getOrderNo();
}
if(baseTempExportDTO.getBeginTime()!=null){
extraStr = extraStr+"&beginTime="+ DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",baseTempExportDTO.getBeginTime());
}
if(baseTempExportDTO.getEndTime()!=null){
extraStr = extraStr+"&endTime="+ DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",baseTempExportDTO.getEndTime());
}
if(baseTempExportDTO.getExtraParams()!=null){
String extraParams = baseTempExportDTO.getExtraParams().stream().collect(Collectors.joining(","));
extraStr = extraStr+"&extraParams="+extraParams;
}
return environment.getProperty("zehong.ureporturl")+"/ureport/excel?_u="
+baseExportTemp1.getPrefix()+baseExportTemp1.getTempFileName()
+extraStr;
}
}
package com.zehong.system.domain;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@Data
public class BaseExportTemp extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 模板名称 */
@Excel(name = "模板名称")
private String name;
/** 模板编号(该编号取自字典表) */
@Excel(name = "模板编号(该编号取自字典表)")
private String code;
/** 模板文件名称 */
@Excel(name = "模板文件名称")
private String tempFileName;
/** 访问前缀 */
@Excel(name = "访问前缀")
private String prefix;
/** 存储目录 */
@Excel(name = "存储目录")
private String fileStoreDir;
/** 完整路径 */
@Excel(name = "完整路径")
private String fullPath;
/** 模板内容 */
@Excel(name = "模板内容")
private String content;
/** 创建人主键 */
@Excel(name = "创建人主键")
private Long createUserId;
/** 创建人姓名 */
@Excel(name = "创建人姓名")
private String createUserName;
/** 更新人主键 */
@Excel(name = "更新人主键")
private Long updateUserId;
/** 更新人姓名 */
@Excel(name = "更新人姓名")
private String updateUserName;
/** 启用禁用状态(字典通用是否) */
@Excel(name = "启用禁用状态(字典通用是否)")
private String enableFlag;
/** 删除状态(通用是否) */
@Excel(name = "删除状态(通用是否)")
private String deleteFlag;
/** 备用字段1 */
@Excel(name = "备用字段1")
private String spareParam1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private String spareParam2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private String spareParam3;
/** 备用字段4 */
@Excel(name = "备用字段4")
private String spareParam4;
/** 备用字段5 */
@Excel(name = "备用字段5")
private String spareParam5;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("code", getCode())
.append("tempFileName", getTempFileName())
.append("prefix", getPrefix())
.append("fileStoreDir", getFileStoreDir())
.append("fullPath", getFullPath())
.append("content", getContent())
.append("createUserId", getCreateUserId())
.append("createUserName", getCreateUserName())
.append("createTime", getCreateTime())
.append("updateUserId", getUpdateUserId())
.append("updateUserName", getUpdateUserName())
.append("updateTime", getUpdateTime())
.append("enableFlag", getEnableFlag())
.append("deleteFlag", getDeleteFlag())
.append("remark", getRemark())
.append("spareParam1", getSpareParam1())
.append("spareParam2", getSpareParam2())
.append("spareParam3", getSpareParam3())
.append("spareParam4", getSpareParam4())
.append("spareParam5", getSpareParam5())
.toString();
}
}
...@@ -61,7 +61,7 @@ public class TComplainDeal extends BaseEntity ...@@ -61,7 +61,7 @@ public class TComplainDeal extends BaseEntity
private String complainAssignMan; private String complainAssignMan;
/** 任务状态:1.派发中 2.反馈 3.归档 */ /** 任务状态:1.派发中 2.反馈 3.归档 */
@Excel(name = "任务状态:1.派发中 2.反馈 3.归档") @Excel(name = "任务状态:1.派发中 2.反馈 3.归档 4.企业退回")
private String complainStatus; private String complainStatus;
/** 是否删除(0正常,1删除) */ /** 是否删除(0正常,1删除) */
...@@ -72,7 +72,28 @@ public class TComplainDeal extends BaseEntity ...@@ -72,7 +72,28 @@ public class TComplainDeal extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
public void setComplainDealId(Long complainDealId) /*投诉类别 */
private String complainType;
// 超时督办 0-创建,1-企业反馈,2-确认反馈,不确认时监管部门直接改成 0
private String overtimeSupervision;
// 所属区域
private String township;
/*
* 省厅数据源或平台自建数据源(0-自建,1-省厅),默认0-自建
*/
private String provincialDataFlag;
public String getProvincialDataFlag() {
return provincialDataFlag;
}
public void setProvincialDataFlag(String provincialDataFlag) {
this.provincialDataFlag = provincialDataFlag;
}
public void setComplainDealId(Long complainDealId)
{ {
this.complainDealId = complainDealId; this.complainDealId = complainDealId;
} }
...@@ -198,6 +219,30 @@ public class TComplainDeal extends BaseEntity ...@@ -198,6 +219,30 @@ public class TComplainDeal extends BaseEntity
this.dealTime = dealTime; this.dealTime = dealTime;
} }
public String getComplainType() {
return complainType;
}
public void setComplainType(String complainType) {
this.complainType = complainType;
}
public String getOvertimeSupervision() {
return overtimeSupervision;
}
public void setOvertimeSupervision(String overtimeSupervision) {
this.overtimeSupervision = overtimeSupervision;
}
public String getTownship() {
return township;
}
public void setTownship(String township) {
this.township = township;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.domain;
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;
/**
* 燃气投诉处置-评价对象 t_complain_deal_evaluate
*
* @author zehong
* @date 2024-06-14
*/
public class TComplainDealEvaluate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 投诉处置评价id */
private Long complainDealEvaluateId;
/** 投诉处置id */
private Long complainDealId;
/** 评价内容 */
@Excel(name = "评价内容")
private String evaluateContent;
/** 评分 */
@Excel(name = "评分")
private Long evaluateRate;
public void setComplainDealEvaluateId(Long complainDealEvaluateId)
{
this.complainDealEvaluateId = complainDealEvaluateId;
}
public Long getComplainDealEvaluateId()
{
return complainDealEvaluateId;
}
public void setEvaluateContent(String evaluateContent)
{
this.evaluateContent = evaluateContent;
}
public String getEvaluateContent()
{
return evaluateContent;
}
public void setEvaluateRate(Long evaluateRate)
{
this.evaluateRate = evaluateRate;
}
public Long getEvaluateRate()
{
return evaluateRate;
}
public Long getComplainDealId() {
return complainDealId;
}
public void setComplainDealId(Long complainDealId) {
this.complainDealId = complainDealId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("complainDealEvaluateId", getComplainDealEvaluateId())
.append("evaluateContent", getEvaluateContent())
.append("evaluateRate", getEvaluateRate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain;
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;
/**
* 燃气投诉处置的管理制度维护对象 t_complain_deal_man_sys_set
*
* @author zehong
* @date 2024-06-05
*/
public class TComplainDealManSysSet extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long fComplainDealManSysSetId;
/** 制度类型 1-投诉举报,2-服务申请,3-咨询建议 */
@Excel(name = "制度类型 1-投诉举报,2-服务申请,3-咨询建议")
private String fType;
/** 办结及时时长-天 */
@Excel(name = "办结及时时长-天")
private Long fDay;
/** 办结及时时长-小时 */
@Excel(name = "办结及时时长-小时")
private Long fHours;
/** 办结及时时长-分钟 */
@Excel(name = "办结及时时长-分钟")
private Long fMinutes;
/** 办结及时时长-秒 */
@Excel(name = "办结及时时长-秒")
private Long fSeconds;
/** 备注 */
@Excel(name = "备注")
private String fRemarks;
public void setfComplainDealManSysSetId(Long fComplainDealManSysSetId)
{
this.fComplainDealManSysSetId = fComplainDealManSysSetId;
}
public Long getfComplainDealManSysSetId()
{
return fComplainDealManSysSetId;
}
public void setfType(String fType)
{
this.fType = fType;
}
public String getfType()
{
return fType;
}
public void setfDay(Long fDay)
{
this.fDay = fDay;
}
public Long getfDay()
{
return fDay;
}
public void setfHours(Long fHours)
{
this.fHours = fHours;
}
public Long getfHours()
{
return fHours;
}
public void setfMinutes(Long fMinutes)
{
this.fMinutes = fMinutes;
}
public Long getfMinutes()
{
return fMinutes;
}
public void setfSeconds(Long fSeconds)
{
this.fSeconds = fSeconds;
}
public Long getfSeconds()
{
return fSeconds;
}
public void setfRemarks(String fRemarks)
{
this.fRemarks = fRemarks;
}
public String getfRemarks()
{
return fRemarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("fComplainDealManSysSetId", getfComplainDealManSysSetId())
.append("fType", getfType())
.append("fDay", getfDay())
.append("fHours", getfHours())
.append("fMinutes", getfMinutes())
.append("fSeconds", getfSeconds())
.append("fRemarks", getfRemarks())
.toString();
}
}
package com.zehong.system.domain;
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;
/**
* 燃气投诉处置-超时督办对象 t_complain_deal_over_super
*
* @author zehong
* @date 2024-06-14
*/
public class TComplainDealOverSuper extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long complainDealOverSuperId;
/** 投诉处置id */
@Excel(name = "投诉处置id")
private Long complainDealId;
/** 督办事由 */
@Excel(name = "督办事由")
private String supervisionReasons;
/** 反馈 */
@Excel(name = "反馈")
private String concent;
/** 超时督办:0-创建,1-企业反馈,2-确认反馈,不确认时监管部门直接改成 0 */
@Excel(name = "超时督办:0-创建,1-企业反馈,2-确认反馈,不确认时监管部门直接改成 0")
private String overtimeSupervision;
public void setComplainDealOverSuperId(Long complainDealOverSuperId)
{
this.complainDealOverSuperId = complainDealOverSuperId;
}
public Long getComplainDealOverSuperId()
{
return complainDealOverSuperId;
}
public void setComplainDealId(Long complainDealId)
{
this.complainDealId = complainDealId;
}
public Long getComplainDealId()
{
return complainDealId;
}
public void setSupervisionReasons(String supervisionReasons)
{
this.supervisionReasons = supervisionReasons;
}
public String getSupervisionReasons()
{
return supervisionReasons;
}
public void setConcent(String concent)
{
this.concent = concent;
}
public String getConcent()
{
return concent;
}
public void setOvertimeSupervision(String overtimeSupervision)
{
this.overtimeSupervision = overtimeSupervision;
}
public String getOvertimeSupervision()
{
return overtimeSupervision;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("complainDealOverSuperId", getComplainDealOverSuperId())
.append("complainDealId", getComplainDealId())
.append("supervisionReasons", getSupervisionReasons())
.append("concent", getConcent())
.append("overtimeSupervision", getOvertimeSupervision())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain;
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;
/**
* 燃气投诉处置-转办记录对象 t_complain_deal_transfer
*
* @author zehong
* @date 2024-06-14
*/
public class TComplainDealTransfer extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 投诉处置转办id */
private Long complainDealTransferId;
/** 投诉处置id */
@Excel(name = "投诉处置id")
private Long complainDealId;
/** 企业id-省平台调整改成字符创 uuid */
@Excel(name = "企业id-省平台调整改成字符创 uuid")
private String enterpriseId;
/** 企业名称-结果反显 */
@Excel(name = "企业名称-结果反显")
private String enterpriseName;
/** 指派人 */
@Excel(name = "指派人id")
private Long complainAssignManId;
/** 指派人id */
@Excel(name = "指派人")
private String complainAssignMan;
/** 原因 */
@Excel(name = "原因")
private String reasonConcent;
public void setComplainDealTransferId(Long complainDealTransferId)
{
this.complainDealTransferId = complainDealTransferId;
}
public Long getComplainDealTransferId()
{
return complainDealTransferId;
}
public void setComplainDealId(Long complainDealId)
{
this.complainDealId = complainDealId;
}
public Long getComplainDealId()
{
return complainDealId;
}
public void setEnterpriseId(String enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public String getEnterpriseId()
{
return enterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setReasonConcent(String reasonConcent)
{
this.reasonConcent = reasonConcent;
}
public String getReasonConcent()
{
return reasonConcent;
}
public Long getComplainAssignManId() {
return complainAssignManId;
}
public void setComplainAssignManId(Long complainAssignManId) {
this.complainAssignManId = complainAssignManId;
}
public String getComplainAssignMan() {
return complainAssignMan;
}
public void setComplainAssignMan(String complainAssignMan) {
this.complainAssignMan = complainAssignMan;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("complainDealTransferId", getComplainDealTransferId())
.append("complainDealId", getComplainDealId())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("reasonConcent", getReasonConcent())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain.dto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;
@Data
public class BaseTempExportDTO {
@NotBlank(message = "模板代码不能为空")
private String code;
private String orderNo;
private Date beginTime;
private Date endTime;
private List<String> extraParams;
}
package com.zehong.system.domain.dto;
import lombok.Data;
import java.util.Date;
/**
* 投诉处置对象 t_complain_deal_dto
*
* @author zehong
* @date 2024-06-12
*/
@Data
public class TComplainDealDTO {
/** 投诉处置id */
private Long complainDealId;
/** 创建时间 */
private String createTimeYear;
private Date createTime;
private Date updateTime;
/** 任务状态:1.派发中 2.反馈 3.归档 */
private String complainStatus;
/*投诉类别 */
private String complainType;
}
package com.zehong.system.domain.vo;
/**
* 投诉处置统计分析 - 表格形式
*/
public class ComplainDealSummaryAnalysisTableVo {
/**
* 日期
*/
private String date;
/**
* 发生量
*/
private String amount;
/**
* 办结率
*/
private String completionRate;
/**
* 办结及时率
*/
private String timelyCompletionRate;
/**
* 投诉类别
*/
private String complainType;
/**
* 导出时传的 动态标头
*/
private String dynamicTitle;
public String getDynamicTitle() {
return dynamicTitle;
}
public void setDynamicTitle(String dynamicTitle) {
this.dynamicTitle = dynamicTitle;
}
public String getComplainType() {
return complainType;
}
public void setComplainType(String complainType) {
this.complainType = complainType;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getCompletionRate() {
return completionRate;
}
public void setCompletionRate(String completionRate) {
this.completionRate = completionRate;
}
public String getTimelyCompletionRate() {
return timelyCompletionRate;
}
public void setTimelyCompletionRate(String timelyCompletionRate) {
this.timelyCompletionRate = timelyCompletionRate;
}
}
package com.zehong.system.domain.vo;
import java.util.List;
import java.util.Map;
/**
* 投诉处置统计分析
*/
public class ComplainDealSummaryAnalysisVo {
/*
* 类型 发生量统计分析*/
private List<Map<String,String>> typeOfNumberOfComplaints;
/*
* 区域 发生量统计分析*/
private List<Map<String,String>> regionOfNumberOfComplaints;
/*
* 类型 办结率分析*/
private List<Map<String,String>> typeOfCompletionRate;
/*
* 区域 办结率分析*/
private List<Map<String,String>> regionOfCompletionRate;
/*
* 类型 办结及时率分析*/
private List<Map<String,String>> typeOfTimelyCompletionRate;
/*
* 区域 办结及时率分析*/
private List<Map<String,String>> regionOfTimelyCompletionRate;
public List<Map<String, String>> getTypeOfNumberOfComplaints() {
return typeOfNumberOfComplaints;
}
public void setTypeOfNumberOfComplaints(List<Map<String, String>> typeOfNumberOfComplaints) {
this.typeOfNumberOfComplaints = typeOfNumberOfComplaints;
}
public List<Map<String, String>> getRegionOfNumberOfComplaints() {
return regionOfNumberOfComplaints;
}
public void setRegionOfNumberOfComplaints(List<Map<String, String>> regionOfNumberOfComplaints) {
this.regionOfNumberOfComplaints = regionOfNumberOfComplaints;
}
public List<Map<String, String>> getTypeOfCompletionRate() {
return typeOfCompletionRate;
}
public void setTypeOfCompletionRate(List<Map<String, String>> typeOfCompletionRate) {
this.typeOfCompletionRate = typeOfCompletionRate;
}
public List<Map<String, String>> getRegionOfCompletionRate() {
return regionOfCompletionRate;
}
public void setRegionOfCompletionRate(List<Map<String, String>> regionOfCompletionRate) {
this.regionOfCompletionRate = regionOfCompletionRate;
}
public List<Map<String, String>> getTypeOfTimelyCompletionRate() {
return typeOfTimelyCompletionRate;
}
public void setTypeOfTimelyCompletionRate(List<Map<String, String>> typeOfTimelyCompletionRate) {
this.typeOfTimelyCompletionRate = typeOfTimelyCompletionRate;
}
public List<Map<String, String>> getRegionOfTimelyCompletionRate() {
return regionOfTimelyCompletionRate;
}
public void setRegionOfTimelyCompletionRate(List<Map<String, String>> regionOfTimelyCompletionRate) {
this.regionOfTimelyCompletionRate = regionOfTimelyCompletionRate;
}
}
package com.zehong.system.mapper;
import com.zehong.system.domain.BaseExportTemp;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* ureport2模板管理Mapper接口
*
* @author ruoyi
* @date 2022-01-21
*/
public interface BaseExportTempMapper
{
/**
* 查询ureport2模板管理
*
* @param id ureport2模板管理主键
* @return ureport2模板管理
*/
public BaseExportTemp selectBaseExportTempById(Long id);
/**
* 查询ureport2模板管理列表
*
* @param baseExportTemp ureport2模板管理
* @return ureport2模板管理集合
*/
public List<BaseExportTemp> selectBaseExportTempList(BaseExportTemp baseExportTemp);
/**
* 新增ureport2模板管理
*
* @param baseExportTemp ureport2模板管理
* @return 结果
*/
public int insertBaseExportTemp(BaseExportTemp baseExportTemp);
/**
* 修改ureport2模板管理
*
* @param baseExportTemp ureport2模板管理
* @return 结果
*/
public int updateBaseExportTemp(BaseExportTemp baseExportTemp);
/**
* 删除ureport2模板管理
*
* @param id ureport2模板管理主键
* @return 结果
*/
public int deleteBaseExportTempById(Long id);
/**
* 批量删除ureport2模板管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBaseExportTempByIds(Long[] ids);
/**
* 删除ureport2模板管理
*
* @param id ureport2模板管理ID
* @return 结果
*/
public int setDeleteById(@Param("id")Long id,@Param("operId")Long operId,@Param("operName")String operName);
/**
* 批量删除ureport2模板管理---逻辑删除
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int setDeleteByIds(@Param("ids")Long[] ids,@Param("operId")Long operId,@Param("operName")String operName);
/**
* 根据code查询参数
* @param code
* @return
*/
public BaseExportTemp selectParamByCode(@Param("code") String code);
/**
* 根据模板的存放路径查询唯一的模板信息
* @param fullPath
* @return
*/
public BaseExportTemp selectSignleByFullPath(@Param("fullPath") String fullPath);
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TComplainDealEvaluate;
import java.util.List;
/**
* 燃气投诉处置-评价Mapper接口
*
* @author zehong
* @date 2024-06-06
*/
public interface TComplainDealEvaluateMapper
{
/**
* 查询燃气投诉处置-评价
*
* @param complainDealEvaluateId 燃气投诉处置-评价ID
* @return 燃气投诉处置-评价
*/
public TComplainDealEvaluate selectTComplainDealEvaluateById(Long complainDealEvaluateId);
/**
* 查询燃气投诉处置-评价
*
* @param complainDealId 燃气投诉处置Id
* @return 燃气投诉处置-评价
*/
public TComplainDealEvaluate selectTComplainDealEvaluateByComplainDealId(Long complainDealId);
/**
* 查询燃气投诉处置-评价列表
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 燃气投诉处置-评价集合
*/
public List<TComplainDealEvaluate> selectTComplainDealEvaluateList(TComplainDealEvaluate tComplainDealEvaluate);
/**
* 新增燃气投诉处置-评价
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 结果
*/
public int insertTComplainDealEvaluate(TComplainDealEvaluate tComplainDealEvaluate);
/**
* 修改燃气投诉处置-评价
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 结果
*/
public int updateTComplainDealEvaluate(TComplainDealEvaluate tComplainDealEvaluate);
/**
* 删除燃气投诉处置-评价
*
* @param complainDealEvaluateId 燃气投诉处置-评价ID
* @return 结果
*/
public int deleteTComplainDealEvaluateById(Long complainDealEvaluateId);
/**
* 批量删除燃气投诉处置-评价
*
* @param complainDealEvaluateIds 需要删除的数据ID
* @return 结果
*/
public int deleteTComplainDealEvaluateByIds(Long[] complainDealEvaluateIds);
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TComplainDealManSysSet;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 燃气投诉处置的管理制度维护Mapper接口
*
* @author zehong
* @date 2024-06-05
*/
public interface TComplainDealManSysSetMapper
{
/**
* 查询燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetId 燃气投诉处置的管理制度维护ID
* @return 燃气投诉处置的管理制度维护
*/
public TComplainDealManSysSet selectTComplainDealManSysSetById(Long fComplainDealManSysSetId);
/**
* 查询燃气投诉处置的管理制度维护列表
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 燃气投诉处置的管理制度维护集合
*/
public List<TComplainDealManSysSet> selectTComplainDealManSysSetList(TComplainDealManSysSet tComplainDealManSysSet);
/**
* 批量修改
* @param tComplainDealManSysSets p
* @return r
*/
public void batchUpdate(@Param("complainDealManSysSets") List<TComplainDealManSysSet> tComplainDealManSysSets);
/**
* 新增燃气投诉处置的管理制度维护
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 结果
*/
public int insertTComplainDealManSysSet(TComplainDealManSysSet tComplainDealManSysSet);
/**
* 修改燃气投诉处置的管理制度维护
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 结果
*/
public int updateTComplainDealManSysSet(TComplainDealManSysSet tComplainDealManSysSet);
/**
* 删除燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetId 燃气投诉处置的管理制度维护ID
* @return 结果
*/
public int deleteTComplainDealManSysSetById(Long fComplainDealManSysSetId);
/**
* 批量删除燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetIds 需要删除的数据ID
* @return 结果
*/
public int deleteTComplainDealManSysSetByIds(Long[] fComplainDealManSysSetIds);
}
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.domain.dto.TComplainDealDTO;
import com.zehong.system.domain.vo.HomepageVo; import com.zehong.system.domain.vo.HomepageVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -47,6 +48,26 @@ public interface TComplainDealMapper ...@@ -47,6 +48,26 @@ public interface TComplainDealMapper
*/ */
public int insertTComplainDeal(TComplainDeal tComplainDeal); public int insertTComplainDeal(TComplainDeal tComplainDeal);
/**
* 查询所有归档的,并且没删除的
* @return
*/
public List<TComplainDeal> queryAllByNotDelete();
/**
* 查询所有归档的,并且没删除的,看是否有时间范围查询
* @return
*/
public List<TComplainDealDTO> queryAllByNotDeleteAndCreateTime(@Param("startOfMonth") Date startOfMonth,
@Param("endOfMonth") Date endOfMonth,
@Param("complaintCategory") String complaintCategory);
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int clearTComplainDeal(TComplainDeal tComplainDeal);
/** /**
* 修改投诉处置 * 修改投诉处置
* *
......
package com.zehong.system.mapper;
import com.zehong.system.domain.TComplainDealOverSuper;
import java.util.List;
/**
* 燃气投诉处置-超时督办Mapper接口
*
* @author zehong
* @date 2024-06-13
*/
public interface TComplainDealOverSuperMapper
{
/**
* 查询燃气投诉处置-超时督办
*
* @param complainDealOverSuperId 燃气投诉处置-超时督办ID
* @return 燃气投诉处置-超时督办
*/
public TComplainDealOverSuper selectTComplainDealOverSuperById(Long complainDealOverSuperId);
/**
* 查询燃气投诉处置-超时督办列表
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 燃气投诉处置-超时督办集合
*/
public List<TComplainDealOverSuper> selectTComplainDealOverSuperList(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 新增燃气投诉处置-超时督办
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 结果
*/
public int insertTComplainDealOverSuper(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 修改燃气投诉处置-超时督办
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 结果
*/
public int updateTComplainDealOverSuper(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 删除燃气投诉处置-超时督办
*
* @param complainDealOverSuperId 燃气投诉处置-超时督办ID
* @return 结果
*/
public int deleteTComplainDealOverSuperById(Long complainDealOverSuperId);
/**
* 查询燃气投诉处置-超时督办列表-根据处置id 和 状态
* @param tComplainDealOverSuper
* @return
*/
TComplainDealOverSuper getOverSuperByComplainDealIdAndStatus(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 批量删除燃气投诉处置-超时督办
*
* @param complainDealOverSuperIds 需要删除的数据ID
* @return 结果
*/
public int deleteTComplainDealOverSuperByIds(Long[] complainDealOverSuperIds);
}
package com.zehong.system.mapper;
import com.zehong.system.domain.TComplainDealTransfer;
import java.util.List;
/**
* 燃气投诉处置-转办记录Mapper接口
*
* @author zehong
* @date 2024-06-06
*/
public interface TComplainDealTransferMapper
{
/**
* 查询燃气投诉处置-转办记录
*
* @param complainDealTransferId 燃气投诉处置-转办记录ID
* @return 燃气投诉处置-转办记录
*/
public TComplainDealTransfer selectTComplainDealTransferById(Long complainDealTransferId);
/**
* 查询燃气投诉处置-转办记录列表
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 燃气投诉处置-转办记录集合
*/
public List<TComplainDealTransfer> selectTComplainDealTransferList(TComplainDealTransfer tComplainDealTransfer);
/**
* 查询燃气投诉处置-转办记录列表
*
* @param complainDealId 燃气投诉处置Id
* @return 燃气投诉处置-转办记录集合
*/
public List<TComplainDealTransfer> queryComplainDealTransferListByComplainDealId(Long complainDealId);
/**
* 新增燃气投诉处置-转办记录
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 结果
*/
public int insertTComplainDealTransfer(TComplainDealTransfer tComplainDealTransfer);
/**
* 修改燃气投诉处置-转办记录
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 结果
*/
public int updateTComplainDealTransfer(TComplainDealTransfer tComplainDealTransfer);
/**
* 删除燃气投诉处置-转办记录
*
* @param complainDealTransferId 燃气投诉处置-转办记录ID
* @return 结果
*/
public int deleteTComplainDealTransferById(Long complainDealTransferId);
/**
* 批量删除燃气投诉处置-转办记录
*
* @param complainDealTransferIds 需要删除的数据ID
* @return 结果
*/
public int deleteTComplainDealTransferByIds(Long[] complainDealTransferIds);
}
package com.zehong.system.service;
import com.zehong.system.domain.BaseExportTemp;
import java.util.List;
/**
* ureport2模板管理Service接口
*
* @author ruoyi
* @date 2022-01-21
*/
public interface IBaseExportTempService
{
/**
* 查询ureport2模板管理
*
* @param id ureport2模板管理主键
* @return ureport2模板管理
*/
public BaseExportTemp selectBaseExportTempById(Long id);
/**
* 查询ureport2模板管理列表
*
* @param baseExportTemp ureport2模板管理
* @return ureport2模板管理集合
*/
public List<BaseExportTemp> selectBaseExportTempList(BaseExportTemp baseExportTemp);
/**
* 新增ureport2模板管理
*
* @param baseExportTemp ureport2模板管理
* @return 结果
*/
public int insertBaseExportTemp(BaseExportTemp baseExportTemp);
/**
* 修改ureport2模板管理
*
* @param baseExportTemp ureport2模板管理
* @return 结果
*/
public int updateBaseExportTemp(BaseExportTemp baseExportTemp);
/**
* 批量删除ureport2模板管理
*
* @param ids 需要删除的ureport2模板管理主键集合
* @return 结果
*/
public int deleteBaseExportTempByIds(Long[] ids);
/**
* 删除ureport2模板管理信息
*
* @param id ureport2模板管理主键
* @return 结果
*/
public int deleteBaseExportTempById(Long id);
/**
* 批量删除---逻辑删除
*
* @param ids 需要删除的ureport2模板管理ID
* @return 结果
*/
public int setDeleteByIds(Long[] ids);
/**
* 删除---逻辑删除
*
* @param id ureport2模板管理ID
* @return 结果
*/
public int setDeleteById(Long id);
/**
* 根据code查询参数
* @param code
* @return
*/
public BaseExportTemp selectParamByCode(String code);
/**
* 根据模板的存放路径查询唯一的模板信息
* @param fullPath
* @return
*/
public BaseExportTemp selectSignleByFullPath(String fullPath);
}
package com.zehong.system.service;
import com.zehong.system.domain.TComplainDealEvaluate;
import java.util.List;
/**
* 燃气投诉处置-评价Service接口
*
* @author zehong
* @date 2024-06-06
*/
public interface ITComplainDealEvaluateService
{
/**
* 查询燃气投诉处置-评价
*
* @param complainDealEvaluateId 燃气投诉处置-评价ID
* @return 燃气投诉处置-评价
*/
public TComplainDealEvaluate selectTComplainDealEvaluateById(Long complainDealEvaluateId);
/**
* 查询燃气投诉处置-评价
*
* @param complainDealId 燃气投诉处置
* @return 燃气投诉处置-评价
*/
public TComplainDealEvaluate selectTComplainDealEvaluateByComplainDealId(Long complainDealId);
/**
* 查询燃气投诉处置-评价列表
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 燃气投诉处置-评价集合
*/
public List<TComplainDealEvaluate> selectTComplainDealEvaluateList(TComplainDealEvaluate tComplainDealEvaluate);
/**
* 新增燃气投诉处置-评价
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 结果
*/
public int insertTComplainDealEvaluate(TComplainDealEvaluate tComplainDealEvaluate);
/**
* 修改燃气投诉处置-评价
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 结果
*/
public int updateTComplainDealEvaluate(TComplainDealEvaluate tComplainDealEvaluate);
/**
* 批量删除燃气投诉处置-评价
*
* @param complainDealEvaluateIds 需要删除的燃气投诉处置-评价ID
* @return 结果
*/
public int deleteTComplainDealEvaluateByIds(Long[] complainDealEvaluateIds);
/**
* 删除燃气投诉处置-评价信息
*
* @param complainDealEvaluateId 燃气投诉处置-评价ID
* @return 结果
*/
public int deleteTComplainDealEvaluateById(Long complainDealEvaluateId);
}
package com.zehong.system.service;
import com.zehong.system.domain.TComplainDealManSysSet;
import java.util.List;
/**
* 燃气投诉处置的管理制度维护Service接口
*
* @author zehong
* @date 2024-06-05
*/
public interface ITComplainDealManSysSetService
{
/**
* 查询燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetId 燃气投诉处置的管理制度维护ID
* @return 燃气投诉处置的管理制度维护
*/
public TComplainDealManSysSet selectTComplainDealManSysSetById(Long fComplainDealManSysSetId);
/**
* 查询燃气投诉处置的管理制度维护列表
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 燃气投诉处置的管理制度维护集合
*/
public List<TComplainDealManSysSet> selectTComplainDealManSysSetList(TComplainDealManSysSet tComplainDealManSysSet);
/**
* 批量修改
* @param tComplainDealManSysSets s
*/
public void batchUpdate(List<TComplainDealManSysSet> tComplainDealManSysSets);
/**
* 新增燃气投诉处置的管理制度维护
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 结果
*/
public int insertTComplainDealManSysSet(TComplainDealManSysSet tComplainDealManSysSet);
/**
* 修改燃气投诉处置的管理制度维护
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 结果
*/
public int updateTComplainDealManSysSet(TComplainDealManSysSet tComplainDealManSysSet);
/**
* 批量删除燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetIds 需要删除的燃气投诉处置的管理制度维护ID
* @return 结果
*/
public int deleteTComplainDealManSysSetByIds(Long[] fComplainDealManSysSetIds);
/**
* 删除燃气投诉处置的管理制度维护信息
*
* @param fComplainDealManSysSetId 燃气投诉处置的管理制度维护ID
* @return 结果
*/
public int deleteTComplainDealManSysSetById(Long fComplainDealManSysSetId);
}
package com.zehong.system.service;
import com.zehong.system.domain.TComplainDealOverSuper;
import java.util.List;
/**
* 燃气投诉处置-超时督办Service接口
*
* @author zehong
* @date 2024-06-13
*/
public interface ITComplainDealOverSuperService
{
/**
* 查询燃气投诉处置-超时督办
*
* @param complainDealOverSuperId 燃气投诉处置-超时督办ID
* @return 燃气投诉处置-超时督办
*/
public TComplainDealOverSuper selectTComplainDealOverSuperById(Long complainDealOverSuperId);
/**
* 查询燃气投诉处置-超时督办列表
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 燃气投诉处置-超时督办集合
*/
public List<TComplainDealOverSuper> selectTComplainDealOverSuperList(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 新增燃气投诉处置-超时督办
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 结果
*/
public int insertTComplainDealOverSuper(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 修改燃气投诉处置-超时督办
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 结果
*/
public int updateTComplainDealOverSuper(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 批量删除燃气投诉处置-超时督办
*
* @param complainDealOverSuperIds 需要删除的燃气投诉处置-超时督办ID
* @return 结果
*/
public int deleteTComplainDealOverSuperByIds(Long[] complainDealOverSuperIds);
/**
* 删除燃气投诉处置-超时督办信息
*
* @param complainDealOverSuperId 燃气投诉处置-超时督办ID
* @return 结果
*/
public int deleteTComplainDealOverSuperById(Long complainDealOverSuperId);
/**
* 查询燃气投诉处置-超时督办列表-根据处置id 和 状态
* @param tComplainDealOverSuper
* @return
*/
public TComplainDealOverSuper getOverSuperByComplainDealIdAndStatus(TComplainDealOverSuper tComplainDealOverSuper);
/**
* 超时督办确认反馈
* @param tComplainDealOverSuper s
*/
public int overtimeSupervisionFeedbackConfirmation(TComplainDealOverSuper tComplainDealOverSuper);
}
package com.zehong.system.service; package com.zehong.system.service;
import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisVo;
import com.zehong.system.domain.vo.HomepageVo; import com.zehong.system.domain.vo.HomepageVo;
import javax.servlet.http.HttpServletResponse;
/** /**
* 投诉处置Service接口 * 投诉处置Service接口
* *
...@@ -70,4 +75,12 @@ public interface ITComplainDealService ...@@ -70,4 +75,12 @@ public interface ITComplainDealService
public int deleteTComplainDealById(Long complainDealId); public int deleteTComplainDealById(Long complainDealId);
public List<Map<String,Object>> selectUserByenterproseId(String enterproseId); public List<Map<String,Object>> selectUserByenterproseId(String enterproseId);
public ComplainDealSummaryAnalysisVo complainDealSummaryAnalysisMethod();
public List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisMethodTableViews(ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo);
public void complainDealSummaryAnalysisExport(HttpServletResponse httpServletResponse, ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws IOException;
} }
package com.zehong.system.service;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.system.domain.TComplainDealTransfer;
import java.util.List;
import java.util.Map;
/**
* 燃气投诉处置-转办记录Service接口
*
* @author zehong
* @date 2024-06-06
*/
public interface ITComplainDealTransferService
{
/**
* 查询燃气投诉处置-转办记录
*
* @param complainDealTransferId 燃气投诉处置-转办记录ID
* @return 燃气投诉处置-转办记录
*/
public TComplainDealTransfer selectTComplainDealTransferById(Long complainDealTransferId);
/**
* 查询燃气投诉处置-转办记录列表
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 燃气投诉处置-转办记录集合
*/
public List<TComplainDealTransfer> selectTComplainDealTransferList(TComplainDealTransfer tComplainDealTransfer);
/**
* 根据 投诉处置id查询 转办记录列表
* @param complainDealId id
* @return list
*/
public List<Map<String,Object>> queryComplainDealTransferListByComplainDealId(Long complainDealId);
/**
* 新增燃气投诉处置-转办记录
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 结果
*/
public AjaxResult insertTComplainDealTransfer(TComplainDealTransfer tComplainDealTransfer);
/**
* 修改燃气投诉处置-转办记录
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 结果
*/
public int updateTComplainDealTransfer(TComplainDealTransfer tComplainDealTransfer);
/**
* 批量删除燃气投诉处置-转办记录
*
* @param complainDealTransferIds 需要删除的燃气投诉处置-转办记录ID
* @return 结果
*/
public int deleteTComplainDealTransferByIds(Long[] complainDealTransferIds);
/**
* 删除燃气投诉处置-转办记录信息
*
* @param complainDealTransferId 燃气投诉处置-转办记录ID
* @return 结果
*/
public int deleteTComplainDealTransferById(Long complainDealTransferId);
}
package com.zehong.system.service.impl;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.BaseExportTemp;
import com.zehong.system.mapper.BaseExportTempMapper;
import com.zehong.system.service.IBaseExportTempService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* ureport2模板管理Service业务层处理
*
* @author ruoyi
* @date 2022-01-21
*/
@Service
@Transactional
public class BaseExportTempServiceImpl implements IBaseExportTempService
{
@Resource
private BaseExportTempMapper baseExportTempMapper;
/**
* 查询ureport2模板管理
*
* @param id ureport2模板管理主键
* @return ureport2模板管理
*/
@Override
public BaseExportTemp selectBaseExportTempById(Long id)
{
return baseExportTempMapper.selectBaseExportTempById(id);
}
/**
* 查询ureport2模板管理列表
*
* @param baseExportTemp ureport2模板管理
* @return ureport2模板管理
*/
@Override
public List<BaseExportTemp> selectBaseExportTempList(BaseExportTemp baseExportTemp)
{
return baseExportTempMapper.selectBaseExportTempList(baseExportTemp);
}
/**
* 新增ureport2模板管理
*
* @param baseExportTemp ureport2模板管理
* @return 结果
*/
@Override
public int insertBaseExportTemp(BaseExportTemp baseExportTemp) {
baseExportTemp.setCreateUserId(SecurityUtils.getLoginUser().getUser().getUserId());
baseExportTemp.setCreateUserName(SecurityUtils.getUsername());
baseExportTemp.setCreateTime(DateUtils.getNowDate());
return baseExportTempMapper.insertBaseExportTemp(baseExportTemp);
}
/**
* 修改ureport2模板管理
*
* @param baseExportTemp ureport2模板管理
* @return 结果
*/
@Override
public int updateBaseExportTemp(BaseExportTemp baseExportTemp)
{
baseExportTemp.setCreateUserId(SecurityUtils.getLoginUser().getUser().getUserId());
baseExportTemp.setCreateUserName(SecurityUtils.getUsername());
baseExportTemp.setUpdateTime(DateUtils.getNowDate());
return baseExportTempMapper.updateBaseExportTemp(baseExportTemp);
}
/**
* 批量删除ureport2模板管理
*
* @param ids 需要删除的ureport2模板管理主键
* @return 结果
*/
@Override
public int deleteBaseExportTempByIds(Long[] ids)
{
return baseExportTempMapper.deleteBaseExportTempByIds(ids);
}
/**
* 删除ureport2模板管理信息
*
* @param id ureport2模板管理主键
* @return 结果
*/
@Override
public int deleteBaseExportTempById(Long id)
{
return baseExportTempMapper.deleteBaseExportTempById(id);
}
/**
* 批量---逻辑删除
*
* @param ids 需要删除的ureport2模板管理ID
* @return 结果
*/
@Override
public int setDeleteByIds(Long[] ids)
{
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
String userNickName = SecurityUtils.getUsername();
return baseExportTempMapper.setDeleteByIds(ids,userId,userNickName);
}
/**
* 删除---逻辑删除
*
* @param id ureport2模板管理ID
* @return 结果
*/
@Override
public int setDeleteById(Long id)
{
Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
String userNickName = SecurityUtils.getUsername();
return baseExportTempMapper.setDeleteById(id,userId,userNickName);
}
/**
* 根据code查询参数
* @param code
* @return
*/
public BaseExportTemp selectParamByCode(String code){
return baseExportTempMapper.selectParamByCode(code);
}
/**
* 根据模板的存放路径查询唯一的模板信息
* @param fullPath
* @return
*/
public BaseExportTemp selectSignleByFullPath(String fullPath){
return baseExportTempMapper.selectSignleByFullPath(fullPath);
}
}
package com.zehong.system.service.impl;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TComplainDealEvaluate;
import com.zehong.system.mapper.TComplainDealEvaluateMapper;
import com.zehong.system.service.ITComplainDealEvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 燃气投诉处置-评价Service业务层处理
*
* @author zehong
* @date 2024-06-06
*/
@Service
public class TComplainDealEvaluateServiceImpl implements ITComplainDealEvaluateService
{
@Autowired
private TComplainDealEvaluateMapper tComplainDealEvaluateMapper;
/**
* 查询燃气投诉处置-评价
*
* @param complainDealEvaluateId 燃气投诉处置-评价ID
* @return 燃气投诉处置-评价
*/
@Override
public TComplainDealEvaluate selectTComplainDealEvaluateById(Long complainDealEvaluateId)
{
return tComplainDealEvaluateMapper.selectTComplainDealEvaluateById(complainDealEvaluateId);
}
/**
* 查询燃气投诉处置-评价
* @param complainDealId 燃气投诉处置
* @return
*/
@Override
public TComplainDealEvaluate selectTComplainDealEvaluateByComplainDealId(Long complainDealId) {
return tComplainDealEvaluateMapper.selectTComplainDealEvaluateByComplainDealId(complainDealId);
}
/**
* 查询燃气投诉处置-评价列表
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 燃气投诉处置-评价
*/
@Override
public List<TComplainDealEvaluate> selectTComplainDealEvaluateList(TComplainDealEvaluate tComplainDealEvaluate)
{
return tComplainDealEvaluateMapper.selectTComplainDealEvaluateList(tComplainDealEvaluate);
}
/**
* 新增燃气投诉处置-评价
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 结果
*/
@Override
public int insertTComplainDealEvaluate(TComplainDealEvaluate tComplainDealEvaluate)
{
tComplainDealEvaluate.setCreateTime(DateUtils.getNowDate());
return tComplainDealEvaluateMapper.insertTComplainDealEvaluate(tComplainDealEvaluate);
}
/**
* 修改燃气投诉处置-评价
*
* @param tComplainDealEvaluate 燃气投诉处置-评价
* @return 结果
*/
@Override
public int updateTComplainDealEvaluate(TComplainDealEvaluate tComplainDealEvaluate)
{
return tComplainDealEvaluateMapper.updateTComplainDealEvaluate(tComplainDealEvaluate);
}
/**
* 批量删除燃气投诉处置-评价
*
* @param complainDealEvaluateIds 需要删除的燃气投诉处置-评价ID
* @return 结果
*/
@Override
public int deleteTComplainDealEvaluateByIds(Long[] complainDealEvaluateIds)
{
return tComplainDealEvaluateMapper.deleteTComplainDealEvaluateByIds(complainDealEvaluateIds);
}
/**
* 删除燃气投诉处置-评价信息
*
* @param complainDealEvaluateId 燃气投诉处置-评价ID
* @return 结果
*/
@Override
public int deleteTComplainDealEvaluateById(Long complainDealEvaluateId)
{
return tComplainDealEvaluateMapper.deleteTComplainDealEvaluateById(complainDealEvaluateId);
}
}
package com.zehong.system.service.impl;
import com.zehong.system.domain.TComplainDealManSysSet;
import com.zehong.system.mapper.TComplainDealManSysSetMapper;
import com.zehong.system.service.ITComplainDealManSysSetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 燃气投诉处置的管理制度维护Service业务层处理
*
* @author zehong
* @date 2024-06-05
*/
@Service
public class TComplainDealManSysSetServiceImpl implements ITComplainDealManSysSetService
{
@Autowired
private TComplainDealManSysSetMapper tComplainDealManSysSetMapper;
/**
* 查询燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetId 燃气投诉处置的管理制度维护ID
* @return 燃气投诉处置的管理制度维护
*/
@Override
public TComplainDealManSysSet selectTComplainDealManSysSetById(Long fComplainDealManSysSetId)
{
return tComplainDealManSysSetMapper.selectTComplainDealManSysSetById(fComplainDealManSysSetId);
}
/**
* 查询燃气投诉处置的管理制度维护列表
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 燃气投诉处置的管理制度维护
*/
@Override
public List<TComplainDealManSysSet> selectTComplainDealManSysSetList(TComplainDealManSysSet tComplainDealManSysSet)
{
return tComplainDealManSysSetMapper.selectTComplainDealManSysSetList(tComplainDealManSysSet);
}
/**
* 批量修改
* @param tComplainDealManSysSets s
*/
@Override
public void batchUpdate(List<TComplainDealManSysSet> tComplainDealManSysSets) {
tComplainDealManSysSetMapper.batchUpdate(tComplainDealManSysSets);
}
/**
* 新增燃气投诉处置的管理制度维护
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 结果
*/
@Override
public int insertTComplainDealManSysSet(TComplainDealManSysSet tComplainDealManSysSet)
{
return tComplainDealManSysSetMapper.insertTComplainDealManSysSet(tComplainDealManSysSet);
}
/**
* 修改燃气投诉处置的管理制度维护
*
* @param tComplainDealManSysSet 燃气投诉处置的管理制度维护
* @return 结果
*/
@Override
public int updateTComplainDealManSysSet(TComplainDealManSysSet tComplainDealManSysSet)
{
return tComplainDealManSysSetMapper.updateTComplainDealManSysSet(tComplainDealManSysSet);
}
/**
* 批量删除燃气投诉处置的管理制度维护
*
* @param fComplainDealManSysSetIds 需要删除的燃气投诉处置的管理制度维护ID
* @return 结果
*/
@Override
public int deleteTComplainDealManSysSetByIds(Long[] fComplainDealManSysSetIds)
{
return tComplainDealManSysSetMapper.deleteTComplainDealManSysSetByIds(fComplainDealManSysSetIds);
}
/**
* 删除燃气投诉处置的管理制度维护信息
*
* @param fComplainDealManSysSetId 燃气投诉处置的管理制度维护ID
* @return 结果
*/
@Override
public int deleteTComplainDealManSysSetById(Long fComplainDealManSysSetId)
{
return tComplainDealManSysSetMapper.deleteTComplainDealManSysSetById(fComplainDealManSysSetId);
}
}
package com.zehong.system.service.impl;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.domain.TComplainDealOverSuper;
import com.zehong.system.mapper.TComplainDealMapper;
import com.zehong.system.mapper.TComplainDealOverSuperMapper;
import com.zehong.system.service.ITComplainDealOverSuperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 燃气投诉处置-超时督办Service业务层处理
*
* @author zehong
* @date 2024-06-13
*/
@Service
public class TComplainDealOverSuperServiceImpl implements ITComplainDealOverSuperService
{
@Autowired
private TComplainDealOverSuperMapper tComplainDealOverSuperMapper;
@Autowired
private TComplainDealMapper tComplainDealMapper;
/**
* 查询燃气投诉处置-超时督办
*
* @param complainDealOverSuperId 燃气投诉处置-超时督办ID
* @return 燃气投诉处置-超时督办
*/
@Override
public TComplainDealOverSuper selectTComplainDealOverSuperById(Long complainDealOverSuperId)
{
return tComplainDealOverSuperMapper.selectTComplainDealOverSuperById(complainDealOverSuperId);
}
/**
* 查询燃气投诉处置-超时督办列表
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 燃气投诉处置-超时督办
*/
@Override
public List<TComplainDealOverSuper> selectTComplainDealOverSuperList(TComplainDealOverSuper tComplainDealOverSuper)
{
return tComplainDealOverSuperMapper.selectTComplainDealOverSuperList(tComplainDealOverSuper);
}
/**
* 新增燃气投诉处置-超时督办
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 结果
*/
@Override
@Transactional(rollbackFor= Exception.class)
public int insertTComplainDealOverSuper(TComplainDealOverSuper tComplainDealOverSuper)
{
tComplainDealOverSuper.setOvertimeSupervision("0");
tComplainDealOverSuper.setCreateTime(DateUtils.getNowDate());
tComplainDealOverSuperMapper.insertTComplainDealOverSuper(tComplainDealOverSuper);
// 只根据id 修改 状态值
TComplainDeal tComplainDeal = new TComplainDeal();
tComplainDeal.setComplainDealId(tComplainDealOverSuper.getComplainDealId());
tComplainDeal.setOvertimeSupervision("0");
return tComplainDealMapper.updateTComplainDeal(tComplainDeal);
}
/**
* 修改燃气投诉处置-超时督办
*
* @param tComplainDealOverSuper 燃气投诉处置-超时督办
* @return 结果
*/
@Override
public int updateTComplainDealOverSuper(TComplainDealOverSuper tComplainDealOverSuper)
{
SysUser user = SecurityUtils.getLoginUser().getUser();
String deptId = user.getDeptId();
if (!"-2".equals(deptId)) {
// 只根据id 修改 状态值
TComplainDeal tComplainDeal = new TComplainDeal();
tComplainDeal.setComplainDealId(tComplainDealOverSuper.getComplainDealId());
if("0".equals(tComplainDealOverSuper.getOvertimeSupervision())) {
tComplainDealOverSuper.setOvertimeSupervision("1");
}
tComplainDeal.setOvertimeSupervision(tComplainDealOverSuper.getOvertimeSupervision());
tComplainDealMapper.updateTComplainDeal(tComplainDeal);
}
return tComplainDealOverSuperMapper.updateTComplainDealOverSuper(tComplainDealOverSuper);
}
/**
* 批量删除燃气投诉处置-超时督办
*
* @param complainDealOverSuperIds 需要删除的燃气投诉处置-超时督办ID
* @return 结果
*/
@Override
public int deleteTComplainDealOverSuperByIds(Long[] complainDealOverSuperIds)
{
return tComplainDealOverSuperMapper.deleteTComplainDealOverSuperByIds(complainDealOverSuperIds);
}
/**
* 删除燃气投诉处置-超时督办信息
*
* @param complainDealOverSuperId 燃气投诉处置-超时督办ID
* @return 结果
*/
@Override
public int deleteTComplainDealOverSuperById(Long complainDealOverSuperId)
{
return tComplainDealOverSuperMapper.deleteTComplainDealOverSuperById(complainDealOverSuperId);
}
/**
* 查询燃气投诉处置-超时督办列表-根据处置id 和 状态
* @param tComplainDealOverSuper
* @return
*/
@Override
public TComplainDealOverSuper getOverSuperByComplainDealIdAndStatus(TComplainDealOverSuper tComplainDealOverSuper) {
return tComplainDealOverSuperMapper.getOverSuperByComplainDealIdAndStatus(tComplainDealOverSuper);
}
/**
* 超时督办确认反馈
* @param tComplainDealOverSuper s
*/
@Override
@Transactional(rollbackFor= Exception.class)
public int overtimeSupervisionFeedbackConfirmation(TComplainDealOverSuper tComplainDealOverSuper) {
// 只根据id 修改 状态值
TComplainDeal tComplainDeal = new TComplainDeal();
tComplainDeal.setComplainDealId(tComplainDealOverSuper.getComplainDealId());
tComplainDeal.setOvertimeSupervision(tComplainDealOverSuper.getOvertimeSupervision());
tComplainDealMapper.updateTComplainDeal(tComplainDeal);
return tComplainDealOverSuperMapper.updateTComplainDealOverSuper(tComplainDealOverSuper);
}
}
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.io.IOException;
import java.util.Map; import java.math.BigDecimal;
import java.net.URLEncoder;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.excel.EasyExcel;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.config.easyexcel.CustomCellWriteHeightConfig;
import com.zehong.system.config.easyexcel.CustomCellWriteWidthConfig;
import com.zehong.system.domain.TComplainDealManSysSet;
import com.zehong.system.domain.dto.TComplainDealDTO;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisTableVo;
import com.zehong.system.domain.vo.ComplainDealSummaryAnalysisVo;
import com.zehong.system.domain.vo.HomepageVo; import com.zehong.system.domain.vo.HomepageVo;
import com.zehong.system.mapper.SysDictDataMapper;
import com.zehong.system.mapper.TComplainDealManSysSetMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TComplainDealMapper; import com.zehong.system.mapper.TComplainDealMapper;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.service.ITComplainDealService; import com.zehong.system.service.ITComplainDealService;
import javax.servlet.http.HttpServletResponse;
/** /**
* 投诉处置Service业务层处理 * 投诉处置Service业务层处理
* *
...@@ -23,6 +39,12 @@ public class TComplainDealServiceImpl implements ITComplainDealService ...@@ -23,6 +39,12 @@ public class TComplainDealServiceImpl implements ITComplainDealService
@Autowired @Autowired
private TComplainDealMapper tComplainDealMapper; private TComplainDealMapper tComplainDealMapper;
@Autowired
private TComplainDealManSysSetMapper tComplainDealManSysSetMapper;
@Autowired
private SysDictDataMapper sysDictDataMapper;
/** /**
* 查询投诉处置 * 查询投诉处置
* *
...@@ -110,4 +132,512 @@ public class TComplainDealServiceImpl implements ITComplainDealService ...@@ -110,4 +132,512 @@ public class TComplainDealServiceImpl implements ITComplainDealService
public List<Map<String,Object>> selectUserByenterproseId(String enterproseId){ public List<Map<String,Object>> selectUserByenterproseId(String enterproseId){
return tComplainDealMapper.selectUserByenterproseId(enterproseId); return tComplainDealMapper.selectUserByenterproseId(enterproseId);
} }
/**
* 投诉处置 统计分析 table 方式 方法
* @return list
*/
@Override
public List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisMethodTableViews(ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) {
// 管理制度
List<TComplainDealManSysSet> tComplainDealManSysSets = tComplainDealManSysSetMapper.selectTComplainDealManSysSetList(new TComplainDealManSysSet());
//1-投诉举报 管理制度时间
long fType1 = 0;
//2-服务申请 管理制度时间
long fType2 = 0;
//3-咨询建议 管理制度时间
long fType3 = 0;
//总发生量
BigDecimal totalAmount = BigDecimal.ZERO;
//总办结量
BigDecimal totalCompletionRate = BigDecimal.ZERO;
//总及时办结量
BigDecimal totalTimelyCompletionRate = BigDecimal.ZERO;
for (TComplainDealManSysSet tComplainDealManSysSet : tComplainDealManSysSets) {
Long days = tComplainDealManSysSet.getfDay();
Long hours = tComplainDealManSysSet.getfHours();
Long minutes = tComplainDealManSysSet.getfMinutes();
Long seconds = tComplainDealManSysSet.getfSeconds();
Long allTime = days * 24L * 60 * 60 * 1000
+ hours * 60 * 60 * 1000
+ minutes * 60 * 1000
+ seconds * 1000;
if ("1".equals(tComplainDealManSysSet.getfType())) {
fType1= allTime;
} else if ("2".equals(tComplainDealManSysSet.getfType())) {
fType2= allTime;
} else if ("3".equals(tComplainDealManSysSet.getfType())) {
fType3 = allTime;
}
}
String date1 = complainDealSummaryAnalysisTableVo.getDate();
if(StringUtils.isEmpty(date1)) {
return initEmptyList();
}
//查询当前年的开始时间和结束时间
Date startOfMonth = DateUtils.parseDate(date1 + "-01-01 00:00:00");
Date endOfMonth = DateUtils.parseDate(date1 + "-12-31 23:59:59");;
String complaintCategory = complainDealSummaryAnalysisTableVo.getComplainType();
//所有所有发生的投诉
List<TComplainDealDTO> tComplainDeals = tComplainDealMapper.queryAllByNotDeleteAndCreateTime(startOfMonth,endOfMonth,complaintCategory);
List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisTableVos = new ArrayList<>();
//先初始化一个空的,然后再循环往里面放值
List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisTableVosEmpty = initEmptyList();
//如果没数据,就返回一个都是null的数据的集合
if(tComplainDeals.size() == 0) {
return complainDealSummaryAnalysisTableVosEmpty;
}
Map<String, List<TComplainDealDTO>> collect = tComplainDeals.stream().collect(Collectors.groupingBy(TComplainDealDTO::getCreateTimeYear));
ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo1;
for (Map.Entry<String, List<TComplainDealDTO>> stringListEntry : collect.entrySet()) {
String key = stringListEntry.getKey();
List<TComplainDealDTO> value = stringListEntry.getValue();
BigDecimal count = new BigDecimal(value.size());
// 发生量统计
totalAmount = totalAmount.add(count);
complainDealSummaryAnalysisTableVo1 = new ComplainDealSummaryAnalysisTableVo();
complainDealSummaryAnalysisTableVo1.setDate(key + "月");
// 发生量
complainDealSummaryAnalysisTableVo1.setAmount(value.size() + "");
// 如果有发生量
if (value.size() > 0) {
//办结率
List<TComplainDealDTO> completionRateCollect = value.stream().filter(item -> "3".equals(item.getComplainStatus())).collect(Collectors.toList());
if (completionRateCollect.size() == 0) {
complainDealSummaryAnalysisTableVo1.setCompletionRate("0");
} else {
BigDecimal completedCount = new BigDecimal(completionRateCollect.size());
BigDecimal divide = completedCount.multiply(new BigDecimal(100)).divide(count, 2, BigDecimal.ROUND_HALF_UP);
//统计 发生率
totalCompletionRate = totalCompletionRate.add(completedCount);
complainDealSummaryAnalysisTableVo1.setCompletionRate(divide.toString());
}
// 及时办结率
if( completionRateCollect.size() == 0) {
complainDealSummaryAnalysisTableVo1.setTimelyCompletionRate("0");
} else {
int timelyCompletionRateInt = 0;
for (TComplainDealDTO tComplainDealDTO : completionRateCollect) {
String complainType = tComplainDealDTO.getComplainType();
Date createTime = tComplainDealDTO.getCreateTime();
Date updateTime = tComplainDealDTO.getUpdateTime();
if (complainType != null && !"".equals(complainType)
&& createTime != null && updateTime != null) {
long diff = updateTime.getTime() - createTime.getTime();
// 是类型1 并且小于 类型1的管理制度
if ("1".equals(complainType)) {
if (diff - fType1 < 0) {
timelyCompletionRateInt ++;
}
} else if ("2".equals(complainType)) {
if (diff - fType2 < 0) {
timelyCompletionRateInt ++;
}
} else if ("3".equals(complainType)) {
if (diff - fType3 < 0) {
timelyCompletionRateInt ++;
}
}
}
}
if (timelyCompletionRateInt > 0) {
BigDecimal CompletionRateIntDecimal = new BigDecimal(timelyCompletionRateInt);
BigDecimal divide = CompletionRateIntDecimal.multiply(new BigDecimal(100)).divide(count, 2, BigDecimal.ROUND_HALF_UP);
//统计 及时办结率
totalTimelyCompletionRate = totalTimelyCompletionRate.add(CompletionRateIntDecimal);
complainDealSummaryAnalysisTableVo1.setTimelyCompletionRate(divide.toString());
} else {
complainDealSummaryAnalysisTableVo1.setTimelyCompletionRate("0");
}
}
// 如果没有发生量则别的都是0
} else {
complainDealSummaryAnalysisTableVo1.setCompletionRate("0");
complainDealSummaryAnalysisTableVo1.setTimelyCompletionRate("0");
}
complainDealSummaryAnalysisTableVos.add(complainDealSummaryAnalysisTableVo1);
}
// 如果有数据,则往 empty集合里面放值
if (complainDealSummaryAnalysisTableVos.size() > 0) {
for (int i = 0; i < complainDealSummaryAnalysisTableVosEmpty.size(); i++) {
ComplainDealSummaryAnalysisTableVo dealSummaryAnalysisTableVo = complainDealSummaryAnalysisTableVosEmpty.get(i);
for (ComplainDealSummaryAnalysisTableVo summaryAnalysisTableVo : complainDealSummaryAnalysisTableVos) {
if (dealSummaryAnalysisTableVo.getDate().equals(summaryAnalysisTableVo.getDate())) {
dealSummaryAnalysisTableVo.setAmount(summaryAnalysisTableVo.getAmount());
dealSummaryAnalysisTableVo.setCompletionRate(summaryAnalysisTableVo.getCompletionRate());
dealSummaryAnalysisTableVo.setTimelyCompletionRate(summaryAnalysisTableVo.getTimelyCompletionRate());
}
}
//说明是 统计
if (i == 12 ) {
dealSummaryAnalysisTableVo.setAmount(totalAmount.toString());
// 统计 办结率
BigDecimal divide = totalCompletionRate.multiply(new BigDecimal(100)).divide(totalAmount, 2, BigDecimal.ROUND_HALF_UP);
dealSummaryAnalysisTableVo.setCompletionRate(divide.toString());
// 统计 及时办结率
BigDecimal divide1 = totalTimelyCompletionRate.multiply(new BigDecimal(100)).divide(totalAmount, 2, BigDecimal.ROUND_HALF_UP);
dealSummaryAnalysisTableVo.setTimelyCompletionRate(divide1.toString());
}
}
}
return complainDealSummaryAnalysisTableVosEmpty;
}
private List<ComplainDealSummaryAnalysisTableVo> initEmptyList() {
List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisTableVos = new ArrayList<>(13);
ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo;
for (int i = 0; i < 13; i++) {
complainDealSummaryAnalysisTableVo = new ComplainDealSummaryAnalysisTableVo();
if (i <12) {
complainDealSummaryAnalysisTableVo.setDate((i + 1) + "月");
} else {
complainDealSummaryAnalysisTableVo.setDate("统计");
}
complainDealSummaryAnalysisTableVo.setAmount(null);
complainDealSummaryAnalysisTableVo.setCompletionRate(null);
complainDealSummaryAnalysisTableVo.setTimelyCompletionRate(null);
complainDealSummaryAnalysisTableVos.add(complainDealSummaryAnalysisTableVo);
}
return complainDealSummaryAnalysisTableVos;
}
/**
* 统计分析导出
* @param complainDealSummaryAnalysisTableVo c
*/
@Override
public void complainDealSummaryAnalysisExport(HttpServletResponse response, ComplainDealSummaryAnalysisTableVo complainDealSummaryAnalysisTableVo) throws IOException {
List<ComplainDealSummaryAnalysisTableVo> complainDealSummaryAnalysisTableVos = complainDealSummaryAnalysisMethodTableViews(complainDealSummaryAnalysisTableVo);
// 设置动态头
String dynamicTitle = complainDealSummaryAnalysisTableVo.getDynamicTitle();
List<List<String>> headList = new ArrayList<>();
List<String> head0 = new ArrayList<>();
head0.add(dynamicTitle);
head0.add("日期");
List<String> head1 = new ArrayList<>();
head1.add(dynamicTitle);
head1.add("发生量");
List<String> head2 = new ArrayList<>();
head2.add(dynamicTitle);
head2.add("办结率");
List<String> head3 = new ArrayList<>();
head3.add(dynamicTitle);
head3.add("办结及时率");
headList.add(head0);
headList.add(head1);
headList.add(head2);
headList.add(head3);
List<List<Object>> dataList = complainDealSummaryAnalysisTableVos.stream().map(vo -> {
List<Object> objectList = new ArrayList<>();
objectList.add(vo.getDate());
objectList.add(vo.getAmount());
objectList.add(vo.getCompletionRate());
objectList.add(vo.getTimelyCompletionRate());
return objectList;
}).collect(Collectors.toList());
// 设置响应头
response.setContentType("application/vnd.ms-excel");
response.setCharacterEncoding("utf-8");
// 设置防止中文名乱码
String filename = URLEncoder.encode("投诉汇总分析", "utf-8");
response.setHeader("content-disposition", "attachment;filename=" + filename + ".xlsx");
// 先仅仅写入头,再以不写入头的方式写入数据
EasyExcel.write(response.getOutputStream())
.registerWriteHandler(new CustomCellWriteHeightConfig())
.registerWriteHandler(new CustomCellWriteWidthConfig()).head(headList).sheet("投诉汇总分析列表").doWrite(dataList);
}
/**
* 投诉处置 统计分析 echart 方式 方法
* @return
*/
@Override
public ComplainDealSummaryAnalysisVo complainDealSummaryAnalysisMethod() {
ComplainDealSummaryAnalysisVo complainDealSummaryAnalysisVo = new ComplainDealSummaryAnalysisVo();
/*
* 类型 发生量统计分析*/
List<Map<String,String>> typeOfNumberOfComplaints = new ArrayList<>();
/*
* 区域 发生量统计分析*/
List<Map<String,String>> regionOfNumberOfComplaints = new ArrayList<>();
/*
* 类型 办结率分析*/
List<Map<String,String>> typeOfCompletionRate = new ArrayList<>();
/*
* 区域 办结率分析*/
List<Map<String,String>> regionOfCompletionRate = new ArrayList<>();
/*
* 类型 办结及时率分析*/
List<Map<String,String>> typeOfTimelyCompletionRate = new ArrayList<>();
/*
* 区域 办结及时率分析*/
List<Map<String,String>> regionOfTimelyCompletionRate = new ArrayList<>();
// 管理制度
List<TComplainDealManSysSet> tComplainDealManSysSets = tComplainDealManSysSetMapper.selectTComplainDealManSysSetList(new TComplainDealManSysSet());
List<SysDictData> t_township = sysDictDataMapper.selectDictDataByType("t_township");
//1-投诉举报 管理制度时间
long fType1 = 0;
//2-服务申请 管理制度时间
long fType2 = 0;
//3-咨询建议 管理制度时间
long fType3 = 0;
for (TComplainDealManSysSet tComplainDealManSysSet : tComplainDealManSysSets) {
Long days = tComplainDealManSysSet.getfDay();
Long hours = tComplainDealManSysSet.getfHours();
Long minutes = tComplainDealManSysSet.getfMinutes();
Long seconds = tComplainDealManSysSet.getfSeconds();
Long allTime = days * 24L * 60 * 60 * 1000
+ hours * 60 * 60 * 1000
+ minutes * 60 * 1000
+ seconds * 1000;
if ("1".equals(tComplainDealManSysSet.getfType())) {
fType1= allTime;
} else if ("2".equals(tComplainDealManSysSet.getfType())) {
fType2= allTime;
} else if ("3".equals(tComplainDealManSysSet.getfType())) {
fType3 = allTime;
}
}
//所有所有发生的投诉
List<TComplainDeal> tComplainDeals = tComplainDealMapper.queryAllByNotDelete();
if (tComplainDeals.size() > 0) {
Map<String,String> itemMap;
// 先过滤调 区域不为空的
List<TComplainDeal> townShipNotEmptyList = tComplainDeals.stream().filter(item -> item.getTownship() != null).collect(Collectors.toList());
if(townShipNotEmptyList.size() > 0) {
//区域分组
Map<String, List<TComplainDeal>> townShipCollect = townShipNotEmptyList.stream().collect(Collectors.groupingBy(TComplainDeal::getTownship));
if(townShipCollect.size() > 0) {
for (Map.Entry<String, List<TComplainDeal>> stringListEntry : townShipCollect.entrySet()) {
String key = stringListEntry.getKey();
for (SysDictData sysDictData : t_township) {
if (sysDictData.getDictValue().equals(key)) {
key = sysDictData.getDictLabel();
}
}
List<TComplainDeal> value = stringListEntry.getValue();
// 总量
itemMap = new HashMap<>();
itemMap.put("name", key);
itemMap.put("value", value.size() + "");
regionOfNumberOfComplaints.add(itemMap);
BigDecimal count = new BigDecimal(value.size());
// 办结率 - 完成的占比
List<TComplainDeal> collect = value.stream().filter(item -> "3".equals(item.getComplainStatus())).collect(Collectors.toList());
itemMap = new HashMap<>();
itemMap.put("name", key);
if (collect.size() == 0) {
itemMap.put("value", "0");
} else {
BigDecimal completedCount = new BigDecimal(collect.size());
BigDecimal divide = completedCount.multiply(new BigDecimal(100)).divide(count, 2, BigDecimal.ROUND_HALF_UP);
itemMap.put("value", divide.toString());
}
regionOfCompletionRate.add(itemMap);
// 办结及时率 - 完成的在 制度时间内的占比
itemMap = new HashMap<>();
itemMap.put("name", key);
if (collect.size() == 0) {
itemMap.put("value", "0");
} else {
int timelyCompletionRateInt = 0;
for (TComplainDeal tComplainDeal : collect) {
String complainType = tComplainDeal.getComplainType();
Date createTime = tComplainDeal.getCreateTime();
Date updateTime = tComplainDeal.getUpdateTime();
if (complainType != null && !"".equals(complainType)
&& createTime != null && updateTime != null) {
long diff = updateTime.getTime() - createTime.getTime();
// 是类型1 并且小于 类型1的管理制度
if ("1".equals(complainType)) {
if (diff - fType1 < 0) {
timelyCompletionRateInt ++;
continue;
}
} else if ("2".equals(complainType)) {
if (diff - fType2 < 0) {
timelyCompletionRateInt ++;
continue;
}
} else if ("3".equals(complainType)) {
if (diff - fType3 < 0) {
timelyCompletionRateInt ++;
continue;
}
}
if (timelyCompletionRateInt > 0) {
BigDecimal CompletionRateIntDecimal = new BigDecimal(timelyCompletionRateInt);
BigDecimal divide = CompletionRateIntDecimal.multiply(new BigDecimal(100)).divide(count, 2, BigDecimal.ROUND_HALF_UP);
itemMap.put("value", divide.toString());
} else {
itemMap.put("value", "0");
}
} else {
itemMap.put("value", "0");
}
}
}
regionOfTimelyCompletionRate.add(itemMap);
}
}
}
List<TComplainDeal> complainTypeNotEmptyList = tComplainDeals.stream().filter(item -> item.getComplainType() != null).collect(Collectors.toList());
if (complainTypeNotEmptyList.size() > 0) {
//类型分组
Map<String, List<TComplainDeal>> typeCollect = complainTypeNotEmptyList.stream().collect(Collectors.groupingBy(TComplainDeal::getComplainType));
//类型分类 一共三种 循环循环三次
if (typeCollect.size() > 0) {
for (Map.Entry<String, List<TComplainDeal>> stringListEntry : typeCollect.entrySet()) {
String key = stringListEntry.getKey();
List<TComplainDeal> value = stringListEntry.getValue();
if ("1".equals(key)) {
key = "投诉举报";
} else if ("2".equals(key)) {
key = "服务申请";
} else if ("3".equals(key)) {
key = "咨询建议";
}
// 总量
itemMap = new HashMap<>();
itemMap.put("name", key);
itemMap.put("value", value.size() + "");
typeOfNumberOfComplaints.add(itemMap);
BigDecimal count = new BigDecimal(value.size());
// 办结率 - 完成的占比
List<TComplainDeal> collect = value.stream().filter(item -> "3".equals(item.getComplainStatus())).collect(Collectors.toList());
itemMap = new HashMap<>();
itemMap.put("name", key);
if (collect.size() == 0) {
itemMap.put("value", "0");
} else {
BigDecimal completedCount = new BigDecimal(collect.size());
BigDecimal divide = completedCount.multiply(new BigDecimal(100)).divide(count, 2, BigDecimal.ROUND_HALF_UP);
itemMap.put("value", divide.toString());
}
typeOfCompletionRate.add(itemMap);
// 办结及时率 - 完成的在 制度时间内的占比
itemMap = new HashMap<>();
itemMap.put("name", key);
if (collect.size() == 0) {
itemMap.put("value", "0");
} else {
int timelyCompletionRateInt = 0;
for (TComplainDeal tComplainDeal : collect) {
Date createTime = tComplainDeal.getCreateTime();
Date updateTime = tComplainDeal.getUpdateTime();
if (createTime != null && updateTime != null) {
long diff = updateTime.getTime() - createTime.getTime();
// 是类型1 并且小于 类型1的管理制度
if ("1".equals(key)) {
if (diff - fType1 < 0) {
timelyCompletionRateInt ++;
continue;
}
} else if ("2".equals(key)) {
if (diff - fType2 < 0) {
timelyCompletionRateInt ++;
continue;
}
} else if ("3".equals(key)) {
if (diff - fType3 < 0) {
timelyCompletionRateInt ++;
continue;
}
}
if (timelyCompletionRateInt > 0) {
BigDecimal completionRateIntDecimal = new BigDecimal(timelyCompletionRateInt);
BigDecimal divide = completionRateIntDecimal.multiply(new BigDecimal(100)).divide(count, 2, BigDecimal.ROUND_HALF_UP);
itemMap.put("value", divide.toString());
} else {
itemMap.put("value", "0");
}
} else {
itemMap.put("value", "0");
}
}
}
typeOfTimelyCompletionRate.add(itemMap);
}
}
}
}
complainDealSummaryAnalysisVo.setRegionOfNumberOfComplaints(regionOfNumberOfComplaints);
complainDealSummaryAnalysisVo.setTypeOfNumberOfComplaints(typeOfNumberOfComplaints);
complainDealSummaryAnalysisVo.setRegionOfCompletionRate(regionOfCompletionRate);
complainDealSummaryAnalysisVo.setTypeOfCompletionRate(typeOfCompletionRate);
complainDealSummaryAnalysisVo.setRegionOfTimelyCompletionRate(regionOfTimelyCompletionRate);
complainDealSummaryAnalysisVo.setTypeOfTimelyCompletionRate(typeOfTimelyCompletionRate);
return complainDealSummaryAnalysisVo;
}
} }
package com.zehong.system.service.impl;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils;
import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.domain.TComplainDealTransfer;
import com.zehong.system.mapper.TComplainDealMapper;
import com.zehong.system.mapper.TComplainDealTransferMapper;
import com.zehong.system.service.ITComplainDealTransferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 燃气投诉处置-转办记录Service业务层处理
*
* @author zehong
* @date 2024-06-06
*/
@Service
public class TComplainDealTransferServiceImpl implements ITComplainDealTransferService
{
@Autowired
private TComplainDealTransferMapper tComplainDealTransferMapper;
@Autowired
private TComplainDealMapper tComplainDealMapper;
/**
* 查询燃气投诉处置-转办记录
*
* @param complainDealTransferId 燃气投诉处置-转办记录ID
* @return 燃气投诉处置-转办记录
*/
@Override
public TComplainDealTransfer selectTComplainDealTransferById(Long complainDealTransferId)
{
return tComplainDealTransferMapper.selectTComplainDealTransferById(complainDealTransferId);
}
/**
* 查询燃气投诉处置-转办记录列表
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 燃气投诉处置-转办记录
*/
@Override
public List<TComplainDealTransfer> selectTComplainDealTransferList(TComplainDealTransfer tComplainDealTransfer)
{
return tComplainDealTransferMapper.selectTComplainDealTransferList(tComplainDealTransfer);
}
/**
* 根据 投诉处置id查询 转办记录列表
* @param complainDealId id
* @return list
*/
@Override
public List<Map<String,Object>> queryComplainDealTransferListByComplainDealId(Long complainDealId) {
List<TComplainDealTransfer> tComplainDealTransfers = tComplainDealTransferMapper.queryComplainDealTransferListByComplainDealId(complainDealId);
List<Map<String,Object>> list = new ArrayList<>();
if (tComplainDealTransfers != null && tComplainDealTransfers.size() > 0) {
Map<String,Object> item ;
for (TComplainDealTransfer tComplainDealTransfer : tComplainDealTransfers) {
item = new HashMap<>();
String sj = DateUtils.dateTime(tComplainDealTransfer.getCreateTime());
item.put("sj",sj);
List<Map<String,String>> dictList = new ArrayList<>();
Map<String,String> dictListItem = new HashMap<>();
dictListItem.put("indexCode","enterpriseName");
dictListItem.put("label","企业名称");
dictList.add(dictListItem);
dictListItem = new HashMap<>();
dictListItem.put("indexCode","assignMan");
dictListItem.put("label","指派人");
dictList.add(dictListItem);
dictListItem = new HashMap<>();
dictListItem.put("indexCode","reasonConcent");
dictListItem.put("label","退回原因");
dictList.add(dictListItem);
item.put("dictList",dictList);
List<Map<String,String>> rows = new ArrayList<>();
Map<String,String> rowsItem = new HashMap<>();
rowsItem.put("enterpriseName", tComplainDealTransfer.getEnterpriseName());
rowsItem.put("assignMan", tComplainDealTransfer.getComplainAssignMan());
rowsItem.put("reasonConcent", tComplainDealTransfer.getReasonConcent());
rows.add(rowsItem);
item.put("rows",rows);
list.add(item);
}
}
return list;
}
/**
* 新增燃气投诉处置-转办记录
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 结果
*/
@Override
@Transactional(rollbackFor= Exception.class)
public AjaxResult insertTComplainDealTransfer(TComplainDealTransfer tComplainDealTransfer)
{
if (tComplainDealTransfer.getComplainDealId() == null) {
return AjaxResult.error("参数丢失!!!");
}
//先修改数据的状态 改成4 退回状态,并清理 指派单位,指派人
TComplainDeal tComplainDeal = new TComplainDeal();
tComplainDeal.setComplainDealId(tComplainDealTransfer.getComplainDealId());
tComplainDeal.setComplainStatus("4");
tComplainDeal.setComplainAssignEnterproseId(null);
tComplainDeal.setComplainAssignEnterproseName(null);
tComplainDeal.setComplainAssignMan(null);
tComplainDeal.setComplainAssignManId(null);
tComplainDealMapper.clearTComplainDeal(tComplainDeal);
LoginUser loginUser = SecurityUtils.getLoginUser();
//用户的部门id就是 企业id
String deptId = loginUser.getUser().getDeptId();
tComplainDealTransfer.setEnterpriseId(deptId);
tComplainDealTransfer.setCreateBy(loginUser.getUsername());
tComplainDealTransfer.setCreateTime(DateUtils.getNowDate());
return AjaxResult.success(tComplainDealTransferMapper.insertTComplainDealTransfer(tComplainDealTransfer));
}
/**
* 修改燃气投诉处置-转办记录
*
* @param tComplainDealTransfer 燃气投诉处置-转办记录
* @return 结果
*/
@Override
public int updateTComplainDealTransfer(TComplainDealTransfer tComplainDealTransfer)
{
return tComplainDealTransferMapper.updateTComplainDealTransfer(tComplainDealTransfer);
}
/**
* 批量删除燃气投诉处置-转办记录
*
* @param complainDealTransferIds 需要删除的燃气投诉处置-转办记录ID
* @return 结果
*/
@Override
public int deleteTComplainDealTransferByIds(Long[] complainDealTransferIds)
{
return tComplainDealTransferMapper.deleteTComplainDealTransferByIds(complainDealTransferIds);
}
/**
* 删除燃气投诉处置-转办记录信息
*
* @param complainDealTransferId 燃气投诉处置-转办记录ID
* @return 结果
*/
@Override
public int deleteTComplainDealTransferById(Long complainDealTransferId)
{
return tComplainDealTransferMapper.deleteTComplainDealTransferById(complainDealTransferId);
}
}
<?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.BaseExportTempMapper">
<resultMap type="BaseExportTemp" id="BaseExportTempResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="code" column="code" />
<result property="tempFileName" column="temp_file_name" />
<result property="prefix" column="prefix" />
<result property="fileStoreDir" column="file_store_dir" />
<result property="fullPath" column="full_path" />
<result property="content" column="content" />
<result property="createUserId" column="create_user_id" />
<result property="createUserName" column="create_user_name" />
<result property="createTime" column="create_time" />
<result property="updateUserId" column="update_user_id" />
<result property="updateUserName" column="update_user_name" />
<result property="updateTime" column="update_time" />
<result property="enableFlag" column="enable_flag" />
<result property="deleteFlag" column="delete_flag" />
<result property="remark" column="remark" />
<result property="spareParam1" column="spare_param_1" />
<result property="spareParam2" column="spare_param_2" />
<result property="spareParam3" column="spare_param_3" />
<result property="spareParam4" column="spare_param_4" />
<result property="spareParam5" column="spare_param_5" />
</resultMap>
<sql id="selectBaseExportTempVo">
select id, name, code, temp_file_name, prefix, file_store_dir, full_path, content, create_user_id, create_user_name, create_time, update_user_id, update_user_name, update_time, enable_flag, delete_flag, remark, spare_param_1, spare_param_2, spare_param_3, spare_param_4, spare_param_5 from base_export_temp
</sql>
<select id="selectBaseExportTempList" parameterType="BaseExportTemp" resultMap="BaseExportTempResult">
<include refid="selectBaseExportTempVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="code != null and code != ''"> and code = #{code}</if>
<if test="tempFileName != null and tempFileName != ''"> and temp_file_name like concat('%', #{tempFileName}, '%')</if>
<if test="prefix != null and prefix != ''"> and prefix = #{prefix}</if>
<if test="fileStoreDir != null and fileStoreDir != ''"> and file_store_dir = #{fileStoreDir}</if>
<if test="fullPath != null and fullPath != ''"> and full_path = #{fullPath}</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="createUserId != null "> and create_user_id = #{createUserId}</if>
<if test="createUserName != null and createUserName != ''"> and create_user_name like concat('%', #{createUserName}, '%')</if>
<if test="updateUserId != null "> and update_user_id = #{updateUserId}</if>
<if test="updateUserName != null and updateUserName != ''"> and update_user_name like concat('%', #{updateUserName}, '%')</if>
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
<if test="deleteFlag != null and deleteFlag != ''"> and delete_flag = #{deleteFlag}</if>
<if test="spareParam1 != null and spareParam1 != ''"> and spare_param_1 = #{spareParam1}</if>
<if test="spareParam2 != null and spareParam2 != ''"> and spare_param_2 = #{spareParam2}</if>
<if test="spareParam3 != null and spareParam3 != ''"> and spare_param_3 = #{spareParam3}</if>
<if test="spareParam4 != null and spareParam4 != ''"> and spare_param_4 = #{spareParam4}</if>
<if test="spareParam5 != null and spareParam5 != ''"> and spare_param_5 = #{spareParam5}</if>
</where>
</select>
<select id="selectBaseExportTempById" parameterType="Long" resultMap="BaseExportTempResult">
<include refid="selectBaseExportTempVo"/>
where id = #{id}
</select>
<insert id="insertBaseExportTemp" parameterType="BaseExportTemp">
insert into base_export_temp
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null">name,</if>
<if test="code != null">code,</if>
<if test="tempFileName != null">temp_file_name,</if>
<if test="prefix != null">prefix,</if>
<if test="fileStoreDir != null">file_store_dir,</if>
<if test="fullPath != null">full_path,</if>
<if test="content != null">content,</if>
<if test="createUserId != null">create_user_id,</if>
<if test="createUserName != null">create_user_name,</if>
<if test="createTime != null">create_time,</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="enableFlag != null">enable_flag,</if>
<if test="deleteFlag != null">delete_flag,</if>
<if test="remark != null">remark,</if>
<if test="spareParam1 != null">spare_param_1,</if>
<if test="spareParam2 != null">spare_param_2,</if>
<if test="spareParam3 != null">spare_param_3,</if>
<if test="spareParam4 != null">spare_param_4,</if>
<if test="spareParam5 != null">spare_param_5,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="name != null">#{name},</if>
<if test="code != null">#{code},</if>
<if test="tempFileName != null">#{tempFileName},</if>
<if test="prefix != null">#{prefix},</if>
<if test="fileStoreDir != null">#{fileStoreDir},</if>
<if test="fullPath != null">#{fullPath},</if>
<if test="content != null">#{content},</if>
<if test="createUserId != null">#{createUserId},</if>
<if test="createUserName != null">#{createUserName},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateUserId != null">#{updateUserId},</if>
<if test="updateUserName != null">#{updateUserName},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="enableFlag != null">#{enableFlag},</if>
<if test="deleteFlag != null">#{deleteFlag},</if>
<if test="remark != null">#{remark},</if>
<if test="spareParam1 != null">#{spareParam1},</if>
<if test="spareParam2 != null">#{spareParam2},</if>
<if test="spareParam3 != null">#{spareParam3},</if>
<if test="spareParam4 != null">#{spareParam4},</if>
<if test="spareParam5 != null">#{spareParam5},</if>
</trim>
</insert>
<update id="updateBaseExportTemp" parameterType="BaseExportTemp">
update base_export_temp
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="code != null">code = #{code},</if>
<if test="tempFileName != null">temp_file_name = #{tempFileName},</if>
<if test="prefix != null">prefix = #{prefix},</if>
<if test="fileStoreDir != null">file_store_dir = #{fileStoreDir},</if>
<if test="fullPath != null">full_path = #{fullPath},</if>
<if test="content != null">content = #{content},</if>
<if test="createUserId != null">create_user_id = #{createUserId},</if>
<if test="createUserName != null">create_user_name = #{createUserName},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
<if test="updateUserName != null">update_user_name = #{updateUserName},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="enableFlag != null">enable_flag = #{enableFlag},</if>
<if test="deleteFlag != null">delete_flag = #{deleteFlag},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="spareParam1 != null">spare_param_1 = #{spareParam1},</if>
<if test="spareParam2 != null">spare_param_2 = #{spareParam2},</if>
<if test="spareParam3 != null">spare_param_3 = #{spareParam3},</if>
<if test="spareParam4 != null">spare_param_4 = #{spareParam4},</if>
<if test="spareParam5 != null">spare_param_5 = #{spareParam5},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseExportTempById" parameterType="Long">
delete from base_export_temp where id = #{id}
</delete>
<delete id="deleteBaseExportTempByIds" parameterType="String">
delete from base_export_temp where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!-- 逻辑删除 -->
<update id="setDeleteById">
update base_export_temp set delete_flag="Y",update_time=sysdate(),update_user_id=#{operId},update_user_name=#{operName} where id = #{id}
</update>
<!-- 逻辑删除 -->
<update id="setDeleteByIds">
update base_export_temp set delete_flag="Y",update_time=sysdate(),update_user_id=#{operId},update_user_name=#{operName} where id in
<foreach item="id" collection="ids" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<!-- **************************自定义SQL区域************************** -->
<!-- 根据code查询参数 -->
<select id="selectParamByCode" parameterType="string" resultMap="BaseExportTempResult">
<include refid="selectBaseExportTempVo"/>
where code = #{code}
</select>
<!-- 根据模板的存放路径查询唯一的模板信息 -->
<select id="selectSignleByFullPath" parameterType="string" resultMap="BaseExportTempResult">
<include refid="selectBaseExportTempVo"/>
where full_path = #{fullPath}
</select>
</mapper>
\ No newline at end of file
<?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.TComplainDealEvaluateMapper">
<resultMap type="TComplainDealEvaluate" id="TComplainDealEvaluateResult">
<result property="complainDealEvaluateId" column="complain_deal_evaluate_id" />
<result property="evaluateContent" column="evaluate_content" />
<result property="evaluateRate" column="evaluate_rate" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="complainDealId" column="complain_deal_id" />
</resultMap>
<sql id="selectTComplainDealEvaluateVo">
select complain_deal_evaluate_id, evaluate_content, evaluate_rate, create_by, create_time,complain_deal_id from t_complain_deal_evaluate
</sql>
<select id="selectTComplainDealEvaluateList" parameterType="TComplainDealEvaluate" resultMap="TComplainDealEvaluateResult">
<include refid="selectTComplainDealEvaluateVo"/>
<where>
<if test="evaluateContent != null and evaluateContent != ''"> and evaluate_content = #{evaluateContent}</if>
<if test="evaluateRate != null and evaluateRate != ''"> and evaluate_rate = #{evaluateRate}</if>
</where>
</select>
<select id="selectTComplainDealEvaluateById" parameterType="Long" resultMap="TComplainDealEvaluateResult">
<include refid="selectTComplainDealEvaluateVo"/>
where complain_deal_evaluate_id = #{complainDealEvaluateId}
</select>
<select id="selectTComplainDealEvaluateByComplainDealId" parameterType="Long" resultMap="TComplainDealEvaluateResult">
<include refid="selectTComplainDealEvaluateVo"/>
where complain_deal_id = #{complainDealId}
</select>
<insert id="insertTComplainDealEvaluate" parameterType="TComplainDealEvaluate" useGeneratedKeys="true" keyProperty="complainDealEvaluateId">
insert into t_complain_deal_evaluate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="evaluateContent != null and evaluateContent != ''">evaluate_content,</if>
<if test="evaluateRate != null">evaluate_rate,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="complainDealId != null">complain_deal_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="evaluateContent != null and evaluateContent != ''">#{evaluateContent},</if>
<if test="evaluateRate != null">#{evaluateRate},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="complainDealId != null">#{complainDealId},</if>
</trim>
</insert>
<update id="updateTComplainDealEvaluate" parameterType="TComplainDealEvaluate">
update t_complain_deal_evaluate
<trim prefix="SET" suffixOverrides=",">
<if test="evaluateContent != null and evaluateContent != ''">evaluate_content = #{evaluateContent},</if>
<if test="evaluateRate != null">evaluate_rate = #{evaluateRate},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="complainDealId != null">complain_deal_id = #{complainDealId},</if>
</trim>
where complain_deal_evaluate_id = #{complainDealEvaluateId}
</update>
<delete id="deleteTComplainDealEvaluateById" parameterType="Long">
delete from t_complain_deal_evaluate where complain_deal_evaluate_id = #{complainDealEvaluateId}
</delete>
<delete id="deleteTComplainDealEvaluateByIds" parameterType="String">
delete from t_complain_deal_evaluate where complain_deal_evaluate_id in
<foreach item="complainDealEvaluateId" collection="array" open="(" separator="," close=")">
#{complainDealEvaluateId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TComplainDealManSysSetMapper">
<resultMap type="TComplainDealManSysSet" id="TComplainDealManSysSetResult">
<result property="fComplainDealManSysSetId" column="f_complain_deal_man_sys_set_id" />
<result property="fType" column="f_type" />
<result property="fDay" column="f_day" />
<result property="fHours" column="f_hours" />
<result property="fMinutes" column="f_minutes" />
<result property="fSeconds" column="f_seconds" />
<result property="fRemarks" column="f_remarks" />
</resultMap>
<sql id="selectTComplainDealManSysSetVo">
select f_complain_deal_man_sys_set_id, f_type, f_day, f_hours, f_minutes, f_seconds, f_remarks from t_complain_deal_man_sys_set
</sql>
<select id="selectTComplainDealManSysSetList" parameterType="TComplainDealManSysSet" resultMap="TComplainDealManSysSetResult">
<include refid="selectTComplainDealManSysSetVo"/>
<where>
<if test="fType != null and fType != ''"> and f_type = #{fType}</if>
<if test="fDay != null "> and f_day = #{fDay}</if>
<if test="fHours != null "> and f_hours = #{fHours}</if>
<if test="fMinutes != null "> and f_minutes = #{fMinutes}</if>
<if test="fSeconds != null "> and f_seconds = #{fSeconds}</if>
<if test="fRemarks != null and fRemarks != ''"> and f_remarks = #{fRemarks}</if>
</where>
order by f_complain_deal_man_sys_set_id asc
</select>
<select id="selectTComplainDealManSysSetById" parameterType="Long" resultMap="TComplainDealManSysSetResult">
<include refid="selectTComplainDealManSysSetVo"/>
where f_complain_deal_man_sys_set_id = #{fComplainDealManSysSetId}
</select>
<insert id="insertTComplainDealManSysSet" parameterType="TComplainDealManSysSet" useGeneratedKeys="true" keyProperty="fComplainDealManSysSetId">
insert into t_complain_deal_man_sys_set
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fType != null and fType != ''">f_type,</if>
<if test="fDay != null">f_day,</if>
<if test="fHours != null">f_hours,</if>
<if test="fMinutes != null">f_minutes,</if>
<if test="fSeconds != null">f_seconds,</if>
<if test="fRemarks != null">f_remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fType != null and fType != ''">#{fType},</if>
<if test="fDay != null">#{fDay},</if>
<if test="fHours != null">#{fHours},</if>
<if test="fMinutes != null">#{fMinutes},</if>
<if test="fSeconds != null">#{fSeconds},</if>
<if test="fRemarks != null">#{fRemarks},</if>
</trim>
</insert>
<update id="updateTComplainDealManSysSet" parameterType="TComplainDealManSysSet">
update t_complain_deal_man_sys_set
<trim prefix="SET" suffixOverrides=",">
<if test="fType != null and fType != ''">f_type = #{fType},</if>
<if test="fDay != null">f_day = #{fDay},</if>
<if test="fHours != null">f_hours = #{fHours},</if>
<if test="fMinutes != null">f_minutes = #{fMinutes},</if>
<if test="fSeconds != null">f_seconds = #{fSeconds},</if>
<if test="fRemarks != null">f_remarks = #{fRemarks},</if>
</trim>
where f_complain_deal_man_sys_set_id = #{fComplainDealManSysSetId}
</update>
<update id="batchUpdate" parameterType="list">
<foreach collection="complainDealManSysSets" item="item" separator=";">
UPDATE t_complain_deal_man_sys_set
SET f_day = #{item.fDay},
f_hours = #{item.fHours},
f_minutes = #{item.fMinutes},
f_seconds = #{item.fSeconds},
f_remarks = #{item.fRemarks}
WHERE f_complain_deal_man_sys_set_id = #{item.fComplainDealManSysSetId}
</foreach>
</update>
<delete id="deleteTComplainDealManSysSetById" parameterType="Long">
delete from t_complain_deal_man_sys_set where f_complain_deal_man_sys_set_id = #{fComplainDealManSysSetId}
</delete>
<delete id="deleteTComplainDealManSysSetByIds" parameterType="String">
delete from t_complain_deal_man_sys_set where f_complain_deal_man_sys_set_id in
<foreach item="fComplainDealManSysSetId" collection="array" open="(" separator="," close=")">
#{fComplainDealManSysSetId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -23,10 +23,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -23,10 +23,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="provincialDataFlag" column="provincial_data_flag" />
<result property="complainType" column="complain_type" />
<result property="overtimeSupervision" column="overtime_supervision" />
<result property="township" column="township" />
</resultMap> </resultMap>
<sql id="selectTComplainDealVo"> <sql id="selectTComplainDealVo">
select complain_deal_id, complain_name, complain_phone, complain_matter, transfer_record, deal_time,deal_condition, complain_assign_enterprose_name, complain_assign_enterprose_id, complain_assign_man_id, complain_assign_man, complain_status, create_by, create_time, update_by, update_time, is_del, remarks from t_complain_deal select complain_deal_id,
complain_name,
complain_phone,
complain_matter,
transfer_record,
deal_time,
deal_condition,
complain_assign_enterprose_name,
complain_assign_enterprose_id,
complain_assign_man_id,
complain_assign_man,
complain_status,
create_by,
create_time,
update_by,
update_time,
is_del,
remarks,provincial_data_flag,complain_type,overtime_supervision,township from t_complain_deal
</sql> </sql>
<select id="selectTComplainDealList" parameterType="TComplainDeal" resultMap="TComplainDealResult"> <select id="selectTComplainDealList" parameterType="TComplainDeal" resultMap="TComplainDealResult">
...@@ -44,6 +65,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -44,6 +65,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complainStatus != null and complainStatus != ''"> and complain_status = #{complainStatus}</if> <if test="complainStatus != null and complainStatus != ''"> and complain_status = #{complainStatus}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="provincialDataFlag != null and provincialDataFlag != ''"> and provincial_data_flag = #{provincialDataFlag}</if>
<if test="complainType != null and complainType != ''"> and complain_type = #{complainType}</if>
<if test="overtimeSupervision != null and overtimeSupervision != ''"> and overtime_supervision = #{overtimeSupervision}</if>
<if test="township != null and township != ''"> and township = #{township}</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
...@@ -59,6 +84,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -59,6 +84,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from (select * from t_complain_deal where is_del = '0') t from (select * from t_complain_deal where is_del = '0') t
</select> </select>
<select id="queryAllByNotDelete" resultMap="TComplainDealResult">
<include refid="selectTComplainDealVo"/>
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
where is_del = '0'
<if test="startOfMonth != null and endOfMonth != null">
and create_time <![CDATA[>=]]> #{startOfMonth} and create_time <![CDATA[<=]]> #{endOfMonth}
</if>
<if test="complaintCategory != null and complaintCategory != '' and complaintCategory != 0 ">
and complain_type = #{complaintCategory}
</if>
order by create_time asc
</select>
<insert id="insertTComplainDeal" parameterType="TComplainDeal" useGeneratedKeys="true" keyProperty="complainDealId"> <insert id="insertTComplainDeal" parameterType="TComplainDeal" useGeneratedKeys="true" keyProperty="complainDealId">
insert into t_complain_deal insert into t_complain_deal
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -79,6 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -79,6 +120,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
<if test="provincialDataFlag != null">provincial_data_flag,</if>
<if test="complainType != null">complain_type,</if>
<if test="overtimeSupervision != null">overtime_supervision,</if>
<if test="township != null">township,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="complainName != null">#{complainName},</if> <if test="complainName != null">#{complainName},</if>
...@@ -98,9 +143,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -98,9 +143,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
<if test="provincialDataFlag != null">#{provincialDataFlag},</if>
<if test="complainType != null">#{complainType},</if>
<if test="overtimeSupervision != null">#{overtimeSupervision},</if>
<if test="township != null">#{township},</if>
</trim> </trim>
</insert> </insert>
<update id="clearTComplainDeal" parameterType="TComplainDeal">
update t_complain_deal set complain_assign_enterprose_name = null,
complain_assign_enterprose_id = null,
complain_assign_man_id = null,
complain_assign_man = null,
complain_status = #{complainStatus}
where complain_deal_id = #{complainDealId}
</update>
<update id="updateTComplainDeal" parameterType="TComplainDeal"> <update id="updateTComplainDeal" parameterType="TComplainDeal">
update t_complain_deal update t_complain_deal
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
...@@ -121,6 +179,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -121,6 +179,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="provincialDataFlag != null">provincial_data_flag = #{provincialDataFlag},</if>
<if test="complainType != null">complain_type = #{complainType},</if>
<if test="overtimeSupervision != null">overtime_supervision = #{overtimeSupervision},</if>
<if test="township != null">township = #{township},</if>
</trim> </trim>
where complain_deal_id = #{complainDealId} where complain_deal_id = #{complainDealId}
</update> </update>
......
<?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.TComplainDealOverSuperMapper">
<resultMap type="TComplainDealOverSuper" id="TComplainDealOverSuperResult">
<result property="complainDealOverSuperId" column="complain_deal_over_super_id" />
<result property="complainDealId" column="complain_deal_id" />
<result property="supervisionReasons" column="supervision_reasons" />
<result property="concent" column="concent" />
<result property="overtimeSupervision" column="overtime_supervision" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTComplainDealOverSuperVo">
select complain_deal_over_super_id, complain_deal_id, supervision_reasons, concent, overtime_supervision, create_by, create_time from t_complain_deal_over_super
</sql>
<select id="selectTComplainDealOverSuperList" parameterType="TComplainDealOverSuper" resultMap="TComplainDealOverSuperResult">
<include refid="selectTComplainDealOverSuperVo"/>
<where>
<if test="complainDealId != null "> and complain_deal_id = #{complainDealId}</if>
<if test="supervisionReasons != null and supervisionReasons != ''"> and supervision_reasons = #{supervisionReasons}</if>
<if test="concent != null and concent != ''"> and concent = #{concent}</if>
<if test="overtimeSupervision != null and overtimeSupervision != ''"> and overtime_supervision = #{overtimeSupervision}</if>
</where>
</select>
<select id="selectTComplainDealOverSuperById" parameterType="Long" resultMap="TComplainDealOverSuperResult">
<include refid="selectTComplainDealOverSuperVo"/>
where complain_deal_over_super_id = #{complainDealOverSuperId}
</select>
<select id="getOverSuperByComplainDealIdAndStatus" resultMap="TComplainDealOverSuperResult">
<include refid="selectTComplainDealOverSuperVo"/>
where complain_deal_id= #{complainDealId} and overtime_supervision = #{overtimeSupervision}
</select>
<insert id="insertTComplainDealOverSuper" parameterType="TComplainDealOverSuper" useGeneratedKeys="true" keyProperty="complainDealOverSuperId">
insert into t_complain_deal_over_super
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="complainDealId != null">complain_deal_id,</if>
<if test="supervisionReasons != null">supervision_reasons,</if>
<if test="concent != null">concent,</if>
<if test="overtimeSupervision != null">overtime_supervision,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="complainDealId != null">#{complainDealId},</if>
<if test="supervisionReasons != null">#{supervisionReasons},</if>
<if test="concent != null">#{concent},</if>
<if test="overtimeSupervision != null">#{overtimeSupervision},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTComplainDealOverSuper" parameterType="TComplainDealOverSuper">
update t_complain_deal_over_super
<trim prefix="SET" suffixOverrides=",">
<if test="complainDealId != null">complain_deal_id = #{complainDealId},</if>
<if test="supervisionReasons != null">supervision_reasons = #{supervisionReasons},</if>
<if test="concent != null">concent = #{concent},</if>
<if test="overtimeSupervision != null">overtime_supervision = #{overtimeSupervision},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where complain_deal_over_super_id = #{complainDealOverSuperId}
</update>
<delete id="deleteTComplainDealOverSuperById" parameterType="Long">
delete from t_complain_deal_over_super where complain_deal_over_super_id = #{complainDealOverSuperId}
</delete>
<delete id="deleteTComplainDealOverSuperByIds" parameterType="String">
delete from t_complain_deal_over_super where complain_deal_over_super_id in
<foreach item="complainDealOverSuperId" collection="array" open="(" separator="," close=")">
#{complainDealOverSuperId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TComplainDealTransferMapper">
<resultMap type="TComplainDealTransfer" id="TComplainDealTransferResult">
<result property="complainDealTransferId" column="complain_deal_transfer_id" />
<result property="complainDealId" column="complain_deal_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="complainAssignManId" column="complain_assign_man_id" />
<result property="complainAssignMan" column="complain_assign_man" />
<result property="reasonConcent" column="reason_concent" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTComplainDealTransferVo">
select
t.complain_deal_transfer_id,
t.complain_deal_id,
t.enterprise_id,
i.enterprise_name,
t.complain_assign_man_id,
t.complain_assign_man,
t.reason_concent,
t.create_by,
t.create_time from t_complain_deal_transfer t left join t_enterprise_info i on t.enterprise_id = i.enterprise_id
</sql>
<select id="selectTComplainDealTransferList" parameterType="TComplainDealTransfer" resultMap="TComplainDealTransferResult">
<include refid="selectTComplainDealTransferVo"/>
<where>
<if test="complainDealId != null "> and complain_deal_id = #{complainDealId}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="reasonConcent != null and reasonConcent != ''"> and reason_concent = #{reasonConcent}</if>
</where>
</select>
<select id="selectTComplainDealTransferById" parameterType="Long" resultMap="TComplainDealTransferResult">
<include refid="selectTComplainDealTransferVo"/>
where complain_deal_transfer_id = #{complainDealTransferId}
</select>
<select id="queryComplainDealTransferListByComplainDealId" resultMap="TComplainDealTransferResult">
<include refid="selectTComplainDealTransferVo"/>
where complain_deal_id = #{complainDealId}
</select>
<insert id="insertTComplainDealTransfer" parameterType="TComplainDealTransfer" useGeneratedKeys="true" keyProperty="complainDealTransferId">
insert into t_complain_deal_transfer
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="complainDealId != null">complain_deal_id,</if>
<if test="enterpriseId != null and enterpriseId != ''">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="reasonConcent != null">reason_concent,</if>
<if test="complainAssignManId != null">complain_assign_man_id,</if>
<if test="complainAssignMan != null">complain_assign_man,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="complainDealId != null">#{complainDealId},</if>
<if test="enterpriseId != null and enterpriseId != ''">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="reasonConcent != null">#{reasonConcent},</if>
<if test="complainAssignManId != null">#{complainAssignManId},</if>
<if test="complainAssignMan != null">#{complainAssignMan},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTComplainDealTransfer" parameterType="TComplainDealTransfer">
update t_complain_deal_transfer
<trim prefix="SET" suffixOverrides=",">
<if test="complainDealId != null">complain_deal_id = #{complainDealId},</if>
<if test="enterpriseId != null and enterpriseId != ''">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="complainAssignManId != null">enterprise_id = #{complainAssignManId},</if>
<if test="complainAssignMan != null">enterprise_name = #{complainAssignMan},</if>
<if test="reasonConcent != null">reason_concent = #{reasonConcent},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where complain_deal_transfer_id = #{complainDealTransferId}
</update>
<delete id="deleteTComplainDealTransferById" parameterType="Long">
delete from t_complain_deal_transfer where complain_deal_transfer_id = #{complainDealTransferId}
</delete>
<delete id="deleteTComplainDealTransferByIds" parameterType="String">
delete from t_complain_deal_transfer where complain_deal_transfer_id in
<foreach item="complainDealTransferId" collection="array" open="(" separator="," close=")">
#{complainDealTransferId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
...@@ -58,3 +58,132 @@ export function getUserList(cId) { ...@@ -58,3 +58,132 @@ export function getUserList(cId) {
method: 'get' method: 'get'
}) })
} }
export function getComplainDealManSysSet() {
return request({
url: '/complainDeal/set/list',
method: 'get'
})
}
export function batchUpdateComplainDealManSysSet(data) {
return request({
url: '/complainDeal/set/batchUpdate' ,
method: 'post',
data: data
})
}
export function addComplainTransFer(data) {
return request({
url: '/complainDeal/transfer' ,
method: 'post',
data: data
})
}
export function listComplainTransFer(complainDealId) {
return request({
url: '/complainDeal/transfer/queryByComplainDealId/' + complainDealId ,
method: 'get'
})
}
export function addComplainEvaluate(data) {
return request({
url: '/complainDeal/evaluate' ,
method: 'post',
data: data
})
}
export function updateComplainEvaluate(data) {
return request({
url: '/complainDeal/evaluate' ,
method: 'put',
data: data
})
}
export function getComplainEvaluateByComplainDealId(complainDealId) {
return request({
url: '/complainDeal/evaluate/getByComplainDealId/' + complainDealId ,
method: 'get'
})
}
export function complainDealSummaryAnalysisMethod() {
return request({
url: '/complainDeal/complainDealSummaryAnalysisMethod' ,
method: 'get'
})
}
export function complainDealSummaryAnalysisMethodTableViews(query) {
return request({
url: '/complainDeal/complainDealSummaryAnalysisMethodTableViews' ,
method: 'get',
params: query
})
}
export function complainDealSummaryAnalysisExport(data) {
return request({
url: '/complainDeal/complainDealSummaryAnalysisExport' ,
method: 'post',
data: data,
responseType:'blob'
})
}
// 根据 投诉 id 和 督办状态查询数据
export function getOverSuperByComplainDealIdAndStatus(query) {
return request({
url: '/complainDeal/super/getOverSuperByComplainDealIdAndStatus' ,
method: 'get',
params: query
})
}
// 新增-超时督办
export function addComplainDealOverSuper(data) {
return request({
url: '/complainDeal/super' ,
method: 'post',
data: data
})
}
// 修改-超时督办
export function updateComplainDealOverSuper(data) {
return request({
url: '/complainDeal/super' ,
method: 'put',
data: data
})
}
// 超时督办 反馈确认
export function overtimeSupervisionFeedbackConfirmationMethod(data) {
return request({
url: '/complainDeal/super/overtimeSupervisionFeedbackConfirmation' ,
method: 'post',
data: data
})
}
// 历史督办记录
export function historyOvertimeSupervisionListMethod(query) {
return request({
url: '/complainDeal/super/listNoPage' ,
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询ureport2模板管理列表
export function listBaseExportTemp(query) {
return request({
url: '/base/baseExportTemp/list',
method: 'get',
params: query
})
}
// 查询ureport2模板管理详细
export function getBaseExportTemp(id) {
return request({
url: '/base/baseExportTemp/' + id,
method: 'get'
})
}
// 新增ureport2模板管理
export function addBaseExportTemp(data) {
return request({
url: '/base/baseExportTemp',
method: 'post',
data: data
})
}
// 修改ureport2模板管理
export function updateBaseExportTemp(data) {
return request({
url: '/base/baseExportTemp',
method: 'put',
data: data
})
}
// 删除ureport2模板管理
export function delBaseExportTemp(id) {
return request({
url: '/base/baseExportTemp/' + id,
method: 'delete'
})
}
// 新增或编辑模板
export function addTemp(query) {
return request({
url: '/base/baseExportTemp/addTemp',
method: 'get',
params: query
})
}
// 新增或编辑模板
export function editTemp(id) {
return request({
url: '/base/baseExportTemp/editTemp/'+id,
method: 'get'
})
}
// 预览模板
export function previwTemp(id) {
return request({
url: '/base/baseExportTemp/previwTemp/'+id,
method: 'get'
})
}
// 业务预览模板
export function businessPreviwTemp(query) {
return request({
url: '/base/baseExportTemp/businessPreviwTemp',
method: 'get',
params:query
})
}
// 业务---导出Excel
export function businessExportExcel(query) {
return request({
url: '/base/baseExportTemp/businessExportExcel',
method: 'get',
params:query
})
}
\ No newline at end of file
<template>
<div style="display:flex">
<el-input type="number" id="days" v-model.number="duration.fDay" @input="updateTotalMilliseconds" />
<el-button type="text" disabled>:天</el-button>
<el-input type="number" id="hours" v-model.number="duration.fHours" @input="updateTotalMilliseconds" />
<el-button type="text" disabled>:小时</el-button>
<el-input type="number" id="minutes" v-model.number="duration.fMinutes" @input="updateTotalMilliseconds" />
<el-button type="text" disabled>:分钟</el-button>
<el-input type="number" id="seconds" v-model.number="duration.fSeconds" @input="updateTotalMilliseconds" />
<el-button type="text" disabled>:秒</el-button>
</div>
</template>
<script>
export default {
props:{
duration: {
type: Object,
default: () => ({})
},
},
computed: {
// 只返回数据,具体时间由后台计算
totalMilliseconds: function() {
return (
this.duration
);
}
},
watch: {
// 监听外部毫秒数的变化,如果需要的话(通常不需要,因为我们是计算得到的)
externalMilliseconds(newVal) {
// 如果需要,可以在这里实现将毫秒数转换回天、小时、分钟和秒
}
},
methods: {
updateTotalMilliseconds() {
// 每次输入改变时,都会触发这个方法,但因为我们使用computed属性,所以这里实际上不需要做任何事情
// 如果需要额外的逻辑(如限制输入范围),可以在这里添加
this.$emit('update:externalMilliseconds', this.duration); // 如果需要,可以触发一个事件来通知父组件
},
}
};
</script>
\ No newline at end of file
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
clearable clearable
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
style="width: 240px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="指派单位" prop="complainAssignEnterproseId" v-if="deptId==-2" > <el-form-item label="指派单位" prop="complainAssignEnterproseId" v-if="deptId==-2" >
<el-select v-model="queryParams.complainAssignEnterproseId" placeholder="请选择预案等级" clearable size="small"> <el-select v-model="queryParams.complainAssignEnterproseId"
style="width: 240px" placeholder="请选择预案等级" clearable size="small">
<el-option <el-option
v-for = "dict in enterpriseList" v-for = "dict in enterpriseList"
:key = "dict.enterpriseId" :key = "dict.enterpriseId"
...@@ -20,20 +21,10 @@ ...@@ -20,20 +21,10 @@
:value = "dict.enterpriseId" :value = "dict.enterpriseId"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--<el-form-item label="指派人" prop="complainAssignManId">-->
<!--<el-select v-model="queryParams.complainAssignManId" placeholder="请选择预案等级" clearable size="small">-->
<!--<el-option-->
<!--v-for = "dict in userList"-->
<!--:key = "dict.id"-->
<!--:label = "dict.nickName"-->
<!--:value = "dict.id"-->
<!--/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item label="任务状态" prop="complainStatus"> <el-form-item label="任务状态" prop="complainStatus">
<el-select v-model="queryParams.complainStatus" placeholder="请选择任务状态" clearable size="small"> <el-select v-model="queryParams.complainStatus"
style="width: 240px" placeholder="请选择任务状态" clearable size="small">
<el-option <el-option
v-for="dict in taskStateOptions" v-for="dict in taskStateOptions"
:key="dict.dictValue" :key="dict.dictValue"
...@@ -42,8 +33,27 @@ ...@@ -42,8 +33,27 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="数据来源" prop="provincialDataFlag" v-if="deptId==-2">
<el-select v-model="queryParams.provincialDataFlag"
style="width: 240px" placeholder="请选择数据来源" clearable size="small">
<el-option
v-for="dict in provincialDataFlagOptions"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="投诉类别" prop="complainType" v-if="deptId==-2">
<el-select v-model="queryParams.complainType"
style="width: 240px" placeholder="请选择投诉类别" clearable size="small">
<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-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -68,22 +78,81 @@ ...@@ -68,22 +78,81 @@
plain plain
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
:loading="exportLoading" :loading="exportLoading"
@click="handleExport" @click="handleExport"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="info"
v-if="deptId==-2"
plain
icon="el-icon-refresh"
size="mini"
@click="provincialDataAcq"
>省厅数据获取</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
v-if="deptId==-2"
plain
icon="el-icon-setting"
size="mini"
@click="managementSystemSetting"
>管理制度设置</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="complainDealList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
:data="complainDealList"
@selection-change="handleSelectionChange"
@cell-mouse-enter="handleTableRowMouseEnter"
@cell-mouse-leave="handleTableRowMouseLeave"
@cell-click="handleTableRowClick">
<!--<el-table-column label="投诉处置id" align="center" prop="complainDealId" />--> <!--<el-table-column label="投诉处置id" align="center" prop="complainDealId" />-->
<el-table-column label="投诉人姓名" align="center" prop="complainName" /> <el-table-column label="投诉人姓名" align="center" prop="complainName" >
<template slot-scope="scope">
<i v-if="scope.row.overtimeSupervision != null && scope.row.overtimeSupervision != ''" class="el-icon-star-on" style="color: red;"></i>
<span>{{ scope.row.complainName}}</span>
</template>
</el-table-column>
<el-table-column label="投诉人电话" align="center" prop="complainPhone" /> <el-table-column label="投诉人电话" align="center" prop="complainPhone" />
<el-table-column label="投诉事项" align="center" prop="complainMatter" /> <el-table-column label="投诉事项" align="center" prop="complainMatter" />
<el-table-column label="投诉类别" align="center" prop="complainType" >
<template slot-scope="scope">
<span v-if="scope.row.complainType == '1'">投诉举报</span>
<span v-if="scope.row.complainType == '2'">服务申请</span>
<span v-if="scope.row.complainType == '3'">咨询建议</span>
</template>
</el-table-column>
<!--<el-table-column label="反馈内容" align="center" prop="dealCondition" />--> <!--<el-table-column label="反馈内容" align="center" prop="dealCondition" />-->
<el-table-column label="指派单位名称" align="center" prop="complainAssignEnterproseName" /> <el-table-column label="指派单位名称" align="center" prop="complainAssignEnterproseName" >
<el-table-column label="指派人" align="center" prop="complainAssignMan" /> <template slot-scope="scope">
<el-table-column label="任务状态" align="center" prop="complainStatus" :formatter="taskStateFormat" /> <el-popover popper-class="custom-popover"
v-if="scope.row.overtimeSupervision === '0' || scope.row.overtimeSupervision === '1'"
trigger="hover"
placement="top"
:ref="'popover' + scope.row.complainDealId" >
<p>提示: {{handlePopoverShow(scope.row.overtimeSupervision)}}</p>
<div slot="reference" class="name-wrapper">
<span>{{ scope.row.complainAssignEnterproseName }}</span>
</div>
</el-popover>
<span v-if="scope.row.overtimeSupervision != '0' && scope.row.overtimeSupervision != '1'" >
{{ scope.row.complainAssignEnterproseName }}
</span>
</template>
</el-table-column>
<el-table-column label="指派人" align="center" prop="complainAssignMan" >
</el-table-column>
<el-table-column label="任务状态" align="center" prop="complainStatus" :formatter="taskStateFormat" >
</el-table-column>
<el-table-column label="督办状态" align="center" prop="overtimeSupervision" :formatter="overtimeSupervisionStateFormat" >
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
...@@ -94,6 +163,13 @@ ...@@ -94,6 +163,13 @@
<!--<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>--> <!--<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
<!--</template>--> <!--</template>-->
</el-table-column> </el-table-column>
<el-table-column label="数据源" align="center" prop="provincialDataFlag" >
<template slot-scope="scope">
<span v-if="scope.row.provincialDataFlag === '0'">平台</span>
<span v-else-if="scope.row.provincialDataFlag === '1'">省厅</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope" > <template slot-scope="scope" >
...@@ -103,7 +179,7 @@ ...@@ -103,7 +179,7 @@
style="color: red" style="color: red"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handlefankui(scope.row)" @click.native.stop="handlefankui(scope.row)"
>反馈</el-button> >反馈</el-button>
<el-button <el-button
size="mini" size="mini"
...@@ -111,27 +187,57 @@ ...@@ -111,27 +187,57 @@
style="color: #30B46B" style="color: #30B46B"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handlegui(scope.row)" @click.native.stop="handlegui(scope.row)"
>归档</el-button> >归档</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
v-if="scope.row.complainStatus==1 && deptId==-2" v-if="(scope.row.complainStatus==1) && deptId==-2"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click.native.stop="handleUpdate(scope.row)"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-document-copy" icon="el-icon-document-copy"
@click="handleDtail(scope.row)" @click.native.stop="handleDtail(scope.row)"
>详情</el-button> >详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click.native.stop="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
<el-button
v-if="scope.row.complainStatus==1 && deptId!=-2"
size="mini"
type="text"
icon="el-icon-delete"
@click.native.stop="handleEnterpriseReturn(scope.row)"
>退回</el-button>
<el-button
v-if="scope.row.complainStatus==4 && deptId==-2"
size="mini"
type="text"
icon="el-icon-delete"
@click.native.stop="handleTransfer(scope.row)"
>转办</el-button>
<!-- 归档后 再评价 -->
<el-button
v-if="scope.row.complainStatus==3 && deptId==-2"
size="mini"
type="text"
icon="el-icon-chat-line-square"
@click.native.stop="handleSatisfactionEvaluation(scope.row)"
>满意度评价</el-button>
<el-button
v-if="scope.row.complainStatus!=3 && deptId==-2 &&
(scope.row.overtimeSupervision != '0' )"
size="mini"
type="text"
icon="el-icon-chat-line-square"
@click.native.stop="handleOvertimeSupervision(scope.row)"
>超时督办</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -141,11 +247,10 @@ ...@@ -141,11 +247,10 @@
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"/>
/>
<!-- 添加或修改投诉处置对话框 --> <!-- 添加或修改投诉处置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @close="handleBeforClose">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="division"> <div class="division">
<div style="width: 50%;"> <div style="width: 50%;">
...@@ -160,10 +265,16 @@ ...@@ -160,10 +265,16 @@
:label = "dict.enterpriseName" :label = "dict.enterpriseName"
:value = "dict.enterpriseId" :value = "dict.enterpriseId"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- 1-投诉举报,2-服务申请,3-咨询建议 -->
<el-form-item label="投诉类别" prop="complainType">
<el-select style="width: 100%" v-model="form.complainType" :disabled="readonly">
<el-option label="投诉举报" value="1"/>
<el-option label="服务申请" value="2"/>
<el-option label="咨询建议" value="3"/>
</el-select>
</el-form-item>
</div> </div>
<div style="width: 50%;"> <div style="width: 50%;">
<el-form-item label="投诉人电话" prop="complainPhone"> <el-form-item label="投诉人电话" prop="complainPhone">
...@@ -179,9 +290,18 @@ ...@@ -179,9 +290,18 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="所属区域" prop="township">
<el-select style="width: 100%" v-model="form.township" placeholder="请选择所属区域" clearable size="small" :disabled="readonly">
<el-option
v-for="dict in townshipOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</div> </div>
</div> </div>
<el-form-item label="投诉事项" prop="complainMatter"> <el-form-item label="投诉事项" prop="complainMatter">
<el-input v-model="form.complainMatter" type = "textarea" placeholder="请输入投诉事项" :disabled="readonly"/> <el-input v-model="form.complainMatter" type = "textarea" placeholder="请输入投诉事项" :disabled="readonly"/>
</el-form-item> </el-form-item>
...@@ -217,11 +337,119 @@ ...@@ -217,11 +337,119 @@
<el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" :disabled="readonly"/> <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" :disabled="readonly"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer" v-if="showDetails">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
<!-- 转办流程 如果有的话 -->
<div v-if="complainDealTransferList !== null && complainDealTransferList.length > 0">
<el-divider content-position="left">转办流程</el-divider>
<el-timeline>
<el-timeline-item placement="top" :timestamp="item.sj" v-for="(item, index) in complainDealTransferList" :key="index">
<el-card>
<el-table :data="item.rows" border>
<el-table-column v-for="(item, index) in item.dictList" :prop="item.indexCode" :label="item.label" :key="index" align="center"></el-table-column>
</el-table>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
</el-dialog>
<!-- 督办历史记录 -->
<el-dialog title="督办历史记录" :visible.sync="historyOvertimeSupervisionVisible" width="650px">
<el-table :data="historyOvertimeSupervisionList">
<el-table-column
prop="createTime"
label="督办创建日期"
width="150">
</el-table-column>
<el-table-column
prop="supervisionReasons"
label="督办事由"
width="150">
</el-table-column>
<el-table-column
prop="updateTime"
label="回复时间"
width="150">
</el-table-column>
<el-table-column
prop="concent"
label="回复信息"
width="150">
</el-table-column>
</el-table>
</el-dialog>
<!-- 超时督办 -->
<el-dialog title="超时督办" :visible.sync="dialogOvertimeSupervisionVisible" width="600px">
<div style="padding-bottom:20px">
<el-button type="info" @click="historyOvertimeSupervisionListButton">历史督办记录</el-button>
</div>
<el-form :model="overtimeSupervisionForm">
<div class="page-header clearfix">
<div class="leftfix">督办事由</div>
<div class="rightfix" v-show="overtimeSupervisionForm.createTime != null && overtimeSupervisionForm.createTime !=''">
<div>督办创建时间</div>
<div>{{overtimeSupervisionForm.createTime}}</div>
</div>
</div>
<textarea class="inputstyle" v-model="overtimeSupervisionForm.supervisionReasons" type ="textarea" :readonly="this.supervisionReasonsStatus ? false : 'readonly'"></textarea>
<div class="page-header clearfix" v-show="showFeedbackVisible">
<div class="leftfix">回复</div>
<div class="rightfix" v-show="overtimeSupervisionForm.updateTime != null && overtimeSupervisionForm.updateTime !=''">
<div>回复时间</div>
<div>{{overtimeSupervisionForm.updateTime}}</div>
</div>
<textarea class="inputstyle" v-model="overtimeSupervisionForm.concent" type ="textarea" :readonly="this.supervisionFeedbackStatus ? false : 'readonly'"></textarea>
</div>
<!-- <el-form-item label="回复" v-show="showFeedbackVisible">
<textarea class="inputstyle" v-model="overtimeSupervisionForm.concent" type ="textarea" :readonly="this.supervisionFeedbackStatus ? false : 'readonly'"></textarea>
</el-form-item> -->
</el-form>
<div v-show="showFeedbackOperationVisible" slot="footer" class="dialog-footer" style="margin-top: -30px;">
<el-button @click="dialogOvertimeSupervisionVisible = false"> </el-button>
<el-button type="primary" @click="submitOvertimeSupervision"> </el-button>
</div>
</el-dialog> </el-dialog>
<!-- 投诉转办 -->
<el-dialog title="投诉转办" :visible.sync="dialogTransferVisible" width="600px">
<el-form :model="transferForm">
<div style="width: 100%;min-height: 100px;margin-top: -20px">
<el-form-item label="指派单位" prop="complainAssignEnterproseId" >
<el-select style="width: 100%" v-model="transferForm.complainAssignEnterproseName" placeholder="请选择指派单位" @change="transferEnterpriseChang">
<el-option
v-for = "dict in transferEnterpriseList"
:key = "dict.enterpriseId"
:label = "dict.enterpriseName"
:value = "dict.enterpriseId"
/>
</el-select>
</el-form-item>
<el-form-item label="指派人" prop="complainAssignManId">
<el-select v-model="transferForm.complainAssignMan" placeholder="请选择指派人" clearable style = "width: 100%" @change="transferManChang">
<el-option
v-for = "dict in peopleList"
:key = "dict.id"
:label = "dict.nickName"
:value = "dict.id"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top: -30px;">
<el-button @click="dialogTransferVisible = false"> </el-button>
<el-button type="primary" @click="transferSubmint"> </el-button>
</div>
</el-dialog>
<!-- 反馈内容 -->
<el-dialog title="反馈内容" :visible.sync="dialogFormVisible" width="600px"> <el-dialog title="反馈内容" :visible.sync="dialogFormVisible" width="600px">
<el-form :model="form2"> <el-form :model="form2">
<div style="width: 100%;min-height: 100px;margin-top: -20px"> <div style="width: 100%;min-height: 100px;margin-top: -20px">
...@@ -238,19 +466,94 @@ ...@@ -238,19 +466,94 @@
<el-button type="primary" @click="submint2"> </el-button> <el-button type="primary" @click="submint2"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 退回原因描述 -->
<el-dialog title="退回原因" :visible.sync="dialogEnterpriseReturnVisible" width="600px" @close="handleEnterpriseReturnBeforClose">
<el-form :model="enterpriseReturnForm">
<el-form-item label="原因描述" style = "margin-top: -15px;">
<textarea class="inputstyle" v-model="enterpriseReturnForm.reasonConcent" type ="textarea" ></textarea>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top: -30px;">
<el-button @click="dialogEnterpriseReturnVisible = false"> </el-button>
<el-button type="primary" @click="EnterpriseReturnSubmint"> </el-button>
</div>
</el-dialog>
<!-- 评价 -->
<el-dialog title="满意度评价" :visible.sync="dialogEvaluateVisible" width="600px" @close="handleEvaluateReturnBeforClose">
<el-form :model="evaluateForm">
<el-form-item label="评分" style = "margin-top: -15px;">
<el-rate v-model="evaluateForm.evaluateRate" :disabled="evaluateFormRateDisabled"></el-rate>
</el-form-item>
<el-form-item label="原因描述" style = "margin-top: -15px;">
<textarea class="inputstyle" v-model="evaluateForm.evaluateContent" type ="textarea" :readonly="evaluateFormContentReadonly"></textarea>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top: -30px;" v-show="evaluateFormFooterVisible">
<el-button @click="dialogEvaluateVisible = false"> </el-button>
<el-button type="primary" @click="evaluateSubmint"> </el-button>
</div>
</el-dialog>
<!-- 管理制度设置 -->
<el-dialog title="管理制度设置" :visible.sync="dialogManSysSetVisible" width="900px">
<el-table :data="complainDealManSysSetList">
<el-table-column prop="fType" label="投诉处置类型" width="120">
<template slot-scope="scope">
<span v-if="scope.row.fType === '1'">投诉举报</span>
<span v-else-if="scope.row.fType === '2'">服务申请</span>
<span v-else-if="scope.row.fType === '3'">咨询建议</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="及时办结时长">
<template slot-scope="scope">
<DurationSetting :duration="scope.row" @update:externalMilliseconds="handleTotalMilliseconds($event, scope.$index)"></DurationSetting>
</template>
</el-table-column>
<el-table-column prop="fRemarks" label="备注">
<template slot-scope="scope">
<el-input
v-model="scope.row.fRemarks"
@blur="handleManSysSetRemarksEdit(scope.$index, scope.row)"
size="small">
</el-input>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer" style="margin-top: -30px;">
<el-button @click="managementSystemSettingCancel"> </el-button>
<el-button type="primary" @click="managementSystemSettingSubmit"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listComplainDeal, getComplainDeal, delComplainDeal, addComplainDeal, updateComplainDeal, exportComplainDeal,getUserList } from "@/api/complainDeal/complainDeal"; import { listComplainDeal, getComplainDeal, delComplainDeal, addComplainDeal,
import {enterpriseList} from "@/api/system/eventInfo"; updateComplainDeal, exportComplainDeal,getUserList,getComplainDealManSysSet,
batchUpdateComplainDealManSysSet,addComplainTransFer,listComplainTransFer,
addComplainEvaluate,updateComplainEvaluate,getComplainEvaluateByComplainDealId,
getOverSuperByComplainDealIdAndStatus,addComplainDealOverSuper,
updateComplainDealOverSuper,overtimeSupervisionFeedbackConfirmationMethod,
historyOvertimeSupervisionListMethod } from "@/api/complainDeal/complainDeal";
import {enterpriseList,transferEnterpriseListMethod} from "@/api/system/eventInfo";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";
import { MessageBox } from 'element-ui'
import DurationSetting from '@/components/DurationSetting';
export default { export default {
name: "ComplainDeal", name: "ComplainDeal",
components: { components: {
DurationSetting
}, },
data() { data() {
return { return {
externalMilliseconds: 0,
//查看详情时,隐藏底部确定和取消按钮
showDetails:true,
//查看详情时,查看是否有 转办记录
complainDealTransferList:[],
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -263,21 +566,56 @@ export default { ...@@ -263,21 +566,56 @@ export default {
multiple: true, multiple: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
// 所属乡镇字典
townshipOptions: [],
// 总条数 // 总条数
total: 0, total: 0,
// 投诉处置表格数据 // 投诉处置表格数据
complainDealList: [], complainDealList: [],
enterpriseList:[], enterpriseList:[],
peopleList:[], peopleList:[],
transferEnterpriseList:[],
transferPeopleList:[],
readonly:false, readonly:false,
display:"display:none", display:"display:none",
// 投书状态类型:1.派发中 2.反馈 3.归档 // 投书状态类型:1.派发中 2.反馈 3.归档
taskStateOptions: [], taskStateOptions: [],
// 数据源:0.平台自建 1.省厅获取
provincialDataFlagOptions: [
{
value: '0',
label: '平台自建数据'
},{
value: '1',
label: '省厅获取数据'
}
],
// 投诉处置制度表格数据
complainDealManSysSetList:[],
//督办历史记录数据
historyOvertimeSupervisionList:[],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
dialogFormVisible:false, dialogFormVisible:false,
dialogManSysSetVisible:false,
dialogEnterpriseReturnVisible:false,
dialogTransferVisible:false,
dialogEvaluateVisible:false,
dialogSummaryAnalysisVisible:false,
//超时督办 是否显示弹出层
dialogOvertimeSupervisionVisible:false,
//督办事由 企业端只读
supervisionReasonsStatus:true,
//反馈 监管部门只读
supervisionFeedbackStatus:true,
//超时督办 反馈是否显示
showFeedbackVisible:false,
//超时督办 操作是否显示
showFeedbackOperationVisible:true,
//历史督办记录弹出层
historyOvertimeSupervisionVisible:false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -285,6 +623,7 @@ export default { ...@@ -285,6 +623,7 @@ export default {
complainName: null, complainName: null,
complainPhone: null, complainPhone: null,
complainMatter: null, complainMatter: null,
complainType:null,
transferRecord: null, transferRecord: null,
dealCondition: null, dealCondition: null,
complainAssignEnterproseName: null, complainAssignEnterproseName: null,
...@@ -304,6 +643,55 @@ export default { ...@@ -304,6 +643,55 @@ export default {
complainMatter:'', complainMatter:'',
concent:'', concent:'',
}, },
overtimeSupervisionForm:{
//自己的id
complainDealOverSuperId:'',
//关联id
complainDealId:'',
//督办事由
supervisionReasons:'',
//反馈
concent:'',
// 超时督办:0-创建,1-企业反馈,2-确认反馈,不确认时监管部门直接改成 0 默认0
overtimeSupervision:'',
//创建时间
createTime:'',
//修改时间
updateTime:''
},
enterpriseReturnForm:{
complainDealId:'',
reasonConcent:'',
complainAssignManId:'',
complainAssignMan:''
},
evaluateForm:{
complainDealEvaluateId:0,
complainDealId:0,
evaluateContent:'',
evaluateRate:null
},
//满意度评价底部只读
evaluateFormFooterVisible:true,
evaluateFormContentReadonly:false,
evaluateFormRateDisabled:false,
defaultEvaluateForm:{
complainDealEvaluateId:0,
complainDealId:0,
evaluateContent:'',
evaluateRate:null
},
transferForm:{
complainDealId:'',
complainAssignEnterproseId:'',
complainAssignEnterproseName:'',
complainAssignManId:'',
complainAssignMan:''
},
//身份 //身份
deptId:'', deptId:'',
// 表单校验 // 表单校验
...@@ -330,7 +718,10 @@ export default { ...@@ -330,7 +718,10 @@ export default {
this.getDicts("task_state").then(response => { this.getDicts("task_state").then(response => {
this.taskStateOptions = response.data; this.taskStateOptions = response.data;
}); });
}, this.getDicts("t_township").then(response => {
this.townshipOptions = response.data;
});
},
methods: { methods: {
//获取deptId //获取deptId
getUser() { getUser() {
...@@ -348,10 +739,9 @@ export default { ...@@ -348,10 +739,9 @@ export default {
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
//公司列表 //公司列表
getEnterpriseList() { getEnterpriseList() {
console.log(this.uploadImgUrl)
enterpriseList(this.queryParams).then(response => { enterpriseList(this.queryParams).then(response => {
this.enterpriseList = response.data; this.enterpriseList = response.data;
}); });
...@@ -369,6 +759,9 @@ export default { ...@@ -369,6 +759,9 @@ export default {
this.peopleList=response.data; this.peopleList=response.data;
}); });
}, },
// 企业退回原因 对话框关闭
handleEnterpriseReturnBeforClose() {
},
manChang(value){ manChang(value){
let obj = {}; let obj = {};
obj = this.peopleList.find((item)=>{ obj = this.peopleList.find((item)=>{
...@@ -389,6 +782,8 @@ export default { ...@@ -389,6 +782,8 @@ export default {
complainName: null, complainName: null,
complainPhone: null, complainPhone: null,
complainMatter: null, complainMatter: null,
complainType:null,
overtimeSupervision:null,
transferRecord: null, transferRecord: null,
dealCondition: null, dealCondition: null,
complainAssignEnterproseName: null, complainAssignEnterproseName: null,
...@@ -401,7 +796,8 @@ export default { ...@@ -401,7 +796,8 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
isDel: null, isDel: null,
remarks: null remarks: null,
township: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -421,14 +817,25 @@ export default { ...@@ -421,14 +817,25 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
overtimeSupervisionStateFormat(row,column){
if(row.overtimeSupervision === null || row.overtimeSupervision == '') {
return '-'
} else if (row.overtimeSupervision === '0') {
return <p style='color: #ff7272'>督办中</p>
} else if (row.overtimeSupervision === '1') {
return <p style='color: #30B46B'>已回复</p>
}
},
taskStateFormat(row, column) { taskStateFormat(row, column) {
var status = this.selectDictLabel(this.taskStateOptions, row.complainStatus); var status = this.selectDictLabel(this.taskStateOptions, row.complainStatus);
if(status=='派发中'){ if(status=='派发中'){
return <p style='color: #ff7272'>派发中</p> return <p style='color: #ff7272'>派发中</p>
}else if(status=="已反馈"){ }else if(status=="已反馈"){
return <p style='color: #1890ff'>已反馈</p> return <p style='color: #1890ff'>已反馈</p>
}else{ }else if(status=="已归档"){
return <p style='color: #30B46B'>已归档</p> return <p style='color: #30B46B'>已归档</p>
} else {
return <p style='color: #ff0000'>企业退回</p>
} }
return this.selectDictLabel(this.taskStateOptions, row.complainStatus); return this.selectDictLabel(this.taskStateOptions, row.complainStatus);
}, },
...@@ -474,19 +881,30 @@ export default { ...@@ -474,19 +881,30 @@ export default {
} }
}); });
}, },
handleBeforClose() {
if (this.readonly) {
this.showDetails = true;
}
this.complainDealTransferList = [];
},
//详情 //详情
handleDtail(row) { handleDtail(row) {
this.display="display:";
this.readonly = true;
this.reset();
const complainDealId = row.complainDealId || this.ids const complainDealId = row.complainDealId || this.ids
getComplainDeal(complainDealId).then(response => { //先看有没有转办记录
this.form = response.data; listComplainTransFer(complainDealId).then(response =>{
this.open = true; this.complainDealTransferList = response.data;
this.title = "投诉处置详情"; this.showDetails = false;
var statusName = this.selectDictLabel(this.taskStateOptions, row.complainStatus); this.display="display:";
this.form.complainStatus=statusName; this.readonly = true;
}); this.reset();
getComplainDeal(complainDealId).then(response => {
this.form = response.data;
this.open = true;
this.title = "投诉处置详情";
var statusName = this.selectDictLabel(this.taskStateOptions, row.complainStatus);
this.form.complainStatus=statusName;
});
})
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
...@@ -533,6 +951,41 @@ export default { ...@@ -533,6 +951,41 @@ export default {
this.getList(); this.getList();
}); });
}, },
//管理制度 备注修改回调函数
handleManSysSetRemarksEdit(index, row) {
this.complainDealManSysSetList[index].fRemarks = row.fRemarks;
},
//管理制度取消
managementSystemSettingCancel() {
this.dialogManSysSetVisible = false;
},
//管理制度提交
managementSystemSettingSubmit() {
batchUpdateComplainDealManSysSet(this.complainDealManSysSetList).then(response =>{
this.msgSuccess("管理制度修改成功");
this.dialogManSysSetVisible = false;
});
},
// 时间控件传回来的值
handleTotalMilliseconds(manSysSetDuration,index){
this.complainDealManSysSetList[index].fDay = manSysSetDuration.fDay;
this.complainDealManSysSetList[index].fHours = manSysSetDuration.fHours;
this.complainDealManSysSetList[index].fMinutes = manSysSetDuration.fMinutes;
this.complainDealManSysSetList[index].fSeconds = manSysSetDuration.fSeconds;
},
// 管理制度设置
managementSystemSetting(){
getComplainDealManSysSet().then(response =>{
this.complainDealManSysSetList = response.data;
this.dialogManSysSetVisible = true;
})
},
// 省厅数据获取
provincialDataAcq(){
this.$alert('省住建厅网站受理入口开发中,目前还无数据', '省厅数据获取', { confirmButtonText: '确定'});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
...@@ -547,9 +1000,265 @@ export default { ...@@ -547,9 +1000,265 @@ export default {
this.download(response.msg); this.download(response.msg);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
},
//企业退回
handleEnterpriseReturn(row){
this.dialogEnterpriseReturnVisible = true;
this.enterpriseReturnForm.complainDealId = row.complainDealId;
this.enterpriseReturnForm.complainAssignManId = row.complainAssignManId;
this.enterpriseReturnForm.complainAssignMan = row.complainAssignMan;
this.enterpriseReturnForm.reasonConcent = "";
},
//监管部门把企业退回的投诉 转办给其他企业
handleTransfer(row){
this.transferForm.complainDealId = row.complainDealId;
this.transferEnterpriseList = [];
this.transferForm.complainAssignMan = "";
transferEnterpriseListMethod(this.transferForm.complainDealId).then(response =>{
this.transferEnterpriseList = response.data;
this.dialogTransferVisible = true;
})
},
transferEnterpriseChang(value){
let obj = {};
obj = this.transferEnterpriseList.find((item)=>{
return item.enterpriseId === value;
});
this.transferForm.complainAssignEnterproseName = obj.enterpriseName;
this.transferForm.complainAssignEnterproseId = value;
getUserList(value).then(response => {
//console.log(this.peopleList)
this.peopleList=response.data;
});
},
transferManChang(value){
let obj = {};
obj = this.peopleList.find((item)=>{
return item.id === value;
});
this.transferForm.complainAssignManId === value;
this.transferForm.complainAssignMan = obj.nickName;
},
//投诉转办 提交按钮
transferSubmint() {
//把这条数据的状态改成 派发中
this.transferForm.complainStatus = '1';
console.log(JSON.stringify(this.transferForm))
updateComplainDeal(this.transferForm).then(response => {
this.msgSuccess("修改成功");
this.dialogTransferVisible = false;
this.getList();
});
},
//企业把 投诉处置退回 提交
EnterpriseReturnSubmint() {
addComplainTransFer(this.enterpriseReturnForm).then(response => {
this.msgSuccess("已退回");
this.dialogEnterpriseReturnVisible = false;
this.getList();
});
},
//查询历史督办信息展示
historyOvertimeSupervisionListButton() {
const complainDealId = this.overtimeSupervisionForm.complainDealId;
const param = {
complainDealId
}
historyOvertimeSupervisionListMethod(param).then(response => {
this.historyOvertimeSupervisionList = response.data;
this.historyOvertimeSupervisionVisible = true;
})
},
//督办详情点击 table 每行
handleTableRowClick(row, column, cell, event){
if (row.overtimeSupervision === '0' || row.overtimeSupervision === '1') {
const query = {
complainDealId:row.complainDealId,
overtimeSupervision:row.overtimeSupervision
}
getOverSuperByComplainDealIdAndStatus(query).then(response => {
this.overtimeSupervisionForm = response.data;
if(this.deptId == '-2') {
if (this.overtimeSupervisionForm.overtimeSupervision === '1'){
this.supervisionReasonsStatus = false;
} else {
this.supervisionReasonsStatus = true;
}
this.supervisionFeedbackStatus = false;
} else {
this.supervisionReasonsStatus = false;
this.supervisionFeedbackStatus = true;
}
// 判断 反馈是否需要显示
if (this.deptId != "-2") {
this.showFeedbackVisible = true;
} else if (this.deptId === "-2" && this.overtimeSupervisionForm.concent != '') {
this.showFeedbackVisible = true;
} else {
this.showFeedbackVisible = false;
}
if (this.overtimeSupervisionForm.overtimeSupervision === '1') {
this.showFeedbackOperationVisible = false
} else {
this.showFeedbackOperationVisible = true
}
this.dialogOvertimeSupervisionVisible = true;
})
}
},
handleTableRowMouseLeave(row, column, cell, event){
if (this.$refs['popover'+row.complainDealId]) {
this.$refs['popover'+row.complainDealId].showPopper = false
}
},
handleTableRowMouseEnter(row, column, cell, event){
if (this.$refs['popover'+row.complainDealId]) {
this.$refs['popover'+row.complainDealId].showPopper = true
}
},
handlePopoverShow(overtimeSupervision){
if(overtimeSupervision === '0') {
return '超时督办进行中,点击查看详情'
} else if (overtimeSupervision === '1') {
return '超时督办企业已反馈,点击查看详情'
}
},
//超时督办 反馈确认 -- 经讨论不需要了
overtimeSupervisionFeedbackConfirmation(){
MessageBox.confirm('是否确认反馈?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '否定',
type: 'warning'
}).then(async () => {
this.overtimeSupervisionForm.overtimeSupervision = "2"
await overtimeSupervisionFeedbackConfirmationMethod(this.overtimeSupervisionForm);
this.dialogOvertimeSupervisionVisible = false;
this.getList();
}).catch(async () => {
this.overtimeSupervisionForm.overtimeSupervision = "0"
await overtimeSupervisionFeedbackConfirmationMethod(this.overtimeSupervisionForm);
this.dialogOvertimeSupervisionVisible = false;
this.getList();
});
},
//提交督办事由 有id就修改,没id就新增
submitOvertimeSupervision(){
console.log("this.overtimeSupervisionForm = " + this.overtimeSupervisionForm)
//有就修改
if(this.overtimeSupervisionForm.complainDealOverSuperId == null ||
this.overtimeSupervisionForm.complainDealOverSuperId === '') {
addComplainDealOverSuper(this.overtimeSupervisionForm).then(response => {
this.msgSuccess("新增成功")
this.dialogOvertimeSupervisionVisible = false;
this.getList();
})
//没有就新增
} else {
updateComplainDealOverSuper(this.overtimeSupervisionForm).then(response => {
this.msgSuccess("修改成功")
this.dialogOvertimeSupervisionVisible = false;
this.getList();
})
}
},
//监管部门-点击超时督办 操作 按钮
handleOvertimeSupervision(row){
// 说明还没创建过 超时督办,就不查数据库了
if (row.overtimeSupervision == null || row.overtimeSupervision === '' || row.overtimeSupervision === '1'){
this.overtimeSupervisionForm.complainDealId = row.complainDealId;
this.overtimeSupervisionForm.complainDealOverSuperId = '';
this.overtimeSupervisionForm.supervisionReasons = '';
this.overtimeSupervisionForm.concent = '';
this.overtimeSupervisionForm.overtimeSupervision = '';
this.overtimeSupervisionForm.createTime = '';
this.overtimeSupervisionForm.updateTime = '';
this.dialogOvertimeSupervisionVisible = true;
this.showFeedbackOperationVisible = true;
this.showFeedbackVisible = false;
this.supervisionReasonsStatus = true;
// 说明创建了 超时督办了,监管部门可能要对最新的一条记录进行修改,那就也查 超时督办的 状态是0的数据。
// || 说明是 企业反馈了,那就也查 超时督办的 状态是0的数据。
} else if (row.overtimeSupervision === '0') {
const query = {
complainDealId:row.complainDealId,
overtimeSupervision:row.overtimeSupervision
}
getOverSuperByComplainDealIdAndStatus(query).then(response => {
this.overtimeSupervisionForm = response.data;
this.dialogOvertimeSupervisionVisible = true;
})
//
}
},
// 满意度评价
handleSatisfactionEvaluation(row){
this.evaluateFormFooterVisible=true,
this.evaluateFormContentReadonly=false,
this.evaluateFormRateDisabled=true,
Object.keys(this.defaultEvaluateForm).forEach(key => {
// 使用 key 从 defaultFormValues 中获取默认值,并赋值给 myForm 的对应字段
this.evaluateForm[key] = this.defaultEvaluateForm[key];
});
this.evaluateForm.complainDealId = row.complainDealId;
getComplainEvaluateByComplainDealId(this.evaluateForm.complainDealId).then(response =>{
const data = response.data;
if (data != null) {
this.evaluateForm = data;
}
if ((this.evaluateForm.evaluateContent == null || this.evaluateForm.evaluateContent ==='') &&
this.evaluateForm.evaluateRate == null ) {
this.evaluateFormFooterVisible=true;
this.evaluateFormContentReadonly=false;
this.evaluateFormRateDisabled=false;
} else{
this.evaluateFormFooterVisible=false;
this.evaluateFormContentReadonly='readonly';
this.evaluateFormRateDisabled=true;
}
this.dialogEvaluateVisible = true;
})
},
// 满意度评价提交
evaluateSubmint(){
if (this.evaluateForm.complainDealEvaluateId != null && this.evaluateForm.complainDealEvaluateId != 0) {
updateComplainEvaluate(this.evaluateForm).then(response => {
this.msgSuccess("评论修改成功");
this.dialogEvaluateVisible = false;
})
} else {
addComplainEvaluate(this.evaluateForm).then(response => {
this.msgSuccess("评论添加成功");
this.dialogEvaluateVisible = false;
})
}
},
//关闭之前
handleEvaluateReturnBeforClose() {
},
//按照 区域 和 类型 统计发生量
drawNumberOfComplaints() {
} }
} },
}; }
</script> </script>
<style> <style>
.division{ .division{
...@@ -571,6 +1280,36 @@ export default { ...@@ -571,6 +1280,36 @@ export default {
border : none; border : none;
resize:none; resize:none;
outline:none; outline:none;
}
.circle {
position: absolute;
top: 17px;
left: 4px;
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 5px;
}
.custom-popover {
color: #f1f2f6; /* 字体颜色 */
border: none; /* 可以设置边框样式,如果不需要则移除 */
background-color: #f56c6c; /* 设置你想要的背景色 */
}
textarea {
resize: none;
}
.leftfix {
float: left;
font-weight: bold;
} }
.rightfix {
float: right;
}
.clearfix::after {
content: '';
display: block;
clear: both;
}
</style> </style>
<template>
<div class="app-container baseExportTemp">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="模板名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入模板名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div ref="topButton">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="addTemp"
v-hasPermi="['base:baseExportTemp:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['base:baseExportTemp:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['base:baseExportTemp:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['base:baseExportTemp:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
</div>
<div id="scrollTable">
<el-table :height="tableHeight" v-loading="loading" :data="baseExportTempList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="模板名称" align="center" prop="name" :show-overflow-tooltip="true"/>
<el-table-column label="模板类型" align="center" prop="code" :show-overflow-tooltip="true" :formatter="tempTypeFormat" >
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.temp_type" :value="scope.row.code"/>
</template> -->
</el-table-column>
<el-table-column label="模板文件名称" align="center" prop="tempFileName" :show-overflow-tooltip="true"/>
<el-table-column label="存储目录" align="center" prop="fileStoreDir" :show-overflow-tooltip="true"/>
<el-table-column label="完整路径" align="center" prop="fullPath" :show-overflow-tooltip="true"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="previwTemp(scope.row)"
v-hasPermi="['baseExportTemp:baseExportTemp:edit']"
>预览</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="editTemp(scope.row)"
v-hasPermi="['baseExportTemp:baseExportTemp:edit']"
>编辑模板</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['baseExportTemp:baseExportTemp:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['baseExportTemp:baseExportTemp:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改ureport2模板管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<div style="max-height:74vh;overflow-y: auto;">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" size="mini">
<el-form-item label="模板名称" prop="name">
<el-input v-model="form.name" placeholder="请输入模板名称" disabled maxlength="100" show-word-limit/>
</el-form-item>
<el-form-item label="模板类型" prop="code">
<el-select v-model="form.code" placeholder="请选择模板类型" clearable>
<el-option v-for="item in this.tempTypeDict" :key="item.value"
:label="item.dictLabel" :value="item.dictValue">
{{item.label}}</el-option>
</el-select>
</el-form-item>
<el-form-item label="模板文件名" prop="tempFileName">
<el-input v-model="form.tempFileName" placeholder="请输入模板文件名称" disabled/>
</el-form-item>
<!-- <el-form-item label="访问前缀" prop="prefix">
<el-input v-model="form.prefix" placeholder="请输入访问前缀" disabled/>
</el-form-item> -->
<el-form-item label="存储目录" prop="fileStoreDir">
<el-input v-model="form.fileStoreDir" placeholder="请输入存储目录" disabled/>
</el-form-item>
<el-form-item label="完整路径" prop="fullPath">
<el-input v-model="form.fullPath" placeholder="请输入完整路径" disabled/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
rows="5"
maxlength="255"
show-word-limit
v-model="form.remark"
placeholder="请输入备注"
/>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer" style="text-align:center">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { addTemp,editTemp,previwTemp,listBaseExportTemp, getBaseExportTemp, delBaseExportTemp, addBaseExportTemp, updateBaseExportTemp } from "@/api/system/baseExportTemp";
export default {
name: "BaseExportTemp",
data() {
return {
tableHeight:500,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// ureport2模板管理表格数据
baseExportTempList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 打印模板类型列表
printTempTypeList:[],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
name: null,
code: null,
tempFileName: null,
prefix: null,
fileStoreDir: null,
fullPath: null,
content: null,
createUserId: null,
createUserName: null,
updateUserId: null,
updateUserName: null,
enableFlag: null,
deleteFlag: null,
spareParam1: null,
spareParam2: null,
spareParam3: null,
spareParam4: null,
spareParam5: null
},
// 表单参数
form: {},
// 表单校验
rules: {
},
tempTypeDict:[]
};
},
created() {
this.getList();
this.getDicts("temp_type").then(response => {
this.tempTypeDict = response.data;
});
},
methods: {
// 数据来源-G政府:E企业字典翻译
tempTypeFormat(row, column) {
return this.selectDictLabel(this.tempTypeDict, row.code);
},
/** 查询ureport2模板管理列表 */
getList() {
this.loading = true;
listBaseExportTemp(this.queryParams).then(response => {
this.baseExportTempList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
addTemp(){
addTemp().then(e=>{
var open = window.open();
open.location = e;
});
},
editTemp(row){
editTemp(row.id).then(e=>{
var open = window.open();
open.location = e;
});
},
previwTemp(row){
previwTemp(row.id).then(e=>{
var open = window.open();
open.location = e;
});
},
codeFormat(row){
return this.selectDictLabel(this.printTempTypeList, row.code);
},
// 表单重置
reset() {
this.form = {
id: null,
name: null,
code: null,
tempFileName: null,
prefix: null,
fileStoreDir: null,
fullPath: null,
content: null,
createUserId: null,
createUserName: null,
createTime: null,
updateUserId: null,
updateUserName: null,
updateTime: null,
enableFlag: "Y",
deleteFlag: "N",
remark: null,
spareParam1: null,
spareParam2: null,
spareParam3: null,
spareParam4: null,
spareParam5: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加ureport2模板管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getBaseExportTemp(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改ureport2模板管理";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateBaseExportTemp(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addBaseExportTemp(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除ureport2模板管理编号为"' + ids + '"的数据项?').then(function() {
return delBaseExportTemp(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('base/baseExportTemp/export', {
...this.queryParams
}, `baseExportTemp_${new Date().getTime()}.xlsx`)
}
}
};
</script>
\ No newline at end of file
<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>
<!-- 1-投诉举报,2-服务申请,3-咨询建议 -->
<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-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 { complainDealSummaryAnalysisMethodTableViews,complainDealSummaryAnalysisExport } from "@/api/complainDeal/complainDeal";
import axios from "axios";
export default {
name: "complainSummaryAnalysis",
data() {
return{
statisticalAnalysisForm:{
complainType:'',
date: '',
},
summaryAnalysisDataList:[],
dynamicTitle:"",
// 导出遮罩层
exportLoading: false,
rules: {
date: [
{ required: true, message: '请选择时间', trigger: 'change' }
]
}
}
},
mounted() {
},
computed: {
currentYear() {
return new Date().getFullYear().toString();
}
},
created(){
this.statisticalAnalysisForm.date = this.currentYear;
this.statisticalAnalysisForm.complainType = '0';
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 投诉类别为全部统计分析数据"
complainDealSummaryAnalysisMethodTableViews(this.statisticalAnalysisForm).then(response => {
this.summaryAnalysisDataList = response.data;
})
},
methods:{
handleQuery(){
this.$refs.statisticalAnalysisForm.validate(valid => {
if (valid) {
let complainTypeValue = this.statisticalAnalysisForm.complainType;
if (complainTypeValue == '0') {
complainTypeValue = "全部"
} else if(complainTypeValue == "1") {
complainTypeValue = "投诉举报"
} else if(complainTypeValue == "2") {
complainTypeValue = "服务申请"
} else if(complainTypeValue == "3") {
complainTypeValue = "咨询建议"
}
this.dynamicTitle = this.statisticalAnalysisForm.date + "年度, 投诉类别为" + complainTypeValue + "统计分析数据";
complainDealSummaryAnalysisMethodTableViews(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(() => {
complainDealSummaryAnalysisExport(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