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
cb63a7ab
Commit
cb63a7ab
authored
Jan 26, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
9a02e794
c7d550ee
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
20 deletions
+79
-20
HPSC002.java
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC002.java
+14
-1
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+8
-4
HPSC002.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
+32
-10
HPSC003.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
+1
-1
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+8
-2
HPSC002.jsp
src/main/webapp/HP/SC/HPSC002.jsp
+1
-0
HPSC011.jsp
src/main/webapp/HP/SC/HPSC011.jsp
+10
-2
HPSC098.js
src/main/webapp/HP/SC/HPSC098.js
+5
-0
No files found.
src/main/java/com/baosight/hpjx/hp/sc/domain/HPSC002.java
View file @
cb63a7ab
...
...
@@ -52,6 +52,7 @@ public class HPSC002 extends DaoEPBase {
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedTime
;
/* 更新时间*/
private
String
remark
=
" "
;
/* 备注*/
private
Integer
lv
=
0
;
/*层级*/
/**
* initialize the metadata
...
...
@@ -186,7 +187,9 @@ public class HPSC002 extends DaoEPBase {
eiColumn
.
setDescName
(
"备注"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"lv"
);
eiColumn
.
setDescName
(
"层级"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -646,6 +649,14 @@ public class HPSC002 extends DaoEPBase {
this
.
remark
=
remark
;
}
public
Integer
getLv
()
{
return
lv
;
}
public
void
setLv
(
Integer
lv
)
{
this
.
lv
=
lv
;
}
/**
* get the value from Map
*/
...
...
@@ -681,6 +692,7 @@ public class HPSC002 extends DaoEPBase {
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedBy"
)),
updatedBy
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"updatedTime"
)),
updatedTime
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"remark"
)),
remark
));
setLv
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
"lv"
)),
lv
));
}
/**
...
...
@@ -719,6 +731,7 @@ public class HPSC002 extends DaoEPBase {
map
.
put
(
"updatedBy"
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
"updatedBy"
)));
map
.
put
(
"updatedTime"
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
"updatedTime"
)));
map
.
put
(
"remark"
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
"remark"
)));
map
.
put
(
"lv"
,
StringUtils
.
toString
(
lv
,
eiMetadata
.
getMeta
(
"lv"
)));
return
map
;
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
cb63a7ab
...
...
@@ -5,7 +5,6 @@ import com.baosight.hpjx.common.DdynamicEnum;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC003
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.HPSC003
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
...
...
@@ -18,7 +17,6 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.util.DateUtil
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
...
...
@@ -88,6 +86,12 @@ public class ServiceHPSC002 extends ServiceBase {
if
(
StringUtils
.
isNotEmpty
(
hppz002
.
getPrdtCode
())
&&
!
hppz002
.
getParentId
().
equals
(
"root"
))
{
hppz002
.
setPrdtName
(
HPPZTools
.
getPz004ByCode
(
hppz002
.
getPrdtCode
()).
getInventName
());
}
if
(
hppz002
.
getParentId
().
equals
(
"root"
)){
hppz002
.
setLv
(
new
Integer
(
1
));
}
else
{
Integer
lv
=
(
Integer
)
this
.
dao
.
get
(
"HPSC002.queryLv"
,
"id"
,
hppz002
.
getParentId
());
hppz002
.
setLv
(
lv
.
intValue
()+
1
);
}
DaoUtils
.
insert
(
"HPSC002.insert"
,
hppz002
.
toMap
());
if
(!
hppz002
.
getParentId
().
equals
(
"root"
))
{
this
.
checkTreeNodeLeaf
(
new
Long
(
hppz002
.
getParentId
()));
...
...
@@ -349,7 +353,7 @@ public class ServiceHPSC002 extends ServiceBase {
*/
public
void
autoPlanInfo
(
String
id
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
HPSC002
THPSC002
=
(
HPSC002
)
dao
.
get
(
"HPSC002.query"
,
"id"
,
id
);
HPSC002
THPSC002
=
(
HPSC002
)
dao
.
get
(
"HPSC002.query
EntityByParentPrtdCode
"
,
"id"
,
id
);
String
SCJHD
=
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPSC003_PROD_NO
);
//生成生产计划t_hpsc003
HPSC003
HPSC003
=
new
HPSC003
();
...
...
@@ -372,7 +376,7 @@ public class ServiceHPSC002 extends ServiceBase {
//生产计划详情
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"
i
d"
,
id
);
queryMap
.
put
(
"
parentI
d"
,
id
);
List
<
HPSC002
>
rows
=
this
.
dao
.
query
(
"HPSC002.queryEntityByParentPrtdCode"
,
queryMap
);
for
(
int
i
=
0
;
i
<
rows
.
size
();
i
++)
{
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC002.xml
View file @
cb63a7ab
...
...
@@ -67,7 +67,8 @@
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark"
<!-- 备注 -->
REMARK as "remark",
<!-- 备注 -->
LV as "lv"
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
...
...
@@ -95,7 +96,10 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
LV = #lv#
</isNotEmpty>
ORDER BY ID DESC
<!-- <dynamic prepend="ORDER BY">-->
<!-- <isEmpty property="orderBy">-->
<!-- CREATED_TIME DESC-->
...
...
@@ -132,6 +136,9 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"lv"
>
LV = #lv#
</isNotEmpty>
</select>
<!--
...
...
@@ -251,9 +258,10 @@
CREATED_TIME,
<!-- 创建时间 -->
UPDATED_BY,
<!-- 更新人 -->
UPDATED_TIME,
<!-- 更新时间 -->
REMARK
<!-- 备注 -->
REMARK,
<!-- 备注 -->
LV
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#
, #lv#
)
</insert>
<delete
id=
"delete"
>
...
...
@@ -313,7 +321,8 @@
TYPE as "type",
<!-- 类别 -->
LEAF as "leaf",
<!-- 是否有叶子节点 -->
SORT as "sort",
<!-- 排序字段 -->
ICON as "icon"
<!-- 图片地址 -->
ICON as "icon",
<!-- 图片地址 -->
LV as "lv"
FROM
hpjx.t_hpsc002
WHERE
...
...
@@ -358,7 +367,8 @@
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark"
<!-- 备注 -->
REMARK as "remark",
<!-- 备注 -->
LV as "lv"
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
...
...
@@ -402,8 +412,15 @@
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REMARK as "remark"
<!-- 备注 -->
FROM hpjx.t_hpsc002 WHERE PARENT_ID = #id#
REMARK as "remark",
<!-- 备注 -->
LV as "lv"
FROM hpjx.t_hpsc002 WHERE 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
</select>
<update
id=
"updateTreeNodeLeaf"
>
...
...
@@ -424,16 +441,21 @@
WHERE 1 = 1
AND PARENT_ID != 'root'
AND `STATUS` = 0
<isNotEmpty
prepend=
" AND "
property=
"p
arentId
"
>
<isNotEmpty
prepend=
" AND "
property=
"p
rojCode
"
>
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
<select
id=
"queryLv"
resultClass=
"int"
>
SELECT LV from hpjx.t_hpsc002
WHERE ID = #id#
</select>
<select
id=
"checkExamineNum1Count"
resultClass=
"int"
>
SELECT COUNT(1) from hpjx.t_hpsc002
WHERE 1 = 1
AND PARENT_ID != 'root'
<isNotEmpty
prepend=
" AND "
property=
"p
arentId
"
>
<isNotEmpty
prepend=
" AND "
property=
"p
rojCode
"
>
PROJ_CODE = #projCode#
</isNotEmpty>
</select>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
View file @
cb63a7ab
...
...
@@ -104,7 +104,7 @@
FROM
hpjx.T_HPSC004
WHERE
PROJ_CODE = hpjx.T_HPSC003.PROJ_CODE
PARENT_ID = hpjx.T_HPSC003.PLAN_INFO_NO
),'%') AS "schedule"
FROM hpjx.T_HPSC003 WHERE 1=1
<include
refid=
"condition"
/>
...
...
src/main/webapp/HP/SC/HPSC002.js
View file @
cb63a7ab
...
...
@@ -79,6 +79,12 @@ $(function () {
});
},
onSuccess
:
function
(
e
)
{
if
(
e
.
eiInfo
.
extAttr
.
methodName
==
'update'
||
e
.
eiInfo
.
extAttr
.
methodName
==
'insert'
){
query
();
}
},
query
:
function
()
{
var
ei
=
new
EiInfo
();
ei
.
set
(
"inqu_status-0-prdtType"
,
$
(
"#inqu_status-0-prdtType"
).
val
());
...
...
@@ -184,13 +190,13 @@ $(function () {
template
:
function
(
item
)
{
console
.
log
(
item
)
let
auditStatus
=
item
.
status
;
let
l
eaf
=
item
.
leaf
let
l
v
=
item
.
lv
let
template
=
''
;
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="openUploadFile(' + item.id + ',1)" >附件上传</a>';
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
item
.
id
+
')" >附件清单</a>'
;
if
(
l
eaf
===
'1
'
)
{
if
(
l
v
===
'3
'
)
{
if
(
auditStatus
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="check('
+
item
.
id
+
',1)" >审核</a>'
;
...
...
src/main/webapp/HP/SC/HPSC002.jsp
View file @
cb63a7ab
...
...
@@ -43,6 +43,7 @@
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
checkMode=
"single"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"level"
cname=
"层级"
hidden=
"true"
/>
<EF:EFColumn
enable=
"false"
ename=
"projCode"
cname=
"项目编码"
/>
<EF:EFColumn
enable=
"false"
ename=
"projName"
cname=
"项目名称"
/>
<EF:EFComboColumn
cname=
"产品类型"
ename=
"prdtType"
width=
"90"
align=
"center"
required=
"true"
>
...
...
src/main/webapp/HP/SC/HPSC011.jsp
View file @
cb63a7ab
...
...
@@ -49,8 +49,16 @@
</EF:EFComboColumn>
<EF:EFColumn
enable=
"false"
ename=
"projCode"
cname=
"项目编码"
/>
<EF:EFColumn
enable=
"false"
ename=
"projName"
cname=
"项目名称"
/>
<EF:EFColumn
enable=
"false"
ename=
"princ1"
cname=
"本公司项目负责人"
/>
<EF:EFColumn
enable=
"false"
ename=
"princ2"
cname=
"客户项目负责人"
/>
<EF:EFComboColumn
ename=
"princ1"
cname=
"本公司项目负责人"
width=
"120"
align=
"center"
required=
"true"
blockName=
"user_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"true"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"princ2"
cname=
"客户项目负责人"
width=
"120"
align=
"center"
required=
"true"
blockName=
"customer_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"true"
filter=
"contains"
>
</EF:EFComboColumn>
<EF:EFComboColumn
required=
"true"
align=
"center"
ename=
"materialStatus"
cname=
"物料审核状态"
defaultValue=
"0"
>
<EF:EFOption
label=
"未审核"
value=
"0"
/>
<EF:EFOption
label=
"部分审核"
value=
"1"
/>
...
...
src/main/webapp/HP/SC/HPSC098.js
View file @
cb63a7ab
...
...
@@ -22,6 +22,11 @@ $(function () {
return
;
}
let
row
=
rows
[
0
];
let
isInput
=
decodeURI
(
window
.
location
.
href
.
split
(
"&"
)[
1
]);
if
(
isInput
===
"isInput"
){
parent
.
JSColorbox
.
setValueCallback
(
row
.
orgId
);
return
;
};
JSUtils
.
confirm
(
"确定
\"
是否
\"
分派? "
,
{
ok
:
function
()
{
parent
.
JSColorbox
.
setValueCallback
(
row
.
orgId
);
...
...
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