Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
50191afd
Commit
50191afd
authored
Jul 05, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购合同计算原材料时根据重量*单价计算
parent
1d2cdf1f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
22 deletions
+62
-22
ServiceHGPZ005.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
+20
-0
ServiceHGSC009.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
+2
-1
ServiceHGSC009A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
+1
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+6
-2
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+30
-12
HGCG002.jsp
src/main/webapp/HG/CG/HGCG002.jsp
+2
-0
HGSC009A.js
src/main/webapp/HG/SC/HGSC009A.js
+1
-6
No files found.
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
50191afd
...
...
@@ -279,6 +279,26 @@ public class ServiceHGPZ005 extends ServiceBase {
}
/**
* 下拉框 (不默认状态)
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"存货档案"
,
operType
=
"查询"
,
operDesc
=
"下拉框(原料、零件、耗材)"
)
public
EiInfo
queryInventCodeProdTypeFourBox
(
EiInfo
inInfo
)
{
try
{
List
<
DdynamicEnum
>
list
=
new
ArrayList
<>();
list
.
add
(
DdynamicEnum
.
INVENT_RECORD_BOX_BLOCK_ID
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGPZ004
.
FIELD_INVENT_TYPE_DETAILS
,
InventTypeDetailEnum
.
getInentTypeThree
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGPZ005
.
FIELD_STATUS
,
1
);
CommonMethod
.
initBlock
(
inInfo
,
list
,
EiInfoUtils
.
getFirstRow
(
inInfo
),
false
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询规格失败"
);
}
return
inInfo
;
}
/**
* 下拉框
*
* @param inInfo
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
View file @
50191afd
...
...
@@ -170,7 +170,8 @@ public class ServiceHGSC009 extends ServiceEPBase {
* @param hgsc009
*/
private
void
checkUpdateStatusData
(
HGSC009
hgsc009
)
{
List
<
HGSC009A
>
hgsc009AList
=
HGSCTools
.
HGSC009
.
getByPlanMaterialCode
(
hgsc009
.
getPlanMaterialCode
());
hgsc009
=
HGSCTools
.
THGSC009
.
getById
(
hgsc009
.
getId
());
List
<
HGSC009A
>
hgsc009AList
=
HGSCTools
.
THGSC009
.
getByPlanMaterialCode
(
hgsc009
.
getPlanMaterialCode
());
List
<
Long
>
materialPlanIds
=
hgsc009AList
.
stream
().
map
(
HGSC009A:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
HGCG001
>
hgcg001List
=
HGCGTools
.
HgCg001
.
listByMaterialPlanIds
(
materialPlanIds
);
hgsc009AList
.
forEach
(
o
->{
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
50191afd
...
...
@@ -217,7 +217,7 @@ public class ServiceHGSC009A extends ServiceBase {
public
EiInfo
insertcg
(
EiInfo
inInfo
)
{
try
{
String
[]
orderDetailIds
=
inInfo
.
getString
(
"planMaterialCodes"
).
split
(
","
);
List
<
HGSC009A
>
hgsc009AList
=
HGSCTools
.
HGSC009
.
getByPlanMaterialCodes
(
orderDetailIds
);
List
<
HGSC009A
>
hgsc009AList
=
HGSCTools
.
T
HGSC009
.
getByPlanMaterialCodes
(
orderDetailIds
);
List
<
String
>
inventCodes
=
Optional
.
ofNullable
(
hgsc009AList
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
HGSC009A:
:
getInventCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
String
>
inventUnitMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
inventCodes
)){
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
50191afd
...
...
@@ -1185,7 +1185,7 @@ public class HGSCTools {
}
public
static
class
HGSC009
{
public
static
class
T
HGSC009
{
/* public static void generatorOrder(List<HGSC005> hgsc005List, List<HGSC005A> hgsc005AList){
Map<String, Optional<HGSC005>> hgsc005Map = hgsc005List.stream().collect(Collectors.groupingBy(HGSC005::getPlanCode,Collectors.maxBy(
Comparator.comparingLong(HGSC005::getId))));
...
...
@@ -1211,7 +1211,11 @@ public class HGSCTools {
hgsc006.setAssignStatus(UNASSIGN.getCode());
return hgsc006;
}*/
public
static
HGSC009
getById
(
Long
taskId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
taskId
)||
taskId
<=
0
,
"材料计划ID不能为空!"
);
HGSC009
results
=
(
HGSC009
)
DaoBase
.
getInstance
().
get
(
HGSC009
.
QUERY
,
HGSC009
.
FIELD_ID
,
taskId
);
return
results
;
}
public
static
List
<
HGSC009A
>
getByPlanMaterialCodes
(
String
[]
planMaterialCodes
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
planMaterialCodes
)||
planMaterialCodes
.
length
<=
0
,
"材料计划编码不能为空!"
);
Map
map
=
new
HashMap
<>();
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
50191afd
...
...
@@ -100,18 +100,36 @@ $(function () {
* @param coefficient
*/
let
calAmount
=
function
(
item
)
{
if
(
item
.
purQty
&&
item
.
price
&&
item
.
taxRate
){
// 数量*单价金额
let
totalAmount
=
item
.
purQty
*
item
.
price
;
//不含税金额
let
amount
=
totalAmount
/
(
1
+
item
.
taxRate
/
100
);
//税额
let
taxAmount
=
totalAmount
-
amount
;
//含税金额
let
taxIncludeAmount
=
totalAmount
;
resultGrid
.
setCellValue
(
item
,
'taxAmount'
,
taxAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
//原材料
if
(
item
.
inventTypeDetail
===
'3'
){
if
(
item
.
purWeight
&&
item
.
price
&&
item
.
taxRate
){
// 重量*单价金额
let
totalAmount
=
item
.
purWeight
*
item
.
price
;
//不含税金额
let
amount
=
totalAmount
/
(
1
+
item
.
taxRate
/
100
);
//税额
let
taxAmount
=
totalAmount
-
amount
;
//含税金额
let
taxIncludeAmount
=
totalAmount
;
resultGrid
.
setCellValue
(
item
,
'taxAmount'
,
taxAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
}
}
else
{
if
(
item
.
purQty
&&
item
.
price
&&
item
.
taxRate
){
// 数量*单价金额
let
totalAmount
=
item
.
purQty
*
item
.
price
;
//不含税金额
let
amount
=
totalAmount
/
(
1
+
item
.
taxRate
/
100
);
//税额
let
taxAmount
=
totalAmount
-
amount
;
//含税金额
let
taxIncludeAmount
=
totalAmount
;
resultGrid
.
setCellValue
(
item
,
'taxAmount'
,
taxAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
}
}
}
...
...
src/main/webapp/HG/CG/HGCG002.jsp
View file @
50191afd
...
...
@@ -83,6 +83,8 @@
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
<EF:EFColumn
ename=
"inventTypeDetail"
cname=
"存货类型明细"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/SC/HGSC009A.js
View file @
50191afd
...
...
@@ -11,11 +11,6 @@ $(function () {
},
columns
:
[{
field
:
"inventCode"
,
filter
:
function
(
options
)
{
return
_
.
filter
(
inventAllBlockId
,
function
(
item
)
{
return
item
[
"param1Field"
]
==
"true"
;
})
},
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
inventCode
){
...
...
@@ -33,7 +28,7 @@ $(function () {
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
=
inventRecordBoxBlockId
;
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInventCodeBox"
,
inInfo
,
{
EiCommunicator
.
send
(
"HGPZ005"
,
"queryInventCode
ProdTypeFour
Box"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_record_box_block_id"
).
getMappedRows
();
},
...
...
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