20190718

parent d89772c2
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -75,11 +75,13 @@
<groupId>bbdtek</groupId>
<artifactId>bbdtek-geo-split</artifactId>
<version>1.0.1</version>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/bbdtek-geo-split-1.0.1.jar</systemPath>
</dependency>
<dependency>
<groupId>bbdtek</groupId>
<artifactId>npl-tire-split</artifactId>
<version>1.0.0</version>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/npl-tire-split-1.0.0.jar</systemPath>
</dependency>
<!-- geoip2 -->
<dependency>
......@@ -608,6 +610,7 @@
<groupId>com.kingdee.eas.cp.eip.sso.ltpa</groupId>
<artifactId>LTPATokenManager</artifactId>
<version>1.0.0</version>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/LTPATokenManager-1.0.0.jar</systemPath>
</dependency>
<!--JFreeChart-->
<dependency>
......
......@@ -6,6 +6,11 @@ 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.CtBbtcBusType;
import com.ejweb.modules.report.entity.CtBbtcRegion;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 业务类型DAO接口
* @author haoqm
......@@ -13,5 +18,10 @@ import com.ejweb.modules.report.entity.CtBbtcBusType;
*/
@MyBatisDao
public interface CtBbtcBusTypeDao extends CrudDao<CtBbtcBusType> {
/**
* 根据集团id获取区域值域
* @param groupId
* @return
*/
List<CtBbtcBusType> getByGroupId(@Param("groupId")String groupId);
}
\ No newline at end of file
......@@ -6,6 +6,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.CtBbtcRegion;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 区域基础资料DAO接口
......@@ -14,5 +17,12 @@ import com.ejweb.modules.report.entity.CtBbtcRegion;
*/
@MyBatisDao
public interface CtBbtcRegionDao extends CrudDao<CtBbtcRegion> {
/**
* 根据集团id获取区域值域
* @param groupId
* @return
*/
List<CtBbtcRegion> getByGroupId(@Param("groupId")String groupId);
}
\ No newline at end of file
......@@ -18,7 +18,8 @@ public class CtBbtcBusCategory extends DataEntity<CtBbtcBusCategory> {
private String number; // 业务类别编码
private String name; // 业务类别名称
private CtBbtcBusType type; // 所属业务类型
private String typeName; // 所属业务类型名称
public CtBbtcBusCategory() {
super();
}
......@@ -44,8 +45,8 @@ public class CtBbtcBusCategory extends DataEntity<CtBbtcBusCategory> {
public void setName(String name) {
this.name = name;
}
@Length(min=0, max=64, message="所属业务类型长度必须介于 0 和 64 之间")
public CtBbtcBusType getType() {
return type;
}
......@@ -53,5 +54,13 @@ public class CtBbtcBusCategory extends DataEntity<CtBbtcBusCategory> {
public void setType(CtBbtcBusType type) {
this.type = type;
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
}
\ No newline at end of file
......@@ -63,7 +63,10 @@ public class ReportEntity extends DataEntity<ReportEntity> {
private String qq; //qq
private String weixin; //微信号
private String ifClue; //联系人是否可见
private String supplementGroup; //被举报集团
private String supplementCategory; //业务类别
private CtBbtcRegion supplementAreaNew; //被举报区域
private CtBbtcBusType supplementTypeNew;//业务类型
public String getFlage() {
return flage;
......@@ -517,4 +520,33 @@ public class ReportEntity extends DataEntity<ReportEntity> {
this.user = user;
}
public String getSupplementGroup() {
return supplementGroup;
}
public void setSupplementGroup(String supplementGroup) {
this.supplementGroup = supplementGroup;
}
public String getSupplementCategory() {
return supplementCategory;
}
public void setSupplementCategory(String supplementCategory) {
this.supplementCategory = supplementCategory;
}
public CtBbtcRegion getSupplementAreaNew() {
return supplementAreaNew;
}
public void setSupplementAreaNew(CtBbtcRegion supplementAreaNew) {
this.supplementAreaNew = supplementAreaNew;
}
public CtBbtcBusType getSupplementTypeNew() {
return supplementTypeNew;
}
public void setSupplementTypeNew(CtBbtcBusType supplementTypeNew) {
this.supplementTypeNew = supplementTypeNew;
}
}
......@@ -5,6 +5,9 @@ package com.ejweb.modules.report.service;
import java.util.List;
import com.ejweb.modules.report.dao.CtBbtcRegionDao;
import com.ejweb.modules.report.entity.CtBbtcRegion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.ejweb.core.persistence.Page;
......@@ -22,6 +25,9 @@ import com.ejweb.modules.report.dao.CtBbtcBusTypeDao;
@Transactional(readOnly = true)
public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBusType> {
@Autowired
private CtBbtcBusTypeDao ctBbtcBusTypeDao;
public CtBbtcBusType get(String id) {
return super.get(id);
}
......@@ -43,5 +49,9 @@ public class CtBbtcBusTypeService extends CrudService<CtBbtcBusTypeDao, CtBbtcBu
public void delete(CtBbtcBusType ctBbtcBusType) {
super.delete(ctBbtcBusType);
}
public List<CtBbtcBusType> getByGroupId(String groupId){
return this.ctBbtcBusTypeDao.getByGroupId(groupId);
}
}
\ No newline at end of file
......@@ -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.CtBbtcRegionDao;
@Service
@Transactional(readOnly = true)
public class CtBbtcRegionService extends CrudService<CtBbtcRegionDao, CtBbtcRegion> {
@Autowired
private CtBbtcRegionDao ctBbtcRegionDao;
public CtBbtcRegion get(String id) {
return super.get(id);
......@@ -33,7 +37,11 @@ public class CtBbtcRegionService extends CrudService<CtBbtcRegionDao, CtBbtcRegi
public Page<CtBbtcRegion> findPage(Page<CtBbtcRegion> page, CtBbtcRegion ctBbtcRegion) {
return super.findPage(page, ctBbtcRegion);
}
public List<CtBbtcRegion> getByGroupId(String groupId){
return this.ctBbtcRegionDao.getByGroupId(groupId);
}
@Transactional(readOnly = false)
public void save(CtBbtcRegion ctBbtcRegion) {
super.save(ctBbtcRegion);
......
......@@ -8,7 +8,9 @@ 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.service.CtBbtcBusCategoryService;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
......@@ -21,6 +23,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* 业务类别Controller
......@@ -37,6 +40,8 @@ public class CtBbtcBusCategoryController extends BaseController {
protected String adminPath;
@Autowired
private CtBbtcBusCategoryService ctBbtcBusCategoryService;
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@ModelAttribute
public CtBbtcBusCategory get(@RequestParam(required=false) String id) {
......@@ -61,6 +66,8 @@ public class CtBbtcBusCategoryController extends BaseController {
@RequiresPermissions("report:ctBbtcBusCategory:view")
@RequestMapping(value = "form")
public String form(CtBbtcBusCategory ctBbtcBusCategory, Model model) {
List<CtBbtcBusType> ctBbtcBusTypeList = ctBbtcBusTypeService.findList(null);
model.addAttribute("ctBbtcBusTypeList", ctBbtcBusTypeList);
model.addAttribute("ctBbtcBusCategory", ctBbtcBusCategory);
return "modules/report/ctBbtcBusCategoryForm";
}
......
......@@ -3,11 +3,14 @@
*/
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.CtBbtcBusType;
import com.ejweb.modules.report.entity.CtBbtcRegion;
import com.ejweb.modules.report.service.CtBbtcBusTypeService;
import com.ejweb.modules.report.service.CtBbtcRegionService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -21,6 +24,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.List;
/**
* 区域基础资料Controller
......@@ -37,6 +42,8 @@ public class CtBbtcRegionController extends BaseController {
protected String adminPath;
@Autowired
private CtBbtcRegionService ctBbtcRegionService;
@Autowired
private CtBbtcBusTypeService ctBbtcBusTypeService;
@ModelAttribute
public CtBbtcRegion get(@RequestParam(required=false) String id) {
......@@ -84,4 +91,28 @@ public class CtBbtcRegionController extends BaseController {
return "redirect:"+adminPath+"/report/ctBbtcRegion/?repage";
}
@RequestMapping(value = "getRegionList")
public void getRegionList(String groupId, RedirectAttributes redirectAttributes,HttpServletResponse response){
if(groupId != null && !"".equals(groupId)){
JSONObject res = new JSONObject();
List<CtBbtcRegion> ctBbtcRegionList = ctBbtcRegionService.getByGroupId(groupId);
List<CtBbtcBusType> ctBbtcBusTypeList = ctBbtcBusTypeService.getByGroupId(groupId);
res.put("ctBbtcRegionList", ctBbtcRegionList);
res.put("ctBbtcBusTypeList", ctBbtcBusTypeList);
String jsonStr = res.toJSONString();
try{
PrintWriter out = response.getWriter();
out.print(jsonStr);
out.close();
}catch (Exception e){
e.printStackTrace();
}
}
}
}
\ No newline at end of file
......@@ -6,10 +6,12 @@
a.id AS "id",
a.number AS "number",
a.name AS "name",
a.type AS "type"
a.type AS "type.id",
b.name AS "typeName"
</sql>
<sql id="ctBbtcBusCategoryJoins">
LEFT JOIN ct_bbtc_bus_type b on b.id = a.type
</sql>
<select id="get" resultType="CtBbtcBusCategory">
......@@ -70,7 +72,7 @@
#{id},
#{number},
#{name},
#{type}
#{type.id}
)
</insert>
......@@ -78,7 +80,7 @@
UPDATE ct_bbtc_bus_category SET
number = #{number},
name = #{name},
type = #{type}
type = #{type.id}
WHERE id = #{id}
</update>
......
......@@ -44,7 +44,16 @@
</otherwise>
</choose>
</select>
<select id="getByGroupId" resultType="CtBbtcBusType">
SELECT
<include refid="ctBbtcBusTypeColumns"/>
FROM ct_bbtc_bus_type a
<include refid="ctBbtcBusTypeJoins"/>
WHERE a.supplement_group = #{groupId}
</select>
<select id="findAllList" resultType="CtBbtcBusType">
SELECT
<include refid="ctBbtcBusTypeColumns"/>
......
......@@ -21,7 +21,16 @@
<include refid="ctBbtcRegionJoins"/>
WHERE a.id = #{id}
</select>
<select id="getByGroupId" resultType="CtBbtcRegion">
SELECT
<include refid="ctBbtcRegionColumns"/>
FROM ct_bbtc_region a
<include refid="ctBbtcRegionJoins"/>
WHERE a.supplement_group = #{groupId}
</select>
<select id="findList" resultType="CtBbtcRegion">
SELECT
<include refid="ctBbtcRegionColumns"/>
......@@ -44,6 +53,8 @@
</otherwise>
</choose>
</select>
<select id="findAllList" resultType="CtBbtcRegion">
SELECT
......
......@@ -36,23 +36,23 @@
<div class="control-group">
<label class="control-label">业务类别编码:</label>
<div class="controls">
<form:input path="number" htmlEscape="false" maxlength="64" class="input-xlarge "/>
<form:input path="number" htmlEscape="false" maxlength="64" class="input-xlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">业务类别名称:</label>
<div class="controls">
<form:input path="name" htmlEscape="false" maxlength="255" class="input-xlarge "/>
<form:input path="name" htmlEscape="false" maxlength="255" class="input-xlarge required"/>
<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" class="input-small">
<form:option value=" ">请选择</form:option>
<form:options items="${ctBbtcBusType}" itemLabel="name" itemValue="id"
<form:select onchange="resetPageNo();" path="type.id" class="input-xlarge required">
<form:option value="">请选择</form:option>
<form:options items="${ctBbtcBusTypeList}" itemLabel="name" 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>
......
......@@ -52,7 +52,7 @@
${ctBbtcBusCategory.name}
</td>
<td>
${ctBbtcBusCategory.type}
${ctBbtcBusCategory.typeName}
</td>
<shiro:hasPermission name="report:ctBbtcBusCategory:edit"><td>
<a href="${ctx}/report/ctBbtcBusCategory/form?id=${ctBbtcBusCategory.id}">修改</a>
......
......@@ -7,7 +7,6 @@
<meta name="decorator" content="default"/>
<script type="text/javascript">
window.onload = function () {
var ifClue = "${report.ifClue}";
if (ifClue == '1') {
$("#ifClue").prop("checked", true);
......@@ -31,7 +30,9 @@
}
}
var submitCount = 0;
$(document).ready(function () {
// ctBbtcRegionList = [];
$("#inputForm").validate({
submitHandler: function (form) {
messages: {
......@@ -41,8 +42,12 @@
}
if ($("#supplementType").val() == " ") {
top.$.jBox.tip('请选择业务类型', 'warning');
} else if ($("#supplementArea").val() == " ") {
} else if ($("#supplementGroup").val() == " ") {
top.$.jBox.tip('请选择被举报集团', 'warning');
}else if ($("#supplementArea").val() == " ") {
top.$.jBox.tip('请选择被举报区域', 'warning');
}else if ($("#supplementTypeNew").val() == " ") {
top.$.jBox.tip('请选择业务类型', 'warning');
} else {
submitCount += 1;
if (submitCount == 1) {
......@@ -441,6 +446,52 @@
var dealPersonName = $("#dealPerson").val();
$("#dealPersonName").val(dealPersonName);
}
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);
if (data1 != '') {
console.log(data1[0].name);
var selectNode = $("#supplementArea");
selectNode.empty();//每次需要将上一次的数据进行清空
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 (data2 != '') {
console.log(data2[0].name);
var selectNode = $("#supplementType");
selectNode.empty();//每次需要将上一次的数据进行清空
var slsb=document.getElementById("supplementType");
for (var i = 0;i < data2.length;i++){
slsb.options[i] = new Option(data2[i].name,data2[i].id);
}
}
},error:function(data){
alert(系统错误);
}
});
}else{
top.$.jBox.tip('请选择被举报集团', 'warning');
}
}
</script>
<style type="text/css">
.title {
......@@ -618,7 +669,7 @@
</div>
</div>
<span class="title">举报信息补充</span>
<div class="control-group">
<%--<div class="control-group">
<label class="control-label">业务类型:</label>
<div class="controls">
<span class="supplementType">
......@@ -626,9 +677,9 @@
itemLabel="label" itemValue="value" class="required"/>
</span>
</div>
</div>
</div>--%>
<div class="control-group">
<%--<div class="control-group">
<label class="control-label">被举报区域:</label>
<div class="controls">
<form:select id="supplementArea" path="supplementArea" class="input-small required">
......@@ -637,7 +688,41 @@
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="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">
<select id="supplementArea" path="supplementArea" class="input-small required" onchange="resetPageNo();">
<option value="">请选择</option>
<%--<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>
<div class="controls">
<form:select id="supplementType" path="supplementType" class="input-small required" onchange="resetPageNo();" multiple="true">
<form:option value="">请选择</form:option>
</form:select>
<%--<options items="${ctBbtcRegionList}" itemLabel="name" itemValue="id"--%>
<%--htmlEscape="false"/></select>--%>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">内容:</label>
<div class="controls">
......
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