Commit 4ffe7d12 by 佰邦同创-郝泉明

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

# Conflicts:
#	src/main/java/com/ejweb/modules/report/service/ReportService.java
#	src/main/java/com/ejweb/modules/report/web/ReportController.java
#	src/main/java/com/ejweb/modules/report/web/ReportToWordController.java
#	src/main/resources/ejweb.properties
#	src/main/resources/mappings/modules/report/CtBbtcTypeAreaDao.xml
parents 1aa07917 b22ee0fe
......@@ -66,6 +66,16 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private String lStatus; //关闭修改状态
private String isAdmin; //是否管理员
private String isFzAdmin; //是否輔助管理员
private String isFzAdmin02; //是否輔助管理员2 反舞弊负责人岗
public String getIsFzAdmin02() {
return isFzAdmin02;
}
public void setIsFzAdmin02(String isFzAdmin02) {
this.isFzAdmin02 = isFzAdmin02;
}
private String oaarea; //账号区域
private String participants; //参与人
private String insider; //知情人
......
......@@ -406,7 +406,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
report.setTransferName(exchangeAfterUser);
/*封装转换集团信息*/
/* String supplementGroup = report.getSupplementGroup();*/
/* String supplementGroup = report.getSupplementGroup();*/
/* if(StringUtils.isNoneBlank(supplementGroup)){
if("3437402691677202102".equals(supplementGroup)){
report.setSupplementGroup("集团本部");
......@@ -948,7 +948,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
if (role.getEnname().equals("admin")) {
roleNum = "1";
break;
} else if (role.getEnname().equals("fuzhuadmin")) {
} else if (role.getEnname().equals("fuzhuadmin") || role.getEnname().equals("fuzhuadmin02")) {
roleNum = "2";
break;
}
......@@ -959,6 +959,34 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
}
/**
* 检验是否是 反舞弊负责人岗
* @param user
* @return
*/
public Boolean checkRole02(User user) {
boolean flag=false;
Role roleEntity = new Role();
roleEntity.setUser(user);
List<Role> roleList = roleDao.findList(roleEntity);
if (roleList != null && roleList.size() != 0) {
for (Role role : roleList) {
if (role.getEnname().equals("admin")) {
flag=false;
break;
} else if (role.getEnname().equals("fuzhuadmin")) {
flag=false;
break;
}else if (role.getEnname().equals("fuzhuadmin02")) {
flag=true;
break;
}
}
}
return flag;
}
/**
* 判断当前用户角色 1管理员 2辅助管理员
*
* @param
......@@ -972,7 +1000,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
List<Role> roleList = roleDao.findList(roleEntity);
if (roleList != null && roleList.size() != 0) {
for (Role role : roleList) {
if (role.getName().equals("辅助管理员")) {
if (role.getName().equals("反舞弊内控员工岗")|| role.getName().equals("反舞弊负责人岗")) {
roleName = "辅助管理员";
break;
}
......@@ -1047,8 +1075,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
*/
public Page<ReportEntity> findQyList(Page<ReportEntity> page, ReportEntity reportEntity) {
reportEntity.setPage(page);
/*
* *//*查询出区域列表所有集团 id 封装到reportEntity实体内*//*
/*
* *//*查询出区域列表所有集团 id 封装到reportEntity实体内*//*
List<CtBbtcRegion> allList = ctBbtcRegionDao.findAllList();
System.out.println("区域总数:=========="+allList.size());
reportEntity.setRegionList(allList);
......
......@@ -132,7 +132,7 @@ public class ReportController extends BaseController {
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
/*遍历集合 转换业务类型 类别 */
if(StringUtils.isNoneBlank(report.getSupplementType())){
String[] getSupplementTypeStr = report.getSupplementType().split(",");
......@@ -162,6 +162,26 @@ public class ReportController extends BaseController {
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
/* 移交人员*/
String exchangeAfterUser = reportdao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser);
String isAdmin = reportService.checkRole(user);
if(report.getExchangeAfterUser()!= null){
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
/*如果是区域管理员 且设置了不显示 */
if(user.getId().equals(report.getExchangeAfterUser()) && "2".equals(report.getIfClue())){
System.out.printf("隐藏信息=============");
report.setReportPersonName(null);
report.setReportPersonTel(null);
report.setReportPersonEmail(null);
report.setQq(null);
report.setWeixin(null);
}
}
}
}
......@@ -207,8 +227,8 @@ public class ReportController extends BaseController {
}
}*/
/* String value = "";*/
/*for (ReportEntity report : reportlist) {
/* String value = "";
for (ReportEntity report : reportlist) {
if (StringUtils.isNoneBlank(report.getOaarea())) {
if (report.getOaarea().equals("North China")) {
value = "华北区域公司";
......@@ -237,8 +257,8 @@ public class ReportController extends BaseController {
}
String exchangeAfterUser = reportdao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser);
}*/
}
*/
page.setList(reportlist);
String isAdmin = reportService.checkRole(user);
model.addAttribute("page", page);
......@@ -343,6 +363,21 @@ public class ReportController extends BaseController {
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
String isAdmin = reportService.checkRole(user);
if(report.getExchangeAfterUser()!= null){
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
/*如果是区域管理员 且设置了不显示 */
if(user.getId().equals(report.getExchangeAfterUser()) && "2".equals(report.getIfClue())){
System.out.printf("隐藏信息=============");
report.setReportPersonName(null);
report.setReportPersonTel(null);
report.setReportPersonEmail(null);
report.setQq(null);
report.setWeixin(null);
}
}
}
}
......@@ -534,7 +569,7 @@ public class ReportController extends BaseController {
}else{
reportEntity1.setTransferGroup("--");
}*/
//String isAdmin = reportService.checkRole(useradmin);
if (isAdmin.equals("1") || isAdmin.equals("2")) {
model.addAttribute("ifClue", true);
} else {
......@@ -720,6 +755,14 @@ public class ReportController extends BaseController {
reportEntity.setSupplementCategory("");
}
/*如果处理结果不是移交其他部门,清除原来数据*/
System.out.println(reportEntity.getDealResult());
if(Integer.parseInt(reportEntity.getDealResult())!= 6){
reportEntity.setTransferGroup(null);
reportEntity.setTransferArea(null);
reportEntity.setTransferDepartment(null);
}
//判断登录人的角色
User user = UserUtils.getUser();
String isAdmin = reportService.checkRole(user);
......@@ -816,7 +859,7 @@ public class ReportController extends BaseController {
for (User userEntity : page.getList()) {
html.append(" <tr>");
if (flag.equals("1")) {
html.append(" <td><input type='radio' value='" + userEntity.getId() + "'></td>");
html.append(" <td id='radioBtn'> <input name='user' type='radio' value='" + userEntity.getId() + "'></td>");
html.append(" <td>" + i + "</td>");
html.append(" <td>" + (userEntity.getNo() == null ? "" : userEntity.getNo()) + "</td>");
html.append(" <td>" + (userEntity.getName() == null ? "" : userEntity.getName()) + "</td>");
......@@ -843,7 +886,7 @@ public class ReportController extends BaseController {
}
html.append(" </tbody>");
html.append("</table>");
// html.append("<span id='chooseItem'></span>");
/* html.append("<span id='chooseItem'></span>");*/
if (page.getList().size() == 0) {
html.append(" <span style='color: #999999;margin: 20px 0 70px 20px;display: block;'>未查询到相关内容</span>");
}
......@@ -907,6 +950,35 @@ public class ReportController extends BaseController {
reportList = reportService.getReportList(reportEntity);
}
for (ReportEntity report002:reportList) {
if(report002.getExchangeAfterUser()!= null){
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
/*如果是区域管理员 且设置了不显示 */
if(user.getId().equals(report002.getExchangeAfterUser()) && "2".equals(report002.getIfClue())){
System.out.printf("隐藏信息=============");
report002.setReportPersonName(null);
report002.setReportPersonTel(null);
report002.setReportPersonEmail(null);
report002.setQq(null);
report002.setWeixin(null);
}
}
}
/* if(report002.getExchangeAfterUser()!= null){
*//*如果设置了不显示 *//*
if(user.getId().equals(report002.getExchangeAfterUser()) && "2".equals(report002.getIfClue())){
System.out.printf("隐藏信息=============");
report002.setReportPersonName(null);
report002.setReportPersonTel(null);
report002.setReportPersonEmail(null);
report002.setQq(null);
report002.setWeixin(null);
}
}*/
}
new ExportExcel("举报列表", ReportEntity.class, isAdmin).setDataList(reportList).write(request, response, fileName).dispose();
return null;
} catch (Exception e) {
......
......@@ -7,6 +7,8 @@ import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import com.ejweb.modules.report.service.ReportService;
import com.ejweb.modules.sys.entity.User;
import com.ejweb.modules.sys.utils.UserUtils;
import org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy;
import org.apache.poi.xwpf.usermodel.*;
import org.apache.xmlbeans.XmlException;
......@@ -191,15 +193,51 @@ public class ReportToWordController {
//表格第一行
XWPFTableRow reportPersonName = peopleInfoTable.getRow(0);
reportPersonName.getCell(0).setText("姓名:");
reportPersonName.addNewTableCell().setText(reportEntity.getReportPersonName() == null ? "" : reportEntity.getReportPersonName());
User user = UserUtils.getUser();
String isAdmin = reportService.checkRole(user);
/*如果移交后是本人 且不显示数据 则设置“”*/
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){
reportPersonName.addNewTableCell().setText( "");
}else{
reportPersonName.addNewTableCell().setText(reportEntity.getReportPersonName() == null ? "" : reportEntity.getReportPersonName());
}
}else{
//系统 辅助 管理都能看见
reportPersonName.addNewTableCell().setText(reportEntity.getReportPersonName() == null ? "" : reportEntity.getReportPersonName());
}
//表格第二行
XWPFTableRow reportPersonTel = peopleInfoTable.createRow();
reportPersonTel.getCell(0).setText("手机号:");
reportPersonTel.getCell(1).setText(reportEntity.getReportPersonTel() == null ? "" : reportEntity.getReportPersonTel());
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){
reportPersonTel.getCell(1).setText("");
}else{
reportPersonTel.getCell(1).setText(reportEntity.getReportPersonTel() == null ? "" : reportEntity.getReportPersonTel());
}
}else {
//系统 辅助管理
reportPersonTel.getCell(1).setText(reportEntity.getReportPersonTel() == null ? "" : reportEntity.getReportPersonTel());
}
//表格第三行
XWPFTableRow reportPersonEmail = peopleInfoTable.createRow();
reportPersonEmail.getCell(0).setText("Email:");
reportPersonEmail.getCell(1).setText(reportEntity.getReportPersonEmail() == null ? "" : reportEntity.getReportPersonEmail());
if(! isAdmin.equals("1") && ! isAdmin.equals("2")){
if(user.getId().equals(reportEntity.getExchangeAfterUser()) && "2".equals(reportEntity.getIfClue())){
reportPersonEmail.getCell(1).setText("");
}else{
reportPersonEmail.getCell(1).setText(reportEntity.getReportPersonEmail() == null ? "" : reportEntity.getReportPersonEmail());
}
}else {
//辅助 系统管理员
reportPersonEmail.getCell(1).setText(reportEntity.getReportPersonEmail() == null ? "" : reportEntity.getReportPersonEmail());
}
//表格第四行
XWPFTableRow reportSource = peopleInfoTable.createRow();
reportSource.getCell(0).setText("举报途径:");
......
......@@ -11,6 +11,7 @@ import com.ejweb.core.utils.StringUtils;
import com.ejweb.core.utils.excel.ExportExcel;
import com.ejweb.core.utils.excel.ImportExcel;
import com.ejweb.core.validator.BeanValidators;
import com.ejweb.modules.report.service.ReportService;
import com.ejweb.modules.sys.entity.Office;
import com.ejweb.modules.sys.entity.Role;
import com.ejweb.modules.sys.entity.User;
......@@ -43,6 +44,9 @@ public class SysUserController extends BaseController {
@Autowired
private SystemService systemService;
@Autowired
private ReportService reportService;
@ModelAttribute
public User get(@RequestParam(required=false) String id) {
......@@ -78,6 +82,7 @@ public class SysUserController extends BaseController {
@RequiresPermissions("sys:user:view")
@RequestMapping(value = "form")
public String form(User user, Model model) {
if (user.getCompany()==null || user.getCompany().getId()==null){
user.setCompany(UserUtils.getUser().getCompany());
}
......@@ -88,9 +93,31 @@ public class SysUserController extends BaseController {
if(StringUtils.isNotBlank(user.getId())){
user = systemService.getUser(user.getId());
}
model.addAttribute("user", user);
List<Role> roleList = systemService.findAllRole();
//判断登录人的角色 如果是新角色 反舞弊负责人 去掉集团审查。。。角色
User userr = UserUtils.getUser();
Boolean isAdmin = reportService.checkRole02(userr);
//当角色为 反舞弊负责人岗位时 不能让其修改系统管理员的人员资料
String show_save="0";
List<Role> roleList1 = user.getRoleList();
if(isAdmin){
for (int i = roleList.size() - 1 ; i>0 ; i--) {
if("admin".equals(roleList.get(i).getEnname())) {
System.out.println(roleList.get(i).getName()+"==========");
roleList.remove(roleList.get(i));
}
}
for (Role role:roleList1) {
if( "admin".equals(role.getEnname())){
show_save="1";
}
}
}
model.addAttribute("show_save", show_save);
for (int i = roleList.size() - 1 ; i>0 ; i--) {
if("1".equals(roleList.get(i).getUnChecked())) {
roleList.remove(roleList.get(i));
......
......@@ -3,6 +3,7 @@
#============================#
#\u4ea7\u54c1\u4fe1\u606f\u8bbe\u7f6e
#productName=\u76d1\u5bdf\u5ba1\u8ba1\u7ba1\u7406\u7cfb\u7edf
productName=\u4e3e\u62a5\u7ba1\u7406\u7cfb\u7edf
copyrightYear=2017
version=V1.2.6
......
......@@ -43,7 +43,9 @@
AND a.AREA_ID = #{area}
</if>
</where>
/*GROUP BY a.parent_id*/
GROUP BY a.id,a.parent_id,b.label,c.name,d.name
</select>
<select id="findList" resultType="com.ejweb.modules.report.entity.CtBbtcTypeArea">
......
......@@ -99,7 +99,7 @@
LEFT JOIN ct_bbtc_region CR2 ON r.transferArea = CR2.id
<where>
1 = 1
<if test="isAdmin == null and isFzAdmin == null">
<if test="isAdmin == null and isFzAdmin == null and isFzAdmin02 == null" >
AND r.exchange_after_user = #{exchangeAfterUser} AND r.create_by != #{exchangeAfterUser}
</if>
<if test="isAdmin != null">
......@@ -110,6 +110,11 @@
R.EXCHANGE_AFTER_USER = #{exchangeBeforeUser}
OR R.CREATE_BY = #{exchangeBeforeUser})) AND SU.AREA IS NULL
</if>
<if test="isFzAdmin02 != null">
AND ((R.EXCHANGE_BEFORE_USER = #{exchangeBeforeUser} OR
R.EXCHANGE_AFTER_USER = #{exchangeBeforeUser}
OR R.CREATE_BY = #{exchangeBeforeUser})) AND SU.AREA IS NULL
</if>
<if test="reportStatus != null and reportStatus != ''">
AND r.report_status = #{reportStatus}
</if>
......@@ -298,7 +303,7 @@
ON R.supplement_type = CC.type*/
<where>
1 = 1
<if test="isAdmin == null and isFzAdmin == null">
<if test="isAdmin == null and isFzAdmin == null and isFzAdmin02 == null">
AND r.exchange_after_user = #{exchangeAfterUser} AND r.create_by = #{exchangeAfterUser}
</if>
<if test="isAdmin != null">
......@@ -333,6 +338,23 @@
*/
AND su.area IS NOT NULL
</if>
<if test="isFzAdmin02 != null">
AND r.Exchange_After_User = #{exchangeBeforeUser}
AND r.create_by != #{exchangeBeforeUser}
/*
AND su.area IN ('North China',
'BeiJing',
'ShangHai',
'SouthWest',
'SouthEast',
'Central China',
'GuangShen',
'Hainan',
'Group',
'PropertyGroup')
*/
AND su.area IS NOT NULL
</if>
<if test="reportStatus != null and reportStatus != ''">
AND r.report_status = #{reportStatus}
</if>
......
......@@ -101,8 +101,10 @@
});
//选中用户并关闭
$("#btnConfirm").click(function () {
$("#chooseUser").val($("input:radio:checked").parent().next().next().next().html());
$("#userId").val($("input:radio:checked").val());
// $("#chooseUser").val($("input:radio:checked").parent().next().next().next().html());
$("#chooseUser").val($("input[name='user']:checked").parent().next().next().next().html());
// $("#userId").val($("input:radio:checked").val());
$("#userId").val($("input[name='user']:checked").val());
$("#chooseDiv").hide();
$("#fade").hide();
});
......@@ -1380,7 +1382,7 @@
<c:if test="${page.list.size()>0}">
<c:forEach items="${page.list}" var="user" varStatus="vs">
<tr>
<td id="radioBtn"><input type="radio" value="${user.id}"></td>
<td id="radioBtn"><input name='user' type="radio" value="${user.id}"></td>
<td>${vs.count}</td>
<td>${user.no}</td>
<td>${user.name}</td>
......
......@@ -220,7 +220,11 @@
class="required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<c:if test="${show_save eq 1}">
<p style="color: red;margin-left: 105px">您暂时没有权限修改集团审计监察部门负责人岗角色人员资料!</p>
</c:if>
<%--<div class="control-group">
<label class="control-label">备注:</label>
<div class="controls">
......@@ -241,11 +245,19 @@
</div>
</div>
</c:if>--%>
<div class="form-actions">
<shiro:hasPermission name="sys:user:edit"><input id="btnSubmit" class="btn btn-primary" type="submit"
value="保 存"/>&nbsp;</shiro:hasPermission>
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
</div>
<c:if test="${show_save eq 1}">
<div class="form-actions">
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
</div>
</c:if>
<c:if test="${show_save eq 0}">
<div class="form-actions">
<shiro:hasPermission name="sys:user:edit"><input id="btnSubmit" class="btn btn-primary" type="submit"
value="保 存"/>&nbsp;</shiro:hasPermission>
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
</div>
</c:if>
</form:form>
</body>
</html>
\ No newline at end of file
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