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
8e2ab56f
Commit
8e2ab56f
authored
Feb 05, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产下料
parent
e116e06b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
76 additions
and
11 deletions
+76
-11
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+20
-5
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+38
-0
HPSC006.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC006.xml
+12
-0
HPSC002.js
src/main/webapp/HP/SC/HPSC002.js
+1
-1
HPSC003.js
src/main/webapp/HP/SC/HPSC003.js
+1
-1
HPSC005.js
src/main/webapp/HP/SC/HPSC005.js
+1
-1
HPSC006.js
src/main/webapp/HP/SC/HPSC006.js
+3
-3
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
8e2ab56f
...
...
@@ -8,6 +8,7 @@ import com.baosight.hpjx.hp.kc.domain.HPKC005;
import
com.baosight.hpjx.hp.kc.tools.HPKCTools
;
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.util.BeanUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
...
...
@@ -20,6 +21,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -40,13 +42,26 @@ public class ServiceHPSC002A extends ServiceEPBase {
try
{
// 查询物料ID所对应的项目名称和部件名称
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
HPSC002
>
dbSc002s
=
dao
.
query
(
"HPSC002.query"
,
queryMap
);
if
(
CollectionUtils
.
isNotEmpty
(
dbSc002s
))
{
HPSC002
dbSc002
=
dbSc002s
.
get
(
0
);
String
bizType
=
inInfo
.
getString
(
"inqu_status-0-bizType"
);
List
<
HPSC002
>
dbSc002s
=
new
ArrayList
<
HPSC002
>();
List
<
HPSC006
>
HPSC006
=
new
ArrayList
<
HPSC006
>();
if
(
bizType
.
equals
(
"WL"
))
{
dbSc002s
=
dao
.
query
(
"HPSC002.query"
,
queryMap
);
}
else
if
(
bizType
.
equals
(
"XL"
))
{
HPSC006
=
dao
.
query
(
"HPSC006.query"
,
queryMap
);
}
if
(
CollectionUtils
.
isNotEmpty
(
dbSc002s
)
||
CollectionUtils
.
isNotEmpty
(
HPSC006
))
{
inInfo
.
set
(
"inqu_status-0-bizType"
,
queryMap
.
get
(
"bizType"
));
inInfo
.
set
(
"inqu_status-0-matId"
,
queryMap
.
get
(
"id"
));
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getPrdtName
());
if
(
bizType
.
equals
(
"WL"
))
{
HPSC002
dbSc002
=
dbSc002s
.
get
(
0
);
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getPrdtName
());
}
else
if
(
bizType
.
equals
(
"XL"
))
{
HPSC006
dbSc002
=
HPSC006
.
get
(
0
);
inInfo
.
set
(
"inqu_status-0-projName"
,
dbSc002
.
getProjName
());
inInfo
.
set
(
"inqu_status-0-prdtName"
,
dbSc002
.
getInventName
());
}
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC002A
().
eiMetadata
);
}
}
catch
(
PlatException
e
)
{
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
8e2ab56f
...
...
@@ -6,6 +6,7 @@ import com.baosight.hpjx.common.HPConstants;
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.pz.domain.HPPZ011
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.*
;
import
com.baosight.hpjx.util.CommonMethod
;
...
...
@@ -208,4 +209,41 @@ public class ServiceHPSC006 extends ServiceBase {
return
eiInfo
;
}
/**
* 分派
* @param eiInfo
* @return
*/
public
EiInfo
assign
(
EiInfo
eiInfo
)
{
try
{
String
ids
=
eiInfo
.
get
(
"ids"
).
toString
();
String
orgId
=
eiInfo
.
get
(
"id"
).
toString
();
//先找到分派的组织
HPPZ011
HPPZ011
=(
HPPZ011
)
dao
.
get
(
"HPPZ011.get"
,
"id"
,
orgId
);
String
[]
id
=
ids
.
split
(
","
);
for
(
int
i
=
0
;
i
<
id
.
length
;
i
++)
{
// 更新HPSC005的数据
HPSC006
HPSC006
=
new
HPSC006
();
HPSC006
.
setId
(
NumberUtils
.
toLong
(
id
[
i
]));
HPSC006
.
setStatus
(
1
);
HPSC006
.
setOrgNo
(
HPPZ011
.
getGroupCode
());
HPSC006
.
setFactoryCode
(
HPPZ011
.
getFactoryCode
());
HPSC006
.
setFactoryName
(
HPPZ011
.
getFactoryName
());
DaoUtils
.
update
(
"HPSC006.updateAssign"
,
HPSC006
.
toMap
());
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"分派成功!"
);
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"分派失败!原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"分派失败"
,
e
.
getMessage
());
return
eiInfo
;
}
return
query
(
eiInfo
);
}
}
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC006.xml
View file @
8e2ab56f
...
...
@@ -279,4 +279,16 @@
ID = #id#
</update>
<update
id=
"updateAssign"
>
UPDATE ${hpjxSchema}.T_HPSC006
SET
STATUS = #status#,
<!-- 状态 0-未派工,1-已派工 -->
ORG_NO = #orgNo#,
<!-- 生产组编码 -->
FACTORY_CODE = #factoryCode#,
<!-- 厂区编码 -->
FACTORY_NAME = #factoryName#,
<!-- 厂区名称 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_TIME = #updatedTime#
<!-- 更新时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
src/main/webapp/HP/SC/HPSC002.js
View file @
8e2ab56f
...
...
@@ -377,7 +377,7 @@ function openUploadFile(id) {
*/
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSC002A?methodName=initLoad&inqu_status-0-bizType=
'WL'?
inqu_status-0-id="
+
id
,
href
:
"HPSC002A?methodName=initLoad&inqu_status-0-bizType=
WL&
inqu_status-0-id="
+
id
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HP/SC/HPSC003.js
View file @
8e2ab56f
...
...
@@ -180,7 +180,7 @@ $(function () {
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSC002B?methodName=initLoad&inqu_status-0-bizType=
'WL'?
inqu_status-0-id="
+
id
,
href
:
"HPSC002B?methodName=initLoad&inqu_status-0-bizType=
WL&
inqu_status-0-id="
+
id
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HP/SC/HPSC005.js
View file @
8e2ab56f
...
...
@@ -92,7 +92,7 @@ function jump(productionOrderNo) {
}
function showUploadFile(id) {
JSColorbox.open({
href: "
HPSC002B
?
methodName
=
initLoad
&
inqu_status
-
0
-
bizType
=
'WL'
?
inqu_status
-
0
-
id
=
" + id,
href: "
HPSC002B
?
methodName
=
initLoad
&
inqu_status
-
0
-
bizType
=
WL
&
inqu_status
-
0
-
id
=
" + id,
title: "
<
div
style
=
'text-align: center;'
>
附件清单
<
/div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
src/main/webapp/HP/SC/HPSC006.js
View file @
8e2ab56f
...
...
@@ -94,7 +94,7 @@ $(function () {
{
field
:
"operator"
,
template
:
function
(
item
)
{
let
filePath1
=
item
.
filePath1
;
let
filePath1
=
item
.
id
;
let
template
=
''
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="showUploadFile('
+
filePath1
+
')" >附件清单</a>'
;
...
...
@@ -119,7 +119,7 @@ query = function () {
}
function
showUploadFile
(
id
)
{
JSColorbox
.
open
({
href
:
"HPSC002A?methodName=initLoad&inqu_status-0-bizType=
'XL'?
inqu_status-0-id="
+
id
,
href
:
"HPSC002A?methodName=initLoad&inqu_status-0-bizType=
XL&
inqu_status-0-id="
+
id
,
title
:
"<div style='text-align: center;'>附件清单</div>"
,
width
:
"80%"
,
height
:
"80%"
,
...
...
@@ -129,7 +129,7 @@ assignCallback = function (id) {
var
info
=
new
EiInfo
()
info
.
set
(
"ids"
,
ids
.
join
(
','
));
info
.
set
(
"id"
,
id
);
EiCommunicator
.
send
(
"HPSC00
5
"
,
"assign"
,
info
,{
EiCommunicator
.
send
(
"HPSC00
6
"
,
"assign"
,
info
,{
onSuccess
:
function
(
ei
){
//返回结果集
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
...
...
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