Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4744dee4
Commit
4744dee4
authored
Jan 23, 2019
by
cjl
Browse files
Merge branch 'master' of
https://gitee.com/jishenghua/JSH_ERP
parents
309d575c
dd6f7d8a
Changes
13
Hide whitespace changes
Inline
Side-by-side
erp_web/pages/manage/log.html
View file @
4744dee4
...
...
@@ -178,18 +178,15 @@
//初始化系统基础信息
function
initSystemData
()
{
$
.
ajax
({
type
:
"
pos
t
"
,
url
:
"
/
log/getBasicData.action
"
,
type
:
"
ge
t
"
,
url
:
"
/
user/getAllList
"
,
//设置为同步
async
:
false
,
dataType
:
"
json
"
,
success
:
function
(
systemInfo
)
{
success
:
function
(
res
)
{
//成功关闭loading
userList
=
systemInfo
.
showModel
.
map
.
userList
;
var
msgTip
=
systemInfo
.
showModel
.
msgTip
;
if
(
msgTip
==
"
exceptoin
"
)
{
$
.
messager
.
alert
(
'
提示
'
,
'
查找系统基础信息异常,请与管理员联系!
'
,
'
error
'
);
return
;
if
(
res
&&
res
.
code
===
200
){
userList
=
res
.
data
.
userList
;
}
}
});
...
...
@@ -198,7 +195,6 @@
//初始化页面选项卡
function
initSelectInfo
()
{
var
options
=
""
;
if
(
userList
!=
null
)
{
options
=
""
;
for
(
var
i
=
0
;
i
<
userList
.
length
;
i
++
)
{
...
...
erp_web/pages/reports/in_detail.html
View file @
4744dee4
...
...
@@ -292,7 +292,7 @@
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
rows
);
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
);
}
},
//此处添加错误处理
...
...
erp_web/pages/reports/in_material_count.html
View file @
4744dee4
...
...
@@ -281,7 +281,7 @@
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
rows
);
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
);
}
},
//此处添加错误处理
...
...
erp_web/pages/reports/out_detail.html
View file @
4744dee4
...
...
@@ -292,7 +292,7 @@
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
rows
);
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
);
}
},
//此处添加错误处理
...
...
erp_web/pages/reports/out_material_count.html
View file @
4744dee4
...
...
@@ -281,7 +281,7 @@
}),
success
:
function
(
res
)
{
if
(
res
&&
res
.
code
===
200
&&
res
.
data
)
{
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
.
rows
);
$
(
"
#tableData
"
).
datagrid
(
'
loadData
'
,
res
.
data
);
}
},
//此处添加错误处理
...
...
src/main/assembly/package.xml
View file @
4744dee4
...
...
@@ -30,22 +30,6 @@ http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 ">
<source>
src/main/resources/application.yml
</source>
<outputDirectory>
/conf
</outputDirectory>
</file>
<file>
<source>
src/main/resources/application.properties
</source>
<outputDirectory>
/conf
</outputDirectory>
</file>
<file>
<source>
src/main/resources/application-dev.properties
</source>
<outputDirectory>
/conf
</outputDirectory>
</file>
<file>
<source>
src/main/resources/application-prod.properties
</source>
<outputDirectory>
/conf
</outputDirectory>
</file>
<file>
<source>
src/main/resources/application-test.properties
</source>
<outputDirectory>
/conf
</outputDirectory>
</file>
</files>
<dependencySets>
<dependencySet>
...
...
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
4744dee4
...
...
@@ -209,7 +209,7 @@ public class DepotHeadController {
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
List
<
DepotHeadVo4InDetail
>
resList
=
new
ArrayList
<
DepotHeadVo4InDetail
>();
List
<
DepotHeadVo4InDetail
>
list
=
depotHeadService
.
findByAll
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
currentPage
,
pageSize
);
List
<
DepotHeadVo4InDetail
>
list
=
depotHeadService
.
findByAll
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
(
currentPage
-
1
)*
pageSize
,
pageSize
);
int
total
=
depotHeadService
.
findByAllCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
);
map
.
put
(
"total"
,
total
);
//存放数据json数组
...
...
@@ -256,7 +256,7 @@ public class DepotHeadController {
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
try
{
List
<
DepotHeadVo4InOutMCount
>
resList
=
new
ArrayList
<
DepotHeadVo4InOutMCount
>();
List
<
DepotHeadVo4InOutMCount
>
list
=
depotHeadService
.
findInOutMaterialCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
currentPage
,
pageSize
);
List
<
DepotHeadVo4InOutMCount
>
list
=
depotHeadService
.
findInOutMaterialCount
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
,
(
currentPage
-
1
)*
pageSize
,
pageSize
);
int
total
=
depotHeadService
.
findInOutMaterialCountTotal
(
beginTime
,
endTime
,
type
,
pid
,
dids
,
oId
);
map
.
put
(
"total"
,
total
);
//存放数据json数组
...
...
src/main/java/com/jsh/erp/controller/UserController.java
View file @
4744dee4
...
...
@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.IOException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
...
...
@@ -183,4 +184,28 @@ public class UserController {
return
returnJson
(
objectMap
,
message
,
ErpInfo
.
ERROR
.
code
);
}
}
/**
* 获取全部用户数据列表
* @param request
* @return
*/
@GetMapping
(
value
=
"/getAllList"
)
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
List
<
User
>
dataList
=
userService
.
getUser
();
if
(
dataList
!=
null
)
{
data
.
put
(
"userList"
,
dataList
);
}
res
.
code
=
200
;
res
.
data
=
data
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
res
.
code
=
500
;
res
.
data
=
"获取失败"
;
}
return
res
;
}
}
src/main/java/com/jsh/erp/datasource/mappers/LogMapper.java
View file @
4744dee4
...
...
@@ -3,6 +3,8 @@ package com.jsh.erp.datasource.mappers;
import
com.jsh.erp.datasource.entities.Log
;
import
com.jsh.erp.datasource.entities.LogExample
;
import
java.util.List
;
import
com.jsh.erp.datasource.vo.LogVo4List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
LogMapper
{
...
...
@@ -94,7 +96,7 @@ public interface LogMapper {
*/
int
updateByPrimaryKey
(
Log
record
);
List
<
Log
>
selectByConditionLog
(
List
<
Log
Vo4List
>
selectByConditionLog
(
@Param
(
"operation"
)
String
operation
,
@Param
(
"usernameID"
)
Integer
usernameID
,
@Param
(
"clientIp"
)
String
clientIp
,
...
...
src/main/java/com/jsh/erp/datasource/vo/LogVo4List.java
0 → 100644
View file @
4744dee4
package
com.jsh.erp.datasource.vo
;
import
java.util.Date
;
public
class
LogVo4List
{
private
Long
id
;
private
Long
userid
;
private
String
operation
;
private
String
clientip
;
private
Date
createtime
;
private
Byte
status
;
private
String
contentdetails
;
private
String
remark
;
private
String
username
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Long
getUserid
()
{
return
userid
;
}
public
void
setUserid
(
Long
userid
)
{
this
.
userid
=
userid
;
}
public
String
getOperation
()
{
return
operation
;
}
public
void
setOperation
(
String
operation
)
{
this
.
operation
=
operation
;
}
public
String
getClientip
()
{
return
clientip
;
}
public
void
setClientip
(
String
clientip
)
{
this
.
clientip
=
clientip
;
}
public
Date
getCreatetime
()
{
return
createtime
;
}
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
public
Byte
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Byte
status
)
{
this
.
status
=
status
;
}
public
String
getContentdetails
()
{
return
contentdetails
;
}
public
void
setContentdetails
(
String
contentdetails
)
{
this
.
contentdetails
=
contentdetails
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/service/log/LogService.java
View file @
4744dee4
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.jsh.erp.datasource.entities.Log
;
import
com.jsh.erp.datasource.entities.LogExample
;
import
com.jsh.erp.datasource.mappers.LogMapper
;
import
com.jsh.erp.datasource.vo.LogVo4List
;
import
com.jsh.erp.utils.ExceptionCodeConstants
;
import
com.jsh.erp.utils.JshException
;
import
com.jsh.erp.utils.StringUtil
;
...
...
@@ -33,8 +34,8 @@ public class LogService {
return
logMapper
.
selectByExample
(
example
);
}
public
List
<
Log
>
select
(
String
operation
,
Integer
usernameID
,
String
clientIp
,
Integer
status
,
String
beginTime
,
String
endTime
,
String
contentdetails
,
int
offset
,
int
rows
)
{
public
List
<
Log
Vo4List
>
select
(
String
operation
,
Integer
usernameID
,
String
clientIp
,
Integer
status
,
String
beginTime
,
String
endTime
,
String
contentdetails
,
int
offset
,
int
rows
)
{
return
logMapper
.
selectByConditionLog
(
operation
,
usernameID
,
clientIp
,
status
,
beginTime
,
endTime
,
contentdetails
,
offset
,
rows
);
}
...
...
src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
4744dee4
...
...
@@ -205,8 +205,8 @@
</select>
<select
id=
"findInOutMaterialCountTotal"
resultType=
"java.lang.Integer"
>
select count(1)
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
select count(1)
from
(select di.MaterialId, m.mName,m.Model,m.categoryName
from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName
from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m
on m.Id=di.MaterialId where dh.type='${type}' and dh.OperTime >='${beginTime}' and dh.OperTime
<
='${endTime}'
...
...
@@ -219,6 +219,7 @@
<if
test=
"pid == null"
>
and di.DepotId in (${dids})
</if>
GROUP BY di.MaterialId,m.mName,m.Model,m.categoryName) a
</select>
<select
id=
"findStatementAccount"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultStatementAccount"
>
...
...
src/main/resources/mapper_xml/LogMapperEx.xml
View file @
4744dee4
<?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.jsh.erp.datasource.mappers.LogMapper"
>
<select
id=
"selectByConditionLog"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
resultMap=
"BaseResultMap"
>
select *
FROM jsh_log
<resultMap
extends=
"BaseResultMap"
id=
"ResultExMap"
type=
"com.jsh.erp.datasource.vo.LogVo4List"
>
<result
column=
"userName"
jdbcType=
"VARCHAR"
property=
"username"
/>
</resultMap>
<select
id=
"selectByConditionLog"
parameterType=
"com.jsh.erp.datasource.entities.LogExample"
resultMap=
"ResultExMap"
>
select l.*,u.username userName
FROM jsh_log l left join jsh_user u
on l.userID = u.id
where 1=1
<if
test=
"operation != null"
>
and operation like '%${operation}%'
and
l.
operation like '%${operation}%'
</if>
<if
test=
"usernameID != null"
>
and userID=${usernameID}
and
l.
userID=${usernameID}
</if>
<if
test=
"clientIp != null"
>
and clientIp like '%${clientIp}%'
and
l.
clientIp like '%${clientIp}%'
</if>
<if
test=
"status != null"
>
and status=${status}
and
l.
status=${status}
</if>
<if
test=
"beginTime != null"
>
and createtime
>
= '%${beginTime}%'
and
l.
createtime
>
= '%${beginTime}%'
</if>
<if
test=
"endTime != null"
>
and createtime
<
= '%${endTime}%'
and
l.
createtime
<
= '%${endTime}%'
</if>
<if
test=
"contentdetails != null"
>
and contentdetails like '%${contentdetails}%'
and
l.
contentdetails like '%${contentdetails}%'
</if>
order by createtime desc
order by
l.
createtime desc
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
</if>
...
...
Write
Preview
Supports
Markdown
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