Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
管理员
jfV5portal
Commits
091450a7
Commit
091450a7
authored
Sep 17, 2018
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报工更新
parent
cd545fd9
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
652 additions
and
731 deletions
+652
-731
business-apps.xml
WebContent/WEB-INF/conf/gaowj/bl/business-apps.xml
+10
-9
icon.css
...tent/gaowj/ria/jquery/jquery-easyui-1.4.1/themes/icon.css
+7
-0
bgmkEmployeeTab.jsp
WebContent/jwapp/pages/bgmk/bgmkEmployeeTab.jsp
+0
-19
bgmkTabDetail.jsp
WebContent/jwapp/pages/bgmk/bgmkTabDetail.jsp
+0
-45
bgmkTabEmployeeDetail.jsp
WebContent/jwapp/pages/bgmk/bgmkTabEmployeeDetail.jsp
+0
-45
bgmkEmployeeTab.js
WebContent/jwapp/pages/bgmk/js/bgmkEmployeeTab.js
+0
-228
workReportModule.js
WebContent/jwapp/pages/workreport/js/workReportModule.js
+13
-9
workReportTab.js
WebContent/jwapp/pages/workreport/js/workReportTab.js
+212
-42
workReportTab.jsp
WebContent/jwapp/pages/workreport/workReportTab.jsp
+11
-9
workReportTabDetail.jsp
WebContent/jwapp/pages/workreport/workReportTabDetail.jsp
+49
-0
struts-ext.xml
src/struts-ext.xml
+16
-15
viewAction.java
src_jwapp/com/jw/app/bgmk/viewAction.java
+0
-38
WorkreportBusiness.java
src_jwapp/com/jw/app/business/WorkreportBusiness.java
+21
-27
bgmkDAO.java
src_jwapp/com/jw/app/business/bgmk/bgmkDAO.java
+0
-26
WorkreportBusinessImpl.java
...om/jw/app/business/workreport/WorkreportBusinessImpl.java
+62
-85
workreportDAO.java
src_jwapp/com/jw/app/business/workreport/workreportDAO.java
+27
-0
workreportDAO.xml
src_jwapp/com/jw/app/business/workreport/workreportDAO.xml
+89
-62
actAction.java
src_jwapp/com/jw/app/workreport/action/actAction.java
+76
-36
dataAction.java
src_jwapp/com/jw/app/workreport/action/dataAction.java
+34
-36
viewAction.java
src_jwapp/com/jw/app/workreport/action/viewAction.java
+25
-0
No files found.
WebContent/WEB-INF/conf/gaowj/bl/business-apps.xml
View file @
091450a7
...
@@ -22,8 +22,8 @@
...
@@ -22,8 +22,8 @@
<value>
classpath:com/jw/app/business/calendar/calendarDAO.xml
</value>
<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/portal/role/appsRoleDAO.xml
</value>
<value>
classpath:com/jw/app/business/vote/voteDAO.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/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/friendlink/friendlinkDAO.xml
</value>
<value>
classpath:com/jw/app/business/notice/noticeDAO.xml
</value>
<value>
classpath:com/jw/app/business/notice/noticeDAO.xml
</value>
<value>
classpath:com/jw/app/business/todo/TodoDAO.xml
</value>
<value>
classpath:com/jw/app/business/todo/TodoDAO.xml
</value>
...
@@ -99,10 +99,6 @@
...
@@ -99,10 +99,6 @@
<property
name=
"mapperInterface"
value=
"com.jw.app.business.attendance.attendanceDAO"
/>
<property
name=
"mapperInterface"
value=
"com.jw.app.business.attendance.attendanceDAO"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-apps"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-apps"
/>
</bean>
</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"
>
<bean
id=
"friendlinkDAO"
class=
"org.mybatis.spring.mapper.MapperFactoryBean"
>
<property
name=
"mapperInterface"
value=
"com.jw.app.business.friendlink.friendlinkDAO"
/>
<property
name=
"mapperInterface"
value=
"com.jw.app.business.friendlink.friendlinkDAO"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-apps"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-apps"
/>
...
@@ -135,6 +131,11 @@
...
@@ -135,6 +131,11 @@
<property
name=
"mapperInterface"
value=
"com.jw.app.business.forum.word.wordDAO"
/>
<property
name=
"mapperInterface"
value=
"com.jw.app.business.forum.word.wordDAO"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-apps"
/>
<property
name=
"sqlSessionFactory"
ref=
"sqlSessionFactory-apps"
/>
</bean>
</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 -->
<!-- BusinessInterFace -->
<bean
id=
"PortletBusiness"
<bean
id=
"PortletBusiness"
class=
"com.jw.app.business.portlet.PortletBusinessImpl"
>
class=
"com.jw.app.business.portlet.PortletBusinessImpl"
>
...
@@ -192,10 +193,6 @@
...
@@ -192,10 +193,6 @@
<property
name=
"attendanceDAO"
ref=
"attendanceDAO"
/>
<property
name=
"attendanceDAO"
ref=
"attendanceDAO"
/>
</bean>
</bean>
<bean
id=
"BgmkBusiness"
class=
"com.jw.app.business.bgmk.BgmkBusinessImpl"
>
<property
name=
"bgmkDAO"
ref=
"bgmkDAO"
/>
</bean>
<bean
id=
"FriendLinkBusiness"
<bean
id=
"FriendLinkBusiness"
class=
"com.jw.app.business.friendlink.FriendLinkBusinessImpl"
>
class=
"com.jw.app.business.friendlink.FriendLinkBusinessImpl"
>
<property
name=
"friendlinkDAO"
ref=
"friendlinkDAO"
/>
<property
name=
"friendlinkDAO"
ref=
"friendlinkDAO"
/>
...
@@ -233,6 +230,10 @@
...
@@ -233,6 +230,10 @@
<property
name=
"wordDAO"
ref=
"wordDAO"
/>
<property
name=
"wordDAO"
ref=
"wordDAO"
/>
</bean>
</bean>
<bean
id=
"WorkreportBusiness"
class=
"com.jw.app.business.workreport.WorkreportBusinessImpl"
>
<property
name=
"workreportDAO"
ref=
"workreportDAO"
/>
</bean>
<!-- DAO -->
<!-- DAO -->
<bean
id=
"portletDAO"
class=
"org.mybatis.spring.mapper.MapperFactoryBean"
>
<bean
id=
"portletDAO"
class=
"org.mybatis.spring.mapper.MapperFactoryBean"
>
<property
name=
"mapperInterface"
value=
"com.jw.app.business.portlet.PortletDAO"
/>
<property
name=
"mapperInterface"
value=
"com.jw.app.business.portlet.PortletDAO"
/>
...
...
WebContent/gaowj/ria/jquery/jquery-easyui-1.4.1/themes/icon.css
View file @
091450a7
...
@@ -378,4 +378,10 @@
...
@@ -378,4 +378,10 @@
}
}
.icon-ext-39_39 {
.icon-ext-39_39 {
background:url('
../../../../
images
/
icons
/(
39
,
39
).
png
') no-repeat left center;
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
;
}
}
\ No newline at end of file
WebContent/jwapp/pages/bgmk/bgmkEmployeeTab.jsp
deleted
100644 → 0
View file @
cd545fd9
<%@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>
WebContent/jwapp/pages/bgmk/bgmkTabDetail.jsp
deleted
100644 → 0
View file @
cd545fd9
<%@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
WebContent/jwapp/pages/bgmk/bgmkTabEmployeeDetail.jsp
deleted
100644 → 0
View file @
cd545fd9
<%@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
WebContent/jwapp/pages/bgmk/js/bgmkEmployeeTab.js
deleted
100644 → 0
View file @
cd545fd9
/**
* 序号: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
=
"员工报工 "
;
var
is_column
=
[
[
{
field
:
'CONTENT'
,
title
:
'工作内容'
,
width
:
400
,
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'
);
}
});
}
/****/
WebContent/jwapp/pages/
bgmk/js/bgmk
Module.js
→
WebContent/jwapp/pages/
workreport/js/workReport
Module.js
View file @
091450a7
//此乃本模块与后台交互的方法接口部分
//此乃本模块与后台交互的方法接口部分
var
bgmk
Module
=
function
(
format
)
{
var
workReport
Module
=
function
(
format
)
{
this
.
module
=
""
;
this
.
module
=
""
;
this
.
action
=
""
;
this
.
action
=
""
;
this
.
format
=
format
;
this
.
format
=
format
;
};
};
//定义数据交互
//定义数据交互
bgmk
Module
.
prototype
=
BusinessObject
;
workReport
Module
.
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
(){};
//报工数据_分页
//报工数据_分页
bgmk
Module
.
prototype
.
list
=
function
(){};
workReport
Module
.
prototype
.
list
=
function
(){};
//报工所有数据
//报工所有数据
bgmk
Module
.
prototype
.
listAll
=
function
(){};
workReport
Module
.
prototype
.
listAll
=
function
(){};
//创建一个数据操作对象,然后再后续使用
//创建一个数据操作对象,然后再后续使用
bgmkModule
.
bgmkActAction
=
new
bgmkModule
(
"json"
).
delegate
(
"bgmk
Act"
);
workReportModule
.
workReportActAction
=
new
workReportModule
(
"json"
).
delegate
(
"workReport
Act"
);
//创建一个数据获取对象,然后再后续使用
//创建一个数据获取对象,然后再后续使用
bgmkModule
.
bgmkDataAction
=
new
bgmkModule
(
"json"
).
delegate
(
"bgmk
Data"
);
workReportModule
.
workReportDataAction
=
new
workReportModule
(
"json"
).
delegate
(
"workReport
Data"
);
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
...
...
WebContent/jwapp/pages/
bgmk/js/bgmk
Tab.js
→
WebContent/jwapp/pages/
workreport/js/workReport
Tab.js
View file @
091450a7
...
@@ -39,11 +39,10 @@ var ls_ywlx = 'YBYW';
...
@@ -39,11 +39,10 @@ var ls_ywlx = 'YBYW';
* 单位:宁波金网
* 单位:宁波金网
* 备注:需更改
* 备注:需更改
**/
**/
//加载是否数据
//加载人员类型数据
var
v_yesnoquery
=
{};
var
v_typequery
=
{};
v_yesnoquery
.
FIELD_tableName
=
"DM_ST_YES_NO"
;
v_typequery
.
FIELD_tableName
=
"DM_USER_TYPE"
;
var
v_yesnoquery_data
=
standardModel
.
dataAction
.
listAllCache
(
v_yesnoquery
);
var
v_typequery_data
=
standardModel
.
dataAction
.
listAllCache
(
v_typequery
);
/**
/**
* 序号:3
* 序号:3
...
@@ -56,29 +55,41 @@ var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
...
@@ -56,29 +55,41 @@ var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
* 备注:需更改
* 备注:需更改
**/
**/
//定义grid列表
//定义grid列表
var
ls_title
=
"报工
管理
"
;
var
ls_title
=
"报工
模块
"
;
var
is_column
=
[
[
var
is_column
=
[
[
{
field
:
'
USER_NAME'
,
title
:
'人员姓名'
,
width
:
10
0
,
align
:
'center'
},
{
field
:
'
REPORT_PROJECT'
,
title
:
'汇报项目'
,
width
:
15
0
,
align
:
'center'
},
{
field
:
'
DEPT_NAME'
,
title
:
'人员部门'
,
width
:
8
0
,
align
:
'center'
},
{
field
:
'
REPORT_THEME'
,
title
:
'汇报主题'
,
width
:
20
0
,
align
:
'center'
},
{
field
:
'
CONTENT'
,
title
:
'工作内容'
,
width
:
400
,
align
:
'left'
,
halign
:
'center'
},
{
field
:
'
REPORT_TIME'
,
title
:
'汇报时间'
,
width
:
150
,
align
:
'center'
},
{
field
:
'
BG_TIME'
,
title
:
'报工时间
'
,
width
:
80
,
align
:
'center'
},
{
field
:
'
WORK_TIME'
,
title
:
'汇报用时(h)
'
,
width
:
80
,
align
:
'center'
},
{
field
:
'
GZYS'
,
title
:
'工作用时'
,
width
:
80
,
align
:
'center'
},
{
field
:
'
REPORT_USER_NAME'
,
title
:
'汇报人员'
,
width
:
100
,
align
:
'center'
},
{
field
:
'
USER_TYPE'
,
title
:
'人员类型'
,
width
:
10
0
,
align
:
'center'
,
{
field
:
'
DELETE_FLAG'
,
title
:
'数据已删除'
,
width
:
8
0
,
align
:
'center'
,
formatter
:
function
(
value
)
{
formatter
:
function
(
value
)
{
return
getCodeName
(
v_
type
query_data
.
rowSet
,
value
);
return
getCodeName
(
v_
yesno
query_data
.
rowSet
,
value
);
}
}
},
},
{
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
dataOnLoadSuccess
(){
}
}
//设置颜色和每行高度
//设置颜色和每行高度
function
rowstyler
(
index
,
row
){
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
+
"/
bgmk
Data_list"
,
queryData
,
is_column
,
60
,
80
);
datagrid
(
"list"
,
ls_title
,
gaowj
.
WEB_APP_NAME
+
"/
workReport
Data_list"
,
queryData
,
is_column
,
60
,
80
);
/****/
/****/
...
@@ -101,16 +112,18 @@ function formatMenu(value, data,index) {
...
@@ -101,16 +112,18 @@ function formatMenu(value, data,index) {
}
}
//上浮横向菜单集里的具体菜单项(需更改)
//上浮横向菜单集里的具体菜单项(需更改)
function
getOptionMenu
(
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('"
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=
\"
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
;
return
returnData
;
}
}
//返回菜单集的菜单个数(需更改)
//返回菜单集的菜单个数(需更改)
function
getOptionMenuCount
(){
function
getOptionMenuCount
(){
var
is_menu_count
=
2
;
var
is_menu_count
=
4
;
return
is_menu_count
;
return
is_menu_count
;
}
}
...
@@ -129,22 +142,34 @@ function getOptionMenuCount(){
...
@@ -129,22 +142,34 @@ function getOptionMenuCount(){
//加载增加子页面
//加载增加子页面
function
addRow
(){
function
addRow
(){
var
is_row
=
{
OPETYPE
:
'insert'
};
var
is_row
=
{
OPETYPE
:
'insert'
};
openEditRow
(
"
bgmkView_bgmk
TabDetail"
,
is_row
,
"新增"
,
true
,
0.65
,
0.95
,
0
,
0
);
openEditRow
(
"
workReportView_workReport
TabDetail"
,
is_row
,
"新增"
,
true
,
0.65
,
0.95
,
0
,
0
);
}
}
//加载增加子页面成功后的回调
//加载增加子页面成功后的回调
function
addUrlOnloadCallback
(
is_row
){
function
addUrlOnloadCallback
(
is_row
)
{
$
(
'#USER_TYPE'
).
combobox
({
$
(
'#WORK_TIME'
).
numberspinner
({
data
:
v_typequery_data
.
rowSet
,
min
:
0
,
valueField
:
'CODE_ID'
,
max
:
24
,
textField
:
'CODE_NAME'
,
//value : 0,
editable
:
false
,
increment
:
0.5
,
panelHeight
:
'auto'
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
){
function
insertData
(
is_entity
){
var
v_result
=
bgmkModule
.
bgmkActAction
.
insertBgmk
(
is_entity
);
var
v_result
=
workReportModule
.
workReportActAction
.
insertWorkReport
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
return
v_result
;
}
}
...
@@ -155,23 +180,32 @@ function editRow(index) {
...
@@ -155,23 +180,32 @@ function editRow(index) {
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
is_row
[
0
].
OPETYPE
=
'update'
;
is_row
[
0
].
OPETYPE
=
'update'
;
openEditRow
(
"
bgmkView_bgmk
TabDetail"
,
is_row
[
0
],
"编辑"
,
true
,
0.65
,
0.95
,
0
,
0
);
openEditRow
(
"
workReportView_workReport
TabDetail"
,
is_row
[
0
],
"编辑"
,
true
,
0.65
,
0.95
,
0
,
0
);
}
}
//加载修改子页面成功后的回调
//加载修改子页面成功后的回调
function
updateUrlOnloadCallback
(
is_row
){
function
updateUrlOnloadCallback
(
is_row
){
$
(
'#USER_TYPE'
).
combobox
({
$
(
'#WORK_TIME'
).
numberspinner
({
data
:
v_typequery_data
.
rowSet
,
min
:
0
,
valueField
:
'CODE_ID'
,
//value : 0,
textField
:
'CODE_NAME'
,
increment
:
0.5
,
editable
:
false
,
precision
:
1
,
panelHeight
:
'auto'
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
){
function
updateData
(
is_entity
){
v
_result
=
bgmkModule
.
bgmkActAction
.
updateBgmk
(
is_entity
);
v
ar
v_result
=
workReportModule
.
workReportActAction
.
updateWorkReport
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
return
v_result
;
}
}
...
@@ -193,13 +227,12 @@ function deleteRow(index){
...
@@ -193,13 +227,12 @@ function deleteRow(index){
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
var
code
=
is_row
[
0
].
UUID
;
var
code
=
is_row
[
0
].
UUID
;
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
$
.
messager
.
confirm
(
'提示'
,
'确定删除?'
,
function
(
r
)
{
if
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
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
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
}
}
...
@@ -234,7 +267,7 @@ function deleteBatchRow(){
...
@@ -234,7 +267,7 @@ function deleteBatchRow(){
if
(
r
)
{
if
(
r
)
{
var
v_query
=
{};
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
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
);
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
$
(
'#list'
).
datagrid
(
'reload'
);
$
(
'#list'
).
datagrid
(
'reload'
);
}
}
...
@@ -254,7 +287,7 @@ function deleteBatchRow(){
...
@@ -254,7 +287,7 @@ function deleteBatchRow(){
**/
**/
function
refreshRow
(){
function
refreshRow
(){
$
(
'#list'
).
datagrid
(
'load'
,{});
$
(
'#list'
).
datagrid
(
'load'
,{});
$
(
"#
bgmk
Tab_searchForm"
)[
0
].
reset
();
$
(
"#
workReport
Tab_searchForm"
)[
0
].
reset
();
}
}
/****/
/****/
...
@@ -269,11 +302,148 @@ function refreshRow(){
...
@@ -269,11 +302,148 @@ function refreshRow(){
* 备注:需更改
* 备注:需更改
**/
**/
function
searchRow
(){
function
searchRow
(){
var
v_query
=
$
(
"#
bgmk
Tab_searchForm"
).
getFormVal
();
var
v_query
=
$
(
"#
workReport
Tab_searchForm"
).
getFormVal
();
$
(
'#list'
).
datagrid
(
'load'
,
v_query
);
$
(
'#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'
);
}
});
}
/****/
WebContent/jwapp/pages/
bgmk/bgmk
Tab.jsp
→
WebContent/jwapp/pages/
workreport/workReport
Tab.jsp
View file @
091450a7
<%@page contentType="text/html; charset=UTF-8"%>
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="
bgmk
Tab">
<div id="
workReport
Tab">
<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_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_table.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<div id="tb">
<form id="
bgmk
Tab_searchForm" style="float:left">
<form id="
workReport
Tab_searchForm" style="float:left">
姓名: <input class="easyui-textbox" id="FIELD_USER_NAME" name="FIELD
_USER_NAME" style="width:200px"/>
汇报人员: <input class="easyui-textbox" id="FIELD_REPORT_USER_NAME" name="FIELD_REPORT
_USER_NAME" style="width:200px"/>
</form>
</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-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-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-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="#" 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>
<div id="detail" style="overflow:auto;"></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/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/
bgmk/js/bgmk
Module.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/
workreport/js/workReport
Module.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/
bgmk/js/bgmk
Tab.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/
workreport/js/workReport
Tab.js" charset="utf-8"></script>
WebContent/jwapp/pages/workreport/workReportTabDetail.jsp
0 → 100644
View file @
091450a7
<%@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
src/struts-ext.xml
View file @
091450a7
...
@@ -93,20 +93,7 @@
...
@@ -93,20 +93,7 @@
<action
name=
"attendanceView_*"
class=
"com.jw.app.attendance.action.viewAction"
method=
"{1}"
>
<action
name=
"attendanceView_*"
class=
"com.jw.app.attendance.action.viewAction"
method=
"{1}"
>
<result
name=
"{1}"
>
/jwapp/pages/attendance/{1}.jsp
</result>
<result
name=
"{1}"
>
/jwapp/pages/attendance/{1}.jsp
</result>
</action>
</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}"
>
<action
name=
"calendarAct_*"
class=
"com.jw.app.calendar.action.actAction"
method=
"{1}"
>
<result
name=
"json"
type=
"json"
>
<result
name=
"json"
type=
"json"
>
...
@@ -196,7 +183,7 @@
...
@@ -196,7 +183,7 @@
<action
name=
"processView_*"
class=
"com.jw.app.process.action.viewAction"
method=
"{1}"
>
<action
name=
"processView_*"
class=
"com.jw.app.process.action.viewAction"
method=
"{1}"
>
<result
name=
"{1}"
>
/jwapp/pages/process/{1}.jsp
</result>
<result
name=
"{1}"
>
/jwapp/pages/process/{1}.jsp
</result>
</action>
</action>
<!--
友情
链接相关 -->
<!--
快速
链接相关 -->
<action
name=
"friendlinkAct_*"
class=
"com.jw.app.friendlink.action.actAction"
method=
"{1}"
>
<action
name=
"friendlinkAct_*"
class=
"com.jw.app.friendlink.action.actAction"
method=
"{1}"
>
<result
name=
"json"
type=
"json"
>
<result
name=
"json"
type=
"json"
>
<param
name=
"root"
>
jsonObject
</param>
<param
name=
"root"
>
jsonObject
</param>
...
@@ -227,6 +214,20 @@
...
@@ -227,6 +214,20 @@
method=
"{1}"
>
method=
"{1}"
>
<result
name=
"{1}"
>
/jwapp/pages/log/{1}.jsp
</result>
<result
name=
"{1}"
>
/jwapp/pages/log/{1}.jsp
</result>
</action>
</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>
<package
name=
"src_jwapp_store"
extends=
"gaowj"
>
<package
name=
"src_jwapp_store"
extends=
"gaowj"
>
...
...
src_jwapp/com/jw/app/bgmk/viewAction.java
deleted
100644 → 0
View file @
cd545fd9
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"
;
}
}
src_jwapp/com/jw/app/business/
Bgmk
Business.java
→
src_jwapp/com/jw/app/business/
Workreport
Business.java
View file @
091450a7
...
@@ -9,67 +9,61 @@ import com.gaowj.business.exception.BusinessException;
...
@@ -9,67 +9,61 @@ import com.gaowj.business.exception.BusinessException;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.Page
;
@Service
@Service
public
interface
Bgmk
Business
{
public
interface
Workreport
Business
{
/**
/**
* 插入
* 插入
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
void
insert_
bgmk
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
void
insert_
work_report
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
/**
/**
* 更新
* 更新
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
void
update_
bgmk
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
void
update_
work_report
(
Map
<
String
,
Object
>
entity
)
throws
BusinessException
;
/**
/**
* 删除记录
* 软删除记录
* @param entity
* @param list
* @throws BusinessException
*/
void
delete_bgmk
(
List
<
String
>
list
)
throws
BusinessException
;
/**
* 分页获取记录
* @param entity
* @throws BusinessException
* @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
* @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
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
int
listCount_bgmk
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
Page
<
Map
<
String
,
Object
>>
list_work_report
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
//个人报工
Page
<
Map
<
String
,
Object
>>
list_bgmk_employee
(
int
pageNo
,
int
pageSize
,
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
/**
/**
* 获取所有记录
* 获取所有记录
* @param entity
* @param entity
* @throws BusinessException
* @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
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
int
listCount_bgmk_employee
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
int
list_count_work_report
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
}
src_jwapp/com/jw/app/business/bgmk/bgmkDAO.java
deleted
100644 → 0
View file @
cd545fd9
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
;
}
src_jwapp/com/jw/app/business/
bgmk/Bgmk
BusinessImpl.java
→
src_jwapp/com/jw/app/business/
workreport/Workreport
BusinessImpl.java
View file @
091450a7
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.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -10,50 +12,43 @@ import java.util.Set;
...
@@ -10,50 +12,43 @@ import java.util.Set;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.SessionUtil
;
import
com.gaowj.business.util.SessionUtil
;
import
com.
gaowj.standard.utils.CacheKit
;
import
com.
jw.app.business.WorkreportBusiness
;
import
com.jw.app.business.
BgmkBusiness
;
import
com.jw.app.business.
utils.QueryParamUtil
;
public
class
BgmkBusinessImpl
implements
Bgmk
Business
{
public
class
WorkreportBusinessImpl
implements
Workreport
Business
{
private
bgmkDAO
bgmk
DAO
;
private
workreportDAO
workreport
DAO
;
public
bgmkDAO
getBgmk
DAO
()
{
public
workreportDAO
getWorkreport
DAO
()
{
return
bgmk
DAO
;
return
workreport
DAO
;
}
}
public
void
setWorkreportDAO
(
workreportDAO
workreportDAO
)
{
public
void
setBgmkDAO
(
bgmkDAO
bgmkDAO
)
{
this
.
workreportDAO
=
workreportDAO
;
this
.
bgmkDAO
=
bgmkDAO
;
}
}
@Override
@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
){
if
(
entity
.
get
(
"UUID"
)==
null
){
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
entity
.
put
(
"UUID"
,
java
.
util
.
UUID
.
randomUUID
().
toString
());
}
}
if
(
entity
.
get
(
"USER_ID"
)==
null
){
if
(
entity
.
get
(
"CREATE_ID"
)
==
null
)
{
entity
.
put
(
"USER_ID"
,
SessionUtil
.
getCode
());
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
());
entity
.
put
(
"CREATE_TIME"
,
new
Date
());
}
}
if
(
entity
.
get
(
"USER_NAME"
)==
null
)
{
if
(
entity
.
get
(
"UPDATE_ID"
)
==
null
)
{
entity
.
put
(
"U
SER_NAME
"
,
SessionUtil
.
getCode
());
entity
.
put
(
"U
PDATE_ID
"
,
SessionUtil
.
getCode
());
}
}
if
(
entity
.
get
(
"CREATE_ID"
)==
null
)
{
if
(
entity
.
get
(
"UPDATE_TIME"
)
==
null
)
{
entity
.
put
(
"
CREATE_ID"
,
SessionUtil
.
getCod
e
());
entity
.
put
(
"
UPDATE_TIME"
,
new
Dat
e
());
}
}
if
(
entity
.
get
(
"REPORT_USER"
)
==
null
){
if
(
entity
.
get
(
"DEPT_NAME"
)==
null
){
entity
.
put
(
"REPORT_USER"
,
SessionUtil
.
getCode
());
entity
.
put
(
"DEPT_NAME"
,
SessionUtil
.
getEmdepartname
());
}
}
//动态传值插入
//动态传值插入
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
String
>
infoListKey
=
new
ArrayList
<
String
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
List
<
Object
>
infoList
=
new
ArrayList
<
Object
>();
...
@@ -67,11 +62,18 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -67,11 +62,18 @@ public class BgmkBusinessImpl implements BgmkBusiness {
entity
.
put
(
"infoListKey"
,
infoListKey
);
entity
.
put
(
"infoListKey"
,
infoListKey
);
entity
.
put
(
"infoList"
,
infoList
);
entity
.
put
(
"infoList"
,
infoList
);
// 插入
// 插入
bgmkDAO
.
insert_bgmk
(
entity
);
workreportDAO
.
insert_work_report
(
entity
);
}
}
}
}
@Override
@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
>>();
List
<
Map
<
String
,
Object
>>
updateList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
entity
.
keySet
()!=
null
){
if
(
entity
.
keySet
()!=
null
){
...
@@ -87,29 +89,36 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -87,29 +89,36 @@ public class BgmkBusinessImpl implements BgmkBusiness {
}
}
entity
.
put
(
"info"
,
updateList
);
entity
.
put
(
"info"
,
updateList
);
//
//
bgmkDAO
.
update_bgmk
(
entity
);
workreportDAO
.
update_work_report
(
entity
);
}
}
}
}
@Override
@Override
public
void
delete_
bgmk
(
List
<
String
>
list
)
throws
BusinessException
{
public
void
delete_
work_report
(
List
<
String
>
list
)
throws
BusinessException
{
bgmkDAO
.
delete_bgmk
(
list
);
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
@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
;
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
<
Map
<
String
,
Object
>>
page
=
new
Page
<
Map
<
String
,
Object
>>();
page
.
setStart
(
pageStart
);
page
.
setStart
(
pageStart
);
...
@@ -121,56 +130,24 @@ public class BgmkBusinessImpl implements BgmkBusiness {
...
@@ -121,56 +130,24 @@ public class BgmkBusinessImpl implements BgmkBusiness {
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
list_bgmk
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
public
List
<
Map
<
String
,
Object
>>
list_work_report
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
List
<
Map
<
String
,
Object
>>
list_data
=
CacheKit
.
get
(
"ehcache10"
,
"bgmk"
+
query
);
List
<
Map
<
String
,
Object
>>
listData
=
null
;
if
(
list_data
==
null
||
list_data
.
size
()==
0
){
try
{
list_data
=
bgmkDAO
.
list_bgmk
(
query
);
listData
=
QueryParamUtil
.
ClobToString
(
workreportDAO
.
list_work_report
(
query
));
CacheKit
.
put
(
"ehcache10"
,
"bgmk"
+
query
,
list_data
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
catch
(
SQLException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
return
list
_d
ata
;
return
list
D
ata
;
}
}
@Override
@Override
public
int
listCount_bgmk
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
public
int
list_count_work_report
(
Map
<
String
,
Object
>
query
)
{
return
bgmkDAO
.
listCount_bgmk
(
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
);
}
}
}
src_jwapp/com/jw/app/business/workreport/workreportDAO.java
0 → 100644
View file @
091450a7
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
;
}
src_jwapp/com/jw/app/business/
bgmk/bgmk
DAO.xml
→
src_jwapp/com/jw/app/business/
workreport/workreport
DAO.xml
View file @
091450a7
<?xml version="1.0" encoding="UTF-8" ?>
<?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">
<!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"
>
<mapper
namespace=
"com.jw.app.business.workreport.workreportDAO"
>
<sql
id=
"where_report"
>
<sql
id=
"where_bg"
>
<where>
<where>
<trim
prefixOverrides=
"AND |OR"
>
<trim
prefixOverrides=
"AND |OR"
>
<if
test=
"UUID != null and UUID != ''"
>
<if
test=
"UUID != null and UUID != ''"
>
and f.UUID = #{UUID}
and wr.UUID = #{UUID}
</if>
</if>
<if
test=
"REPORT_USER != null and REPORT_USER != ''"
>
<if
test=
"USER_NAME != null and USER_NAME != ''"
>
and wr.REPORT_USER = #{REPORT_USER}
and f.USER_NAME like '%${USER_NAME}%'
</if>
</if>
<if
test=
"REPORT_PROJECT != null and REPORT_PROJECT != ''"
>
<if
test=
"USER_ID != null and USER_ID != ''"
>
and wr.REPORT_PROJECT = #{REPORT_PROJECT}
and f.USER_ID = #{USER_ID}
</if>
</if>
<if
test=
"REPORT_THEME != null and REPORT_THEME != ''"
>
<if
test=
"DEPT_NAME != null and DEPT_NAME != ''"
>
and wr.REPORT_THEME like concat('%',#{REPORT_THEME},'%')
and f.DEPT_NAME = #{DEPT_NAME}
</if>
</if>
<if
test=
"START_TIME != null and START_TIME != ''"
>
<if
test=
"CONTENT != null and CONTENT != ''"
>
and wr.CREATE_TIME
<![CDATA[ >= ]]>
#{START_TIME}
and f.CONTENT = #{CONTENT}
</if>
</if>
<if
test=
"END_TIME != null and END_TIME != ''"
>
<if
test=
"GZYS != null and GZYS != ''"
>
and wr.CREATE_TIME
<![CDATA[ <= ]]>
#{END_TIME}
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=
"CREATE_TIME != null and CREATE_TIME != ''"
>
and f.CREATE_TIME = #{CREATE_TIME}
</if>
</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>
</trim>
</where>
</where>
</sql>
</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>
<select
id=
"list_count_work_report"
parameterType=
"map"
resultType=
"int"
>
<![CDATA[
SELECT COUNT(*)
<insert
id=
"insert_bgmk"
parameterType=
"map"
>
FROM
insert into WORK_BG(
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=
","
>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"infoListKey"
item=
"key"
>
<foreach
collection=
"infoListKey"
item=
"key"
>
${key},
${key},
...
@@ -62,9 +88,9 @@
...
@@ -62,9 +88,9 @@
<![CDATA[ ) ]]>
<![CDATA[ ) ]]>
</insert>
</insert>
<update
id=
"update_
bgmk
"
parameterType=
"map"
>
<update
id=
"update_
work_report
"
parameterType=
"map"
>
<![CDATA[
<![CDATA[
update
WORK_BG
set
update
work_report
set
]]>
]]>
<trim
prefix=
""
suffixOverrides=
","
>
<trim
prefix=
""
suffixOverrides=
","
>
<foreach
collection=
"info"
item=
"info"
>
<foreach
collection=
"info"
item=
"info"
>
...
@@ -74,34 +100,34 @@
...
@@ -74,34 +100,34 @@
<where>
<where>
<if
test=
"UUID != null and UUID != ''"
>
<if
test=
"UUID != null and UUID != ''"
>
and UUID = #{UUID}
and UUID = #{UUID}
</if>
</if>
</where>
</where>
</update>
</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[
<![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=
","
<foreach
collection=
"list"
item=
"UUID"
open=
"("
separator=
","
close=
")"
>
close=
")"
>
#{UUID}
#{UUID}
</foreach>
</foreach>
</delete>
</delete>
<select
id=
"list_bgmk"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
<![CDATA[
select f.* from WORK_BG f
]]>
<include
refid=
"where_bg"
/>
order by f.CREATE_TIME DESC
</select>
<
select
id=
"listCount_bgmk"
parameterType=
"map"
resultType=
"in
t"
>
<
delete
id=
"delete_true_work_report"
parameterType=
"lis
t"
>
<![CDATA[
<![CDATA[
select count(*) from WORK_BG f
delete from work_report where DELETE_FLAG = '1' and UUID IN
]]>
]]>
<
include
refid=
"where_bg"
/
>
<
foreach
collection=
"list"
item=
"UUID"
open=
"("
separator=
","
close=
")"
>
</select>
#{UUID}
</foreach>
</delete>
</mapper>
</mapper>
\ No newline at end of file
src_jwapp/com/jw/app/
bgmk
/actAction.java
→
src_jwapp/com/jw/app/
workreport/action
/actAction.java
View file @
091450a7
package
com
.
jw
.
app
.
bgmk
;
package
com
.
jw
.
app
.
workreport
.
action
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
net.sf.json.JSONObject
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.SystemOpeBusiness
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.comp.BusinessManager
;
...
@@ -13,13 +10,17 @@ import com.gaowj.business.exception.BusinessException;
...
@@ -13,13 +10,17 @@ import com.gaowj.business.exception.BusinessException;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.Status
;
import
com.gaowj.business.util.Status
;
import
com.gaowj.standard.utils.CacheKit
;
import
com.jw.app.business.WorkreportBusiness
;
import
com.jw.app.business.BgmkBusiness
;
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
();
private
JSONObject
jsonObject
=
new
JSONObject
();
public
JSONObject
getJsonObject
()
{
public
JSONObject
getJsonObject
()
{
...
@@ -35,25 +36,20 @@ public class actAction extends BasicAction {
...
@@ -35,25 +36,20 @@ public class actAction extends BasicAction {
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
insertBgmk
()
throws
BusinessException
{
public
String
insertWorkReport
()
throws
BusinessException
{
WorkreportBusiness
business
=
BusinessManager
.
getBusiness
(
WorkreportBusiness
.
class
);
BgmkBusiness
business
=
BusinessManager
.
getBusiness
(
BgmkBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
jsonObject
=
new
JSONObject
();
try
{
try
{
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
//去除不要更新的字段
//去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
entity
.
remove
(
"OPETYPE"
);
//新增
//新增
business
.
insert_bgmk
(
entity
);
business
.
insert_work_report
(
entity
);
// 操作日志
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"insertBgmk
"
,
""
+
entity
,
sysbusiness
.
insert_logBusiness
(
"insertWorkReport
"
,
""
+
entity
,
"增加报工数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"
NAME"
),
"bgmkdemo1
"
);
"增加报工数据"
,
(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"
REPORT_THEME"
),
"workReport
"
);
//
//
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"保存成功"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -68,21 +64,19 @@ public class actAction extends BasicAction {
...
@@ -68,21 +64,19 @@ public class actAction extends BasicAction {
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
updateBgmk
()
throws
BusinessException
{
public
String
updateWorkReport
()
throws
BusinessException
{
WorkreportBusiness
business
=
BusinessManager
.
getBusiness
(
WorkreportBusiness
.
class
);
BgmkBusiness
business
=
BusinessManager
.
getBusiness
(
BgmkBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
try
{
//去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
//修改
//修改
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
entity
=
QueryParamUtil
.
StringToDate
(
entity
);
business
.
update_bgmk
(
entity
);
//去除不要更新的字段
entity
.
remove
(
"OPETYPE"
);
business
.
update_work_report
(
entity
);
// 操作日志
// 操作日志
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"update
Bgmk
"
,
""
+
entity
,
sysbusiness
.
insert_logBusiness
(
"update
WorkReport
"
,
""
+
entity
,
"修改报工数据"
,(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"
NAME"
),
"bgmkdemo1
"
);
"修改报工数据"
,(
String
)
entity
.
get
(
"UUID"
),
(
String
)
entity
.
get
(
"
REPORT_THEME"
),
"workReport
"
);
//
//
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"修改成功"
));
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"修改成功"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -93,25 +87,71 @@ public class actAction extends BasicAction {
...
@@ -93,25 +87,71 @@ public class actAction extends BasicAction {
}
}
/**
/**
*
在软删除基础上删除记录
*
软删除
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
deleteBgmk
()
throws
BusinessException
{
public
String
deleteWorkReport
()
throws
BusinessException
{
WorkreportBusiness
business
=
BusinessManager
.
getBusiness
(
WorkreportBusiness
.
class
);
BgmkBusiness
business
=
BusinessManager
.
getBusiness
(
BgmkBusiness
.
class
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
entity
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
String
deletekey
=
(
String
)
entity
.
get
(
"CODE"
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
List
<
String
>
ListKey
=
QueryParamUtil
.
StringToList
(
deletekey
);
try
{
try
{
business
.
delete_
bgmk
(
ListKey
);
business
.
delete_
work_report
(
ListKey
);
// 操作日志
// 操作日志
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
SystemOpeBusiness
sysbusiness
=
BusinessManager
.
getBusiness
(
SystemOpeBusiness
.
class
);
sysbusiness
.
insert_logBusiness
(
"delete
Bgmk
"
,
""
+
ListKey
,
sysbusiness
.
insert_logBusiness
(
"delete
WorkReport
"
,
""
+
ListKey
,
"
删除报工数据"
,
deletekey
,
"多个流水号"
,
"bgmkdemo1
"
);
"
软删除报工数据"
,
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
(
"删除成功"
));
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"删除成功"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"删除失败"
));
jsonObject
.
putAll
(
Status
.
getStatusErrorMessage
(
"删除失败"
));
...
...
src_jwapp/com/jw/app/
bgmk
/dataAction.java
→
src_jwapp/com/jw/app/
workreport/action
/dataAction.java
View file @
091450a7
package
com
.
jw
.
app
.
bgmk
;
package
com
.
jw
.
app
.
workreport
.
action
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.text.ParseException
;
import
java.text.ParseException
;
...
@@ -6,33 +6,26 @@ import java.util.HashMap;
...
@@ -6,33 +6,26 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
net.sf.json.JSONObject
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.action.BasicAction
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.comp.BusinessManager
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.exception.BusinessException
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.Page
;
import
com.gaowj.business.util.PropUtil
;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.QueryParamUtil
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.RequestUtils
;
import
com.gaowj.business.util.SessionUtil
;
import
com.jw.app.business.WorkreportBusiness
;
import
com.gaowj.business.util.TestMd5
;
import
com.gaowj.standard.utils.CacheKit
;
import
com.jw.app.business.BgmkBusiness
;
public
class
dataAction
extends
BasicAction
{
import
net.sf.json.JSONObject
;
private
static
final
long
serialVersionUID
=
8400799803941083524L
;
public
class
dataAction
extends
BasicAction
{
private
static
final
String
console
=
null
;
/**
*
*/
private
static
final
long
serialVersionUID
=
-
3477428711726942671L
;
private
JSONObject
jsonObject
=
new
JSONObject
();
private
JSONObject
jsonObject
=
new
JSONObject
();
private
int
rows
=
20
;
// 每页显示的记录数
private
int
rows
=
20
;
// 每页显示的记录数
private
int
page
=
1
;
// 当前第几页
private
int
page
=
1
;
// 当前第几页
public
JSONObject
getJsonObject
()
{
public
JSONObject
getJsonObject
()
{
return
jsonObject
;
return
jsonObject
;
}
}
...
@@ -40,32 +33,39 @@ public class dataAction extends BasicAction{
...
@@ -40,32 +33,39 @@ public class dataAction extends BasicAction{
this
.
jsonObject
=
jsonObject
;
this
.
jsonObject
=
jsonObject
;
}
}
public
int
getRows
()
{
public
int
getRows
()
{
rows
=
getPageSize
();
return
rows
;
return
rows
;
}
}
public
void
setRows
(
int
rows
)
{
public
void
setRows
(
int
rows
)
{
this
.
rows
=
rows
;
setPageSize
(
rows
);
this
.
rows
=
getPageSize
();
}
}
public
int
getPage
()
{
public
int
getPage
()
{
page
=
getPageNo
();
return
page
;
return
page
;
}
}
public
void
setPage
(
int
page
)
{
public
void
setPage
(
int
page
)
{
this
.
page
=
page
;
setPageNo
(
page
);
this
.
page
=
getPageNo
();
}
}
/**
/**
* 获取
管理报工
记录
* 获取
分页
记录
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
list
()
throws
BusinessException
{
public
String
list
()
throws
BusinessException
{
BgmkBusiness
business
=
BusinessManager
.
getBusiness
(
Bgmk
Business
.
class
);
WorkreportBusiness
business
=
BusinessManager
.
getBusiness
(
Workreport
Business
.
class
);
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
try
{
query
=
QueryParamUtil
.
StringToDate
(
query
);
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
);
setPageCount
((
pageRows
.
getCount
()
-
1
)
/
pageSize
+
1
);
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
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
(
"pageNo"
,
pageNo
);
data
.
put
(
"pageSize"
,
pageSize
);
data
.
put
(
"pageSize"
,
pageSize
);
data
.
put
(
"pageCount"
,
pageCount
);
data
.
put
(
"pageCount"
,
pageCount
);
...
@@ -84,24 +84,24 @@ public class dataAction extends BasicAction{
...
@@ -84,24 +84,24 @@ public class dataAction extends BasicAction{
}
}
/**
/**
* 获取
员工报工
记录
* 获取
所有
记录
* @param entity
* @param entity
* @throws BusinessException
* @throws BusinessException
*/
*/
public
String
listEmployee
()
throws
BusinessException
{
public
String
listAll
()
throws
BusinessException
{
BgmkBusiness
business
=
BusinessManager
.
getBusiness
(
BgmkBusiness
.
class
);
WorkreportBusiness
business
=
BusinessManager
.
getBusiness
(
WorkreportBusiness
.
class
);
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
try
{
try
{
Map
<
String
,
Object
>
query
=
RequestUtils
.
getUpdateFieldMap
(
request
,
RequestUtils
.
UPDATEDATAFIELDPREFIX
);
query
=
QueryParamUtil
.
StringToDate
(
query
);
query
=
QueryParamUtil
.
StringToDate
(
query
);
Page
<
Map
<
String
,
Object
>>
pageRows
=
business
.
list_bgmk
(
pageNo
,
pageSize
,
query
);
List
<
Map
<
String
,
Object
>>
listData
=
business
.
list_work_report
(
query
);
setPageCount
((
pageRows
.
getCount
()
-
1
)
/
pageSize
+
1
);
int
listDataCount
=
listData
.
size
(
);
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
data
.
put
(
"rowSet"
,
QueryParamUtil
.
DateToString
(
pageRows
.
getItems
()));
data
.
put
(
"rowSet"
,
QueryParamUtil
.
DateToString
(
listData
));
data
.
put
(
"pageNo"
,
pageNo
);
data
.
put
(
"pageNo"
,
1
);
data
.
put
(
"pageSize"
,
pageSize
);
data
.
put
(
"pageSize"
,
listDataCount
);
data
.
put
(
"pageCount"
,
page
Count
);
data
.
put
(
"pageCount"
,
listData
Count
);
data
.
put
(
"rows"
,
data
.
get
(
"rowSet"
));
data
.
put
(
"rows"
,
data
.
get
(
"rowSet"
));
data
.
put
(
"total"
,
pageRows
.
getCount
()
);
data
.
put
(
"total"
,
listDataCount
);
jsonObject
=
new
JSONObject
();
jsonObject
=
new
JSONObject
();
jsonObject
.
putAll
(
data
);
jsonObject
.
putAll
(
data
);
}
catch
(
SQLException
e
)
{
}
catch
(
SQLException
e
)
{
...
@@ -113,6 +113,4 @@ public class dataAction extends BasicAction{
...
@@ -113,6 +113,4 @@ public class dataAction extends BasicAction{
}
}
return
"json"
;
return
"json"
;
}
}
}
}
src_jwapp/com/jw/app/workreport/action/viewAction.java
0 → 100644
View file @
091450a7
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"
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment