Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apps-collaboration
Project
Project
Details
Activity
Releases
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
高燕
apps-collaboration
Commits
8b960103
Commit
8b960103
authored
Sep 23, 2020
by
gaoyingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:更新发送协同接口,返回门户信息接口
add:新增单点登录插件接口
parent
f857b45c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
6 deletions
+128
-6
CollaborationController.java
...pps/collaboration/controller/CollaborationController.java
+9
-1
ColDaoImpl.java
...in/java/com/seeyon/apps/collaboration/dao/ColDaoImpl.java
+3
-3
FalseDoTimer.java
src/main/java/com/seeyon/apps/timer/FalseDoTimer.java
+9
-1
MySSOLoginHandshake.java
...n/java/com/seeyon/ctp/portal/sso/MySSOLoginHandshake.java
+68
-0
CollaborationResource.java
.../com/seeyon/ctp/rest/resources/CollaborationResource.java
+3
-1
pluginCfg.xml
src/main/webapp/WEB-INF/cfgHome/plugin/sample/pluginCfg.xml
+7
-0
SSOLoginContext.xml
.../WEB-INF/cfgHome/plugin/sample/spring/SSOLoginContext.xml
+29
-0
No files found.
src/main/java/com/seeyon/apps/collaboration/controller/CollaborationController.java
View file @
8b960103
...
...
@@ -2496,6 +2496,14 @@ public class CollaborationController extends BaseController {
nevinSize1
=
ctpEnumItem
.
getShowvalue
();
}
String
namekeynevinColor
=
master
.
getFormTable
().
getFieldMap4Display
().
get
(
"内页颜色"
).
getName
();
String
neivinColor
=
(
String
)
master
.
getAllDataMap
().
get
(
namekeynevinColor
);
String
neivinColor1
=
null
;
if
(
StringUtils
.
isNotBlank
(
neivinColor
))
{
ctpEnumItem
=
enumManagerNew
.
getEnumItem
(
Long
.
valueOf
(
neivinColor
));
neivinColor1
=
ctpEnumItem
.
getShowvalue
();
}
String
namekeyinsertSize
=
master
.
getFormTable
().
getFieldMap4Display
().
get
(
"插页纸张"
).
getName
();
String
insertSize
=
(
String
)
master
.
getAllDataMap
().
get
(
namekeyinsertSize
);
String
insertSize1
=
null
;
...
...
@@ -2527,7 +2535,7 @@ public class CollaborationController extends BaseController {
sumprice1
=
(
BigDecimal
)
master
.
getAllDataMap
().
get
(
namekeyunitprice
);
}
DIC_DATA_URL
=
DIC_DATA_URL
+
"?id="
+
code
+
"&printStatus="
+
1
+
"&pageSize="
+
pageSize1
+
"&cover="
+
covers
+
"&coverSize="
+
coverSize1
+
"&nevinSize="
+
nevinSize1
+
"&insertSize="
+
insertSize1
+
"&machinetype="
+
machinetype1
+
"&distribution="
+
distribution1
+
"&pagesided="
+
pagesided1
+
"&urgent="
+
urgent
+
"&aggregate="
+
sumprice1
+
"&price="
+
price
+
"&remark="
+
remarks
;
DIC_DATA_URL
=
DIC_DATA_URL
+
"?id="
+
code
+
"&printStatus="
+
1
+
"&pageSize="
+
pageSize1
+
"&cover="
+
covers
+
"&coverSize="
+
coverSize1
+
"&nevinSize="
+
nevinSize1
+
"&insertSize="
+
insertSize1
+
"&machinetype="
+
machinetype1
+
"&distribution="
+
distribution1
+
"&pagesided="
+
pagesided1
+
"&urgent="
+
urgent
+
"&aggregate="
+
sumprice1
+
"&price="
+
price
+
"&remark="
+
remarks
+
"&neivinColor="
+
neivinColor1
;
}
else
{
if
(
"ECXDLCQT"
.
equals
(
ctpTemplate
.
getTempleteNumber
())){
String
namekeyunitprice
=
master
.
getFormTable
().
getFieldMap4Display
().
get
(
"优惠价"
).
getName
();
...
...
src/main/java/com/seeyon/apps/collaboration/dao/ColDaoImpl.java
View file @
8b960103
...
...
@@ -4211,13 +4211,13 @@ public class ColDaoImpl extends BaseHibernateDao<ColSummary> implements ColDao {
@Override
public
List
<
ColSummary
>
getPrintSummary
(
Integer
generalState
,
Integer
erpState
,
String
startDate
,
String
endDate
)
throws
BusinessException
{
StringBuilder
hql
=
new
StringBuilder
();
hql
.
append
(
"from ColSummary where generalState= :generalState and erpState= :erpState and
CREATE
_DATE >=:startDate "
);
hql
.
append
(
"from ColSummary where generalState= :generalState and erpState= :erpState and
FINISH
_DATE >=:startDate "
);
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"generalState"
,
generalState
);
map
.
put
(
"erpState"
,
erpState
);
map
.
put
(
"startDate"
,
startDate
);
if
(
StringUtils
.
isNotBlank
(
endDate
))
{
hql
.
append
(
"AND
CREATE
_DATE <:endDate"
);
hql
.
append
(
"AND
FINISH
_DATE <:endDate"
);
map
.
put
(
"endDate"
,
endDate
);
}
@SuppressWarnings
(
"unchecked"
)
...
...
@@ -4227,7 +4227,7 @@ public class ColDaoImpl extends BaseHibernateDao<ColSummary> implements ColDao {
@Override
public
void
updateColSummaryGeneralStateBySource
(
String
source
,
Integer
generalState
)
throws
BusinessException
{
String
s
=
"update ColSummary set generalState = :generalState where source = :source "
;
String
s
=
"update ColSummary set generalState = :generalState
,finishDate = NOW()
where source = :source "
;
Map
<
String
,
Object
>
m
=
new
HashMap
<
String
,
Object
>();
m
.
put
(
"source"
,
source
);
m
.
put
(
"generalState"
,
generalState
);
...
...
src/main/java/com/seeyon/apps/timer/FalseDoTimer.java
View file @
8b960103
...
...
@@ -216,6 +216,14 @@ public class FalseDoTimer {
nevinSize1
=
ctpEnumItem
.
getShowvalue
();
}
String
namekeynevinColor
=
master
.
getFormTable
().
getFieldMap4Display
().
get
(
"内页颜色"
).
getName
();
String
neivinColor
=
(
String
)
master
.
getAllDataMap
().
get
(
namekeynevinColor
);
String
neivinColor1
=
null
;
if
(
StringUtils
.
isNotBlank
(
neivinColor
))
{
ctpEnumItem
=
enumManagerNew
.
getEnumItem
(
Long
.
valueOf
(
neivinColor
));
neivinColor1
=
ctpEnumItem
.
getShowvalue
();
}
String
namekeyinsertSize
=
master
.
getFormTable
().
getFieldMap4Display
().
get
(
"插页纸张"
).
getName
();
String
insertSize
=
(
String
)
master
.
getAllDataMap
().
get
(
namekeyinsertSize
);
String
insertSize1
=
null
;
...
...
@@ -247,7 +255,7 @@ public class FalseDoTimer {
totalprice
=
(
BigDecimal
)
master
.
getAllDataMap
().
get
(
namekeyyhprice
);
}
DIC_DATA_URL
=
DIC_DATA_URL
+
"?id="
+
code
+
"&printStatus="
+
1
+
"&pageSize="
+
pageSize1
+
"&cover="
+
covers
+
"&coverSize="
+
coverSize1
+
"&nevinSize="
+
nevinSize1
+
"&insertSize="
+
insertSize1
+
"&machinetype="
+
machinetype1
+
"&distribution="
+
distribution1
+
"&pagesided="
+
pagesided1
+
"&urgent="
+
urgent
+
"&aggregate="
+
totalprice
+
"&price="
+
unitprice
+
"&remark="
+
remarks
;
DIC_DATA_URL
=
DIC_DATA_URL
+
"?id="
+
code
+
"&printStatus="
+
1
+
"&pageSize="
+
pageSize1
+
"&cover="
+
covers
+
"&coverSize="
+
coverSize1
+
"&nevinSize="
+
nevinSize1
+
"&insertSize="
+
insertSize1
+
"&machinetype="
+
machinetype1
+
"&distribution="
+
distribution1
+
"&pagesided="
+
pagesided1
+
"&urgent="
+
urgent
+
"&aggregate="
+
totalprice
+
"&price="
+
unitprice
+
"&remark="
+
remarks
+
"&neivinColor="
+
neivinColor1
;
}
else
{
if
(
"ECXDLCQT"
.
equals
(
ctpTemplate
.
getTempleteNumber
())){
String
namekeyyhprice
=
master
.
getFormTable
().
getFieldMap4Display
().
get
(
"优惠价"
).
getName
();
...
...
src/main/java/com/seeyon/ctp/portal/sso/MySSOLoginHandshake.java
0 → 100644
View file @
8b960103
package
com
.
seeyon
.
ctp
.
portal
.
sso
;
import
com.eetrust.security.plugin.MessageConstants
;
import
com.eetrust.security.plugin.SIDPlugin
;
import
com.seeyon.ctp.common.SystemEnvironment
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.util.StringUtils
;
import
java.io.*
;
import
java.util.Properties
;
public
class
MySSOLoginHandshake
extends
SSOLoginHandshakeAbstract
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
MySSOLoginHandshake
.
class
);
// “ticket” 就是ticket取得的参数值
public
String
handshake
(
String
ticket
)
{
if
(
StringUtils
.
isEmpty
(
ticket
))
{
log
.
error
(
"单点登录缺少登录票据[ticket]信息!"
);
return
null
;
}
// 认证服务器地址
String
authServerIp
=
""
;
// 认证服务器端口
String
authServerPort
=
""
;
// 业务系统编码
String
authAppCode
=
""
;
String
filePath
=
SystemEnvironment
.
getApplicationFolder
()
+
File
.
separator
+
"fkmap"
+
File
.
separator
+
"url.properties"
;
InputStream
in
=
null
;
try
{
in
=
new
BufferedInputStream
(
new
FileInputStream
(
filePath
));
Properties
p
=
new
Properties
();
p
.
load
(
in
);
authServerIp
=
p
.
getProperty
(
"authServerIp"
);
authServerPort
=
p
.
getProperty
(
"authServerPort"
);
authAppCode
=
p
.
getProperty
(
"authAppCode"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
SIDPlugin
sid
=
new
SIDPlugin
(
authServerIp
,
Integer
.
parseInt
(
authServerPort
));
int
result
=
sid
.
Security_VerifyTicket
(
authAppCode
,
ticket
);
if
(
result
==
MessageConstants
.
SECURITY_SERVICE_SUCCESS
)
{
// 票据验证成功, 获取用户唯一标识
String
passport
=
sid
.
getPassport
();
log
.
info
(
"单点登录成功! 用户唯一标识: "
+
passport
);
return
passport
;
}
else
{
// 认证失败, 获取错误编码
String
errorCode
=
sid
.
getErrorCode
();
// 认证失败, 获取错误信息
String
errorMsg
=
sid
.
getErrorMsg
();
log
.
error
(
"单点登录失败! 错误编码: "
+
errorCode
+
", 错误信息: "
+
errorMsg
);
return
null
;
}
}
public
void
logoutNotify
(
String
ticket
)
{
}
}
\ No newline at end of file
src/main/java/com/seeyon/ctp/rest/resources/CollaborationResource.java
View file @
8b960103
...
...
@@ -7843,7 +7843,7 @@ public class CollaborationResource extends BaseResource {
String
value
=
""
;
if
(
key
.
equals
(
"pageSize"
)||
key
.
equals
(
"nevinSize"
)
||
key
.
equals
(
"coverSize"
)||
key
.
equals
(
"insertSize"
)||
key
.
equals
(
"machinetype"
)
||
key
.
equals
(
"sides"
)||
key
.
equals
(
"distribution"
)||
key
.
equals
(
"fileBigType"
)){
||
key
.
equals
(
"sides"
)||
key
.
equals
(
"distribution"
)||
key
.
equals
(
"fileBigType"
)
||
key
.
equals
(
"neivinColor"
)
){
String
enumName
=
""
;
if
(
key
.
equals
(
"pageSize"
))
enumName
=
"开型"
;
...
...
@@ -7861,6 +7861,8 @@ public class CollaborationResource extends BaseResource {
enumName
=
"配送方式"
;
if
(
key
.
equals
(
"fileBigType"
))
enumName
=
"客户印品"
;
if
(
key
.
equals
(
"neivinColor"
))
enumName
=
"内页颜色"
;
Map
<
Long
,
CtpEnumBean
>
enumMap
=
enumManager
.
getAllEnums
();
List
<
CtpEnumItem
>
items
=
new
ArrayList
<>();
for
(
CtpEnumBean
enumBean:
enumMap
.
values
())
{
...
...
src/main/webapp/WEB-INF/cfgHome/plugin/sample/pluginCfg.xml
0 → 100644
View file @
8b960103
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>
sample
</id>
<name>
单点登录
</name>
<category>
759433
</category>
</plugin>
\ No newline at end of file
src/main/webapp/WEB-INF/cfgHome/plugin/sample/spring/SSOLoginContext.xml
0 → 100644
View file @
8b960103
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans
default-autowire=
"byName"
>
<bean
id=
"sample"
class=
"com.seeyon.ctp.portal.sso.SSOLoginContext"
>
<property
name=
"name"
value=
"sample"
/>
<!-- 单点登录成功是否跳转到首页 -->
<property
name=
"forward"
value=
"true"
/>
<!-- 握手配置 -->
<!-- <property name="handshake">-->
<!-- 使用系统实现的缺省握手类 -->
<!-- <bean class="com.seeyon.ctp.portal.sso.SSOLoginHandshakeServletImpl">-->
<!-- <!– 第三方系统页面,传入ticket,返回协同登录名 –>-->
<!-- <property name="url" value="http://第三方系统:8080/checkTicket"/>-->
<!-- <!– 第三方系统页面单点登录登出地址 –>-->
<!-- <property name="logoutUrl" value="http://第三方系统:8080/ssologout"/>-->
<!-- </bean>-->
<!-- </property>-->
<!-- <property name="name" value="sample"/>-->
<!-- <property name="forward" value="true"/>-->
<!-- <property name="ticketName" value="ticket" />-->
<property
name=
"handshake"
>
<!-- 使用自己的握手实现 -->
<bean
class=
"com.seeyon.ctp.portal.sso.MySSOLoginHandshake"
/>
</property>
</bean>
</beans>
\ No newline at end of file
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