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
54182c7d
Commit
54182c7d
authored
Aug 12, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.客户回访新增附件上传和下载功能
parent
d9940577
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
562 additions
and
58 deletions
+562
-58
CommonConstant.java
.../java/com/baosight/hpjx/core/constant/CommonConstant.java
+17
-1
SqlBase.xml
src/main/java/com/baosight/hpjx/core/dao/SqlBase.xml
+49
-0
ServiceHPPZ009A.java
...java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009A.java
+2
-2
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+1
-3
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+2
-9
ServiceHPSC002B.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002B.java
+1
-2
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+1
-8
ServiceHPSC102.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC102.java
+1
-2
HPXS007A.java
src/main/java/com/baosight/hpjx/hp/xs/domain/HPXS007A.java
+0
-0
ServiceHPXS003.java
.../java/com/baosight/hpjx/hp/xs/service/ServiceHPXS003.java
+1
-11
ServiceHPXS007A.java
...java/com/baosight/hpjx/hp/xs/service/ServiceHPXS007A.java
+110
-0
HPXS007A.xml
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS007A.xml
+152
-0
ServiceHPZL001A.java
...java/com/baosight/hpjx/hp/zl/service/ServiceHPZL001A.java
+1
-5
MapUtils.java
src/main/java/com/baosight/hpjx/util/MapUtils.java
+55
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+15
-0
HPXS007.js
src/main/webapp/HP/XS/HPXS007.js
+16
-1
HPXS007A.js
src/main/webapp/HP/XS/HPXS007A.js
+106
-0
HPXS007A.jsp
src/main/webapp/HP/XS/HPXS007A.jsp
+30
-0
HPXS099.js
src/main/webapp/HP/XS/HPXS099.js
+0
-4
HPXS099.jsp
src/main/webapp/HP/XS/HPXS099.jsp
+2
-10
No files found.
src/main/java/com/baosight/hpjx/core/constant/CommonConstant.java
View file @
54182c7d
...
...
@@ -12,7 +12,7 @@ public class CommonConstant {
* @author:songx
* @date:2024/1/20,15:04
*/
public
static
class
p
rojectEnv
{
public
static
class
P
rojectEnv
{
// 开发环境
public
static
final
String
DEV
=
"dev"
;
...
...
@@ -73,4 +73,20 @@ public class CommonConstant {
// 项目档案ID
public
static
final
String
PROJ_ID
=
"projId"
;
}
/**
* 环境变量
*
* @author:songx
* @date:2024/1/20,15:04
*/
public
static
class
FileLocation
{
// 本地
public
static
final
String
LOCAL
=
"local"
;
// S3
public
static
final
String
S3
=
"s3"
;
}
}
src/main/java/com/baosight/hpjx/core/dao/SqlBase.xml
0 → 100644
View file @
54182c7d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"SqlBase"
>
<!-- 规格 -->
<sql
id=
"specCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
<isEqual
property=
"spec"
compareValue=
"无规格"
>
SPEC_ID IN (SELECT ID FROM ${metaSchema}.HGPZ005 WHERE SPEC = '')
</isEqual>
<isNotEqual
property=
"spec"
compareValue=
"无规格"
>
SPEC_ID IN (SELECT ID FROM ${metaSchema}.HGPZ005 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
</sql>
<!-- 创建时间 -->
<sql
id=
"createdTimeCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME
>
= #createdTimeFrom#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeTo"
>
CREATED_TIME
<
= #createdTimeTo#
</isNotEmpty>
</sql>
<!-- 权限校验 -->
<sql
id=
"authCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCodes"
>
DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"depCodes"
>
#depCodes[]#
</iterate>
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
</sql>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009A.java
View file @
54182c7d
...
...
@@ -54,7 +54,7 @@ public class ServiceHPPZ009A extends ServiceEPBase {
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
p
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
P
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPPZ009A.queryRun"
,
new
HPPZ009A
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPPZ009A.queryDev"
,
new
HPPZ009A
());
...
...
@@ -132,7 +132,7 @@ public class ServiceHPPZ009A extends ServiceEPBase {
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HPPZ009A
.
FIELD_DOC_ID
,
list
.
get
(
0
).
getDocId
());
//获取文档信息
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
54182c7d
...
...
@@ -6,9 +6,7 @@ import com.baosight.hpjx.core.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.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
...
...
@@ -975,7 +973,7 @@ public class ServiceHPSC002 extends ServiceBase {
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HPSC002A
.
FIELD_DOC_ID
,
hpds002
.
getDocId
());
//获取文档信息
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
54182c7d
...
...
@@ -4,11 +4,7 @@ import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
import
com.baosight.hpjx.hp.zl.domain.HPZL001A
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.FileUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.ProjectInfo
;
...
...
@@ -17,10 +13,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -73,7 +66,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
p
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
P
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002A.queryRun"
,
new
HPSC002A
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002A.queryDev"
,
new
HPSC002A
());
...
...
@@ -148,7 +141,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
String
realPath
=
list
.
get
(
0
).
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HPSC002A
.
FIELD_DOC_ID
,
list
.
get
(
0
).
getDocId
());
//获取文档信息
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002B.java
View file @
54182c7d
...
...
@@ -6,7 +6,6 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002B
;
import
com.baosight.hpjx.hp.zl.domain.HPZL001A
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.ProjectInfo
;
...
...
@@ -63,7 +62,7 @@ public class ServiceHPSC002B extends ServiceEPBase {
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
p
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
P
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002B.queryRun"
,
new
HPSC002B
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002B.queryDev"
,
new
HPSC002B
());
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
54182c7d
...
...
@@ -3,18 +3,13 @@ package com.baosight.hpjx.hp.sc.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.HPConstants
;
import
com.baosight.hpjx.common.ProdOrderStatusEnum
;
import
com.baosight.hpjx.core.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.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ002
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ011
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.hp.sc.tools.HPSCTools
;
import
com.baosight.hpjx.hp.xs.domain.Org
;
import
com.baosight.hpjx.hp.xs.tools.HPXSTools
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.contants.ACConstants
;
...
...
@@ -26,13 +21,11 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -445,7 +438,7 @@ public class ServiceHPSC006 extends ServiceBase {
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HPSC002A
.
FIELD_DOC_ID
,
hpds002
.
getDocId
());
//获取文档信息
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC102.java
View file @
54182c7d
...
...
@@ -7,7 +7,6 @@ import com.baosight.hpjx.core.dao.DaoUtils;
import
com.baosight.hpjx.core.enums.OrgTypeEnum
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
...
...
@@ -990,7 +989,7 @@ public class ServiceHPSC102 extends ServiceEPBase {
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HPSC002A
.
FIELD_DOC_ID
,
hpds002
.
getDocId
());
//获取文档信息
...
...
src/main/java/com/baosight/hpjx/hp/xs/domain/HPXS007A.java
0 → 100644
View file @
54182c7d
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/xs/service/ServiceHPXS003.java
View file @
54182c7d
...
...
@@ -2,9 +2,7 @@ package com.baosight.hpjx.hp.xs.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.ds.domain.HPDS002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.xs.domain.HPXS003
;
...
...
@@ -20,16 +18,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.soa.XServiceManager
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.jsp.PageContext
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -164,7 +154,7 @@ public class ServiceHPXS003 extends ServiceEPBase {
String
realPath
=
hpds002
.
getRealPath
();
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
p
rojectEnv
.
RUN
))
{
if
(
projectEnv
.
equals
(
CommonConstant
.
P
rojectEnv
.
RUN
))
{
EiInfo
queryInfo
=
new
EiInfo
();
queryInfo
.
set
(
HPSC002A
.
FIELD_DOC_ID
,
hpds002
.
getDocId
());
//获取文档信息
...
...
src/main/java/com/baosight/hpjx/hp/xs/service/ServiceHPXS007A.java
0 → 100644
View file @
54182c7d
package
com
.
baosight
.
hpjx
.
hp
.
xs
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.constant.S3Constant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.utils.Iplat4jUtils
;
import
com.baosight.hpjx.hp.xs.domain.HPXS007A
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.hpjx.util.StringUtils
;
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.ServiceEPBase
;
import
java.util.List
;
/**
* @author:songx
* @date:2024/1/25,15:25
*/
public
class
ServiceHPXS007A
extends
ServiceEPBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"查询"
,
operDesc
=
"客户回访-附件清单-初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPXS007A
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"查询"
,
operDesc
=
"客户回访-附件清单-查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
// 文件存储位置
if
(
CommonConstant
.
FileLocation
.
S3
.
equalsIgnoreCase
(
S3Constant
.
FILE_LOCATION
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPXS007A.queryS3"
,
new
HPXS007A
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPXS007A.queryLocal"
,
new
HPXS007A
());
}
}
catch
(
Throwable
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"新增"
,
operDesc
=
"客户回访-附件清单A-新增操作"
)
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
List
<
HPXS007A
>
fXs007s
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HPXS007A
.
class
);
for
(
HPXS007A
fXs007
:
fXs007s
)
{
DaoUtils
.
insert
(
HPXS007A
.
INSERT
,
fXs007
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fXs007s
.
size
()
+
"]条数据新增成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"新增失败"
);
}
return
inInfo
;
}
/**
* 删除操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"附件清单"
,
operType
=
"删除"
,
operDesc
=
"客户回访-附件清单A-删除操作"
)
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
HPXS007A
>
fXs007s
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HPXS007A
.
class
);
for
(
HPXS007A
fXs007
:
fXs007s
)
{
DaoUtils
.
update
(
HPXS007A
.
DELETE
,
fXs007
);
if
(
StringUtils
.
isNotBlank
(
fXs007
.
getDocId
()))
{
Iplat4jUtils
.
deleteFileByDocId
(
fXs007
.
getDocId
());
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fXs007s
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"删除失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/xs/sql/HPXS007A.xml
0 → 100644
View file @
54182c7d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPXS007A"
>
<sql
id=
"column"
>
A.ID as "id",
A.COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
A.DEP_CODE as "depCode",
<!-- 部门编码 预留 -->
A.CREATED_BY as "createdBy",
<!-- 创建人 -->
A.CREATED_NAME as "createdName",
<!-- 创建人名称 -->
A.CREATED_TIME as "createdTime",
<!-- 创建时间 -->
A.UPDATED_BY as "updatedBy",
<!-- 修改人 -->
A.UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
A.UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
A.BIZ_TYPE as "bizType",
<!-- 业务类型 -->
A.FOL_ID as "folId",
<!-- 回访ID -->
A.DOC_ID as "docId"
<!-- 文件ID -->
</sql>
<sql
id=
"columnLocal"
>
<include
refid=
"column"
/>
,
B.DOC_NAME as "docName"
<!-- 文件名称 -->
</sql>
<sql
id=
"columnS3"
>
<include
refid=
"column"
/>
,
B.RES_CNAME as "docName"
<!-- 文件名称 -->
</sql>
<sql
id=
"condition"
>
AND A.DELETE_FLAG = '0'
<include
refid=
"SqlBase.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"bizType"
>
A.BIZ_TYPE = #bizType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"folId"
>
A.FOL_ID = #folId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
A.DOC_ID = #docId#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
A.CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateTo"
>
A.CREATED_TIME
<
= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<!-- 本地 -->
<sql
id=
"conditionLocal"
>
AND A.DOC_ID = B.DOC_ID
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- S3地址 -->
<sql
id=
"conditionS3"
>
AND A.DOC_ID = B.RES_ID
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql
id=
"orderBy"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
A.ID asc
</isEmpty>
</dynamic>
</sql>
<select
id=
"queryLocal"
resultClass=
"com.baosight.hpjx.hp.xs.domain.HPXS007A"
>
SELECT
<include
refid=
"columnLocal"
/>
FROM ${hpjxSchema}.T_HPXS007A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include
refid=
"conditionLocal"
/>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"countLocal"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXS007A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include
refid=
"conditionLocal"
/>
</select>
<select
id=
"queryS3"
resultClass=
"com.baosight.hpjx.hp.xs.domain.HPXS007A"
>
SELECT
<include
refid=
"columnS3"
/>
FROM ${hpjxSchema}.T_HPXS007A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include
refid=
"conditionS3"
/>
<include
refid=
"orderBy"
/>
</select>
<select
id=
"countS3"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPXS007A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include
refid=
"conditionS3"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPXS007A (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 预留 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
BIZ_TYPE,
<!-- 业务类型 -->
FOL_ID,
<!-- 回访ID -->
DOC_ID
<!-- 文件ID -->
) VALUES (
#companyCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#bizType#, #folId#, #docId#
)
</insert>
<!-- 逻辑删除 -->
<delete
id=
"delete"
>
UPDATE ${hpjxSchema}.T_HPXS007A
SET DELETE_FLAG = '1',
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</delete>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPXS007A
SET
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 修改时间 -->
BIZ_TYPE = #bizType#,
<!-- 业务类型 -->
FOL_ID = #folId#,
<!-- 回访ID -->
DOC_ID = #docId#
<!-- 文件ID -->
WHERE ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/zl/service/ServiceHPZL001A.java
View file @
54182c7d
...
...
@@ -3,20 +3,16 @@ package com.baosight.hpjx.hp.zl.service;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002A
;
import
com.baosight.hpjx.hp.zl.domain.HPZL001
;
import
com.baosight.hpjx.hp.zl.domain.HPZL001A
;
import
com.baosight.hpjx.hp.zl.tools.HPZLTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.FrameworkInfo
;
import
com.baosight.iplat4j.core.ProjectInfo
;
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.ioc.spring.ProjectConfig
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -64,7 +60,7 @@ public class ServiceHPZL001A extends ServiceEPBase {
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
p
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
P
rojectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPZL001A.queryRun"
,
new
HPZL001A
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPZL001A.queryDev"
,
new
HPZL001A
());
...
...
src/main/java/com/baosight/hpjx/util/MapUtils.java
View file @
54182c7d
package
com
.
baosight
.
hpjx
.
util
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.math.BigDecimal
;
...
...
@@ -9,11 +13,15 @@ import java.util.HashMap;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
lombok.extern.slf4j.Slf4j
;
/**
* @author:songx
* @date:2021/7/24,14:45
*/
@Slf4j
public
class
MapUtils
extends
org
.
apache
.
commons
.
collections
.
MapUtils
{
/**
...
...
@@ -148,4 +156,51 @@ public class MapUtils extends org.apache.commons.collections.MapUtils {
return
resultMap
;
}
/**
* map 转 DaoEPBase
*
* @param inInfo
* @param clazz
* @param <T>
*/
public
static
<
T
extends
DaoEPBase
>
List
<
T
>
toDaoEPBase
(
EiInfo
inInfo
,
Class
<
T
>
clazz
)
{
return
toDaoEPBase
(
inInfo
,
EiConstant
.
resultBlock
,
clazz
);
}
/**
* map 转 DaoEPBase
*
* @param inInfo
* @param blockId
* @param clazz
* @param <T>
*/
public
static
<
T
extends
DaoEPBase
>
List
<
T
>
toDaoEPBase
(
EiInfo
inInfo
,
String
blockId
,
Class
<
T
>
clazz
)
{
List
<
Map
>
rows
=
inInfo
.
getBlock
(
blockId
).
getRows
();
return
toDaoEPBase
(
rows
,
clazz
);
}
/**
* map 转 DaoEPBase
*
* @param maps
* @param clazz
* @param <T>
*/
public
static
<
T
extends
DaoEPBase
>
List
<
T
>
toDaoEPBase
(
List
<
Map
>
maps
,
Class
<
T
>
clazz
)
{
if
(
CollectionUtils
.
isEmpty
(
maps
)
||
clazz
==
null
)
{
return
null
;
}
return
maps
.
stream
().
map
(
row
->
{
T
newBean
=
null
;
try
{
newBean
=
clazz
.
newInstance
();
newBean
.
fromMap
(
row
);
}
catch
(
Exception
e
)
{
log
.
error
(
"class new instance fail:{}"
,
e
.
getMessage
(),
e
);
}
return
newBean
;
}).
filter
(
t
->
t
!=
null
).
collect
(
Collectors
.
toList
());
}
}
src/main/resources/resources/ibatis/sqlmap-config.xml
0 → 100644
View file @
54182c7d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBatis.com//DTD SQL Map Config 2.0//EN" "http://www.iBatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<properties
resource=
"application.properties"
/>
<settings
useStatementNamespaces=
"true"
/>
<sqlMap
resource=
"resources/ibatis/Dummy.xml"
/>
<!-- 基础查询条件 -->
<sqlMap
resource=
"com/baosight/hpjx/core/dao/SqlBase.xml"
/>
<!-- 用户服务 -->
<sqlMap
resource=
"com/baosight/hpjx/hp/xs/sql/HPXS007A.xml"
/>
</sqlMapConfig>
src/main/webapp/HP/XS/HPXS007.js
View file @
54182c7d
...
...
@@ -16,9 +16,11 @@ $(function () {
if
(
auditStatus
)
{
if
(
auditStatus
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
+
'onclick="check('
+
item
.
id
+
',1)" >审核</a>'
;
'onclick="check('
+
item
.
id
+
',1)" >审核</a>
'
;
}
}
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件清单</a>'
;
return
template
;
}
}],
...
...
@@ -122,3 +124,16 @@ function save() {
})
}
/**
* 附件清单
*
* @param id
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPXS007A?inqu_status-0-folId="
+
id
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
});
}
src/main/webapp/HP/XS/HPXS007A.js
0 → 100644
View file @
54182c7d
$
(
function
()
{
IPLATUI
.
EFSelect
=
{
"inqu_status-0-bizType"
:
{
// 下拉选项改变之后触发
change
:
function
(
e
)
{
query
();
}
}
}
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[{
field
:
"operator"
,
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
downloadHref
(
item
.
docId
)
+
'" target="_blank">附件下载</a>'
;
return
template
;
}
}],
dataBound
:
function
()
{
}
}
};
$
(
"#ef_form_head"
).
hide
();
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 附件上传
$
(
"#UPLOAD_FILE"
).
on
(
"click"
,
uploadFile
);
// 查询
$
(
"#BTN_DELETE"
).
on
(
"click"
,
deleteFunc
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 初始化查询
query
();
});
/**
* 查询
*/
var
query
=
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 文件上传
*
* @param id
*/
function
uploadFile
()
{
JSColorbox
.
open
({
href
:
"HPXS099?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>附件上传</div>"
,
width
:
"60%"
,
height
:
"50%"
,
callbackName
:
uploadFileCallback
});
}
/**
* 附件上传回调
*
* @param docId
*/
function
uploadFileCallback
(
e
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-folId"
,
$
(
"#inqu_status-0-folId"
).
val
());
inEiInfo
.
set
(
"result-0-docId"
,
e
.
response
.
docId
);
inEiInfo
.
set
(
"result-0-bizType"
,
$
(
"#inqu_status-0-bizType"
).
val
());
EiCommunicator
.
send
(
'HPXS007A'
,
'insert'
,
inEiInfo
,
{
onSuccess
(
response
)
{
resultGrid
.
dataSource
.
page
(
1
);
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
/**
* 删除
*/
function
deleteFunc
()
{
var
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
==
0
)
{
message
(
"请先勾选数据!"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
删除
\"
操作?"
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPXS007A"
,
"delete"
,
true
);
}
})
}
src/main/webapp/HP/XS/HPXS007A.jsp
0 → 100644
View file @
54182c7d
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"附件清单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询区域"
type=
"query"
>
<EF:EFInput
cname=
"回访ID"
ename=
"folId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFSelect
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
required=
"true"
>
<EF:EFOption
label=
"体验调查"
value=
"TY"
/>
<EF:EFOption
label=
"满意度调查"
value=
"MY"
/>
</EF:EFSelect>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HP/XS/HPXS099.js
View file @
54182c7d
$
(
function
()
{
IPLATUI
.
EFUpload
=
{
uploadFile
:
{
success
:
function
(
e
)
{
...
...
@@ -8,10 +7,7 @@ $(function () {
if
(
isBlank
(
docId
))
{
return
;
}
$
(
"#fileDocId"
).
val
(
docId
);
NotificationUtil
(
"附件上传成功"
);
//console.log($("#fileDocId").val())
//saveTemp(e);
try
{
parent
.
JSColorbox
.
setValueCallback
(
e
);
}
catch
(
e
){
...
...
src/main/webapp/HP/XS/HPXS099.jsp
View file @
54182c7d
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/3/25
Time: 18:17
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
...
...
@@ -13,8 +6,7 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"附件上传"
>
<EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="
hk_fileLog" path="log
"/>
<EF:EFRegion
id=
"result"
title=
"请选择文件"
>
<EF:EFUpload
blockId=
"result"
ename=
"uploadFile"
docTag=
"
fj_file"
path=
"biz
"
/>
</EF:EFRegion>
<EF:EFInput ename="fileDocId" cname="" hidden="true"/>
</EF:EFPage>
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