Commit b2559bc0 by xurui

Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/main/java/com/ejweb/modules/report/entity/ReportEntity.java
parents 058c0933 f6f4afe1
...@@ -2,10 +2,13 @@ package com.ejweb.modules.front.report.api; ...@@ -2,10 +2,13 @@ package com.ejweb.modules.front.report.api;
import com.ejweb.conf.ErrorCode; import com.ejweb.conf.ErrorCode;
import com.ejweb.core.api.ResponseBean; import com.ejweb.core.api.ResponseBean;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.front.report.bean.FrontReportBean; import com.ejweb.modules.front.report.bean.FrontReportBean;
import com.ejweb.modules.front.report.entity.Captcha; import com.ejweb.modules.front.report.entity.Captcha;
import com.ejweb.modules.front.report.service.FrontReportService; import com.ejweb.modules.front.report.service.FrontReportService;
import com.ejweb.modules.front.report.utils.CaptchaUtil; import com.ejweb.modules.front.report.utils.CaptchaUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -21,6 +24,7 @@ public class FrontReportController { ...@@ -21,6 +24,7 @@ public class FrontReportController {
@Autowired @Autowired
private FrontReportService frontReportService; private FrontReportService frontReportService;
/** /**
* 获取验证码的code值 * 获取验证码的code值
* @return * @return
...@@ -48,7 +52,13 @@ public class FrontReportController { ...@@ -48,7 +52,13 @@ public class FrontReportController {
responseBean.setMessage("captcha is incorrect"); responseBean.setMessage("captcha is incorrect");
return responseBean; return responseBean;
} }
return frontReportService.addReport(bean); if (StringUtils.isNotBlank(bean.getReportSource())){
responseBean.setStatus(ErrorCode.STATUS_CODE_4002);
responseBean.setMessage("report_source为空");
return responseBean;
}else {
return frontReportService.addReport(bean);
}
} }
responseBean.setStatus(ErrorCode.STATUS_CODE_4001); responseBean.setStatus(ErrorCode.STATUS_CODE_4001);
responseBean.setMessage("接收参数失败"); responseBean.setMessage("接收参数失败");
......
...@@ -41,6 +41,17 @@ public class ReportEntity extends DataEntity<ReportEntity> { ...@@ -41,6 +41,17 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private String reportAttachment; //举报提交文件 private String reportAttachment; //举报提交文件
private String supplementAttachment; //补充提交文件 private String supplementAttachment; //补充提交文件
private String dealAttachment; //处理成果文件 private String dealAttachment; //处理成果文件
private String oaname;//当前用户名
public String getOaname() {
return oaname;
}
public void setOaname(String oaname) {
this.oaname = oaname;
}
// private String ifDone; //是否完成 // private String ifDone; //是否完成
// //
// //
......
...@@ -71,6 +71,10 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> { ...@@ -71,6 +71,10 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
public void saveReport(ReportEntity reportEntity) { public void saveReport(ReportEntity reportEntity) {
//保存举报信息 //保存举报信息
reportEntity.preInsert(); reportEntity.preInsert();
//保存填写人信息
User user = UserUtils.getUser();
String oaname = user.getName();
reportEntity.setOaname(oaname);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String reportTime = sdf.format(reportEntity.getCreateDate()); String reportTime = sdf.format(reportEntity.getCreateDate());
reportEntity.setReportTime(reportTime); reportEntity.setReportTime(reportTime);
......
...@@ -95,7 +95,7 @@ file.image.thumb.width=640 ...@@ -95,7 +95,7 @@ file.image.thumb.width=640
file.image.thumb.height=640 file.image.thumb.height=640
# The Prefix Url # The Prefix Url
#file.prefix.url=http://123.56.146.81:8808/ #file.prefix.url=http://123.56.146.81:8808/
file.prefix.url=http://192.168.3.232:8081/ file.prefix.url=http://192.168.7.210:8081/
# The Prefix separator # The Prefix separator
file.upload.path.separator = / file.upload.path.separator = /
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
r.create_by AS "createBy", r.create_by AS "createBy",
r.create_date AS "createDate", r.create_date AS "createDate",
r.update_by AS "updateBy", r.update_by AS "updateBy",
r.update_date AS "updateDate" r.update_date AS "updateDate",
r.OA_NAME AS "oaname"
</sql> </sql>
...@@ -155,7 +156,8 @@ ...@@ -155,7 +156,8 @@
create_by, create_by,
create_date, create_date,
update_by, update_by,
update_date update_date,
OA_NAME
) VALUES ( ) VALUES (
#{id}, #{id},
#{reportProject}, #{reportProject},
...@@ -173,7 +175,8 @@ ...@@ -173,7 +175,8 @@
#{createBy.id}, #{createBy.id},
#{createDate}, #{createDate},
#{updateBy.id}, #{updateBy.id},
#{updateDate} #{updateDate},
#{oaname}
) )
</insert> </insert>
...@@ -210,7 +213,8 @@ ...@@ -210,7 +213,8 @@
exchange_type = #{exchangeType}, exchange_type = #{exchangeType},
deal_result = #{dealResult}, deal_result = #{dealResult},
update_by = #{updateBy.id}, update_by = #{updateBy.id},
update_date = #{updateDate} update_date = #{updateDate},
OA_NAME = #{oaname}
WHERE id = #{id} WHERE id = #{id}
</update> </update>
...@@ -489,7 +493,8 @@ ...@@ -489,7 +493,8 @@
r.create_by AS "createBy", r.create_by AS "createBy",
r.create_date AS "createDate", r.create_date AS "createDate",
r.update_by AS "updateBy", r.update_by AS "updateBy",
r.update_date AS "updateDate" r.update_date AS "updateDate",
r.OA_NAME AS "oaname"
FROM ct_bbtc_report r FROM ct_bbtc_report r
WHERE r.report_status = #{processStatus} WHERE r.report_status = #{processStatus}
<if test="isAdmin != null"> <if test="isAdmin != null">
......
...@@ -165,8 +165,8 @@ ...@@ -165,8 +165,8 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="500" <form:textarea id="reportContent" htmlEscape="true" path="reportContent" rows="4" maxlength="3000"
class="input-xxlarge" placeholder="最多输入500个字符"/> class="input-xxlarge" placeholder="最多输入3000个字符"/>
<span class="help-inline"><font color="red">*</font> </span> <span class="help-inline"><font color="red">*</font> </span>
</div> </div>
</div> </div>
......
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
<th>标题</th> <th>标题</th>
<th>业务类型</th> <th>业务类型</th>
<th>被举报项目</th> <th>被举报项目</th>
<th>OA账号</th>
<th>举报人</th> <th>举报人</th>
<th>举报人电话</th> <th>举报人电话</th>
<th>区域</th> <th>区域</th>
...@@ -148,6 +149,7 @@ ...@@ -148,6 +149,7 @@
<c:if test="${report.supplementType eq '7'}">投诉</c:if> <c:if test="${report.supplementType eq '7'}">投诉</c:if>
</td> </td>
<td>${report.reportProject}</td> <td>${report.reportProject}</td>
<td>${report.oaname}</td>
<td>${report.reportPersonName}</td> <td>${report.reportPersonName}</td>
<td>${report.reportPersonTel}</td> <td>${report.reportPersonTel}</td>
<td> <td>
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
$(document).ready(function () { $(document).ready(function () {
$("#inputForm").validate({ $("#inputForm").validate({
submitHandler: function (form) { submitHandler: function (form) {
messages: {
supplementContent: {maxlength: "最多输入{0}个字符"}
}
if ($("#supplementType").val() == " "){ if ($("#supplementType").val() == " "){
top.$.jBox.tip('请选择业务类型', 'warning'); top.$.jBox.tip('请选择业务类型', 'warning');
}else if ($("#supplementArea").val() == " "){ }else if ($("#supplementArea").val() == " "){
...@@ -259,7 +262,8 @@ ...@@ -259,7 +262,8 @@
<div class="control-group"> <div class="control-group">
<label class="control-label">内容:</label> <label class="control-label">内容:</label>
<div class="controls"> <div class="controls">
<form:textarea id="supplementContent" htmlEscape="true" path="supplementContent" rows="4" maxlength="500" class="input-xxlarge"/> <form:textarea id="supplementContent" htmlEscape="true" path="supplementContent" rows="4"
maxlength="500" class="input-xxlarge" placeholder="最多输入3000个字符"/>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
...@@ -353,7 +357,7 @@ ...@@ -353,7 +357,7 @@
$("input:radio").attr("checked",false); $("input:radio").attr("checked",false);
$("#chooseItem").empty(); $("#chooseItem").empty();
$(this).attr("checked",true); $(this).attr("checked",true);
$("#chooseItem").html("已选择 " + $("input:radio:checked").parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>"); $("#chooseItem").html("已选择 " + b.parent().next().next().next().html()+"<span onclick='remove();'><font size='5'> ×</font></span>");
}); });
}); });
......
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