Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api
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
首航-临时账号
api
Commits
06ebe087
Commit
06ebe087
authored
Mar 18, 2020
by
Lenovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
航线论证部门调整添加操作日志
1.如果删除后部门都已论证完毕,跳转到带论证总结; 2.修改数据库配置
parent
6e69e9a8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
74 deletions
+109
-74
web.xml
WebContent/WEB-INF/web.xml
+1
-1
jdbc.properties
resources/jdbc.properties
+3
-3
mybatis-config.xml
resources/mybatis-config.xml
+1
-1
SecurityPropertyPlaceholderConfigurer.java
src/com/ejweb/core/conf/SecurityPropertyPlaceholderConfigurer.java
+2
-2
BasicVerifyFilter.java
src/com/ejweb/core/filter/BasicVerifyFilter.java
+1
-3
TimeUtils.java
src/com/ejweb/core/util/TimeUtils.java
+58
-63
RouteVerifyService.java
src/com/ejweb/modules/route/service/RouteVerifyService.java
+36
-1
AirlineVerifiedAddBean.java
src/com/ejweb/modules/verify/bean/AirlineVerifiedAddBean.java
+7
-0
No files found.
WebContent/WEB-INF/web.xml
View file @
06ebe087
...
...
@@ -57,7 +57,7 @@
<filter-class>
com.ejweb.core.filter.BasicVerifyFilter
</filter-class>
<init-param>
<param-name>
excludedPages
</param-name>
<param-value>
/api/user/login
</param-value>
<param-value>
/api/user/login
;/api/call/findPhoneInfo
</param-value>
</init-param>
</filter>
<filter-mapping>
...
...
resources/jdbc.properties
View file @
06ebe087
...
...
@@ -3,9 +3,9 @@ db.table.prefix=foc_
jdbc.type
=
mysql
jdbc.driver.class
=
com.mysql.jdbc.Driver
jdbc.url
=
jdbc:mysql://106.75.
97.50:3306/jd_foc?useUnicode=true&characterEncoding=utf-8&useSSL=true
jdbc.username
=
focuser
jdbc.password
=
FOC@2016
jdbc.url
=
jdbc:mysql://106.75.
105.96:5508/jd_foc?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull
jdbc.username
=
sms_develop
jdbc.password
=
Develop2018!@#
#\u521d\u59cb\u5316\u8fde\u63a5
jdbc.initialSize
=
0
...
...
resources/mybatis-config.xml
View file @
06ebe087
...
...
@@ -37,6 +37,6 @@
<setting
name=
"jdbcTypeForNull"
value=
"NULL"
/>
<!--打印sql-->
<
setting
name=
"logImpl"
value=
"STDOUT_LOGGING"
/
>
<
!--<setting name="logImpl" value="STDOUT_LOGGING"/>--
>
</settings>
</configuration>
src/com/ejweb/core/conf/SecurityPropertyPlaceholderConfigurer.java
View file @
06ebe087
...
...
@@ -79,7 +79,7 @@ public class SecurityPropertyPlaceholderConfigurer extends PropertyPlaceholderCo
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
DES3Utils
.
encrypt
(
"foctest"
,
CONF_DESC_KEY
));
System
.
out
.
println
(
DES3Utils
.
decrypt
(
"
35824f37e331a42e669a52e248d88ffb6474030c906ec914
"
,
CONF_DESC_KEY
));
System
.
out
.
println
(
DES3Utils
.
decrypt
(
"
6f2237c231b1464c6474030c906ec914
"
,
CONF_DESC_KEY
));
System
.
out
.
println
(
DES3Utils
.
decrypt
(
"
fc76fa2b2e10b3d4450d564314a97766
"
,
CONF_DESC_KEY
));
System
.
out
.
println
(
DES3Utils
.
decrypt
(
"
31a63fac8317458d81c034906825749f7c58c30a773c6927
"
,
CONF_DESC_KEY
));
}
}
src/com/ejweb/core/filter/BasicVerifyFilter.java
View file @
06ebe087
...
...
@@ -112,7 +112,6 @@ public class BasicVerifyFilter implements Filter {
message
=
"无效请求"
;
BaseUserBean
baseUserBean
=
JSON
.
parseObject
(
content
,
BaseUserBean
.
class
);
String
userSign
=
baseUserBean
.
getUserSign
();
System
.
out
.
println
(
"userSign:"
+
userSign
);
if
(
userSign
!=
null
&&
!
""
.
equals
(
userSign
)
&&
!
"undefind"
.
equals
(
userSign
))
{
ServletContext
context
=
request
.
getServletContext
();
ApplicationContext
ctx
=
WebApplicationContextUtils
.
getWebApplicationContext
(
context
);
...
...
@@ -136,7 +135,6 @@ public class BasicVerifyFilter implements Filter {
}
}
System
.
out
.
println
(
"userSign为空或查不到用户"
);
request
.
setAttribute
(
"message"
,
message
);
// 跳转到验证错误页面
request
.
getRequestDispatcher
(
"/WEB-INF/views/errors/401.jsp"
).
forward
(
request
,
response
);
...
...
@@ -156,7 +154,7 @@ public class BasicVerifyFilter implements Filter {
}
else
{
excludedPageArray
=
excludedPages
.
split
(
";"
);
for
(
int
i
=
0
,
len
=
excludedPageArray
.
length
;
i
<
len
;
i
++)
{
excludedPageSet
.
add
(
excludedPageArray
[
0
]);
excludedPageSet
.
add
(
excludedPageArray
[
i
]);
}
isExcludedPage
=
true
;
}
...
...
src/com/ejweb/core/util/TimeUtils.java
View file @
06ebe087
...
...
@@ -3,17 +3,17 @@
*/
package
com
.
ejweb
.
core
.
util
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
java.sql.Timestamp
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.Date
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
/**
* 时间计算工具类
*
*
* @author ThinkGem
* @version 2013-11-03
*/
...
...
@@ -64,12 +64,12 @@ public class TimeUtils {
/**
* 各常量允许的最大值
*/
private
final
int
[]
maxFields
=
{
59
,
59
,
23
,
Integer
.
MAX_VALUE
-
1
};
private
final
int
[]
maxFields
=
{
59
,
59
,
23
,
Integer
.
MAX_VALUE
-
1
};
/**
* 各常量允许的最小值
*/
private
final
int
[]
minFields
=
{
0
,
0
,
0
,
Integer
.
MIN_VALUE
};
private
final
int
[]
minFields
=
{
0
,
0
,
0
,
Integer
.
MIN_VALUE
};
/**
* 默认的字符串格式时间分隔符
...
...
@@ -90,11 +90,9 @@ public class TimeUtils {
/**
* 使用时、分构造一个时间
*
* @param hour
* 小时
* @param minute
* 分钟
*
* @param hour 小时
* @param minute 分钟
*/
public
TimeUtils
(
int
hour
,
int
minute
)
{
this
(
0
,
hour
,
minute
,
0
);
...
...
@@ -102,13 +100,10 @@ public class TimeUtils {
/**
* 使用时、分、秒构造一个时间
*
* @param hour
* 小时
* @param minute
* 分钟
* @param second
* 秒
*
* @param hour 小时
* @param minute 分钟
* @param second 秒
*/
public
TimeUtils
(
int
hour
,
int
minute
,
int
second
)
{
this
(
0
,
hour
,
minute
,
second
);
...
...
@@ -117,9 +112,8 @@ public class TimeUtils {
/**
* 使用一个字符串构造时间<br/>
* Time time = new Time("14:22:23");
*
* @param time
* 字符串格式的时间,默认采用“:”作为分隔符
*
* @param time 字符串格式的时间,默认采用“:”作为分隔符
*/
public
TimeUtils
(
String
time
)
{
this
(
time
,
null
);
...
...
@@ -128,7 +122,7 @@ public class TimeUtils {
/**
* 使用时间毫秒构建时间
*
*
* @param time
*/
public
TimeUtils
(
long
time
)
{
...
...
@@ -137,7 +131,7 @@ public class TimeUtils {
/**
* 使用日期对象构造时间
*
*
* @param date
*/
public
TimeUtils
(
Date
date
)
{
...
...
@@ -146,15 +140,11 @@ public class TimeUtils {
/**
* 使用天、时、分、秒构造时间,进行全字符的构造
*
* @param day
* 天
* @param hour
* 时
* @param minute
* 分
* @param second
* 秒
*
* @param day 天
* @param hour 时
* @param minute 分
* @param second 秒
*/
public
TimeUtils
(
int
day
,
int
hour
,
int
minute
,
int
second
)
{
initialize
(
day
,
hour
,
minute
,
second
);
...
...
@@ -163,9 +153,8 @@ public class TimeUtils {
/**
* 使用一个字符串构造时间,指定分隔符<br/>
* Time time = new Time("14-22-23", "-");
*
* @param time
* 字符串格式的时间
*
* @param time 字符串格式的时间
*/
public
TimeUtils
(
String
time
,
String
timeSeparator
)
{
if
(
timeSeparator
!=
null
)
{
...
...
@@ -176,11 +165,9 @@ public class TimeUtils {
/**
* 设置时间字段的值
*
* @param field
* 时间字段常量
* @param value
* 时间字段的值
*
* @param field 时间字段常量
* @param value 时间字段的值
*/
public
void
set
(
int
field
,
int
value
)
{
if
(
value
<
minFields
[
field
])
{
...
...
@@ -197,9 +184,8 @@ public class TimeUtils {
/**
* 获得时间字段的值
*
* @param field
* 时间字段常量
*
* @param field 时间字段常量
* @return 该时间字段的值
*/
public
int
get
(
int
field
)
{
...
...
@@ -211,9 +197,8 @@ public class TimeUtils {
/**
* 将时间进行“加”运算,即加上一个时间
*
* @param time
* 需要加的时间
*
* @param time 需要加的时间
* @return 运算后的时间
*/
public
TimeUtils
addTime
(
TimeUtils
time
)
{
...
...
@@ -229,9 +214,8 @@ public class TimeUtils {
/**
* 将时间进行“减”运算,即减去一个时间
*
* @param time
* 需要减的时间
*
* @param time 需要减的时间
* @return 运算后的时间
*/
public
TimeUtils
subtractTime
(
TimeUtils
time
)
{
...
...
@@ -254,7 +238,7 @@ public class TimeUtils {
/**
* 获得时间字段的分隔符
*
*
* @return
*/
public
String
getTimeSeparator
()
{
...
...
@@ -263,9 +247,8 @@ public class TimeUtils {
/**
* 设置时间字段的分隔符(用于字符串格式的时间)
*
* @param timeSeparator
* 分隔符字符串
*
* @param timeSeparator 分隔符字符串
*/
public
void
setTimeSeparator
(
String
timeSeparator
)
{
this
.
timeSeparator
=
timeSeparator
;
...
...
@@ -318,15 +301,16 @@ public class TimeUtils {
time
+
", time format error, HH"
+
this
.
timeSeparator
+
"mm"
+
this
.
timeSeparator
+
"ss"
);
}
/**
* 获取今天是星期几
* @author huhy
* @time 2016年11月24日
* @param dt
* @return
*/
/**
* 获取今天是星期几
*
* @param dt
* @return
* @author huhy
* @time 2016年11月24日
*/
public
static
String
getWeekOfDate
(
Date
dt
)
{
String
[]
weekDays
=
{
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
};
String
[]
weekDays
=
{
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
};
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
setTime
(
dt
);
int
w
=
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
-
1
;
...
...
@@ -337,11 +321,11 @@ public class TimeUtils {
/**
* 获取前后日期 i为正数 向后推迟i天,负数时向前提前i天
*
* @author huhy
* @time 2016年11月24日
*
* @param i
* @return
* @author huhy
* @time 2016年11月24日
*/
public
static
Date
getdate
(
int
i
)
{
Date
dat
=
null
;
...
...
@@ -390,4 +374,14 @@ public class TimeUtils {
return
true
;
}
/**
* 获取当前时间
*
* @param formatType 转换格式,如:yyyy-MM-dd HH:mm:ss
* @return
*/
public
static
String
getTime
(
String
formatType
)
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
formatType
);
return
format
.
format
(
System
.
currentTimeMillis
());
}
}
\ No newline at end of file
src/com/ejweb/modules/route/service/RouteVerifyService.java
View file @
06ebe087
...
...
@@ -6,6 +6,7 @@ import com.ejweb.core.exception.IlleagalRecordException;
import
com.ejweb.core.exception.RecordNotExistException
;
import
com.ejweb.core.util.IdWorker
;
import
com.ejweb.core.util.PlanUtil
;
import
com.ejweb.core.util.TimeUtils
;
import
com.ejweb.core.util.VerifyEmailHandler
;
import
com.ejweb.modules.depart.dao.DepartDao
;
import
com.ejweb.modules.depart.entity.DepartEntity
;
...
...
@@ -593,6 +594,9 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
UserEntity
entity
=
new
UserEntity
();
entity
.
setUsercode
(
bean
.
getUserCode
());
User
user
=
userdao
.
getUserByUserCode
(
entity
);
//生成两个字符串构建变量,用于生成操作记录使用
StringBuilder
departAdd
=
new
StringBuilder
();
StringBuilder
departRemove
=
new
StringBuilder
();
if
(
airlineVerifyEntity
!=
null
)
{
//如果isExist为1说明部门已经存在,不需要添加,如果为-1说明已经删除,需要删除
int
isExist
=
0
;
...
...
@@ -608,7 +612,7 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
}
//如果是新加的部门,就执行新增
if
(
isExist
==
0
)
{
departAdd
.
append
(
verifyDeparts
.
get
(
i
).
getDepartName
()
+
","
);
routeverifyEntity
.
setDeportId
(
verifyDeparts
.
get
(
i
).
getDepartId
());
routeverifyEntity
.
setVerifStatus
(
"00"
);
routeverifyEntity
.
setId
(
IdWorker
.
getNextId
());
...
...
@@ -621,10 +625,41 @@ public class RouteVerifyService extends BaseService<RouteVerifyDao> {
}
}
for
(
int
j
=
0
;
j
<
list
.
size
();
j
++)
{
departRemove
.
append
(
list
.
get
(
j
).
getDepartName
()
+
","
);
routeverifyEntity
.
setVerifyId
(
bean
.
getVerifId
());
routeverifyEntity
.
setDeportId
(
list
.
get
(
j
).
getDepartId
());
dao
.
deleteRouteverify
(
routeverifyEntity
);
}
boolean
add
=
StringUtils
.
isNotEmpty
(
departAdd
);
boolean
remove
=
StringUtils
.
isNotEmpty
(
departRemove
);
//如果有添加或者删除部门,生成操作记录
if
(
add
||
remove
)
{
StringBuilder
remark
=
new
StringBuilder
();
remark
.
append
(
TimeUtils
.
getTime
(
"yyyy-MM-dd HH:mm:ss"
)).
append
(
"调整了论证部门 <br/>"
);
if
(
add
)
{
departAdd
.
insert
(
0
,
"【"
);
departAdd
.
deleteCharAt
(
departAdd
.
length
()
-
1
).
append
(
"】"
);
remark
.
append
(
"新增了"
).
append
(
departAdd
).
append
(
"<br/>"
);
}
if
(
remove
)
{
departRemove
.
insert
(
0
,
"【"
);
departRemove
.
deleteCharAt
(
departRemove
.
length
()
-
1
).
append
(
"】"
);
remark
.
append
(
"删除了"
).
append
(
departRemove
).
append
(
"<br/>"
);
}
RecordAddBean
recordAddBean
=
new
RecordAddBean
();
recordAddBean
.
setId
(
IdWorker
.
getNextId
());
recordAddBean
.
setUserCode
(
bean
.
getUserCode
());
recordAddBean
.
setRecordType
(
"05"
);
recordAddBean
.
setVerifId
(
bean
.
getVerifId
());
recordAddBean
.
setRemarks
(
remark
.
toString
());
recordDao
.
insert
(
recordAddBean
);
}
RouteVerifyBean
routeVerifyBean1
=
new
RouteVerifyBean
();
routeVerifyBean1
.
setVerifId
(
bean
.
getVerifId
());
// 判断是否进入论证总结阶段
insertAirlineConclusion
(
routeVerifyBean1
,
bean
.
getUserCode
());
}
}
...
...
src/com/ejweb/modules/verify/bean/AirlineVerifiedAddBean.java
View file @
06ebe087
...
...
@@ -206,6 +206,7 @@ public class AirlineVerifiedAddBean extends GenericBean {
public
class
Deport
{
private
String
departId
;
private
String
departName
;
public
String
getDepartId
()
{
return
departId
;
...
...
@@ -215,7 +216,13 @@ public class AirlineVerifiedAddBean extends GenericBean {
this
.
departId
=
departId
;
}
public
String
getDepartName
()
{
return
departName
;
}
public
void
setDepartName
(
String
departName
)
{
this
.
departName
=
departName
;
}
}
public
String
getVerifNo
()
{
...
...
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