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
9b3bfac7
Commit
9b3bfac7
authored
Mar 14, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.项目清单和生产下料需要区分环境
parent
bedf29d1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
21 deletions
+131
-21
CommonConstant.java
.../java/com/baosight/hpjx/core/constant/CommonConstant.java
+14
-0
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+10
-1
ServiceHPSC002B.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002B.java
+10
-1
HPSC002A.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002A.xml
+46
-6
HPSC002B.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002B.xml
+48
-8
ServiceHPZL001A.java
...java/com/baosight/hpjx/hp/zl/service/ServiceHPZL001A.java
+1
-1
HPSC002A.js
src/main/webapp/HP/SC/HPSC002A.js
+1
-2
HPSC002B.js
src/main/webapp/HP/SC/HPSC002B.js
+1
-2
No files found.
src/main/java/com/baosight/hpjx/core/constant/CommonConstant.java
View file @
9b3bfac7
...
...
@@ -7,6 +7,20 @@ package com.baosight.hpjx.core.constant;
public
class
CommonConstant
{
/**
* 环境变量
*
* @author:songx
* @date:2024/1/20,15:04
*/
public
static
class
projectEnv
{
// 开发环境
public
static
final
String
DEV
=
"dev"
;
// 正式环境
public
static
final
String
RUN
=
"run"
;
}
/**
* 是否
*
* @author:songx
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
9b3bfac7
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
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.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
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
...
@@ -68,7 +71,13 @@ public class ServiceHPSC002A extends ServiceEPBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HPSC002A
.
QUERY
,
new
HPSC002A
());
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002A.queryRun"
,
new
HPSC002A
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002A.queryDev"
,
new
HPSC002A
());
}
}
catch
(
Throwable
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002B.java
View file @
9b3bfac7
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
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.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
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
...
@@ -57,7 +60,13 @@ public class ServiceHPSC002B extends ServiceEPBase {
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HPSC002B
.
QUERY
,
new
HPSC002B
());
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002B.queryRun"
,
new
HPSC002B
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPSC002B.queryDev"
,
new
HPSC002B
());
}
}
catch
(
Throwable
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002A.xml
View file @
9b3bfac7
...
...
@@ -9,7 +9,6 @@
A.BIZ_TYPE as "bizType",
<!-- 物料ID -->
A.MAT_ID as "matId",
<!-- 物料ID -->
A.DOC_ID as "docId",
<!-- 文件ID -->
B.DOC_NAME as "docName",
<!-- 文件名称 -->
A.CREATED_BY as "createdBy",
<!-- 创建人 -->
A.CREATED_NAME as "createdName",
<!-- 创建人名称 -->
A.CREATED_TIME as "createdTime",
<!-- 创建时间 -->
...
...
@@ -18,6 +17,16 @@
A.UPDATED_TIME as "updatedTime"
<!-- 修改时间 -->
</sql>
<sql
id=
"columnDev"
>
<include
refid=
"column"
/>
,
B.DOC_NAME as "docName"
<!-- 文件名称 -->
</sql>
<sql
id=
"columnRun"
>
<include
refid=
"column"
/>
,
B.RES_CNAME as "docName"
<!-- 文件名称 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.ID = #id#
...
...
@@ -37,11 +46,26 @@
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
A.DOC_ID = #docId#
</isNotEmpty>
</sql>
<!-- 开发环境 -->
<sql
id=
"conditionDev"
>
AND A.DOC_ID = B.DOC_ID
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql
id=
"conditionRun"
>
AND A.DOC_ID = B.RES_ID
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
A.CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
...
...
@@ -62,21 +86,37 @@
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002A"
>
<select
id=
"query
Dev
"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002A"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include
refid=
"condition"
/>
<include
refid=
"conditionDev"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count
Dev
"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"conditionDev"
/>
<include
refid=
"customCondition"
/>
</select>
<select
id=
"queryRun"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002A"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include
refid=
"conditionRun"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"countRun"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include
refid=
"conditionRun"
/>
<include
refid=
"customCondition"
/>
</select>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002B.xml
View file @
9b3bfac7
...
...
@@ -9,7 +9,6 @@
A.BIZ_TYPE as "bizType",
<!-- 物料ID -->
A.MAT_ID as "matId",
<!-- 物料ID -->
A.DOC_ID as "docId",
<!-- 文件ID -->
B.DOC_NAME as "docName",
<!-- 文件名称 -->
A.CREATED_BY as "createdBy",
<!-- 创建人 -->
A.CREATED_NAME as "createdName",
<!-- 创建人名称 -->
A.CREATED_TIME as "createdTime",
<!-- 创建时间 -->
...
...
@@ -18,6 +17,16 @@
A.UPDATED_TIME as "updatedTime"
<!-- 修改时间 -->
</sql>
<sql
id=
"columnDev"
>
<include
refid=
"column"
/>
,
B.DOC_NAME as "docName"
<!-- 文件名称 -->
</sql>
<sql
id=
"columnRun"
>
<include
refid=
"column"
/>
,
B.RES_CNAME as "docName"
<!-- 文件名称 -->
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
A.ID = #id#
...
...
@@ -55,8 +64,23 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
A.UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
B.DOC_NAME LIKE ('%$updatedTime$%')
</sql>
<!-- 开发环境 -->
<sql
id=
"conditionDev"
>
AND A.DOC_ID = B.DOC_ID
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.DOC_NAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
<!-- 正式环境 -->
<sql
id=
"conditionRun"
>
AND A.DOC_ID = B.RES_ID
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"docName"
>
B.RES_CNAME LIKE CONCAT('%', #docName#, '%')
</isNotEmpty>
</sql>
...
...
@@ -80,21 +104,37 @@
</dynamic>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002B"
>
<select
id=
"query
Dev
"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002B"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
AND A.DOC_ID = B.DOC_ID
<include
refid=
"condition"
/>
<include
refid=
"conditionDev"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count
Dev
"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM02 B
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"conditionDev"
/>
<include
refid=
"customCondition"
/>
</select>
<select
id=
"queryRun"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC002B"
>
SELECT
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include
refid=
"conditionRun"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"countRun"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hpjxSchema}.T_HPSC002A A, ${platSchema}.TEUDM05 B
WHERE 1=1
<include
refid=
"conditionRun"
/>
<include
refid=
"customCondition"
/>
</select>
...
...
src/main/java/com/baosight/hpjx/hp/zl/service/ServiceHPZL001A.java
View file @
9b3bfac7
...
...
@@ -64,7 +64,7 @@ public class ServiceHPZL001A extends ServiceEPBase {
try
{
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
"run"
.
equalsIgnoreCase
(
projectEnv
))
{
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
inInfo
=
super
.
query
(
inInfo
,
"HPZL001A.queryRun"
,
new
HPZL001A
());
}
else
{
inInfo
=
super
.
query
(
inInfo
,
"HPZL001A.queryDev"
,
new
HPZL001A
());
...
...
src/main/webapp/HP/SC/HPSC002A.js
View file @
9b3bfac7
...
...
@@ -5,8 +5,7 @@ $(function () {
field
:
"operator"
,
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
IPLATUI
.
CONTEXT_PATH
+
'/EU/DM/EUDM06.jsp?docId='
+
item
.
docId
+
'" >附件下载</a>'
;
+
'href="'
+
downloadHref
(
item
.
docId
)
+
'" target="_blank">附件下载</a>'
;
return
template
;
}
}],
...
...
src/main/webapp/HP/SC/HPSC002B.js
View file @
9b3bfac7
...
...
@@ -5,8 +5,7 @@ $(function () {
field
:
"operator"
,
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'href="'
+
IPLATUI
.
CONTEXT_PATH
+
'/EU/DM/EUDM06.jsp?docId='
+
item
.
docId
+
'" >附件下载</a>'
;
+
'href="'
+
downloadHref
(
item
.
docId
)
+
'" target="_blank">附件下载</a>'
;
return
template
;
}
}],
...
...
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