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
50e71e74
Commit
50e71e74
authored
Jul 31, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-31 材料计划添加导入功能
parent
a5c1f750
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
150 additions
and
14 deletions
+150
-14
HGSC009.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC009.java
+17
-0
HGSC009A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC009A.java
+22
-6
HGSC009.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009.xml
+10
-1
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+95
-4
ACConstants.java
...ain/java/com/baosight/hggp/util/contants/ACConstants.java
+3
-0
HGSC009.js
src/main/webapp/HG/SC/HGSC009.js
+2
-2
HGSC009.jsp
src/main/webapp/HG/SC/HGSC009.jsp
+1
-1
HGSC009A_材料计划.xls
src/main/webapp/common/template/SC/HGSC009A_材料计划.xls
+0
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC009.java
View file @
50e71e74
package
com
.
baosight
.
hggp
.
hg
.
sc
.
domain
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
...
...
@@ -30,6 +31,7 @@ public class HGSC009 extends DaoEPBase {
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PLAN_MATERIAL_CODE
=
"planMaterialCode"
;
/* 材料计划编码*/
public
static
final
String
FIELD_PLAN_MATERIAL_NAME
=
"planMaterialName"
;
/* 材料计划名称*/
public
static
final
String
FIELD_PLAN_MATERIAL_DATE
=
"planMaterialDate"
;
/* 材料计划日期*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 提交状态 0-未提交 1-已提交*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
...
...
@@ -74,6 +76,7 @@ public class HGSC009 extends DaoEPBase {
private
String
projName
=
" "
;
/* 项目名称*/
private
String
planMaterialCode
=
" "
;
/* 材料计划编码*/
private
String
planMaterialName
=
" "
;
/* 材料计划名称*/
private
String
planMaterialDate
=
" "
;
/* 材料计划日期*/
private
Integer
status
;
/* 提交状态 0-未提交 1-已提交*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
...
...
@@ -126,6 +129,10 @@ public class HGSC009 extends DaoEPBase {
eiColumn
.
setDescName
(
"材料计划名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_MATERIAL_DATE
);
eiColumn
.
setDescName
(
"材料计划日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"提交状态 0-未提交 1-已提交"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -423,6 +430,14 @@ public class HGSC009 extends DaoEPBase {
this
.
updatedTime
=
updatedTime
;
}
public
String
getPlanMaterialDate
()
{
return
planMaterialDate
;
}
public
void
setPlanMaterialDate
(
String
planMaterialDate
)
{
this
.
planMaterialDate
=
planMaterialDate
;
}
@Override
public
void
fromMap
(
Map
map
)
{
...
...
@@ -435,6 +450,7 @@ public class HGSC009 extends DaoEPBase {
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setPlanMaterialCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_MATERIAL_CODE
)),
planMaterialCode
));
setPlanMaterialName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_MATERIAL_NAME
)),
planMaterialName
));
setPlanMaterialDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
DateUtils
.
formatShort
(
map
.
get
(
FIELD_PLAN_MATERIAL_DATE
))),
planMaterialDate
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
...
...
@@ -460,6 +476,7 @@ public class HGSC009 extends DaoEPBase {
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_PLAN_MATERIAL_CODE
,
StringUtils
.
toString
(
planMaterialCode
,
eiMetadata
.
getMeta
(
FIELD_PLAN_MATERIAL_CODE
)));
map
.
put
(
FIELD_PLAN_MATERIAL_NAME
,
StringUtils
.
toString
(
planMaterialName
,
eiMetadata
.
getMeta
(
FIELD_PLAN_MATERIAL_NAME
)));
map
.
put
(
FIELD_PLAN_MATERIAL_DATE
,
StringUtils
.
toString
(
planMaterialDate
,
eiMetadata
.
getMeta
(
FIELD_PLAN_MATERIAL_DATE
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC009A.java
View file @
50e71e74
...
...
@@ -90,6 +90,7 @@ public class HGSC009A extends DaoEPBase {
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
planMaterialDate
=
" "
;
/* 材料计划编码*/
private
String
planMaterialCode
=
" "
;
/* 材料计划编码*/
private
String
planMaterialName
=
" "
;
/* 材料计划名称*/
private
String
inventCode
=
" "
;
/* 存货编码*/
...
...
@@ -145,6 +146,10 @@ public class HGSC009A extends DaoEPBase {
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
"planMaterialDate"
);
eiColumn
.
setDescName
(
"材料计划日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PLAN_MATERIAL_CODE
);
eiColumn
.
setDescName
(
"材料计划编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -154,11 +159,11 @@ public class HGSC009A extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"
存货编码
"
);
eiColumn
.
setDescName
(
"
产品编号
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"
存货
名称"
);
eiColumn
.
setDescName
(
"
产品
名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC
);
...
...
@@ -173,21 +178,21 @@ public class HGSC009A extends DaoEPBase {
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"长"
);
eiColumn
.
setDescName
(
"长
(MM)
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"宽"
);
eiColumn
.
setDescName
(
"宽
(MM)
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"厚"
);
eiColumn
.
setDescName
(
"厚
(MM)
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QUANTITY
);
...
...
@@ -201,7 +206,7 @@ public class HGSC009A extends DaoEPBase {
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"单重"
);
eiColumn
.
setDescName
(
"单重
(KG)
"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_GROSS_AMOUNT
);
...
...
@@ -656,6 +661,15 @@ public class HGSC009A extends DaoEPBase {
public
void
setInventTypeDetail
(
String
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
}
public
String
getPlanMaterialDate
()
{
return
planMaterialDate
;
}
public
void
setPlanMaterialDate
(
String
planMaterialDate
)
{
this
.
planMaterialDate
=
planMaterialDate
;
}
/**
* get the value from Map.
*
...
...
@@ -671,6 +685,7 @@ public class HGSC009A extends DaoEPBase {
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setPlanMaterialDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
"planMaterialDate"
)),
planMaterialDate
));
setPlanMaterialCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_MATERIAL_CODE
)),
planMaterialCode
));
setPlanMaterialName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PLAN_MATERIAL_NAME
)),
planMaterialName
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
...
...
@@ -706,6 +721,7 @@ public class HGSC009A extends DaoEPBase {
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
"planMaterialDate"
,
StringUtils
.
toString
(
planMaterialDate
,
eiMetadata
.
getMeta
(
"planMaterialDate"
)));
map
.
put
(
FIELD_PLAN_MATERIAL_CODE
,
StringUtils
.
toString
(
planMaterialCode
,
eiMetadata
.
getMeta
(
FIELD_PLAN_MATERIAL_CODE
)));
map
.
put
(
FIELD_PLAN_MATERIAL_NAME
,
StringUtils
.
toString
(
planMaterialName
,
eiMetadata
.
getMeta
(
FIELD_PLAN_MATERIAL_NAME
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC009.xml
View file @
50e71e74
...
...
@@ -31,6 +31,9 @@
<isNotEmpty
prepend=
" AND "
property=
"planMaterialName"
>
PLAN_MATERIAL_NAME = #planMaterialName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planMaterialDate"
>
PLAN_MATERIAL_DATE = #planMaterialDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
...
...
@@ -69,6 +72,7 @@
PROJ_NAME as "projName",
<!-- 项目名称 -->
PLAN_MATERIAL_CODE as "planMaterialCode",
<!-- 材料计划编码 -->
PLAN_MATERIAL_NAME as "planMaterialName",
<!-- 材料计划名称 -->
PLAN_MATERIAL_DATE as "planMaterialDate",
<!-- 材料计划名称 -->
STATUS as "status",
<!-- 提交状态 0-未提交 1-已提交 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
...
...
@@ -106,6 +110,7 @@
PROJ_NAME,
<!-- 项目名称 -->
PLAN_MATERIAL_CODE,
<!-- 材料计划编码 -->
PLAN_MATERIAL_NAME,
<!-- 材料计划名称 -->
PLAN_MATERIAL_DATE,
STATUS,
<!-- 提交状态 0-未提交 1-已提交 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
...
...
@@ -115,7 +120,10 @@
UPDATED_TIME
<!-- 修改时间 -->
)
VALUES (#id#, #accountCode#, #depCode#, #companyCode#, #companyName#, #projCode#, #projName#, #planMaterialCode#, #planMaterialName#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
VALUES (#id#, #accountCode#, #depCode#, #companyCode#, #companyName#, #projCode#, #projName#, #planMaterialCode#, #planMaterialName#, #planMaterialDate#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGSJ003
</selectKey>
</insert>
<delete
id=
"delete"
>
...
...
@@ -134,6 +142,7 @@
PROJ_NAME = #projName#,
<!-- 项目名称 -->
PLAN_MATERIAL_CODE = #planMaterialCode#,
<!-- 材料计划编码 -->
PLAN_MATERIAL_NAME = #planMaterialName#,
<!-- 材料计划名称 -->
PLAN_MATERIAL_DATE = #planMaterialDate#,
STATUS = #status#,
<!-- 提交状态 0-未提交 1-已提交 -->
CREATED_BY = #createdBy#,
<!-- 创建人 -->
CREATED_NAME = #createdName#,
<!-- 创建人名称 -->
...
...
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
50e71e74
...
...
@@ -9,6 +9,7 @@ import com.baosight.hggp.core.security.UserSessionUtils;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.ds.domain.HGDS002
;
import
com.baosight.hggp.hg.pz.domain.HGPZ004
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005A
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
...
...
@@ -28,12 +29,12 @@ import com.baosight.iplat4j.core.util.NumberUtils;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.time.DateUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
baosight
.
hggp
.
common
.
AssignStatusEnum
.*;
...
...
@@ -1242,6 +1243,15 @@ public class HGSCTools {
AssertUtils
.
isEmpty
(
results
,
"材料计划不能为空!"
);
return
results
;
}
public
static
HGSC009
queryByCode
(
String
projCode
)
{
AssertUtils
.
isNull
(
projCode
,
"项目Code不能为空!"
);
List
<
HGSC009
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC009
.
QUERY
,
new
HashMap
<
String
,
Object
>(){
{
put
(
"projCode"
,
projCode
);}
});
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
public
static
List
<
HGSC009A
>
getByPlanMaterialCodes
(
String
[]
planMaterialCodes
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
planMaterialCodes
)||
planMaterialCodes
.
length
<=
0
,
"材料计划编码不能为空!"
);
Map
map
=
new
HashMap
<>();
...
...
@@ -1261,11 +1271,92 @@ public class HGSCTools {
}
public
static
void
add
(
List
<
Map
>
arrayList
)
{
for
(
Map
map:
arrayList
)
{
HGSC009A
hgsc009A
=
new
HGSC009A
();
hgsc009A
.
fromMap
(
map
);
List
<
HGSC009
>
hgsc009List
=
initHgsc009
(
arrayList
);
List
<
HGSC009A
>
hgsc009aList
=
initHgsc009a
(
arrayList
);
for
(
HGSC009
hgsc009:
hgsc009List
)
{
HGSC001
hgsc001
=
Hgsc001
.
queryByCode
(
hgsc009
.
getProjCode
());
AssertUtils
.
isNull
(
hgsc001
,
"项目不存在,添加失败!"
);
HGSC009
sc009
=
queryByCode
(
hgsc009
.
getProjCode
());
AssertUtils
.
isNotNull
(
sc009
,
"材料计划项目已添加,添加失败!"
);
if
(
hgsc001
.
getCompanyCode
()
!=
null
)
{
hgsc009
.
setCompanyCode
(
hgsc001
.
getCompanyCode
());
}
hgsc009
.
setCompanyName
(
hgsc001
.
getCompanyName
());
hgsc009
.
setProjName
(
hgsc001
.
getProjName
());
hgsc009
.
setPlanMaterialCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PLAN_MATERIAL_CODE
));
DaoUtils
.
insert
(
HGSC009
.
INSERT
,
hgsc009
);
for
(
HGSC009A
hgsc009a:
hgsc009aList
)
{
HGPZ005
hgpz005
=
HGPZTools
.
HgPz005
.
getByCode
(
hgsc009a
.
getInventCode
());
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
hgpz005
),
"产品编码不存在,添加失败!"
);
hgsc009a
.
setCompanyCode
(
hgsc009
.
getCompanyCode
());
hgsc009a
.
setCompanyName
(
hgsc009
.
getCompanyName
());
//hgsc009a.setProjCode(hgsc009.getProjCode());
hgsc009a
.
setProjName
(
hgsc009
.
getProjName
());
hgsc009a
.
setPlanMaterialCode
(
hgsc009
.
getPlanMaterialCode
());
//hgsc009a.setPlanMaterialName(hgsc009.getPlanMaterialName());
hgsc009a
.
setInventName
(
hgpz005
.
getInventName
());
hgsc009a
.
setInventCode
(
hgpz005
.
getInventCode
());
hgsc009a
.
setSpec
(
hgpz005
.
getSpec
());
hgsc009a
.
setMaterial
(
hgpz005
.
getMaterial
());
hgsc009a
.
setLength
(
hgpz005
.
getLength
());
hgsc009a
.
setWidth
(
hgpz005
.
getWidth
());
hgsc009a
.
setThick
(
hgpz005
.
getThick
());
hgsc009a
.
setInventTypeDetail
(
hgpz005
.
getInventTypeDetail
()+
""
);
if
(
hgsc009a
.
getSingleWeight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
hgsc009a
.
setSingleWeight
(
HGPZTools
.
HgPz005
.
calcUnitWeight
(
hgpz005
));
}
hgsc009a
.
setGrossAmount
(
hgsc009a
.
getQuantity
().
multiply
(
hgsc009a
.
getSingleWeight
()));
DaoUtils
.
insert
(
HGSC009A
.
INSERT
,
hgsc009a
);
}
}
}
public
static
List
<
HGSC009
>
initHgsc009
(
List
<
Map
>
arrayList
)
{
List
<
HGSC009
>
hgsc009List
=
new
ArrayList
<>();
arrayList
.
forEach
(
array
->
{
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
array
.
get
(
"projCode"
)),
"项目编码不能为空!"
);
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
array
.
get
(
"planMaterialName"
)),
"材料计划名称不能为空!"
);
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
array
.
get
(
"planMaterialDate"
)),
"材料计划日期不能为空!"
);
HGSC009
hgsc009
=
new
HGSC009
();
hgsc009
.
setProjCode
(
array
.
get
(
"projCode"
).
toString
());
hgsc009
.
setProjName
(
array
.
get
(
"projName"
).
toString
());
hgsc009
.
setPlanMaterialName
(
array
.
get
(
"planMaterialName"
).
toString
());
hgsc009
.
setPlanMaterialDate
(
DateUtils
.
formatShort
(
array
.
get
(
"planMaterialDate"
).
toString
()));
hgsc009
.
setStatus
(
0
);
Map
hgsc009List1
=
hgsc009List
.
stream
().
filter
(
sc009
->
sc009
.
getProjCode
().
equals
(
hgsc009
.
getProjCode
())).
collect
(
Collectors
.
toMap
(
HGSC009:
:
getProjCode
,
hgsc0091
->
hgsc0091
));
if
(
hgsc009List1
.
isEmpty
())
{
hgsc009List
.
add
(
hgsc009
);
}
});
return
hgsc009List
;
}
public
static
List
<
HGSC009A
>
initHgsc009a
(
List
<
Map
>
arrayList
)
{
List
<
HGSC009A
>
hgsc009aList
=
new
ArrayList
<>();
arrayList
.
forEach
(
array
->
{
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
array
.
get
(
"quantity"
)),
"材料计划数量不能为空!"
);
HGSC009A
hgsc009A
=
new
HGSC009A
();
hgsc009A
.
setProjCode
(
array
.
get
(
"projCode"
).
toString
());
hgsc009A
.
setProjName
(
array
.
get
(
"projName"
).
toString
());
hgsc009A
.
setPlanMaterialName
(
array
.
get
(
"planMaterialName"
).
toString
());
hgsc009A
.
setPlanMaterialDate
(
DateUtils
.
formatShort
(
array
.
get
(
"planMaterialDate"
).
toString
()));
hgsc009A
.
setInventCode
(
array
.
get
(
"inventCode"
).
toString
());
hgsc009A
.
setInventName
(
array
.
get
(
"inventName"
).
toString
());
hgsc009A
.
setSpec
(
array
.
get
(
"spec"
).
toString
());
hgsc009A
.
setMaterial
(
array
.
get
(
"material"
).
toString
());
BigDecimal
singleWeight
=
new
BigDecimal
(
array
.
get
(
"singleWeight"
).
toString
());
hgsc009A
.
setSingleWeight
(
singleWeight
);
BigDecimal
quantity
=
new
BigDecimal
(
array
.
get
(
"quantity"
).
toString
());
hgsc009A
.
setQuantity
(
quantity
);
if
(
hgsc009A
.
getSingleWeight
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
||
hgsc009A
.
getQuantity
().
compareTo
(
BigDecimal
.
ZERO
)
==
0
){
AssertUtils
.
isTrue
(
false
,
"单重和数量不能为空!"
);
}
hgsc009A
.
setGrossAmount
(
hgsc009A
.
getQuantity
().
multiply
(
hgsc009A
.
getSingleWeight
()));
hgsc009aList
.
add
(
hgsc009A
);
});
return
hgsc009aList
;
}
}
}
src/main/java/com/baosight/hggp/util/contants/ACConstants.java
View file @
50e71e74
...
...
@@ -36,6 +36,9 @@ public class ACConstants {
*/
public
static
final
String
SQL_EXPORT
=
"export"
;
/** 导入文件暂存路径 dzg */
public
static
final
String
FILE_NAME
=
"fileName"
;
/**
* 模块:仓库档案
* 用途:前后台交互下拉框字段
...
...
src/main/webapp/HG/SC/HGSC009.js
View file @
50e71e74
...
...
@@ -85,7 +85,7 @@ $(function () {
filter
:
"contains"
});
}
},
{
},
/*
{
field: "createdTime",
attributes: {
class: "i-input-readonly"
...
...
@@ -93,7 +93,7 @@ $(function () {
defaultValue: function () {
return currShortDate();
}
},
},
*/
],
...
...
src/main/webapp/HG/SC/HGSC009.jsp
View file @
50e71e74
...
...
@@ -49,7 +49,7 @@
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="
createdTim
e" cname="材料计划日期" width="120" enable="true" readonly="false" align="center" editType="date"
<EF:EFColumn ename="
planMaterialDat
e" cname="材料计划日期" width="120" enable="true" readonly="false" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="planMaterialCode" cname="材料计划编码" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="planMaterialName" cname="材料计划名称" width="120" enable="true" readonly="false" align="center"/>
...
...
src/main/webapp/common/template/SC/HGSC009A_材料计划.xls
View file @
50e71e74
No preview for this file type
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