Commit 923fe50b by sunxin

需求更新

parent f634afe2
<component name="ArtifactManager">
<artifact type="exploded-war" name="report_sunac:war exploded">
<output-path>$PROJECT_DIR$/target/report_sunac</output-path>
<properties id="maven-jee-properties">
<options>
<exploded>true</exploded>
<module>report_sunac</module>
<packaging>war</packaging>
</options>
</properties>
<root id="root">
<element id="directory" name="WEB-INF">
<element id="directory" name="classes">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -60,7 +60,7 @@
<orderEntry type="module-library">
<library name="Maven: com.alibaba:jconsole:1.8.0">
<CLASSES>
<root url="jar://D:/java jdk/lib/jconsole.jar!/" />
<root url="jar://C:/Program Files/Java/jdk1.8.0_161/lib/jconsole.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......@@ -69,7 +69,7 @@
<orderEntry type="module-library">
<library name="Maven: com.alibaba:tools:1.8.0">
<CLASSES>
<root url="jar://D:/java jdk/lib/tools.jar!/" />
<root url="jar://C:/Program Files/Java/jdk1.8.0_161/lib/tools.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
......
......@@ -36,6 +36,8 @@ public interface CrudDao<T> extends BaseDao {
*/
public List<T> findList(T entity);
/**
* 查询所有数据列表
* @param entity
......
......@@ -3,8 +3,16 @@
*/
package com.ejweb.core.service;
import java.util.ArrayList;
import java.util.List;
import com.ejweb.modules.report.dao.CtBbtcBusCategoryDao;
import com.ejweb.modules.report.dao.CtBbtcBusTypeDao;
import com.ejweb.modules.report.entity.CtBbtcBusCategory;
import com.ejweb.modules.report.entity.CtBbtcBusType;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusCategoryService;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
......@@ -26,6 +34,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>>
@Autowired
protected D dao;
/**
* 获取单条数据
* @param id
......@@ -61,7 +70,8 @@ public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>>
*/
public Page<T> findPage(Page<T> page, T entity) {
entity.setPage(page);
page.setList(dao.findList(entity));
List list= dao.findList(entity);
page.setList(list);
return page;
}
......
......@@ -5,6 +5,9 @@ package com.ejweb.modules.report.dao;
import com.ejweb.core.persistence.CrudDao;
import com.ejweb.core.persistence.annotation.MyBatisDao;
import com.ejweb.modules.report.entity.CtBbtcBusCategory;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 业务类别DAO接口
......@@ -14,4 +17,10 @@ import com.ejweb.modules.report.entity.CtBbtcBusCategory;
@MyBatisDao
public interface CtBbtcBusCategoryDao extends CrudDao<CtBbtcBusCategory> {
/**
* 根据类型id获取业务类别
* @param typeId
* @return
*/
List<CtBbtcBusCategory> getByTypeId(@Param("typeId") String typeId);
}
\ No newline at end of file
......@@ -257,4 +257,12 @@ public interface ReportDao extends CrudDao<ReportEntity> {
* @return
*/
public String selectExchangeAfterUser(String report);
/**
* 查询数据列表,检验基础资料是否使用
* @param entity
* @return
*/
public List<ReportEntity> findListByCheck(ReportEntity entity);
}
......@@ -19,6 +19,15 @@ public class CtBbtcBusCategory extends DataEntity<CtBbtcBusCategory> {
private String name; // 业务类别名称
private CtBbtcBusType type; // 所属业务类型
private String typeName; // 所属业务类型名称
private String ctBbtcGroup; //所属集团
public String getCtBbtcGroup() {
return ctBbtcGroup;
}
public void setCtBbtcGroup(String ctBbtcGroup) {
this.ctBbtcGroup = ctBbtcGroup;
}
public CtBbtcBusCategory() {
super();
......
......@@ -31,6 +31,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private String supplementInformant; //被举报人
private String supplementTitle; //标题
private String supplementType; //业务类型地产 物业 酒店 商业
private String transferGroup; //移交部门所属集团
private String transferDepartment;//移交部门 1 营销 2 工程 3 成本 4 招采 5人力 6物业 7投诉
private String supplementArea; //被举报区域
private String supplementProject; //被举报项目
......@@ -68,6 +69,14 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private CtBbtcRegion supplementAreaNew; //被举报区域
private CtBbtcBusType supplementTypeNew;//业务类型
public String getTransferGroup() {
return transferGroup;
}
public void setTransferGroup(String transferGroup) {
this.transferGroup = transferGroup;
}
public String getFlage() {
return flage;
}
......@@ -316,7 +325,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this.supplementInformant = supplementInformant;
}
@ExcelField(title = "标题", align = 2, sort = 20)
@ExcelField(title = "标题", align = 2, sort = 19)
public String getSupplementTitle() {
return supplementTitle;
}
......@@ -334,7 +343,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this.supplementType = supplementType;
}
@ExcelField(title = "区域", align = 2, sort = 32)
@ExcelField(title = "区域", align = 2, sort = 21)
public String getSupplementArea() {
return supplementArea;
}
......@@ -495,7 +504,6 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this.ipCity = ipCity;
}
@ExcelField(title = "邮件发送", align = 2, sort = 58)
public String getIsSendEmail() {
return isSendEmail;
}
......@@ -520,6 +528,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this.user = user;
}
@ExcelField(title = "所属集团", align = 2, sort = 20)
public String getSupplementGroup() {
return supplementGroup;
}
......@@ -528,6 +537,7 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this.supplementGroup = supplementGroup;
}
@ExcelField(title = "业务类别", align = 2, sort = 23)
public String getSupplementCategory() {
return supplementCategory;
}
......
......@@ -5,6 +5,7 @@ package com.ejweb.modules.report.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ejweb.core.persistence.Page;
......@@ -21,6 +22,9 @@ import com.ejweb.modules.report.dao.CtBbtcBusCategoryDao;
@Transactional(readOnly = true)
public class CtBbtcBusCategoryService extends CrudService<CtBbtcBusCategoryDao, CtBbtcBusCategory> {
@Autowired
private CtBbtcBusCategoryDao ctBbtcBusCategoryDao;
public CtBbtcBusCategory get(String id) {
return super.get(id);
}
......@@ -43,4 +47,8 @@ public class CtBbtcBusCategoryService extends CrudService<CtBbtcBusCategoryDao,
super.delete(ctBbtcBusCategory);
}
public List<CtBbtcBusCategory> getByTpyeId(String typeId){
return this.ctBbtcBusCategoryDao.getByTypeId(typeId);
}
}
\ No newline at end of file
......@@ -8,10 +8,10 @@ import com.ejweb.core.utils.IdGen;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.front.report.entity.IP2Regions;
import com.ejweb.modules.front.report.utils.IpUtils;
import com.ejweb.modules.report.dao.CtBbtcBusCategoryDao;
import com.ejweb.modules.report.dao.CtBbtcBusTypeDao;
import com.ejweb.modules.report.dao.ReportDao;
import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.entity.ReportExchangeHistory;
import com.ejweb.modules.report.entity.*;
import com.ejweb.modules.sys.dao.RoleDao;
import com.ejweb.modules.sys.entity.Office;
import com.ejweb.modules.sys.entity.Position;
......@@ -50,6 +50,12 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
@Autowired
private RoleDao roleDao;
@Autowired
private CtBbtcBusTypeDao ctBbtcBusTypeDao;
@Autowired
private CtBbtcBusCategoryDao ctBbtcBusCategoryDao;
protected static Logger logger = LoggerFactory.getLogger(ReportService.class);
/**
......@@ -367,6 +373,12 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportDao.addRecord(reportExchangeHistory);
}
public List<ReportEntity> getReportListByCheck(ReportEntity reportEntity) {
List<ReportEntity> reportList = dao.findListByCheck(reportEntity);
return reportList;
}
/**
* 查询集团举报列表
*
......@@ -379,48 +391,84 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
for (ReportEntity report : reportList) {
exchangeAfterUser = reportDao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser);
String typeStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(",");
for (String value : types) {
if (value.equals("1")) {
value = "营销";
} else if (value.equals("2")) {
value = "工程";
} else if (value.equals("3")) {
value = "成本";
} else if (value.equals("4")) {
value = "招采";
} else if (value.equals("5")) {
value = "财务";
} else if (value.equals("6")) {
value = "法务";
} else if (value.equals("7")) {
value = "行政";
} else if (value.equals("8")) {
value = "人力";
} else if (value.equals("9")) {
value = "开发";
} else if (value.equals("10")) {
value = "研发";
} else if (value.equals("11")) {
value = "投资";
}else if (value.equals("15")) {
value = "商业";
} else if (value.equals("12")) {
value = "其他";
} else if (value.equals("13")) {
value = "物业管理";
} else if (value.equals("14")) {
value = "文旅管理";
}
typeStr = typeStr + value + ",";
}
typeStr = typeStr.substring(0, typeStr.length() - 1);
}
report.setSupplementType(typeStr);
//移交部门
/*封装转换集团信息*/
String supplementGroup = report.getSupplementGroup();
if(StringUtils.isNoneBlank(supplementGroup)){
if("3437402691677202102".equals(supplementGroup)){
report.setSupplementGroup("集团本部");
}else if("3510129313047280678".equals(supplementGroup)){
report.setSupplementGroup("区域集团");
}else if("3565898923067676254".equals(supplementGroup)){
report.setSupplementGroup("服务集团");
}else if("3806696792996264972".equals(supplementGroup)){
report.setSupplementGroup("文化集团");
}else if("3770618512934949260".equals(supplementGroup)){
report.setSupplementGroup("文旅集团");
}
}else{
report.setSupplementGroup("--");
}
/*封装拼接移交部门信息*/
String transferGroup = report.getTransferGroup();
if(StringUtils.isNoneBlank(transferGroup)){
if("3437402691677202102".equals(transferGroup)){
report.setTransferDepartment("集团本部--"+report.getTransferDepartment());
}else if("3510129313047280678".equals(transferGroup)){
report.setTransferDepartment("区域集团--"+report.getTransferDepartment());
}else if("3565898923067676254".equals(transferGroup)){
report.setTransferDepartment("服务集团--"+report.getTransferDepartment());
}else if("3806696792996264972".equals(transferGroup)){
report.setTransferDepartment("文化集团--"+report.getTransferDepartment());
}else if("3770618512934949260".equals(transferGroup)){
report.setTransferDepartment("文旅集团--"+report.getTransferDepartment());
}
}else{
report.setTransferDepartment("--");
}
/*封装类型 类别数据*/
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
if(StringUtils.isNoneBlank(report.getSupplementType())){
String[] getSupplementTypeStr = report.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = ctBbtcBusTypeDao.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
}
report.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(report.getSupplementCategory())){
String[] getSupplementCategory = report.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryDao.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--";
}
}
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
/* //移交部门
String TransferDepartment = report.getTransferDepartment();
if (StringUtils.isNoneBlank(report.getTransferDepartment())) {
if (TransferDepartment.equals("1")) {
......@@ -457,7 +505,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else {
TransferDepartment = "";
}
report.setTransferDepartment(TransferDepartment);
report.setTransferDepartment(TransferDepartment);*/
//举报途径
String reportSource = report.getReportSource();
if (StringUtils.isNotBlank(reportSource)) {
......@@ -482,6 +531,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
reportSource = "";
}
report.setReportSource(reportSource);
//状态
String reportStatus = report.getReportStatus();
if (StringUtils.isNotBlank(reportStatus)) {
......@@ -519,8 +569,11 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else {
dealResult = "--";
}
report.setDealResult(dealResult);
String supplementArea = report.getSupplementArea();
/* String supplementArea = report.getSupplementArea();
if (StringUtils.isNotBlank(supplementArea)) {
if (supplementArea.equals("North China")) {
supplementArea = "华北区域公司";
......@@ -544,7 +597,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else {
supplementArea = "--";
}
report.setSupplementArea(supplementArea);
report.setSupplementArea(supplementArea);*/
report.setSupplementInformant(report.getSupplementInformant() == null ? "--" : report.getSupplementInformant());
report.setDealPersonName(report.getDealPersonName() == null ? "--" : report.getDealPersonName());
User user = UserUtils.getUser();
......@@ -557,6 +611,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else {
report.setTransferName("");
}
report.setReportIp(report.getReportIp() == null ? "--" : report.getReportIp());
report.setIpCity(report.getIpCity() == null ? "--" : report.getIpCity());
String isSendEmail = report.getIsSendEmail();
......@@ -569,6 +624,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
}
report.setIsSendEmail(isSendEmail);
}
return reportList;
}
......@@ -584,48 +640,83 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
for (ReportEntity report : reportList) {
exchangeAfterUser = reportDao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser);
String typeStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(",");
for (String value : types) {
if (value.equals("1")) {
value = "营销";
} else if (value.equals("2")) {
value = "工程";
} else if (value.equals("3")) {
value = "成本";
} else if (value.equals("4")) {
value = "招采";
} else if (value.equals("5")) {
value = "财务";
} else if (value.equals("6")) {
value = "法务";
} else if (value.equals("7")) {
value = "行政";
} else if (value.equals("8")) {
value = "人力";
} else if (value.equals("9")) {
value = "开发";
} else if (value.equals("10")) {
value = "研发";
} else if (value.equals("11")) {
value = "投资";
} else if (value.equals("15")) {
value = "商业";
} else if(value.equals("12")) {
value = "其他";
} else if (value.equals("13")) {
value = "物业管理";
} else if (value.equals("14")) {
value = "文旅管理";
}
typeStr = typeStr + value + ",";
}
typeStr = typeStr.substring(0, typeStr.length() - 1);
}
report.setSupplementType(typeStr);
//移交部门
/*封装转换集团信息*/
String supplementGroup = report.getSupplementGroup();
if(StringUtils.isNoneBlank(supplementGroup)){
if("3437402691677202102".equals(supplementGroup)){
report.setSupplementGroup("集团本部");
}else if("3510129313047280678".equals(supplementGroup)){
report.setSupplementGroup("区域集团");
}else if("3565898923067676254".equals(supplementGroup)){
report.setSupplementGroup("服务集团");
}else if("3806696792996264972".equals(supplementGroup)){
report.setSupplementGroup("文化集团");
}else if("3770618512934949260".equals(supplementGroup)){
report.setSupplementGroup("文旅集团");
}
}else{
report.setSupplementGroup("--");
}
/*封装拼接移交部门信息*/
String transferGroup = report.getTransferGroup();
if(StringUtils.isNoneBlank(transferGroup)){
if("3437402691677202102".equals(transferGroup)){
report.setTransferDepartment("集团本部--"+report.getTransferDepartment());
}else if("3510129313047280678".equals(transferGroup)){
report.setTransferDepartment("区域集团--"+report.getTransferDepartment());
}else if("3565898923067676254".equals(transferGroup)){
report.setTransferDepartment("服务集团--"+report.getTransferDepartment());
}else if("3806696792996264972".equals(transferGroup)){
report.setTransferDepartment("文化集团--"+report.getTransferDepartment());
}else if("3770618512934949260".equals(transferGroup)){
report.setTransferDepartment("文旅集团--"+report.getTransferDepartment());
}
}else{
report.setTransferDepartment("--");
}
/*封装类型 类别数据*/
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
if(StringUtils.isNoneBlank(report.getSupplementType())){
String[] getSupplementTypeStr = report.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = ctBbtcBusTypeDao.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
}
report.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(report.getSupplementCategory())){
String[] getSupplementCategory = report.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryDao.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--,";
}
}
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
/* //移交部门
String TransferDepartment = report.getTransferDepartment();
if (StringUtils.isNoneBlank(report.getTransferDepartment())) {
if (TransferDepartment.equals("1")) {
......@@ -662,7 +753,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else {
TransferDepartment = "";
}
report.setTransferDepartment(TransferDepartment);
report.setTransferDepartment(TransferDepartment);*/
//举报途径
String reportSource = report.getReportSource();
if (StringUtils.isNotBlank(reportSource)) {
......@@ -725,7 +817,7 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
dealResult = "--";
}
report.setDealResult(dealResult);
String supplementArea = report.getSupplementArea();
/* String supplementArea = report.getSupplementArea();
if (StringUtils.isNotBlank(supplementArea)) {
if (supplementArea.equals("North China")) {
supplementArea = "华北区域公司";
......@@ -749,7 +841,8 @@ public class ReportService extends CrudService<ReportDao, ReportEntity> {
} else {
supplementArea = "--";
}
report.setSupplementArea(supplementArea);
report.setSupplementArea(supplementArea);*/
report.setSupplementInformant(report.getSupplementInformant() == null ? "--" : report.getSupplementInformant());
report.setDealPersonName(report.getDealPersonName() == null ? "--" : report.getDealPersonName());
User user = UserUtils.getUser();
......
......@@ -3,14 +3,18 @@
*/
package com.ejweb.modules.report.web;
import com.alibaba.fastjson.JSONObject;
import com.ejweb.core.base.BaseController;
import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.report.entity.CtBbtcBusCategory;
import com.ejweb.modules.report.entity.CtBbtcBusType;
import com.ejweb.modules.report.entity.CtBbtcRegion;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusCategoryService;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import com.ejweb.modules.report.service.ReportService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -23,6 +27,8 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -43,6 +49,9 @@ public class CtBbtcBusCategoryController extends BaseController {
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private ReportService reportService;
@ModelAttribute
public CtBbtcBusCategory get(@RequestParam(required=false) String id) {
CtBbtcBusCategory entity = null;
......@@ -55,6 +64,39 @@ public class CtBbtcBusCategoryController extends BaseController {
return entity;
}
/**
* 跟据类型type多值查询对应的类别
* @param typeId
* @param redirectAttributes
* @param response
*/
@RequestMapping(value = "getBusCategoryList")
public void getBusCategoryList(String typeId, RedirectAttributes redirectAttributes,HttpServletResponse response){
if(typeId != null && !"".equals(typeId)){
JSONObject res = new JSONObject();
String[] typeIds = typeId.split(",");
List<CtBbtcBusCategory> ctBbtcBusCategoryList=new ArrayList<CtBbtcBusCategory>();
/*遍历typeIds 查询多个集合 将集合拼接*/
for (String type:typeIds) {
if(type!= null && !"".equals(type)){
ctBbtcBusCategoryList.addAll(ctBbtcBusCategoryService.getByTpyeId(type));
}
}
System.out.println("最终集合大小:"+ctBbtcBusCategoryList.size()+"===============================");
res.put("ctBbtcBusCategoryList", ctBbtcBusCategoryList);
String jsonStr = res.toJSONString();
try{
PrintWriter out = response.getWriter();
out.print(jsonStr);
out.close();
}catch (Exception e){
e.printStackTrace();
}
}
}
@RequiresPermissions("report:ctBbtcBusCategory:view")
@RequestMapping(value = {"list", ""})
public String list(CtBbtcBusCategory ctBbtcBusCategory, HttpServletRequest request, HttpServletResponse response, Model model) {
......@@ -86,9 +128,37 @@ public class CtBbtcBusCategoryController extends BaseController {
@RequiresPermissions("report:ctBbtcBusCategory:edit")
@RequestMapping(value = "delete")
public String delete(CtBbtcBusCategory ctBbtcBusCategory, RedirectAttributes redirectAttributes) {
/*如果信息已在举报中存在 则不删除*/
if(checkIsExist(ctBbtcBusCategory)){
addMessage(redirectAttributes, "删除业务类别不成功,举报信息已存在");
return "redirect:"+adminPath+"/report/ctBbtcBusCategory/?repage";
}
ctBbtcBusCategoryService.delete(ctBbtcBusCategory);
addMessage(redirectAttributes, "删除业务类别成功");
return "redirect:"+adminPath+"/report/ctBbtcBusCategory/?repage";
}
/**
* 校验 区域是否在举报信息中出现过
* @return true 出现过 false 未出现过
*/
public boolean checkIsExist(CtBbtcBusCategory ctBbtcBusCategory){
ReportEntity reportEntity=new ReportEntity();
//如果id不为空 跟据id去查询列表
if(StringUtils.isNotBlank(ctBbtcBusCategory.getId())){
reportEntity.setSupplementCategory(ctBbtcBusCategory.getId());
List<ReportEntity> reportList = reportService.getReportListByCheck(reportEntity);
if(reportList.size()>0){
return true;
}else{
return false;
}
}
return false;
}
}
\ No newline at end of file
......@@ -8,7 +8,10 @@ import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.report.entity.CtBbtcBusType;
import com.ejweb.modules.report.entity.CtBbtcRegion;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import com.ejweb.modules.report.service.ReportService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -21,6 +24,8 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 业务类型Controller
* @author haoqm
......@@ -38,6 +43,9 @@ public class CtBbtcBusTypeController extends BaseController {
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private ReportService reportService;
@ModelAttribute
public CtBbtcBusType get(@RequestParam(required=false) String id) {
CtBbtcBusType entity = null;
......@@ -79,9 +87,37 @@ public class CtBbtcBusTypeController extends BaseController {
@RequiresPermissions("report:ctBbtcBusType:edit")
@RequestMapping(value = "delete")
public String delete(CtBbtcBusType ctBbtcBusType, RedirectAttributes redirectAttributes) {
/*如果信息已在举报中存在 则不删除*/
if(checkIsExist(ctBbtcBusType)){
addMessage(redirectAttributes, "删除业务类型不成功,举报信息中已存在");
return "redirect:"+adminPath+"/report/ctBbtcBusType/?repage";
}
ctBbtcBusTypeService.delete(ctBbtcBusType);
addMessage(redirectAttributes, "删除业务类型成功");
return "redirect:"+adminPath+"/report/ctBbtcBusType/?repage";
}
/**
* 校验 区域是否在举报信息中出现过
* @return true 出现过 false 未出现过
*/
public boolean checkIsExist(CtBbtcBusType ctBbtcBusType){
ReportEntity reportEntity=new ReportEntity();
//如果id不为空 跟据id去查询列表
if(StringUtils.isNotBlank(ctBbtcBusType.getId())){
reportEntity.setSupplementType(ctBbtcBusType.getId());
List<ReportEntity> reportList = reportService.getReportListByCheck(reportEntity);
if(reportList.size()>0){
return true;
}else{
return false;
}
}
return false;
}
}
\ No newline at end of file
......@@ -10,8 +10,11 @@ import com.ejweb.core.persistence.Page;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.report.entity.CtBbtcBusType;
import com.ejweb.modules.report.entity.CtBbtcRegion;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import com.ejweb.modules.report.service.CtBbtcRegionService;
import com.ejweb.modules.report.service.ReportService;
import com.sun.org.apache.xpath.internal.operations.Bool;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -45,6 +48,9 @@ public class CtBbtcRegionController extends BaseController {
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private ReportService reportService;
@ModelAttribute
public CtBbtcRegion get(@RequestParam(required=false) String id) {
CtBbtcRegion entity = null;
......@@ -86,10 +92,40 @@ public class CtBbtcRegionController extends BaseController {
@RequiresPermissions("report:ctBbtcRegion:edit")
@RequestMapping(value = "delete")
public String delete(CtBbtcRegion ctBbtcRegion, RedirectAttributes redirectAttributes) {
/*如果信息已在举报中存在 则不删除*/
System.out.println(checkIsExist(ctBbtcRegion)+"========================================");
if(!checkIsExist(ctBbtcRegion)){
ctBbtcRegionService.delete(ctBbtcRegion);
addMessage(redirectAttributes, "删除区域基础资料成功");
return "redirect:"+adminPath+"/report/ctBbtcRegion/?repage";
}
addMessage(redirectAttributes, "删除区域基础资料不成功,举报信息中已存在");
return "redirect:"+adminPath+"/report/ctBbtcRegion/?repage";
}
/**
* 校验 区域是否在举报信息中出现过
* @return true 出现过 false 未出现过
*/
public boolean checkIsExist(CtBbtcRegion ctBbtcRegion){
ReportEntity reportEntity=new ReportEntity();
//如果id不为空 跟据id去查询列表
if(StringUtils.isNotBlank(ctBbtcRegion.getId())){
reportEntity.setSupplementArea(ctBbtcRegion.getId());
List<ReportEntity> reportList = reportService.getReportListByCheck(reportEntity);
System.out.println(reportList.size()+"============================");
if(reportList.size()>0){
return true;
}else{
return false;
}
}
return false;
}
@RequestMapping(value = "getRegionList")
public void getRegionList(String groupId, RedirectAttributes redirectAttributes,HttpServletResponse response){
......
......@@ -8,9 +8,14 @@ import com.ejweb.core.utils.SpringContextHolder;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.core.utils.excel.ExportExcel;
import com.ejweb.modules.report.dao.CtBbtcBusTypeDao;
import com.ejweb.modules.report.dao.ReportDao;
import com.ejweb.modules.report.entity.CtBbtcBusCategory;
import com.ejweb.modules.report.entity.CtBbtcBusType;
import com.ejweb.modules.report.entity.ReportAttachmentEntity;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusCategoryService;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import com.ejweb.modules.report.service.ReportService;
import com.ejweb.modules.sys.entity.Office;
import com.ejweb.modules.sys.entity.Position;
......@@ -33,6 +38,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -53,6 +59,12 @@ public class ReportController extends BaseController {
@Autowired
private ReportDao reportdao;
@Autowired
protected CtBbtcBusTypeService CtBbtcBusTypeService;
@Autowired
protected CtBbtcBusCategoryService ctBbtcBusCategoryService;
@ModelAttribute
public ReportEntity get(@RequestParam(required = false) String id) {
......@@ -115,7 +127,46 @@ public class ReportController extends BaseController {
}
List<ReportEntity> reportlist = page.getList();
for (ReportEntity report : reportlist) {
/*封装类型 类别数据*/
for (ReportEntity report: reportlist ) {
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
if(StringUtils.isNoneBlank(report.getSupplementType())){
String[] getSupplementTypeStr = report.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = CtBbtcBusTypeService.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
}
report.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(report.getSupplementCategory())){
String[] getSupplementCategory = report.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryService.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--";
}
}
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
}
/*for (ReportEntity report : reportlist) {
String departmentStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(",");
......@@ -155,10 +206,10 @@ public class ReportController extends BaseController {
}
report.setSupplementType(departmentStr.substring(0, departmentStr.length() - 1));
}
}
}*/
String value = "";
for (ReportEntity report : reportlist) {
/* String value = "";*/
/*for (ReportEntity report : reportlist) {
if (StringUtils.isNoneBlank(report.getOaarea())) {
if (report.getOaarea().equals("North China")) {
value = "华北区域公司";
......@@ -187,7 +238,7 @@ public class ReportController extends BaseController {
}
String exchangeAfterUser = reportdao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser);
}
}*/
page.setList(reportlist);
String isAdmin = reportService.checkRole(user);
......@@ -259,80 +310,43 @@ public class ReportController extends BaseController {
}
List<ReportEntity> reportlist = page.getList();
for (ReportEntity report : reportlist) {
/*封装类型 类别数据*/
for (ReportEntity report: reportlist ) {
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
String departmentStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(",");
for (String value : types) {
if (value.equals("1")) {
value = "营销";
} else if (value.equals("2")) {
value = "工程";
} else if (value.equals("3")) {
value = "成本";
} else if (value.equals("4")) {
value = "招采";
} else if (value.equals("5")) {
value = "财务";
} else if (value.equals("6")) {
value = "法务";
} else if (value.equals("7")) {
value = "行政";
} else if (value.equals("8")) {
value = "人力";
} else if (value.equals("9")) {
value = "开发";
} else if (value.equals("10")) {
value = "研发";
} else if (value.equals("11")) {
value = "投资";
} else if (value.equals("12")) {
value = "其他";
} else if (value.equals("13")) {
value = "物业管理";
} else if (value.equals("14")) {
value = "文旅管理";
} else if (value.equals("15")) {
value = "商业";
if(StringUtils.isNoneBlank(report.getSupplementType())){
String[] getSupplementTypeStr = report.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = CtBbtcBusTypeService.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
departmentStr = departmentStr + value + ",";
}
report.setSupplementType(departmentStr.substring(0, departmentStr.length() - 1));
report.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(report.getSupplementCategory())){
String[] getSupplementCategory = report.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryService.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--";
}
String value = "";
for (ReportEntity report : reportlist) {
if (StringUtils.isNoneBlank(report.getOaarea())) {
if (report.getOaarea().equals("North China")) {
value = "华北区域公司";
} else if (report.getOaarea().equals("BeiJing")) {
value = "北京区域公司";
} else if (report.getOaarea().equals("ShangHai")) {
value = "上海区域公司";
} else if (report.getOaarea().equals("SouthWest")) {
value = "西南区域公司";
} else if (report.getOaarea().equals("SouthEast")) {
value = "东南区域公司";
} else if (report.getOaarea().equals("Central China")) {
value = "华中区域公司";
} else if (report.getOaarea().equals("GuangShen")) {
value = "广深区域公司";
} else if (report.getOaarea().equals("Hainan")) {
value = "海南区域公司";
} else if (report.getOaarea().equals("Group")) {
value = "集团本部";
} else if (report.getOaarea().equals("PropertyGroup")) {
value = "物业集团";
}
if (StringUtils.isNoneBlank(report.getOaname())) {
report.setOaname(value + "-" + report.getOaname());
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
}
String exchangeAfterUser = reportdao.selectExchangeAfterUser(report.getExchangeAfterUser());
report.setTransferName(exchangeAfterUser);
}
page.setList(reportlist);
String isAdmin = reportService.checkRole(user);
model.addAttribute("page", page);
......@@ -390,7 +404,45 @@ public class ReportController extends BaseController {
ReportAttachmentEntity reportAttachment = new ReportAttachmentEntity();
reportAttachment.setReportId(reportEntity.getId());
reportAttachment.setAttachmentType("0");
if (StringUtils.isNoneBlank(reportEntity.getSupplementType())) {
//跟据id查询举报信息
ReportEntity reportEntity1 = reportService.get(reportEntity.getId());
/*封装类型 类别数据*/
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
if(StringUtils.isNoneBlank(reportEntity1.getSupplementType())){
String[] getSupplementTypeStr = reportEntity1.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = CtBbtcBusTypeService.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
}
reportEntity1.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(reportEntity1.getSupplementCategory())){
String[] getSupplementCategory = reportEntity1.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryService.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--";
}
}
reportEntity1.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
/* if (StringUtils.isNoneBlank(reportEntity.getSupplementType())) {
String supplementType = "";
String[] supplementTypes = {"营销", "工程", "成本", "招采", "财务", "法务", "行政", "人力", "开发", "研发", "投资", "其他", "物业管理", "文旅管理","商业"};
......@@ -400,7 +452,7 @@ public class ReportController extends BaseController {
}
supplementType = supplementType.substring(0, supplementType.length() - 1);
reportEntity.setSupplementType(supplementType);
}
}*/
String isSendEmail = reportEntity.getIsSendEmail();
if (StringUtils.isNotBlank(isSendEmail)) {
if (isSendEmail.equals("1")) {
......@@ -471,7 +523,7 @@ public class ReportController extends BaseController {
}
}
model.addAttribute("isAdmin", isAdmin);
model.addAttribute("report", reportEntity);
model.addAttribute("report", reportEntity1);
model.addAttribute("reportAttachmentList", reportAttachmentList);
model.addAttribute("supplementAttachmentList", supplementAttachmentList);
model.addAttribute("dealAttachmentList", dealAttachmentList);
......@@ -514,16 +566,46 @@ public class ReportController extends BaseController {
dealAttachment.setReportId(reportEntity.getId());
dealAttachment.setAttachmentType("2");
List<ReportAttachmentEntity> dealAttachmentList = reportService.getAttachmentInfo(dealAttachment);
//业务类型
String supplementTypeStr = "";
if (StringUtils.isNotBlank(reportEntity.getSupplementType())) {
String[] supplementTypes = {"营销", "工程", "成本", "招采", "财务", "法务", "行政", "人力", "开发", "研发", "投资", "其他", "物业管理", "文旅管理","商业"};
String typeNumber[] = reportEntity.getSupplementType().split(",");
for (int i = 0; i < typeNumber.length; i++) {
supplementTypeStr += supplementTypes[Integer.valueOf(typeNumber[i]) - 1] + ",";
//跟据id查询举报信息
ReportEntity reportEntity1 = reportService.get(reportEntity.getId());
/*封装类型 类别数据*/
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
if(StringUtils.isNoneBlank(reportEntity1.getSupplementType())){
String[] getSupplementTypeStr = reportEntity1.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = CtBbtcBusTypeService.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
}
reportEntity1.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(reportEntity1.getSupplementCategory())){
String[] getSupplementCategory = reportEntity1.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryService.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--";
}
supplementTypeStr = supplementTypeStr.substring(0, supplementTypeStr.length() - 1);
}
reportEntity1.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
reportEntity.setDealPerson(reportEntity.getDealPersonName());
if (StringUtils.isBlank(reportEntity.getDealPersonName())) {
reportEntity.setDealPerson(user.getName());
......@@ -548,7 +630,7 @@ public class ReportController extends BaseController {
model.addAttribute("page", page);
model.addAttribute("user", userEntity);
model.addAttribute("userName", user.getName());
model.addAttribute("report", reportEntity);
model.addAttribute("report", reportEntity1);
model.addAttribute("companyList", companyList);
model.addAttribute("officeList", officeList);
model.addAttribute("positionList", positionList);
......@@ -556,7 +638,6 @@ public class ReportController extends BaseController {
model.addAttribute("reportAttachmentList", reportAttachmentList);
model.addAttribute("supplementAttachmentList", supplementAttachmentList);
model.addAttribute("dealAttachmentList", dealAttachmentList);
model.addAttribute("supplementTypeStr", supplementTypeStr);
return "modules/report/reportTrack";
}
......@@ -570,6 +651,9 @@ public class ReportController extends BaseController {
@RequestMapping(value = "addTrack")
public String addTrack(ReportEntity reportEntity, HttpServletRequest request, Model
model, RedirectAttributes redirectAttributes) {
System.out.println(reportEntity.getSupplementCategory()+"===传参=======================");
System.out.println(reportEntity.getSupplementType()+"=====传参=====================");
//判断登录人的角色
User user = UserUtils.getUser();
String isAdmin = reportService.checkRole(user);
......@@ -856,48 +940,45 @@ public class ReportController extends BaseController {
Page<ReportEntity> page = reportService.getChooseReportPage(new Page<ReportEntity>(request, response), reportEntity);
List<ReportEntity> reportlist = page.getList();
for (ReportEntity report : reportlist) {
String typeStr = "";
if (StringUtils.isNoneBlank(report.getSupplementType())) {
String[] types = report.getSupplementType().split(",");
for (String value : types) {
for (ReportEntity reportEntity1:reportlist) {
/*封装类型 类别数据*/
String SupplementTypeStr = "";
String SupplementCategoryStr = "";
/*遍历集合*/
if (StringUtils.isNoneBlank(reportEntity1.getSupplementType())) {
String[] getSupplementTypeStr = reportEntity1.getSupplementType().split(",");
for (String str : getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = CtBbtcBusTypeService.get(str);
if (ctBbtcBusType != null) {
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
} else {
SupplementTypeStr = SupplementTypeStr + "--";
}
if (value.equals("1")) {
value = "营销";
} else if (value.equals("2")) {
value = "工程";
} else if (value.equals("3")) {
value = "成本";
} else if (value.equals("4")) {
value = "招采";
} else if (value.equals("5")) {
value = "财务";
} else if (value.equals("6")) {
value = "法务";
} else if (value.equals("7")) {
value = "行政";
} else if (value.equals("8")) {
value = "人力";
} else if (value.equals("9")) {
value = "开发";
} else if (value.equals("10")) {
value = "研发";
} else if (value.equals("11")) {
value = "投资";
} else if (value.equals("15")) {
value = "商业";
} else if (value.equals("12")) {
value = "其他";
} else if (value.equals("13")) {
value = "物业管理";
} else if (value.equals("14")) {
value = "文旅管理";
}
typeStr = typeStr + value + ",";
reportEntity1.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if (StringUtils.isNoneBlank(reportEntity1.getSupplementCategory())) {
String[] getSupplementCategory = reportEntity1.getSupplementCategory().split(",");
for (String str : getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryService.get(str);
if (ctBbtcBusCategory != null) {
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
} else {
SupplementCategoryStr = SupplementCategoryStr + "--";
}
}
report.setSupplementType(typeStr.substring(0, typeStr.length() - 1));
reportEntity1.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
}
page.setList(reportlist);
model.addAttribute("page", page);
model.addAttribute("userPage", userPage);
......
......@@ -45,6 +45,7 @@ public class User extends DataEntity<User> {
private String officeName; // 部门长名称
private String oldLoginName;// 原登录名
private String newPassword; // 新密码
private String supplementGroup; //所属集团
private String area;//所属区域
private String oldLoginIp; // 上次登陆IP
private Date oldLoginDate; // 上次登陆日期
......@@ -53,6 +54,13 @@ public class User extends DataEntity<User> {
private List<Role> roleList = Lists.newArrayList(); // 拥有角色列表
public String getSupplementGroup() {
return supplementGroup;
}
public void setSupplementGroup(String supplementGroup) {
this.supplementGroup = supplementGroup;
}
private Position position; //职位
private String devision; //组织
......
......@@ -69,6 +69,16 @@ public class WorkbenchBean {
private int land = 0;
//区域
private String supplementGroup; /*所属集团*/
public String getSupplementGroup() {
return supplementGroup;
}
public void setSupplementGroup(String supplementGroup) {
this.supplementGroup = supplementGroup;
}
private String area;
//角色
private String userRoleName="";
......
......@@ -74,6 +74,8 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
List<HashMap> statusList = reportDao.getReportStatus(workbench);
//举报状态
for (HashMap status : statusList) {
/* System.out.println(status.get("report_status")+"==================================");
System.out.println(status.get("COUNT(report_status)")+"==================================");*/
if (StringUtils.isNotBlank((String) status.get("REPORT_STATUS"))) {
if ("1".equals(String.valueOf(status.get("REPORT_STATUS")))) {
//处理中
......@@ -91,6 +93,7 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
}
}
workbench.setRepStatusTotal(workbench.getUnProcess() + workbench.getProcessing() + workbench.getProcessed() + workbench.getClosed());
List<HashMap> types = reportDao.getReportType(workbench);
for (HashMap type : types) {
//营销
......@@ -141,34 +144,34 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
}
List<HashMap> totals = reportDao.getTotal(workbench);
for (HashMap total : totals) {
if (StringUtils.isNotBlank((String) total.get("REPORT_SOURCE"))) {
if ("web".equals((String) total.get("REPORT_SOURCE"))) {
if (StringUtils.isNotBlank((String) total.get("report_source"))) {
if ("web".equals((String) total.get("report_source"))) {
//官网
workbench.setWeb(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("oa".contains((String) total.get("REPORT_SOURCE"))) {
workbench.setWeb(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("oa".contains((String) total.get("report_source"))) {
//融创oa
workbench.setOa(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("supplier".equals(String.valueOf(total.get("REPORT_SOURCE")))) {
workbench.setOa(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("supplier".equals(String.valueOf(total.get("report_source")))) {
//供应商
workbench.setSupplier(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("wechat".equals(String.valueOf(total.get("REPORT_SOURCE")))) {
workbench.setSupplier(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("wechat".equals(String.valueOf(total.get("report_source")))) {
//微信公众号
workbench.setWeChat(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("sunacE".equals(String.valueOf(total.get("REPORT_SOURCE")))) {
workbench.setWeChat(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("sunacE".equals(String.valueOf(total.get("report_source")))) {
//融E
workbench.setSunacE(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("offline".equals(String.valueOf(total.get("REPORT_SOURCE")))) {
workbench.setSunacE(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("offline".equals(String.valueOf(total.get("report_source")))) {
//线下扫码
workbench.setOffline(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("tel".equals(String.valueOf(total.get("REPORT_SOURCE")))) {
workbench.setOffline(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("tel".equals(String.valueOf(total.get("report_source")))) {
//电话
workbench.setPhone(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("email".equals((String) total.get("REPORT_SOURCE"))) {
workbench.setPhone(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("email".equals((String) total.get("report_source"))) {
//邮件
workbench.setEmail(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
} else if ("visit".equals((String) total.get("REPORT_SOURCE"))) {
workbench.setEmail(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
} else if ("visit".equals((String) total.get("report_source"))) {
//来访
workbench.setVisit(Integer.valueOf(String.valueOf(total.get("COUNT(REPORT_SOURCE)"))));
workbench.setVisit(Integer.valueOf(String.valueOf(total.get("COUNT(report_source)"))));
}
}
}
......@@ -178,6 +181,8 @@ public class WorkbenchService extends CrudService<ReportDao, ReportEntity> {
}
public List<ReportEntity> getRepList(WorkbenchBean benchBean) throws Exception {
return reportDao.getRepList(benchBean);
List<ReportEntity> repList = reportDao.getRepList(benchBean);
System.out.println("大小:"+repList.size()+"==========================================");
return repList;
}
}
......@@ -3,7 +3,11 @@ package com.ejweb.modules.workbench.web;
import com.alibaba.fastjson.JSONObject;
import com.ejweb.core.base.BaseController;
import com.ejweb.core.utils.StringUtils;
import com.ejweb.modules.report.entity.CtBbtcBusCategory;
import com.ejweb.modules.report.entity.CtBbtcBusType;
import com.ejweb.modules.report.entity.ReportEntity;
import com.ejweb.modules.report.service.CtBbtcBusCategoryService;
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;
......@@ -33,11 +37,22 @@ public class WorkbenchController extends BaseController {
@Autowired
private ReportService reportService;
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private CtBbtcBusCategoryService ctBbtcBusCategoryService;
private String selAreaTemp;//所选择的区域
@RequiresPermissions("workbench:view")
@RequestMapping(value = {"list", ""})
public String getWorkbench(Model model, WorkbenchBean bean) {
System.out.println("处理状态:======================================"+bean.getProcessStatus());
WorkbenchBean workbench;
selAreaTemp=bean.getArea();
try {
......@@ -49,8 +64,47 @@ public class WorkbenchController extends BaseController {
bean.setProcessStatus("1");
}
List<ReportEntity> repList = workbenchService.getRepList(bean);
/*封装类型 类别数据*/
for (ReportEntity report: repList ) {
String SupplementTypeStr="";
String SupplementCategoryStr="";
/*遍历集合*/
if(StringUtils.isNoneBlank(report.getSupplementType())){
String[] getSupplementTypeStr = report.getSupplementType().split(",");
for (String str:getSupplementTypeStr) {
CtBbtcBusType ctBbtcBusType = ctBbtcBusTypeService.get(str);
if(ctBbtcBusType!=null){
SupplementTypeStr = SupplementTypeStr + ctBbtcBusType.getName() + ",";
}else{
SupplementTypeStr = SupplementTypeStr + "--";
}
}
report.setSupplementType(SupplementTypeStr.substring( 0, SupplementTypeStr.length()-1));
}
if(StringUtils.isNoneBlank(report.getSupplementCategory())){
String[] getSupplementCategory = report.getSupplementCategory().split(",");
for (String str:getSupplementCategory) {
CtBbtcBusCategory ctBbtcBusCategory = ctBbtcBusCategoryService.get(str);
if(ctBbtcBusCategory!=null){
SupplementCategoryStr = SupplementCategoryStr + ctBbtcBusCategory.getName() + ",";
}else{
SupplementCategoryStr = SupplementCategoryStr + "--";
}
}
report.setSupplementCategory(SupplementCategoryStr.substring(0,SupplementCategoryStr.length()-1));
}
}
model.addAttribute("workbench", bean);
model.addAttribute("repList", repList);
/*将这一类状态返回*/
model.addAttribute("reportStatus", bean.getProcessStatus());
} catch (Exception e) {
e.printStackTrace();
}
......@@ -64,15 +118,16 @@ public class WorkbenchController extends BaseController {
try {
User user = UserUtils.getUser();
bean = getWorkbenchByUser(user, bean);
res.put("bench", bean);
//区域
res.put("area",bean.getArea());
//举报状态
//1.举报状态
res.put("unProcess", bean.getUnProcess());
res.put("processing", bean.getProcessing());
res.put("processed", bean.getProcessed());
res.put("closed", bean.getClosed());
//举报结果
//3.举报结果
res.put("unsettled", bean.getUnsettled());
res.put("resultNum", bean.getComplainNum()+bean.getInvalid()+bean.getVerified()+bean.getConfirmed()+bean.getUnreaListic()+bean.getTransfer()+bean.getClue()); //總數
res.put("complainNum", bean.getComplainNum()); //移交客诉
......@@ -84,7 +139,7 @@ public class WorkbenchController extends BaseController {
res.put("clue", bean.getClue());//转为线索
res.put("startDate", bean.getStartDate());
res.put("endDate", bean.getEndDate());
//举报类型
//4.举报类型
res.put("sale", bean.getSale());
res.put("project", bean.getProject());
res.put("cost", bean.getCost());
......@@ -102,7 +157,7 @@ public class WorkbenchController extends BaseController {
res.put("businessManagement", bean.getBusinessManagement());
res.put("startDate", bean.getStartDate());
res.put("endDate", bean.getEndDate());
//举报途径
//2.举报途径
res.put("weChat", bean.getWeChat());
res.put("web", bean.getWeb());
res.put("sunacE", bean.getSunacE());
......
......@@ -7,7 +7,8 @@
a.number AS "number",
a.name AS "name",
a.type AS "type.id",
b.name AS "typeName"
b.name AS "typeName",
a.ctBbtcGroup AS "ctBbtcGroup"
</sql>
<sql id="ctBbtcBusCategoryJoins">
......@@ -22,6 +23,15 @@
WHERE a.id = #{id}
</select>
<select id="getByTypeId" resultType="CtBbtcBusCategory">
SELECT
<include refid="ctBbtcBusCategoryColumns"/>
FROM ct_bbtc_bus_category a
<include refid="ctBbtcBusCategoryJoins"/>
WHERE a.type = #{typeId}
</select>
<select id="findList" resultType="CtBbtcBusCategory">
SELECT
<include refid="ctBbtcBusCategoryColumns"/>
......@@ -67,12 +77,14 @@
id,
number,
name,
type
type,
ctBbtcGroup
) VALUES (
#{id},
#{number},
#{name},
#{type.id}
#{type.id},
#{ctBbtcGroup}
)
</insert>
......@@ -80,7 +92,8 @@
UPDATE ct_bbtc_bus_category SET
number = #{number},
name = #{name},
type = #{type.id}
type = #{type.id},
ctBbtcGroup=#{ctBbtcGroup}
WHERE id = #{id}
</update>
......
......@@ -17,9 +17,10 @@
r.supplement_department AS "supplementDepartment",
r.supplement_informant AS "supplementInformant",
r.supplement_title AS "supplementTitle",
r.supplement_type AS "supplementType",
r.transfer_department AS "transferDepartment",
r.supplement_area AS "supplementArea",
/*r.supplement_type AS "supplementType",*/
ct.name AS "transferDepartment",
r.transferGroup AS "transferGroup",
/*r.supplement_area AS "supplementArea",*/
r.supplement_project AS "supplementProject",
r.supplement_content AS "supplementContent",
r.deal_person_name AS "dealPersonName",
......@@ -43,7 +44,12 @@
r.report_site AS "site",
r.report_qq AS "qq",
r.report_weixin AS "weixin",
r.report_ifClue AS "ifClue"
r.report_ifClue AS "ifClue" ,
r.supplement_group AS "supplementGroup",
r.supplement_category AS "supplementCategory",
r.supplement_type AS "supplementType"
</sql>
......@@ -55,8 +61,18 @@
SELECT
<include refid="reportColumns"/>
,su.name AS "transferName"
,cr.name AS "supplementArea"
FROM ct_bbtc_report r
LEFT JOIN ct_bbtc_sys_user su ON r.exchange_after_user = su.id
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
/* LEFT JOIN ct_bbtc_bus_type CT
ON R.supplement_group = CT.supplement_group
LEFT JOIN ct_bbtc_bus_category CC
ON R.supplement_type = CC.type*/
WHERE r.id = #{id}
</select>
......@@ -64,6 +80,7 @@
SELECT
<include refid="reportColumns"/>
,su.name AS "transferName"
,cr.name AS "supplementArea"
FROM CT_BBTC_REPORT R
LEFT JOIN CT_BBTC_SYS_USER SU
ON R.CREATE_BY = SU.ID
......@@ -71,6 +88,11 @@
ON UR.USER_ID = SU.ID
LEFT JOIN CT_BBTC_SYS_ROLE RL
ON RL.ID = UR.ROLE_ID
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
<where>
1 = 1
<if test="isAdmin == null and isFzAdmin == null">
......@@ -138,9 +160,18 @@
<if test="dbName == 'mssql'">'%'+#{supplementInformant}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementInformant}, '%')</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="supplementArea != null and supplementArea != ''">
AND r.supplement_area = #{supplementArea}
</if>
<if test="supplementCategory != null and supplementCategory != ''">
AND r.supplement_category LIKE
<if test="dbName == 'oracle'">'%'||#{supplementCategory}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{supplementCategory}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementCategory}, '%')</if>
</if>
<if test="reportSource != null and reportSource != ''">
AND r.report_source = #{reportSource}
</if>
......@@ -162,15 +193,66 @@
ORDER BY r.update_date DESC
</select>
<select id="findListByCheck" parameterType="ReportEntity" resultType="ReportEntity">
SELECT
<include refid="reportColumns"/>
,su.name AS "transferName"
,cr.name AS "supplementArea"
FROM CT_BBTC_REPORT R
LEFT JOIN CT_BBTC_SYS_USER SU
ON R.CREATE_BY = SU.ID
LEFT JOIN CT_BBTC_SYS_USER2ROLE UR
ON UR.USER_ID = SU.ID
LEFT JOIN CT_BBTC_SYS_ROLE RL
ON RL.ID = UR.ROLE_ID
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
<where>
1 = 1
<if test="supplementType != null and supplementType != ''">
AND r.supplement_type LIKE
<if test="dbName == 'oracle'">'%'||#{supplementType}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{supplementType}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementType}, '%')</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="supplementArea != null and supplementArea != ''">
AND r.supplement_area = #{supplementArea}
</if>
<if test="supplementCategory != null and supplementCategory != ''">
AND r.supplement_category LIKE
<if test="dbName == 'oracle'">'%'||#{supplementCategory}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{supplementCategory}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementCategory}, '%')</if>
</if>
</where>
</select>
<select id="findQyList" parameterType="ReportEntity" resultType="ReportEntity">
SELECT
<include refid="reportColumns"/>
,su.name AS "transferName"
,cr.name AS "supplementArea"
FROM ct_bbtc_report r
LEFT JOIN ct_bbtc_sys_user su ON r.create_by = su.id
LEFT JOIN CT_BBTC_SYS_USER2ROLE UR ON UR.USER_ID = su.ID
LEFT JOIN CT_BBTC_SYS_ROLE RL
ON RL.ID = UR.ROLE_ID
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
/* LEFT JOIN ct_bbtc_bus_type CT
ON R.supplement_group = CT.supplement_group
LEFT JOIN ct_bbtc_bus_category CC
ON R.supplement_type = CC.type*/
<where>
1 = 1
<if test="isAdmin == null and isFzAdmin == null">
......@@ -256,9 +338,21 @@
<if test="dbName == 'mssql'">'%'+#{supplementInformant}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementInformant}, '%')</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="supplementArea != null and supplementArea != ''">
AND r.supplement_area = #{supplementArea}
</if>
<if test="supplementCategory != null and supplementCategory != ''">
AND r.supplement_category = #{supplementCategory}
</if>
<if test="supplementCategory != null and supplementCategory != ''">
AND r.supplement_category LIKE
<if test="dbName == 'oracle'">'%'||#{supplementCategory}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{supplementCategory}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{supplementCategory}, '%')</if>
</if>
<if test="reportSource != null and reportSource != ''">
AND r.report_source = #{reportSource}
</if>
......@@ -283,7 +377,16 @@
<select id="findAllList" parameterType="ReportEntity" resultType="ReportEntity">
SELECT
<include refid="reportColumns"/>
,cr.name AS "supplementArea"
FROM ct_bbtc_report r
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
/* LEFT JOIN ct_bbtc_bus_type CT
ON R.supplement_group = CT.supplement_group
LEFT JOIN ct_bbtc_bus_category CC
ON R.supplement_type = CC.type*/
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
......@@ -399,6 +502,7 @@
UPDATE ct_bbtc_report SET
supplement_informant = #{supplementInformant},
supplement_type = #{supplementType},
transferGroup=#{transferGroup},
transfer_department=#{transferDepartment},
supplement_area = #{supplementArea},
supplement_project = #{supplementProject},
......@@ -410,7 +514,9 @@
report_ifClue = #{ifClue},
deal_result = #{dealResult},
update_by = #{updateBy.id},
update_date = #{updateDate}
update_date = #{updateDate},
supplement_group=#{supplementGroup},
supplement_category=#{supplementCategory}
WHERE id = #{id}
</update>
......@@ -594,8 +700,11 @@
<select id="getReportStatus" parameterType="com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType="java.util.HashMap">
select report_status,COUNT(report_status)
FROM ct_bbtc_report
select REPORT_STATUS,COUNT(REPORT_STATUS)
FROM ct_bbtc_report r
/* LEFT JOIN ct_bbtc_region CR
ON R.supplement_group = CR.supplement_group*/
WHERE 1=1
<if test="isAdmin != null">
AND exchange_after_user = #{isAdmin}
......@@ -610,16 +719,22 @@
</if>
<if test="dbName == 'mysql'">AND DATE(create_date) &lt;= #{endDate}</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="area != null and area !=''">
and SUPPLEMENT_AREA=#{area}
AND r.supplement_area=#{area}
</if>
GROUP BY report_status
</select>
<select id="getReportResult" parameterType="com.ejweb.modules.workbench.Bean.WorkbenchBean"
resultType="java.util.HashMap">
select deal_result,COUNT(deal_result)
FROM ct_bbtc_report
select DEAL_RESULT,COUNT(DEAL_RESULT)
FROM ct_bbtc_report r
/* LEFT JOIN ct_bbtc_region CR
ON R.supplement_group = CR.supplement_group*/
WHERE 1 = 1
<if test="isAdmin != null">
AND exchange_after_user = #{isAdmin}
......@@ -634,15 +749,21 @@
</if>
<if test="dbName == 'mysql'">AND DATE(create_date) &lt;= #{endDate}</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="area != null and area !=''">
and SUPPLEMENT_AREA=#{area}
AND r.supplement_area=#{area}
</if>
GROUP BY deal_result
</select>
<select id="getTotal" parameterType="com.ejweb.modules.workbench.Bean.WorkbenchBean" resultType="java.util.HashMap">
select report_source,COUNT(report_source)
FROM ct_bbtc_report
FROM ct_bbtc_report r
/* LEFT JOIN ct_bbtc_region CR
ON R.supplement_group = CR.supplement_group*/
WHERE 1=1
<if test="isAdmin != null">
AND exchange_after_user = #{isAdmin}
......@@ -657,8 +778,12 @@
</if>
<if test="dbName == 'mysql'">AND DATE(create_date) &lt;= #{endDate}</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="area != null and area !=''">
and SUPPLEMENT_AREA=#{area}
AND r.supplement_area=#{area}
</if>
GROUP BY report_source
</select>
......@@ -696,7 +821,9 @@
"hotelManagement",
SUM(CASE WHEN supplement_type||',' LIKE '15,%' OR supplement_type||',' LIKE '%,15,%' THEN 1 ELSE 0 END) AS
"businessManagement"
FROM ct_bbtc_report
FROM ct_bbtc_report r
/* LEFT JOIN ct_bbtc_region CR
ON R.supplement_group = CR.supplement_group*/
WHERE 1=1
<if test="isAdmin != null">
AND exchange_after_user = #{isAdmin}
......@@ -711,12 +838,16 @@
</if>
<if test="dbName == 'mysql'">AND DATE(create_date) &lt;= #{endDate}</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="area != null and area !=''">
and SUPPLEMENT_AREA=#{area}
AND r.supplement_area=#{area}
</if>
</select>
<select id="getRepList" parameterType="com.ejweb.modules.workbench.Bean.WorkbenchBean" resultType="ReportEntity">
<select id="getRepList" parameterType="com.ejweb.modules.workbench.Bean.WorkbenchBean" resultType="com.ejweb.modules.report.entity.ReportEntity">
SELECT * FROM(
SELECT
r.id AS "id",
......@@ -734,7 +865,8 @@
r.supplement_informant AS "supplementInformant",
r.supplement_title AS "supplementTitle",
r.supplement_type AS "supplementType",
r.supplement_area AS "supplementArea",
r.supplement_group AS "supplementGroup",
r.supplement_category AS "supplementCategory",
r.supplement_project AS "supplementProject",
r.supplement_content AS "supplementContent",
r.deal_person_name AS "dealPersonName",
......@@ -746,8 +878,16 @@
r.create_date AS "createDate",
r.update_by AS "updateBy",
r.update_date AS "updateDate"
,cr.name AS "supplementArea"
FROM ct_bbtc_report r
WHERE r.report_status = #{processStatus}
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
<where>
r.report_status = #{processStatus}
<if test="isAdmin != null">
AND r.exchange_after_user = #{isAdmin}
</if>
......@@ -761,12 +901,19 @@
</if>
<if test="dbName == 'mysql'">AND DATE(create_date) &lt;= #{endDate}</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="area != null and area !=''">
and SUPPLEMENT_AREA=#{area}
AND r.supplement_area=#{area}
</if>
</where>
order by r.create_date desc
)
WHERE
) AS W
<if test="dbName == 'oracle'">rownum &lt;= 10</if>
<if test="dbName == 'mysql'">limit 0,10</if>
</select>
......@@ -782,23 +929,40 @@
r.report_status AS "reportStatus",
r.supplement_title AS "supplementTitle",
r.supplement_type AS "supplementType",
r.supplement_area AS "supplementArea",
r.supplement_group AS "supplementGroup",
r.supplement_category AS "supplementCategory",
r.supplement_department AS "supplementDepartment",
r.supplement_informant AS "supplementInformant",
r.deal_person_name AS "dealPersonName",
r.deal_result AS "dealResult",
r.exchange_type AS "exchangeType",
su.name AS "transferName"
,cr.name AS "supplementArea"
FROM ct_bbtc_report r
LEFT JOIN ct_bbtc_sys_user su ON r.exchange_after_user = su.id
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
<where>
1 = 1
<if test="exchangeAfterUser != null and exchangeAfterUser != ''">
AND r.exchange_after_user = #{exchangeAfterUser}
</if>
<!-- <if test="dealPersonName != null and dealPersonName != ''">
AND r.deal_person_name LIKE
'%${dealPersonName}%'
/* CONCAT('%', #{dealPersonName}, '%')*/
'%'#{dealPersonName}'%'
</if>-->
<if test="dealPersonName != null and dealPersonName != ''">
AND r.deal_person_name LIKE
'%'||#{dealPersonName}||'%'
<if test="dbName == 'oracle'">'%'||#{dealPersonName}||'%'</if>
<if test="dbName == 'mssql'">'%'+#{dealPersonName}+'%'</if>
<if test="dbName == 'mysql'">CONCAT('%', #{dealPersonName}, '%')</if>
</if>
</where>
ORDER BY r.update_date DESC
......@@ -850,7 +1014,11 @@
<select id="getTotalNum" parameterType="com.ejweb.modules.workbench.Bean.WorkbenchBean" resultType="Integer">
SELECT count(*) AS "totalCount"
FROM ct_bbtc_report
FROM ct_bbtc_report r
LEFT JOIN ct_bbtc_region CR
ON r.supplement_area = CR.id
LEFT JOIN ct_bbtc_bus_type CT
ON r.transfer_department = CT.id
WHERE 1 = 1
<if test="isAdmin != null">
AND exchange_after_user = #{isAdmin}
......@@ -865,8 +1033,12 @@
</if>
<if test="dbName == 'mysql'">AND DATE(create_date) &lt;= #{endDate}</if>
</if>
<if test="supplementGroup != null and supplementGroup != ''">
AND r.supplement_group = #{supplementGroup}
</if>
<if test="area != null and area !=''">
and SUPPLEMENT_AREA=#{area}
AND r.supplement_area=#{area}
</if>
</select>
......
......@@ -247,7 +247,8 @@
remarks,
login_flag,
photo,
del_flag
del_flag,
supplement_group
) VALUES (
#{id},
#{company.id},
......@@ -268,7 +269,9 @@
#{remarks},
#{loginFlag},
#{photo},
#{delFlag}
#{delFlag},
#{supplementGroup}
)
</insert>
<insert id="insertOfficeName">
......@@ -300,7 +303,8 @@
update_date = #{updateDate},
remarks = #{remarks},
login_flag = #{loginFlag},
photo = #{photo}
photo = #{photo},
supplement_group=#{supplementGroup}
WHERE id = #{id}
</update>
......
......@@ -23,6 +23,38 @@
}
});
});
function getRegion(ts_describe){
console.log(ts_describe);
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data2 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#supplementType");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data2 != '') {
console.log(data2[0].name);
var slsb=document.getElementById("supplementType");
for (var i = 0;i < data2.length;i++){
slsb.append(new Option(data2[i].name,data2[i].id));
}
}
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
</script>
</head>
<body>
......@@ -48,12 +80,23 @@
</div>
</div>
<div class="control-group">
<label class="control-label">所属业务类型:</label>
<label class="control-label">所属集团:</label>
<div class="controls">
<form:select onchange="getRegion(value)" path="ctBbtcGroup" class="input-xlarge required">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
<%--<form:input path="type" htmlEscape="false" maxlength="64" class="input-xlarge "/>--%>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">所属业务类型:</label>
<div class="controls">
<form:select onchange="resetPageNo();" path="type.id" class="input-xlarge required">
<form:select onchange="resetPageNo();" path="type.id" class="input-xlarge required" id="supplementType" >
<form:option value="">请选择</form:option>
<form:options items="${ctBbtcBusTypeList}" itemLabel="name" itemValue="id"
htmlEscape="false"/></form:select>
</form:select>
<%--<form:input path="type" htmlEscape="false" maxlength="64" class="input-xlarge "/>--%>
<span class="help-inline"><font color="red">*</font> </span>
</div>
......
......@@ -38,6 +38,7 @@
<tr>
<th>业务类别编码</th>
<th>业务类别名称</th>
<th>所属集团</th>
<th>所属业务类型</th>
<shiro:hasPermission name="report:ctBbtcBusCategory:edit"><th>操作</th></shiro:hasPermission>
</tr>
......@@ -51,6 +52,14 @@
<td>
${ctBbtcBusCategory.name}
</td>
<td align="center">
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq '3770618512934949260'}">文旅集团</c:if>
<c:if test="${ctBbtcBusCategory.ctBbtcGroup eq null}">--</c:if>
</td>
<td>
${ctBbtcBusCategory.typeName}
</td>
......
......@@ -115,11 +115,13 @@
<th>选择</th>
<th>ID</th>
<th>标题</th>
<th>业务类型</th>
<th >所属集团</th>
<th >所属区域</th>
<th >业务类型</th>
<th >业务类别</th>
<th>被举报项目/部门</th>
<th>举报人</th>
<th>举报人电话</th>
<th>区域</th>
<th>被举报人</th>
<th>举报时间</th>
<th>状态</th>
......@@ -136,25 +138,22 @@
<td><input type="checkbox" value="${report.id}"></td>
<td></td>
<td>${report.supplementTitle}</td>
<td>
${report.supplementType}
<td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if>
<c:if test="${report.supplementGroup eq null}">--</c:if>
</td>
<td align="center">${report.supplementArea}</td>
<td align="center">${report.supplementType}</td>
<td align="center">${report.supplementCategory}</td>
<td>${report.reportProject}/${report.supplementDepartment}</td>
<td>${report.reportPersonName}</td>
<td>${report.reportPersonTel}</td>
<td>
<c:if test="${report.supplementArea eq 'North China'}">华北区域公司</c:if>
<c:if test="${report.supplementArea eq 'BeiJing'}">北京区域公司</c:if>
<c:if test="${report.supplementArea eq 'ShangHai'}">上海区域公司</c:if>
<c:if test="${report.supplementArea eq 'SouthWest'}">西南区域公司</c:if>
<c:if test="${report.supplementArea eq 'SouthEast'}">东南区域公司</c:if>
<c:if test="${report.supplementArea eq 'Central China'}">华中区域公司</c:if>
<c:if test="${report.supplementArea eq 'GuangShen'}">广深区域公司</c:if>
<c:if test="${report.supplementArea eq 'Hainan'}">海南区域公司</c:if>
<c:if test="${report.supplementArea eq 'Group'}">集团本部</c:if>
<c:if test="${report.supplementArea eq null}">--</c:if>
</td>
<td>
<c:if test="${report.supplementInformant eq null}">--</c:if>
<c:if test="${report.supplementInformant ne null}">${report.supplementInformant}</c:if>
</td>
......
......@@ -31,7 +31,7 @@
});
var supplementArea = "${report.supplementArea}";
if (supplementArea == "North China") {
/* if (supplementArea == "North China") {
supplementArea = "华北区域公司";
} else if (supplementArea == "BeiJing") {
supplementArea = "北京区域公司";
......@@ -51,7 +51,7 @@
supplementArea = "集团本部";
} else if (supplementArea == "PropertyGroup") {
supplementArea = "物业集团";
}
}*/
$("#supplementArea").val(supplementArea);
var dealResult = "${report.dealResult}";
......@@ -307,6 +307,26 @@
</div>
<c:if test="${report.reportStatus ne '0'}">
<span class="title">举报信息补充</span>
<div class="control-group">
<label class="control-label">所属集团:</label>
<div class="controls">
<c:if test="${report.supplementGroup eq '3437402691677202102'}"><input type="text" id="supplementGroup" value="集团本部" maxlength="200"></c:if>
<c:if test="${report.supplementGroup eq '3510129313047280678'}"><input type="text" id="supplementGroup" value="区域集团" maxlength="200"></c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}"><input type="text" id="supplementGroup" value="服务集团" maxlength="200"></c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}"><input type="text" id="supplementGroup" value="文化集团" maxlength="200"></c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}"><input type="text" id="supplementGroup" value="文旅集团" maxlength="200"></c:if>
<c:if test="${report.supplementGroup eq null}"><input type="text" id="supplementGroup" value="--" maxlength="200"></c:if>
</div>
</div>
<div class="control-group">
<label class="control-label">被举报区域:</label>
<div class="controls">
<form:input id="supplementArea" path="supplementArea" htmlEscape="false" maxlength="200"
class="input-xlarge required" value="${report.supplementArea}"/>
</div>
</div>
<div class="control-group">
<label class="control-label">业务类型:</label>
<div class="controls">
......@@ -314,16 +334,19 @@
<%--htmlEscape="false" maxlength="200" class="input-xlarge required"/>--%>
<form:input id="supplementType"
path="supplementType"
htmlEscape="false" maxlength="200" class="input-xlarge required"/>
htmlEscape="false" maxlength="200" class="input-xlarge required" value="${report.supplementType}"/>
</div>
</div>
<div class="control-group">
<label class="control-label">被举报区域:</label>
<br>
<label class="control-label">业务类别:</label>
<div class="controls">
<form:input id="supplementArea" path="supplementArea" htmlEscape="false" maxlength="200"
class="input-xlarge required"/>
<%--<form:input id="supplementType" items="split(${report.supplementType},',')" path="supplementType"--%>
<%--htmlEscape="false" maxlength="200" class="input-xlarge required"/>--%>
<form:input id="supplementCategory"
path="supplementCategory"
htmlEscape="false" maxlength="200" class="input-xlarge required" value="${report.supplementCategory}"/>
</div>
</div>
<div class="control-group">
<label class="control-label">内容:</label>
<div class="controls">
......@@ -389,8 +412,10 @@
path="transferDepartment"
class="input-small required">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></c:if>
<%-- <form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/>--%>
</form:select>
</c:if>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
......
......@@ -167,7 +167,85 @@
showDiv.innerHTML = '';
}
function getRegion(ts_describe){
console.log(ts_describe);
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data1 = returnedData.ctBbtcRegionList;
var data2 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#supplementArea");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data1 != '') {
var slsb=document.getElementById("supplementArea");
for (var i = 0;i < data1.length;i++){
console.log(data1[i].name);
slsb.append(new Option(data1[i].name,data1[i].id));
}
}
var selectNode = $("#supplementType");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data2 != '') {
console.log(data2[0].name);
var slsb=document.getElementById("supplementType");
for (var i = 0;i < data2.length;i++){
slsb.append(new Option(data2[i].name,data2[i].id));
}
}
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
/*
*联动查询类型下的类别 传多个id
*/
function getBusCategory(ts_describe){
console.log(ts_describe);
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcBusCategory/getBusCategoryList?typeId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data = returnedData.ctBbtcBusCategoryList;
var selectNode = $("#supplementCategory");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data != '') {
var slsb=document.getElementById("supplementCategory");
for (var i = 0;i <= data.length;i++){
slsb.append(new Option(data[i].name,data[i].id));
}
}
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择业务类型', 'warning');
}
}
function resetPageNo() {
$("#pageNo").val(0);
}
</script>
......@@ -301,28 +379,53 @@
maxlength="50" class="input-small"/></li>
<li><label>举报人电话:</label><form:input onchange="resetPageNo();" path="reportPersonTel" htmlEscape="false"
maxlength="50" class="input-small"/></li>
<li><label>业务类型:</label><form:select onchange="resetPageNo();" path="supplementType" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>状态:</label><form:select onchange="resetPageNo();" path="reportStatus" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('report_status')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>被举报人:</label><form:input onchange="resetPageNo();" path="supplementInformant" htmlEscape="false"
maxlength="50" class="input-small"/></li>
<li><label>所属集团:</label>
<form:select id="supplementGroup" path="supplementGroup" class="input-small required" onchange="getRegion(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
</li>
<li><label>所属区域:</label>
<%-- <select id="supplementArea" path="supplementArea" class="input-small required" onchange="resetPageNo();">
<option value="">请选择</option>
&lt;%&ndash;<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"&ndash;%&gt;
&lt;%&ndash;htmlEscape="false"/></select>&ndash;%&gt;
</select>--%>
<form:select id="supplementArea" onchange="resetPageNo();" path="supplementArea" class="input-small">
<form:option value="">请选择</form:option>
</form:select>
</li>
<li><label>业务类型:</label>
<form:select id="supplementType" onchange="getBusCategory(value);" path="supplementType" class="input-small">
<form:option value="">请选择</form:option>
</form:select>
</li>
<li><label>业务类别:</label>
<form:select onchange="resetPageNo();" path="supplementCategory" class="input-small" id="supplementCategory">
<form:option value="">请选择</form:option>
</form:select>
</li>
<li><label>处理结论:</label><form:select onchange="resetPageNo();" path="dealResult" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('deal_result')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>区域:</label><form:select onchange="resetPageNo();" path="supplementArea" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>举报途径:</label><form:select onchange="resetPageNo();" path="reportSource" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('report_source')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<c:if test="${isAdmin eq '1' || isAdmin eq '2'}">
<li><label>移交给:</label><form:select onchange="resetPageNo();" path="selectExchangeAfterUser" class="input-small">
<form:option value=" ">请选择</form:option>
......@@ -333,6 +436,8 @@
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getTransferName()}" itemLabel="label" itemValue="label"
htmlEscape="false"/></form:select></li></c:if>
<li class="clearfix"></li>
<li class="btns">
<%-- <label style="width:auto;">--%>&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary"
......@@ -378,13 +483,15 @@
cellpadding="2" border="2">
<thead>
<tr>
<th style="width:10%">业务类型</th>
<th>所属集团</th>
<th>所属区域</th>
<th>业务类型</th>
<th>业务类别</th>
<th>被举报项目/部门</th>
<th>录入人</th>
<th>举报人</th>
<th>举报人电话</th>
<th>举报途径</th>
<th>区域</th>
<th>被举报人</th>
<th>举报时间</th>
<th>状态</th>
......@@ -406,7 +513,20 @@
<c:if test="${page.list.size()>0}">
<c:forEach items="${page.list}" var="report" varStatus="vs">
<tr>
<td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if>
<c:if test="${report.supplementGroup eq null}">--</c:if>
</td>
<td align="center">${report.supplementArea}</td>
<td align="center">${report.supplementType}</td>
<td align="center">${report.supplementCategory}</td>
<td align="center">${report.reportProject}</td>
<td align="center">${report.oaname}</td>
<td align="center">${report.reportPersonName}</td>
......@@ -421,19 +541,7 @@
<c:if test="${report.reportSource eq 'email'}">邮件</c:if>
<c:if test="${report.reportSource eq 'visit'}">来访</c:if>
<c:if test="${report.reportSource eq null}">--</c:if></td>
<td align="center">
<c:if test="${report.supplementArea eq 'PropertyGroup'}">物业集团</c:if>
<c:if test="${report.supplementArea eq 'North China'}">华北区域公司</c:if>
<c:if test="${report.supplementArea eq 'BeiJing'}">北京区域公司</c:if>
<c:if test="${report.supplementArea eq 'ShangHai'}">上海区域公司</c:if>
<c:if test="${report.supplementArea eq 'SouthWest'}">西南区域公司</c:if>
<c:if test="${report.supplementArea eq 'SouthEast'}">东南区域公司</c:if>
<c:if test="${report.supplementArea eq 'Central China'}">华中区域公司</c:if>
<c:if test="${report.supplementArea eq 'GuangShen'}">广深区域公司</c:if>
<c:if test="${report.supplementArea eq 'Hainan'}">海南区域公司</c:if>
<c:if test="${report.supplementArea eq 'Group'}">集团本部</c:if>
<c:if test="${report.supplementArea eq null}">--</c:if>
</td>
<td align="center">
<c:if test="${report.supplementInformant eq null}">--</c:if>
<c:if test="${report.supplementInformant ne null}">${report.supplementInformant}</c:if>
......@@ -457,7 +565,13 @@
<c:if test="${report.dealResult eq '7'}">转为线索</c:if>
</td>
<td align="center">
<c:if test="${report.transferDepartment eq null}">--</c:if>
<c:if test="${report.transferGroup eq '3437402691677202102'}">集团本部--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3510129313047280678'}">区域集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3565898923067676254'}">服务集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3806696792996264972'}">文化集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3770618512934949260'}">文旅集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq null}">--</c:if>
<%--<c:if test="${report.transferDepartment eq null}">--</c:if>
<c:if test="${report.transferDepartment eq '1'}">营销</c:if>
<c:if test="${report.transferDepartment eq '2'}">工程</c:if>
<c:if test="${report.transferDepartment eq '3'}">成本</c:if>
......@@ -472,8 +586,7 @@
<c:if test="${report.transferDepartment eq '15'}">商业</c:if>
<c:if test="${report.transferDepartment eq '12'}">其他</c:if>
<c:if test="${report.transferDepartment eq '13'}">物业管理</c:if>
<c:if test="${report.transferDepartment eq '14'}">文旅管理</c:if>
<c:if test="${report.transferDepartment eq '14'}">文旅管理</c:if>--%>
</td>
<td align="center">
<c:if test="${report.dealPersonName eq null}">--</c:if>
......
......@@ -167,8 +167,90 @@
showDiv.innerHTML = '';
}
function getRegion(ts_describe){
console.log(ts_describe);
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data1 = returnedData.ctBbtcRegionList;
var data2 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#supplementArea");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data1 != '') {
console.log(data1[0].name);
var slsb=document.getElementById("supplementArea");
for (var i = 0;i < data1.length;i++){
console.log(data1[i].name);
slsb.append(new Option(data1[i].name,data1[i].id));
}
}
var selectNode = $("#supplementType");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data2 != '') {
console.log(data2[0].name);
var slsb=document.getElementById("supplementType");
for (var i = 0;i < data2.length;i++){
slsb.append(new Option(data2[i].name,data2[i].id));
}
}
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
/*
*联动查询类型下的类别
*/
function getBusCategory(ts_describe){
console.log(ts_describe);
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcBusCategory/getBusCategoryList?typeId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data = returnedData.ctBbtcBusCategoryList;
console.log(data[0].name);
var selectNode = $("#supplementCategory");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data != '') {
var slsb=document.getElementById("supplementCategory");
for (var i = 0;i < data.length;i++){
slsb.append(new Option(data[i].name,data[i].id));
}
}
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择业务类型', 'warning');
}
}
function resetPageNo() {
$("#pageNo").val(0);
}
</script>
<style type="text/css">
......@@ -301,28 +383,50 @@
maxlength="50" class="input-small"/></li>
<li><label>举报人电话:</label><form:input onchange="resetPageNo();" path="reportPersonTel" htmlEscape="false"
maxlength="50" class="input-small"/></li>
<li><label>业务类型:</label><form:select onchange="resetPageNo();" path="supplementType" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>状态:</label><form:select onchange="resetPageNo();" path="reportStatus" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('report_status')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>被举报人:</label><form:input onchange="resetPageNo();" path="supplementInformant" htmlEscape="false"
maxlength="50" class="input-small"/></li>
<li><label>所属集团:</label>
<form:select id="supplementGroup" path="supplementGroup" class="input-small required" onchange="getRegion(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
</li>
<li><label>所属区域:</label>
<form:select id="supplementArea" onchange="resetPageNo();" path="supplementArea" class="input-small">
<form:option value="">请选择</form:option>
</form:select>
</li>
<li><label>业务类型:</label>
<form:select id="supplementType" onchange="getBusCategory(value);" path="supplementType" class="input-small">
<form:option value="">请选择</form:option>
</form:select>
</li>
<li><label>业务类别:</label>
<form:select id="supplementCategory" onchange="resetPageNo();" path="supplementCategory" class="input-small">
<form:option value="">请选择</form:option>
</form:select>
</li>
<li><label>处理结论:</label><form:select onchange="resetPageNo();" path="dealResult" class="input-small">
<form:option value=" ">请选择</form:option>
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('deal_result')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>区域:</label><form:select onchange="resetPageNo();" path="supplementArea" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<li><label>举报途径:</label><form:select onchange="resetPageNo();" path="reportSource" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('report_source')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select></li>
<c:if test="${isAdmin eq '1' || isAdmin eq '2'}">
<li><label>移交给:</label><form:select onchange="resetPageNo();" path="selectExchangeAfterUser" class="input-small">
<form:option value=" ">请选择</form:option>
......@@ -378,13 +482,15 @@
cellpadding="2" border="2">
<thead>
<tr>
<th style="width:10%">业务类型</th>
<th>所属集团</th>
<th>所属区域</th>
<th>业务类型</th>
<th>业务类别</th>
<th>被举报项目/部门</th>
<th>录入人</th>
<th>举报人</th>
<th>举报人电话</th>
<th>举报途径</th>
<th>区域</th>
<th>被举报人</th>
<th>举报时间</th>
<th>状态</th>
......@@ -406,7 +512,19 @@
<c:if test="${page.list.size()>0}">
<c:forEach items="${page.list}" var="report" varStatus="vs">
<tr>
<%--跟据集团id 显示对应的集团名称--%>
<td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if>
<c:if test="${report.supplementGroup eq null}">--</c:if>
</td>
<td align="center">${report.supplementArea}</td>
<td align="center">${report.supplementType}</td>
<td align="center">${report.supplementCategory}</td>
<td align="center">${report.reportProject}</td>
<td align="center">${report.oaname}</td>
<td align="center">${report.reportPersonName}</td>
......@@ -421,19 +539,7 @@
<c:if test="${report.reportSource eq 'email'}">邮件</c:if>
<c:if test="${report.reportSource eq 'visit'}">来访</c:if>
<c:if test="${report.reportSource eq null}">--</c:if></td>
<td align="center">
<c:if test="${report.supplementArea eq 'PropertyGroup'}">物业集团</c:if>
<c:if test="${report.supplementArea eq 'North China'}">华北区域公司</c:if>
<c:if test="${report.supplementArea eq 'BeiJing'}">北京区域公司</c:if>
<c:if test="${report.supplementArea eq 'ShangHai'}">上海区域公司</c:if>
<c:if test="${report.supplementArea eq 'SouthWest'}">西南区域公司</c:if>
<c:if test="${report.supplementArea eq 'SouthEast'}">东南区域公司</c:if>
<c:if test="${report.supplementArea eq 'Central China'}">华中区域公司</c:if>
<c:if test="${report.supplementArea eq 'GuangShen'}">广深区域公司</c:if>
<c:if test="${report.supplementArea eq 'Hainan'}">海南区域公司</c:if>
<c:if test="${report.supplementArea eq 'Group'}">集团本部</c:if>
<c:if test="${report.supplementArea eq null}">--</c:if>
</td>
<td align="center">
<c:if test="${report.supplementInformant eq null}">--</c:if>
<c:if test="${report.supplementInformant ne null}">${report.supplementInformant}</c:if>
......@@ -457,7 +563,13 @@
<c:if test="${report.dealResult eq '7'}">转为线索</c:if>
</td>
<td align="center">
<c:if test="${report.transferDepartment eq null}">--</c:if>
<c:if test="${report.transferGroup eq '3437402691677202102'}">集团本部--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3510129313047280678'}">区域集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3565898923067676254'}">服务集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3806696792996264972'}">文化集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq '3770618512934949260'}">文旅集团--${report.transferDepartment}</c:if>
<c:if test="${report.transferGroup eq null}">--</c:if>
<%-- <c:if test="${report.transferDepartment eq null}">--</c:if>
<c:if test="${report.transferDepartment eq '1'}">营销</c:if>
<c:if test="${report.transferDepartment eq '2'}">工程</c:if>
<c:if test="${report.transferDepartment eq '3'}">成本</c:if>
......@@ -472,7 +584,7 @@
<c:if test="${report.transferDepartment eq '15'}">商业</c:if>
<c:if test="${report.transferDepartment eq '12'}">其他</c:if>
<c:if test="${report.transferDepartment eq '13'}">物业管理</c:if>
<c:if test="${report.transferDepartment eq '14'}">文旅管理</c:if>
<c:if test="${report.transferDepartment eq '14'}">文旅管理</c:if>--%>
</td>
<td align="center">
......
......@@ -21,8 +21,10 @@
if (dealResult != null && dealResult != ' ') {
if (dealResult == "6") {
$("#selectType").show();
$("#transferGroup").show();
} else {
$("#selectType").hide();
$("#transferGroup").hide();
}
$("#selectDone").show();
} else {
......@@ -46,8 +48,8 @@
top.$.jBox.tip('请选择被举报集团', 'warning');
}else if ($("#supplementArea").val() == " ") {
top.$.jBox.tip('请选择被举报区域', 'warning');
}else if ($("#supplementTypeNew").val() == " ") {
top.$.jBox.tip('请选择业务类', 'warning');
}else if ($("#supplementCategory").val() == " ") {
top.$.jBox.tip('请选择业务类', 'warning');
} else {
submitCount += 1;
if (submitCount == 1) {
......@@ -350,10 +352,13 @@
var reportStatus = "${report.reportStatus}";
if (reportStatus != "0") {
path2 += "举报信息补充%0D%0A";
var supplementTypeStr = "${supplementTypeStr}";
var supplementTypeStr = "${report.supplementType}";
path2 += "业务类型:" + supplementTypeStr + "%0D%0A";
var supplementArea = "${report.supplementArea}";
if (supplementArea == "North China") {
/* if (supplementArea == "North China") {
supplementArea = "华北区域公司";
} else if (supplementArea == "BeiJing") {
supplementArea = "北京区域公司";
......@@ -373,8 +378,9 @@
supplementArea = "集团本部";
} else if (supplementArea == "PropertyGroup") {
supplementArea = "物业集团";
}
}*/
path2 += "被举报区域:" + supplementArea + "%0D%0A";
supplementContent = $("#supplementContent").val();
path2 += "内容:";
var path3 = "%0D%0A附件:%0D%0A";
......@@ -432,8 +438,10 @@
if (dealResult != null && dealResult != ' ') {
if (dealResult == "6") {
$("#selectType").show();
$("#transferGroup").show();
} else {
$("#selectType").hide();
$("#transferGroup").hide();
}
$("#selectDone").show();
} else {
......@@ -447,8 +455,18 @@
$("#dealPersonName").val(dealPersonName);
}
/*跟据集团 获取对应的业务类型 和业务类别 */
function getRegion(ts_describe){
console.log(ts_describe);
/*每次选中新的菜单 清除上一次菜单的值*/
/* $("#supplementArea").each(function(){
$(this).find("option").eq("").prop("selected",true);
});*/
/*$('#supplementArea').find("option:selected").attr("selected", false);
$('#supplementType').find("option:selected").attr("selected", false);*/
/* $("#supplementArea option[text='请选择']").attr("selected", true);*/
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
......@@ -460,27 +478,81 @@
var data2 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
if (data1 != '') {
console.log(data1[0].name);
var selectNode = $("#supplementArea");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
if (data1 != '') {
var slsb=document.getElementById("supplementArea");
for (var i = 0;i < data1.length;i++){
console.log(data1[i].name);
slsb.options[i] = new Option(data1[i].name,data1[i].id);
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb.append(new Option(data1[i].name,data1[i].id));
}
$('#supplementArea').attr('value','');
}
if (data2 != '') {
console.log(data2[0].name);
/* $("#supplementArea option:first").prop("selected", 'selected');*/
/*每次选中新的菜单 需要清除上一次的菜单栏*/
var selectNode = $("#supplementType");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
/* slsb.option("请选择","");*/
if (data2 != '') {
console.log(data2[0].name);
var slsb=document.getElementById("supplementType");
for (var i = 0;i < data2.length;i++){
slsb.options[i] = new Option(data2[i].name,data2[i].id);
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb.append(new Option(data2[i].name,data2[i].id));
}
}
/* selectNode.options[0].selected = true;*/
/* $("#supplementType").prepend("<option value=''>请选择</option>");*/
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
/*跟据集团 获取对应的业务类型 和业务类别 */
function getDepartment(ts_describe){
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data1 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#transferDepartment");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
/* $("#supplementArea").append("<option value=''>请选择</option>");*/
/* slsb.option("请选择","");*/
if (data1 != '') {
var slsb=document.getElementById("transferDepartment");
for (var i = 0;i < data1.length;i++){
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb.append(new Option(data1[i].name,data1[i].id));
}
}
},error:function(data){
alert(系统错误);
alert("系统错误");
}
});
}else{
......@@ -489,7 +561,53 @@
}
/*
*联动查询类型下的类别
*/
function getBusCategory(){
/*获取类型选项框中的多个值 逗号分隔*/
var ts_describe= $("#supplementType").val();
/*alert(ts_describe);*/
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcBusCategory/getBusCategoryList?typeId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data = returnedData.ctBbtcBusCategoryList;
console.log(data[0].name);
var selectNode = $("#supplementCategory");
selectNode.empty();//每次需要将上一次的数据进行清空
selectNode.append("<option value=''>请选择</option>");
/* $("#supplementCategory").append("<option value=''>请选择</option>");*/
/* slsb.option("请选择","");*/
if (data != '') {
var slsb=document.getElementById("supplementCategory");
for (var i = 0;i < data.length;i++){
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb.append(new Option(data[i].name,data[i].id));
}
}
/* $("#supplementCategory").prepend("<option value=''>请选择</option>");*/
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择业务类型', 'warning');
}
}
function resetPageNo() {
$("#pageNo").val(0);
}
</script>
......@@ -695,7 +813,8 @@
<form:select id="supplementGroup" path="supplementGroup" class="input-small required" onchange="getRegion(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/></form:select>
htmlEscape="false"/>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
......@@ -703,18 +822,37 @@
<div class="control-group">
<label class="control-label">被举报区域:</label>
<div class="controls">
<select id="supplementArea" path="supplementArea" class="input-small required" onchange="resetPageNo();">
<%-- <select id="supplementArea" path="supplementArea" class="input-small required" onchange="resetPageNo();">
<option value="">请选择</option>
&lt;%&ndash;<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"&ndash;%&gt;
&lt;%&ndash;htmlEscape="false"/></select>&ndash;%&gt;
</select>--%>
<form:select id="supplementArea" path="supplementArea" class="input-small required" onchange="resetPageNo();">
<form:option value="">请选择</form:option>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">业务类型:</label>
<div class="controls">
<%--<form:select id="supplementType" path="supplementType" class="input-small required" onchange="getBusCategory();" multiple="true">
<form:option value="">请选择</form:option>
<form:option value="">请选择02</form:option>
</form:select>--%>
<form:select id="supplementType" path="supplementType" class="input-small required" onchange="getBusCategory();" multiple="true">
<form:option value="">请选择</form:option>
</form:select>
<%--<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"--%>
<%--htmlEscape="false"/></select>--%>
</select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">业务类:</label>
<label class="control-label">业务类:</label>
<div class="controls">
<form:select id="supplementType" path="supplementType" class="input-small required" onchange="resetPageNo();" multiple="true">
<form:select id="supplementCategory" path="supplementCategory" class="input-small required" onchange="resetPageNo();" multiple="true">
<form:option value="">请选择</form:option>
</form:select>
<%--<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"--%>
......@@ -779,15 +917,28 @@
</form:select>
</div>
<br>
<div id="transferGroup" class="control-group" style="display:none">
<label class="control-label">移交集团:</label>
<div class="controls">
<form:select id="" path="transferGroup" class="input-small required" onchange="getDepartment(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/></form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div id="selectType" class="control-group" style="display:none">
<label class="control-label">移交部门:</label>
<div class="controls">
<form:select id="" path="transferDepartment" class="input-small required">
<form:option value=" ">请选择</form:option>
<form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select>
<form:select id="transferDepartment" path="transferDepartment" class="input-small required">
<form:option value="">请选择</form:option>
<%-- <form:options items="${fns:getDictList('supplement_type')}" itemLabel="label" itemValue="value"
htmlEscape="false"/>--%>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<br>
<div class="controls" id="selectDone" style="display:none">
......
......@@ -30,7 +30,52 @@
}
});
});
function getRegion(ts_describe){
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data1 = returnedData.ctBbtcRegionList;
var data2 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#supplementArea");
selectNode.empty();//每次需要将上一次的数据进行清空
/* $("#supplementArea").append("<option value=''>请选择</option>");*/
/* slsb.option("请选择","");*/
if (data1 != '') {
var slsb=document.getElementById("supplementArea");
for (var i = 0;i < data1.length;i++){
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb.options[i] = new Option(data1[i].name,data1[i].id);
}
}
/*每次更新选项 ================================*/
$("#supplementArea").prepend("<option value=''>请选择</option>");
/* $("#supplementArea option[text='请选择']").attr("selected", true);
$("#supplementArea").val("");*/
$("#supplementArea option").eq(0).attr("selected",true);
$("#supplementArea option[text='请选择']").attr("selected", "selected");
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
</script>
</head>
<body>
<ul class="nav nav-tabs">
......@@ -87,12 +132,25 @@
</div>
</div>
<div class="control-group">
<label class="control-label">所属集团:</label>
<div class="controls">
<form:select id="supplementGroup" path="supplementGroup" class="input-small required" onchange="getRegion(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">所属区域:</label>
<div class="controls">
<form:select id="supplementArea" path="area" class="input-small required">
<form:option value=" "></form:option>
<form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select>
<%-- <form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/>--%>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
......
......@@ -25,6 +25,8 @@
data: {"startDate": startDate, "endDate": endDate},
url: "getHighcharts.action",
success: function (result) {
/*举报状态*/
$('#repStatus').highcharts({
navigation: {
buttonOptions: {
......@@ -47,7 +49,7 @@
},
subtitle: {//副标题
align: 'right',
text: '总数&nbsp;:&nbsp;' + result.bench.totalCount + '<br/>未处理&nbsp;:&nbsp;' + result.unProcess + '<br/>跟踪中&nbsp;:&nbsp;' + result.processing + '<br/>已处理&nbsp;:&nbsp;' + result.processed + '<br/>已关闭&nbsp;:&nbsp;' + result.closed,
text: '总数&nbsp;:&nbsp;' + result.bench.totalCount + '<br/>未处理&nbsp;:&nbsp;' + result.bench.unProcess + '<br/>跟踪中&nbsp;:&nbsp;' + result.processing + '<br/>已处理&nbsp;:&nbsp;' + result.processed + '<br/>已关闭&nbsp;:&nbsp;' + result.closed,
useHTML: true,
verticalAlign: 'top',
x: -5,
......@@ -87,6 +89,8 @@
]
}]
});
/*各业务条线举报分析*/
$('#repType').highcharts({
navigation: {
buttonOptions: {
......@@ -203,6 +207,8 @@
}
]
});
/*举报质量分析*/
$('#repResult').highcharts({
navigation: {
buttonOptions: {
......@@ -258,6 +264,8 @@
]
}]
});
/*区域举报状态分析图*/
$('#repArea').highcharts({
navigation: {
buttonOptions: {
......@@ -375,6 +383,8 @@
}
]
});
/*举报途径分析*/
$('#repApproach').highcharts({
navigation: {
buttonOptions: {
......@@ -478,6 +488,39 @@
// var selAreaTemp=$("#areaTemp").val();
// $("#area").val(selAreaTemp);
// }
function getRegion(ts_describe){
console.log(ts_describe);
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
var data1 = returnedData.ctBbtcRegionList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#area");
selectNode.empty();//每次需要将上一次的数据进行清空
$("#area").append("<option value=''>请选择</option>");
if (data1 != '') {
var slsb=document.getElementById("area");
for (var i = 0;i < data1.length;i++){
slsb.append(new Option(data1[i].name,data1[i].id));
}
}
/* $("#area").prepend("<option value=''>请选择</option>");*/
},error:function(data){
alert(系统错误);
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
</script>
</head>
<body>
......@@ -485,7 +528,9 @@
class="breadcrumb form-search">
<%--<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>--%>
<%--<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>--%>
<%--<input id="flag" name="flag" type="hidden" value="${flag}"/>--%>
<%--处理状态--%>
<input id="processStatus" name="processStatus" type="hidden" value="${reportStatus}"/>
<ul class="ul-form">
<li><label><h3>工作台</h3></label></li>
<li class="btns" style="float: right">
......@@ -503,7 +548,7 @@
onClick="WdatePicker({lang:'zh-cn',maxDate:'#F{$dp.$D(\'endDate\')}'})"
value="${workbench.startDate}"/></li>
<c:if test="${workbench.userRoleName eq '系统管理员'}">
<li style="float: right">
<%-- <li style="float: right">
<label>区域:</label>
<form:select path="area" htmlEscape="false" class="input-medium">
<form:option value="">全部区域</form:option>
......@@ -518,6 +563,24 @@
<form:option value="Group">集团本部</form:option>
<form:option value="PropertyGroup">物业集团</form:option>
</form:select>
</li>--%>
<li><label>所属集团:</label>
<form:select id="supplementGroup" path="supplementGroup" class="input-small required" onchange="getRegion(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
</li>
<li><label>所属区域:</label>
<%-- <select id="supplementArea" path="supplementArea" class="input-small required" onchange="resetPageNo();">
<option value="">请选择</option>
&lt;%&ndash;<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"&ndash;%&gt;
&lt;%&ndash;htmlEscape="false"/></select>&ndash;%&gt;
</select>--%>
<form:select id="area" onchange="resetPageNo();" path="area" class="input-small">
<form:option value="">请选择</form:option>
</form:select>
</li>
</c:if>
</ul>
......@@ -559,9 +622,11 @@
<tr>
<th>ID</th>
<th>标题</th>
<th>业务类型</th>
<th >所属集团</th>
<th >所属区域</th>
<th >业务类型</th>
<th >业务类别</th>
<th>被举报项目/部门</th>
<th>所在城市</th>
<th>被举报人</th>
<th>操作</th>
</tr>
......@@ -569,20 +634,24 @@
<tbody>
<c:if test="${repList.size()>0}">
<c:forEach items="${repList}" var="report" varStatus="vs">
<tr>
<td>${vs.index + 1}</td>
<td>${report.supplementTitle}</td>
<td>
<c:if test="${report.supplementType eq '1'}">营销</c:if>
<c:if test="${report.supplementType eq '2'}">工程</c:if>
<c:if test="${report.supplementType eq '3'}">成本</c:if>
<c:if test="${report.supplementType eq '4'}">招采</c:if>
<c:if test="${report.supplementType eq '5'}">人力</c:if>
<c:if test="${report.supplementType eq '6'}">物业</c:if>
<c:if test="${report.supplementType eq '7'}">投诉</c:if>
<td align="center">
<c:if test="${report.supplementGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${report.supplementGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${report.supplementGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${report.supplementGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${report.supplementGroup eq '3770618512934949260'}">文旅集团</c:if>
<c:if test="${report.supplementGroup eq null}">--</c:if>
</td>
<td align="center">${report.supplementArea}</td>
<td align="center">${report.supplementType}</td>
<td align="center">${report.supplementCategory}</td>
<td>${report.reportProject}</td>
<td>${report.reportCity}</td>
<td>${report.supplementInformant}</td>
<td>
<a href="${ctx}/report/view?id=${report.id}">查看</a>
......
Manifest-Version: 1.0
Built-By: Administrator
Created-By: IntelliJ IDEA
Build-Jdk: 1.8.0_121
Build-Jdk: 1.8.0_161
......@@ -247,7 +247,8 @@
remarks,
login_flag,
photo,
del_flag
del_flag,
supplement_group
) VALUES (
#{id},
#{company.id},
......@@ -268,7 +269,9 @@
#{remarks},
#{loginFlag},
#{photo},
#{delFlag}
#{delFlag},
#{supplementGroup}
)
</insert>
<insert id="insertOfficeName">
......@@ -300,7 +303,8 @@
update_date = #{updateDate},
remarks = #{remarks},
login_flag = #{loginFlag},
photo = #{photo}
photo = #{photo},
supplement_group=#{supplementGroup}
WHERE id = #{id}
</update>
......
......@@ -30,7 +30,52 @@
}
});
});
function getRegion(ts_describe){
if(ts_describe != null && ts_describe != ''){
$.ajax({
type: "POST",
url: "${ctx}/report/ctBbtcRegion/getRegionList?groupId="+ts_describe,
dataType: "json",
success: function(returnedData) {
console.log(returnedData);
var data1 = returnedData.ctBbtcRegionList;
var data2 = returnedData.ctBbtcBusTypeList;
// console.log(data1[0].name);
// console.log(data2[0].name);
var selectNode = $("#supplementArea");
selectNode.empty();//每次需要将上一次的数据进行清空
/* $("#supplementArea").append("<option value=''>请选择</option>");*/
/* slsb.option("请选择","");*/
if (data1 != '') {
var slsb=document.getElementById("supplementArea");
for (var i = 0;i < data1.length;i++){
/* if(i==0){
slsb.options[i] = new Option("请选择","");
}*/
slsb.options[i] = new Option(data1[i].name,data1[i].id);
}
}
/*每次更新选项 ================================*/
$("#supplementArea").prepend("<option value=''>请选择</option>");
/* $("#supplementArea option[text='请选择']").attr("selected", true);
$("#supplementArea").val("");*/
$("#supplementArea option").eq(0).attr("selected",true);
$("#supplementArea option[text='请选择']").attr("selected", "selected");
},error:function(data){
alert("系统错误");
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
</script>
</head>
<body>
<ul class="nav nav-tabs">
......@@ -87,12 +132,25 @@
</div>
</div>
<div class="control-group">
<label class="control-label">所属集团:</label>
<div class="controls">
<form:select id="supplementGroup" path="supplementGroup" class="input-small required" onchange="getRegion(value)">
<form:option value="">请选择</form:option>
<form:options items="${fns:getDictList('supplement_group')}" itemLabel="label" itemValue="id"
htmlEscape="false"/>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">所属区域:</label>
<div class="controls">
<form:select id="supplementArea" path="area" class="input-small required">
<form:option value=" "></form:option>
<form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/></form:select>
<%-- <form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/>--%>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
......
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