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
1c027b68
Commit
1c027b68
authored
Jun 24, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
47305ea0
a5e613e5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
219 additions
and
81 deletions
+219
-81
HGCG002.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG002.java
+0
-0
HGCG002A.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG002A.java
+10
-12
HGCG003.java
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG003.java
+0
-0
ServiceHGCG003A.java
...java/com/baosight/hggp/hg/cg/service/ServiceHGCG003A.java
+6
-6
HGCG002.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG002.xml
+18
-2
HGCG003.xml
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003.xml
+11
-1
HGKC001.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC001.java
+40
-1
ServiceHGKC006.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
+10
-6
ServiceHGKC006A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC006A.java
+11
-3
ServiceHGKC007.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
+18
-15
HGKC001.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
+11
-1
ServiceHGPZ005B.java
...java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005B.java
+1
-1
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+31
-0
HGCG002.jsp
src/main/webapp/HG/CG/HGCG002.jsp
+7
-2
HGCG003.jsp
src/main/webapp/HG/CG/HGCG003.jsp
+2
-0
HGCG003A.jsp
src/main/webapp/HG/CG/HGCG003A.jsp
+5
-0
HGKC001.jsp
src/main/webapp/HG/KC/HGKC001.jsp
+2
-0
HGKC007.js
src/main/webapp/HG/KC/HGKC007.js
+6
-2
HGKC007A.js
src/main/webapp/HG/KC/HGKC007A.js
+29
-28
HGPZ004.jsp
src/main/webapp/HG/PZ/HGPZ004.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG002.java
View file @
1c027b68
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG002A.java
View file @
1c027b68
package
com
.
baosight
.
hggp
.
hg
.
cg
.
domain
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
com.baosight.iplat4j.core.util.StringUtils
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
...
...
@@ -20,10 +18,10 @@ import java.util.Map;
* @history 2024-05-09 15:41:54 create
*/
public
class
HGCG002A
extends
HGCG002
{
public
static
final
String
FIELD_BC_RECEIVE_QTY
=
"bcReceiveQty"
;
/* 本次收货数量*/
public
static
final
String
FIELD_BC_MAX_RECEIVE_QTY
=
"bcMaxReceiveQty"
;
/* 本次最大收货数量*/
private
BigDecimal
bcReceiveQty
=
new
BigDecimal
(
0.000
);
/* 本次收货数量*/
private
BigDecimal
bcMaxReceiveQty
=
new
BigDecimal
(
0.000
);
/* 本次最大收货数量*/
...
...
@@ -32,14 +30,14 @@ public class HGCG002A extends HGCG002 {
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_BC_RECEIVE_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"本次收货数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_BC_MAX_RECEIVE_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
...
...
@@ -56,23 +54,23 @@ public class HGCG002A extends HGCG002 {
super
.
initMetaData
();
initMetaData
();
}
public
BigDecimal
getBcReceiveQty
()
{
return
bcReceiveQty
;
}
public
void
setBcReceiveQty
(
BigDecimal
bcReceiveQty
)
{
this
.
bcReceiveQty
=
bcReceiveQty
;
}
public
BigDecimal
getBcMaxReceiveQty
()
{
return
bcMaxReceiveQty
;
}
public
void
setBcMaxReceiveQty
(
BigDecimal
bcMaxReceiveQty
)
{
this
.
bcMaxReceiveQty
=
bcMaxReceiveQty
;
}
/**
* get the value from Map.
*
...
...
@@ -83,7 +81,7 @@ public class HGCG002A extends HGCG002 {
super
.
fromMap
(
map
);
setBcReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_RECEIVE_QTY
)),
bcReceiveQty
));
setBcMaxReceiveQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_BC_MAX_RECEIVE_QTY
)),
bcMaxReceiveQty
));
}
/**
...
...
src/main/java/com/baosight/hggp/hg/cg/domain/HGCG003.java
View file @
1c027b68
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG003A.java
View file @
1c027b68
...
...
@@ -32,7 +32,7 @@ import java.util.Map;
* @date:2024/5/9,11:04
*/
public
class
ServiceHGCG003A
extends
ServiceBase
{
/**
* 画面初始化
*
...
...
@@ -53,7 +53,7 @@ public class ServiceHGCG003A extends ServiceBase {
}
return
inInfo
;
}
/**
* 查询操作
*
...
...
@@ -74,7 +74,7 @@ public class ServiceHGCG003A extends ServiceBase {
}
return
inInfo
;
}
/**
* 确认操作.
*
...
...
@@ -99,7 +99,7 @@ public class ServiceHGCG003A extends ServiceBase {
}
return
inInfo
;
}
/**
* 数据校验
*
...
...
@@ -119,7 +119,7 @@ public class ServiceHGCG003A extends ServiceBase {
fCg002A
.
getBcReceiveQty
(),
dbCg002A
.
getBcMaxReceiveQty
()));
}
}
/**
* 数据保存
*
...
...
@@ -143,5 +143,5 @@ public class ServiceHGCG003A extends ServiceBase {
HGCGTools
.
HgCg002
.
updateReceive
(
dbCg002A
,
fCg002A
.
getBcReceiveQty
());
}
}
}
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG002.xml
View file @
1c027b68
...
...
@@ -37,6 +37,11 @@
PUR_WEIGHT as "purWeight",
<!-- 采购重量 -->
RECEIVE_QTY as "receiveQty",
<!-- 收货数量 -->
RECEIVE_WEIGHT as "receiveWeight",
<!-- 收货重量 -->
PRICE as "price",
<!-- 单价 -->
AMOUNT as "amount",
<!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT as "taxIncludeAmount",
<!-- 含税金额 -->
TAX_AMOUNT as "taxAmount",
<!-- 税额 -->
TAX_RATE as "taxRate",
<!-- 税率 -->
STATUS as "status",
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
AUDIT_TIME as "auditTime",
<!-- 审核时间 -->
AUDIT_USER_ID as "auditUserId",
<!-- 审核人ID -->
...
...
@@ -187,13 +192,19 @@
PUR_QTY,
<!-- 采购数量 -->
PUR_UNIT_WEIGHT,
<!-- 采购单重 -->
PUR_WEIGHT,
<!-- 采购重量 -->
STATUS
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
STATUS,
<!-- 状态:0-未审批,1-审核通过,2-审核未通过 -->
PRICE,
<!-- 单价 -->
AMOUNT,
<!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT,
<!-- 含税金额 -->
TAX_AMOUNT,
<!-- 税额 -->
TAX_RATE
<!-- 税率 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #contractDate#, #contractNo#, #planNo#,
#supCode#, #supName#, #purUserId#, #purUserName#, #inventCode#, #inventName#,
#specId#, #spec#, #material#, #unit#, #length#, #width#, #thick#,
#purQty#, #purUnitWeight#, #purWeight#, #status#
#purQty#, #purUnitWeight#, #purWeight#, #status#,
#price#, #amount#, #taxIncludeAmount#, #taxAmount#, #taxRate#
)
</insert>
...
...
@@ -221,6 +232,11 @@
SUP_NAME = #supName#,
<!-- 供应商名称 -->
PUR_USER_ID = #purUserId#,
<!-- 采购员 -->
PUR_USER_NAME = #purUserName#,
<!-- 采购员名称 -->
PRICE = #price#,
<!-- 单价 -->
AMOUNT = #amount#,
<!-- 金额(不含税金额) -->
TAX_INCLUDE_AMOUNT = #taxIncludeAmount#,
<!-- 含税金额 -->
TAX_AMOUNT = #taxAmount#,
<!-- 税额 -->
TAX_RATE = #taxRate#,
<!-- 税率 -->
<include
refid=
"updateRevise"
/>
WHERE CONTRACT_NO = #contractNo#
</update>
...
...
src/main/java/com/baosight/hggp/hg/cg/sql/HGCG003.xml
View file @
1c027b68
...
...
@@ -38,6 +38,8 @@
DEPOSIT_QTY as "depositQty",
<!-- 入库数量 -->
RECEIVE_UNIT_WEIGHT as "receiveUnitWeight",
<!-- 收货单重 -->
RECEIVE_WEIGHT as "receiveWeight",
<!-- 收货重量 -->
PRICE as "price",
<!-- 单价 -->
AMOUNT as "amount",
<!-- 金额 -->
STATUS as "status"
<!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
</sql>
...
...
@@ -94,6 +96,12 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"price"
>
PRICE = #price#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
AMOUNT = #amount#
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
...
...
@@ -175,6 +183,8 @@
RECEIVE_QTY,
<!-- 收货数量 -->
RECEIVE_UNIT_WEIGHT,
<!-- 收货单重 -->
RECEIVE_WEIGHT,
<!-- 收货重量 -->
PRICE,
<!-- 单价 -->
AMOUNT,
<!-- 金额 -->
STATUS
<!-- 状态:0-已收货,1-已入库,2-部分入库,3-退货 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
...
...
@@ -182,7 +192,7 @@
#planNo#, #contractNo#, #supCode#, #supName#, #purUserId#, #purUserName#,
#inventType#, #inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #receiveQty#, #receiveUnitWeight#,
#receiveWeight#, #status#
#receiveWeight#,
#price#, #amount#,
#status#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC001.java
View file @
1c027b68
...
...
@@ -57,7 +57,8 @@ public class HGKC001 extends DaoEPBase {
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
FIELD_STORAGE_TYPE
=
"storageType"
;
/* 入库类型:1:入库 2:退回*/
public
static
final
String
FIELD_IS_RETURN
=
"isReturn"
;
/* 是否退回*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -95,6 +96,8 @@ public class HGKC001 extends DaoEPBase {
public
static
final
String
COL_SUBMIT_STATUS
=
"SUBMIT_STATUS"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
COL_STORAGE_TYPE
=
"STORAGE_TYPE"
;
/* 入库类型:1:入库 2:退回*/
public
static
final
String
COL_IS_RETURN
=
"IS_RETURN"
;
/* 是否退回*/
public
static
final
String
COL_PRICE
=
"PRICE"
;
/* 单价*/
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
QUERY
=
"HGKC001.query"
;
...
...
@@ -141,6 +144,8 @@ public class HGKC001 extends DaoEPBase {
private
Integer
submitStatus
;
/* 提交状态 0未提交,1已提交*/
private
Integer
storageType
;
/* 入库类型:1:入库 2:退回*/
private
Integer
isReturn
;
/* 是否退回:0:否 1:是*/
private
BigDecimal
price
=
new
BigDecimal
(
0.000
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
0.000
);
/* 金额*/
/**
* initialize the metadata.
...
...
@@ -306,6 +311,20 @@ public class HGKC001 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_IS_RETURN
);
eiColumn
.
setDescName
(
"是否退回:0:否 1:是"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRICE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"单价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -852,6 +871,22 @@ public class HGKC001 extends DaoEPBase {
this
.
isReturn
=
isReturn
;
}
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
/**
* get the value from Map.
*
...
...
@@ -895,6 +930,8 @@ public class HGKC001 extends DaoEPBase {
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setStorageType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STORAGE_TYPE
)),
storageType
));
setIsReturn
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_RETURN
)),
isReturn
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
}
/**
...
...
@@ -939,6 +976,8 @@ public class HGKC001 extends DaoEPBase {
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_STORAGE_TYPE
,
StringUtils
.
toString
(
storageType
,
eiMetadata
.
getMeta
(
FIELD_STORAGE_TYPE
)));
map
.
put
(
FIELD_IS_RETURN
,
StringUtils
.
toString
(
isReturn
,
eiMetadata
.
getMeta
(
FIELD_IS_RETURN
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
View file @
1c027b68
...
...
@@ -91,9 +91,9 @@ public class ServiceHGKC006 extends ServiceBase {
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC006
hgkc006
=
new
HGKC006
();
hgkc006
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgkc006
.
fromMap
(
resultRow
);
hgkc006
.
setOtherEnterDate
(
DateUtils
.
formatShort
(
hgkc006
.
getOtherEnterDate
()));
if
(
hgkc006
.
getId
()
==
null
||
hgkc006
.
getId
()
==
0
)
{
this
.
add
(
hgkc006
);
...
...
@@ -176,7 +176,7 @@ public class ServiceHGKC006 extends ServiceBase {
for
(
HGKC006A
hgkc006A
:
hgkc006AList
){
//增加库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc006A
.
getCompanyCode
(),
hgkc006A
.
getWhCode
(),
hgkc006A
.
get
Par
tCode
(),
hgkc006A
.
getInvQty
(),
hgkc006A
.
get
Inven
tCode
(),
hgkc006A
.
getInvQty
(),
hgkc006A
.
getInvUnitWeight
(),
hgkc006A
.
getInvWeight
());
}
}
...
...
@@ -200,12 +200,16 @@ public class ServiceHGKC006 extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"其他入库单"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC006
hgkc006
=
new
HGKC006
();
hgkc006
.
fromMap
(
resultRows
.
get
(
i
));
hgkc006
.
fromMap
(
resultRow
);
if
(
hgkc006
.
getSubmitStatus
()
==
1
)
{
throw
new
PlatException
(
"入库单已提交,无法删除!"
);
}
// 校验企业下是否存在用户
int
count
=
HGXSTools
.
XsUser
.
countByAccount
(
hgkc006
.
getAccountCode
());
if
(
count
>
0
)
{
...
...
@@ -217,7 +221,7 @@ public class ServiceHGKC006 extends ServiceBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
修改
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
删除
失败"
);
}
return
inInfo
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006A.java
View file @
1c027b68
...
...
@@ -90,6 +90,9 @@ public class ServiceHGKC006A extends ServiceBase {
hgkc006a
.
fromMap
(
resultMap
);
//查询主单
HGKC006
hgkc006
=
HGKCTools
.
HgKc006
.
getById
(
hgkc006a
.
getPrimaryId
());
if
(
hgkc006
.
getSubmitStatus
()
==
1
){
throw
new
PlatException
(
"入库单已提交,添加保存失败!"
);
}
this
.
checkSaveData
(
hgkc006a
,
hgkc006
);
this
.
setData
(
hgkc006a
,
hgkc006
);
if
(
Objects
.
nonNull
(
hgkc006a
.
getId
())&&
hgkc006a
.
getId
()!=
0
){
...
...
@@ -135,19 +138,24 @@ public class ServiceHGKC006A extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"其他入库单明细"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
String
submitStatus
=
inInfo
.
getCellStr
(
EiConstant
.
resultBlock
,
ACConstants
.
ROW_CODE_0
,
HGKC006
.
FIELD_SUBMIT_STATUS
);
if
(
Objects
.
nonNull
(
submitStatus
)&&
submitStatus
.
equals
(
"1"
)){
throw
new
PlatException
(
"入库单已提交,删除失败!"
);
}
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC006A
hgkc006A
=
new
HGKC006A
();
hgkc006A
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgkc006A
.
fromMap
(
resultRow
);
DaoUtils
.
update
(
HGKC006A
.
DELETE
,
hgkc006A
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
修改
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
删除
失败"
);
}
return
inInfo
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
View file @
1c027b68
...
...
@@ -95,9 +95,9 @@ public class ServiceHGKC007 extends ServiceBase {
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC007
hgkc007
=
new
HGKC007
();
hgkc007
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgkc007
.
fromMap
(
resultRow
);
hgkc007
.
setOtherOutDate
(
DateUtils
.
formatShort
(
hgkc007
.
getOtherOutDate
()));
if
(
hgkc007
.
getId
()
==
null
||
hgkc007
.
getId
()
==
0
)
{
hgkc007
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
...
...
@@ -122,9 +122,9 @@ public class ServiceHGKC007 extends ServiceBase {
*/
private
void
checkSaveData
(
List
<
Map
>
resultRows
)
{
// 数据校验
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC007
hgkc007
=
new
HGKC007
();
hgkc007
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgkc007
.
fromMap
(
resultRow
);
AssertUtils
.
isNull
(
hgkc007
.
getSubmitStatus
(),
"是否启用不能为空"
);
}
}
...
...
@@ -176,8 +176,7 @@ public class ServiceHGKC007 extends ServiceBase {
BigDecimal
invWeight
=
hgkc007A
.
getInvWeight
().
multiply
(
new
BigDecimal
(-
1
));
//减少库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc007A
.
getCompanyCode
(),
hgkc007A
.
getWhCode
(),
hgkc007A
.
getPartCode
(),
qty
,
invUnitWeight
,
invWeight
);
hgkc007A
.
getInventCode
(),
qty
,
invUnitWeight
,
invWeight
);
}
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -185,9 +184,8 @@ public class ServiceHGKC007 extends ServiceBase {
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"提交失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"提交失败!"
,
e
.
getMessage
());
return
eiInfo
;
LogUtils
.
setDetailMsg
(
eiInfo
,
e
,
"提交失败"
)
;
}
return
eiInfo
;
}
...
...
@@ -206,9 +204,9 @@ public class ServiceHGKC007 extends ServiceBase {
// 数据校验
this
.
checkSaveData
(
resultRows
);
// 数据写入
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC007
hgkc007
=
new
HGKC007
();
hgkc007
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hgkc007
.
fromMap
(
resultRow
);
this
.
add
(
hgkc007
);
}
inInfo
=
this
.
query
(
inInfo
);
...
...
@@ -228,14 +226,15 @@ public class ServiceHGKC007 extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"其他出库单"
,
operType
=
"修改"
,
operDesc
=
"修改操作"
)
@Override
public
EiInfo
update
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据校验
this
.
checkSaveData
(
resultRows
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC007
hppz009
=
new
HGKC007
();
hppz009
.
fromMap
(
resultRow
s
.
get
(
i
)
);
hppz009
.
fromMap
(
resultRow
);
DaoUtils
.
update
(
HGKC007
.
UPDATE
,
hppz009
);
}
inInfo
=
this
.
query
(
inInfo
);
...
...
@@ -254,12 +253,16 @@ public class ServiceHGKC007 extends ServiceBase {
* @return
*/
@OperationLogAnnotation
(
operModul
=
"其他出库单"
,
operType
=
"删除"
,
operDesc
=
"删除操作"
)
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++
)
{
for
(
Map
resultRow
:
resultRows
)
{
HGKC007
hgkc007
=
new
HGKC007
();
hgkc007
.
fromMap
(
resultRows
.
get
(
i
));
hgkc007
.
fromMap
(
resultRow
);
if
(
hgkc007
.
getSubmitStatus
()
==
1
)
{
throw
new
PlatException
(
"出库单已提交,删除失败!"
);
}
// 校验企业下是否存在用户
int
count
=
HGXSTools
.
XsUser
.
countByAccount
(
hgkc007
.
getAccountCode
());
if
(
count
>
0
)
{
...
...
@@ -271,7 +274,7 @@ public class ServiceHGKC007 extends ServiceBase {
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据删除成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
修改
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
删除
失败"
);
}
return
inInfo
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
1c027b68
...
...
@@ -37,6 +37,8 @@
DEPOSIT_WEIGHT as "depositWeight",
<!-- 入库重量 -->
STORAGE_TYPE as "storageType",
<!-- 入库类型:1:入库 2:退回 -->
IS_RETURN as "isReturn",
<!-- 是否退回:0:否 1:是 -->
PRICE as "price",
<!-- 单价 -->
AMOUNT as "amount",
<!-- 金额 -->
SUBMIT_STATUS as "submitStatus"
<!-- 提交状态 -->
</sql>
...
...
@@ -105,6 +107,12 @@
<isNotEmpty
prepend=
" AND "
property=
"storageType"
>
STORAGE_TYPE = #storageType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"price"
>
PRICE = #price#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
AMOUNT = #amount#
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
...
...
@@ -188,6 +196,8 @@
DEPOSIT_WEIGHT,
<!-- 入库重量 -->
STORAGE_TYPE,
<!-- 入库类型:1:入库 2:退回 -->
IS_RETURN,
<!-- 是否退回:0:否 1:是 -->
PRICE,
<!-- 单价 -->
AMOUNT,
<!-- 金额 -->
SUBMIT_STATUS
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
...
...
@@ -195,7 +205,7 @@
#receiveNo#, #planNo#, #contractNo#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #depositQty#, #depositUnitWeight#, #depositWeight#,
#storageType#, #isReturn#,#submitStatus#
#storageType#, #isReturn#,#
price#, #amount#,#
submitStatus#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/pz/service/ServiceHGPZ005B.java
View file @
1c027b68
...
...
@@ -44,7 +44,7 @@ public class ServiceHGPZ005B extends ServiceEPBase {
String
userId
=
"admin"
.
equals
(
UserSessionUtils
.
getUserId
())?
""
:
UserSessionUtils
.
getUserId
();
inInfo
=
super
.
query
(
inInfo
,
HGSJ002
.
QUERY
,
new
HGSJ002
());
Map
qarma
=
new
HashMap
();
qarma
.
put
(
User
.
FIELD_USER_ID
,
userId
);
//
qarma.put(User.FIELD_USER_ID,userId);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
qarma
);
return
inInfo
;
}
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
1c027b68
...
...
@@ -14,6 +14,37 @@ $(function () {
// change事件
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
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
)
}
}
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
)
}
}
});
},
onSave
:
function
(
e
)
{
...
...
src/main/webapp/HG/CG/HGCG002.jsp
View file @
1c027b68
...
...
@@ -65,9 +65,14 @@
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"purQty"
cname=
"采购数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"purQty"
cname=
"采购数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
enable=
"false"
/>
<EF:EFColumn
ename=
"purWeight"
cname=
"采购重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"receiveQty"
cname=
"已收货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"taxRate"
cname=
"税率(%)"
width=
"80"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"amount"
cname=
"不含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxAmount"
cname=
"税额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxIncludeAmount"
cname=
"含税金额"
enable=
"false"
width=
"80"
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=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
...
...
src/main/webapp/HG/CG/HGCG003.jsp
View file @
1c027b68
...
...
@@ -65,6 +65,8 @@
<EF:EFColumn
ename=
"deliverQty"
cname=
"退货数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"depositQty"
cname=
"入库数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"receiveWeight"
cname=
"收货重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"amount"
cname=
"金额"
enable=
"false"
width=
"80"
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=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
...
...
src/main/webapp/HG/CG/HGCG003A.jsp
View file @
1c027b68
...
...
@@ -70,6 +70,11 @@
<EF:EFOptions
blockId=
"sup_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"taxRate"
cname=
"税率(%)"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"amount"
cname=
"不含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxAmount"
cname=
"税额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"taxIncludeAmount"
cname=
"含税金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
...
...
src/main/webapp/HG/KC/HGKC001.jsp
View file @
1c027b68
...
...
@@ -69,6 +69,8 @@
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"80"
align=
"right"
format=
"{0:N3}"
enable=
"false"
/>
<EF:EFColumn
ename=
"amount"
cname=
"金额"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<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']"
/>
...
...
src/main/webapp/HG/KC/HGKC007.js
View file @
1c027b68
...
...
@@ -134,8 +134,12 @@ function check(id, auditStatus) {
inEiInfo
.
set
(
"result-0-submitStatus"
,
auditStatus
);
EiCommunicator
.
send
(
'HGKC007'
,
'check'
,
inEiInfo
,
{
onSuccess
(
response
)
{
message
(
"提交成功"
);
resultGrid
.
dataSource
.
page
(
1
);
if
(
response
.
getStatus
()
===
-
1
)
{
NotificationUtil
({
msg
:
response
.
msg
,
detailMsg
:
response
.
detailMsg
},
"error"
);
}
else
{
NotificationUtil
(
response
.
msg
);
query
();
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
...
...
src/main/webapp/HG/KC/HGKC007A.js
View file @
1c027b68
...
...
@@ -12,37 +12,38 @@ $(function () {
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
30
,
50
,
100
,
200
],
},
columns
:
[{
field
:
"inventCode"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
item
.
inventName
=
inventRecordBoxBlocks
[
i
][
'textField'
];
template
=
inventRecordBoxBlocks
[
i
][
'valueField'
];
columns
:
[
{
field
:
"inventCode"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
item
.
inventName
=
inventRecordBoxBlocks
[
i
][
'textField'
];
template
=
inventRecordBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
inventRecordBoxBlocks
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
valueTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
template
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
filter
:
"contains"
});
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
inventRecordBoxBlocks
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
valueTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
template
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
filter
:
"contains"
});
}
},
{
field
:
"partSpec"
,
template
:
function
(
item
)
{
...
...
@@ -215,7 +216,7 @@ $(function () {
*/
$
(
window
).
load
(
function
()
{
query
();
let
submitStatus
=
$
(
"#inqu_status
_0_
submitStatus"
).
val
();
let
submitStatus
=
$
(
"#inqu_status
-0-
submitStatus"
).
val
();
let
source
=
$
(
"#inqu_status-0-source"
).
val
();
//只有手动录入的才能修改
if
(
submitStatus
==
1
||
source
!=
"1"
){
...
...
src/main/webapp/HG/PZ/HGPZ004.jsp
View file @
1c027b68
...
...
@@ -18,7 +18,7 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
cname=
"类型编码"
ename=
"inventType"
enable=
"true"
width=
"120"
readonly=
"true"
align=
"center"
/>
<EF:EFColumn
cname=
"类型编码"
ename=
"inventType"
enable=
"true"
width=
"120"
readonly=
"true"
align=
"center"
required=
"true"
/>
<EF:EFColumn
cname=
"存货类型"
ename=
"inventTypeName"
width=
"140"
align=
"center"
required=
"true"
/>
<EF:EFComboColumn
ename=
"inventTypeDetail"
cname=
"存货类型明细"
width=
"80"
align=
"center"
readonly=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hgpz.inventTypeDetail"
/>
...
...
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