Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
49b95f25
Commit
49b95f25
authored
Apr 27, 2020
by
东州 翁
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整意见反馈接口
parent
10f0d6a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
223 deletions
+98
-223
src/main/java/cn/timer/api/bean/qyzx/QyzxAttaFpgl.java
+2
-2
src/main/java/cn/timer/api/bean/qyzx/QyzxAttaQyfj.java
+1
-1
src/main/java/cn/timer/api/bean/qyzx/QyzxInvoiceUsual.java
+0
-2
src/main/java/cn/timer/api/bean/qyzx/QyzxSuggestionFeeback.java
+7
-6
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+49
-212
src/main/java/cn/timer/api/dto/qyzx/FeebackDto.java
+39
-0
No files found.
src/main/java/cn/timer/api/bean/qyzx/QyzxAttaFpgl.java
View file @
49b95f25
...
@@ -38,7 +38,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> {
...
@@ -38,7 +38,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> {
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"组织机构代码
组织机构代码
"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"组织机构代码 "
,
example
=
"101"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"发票抬头 "
,
example
=
"发票抬头"
)
@ApiModelProperty
(
value
=
"发票抬头 "
,
example
=
"发票抬头"
)
...
@@ -56,7 +56,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> {
...
@@ -56,7 +56,7 @@ public class QyzxAttaFpgl extends Model<QyzxAttaFpgl> {
@ApiModelProperty
(
value
=
"开户银行 "
,
example
=
"开户银行"
)
@ApiModelProperty
(
value
=
"开户银行 "
,
example
=
"开户银行"
)
private
String
depositBank
;
private
String
depositBank
;
@ApiModelProperty
(
value
=
"开户账号
开户账号
"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"开户账号"
,
example
=
"101"
)
private
String
depositBankAccount
;
private
String
depositBankAccount
;
@ApiModelProperty
(
value
=
"是否默认 0:是;1:否"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"是否默认 0:是;1:否"
,
example
=
"101"
)
...
...
src/main/java/cn/timer/api/bean/qyzx/QyzxAttaQyfj.java
View file @
49b95f25
...
@@ -38,7 +38,7 @@ public class QyzxAttaQyfj extends Model<QyzxAttaQyfj> {
...
@@ -38,7 +38,7 @@ public class QyzxAttaQyfj extends Model<QyzxAttaQyfj> {
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"编号 编号"
,
example
=
"101"
)
private
Integer
id
;
private
Integer
id
;
@ApiModelProperty
(
value
=
"组织机构代码
qyzx_main_qyxx
"
,
example
=
"101"
)
@ApiModelProperty
(
value
=
"组织机构代码"
,
example
=
"101"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
"附件名称 "
,
example
=
"附件名称"
)
@ApiModelProperty
(
value
=
"附件名称 "
,
example
=
"附件名称"
)
...
...
src/main/java/cn/timer/api/bean/qyzx/QyzxInvoiceUsual.java
View file @
49b95f25
...
@@ -72,8 +72,6 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
...
@@ -72,8 +72,6 @@ public class QyzxInvoiceUsual extends Model<QyzxInvoiceUsual>{
@ApiModelProperty
(
value
=
"发票类型"
,
example
=
"0-普通 1-专用"
)
@ApiModelProperty
(
value
=
"发票类型"
,
example
=
"0-普通 1-专用"
)
private
Integer
invoiceType
;
private
Integer
invoiceType
;
@ApiModelProperty
(
value
=
"收货人"
,
example
=
"翁🐻"
)
@ApiModelProperty
(
value
=
"收货人"
,
example
=
"翁🐻"
)
private
String
consignee
;
private
String
consignee
;
...
...
src/main/java/cn/timer/api/bean/qyzx/QyzxSuggestionFeeback.java
View file @
49b95f25
...
@@ -37,21 +37,21 @@ public class QyzxSuggestionFeeback extends Model<QyzxSuggestionFeeback> {
...
@@ -37,21 +37,21 @@ public class QyzxSuggestionFeeback extends Model<QyzxSuggestionFeeback> {
@ApiModelProperty
(
value
=
"员工编号"
,
example
=
"9688"
)
@ApiModelProperty
(
value
=
"员工编号"
,
example
=
"9688"
)
private
Integer
empNum
;
private
Integer
empNum
;
@ApiModelProperty
(
value
=
""
,
example
=
"不好用"
)
@ApiModelProperty
(
value
=
"
意见文本
"
,
example
=
"不好用"
)
private
String
opinionText
;
private
String
opinionText
;
@ApiModelProperty
(
value
=
""
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"
bug类型
"
,
example
=
"1"
)
private
Integer
bugType
;
private
Integer
bugType
;
@ApiModelProperty
(
value
=
""
,
example
=
"2020-4-20 08:00:00"
)
@ApiModelProperty
(
value
=
"
创建时间
"
,
example
=
"2020-4-20 08:00:00"
)
private
Date
createTime
;
private
Date
createTime
;
@ApiModelProperty
(
value
=
""
,
example
=
"117"
)
@ApiModelProperty
(
value
=
"
组织机构代码
"
,
example
=
"117"
)
private
Integer
orgCode
;
private
Integer
orgCode
;
@ApiModelProperty
(
value
=
""
,
example
=
"那别用了"
)
@ApiModelProperty
(
value
=
"
回复
"
,
example
=
"那别用了"
)
private
String
reply
;
private
String
reply
;
@ApiModelProperty
(
value
=
""
,
example
=
"2020-4-21 08:00:00"
)
@ApiModelProperty
(
value
=
"
回复时间
"
,
example
=
"2020-4-21 08:00:00"
)
private
Date
replyTime
;
private
Date
replyTime
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
49b95f25
...
@@ -31,7 +31,6 @@ import cn.hutool.core.util.NumberUtil;
...
@@ -31,7 +31,6 @@ import cn.hutool.core.util.NumberUtil;
import
cn.timer.api.bean.qyzx.QyzxAttaFwjsb
;
import
cn.timer.api.bean.qyzx.QyzxAttaFwjsb
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEntAuth
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.bean.qyzx.QyzxFeebackAccessory
;
import
cn.timer.api.bean.qyzx.QyzxFeebackAccessory
;
import
cn.timer.api.bean.qyzx.QyzxInvoiceUsual
;
import
cn.timer.api.bean.qyzx.QyzxInvoiceUsual
;
...
@@ -43,7 +42,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
...
@@ -43,7 +42,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dao.qyzx.QyzxAttaFpzlMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntAuthMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntAuthMapper
;
...
@@ -58,6 +57,7 @@ import cn.timer.api.dto.login.QysDto;
...
@@ -58,6 +57,7 @@ import cn.timer.api.dto.login.QysDto;
import
cn.timer.api.dto.qyzx.AdminListDto
;
import
cn.timer.api.dto.qyzx.AdminListDto
;
import
cn.timer.api.dto.qyzx.AttaFpglQueryDto
;
import
cn.timer.api.dto.qyzx.AttaFpglQueryDto
;
import
cn.timer.api.dto.qyzx.EntauthDto
;
import
cn.timer.api.dto.qyzx.EntauthDto
;
import
cn.timer.api.dto.qyzx.FeebackDto
;
import
cn.timer.api.dto.qyzx.LogBuyDto
;
import
cn.timer.api.dto.qyzx.LogBuyDto
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
import
cn.timer.api.utils.ResultUtil
;
...
@@ -90,9 +90,6 @@ public class QyzxController {
...
@@ -90,9 +90,6 @@ public class QyzxController {
private
QyzxLogBuyMapper
qyzxLogBuyMapper
;
private
QyzxLogBuyMapper
qyzxLogBuyMapper
;
@Autowired
@Autowired
private
QyzxAttaFpzlMapper
qyzxAttaFpzlMapper
;
@Autowired
private
QyzxEntAuthMapper
qyzxEntAuthMapper
;
private
QyzxEntAuthMapper
qyzxEntAuthMapper
;
@Autowired
@Autowired
...
@@ -309,8 +306,11 @@ public class QyzxController {
...
@@ -309,8 +306,11 @@ public class QyzxController {
}
else
{
}
else
{
// 获取权限
// 获取权限
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
// List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
ctrl
.
getId
()).
list
();
// .eq(ZzglBmgwM::getOrgCode, ctrl.getId()).list();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
zzglBmgwMMapper
.
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
().
eq
(
ZzglBmgwM:
:
getOrgCode
,
ctrl
.
getId
()));
// 传入的部门岗位是登录者的岗位id.获取的list中只有一个元素,不必要
// 传入的部门岗位是登录者的岗位id.获取的list中只有一个元素,不必要
ZzglBmgwM
.
getupDepts
(
list
,
ctrl
.
getBmgwId
(),
zzglBmgwMs
);
ZzglBmgwM
.
getupDepts
(
list
,
ctrl
.
getBmgwId
(),
zzglBmgwMs
);
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
...
@@ -334,220 +334,57 @@ public class QyzxController {
...
@@ -334,220 +334,57 @@ public class QyzxController {
}
}
}
}
/**
@Autowired
* 获取开票资料
private
OSSUtil
oss
;
*/
/*
*
* @Override public Result<QyzxEntInfoM> selectfpzl() { Integer orgCode =
* List<QyzxAttaFpzl> qyzxAttaFpzl =
* QyzxAttaFpzl.builder().build().selectList(new
* QueryWrapper<QyzxAttaFpzl>().eq("org_code", orgCode)); return new
* ResultUtil.data("获取发票资料成功", qyzxAttaFpzl); }
*
*
*//**
* 添加/修改开票资料
*
* @param
* @return
*/
/*
* @PostMapping(value = "/fpzl")
*
* @ApiOperation(value = "添加/修改发票资料", httpMethod = "POST", notes = "接口发布说明")
* public Result<QyzxAttaFpzl> addfpzl(@CurrentUser UserBean
* userBean, @RequestBody QyzxAttaFpzl qyzxAttaFpzl) {
* qyzxAttaFpzl.setOrgCode(userBean.getOrgCode());
* qyzxAttaFpzl.insertOrUpdate(); return ResultUtil.data(qyzxAttaFpzl,
* "添加/修改发票资料成功"); }
*
*//**
* 设置默认发票
*
* @param
* @return
*/
/*
* @GetMapping(value = "/defaultfp/{id}")
*
* @ApiOperation(value = "设置默认发票", httpMethod = "GET", notes = "接口发布说明") public
* Result<Void> setdef(@CurrentUser UserBean userBean, @PathVariable("id")
* Integer id) { // 将所有地址设为非默认 UpdateWrapper<QyzxAttaFpzl> updateWrapper = new
* UpdateWrapper<QyzxAttaFpzl>(); QyzxAttaFpzl q =
* QyzxAttaFpzl.builder().orgCode(userBean.getOrgCode()).isDefault(2).build();
* qyzxAttaFpzlMapper.update(q, updateWrapper);
*
* // 根据id将发票设为默认 updateWrapper.eq("id", id); QyzxAttaFpzl w =
* QyzxAttaFpzl.builder().orgCode(userBean.getOrgCode()).id(id).isDefault(1).
* build(); qyzxAttaFpzlMapper.update(w, updateWrapper);
*
* // 返回成功 return ResultUtil.success("设置成功"); }
*
*//**
* 删除开票资料
*
* @param
* @return
*/
/*
* @DeleteMapping(value = "/fpzl/{id}")
*
* @ApiOperation(value = "删除发票资料", httpMethod = "DELETE", notes = "接口发布说明")
* public Result<Integer> deletefpzl(@PathVariable Integer id) {
* QyzxAttaFpzl.builder().build().deleteById(id); return ResultUtil.data(id,
* "删除发票资料成功"); }
*
* // 获取发票管理
*
* @Override public Result<QyzxEntInfoM> selectfpgl() { Integer orgCode =
* qyzxAttaFpgl = QyzxAttaFpgl.builder().build().selectList(new
* QueryWrapper<QyzxAttaFpgl>().eq("org_code", orgCode)); return new
* ResultUtil.data("获取发票管理成功", qyzxAttaFpgl); }
*
*
*//**
* 添加/修改发票管理
*
* @param
* @return
*/
/*
* @PostMapping(value = "/fpgl")
*
* @ApiOperation(value = "添加/修改发票管理", httpMethod = "POST", notes = "接口发布说明")
* public Result<QyzxAttaFpgl> addfpgl(@CurrentUser UserBean
* userBean, @RequestBody QyzxAttaFpgl qyzxAttaFpgl) {
* qyzxAttaFpgl.setOrgCode(userBean.getOrgCode());
* qyzxAttaFpgl.insertOrUpdate(); return ResultUtil.data(qyzxAttaFpgl,
* "添加/修改发票管理成功"); }
*
*//**
* 删除开票资料
*
* @param
* @return
*/
/*
* @DeleteMapping(value = "/fpgl/{id}")
*
* @ApiOperation(value = "删除发票管理", httpMethod = "DELETE", notes = "接口发布说明")
* public Result<Integer> deletefpgl(@PathVariable Integer id) {
* QyzxAttaFpgl.builder().build().deleteById(id); return ResultUtil.data(id,
* "删除发票管理成功"); }
*
*//**
* 开票资料查询
*
* @param
* @return
*/
/*
* @PostMapping(value = "/fpzlquery")
*
* @ApiOperation(value = "发票资料查询", httpMethod = "POST", notes = "接口发布说明") public
* Result<Object> queryfpzl(@CurrentUser UserBean userBean,
*
* @RequestBody QyzxAttaFpzlQueryDto qyzxAttaFpzlQueryDto) { String
* titleOrAddress = qyzxAttaFpzlQueryDto.getNameOrAddress();
*
* Page<QyzxAttaFpzl> page = new Page<QyzxAttaFpzl>(
* qyzxAttaFpzlQueryDto.getCurrentPage() == null ? 1 :
* qyzxAttaFpzlQueryDto.getCurrentPage(), qyzxAttaFpzlQueryDto.getTotalPage() ==
* null ? 10 : qyzxAttaFpzlQueryDto.getTotalPage());
*
* QueryWrapper<QyzxAttaFpzl> queryWrapper = new QueryWrapper<>();
* queryWrapper.eq("org_code",
* userBean.getOrgCode()).and(!StrUtil.hasBlank(titleOrAddress), wq ->
* wq.likeRight("address", titleOrAddress).or().likeRight("title",
* titleOrAddress)); IPage<QyzxAttaFpzl> qyzxAttaFpzlPage =
* QyzxAttaFpzl.builder().build().selectPage(page, queryWrapper);
* List<QyzxAttaFpzl> qyzxAttaFpzls = qyzxAttaFpzlPage.getRecords();
* qyzxAttaFpzlPage.getCurrent(); qyzxAttaFpzlPage.getPages();
* qyzxAttaFpzlPage.getTotal(); qyzxAttaFpzlPage.getSize(); return
* ResultUtil.data(qyzxAttaFpzlPage, qyzxAttaFpzls, "发票资料查询成功"); }
*
*//**
* 发票管理查询
*
* @param
* @return
*//*
* @PostMapping(value = "/fpglquery")
*
* @ApiOperation(value = "发票管理查询", httpMethod = "POST", notes = "接口发布说明") public
* Result<Object> queryfpgl(@CurrentUser UserBean userBean, @RequestBody
* AttaFpglQueryDto attaFpglQueryDto) { String query =
* attaFpglQueryDto.getQuery(); String startTime =
* attaFpglQueryDto.getStartTime(); String endTime =
* attaFpglQueryDto.getEndTime(); Page<QyzxAttaFpgl> page = new
* Page<QyzxAttaFpgl>( attaFpglQueryDto.getCurrentPage() == null ? 1 :
* attaFpglQueryDto.getCurrentPage(), attaFpglQueryDto.getTotalPage() == null ?
* 10 : attaFpglQueryDto.getTotalPage()); Integer orgCode =
* userBean.getOrgCode(); QueryWrapper<QyzxAttaFpgl> queryWrapper = new
* QueryWrapper<>(); queryWrapper.eq("org_code",
* orgCode).gt(!StrUtil.hasBlank(startTime), "create_time", startTime)
* .lt(!StrUtil.hasBlank(endTime), "create_time", endTime)
* .and(!StrUtil.hasBlank(query), wq -> wq.likeRight("title",
* query).or().likeRight("project", query)); List<QyzxAttaFpgl> qyzxAttaFpgls =
* QyzxAttaFpgl.builder().build().selectList(queryWrapper);
*
* queryWrapper.eq("org_code", orgCode) .between(!StrUtil.hasBlank(startTime) &&
* !StrUtil.hasBlank(endTime), "create_time", !StrUtil.hasBlank(startTime) ?
* startTime : "1000-01-01 00:00:00", !StrUtil.hasBlank(endTime) ? endTime :
* "9999-01-01 00:00:00") .and(!StrUtil.hasBlank(query), wq ->
* wq.likeRight("title", query).or().likeRight("project", query));
*
*
*
* IPage<QyzxAttaFpgl> qyzxAttaFpglPage =
* QyzxAttaFpgl.builder().build().selectPage(page, queryWrapper);
* List<QyzxAttaFpgl> qyzxAttaFpgls = qyzxAttaFpglPage.getRecords();
* qyzxAttaFpglPage.getCurrent(); qyzxAttaFpglPage.getPages();
* qyzxAttaFpglPage.getTotal(); qyzxAttaFpglPage.getSize();
*
*
* return ResultUtil.data(page, qyzxAttaFpgls, "发票资料查询成功"); }
*/
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
/**
/**
* 意见反馈
* 意见反馈
*/
*/
/*
* @PostMapping(value = "/feedback")
*
* @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") public
* Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
*
* @RequestParam(required = false) String opinionText, @RequestParam(required =
* false) String moudle,
*
* @Param("files") List<MultipartFile> files) { String url = null; List<String>
* list = new ArrayList<String>(); if (files != null) { for (MultipartFile file
* : files) { String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle
* + "/" + file.getOriginalFilename(); if (file == null || file.getSize() <= 0)
* { return ResultUtil.error("上传的文件为空,请重新选择!"); } else { try { url =
* oss.uploadFile(path, file.getInputStream()); list.add(url); } catch
* (IOException e) { e.printStackTrace(); } } } } QyzxSuggestionFeeback feeback
* = new QyzxSuggestionFeeback(); feeback.setEmpNum(userBean.getEmpNum());
* feeback.setOpinionText(opinionText); feeback.setCreateTime(new Date());
* feeback.setOrgCode(userBean.getOrgCode()); boolean a = feeback.insert(); if
* (a && list.size() > 0) { for (String opinionUrl : list) {
* QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(
* opinionUrl).build().insert(); } } return ResultUtil.success("意见反馈成功!"); }
*/
/**
* 意见反馈2
*/
@PostMapping
(
value
=
"/feedback"
)
@PostMapping
(
value
=
"/feedback"
)
@ApiOperation
(
value
=
"意见反馈"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"意见反馈"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
QyzxSuggestionFeeback
>
feedback
(
@CurrentUser
UserBean
userBean
,
public
Result
<
String
>
feedback
(
@CurrentUser
UserBean
userBean
,
@RequestBody
FeebackDto
feebackDto
)
{
@RequestParam
(
required
=
false
)
String
opinionText
,
@RequestParam
(
required
=
false
)
String
moudle
,
String
opinionText
=
feebackDto
.
getOpinionText
();
@Param
(
"files"
)
List
<
MultipartFile
>
files
)
{
List
<
String
>
urlList
=
feebackDto
.
getUrlList
();
String
url
=
null
;
QyzxSuggestionFeeback
qs
=
QyzxSuggestionFeeback
.
builder
().
orgCode
(
userBean
.
getOrgCode
()).
empNum
(
userBean
.
getEmpNum
()).
opinionText
(
opinionText
).
bugType
(
1
).
createTime
(
new
Date
()).
build
();
List
<
String
>
list
=
new
ArrayList
<
String
>();
if
(
files
!=
null
)
{
boolean
tof
=
qs
.
insert
();
for
(
MultipartFile
file
:
files
)
{
Integer
feebackId
=
qs
.
getId
();
String
path
=
"8timer2.0/"
+
userBean
.
getOrgCode
()
+
"/"
+
moudle
+
"/"
+
file
.
getOriginalFilename
();
if
(
tof
)
{
if
(
file
==
null
||
file
.
getSize
()
<=
0
)
{
for
(
String
str
:
urlList
)
{
return
ResultUtil
.
error
(
"上传的文件为空,请重新选择!"
);
QyzxFeebackAccessory
.
builder
().
feebackId
(
feebackId
).
opinionUrl
(
str
).
build
().
insert
();
}
else
{
try
{
url
=
OSSUtil
.
uploadFile
(
path
,
file
.
getInputStream
());
list
.
add
(
url
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
QyzxSuggestionFeeback
feeback
=
new
QyzxSuggestionFeeback
();
feeback
.
setEmpNum
(
userBean
.
getEmpNum
());
feeback
.
setOpinionText
(
opinionText
);
feeback
.
setCreateTime
(
new
Date
());
feeback
.
setOrgCode
(
userBean
.
getOrgCode
());
boolean
a
=
feeback
.
insert
();
if
(
a
&&
list
.
size
()
>
0
)
{
for
(
String
opinionUrl
:
list
)
{
QyzxFeebackAccessory
.
builder
().
feebackId
(
feeback
.
getId
()).
opinionUrl
(
opinionUrl
).
build
().
insert
();
}
}
return
ResultUtil
.
data
(
"意见反馈成功!"
);
}
}
return
ResultUtil
.
success
(
"意见反馈成功!"
);
return
ResultUtil
.
data
(
"意见反馈失败!"
);
}
}
/**
/**
...
...
src/main/java/cn/timer/api/dto/qyzx/FeebackDto.java
0 → 100644
View file @
49b95f25
/**
* @date 2020年4月27日
* @author 翁东州
* @方法中文名称:
*/
package
cn
.
timer
.
api
.
dto
.
qyzx
;
import
java.io.Serializable
;
import
java.util.List
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @date 2020年4月27日
* @author 翁东州
* @方法中文名称:
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
FeebackDto
implements
Serializable
{
/**
* @date 2020年4月27日
* @author 翁东州
* @方法中文名称:
*/
private
static
final
long
serialVersionUID
=
4457381912053961473L
;
@ApiModelProperty
(
value
=
"填写内容"
,
example
=
"13129310893"
)
private
String
opinionText
;
@ApiModelProperty
(
value
=
"附件地址"
,
example
=
"123456"
)
private
List
<
String
>
urlList
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment