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
b0c8b452
Commit
b0c8b452
authored
Mar 14, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/03/14 报工管理页面号调整
parent
4ee877ff
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
50 deletions
+96
-50
DdynamicEnum.java
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
+25
-3
HPSC008.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC008.java
+8
-8
ServiceHPSC008.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC008.java
+25
-20
HPSC008.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC008.xml
+10
-7
HPSC008.js
src/main/webapp/HP/SC/HPSC008.js
+25
-2
HPSC008.jsp
src/main/webapp/HP/SC/HPSC008.jsp
+0
-0
HPXS002.jsp
src/main/webapp/HP/XS/HPXS002.jsp
+3
-10
No files found.
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
View file @
b0c8b452
...
...
@@ -235,21 +235,43 @@ public enum DdynamicEnum {
* 用途:用户查询
* 编写:ly
*/
USER_ID_BLOCK_ID
(
"user_id_block_id"
,
"userId"
,
"userName"
,
"factoryCode"
,
"groupCode"
,
"HPXS001
.queryUserId"
),
USER_ID_BLOCK_ID
(
"user_id_block_id"
,
"userId"
,
"userName"
,
"factoryCode"
,
"groupCode"
,
"deleteFlag"
,
"HPSC008
.queryUserId"
),
/**
* 模块:系统管理
* 用途:生产组查询
* 编写:ly
*/
GROUP_CODE_BLOCK_ID
(
"group_code_block_id"
,
"groupCode"
,
"groupName"
,
"factoryCode"
,
"HPXS001
.queryGroupCode"
),
GROUP_CODE_BLOCK_ID
(
"group_code_block_id"
,
"groupCode"
,
"groupName"
,
"factoryCode"
,
"deleteFlag"
,
"HPSC008
.queryGroupCode"
),
/**
* 模块:系统管理
* 用途:厂区查询
* 编写:ly
*/
FACTORY_CODE_BLOCK_ID
(
"factory_code_block_id"
,
"factoryCode"
,
"factoryName"
,
"HPXS001.queryFactoryCode"
),
FACTORY_CODE_BLOCK_ID
(
"factory_code_block_id"
,
"factoryCode"
,
"factoryName"
,
"deleteFlag"
,
"HPSC008.queryFactoryCode"
),
/**
* 模块:系统管理
* 用途:用户查询
* 编写:ly
*/
USER_ID1_BLOCK_ID
(
"user_id1_block_id"
,
"userId"
,
"userName"
,
"factoryCode"
,
"groupCode"
,
"deleteFlag"
,
"HPSC008.queryUserId"
),
/**
* 模块:系统管理
* 用途:生产组查询
* 编写:ly
*/
GROUP_CODE1_BLOCK_ID
(
"group_code1_block_id"
,
"groupCode"
,
"groupName"
,
"factoryCode"
,
"deleteFlag"
,
"HPSC008.queryGroupCode"
),
/**
* 模块:系统管理
* 用途:厂区查询
* 编写:ly
*/
FACTORY_CODE1_BLOCK_ID
(
"factory_code1_block_id"
,
"factoryCode"
,
"factoryName"
,
"deleteFlag"
,
"HPSC008.queryFactoryCode"
),
/**
* 模块:巡检填报APP下拉
...
...
src/main/java/com/baosight/hpjx/hp/
xs/domain/HPXS001
.java
→
src/main/java/com/baosight/hpjx/hp/
sc/domain/HPSC008
.java
View file @
b0c8b452
package
com
.
baosight
.
hpjx
.
hp
.
xs
.
domain
;
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
java.math.BigDecimal
;
...
...
@@ -18,7 +18,7 @@ import com.baosight.iplat4j.core.util.StringUtils;
* @version 1.0
* @history 2024-03-07 17:21:17 create
*/
public
class
HP
XS001
extends
DaoEPBase
{
public
class
HP
SC008
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -62,11 +62,11 @@ public class HPXS001 extends DaoEPBase {
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 修改人名称*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 修改时间*/
public
static
final
String
QUERY
=
"HP
XS001
.query"
;
public
static
final
String
COUNT
=
"HP
XS001
.count"
;
public
static
final
String
INSERT
=
"HP
XS001
.insert"
;
public
static
final
String
UPDATE
=
"HP
XS001
.update"
;
public
static
final
String
DELETE
=
"HP
XS001
.delete"
;
public
static
final
String
QUERY
=
"HP
SC008
.query"
;
public
static
final
String
COUNT
=
"HP
SC008
.count"
;
public
static
final
String
INSERT
=
"HP
SC008
.insert"
;
public
static
final
String
UPDATE
=
"HP
SC008
.update"
;
public
static
final
String
DELETE
=
"HP
SC008
.delete"
;
private
Long
id
=
new
Long
(
0
);
/* ID*/
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
...
...
@@ -180,7 +180,7 @@ public class HPXS001 extends DaoEPBase {
/**
* the constructor.
*/
public
HP
XS001
()
{
public
HP
SC008
()
{
initMetaData
();
}
...
...
src/main/java/com/baosight/hpjx/hp/
xs/service/ServiceHPXS001
.java
→
src/main/java/com/baosight/hpjx/hp/
sc/service/ServiceHPSC008
.java
View file @
b0c8b452
package
com
.
baosight
.
hpjx
.
hp
.
xs
.
service
;
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
service
;
import
com.baosight.hpjx.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hpjx.common.DdynamicEnum
;
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.
sc.domain.HPSC00
3
;
import
com.baosight.hpjx.hp.
xs.domain.HPXS001
;
import
com.baosight.hpjx.hp.
pz.domain.HPPZ01
3
;
import
com.baosight.hpjx.hp.
sc.domain.HPSC008
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.contants.ACConstants
;
...
...
@@ -15,10 +15,8 @@ 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
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -27,17 +25,24 @@ import java.util.Map;
* @author LiuYang
* @version 1.0 2024/3/7
*/
public
class
ServiceHP
XS001
extends
ServiceEPBase
{
public
class
ServiceHP
SC008
extends
ServiceEPBase
{
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
final
EiInfo
outEiInfo
=
super
.
initLoad
(
inInfo
,
new
HPXS001
());
final
EiInfo
outEiInfo
=
super
.
query
(
inInfo
,
HPSC008
.
QUERY
,
new
HPSC008
());
final
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
CommonMethod
.
initBlock
(
outEiInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BLOCK_ID
,
DdynamicEnum
.
GROUP_CODE_BLOCK_ID
,
DdynamicEnum
.
FACTORY_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
companyCode
);}});
outEiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
().
clear
();
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC008
.
FIELD_COMPANY_CODE
,
companyCode
);}}
);
/*CommonMethod.initBlock(outEiInfo,
Arrays.asList(DdynamicEnum.USER_ID1_BLOCK_ID,DdynamicEnum.GROUP_CODE1_BLOCK_ID,DdynamicEnum.FACTORY_CODE1_BLOCK_ID),
new HashMap<String,Object>(){{
put(HPSC008.FIELD_COMPANY_CODE,companyCode);
put(HPSC008.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}
);*/
//outEiInfo.getBlock(EiConstant.resultBlock).getRows().clear();
return
outEiInfo
;
}
...
...
@@ -52,32 +57,32 @@ public class ServiceHPXS001 extends ServiceEPBase {
if
(!
startDate
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
"createdDateFrom"
,
StringUtil
.
removeHorizontalLine
(
startDate
));
}
return
super
.
query
(
inInfo
,
HPXS001
.
QUERY
,
new
HPXS001
());
return
super
.
query
(
inInfo
,
HPSC008
.
QUERY
,
new
HPSC008
());
}
@OperationLogAnnotation
(
operModul
=
"报工管理"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
return
super
.
delete
(
inInfo
,
HPXS001
.
DELETE
);
return
super
.
delete
(
inInfo
,
HPSC008
.
DELETE
);
}
@OperationLogAnnotation
(
operModul
=
"报工管理"
,
operType
=
"修改"
,
operDesc
=
"修改操作"
)
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
return
super
.
update
(
inInfo
,
HPXS001
.
UPDATE
);
return
super
.
update
(
inInfo
,
HPSC008
.
UPDATE
);
}
@OperationLogAnnotation
(
operModul
=
"报工管理"
,
operType
=
"新增"
,
operDesc
=
"新增操作"
)
@Override
public
EiInfo
insert
(
EiInfo
inInfo
)
{
try
{
HP
XS001
hpxs001
=
new
HPXS001
();
HP
SC008
hpxs001
=
new
HPSC008
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hpxs001
.
fromMap
(
map
);
hpxs001
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HP
XS001
.
INSERT
,
hpxs001
.
toMap
());
DaoUtils
.
insert
(
HP
SC008
.
INSERT
,
hpxs001
.
toMap
());
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"新增成功!"
);
...
...
@@ -96,20 +101,20 @@ public class ServiceHPXS001 extends ServiceEPBase {
public
EiInfo
queryFactoryCode
(
EiInfo
inInfo
)
{
final
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
factoryCode
=
inInfo
.
getString
(
"factoryCode"
);
String
factoryCode
=
inInfo
.
getString
(
HPPZ013
.
FIELD_FACTORY_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
companyCode
);
put
(
"factoryCode"
,
factoryCode
);}});
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC008
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPPZ013
.
FIELD_FACTORY_CODE
,
factoryCode
);}});
return
inInfo
;
}
public
EiInfo
queryGroupCode
(
EiInfo
inInfo
)
{
final
String
companyCode
=
UserSessionUtils
.
getCompanyCode
();
String
factoryCode
=
inInfo
.
getString
(
"factoryCode"
);
String
groupCode
=
inInfo
.
getString
(
"groupCode"
);
String
factoryCode
=
inInfo
.
getString
(
HPPZ013
.
FIELD_FACTORY_CODE
);
String
groupCode
=
inInfo
.
getString
(
HPPZ013
.
FIELD_GROUP_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_ID_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
put
(
"companyCode"
,
companyCode
);
put
(
"factoryCode"
,
factoryCode
);
put
(
"groupCode"
,
groupCode
);}});
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC008
.
FIELD_COMPANY_CODE
,
companyCode
);
put
(
HPPZ013
.
FIELD_FACTORY_CODE
,
factoryCode
);
put
(
HPPZ013
.
FIELD_GROUP_CODE
,
groupCode
);}});
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/
xs/sql/HPXS001
.xml
→
src/main/java/com/baosight/hpjx/hp/
sc/sql/HPSC008
.xml
View file @
b0c8b452
...
...
@@ -25,7 +25,7 @@
UPDATED_TIME VARCHAR,
UPDATED_NAME VARCHAR
-->
<sqlMap
namespace=
"HP
XS001
"
>
<sqlMap
namespace=
"HP
SC008
"
>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
@@ -94,7 +94,7 @@
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.
xs.domain.HPXS001
"
>
resultClass=
"com.baosight.hpjx.hp.
sc.domain.HPSC008
"
>
SELECT
ID as "id",
<!-- ID -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
...
...
@@ -260,7 +260,8 @@
<select
id=
"queryFactoryCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName"
FACTORY_NAME as "factoryName",
DELETE_FLAG as "deleteFlag"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
...
...
@@ -280,8 +281,9 @@
SELECT DISTINCT
GROUP_CODE as "groupCode",
GROUP_NAME as "groupName",
FACTORY_CODE AS factoryCode
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1
FACTORY_CODE AS factoryCode,
DELETE_FLAG as "deleteFlag"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and GROUP_TYPE = 'prodGroup'
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
...
...
@@ -304,8 +306,9 @@
USER_ID as "userId",
USER_NAME as "userName",
FACTORY_CODE AS factoryCode,
GROUP_CODE as "groupCode"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and STATUS = '1'
GROUP_CODE as "groupCode",
DELETE_FLAG as "deleteFlag"
FROM ${hpjxSchema}.T_HPPZ013 WHERE 1=1 and GROUP_TYPE = 'prodGroup' and STATUS = '1'
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
...
...
src/main/webapp/HP/
XS/HPXS001
.js
→
src/main/webapp/HP/
SC/HPSC008
.js
View file @
b0c8b452
$
(
function
()
{
var
factoryCodes
=
__eiInfo
.
getBlock
(
"factory_code_block_id"
).
getMappedRows
();
var
groupCodes
=
__eiInfo
.
getBlock
(
"group_code_block_id"
).
getMappedRows
();
var
userIds
=
__eiInfo
.
getBlock
(
"user_id_block_id"
).
getMappedRows
();
var
factoryCode
=
_
.
filter
(
__eiInfo
.
getBlock
(
"factory_code_block_id"
).
getMappedRows
(),
function
(
item
)
{
return
item
[
"param1Field"
]
==
"false"
;
});
var
groupCode
=
_
.
filter
(
__eiInfo
.
getBlock
(
"group_code_block_id"
).
getMappedRows
(),
function
(
item
)
{
return
item
[
"param2Field"
]
==
"false"
;
});
var
userId
=
_
.
filter
(
__eiInfo
.
getBlock
(
"user_id_block_id"
).
getMappedRows
(),
function
(
item
)
{
return
item
[
"param3Field"
]
==
"false"
;
});
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -84,6 +96,16 @@ $(function () {
}
});
},
onAdd
:
function
(
e
)
{
//e.sender.dataSource.options.fields[4].values = factoryCode;
//e.sender.dataSource.options.fields[5].values = groupCode
//e.sender.dataSource.options.fields[6].values = userId;
// 动态设置默认邮箱
$
.
each
(
e
.
items
,
function
(
index
,
item
){
item
[
'prdtName'
]
=
"demo"
+
index
+
"@baosight.com"
;
});
},
onSave
:
function
(
e
)
{
// 阻止默认请求,使用自定义保存
//e.preventDefault();
...
...
@@ -93,6 +115,7 @@ $(function () {
//saveResult(btnNode);
},
onSuccess
:
function
(
e
)
{
console
.
log
(
"onSuccess:"
+
e
)
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
)
{
query
();
...
...
@@ -122,7 +145,7 @@ $(function () {
var
inInfo
=
new
EiInfo
();
var
factoryCode
=
$
(
"#inqu_status-0-factoryCode"
).
val
();
inInfo
.
set
(
"factoryCode"
,
factoryCode
);
EiCommunicator
.
send
(
"HP
XS001
"
,
"queryFactoryCode"
,
inInfo
,
{
EiCommunicator
.
send
(
"HP
SC008
"
,
"queryFactoryCode"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
var
input
=
$
(
"#inqu_status-0-groupCode"
);
dataEdition
=
ei
.
getBlock
(
"group_code_block_id"
).
getMappedRows
();
...
...
@@ -145,7 +168,7 @@ $(function () {
inInfo
.
set
(
"factoryCode"
,
factoryCode
);
var
groupCode
=
$
(
"#inqu_status-0-groupCode"
).
val
();
inInfo
.
set
(
"groupCode"
,
groupCode
);
EiCommunicator
.
send
(
"HP
XS001
"
,
"queryGroupCode"
,
inInfo
,
{
EiCommunicator
.
send
(
"HP
SC008
"
,
"queryGroupCode"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
var
input
=
$
(
"#inqu_status-0-userId"
);
dataEdition
=
ei
.
getBlock
(
"user_id_block_id"
).
getMappedRows
();
...
...
src/main/webapp/HP/
XS/HPXS001
.jsp
→
src/main/webapp/HP/
SC/HPSC008
.jsp
View file @
b0c8b452
File moved
src/main/webapp/HP/XS/HPXS002.jsp
View file @
b0c8b452
...
...
@@ -15,15 +15,12 @@
<EF:EFPage title="设计图管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<%--<EF:EFAutoComplete ename="inqu_status-0-node_ename" dataField="node_ename" cname="项目名称" queryMethod="queryA"
serviceName="EEDM6001" resultId="blockA">
</EF:EFAutoComplete>--%>
<EF:EFSelect cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"
<%--<EF:EFSelect cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"
filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<
%--<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>--%
>
</EF:EFSelect>
--%>
<
EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/
>
<EF:EFSelect cname="产品类型" ename="inqu_status-0-prdtType" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<%--<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>--%>
...
...
@@ -35,10 +32,6 @@
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
<%--<EF:EFSelect cname="是否删除" ename="deleteFlag" blockId="inqu_status" row="0" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>--%>
</div>
</EF:EFRegion>
...
...
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