Commit 74c2ed70 by 周添尉

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

parents ca70c8cf e2891505
......@@ -22,8 +22,8 @@
<value>classpath:com/jw/app/business/calendar/calendarDAO.xml</value>
<value>classpath:com/jw/app/business/portal/role/appsRoleDAO.xml</value>
<value>classpath:com/jw/app/business/vote/voteDAO.xml</value>
<value>classpath:com/jw/app/business/workreport/workreportDAO.xml</value>
<value>classpath:com/jw/app/business/attendance/attendanceDAO.xml</value>
<value>classpath:com/jw/app/business/bgmk/bgmkDAO.xml</value>
<value>classpath:com/jw/app/business/friendlink/friendlinkDAO.xml</value>
<value>classpath:com/jw/app/business/notice/noticeDAO.xml</value>
<value>classpath:com/jw/app/business/todo/TodoDAO.xml</value>
......@@ -99,10 +99,6 @@
<property name="mapperInterface" value="com.jw.app.business.attendance.attendanceDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="bgmkDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.bgmk.bgmkDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="friendlinkDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.friendlink.friendlinkDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
......@@ -135,6 +131,11 @@
<property name="mapperInterface" value="com.jw.app.business.forum.word.wordDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="workreportDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.workreport.workreportDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<!-- BusinessInterFace -->
<bean id="PortletBusiness"
class="com.jw.app.business.portlet.PortletBusinessImpl">
......@@ -192,10 +193,6 @@
<property name="attendanceDAO" ref="attendanceDAO"/>
</bean>
<bean id="BgmkBusiness"
class="com.jw.app.business.bgmk.BgmkBusinessImpl">
<property name="bgmkDAO" ref="bgmkDAO"/>
</bean>
<bean id="FriendLinkBusiness"
class="com.jw.app.business.friendlink.FriendLinkBusinessImpl">
<property name="friendlinkDAO" ref="friendlinkDAO"/>
......@@ -210,6 +207,7 @@
class="com.jw.app.business.todo.TodoBusinessImpl">
<property name="todoDAO" ref="todoDAO"/>
</bean>
<bean id="MeetingBusiness"
class="com.jw.app.business.meeting.MeetingBusinessImpl">
<property name="meetingDAO" ref="meetingDAO"/>
......@@ -232,6 +230,10 @@
<property name="wordDAO" ref="wordDAO"/>
</bean>
<bean id="WorkreportBusiness" class="com.jw.app.business.workreport.WorkreportBusinessImpl">
<property name="workreportDAO" ref="workreportDAO"/>
</bean>
<!-- DAO -->
<bean id="portletDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.portlet.PortletDAO"/>
......
{
"data": [
{
"name":"部门1",
"type":"bar",
"data":[20, 20, 30, 40, 50, 60, 70]
},
{
"name":"部门2",
"type":"bar",
"data":[50, 20, 40, 20, 20, 10, 0]
},
{
"name":"部门3",
"type":"bar",
"data":[30, 30, 50, 70, 10, 60, 10]
},
{
"name":"总数",
"type":"line",
"data":[100, 70, 120, 130, 80, 130, 80]
}
]
}
......@@ -71,6 +71,9 @@
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/jquery-easyui-1.4.1/themes/icon.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/zTree_v3/css/zTreeStyle/zTreeStyle.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=localPath%>/jwapp/common/css/choice_user/common.css" charset="utf-8"></link>
<link rel="stylesheet" href="${ctx}/custom/plug/webupload/css/webuploader.css" type="text/css"></link>
<script src="${ctx}/custom/plug/webupload/js/webuploader.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploaderExtend.js"></script>
<script type="text/javascript">
// $.ajaxSetup ({
......
......@@ -372,4 +372,19 @@
}
.icon-ext-49_33 {
background:url('../../../../images/icons/(49,33).png') no-repeat left center;
}
.icon-ext-27_47 {
background:url('../../../../images/icons/(27,47).png') no-repeat left center;
}
.icon-ext-39_39 {
background:url('../../../../images/icons/(39,39).png') no-repeat left center;
}
.icon-ext-39_23 {
background:url('../../../../images/icons/(39,23).png') no-repeat left center;
}
.icon-ext-49_27 {
background:url('../../../../images/icons/(49,27).png') no-repeat left center;
}
.icon-ext-44_42 {
background:url('../../../../images/icons/(49,27).png') no-repeat left center;
}
\ No newline at end of file
$(function(){
document.domain="jfbrother.com";
document.domain=$("#office_domain").val();
//去掉尾部的一个div
$('.index_footer').next().remove();
//初始化申请的块状
init_office_apply_lump();
//渲染审批列表
init_office_examine_list();
//渲染进度查询列表
init_office_progress_list();
//渲染历史查询列表
init_office_history_list();
//初始化.office_module的距离来达到满屏显示
init_office_module_bottom();
......@@ -157,250 +148,11 @@ function init_office_apply_lump(){
}
//渲染审批列表
function init_office_examine_list(){
//state 0 为未通过 , 1 为待审批 2 为审批中 3 为 已通过
var infos = [
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'3',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'0',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'0',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'0',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'0',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'1',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'1',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'2',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'2',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'2',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'0',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'1',examine_title:'8月17去趟水上乐园!!!'},
{examine_name:'李惠利',examine_time:'2018/08/15 08:23',examine_state:'2',examine_title:'8月17去趟水上乐园!!!'},
];
$('#office_examine').bootstrapTable('destroy').bootstrapTable({
/* showColumns:true,
showToggle:true,
showRefresh:true,
search:true, */
/* url: "bootstrap-table/data/data1.json", // 获取表格数据的url */
data:infos,
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
/* striped: true, //表格显示条纹,默认为false */
pagination: true, // 在表格底部显示分页组件,默认false
pageList: [5,10,15,20], // 设置页面可以显示的数据条数
pageSize: 10, // 页面数据条数
pageNumber: 1, // 首页页码,
uniqueId:'UUID',
//clickToSelect:true,//True to select checkbox or radiobox when the column is clicked.
queryParams:function(params){
var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
// limit: params.limit, //页面大小
offset: params.offset, //页码
pageSize:this.pageSize,
pageNumber:this.pageNumber
/* projectId: $("#projectId").val(),
requirement_Id:$("#requirement_Id").val(),
length: 6 */
};
return temp;
},
columns: [
/*{
checkbox: true, // 显示一个勾选框
align: 'center', // 居中显示
valign: 'middle'
}, */
{
field: 'examine_title',
title: '申请原因',
align: 'left',
valign: 'middle',
width: '70%',
formatter: function (value, row, index) {
return '<div class="office_examine_tilte">'+ value +'</div>';
}
}, {
field: 'examine_state',
title: '申请状态',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
if(value=='0'){
return '<span style="color:#ff801f">未通过</span>';
}
else if(value=='1'){
return '<span style="color:#999">待审核</span>';
}
else if(value=='2'){
return '<span style="color:#08b9d5">审核中</span>';
}
else{
return '<span style="color:#08d55a">已通过</span>';
}
}
},{
field: 'examine_time',
title: '申请时间',
align: 'center',
valign: 'middle',
formatter: function (value, row, index) {
return '<span style="color:#bbb">'+ value +'</span>';
}
},{
field: 'examine_name',
title: '申请人',
align: 'center',
valign: 'middle'
}
]
})
}
function openEditWindow(businessId){
window.open($("#procAppUrl").val()+'/processView_detail?businessId='+businessId);
}
//渲染进度查询列表
function init_office_progress_list(){
var infos = [
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'},
{progress_time:'2018/08/15 08:23',progress_title:'进度记录8月17去趟水上乐园!!!'}
];
$('#office_progress').bootstrapTable('destroy').bootstrapTable({
/* showColumns:true,
showToggle:true,
showRefresh:true,
search:true, */
/* url: "bootstrap-table/data/data1.json", // 获取表格数据的url */
data:infos,
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
/* striped: true, //表格显示条纹,默认为false */
pagination: true, // 在表格底部显示分页组件,默认false
pageList: [5,10,15,20], // 设置页面可以显示的数据条数
pageSize: 10, // 页面数据条数
pageNumber: 1, // 首页页码,
uniqueId:'UUID',
//clickToSelect:true,//True to select checkbox or radiobox when the column is clicked.
queryParams:function(params){
var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
// limit: params.limit, //页面大小
offset: params.offset, //页码
pageSize:this.pageSize,
pageNumber:this.pageNumber
/* projectId: $("#projectId").val(),
requirement_Id:$("#requirement_Id").val(),
length: 6 */
};
return temp;
},
columns: [
/*{
checkbox: true, // 显示一个勾选框
align: 'center', // 居中显示
valign: 'middle'
}, */
{
field: 'progress_title',
title: '进度标题',
align: 'left',
valign: 'middle',
width: '82%',
formatter: function (value, row, index) {
return '<div class="office_examine_tilte">'+ value +'</div>';
}
}, {
field: 'progress_time',
title: '进度时间',
align: 'right',
valign: 'middle',
width: '18%',
formatter: function (value, row, index) {
return '<span style="color:#bbb;margin-right:23px;">'+ value +'</span>';
}
}
]
})
}
//渲染历史查询列表
function init_office_history_list(){
var infos = [
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'},
{history_time:'2018/08/15 08:23',history_title:'历史记录8月17去了趟水上乐园!!!'}
];
$('#office_history').bootstrapTable('destroy').bootstrapTable({
/* showColumns:true,
showToggle:true,
showRefresh:true,
search:true, */
/* url: "bootstrap-table/data/data1.json", // 获取表格数据的url */
data:infos,
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
/* striped: true, //表格显示条纹,默认为false */
pagination: true, // 在表格底部显示分页组件,默认false
pageList: [5,10,15,20], // 设置页面可以显示的数据条数
pageSize: 10, // 页面数据条数
pageNumber: 1, // 首页页码,
uniqueId:'UUID',
//clickToSelect:true,//True to select checkbox or radiobox when the column is clicked.
queryParams:function(params){
var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的
// limit: params.limit, //页面大小
offset: params.offset, //页码
pageSize:this.pageSize,
pageNumber:this.pageNumber
/* projectId: $("#projectId").val(),
requirement_Id:$("#requirement_Id").val(),
length: 6 */
};
return temp;
},
columns: [
/*{
checkbox: true, // 显示一个勾选框
align: 'center', // 居中显示
valign: 'middle'
}, */
{
field: 'history_title',
title: '进度标题',
align: 'left',
valign: 'middle',
width: '82%',
formatter: function (value, row, index) {
return '<div class="office_examine_tilte">'+ value +'</div>';
}
}, {
field: 'history_time',
title: '进度时间',
align: 'right',
valign: 'middle',
width: '18%',
formatter: function (value, row, index) {
return '<span style="color:#bbb;margin-right:23px;">'+ value +'</span>';
}
}
]
})
}
function backOfficeList(){
$("#process_content2").hide();
......
......@@ -13,6 +13,7 @@ String procApp=com.gaowj.business.util.PropUtil.getValue("lcyq_app_url", "quartz
<script src="${ctx}/jfcas04/js/office.js"></script>
</head>
<body>
<input type="hidden" id="office_domain" value="<%=com.gaowj.business.util.PropUtil.getValue("domain", "quartz_service", "") %>" />
<!-- 头部 -->
<jsp:include page="/nav4.jsp"></jsp:include>
......
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="bgmkTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增报工</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div>
<div id="uploadcommon" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkEmployeeTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>人员类型:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="USER_TYPE" data-options="required:true" name="FIELD_USER_TYPE" style="width:150px " value="${is_row.USER_TYPE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作内容:</span>
</td>
<td style="height:150px" >
<input class="easyui-textbox" data-options="multiline:true ,required:true" id="CONTENT" name="FIELD_CONTENT" style="width:400px ; height:140px" value="${is_row.CONTENT}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作用时:</span>
</td>
<td>
<input class="easyui-numberspinner" data-options="min:0,max:10 ,required:true" id="GZYS" name="FIELD_GZYS" style="width:150px" value="${is_row.GZYS}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>报工时间:</span>
</td>
<td>
<input class="easyui-datebox" data-options="min:0,max:10 ,required:true" id="BG_TIME" name="FIELD_BG_TIME" style="width:150px" value="${is_row.BG_TIME}"/>
</td>
</tr>
</table>
</form>
\ No newline at end of file
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>人员类型:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="USER_TYPE" data-options="required:true" name="FIELD_USER_TYPE" style="width:150px " value="${is_row.USER_TYPE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作内容:</span>
</td>
<td style="height:150px" >
<input class="easyui-textbox" data-options="multiline:true ,required:true" id="CONTENT" name="FIELD_CONTENT" style="width:400px ; height:140px" value="${is_row.CONTENT}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作用时:</span>
</td>
<td>
<input class="easyui-numberspinner" data-options="min:0,max:10 ,required:true" id="GZYS" name="FIELD_GZYS" style="width:150px" value="${is_row.GZYS}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>报工时间:</span>
</td>
<td>
<input class="easyui-datebox" data-options="min:0,max:10 ,required:true" id="BG_TIME" name="FIELD_BG_TIME" style="width:150px" value="${is_row.BG_TIME}"/>
</td>
</tr>
</table>
</form>
\ No newline at end of file
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/**
* 序号:2
* 功能:构建下拉框内容
* 参数:
* 说明:方便新增、修改页面里的下拉选项加载数据
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载人员类型数据
var v_typequery = {};
v_typequery.FIELD_tableName = "DM_USER_TYPE";
var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
/**
* 序号:3
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//定义grid列表
var ls_title="报工模块&nbsp;&nbsp;";
var is_column = [ [
{field : 'CONTENT',title : '工作内容',width : 300,align : 'center'},
{field : 'BG_TIME',title : '报工时间',width : 80,align : 'center'},
{field : 'GZYS',title : '工作用时',width : 80,align : 'center'},
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/bgmkData_listEmployee",queryData,is_column,60,80);
/****/
/****/
/**
* 序号:4
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载增加子页面
function addRow(){
var is_row={OPETYPE:'insert'};
openEditRow("bgmkView_bgmkTabDetail",is_row,"新增",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function insertData(is_entity){
var v_result = bgmkModule.bgmkActAction.insertBgmk(is_entity);
$('#list').datagrid('reload');
return v_result;
}
//加载修改子页面
function editRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("bgmkView_bgmkTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function updateData(is_entity){
v_result = bgmkModule.bgmkActAction.updateBgmk(is_entity);
$('#list').datagrid('reload');
return v_result;
}
/****/
/**
* 序号:5
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#bgmkTab_searchForm")[0].reset();
}
/****/
/****/
/**
* 序号:6
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
......@@ -30,18 +30,18 @@
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>版块描述:</span>
<span>版块排序:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="DESCRIPTION" name="FIELD_DESCRIPTION" style="width:500px" value="${is_row.DESCRIPTION}"/>
<input class="easyui-textbox" id="SORT" name="FIELD_SORT" style="width:500px" value="${is_row.SORT}"/>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>版块排序:</span>
<span>版块描述:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="SORT" name="FIELD_SORT" style="width:500px" value="${is_row.SORT}"/>
<input class="easyui-textbox" id="DESCRIPTION" name="FIELD_DESCRIPTION" style="width:500px" value="${is_row.DESCRIPTION}"/>
</td>
</tr>
</table>
......
......@@ -229,7 +229,7 @@ function deleteBatchRow(){
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#topicDetail_searchForm")[0].reset();
$("#replyDetail_searchForm")[0].reset();
}
/****/
......@@ -244,9 +244,9 @@ function refreshRow(){
* 备注:需更改
**/
function searchRow(){
var v_query = $("#topicDetail_searchForm").getFormVal();
var v_query = $("#replyDetail_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
renderDATAFORM(v_query,$("#topicDetail_searchForm"));
renderDATAFORM(v_query,$("#replyDetail_searchForm"));
}
/****/
......
......@@ -27,7 +27,7 @@
<td style="width: 85%">${is_row.POST_TIME}</td>
</tr>
</table> --%>
<div id="topicDetailTab">
<div id="replyDetailTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
......@@ -42,8 +42,9 @@
</div>
</form>
<div id="tb">
<form id="topicDetail_searchForm" style="float:left">
内容: <input id="FIELD_CONTENT" name="FIELD_TITLE" type="text" style="width: 200px" class="tableInput-easyui">
<form id="replyDetail_searchForm" style="float:left">
<input type="hidden" name="FIELD_TOPIC_ID" value="${is_row.UUID}">
内容: <input id="FIELD_CONTENT" name="FIELD_CONTENT" type="text" style="width: 200px" class="tableInput-easyui">
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
......
......@@ -9,7 +9,7 @@
<span>标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="TITLE" name="FIELD_TITLE" style="width:500px" value="${is_row.TITLE}"/>
<input class="easyui-textbox" id="TITLE" name="FIELD_TITLE" data-options="required:true" style="width:500px" value="${is_row.TITLE}"/>
</td>
</tr>
<tr>
......
......@@ -60,7 +60,7 @@ var v_yesnoquery_data = standardModel.dataAction.listAllCache(v_yesnoquery);
//定义grid列表
var ls_title="敏感词管理";
var is_column = [ [
{field : 'WORD',title : '单词',width : 150,align : 'center'},
{field : 'WORD',title : '单词',width : 250,align : 'center'},
//{field : 'LEVEL_NUM',title : '敏感等级',width : 150,align : 'center'},
{field : 'STATE_FLAG',title : '数据已失效',width : 80,align : 'center',
formatter : function(value) {
......
......@@ -45,13 +45,13 @@ var ls_ywlx = 'YBYW';
* 备注:需更改
**/
//定义grid列表
var ls_title="友情链接";
var ls_title="快速链接";
var is_column = [ [
{field : 'TITLE',title : '标题',width : 380,align : 'left'},
{field : 'URL',title : '链接',width : 380,align : 'left'},
{field : 'SORT',title : '排序',width : 50,align : 'left'},
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 120,align : 'center'}
{field : 'TITLE',title : '标题',width : 300,align : 'left', halign:'center'},
{field : 'URL',title : '链接',width : 300,align : 'left', halign:'center'},
{field : 'SORT',title : '排序',width : 80,align : 'center'},
{field : 'CREATE_USER_NAME',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 100,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......@@ -167,7 +167,7 @@ function deleteRow(index){
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
v_query.FIELD_CODE = code;
var v_result = friendlinkModule.act.removeFriendLinkInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
......@@ -202,7 +202,7 @@ function deleteBatchRow(){
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
v_query.FIELD_CODE = code;
var v_result = friendlinkModule.act.removeFriendLinkInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
......
......@@ -23,7 +23,13 @@ logModule.prototype.list = function(){};
//日志所有数据
logModule.prototype.listAll = function(){};
//获取回复内容
logModule.prototype.listItem = function(){};
logModule.prototype.listReply = function(){};
//获取回复内容
logModule.prototype.listReplyAll = function(){};
//获取回复内容
logModule.prototype.findPreviousLog = function(){};
//获取回复内容
logModule.prototype.findNextLog = function(){};
//创建一个数据操作对象,然后再后续使用
logModule.logActAction = new logModule("json").delegate("logAct");
......
......@@ -43,11 +43,10 @@ var ls_ywlx = 'YBYW';
//定义grid列表
var ls_title="日志管理";
var is_column = [ [
{field : 'LOG_TITLE',title : '日志标题',width : 100,align : 'center'},
{field : 'LOG_CONTENT',title : '日志内容',width : 300,align : 'center'},
{field : 'NEW_CREATE',title : '创建人',width : 80,align : 'center'},
{field : 'LOG_TITLE',title : '日志标题',width : 500,align : 'center'},
{field : 'NEW_CREATE',title : '创建人',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'},
{field : 'NEW_UPDATE',title : '修改人',width : 80,align : 'center'},
{field : 'NEW_UPDATE',title : '修改人',width : 100,align : 'center'},
{field : 'UPDATE_TIME',title : '修改时间',width : 150,align : 'center'}
] ];
//列表加载完成回调
......@@ -85,8 +84,8 @@ function formatMenu(value, data,index) {
function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span> <a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"replyRow('"
+ index + "')\">回复</a>";
+ index + "')\">删除</a> | <span class=\"icon-preview\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"viewRow('"
+ index + "')\">查看</a>";
return returnData;
}
......@@ -115,10 +114,21 @@ function addRow(){
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
function addUrlOnloadCallback(is_row) {
//初始化编辑器
UE.delEditor('LOG_CONTENT');
var ue = UE.getEditor('LOG_CONTENT', {});
ue.ready(function() {
//设置编辑器的内容
ue.setContent("");
});
}
//保存
function insertData(is_entity){
var ue = UE.getEditor('LOG_CONTENT');
is_entity.FIELD_LOG_CONTENT = ue.getContent();
//处理相关
var v_result = logModule.logActAction.insertLog(is_entity);
$('#list').datagrid('reload');
return v_result;
......@@ -130,54 +140,32 @@ function editRow(index) {
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("logView_logTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
openEditRow("logView_logTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
function updateUrlOnloadCallback(is_row) {
//初始化编辑器
if (is_row.LOG_CONTENT == null || is_row.LOG_CONTENT == '' || is_row.LOG_CONTENT == undefined)
is_row.LOG_CONTENT = '';
UE.delEditor('LOG_CONTENT');
var ue = UE.getEditor('LOG_CONTENT', {});
ue.ready(function() {
//设置编辑器的内容
ue.setContent(is_row.LOG_CONTENT);
});
}
//保存
function updateData(is_entity){
var ue = UE.getEditor('LOG_CONTENT');
is_entity.FIELD_LOG_CONTENT = ue.getContent();
//处理相关
var v_result = logModule.logActAction.updateLog(is_entity);
$('#list').datagrid('reload');
return v_result;
}
//回复弹出框格式
function openreplyRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,is_top){
$('#detail').dialog( {
title : is_title,
iconCls : $.getJwWindowPic(),
width : ls_width * is_width,
height :ls_height * is_height,
closed : false,
cache : false,
maximizable:is_max,
left:is_left,
top:is_top,
href : editUrl,
queryParams:get_FIELD(is_row),
modal : true,
buttons : [ {
text : '关闭',
iconCls : 'icon-back',
handler : function() {
closeBox('detail');
}
} ],
onLoad:function editUrlOnload(){
if(is_row.OPETYPE=='reply'){
replyUrlOnloadCallback(is_row);
}else{
updateUrlOnloadCallback(is_row);
}
}
});
}
/**
* 序号:
* 功能:回复
......@@ -188,51 +176,18 @@ function openreplyRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//加载回复子页面
function replyRow(index) {
function viewRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'reply';
openreplyRow("logView_replyTabDetail",is_row[0],"回复",true,0.65,0.95,0,0);
//加载日志回复页面
openViewIframRow1("replyDetail","logView_replyTab?FIELD_UUID="+is_row[0].UUID,is_row[0],"查看",true,0.65,0.95,160,0);
}
//加载回复子页面成功后的回调
function replyUrlOnloadCallback(is_row){
var reply_column = [ [
{field : 'REPLY_NAME',width : 100,align : 'center'},
{field : 'REPLY_CONTENT',width : 300,align : 'center'},
{field :'opt',width : 150,align : 'center',
formatter:function(value,row,index){
var deleteBtn='<a style="cursor:pointer" onclick="javascript:deleteItemRow('+index+')">删除</a>'
return '<div class=\'optBtns\'>'+deleteBtn+'</div>';
}
}
] ];
var logUuid=is_row.UUID;
var reply_query = {
FIELD_LOG_ID:logUuid
}
datagridReply("logItemInputForm",gaowj.WEB_APP_NAME + "/logData_listItem",reply_query,reply_column);
}
//回复保存
function replySaveRow(){
if($("input[name=FIELD_USER_REPLY_CONTENT]").val()==''){
$.messager.alert('提示','请在回复框输入内容')
}else{
var items={FIELD_LOG_ID:$("input[name=FIELD_UUID]").val(),
FIELD_REPLY_CONTENT:$("input[name=FIELD_USER_REPLY_CONTENT]").val()}
var v_result = logModule.logActAction.insertReply(items);
if(v_result.NAME=='999'){
$('#logItemInputForm').datagrid('reload');
}
}
//openViewIframRow1关闭后的回调
function closeCallback1(is_entity) {
}
/**
* 序号:
* 功能:单个删除
......@@ -299,37 +254,6 @@ function deleteBatchRow(){
/**
* 序号:
* 功能:回复删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function deleteItemRow(index){
$('#logItemInputForm').datagrid('selectRow',index);
var is_row = $('#logItemInputForm').datagrid('getSelections');
$('#logItemInputForm').datagrid('clearSelections');
var code = is_row[0].UUID;
if(code == ''|| code == null){
return
}else{
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = logModule.logActAction.deleteReply(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#logItemInputForm').datagrid('reload');
}
});
}
}
/****/
/**
* 序号:
* 功能:刷新
* 参数:
* 说明:
......@@ -358,32 +282,4 @@ function searchRow(){
var v_query = $("#logTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
/**
* 回复
* 2016-12-01
* 高伟杰
**/
function datagridReply(is_view,is_url,is_query,is_column){
$('#'+is_view).datagrid({
iconCls:$.getJwWindowPic(),
url:is_url,
queryParams : is_query,//查询参数
singleSelect : false,//是否多选
fitColumns : false,//是否撑满
autoRowHeight : false,//设定高度
rowStyler :function(index,row){return rowstyler(index,row);},
pagination : true,//分页显示
pageSize : rows,//显示行数
pageList : listPageSize,//条数选择
striped : true, //是否隔行显示
remoteSort : false,//是否从服务器排序
columns : is_column,
onLoadSuccess : function() {
}
});
}
/****/
\ No newline at end of file
......@@ -24,7 +24,7 @@ function resetQueryData(){
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
var ls_module_id='1';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
......@@ -41,118 +41,83 @@ var ls_ywlx = 'YBYW';
* 备注:需更改
**/
//定义grid列表
var ls_title="日志管理";
var ls_title="回复管理";
var is_column = [ [
{field : 'LOG_TITLE',title : '日志标题',width : 100,align : 'center'},
{field : 'LOG_CONTENT',title : '日志内容',width : 300,align : 'center'},
{field : 'OPT',title : '操作',width : 300,align : 'center',
formatter:function(index){
var replyBtn='<a style="cursor:pointer" onclick="javascript:replyRow('+index+')">回复</a>'
return '<div class="optBtn">'+replyBtn+'</div>'
}
}
] ];
{field : 'REPLY_CONTENT',title : '内容',width : 350,align : 'center'},
{field : 'REPLY_USER_NAME',title : '回复人',width : 100,align : 'center'},
{field : 'REPLY_TIME',title : '回复时间',width : 150,align : 'center'},
] ];
//列表加载完成回调
function reportrollback(){
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/logData_list",queryData,is_column,60,80);
//回复弹出框格式
function openreplyRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,is_top){
$('#detail').dialog( {
title : is_title,
iconCls : $.getJwWindowPic(),
width : ls_width * is_width,
height :ls_height * is_height,
closed : false,
cache : false,
maximizable:is_max,
left:is_left,
top:is_top,
href : editUrl,
queryParams:get_FIELD(is_row),
modal : true,
buttons : [ {
text : '关闭',
iconCls : 'icon-back',
handler : function() {
closeBox('detail');
}
} ],
onLoad:function editUrlOnload(){
if(is_row.OPETYPE=='reply'){
replyUrlOnloadCallback(is_row);
}else{
updateUrlOnloadCallback(is_row);
}
}
});
}
queryData.FIELD_LOG_ID = $("#LOG_ID").val();
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/logData_listReply",queryData,is_column,60,80);
/****/
/**
* 序号:
* 功能:回复
* 序号:4
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟智慧科技有限公司
* 单位:宁波金网
* 备注:需更改
**/
//加载回复子页面
function replyRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'reply';
openreplyRow("logView_replyTabDetail",is_row[0],"回复",true,0.65,0.95,0,0);
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>"
+ "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>";
}
//加载回复子页面成功后的回调
function replyUrlOnloadCallback(is_row){
var reply_column = [ [
{field : 'REPLY_NAME',width : 100,align : 'center'},
{field : 'REPLY_CONTENT',width : 300,align : 'center'},
{field :'opt',width : 150,align : 'center',
formatter:function(value,row,index){
var deleteBtn='<a style="cursor:pointer" onclick="javascript:deleteItemRow('+index+')">删除</a>'
var Btn=''
return '<div class=\'optBtns\'>'+(row.CODE==gaowj.SEESION_CODE?deleteBtn:Btn)+'</div>';
}
}
] ];
function OnLoadSuccess(){}
var logUuid=is_row.UUID;
var reply_query = {
FIELD_LOG_ID:logUuid
}
datagridReply("logItemInputForm",gaowj.WEB_APP_NAME + "/logData_listItem",reply_query,reply_column);
//上浮横向菜单集里的具体菜单项(需更改)
var is_tc = 0;
function getOptionMenu(data,index){
var returnData = "";
is_tc = 1;
returnData= "<span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>";
return returnData;
}
//回复保存
function replySaveRow(){
if($("input[name=FIELD_USER_REPLY_CONTENT]").val()==''){
$.messager.alert('提示','请在回复框输入内容')
}else{
var items={FIELD_LOG_ID:$("input[name=FIELD_UUID]").val(),
FIELD_REPLY_CONTENT:$("input[name=FIELD_USER_REPLY_CONTENT]").val()}
var v_result = logModule.logActAction.insertReply(items);
if(v_result.NAME=='999'){
$('#logItemInputForm').datagrid('reload');
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = is_tc;
return is_menu_count;
}
/****/
/**
* 序号:5
* 功能:新增
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//保存
function addRow(){
var is_entity = $("#inputForm").getFormVal();
//处理相关
var v_result = logModule.logActAction.insertReply(is_entity);
if (v_result != null && v_result != undefined) {
$.messager.alert('提示', v_result.VALUE);
}
$('#list').datagrid('reload');
$('#REPLY_CONTENT').val('');
//return v_result;
}
/**
......@@ -167,7 +132,7 @@ function replySaveRow(){
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#logTab_searchForm")[0].reset();
$("#logReply_searchForm")[0].reset();
}
/****/
......@@ -182,65 +147,71 @@ function refreshRow(){
* 备注:需更改
**/
function searchRow(){
var v_query = $("#logTab_searchForm").getFormVal();
var v_query = $("#logReply_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
renderDATAFORM(v_query,$("#logReply_searchForm"));
}
/****/
/**
* 序号:
* 功能:回复删除
* 序号:6
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟智慧科技有限公司
* 单位:宁波金网
* 备注:需更改
**/
function deleteItemRow(index){
$('#logItemInputForm').datagrid('selectRow',index);
var is_row = $('#logItemInputForm').datagrid('getSelections');
$('#logItemInputForm').datagrid('clearSelections');
var code = is_row[0].UUID;
var thiscode=is_row[0].CODE;
if(code == ''|| code == null){
return
}else{
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
v_query.FIELD_THISCODE = thiscode;
var v_result = logModule.logActAction.deleteReply(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#logItemInputForm').datagrid('reload');
}
});
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = logModule.logActAction.deleteReply(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 回复
* 2016-12-01
* 高伟杰
**/
function datagridReply(is_view,is_url,is_query,is_column){
$('#'+is_view).datagrid({
iconCls:$.getJwWindowPic(),
url:is_url,
queryParams : is_query,//查询参数
singleSelect : false,//是否多选
fitColumns : false,//是否撑满
autoRowHeight : false,//设定高度
rowStyler :function(index,row){return rowstyler(index,row);},
pagination : true,//分页显示
pageSize : rows,//显示行数
pageList : listPageSize,//条数选择
striped : true, //是否隔行显示
remoteSort : false,//是否从服务器排序
columns : is_column,
onLoadSuccess : function() {
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = logModule.logActAction.deleteReply(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
......@@ -16,6 +16,7 @@
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="replyDetail" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/logModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/logTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>日志标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="LOG_TITLE" name="FIELD_LOG_TITLE" style="width:600px" required=true value="${is_row.LOG_TITLE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:210px">
<span>日志内容:</span>
</td>
<td id="LOG_CONENT_RE">
<input class="easyui-textbox" id="LOG_CONTENT" name="FIELD_LOG_CONTENT" style="width:600px;height:200px;border-width:5px" required=true multiline=true value="${is_row.LOG_CONTENT}"/>
</td>
</tr>
</table>
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>日志标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="LOG_TITLE" name="FIELD_LOG_TITLE" style="width:600px" required=true value="${is_row.LOG_TITLE}" />
</td>
</tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:210px">
<span>日志内容:</span>
</td>
<td style="width: 85%">
<script id="LOG_CONTENT" type="text/plain" style="width:625px;height:300px;float:left;"></script>
</td>
</tr>
</table>
</form>
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="replyTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
<div style="overflow:auto;height:100%;">
<div id="logReplyTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%;height:75%;"></table>
<form id="inputForm" style="clear:both;">
<div>
<input type="hidden" id="LOG_ID" name="FIELD_LOG_ID" value="${is_row.UUID}">
<textarea name="FIELD_REPLY_CONTENT" id="REPLY_CONTENT" style="width:100%;height:100px;"></textarea>
<input type="button" value="回复" onclick="javascript:addRow()">
</div>
</form>
<div id="tb">
<form id="logReply_searchForm" style="float:left">
<input type="hidden" name="FIELD_LOG_ID" value="${is_row.UUID}">
内容: <input id="FIELD_REPLY_CONTENT" name="FIELD_REPLY_CONTENT" type="text" style="width: 200px" class="tableInput-easyui">
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除记录</a>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="replyTab_searchForm" style="float:left">
日志名称: <input class="easyui-textbox" id="FIELD_LOG_TITLE" name="FIELD_LOG_TITLE" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/logModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/replyTab.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/log/js/replyTab.js" charset="utf-8"></script>
\ No newline at end of file
<%@page contentType="text/html; charset=UTF-8"%>
<style type="text/css">
.datagrid-header {
position: absolute;
visibility: hidden;
}
#inputForm {
position: relative;
}
.log_reply_list{
position:absolute;
bottom:7%;}
.log_item_list div div{
float:left;
}
.log_item_info{
margin-left: 26px;
}
.log_item_index input{
width:120px;
}
.tableStyle span,.log_item_one span{
border:none;
}
</style>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/>
<input type="hidden" name="FIELD_CREATE_NAME" id="CREATE_NAME" value="${is_row.CREATE_NAME}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>日志标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="LOG_TITLE" name="FIELD_LOG_TITLE" readonly style="width:600px" value="${is_row.LOG_TITLE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:210px">
<span>日志内容:</span>
</td>
<td id="LOG_CONTENT_RE">
<input class="easyui-textbox" id="LOG_CONTENT" readonly name="FIELD_LOG_CONTENT" style="width:600px;height:200px" multiline=true value="${is_row.LOG_CONTENT}"/>
</td>
</tr>
</table>
</form>
<form id="logItemInputForm">
</form>
<div class="log_reply_list" >
<input class="easyui-textbox" id="USER_REPLY_CONTENT" name="FIELD_USER_REPLY_CONTENT" required style="width:600px;" value="${is_row.USER_REPLY_CONTENT}"/>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:replySaveRow()" >回复</a>
</div>
\ No newline at end of file
......@@ -45,12 +45,11 @@ var is_column = [ [
{field : 'MEETING_NAME',title : '会议名称',width : 100,align : 'center'},
{field : 'MEETING_CONTENT',title : '会议内容',width : 300,align : 'center'},
{field : 'VENUE',title : '会议地址',width : 300,align : 'center'},
{field : 'HOST',title : '主持人',width : 80,align : 'center'},
{field : 'START_TIME',title : '开始时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'},
{field : 'CREATE_ID',title : '创建人',width : 80,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'},
{field : 'UPDATE_ID',title : '修改人',width : 80,align : 'center'},
{field : 'UPDATE_TIME',title : '修改时间',width : 150,align : 'center'}
{field : 'CHECK_START_TIME',title : '签到开始时间',width : 150,align : 'center'},
{field : 'CHECK_END_TIME',title : '签到结束时间',width : 150,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......@@ -140,7 +139,7 @@ function editRow(index) {
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
initDateBox();
}
//保存
......
......@@ -11,6 +11,15 @@
<input class="easyui-textbox" id="MEETING_NAME" name="FIELD_MEETING_NAME" style="width:600px" required=true value="${is_row.MEETING_NAME}"/>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>主持人:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="HOST" name="FIELD_HOST" style="width:600px" required=true value="${is_row.HOST}"/>
</td>
</tr>
<tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:160px">
<span>会议内容:</span>
......@@ -39,5 +48,17 @@
<input id="END_TIME" name="FIELD_END_TIME" type="text" value="${is_row.END_TIME}" >
</td>
</tr>
<tr>
<td style="width: 20%;" class="tableStyleLable">
<span>
会议签到时间:
</span>
</td>
<td style="width: 80%">
<input class="easyui-datetimebox" required id="CHECK_START_TIME" name="FIELD_CHECK_START_TIME" value="${is_row.CHECK_START_TIME}" />
<span>到</span>
<input class="easyui-datetimebox" required id="CHECK_END_TIME" name="FIELD_CHECK_END_TIME" type="text" value="${is_row.CHECK_END_TIME}" >
</td>
</tr>
</table>
</form>
\ No newline at end of file
......@@ -45,11 +45,11 @@ var ls_ywlx = 'YBYW';
* 备注:需更改
**/
//定义grid列表
var ls_title="友情链接";
var ls_title="快速链接";
var is_column = [ [
{field : 'TITLE',title : '标题',width : 380,align : 'center'},
{field : 'TITLE',title : '标题',width : 380,align : 'left', halign:'center'},
{field : 'RELEASE_TIME',title : '发布时间',width : 120,align : 'center'},
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_USER_NAME',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 120,align : 'center'}
] ];
//列表加载完成回调
......@@ -174,7 +174,7 @@ function deleteRow(index){
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
v_query.FIELD_CODE = code;
var v_result = noticeModule.act.removeNoticeInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
......@@ -209,7 +209,7 @@ function deleteBatchRow(){
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
v_query.FIELD_CODE = code;
var v_result = noticeModule.act.removeNoticeInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
......
......@@ -5,26 +5,18 @@
<input type="hidden" name="FIELD_USER_ID" id="USER_ID" value="${is_row.USER_ID}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>标题:</span>
</td>
<td style="width: 15%;" class="tableStyleLable"><span>标题:</span></td>
<td style="width: 85%">
<input class="easyui-textbox" data-options="required:true" id="TITLE" name="FIELD_TITLE" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>正文:</span>
</td>
<td style="width: 15%;" class="tableStyleLable"><span>正文:</span></td>
<td style="width: 85%">
<div id="TEXT" name="FIELD_TEXT">
</div>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>发布时间:</span>
</td>
<td style="width: 85%">
<input class="easyui-datetimebox" data-options="required:true" id="RELEASE_TIME" name="FIELD_RELEASE_TIME" style="width:150px" />
</td>
</tr>
</table>
</form>
\ No newline at end of file
......@@ -67,12 +67,7 @@ var is_column = [ [
},
{field : 'REALLY_END_TIME',title : '实际结束时间',width : 150,align : 'center'},
{field : 'START_TIME',title : '开始时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'},
{field : 'CREATE_ID',title : '创建人',width : 80,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'},
{field : 'UPDATE_ID',title : '修改人',width : 80,align : 'center'},
{field : 'UPDATE_TIME',title : '修改时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......
//此乃本模块与后台交互的方法接口部分
var bgmkModule = function(format) {
var workReportModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
bgmkModule.prototype = BusinessObject;
workReportModule.prototype = BusinessObject;
//插入报工数据
bgmkModule.prototype.insertBgmk = function(){};
workReportModule.prototype.insertWorkReport = function(){};
//修改报工数据
bgmkModule.prototype.updateBgmk = function(){};
workReportModule.prototype.updateWorkReport = function(){};
//删除报工数据
bgmkModule.prototype.deleteBgmk = function(){};
workReportModule.prototype.deleteWorkReport = function(){};
//恢复数据
workReportModule.prototype.resumeWorkReport = function(){};
//清除数据
workReportModule.prototype.deleteTrueWorkReport = function(){};
//报工数据_分页
bgmkModule.prototype.list = function(){};
workReportModule.prototype.list = function(){};
//报工所有数据
bgmkModule.prototype.listAll = function(){};
workReportModule.prototype.listAll = function(){};
//创建一个数据操作对象,然后再后续使用
bgmkModule.bgmkActAction = new bgmkModule("json").delegate("bgmkAct");
workReportModule.workReportActAction = new workReportModule("json").delegate("workReportAct");
//创建一个数据获取对象,然后再后续使用
bgmkModule.bgmkDataAction = new bgmkModule("json").delegate("bgmkData");
workReportModule.workReportDataAction = new workReportModule("json").delegate("workReportData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
......
......@@ -39,11 +39,10 @@ var ls_ywlx = 'YBYW';
* 单位:宁波金网
* 备注:需更改
**/
//加载人员类型数据
var v_typequery = {};
v_typequery.FIELD_tableName = "DM_USER_TYPE";
var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
//加载是否数据
var v_yesnoquery = {};
v_yesnoquery.FIELD_tableName = "DM_ST_YES_NO";
var v_yesnoquery_data = standardModel.dataAction.listAllCache(v_yesnoquery);
/**
* 序号:3
......@@ -58,29 +57,39 @@ var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
//定义grid列表
var ls_title="报工模块&nbsp;&nbsp;";
var is_column = [ [
{field : 'USER_NAME',title : '人员姓名',width : 100,align : 'center'},
{field : 'DEPT_NAME',title : '人员部门',width : 80,align : 'center'},
{field : 'CONTENT',title : '工作内容',width : 300,align : 'center'},
{field : 'BG_TIME',title : '报工时间',width : 80,align : 'center'},
{field : 'GZYS',title : '工作用时',width : 80,align : 'center'},
{field : 'USER_TYPE',title : '人员类型',width : 100,align : 'center',
{field : 'REPORT_PROJECT',title : '汇报项目',width : 150,align : 'center'},
{field : 'REPORT_THEME',title : '汇报主题',width : 200,align : 'center'},
{field : 'REPORT_TIME',title : '汇报时间',width : 150,align : 'center'},
{field : 'WORK_TIME',title : '汇报用时(h)',width : 80,align : 'center'},
{field : 'REPORT_USER_NAME',title : '汇报人员',width : 100,align : 'center'},
{field : 'DELETE_FLAG',title : '数据已删除',width : 80,align : 'center',
formatter : function(value) {
return getCodeName(v_typequery_data.rowSet, value);
}
return getCodeName(v_yesnoquery_data.rowSet, value);
}
},
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 100,align : 'center'}
{field : 'CREATE_USER_NAME',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'},
{field : 'UPDATE_USER_NAME',title : '修改人员',width : 100,align : 'center'},
{field : 'UPDATE_TIME',title : '修改时间',width : 150,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
if(row.DELETE_FLAG!='1'){
return 'height:30px;';
}
else{
return 'color:#c0c0c0;height:30px;';
}
}
//展示列表
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/bgmkData_list",queryData,is_column,60,80);
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/workReportData_list",queryData,is_column,60,80);
/****/
......@@ -103,16 +112,18 @@ function formatMenu(value, data,index) {
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
function getOptionMenu(data, index) {
var returnData = "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> ";
+ index + "')\">删除</a> | <span class=\"icon-undo\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"resumeRow('"
+ index + "')\">恢复</a> | <span class=\"icon-remove\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"removeRow('"
+ index + "')\">清除</a>";
return returnData;
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 2;
var is_menu_count = 4;
return is_menu_count;
}
......@@ -131,22 +142,34 @@ function getOptionMenuCount(){
//加载增加子页面
function addRow(){
var is_row={OPETYPE:'insert'};
openEditRow("bgmkView_bgmkTabDetail",is_row,"新增",true,0.65,0.95,0,0);
openEditRow("workReportView_workReportTabDetail",is_row,"新增",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
function addUrlOnloadCallback(is_row) {
$('#WORK_TIME').numberspinner({
min : 0,
max : 24,
//value : 0,
increment : 0.5,
precision : 1,
editable : false
});
$('#REPORT_TIME').datebox().datebox('calendar').calendar({
validator : function(date) {
var now = new Date();
//var d1 = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
var d2 = new Date(now.getFullYear(), now.getMonth(), now.getDate());
return date <= d2;
//return d1 <= date && date <= d2;
}
});
}
//保存
function insertData(is_entity){
var v_result = bgmkModule.bgmkActAction.insertBgmk(is_entity);
var v_result = workReportModule.workReportActAction.insertWorkReport(is_entity);
$('#list').datagrid('reload');
return v_result;
}
......@@ -157,23 +180,32 @@ function editRow(index) {
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("bgmkView_bgmkTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
openEditRow("workReportView_workReportTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
$('#WORK_TIME').numberspinner({
min : 0,
//value : 0,
increment : 0.5,
precision : 1,
editable : false
});
$('#REPORT_TIME').datebox().datebox('calendar').calendar({
validator : function(date) {
var now = new Date();
//var d1 = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 7);
var d2 = new Date(now.getFullYear(), now.getMonth(), now.getDate());
return date <= d2;
//return d1 <= date && date <= d2;
}
});
}
//保存
function updateData(is_entity){
v_result = bgmkModule.bgmkActAction.updateBgmk(is_entity);
var v_result = workReportModule.workReportActAction.updateWorkReport(is_entity);
$('#list').datagrid('reload');
return v_result;
}
......@@ -195,13 +227,12 @@ function deleteRow(index){
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
var v_result = workReportModule.workReportActAction.deleteWorkReport(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
......@@ -236,7 +267,7 @@ function deleteBatchRow(){
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
var v_result = workReportModule.workReportActAction.deleteWorkReport(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
......@@ -256,7 +287,7 @@ function deleteBatchRow(){
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#bgmkTab_searchForm")[0].reset();
$("#workReportTab_searchForm")[0].reset();
}
/****/
......@@ -271,11 +302,148 @@ function refreshRow(){
* 备注:需更改
**/
function searchRow(){
var v_query = $("#bgmkTab_searchForm").getFormVal();
var v_query = $("#workReportTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
renderDATAFORM(v_query,$("#workReportTab_searchForm"));
}
/****/
/**
* 序号:10
* 功能:单个恢复
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function resumeRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定恢复?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = workReportModule.workReportActAction.resumeWorkReport(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:11
* 功能:批量恢复
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function resumeBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需恢复的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定恢复删除的记录?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = workReportModule.workReportActAction.resumeWorkReport(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:12
* 功能:单个清除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function removeRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
if(is_row[0].DELETE_FLAG!=null && is_row[0].DELETE_FLAG == '0'){
$.messager.alert('提示',"存在没有删除标记的记录,无法清除!",'info');
return;
}
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定清除记录?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = workReportModule.workReportActAction.deleteTrueWorkReport(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:13
* 功能:批量清除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function removeBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
if(rows[i].DELETE_FLAG!=null && rows[i].DELETE_FLAG == '0'){
$.messager.alert('提示',"存在没有删除标记的记录,无法清除!",'info');
return;
}
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需清除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定清除记录?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = workReportModule.workReportActAction.deleteTrueWorkReport(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="bgmkTab">
<div id="workReportTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="bgmkTab_searchForm" style="float:left">
姓名: <input class="easyui-textbox" id="FIELD_USER_NAME" name="FIELD_USER_NAME" style="width:200px"/>&nbsp;&nbsp;
<form id="workReportTab_searchForm" style="float:left">
汇报人员: <input class="easyui-textbox" id="FIELD_REPORT_USER_NAME" name="FIELD_REPORT_USER_NAME" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增报工</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增</a>
<a href="#" id="mb1" class="easyui-menubutton" data-options="menu:'#mm1',iconCls:'icon-ext-29_22'">更多</a>
<div id="mm1" style="width:30px;">
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除记录</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-undo',plain:true" onclick="javascript:resumeBatchRow()">恢复记录</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="javascript:removeBatchRow()">清除记录</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div>
<div id="uploadcommon" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkTab.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/workreport/js/workReportModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/workreport/js/workReportTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>汇报项目:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="REPORT_PROJECT" name="FIELD_REPORT_PROJECT" style="width:500px" value="${is_row.REPORT_PROJECT}"/>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable" >
<span>汇报主题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="REPORT_THEME" name="FIELD_REPORT_THEME" style="width:500px" value="${is_row.REPORT_THEME}" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>汇报时间:</span>
</td>
<td style="width: 85%">
<input class="easyui-datebox" id="REPORT_TIME" name="FIELD_REPORT_TIME" style="width:500px" value="${is_row.REPORT_TIME}" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>汇报工时(h):</span>
</td>
<td style="width: 85%">
<input class="easyui-numberspinner" id="WORK_TIME" name="FIELD_WORK_TIME" style="width:500px" value="${is_row.WORK_TIME}" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>汇报内容:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="CONTENT" name="FIELD_CONTENT" style="width:500px;height:250px;" value="${is_row.CONTENT}" data-options="multiline:true" />
</td>
</tr>
</table>
</form>
\ No newline at end of file
......@@ -23,3 +23,6 @@ user_store_default_1gbsize = 1073741824
user_defaule_filedir = folder
#------------lcyqApp Url---------------------------
lcyq_app_url = http://localhost:8080/jfV5lcyq
#--------------domain------------------------------
#domain = jfbrother.com
domain = localhost
......@@ -93,20 +93,7 @@
<action name="attendanceView_*" class="com.jw.app.attendance.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/attendance/{1}.jsp</result>
</action>
<!-- 报工相关 -->
<action name="bgmkAct_*" class="com.jw.app.bgmk.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="bgmkData_*" class="com.jw.app.bgmk.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="bgmkView_*" class="com.jw.app.bgmk.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/bgmk/{1}.jsp</result>
</action>
<!-- 日历相关 -->
<action name="calendarAct_*" class="com.jw.app.calendar.action.actAction" method="{1}">
<result name="json" type="json">
......@@ -135,24 +122,28 @@
<action name="voteView_*" class="com.jw.app.vote.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/vote/{1}.jsp</result>
</action>
<!-- 代办管理 -->
<action name="todoAct_*" class="com.jw.app.todo.action.actAction" method="{1}">
<!-- 会议管理 -->
<action name="meetingAct_*" class="com.jw.app.meeting.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<!-- 会议管理 -->
<action name="meetingAct_*" class="com.jw.app.meeting.action.actAction" method="{1}">
<action name="meetingData_*" class="com.jw.app.meeting.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="todoData_*" class="com.jw.app.todo.action.dataAction" method="{1}">
<action name="meetingView_*" class="com.jw.app.meeting.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/meeting/{1}.jsp</result>
</action>
<!-- 代办管理 -->
<action name="todoAct_*" class="com.jw.app.todo.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="meetingData_*" class="com.jw.app.meeting.action.dataAction" method="{1}">
<action name="todoData_*" class="com.jw.app.todo.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
......@@ -192,7 +183,7 @@
<action name="processView_*" class="com.jw.app.process.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/process/{1}.jsp</result>
</action>
<!-- 友情链接相关 -->
<!-- 快速链接相关 -->
<action name="friendlinkAct_*" class="com.jw.app.friendlink.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
......@@ -206,9 +197,6 @@
<action name="friendlinkView_*" class="com.jw.app.friendlink.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/friendlink/{1}.jsp</result>
</action>
<action name="meetingView_*" class="com.jw.app.meeting.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/meeting/{1}.jsp</result>
</action>
<!-- 日志管理 -->
<action name="logAct_*" class="com.jw.app.log.action.actAction"
method="{1}">
......@@ -226,6 +214,20 @@
method="{1}">
<result name="{1}">/jwapp/pages/log/{1}.jsp</result>
</action>
<!-- 报工相关 -->
<action name="workReportAct_*" class="com.jw.app.workreport.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="workReportData_*" class="com.jw.app.workreport.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="workReportView_*" class="com.jw.app.workreport.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/workreport/{1}.jsp</result>
</action>
</package>
<package name="src_jwapp_store" extends="gaowj">
......
......@@ -2,7 +2,6 @@ package com.jw.app.apps.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -63,12 +62,13 @@ public class dataAction extends BasicAction{
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,
RequestUtils.UPDATEDATAFIELDPREFIX);
try {
checkGrantApp(business);
query = QueryParamUtil.StringToDate(query);
//设置当前登陆人
//获取当前登录人有访问权限的所有app,USERID属性不为空,则表示该应用已安装
List<Map<String, Object>> listData = business
.list_allApps_by_user(query);
//flag=true表示未安装
Boolean flag = true;
private_putMapByKey("apps",listData);
//查找所有的app类型
Map<String, Object> queryCategory = RequestUtils.getUpdateFieldMap(request,
......@@ -76,46 +76,6 @@ public class dataAction extends BasicAction{
List<Map<String, Object>> listCategory = business
.list_allCategory(queryCategory);
private_putMapByKey("types",listCategory);
for (Map<String, Object> rm : listData) {
if(rm.get("USERID")!=null){
private_putMapByKey("apps",listData);
flag=false;
/*System.out.println("正常");*/
break;
}
}
//2上述结果中的USERID全部为null,表示一个app都没安装
if(flag==true){
//3.根据用户id来验证apps_uninstall有没有数据
List<Map<String, Object>> listUninstallData = business
.list_allUninstallApps_by_user(query);
if(listUninstallData.size()!=0){
//要把所有的应用都返回出去
Map<String, Object> queryApp = RequestUtils.getUpdateFieldMap(request,
RequestUtils.UPDATEDATAFIELDPREFIX);
List<Map<String, Object>> listAllApps = business
.list_AllApps(queryApp);
/*System.out.println("未安装表里有");*/
private_putMapByKey("apps",listAllApps);
}
else{
//4.如果也没有,表示这个用户是新建用户,需要初始化应用
//5.初始化应用
//6.把默认的app应用添加到install表中
//7.把不默认的app应用添加到uninstall表中
Map<String, Object> queryDefaultApp = RequestUtils.getUpdateFieldMap(request,
RequestUtils.UPDATEDATAFIELDPREFIX);
business.init_defaultApps(queryDefaultApp);
//8.重新查询关联表获得数据
List<Map<String, Object>> defaultData = business
.list_allApps_by_user(query);
/*System.out.println("默认");*/
private_putMapByKey("apps",defaultData);
}
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
......@@ -126,6 +86,87 @@ public class dataAction extends BasicAction{
return "json";
}
/**
* 验证用户有权限的app,数据整理
* @param business
* @date 2018-09-15 下午4:08:37
* @author luosz@jfbrother.com
*/
private void checkGrantApp(AppsBusiness business) {
Map<String, Object> query = new HashMap<String, Object>();
query.put("USER_ID", SessionUtil.getCode());
//查询当前登陆人已安装的应用
List<Map<String, Object>> listInstallApps=business.list_allInstallApps_by_user(query);
//查询当前登陆人未安装的应用
List<Map<String, Object>> listUninstallApps=business.list_allUninstallApps_by_user(query);
//查询当前登陆人所有有权限的应用
List<Map<String, Object>> listAllApps=business.list_AllApps(query);
//当前登录人是否第一次访问应用列表(有权限应用个数>0,而且已安装应用和未安装应用数量都为0)
boolean isInit=listAllApps.size()!=0&&listInstallApps.size()==0&&listUninstallApps.size()==0;
//1.验证有权限的应用是否在已安装或者未安装中有数据
outer:
for(Map<String, Object> grantApp:listAllApps){
for(Map<String, Object> installApp:listInstallApps){
if(grantApp.get("APP_ID").equals(installApp.get("APP_ID"))){
//找到则继续判断下一个有权限的应用
continue outer;
}
}
for(Map<String, Object> uninstallApp:listUninstallApps){
if(grantApp.get("APP_ID").equals(uninstallApp.get("APP_ID"))){
//找到则继续判断下一个有权限的应用
continue outer;
}
}
Map<String, Object> insertApp=new HashMap<String, Object>();
insertApp.put("APP_ID", grantApp.get("APP_ID"));
insertApp.put("USER_ID", SessionUtil.getCode());
//如果都没有找到,则向未安装表/安装表插入该应用
if(isInit){
//如果是第一次初始化,则判断该应用是否需要默认安装
if("0".equals(grantApp.get("IS_DEFAULT"))){
//如果是默认安装则插入安装表,并退出本次循环
business.insert_installApp(insertApp);
continue;
}
}
//如果不是初始化或者是初始化但不是默认安装的,则插入未安装表
business.insert_unInstallApp(insertApp);
}
//2.验证已安装的app,是否有权限
outer:
for(Map<String, Object> installApp:listInstallApps){
for(Map<String, Object> grantApp:listAllApps){
if(grantApp.get("APP_ID").equals(installApp.get("APP_ID"))){
//找到则继续判断下一个已安装的应用
continue outer;
}
}
//没有找到,则删除安装表的数据
Map<String, Object> deleteInstallApp=new HashMap<String, Object>();
deleteInstallApp.put("APP_ID", installApp.get("APP_ID"));
deleteInstallApp.put("USER_ID", SessionUtil.getCode());
business.delete_installApp(deleteInstallApp);
}
//3.验证未安装的app,是否有权限
outer:
for(Map<String, Object> uninstallApp:listUninstallApps){
for(Map<String, Object> grantApp:listAllApps){
if(grantApp.get("APP_ID").equals(uninstallApp.get("APP_ID"))){
//找到则继续判断下一个已安装的应用
continue outer;
}
}
//没有找到,则删除未安装表的数据
Map<String, Object> deleteUninstallApp=new HashMap<String, Object>();
deleteUninstallApp.put("APP_ID", uninstallApp.get("APP_ID"));
deleteUninstallApp.put("USER_ID", SessionUtil.getCode());
business.delete_uninstallApp(deleteUninstallApp);
}
}
private void private_putMapByKey(String key,List<Map<String, Object>> list) throws SQLException {
Map<String, Object> listMap = new HashMap<String, Object>();
listMap.put("rowSet", QueryParamUtil.DateToString(list));
......
package com.jw.app.bgmk;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction {
private static final long serialVersionUID = 847847227972540472L;
public String bgmkTab() throws BusinessException{
return "bgmkTab";
}
public String bgmkTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "bgmkTabDetail";
}
public String bgmkEmployeeTab() throws BusinessException{
return "bgmkEmployeeTab";
}
public String bgmkEmployeeTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "bgmkTabEmployeeDetail";
}
public String bgmkAdvsearch() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "bgmkAdvsearch";
}
}
......@@ -43,6 +43,13 @@ public interface AppsBusiness {
* @return
*/
List<Map<String, Object>> list_allUninstallApps_by_user(Map<String, Object> query) throws BusinessException ;
/**根据用户id来查找app_install的数据
*
* @param query
* @return
*/
List<Map<String, Object>> list_allInstallApps_by_user(Map<String, Object> query) throws BusinessException ;
/**查找所有的app应用
*
......@@ -56,4 +63,8 @@ public interface AppsBusiness {
* @param queryDefaultApp
*/
void init_defaultApps(Map<String, Object> query) throws BusinessException ;
void delete_installApp(Map<String, Object> query) throws BusinessException ;
void delete_uninstallApp(Map<String, Object> query) throws BusinessException ;
}
package com.jw.app.business;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
......@@ -12,6 +13,6 @@ public interface FriendLinkBusiness {
Map<String, Object> save_friendlink(Map<String, Object> info) throws BusinessException;
void delete_friendlink(String uuid) throws BusinessException;
void delete_friendlink(List<String> list) throws BusinessException;
}
......@@ -52,51 +52,57 @@ public interface LogBusiness {
List<Map<String, Object>> list_log(Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录
* 获取所有记录
*
* @param entity
* @throws BusinessException
*/
int listCount_log(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_reply(Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录
* 插入
*
* @param entity
* @throws BusinessException
*/
List<Map<String, Object>> list_reply(Map<String, Object> query) throws BusinessException;
void insert_reply(Map<String, Object> entity) throws BusinessException;
/**
* 获取所有记录数
* 删除记录
*
* @param entity
* @throws BusinessException
*/
int listCount_reply(Map<String, Object> query) throws BusinessException;
void delete_reply(List<String> list) throws BusinessException;
/**
* 插入
* 分页获取记录
*
* @param entity
* @throws BusinessException
*/
void insert_reply(Map<String, Object> entity) throws BusinessException;
Page<Map<String, Object>> list_reply(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
/**
* 删除记录
* 根据logId删除回复
* @param listKey
*/
void delete_reply_by_logId(List<String> listKey);
/**
* 获取上一篇记录
*
* @param entity
* @throws BusinessException
*/
void delete_reply(List<String> list) throws BusinessException;
List<Map<String, Object>> find_previous_log(Map<String, Object> query) throws BusinessException;
/**
* 分页获取记录
* 获取下一篇记录
*
* @param entity
* @throws BusinessException
*/
Page<Map<String, Object>> list_reply(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> find_next_log(Map<String, Object> query) throws BusinessException;
}
package com.jw.app.business;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
......@@ -12,6 +13,6 @@ public interface NoticeBusiness {
Map<String, Object> save_notice(Map<String, Object> info) throws BusinessException;
void delete_notice(String uuid) throws BusinessException;
void delete_notice(List<String> list) throws BusinessException;
}
......@@ -9,67 +9,61 @@ import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
@Service
public interface BgmkBusiness {
public interface WorkreportBusiness {
/**
* 插入
* @param entity
* @throws BusinessException
*/
void insert_bgmk(Map<String,Object> entity) throws BusinessException ;
void insert_work_report(Map<String,Object> entity) throws BusinessException ;
/**
* 更新
* @param entity
* @throws BusinessException
*/
void update_bgmk(Map<String,Object> entity) throws BusinessException ;
void update_work_report(Map<String,Object> entity) throws BusinessException ;
/**
* 删除记录
* @param entity
* @throws BusinessException
*/
void delete_bgmk(List<String> list)throws BusinessException;
/**
* 分页获取记录
* @param entity
* 软删除记录
* @param list
* @throws BusinessException
*/
Page<Map<String, Object>> list_bgmk(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
void delete_work_report(List<String> list) throws BusinessException;
/**
* 获取所有记录
* @param entity
/**
* 恢复删除记录
* @param listKey
* @throws BusinessException
*/
void resume_work_report(List<String> listKey) throws BusinessException;
/**
* 删除记录
* @param listKey
* @throws BusinessException
*/
List<Map<String,Object>> list_bgmk(Map<String, Object> query) throws BusinessException ;
void delete_true_work_report(List<String> listKey) throws BusinessException;
/**
* 获取所有记录数
* 分页获取记录
* @param entity
* @throws BusinessException
*/
int listCount_bgmk(Map<String, Object> query) throws BusinessException ;
//个人报工
Page<Map<String, Object>> list_bgmk_employee(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
Page<Map<String, Object>> list_work_report(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
/**
* 获取所有记录
* @param entity
* @throws BusinessException
*/
List<Map<String,Object>> list_bgmk_employee(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_work_report(Map<String, Object> query) throws BusinessException ;
/**
* 获取所有记录数
* @param entity
* @throws BusinessException
*/
int listCount_bgmk_employee(Map<String, Object> query) throws BusinessException ;
int list_count_work_report(Map<String, Object> query) throws BusinessException ;
}
......@@ -42,17 +42,8 @@ public class AppsBusinessImpl implements AppsBusiness {
public List<Map<String, Object>> list_allApps_by_user(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> listData = null;
try {
//根据当前登陆人id获取所有的角色id
Map<String, Object> query2=new HashMap<String, Object>();
query2.put("USER_ID", SessionUtil.getEmid());
List<Map<String, Object>> listRole=appsRoleDAO.list_all_role_by_userId(query2);
List<String> listRoleId=new ArrayList<String>();
for(Map<String, Object> role:listRole){
listRoleId.add("%"+role.get("ROLE_ID").toString()+"%");
}
query.put("USER_ID", SessionUtil.getEmid());
List<String> listRoleId = getRoleIdsByUser();
query.put("USER_ID", SessionUtil.getCode());
query.put("G_IDS", listRoleId);
listData = QueryParamUtil.ClobToString(appsDAO.list_allApps_by_user(query));
} catch (IOException e) {
......@@ -95,7 +86,7 @@ public class AppsBusinessImpl implements AppsBusiness {
private void private_insert_unInstallApp(Map<String, Object> query) {
Map<String, Object> insertQuery = new HashMap<String, Object>();
insertQuery.put("APP_ID", query.get("APP_ID"));
insertQuery.put("USERID", SessionUtil.getEmid());
insertQuery.put("USERID", SessionUtil.getCode());
insertQuery.put("RESOURCE_ID", UUID.randomUUID().toString());
appsDAO.insert_unInstallApp(mapToList(insertQuery));
}
......@@ -118,7 +109,7 @@ public class AppsBusinessImpl implements AppsBusiness {
String now = formatter.format(new Date());
insertQuery.put("APP_ID", query.get("APP_ID"));
insertQuery.put("INSTALL_TIME", now);
insertQuery.put("USERID", SessionUtil.getEmid());
insertQuery.put("USERID", SessionUtil.getCode());
insertQuery.put("RESOURCE_ID", UUID.randomUUID().toString());
appsDAO.insert_installApp(mapToList(insertQuery));
}
......@@ -148,6 +139,21 @@ public class AppsBusinessImpl implements AppsBusiness {
}
return listData;
}
@Override
public List<Map<String, Object>> list_allInstallApps_by_user(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> listData = null;
try {
listData = QueryParamUtil.ClobToString(appsDAO.list_allInstallApps_by_user(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return listData;
}
@Override
public List<Map<String, Object>> list_AllApps(Map<String, Object> query) throws BusinessException {
......@@ -155,7 +161,7 @@ public class AppsBusinessImpl implements AppsBusiness {
try {
//根据当前登陆人id获取所有的角色id
Map<String, Object> query2=new HashMap<String, Object>();
query2.put("USER_ID", SessionUtil.getEmid());
query2.put("USER_ID", SessionUtil.getCode());
List<Map<String, Object>> listRole=appsRoleDAO.list_all_role_by_userId(query2);
List<String> listRoleId=new ArrayList<String>();
for(Map<String, Object> role:listRole){
......@@ -178,8 +184,11 @@ public class AppsBusinessImpl implements AppsBusiness {
@Override
public void init_defaultApps(Map<String, Object> query) throws BusinessException {
try {
//1.先获得所有的apps应用
//1.先获得所有的apps应用(根据用户所属的角色列表查)
List<String> listRoleId = getRoleIdsByUser();
query.put("G_IDS", listRoleId);
List<Map<String, Object>> listData = QueryParamUtil.ClobToString(appsDAO.list_AllApps(query));
for(Map<String, Object> data : listData){
Map<String, Object> defaultQuery = new HashMap<String, Object>();
defaultQuery.put("APP_ID",data.get("APP_ID"));
......@@ -201,4 +210,32 @@ public class AppsBusinessImpl implements AppsBusiness {
}
}
/**
* 获得当前登录人所属的角色列表
* @return
* @date 2018-09-15 下午3:01:42
* @author luosz@jfbrother.com
*/
private List<String> getRoleIdsByUser() {
//根据当前登陆人id获取所有的角色id
Map<String, Object> query2=new HashMap<String, Object>();
query2.put("USER_ID", SessionUtil.getCode());
List<Map<String, Object>> listRole=appsRoleDAO.list_all_role_by_userId(query2);
List<String> listRoleId=new ArrayList<String>();
for(Map<String, Object> role:listRole){
listRoleId.add("%"+role.get("ROLE_ID").toString()+"%");
}
return listRoleId;
}
@Override
public void delete_installApp(Map<String, Object> query) throws BusinessException {
appsDAO.delete_installApp(query);
}
@Override
public void delete_uninstallApp(Map<String, Object> query) throws BusinessException {
appsDAO.delete_unInstallApp(query);
}
}
......@@ -21,6 +21,8 @@ public interface AppsDAO {
void insert_unInstallApp(List<Map<String,Object>> query) throws BusinessException;
List<Map<String,Object>> list_allUninstallApps_by_user(Map<String,Object> query) throws BusinessException ;
List<Map<String,Object>> list_allInstallApps_by_user(Map<String,Object> query) throws BusinessException ;
List<Map<String,Object>> list_AllApps(Map<String,Object> query) throws BusinessException ;
}
......@@ -67,6 +67,11 @@
SELECT * FROM apps_uninstall where USERID=#{USER_ID}
</select>
<select id="list_allInstallApps_by_user" parameterType="map"
resultType="upperCaseKeyMap">
SELECT * FROM app_install where USERID=#{USER_ID}
</select>
<select id="list_AllApps" parameterType="map"
resultType="upperCaseKeyMap">
SELECT * FROM apps_app apps
......
package com.jw.app.business.bgmk;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface bgmkDAO {
void insert_bgmk(Map<String,Object> entity) throws BusinessException ;
void update_bgmk(Map<String,Object> entity) throws BusinessException ;
void delete_bgmk(List<String> list) throws BusinessException;
List<Map<String,Object>> list_bgmk(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_bgmk(Map<String,Object> query) throws BusinessException ;
int listCount_bgmk(Map<String, Object> query) throws BusinessException ;
}
......@@ -42,6 +42,10 @@ public class CalendarBusinessImpl implements CalendarBusiness {
}
}
}
else{
//从当前时间开始去查找
query.put("START_TIME", new Date());
}
if (query.get("END_TIME") != null) {
try {
query.put("END_TIME", new Date(Long.valueOf(query.get("END_TIME").toString())));
......@@ -145,6 +149,10 @@ public class CalendarBusinessImpl implements CalendarBusiness {
}
}
}
else{
//从当前时间开始去查找
query.put("START_TIME", new Date());
}
if (query.get("END_TIME") != null) {
try {
query.put("END_TIME", new Date(Long.valueOf(query.get("END_TIME").toString())));
......
......@@ -19,16 +19,43 @@
<select id="list_classify" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
SELECT
fc.*,
uu1.USER_NAME AS CREATE_USER_NAME,
uu2.USER_NAME AS UPDATE_USER_NAME
FROM
forum_classify fc
fc.*, uu1.USER_NAME AS CREATE_USER_NAME,
uu2.USER_NAME AS UPDATE_USER_NAME,topic.last_topic_id,
IFNULL(topic.last_topic_title,'暂无帖子') AS last_topic_title,
IFNULL(topic.count, '0') AS topic_count,
IFNULL(now.now_count, '0') AS now_count
FROM
forum_classify fc
LEFT JOIN uicm_user uu1 ON fc.CREATE_ID = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON fc.UPDATE_ID = uu2.USER_ID
LEFT JOIN (
SELECT ft.*, ft1.uuid AS last_topic_id,ft1.title AS last_topic_title
FROM (
SELECT classify_id,COUNT(*) AS COUNT,MAX(post_time) AS post_time
FROM forum_topic
WHERE DELETE_FLAG = '0'
GROUP BY classify_id
) ft
LEFT JOIN forum_topic ft1 ON ft.classify_id = ft1.classify_id
AND ft.post_time = ft1.post_time
) topic ON topic.classify_id = fc.uuid
LEFT JOIN (
SELECT classify_id,COUNT(*) as now_count
FROM forum_topic
WHERE post_time >= DATE(NOW()) AND post_time < DATE_ADD(DATE(NOW()), INTERVAL 1 DAY) AND delete_flag = '0'
GROUP BY classify_id
) now ON now.classify_id = fc.uuid
]]>
<include refid="where_classify" />
order by fc.CREATE_TIME
order by
<choose>
<when test="orderByClause != null">
${orderByClause}
</when>
<otherwise>
CREATE_TIME ASC
</otherwise>
</choose>
</select>
<select id="list_count_classify" parameterType="map" resultType="int">
......@@ -100,4 +127,4 @@
#{UUID}
</foreach>
</delete>
</mapper>
\ No newline at end of file
</mapper>
......@@ -150,6 +150,10 @@ public class TopicBusinessImpl implements ForumTopicBusiness{
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
if (query.get("CONTENT") != null && !"".equals(query.get("CONTENT"))) {
query.put("CONTENT_LIKE", "%" + query.get("CONTENT") + "%");
}
List<Map<String, Object>> items = topicDAO.list_topic_reply(new RowBounds(pageStart, pageSize), query);
int count = topicDAO.list_count_topic_reply(query);
......
......@@ -16,12 +16,18 @@
<if test="STICK_FLAG != null and STICK_FLAG != ''">
and ft.STICK_FLAG = #{STICK_FLAG}
</if>
<if test="DELETE_FLAG != null and DELETE_FLAG != ''">
and ft.DELETE_FLAG = #{DELETE_FLAG}
</if>
</trim>
</where>
</sql>
<sql id="where_topic_reply">
<where>
<trim prefixOverrides="AND |OR">
<if test="CONTENT_LIKE != null and CONTENT_LIKE != ''">
and ftr.CONTENT LIKE #{CONTENT_LIKE}
</if>
<if test="UUID != null and UUID != ''">
and ftr.UUID = #{UUID}
</if>
......@@ -31,29 +37,54 @@
<if test="REPLY_USER != null and REPLY_USER != ''">
and ftr.REPLY_USER = #{REPLY_USER}
</if>
<if test="DELETE_FLAG != null and DELETE_FLAG != ''">
and ftr.DELETE_FLAG = #{DELETE_FLAG}
</if>
</trim>
</where>
</sql>
<select id="list_topic" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
SELECT
ft.*, fc.classify_name,
fc.FILE_NAME, fc.FILE_SAVE_NAME,
fc.FILE_SAVE_PATH, fc.description,
fc.section_manager, fc.delete_flag,
uu1.USER_NAME AS POST_USER_NAME,
ft.*, fc.classify_name,post.COUNT,
uu1.USER_NAME AS POST_USER_NAME,uu1.USER_SEX,
uu2.USER_NAME AS CREATE_USER_NAME,
uu3.USER_NAME AS UPDATE_USER_NAME,
IFNULL(vtr.reply_count,0) AS REPLY_COUNT
IFNULL(reply.reply_count,0) AS REPLY_COUNT,
IFNULL(reply.reply_time, '暂无回复') AS LAST_REPLY_TIME
FROM FORUM_TOPIC ft
LEFT JOIN forum_classify fc ON ft.classify_id = fc.uuid
LEFT JOIN uicm_user uu1 ON ft.post_user = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON ft.CREATE_ID = uu2.USER_ID
LEFT JOIN uicm_user uu3 ON ft.UPDATE_ID = uu3.USER_ID
LEFT JOIN view_forum_topic_reply vtr ON vtr.topic_id = ft.uuid
LEFT JOIN (
SELECT topic_id,COUNT(*) AS reply_count,MAX(reply_time) AS reply_time
FROM forum_topic_reply
WHERE DELETE_FLAG = '0'
GROUP BY topic_id
) reply ON reply.topic_id = ft.uuid
LEFT JOIN (
SELECT post_user,COUNT(*) AS COUNT
FROM FORUM_TOPIC
WHERE DELETE_FLAG = '0'
GROUP BY post_user
) post ON post.post_user = ft.post_user
]]>
<include refid="where_topic" />
ORDER BY ft.stick_flag DESC,ft.post_time DESC
order by
<choose>
<when test="orderByClause != null">
${orderByClause}
</when>
<otherwise>
ft.stick_flag DESC,ft.post_time DESC
</otherwise>
</choose>
<if test="HOT_TOPIC_START != null and HOT_TOPIC_END != null">
<![CDATA[
LIMIT ${HOT_TOPIC_START},${HOT_TOPIC_END}
]]>
</if>
</select>
<select id="list_count_topic" parameterType="map" resultType="int">
......@@ -64,7 +95,11 @@
LEFT JOIN uicm_user uu1 ON ft.post_user = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON ft.CREATE_ID = uu2.USER_ID
LEFT JOIN uicm_user uu3 ON ft.UPDATE_ID = uu3.USER_ID
LEFT JOIN view_forum_topic_reply vtr ON vtr.topic_id = ft.uuid
LEFT JOIN (
SELECT topic_id,COUNT(*) as reply_count
FROM forum_topic_reply
GROUP BY topic_id
) reply ON reply.topic_id = ft.uuid
]]>
<include refid="where_topic" />
</select>
......@@ -211,4 +246,4 @@
#{UUID}
</foreach>
</delete>
</mapper>
\ No newline at end of file
</mapper>
......@@ -36,7 +36,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
if (query.get("USER_ID") == null || "".equals(query.get("USER_ID"))) {
// 默认查询当前登陆人
query.put("USER_ID", SessionUtil.getEmid());
query.put("USER_ID", SessionUtil.getCode());
}
// 计算起始记录
......@@ -58,7 +58,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
if (info.get("UUID") == null || "".equals(info.get("UUID"))) {
//判断目前总条数是不是<=8条
Map<String, Object> query=new HashMap<String, Object>();
query.put("CREATE_ID", SessionUtil.getEmid());
query.put("USER_ID", SessionUtil.getCode());
int count = friendlinkDAO.list_count_friendlink(query);
if(count>=8){
info.put("ERROR", "-1");
......@@ -68,12 +68,12 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
info.put("UUID", UUID.randomUUID().toString());
if (info.get("USER_ID") == null || "".equals(info.get("USER_ID"))) {
// 如果没有传USER_ID过来,则使用当前登录人id
info.put("USER_ID", SessionUtil.getEmid());
info.put("USER_ID", SessionUtil.getCode());
}
info.put("CREATE_ID", SessionUtil.getEmid());
info.put("CREATE_ID", SessionUtil.getCode());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_ID", SessionUtil.getEmid());
info.put("UPDATE_ID", SessionUtil.getCode());
info.put("UPDATE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
......@@ -108,9 +108,7 @@ public class FriendLinkBusinessImpl implements FriendLinkBusiness {
}
@Override
public void delete_friendlink(String uuid) throws BusinessException {
for (String u : uuid.split(",")) {
friendlinkDAO.delete_friendlink(u);
}
public void delete_friendlink(List<String> list) throws BusinessException {
friendlinkDAO.delete_friendlink(list);
}
}
......@@ -18,5 +18,5 @@ public interface friendlinkDAO {
void update_friendlink(Map<String, Object> info) throws BusinessException;
void delete_friendlink(String uuid) throws BusinessException;
void delete_friendlink(List<String> list) throws BusinessException;
}
......@@ -22,7 +22,11 @@
<select id="list_friendlink" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select * from friendlink t
select t.* ,
uu1.REAL_NAME AS CREATE_USER_NAME
from friendlink t
LEFT JOIN uicm_user_info uu1 ON t.CREATE_ID = uu1.USER_ID
]]>
<include refid="where" />
ORDER BY t.sort
......@@ -30,7 +34,9 @@
<select id="list_count_friendlink" parameterType="map" resultType="int">
<![CDATA[
select count(*) from friendlink t
select count(*)
from friendlink t
LEFT JOIN uicm_user_info uu1 ON t.CREATE_ID = uu1.USER_ID
]]>
<include refid="where" />
ORDER BY t.sort
......@@ -61,8 +67,15 @@
</trim>
where UUID=#{UUID}
</update>
<delete id="delete_friendlink" parameterType="String">
delete from friendlink where UUID=#{uuid}
<delete id="delete_friendlink" parameterType="list">
<![CDATA[
delete from friendlink where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
</mapper>
\ No newline at end of file
package com.jw.app.business.log;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
......@@ -10,15 +12,11 @@ import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.RowBounds;
import com.jw.app.business.LogBusiness;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.LogBusiness;
import com.jw.app.business.utils.QueryParamUtil;
public class LogBusinessImpl implements LogBusiness {
......@@ -34,13 +32,24 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public void insert_log(Map<String, Object> entity) throws BusinessException {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("CREATE_NAME", SessionUtil.getEmname());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
if (entity.get("UUID") == null) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
}
if (entity.get("CREATE_NAME") == null) {
entity.put("CREATE_NAME", SessionUtil.getEmname());
}
if (entity.get("CREATE_ID") == null) {
entity.put("CREATE_ID", SessionUtil.getCode());
}
if (entity.get("CREATE_TIME") == null) {
entity.put("CREATE_TIME", new Date());
}
if (entity.get("UPDATE_ID") == null) {
entity.put("UPDATE_ID", SessionUtil.getCode());
}
if (entity.get("UPDATE_TIME") == null) {
entity.put("UPDATE_TIME", new Date());
}
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
......@@ -61,8 +70,12 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public void update_log(Map<String, Object> entity) throws BusinessException {
// 动态传值修改
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
if (entity.get("UPDATE_TIME") == null) {
entity.put("UPDATE_TIME", new Date());
}
if (entity.get("UPDATE_ID") == null) {
entity.put("UPDATE_ID", SessionUtil.getCode());
}
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
......@@ -80,14 +93,11 @@ public class LogBusinessImpl implements LogBusiness {
//
logDAO.update_log(entity);
}
}
@Override
public void delete_log(List<String> list) throws BusinessException {
logDAO.delete_log(list);
logDAO.delete_byLogId(list);
}
@Override
......@@ -95,14 +105,16 @@ public class LogBusinessImpl implements LogBusiness {
throws BusinessException {
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
if (query.get("CREATE_IDS") != null && !"".equals(query.get("CREATE_IDS"))) {
String ids = query.get("CREATE_IDS").toString();
query.put("CREATE_IDS", java.util.Arrays.asList(ids.split(",")));
}
// 获取列表
List<Map<String, Object>> items = logDAO.list_log(new RowBounds(pageStart, pageSize),
query);
List<Map<String, Object>> items = logDAO.list_log(new RowBounds(pageStart, pageSize), query);
// 获取列表个数
int count = listCount_log(query);
int count = logDAO.list_count_log(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
......@@ -116,29 +128,27 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public List<Map<String, Object>> list_log(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = null;
if (list_data == null || list_data.size() == 0) {
list_data = logDAO.list_log(query);
try {
list_data = QueryParamUtil.ClobToString(logDAO.list_log(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list_data;
}
@Override
public int listCount_log(Map<String, Object> query) throws BusinessException {
return logDAO.listCount_log(query);
}
@Override
public Page<Map<String, Object>> list_reply(int pageNo, int pageSize, Map<String, Object> query)
throws BusinessException {
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
// 获取列表
List<Map<String, Object>> items = logDAO.list_reply(new RowBounds(pageStart, pageSize),
query);
List<Map<String, Object>> items = logDAO.list_reply(new RowBounds(pageStart, pageSize), query);
// 获取列表个数
int count = listCount_reply(query);
int count = logDAO.list_count_reply(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
......@@ -152,24 +162,45 @@ public class LogBusinessImpl implements LogBusiness {
@Override
public List<Map<String, Object>> list_reply(Map<String, Object> query) throws BusinessException {
return logDAO.list_reply(query);
}
@Override
public int listCount_reply(Map<String, Object> query) throws BusinessException {
return logDAO.listCount_reply(query);
List<Map<String, Object>> list_data = null;
try {
list_data = QueryParamUtil.ClobToString(logDAO.list_reply(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list_data;
}
@Override
public void insert_reply(Map<String, Object> entity) throws BusinessException {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("CODE", SessionUtil.getCode());
entity.put("REPLY_NAME", SessionUtil.getEmname());
entity.put("REPLY_TIME", new Date());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
if (entity.get("UUID") == null) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
}
if (entity.get("REPLY_NAME") == null) {
entity.put("REPLY_NAME", SessionUtil.getEmname());
}
if (entity.get("REPLY_USER") == null) {
entity.put("REPLY_USER", SessionUtil.getCode());
}
if (entity.get("REPLY_TIME") == null) {
entity.put("REPLY_TIME", new Date());
}
if (entity.get("CREATE_ID") == null) {
entity.put("CREATE_ID", SessionUtil.getCode());
}
if (entity.get("CREATE_TIME") == null) {
entity.put("CREATE_TIME", new Date());
}
if (entity.get("UPDATE_ID") == null) {
entity.put("UPDATE_ID", SessionUtil.getCode());
}
if (entity.get("UPDATE_TIME") == null) {
entity.put("UPDATE_TIME", new Date());
}
List<String> itemListKey = new ArrayList<String>();
List<Object> itemList = new ArrayList<Object>();
if (entity.keySet() != null) {
......@@ -191,4 +222,47 @@ public class LogBusinessImpl implements LogBusiness {
logDAO.delete_reply(list);
}
@Override
public void delete_reply_by_logId(List<String> listKey) {
logDAO.delete_reply_by_logId(listKey);
}
@Override
public List<Map<String, Object>> find_previous_log(Map<String, Object> query) {
List<Map<String, Object>> list_data = null;
try {
if (query.get("CREATE_IDS") != null && !"".equals(query.get("CREATE_IDS"))) {
String ids = query.get("CREATE_IDS").toString();
query.put("CREATE_IDS", java.util.Arrays.asList(ids.split(",")));
}
list_data = QueryParamUtil.ClobToString(logDAO.find_previous_log(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list_data;
}
@Override
public List<Map<String, Object>> find_next_log(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = null;
try {
if (query.get("CREATE_IDS") != null && !"".equals(query.get("CREATE_IDS"))) {
String ids = query.get("CREATE_IDS").toString();
query.put("CREATE_IDS", java.util.Arrays.asList(ids.split(",")));
}
list_data = QueryParamUtil.ClobToString(logDAO.find_next_log(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list_data;
}
}
\ No newline at end of file
......@@ -15,13 +15,13 @@ public interface logDAO {
void delete_log(List<String> list) throws BusinessException;
void delete_byLogId(List<String> list) throws BusinessException;
void delete_reply_by_logId(List<String> list) throws BusinessException;
List<Map<String, Object>> list_log(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_log(Map<String, Object> query) throws BusinessException;
int listCount_log(Map<String, Object> query) throws BusinessException;
int list_count_log(Map<String, Object> query) throws BusinessException;
void insert_reply(Map<String, Object> entity) throws BusinessException;
......@@ -31,6 +31,10 @@ public interface logDAO {
List<Map<String, Object>> list_reply(Map<String, Object> query) throws BusinessException;
int listCount_reply(Map<String, Object> query) throws BusinessException;
int list_count_reply(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> find_previous_log(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> find_next_log(Map<String, Object> query) throws BusinessException;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.log.logDAO">
<sql id="select_log_manage">
SELECT
manage.*, info1.real_name AS new_create,
info1.user_sex,post.COUNT,
info2.real_name AS new_update,
IFNULL(reply.reply_count, 0) AS REPLY_COUNT,
IFNULL(reply.reply_time, '暂无回复') AS LAST_REPLY_TIME
FROM log_manage manage
LEFT JOIN `uicm_user_info` info1 ON info1.user_id = manage.create_id
LEFT JOIN `uicm_user_info` info2 ON info2.user_id = manage.update_id
LEFT JOIN (
SELECT log_id,COUNT(*) AS reply_count,MAX(reply_time) AS reply_time
FROM log_reply
GROUP BY log_id
) reply ON manage.uuid = reply.log_id
LEFT JOIN (
SELECT create_id,COUNT(*) AS COUNT
FROM log_manage
GROUP BY create_id
) post ON post.create_id = manage.create_id
</sql>
<sql id="WHERE">
<where>
<trim prefixOverrides="and">
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
and manage.UUID = #{UUID}
</if>
<if test="LOG_TITLE != null and LOG_TITLE != ''">
and f.LOG_TITLE like concat('%',#{LOG_TITLE},'%')
and manage.LOG_TITLE like concat('%',#{LOG_TITLE},'%')
</if>
<if test="LOG_CONTENT != null and LOG_CONTENT != ''">
and f.LOG_CONTENT like concat('%',#{LOG_CONTENT},'%')
and manage.LOG_CONTENT like concat('%',#{LOG_CONTENT},'%')
</if>
<if test="CREATE_NAME != null and CREATE_NAME != ''">
and f.CREATE_NAME = #{CREATE_NAME}
and manage.CREATE_NAME = #{CREATE_NAME}
</if>
<if test="CREATE_ID != null and CREATE_ID != ''">
and f.CREATE_ID like concat('%',#{CREATE_ID},'%')
and manage.CREATE_ID = #{CREATE_ID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
and manage.CREATE_TIME = #{CREATE_TIME}
</if>
<if test="UPDATE_ID != null and UPDATE_ID != ''">
and f.UPDATE_ID like concat('%',#{UPDATE_ID},'%')
and manage.UPDATE_ID = #{UPDATE_ID}
</if>
<if test="UPDATE_TIME != null and UPDATE_TIME != ''">
and f.UPDATE_TIME = #{UPDATE_TIME}
and manage.UPDATE_TIME = #{UPDATE_TIME}
</if>
<if test="CREATE_IDS != null and CREATE_IDS != ''">
and manage.CREATE_ID IN
<foreach item="item" index="index" collection="CREATE_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="START_TIME != null and START_TIME != ''">
and manage.CREATE_TIME <![CDATA[ >= ]]> #{START_TIME}
</if>
<if test="END_TIME != null and END_TIME != ''">
and manage.CREATE_TIME <![CDATA[ <= ]]> #{END_TIME}
</if>
</trim>
</where>
</sql>
<sql id="where_log_reply">
<where>
<trim prefixOverrides="AND |OR">
<if test="REPLY_CONTENT != null and REPLY_CONTENT != ''">
and lr.REPLY_CONTENT like concat('%',#{REPLY_CONTENT},'%')
</if>
<if test="UUID != null and UUID != ''">
and lr.UUID = #{UUID}
</if>
<if test="LOG_ID != null and LOG_ID != ''">
and lr.LOG_ID = #{LOG_ID}
</if>
<if test="CREATE_ID != null and CREATE_ID != ''">
and lr.CREATE_ID = #{CREATE_ID}
</if>
</trim>
</where>
</sql>
<sql id="where_previous_log">
<where>
<trim prefixOverrides="and">
<if test="UUID != null and UUID != ''">
and manage.UUID <![CDATA[ <> ]]> #{UUID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and manage.CREATE_TIME <![CDATA[ >= ]]> #{CREATE_TIME}
</if>
<if test="CREATE_IDS != null and CREATE_IDS != ''">
and manage.CREATE_ID IN
<foreach item="item" index="index" collection="CREATE_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</trim>
</where>
</sql>
<sql id="where_next_log">
<where>
<trim prefixOverrides="and">
<if test="UUID != null and UUID != ''">
and manage.UUID <![CDATA[ <> ]]> #{UUID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and manage.CREATE_TIME <![CDATA[ <= ]]> #{CREATE_TIME}
</if>
<if test="CREATE_IDS != null and CREATE_IDS != ''">
and manage.CREATE_ID IN
<foreach item="item" index="index" collection="CREATE_IDS" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</trim>
</where>
......@@ -67,7 +155,7 @@
<delete id="delete_log" parameterType="list">
<![CDATA[
delete from LOG_MANAGE where UUID IN
delete from LOG_MANAGE where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
......@@ -91,9 +179,9 @@
<![CDATA[ ) ]]>
</insert>
<delete id="delete_byLogId" parameterType="list">
<delete id="delete_reply_by_logId" parameterType="list">
<![CDATA[
delete from LOG_REPLY where LOG_ID IN
delete from LOG_REPLY where LOG_ID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
......@@ -103,7 +191,7 @@
<delete id="delete_reply" parameterType="list">
<![CDATA[
delete from LOG_REPLY where UUID IN
delete from LOG_REPLY where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
......@@ -112,38 +200,83 @@
</delete>
<select id="list_log" parameterType="map" resultType="upperCaseKeyMap">
SELECT
manage.*,
info1.real_name new_create,
info2.real_name new_update,
reply.*
FROM
log_manage manage
LEFT JOIN `uicm_user_info` info1 ON info1.user_id = manage.create_id
LEFT JOIN `uicm_user_info` info2 ON info2.user_id = manage.update_id
LEFT JOIN ( SELECT log_id, count( * ) reply_count FROM log_reply GROUP BY
log_id ) reply ON manage.uuid = reply.log_id
<include refid="select_log_manage" />
<include refid="WHERE"></include>
order by CREATE_TIME DESC
order by
<choose>
<when test="orderByClause != null">
${orderByClause}
</when>
<otherwise>
CREATE_TIME DESC
</otherwise>
</choose>
</select>
<select id="listCount_log" parameterType="map" resultType="int">
SELECT count(*) FROM LOG_MANAGE f
<select id="list_count_log" parameterType="map" resultType="int">
SELECT COUNT(*)
FROM log_manage manage
LEFT JOIN `uicm_user_info` info1 ON info1.user_id = manage.create_id
LEFT JOIN `uicm_user_info` info2 ON info2.user_id = manage.update_id
LEFT JOIN (
SELECT log_id,count(*) as reply_count
FROM log_reply
GROUP BY log_id
) reply ON manage.uuid = reply.log_id
<include refid="WHERE"></include>
</select>
<select id="list_reply" parameterType="map" resultType="upperCaseKeyMap">
select *
from LOG_REPLY
where LOG_ID=#{LOG_ID}
order by CREATE_TIME
SELECT
lr.*, lm.log_title,
lm.create_time AS LOG_TIME,
uu2.USER_ID AS LOG_USER_ID,
uu2.USER_NAME AS LOG_USER_NAME,
uu1.USER_NAME AS REPLY_USER_NAME,uu1.USER_SEX
FROM log_reply lr
LEFT JOIN log_manage lm ON lr.log_id = lm.uuid
LEFT JOIN uicm_user uu1 ON lr.reply_user = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON lm.create_id = uu2.USER_ID
<include refid="where_log_reply" />
order by lr.REPLY_TIME ASC
</select>
<select id="listCount_reply" parameterType="map" resultType="int">
SELECT count(*) FROM LOG_REPLY
where LOG_ID=#{LOG_ID}
<select id="list_count_reply" parameterType="map" resultType="int">
SELECT COUNT(*)
FROM log_reply lr
LEFT JOIN log_manage lm ON lr.log_id = lm.uuid
LEFT JOIN uicm_user uu1 ON lr.create_id = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON lm.create_id = uu2.USER_ID
<include refid="where_log_reply" />
</select>
<select id="find_previous_log" parameterType="map" resultType="upperCaseKeyMap">
<include refid="select_log_manage" />
<include refid="where_previous_log" />
order by
<choose>
<when test="orderByClause != null">
${orderByClause}
</when>
<otherwise>
CREATE_TIME ASC
</otherwise>
</choose>
limit 0,1
</select>
<select id="find_next_log" parameterType="map" resultType="upperCaseKeyMap">
<include refid="select_log_manage" />
<include refid="where_next_log" />
order by
<choose>
<when test="orderByClause != null">
${orderByClause}
</when>
<otherwise>
CREATE_TIME DESC
</otherwise>
</choose>
limit 0,1
</select>
</mapper>
\ No newline at end of file
package com.jw.app.business.meeting;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
......@@ -13,6 +16,7 @@ import org.apache.ibatis.session.RowBounds;
import com.jw.app.business.MeetingBusiness;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit;
......@@ -55,31 +59,44 @@ public class MeetingBusinessImpl implements MeetingBusiness {
@Override
public void insert_check_in(Map<String, Object> entity) throws BusinessException {
List<Map<String, Object>> items = meetingDAO.list_check_in(entity);
if (items.size() == 0) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("PARTICIPANTS_ID", SessionUtil.getCode());
entity.put("PARTICIPANTS_NAME", SessionUtil.getEmname());
entity.put("CHECK_IN_TIME", new Date());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
List<Map<String, Object>> timeList = meetingDAO.list_checkTime(entity);
Map<String, Object> timeMap = timeList.get(0);
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
try {
Date startTime=sf.parse((String)timeMap.get("CHECK_START_TIME"));
Date endTime=sf.parse((String)timeMap.get("CHECK_END_TIME"));
Date thistime = new Date();
if (thistime.after(startTime) && thistime.before(endTime)) {
List<Map<String, Object>> items = meetingDAO.list_check_in(entity);
if (items.size() == 0) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("PARTICIPANTS_ID", SessionUtil.getCode());
entity.put("PARTICIPANTS_NAME", SessionUtil.getEmname());
entity.put("CHECK_IN_TIME", new Date());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
meetingDAO.insert_check_in(entity);
}
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
meetingDAO.insert_check_in(entity);
}
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
......@@ -173,10 +190,9 @@ public class MeetingBusinessImpl implements MeetingBusiness {
@Override
public List<Map<String, Object>> list_meeting(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "meeting" + query);
List<Map<String, Object>> list_data = null;
if (list_data == null || list_data.size() == 0) {
list_data = meetingDAO.list_meeting(query);
CacheKit.put("ehcache10", "kqmk" + query, list_data);
}
return list_data;
}
......
......@@ -30,5 +30,7 @@ public interface meetingDAO {
List<Map<String, Object>> list_check_in(Map<String, Object> query) throws BusinessException;
int listCount_check_in(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_checkTime(Map<String, Object> query) throws BusinessException;
}
......@@ -166,6 +166,12 @@
) f
<include refid="WHERE"></include>
</select>
<select id="list_checkTime" parameterType="map" resultType="upperCaseKeyMap">
select *
from MEETING_MANAGE
where UUID=#{MEETING_ID}
</select>
<select id="list_check_in" parameterType="map" resultType="upperCaseKeyMap">
select check_in.*,info.real_name,unit.name,info.telephone
......
......@@ -37,7 +37,7 @@ public class NoticeBusinessImpl implements NoticeBusiness {
if (query.get("USER_ID") == null || "".equals(query.get("USER_ID"))) {
// 默认查询当前登陆人
query.put("USER_ID", SessionUtil.getEmid());
query.put("USER_ID", SessionUtil.getCode());
}
// 计算起始记录
......@@ -61,12 +61,14 @@ public class NoticeBusinessImpl implements NoticeBusiness {
info.put("UUID", UUID.randomUUID().toString());
if (info.get("USER_ID") == null || "".equals(info.get("USER_ID"))) {
// 如果没有传USER_ID过来,则使用当前登录人id
info.put("USER_ID", SessionUtil.getEmid());
info.put("USER_ID", SessionUtil.getCode());
}
info.put("CREATE_ID", SessionUtil.getEmid());
info.put("CREATE_ID", SessionUtil.getCode());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_ID", SessionUtil.getEmid());
info.put("UPDATE_ID", SessionUtil.getCode());
info.put("UPDATE_TIME", new Date());
info.put("RELEASE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
Map<String, Object> field = new HashMap<String, Object>();
......@@ -100,9 +102,7 @@ public class NoticeBusinessImpl implements NoticeBusiness {
}
@Override
public void delete_notice(String uuid) throws BusinessException {
for (String u : uuid.split(",")) {
noticeDAO.delete_notice(u);
}
public void delete_notice(List<String> list) throws BusinessException {
noticeDAO.delete_notice(list);
}
}
......@@ -18,5 +18,5 @@ public interface noticeDAO {
void update_notice(Map<String, Object> info) throws BusinessException;
void delete_notice(String uuid) throws BusinessException;
void delete_notice(List<String> list) throws BusinessException;
}
......@@ -22,7 +22,11 @@
<select id="list_notice" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select * from notice t
select t.* ,
uu1.REAL_NAME AS CREATE_USER_NAME
from notice t
LEFT JOIN uicm_user_info uu1 ON t.CREATE_ID = uu1.USER_ID
]]>
<include refid="where" />
ORDER BY t.CREATE_TIME
......@@ -31,6 +35,7 @@
<select id="list_count_notice" parameterType="map" resultType="int">
<![CDATA[
select count(*) from notice t
LEFT JOIN uicm_user_info uu1 ON t.CREATE_ID = uu1.USER_ID
]]>
<include refid="where" />
ORDER BY t.CREATE_TIME
......@@ -63,6 +68,12 @@
</update>
<delete id="delete_notice" parameterType="String">
delete from notice where UUID=#{uuid}
<![CDATA[
delete from notice where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -136,16 +136,6 @@ public class AppsRoleBusinessImpl implements PortalAppsRoleBusiness {
@Override
public void saveUserByRoleId(String roleId, String users) throws BusinessException {
// 查询该角色下原本有的人员
Map<String, Object> query = new HashMap<String, Object>();
query.put("ROLE_ID", roleId);
List<Map<String, Object>> listUsersOld = appsRoleDAO.list_all_user_by_roleId(query);
// 查询该角色用于哪些app
Map<String, Object> query2 = new HashMap<String, Object>();
query2.put("G_ID", roleId);
List<Map<String, Object>> listApp = appsDAO.list_app(query2);
// 删除原先该角色下所有的用户
appsRoleDAO.delete_apps_role_user_by_roleId(roleId);
......@@ -174,82 +164,8 @@ public class AppsRoleBusinessImpl implements PortalAppsRoleBusiness {
appsRoleDAO.insert_apps_role_user(info);
}
}
if (arrayUser == null) {
arrayUser = new String[] {};
}
// 获取少了哪些用户
List<String> listLessUser = new ArrayList<String>();
outer: for (Map<String, Object> user : listUsersOld) {
for (String userId : arrayUser) {
if (userId.equals(user.get("USER_ID"))) {
continue outer;
}
}
listLessUser.add(user.get("USER_ID").toString());
}
// 获取多了哪些用户
List<String> listMuchUser = new ArrayList<String>();
outer: for (String userId : arrayUser) {
for (Map<String, Object> user : listUsersOld) {
if (userId.equals(user.get("USER_ID"))) {
continue outer;
}
}
listMuchUser.add(userId);
}
// 循环遍历这些app,如果这些app是默认需要安装的,则给多了的用户添加安装数据
List<String> listAppId = new ArrayList<String>();
for (Map<String, Object> app : listApp) {
listAppId.add(app.get("APP_ID").toString());
// 判断是否需要默认安装
if ("1".equals(app.get("IS_DEFAULT"))) {
// 需要安装
for (String userId : listMuchUser) {
Map<String, Object> entityNew = new HashMap<String, Object>();
entityNew.put("APP_ID", app.get("APP_ID").toString());
entityNew.put("USERID", userId);
insert_install(entityNew);
}
}
}
// 删除少了的用户对应这些app的安装记录
Map<String, Object> query4 = new HashMap<String, Object>();
query4.put("USERIDS", listLessUser);
query4.put("APP_IDS", listAppId);
appsDAO.delete_install_app_byuser(query4);
}
private void insert_install(Map<String, Object> entity) throws BusinessException {
if (entity.get("RESOURCE_ID") == null) {
entity.put("RESOURCE_ID", java.util.UUID.randomUUID().toString());
}
if (entity.get("USERID") == null) {
entity.put("USERID", SessionUtil.getCode());
}
if (entity.get("INSTALL_TIME") == null) {
entity.put("INSTALL_TIME", new Date());
}
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
appsDAO.insert_install(entity);
}
//
}
}
......@@ -66,7 +66,7 @@
delete from apps_role where
UUID in
<trim prefix="(" suffix=")" suffixOverrides=",">
<foreach collection="uuids" item="uuid">
<foreach collection="list" item="uuid">
#{uuid},
</foreach>
</trim>
......
......@@ -16,7 +16,6 @@ import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Encipher;
import com.gaowj.business.util.SessionUtil;
import com.jw.app.business.PortletBusiness;
import com.jw.app.business.utils.DateTools;
import com.jw.app.business.utils.QueryParamUtil;
public class PortletBusinessImpl implements PortletBusiness {
......
......@@ -169,6 +169,9 @@ from UICM_UNIT f where 1=1
<if test="END_ORDER != null and END_ORDER != ''">
and f.ORDER_ID &lt;= #{END_ORDER}
</if>
<if test="NOT_NULL != null and NOT_NULL != ''">
and f.${NOT_NULL} is NOT NULL
</if>
order by f.ORDER_ID,f.ID_NUMBER
</select>
......
package com.jw.app.business.bgmk;
package com.jw.app.business.workreport;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
......@@ -10,50 +12,43 @@ import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.BgmkBusiness;
import com.jw.app.business.WorkreportBusiness;
import com.jw.app.business.utils.QueryParamUtil;
public class BgmkBusinessImpl implements BgmkBusiness {
public class WorkreportBusinessImpl implements WorkreportBusiness {
private bgmkDAO bgmkDAO;
public bgmkDAO getBgmkDAO() {
return bgmkDAO;
private workreportDAO workreportDAO;
public workreportDAO getWorkreportDAO() {
return workreportDAO;
}
public void setBgmkDAO(bgmkDAO bgmkDAO) {
this.bgmkDAO = bgmkDAO;
public void setWorkreportDAO(workreportDAO workreportDAO) {
this.workreportDAO = workreportDAO;
}
@Override
public void insert_bgmk(Map<String, Object> entity) throws BusinessException {
public void insert_work_report(Map<String, Object> entity) throws BusinessException {
if(entity.get("UUID")==null){
entity.put("UUID", java.util.UUID.randomUUID().toString());
}
if(entity.get("USER_ID")==null){
entity.put("USER_ID", SessionUtil.getCode());
if (entity.get("CREATE_ID") == null) {
entity.put("CREATE_ID", SessionUtil.getCode());
}
if(entity.get("DEPT_ID")==null){
entity.put("DEPT_ID", SessionUtil.getEmdepart());
}
if(entity.get("CREATE_TIME")==null){
if (entity.get("CREATE_TIME") == null) {
entity.put("CREATE_TIME", new Date());
}
if(entity.get("USER_NAME")==null){
entity.put("USER_NAME", SessionUtil.getCode());
if (entity.get("UPDATE_ID") == null) {
entity.put("UPDATE_ID", SessionUtil.getCode());
}
if(entity.get("CREATOR_ID")==null){
entity.put("CREATOR_ID", SessionUtil.getCode());
if (entity.get("UPDATE_TIME") == null) {
entity.put("UPDATE_TIME", new Date());
}
if(entity.get("DEPT_NAME")==null){
entity.put("DEPT_NAME", SessionUtil.getEmdepartname());
if(entity.get("REPORT_USER") == null){
entity.put("REPORT_USER", SessionUtil.getCode());
}
//动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
......@@ -67,11 +62,18 @@ public class BgmkBusinessImpl implements BgmkBusiness {
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
bgmkDAO.insert_bgmk(entity);
workreportDAO.insert_work_report(entity);
}
}
@Override
public void update_bgmk(Map<String, Object> entity) throws BusinessException {
public void update_work_report(Map<String, Object> entity) throws BusinessException {
if (entity.get("UPDATE_TIME") == null) {
entity.put("UPDATE_TIME", new Date());
}
if (entity.get("UPDATE_ID") == null) {
entity.put("UPDATE_ID", SessionUtil.getCode());
}
//动态传值修改
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>();
if(entity.keySet()!=null){
......@@ -87,29 +89,36 @@ public class BgmkBusinessImpl implements BgmkBusiness {
}
entity.put("info", updateList);
//
bgmkDAO.update_bgmk(entity);
workreportDAO.update_work_report(entity);
}
}
@Override
public void delete_bgmk(List<String> list) throws BusinessException {
bgmkDAO.delete_bgmk(list);
public void delete_work_report(List<String> list) throws BusinessException {
workreportDAO.delete_work_report(list);
}
@Override
public void resume_work_report(List<String> listKey) {
workreportDAO.resume_work_report(listKey);
}
@Override
public void delete_true_work_report(List<String> listKey) {
workreportDAO.delete_true_work_report(listKey);
}
//管理类报工
@Override
public Page<Map<String, Object>> list_bgmk(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
public Page<Map<String, Object>> list_work_report(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
//计算起始记录
int pageStart = (pageNo - 1) * pageSize;
//获取列表
List<Map<String, Object>> items = bgmkDAO.list_bgmk(new RowBounds(pageStart, pageSize), query);
List<Map<String, Object>> items = workreportDAO.list_work_report(new RowBounds(pageStart, pageSize), query);
//获取列表个数
int count = listCount_bgmk(query);
int count = workreportDAO.list_count_work_report(query);
//创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
......@@ -121,56 +130,24 @@ public class BgmkBusinessImpl implements BgmkBusiness {
}
@Override
public List<Map<String, Object>> list_bgmk(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "bgmk"+query);
if(list_data==null || list_data.size()==0){
list_data=bgmkDAO.list_bgmk(query);
CacheKit.put("ehcache10", "bgmk"+query, list_data);
public List<Map<String, Object>> list_work_report(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> listData = null;
try {
listData = QueryParamUtil.ClobToString(workreportDAO.list_work_report(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return list_data;
return listData;
}
@Override
public int listCount_bgmk(Map<String, Object> query) throws BusinessException {
return bgmkDAO.listCount_bgmk(query);
public int list_count_work_report(Map<String, Object> query) {
int count = workreportDAO.list_count_work_report(query);
return count;
}
//个人报工
@Override
public Page<Map<String, Object>> list_bgmk_employee(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
query.put("USER_NAME", SessionUtil.getEmid());
//计算起始记录
int pageStart = (pageNo - 1) * pageSize;
//获取列表
List<Map<String, Object>> items = bgmkDAO.list_bgmk(new RowBounds(pageStart, pageSize), query);
//获取列表个数
int count = listCount_bgmk_employee(query);
//创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public List<Map<String, Object>> list_bgmk_employee(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "bgmk_employee"+query);
if(list_data==null || list_data.size()==0){
list_data=bgmkDAO.list_bgmk(query);
CacheKit.put("ehcache10", "bgmk_employee"+query, list_data);
}
return list_data;
}
@Override
public int listCount_bgmk_employee(Map<String, Object> query) throws BusinessException {
return bgmkDAO.listCount_bgmk(query);
}
}
package com.jw.app.business.workreport;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface workreportDAO {
void insert_work_report(Map<String,Object> entity) throws BusinessException ;
void update_work_report(Map<String,Object> entity) throws BusinessException ;
void delete_work_report(List<String> list) throws BusinessException;
void resume_work_report(List<String> list) throws BusinessException;
void delete_true_work_report(List<String> list) throws BusinessException;
List<Map<String,Object>> list_work_report(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_work_report(Map<String,Object> query) throws BusinessException ;
int list_count_work_report(Map<String, Object> query) throws BusinessException ;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.bgmk.bgmkDAO">
<sql id="where_bg">
<mapper namespace="com.jw.app.business.workreport.workreportDAO">
<sql id="where_report">
<where>
<trim prefixOverrides="AND |OR">
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USER_NAME != null and USER_NAME != ''">
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID}
</if>
<if test="DEPT_NAME != null and DEPT_NAME != ''">
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if test="CONTENT != null and CONTENT != ''">
and f.CONTENT = #{CONTENT}
</if>
<if test="GZYS != null and GZYS != ''">
and f.GZYS = #{GZYS}
</if>
<if test="BG_TIME != null and BG_TIME != ''">
and f.BG_TIME = #{BG_TIME}
</if>
<if test="BG_TYPE != null and BG_TYPE != ''">
and f.BG_TYPE = #{BG_TYPE}
</if>
<if test="USER_TYPE != null and USER_TYPE != ''">
and f.USER_TYPE = #{USER_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID}
and wr.UUID = #{UUID}
</if>
<if test="REPORT_USER != null and REPORT_USER != ''">
and wr.REPORT_USER = #{REPORT_USER}
</if>
<if test="REPORT_PROJECT != null and REPORT_PROJECT != ''">
and wr.REPORT_PROJECT = #{REPORT_PROJECT}
</if>
<if test="REPORT_THEME != null and REPORT_THEME != ''">
and wr.REPORT_THEME like concat('%',#{REPORT_THEME},'%')
</if>
<if test="START_TIME != null and START_TIME != ''">
and wr.CREATE_TIME <![CDATA[ >= ]]> #{START_TIME}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
<if test="END_TIME != null and END_TIME != ''">
and wr.CREATE_TIME <![CDATA[ <= ]]> #{END_TIME}
</if>
<if test="DELETE_FLAG != null and DELETE_FLAG != ''">
and wr.DELETE_FLAG = #{DELETE_FLAG}
</if>
<if test="REPORT_USER_NAME != null and REPORT_USER_NAME != ''">
and uu1.USER_NAME like concat('%',#{REPORT_USER_NAME},'%')
</if>
<if test="REPORT_TIME_FLAG != null and REPORT_TIME_FLAG != '' and REPORT_TIME_FLAG == 'YEAR'">
and wr.REPORT_TIME BETWEEN(SELECT DATE_ADD(NOW(),INTERVAL-1 YEAR)) AND NOW()
</if>
<if test="REPORT_TIME_FLAG != null and REPORT_TIME_FLAG != '' and REPORT_TIME_FLAG == 'MONTH'">
and wr.REPORT_TIME BETWEEN(SELECT DATE_ADD(NOW(),INTERVAL-1 MONTH)) AND NOW()
</if>
<if test="REPORT_TIME_FLAG != null and REPORT_TIME_FLAG != '' and REPORT_TIME_FLAG == 'DAY'">
and wr.REPORT_TIME BETWEEN(SELECT DATE_ADD(NOW(),INTERVAL-1 DAY)) AND NOW()
</if>
<if test="REPORT_TIME_FLAG != null and REPORT_TIME_FLAG != '' and REPORT_TIME_FLAG == 'WEEK'">
and wr.REPORT_TIME BETWEEN(SELECT DATE_ADD(NOW(),INTERVAL-1 WEEK)) AND NOW()
</if>
</trim>
</where>
</sql>
<select id="list_work_report" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
SELECT
wr.*, uu1.USER_NAME AS REPORT_USER_NAME,
uu2.USER_NAME AS CREATE_USER_NAME,
uu3.USER_NAME AS UPDATE_USER_NAME
FROM
work_report wr
LEFT JOIN uicm_user uu1 ON wr.REPORT_USER = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON wr.CREATE_ID = uu2.USER_ID
LEFT JOIN uicm_user uu3 ON wr.UPDATE_ID = uu3.USER_ID
]]>
<include refid="where_report" />
order by wr.CREATE_TIME DESC
</select>
<insert id="insert_bgmk" parameterType="map">
insert into WORK_BG(
<select id="list_count_work_report" parameterType="map" resultType="int">
<![CDATA[
SELECT COUNT(*)
FROM
work_report wr
LEFT JOIN uicm_user uu1 ON wr.REPORT_USER = uu1.USER_ID
LEFT JOIN uicm_user uu2 ON wr.CREATE_ID = uu2.USER_ID
LEFT JOIN uicm_user uu3 ON wr.UPDATE_ID = uu3.USER_ID
]]>
<include refid="where_report" />
</select>
<insert id="insert_work_report" parameterType="map">
insert into work_report(
<trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key">
${key},
......@@ -62,9 +88,9 @@
<![CDATA[ ) ]]>
</insert>
<update id="update_bgmk" parameterType="map">
<update id="update_work_report" parameterType="map">
<![CDATA[
update WORK_BG set
update work_report set
]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="info" item="info">
......@@ -74,35 +100,34 @@
<where>
<if test="UUID != null and UUID != ''">
and UUID = #{UUID}
</if>
</if>
</where>
</update>
<delete id="delete_work_report" parameterType="list">
<![CDATA[
update work_report set DELETE_FLAG = '1' where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator="," close=")">
#{UUID}
</foreach>
</delete>
<delete id="delete_bgmk" parameterType="list">
<delete id="resume_work_report" parameterType="list">
<![CDATA[
delete from WORK_BG where UUID IN
update work_report set DELETE_FLAG = '0' where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
<foreach collection="list" item="UUID" open="(" separator="," close=")">
#{UUID}
</foreach>
</delete>
<select id="list_bgmk" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select f.*
from WORK_BG f where 1=1
]]>
<include refid="where_bg" />
order by f.CREATE_TIME DESC
</select>
<select id="listCount_bgmk" parameterType="map" resultType="int">
<![CDATA[
select count(*) c from WORK_BG f where 1=1
]]>
<include refid="where_bg" />
</select>
<delete id="delete_true_work_report" parameterType="list">
<![CDATA[
delete from work_report where DELETE_FLAG = '1' and UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator="," close=")">
#{UUID}
</foreach>
</delete>
</mapper>
\ No newline at end of file
package com.jw.app.forum.topic.action;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
......@@ -85,8 +86,14 @@ public class actAction extends BasicAction {
entity = QueryParamUtil.StringToDate(entity);
// 去除不要更新的字段
entity.remove("OPETYPE");
Set<String> titleSet = SensitivewordUtil.getSensitiveWord(entity.get("TITLE").toString(), 2);
Set<String> contentSet = SensitivewordUtil.getSensitiveWord(entity.get("CONTENT").toString(), 2);
Set<String> titleSet = new HashSet<String>();
Set<String> contentSet = new HashSet<String>();
if(entity.get("TITLE") != null){
titleSet = SensitivewordUtil.getSensitiveWord(entity.get("TITLE").toString(), 2);
}
if(entity.get("CONTENT") != null){
contentSet = SensitivewordUtil.getSensitiveWord(entity.get("CONTENT").toString(), 2);
}
if (titleSet.size() > 0 || contentSet.size() > 0) {
Map<String, Object> map = Status.getStatusErrorMessage("存在敏感词,保存失败");
Map<String, Object> errorInfo = new HashMap<String, Object>();
......@@ -128,7 +135,7 @@ public class actAction extends BasicAction {
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteTopic", "" + ListKey, "软删除版块信息", deletekey, "多个流水号", "topic");
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("软删除失败"));
e.printStackTrace();
......@@ -233,7 +240,7 @@ public class actAction extends BasicAction {
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteTopicReply", "" + ListKey, "软删除版块信息", deletekey, "多个流水号", "topic");
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("软删除失败"));
e.printStackTrace();
......
......@@ -59,10 +59,10 @@ public class dataAction extends BasicAction {
*/
public String listTopic() throws BusinessException {
ForumTopicBusiness business = BusinessManager.getBusiness(ForumTopicBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.listTopic(pageNo,pageSize, query);
Page<Map<String, Object>> pageRows = business.listTopic(pageNo, pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(pageRows.getItems()));
......@@ -91,7 +91,7 @@ public class dataAction extends BasicAction {
public String listTopicAll() throws BusinessException {
ForumTopicBusiness business = BusinessManager.getBusiness(ForumTopicBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listData = business.listTopic(query);
int listDataCount = listData.size();
......
package com.jw.app.friendlink.action;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gaowj.business.StudentBusiness;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
......@@ -28,7 +31,7 @@ public class actAction extends BasicAction {
}
/**
* 保存友情链接信息
* 保存快速链接信息
*
* @return
* @throws BusinessException
......@@ -55,15 +58,19 @@ public class actAction extends BasicAction {
}
/**
* 删除友情链接信息
* 删除快速链接信息
*
* @return
* @throws BusinessException
*/
public String removeFriendLinkInfo() throws BusinessException {
FriendLinkBusiness business = BusinessManager.getBusiness(FriendLinkBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_friendlink(RequestUtils.getString(request, "UUID"));
business.delete_friendlink(ListKey);
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
......
......@@ -3,10 +3,6 @@ package com.jw.app.log.action;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.jw.app.business.LogBusiness;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
......@@ -14,7 +10,9 @@ import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.Status;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.LogBusiness;
import net.sf.json.JSONObject;
public class actAction extends BasicAction {
private static final long serialVersionUID = -4469183762817854794L;
......@@ -35,18 +33,15 @@ public class actAction extends BasicAction {
* @throws BusinessException
*/
public String insertLog() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
// 去除不要更新的字段
entity.remove("OPETYPE");
// 新增
business.insert_log(entity);
// 操作日志
// sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
......@@ -61,35 +56,26 @@ public class actAction extends BasicAction {
}
/**
* 插入
*
* 插入回复
* @param entity
* @throws BusinessException
*/
public String insertReply() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
// 去除不要更新的字段
entity.remove("OPETYPE");
// 新增
business.insert_reply(entity);
// 操作日志
// sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertReply", "" + entity, "增加测试数据", (String) entity.get("UUID"),
(String) entity.get("CREATE_NAME"), "logdemo1");
Map<String, Object> result = Status.getStatusSuccessMessage("保存成功");
result.put("UUID", entity.get("UUID"));
result.put("REPLY_NAME", entity.get("REPLY_NAME"));
result.put("CODE", entity.get("CODE"));
result.put("REPLY_CONTENT", entity.get("REPLY_CONTENT"));
jsonObject.putAll(result);
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
......@@ -104,11 +90,9 @@ public class actAction extends BasicAction {
* @throws BusinessException
*/
public String updateLog() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
// 去除不要更新的字段
entity.remove("OPETYPE");
// 修改
......@@ -127,20 +111,19 @@ public class actAction extends BasicAction {
}
/**
* 在软删除基础上删除记录
* 删除日志
*
* @param entity
* @throws BusinessException
*/
public String deleteLog() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_log(ListKey);
business.delete_reply_by_logId(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteLog", "" + ListKey, "删除测试数据", deletekey, "多个流水号", "logdemo1");
......@@ -153,18 +136,16 @@ public class actAction extends BasicAction {
}
/**
* 在软删除基础上删除记录
* 删除日志回复
*
* @param entity
* @throws BusinessException
*/
public String deleteReply() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_reply(ListKey);
// 操作日志
......
......@@ -6,48 +6,49 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import com.jw.app.business.LogBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.util.TestMd5;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.LogBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction {
private static final long serialVersionUID = 4416458722090020762L;
/**
*
*/
private static final long serialVersionUID = 130092601374320487L;
private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
public int getRows() {
rows = getPageSize();
return rows;
}
public void setRows(int rows) {
this.rows = rows;
setPageSize(rows);
this.rows = getPageSize();
}
public int getPage() {
page = getPageNo();
return page;
}
public void setPage(int page) {
this.page = page;
setPageNo(page);
this.page = getPageNo();
}
/**
......@@ -91,34 +92,8 @@ public class dataAction extends BasicAction {
public String listAll() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
try {
// 表示获取前台表单提交的所有"FIELD_"开始的键值数据,例如FIELD_NAME,FIELD_CODE....
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
// 把前端传进来的字符型时间数据例 如DATE_2018-09-09转换成DATE型的时间数据。
// 主要和前端is_entity.FIELD_CREATE_TIME =
// strToDateObj(is_entity.FIELD_CREATE_TIME)配对使用。
// 前端提交前strToDateObj方法会把时间处理成DATE_2018-09-09再提交
query = QueryParamUtil.StringToDate(query);
// session工具
String code = SessionUtil.getCode();// 当前用户ID
String emid = SessionUtil.getEmid();// 当前用户帐号
String emname = SessionUtil.getEmname();// 当前用户名称
String emdepart = SessionUtil.getEmdepart();// 当前用户部门id
String emdepartname = SessionUtil.getEmdepartname();// 当前用户部门名称
String emsex = SessionUtil.getEmsex();// 当前用户性别
String loginip = SessionUtil.getLoginip();// 当前用户登录IP
String clientip = SessionUtil.getClientIp();// 获取客户端IP
String quanxian = SessionUtil.getQuanxian();// 获取当前用户使用模块清单
String sessionid = SessionUtil.getSessionid();// 获取当前用户sessionID
String currenttimme = SessionUtil.getCurrenttime();// 当前用户本次登录时间
String beforetime = SessionUtil.getBeforetime();// 当前用户上次登录时间
// 配置文件工具
// 表示获取src目录下quartz_service.properties文件中主键是login_main_url的值
String tt = PropUtil.getValue("login_main_url", "quartz_service", "");
List<Map<String, Object>> listData = business.list_log(query);
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
......@@ -140,7 +115,7 @@ public class dataAction extends BasicAction {
return "json";
}
public String listItem() throws BusinessException {
public String listReply() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
......@@ -156,9 +131,67 @@ public class dataAction extends BasicAction {
data.put("total", pageRows.getCount());
jsonObject = new JSONObject();
jsonObject.putAll(data);
// List<Map<String, Object>> listItems = business.list_reply(query);
// jsonObject = new JSONObject();
// jsonObject.put("listItems", listItems);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
public String listReplyAll() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listData = business.list_reply(query);
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(listData));
data.put("pageNo", 1);
data.put("pageSize", listDataCount);
data.put("pageCount", listDataCount);
data.put("rows", data.get("rowSet"));
data.put("total", listDataCount);
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
public String findPreviousLog() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listData = business.find_previous_log(query);
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
data.put("data", QueryParamUtil.DateTimeToString(listData));
data.put("total", listDataCount);
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
public String findNextLog() throws BusinessException {
LogBusiness business = BusinessManager.getBusiness(LogBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listData = business.find_next_log(query);
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
data.put("data", QueryParamUtil.DateTimeToString(listData));
data.put("total", listDataCount);
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
......
......@@ -19,13 +19,9 @@ public class viewAction extends BasicAction {
return "logTabDetail";
}
public String replyTabDetail() throws BusinessException {
public String replyTab() throws BusinessException {
Map<String, Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "replyTabDetail";
}
public String replyTab() throws BusinessException {
return "replyTab";
}
......
package com.jw.app.notice.action;
import java.util.List;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
......@@ -59,8 +60,11 @@ public class actAction extends BasicAction {
*/
public String removeNoticeInfo() throws BusinessException {
NoticeBusiness business = BusinessManager.getBusiness(NoticeBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_notice(RequestUtils.getString(request, "UUID"));
business.delete_notice(ListKey);
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
......
package com.jw.app.bgmk;
package com.jw.app.workreport.action;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
......@@ -13,13 +10,17 @@ import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.Status;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.BgmkBusiness;
import com.jw.app.business.WorkreportBusiness;
public class actAction extends BasicAction {
import net.sf.json.JSONObject;
private static final long serialVersionUID = -2059356249335526616L;
public class actAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -1914472565949102994L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
......@@ -35,25 +36,20 @@ public class actAction extends BasicAction {
* @param entity
* @throws BusinessException
*/
public String insertBgmk() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
public String insertWorkReport() throws BusinessException {
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
//去除不要更新的字段
entity.remove("OPETYPE");
//新增
business.insert_bgmk(entity);
business.insert_work_report(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertBgmk", "" + entity,
"增加报工数据", (String) entity.get("UUID"), (String) entity.get("NAME"), "bgmkdemo1");
sysbusiness.insert_logBusiness("insertWorkReport", "" + entity,
"增加报工数据", (String) entity.get("UUID"), (String) entity.get("REPORT_THEME"), "workReport");
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
......@@ -68,21 +64,19 @@ public class actAction extends BasicAction {
* @param entity
* @throws BusinessException
*/
public String updateBgmk() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
public String updateWorkReport() throws BusinessException {
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
//去除不要更新的字段
entity.remove("OPETYPE");
//修改
entity = QueryParamUtil.StringToDate(entity);
business.update_bgmk(entity);
//去除不要更新的字段
entity.remove("OPETYPE");
business.update_work_report(entity);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateBgmk", "" + entity,
"修改报工数据",(String) entity.get("UUID"), (String) entity.get("NAME"),"bgmkdemo1");
sysbusiness.insert_logBusiness("updateWorkReport", "" + entity,
"修改报工数据",(String) entity.get("UUID"), (String) entity.get("REPORT_THEME"),"workReport");
//
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) {
......@@ -93,25 +87,71 @@ public class actAction extends BasicAction {
}
/**
* 在软删除基础上删除记录
* 软删除
* @param entity
* @throws BusinessException
*/
public String deleteBgmk() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
public String deleteWorkReport() throws BusinessException {
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_bgmk(ListKey);
business.delete_work_report(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteBgmk", "" + ListKey,
"删除报工数据", deletekey, "多个流水号","bgmkdemo1");
sysbusiness.insert_logBusiness("deleteWorkReport", "" + ListKey,
"软删除报工数据", deletekey, "多个流水号","workReport");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
e.printStackTrace();
}
return "json";
}
/**
* 恢复删除
* @param entity
* @throws BusinessException
*/
public String resumeWorkReport() throws BusinessException {
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.resume_work_report(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("resumeWorkReport", "" + ListKey, "恢复报工信息", deletekey, "多个流水号",
"workReport");
//
jsonObject.putAll(Status.getStatusSuccessMessage("恢复成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("恢复失败"));
e.printStackTrace();
}
return "json";
}
/**
* 在软删除基础上删除记录
* @param entity
* @throws BusinessException
*/
public String deleteTrueWorkReport() throws BusinessException {
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_true_work_report(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteTrueWorkReport", "" + ListKey, "删除", deletekey, "多个流水号",
"workReport");
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
......
package com.jw.app.bgmk;
package com.jw.app.workreport.action;
import java.sql.SQLException;
import java.text.ParseException;
......@@ -6,33 +6,26 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.util.TestMd5;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.BgmkBusiness;
import com.jw.app.business.WorkreportBusiness;
public class dataAction extends BasicAction{
import net.sf.json.JSONObject;
private static final long serialVersionUID = 8400799803941083524L;
private static final String console = null;
public class dataAction extends BasicAction{
/**
*
*/
private static final long serialVersionUID = -3477428711726942671L;
private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页
public JSONObject getJsonObject() {
return jsonObject;
}
......@@ -40,32 +33,39 @@ public class dataAction extends BasicAction{
this.jsonObject = jsonObject;
}
public int getRows() {
rows = getPageSize();
return rows;
}
public void setRows(int rows) {
this.rows = rows;
setPageSize(rows);
this.rows = getPageSize();
}
public int getPage() {
page = getPageNo();
return page;
}
public void setPage(int page) {
this.page = page;
setPageNo(page);
this.page = getPageNo();
}
/**
* 获取管理报工记录
* 获取分页记录
* @param entity
* @throws BusinessException
*/
public String list() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_bgmk(pageNo,pageSize, query);
Page<Map<String, Object>> pageRows = business.list_work_report(pageNo, pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(pageRows.getItems()));
data.put("rowSet", QueryParamUtil.DateToString(pageRows.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
......@@ -84,24 +84,24 @@ public class dataAction extends BasicAction{
}
/**
* 获取员工报工记录
* 获取所有记录
* @param entity
* @throws BusinessException
*/
public String listEmployee() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
public String listAll() throws BusinessException {
WorkreportBusiness business = BusinessManager.getBusiness(WorkreportBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_bgmk_employee(pageNo,pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
List<Map<String, Object>> listData = business.list_work_report(query);
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(pageRows.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rowSet", QueryParamUtil.DateToString(listData));
data.put("pageNo", 1);
data.put("pageSize", listDataCount);
data.put("pageCount", listDataCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageRows.getCount());
data.put("total", listDataCount);
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
......@@ -113,6 +113,4 @@ public class dataAction extends BasicAction{
}
return "json";
}
}
package com.jw.app.workreport.action;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -6347722682589304167L;
public String workReportTab() throws BusinessException{
return "workReportTab";
}
public String workReportTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "workReportTabDetail";
}
}
......@@ -2,20 +2,19 @@ package com.gaowj.standard.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import com.gaowj.business.StandardBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.StandardBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction{
......@@ -246,4 +245,4 @@ public class dataAction extends BasicAction{
return "json";
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment