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
8e7d83bf
Commit
8e7d83bf
authored
Jul 06, 2024
by
13420
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
61996b88
92e30358
Hide whitespace changes
Inline
Side-by-side
Showing
84 changed files
with
1193 additions
and
858 deletions
+1193
-858
DaoUtils.java
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
+2
-2
HGCB002.java
src/main/java/com/baosight/hggp/hg/cb/domain/HGCB002.java
+30
-14
HGCB003.java
src/main/java/com/baosight/hggp/hg/cb/domain/HGCB003.java
+30
-14
HGCB004.java
src/main/java/com/baosight/hggp/hg/cb/domain/HGCB004.java
+17
-0
ServiceHGCB002.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB002.java
+40
-5
ServiceHGCB003.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB003.java
+28
-9
ServiceHGCB004.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB004.java
+19
-9
HGCB001.xml
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB001.xml
+74
-1
HGCB002.xml
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB002.xml
+44
-24
HGCB003.xml
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB003.xml
+35
-13
HGCB004.xml
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB004.xml
+98
-6
HGCBTools.java
src/main/java/com/baosight/hggp/hg/cb/tools/HGCBTools.java
+139
-71
HGCW001.xml
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
+13
-6
HGCWTools.java
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
+1
-2
HGKC005.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC005.java
+21
-4
ServiceHGKC003.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
+3
-0
ServiceHGKC005.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC005.java
+60
-4
ServiceHGKC005A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC005A.java
+1
-0
ServiceHGKC008.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
+4
-7
HGKC001.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
+9
-3
HGKC003.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
+7
-3
HGKC004A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC004A.xml
+5
-3
HGKC005.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC005.xml
+23
-141
HGKC006A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
+3
-3
HGKC007.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007.xml
+2
-165
HGKC007A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
+2
-2
HGKC008A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
+2
-2
HGKC010.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC010.xml
+26
-0
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+19
-0
ServiceHGPZ005.java
.../java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
+20
-0
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+9
-4
ServiceHGSC009.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
+23
-2
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
+17
-4
ServiceHGZL004.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL004.java
+1
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+1
-0
HGCB002.js
src/main/webapp/HG/CB/HGCB002.js
+13
-9
HGCB002.jsp
src/main/webapp/HG/CB/HGCB002.jsp
+13
-13
HGCB002A.js
src/main/webapp/HG/CB/HGCB002A.js
+44
-11
HGCB003.js
src/main/webapp/HG/CB/HGCB003.js
+22
-11
HGCB003.jsp
src/main/webapp/HG/CB/HGCB003.jsp
+16
-16
HGCB004.js
src/main/webapp/HG/CB/HGCB004.js
+13
-5
HGCB004.jsp
src/main/webapp/HG/CB/HGCB004.jsp
+13
-10
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+43
-26
HGCG002.jsp
src/main/webapp/HG/CG/HGCG002.jsp
+2
-0
HGKC002.jsp
src/main/webapp/HG/KC/HGKC002.jsp
+1
-1
HGKC003.jsp
src/main/webapp/HG/KC/HGKC003.jsp
+2
-2
HGKC003A.jsp
src/main/webapp/HG/KC/HGKC003A.jsp
+1
-1
HGKC003B.jsp
src/main/webapp/HG/KC/HGKC003B.jsp
+2
-2
HGKC004A.jsp
src/main/webapp/HG/KC/HGKC004A.jsp
+1
-1
HGKC005.js
src/main/webapp/HG/KC/HGKC005.js
+70
-112
HGKC005.jsp
src/main/webapp/HG/KC/HGKC005.jsp
+21
-18
HGKC005A.js
src/main/webapp/HG/KC/HGKC005A.js
+0
-1
HGKC005A.jsp
src/main/webapp/HG/KC/HGKC005A.jsp
+4
-5
HGKC006A.js
src/main/webapp/HG/KC/HGKC006A.js
+4
-4
HGKC006A.jsp
src/main/webapp/HG/KC/HGKC006A.jsp
+2
-2
HGKC007A.jsp
src/main/webapp/HG/KC/HGKC007A.jsp
+2
-2
HGKC008.js
src/main/webapp/HG/KC/HGKC008.js
+8
-7
HGKC008A.jsp
src/main/webapp/HG/KC/HGKC008A.jsp
+1
-1
HGKC009.jsp
src/main/webapp/HG/KC/HGKC009.jsp
+9
-9
HGKC010.jsp
src/main/webapp/HG/KC/HGKC010.jsp
+2
-2
HGKC011.jsp
src/main/webapp/HG/KC/HGKC011.jsp
+2
-2
HGKC012.jsp
src/main/webapp/HG/KC/HGKC012.jsp
+1
-1
HGKC013A.jsp
src/main/webapp/HG/KC/HGKC013A.jsp
+1
-1
HGSC004A.jsp
src/main/webapp/HG/SC/HGSC004A.jsp
+2
-2
HGSC004E.jsp
src/main/webapp/HG/SC/HGSC004E.jsp
+2
-2
HGSC005A.jsp
src/main/webapp/HG/SC/HGSC005A.jsp
+4
-4
HGSC006A.jsp
src/main/webapp/HG/SC/HGSC006A.jsp
+4
-4
HGSC006B.jsp
src/main/webapp/HG/SC/HGSC006B.jsp
+4
-4
HGSC007.jsp
src/main/webapp/HG/SC/HGSC007.jsp
+4
-4
HGSC007A.jsp
src/main/webapp/HG/SC/HGSC007A.jsp
+1
-1
HGSC008.jsp
src/main/webapp/HG/SC/HGSC008.jsp
+2
-2
HGSC009.js
src/main/webapp/HG/SC/HGSC009.js
+3
-3
HGSC009.jsp
src/main/webapp/HG/SC/HGSC009.jsp
+1
-1
HGSC009A.js
src/main/webapp/HG/SC/HGSC009A.js
+1
-7
HGSC009A.jsp
src/main/webapp/HG/SC/HGSC009A.jsp
+2
-2
HGYX001A.jsp
src/main/webapp/HG/YX/HGYX001A.jsp
+2
-3
HGYX001B.jsp
src/main/webapp/HG/YX/HGYX001B.jsp
+3
-4
HGYX001C.jsp
src/main/webapp/HG/YX/HGYX001C.jsp
+2
-2
HGYX002A.jsp
src/main/webapp/HG/YX/HGYX002A.jsp
+3
-3
HGYX002B.jsp
src/main/webapp/HG/YX/HGYX002B.jsp
+3
-3
HGYX002C.jsp
src/main/webapp/HG/YX/HGYX002C.jsp
+3
-3
HGZL001.jsp
src/main/webapp/HG/ZL/HGZL001.jsp
+1
-1
HGZL003A.jsp
src/main/webapp/HG/ZL/HGZL003A.jsp
+4
-4
No files found.
src/main/java/com/baosight/hggp/core/dao/DaoUtils.java
View file @
8e7d83bf
...
...
@@ -99,9 +99,9 @@ public class DaoUtils {
public
static
int
insertBatch
(
String
sql
,
Collection
parameters
)
{
parameters
.
forEach
(
obj
->{
if
(
obj
instanceof
DaoEPBase
)
{
set
Revisor
((
DaoEPBase
)
obj
,
true
);
set
Creator
((
DaoEPBase
)
obj
);
}
else
if
(
obj
instanceof
Map
)
{
set
Revisor
((
Map
)
obj
,
true
);
set
Creator
((
Map
)
obj
);
}
});
return
DaoBase
.
getInstance
().
insertBatch
(
sql
,
parameters
);
...
...
src/main/java/com/baosight/hggp/hg/cb/domain/HGCB002.java
View file @
8e7d83bf
...
...
@@ -45,7 +45,7 @@ public class HGCB002 extends DaoEPBase {
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_
SPEC_ID
=
"spec
Id"
;
/* 规格ID*/
public
static
final
String
FIELD_
INVENT_RECORD_ID
=
"inventRecord
Id"
;
/* 规格ID*/
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_QUANTITY
=
"quantity"
;
/* 数量*/
...
...
@@ -53,6 +53,7 @@ public class HGCB002 extends DaoEPBase {
public
static
final
String
FIELD_IS_ESTIMATE
=
"isEstimate"
;
/* 是否暂估:0-否 1-是*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/*存货类型明细*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -91,6 +92,7 @@ public class HGCB002 extends DaoEPBase {
public
static
final
String
INSERT
=
"HGCB002.insert"
;
public
static
final
String
UPDATE
=
"HGCB002.update"
;
public
static
final
String
DELETE
=
"HGCB002.delete"
;
public
static
final
String
DELETE_PERIOD
=
"HGCB002.deleteByPeriod"
;
private
Long
id
=
new
Long
(
0
);
/* ID*/
private
String
accountCode
=
" "
;
/* 企业编码*/
...
...
@@ -115,7 +117,7 @@ public class HGCB002 extends DaoEPBase {
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Long
spec
Id
=
new
Long
(
0
);
/* 规格ID*/
private
Long
inventRecord
Id
=
new
Long
(
0
);
/* 规格ID*/
private
String
spec
=
" "
;
/* 规格*/
private
String
unit
=
" "
;
/* 单位*/
private
BigDecimal
quantity
=
new
BigDecimal
(
"0"
);
/* 数量*/
...
...
@@ -123,6 +125,7 @@ public class HGCB002 extends DaoEPBase {
private
Integer
isEstimate
=
0
;
/* 是否暂估:0-否 1-是*/
private
BigDecimal
price
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
Integer
inventTypeDetail
;
/**
* initialize the metadata.
...
...
@@ -223,7 +226,7 @@ public class HGCB002 extends DaoEPBase {
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
SPEC
_ID
);
eiColumn
=
new
EiColumn
(
FIELD_
INVENT_RECORD
_ID
);
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -267,6 +270,9 @@ public class HGCB002 extends DaoEPBase {
eiColumn
.
setDescName
(
"金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE_DETAIL
);
eiColumn
.
setDescName
(
"存货类型明细"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -648,20 +654,20 @@ public class HGCB002 extends DaoEPBase {
this
.
inventName
=
inventName
;
}
/**
* get the
spec
Id - 规格ID.
* @return the
spec
Id
* get the
inventRecord
Id - 规格ID.
* @return the
inventRecord
Id
*/
public
Long
get
Spec
Id
()
{
return
this
.
spec
Id
;
public
Long
get
InventRecord
Id
()
{
return
this
.
inventRecord
Id
;
}
/**
* set the
spec
Id - 规格ID.
* set the
inventRecord
Id - 规格ID.
*
* @param
spec
Id - 规格ID
* @param
inventRecord
Id - 规格ID
*/
public
void
set
SpecId
(
Long
spec
Id
)
{
this
.
specId
=
spec
Id
;
public
void
set
InventRecordId
(
Long
inventRecord
Id
)
{
this
.
inventRecordId
=
inventRecord
Id
;
}
/**
* get the spec - 规格.
...
...
@@ -775,6 +781,15 @@ public class HGCB002 extends DaoEPBase {
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
Integer
getInventTypeDetail
()
{
return
inventTypeDetail
;
}
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
}
/**
* get the value from Map.
*
...
...
@@ -806,7 +821,7 @@ public class HGCB002 extends DaoEPBase {
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
set
SpecId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC_ID
)),
spec
Id
));
set
InventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecord
Id
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setUnit
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT
)),
unit
));
setQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUANTITY
)),
quantity
));
...
...
@@ -814,6 +829,7 @@ public class HGCB002 extends DaoEPBase {
setIsEstimate
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_ESTIMATE
)),
isEstimate
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
}
/**
...
...
@@ -846,7 +862,7 @@ public class HGCB002 extends DaoEPBase {
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_
SPEC_ID
,
StringUtils
.
toString
(
specId
,
eiMetadata
.
getMeta
(
FIELD_SPEC
_ID
)));
map
.
put
(
FIELD_
INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD
_ID
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_UNIT
,
StringUtils
.
toString
(
unit
,
eiMetadata
.
getMeta
(
FIELD_UNIT
)));
map
.
put
(
FIELD_QUANTITY
,
StringUtils
.
toString
(
quantity
,
eiMetadata
.
getMeta
(
FIELD_QUANTITY
)));
...
...
@@ -854,7 +870,7 @@ public class HGCB002 extends DaoEPBase {
map
.
put
(
FIELD_IS_ESTIMATE
,
StringUtils
.
toString
(
isEstimate
,
eiMetadata
.
getMeta
(
FIELD_IS_ESTIMATE
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_INVENT_TYPE_DETAIL
,
StringUtils
.
toString
(
inventTypeDetail
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE_DETAIL
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/cb/domain/HGCB003.java
View file @
8e7d83bf
...
...
@@ -44,7 +44,7 @@ public class HGCB003 extends DaoEPBase {
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_
SPEC_ID
=
"spec
Id"
;
/* 规格ID*/
public
static
final
String
FIELD_
INVENT_RECORD_ID
=
"inventRecord
Id"
;
/* 规格ID*/
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_UNIT
=
"unit"
;
/* 单位*/
public
static
final
String
FIELD_QUANTITY
=
"quantity"
;
/* 数量*/
...
...
@@ -52,6 +52,7 @@ public class HGCB003 extends DaoEPBase {
public
static
final
String
FIELD_IS_ESTIMATE
=
"isEstimate"
;
/* 是否暂估:0-否 1-是*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/*存货类型明细*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -90,6 +91,7 @@ public class HGCB003 extends DaoEPBase {
public
static
final
String
INSERT
=
"HGCB003.insert"
;
public
static
final
String
UPDATE
=
"HGCB003.update"
;
public
static
final
String
DELETE
=
"HGCB003.delete"
;
public
static
final
String
DELETE_PERIOD
=
"HGCB003.deleteByPeriod"
;
private
Long
id
=
new
Long
(
0
);
/* ID*/
private
String
accountCode
=
" "
;
/* 企业编码*/
...
...
@@ -113,7 +115,7 @@ public class HGCB003 extends DaoEPBase {
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Long
spec
Id
=
new
Long
(
0
);
/* 规格ID*/
private
Long
inventRecord
Id
=
new
Long
(
0
);
/* 规格ID*/
private
String
spec
=
" "
;
/* 规格*/
private
String
unit
=
" "
;
/* 单位*/
private
BigDecimal
quantity
=
new
BigDecimal
(
"0"
);
/* 数量*/
...
...
@@ -121,6 +123,7 @@ public class HGCB003 extends DaoEPBase {
private
Integer
isEstimate
=
0
;
/* 是否暂估:0-否 1-是*/
private
BigDecimal
price
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
Integer
inventTypeDetail
;
/**
* initialize the metadata.
...
...
@@ -217,7 +220,7 @@ public class HGCB003 extends DaoEPBase {
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_
SPEC
_ID
);
eiColumn
=
new
EiColumn
(
FIELD_
INVENT_RECORD
_ID
);
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -261,6 +264,9 @@ public class HGCB003 extends DaoEPBase {
eiColumn
.
setDescName
(
"金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE_DETAIL
);
eiColumn
.
setDescName
(
"存货类型明细"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -624,20 +630,20 @@ public class HGCB003 extends DaoEPBase {
this
.
inventName
=
inventName
;
}
/**
* get the
spec
Id - 规格ID.
* @return the
spec
Id
* get the
inventRecord
Id - 规格ID.
* @return the
inventRecord
Id
*/
public
Long
get
Spec
Id
()
{
return
this
.
spec
Id
;
public
Long
get
InventRecord
Id
()
{
return
this
.
inventRecord
Id
;
}
/**
* set the
spec
Id - 规格ID.
* set the
inventRecord
Id - 规格ID.
*
* @param
spec
Id - 规格ID
* @param
inventRecord
Id - 规格ID
*/
public
void
set
SpecId
(
Long
spec
Id
)
{
this
.
specId
=
spec
Id
;
public
void
set
InventRecordId
(
Long
inventRecord
Id
)
{
this
.
inventRecordId
=
inventRecord
Id
;
}
/**
* get the spec - 规格.
...
...
@@ -751,6 +757,15 @@ public class HGCB003 extends DaoEPBase {
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
Integer
getInventTypeDetail
()
{
return
inventTypeDetail
;
}
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
}
/**
* get the value from Map.
*
...
...
@@ -781,7 +796,7 @@ public class HGCB003 extends DaoEPBase {
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
set
SpecId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC_ID
)),
spec
Id
));
set
InventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecord
Id
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setUnit
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UNIT
)),
unit
));
setQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUANTITY
)),
quantity
));
...
...
@@ -789,6 +804,7 @@ public class HGCB003 extends DaoEPBase {
setIsEstimate
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_ESTIMATE
)),
isEstimate
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
}
/**
...
...
@@ -820,7 +836,7 @@ public class HGCB003 extends DaoEPBase {
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_
SPEC_ID
,
StringUtils
.
toString
(
specId
,
eiMetadata
.
getMeta
(
FIELD_SPEC
_ID
)));
map
.
put
(
FIELD_
INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD
_ID
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_UNIT
,
StringUtils
.
toString
(
unit
,
eiMetadata
.
getMeta
(
FIELD_UNIT
)));
map
.
put
(
FIELD_QUANTITY
,
StringUtils
.
toString
(
quantity
,
eiMetadata
.
getMeta
(
FIELD_QUANTITY
)));
...
...
@@ -828,7 +844,7 @@ public class HGCB003 extends DaoEPBase {
map
.
put
(
FIELD_IS_ESTIMATE
,
StringUtils
.
toString
(
isEstimate
,
eiMetadata
.
getMeta
(
FIELD_IS_ESTIMATE
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_INVENT_TYPE_DETAIL
,
StringUtils
.
toString
(
inventTypeDetail
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE_DETAIL
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/cb/domain/HGCB004.java
View file @
8e7d83bf
...
...
@@ -42,6 +42,7 @@ public class HGCB004 extends DaoEPBase {
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_INVENT_RECORD_ID
=
"inventRecordId"
;
/* 规格ID*/
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
FIELD_INIT_QUANTITY
=
"initQuantity"
;
/* 期初数量*/
public
static
final
String
FIELD_INIT_WEIGHT
=
"initWeight"
;
/* 期初重量*/
public
static
final
String
FIELD_INIT_AMOUNT
=
"initAmount"
;
/* 期初金额*/
...
...
@@ -159,6 +160,7 @@ public class HGCB004 extends DaoEPBase {
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Long
inventRecordId
=
new
Long
(
0
);
/* 规格ID*/
private
String
spec
=
" "
;
/* 规格*/
private
BigDecimal
initQuantity
=
new
BigDecimal
(
0
);
/* 期初数量*/
private
BigDecimal
initWeight
=
new
BigDecimal
(
0.000
);
/* 期初重量*/
private
BigDecimal
initAmount
=
new
BigDecimal
(
0.000
);
/* 期初金额*/
...
...
@@ -280,6 +282,10 @@ public class HGCB004 extends DaoEPBase {
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INIT_QUANTITY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
...
...
@@ -842,6 +848,15 @@ public class HGCB004 extends DaoEPBase {
public
void
setInventRecordId
(
Long
inventRecordId
)
{
this
.
inventRecordId
=
inventRecordId
;
}
public
String
getSpec
()
{
return
spec
;
}
public
void
setSpec
(
String
spec
)
{
this
.
spec
=
spec
;
}
/**
* get the initQuantity - 期初数量.
* @return the initQuantity
...
...
@@ -1398,6 +1413,7 @@ public class HGCB004 extends DaoEPBase {
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecordId
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
setInitQuantity
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INIT_QUANTITY
)),
initQuantity
));
setInitWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INIT_WEIGHT
)),
initWeight
));
setInitAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INIT_AMOUNT
)),
initAmount
));
...
...
@@ -1460,6 +1476,7 @@ public class HGCB004 extends DaoEPBase {
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
map
.
put
(
FIELD_INIT_QUANTITY
,
StringUtils
.
toString
(
initQuantity
,
eiMetadata
.
getMeta
(
FIELD_INIT_QUANTITY
)));
map
.
put
(
FIELD_INIT_WEIGHT
,
StringUtils
.
toString
(
initWeight
,
eiMetadata
.
getMeta
(
FIELD_INIT_WEIGHT
)));
map
.
put
(
FIELD_INIT_AMOUNT
,
StringUtils
.
toString
(
initAmount
,
eiMetadata
.
getMeta
(
FIELD_INIT_AMOUNT
)));
...
...
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB002.java
View file @
8e7d83bf
package
com
.
baosight
.
hggp
.
hg
.
cb
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB002
;
import
com.baosight.hggp.hg.cb.domain.HGCB004
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.utils.HGUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
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.ServiceEPBase
;
import
java.util.Arrays
;
...
...
@@ -47,12 +51,43 @@ public class ServiceHGCB002 extends ServiceEPBase {
return
super
.
query
(
inInfo
,
HGCB002
.
QUERY
,
new
HGCB002
());
}
@OperationLogAnnotation
(
operModul
=
"原材料入库成本核算"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
return
super
.
delete
(
inInfo
,
HGCB002
.
DELETE
);
}
@OperationLogAnnotation
(
operModul
=
"原材料入库成本核算"
,
operType
=
"查询"
,
operDesc
=
"数据同步操作"
)
public
EiInfo
select
(
EiInfo
inInfo
)
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGCW001
hgcw001
=
HGCWTools
.
HgCw001
.
getMaxAccountPeriod
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
).
toString
());
params
.
put
(
HGCW001
.
FIELD_ACCOUNT_CODE
,
hgcw001
.
getAccountCode
());
params
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD
,
hgcw001
.
getAccountPeriod
());
HGCBTools
.
HgCb002
.
select
(
params
);
try
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGUtils
.
setCondition
(
params
);
HGCB001
hgcw001Today
=
HGCBTools
.
HgCb001
.
select
(
params
);
if
(
hgcw001Today
!=
null
&&
hgcw001Today
.
getAccountPeriodStatus
()
==
0
)
{
throw
new
PlatException
(
String
.
format
(
"公司[%s]会计期[%s]状态为关账状态,数据同步失败!"
,
hgcw001Today
.
getCompanyCode
(),
hgcw001Today
.
getAccountPeriod
()));
}
HGCB001
hgcw001Last
=
HGCBTools
.
HgCb001
.
selectLast
(
params
);
if
(
hgcw001Last
!=
null
&&
hgcw001Last
.
getAccountPeriodStatus
()
==
1
)
{
throw
new
PlatException
(
String
.
format
(
"公司[%s]上月会计期[%s]为开账状态,数据同步失败!"
,
hgcw001Last
.
getCompanyCode
(),
hgcw001Last
.
getAccountPeriod
()));
}
HGCBTools
.
HgCb002
.
select
(
params
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"同步数据失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"原材料入库成本核算"
,
operType
=
"查询"
,
operDesc
=
"查询业务账期"
)
public
EiInfo
selectAll
(
EiInfo
inInfo
)
{
try
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGCW001
hgcw001
=
HGCWTools
.
HgCw001
.
getMaxAccountPeriod
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
).
toString
());
EiInfoUtils
.
addBlock
(
inInfo
,
"hgcw001_block_id"
,
hgcw001
,
HGCW001
.
class
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"同步数据失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB003.java
View file @
8e7d83bf
package
com
.
baosight
.
hggp
.
hg
.
cb
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB003
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.utils.HGUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
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.ServiceEPBase
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
...
...
@@ -26,6 +28,8 @@ public class ServiceHGCB003 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
initLoad
(
inInfo
,
EiConstant
.
resultBlock
,
new
HGCB003
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
EiInfoUtils
.
addBlock
(
inInfo
,
"company_code_block_id"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
...
@@ -43,11 +47,26 @@ public class ServiceHGCB003 extends ServiceEPBase {
}
public
EiInfo
select
(
EiInfo
inInfo
)
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGCW001
hgcw001
=
HGCWTools
.
HgCw001
.
getMaxAccountPeriod
(
params
.
get
(
HGCB003
.
FIELD_COMPANY_CODE
).
toString
());
params
.
put
(
HGCW001
.
FIELD_ACCOUNT_CODE
,
hgcw001
.
getAccountCode
());
params
.
put
(
HGCW001
.
FIELD_ACCOUNT_PERIOD
,
hgcw001
.
getAccountPeriod
());
HGCBTools
.
HgCb003
.
select
(
params
);
try
{
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGUtils
.
setCondition
(
params
);
HGCB001
hgcw001Today
=
HGCBTools
.
HgCb001
.
select
(
params
);
if
(
hgcw001Today
!=
null
&&
hgcw001Today
.
getAccountPeriodStatus
()
==
0
)
{
throw
new
PlatException
(
String
.
format
(
"公司[%s]会计期[%s]状态为关账状态,数据同步失败!"
,
hgcw001Today
.
getCompanyCode
(),
hgcw001Today
.
getAccountPeriod
()));
}
HGCB001
hgcw001Last
=
HGCBTools
.
HgCb001
.
selectLast
(
params
);
if
(
hgcw001Last
!=
null
&&
hgcw001Last
.
getAccountPeriodStatus
()
==
1
)
{
throw
new
PlatException
(
String
.
format
(
"公司[%s]上月会计期[%s]为开账状态,数据同步失败!"
,
hgcw001Last
.
getCompanyCode
(),
hgcw001Last
.
getAccountPeriod
()));
}
HGCBTools
.
HgCb003
.
select
(
params
);
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"同步数据失败"
);
}
return
inInfo
;
}
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
return
super
.
delete
(
inInfo
,
HGCB003
.
DELETE
);
}
}
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB004.java
View file @
8e7d83bf
...
...
@@ -3,6 +3,7 @@ package com.baosight.hggp.hg.cb.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB002
;
import
com.baosight.hggp.hg.cb.domain.HGCB004
;
...
...
@@ -14,6 +15,8 @@ import com.baosight.hggp.hg.kc.domain.*;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ007
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.utils.HGUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -39,12 +42,13 @@ public class ServiceHGCB004 extends ServiceEPBase {
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
EiInfoUtils
.
addBlock
(
inInfo
,
"company_code_block_id"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_TYPE_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_RECORD_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCB004
().
eiMetadata
);
}
catch
(
Plat
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
...
...
@@ -73,17 +77,23 @@ public class ServiceHGCB004 extends ServiceEPBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"收发存汇总"
,
operType
=
"同步数据"
,
operDesc
=
"同步数据"
)
public
EiInfo
s
ynchData
(
EiInfo
inInfo
)
{
public
EiInfo
s
elect
(
EiInfo
inInfo
)
{
try
{
Map
<
String
,
Object
>
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGCW001
hgcw001
=
HGCWTools
.
HgCw001
.
getMaxAccountPeriod
(
queryRow
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
).
toString
());
queryRow
.
put
(
HGCB004
.
FIELD_ACCOUNT_CODE
,
hgcw001
.
getAccountCode
());
queryRow
.
put
(
HGCB004
.
FIELD_ACCOUNT_PERIOD
,
hgcw001
.
getAccountPeriod
());
List
<
HGCB004
>
cb004s
=
HGCBTools
.
HgCb004
.
synchData
(
queryRow
);
Map
params
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
HGUtils
.
setCondition
(
params
);
HGCB001
hgcw001Today
=
HGCBTools
.
HgCb001
.
select
(
params
);
if
(
hgcw001Today
!=
null
&&
hgcw001Today
.
getAccountPeriodStatus
()
==
0
)
{
throw
new
PlatException
(
String
.
format
(
"公司[%s]会计期[%s]状态为关账状态,数据同步失败!"
,
hgcw001Today
.
getCompanyCode
(),
hgcw001Today
.
getAccountPeriod
()));
}
HGCB001
hgcw001Last
=
HGCBTools
.
HgCb001
.
selectLast
(
params
);
if
(
hgcw001Last
!=
null
&&
hgcw001Last
.
getAccountPeriodStatus
()
==
1
)
{
throw
new
PlatException
(
String
.
format
(
"公司[%s]上月会计期[%s]为开账状态,数据同步失败!"
,
hgcw001Last
.
getCompanyCode
(),
hgcw001Last
.
getAccountPeriod
()));
}
HGCBTools
.
HgCb004
.
synchData
(
params
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次
对["
+
cb004s
.
size
()
+
"]条
数据同步成功!"
);
inInfo
.
setMsg
(
"操作成功!本次数据同步成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
同步数据
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
数据同步
失败"
);
}
return
inInfo
;
}
...
...
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB001.xml
View file @
8e7d83bf
...
...
@@ -68,6 +68,51 @@
DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<sql
id=
"lastCondition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountYear"
>
ACCOUNT_YEAR = #accountYear#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriod"
>
ACCOUNT_PERIOD = (select DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriodStatus"
>
ACCOUNT_PERIOD_STATUS = #accountPeriodStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cb.domain.HGCB001"
>
...
...
@@ -199,10 +244,38 @@
ID = #id#
</update>
<select
id=
"getSwitchRowNum"
resultClass=
"com.baosight.hggp.hg.c
w
.domain.HGCB001"
>
<select
id=
"getSwitchRowNum"
resultClass=
"com.baosight.hggp.hg.c
b
.domain.HGCB001"
>
SELECT * FROM ${hggpSchema}.HGCB001 WHERE ACCOUNT_PERIOD_STATUS = 1
</select>
<select
id=
"getLastRow"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.cb.domain.HGCB001"
>
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear",
<!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod",
<!-- 会计期 -->
ACCOUNT_PERIOD_STATUS as "accountPeriodStatus",
<!-- 会计期状态0:关账1:开账 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
CREATED_NAME as "createdName",
<!-- 记录创建名称 -->
CREATED_TIME as "createdTime",
<!-- 记录创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 记录修改者 -->
UPDATED_NAME as "updatedName",
<!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 记录修改时间 -->
DEP_CODE as "depCode"
<!-- 部门编码 -->
FROM ${hggpSchema}.HGCB001 WHERE 1=1
<include
refid=
"lastCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID asc
</isEmpty>
</dynamic>
</select>
<update
id=
"updateSwitchRow"
>
UPDATE ${hggpSchema}.HGCB001
SET
...
...
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB002.xml
View file @
8e7d83bf
...
...
@@ -62,36 +62,30 @@
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC_ID as "spec
Id",
<!-- 规格ID -->
INVENT_RECORD_ID as "inventRecord
Id",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
UNIT as "unit",
<!-- 单位 -->
QUANTITY as "quantity",
<!-- 数量 -->
WEIGHT as "weight",
<!-- 重量 -->
IS_ESTIMATE as "isEstimate",
<!-- 是否暂估:0-否 1-是 -->
PRICE as "price",
<!-- 单价 -->
AMOUNT as "amount"
<!-- 金额 -->
AMOUNT as "amount",
<!-- 金额 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
<!-- 存货类型明细 -->
</sql>
<sql
id=
"columnLast"
>
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear",
<!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod",
<!-- 会计期 -->
BIZ_TYPE as "bizType",
<!-- 业务类型 -->
RECEIPT_DATE as "receiptDate",
<!-- 单据日期 -->
RECEIPT_CODE as "receiptCode",
<!-- 单据号 -->
RECEIVE_NO as "receiveNo",
<!-- 收货单号 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC_ID as "specId",
<!-- 规格ID -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
UNIT as "unit",
<!-- 单位 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
sum(QUANTITY) as "quantity",
<!-- 数量 -->
sum(WEIGHT) as "weight",
<!-- 重量 -->
IS_ESTIMATE as "isEstimate",
<!-- 是否暂估:0-否 1-是 -->
CASE WHEN IFNULL(SUM(QUANTITY), 0) = 0 THEN 0 ELSE SUM(AMOUNT)/SUM(QUANTITY) END as "price",
<!-- 单价 -->
sum(AMOUNT) as "amount"
<!-- 金额 -->
</sql>
...
...
@@ -166,8 +160,8 @@
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
spec
Id"
>
SPEC_ID = #spec
Id#
<isNotEmpty
prepend=
" AND "
property=
"
inventRecord
Id"
>
INVENT_RECORD_ID = #inventRecord
Id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
SPEC = #spec#
...
...
@@ -190,6 +184,12 @@
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetail"
>
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetails"
>
INVENT_TYPE_DETAIL IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypeDetails"
>
#inventTypeDetails[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
...
...
@@ -206,12 +206,18 @@
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountDate"
>
ACCOUNT_PERIOD = $accountDate$
</isNotEmpty>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountDate"
>
ACCOUNT_PERIOD = $accountDate$
</isNotEmpty>
</select>
<select
id=
"queryDetail"
parameterClass=
"java.util.HashMap"
resultClass=
"HGCB002"
>
...
...
@@ -223,7 +229,8 @@
WH_CODE as "whCode",
<!-- 仓库编码 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
SPEC_ID as "specId",
<!-- 规格ID -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格ID -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
SPEC as "spec",
<!-- 规格 -->
SUM(QUANTITY) as "quantity",
<!-- 数量 -->
SUM(WEIGHT) as "weight",
<!-- 重量 -->
...
...
@@ -231,14 +238,17 @@
SUM(AMOUNT) as "amount"
<!-- 金额 -->
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include
refid=
"condition"
/>
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE,
SPEC_ID
, SPEC, IS_ESTIMATE
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE,
INVENT_RECORD_ID,INVENT_TYPE_DETAIL
, SPEC, IS_ESTIMATE
</select>
<!--查询上月-->
<select
id=
"queryLast"
parameterClass=
"java.util.HashMap"
resultClass=
"HGCB002"
>
SELECT
<include
refid=
"columnLast"
/>
FROM ${hggpSchema}.HGCB002 WHERE 1=1
<include
refid=
"condition"
/>
group by ACCOUNT_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, BIZ_TYPE, RECEIPT_DATE, RECEIPT_CODE, RECEIVE_NO, WH_CODE, WH_NAME, INVENT_TYPE, INVENT_CODE, INVENT_NAME, SPEC_ID, SPEC, UNIT, IS_ESTIMATE
<isNotEmpty
prepend=
" AND "
property=
"accountDate"
>
ACCOUNT_PERIOD = $accountDate$
</isNotEmpty>
group by ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, WH_CODE, INVENT_CODE, INVENT_RECORD_ID,INVENT_TYPE_DETAIL, SPEC
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
...
...
@@ -366,19 +376,20 @@
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
SPEC
_ID,
<!-- 规格ID -->
INVENT_RECORD
_ID,
<!-- 规格ID -->
SPEC,
<!-- 规格 -->
UNIT,
<!-- 单位 -->
QUANTITY,
<!-- 数量 -->
WEIGHT,
<!-- 重量 -->
IS_ESTIMATE,
<!-- 是否暂估:0-否 1-是 -->
PRICE,
<!-- 单价 -->
AMOUNT
<!-- 金额 -->
AMOUNT,
<!-- 金额 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #accountYear#, #accountPeriod#, #bizType#,
#receiptDate#, #receiptCode#, #receiveNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #
spec
Id#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#)
#receiptDate#, #receiptCode#, #receiveNo#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #
inventRecord
Id#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#
, #inventTypeDetail#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCB002
</selectKey>
...
...
@@ -387,6 +398,14 @@
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCB002 WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete
id=
"deleteByPeriod"
>
DELETE FROM ${hggpSchema}.HGCB002
WHERE ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_YEAR = #accountYear#
AND ACCOUNT_PERIOD = #accountPeriod#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCB002
...
...
@@ -413,14 +432,15 @@
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
SPEC_ID = #spec
Id#,
<!-- 规格ID -->
INVENT_RECORD_ID = #inventRecord
Id#,
<!-- 规格ID -->
SPEC = #spec#,
<!-- 规格 -->
UNIT = #unit#,
<!-- 单位 -->
QUANTITY = #quantity#,
<!-- 数量 -->
WEIGHT = #weight#,
<!-- 重量 -->
IS_ESTIMATE = #isEstimate#,
<!-- 是否暂估:0-否 1-是 -->
PRICE = #price#,
<!-- 单价 -->
AMOUNT = #amount#
<!-- 金额 -->
AMOUNT = #amount#,
<!-- 金额 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
</update>
...
...
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB003.xml
View file @
8e7d83bf
...
...
@@ -61,14 +61,15 @@
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC_ID as "spec
Id",
<!-- 规格ID -->
INVENT_RECORD_ID as "inventRecord
Id",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
UNIT as "unit",
<!-- 单位 -->
QUANTITY as "quantity",
<!-- 数量 -->
WEIGHT as "weight",
<!-- 重量 -->
IS_ESTIMATE as "isEstimate",
<!-- 是否暂估:0-否 1-是 -->
PRICE as "price",
<!-- 单价 -->
AMOUNT as "amount"
<!-- 金额 -->
AMOUNT as "amount",
<!-- 金额 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
<!-- 存货类型明细 -->
</sql>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
...
...
@@ -138,8 +139,8 @@
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
spec
Id"
>
SPEC_ID = #spec
Id#
<isNotEmpty
prepend=
" AND "
property=
"
inventRecord
Id"
>
INVENT_RECORD_ID = #inventRecord
Id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
SPEC = #spec#
...
...
@@ -162,6 +163,12 @@
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetail"
>
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetails"
>
INVENT_TYPE_DETAIL IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypeDetails"
>
#inventTypeDetails[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
...
...
@@ -191,18 +198,23 @@
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear",
<!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod",
<!-- 会计期 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
SPEC_ID as "specId",
<!-- 规格ID -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格ID -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
SPEC as "spec",
<!-- 规格 -->
SUM(QUANTITY) as "quantity",
<!-- 数量 -->
SUM(WEIGHT) as "weight",
<!-- 重量 -->
IS_ESTIMATE as "isEstimate",
<!-- 是否暂估:0-否 1-是 -->
SUM(AMOUNT) as "amount"
<!-- 金额 -->
FROM ${hggpSchema}.HGCB003 WHERE 1=1
<include
refid=
"condition"
/>
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE,
ACCOUNT_PERIOD, WH_CODE, INVENT_TYPE, INVENT_CODE, SPEC_ID, IS_ESTIMATE
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE,
COMPANY_NAME, ACCOUNT_YEAR, ACCOUNT_PERIOD, WH_CODE, WH_NAME, INVENT_TYPE, INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID,INVENT_TYPE_DETAIL, SPEC
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
...
...
@@ -320,24 +332,33 @@
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
SPEC
_ID,
<!-- 规格ID -->
INVENT_RECORD
_ID,
<!-- 规格ID -->
SPEC,
<!-- 规格 -->
UNIT,
<!-- 单位 -->
QUANTITY,
<!-- 数量 -->
WEIGHT,
<!-- 重量 -->
IS_ESTIMATE,
<!-- 是否暂估:0-否 1-是 -->
PRICE,
<!-- 单价 -->
AMOUNT
<!-- 金额 -->
AMOUNT,
<!-- 金额 -->
INVENT_TYPE_DETAIL
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #accountYear#, #accountPeriod#, #bizType#,
#receiptDate#, #receiptCode#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #
spec
Id#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#)
#receiptDate#, #receiptCode#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #
inventRecord
Id#, #spec#,
#unit#, #quantity#, #weight#, #isEstimate#, #price#, #amount#
, #inventTypeDetail#
)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGCB003 WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete
id=
"deleteByPeriod"
>
DELETE FROM ${hggpSchema}.HGCB003
WHERE ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_YEAR = #accountYear#
AND ACCOUNT_PERIOD = #accountPeriod#
</delete>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGCB003
...
...
@@ -363,14 +384,15 @@
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
SPEC_ID = #spec
Id#,
<!-- 规格ID -->
INVENT_RECORD_ID = #inventRecord
Id#,
<!-- 规格ID -->
SPEC = #spec#,
<!-- 规格 -->
UNIT = #unit#,
<!-- 单位 -->
QUANTITY = #quantity#,
<!-- 数量 -->
WEIGHT = #weight#,
<!-- 重量 -->
IS_ESTIMATE = #isEstimate#,
<!-- 是否暂估:0-否 1-是 -->
PRICE = #price#,
<!-- 单价 -->
AMOUNT = #amount#
<!-- 金额 -->
AMOUNT = #amount#,
<!-- 金额 -->
INVENT_TYPE_DETAIL = #inventTypeDetail#
WHERE
ID = #id#
</update>
...
...
src/main/java/com/baosight/hggp/hg/cb/sql/HGCB004.xml
View file @
8e7d83bf
...
...
@@ -81,6 +81,7 @@
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
INIT_QUANTITY as "initQuantity",
<!-- 期初数量 -->
INIT_WEIGHT as "initWeight",
<!-- 期初重量 -->
INIT_AMOUNT as "initAmount",
<!-- 期初金额 -->
...
...
@@ -160,7 +161,7 @@
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
WH_NAME
= #whName#
WH_NAME
like concat('%',#whName#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
...
...
@@ -169,11 +170,14 @@
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME
= #inventName#
INVENT_NAME
like concat('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
SPEC = #spec#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"initQuantity"
>
INIT_QUANTITY = #initQuantity#
</isNotEmpty>
...
...
@@ -386,7 +390,52 @@
</select>
<!--查询上月-->
<select
id=
"queryLast"
parameterClass=
"java.util.HashMap"
resultClass=
"HGCB004"
>
SELECT
<include
refid=
"column"
/>
SELECT
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
ACCOUNT_PERIOD as "accountPeriod",
<!-- 日期 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型明细 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
SUM(INIT_QUANTITY) as "initQuantity",
<!-- 期初数量 -->
SUM(INIT_WEIGHT) as "initWeight",
<!-- 期初重量 -->
SUM(INIT_AMOUNT) as "initAmount",
<!-- 期初金额 -->
SUM(CG_ENTER_QUANTITY) as "cgEnterQuantity",
<!-- 采购入库数量 -->
SUM(CG_ENTER_WEIGHT) as "cgEnterWeight",
<!-- 采购入库重量 -->
SUM(CG_ENTER_AMOUNT) as "cgEnterAmount",
<!-- 采购入库金额 -->
SUM(SC_ENTER_QUANTITY) as "scEnterQuantity",
<!-- 生产入库数量 -->
SUM(SC_ENTER_WEIGHT) as "scEnterWeight",
<!-- 生产入库重量 -->
SUM(SC_ENTER_AMOUNT) as "scEnterAmount",
<!-- 生产入库金额 -->
SUM(QT_ENTER_QUANTITY) as "qtEnterQuantity",
<!-- 其它入库数量 -->
SUM(QT_ENTER_WEIGHT) as "qtEnterWeight",
<!-- 其它入库重量 -->
SUM(QT_ENTER_AMOUNT) as "qtEnterAmount",
<!-- 其它入库重量 -->
SUM(ENTER_QUANTITY) as "enterQuantity",
<!-- 入库数量 -->
SUM(ENTER_WEIGHT) as "enterWeight",
<!-- 入库重量 -->
SUM(ENTER_AMOUNT) as "enterAmount",
<!-- 入库金额 -->
SUM(SC_OUTER_QUANTITY) as "scOuterQuantity",
<!-- 生产领料数量 -->
SUM(SC_OUTER_WEIGHT) as "scOuterWeight",
<!-- 生产领料重量 -->
SUM(SC_OUTER_AMOUNT) as "scOuterAmount",
<!-- 生产领料金额 -->
SUM(XS_OUTER_QUANTITY) as "xsOuterQuantity",
<!-- 销售出库数量 -->
SUM(XS_OUTER_WEIGHT) as "xsOuterWeight",
<!-- 销售出库重量 -->
SUM(XS_OUTER_AMOUNT) as "xsOuterAmount",
<!-- 销售出库金额 -->
SUM(QT_OUTER_QUANTITY) as "qtOuterQuantity",
<!-- 其它出库数量 -->
SUM(QT_OUTER_WEIGHT) as "qtOuterWeight",
<!-- 其它出库重量 -->
SUM(QT_OUTER_AMOUNT) as "qtOuterAmount",
<!-- 其它出库数量 -->
SUM(OUTER_QUANTITY) as "outerQuantity",
<!-- 出库数量 -->
SUM(OUTER_WEIGHT) as "outerWeight",
<!-- 出库重量 -->
SUM(OUTER_AMOUNT) as "outerAmount",
<!-- 出库金额 -->
SUM(PD_DIFF_QUANTITY) as "pdDiffQuantity",
<!-- 盘点差异数量 -->
SUM(PD_DIFF_WEIGHT) as "pdDiffWeight",
<!-- 盘点差异重量 -->
SUM(PD_DIFF_AMOUNT) as "pdDiffAmount",
<!-- 盘点差异金额 -->
SUM(END_QUANTITY) as "endQuantity",
<!-- 期末数量 -->
SUM(END_WEIGHT) as "endWeight",
<!-- 期末重量 -->
SUM(END_AMOUNT) as "endAmount"
<!-- 期末金额 -->
FROM ${hggpSchema}.HGCB004 WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
...
...
@@ -398,7 +447,48 @@
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriod"
>
ACCOUNT_PERIOD = DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m')
ACCOUNT_PERIOD = (select DATE_FORMAT(DATE_SUB(concat(#accountPeriod#,'01'), INTERVAL 1 MONTH), '%Y%m'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetail"
>
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, COMPANY_NAME, ACCOUNT_PERIOD, WH_CODE, WH_NAME, INVENT_TYPE_DETAIL, INVENT_CODE, INVENT_NAME, INVENT_RECORD_ID, SPEC
</select>
<select
id=
"querySum1"
parameterClass=
"java.util.HashMap"
resultClass=
"HGCB004"
>
SELECT
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC_ID as "inventRecordId",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
UNIT as "unit",
<!-- 单位 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC010
WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
...
...
@@ -596,6 +686,7 @@
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
INVENT_RECORD_ID,
<!-- 规格ID -->
SPEC,
INIT_QUANTITY,
<!-- 期初数量 -->
INIT_WEIGHT,
<!-- 期初重量 -->
INIT_AMOUNT,
<!-- 期初金额 -->
...
...
@@ -631,8 +722,8 @@
END_AMOUNT
<!-- 期末金额 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #companyCode#, #companyName#, #dateType#, #accountPeriod#, #whCode#, #whName#, #inventType#,#inventTypeDetail#,
#inventCode#, #inventName#, #inventRecordId#, #initQuantity#, #initWeight#, #initAmount#, #cgEnterQuantity#,
#updatedTime#, #companyCode#, #companyName#, #dateType#, #accountPeriod#, #whCode#, #whName#, #inventType#,
#inventTypeDetail#,
#inventCode#, #inventName#, #inventRecordId#, #
spec#, #
initQuantity#, #initWeight#, #initAmount#, #cgEnterQuantity#,
#cgEnterWeight#, #cgEnterAmount#, #scEnterQuantity#, #scEnterWeight#, #scEnterAmount#, #qtEnterQuantity#,
#qtEnterWeight#, #qtEnterAmount#, #enterQuantity#, #enterWeight#, #enterAmount#, #scOuterQuantity#,
#scOuterWeight#, #scOuterAmount#, #xsOuterQuantity#, #xsOuterWeight#, #xsOuterAmount#, #qtOuterQuantity#,
...
...
@@ -671,6 +762,7 @@
INVENT_CODE = #inventCode#,
<!-- 存货编码 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
INVENT_RECORD_ID = #inventRecordId#,
<!-- 规格ID -->
SPEC = #spec#,
INIT_QUANTITY = #initQuantity#,
<!-- 期初数量 -->
INIT_WEIGHT = #initWeight#,
<!-- 期初重量 -->
INIT_AMOUNT = #initAmount#,
<!-- 期初金额 -->
...
...
src/main/java/com/baosight/hggp/hg/cb/tools/HGCBTools.java
View file @
8e7d83bf
...
...
@@ -6,6 +6,8 @@ import com.baosight.hggp.common.InventTypeDetailEnum;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB002
;
import
com.baosight.hggp.hg.cb.domain.HGCB003
;
import
com.baosight.hggp.hg.cb.domain.HGCB004
;
...
...
@@ -24,6 +26,7 @@ import com.baosight.hggp.util.*;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
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.web.threadlocal.UserSession
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -41,21 +44,24 @@ import java.util.stream.Collectors;
public
class
HGCBTools
{
public
static
void
setBaseInfo
(
List
<
HGCB004
>
cb004s
)
{
// 仓库名称
List
<
String
>
whCodes
=
cb004s
.
stream
().
map
(
HGCB004:
:
getWhCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
HGPZ007
>
mapPz007
=
HGPZTools
.
HgPz007
.
map
(
whCodes
);
// 存货名称
List
<
Long
>
recordIds
=
cb004s
.
stream
().
map
(
HGCB004:
:
getInventRecordId
).
collect
(
Collectors
.
toList
());
Map
<
Long
,
HGPZ005
>
mapPz005
=
HGPZTools
.
HgPz005
.
maps
(
recordIds
);
for
(
HGCB004
hgcb004
:
cb004s
)
{
// 仓库名称
String
whCode
=
hgcb004
.
getWhCode
();
HGPZ007
pz007
=
mapPz007
==
null
?
null
:
mapPz007
.
get
(
whCode
);
hgcb004
.
setWhName
(
pz007
==
null
?
""
:
pz007
.
getWhName
());
// 存货名称
Long
recordId
=
hgcb004
.
getInventRecordId
();
HGPZ005
pz005
=
mapPz005
==
null
?
null
:
mapPz005
.
get
(
recordId
);
hgcb004
.
setInventName
(
pz005
==
null
?
""
:
pz005
.
getInventName
());
// 创建人企业编码
try
{
String
accountCode
=
UserSessionUtils
.
getAccountCode
();
AssertUtils
.
isEmpty
(
accountCode
,
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
hgcb004
.
setAccountCode
(
accountCode
);
}
catch
(
Exception
e
)
{
throw
new
PlatException
(
"写入创建人信息失败"
,
e
);
}
// 创建人组织机构
try
{
List
<
String
>
orgIds
=
UserSessionUtils
.
getOrgId
();
AssertUtils
.
isEmpty
(
orgIds
,
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
hgcb004
.
setDepCode
(
orgIds
.
get
(
0
));
}
catch
(
Exception
e
)
{
throw
new
PlatException
(
"写入创建人部门编码失败"
,
e
);
}
// 创建时间
hgcb004
.
setCreatedBy
(
UserSession
.
getLoginName
());
hgcb004
.
setCreatedName
(
UserSession
.
getLoginCName
());
...
...
@@ -63,33 +69,70 @@ public class HGCBTools {
}
}
public
static
class
HgCb001
{
/**
* 查询当前公司账期
* @param params 业务账期
* @return 会计期
*/
public
static
HGCB001
select
(
Map
<
String
,
String
>
params
)
{
AssertUtils
.
isEmpty
(
params
.
get
(
HGCB001
.
FIELD_COMPANY_CODE
),
"公司不能为空!"
);
AssertUtils
.
isEmpty
(
params
.
get
(
HGCB001
.
FIELD_ACCOUNT_PERIOD
),
"会计期不能为空!"
);
List
<
HGCB001
>
hgcb001s
=
DaoBase
.
getInstance
().
query
(
HGCB001
.
QUERY
,
params
);
return
hgcb001s
.
size
()
==
0
?
null
:
hgcb001s
.
get
(
0
);
}
/**
* 查询上月公司账期
* @param params 业务账期
* @return 会计期
*/
public
static
HGCB001
selectLast
(
Map
<
String
,
String
>
params
)
{
AssertUtils
.
isEmpty
(
params
.
get
(
HGCB001
.
FIELD_COMPANY_CODE
),
"公司不能为空!"
);
AssertUtils
.
isEmpty
(
params
.
get
(
HGCB001
.
FIELD_ACCOUNT_PERIOD
),
"会计期不能为空!"
);
List
<
HGCB001
>
hgcb001s
=
DaoBase
.
getInstance
().
query
(
"HGCB001.getLastRow"
,
params
);
return
hgcb001s
.
size
()
==
0
?
null
:
hgcb001s
.
get
(
0
);
}
}
/**
* HGCB002 工具类
*/
public
static
class
HgCb002
{
public
static
void
select
(
Map
<
String
,
String
>
params
)
{
AssertUtils
.
isEmpty
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
),
"公司不能为空!"
);
//
AssertUtils.isEmpty(params.get(HGCB002.FIELD_COMPANY_CODE), "公司不能为空!");
//HGCW001 hgcb001 = HGCWTools.HgCw001.getMaxAccountPeriod(params.get(HGCB002.FIELD_COMPANY_CODE));
//params.put(HGCB002.FIELD_ACCOUNT_PERIOD, hgcb001.getAccountPeriod());
params
.
put
(
HGKC001
.
FIELD_SUBMIT_STATUS
,
String
.
valueOf
(
1
));
params
.
put
(
HGKC001
.
FIELD_INVENT_TYPE_DETAIL
,
InventTypeDetailEnum
.
RAW
.
getCode
().
toString
());
saveHgkc001s
(
params
);
//保存采购入库单
saveHgkc006s
(
params
);
//保存其他入库单
//删除当月同时数据
DaoBase
.
getInstance
().
delete
(
HGCB002
.
DELETE_PERIOD
,
params
);
List
<
HGCB002
>
results
=
new
ArrayList
<>();
saveHgkc001s
(
results
,
params
);
//保存采购入库单
DaoUtils
.
insertBatch
(
HGCB002
.
INSERT
,
results
);
results
.
clear
();
saveHgkc006s
(
results
,
params
);
//保存其他入库单
//写入数据
DaoUtils
.
insertBatch
(
HGCB002
.
INSERT
,
results
);
}
// 保存采购入库单
public
static
void
saveHgkc001s
(
Map
<
String
,
String
>
params
){
public
static
void
saveHgkc001s
(
List
<
HGCB002
>
results
,
Map
<
String
,
String
>
params
){
List
<
HGKC001
>
hgkc001List
=
DaoBase
.
getInstance
().
query
(
HGKC001
.
QUERY_LIST
,
params
);
//查询采购入库单
//获取上月原材料入库成本核算单
Map
<
String
,
List
<
HGCB002
>>
hgcb002Map
=
HGCBTools
.
HgCb002
.
synchList
(
new
HashMap
<
String
,
Object
>(){{
put
(
HGCB002
.
FIELD_COMPANY_CODE
,
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
));
put
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
,
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
)
);
put
(
"accountDate"
,
"(SELECT DATE_FORMAT(DATE_SUB(concat('"
+
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
)+
"','01'), INTERVAL 1 MONTH), '%Y%m'))"
);
put
(
HGCB002
.
FIELD_BIZ_TYPE
,
BizTypeEnum
.
CGRK
.
getCode
());
put
(
HGCB002
.
FIELD_IS_ESTIMATE
,
1
);
//是否是暂估价 1是暂估,0不是暂估
}});
AssertUtils
.
isEmpty
(
hgkc001List
,
"当前会计期采购入库单为空!"
);
for
(
HGKC001
hgkc001:
hgkc001List
)
{
/*初始化原材料*/
HGCB002
hgcb002
=
addHgcb002
(
hgkc001
,
params
);
...
...
@@ -101,20 +144,19 @@ public class HGCBTools {
hgcb002
.
setAmount
(
amount
);
hgcb002
.
setPrice
(
price
);
hgcb002
.
setIsEstimate
(
0
);
//有采购开票,不是暂估
List
<
HGCB002
>
hgcb0021
=
hgcb002Map
.
get
(
hgkc001
.
getDepositNo
())
==
null
?
null
:
hgcb002Map
.
get
(
hgkc001
.
get
Receive
No
());
List
<
HGCB002
>
hgcb0021
=
hgcb002Map
.
get
(
hgkc001
.
getDepositNo
())
==
null
?
null
:
hgcb002Map
.
get
(
hgkc001
.
get
Deposit
No
());
if
(
hgcb0021
!=
null
){
//宏冲金额
addInvoic
(
hgcb0021
,
hgcb002
);
addInvoic
(
results
,
hgcb0021
,
hgcb002
);
}
}
DaoUtils
.
insert
(
HGCB002
.
INSERT
,
hgcb002
);
results
.
add
(
hgcb002
);
}
}
//保存其他出库单
public
static
void
saveHgkc006s
(
Map
<
String
,
String
>
params
)
{
public
static
void
saveHgkc006s
(
List
<
HGCB002
>
results
,
Map
<
String
,
String
>
params
)
{
Map
<
String
,
HGCB002
>
hgcb002List
=
HgCb004
.
listInvData
(
params
,
"HGCB002.queryLast"
);
//查询当月原材料成本核算
Map
<
String
,
HGCB004
>
hgcb004List
=
HgCb004
.
listInvData
(
params
,
"HGCB004.queryLast"
);
//查询上月期末
params
.
put
(
HGKC006
.
FIELD_OTHER_ENTER_DATE
,
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
));
Map
<
String
,
HGCB004
>
hgcb004List
=
HgCb004
.
listInvData
(
params
,
HGCB004
.
QUERY_LAST
);
//查询上月期末
Map
<
String
,
HGKC006A
>
hgKC006AList
=
HgCb004
.
listInvData
(
params
,
"HGKC006A.queryList"
);
//查询其他出库单
for
(
Map
.
Entry
<
String
,
HGKC006A
>
entry
:
hgKC006AList
.
entrySet
())
{
...
...
@@ -132,12 +174,14 @@ public class HGCBTools {
BigDecimal
endAmount
=
hgcb002
==
null
?
BigDecimal
.
ZERO
:
hgcb004
.
getEndAmount
();
quantity
=
quantity
.
add
(
endQuantity
);
amount
=
amount
.
add
(
endAmount
);
BigDecimal
price
=
amount
.
divide
(
quantity
,
3
,
RoundingMode
.
HALF_UP
);
cb002
.
setPrice
(
price
);
cb002
.
setAmount
(
cb002
.
getQuantity
().
multiply
(
price
));
cb002
.
setIsEstimate
(
0
);
if
(
quantity
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
BigDecimal
price
=
amount
.
divide
(
quantity
,
3
,
RoundingMode
.
HALF_UP
);
cb002
.
setPrice
(
price
);
cb002
.
setAmount
(
cb002
.
getQuantity
().
multiply
(
price
));
}
cb002
.
setBizType
(
BizTypeEnum
.
QTRK
.
getCode
());
DaoUtils
.
insert
(
HGCB002
.
INSERT
,
cb002
);
cb002
.
setIsEstimate
(
0
);
results
.
add
(
cb002
);
}
}
...
...
@@ -151,7 +195,7 @@ public class HGCBTools {
HGCB002
hgcb002
=
new
HGCB002
();
//BeanUtil.copyProperties(hgkc001, hgcb002);
hgcb002
.
setCompanyCode
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
));
hgcb002
.
setCompanyName
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_NAME
));
hgcb002
.
setCompanyName
(
hgkc001
.
getCompanyName
(
));
hgcb002
.
setAccountYear
(
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
).
substring
(
0
,
4
));
hgcb002
.
setAccountPeriod
(
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
));
hgcb002
.
setBizType
(
BizTypeEnum
.
CGRK
.
getCode
());
...
...
@@ -163,14 +207,15 @@ public class HGCBTools {
hgcb002
.
setInventType
(
hgkc001
.
getInventType
());
hgcb002
.
setInventCode
(
hgkc001
.
getInventCode
());
hgcb002
.
setInventName
(
hgkc001
.
getInventName
());
hgcb002
.
set
Spec
Id
(
hgkc001
.
getSpecId
());
hgcb002
.
set
InventRecord
Id
(
hgkc001
.
getSpecId
());
hgcb002
.
setSpec
(
hgkc001
.
getSpec
());
hgcb002
.
setUnit
(
hgkc001
.
getUnit
());
hgcb002
.
setIsEstimate
(
1
);
//默认是暂估1
hgcb002
.
setQuantity
(
hgkc001
.
getDepositQty
());
hgcb002
.
setWeight
(
hgkc001
.
getDepositWeight
());
hgcb002
.
setPrice
(
hgkc001
.
getPrice
());
hgcb002
.
setAmount
(
hgkc001
.
getAmount
());
hgcb002
.
setInventTypeDetail
(
hgkc001
.
getInventTypeDetail
());
hgcb002
.
setPrice
(
StringUtils
.
isNull
(
hgkc001
.
getPrice
())?
BigDecimal
.
ZERO
:
hgkc001
.
getPrice
());
hgcb002
.
setAmount
(
StringUtils
.
isNull
(
hgkc001
.
getAmount
())?
BigDecimal
.
ZERO
:
hgkc001
.
getAmount
());
return
hgcb002
;
}
...
...
@@ -194,13 +239,14 @@ public class HGCBTools {
hgcb002
.
setInventType
(
hgkc006A
.
getInventType
());
hgcb002
.
setInventCode
(
hgkc006A
.
getInventCode
());
hgcb002
.
setInventName
(
hgkc006A
.
getInventName
());
hgcb002
.
set
Spec
Id
(
hgkc006A
.
getInventRecordId
());
hgcb002
.
set
InventRecord
Id
(
hgkc006A
.
getInventRecordId
());
hgcb002
.
setSpec
(
hgkc006A
.
getPartSpec
());
hgcb002
.
setIsEstimate
(
0
);
hgcb002
.
setQuantity
(
hgkc006A
.
getInvQty
());
hgcb002
.
setWeight
(
hgkc006A
.
getInvWeight
());
hgcb002
.
setPrice
(
hgkc006A
.
getPrice
());
hgcb002
.
setAmount
(
hgkc006A
.
getAmount
());
hgcb002
.
setInventTypeDetail
(
hgkc006A
.
getInventTypeDetail
());
return
hgcb002
;
}
...
...
@@ -209,8 +255,7 @@ public class HGCBTools {
* @param queryMap
*/
public
static
Map
<
String
,
List
<
HGCB002
>>
synchList
(
Map
<
String
,
Object
>
queryMap
)
{
queryMap
.
put
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
,
"DATE_FORMAT(DATE_SUB(concat("
+
queryMap
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
)+
",'01'), INTERVAL 1 MONTH), '%Y%m')"
);
List
<
HGCB002
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCB002.queryLast"
,
queryMap
);
List
<
HGCB002
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCB002.query"
,
queryMap
);
return
list
.
stream
().
collect
(
Collectors
.
groupingBy
(
HGCB002:
:
getReceiptCode
));
}
...
...
@@ -219,12 +264,13 @@ public class HGCBTools {
* @param hgcb0021
* @param hgcb002
*/
public
static
void
addInvoic
(
List
<
HGCB002
>
hgcb0021
,
HGCB002
hgcb002
){
public
static
void
addInvoic
(
List
<
HGCB002
>
hgcb002
ArrayList
,
List
<
HGCB002
>
hgcb002
1
,
HGCB002
hgcb002
){
for
(
HGCB002
cb002:
hgcb0021
)
{
cb002
.
setId
(
0L
);
cb002
.
setAccountPeriod
(
hgcb002
.
getAccountPeriod
());
cb002
.
setQuantity
(
cb002
.
getQuantity
().
multiply
(
new
BigDecimal
(-
1
)));
cb002
.
setAmount
(
cb002
.
getAmount
().
multiply
(
new
BigDecimal
(-
1
)));
DaoUtils
.
insert
(
HGCB002
.
INSERT
,
hgcb0021
);
hgcb002ArrayList
.
add
(
cb002
);
}
...
...
@@ -234,20 +280,25 @@ public class HGCBTools {
public
static
class
HgCb003
{
public
static
void
select
(
Map
<
String
,
String
>
params
)
{
AssertUtils
.
isEmpty
(
params
.
get
(
HGCB003
.
FIELD_COMPANY_CODE
),
"公司不能为空!"
);
params
.
put
(
HGKC001
.
FIELD_SUBMIT_STATUS
,
String
.
valueOf
(
1
));
params
.
put
(
HGKC001
.
FIELD_INVENT_TYPE_DETAIL
,
InventTypeDetailEnum
.
RAW
.
getCode
().
toString
());
saveHgkc008s
(
params
);
//保存生产领料单
saveHgkc007s
(
params
);
//保存其他出库单
//删除当月同时数据
DaoBase
.
getInstance
().
delete
(
HGCB003
.
DELETE_PERIOD
,
params
);
List
<
HGCB003
>
results
=
new
ArrayList
<>();
saveHgkc008s
(
results
,
params
);
//保存生产领料单
saveHgkc007s
(
results
,
params
);
//保存其他出库单
//写入数据
DaoUtils
.
insertBatch
(
HGCB003
.
INSERT
,
results
);
}
// 保存生产领料单
public
static
void
saveHgkc008s
(
Map
<
String
,
String
>
params
){
public
static
void
saveHgkc008s
(
List
<
HGCB003
>
results
,
Map
<
String
,
String
>
params
){
Map
<
String
,
HGCB002
>
hgcb002List
=
HgCb004
.
listInvData
(
params
,
"HGCB002.queryLast"
);
//查询当月原材料入库成本
Map
<
String
,
HGCB004
>
hgcb004List
=
HgCb004
.
listInvData
(
params
,
"HGCB004.queryLast"
);
//查询上月收发存汇总期末
params
.
put
(
HGKC008
.
FIELD_RECEIPT_DATE
,
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
));
Map
<
String
,
HGCB004
>
hgcb004List
=
HgCb004
.
listInvData
(
params
,
HGCB004
.
QUERY_LAST
);
//查询上月收发存汇总期末
Map
<
String
,
HGKC008B
>
hgKC008BList
=
HgCb004
.
listInvData
(
params
,
"HGKC008A.queryList"
);
//查询其他出库单
for
(
Map
.
Entry
<
String
,
HGKC008B
>
entry
:
hgKC008BList
.
entrySet
())
{
String
key
=
entry
.
getKey
();
HGKC008B
endKc
=
entry
.
getValue
();
...
...
@@ -263,18 +314,22 @@ public class HGCBTools {
BigDecimal
endAmount
=
hgcb004
==
null
?
BigDecimal
.
ZERO
:
hgcb004
.
getEndAmount
();
quantity
=
quantity
.
add
(
endQuantity
);
amount
=
amount
.
add
(
endAmount
);
BigDecimal
price
=
amount
.
divide
(
quantity
,
3
,
RoundingMode
.
HALF_UP
);
cb003
.
setPrice
(
price
);
cb003
.
setAmount
(
cb003
.
getQuantity
().
multiply
(
price
));
if
(
quantity
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
BigDecimal
price
=
amount
.
divide
(
quantity
,
3
,
RoundingMode
.
HALF_UP
);
cb003
.
setPrice
(
price
);
cb003
.
setAmount
(
cb003
.
getQuantity
().
multiply
(
price
));
}
cb003
.
setIsEstimate
(
0
);
DaoUtils
.
insert
(
HGCB003
.
INSERT
,
cb003
);
results
.
add
(
cb003
);
//DaoUtils.insert(HGCB003.INSERT, cb003);
}
}
//保存其他出库单
public
static
void
saveHgkc007s
(
Map
<
String
,
String
>
params
){
public
static
void
saveHgkc007s
(
List
<
HGCB003
>
results
,
Map
<
String
,
String
>
params
){
Map
<
String
,
HGCB002
>
hgcb002List
=
HgCb004
.
listInvData
(
params
,
"HGCB002.queryLast"
);
//查询当月原材料成本核算
Map
<
String
,
HGCB004
>
hgcb004List
=
HgCb004
.
listInvData
(
params
,
"HGCB004.queryLast"
);
//查询上月期末
Map
<
String
,
HGCB004
>
hgcb004List
=
HgCb004
.
listInvData
(
params
,
HGCB004
.
QUERY_LAST
);
//查询上月期末
params
.
put
(
HGKC007
.
FIELD_OTHER_OUT_DATE
,
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
));
Map
<
String
,
HGKC007B
>
hgkc007BList
=
HgCb004
.
listInvData
(
params
,
"HGKC007A.queryList"
);
//查询其他出库单
...
...
@@ -297,7 +352,8 @@ public class HGCBTools {
cb003
.
setPrice
(
price
);
cb003
.
setAmount
(
cb003
.
getQuantity
().
multiply
(
price
));
cb003
.
setIsEstimate
(
0
);
DaoUtils
.
insert
(
HGCB003
.
INSERT
,
cb003
);
results
.
add
(
cb003
);
//DaoUtils.insert(HGCB003.INSERT, cb003);
}
}
...
...
@@ -310,7 +366,7 @@ public class HGCBTools {
public
static
HGCB003
addHgcb003
(
HGKC008B
hgkc008b
,
Map
<
String
,
String
>
params
)
{
HGCB003
hgcb003
=
new
HGCB003
();
hgcb003
.
setCompanyCode
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_CODE
));
hgcb003
.
setCompanyName
(
params
.
get
(
HGCB002
.
FIELD_COMPANY_NAME
));
hgcb003
.
setCompanyName
(
hgkc008b
.
getCompanyName
(
));
hgcb003
.
setAccountYear
(
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
).
substring
(
0
,
4
));
hgcb003
.
setAccountPeriod
(
params
.
get
(
HGCB002
.
FIELD_ACCOUNT_PERIOD
));
hgcb003
.
setBizType
(
BizTypeEnum
.
SCLL
.
getCode
());
...
...
@@ -321,13 +377,14 @@ public class HGCBTools {
hgcb003
.
setInventType
(
hgkc008b
.
getInventType
());
hgcb003
.
setInventCode
(
hgkc008b
.
getInventCode
());
hgcb003
.
setInventName
(
hgkc008b
.
getInventName
());
hgcb003
.
set
Spec
Id
(
hgkc008b
.
getInvSpecId
());
hgcb003
.
set
InventRecord
Id
(
hgkc008b
.
getInvSpecId
());
hgcb003
.
setSpec
(
hgkc008b
.
getInvSpec
());
hgcb003
.
setIsEstimate
(
0
);
//默认是暂估0
hgcb003
.
setQuantity
(
hgkc008b
.
getInvQty
());
hgcb003
.
setWeight
(
hgkc008b
.
getInvWeight
());
hgcb003
.
setPrice
(
hgkc008b
.
getPrice
());
hgcb003
.
setAmount
(
hgkc008b
.
getAmount
());
hgcb003
.
setInventTypeDetail
(
hgkc008b
.
getInventTypeDetail
());
return
hgcb003
;
}
...
...
@@ -351,13 +408,14 @@ public class HGCBTools {
hgcb003
.
setInventType
(
hgkc007b
.
getInventType
());
hgcb003
.
setInventCode
(
hgkc007b
.
getInventCode
());
hgcb003
.
setInventName
(
hgkc007b
.
getInventName
());
hgcb003
.
set
Spec
Id
(
hgkc007b
.
getInventRecordId
());
hgcb003
.
set
InventRecord
Id
(
hgkc007b
.
getInventRecordId
());
hgcb003
.
setSpec
(
hgkc007b
.
getPartSpec
());
hgcb003
.
setIsEstimate
(
0
);
hgcb003
.
setQuantity
(
hgkc007b
.
getInvQty
());
hgcb003
.
setWeight
(
hgkc007b
.
getInvWeight
());
hgcb003
.
setPrice
(
hgkc007b
.
getPrice
());
hgcb003
.
setAmount
(
hgkc007b
.
getAmount
());
hgcb003
.
setInventTypeDetail
(
hgkc007b
.
getInventTypeDetail
());
return
hgcb003
;
}
}
...
...
@@ -391,11 +449,13 @@ public class HGCBTools {
* @return
*/
public
static
List
<
HGCB004
>
statData
(
Map
queryMap
)
{
Map
<
String
,
HGCB004
>
hgkc010
=
listInvData
(
queryMap
,
"HGCB004.querySum1"
);
// 1.1、期初库存
queryMap
.
put
(
HGCB004
.
FIELD_INVENT_TYPE_DETAIL
,
InventTypeDetailEnum
.
RAW
.
getCode
());
Map
<
String
,
HGCB004
>
initCb4Map
=
listInvData
(
queryMap
,
HGCB004
.
QUERY_LAST
);
// 1.2、原材料入库成本核算库存
Map
<
String
,
HGCB002
>
initCb2Map
=
listInvData
(
queryMap
,
HGCB002
.
QUERY_DETAIL
);
Map
<
String
,
HGCB002
>
initCb2Map
=
listInvData
(
queryMap
,
"HGCB002.queryLast"
);
// 1.2、原材料出库成本核算库存
Map
<
String
,
HGCB003
>
initCb3Map
=
listInvData
(
queryMap
,
HGCB003
.
QUERY_DETAIL
);
// 1.2、采购入库单
...
...
@@ -415,30 +475,31 @@ public class HGCBTools {
// 2.0 销售出库
Map
<
String
,
HGKC004A
>
xsCkMap
=
listInvData
(
queryMap
,
HGKC004A
.
QUERY_DETAIL
);
// 根据期末库存生成收发存对象
return
buildKcBean
(
queryMap
,
initCb4Map
,
initCb2Map
,
initCb3Map
,
cgRkMap
,
qtRkMap
,
scCkMap
,
qtCkMap
,
scRkMap
,
xsCkMap
);
return
buildKcBean
(
queryMap
,
hgkc010
,
initCb4Map
,
initCb2Map
,
initCb3Map
,
cgRkMap
,
qtRkMap
,
scCkMap
,
qtCkMap
,
scRkMap
,
xsCkMap
);
}
public
static
List
<
HGCB004
>
buildKcBean
(
Map
queryMap
,
public
static
List
<
HGCB004
>
buildKcBean
(
Map
queryMap
,
Map
<
String
,
HGCB004
>
hgkc010
,
Map
<
String
,
HGCB004
>
initCb4Map
,
Map
<
String
,
HGCB002
>
initCb2Map
,
Map
<
String
,
HGCB003
>
initCb3Map
,
Map
<
String
,
HGCB002
>
cgRkMap
,
Map
<
String
,
HGCB002
>
qtRkMap
,
Map
<
String
,
HGCB003
>
scCkMap
,
Map
<
String
,
HGCB003
>
qtCkMap
,
Map
<
String
,
HGKC003
>
scRkMap
,
Map
<
String
,
HGKC004A
>
xsCkMap
)
{
List
<
HGCB004
>
newcB004s
=
new
ArrayList
<>();
Set
<
String
>
keyList
=
initCb4Map
.
keySet
();
keyList
.
addAll
(
initCb2Map
.
keySet
());
for
(
String
key:
keyList
)
{
HGCB004
hgcb004
=
initCb4Map
.
get
(
key
);
for
(
Map
.
Entry
<
String
,
HGCB004
>
entry
:
hgkc010
.
entrySet
())
{
String
key
=
entry
.
getKey
();
HGCB004
hgcb004
=
hgkc010
.
get
(
key
);
if
(
hgcb004
==
null
)
{
setHgcb004
(
hgcb004
,
initCb2Map
.
get
(
key
));
}
HGCB004
cb004
=
BeanUtils
.
copy
(
hgcb004
,
HGCB004
.
class
);
cb004
.
setId
(
0L
);
cb004
.
setDateType
(
queryMap
.
get
(
HGCB004
.
FIELD_DATE_TYPE
).
toString
());
cb004
.
setAccountPeriod
(
queryMap
.
get
(
HGCB004
.
FIELD_ACCOUNT_PERIOD
).
toString
());
// 1.1期初库存
cb004
.
setInitQuantity
(
hgcb004
.
getEndQuantity
());
cb004
.
setInitWeight
(
hgcb004
.
getEndWeight
());
cb004
.
setInitAmount
(
hgcb004
.
getEndAmount
());
HGCB004
hgcb0041
=
initCb4Map
.
get
(
key
);
cb004
.
setInitQuantity
(
hgcb0041
==
null
?
BigDecimal
.
ZERO
:
hgcb0041
.
getEndQuantity
());
cb004
.
setInitWeight
(
hgcb0041
==
null
?
BigDecimal
.
ZERO
:
hgcb0041
.
getEndWeight
());
cb004
.
setInitAmount
(
hgcb0041
==
null
?
BigDecimal
.
ZERO
:
hgcb0041
.
getEndAmount
());
// 1.2、采购入库
HGCB002
cgRk
=
cgRkMap
.
get
(
key
);
...
...
@@ -513,8 +574,15 @@ public class HGCBTools {
* @return
*/
public
static
String
buildKey
(
Map
dataMap
)
{
return
buildKey
(
dataMap
.
get
(
HGCB004
.
FIELD_COMPANY_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_DEP_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_INVENT_RECORD_ID
),
dataMap
.
get
(
HGCB004
.
FIELD_INVENT_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_WH_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_INVENT_RECORD_ID
));
if
(
dataMap
.
containsKey
(
HGKC006A
.
FIELD_PART_SPEC
)){
dataMap
.
put
(
HGCB004
.
FIELD_SPEC
,
dataMap
.
get
(
HGKC006A
.
FIELD_PART_SPEC
));
}
else
if
(
dataMap
.
containsKey
(
HGKC008A
.
FIELD_INV_SPEC
)){
dataMap
.
put
(
HGCB004
.
FIELD_SPEC
,
dataMap
.
get
(
HGKC008A
.
FIELD_INV_SPEC
));
}
else
if
(
dataMap
.
containsKey
(
HGKC007A
.
FIELD_PART_SPEC
)){
dataMap
.
put
(
HGCB004
.
FIELD_SPEC
,
dataMap
.
get
(
HGKC007A
.
FIELD_PART_SPEC
));
}
return
buildKey
(
dataMap
.
get
(
HGCB004
.
FIELD_COMPANY_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_DEP_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_INVENT_TYPE_DETAIL
),
dataMap
.
get
(
HGCB004
.
FIELD_INVENT_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_WH_CODE
),
dataMap
.
get
(
HGCB004
.
FIELD_SPEC
));
}
/**
...
...
@@ -525,17 +593,17 @@ public class HGCBTools {
* @param inventType
* @param inventCode
* @param whCode
* @param
inventRecordId
* @param
spec
* @return
*/
public
static
String
buildKey
(
Object
companyCode
,
Object
depCode
,
Object
inventType
,
Object
inventCode
,
Object
whCode
,
Object
inventRecordId
)
{
Object
whCode
,
Object
spec
)
{
return
ObjectUtils
.
trimToEmpty
(
companyCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
depCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
inventType
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
inventCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
whCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
inventRecordId
);
+
ObjectUtils
.
trimToEmpty
(
spec
);
}
public
static
void
setHgcb004
(
HGCB004
hgcb004
,
HGCB002
hgcb002
){
...
...
src/main/java/com/baosight/hggp/hg/cw/sql/HGCW001.xml
View file @
8e7d83bf
...
...
@@ -273,13 +273,20 @@
select
ACCOUNT_CODE as "accountCode",
COMPANY_CODE as "companyCode",
ACCOUNT_YEAR as "accountYear",
MAX(ACCOUNT_PERIOD) as "accountPeriod"
ACCOUNT_YEAR as "accountYear",
ACCOUNT_PERIOD as "accountPeriod",
ACCOUNT_PERIOD_DATE_START as "accountPeriodDateStart",
ACCOUNT_PERIOD_DATE_END as "accountPeriodDateEnd"
from ${hggpSchema}.HGCW001
where 1=1
<include
refid=
"condition"
/>
group by
ACCOUNT_CODE, COMPANY_CODE, ACCOUNT_YEAR
where ACCOUNT_PERIOD_STATUS = 0
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND ACCOUNT_PERIOD = (
select MAX(ACCOUNT_PERIOD) from ${hggpSchema}.HGCW001
where ACCOUNT_CODE = #accountCode#
and COMPANY_CODE = #companyCode#
and ACCOUNT_PERIOD_STATUS = 0
)
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/cw/tools/HGCWTools.java
View file @
8e7d83bf
...
...
@@ -35,9 +35,8 @@ public class HGCWTools {
public
static
HGCW001
getMaxAccountPeriod
(
String
companyCode
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"companyCode"
,
companyCode
);
params
.
put
(
"accountPeriodStatus"
,
0
);
List
<
HGCW001
>
list
=
DaoBase
.
getInstance
().
query
(
"HGCW001.getMaxAccountPeriod"
,
params
);
AssertUtils
.
isEmpty
(
list
,
"未找到公司对应的会计期
间
"
);
AssertUtils
.
isEmpty
(
list
,
"未找到公司对应的会计期"
);
return
list
.
get
(
0
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC005.java
View file @
8e7d83bf
...
...
@@ -22,7 +22,7 @@ public class HGKC005 extends DaoEPBase {
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 企业编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_RECEIPT_DATE
=
"receiptDate"
;
/* 单据日期*/
...
...
@@ -54,9 +54,10 @@ public class HGKC005 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 更新人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除0.否1.是*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态*/
public
static
final
String
FIELD_IS_AMOUNT
=
"isAmount"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_RECEIPT_DATE
=
"RECEIPT_DATE"
;
/* 单据日期*/
...
...
@@ -94,8 +95,9 @@ public class HGKC005 extends DaoEPBase {
public
static
final
String
INSERT
=
"HGKC005.insert"
;
public
static
final
String
UPDATE
=
"HGKC005.update"
;
public
static
final
String
DELETE
=
"HGKC005.delete"
;
public
static
final
String
UPDATE_SUBMIT_STATUS
=
"HGKC005.updateSubmitStatus"
;
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
receiptDate
=
" "
;
/* 单据日期*/
...
...
@@ -127,6 +129,7 @@ public class HGKC005 extends DaoEPBase {
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
=
0
;
/* 是否删除0.否1.是*/
private
Integer
submitStatus
;
/* 提交状态*/
/**
* initialize the metadata.
...
...
@@ -287,6 +290,9 @@ public class HGKC005 extends DaoEPBase {
eiColumn
.
setDescName
(
"是否删除0.否1.是"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SUBMIT_STATUS
);
eiColumn
.
setDescName
(
"提交状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
...
...
@@ -308,7 +314,7 @@ public class HGKC005 extends DaoEPBase {
/**
* set the id .
*
* @param id
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
...
...
@@ -809,6 +815,15 @@ public class HGKC005 extends DaoEPBase {
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Integer
getSubmitStatus
()
{
return
submitStatus
;
}
public
void
setSubmitStatus
(
Integer
submitStatus
)
{
this
.
submitStatus
=
submitStatus
;
}
/**
* get the value from Map.
*
...
...
@@ -849,6 +864,7 @@ public class HGKC005 extends DaoEPBase {
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
}
/**
...
...
@@ -890,6 +906,7 @@ public class HGKC005 extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
View file @
8e7d83bf
...
...
@@ -248,6 +248,9 @@ public class ServiceHGKC003 extends ServiceBase {
// 修改库存
HGKCUtils
.
HgKc010
.
updateInv
(
newKc003
.
getCompanyCode
(),
newKc003
.
getWhCode
(),
newKc003
.
getPrdtCode
(),
newKc003
.
getInvQty
(),
newKc003
.
getInvWeight
());
//历史单据也要标记退回
fKc003
.
setIsReturn
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
update
(
HGKC003
.
UPDATE
,
fKc003
);
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC005.java
View file @
8e7d83bf
...
...
@@ -9,15 +9,21 @@ import com.baosight.hggp.hg.constant.HGConstant;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC005
;
import
com.baosight.hggp.hg.kc.domain.HGKC007
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.yx.domain.HGYX001
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
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.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.MapUtils
;
...
...
@@ -126,7 +132,9 @@ public class ServiceHGKC005 extends ServiceEPBase {
if
(
fKc005
.
getId
()
==
null
||
fKc005
.
getId
()
==
0
)
{
this
.
addData
(
fKc005
);
}
else
{
// TODO 盘点不支持修改
// 设置基础信息
this
.
setBaseInfo
(
fKc005
);
DaoUtils
.
update
(
HGKC005
.
UPDATE
,
fKc005
);
}
}
}
...
...
@@ -139,12 +147,10 @@ public class ServiceHGKC005 extends ServiceEPBase {
private
void
addData
(
HGKC005
fKc005
)
{
// 设置基础信息
this
.
setBaseInfo
(
fKc005
);
fKc005
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
// 生成单据号
fKc005
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CHECK_NO
));
DaoUtils
.
insert
(
HGKC005
.
INSERT
,
fKc005
);
// 修改库存
HGKCTools
.
updateStock
(
fKc005
.
getWhCode
(),
fKc005
.
getInventRecordId
(),
fKc005
.
getDiffAmount
(),
fKc005
.
getDiffWeight
(),
fKc005
.
getCompanyCode
(),
fKc005
.
getCompanyName
());
}
/**
...
...
@@ -166,6 +172,20 @@ public class ServiceHGKC005 extends ServiceEPBase {
}
/**
* 校验保存的数据
*
* @param fKc005
*/
private
void
checkSubmitData
(
HGKC005
fKc005
)
{
AssertUtils
.
isEmpty
(
fKc005
.
getInventCode
(),
"存货类型不能为空"
);
AssertUtils
.
isEmpty
(
fKc005
.
getWhCode
(),
"仓库名称不能为空"
);
AssertUtils
.
isEmpty
(
fKc005
.
getInventCode
(),
"存货名称不能为空"
);
AssertUtils
.
isNull
(
fKc005
.
getInventRecordId
(),
"规格不能为空"
);
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fKc005
.
getBookAmount
(),
"账面数量必须大于0"
);
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
fKc005
.
getEntityAmount
(),
"实物重量必须大于0"
);
}
/**
* 设置基础信息
*
* @param fKc005
...
...
@@ -242,4 +262,40 @@ public class ServiceHGKC005 extends ServiceEPBase {
HGKCTools
.
updateStock
(
newKc005
);
}
}
/**
* 修改提交状态
* @param inInfo
* @return
*/
public
EiInfo
updateSubmitStatus
(
EiInfo
inInfo
){
int
i
=
0
;
try
{
HGKC005
hgkc005
=
new
HGKC005
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc005
.
fromMap
(
map
);
hgkc005
=
HGKCTools
.
HgKc005
.
getId
(
hgkc005
.
getId
());
hgkc005
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
// 校验数据
this
.
checkSubmitData
(
hgkc005
);
DaoUtils
.
update
(
HGKC005
.
UPDATE_SUBMIT_STATUS
,
hgkc005
);
// //修改计划生产任务完工数量
// HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId(),HGConstant.StorageType.RK);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"提交"
)});
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
inInfo
;
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC005A.java
View file @
8e7d83bf
...
...
@@ -147,6 +147,7 @@ public class ServiceHGKC005A extends ServiceEPBase {
newKc005
.
setRemark
(
entityRemark
);
newKc005
.
setInventRecordId
(
dbKc010
.
getSpecId
());
newKc005
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
newKc005
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
DaoUtils
.
insert
(
HGKC005
.
INSERT
,
newKc005
);
HGKCTools
.
updateStock
(
newKc005
);
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
View file @
8e7d83bf
...
...
@@ -8,6 +8,7 @@ import com.baosight.hggp.hg.kc.domain.HGKC008;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -34,9 +35,10 @@ public class ServiceHGKC008 extends ServiceBase {
Map
map
=
new
HashMap
();
map
.
put
(
HGKC008
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
,
DdynamicEnum
.
WH_RECORD_BOX_BLOCK_ID
),
map
,
false
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_B
Y_ROLE_B
LOCK_ID
,
DdynamicEnum
.
WH_RECORD_BOX_BLOCK_ID
),
map
,
false
);
}
catch
(
PlatException
e
)
{
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
...
...
@@ -45,11 +47,6 @@ public class ServiceHGKC008 extends ServiceBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
inInfo
=
super
.
query
(
inInfo
,
HGKC008
.
QUERY
,
new
HGKC008
());
Map
map
=
new
HashMap
();
map
.
put
(
HGKC008
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
,
DdynamicEnum
.
WH_RECORD_BOX_BLOCK_ID
),
map
,
false
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
8e7d83bf
...
...
@@ -273,7 +273,7 @@
WHERE
ID = #id#
</update>
<!--查询月累计入库数据-->
<select
id=
"queryList"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC001"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGKC001
...
...
@@ -288,12 +288,18 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountPeriod"
>
LEFT(DEPOSIT_DATE,6) = #accountPeriod#
<isNotEmpty
prepend=
" AND "
property=
"receiveNo"
>
RECEIVE_NO = #receiveNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
DEPOSIT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetail"
>
INVENT_TYPE_DETAIL = #inventTypeDetail#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"submitStatus"
>
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<include
refid=
"orderBy"
/>
</select>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
View file @
8e7d83bf
...
...
@@ -460,6 +460,10 @@
DEP_CODE as "depCode",
<!-- 部门编码 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
PRDT_CODE as "prdtCode",
<!-- 产品编码 -->
PRDT_NAME as "prdtName",
<!-- 产品名称 -->
PRDT_SPEC as "prdtSpec",
<!-- 产品规格 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
SUM(INV_QTY) as "invQty",
<!-- 数量 -->
SUM(INV_WEIGHT) as "invWeight",
<!-- 重量 -->
SUM(AMOUNT) as "amount"
<!-- 金额 -->
...
...
@@ -471,8 +475,8 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
accountPeriod
"
>
LEFT(DEPOSIT_DATE,6) = #accountPeriod
#
<isNotEmpty
prepend=
" AND "
property=
"
createdTimeFrom
"
>
DEPOSIT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo
#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
...
...
@@ -486,7 +490,7 @@
<isEmpty
prepend=
" AND "
property=
"submitStatus"
>
SUBMIT_STATUS = 1
</isEmpty>
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, WH_CODE
GROUP BY ACCOUNT_CODE, DEP_CODE, COMPANY_CODE, WH_CODE
,PRDT_CODE,PRDT_NAME,PRDT_SPEC,INVENT_TYPE_DETAIL
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC004A.xml
View file @
8e7d83bf
...
...
@@ -250,6 +250,8 @@
a.INVENT_RECORD_ID as "inventRecordId",
a.INVENT_TYPE as "inventType",
a.INVENT_CODE AS "inventCode",
a.SPEC as "spec",
a.INVENT_TYPE_DETAIL as "inventTypeDetail",
COALESCE(SUM(a.QUANTITY), 0) AS "quantity",
COALESCE(SUM(a.WEIGHT), 0) AS "weight",
COALESCE(SUM(a.AMOUNT)) as "amount"
...
...
@@ -264,8 +266,8 @@
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
b.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
pr
operty=
" AND "
prepend=
"accountPeriod
"
>
LEFT(b.RECEIPT_DATE,6) = #accountPeriod
#
<isNotEmpty
pr
epend=
" AND "
property=
"createdTimeFrom
"
>
b.RECEIPT_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo
#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetail"
>
a.INVENT_TYPE_DETAIL = #inventTypeDetail#
...
...
@@ -276,7 +278,7 @@
<isEmpty
prepend=
" AND "
property=
"submitStatus"
>
b.STATUS = 1
</isEmpty>
GROUP BY a.ACCOUNT_CODE, a.DEP_CODE, a.COMPANY_CODE, b.WH_CODE, a.INVENT_RECORD_ID, a.INVENT_TYPE, a.INVENT_CODE
GROUP BY a.ACCOUNT_CODE, a.DEP_CODE, a.COMPANY_CODE, b.WH_CODE, a.INVENT_RECORD_ID, a.INVENT_TYPE, a.INVENT_CODE
, a.SPEC,a.INVENT_TYPE_DETAIL
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC005.xml
View file @
8e7d83bf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-06-12 10:57:29
Version : 1.0
schema : hggp
tableName : HGKC005
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
RECEIPT_DATE VARCHAR NOT NULL,
CHECK_NO VARCHAR NOT NULL,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
WH_CODE VARCHAR NOT NULL,
WH_NAME VARCHAR NOT NULL,
INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR,
INVENT_NAME VARCHAR,
INVENT_RECORD_ID BIGINT,
BOOK_AMOUNT DECIMAL,
BOOK_UNIT_WEIGHT DECIMAL,
BOOK_WEIGHT DECIMAL,
ENTITY_AMOUNT DECIMAL,
ENTITY_UNIT_WEIGHT DECIMAL,
ENTITY_WEIGHT DECIMAL,
DIFF_AMOUNT DECIMAL,
DIFF_WEIGHT DECIMAL,
KC_ID BIGINT,
STATUS TINYINT NOT NULL,
REMARK VARCHAR,
OLD_CHECK_NO VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGKC005"
>
<typeAlias
alias=
"HGKC005"
type=
"com.baosight.hggp.hg.kc.domain.HGKC005"
/>
...
...
@@ -137,6 +100,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"submitStatus"
>
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"checkNos"
>
...
...
@@ -160,7 +126,7 @@
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"HGKC005"
>
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
RECEIPT_DATE as "receiptDate",
<!-- 单据日期 -->
...
...
@@ -191,7 +157,8 @@
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 是否删除0.否1.是 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除0.否1.是 -->
SUBMIT_STATUS as "submitStatus"
<!-- 提交状态 -->
FROM ${hggpSchema}.HGKC005 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
...
...
@@ -226,105 +193,6 @@
<include
refid=
"customCondition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookAmount">
BOOK_AMOUNT = #bookAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookUnitWeight">
BOOK_UNIT_WEIGHT = #bookUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="bookWeight">
BOOK_WEIGHT = #bookWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityAmount">
ENTITY_AMOUNT = #entityAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityUnitWeight">
ENTITY_UNIT_WEIGHT = #entityUnitWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="entityWeight">
ENTITY_WEIGHT = #entityWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="diffAmount">
DIFF_AMOUNT = #diffAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="diffWeight">
DIFF_WEIGHT = #diffWeight#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="kcId">
KC_ID = #kcId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="oldCheckNo">
OLD_CHECK_NO = #oldCheckNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC005 (
ACCOUNT_CODE,
<!-- 企业编码 -->
...
...
@@ -357,9 +225,10 @@
UPDATED_BY,
<!-- 更新人 -->
UPDATED_NAME,
<!-- 更新人名称 -->
UPDATED_TIME,
<!-- 更新时间 -->
DELETE_FLAG
<!-- 是否删除0.否1.是 -->
DELETE_FLAG,
<!-- 是否删除0.否1.是 -->
SUBMIT_STATUS
<!-- 提交状态 -->
)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#
, #submitStatus#
)
</insert>
<delete
id=
"delete"
>
...
...
@@ -436,4 +305,17 @@
GROUP BY DEP_CODE, COMPANY_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
<update
id=
"updateSubmitStatus"
>
UPDATE ${hggpSchema}.HGKC005
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
SUBMIT_STATUS = #submitStatus#
<!-- 提交状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
View file @
8e7d83bf
...
...
@@ -377,7 +377,7 @@
A.DEP_CODE as "depCode",
<!-- 部门编码 -->
A.COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
A.COMPANY_NAME as "companyName",
<!-- 公司名称 -->
B.
FIELD_
OTHER_ENTER_DATE as "otherEnterDate",
<!-- 其他入库日期 -->
B.OTHER_ENTER_DATE as "otherEnterDate",
<!-- 其他入库日期 -->
A.OTHER_ENTER_NO as "otherEnterNo",
<!-- 其他入库单号 -->
A.WH_CODE as "whCode",
<!-- 仓库编码 -->
A.WH_NAME as "whName",
<!-- 仓库名称 -->
...
...
@@ -424,8 +424,8 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
otherEnterDate
"
>
LEFT(B.OTHER_ENTER_DATE,6) = #otherEnterDate
#
<isNotEmpty
prepend=
" AND "
property=
"
createdTimeFrom
"
>
B.OTHER_ENTER_DATE BETWEEN #createdTimeFrom# AND #createdTimeTo
#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"otherEnterNo"
>
A.OTHER_ENTER_NO = #otherEnterNo#
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007.xml
View file @
8e7d83bf
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-24 16:31:28
Version : 1.0
schema : hggp
tableName : HGKC007
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
OTHER_OUT_DATE VARCHAR,
OTHER_OUT_NO VARCHAR NOT NULL,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
OTHER_OUT_NO_OLD VARCHAR,
REMARK VARCHAR,
FACTORY_CODE VARCHAR,
PROD_ORDER_NO VARCHAR,
PROD_TASK_NO VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRDT_TYPE TINYINT,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PRDT_LENGTH DECIMAL,
PRDT_WIDTH DECIMAL,
PRDT_THICK DECIMAL,
PRDT_SPEC VARCHAR,
PART_TYPE TINYINT,
PART_CODE VARCHAR,
PART_NAME VARCHAR,
PART_LENGTH DECIMAL,
PART_WIDTH DECIMAL,
PART_THICK DECIMAL,
PART_SPEC VARCHAR,
SUBMIT_STATUS TINYINT,
SOURCE TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGKC007"
>
<sql
id=
"condition"
>
...
...
@@ -169,7 +125,7 @@
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC007"
>
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 记录创建者 -->
...
...
@@ -229,125 +185,6 @@
<update
id=
"check"
>
UPDATE ${hggpSchema}.HGKC007 SET SUBMIT_STATUS = #submitStatus# WHERE ID = #id#
</update>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutDate">
OTHER_OUT_DATE = #otherOutDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNo">
OTHER_OUT_NO = #otherOutNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherOutNoOld">
OTHER_OUT_NO_OLD = #otherOutNoOld#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME = #partName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partLength">
PART_LENGTH = #partLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partWidth">
PART_WIDTH = #partWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partThick">
PART_THICK = #partThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC007 (ID,
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
View file @
8e7d83bf
...
...
@@ -419,8 +419,8 @@
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
A.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
otherOutDate
"
>
B.OTHER_OUT_DATE
= #otherOutDate
#
<isNotEmpty
prepend=
" AND "
property=
"
createdTimeFrom
"
>
B.OTHER_OUT_DATE
BETWEEN #createdTimeFrom# AND #createdTimeTo
#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"otherOutNo"
>
B.OTHER_OUT_NO = #otherOutNo#
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
View file @
8e7d83bf
...
...
@@ -304,8 +304,8 @@
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
A.WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
receiptDate
"
>
B.RECEIPT_DATE
= #receiptDate
#
<isNotEmpty
prepend=
" AND "
property=
"
createdTimeFrom
"
>
B.RECEIPT_DATE
BETWEEN #createdTimeFrom# AND #createdTimeTo
#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"applyCode"
>
B.APPLY_CODE = #applyCode#
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC010.xml
View file @
8e7d83bf
...
...
@@ -142,6 +142,32 @@
<include
refid=
"condition"
/>
</select>
<select
id=
"querySum"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC010"
>
SELECT
ACCOUNT_CODE as "accountCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DELETE_FLAG as "deleteFlag",
<!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
SPEC_ID as "specId",
<!-- 规格ID -->
SPEC as "spec",
<!-- 规格 -->
MATERIAL as "material",
<!-- 材质 -->
UNIT as "unit",
<!-- 单位 -->
INV_QTY as "invQty",
<!-- 库存数量 -->
INV_UNIT_WEIGHT as "invUnitWeight",
<!-- 库存单重 -->
INV_WEIGHT as "invWeight",
<!-- 库存重量 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"orderBy"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC010 (
ACCOUNT_CODE,
<!-- 企业编码 -->
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
8e7d83bf
...
...
@@ -517,6 +517,22 @@ public class HGKCTools {
*/
public
static
class
HgKc005
{
/**
* 库存盘点单信息
*
* @param id
* @return
*/
public
static
HGKC005
getId
(
Long
id
)
{
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
id
),
"库存盘点单id为空!"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"id"
,
id
);
List
<
HGKC005
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC005
.
QUERY
,
paramMap
);
AssertUtils
.
isEmpty
(
list
,
"库存盘点单为空!"
);
return
list
.
get
(
0
);
}
/**
* 锁
*
...
...
@@ -673,6 +689,9 @@ public class HGKCTools {
AssertUtils
.
isEmpty
(
paramMap
,
"时间不能为空"
);
return
DaoBase
.
getInstance
().
query
(
"HGKC007.queryCheckList"
,
paramMap
);
}
}
public
static
class
HgKc007A
{
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005.java
View file @
8e7d83bf
...
...
@@ -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/ServiceHGSC004A.java
View file @
8e7d83bf
...
...
@@ -429,7 +429,6 @@ public class ServiceHGSC004A extends ServiceBase {
public
EiInfo
updateProductStatus
(
EiInfo
inInfo
){
int
i
=
0
;
try
{
HGSC004A
hgsc004a
=
new
HGSC004A
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
String
materialId
=
eiBlock
.
getCellStr
(
ACConstants
.
ROW_CODE_0
,
HGSC004A
.
FIELD_material_id
);
//获取主表信息
...
...
@@ -442,6 +441,7 @@ public class ServiceHGSC004A extends ServiceBase {
List
<
HGSC004A
>
submitEntityList
=
new
LinkedList
<>();
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HGSC004A
hgsc004a
=
new
HGSC004A
();
//前端传参不完全,但是肯定有id
hgsc004a
.
fromMap
(
map
);
Long
id
=
hgsc004a
.
getId
();
...
...
@@ -471,8 +471,11 @@ public class ServiceHGSC004A extends ServiceBase {
});
}
}
hgsc004AList
.
add
(
entity
);
DaoUtils
.
updateBatch
(
HGSC004A
.
UPDATE_PRODUCT_STATUS
,
hgsc004AList
);
//批量勾选时,List中有的则不需要往里放了
HGSC004A
filterEntity
=
hgsc004AList
.
stream
().
filter
(
o
->
o
.
getId
().
compareTo
(
entity
.
getId
())
==
0
).
findAny
().
orElse
(
null
);
if
(
Objects
.
isNull
(
filterEntity
)){
hgsc004AList
.
add
(
entity
);
}
}
//全部提交后的操作,如新增的提交、替换的提交
if
(
hgsc004
.
getMaterialStatus
().
intValue
()
==
HGConstant
.
MaterialStatus
.
QBTJ
){
...
...
@@ -499,7 +502,9 @@ public class ServiceHGSC004A extends ServiceBase {
submitPlanEntity
(
hgsc004
,
true
,
hgsc004AList
);
}
}
hgsc004a
.
setProductStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
hgsc004AList
.
forEach
(
o
->{
o
.
setProductStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
});
DaoUtils
.
updateBatch
(
HGSC004A
.
UPDATE_PRODUCT_STATUS
,
hgsc004AList
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009.java
View file @
8e7d83bf
...
...
@@ -4,9 +4,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cg.domain.HGCG001
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC009
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC009A
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
...
...
@@ -20,6 +24,7 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author ZhangJiHui
...
...
@@ -41,7 +46,7 @@ public class ServiceHGSC009 extends ServiceEPBase {
Map
userCompany
=
HGSBTools
.
getUserCompany
();
qarma
.
put
(
HGSC009
.
FIELD_COMPANY_CODE
,
userCompany
.
get
(
HGSC009
.
FIELD_COMPANY_CODE
));
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
),
qarma
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROJ_RECORD_B
Y_ROLE_B
LOCK_ID
),
qarma
);
qarma
.
clear
();
List
<
String
>
orgIds
=
HGSBTools
.
getRoleCompanyCode
();
...
...
@@ -143,6 +148,9 @@ public class ServiceHGSC009 extends ServiceEPBase {
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgsc009
.
fromMap
(
map
);
// 数据校验
this
.
checkUpdateStatusData
(
hgsc009
);
DaoUtils
.
update
(
HGSC009
.
UPDATE_BLUEPRINT_STATUS
,
hgsc009
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -157,7 +165,20 @@ public class ServiceHGSC009 extends ServiceEPBase {
return
inInfo
;
}
/**
* 校验提交数据
* @param hgsc009
*/
private
void
checkUpdateStatusData
(
HGSC009
hgsc009
)
{
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
->{
HGCG001
hgcg001
=
hgcg001List
.
stream
().
filter
(
c
->
c
.
getMaterialPlanId
().
intValue
()
==
o
.
getId
()).
findAny
().
orElse
(
null
);
AssertUtils
.
isTrue
(
Objects
.
nonNull
(
hgcg001
),
String
.
format
(
"材料计划[%s]已生成采购计划"
,
o
.
getPlanMaterialCode
()));
});
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC009A.java
View file @
8e7d83bf
...
...
@@ -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
.
getById
(
orderDetailIds
);
List
<
HGSC009A
>
hgsc009AList
=
HGSCTools
.
THGSC009
.
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 @
8e7d83bf
...
...
@@ -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,11 +1211,24 @@ 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
<>();
map
.
put
(
"planMaterialCodes"
,
planMaterialCodes
);
List
<
HGSC009A
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC009A
.
QUERYList
,
map
);
AssertUtils
.
isEmpty
(
results
,
"材料明细不能为空!"
);
return
results
;
}
public
static
List
<
HGSC009A
>
getBy
Id
(
String
[]
orderDetailId
){
AssertUtils
.
isTrue
(
Objects
.
isNull
(
orderDetailId
)||
orderDetailId
.
length
<=
0
,
"订单明细ID
不能为空!"
);
public
static
List
<
HGSC009A
>
getBy
PlanMaterialCode
(
String
planMaterialCode
){
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
planMaterialCode
),
"材料计划编码
不能为空!"
);
Map
map
=
new
HashMap
<>();
map
.
put
(
"planMaterialCode
s"
,
orderDetailId
);
map
.
put
(
"planMaterialCode
"
,
planMaterialCode
);
List
<
HGSC009A
>
results
=
DaoBase
.
getInstance
().
query
(
HGSC009A
.
QUERYList
,
map
);
AssertUtils
.
isEmpty
(
results
,
"材料明细不能为空!"
);
return
results
;
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL004.java
View file @
8e7d83bf
...
...
@@ -77,6 +77,7 @@ public class ServiceHGZL004 extends ServiceBase {
DaoUtils
.
update
(
HGZL004
.
UPDATE
,
o
);
break
;
case
PROCESSING:
DaoUtils
.
update
(
HGZL004
.
UPDATE
,
o
);
break
;
case
PROCESSED:
AssertUtils
.
isTrue
(
true
,
String
.
format
(
"检查单号[%s]已处理完成,不能修改!"
));
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
8e7d83bf
...
...
@@ -13,6 +13,7 @@
<sqlMap
resource=
"com/baosight/hggp/hg/xs/sql/HGXSDataAuth.xml"
/>
<!--成本-->
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB001.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB002.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB003.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/cb/sql/HGCB004.xml"
/>
...
...
src/main/webapp/HG/CB/HGCB002.js
View file @
8e7d83bf
...
...
@@ -57,7 +57,7 @@ $(function (){
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
// 判断父级节点是否发生变化
if
(
e
.
field
===
"price"
)
{
let
items
=
e
.
items
[
0
]
;
let
items
=
e
.
items
;
for
(
let
i
=
0
;
i
<
items
.
length
;
i
++
)
{
let
amount
=
items
[
i
].
price
*
items
[
i
].
quantity
;
resultGrid
.
setCellValue
(
e
.
items
[
i
],
"amount"
,
amount
);
...
...
@@ -154,26 +154,28 @@ function showDetail(id) {
JSColorbox
.
open
({
href
:
"HGCB002A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>选择公司</div>"
,
width
:
"
6
0%"
,
height
:
"
60
%"
,
width
:
"
3
0%"
,
height
:
"
45
%"
,
callbackName
:
windowCallback
});
}
function
windowCallback
(
companyCode
)
{
synchData
(
companyCode
);
function
windowCallback
(
item
)
{
synchData
(
item
);
// 关闭弹窗
JSColorbox
.
close
();
// 刷新列表
query
();
}
/**
* 确认
*/
let
synchData
=
function
(
companyCode
)
{
let
synchData
=
function
(
item
)
{
let
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-companyCode"
,
companyCode
);
info
.
set
(
"inqu_status-0-companyCode"
,
item
.
companyCode
);
info
.
set
(
"inqu_status-0-accountYear"
,
item
.
accountYear
);
info
.
set
(
"inqu_status-0-accountPeriod"
,
item
.
accountPeriod
);
info
.
set
(
"inqu_status-0-createdTimeFrom"
,
item
.
accountPeriodDateStart
);
info
.
set
(
"inqu_status-0-createdTimeTo"
,
item
.
accountPeriodDateEnd
);
EiCommunicator
.
send
(
"HGCB002"
,
"select"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
...
...
@@ -182,6 +184,8 @@ let synchData = function (companyCode) {
}
else
{
NotificationUtil
(
ei
);
}
// 刷新列表
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
...
...
src/main/webapp/HG/CB/HGCB002.jsp
View file @
8e7d83bf
...
...
@@ -24,7 +24,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="
status
" cname="业务类型" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="
bizType
" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFSelect>
...
...
@@ -37,7 +37,7 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
<EF:EFComboColumn ename="companyCode" cname="公司名称"
enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
...
...
@@ -45,30 +45,30 @@
<EF:EFOptions blockId="company_code_block_id" textField="companyName" valueField="companyCode"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="
tru
e" align="center" required="true">
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"
required="true"
/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="
fals
e" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgcb.bizType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
enable="false"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="1
2
0" align="center" required="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="1
4
0" align="center" required="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="
tru
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="
tru
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" enable="
tru
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="
fals
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="
fals
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" enable="
fals
e" readonly="true" align="center" required="true"/>
<%--<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>--%>
<EF:EFColumn ename="unit" cname="单位" width="100" enable="
tru
e" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="
tru
e" format="{0:N3}" editType="text"
<EF:EFColumn ename="unit" cname="单位" width="100" enable="
fals
e" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="
fals
e" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
...
...
@@ -76,7 +76,7 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="true" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="
computeType" cname="是否暂估" width="100" enable="tru
e" align="center" required="true">
<EF:EFComboColumn ename="
isEstimate" cname="是否暂估" width="100" enable="fals
e" align="center" required="true">
<EF:EFCodeOption codeName="hggp.common.yesNo"/>
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="120" enable="true" format="{0:N3}" editType="text"
...
...
src/main/webapp/HG/CB/HGCB002A.js
View file @
8e7d83bf
$
(
function
()
{
let
companyCodeBox
=
__eiInfo
.
getBlock
(
"roleCompany"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#CONFIRM"
).
on
(
"click"
,
function
()
{
confirm
();
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
if
(
companyCode
.
length
<
1
)
{
message
(
"请选择公司"
);
return
;
}
let
hgcw001
=
queryHgcw001
(
companyCode
);
let
companyName
;
let
accountPeriod
=
hgcw001
[
0
].
accountPeriod
;
for
(
let
i
=
0
;
i
<
companyCodeBox
.
length
;
i
++
)
{
if
(
companyCodeBox
[
i
].
companyCode
==
hgcw001
[
0
].
companyCode
)
{
companyName
=
companyCodeBox
[
i
].
companyName
;
break
;
}
}
JSUtils
.
confirm
(
"确定要对["
+
companyName
+
" 会计期"
+
accountPeriod
+
"]做
\"
数据同步
\"
操作? "
,
{
ok
:
function
()
{
parent
.
JSColorbox
.
setValueCallback
(
hgcw001
[
0
]);
}
});
});
});
/**
* 确认
*/
let
confirm
=
function
()
{
let
companyCode
=
$
(
"#inqu_status-0-companyCode"
).
val
();
if
(
companyCode
.
length
<
1
)
{
message
(
"请选择公司"
);
return
;
}
parent
.
JSColorbox
.
setValueCallback
(
companyCode
);
let
queryHgcw001
=
function
(
companyCode
){
var
hgcw001_block_id
=
[];
let
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-companyCode"
,
companyCode
);
EiCommunicator
.
send
(
"HGCB002"
,
"selectAll"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
hgcw001_block_id
=
ei
.
getBlock
(
"hgcw001_block_id"
).
getMappedRows
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
},{
async
:
false
});
return
hgcw001_block_id
;
}
\ No newline at end of file
src/main/webapp/HG/CB/HGCB003.js
View file @
8e7d83bf
$
(
function
(){
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"company_code_block_id"
).
getMappedRows
();
var
whCodeBox
=
__eiInfo
.
getBlock
(
"wh_code_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
query
();
})
$
(
"#SYNC"
).
on
(
"click"
,
function
()
{
showDetail
();
});
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
...
...
@@ -37,7 +44,7 @@ $(function (){
exportGrid
:
{
exportFileName
:
function
(
gridInstance
)
{
// 导出的文件名包含时间戳 yyyy-MM-dd HH:mm:ss
return
"原材料
入
库成本核算_"
+
kendo
.
toString
(
new
Date
(),
IPLAT
.
FORMAT
.
DATE_14_PR
);
return
"原材料
出
库成本核算_"
+
kendo
.
toString
(
new
Date
(),
IPLAT
.
FORMAT
.
DATE_14_PR
);
},
exportFileType
:
"xls"
,
// 默认值是xls,可选值为pdf[规划中]
exportBlockId
:
"result"
,
// 默认值和blockId相同,导出的EiInfo中的指定数据块被导出
...
...
@@ -146,27 +153,29 @@ function showDetail(id) {
JSColorbox
.
open
({
href
:
"HGCB002A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>选择公司</div>"
,
width
:
"
6
0%"
,
height
:
"
60
%"
,
width
:
"
3
0%"
,
height
:
"
45
%"
,
callbackName
:
windowCallback
});
}
function
windowCallback
(
companyCode
)
{
synchData
(
companyCode
);
function
windowCallback
(
item
)
{
synchData
(
item
);
// 关闭弹窗
JSColorbox
.
close
();
// 刷新列表
query
();
}
/**
* 确认
*/
let
synchData
=
function
(
companyCode
)
{
let
synchData
=
function
(
item
)
{
let
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-companyCode"
,
companyCode
);
EiCommunicator
.
send
(
"HGCB004"
,
"synchData"
,
info
,
{
info
.
set
(
"inqu_status-0-companyCode"
,
item
.
companyCode
);
info
.
set
(
"inqu_status-0-accountYear"
,
item
.
accountYear
);
info
.
set
(
"inqu_status-0-accountPeriod"
,
item
.
accountPeriod
);
info
.
set
(
"inqu_status-0-createdTimeFrom"
,
item
.
accountPeriodDateStart
);
info
.
set
(
"inqu_status-0-createdTimeTo"
,
item
.
accountPeriodDateEnd
);
EiCommunicator
.
send
(
"HGCB003"
,
"select"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
...
...
@@ -174,6 +183,8 @@ let synchData = function (companyCode) {
}
else
{
NotificationUtil
(
ei
);
}
// 刷新列表
query
();
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
...
...
src/main/webapp/HG/CB/HGCB003.jsp
View file @
8e7d83bf
...
...
@@ -22,11 +22,11 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
Box_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="company
_code_block_id" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="业务类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="h
pjx.hpjx.status
"/>
<EF:EFCodeOption codeName="h
ggp.common.yesNo
"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
...
...
@@ -37,38 +37,38 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<
EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/
>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
<
%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%
>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
Box_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="company
_code_block_id" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="
tru
e" align="center" required="true">
<EF:EFComboColumn ename="bizType" cname="业务类型" width="120" enable="
fals
e" align="center" required="true">
<EF:EFCodeOption codeName="hggp.hgsj.computeType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
enable="false"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" readonly="false" required="true"/>
<EF:EFColumn ename="receiptCode" cname="单据号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
<EF:EFComboColumn ename="whCode" cname="仓库名称"
enable="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_
code
_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="wh_
record
_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="
tru
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="
tru
e" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="
tru
e" width="120" align="center" required="true"
<EF:EFColumn ename="inventCode" cname="存货编码" width="120" enable="
fals
e" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" enable="
fals
e" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="
fals
e" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="unit" cname="单位" width="80" enable="
tru
e" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="
tru
e" format="{0:N3}" editType="text"
<EF:EFColumn ename="unit" cname="单位" width="80" enable="
fals
e" readonly="false" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="
fals
e" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
...
...
@@ -76,8 +76,8 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFComboColumn ename="
computeType" cname="是否暂估" width="80" enable="true" align="center
" required="true">
<EF:EFCodeOption codeName="hggp.
hgsj.computeType
"/>
<EF:EFComboColumn ename="
isEstimate" cname="是否暂估" width="80" enable="false" align="center" hidden="true
" required="true">
<EF:EFCodeOption codeName="hggp.
common.yesNo
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="price" cname="单价" width="100" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
...
...
src/main/webapp/HG/CB/HGCB004.js
View file @
8e7d83bf
$
(
function
(){
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
query
();
})
IPLATUI
.
EFGrid
=
{
"result"
:
{
pageable
:
{
...
...
@@ -97,18 +101,22 @@ function showDetail() {
});
}
function
windowCallback
(
companyCode
)
{
synchData
(
companyCode
);
function
windowCallback
(
item
)
{
synchData
(
item
);
JSColorbox
.
close
();
}
/**
* 确认
*/
let
synchData
=
function
(
companyCode
)
{
let
synchData
=
function
(
item
)
{
let
info
=
new
EiInfo
();
info
.
set
(
"inqu_status-0-companyCode"
,
companyCode
);
EiCommunicator
.
send
(
"HGCB004"
,
"synchData"
,
info
,
{
info
.
set
(
"inqu_status-0-companyCode"
,
item
.
companyCode
);
info
.
set
(
"inqu_status-0-accountYear"
,
item
.
accountYear
);
info
.
set
(
"inqu_status-0-accountPeriod"
,
item
.
accountPeriod
);
info
.
set
(
"inqu_status-0-createdTimeFrom"
,
item
.
accountPeriodDateStart
);
info
.
set
(
"inqu_status-0-createdTimeTo"
,
item
.
accountPeriodDateEnd
);
EiCommunicator
.
send
(
"HGCB004"
,
"select"
,
info
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
==
0
)
{
...
...
src/main/webapp/HG/CB/HGCB004.jsp
View file @
8e7d83bf
...
...
@@ -22,14 +22,15 @@
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company
Box_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="company
_code_block_id" textField="companyName" valueField="companyCode
"/>
</EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="accountPeriod" cname="会计期" colWidth="3"
format="yyyy-MM" depth="year" start="year" required="true"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" colWidth="3" filter="contains">
<
%--<
EF:EFSelect blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</EF:EFSelect>--%>
<EF:EFInput blockId="inqu_status" row="0" ename="whName" cname="仓库名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
...
...
@@ -38,31 +39,33 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="企业编码" hidden="true"/>
<
EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/
>
<
%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>--%
>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="200" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="company
Box_block_id" textField="textField" valueField="valueField
"/>
<EF:EFOptions blockId="company
_code_block_id" textField="companyName" valueField="companyCode
"/>
</EF:EFComboColumn>
<EF:EFColumn ename="accountPeriod" cname="会计期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM" parseFormats="['yyyyMM']"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称"
<
%--<
EF:EFComboColumn ename="whCode" cname="仓库名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" readonly="false" width="140" required="true"
align="center" filter="contains" sort="true">
<EF:EFOptions blockId="wh_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>--%>
<EF:EFColumn ename="whName" cname="仓库名称" width="140" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventCode" cname="物料编码" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFColumn ename="inventName" cname="物料名称" width="120" enable="true" readonly="true" align="center" required="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
<EF:EFColumn ename="spec" cname="规格" width="120" enable="true" readonly="true" align="center" required="true"/>
<%--<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="80" enable="true" readonly="false"
type="hidden
" align="center"/>
</EF:EFComboColumn>
--%>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="80" enable="true" readonly="false"
hidden="true
" align="center"/>
<EF:EFColumn ename="initQuantity" cname="期初数量" width="100" enable="true" format="{0:N0}" editType="text"
displayType="0" sort="true" align="right" maxLength="15" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,15}?$/"
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
8e7d83bf
...
...
@@ -64,34 +64,10 @@ $(function () {
supCodeChange
(
e
);
var
item
=
e
.
items
[
0
];
if
(
e
.
field
==
"price"
)
{
if
(
item
.
purQty
&&
item
.
price
&&
item
.
taxRate
){
// 数量*单价金额
let
totalAmount
=
item
.
purQty
*
item
.
price
;
//税额
let
taxAmount
=
totalAmount
*
item
.
taxRate
/
100
;
//不含税金额
let
amount
=
totalAmount
-
taxAmount
;
//含税金额
let
taxIncludeAmount
=
amount
+
taxAmount
;
resultGrid
.
setCellValue
(
item
,
'taxAmount'
,
taxAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
}
calAmount
(
item
);
}
if
(
e
.
field
==
"taxRate"
)
{
if
(
item
.
purQty
&&
item
.
price
&&
item
.
taxRate
){
// 数量*单价金额
let
totalAmount
=
item
.
purQty
*
item
.
price
;
//税额
let
taxAmount
=
totalAmount
*
item
.
taxRate
/
100
;
//不含税金额
let
amount
=
totalAmount
-
taxAmount
;
//含税金额
let
taxIncludeAmount
=
amount
+
taxAmount
;
resultGrid
.
setCellValue
(
item
,
'taxAmount'
,
taxAmount
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
amount
)
resultGrid
.
setCellValue
(
item
,
'taxIncludeAmount'
,
taxIncludeAmount
)
}
calAmount
(
item
);
}
});
},
...
...
@@ -115,6 +91,47 @@ $(function () {
downKeyUp
();
});
/**
* 计算金额
* @param item
* @param length
* @param width
* @param thick
* @param coefficient
*/
let
calAmount
=
function
(
item
)
{
//原材料
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 @
8e7d83bf
...
...
@@ -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/KC/HGKC002.jsp
View file @
8e7d83bf
...
...
@@ -66,7 +66,7 @@
</EF:EFComboColumn>
<EF:EFColumn
ename=
"applyQty"
cname=
"数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"unitWeight"
cname=
"单重(KG)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"applyWeight"
cname=
"总重(
T
)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"applyWeight"
cname=
"总重(
KG
)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"oldReqNo"
cname=
"原领料单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
src/main/webapp/HG/KC/HGKC003.jsp
View file @
8e7d83bf
...
...
@@ -56,12 +56,12 @@
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
required=
"false"
enable=
"false"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
enable=
"false"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重
(KG)
"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
...
...
src/main/webapp/HG/KC/HGKC003A.jsp
View file @
8e7d83bf
...
...
@@ -38,7 +38,7 @@
hidden=
"true"
/>
<EF:EFColumn
ename=
"unCompleteNum"
cname=
"待入库数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"num"
cname=
"任务数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"任务重量(
T
)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"任务重量(
KG
)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"factoryName"
cname=
"工厂"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"orgName"
cname=
"生产组名称"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"物料编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
...
...
src/main/webapp/HG/KC/HGKC003B.jsp
View file @
8e7d83bf
...
...
@@ -29,8 +29,8 @@
<EF:EFColumn
ename=
"prdtWidth"
cname=
"宽度(MM)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"prdtThick"
cname=
"厚度(MM)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"amount"
cname=
"金额"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
</EF:EFGrid>
...
...
src/main/webapp/HG/KC/HGKC004A.jsp
View file @
8e7d83bf
...
...
@@ -53,7 +53,7 @@
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="100" enable="true" readonly="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="100" enable="true" readonly="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" maxLength="17" required="false" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
...
...
src/main/webapp/HG/KC/HGKC005.js
View file @
8e7d83bf
let
whNameGlobalData
=
[];
let
inventNameGlobalData
=
[];
let
specGlobalData
=
[];
$
(
function
()
{
whNameGlobalData
=
__eiInfo
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
inventNameGlobalData
=
__eiInfo
.
getBlock
(
"invent_record_block_id"
).
getMappedRows
();
specGlobalData
=
__eiInfo
.
getBlock
(
"spec_record_block_id"
).
getMappedRows
();
IPLATUI
.
EFGrid
=
{
pageable
:
{
pageSize
:
20
,
...
...
@@ -21,7 +13,22 @@ $(function() {
// save: true, // 不显示保存按钮
// delete: true, // 显示删除按钮
},*/
columns
:
[{
columns
:
[
{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
let
status
=
item
.
submitStatus
;
let
template
=
''
;
if
(
item
.
id
){
if
(
status
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateSubmitStatus('
+
item
.
id
+
')" >提交</a>'
;
}
}
return
template
;
}
},{
field
:
"receiptDate"
,
attributes
:
{
class
:
"i-input-readonly"
...
...
@@ -29,65 +36,6 @@ $(function() {
defaultValue
:
function
()
{
return
currShortDate
();
}
},
{
field
:
"whCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
whNameGlobalData
.
length
;
i
++
)
{
if
(
whNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'whCode'
])
{
return
whNameGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
inInfo
.
set
(
"serviceName"
,
"HGPZ007"
);
inInfo
.
set
(
"methodName"
,
"queryComboBox"
);
inInfo
.
set
(
"blockId"
,
"wh_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
},
{
field
:
"inventCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
inventNameGlobalData
.
length
;
i
++
)
{
if
(
inventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
return
inventNameGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"queryMaterialComboBox"
);
inInfo
.
set
(
"blockId"
,
"material_record_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
},
{
field
:
"inventRecordId"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
specGlobalData
.
length
;
i
++
)
{
if
(
specGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventRecordId'
])
{
return
specGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"serviceName"
,
"HGPZ005"
);
inInfo
.
set
(
"methodName"
,
"queryComboBoxSpec"
);
inInfo
.
set
(
"blockId"
,
"invent_spec_block_id"
);
inInfo
.
set
(
"field"
,
options
.
field
);
refreshSelect
(
container
,
inInfo
);
}
}],
loadComplete
:
function
(
grid
)
{
},
...
...
@@ -116,67 +64,77 @@ $(function() {
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 仓库名称
//initWh()
// 存货名称
//initInvent()
// 规格
//initSpec()
// 查询
query
();
//存货编号
initInventCode
();
});
/**
* 初始化仓库
* 提交
* @param id
* @param status
*/
let
initWh
=
function
()
{
let
inInfo
=
new
EiInfo
();
// 1.原料,2.耗材,5.废料
inInfo
.
set
(
"inqu_status-0-inventTypes"
,
[
1
,
2
,
5
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
EiCommunicator
.
send
(
"HGPZ007"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
whNameGlobalData
=
ei
.
getBlock
(
"wh_record_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
function
updateSubmitStatus
(
id
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
JSUtils
.
confirm
(
"确定提交此库存盘点单吗? "
,
{
ok
:
function
()
{
EiCommunicator
.
send
(
'HGKC005'
,
'updateSubmitStatus'
,
inEiInfo
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
query
();
}
catch
(
e
)
{
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
}
);
}
},
{
async
:
false
});
});
}
/**
*
初始化存货
*
存货编号
*/
let
initInvent
=
function
()
{
let
inInfo
=
new
EiInfo
();
// 1.原料,2.耗材,5.废料
inInfo
.
set
(
"inqu_status-0-inventTypes"
,
[
1
,
2
,
5
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
let
initInventCode
=
function
()
{
//物料信息下拉
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGPZ005"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventNameGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
let
dataSource
;
var
input
=
$
(
"#inqu_status-0-inventCode"
);
dataSource
=
ei
.
getBlock
(
"invent_record_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"valueField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataSource
,
template
:
"[#:valueField#]#:textField#|#:param2Field#"
,
filter
:
"contains"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
/**
* 初始化规格
*/
let
initSpec
=
function
()
{
let
inInfo
=
new
EiInfo
();
// 1.原料,2.耗材,5.废料
inInfo
.
set
(
"inqu_status-0-inventTypes"
,
[
1
,
2
,
5
]);
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
false
);
EiCommunicator
.
send
(
"HGPZ005"
,
"queryComboBoxAll"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
specGlobalData
=
ei
.
getBlock
(
"invent_all_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
/**
* 查询
...
...
src/main/webapp/HG/KC/HGKC005.jsp
View file @
8e7d83bf
...
...
@@ -28,24 +28,24 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFSelect cname="存货编号" blockId="inqu_status" ename="inventCode" row="0" colWidth="3"
filter="contains" optionLabel="全部" defultValue="" template="[#=valueField#]#=textField#">
<EF:EFOptions blockId="invent_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<%-- <EF:EFSelect cname="规格" ename="inqu_status-0-spec" colWidth="3" filter="contains" defultValue="">--%>
<%-- <EF:EFOption label="全部" value=""/>--%>
<%-- <EF:EFOptions blockId="spec_record_block_id" textField="textField" valueField="valueField"/>--%>
<%-- </EF:EFSelect>--%>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8">
</EF:EFDateSpan>
</div>
<div class="row">
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" colWidth="3"/>
</div>
...
...
@@ -54,6 +54,7 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" width="100" enable="false" readonly="false"/>
<EF:EFColumn ename="checkNo" cname="盘点单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" width="120" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
...
...
@@ -68,28 +69,30 @@
blockName="wh_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" readonly="true" width="120" align="center"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="true" readonly="true" width="120" align="center"
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="bookAmount" cname="账面数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true"
readonly
="true"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(
T
)" enable="false" format="{0:N3}" maxLength="20" width="120"
sumType="all" required="true"
enable
="true"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(
KG
)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
<EF:EFColumn ename="entityAmount" cname="实物数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true"
readonly
="true"/>
<EF:EFColumn ename="entityWeight" cname="实物重量(
T
)" enable="false" format="{0:N3}" maxLength="20" width="120"
sumType="all" required="true"
enable
="true"/>
<EF:EFColumn ename="entityWeight" cname="实物重量(
KG
)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
<EF:EFColumn ename="diffAmount" cname="差异数量" enable="false" format="{0:N0}" maxLength="20" width="120"
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="diffWeight" cname="差异重量(
T
)" enable="false" format="{0:N3}" maxLength="20" width="120"
<EF:EFColumn ename="diffWeight" cname="差异重量(
KG
)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" />
<EF:EFColumn ename="oldCheckNo" cname="原盘点单号" enable="false" hidden="true" width="140" align="center"/>
<EF:EFComboColumn cname="提交状态" ename="submitStatus" width="90" align="center" required="false">
<EF:EFCodeOption codeName="hggp.sc.productStatus" />
</EF:EFComboColumn>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:差异数量=实物数量-账面数量;差异重量=实物重量-账面重量</span>
...
...
src/main/webapp/HG/KC/HGKC005A.js
View file @
8e7d83bf
...
...
@@ -66,7 +66,6 @@ let select = function () {
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
entityAmount
=
rows
[
i
][
'entityAmount'
];
let
amount
=
rows
[
i
][
'amount'
];
if
(
!
isPositiveInteger
(
entityAmount
))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行实物数量必须是大于0的整数"
);
return
;
...
...
src/main/webapp/HG/KC/HGKC005A.jsp
View file @
8e7d83bf
...
...
@@ -51,14 +51,14 @@
blockName=
"spec_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"entityAmount"
cname=
"实物数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
required=
"true
"
/>
<EF:EFColumn
ename=
"entityAmount"
cname=
"实物数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
hidden=
"true"
defaultValue=
"0
"
/>
<EF:EFColumn
ename=
"entityRemark"
cname=
"盘点说明"
width=
"150"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"库存单重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
hidden=
"true"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"库存重量
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"库存单重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
hidden=
"true"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"库存重量
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
hidden=
"true"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
</EF:EFPage>
src/main/webapp/HG/KC/HGKC006A.js
View file @
8e7d83bf
...
...
@@ -21,11 +21,11 @@ $(function () {
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
template
=
inventRecordBoxBlocks
[
i
][
'valueField'
];
return
inventRecordBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
templat
e
;
return
item
.
inventCod
e
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
...
...
@@ -51,11 +51,11 @@ $(function () {
if
(
item
.
partSpec
){
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
partSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
template
=
specBoxBlocks
[
i
][
'valueField'
];
return
specBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
template
;
return
item
.
partSpec
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
...
...
src/main/webapp/HG/KC/HGKC006A.jsp
View file @
8e7d83bf
...
...
@@ -58,12 +58,12 @@
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
required=
"true"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
enable=
"false"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重
(KG)
"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
...
...
src/main/webapp/HG/KC/HGKC007A.jsp
View file @
8e7d83bf
...
...
@@ -49,12 +49,12 @@
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
required=
"true"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
enable=
"false"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:N3}"
...
...
src/main/webapp/HG/KC/HGKC008.js
View file @
8e7d83bf
$
(
function
(){
var
companyCodes
=
__eiInfo
.
getBlock
(
"
companyBox_block_id
"
).
getMappedRows
();
var
projCodes
=
__eiInfo
.
getBlock
(
"proj
_record
_block_id"
).
getMappedRows
();
var
companyCodes
=
__eiInfo
.
getBlock
(
"
roleCompany
"
).
getMappedRows
();
var
projCodes
=
__eiInfo
.
getBlock
(
"proj
RecordByRole
_block_id"
).
getMappedRows
();
var
whRecordBoxBlocks
=
__eiInfo
.
getBlock
(
"wh_record_box_block_id"
).
getMappedRows
();
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
...
...
@@ -42,8 +42,9 @@ $(function (){
field
:
"companyCode"
,
template
:
function
(
dataItem
)
{
for
(
let
i
=
0
;
i
<
companyCodes
.
length
;
i
++
)
{
if
(
companyCodes
[
i
][
'valueField'
]
===
dataItem
[
'companyCode'
]){
return
companyCodes
[
i
][
'textField'
];
if
(
companyCodes
[
i
][
'companyCode'
]
===
dataItem
[
'companyCode'
]){
dataItem
[
'companyName'
]
=
companyCodes
[
i
][
'companyName'
]
return
companyCodes
[
i
][
'companyName'
];
}
}
return
dataItem
[
"companyCode"
];
...
...
@@ -59,7 +60,7 @@ $(function (){
}
}
}
return
templat
e
;
return
item
.
projCod
e
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
...
...
@@ -69,7 +70,7 @@ $(function (){
let
dataSource
;
EiCommunicator
.
send
(
"HGSC003"
,
"projComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"proj
_record
_block_id"
).
getMappedRows
();
dataSource
=
ei
.
getBlock
(
"proj
RecordByRole
_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
...
...
@@ -100,7 +101,7 @@ $(function (){
}
}
}
return
templat
e
;
return
item
.
whCod
e
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
...
...
src/main/webapp/HG/KC/HGKC008A.jsp
View file @
8e7d83bf
...
...
@@ -45,7 +45,7 @@
<EF:EFColumn
ename=
"invWidth"
cname=
"宽度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invThick"
cname=
"厚度(MM)"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
enable=
"true"
required=
"true"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重"
width=
"100"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
width=
"100"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"17"
required=
"false"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
...
...
src/main/webapp/HG/KC/HGKC009.jsp
View file @
8e7d83bf
...
...
@@ -53,39 +53,39 @@
</EF:EFComboColumn>
<EF:EFColumn
ename=
"initAmount"
cname=
"期初数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"initWeight"
cname=
"期初重量(
T
)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"initWeight"
cname=
"期初重量(
KG
)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"cgEnterAmount"
cname=
"采购入库数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"cgEnterWeight"
cname=
"采购入库重量(
T
)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"cgEnterWeight"
cname=
"采购入库重量(
KG
)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtEnterAmount"
cname=
"其它入库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtEnterWeight"
cname=
"其它入库重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"qtEnterWeight"
cname=
"其它入库重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"enterAmount"
cname=
"入库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"enterWeight"
cname=
"入库重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"enterWeight"
cname=
"入库重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"scOuterAmount"
cname=
"生产领料数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"scOuterWeight"
cname=
"生产领料重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"scOuterWeight"
cname=
"生产领料重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtOuterAmount"
cname=
"其它出库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtOuterWeight"
cname=
"其它出库重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"qtOuterWeight"
cname=
"其它出库重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"outerAmount"
cname=
"出库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"outerWeight"
cname=
"出库重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"outerWeight"
cname=
"出库重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"pdDiffAmount"
cname=
"盘点差异数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"pdDiffWeight"
cname=
"盘点差异重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"pdDiffWeight"
cname=
"盘点差异重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"endAmount"
cname=
"期末数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"endWeight"
cname=
"期末重量(
T
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"endWeight"
cname=
"期末重量(
KG
)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/KC/HGKC010.jsp
View file @
8e7d83bf
...
...
@@ -49,8 +49,8 @@
<EF:EFColumn
ename=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"库存总重
(T)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"库存总重
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"unit"
cname=
"单位"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
...
...
src/main/webapp/HG/KC/HGKC011.jsp
View file @
8e7d83bf
...
...
@@ -43,8 +43,8 @@
<EF:EFColumn
ename=
"subInventName"
cname=
"零件名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"unitWeight"
cname=
"单重
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重
(T)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"unitWeight"
cname=
"单重
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"createdBy"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时刻"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
...
...
src/main/webapp/HG/KC/HGKC012.jsp
View file @
8e7d83bf
...
...
@@ -64,7 +64,7 @@
<EF:EFColumn ename="unit" cname="单位" enable="false" width="120" align="center"/>
<EF:EFColumn ename="warnNum" cname="预警值" enable="false" width="90" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="90" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invWeight" cname="库存重量(
T
)" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存重量(
KG
)" enable="false" width="90" align="right" format="{0:N3}"/>
<%--<EF:EFComboColumn ename="princ" cname="仓库负责人" width="120" align="center" enable="false"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" filter="contains" />--%>
...
...
src/main/webapp/HG/KC/HGKC013A.jsp
View file @
8e7d83bf
...
...
@@ -54,7 +54,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
src/main/webapp/HG/SC/HGSC004A.jsp
View file @
8e7d83bf
...
...
@@ -58,11 +58,11 @@
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"quantity"
required=
"true"
cname=
"数量"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(
kg
)"
width=
"100"
enable=
"true"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(
KG
)"
width=
"100"
enable=
"true"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"17"
required=
"true"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"总重(
kg
)"
width=
"100"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
<EF:EFColumn
ename=
"totalWeight"
cname=
"总重(
KG
)"
width=
"100"
enable=
"false"
readonly=
"true"
format=
"{0:N3}"
editType=
"text"
displayType=
"0.000"
sort=
"true"
align=
"right"
maxLength=
"17"
required=
"false"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
...
...
src/main/webapp/HG/SC/HGSC004E.jsp
View file @
8e7d83bf
...
...
@@ -25,8 +25,8 @@
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
width=
"100"
align=
"right"
format=
"{0:N2}"
maxLength=
"10"
enable=
"false"
/>
<EF:EFColumn
ename=
"quantity"
required=
"false"
cname=
"数量"
enable=
"false"
/>
<EF:EFColumn
ename=
"singleWeight"
required=
"false"
format=
"{0:N3}"
cname=
"单重(
kg
)"
enable=
"false"
/>
<EF:EFColumn
enable=
"true"
required=
"false"
format=
"{0:N3}"
ename=
"totalWeight"
cname=
"总重(
kg
)"
/>
<EF:EFColumn
ename=
"singleWeight"
required=
"false"
format=
"{0:N3}"
cname=
"单重(
KG
)"
enable=
"false"
/>
<EF:EFColumn
enable=
"true"
required=
"false"
format=
"{0:N3}"
ename=
"totalWeight"
cname=
"总重(
KG
)"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HG/SC/HGSC005A.jsp
View file @
8e7d83bf
...
...
@@ -38,10 +38,10 @@
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"planEndDate"
cname=
"计划完工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
required=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"计划重量(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishWeight"
cname=
"完成重量(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishWeight"
cname=
"未完成重量(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"计划重量(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishWeight"
cname=
"完成重量(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishWeight"
cname=
"未完成重量(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"计划数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"finishQuantity"
cname=
"完成数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unfinishQuantity"
cname=
"未完成数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC006A.jsp
View file @
8e7d83bf
...
...
@@ -40,10 +40,10 @@
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
/>
<EF:EFColumn
ename=
"planEndDate"
cname=
"计划完工日期"
width=
"120"
enable=
"true"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"订单重量(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignWeight"
cname=
"派工重量(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignWeight"
cname=
"待派工重量(
kg
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"订单重量(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignWeight"
cname=
"派工重量(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignWeight"
cname=
"待派工重量(
KG
)"
format=
"{0:0.00}"
editType=
"text"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"订单数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"assignQuantity"
cname=
"派工数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
<EF:EFColumn
ename=
"unassignQuantity"
cname=
"待派工数量"
width=
"120"
enable=
"true"
align=
"center"
readOnly=
"true"
/>
...
...
src/main/webapp/HG/SC/HGSC006B.jsp
View file @
8e7d83bf
...
...
@@ -25,12 +25,12 @@
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-planEndDate"
cname=
"计划完成日期"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-singleWeight"
cname=
"单量(
kg
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-totalWeight"
cname=
"订单重量(
kg
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-singleWeight"
cname=
"单量(
KG
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-totalWeight"
cname=
"订单重量(
KG
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"detail-0-assignWeight"
cname=
"派工重量(
kg
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unassignWeight"
cname=
"待派工重量(
kg
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-assignWeight"
cname=
"派工重量(
KG
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-unassignWeight"
cname=
"待派工重量(
KG
)"
format=
"{0:0.00}"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"detail-0-quantity"
cname=
"订单数量"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
...
...
src/main/webapp/HG/SC/HGSC007.jsp
View file @
8e7d83bf
...
...
@@ -47,10 +47,10 @@
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产班组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="任务数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishQuantity" cname="完工数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完工数量" width="100" enable="false" readonly="true" align="center"/>
...
...
src/main/webapp/HG/SC/HGSC007A.jsp
View file @
8e7d83bf
...
...
@@ -14,7 +14,7 @@
<EF:EFInput
ename=
"result-0-processName"
cname=
"工序"
colWidth=
"4"
readonly=
"true"
/>
</div>
<div
class=
"row"
>
<EF:EFInput
ename=
"result-0-singleWeight"
cname=
"单重"
colWidth=
"4"
format=
"{0:0.00}"
editType=
"text"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-singleWeight"
cname=
"单重
(KG)
"
colWidth=
"4"
format=
"{0:0.00}"
editType=
"text"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-taskQuantity"
cname=
"任务数量"
format=
"{0:0}"
editType=
"text"
colWidth=
"4"
readonly=
"true"
/>
<EF:EFInput
ename=
"result-0-taskWeight"
cname=
"任务重量"
format=
"{0:0.00}"
editType=
"text"
colWidth=
"4"
readonly=
"true"
/>
</div>
...
...
src/main/webapp/HG/SC/HGSC008.jsp
View file @
8e7d83bf
...
...
@@ -37,8 +37,8 @@
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HG/SC/HGSC009.js
View file @
8e7d83bf
$
(
function
()
{
var
companyCodeBox
=
__eiInfo
.
getBlock
(
"roleCompany"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"proj
_record
_block_id"
).
getMappedRows
();
var
groupCodeBox
=
__eiInfo
.
getBlock
(
"proj
RecordByRole
_block_id"
).
getMappedRows
();
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
...
...
@@ -65,7 +65,7 @@ $(function () {
let
dataSource
;
EiCommunicator
.
send
(
"HGSC003"
,
"projComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"proj
_record
_block_id"
).
getMappedRows
();
dataSource
=
ei
.
getBlock
(
"proj
RecordByRole
_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
...
...
@@ -232,7 +232,7 @@ function INSERTCG() {
});
if
(
flag
)
{
inEiInfo
.
set
(
"planMaterialCodes"
,
ids
.
join
(
','
));
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
生成采购计划
\"
操作? "
,
{
ok
:
function
()
{
EiCommunicator
.
send
(
'HGSC009A'
,
'insertcg'
,
inEiInfo
,
{
onSuccess
(
response
)
{
...
...
src/main/webapp/HG/SC/HGSC009.jsp
View file @
8e7d83bf
...
...
@@ -25,7 +25,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"
checkMode="row"
>
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司编码"
...
...
src/main/webapp/HG/SC/HGSC009A.js
View file @
8e7d83bf
...
...
@@ -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
){
...
...
@@ -31,10 +26,9 @@ $(function () {
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-isSplicingSymbol"
,
true
);
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
();
},
...
...
src/main/webapp/HG/SC/HGSC009A.jsp
View file @
8e7d83bf
...
...
@@ -56,11 +56,11 @@
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重
(KG)
"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
enable=
"false"
/>
<EF:EFColumn
ename=
"grossAmount"
cname=
"总重"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"grossAmount"
cname=
"总重
(KG)
"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
...
...
src/main/webapp/HG/YX/HGYX001A.jsp
View file @
8e7d83bf
...
...
@@ -96,7 +96,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
@@ -111,4 +111,4 @@
<EF:EFButton ename="btn_save_status" cname="保存&提交审核" type="button" class="btn-center"/>
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
</div>
</EF:EFPage>
\ No newline at end of file
</EF:EFPage>
src/main/webapp/HG/YX/HGYX001B.jsp
View file @
8e7d83bf
...
...
@@ -94,14 +94,14 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
</EF:EFPage>
src/main/webapp/HG/YX/HGYX001C.jsp
View file @
8e7d83bf
...
...
@@ -51,11 +51,11 @@
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consUnitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
<EF:EFColumn ename="consUnitWeight" cname="单重
(KG)
" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consWeight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="consWeight" cname="重量
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
src/main/webapp/HG/YX/HGYX002A.jsp
View file @
8e7d83bf
...
...
@@ -93,11 +93,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" hidden="true" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="120" enable="false" format="{0:N3}" hidden="true" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="发货重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="发货重量
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
@@ -105,7 +105,7 @@
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" defaultValue="0" enable="false" readonly="true" format="{0:N3}" editType="number" required="true"/>
<EF:EFColumn ename="returnWeight" cname="退货重量
(KG)
" width="120" defaultValue="0" enable="false" readonly="true" format="{0:N3}" editType="number" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
...
...
src/main/webapp/HG/YX/HGYX002B.jsp
View file @
8e7d83bf
...
...
@@ -83,11 +83,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
@@ -95,7 +95,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="returnWeight" cname="退货重量
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
src/main/webapp/HG/YX/HGYX002C.jsp
View file @
8e7d83bf
...
...
@@ -52,11 +52,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" readonly="true" format="{0:N0}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重
(KG)
" width="120" enable="true" readonly="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量
(KG)
" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
...
...
@@ -64,7 +64,7 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="returnWeight" cname="退货重量" width="120" enable="true" hidden="true" format="{0:N3}" editType="number" required="true"/>
<EF:EFColumn ename="returnWeight" cname="退货重量
(KG)
" width="120" enable="true" hidden="true" format="{0:N3}" editType="number" required="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HG/ZL/HGZL001.jsp
View file @
8e7d83bf
...
...
@@ -5,7 +5,7 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"
质量巡
检单"
>
<EF:EFPage
title=
"
入库质
检单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFDatePicker
cname=
"单据日期"
ename=
"receiptDate"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
...
...
src/main/webapp/HG/ZL/HGZL003A.jsp
View file @
8e7d83bf
...
...
@@ -43,10 +43,10 @@
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="processName" cname="工序" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产班组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="singleWeight" cname="单重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishWeight" cname="完工总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishWeight" cname="未完工总重
(KG)
" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="任务数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="finishQuantity" cname="完工数量" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完工数量" width="100" enable="false" readonly="true" align="center"/>
...
...
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