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
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
960 additions
and
63 deletions
+960
-63
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
+395
-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
+17
-2
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
+1
-6
HPXS099.jsp
src/main/webapp/HP/XS/HPXS099.jsp
+3
-12
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
package
com
.
baosight
.
hpjx
.
hp
.
xs
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* Project: <br>
* Title:HPXS007A.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-08-12 16:24:33 create
*/
public
class
HPXS007A
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
/* 主键ID*/
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码 预留*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 修改人*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 修改人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 修改时间*/
public
static
final
String
FIELD_BIZ_TYPE
=
"bizType"
;
/* 业务类型*/
public
static
final
String
FIELD_FOL_ID
=
"folId"
;
/* 回访ID*/
public
static
final
String
FIELD_DOC_ID
=
"docId"
;
/* 文件ID*/
public
static
final
String
FIELD_DOC_NAME
=
"docName"
;
/* 文件名称*/
public
static
final
String
COL_ID
=
"ID"
;
/* 主键ID*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码 预留*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 修改人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 修改时间*/
public
static
final
String
COL_BIZ_TYPE
=
"BIZ_TYPE"
;
/* 业务类型*/
public
static
final
String
COL_FOL_ID
=
"FOL_ID"
;
/* 回访ID*/
public
static
final
String
COL_DOC_ID
=
"DOC_ID"
;
/* 文件ID*/
public
static
final
String
COL_DOC_NAME
=
"DOC_NAME"
;
/* 文件名称*/
public
static
final
String
QUERY
=
"HPXS007A.query"
;
public
static
final
String
COUNT
=
"HPXS007A.count"
;
public
static
final
String
INSERT
=
"HPXS007A.insert"
;
public
static
final
String
UPDATE
=
"HPXS007A.update"
;
public
static
final
String
DELETE
=
"HPXS007A.delete"
;
private
Long
id
=
new
Long
(
0
);
/* 主键ID*/
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码 预留*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 修改人*/
private
String
updatedName
=
" "
;
/* 修改人名称*/
private
String
updatedTime
=
" "
;
/* 修改时间*/
private
String
bizType
=
" "
;
/* 业务类型*/
private
Long
folId
=
new
Long
(
0
);
/* 回访ID*/
private
String
docId
=
" "
;
/* 文件ID*/
private
String
docName
=
" "
;
/* 文件名称*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
"主键ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"企业编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"修改人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"修改人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_BIZ_TYPE
);
eiColumn
.
setDescName
(
"业务类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FOL_ID
);
eiColumn
.
setDescName
(
"回访ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_ID
);
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_NAME
);
eiColumn
.
setDescName
(
"文件名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HPXS007A
()
{
initMetaData
();
}
/**
* get the id - 主键ID.
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id - 主键ID.
*
* @param id - 主键ID
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the depCode - 部门编码 预留.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码 预留.
*
* @param depCode - 部门编码 预留
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 修改人.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 修改人.
*
* @param updatedBy - 修改人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 修改人名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 修改人名称.
*
* @param updatedName - 修改人名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 修改时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 修改时间.
*
* @param updatedTime - 修改时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the bizType - 业务类型.
* @return the bizType
*/
public
String
getBizType
()
{
return
this
.
bizType
;
}
/**
* set the bizType - 业务类型.
*
* @param bizType - 业务类型
*/
public
void
setBizType
(
String
bizType
)
{
this
.
bizType
=
bizType
;
}
/**
* get the folId - 回访ID.
* @return the folId
*/
public
Long
getFolId
()
{
return
this
.
folId
;
}
/**
* set the folId - 回访ID.
*
* @param folId - 回访ID
*/
public
void
setFolId
(
Long
folId
)
{
this
.
folId
=
folId
;
}
/**
* get the docId - 文件ID.
* @return the docId
*/
public
String
getDocId
()
{
return
this
.
docId
;
}
/**
* set the docId - 文件ID.
*
* @param docId - 文件ID
*/
public
void
setDocId
(
String
docId
)
{
this
.
docId
=
docId
;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public
String
getDocName
()
{
return
this
.
getDocName
();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public
void
setDocName
(
String
docName
)
{
this
.
docName
=
docName
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
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
));
setBizType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BIZ_TYPE
)),
bizType
));
setFolId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FOL_ID
)),
folId
));
setDocId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_ID
)),
docId
));
setDocName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_NAME
)),
docName
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_BIZ_TYPE
,
StringUtils
.
toString
(
bizType
,
eiMetadata
.
getMeta
(
FIELD_BIZ_TYPE
)));
map
.
put
(
FIELD_FOL_ID
,
StringUtils
.
toString
(
folId
,
eiMetadata
.
getMeta
(
FIELD_FOL_ID
)));
map
.
put
(
FIELD_DOC_ID
,
StringUtils
.
toString
(
docId
,
eiMetadata
.
getMeta
(
FIELD_DOC_ID
)));
map
.
put
(
FIELD_DOC_NAME
,
StringUtils
.
toString
(
docName
,
eiMetadata
.
getMeta
(
FIELD_DOC_NAME
)));
return
map
;
}
}
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,10 +16,12 @@ $(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>
'
;
}
}
return
template
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件清单</a>'
;
return
template
;
}
}],
loadComplete
:
function
(
grid
)
{
...
...
@@ -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
){
...
...
@@ -19,4 +15,4 @@ $(function () {
},
}
};
});
\ No newline at end of file
});
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>
\ No newline at end of file
</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