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 />
......
......@@ -35,7 +35,9 @@ public interface CrudDao<T> extends BaseDao {
* @return
*/
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;
......@@ -25,7 +33,8 @@ 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接口
......@@ -13,5 +16,11 @@ 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);
}
......@@ -42,5 +46,9 @@ public class CtBbtcBusCategoryService extends CrudService<CtBbtcBusCategoryDao,
public void delete(CtBbtcBusCategory ctBbtcBusCategory) {
super.delete(ctBbtcBusCategory);
}
public List<CtBbtcBusCategory> getByTpyeId(String typeId){
return this.ctBbtcBusCategoryDao.getByTypeId(typeId);
}
}
\ No newline at end of file
......@@ -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;
/**
......@@ -42,6 +48,9 @@ public class CtBbtcBusCategoryController extends BaseController {
private CtBbtcBusCategoryService ctBbtcBusCategoryService;
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private ReportService reportService;
@ModelAttribute
public CtBbtcBusCategory get(@RequestParam(required=false) String id) {
......@@ -54,6 +63,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", ""})
......@@ -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
......@@ -37,6 +42,9 @@ public class CtBbtcBusTypeController extends BaseController {
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private ReportService reportService;
@ModelAttribute
public CtBbtcBusType get(@RequestParam(required=false) String id) {
......@@ -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;
......@@ -44,6 +47,9 @@ public class CtBbtcRegionController extends BaseController {
private CtBbtcRegionService ctBbtcRegionService;
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@Autowired
private ReportService reportService;
@ModelAttribute
public CtBbtcRegion get(@RequestParam(required=false) String id) {
......@@ -86,11 +92,41 @@ public class CtBbtcRegionController extends BaseController {
@RequiresPermissions("report:ctBbtcRegion:edit")
@RequestMapping(value = "delete")
public String delete(CtBbtcRegion ctBbtcRegion, RedirectAttributes redirectAttributes) {
ctBbtcRegionService.delete(ctBbtcRegion);
addMessage(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){
if(groupId != null && !"".equals(groupId)){
......
......@@ -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">
......@@ -21,6 +22,15 @@
<include refid="ctBbtcBusCategoryJoins"/>
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
......@@ -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>
......
......@@ -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>
......
......@@ -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,7 +563,25 @@
<form:option value="Group">集团本部</form:option>
<form:option value="PropertyGroup">物业集团</form:option>
</form:select>
</li>
</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>
</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