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
00281a1d
Commit
00281a1d
authored
Mar 12, 2024
by
yukang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下料登记修改用工信息
parent
0738d0c9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
11 deletions
+45
-11
DdynamicEnum.java
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
+7
-2
HPPZ013.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ013.xml
+17
-0
HPPZTools.java
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
+13
-5
ServiceHPSC007.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC007.java
+7
-3
HPSC007.jsp
src/main/webapp/HP/SC/HPSC007.jsp
+1
-1
No files found.
src/main/java/com/baosight/hpjx/common/DdynamicEnum.java
View file @
00281a1d
...
...
@@ -249,9 +249,14 @@ public enum DdynamicEnum {
* 用途:厂区查询
* 编写:ly
*/
FACTORY_CODE_BLOCK_ID
(
"factory_code_block_id"
,
"factoryCode"
,
"factoryName"
,
"HPXS001.queryFactoryCode"
);
FACTORY_CODE_BLOCK_ID
(
"factory_code_block_id"
,
"factoryCode"
,
"factoryName"
,
"HPXS001.queryFactoryCode"
),
/**
* 模块:工人管理
* 用途:工人管理下拉框
* 编写:wwl
*/
WORKER_BLOCK_ID
(
"worker_block_id"
,
"userId"
,
"userName"
,
"HPPZ013.queryComboBox"
);
/** 将结果集放入的块名 */
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ013.xml
View file @
00281a1d
...
...
@@ -168,4 +168,21 @@
WHERE ID = #id#
</update>
<select
id=
"queryComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
USER_ID as "userId",
USER_NAME as "userName"
FROM ${hpjxSchema}.T_HPPZ013 WHERE STATUS = 1 AND DELETE_FLAG = '0'
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupCode"
>
GROUP_CODE = #groupCode#
</isNotEmpty>
ORDER BY USER_ID
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
View file @
00281a1d
...
...
@@ -6,11 +6,7 @@ import com.baosight.hpjx.core.dao.DaoBase;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ004
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ006
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ007
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ011
;
import
com.baosight.hpjx.hp.pz.domain.*
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
...
...
@@ -534,6 +530,18 @@ public class HPPZTools {
}
}
public
static
class
HpPz013
{
public
static
HPPZ013
get
(
String
userId
)
{
AssertUtils
.
isNull
(
userId
,
"工人ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"userId"
,
userId
);
List
<
HPPZ013
>
results
=
DaoBase
.
getInstance
().
query
(
HPPZ013
.
QUERY
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
String
.
format
(
"工人ID[%s]不存在"
,
userId
));
return
results
.
get
(
0
);
}
}
/**
* 判断存货档案是否存在,如果存在返回存货档案,否则新增并返回存货档案
*
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC007.java
View file @
00281a1d
...
...
@@ -6,6 +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.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.sc.domain.HPSC006
;
...
...
@@ -46,7 +47,10 @@ public class ServiceHPSC007 extends ServiceBase {
HPSC006
.
setPartName
(
HPSC005
.
getPartName
());
inInfo
.
addBlock
(
"detail"
).
addRow
(
HPSC006
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPSC007
().
eiMetadata
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
USER_BLOCK_ID
),
null
,
false
);
Map
map
=
new
HashMap
();
map
.
put
(
"factoryCode"
,
HPSC006
.
getFactoryCode
());
map
.
put
(
"groupCode"
,
HPSC006
.
getOrgNo
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WORKER_BLOCK_ID
),
map
,
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"初始化失败"
);
}
...
...
@@ -112,8 +116,7 @@ public class ServiceHPSC007 extends ServiceBase {
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
num
.
multiply
(
unitWt
).
floatValue
()));
actualCompletionTotalWt
=
actualCompletionTotalWt
.
add
(
totalWt
);
HPSC007
.
setactualCompletionTotalWt
(
totalWt
);
Map
<
String
,
String
>
user
=
(
Map
<
String
,
String
>)
this
.
dao
.
get
(
"HPXSUser.queryComboBox"
,
"userId"
,
HPSC007
.
getUserId
());
HPSC007
.
setUserName
(
user
.
get
(
"userName"
));
HPSC007
.
setUserName
(
HPPZTools
.
HpPz013
.
get
(
HPSC007
.
getUserId
()).
getUserName
());
DaoUtils
.
insert
(
"HPSC007.insert"
,
HPSC007
);
}
// 修改下料表中的字段
...
...
@@ -178,6 +181,7 @@ public class ServiceHPSC007 extends ServiceBase {
BigDecimal
totalWt
=
new
BigDecimal
(
decimalFormat
.
format
(
Math
.
round
(
num
.
multiply
(
unitWt
).
floatValue
())));
actualCompletionTotalWt
=
actualCompletionTotalWt
.
add
(
new
BigDecimal
(
decimalFormat
.
format
(
Math
.
round
(
totalNum
.
multiply
(
unitWt
).
floatValue
()))));
HPSC007
.
setactualCompletionTotalWt
(
totalWt
);
HPSC007
.
setUserName
(
HPPZTools
.
HpPz013
.
get
(
HPSC007
.
getUserId
()).
getUserName
());
DaoUtils
.
insert
(
"HPSC007.update"
,
HPSC007
);
}
// 修改下料表中的字段
...
...
src/main/webapp/HP/SC/HPSC007.jsp
View file @
00281a1d
...
...
@@ -47,7 +47,7 @@
<EF:EFColumn
ename=
"hpsc006Id"
cname=
"生产下料ID"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"userId"
cname=
"完成人"
width=
"100"
align=
"center"
filter=
"contains"
readonly=
"true"
>
<EF:EFOptions
blockId=
"
us
er_block_id"
valueField=
"valueField"
textField=
"textField"
/>
<EF:EFOptions
blockId=
"
work
er_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"userName"
cname=
"完成名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"actualCompletionNum"
cname=
"完成数量"
format=
"{0:N3}"
maxLength=
"12"
displayType=
"0.000"
...
...
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