Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
ddca8ec8
Commit
ddca8ec8
authored
Sep 25, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.售后服务功能
parent
87972b63
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
373 additions
and
64 deletions
+373
-64
DaoUtils.java
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
+5
-5
HpFwSqlConstant.java
...ava/com/baosight/hpjx/hp/fw/constant/HpFwSqlConstant.java
+2
-0
HPFW001.java
src/main/java/com/baosight/hpjx/hp/fw/domain/HPFW001.java
+9
-9
ServiceHPFW001.java
.../java/com/baosight/hpjx/hp/fw/service/ServiceHPFW001.java
+119
-11
ServiceHPFW001B.java
...java/com/baosight/hpjx/hp/fw/service/ServiceHPFW001B.java
+7
-4
HPFW001.xml
src/main/java/com/baosight/hpjx/hp/fw/sql/HPFW001.xml
+39
-16
HpFwTools.java
src/main/java/com/baosight/hpjx/hp/fw/tools/HpFwTools.java
+37
-1
HpFwUtils.java
src/main/java/com/baosight/hpjx/hp/fw/utils/HpFwUtils.java
+18
-0
index.jsp
.../resources/META-INF/resources/WEB-INF/fragments/index.jsp
+124
-0
iPlatV7-login.js
src/main/resources/META-INF/resources/iPlatV7-login.js
+0
-0
iPlatV7-login.jsp
src/main/resources/META-INF/resources/iPlatV7-login.jsp
+1
-1
HPFW001.js
src/main/webapp/HP/FW/HPFW001.js
+1
-1
HPFW001B.js
src/main/webapp/HP/FW/HPFW001B.js
+11
-16
No files found.
src/main/java/com/baosight/hpjx/core/dao/DaoUtils.java
View file @
ddca8ec8
package
com
.
baosight
.
hpjx
.
core
.
dao
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
...
...
@@ -88,7 +87,7 @@ public class DaoUtils {
}
try
{
BeanUtils
.
setProperty
(
bean
,
"createdBy"
,
userId
);
BeanUtils
.
setProperty
(
bean
,
"updatedBy"
,
""
);
BeanUtils
.
setProperty
(
bean
,
"updatedBy"
,
userId
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人ID失败"
,
e
);
}
...
...
@@ -101,7 +100,7 @@ public class DaoUtils {
userName
=
"System"
;
}
BeanUtils
.
setProperty
(
bean
,
"createdName"
,
userName
);
BeanUtils
.
setProperty
(
bean
,
"updatedName"
,
""
);
BeanUtils
.
setProperty
(
bean
,
"updatedName"
,
userName
);
}
catch
(
Exception
e
)
{
log
.
warn
(
"写入创建人姓名失败"
,
e
);
}
...
...
@@ -123,8 +122,9 @@ public class DaoUtils {
}
// 创建时刻
try
{
BeanUtils
.
setProperty
(
bean
,
"createdTime"
,
DateUtils
.
shortDateTime
());
BeanUtils
.
setProperty
(
bean
,
"updatedTime"
,
""
);
String
dateTime
=
DateUtils
.
shortDateTime
();
BeanUtils
.
setProperty
(
bean
,
"createdTime"
,
dateTime
);
BeanUtils
.
setProperty
(
bean
,
"updatedTime"
,
dateTime
);
}
catch
(
Exception
e
)
{
log
.
error
(
"写入创建时刻失败:{}"
,
e
.
getMessage
(),
e
);
}
...
...
src/main/java/com/baosight/hpjx/hp/fw/constant/HpFwSqlConstant.java
View file @
ddca8ec8
...
...
@@ -14,6 +14,8 @@ public class HpFwSqlConstant {
// 锁
public
static
final
String
LOCK
=
"HPFW001.lock"
;
// 修改
public
static
final
String
UPDATE_DEAL
=
"HPFW001.updateDeal"
;
}
}
src/main/java/com/baosight/hpjx/hp/fw/domain/HPFW001.java
View file @
ddca8ec8
...
...
@@ -61,11 +61,11 @@ public class HPFW001 extends DaoEPBase {
public
static
final
String
COL_DEAL_USER_ID
=
"DEAL_USER_ID"
;
/* 处理人ID*/
public
static
final
String
COL_DEAL_USER_NAME
=
"DEAL_USER_NAME"
;
/* 处理人名称*/
public
static
final
String
QUERY
=
"
t_hpfw
001.query"
;
public
static
final
String
COUNT
=
"
t_hpfw
001.count"
;
public
static
final
String
INSERT
=
"
t_hpfw
001.insert"
;
public
static
final
String
UPDATE
=
"
t_hpfw
001.update"
;
public
static
final
String
DELETE
=
"
t_hpfw
001.delete"
;
public
static
final
String
QUERY
=
"
HPFW
001.query"
;
public
static
final
String
COUNT
=
"
HPFW
001.count"
;
public
static
final
String
INSERT
=
"
HPFW
001.insert"
;
public
static
final
String
UPDATE
=
"
HPFW
001.update"
;
public
static
final
String
DELETE
=
"
HPFW
001.delete"
;
private
Long
id
=
new
Long
(
0
);
/* ID*/
private
String
companyCode
=
" "
;
/* 公司编码*/
...
...
@@ -76,7 +76,7 @@ public class HPFW001 extends DaoEPBase {
private
String
updatedBy
=
" "
;
/* 修改人*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedTime
=
" "
;
/* 修改时间*/
private
Boolean
deleteFlag
;
/* 是否删除 0-否1-是*/
private
Integer
deleteFlag
;
/* 是否删除 0-否1-是*/
private
Integer
status
=
new
Integer
(
0
);
/* 维修状态 0-未处理 1-已维修*/
private
String
afterSaleDate
=
" "
;
/* 售后日期*/
private
String
afterSaleNo
=
" "
;
/* 售后单号*/
...
...
@@ -328,7 +328,7 @@ public class HPFW001 extends DaoEPBase {
* get the deleteFlag - 是否删除 0-否1-是.
* @return the deleteFlag
*/
public
Boolean
getDeleteFlag
()
{
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
}
...
...
@@ -337,7 +337,7 @@ public class HPFW001 extends DaoEPBase {
*
* @param deleteFlag - 是否删除 0-否1-是
*/
public
void
setDeleteFlag
(
Boolean
deleteFlag
)
{
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
/**
...
...
@@ -501,7 +501,7 @@ public class HPFW001 extends DaoEPBase {
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
to
Boolean
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setDeleteFlag
(
NumberUtils
.
to
Integer
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setAfterSaleDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AFTER_SALE_DATE
)),
afterSaleDate
));
setAfterSaleNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AFTER_SALE_NO
)),
afterSaleNo
));
...
...
src/main/java/com/baosight/hpjx/hp/fw/service/ServiceHPFW001.java
View file @
ddca8ec8
package
com
.
baosight
.
hpjx
.
hp
.
fw
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.co
mmon.DdynamicEnum
;
import
com.baosight.hpjx.co
re.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.fw.constant.HpFwConstant
;
import
com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant
;
import
com.baosight.hpjx.hp.fw.domain.HPFW001
;
import
com.baosight.hpjx.hp.
xs.domain.HPXS006
;
import
com.baosight.hpjx.util.
CommonMethod
;
import
com.baosight.hpjx.hp.
fw.utils.HpFwUtils
;
import
com.baosight.hpjx.util.
AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -54,11 +51,122 @@ public class ServiceHPFW001 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"售后维修"
,
operType
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
super
.
query
(
inInfo
,
HPFW001
.
QUERY
,
new
HPFW001
());
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
HPFW001
.
FIELD_AFTER_SALE_DATE
,
DateUtils
.
formatShort
(
queryMap
.
get
(
HPFW001
.
FIELD_AFTER_SALE_DATE
)));
inInfo
=
super
.
query
(
inInfo
,
HPFW001
.
QUERY
,
new
HPFW001
());
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"客户回访"
,
operType
=
"删除"
)
public
EiInfo
remove
(
EiInfo
inInfo
)
{
try
{
List
<
HPFW001
>
fFw001s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPFW001
.
class
);
// db数据
Map
<
String
,
HPFW001
>
dbFw001Map
=
HpFwUtils
.
HpFw001
.
lockAndGet
(
fFw001s
);
// 数据校验
this
.
checkRemoveData
(
fFw001s
,
dbFw001Map
);
// 保存数据
this
.
removeData
(
fFw001s
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fFw001s
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"删除失败"
);
}
return
inInfo
;
}
/**
* 数据校验
*
* @param fFw001s
* @param dbFw001Map
*/
private
void
checkRemoveData
(
List
<
HPFW001
>
fFw001s
,
Map
<
String
,
HPFW001
>
dbFw001Map
)
{
for
(
HPFW001
fFw001
:
fFw001s
)
{
String
afterSaleNo
=
fFw001
.
getAfterSaleNo
();
HPFW001
dbFw001
=
dbFw001Map
.
get
(
afterSaleNo
);
AssertUtils
.
isNull
(
dbFw001
,
String
.
format
(
"售后服务单[%s]不存在"
,
afterSaleNo
));
AssertUtils
.
isNotEquals
(
HpFwConstant
.
HpFw001
.
Status
.
S0
,
dbFw001
.
getStatus
(),
String
.
format
(
"售后服务单[%s]状态不是\"待处理\",不允许操作"
,
afterSaleNo
));
}
}
/**
* 数据保存
*
* @param fFw001s
*/
private
void
removeData
(
List
<
HPFW001
>
fFw001s
)
{
for
(
HPFW001
fFw001
:
fFw001s
)
{
fFw001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HPFW001
.
DELETE
,
fFw001
.
toMap
());
}
}
/**
* 处理
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"客户回访"
,
operType
=
"审核"
)
public
EiInfo
check
(
EiInfo
inInfo
)
{
try
{
List
<
HPFW001
>
fFw001s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HPFW001
.
class
);
// db数据
Map
<
String
,
HPFW001
>
dbFw001Map
=
HpFwUtils
.
HpFw001
.
lockAndGet
(
fFw001s
);
// 数据校验
this
.
checkCheckData
(
fFw001s
,
dbFw001Map
);
// 保存数据
this
.
checkData
(
fFw001s
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fFw001s
.
size
()
+
"]条数据处理成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"处理失败"
);
}
return
inInfo
;
}
/**
* 数据校验
*
* @param fFw001s
* @param dbFw001Map
*/
private
void
checkCheckData
(
List
<
HPFW001
>
fFw001s
,
Map
<
String
,
HPFW001
>
dbFw001Map
)
{
for
(
HPFW001
fFw001
:
fFw001s
)
{
String
afterSaleNo
=
fFw001
.
getAfterSaleNo
();
HPFW001
dbFw001
=
dbFw001Map
.
get
(
afterSaleNo
);
AssertUtils
.
isNull
(
dbFw001
,
String
.
format
(
"售后服务单[%s]不存在"
,
afterSaleNo
));
AssertUtils
.
isNotEquals
(
HpFwConstant
.
HpFw001
.
Status
.
S0
,
dbFw001
.
getStatus
(),
String
.
format
(
"售后服务单[%s]状态不是\"待处理\",不允许操作"
,
afterSaleNo
));
}
}
/**
* 数据保存
*
* @param fFw001s
*/
private
void
checkData
(
List
<
HPFW001
>
fFw001s
)
{
for
(
HPFW001
fFw001
:
fFw001s
)
{
fFw001
.
setStatus
(
HpFwConstant
.
HpFw001
.
Status
.
S1
);
fFw001
.
setDealUserId
(
UserSessionUtils
.
getLoginName
());
fFw001
.
setDealUserName
(
UserSessionUtils
.
getLoginCName
());
DaoUtils
.
update
(
HpFwSqlConstant
.
HpFw001
.
UPDATE_DEAL
,
fFw001
.
toMap
());
}
}
}
src/main/java/com/baosight/hpjx/hp/fw/service/ServiceHPFW001B.java
View file @
ddca8ec8
...
...
@@ -84,6 +84,7 @@ public class ServiceHPFW001B extends ServiceEPBase {
private
void
add
(
HPFW001
fFw001
)
{
fFw001
.
setAfterSaleNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
AFTER_SALE_NO
));
fFw001
.
setStatus
(
HpFwConstant
.
HpFw001
.
Status
.
S0
);
fFw001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPFW001
.
INSERT
,
fFw001
);
}
...
...
@@ -94,7 +95,7 @@ public class ServiceHPFW001B extends ServiceEPBase {
*/
private
void
modify
(
HPFW001
fFw001
)
{
HPFW001
dbFw001
=
HpFwUtils
.
HpFw001
.
lockAndGet
(
fFw001
);
this
.
checkData
(
dbFw001
);
this
.
checkData
(
fFw001
,
dbFw001
);
DaoUtils
.
update
(
HPFW001
.
UPDATE
,
fFw001
);
}
...
...
@@ -118,13 +119,15 @@ public class ServiceHPFW001B extends ServiceEPBase {
/**
* 数据校验
*
* @param fFw001
* @param dbFw001
*/
private
void
checkData
(
HPFW001
dbFw001
)
{
private
void
checkData
(
HPFW001
fFw001
,
HPFW001
dbFw001
)
{
AssertUtils
.
isNull
(
dbFw001
,
String
.
format
(
"售后服务单【%s】不存在"
,
fFw001
.
getAfterSaleNo
()));
AssertUtils
.
isNotEquals
(
dbFw001
.
getDeleteFlag
(),
CommonConstant
.
YesNo
.
NO_0
,
String
.
format
(
"
回访
单【%s】不是\"未删除\"状态,不允许操作"
,
dbFw001
.
getAfterSaleNo
()));
String
.
format
(
"
售后服务
单【%s】不是\"未删除\"状态,不允许操作"
,
dbFw001
.
getAfterSaleNo
()));
AssertUtils
.
isNotEquals
(
dbFw001
.
getStatus
(),
HpFwConstant
.
HpFw001
.
Status
.
S0
,
String
.
format
(
"
回访
单【%s】不是\"待回访\"状态,不允许操作"
,
dbFw001
.
getAfterSaleNo
()));
String
.
format
(
"
售后服务
单【%s】不是\"待回访\"状态,不允许操作"
,
dbFw001
.
getAfterSaleNo
()));
}
}
src/main/java/com/baosight/hpjx/hp/fw/sql/HPFW001.xml
View file @
ddca8ec8
...
...
@@ -25,9 +25,8 @@
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
AND DELETE_FLAG = 0
<include
refid=
"idCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
...
...
@@ -52,18 +51,12 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"afterSaleDate"
>
AFTER_SALE_DATE = #afterSaleDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"afterSaleNo"
>
AFTER_SALE_NO = #afterSaleNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"afterSaleType"
>
AFTER_SALE_TYPE = #afterSaleType#
</isNotEmpty>
...
...
@@ -74,16 +67,31 @@
CUSTOM_ID = #customId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"customName"
>
CUSTOM_NAME
= #customName#
CUSTOM_NAME
LIKE CONCAT('%', #customName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"dealUserId"
>
DEAL_USER_ID = #dealUserId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"dealUserName"
>
DEAL_USER_NAME
= #dealUserName#
DEAL_USER_NAME
LIKE CONCAT('%', #dealUserName#, '%')
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"afterSaleNo"
>
AFTER_SALE_NO = #afterSaleNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"afterSaleNos"
>
AFTER_SALE_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"afterSaleNos"
>
#afterSaleNos[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
...
...
@@ -135,22 +143,37 @@
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hpjxSchema}.T_HPFW001 WHERE ID = #id
#
UPDATE ${hpjxSchema}.T_HPFW001 SET DELETE_FLAG = 1 WHERE AFTER_SALE_NO = #afterSaleNo
#
</delete>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPFW001
SET
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 修改时间 -->
AFTER_SALE_DATE = #afterSaleDate#,
<!-- 售后日期 -->
AFTER_SALE_TYPE = #afterSaleType#,
<!-- 售后方式 -->
URGENCY = #urgency#,
<!-- 紧急程度 -->
CUSTOM_ID = #customId#,
<!-- 客户ID -->
CUSTOM_NAME = #customName#,
<!-- 客户名称 -->
<include
refid=
"SqlBase.updateRevise"
/>
WHERE AFTER_SALE_NO = #afterSaleNo#
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
UPDATE ${hpjxSchema}.T_HPFW001
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
<!-- 修改 -->
<update
id=
"updateDeal"
>
UPDATE ${hpjxSchema}.T_HPFW001
SET
STATUS = #status#,
DEAL_USER_ID = #dealUserId#,
<!-- 处理人ID -->
DEAL_USER_NAME = #dealUserName#
<!-- 处理人名称 -->
DEAL_USER_NAME = #dealUserName#,
<!-- 处理人名称 -->
<include
refid=
"SqlBase.updateRevise"
/>
WHERE AFTER_SALE_NO = #afterSaleNo#
</update>
...
...
src/main/java/com/baosight/hpjx/hp/fw/tools/HpFwTools.java
View file @
ddca8ec8
...
...
@@ -4,12 +4,12 @@ import com.baosight.hpjx.core.dao.DaoBase;
import
com.baosight.hpjx.hp.fw.constant.HpFwSqlConstant
;
import
com.baosight.hpjx.hp.fw.domain.HPFW001
;
import
com.baosight.hpjx.util.AssertUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author:songx
...
...
@@ -36,6 +36,18 @@ public class HpFwTools {
}
/**
* 锁.
*
* @param afterSaleNos
*/
public
static
void
lock
(
List
<
String
>
afterSaleNos
)
{
AssertUtils
.
isEmpty
(
afterSaleNos
,
"售后单号不能为空!"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"afterSaleNos"
,
afterSaleNos
);
DaoBase
.
getInstance
().
update
(
HpFwSqlConstant
.
HpFw001
.
LOCK
,
paramMap
);
}
/**
* 查询
*
* @param afterSaleNo
...
...
@@ -49,6 +61,30 @@ public class HpFwTools {
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 查询
*
* @param afterSaleNos
* @return
*/
public
static
List
<
HPFW001
>
list
(
List
<
String
>
afterSaleNos
)
{
AssertUtils
.
isEmpty
(
afterSaleNos
,
"售后服务单号不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"afterSaleNos"
,
afterSaleNos
);
return
DaoBase
.
getInstance
().
query
(
HPFW001
.
QUERY
,
paramMap
);
}
/**
* 查询
*
* @param afterSaleNos
* @return
*/
public
static
Map
<
String
,
HPFW001
>
map
(
List
<
String
>
afterSaleNos
)
{
List
<
HPFW001
>
results
=
list
(
afterSaleNos
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HPFW001:
:
getAfterSaleNo
,
item
->
item
));
}
}
}
src/main/java/com/baosight/hpjx/hp/fw/utils/HpFwUtils.java
View file @
ddca8ec8
...
...
@@ -2,6 +2,10 @@ package com.baosight.hpjx.hp.fw.utils;
import
com.baosight.hpjx.hp.fw.domain.HPFW001
;
import
com.baosight.hpjx.hp.fw.tools.HpFwTools
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author:songx
...
...
@@ -18,6 +22,20 @@ public class HpFwUtils {
/**
* 锁并获取数据
*
* @param fFw001s
* @return
*/
public
static
Map
<
String
,
HPFW001
>
lockAndGet
(
List
<
HPFW001
>
fFw001s
)
{
List
<
String
>
afterSaleNos
=
ObjectUtils
.
listEpKey
(
fFw001s
,
HPFW001
.
FIELD_AFTER_SALE_NO
);
// 锁
HpFwTools
.
HpFw001
.
lock
(
afterSaleNos
);
// 查询数据
return
HpFwTools
.
HpFw001
.
map
(
afterSaleNos
);
}
/**
* 锁并获取数据
*
* @param fFw001
* @return
*/
...
...
src/main/resources/META-INF/resources/WEB-INF/fragments/index.jsp
0 → 100644
View file @
ddca8ec8
<
%@
page
import=
"com.baosight.iplat4j.core.ei.EiInfo"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.log.Logger"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.log.LoggerFactory"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.ei.EiConstant"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext"
%
>
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<
%
final
Logger
logger =
LoggerFactory.getLogger("index");
//门户插件跳转逻辑
String
loginName =
UserSession.getLoginName()==null?
"
admin
"
:UserSession
.
getLoginName
();
String
userId =
UserSession.getUserUuid();
String
url =
""
;
String
frameOpenWeb =
""
;
String
frameOpenCname =
""
;
try
{
EiInfo
setInfo =
new
EiInfo
();
setInfo
.
set
("
username
",
loginName
);
setInfo
.
set
(
EiConstant
.
serviceName
,
"
EDPR00
");
setInfo
.
set
(
EiConstant
.
methodName
,
"
queryIndexPageUrl
");
logger
.
info
("
loginName
"
+
loginName
);
logger
.
info
("调用
EDPR00
.
queryIndexPageUrl
!");
EiInfo
getInfo =
XLocalManager.call(setInfo);
int
status =
getInfo.getStatus();
if
(
status
<
0
){
logger
.
error
("配置首页获取失败
:
调用
EDPR00
.
queryIndexPageUrl
失败!"
+
getInfo
.
getMsg
());
}
else
{
if
("
1
".
equals
(
getInfo
.
get
("
enableStatus
"))){
if
("
openSeparately
".
equals
(
getInfo
.
get
("
openWith
"))){
url =
getInfo.get("url")
+
"";
}
else
{
frameOpenWeb =
getInfo.get("url").toString();
frameOpenCname =
getInfo.get("formCname").toString();
}
}
}
}
catch
(
Exception
e
)
{
logger
.
error
("配置首页获取失败!"
+
e
.
getMessage
(),
e
);
}
//以上门户插件跳转逻辑
//设置
session
过期时间
HttpSession
currentSession =
request.getSession();
String
sessionTimeout=
PlatApplicationContext.getProperty("iplat4j.ui.sessionTimeout");
if
(!
sessionTimeout
.
isEmpty
()){
if
(
-1=
=Integer.valueOf(sessionTimeout)){
currentSession
.
setMaxInactiveInterval
(
-1
);
}
else
{
Integer
sessionTimeoutNumber =
Integer.valueOf(sessionTimeout)*60;
currentSession
.
setMaxInactiveInterval
(
sessionTimeoutNumber
);
}
//
获取会话的最大非活动间隔时间(单位为秒)
int
maxInactiveInterval =
currentSession.getMaxInactiveInterval();
int
maxInactiveIntervalMinutes =
maxInactiveInterval
/
60
;
logger
.
info
("获取会话的最大非活动间隔时间(单位为秒)!"+
maxInactiveInterval
);
}
String
ip=
""
;
if
(
request
.
getHeader
("
x-forwarded-for
")
==
null
)
{
ip=
request.getRemoteAddr();
}
else
{
ip=
request.getHeader("x-forwarded-for");
}
%
>
<c:set
var=
"url"
value=
"<%=url%>"
/>
<c:set
var=
"frameOpenWeb"
value=
"<%=frameOpenWeb%>"
/>
<c:set
var=
"frameOpenCname"
value=
"<%=frameOpenCname%>"
/>
<c:set
var=
"ip"
value=
"<%=ip%>"
/>
<html
lang=
"zh"
>
<head>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<title></title>
</head>
<body>
</body>
<script
type=
"text/javascript"
>
var
load_time
=
new
Date
();
var
load_label
=
"indexReal"
+
load_time
.
getTime
();
let
url
=
"${url}"
;
let
frameOpenWeb
=
"${frameOpenWeb}"
;
let
frameOpenCname
=
"${frameOpenCname}"
console
.
log
(
"redirect to "
+
url
);
var
userId
=
'<%=userId%>'
;
var
loginName
=
'<%=loginName%>'
;
let
ip
=
"${ip}"
;
sessionStorage
.
setItem
(
"userId"
,
userId
);
sessionStorage
.
setItem
(
"loginName"
,
loginName
);
sessionStorage
.
setItem
(
"ip"
,
ip
);
if
(
url
!=
null
&&
url
!=
""
)
{
window
.
location
.
href
=
'${ctx}/web/'
+
url
;
sessionStorage
.
removeItem
(
"frameOpenWeb"
);
sessionStorage
.
removeItem
(
"frameOpenCname"
);
}
else
{
if
(
frameOpenWeb
!=
null
&&
frameOpenWeb
!=
""
){
sessionStorage
.
setItem
(
"frameOpenWeb"
,
frameOpenWeb
);
sessionStorage
.
setItem
(
"frameOpenCname"
,
frameOpenCname
);
}
else
{
sessionStorage
.
removeItem
(
"frameOpenWeb"
);
sessionStorage
.
removeItem
(
"frameOpenCname"
);
}
window
.
location
.
href
=
'${ctx}/iPlatV7-index.jsp'
;
}
</script>
</html>
src/main/resources/META-INF/resources/iPlatV
6
-login.js
→
src/main/resources/META-INF/resources/iPlatV
7
-login.js
View file @
ddca8ec8
File moved
src/main/resources/META-INF/resources/iPlatV
6
-login.jsp
→
src/main/resources/META-INF/resources/iPlatV
7
-login.jsp
View file @
ddca8ec8
...
...
@@ -132,7 +132,7 @@
<script src="${iPlatStaticURL}/iplatui/assets/js/polyfills/iplat.ui.ie8.polyfills.min.js"></script>
<![endif]-->
<script
src=
"${iPlatStaticURL}/iPlatV
6
-login.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV
7
-login.js"
></script>
<
%
--
引入
RSA
加密
js--
%
>
<script
src=
"${iPlatStaticURL}/iplatui/js/jsencrypt.js"
></script>
<
%
...
...
src/main/webapp/HP/FW/HPFW001.js
View file @
ddca8ec8
...
...
@@ -43,7 +43,7 @@ $(function () {
* 页面加载完成
*/
$
(
window
).
load
(
function
()
{
// 查
// 查
询
query
();
});
...
...
src/main/webapp/HP/FW/HPFW001B.js
View file @
ddca8ec8
$
(
function
()
{
IPLATUI
.
EFSelect
=
{
"result-0-c
ompanyCode
"
:
{
select
:
function
(
e
)
{
//获取勾选值
"result-0-c
ustomId
"
:
{
select
:
function
(
e
)
{
var
dataItem
=
e
.
dataItem
;
var
valueField
=
dataItem
[
'valueField'
];
var
textField
=
dataItem
[
'textField'
];
if
(
valueField
)
{
textField
=
textField
.
indexOf
(
"-"
)
>
-
1
?
textField
.
split
(
"-"
)[
1
]
:
textField
;
$
(
"#result-0-c
ompany
Name"
).
val
(
textField
);
$
(
"#result-0-c
ustom
Name"
).
val
(
textField
);
}
else
{
$
(
"#result-0-c
ompany
Name"
).
val
(
""
);
$
(
"#result-0-c
ustom
Name"
).
val
(
""
);
}
}
}
...
...
@@ -42,24 +42,19 @@ $(function () {
* 保存
*/
let
save
=
function
()
{
let
companyCode
=
$
(
"#result-0-companyCod
e"
).
val
();
if
(
isBlank
(
companyCod
e
))
{
message
(
"
企业名称
不能为空"
);
let
afterSaleDate
=
$
(
"#result-0-afterSaleDat
e"
).
val
();
if
(
isBlank
(
afterSaleDat
e
))
{
message
(
"
售后日期
不能为空"
);
return
;
}
let
folDate
=
$
(
"#result-0-folDate"
).
val
();
if
(
isBlank
(
folDate
))
{
message
(
"回访日期不能为空"
);
return
;
}
let
folType
=
$
(
"#result-0-folType"
).
val
();
if
(
isBlank
(
folType
))
{
message
(
"回访方式不能为空"
);
let
afterSaleType
=
$
(
"#result-0-afterSaleType"
).
val
();
if
(
isBlank
(
afterSaleType
))
{
message
(
"售后方式不能为空"
);
return
;
}
JSUtils
.
confirm
(
"确定对数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
""
,
"H
GXS007
B"
,
"save"
,
true
,
function
(
res
)
{
JSUtils
.
submitGridsData
(
""
,
"H
PFW001
B"
,
"save"
,
true
,
function
(
res
)
{
if
(
res
.
status
>
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
(
res
);
}
else
{
...
...
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