Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
1dc95653
Commit
1dc95653
authored
Jan 17, 2019
by
cjl
Browse files
1、修改double类型为BigDecimal
2、修复sql中大于小于少&出错的问题
parents
6abe4bc8
4afc188b
Changes
61
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4StatementAccount.java
View file @
1dc95653
package
com.jsh.erp.datasource.vo
;
public
class
DepotHeadVo4StatementAccount
{
private
String
number
;
private
String
type
;
private
Double
discountLastMoney
;
private
Double
changeAmount
;
private
Double
allPrice
;
private
String
supplierName
;
private
String
oTime
;
public
String
getNumber
()
{
return
number
;
}
public
void
setNumber
(
String
number
)
{
this
.
number
=
number
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
Double
getDiscountLastMoney
()
{
return
discountLastMoney
;
}
public
void
setDiscountLastMoney
(
Double
discountLastMoney
)
{
this
.
discountLastMoney
=
discountLastMoney
;
}
public
Double
getChangeAmount
()
{
return
changeAmount
;
}
public
void
setChangeAmount
(
Double
changeAmount
)
{
this
.
changeAmount
=
changeAmount
;
}
public
Double
getAllPrice
()
{
return
allPrice
;
}
public
void
setAllPrice
(
Double
allPrice
)
{
this
.
allPrice
=
allPrice
;
}
public
String
getSupplierName
()
{
return
supplierName
;
}
public
void
setSupplierName
(
String
supplierName
)
{
this
.
supplierName
=
supplierName
;
}
public
String
getoTime
()
{
return
oTime
;
}
public
void
setoTime
(
String
oTime
)
{
this
.
oTime
=
oTime
;
}
package
com.jsh.erp.datasource.vo
;
import
java.math.BigDecimal
;
public
class
DepotHeadVo4StatementAccount
{
private
String
number
;
private
String
type
;
private
BigDecimal
discountLastMoney
;
private
BigDecimal
changeAmount
;
private
BigDecimal
allPrice
;
private
String
supplierName
;
private
String
oTime
;
public
String
getNumber
()
{
return
number
;
}
public
void
setNumber
(
String
number
)
{
this
.
number
=
number
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
BigDecimal
getDiscountLastMoney
()
{
return
discountLastMoney
;
}
public
void
setDiscountLastMoney
(
BigDecimal
discountLastMoney
)
{
this
.
discountLastMoney
=
discountLastMoney
;
}
public
BigDecimal
getChangeAmount
()
{
return
changeAmount
;
}
public
void
setChangeAmount
(
BigDecimal
changeAmount
)
{
this
.
changeAmount
=
changeAmount
;
}
public
BigDecimal
getAllPrice
()
{
return
allPrice
;
}
public
void
setAllPrice
(
BigDecimal
allPrice
)
{
this
.
allPrice
=
allPrice
;
}
public
String
getSupplierName
()
{
return
supplierName
;
}
public
void
setSupplierName
(
String
supplierName
)
{
this
.
supplierName
=
supplierName
;
}
public
String
getoTime
()
{
return
oTime
;
}
public
void
setoTime
(
String
oTime
)
{
this
.
oTime
=
oTime
;
}
}
\ No newline at end of file
src/main/java/com/jsh/erp/service/account/AccountService.java
View file @
1dc95653
package
com.jsh.erp.service.account
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jsh.erp.datasource.entities.*
;
import
com.jsh.erp.datasource.mappers.AccountHeadMapper
;
...
...
@@ -19,6 +18,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -56,13 +56,13 @@ public class AccountService {
if
(
null
!=
list
&&
null
!=
timeStr
)
{
for
(
AccountVo4List
al
:
list
)
{
DecimalFormat
df
=
new
DecimalFormat
(
".##"
);
Double
thisMonthAmount
=
getAccountSum
(
al
.
getId
(),
timeStr
,
"month"
)
+
getAccountSumByHead
(
al
.
getId
(),
timeStr
,
"month"
)
+
getAccountSumByDetail
(
al
.
getId
(),
timeStr
,
"month"
)
+
getManyAccountSum
(
al
.
getId
(),
timeStr
,
"month"
);
BigDecimal
thisMonthAmount
=
getAccountSum
(
al
.
getId
(),
timeStr
,
"month"
)
.
add
(
getAccountSumByHead
(
al
.
getId
(),
timeStr
,
"month"
)
).
add
(
getAccountSumByDetail
(
al
.
getId
(),
timeStr
,
"month"
)
).
add
(
getManyAccountSum
(
al
.
getId
(),
timeStr
,
"month"
)
)
;
String
thisMonthAmountFmt
=
"0"
;
if
(
thisMonthAmount
!=
0
)
{
if
(
(
thisMonthAmount
.
compareTo
(
BigDecimal
.
ZERO
))
!=
0
)
{
thisMonthAmountFmt
=
df
.
format
(
thisMonthAmount
);
}
al
.
setThismonthamount
(
thisMonthAmountFmt
);
//本月发生额
Double
currentAmount
=
getAccountSum
(
al
.
getId
(),
""
,
"month"
)
+
getAccountSumByHead
(
al
.
getId
(),
""
,
"month"
)
+
getAccountSumByDetail
(
al
.
getId
(),
""
,
"month"
)
+
getManyAccountSum
(
al
.
getId
(),
""
,
"month"
)
+
al
.
getInitialamount
();
BigDecimal
currentAmount
=
getAccountSum
(
al
.
getId
(),
""
,
"month"
)
.
add
(
getAccountSumByHead
(
al
.
getId
(),
""
,
"month"
)
).
add
(
getAccountSumByDetail
(
al
.
getId
(),
""
,
"month"
)
).
add
(
getManyAccountSum
(
al
.
getId
(),
""
,
"month"
)
)
.
add
(
al
.
getInitialamount
()
)
;
al
.
setCurrentamount
(
currentAmount
);
resList
.
add
(
al
);
}
...
...
@@ -78,7 +78,7 @@ public class AccountService {
public
int
insertAccount
(
String
beanJson
,
HttpServletRequest
request
)
{
Account
account
=
JSONObject
.
parseObject
(
beanJson
,
Account
.
class
);
if
(
account
.
getInitialamount
()
==
null
)
{
account
.
setInitialamount
(
0
d
);
account
.
setInitialamount
(
BigDecimal
.
ZERO
);
}
account
.
setIsdefault
(
false
);
return
accountMapper
.
insertSelective
(
account
);
...
...
@@ -123,8 +123,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
DepotHeadExample
example
=
new
DepotHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -145,7 +145,7 @@ public class AccountService {
if
(
dataList
!=
null
)
{
for
(
DepotHead
depotHead
:
dataList
)
{
if
(
depotHead
.
getChangeamount
()!=
null
)
{
accountSum
=
accountSum
+
depotHead
.
getChangeamount
();
accountSum
=
accountSum
.
add
(
depotHead
.
getChangeamount
()
)
;
}
}
}
...
...
@@ -161,8 +161,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getAccountSumByHead
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getAccountSumByHead
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
AccountHeadExample
example
=
new
AccountHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -183,7 +183,7 @@ public class AccountService {
if
(
dataList
!=
null
)
{
for
(
AccountHead
accountHead
:
dataList
)
{
if
(
accountHead
.
getChangeamount
()!=
null
)
{
accountSum
=
accountSum
+
accountHead
.
getChangeamount
();
accountSum
=
accountSum
.
add
(
accountHead
.
getChangeamount
()
)
;
}
}
}
...
...
@@ -199,8 +199,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getAccountSumByDetail
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getAccountSumByDetail
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
AccountHeadExample
example
=
new
AccountHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -234,7 +234,7 @@ public class AccountService {
if
(
dataListOne
!=
null
)
{
for
(
AccountItem
accountItem
:
dataListOne
)
{
if
(
accountItem
.
getEachamount
()!=
null
)
{
accountSum
=
accountSum
+
accountItem
.
getEachamount
();
accountSum
=
accountSum
.
add
(
accountItem
.
getEachamount
()
)
;
}
}
}
...
...
@@ -253,8 +253,8 @@ public class AccountService {
* @param id
* @return
*/
public
Double
getManyAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
Double
accountSum
=
0.0
;
public
BigDecimal
getManyAccountSum
(
Long
id
,
String
timeStr
,
String
type
)
{
BigDecimal
accountSum
=
BigDecimal
.
ZERO
;
try
{
DepotHeadExample
example
=
new
DepotHeadExample
();
if
(!
timeStr
.
equals
(
""
))
{
...
...
@@ -282,7 +282,7 @@ public class AccountService {
String
[]
amList
=
accountMoneyList
.
split
(
","
);
for
(
int
i
=
0
;
i
<
aList
.
length
;
i
++)
{
if
(
aList
[
i
].
toString
().
equals
(
id
.
toString
()))
{
accountSum
=
accountSum
+
Double
.
parseDouble
(
amList
[
i
].
toString
(
));
accountSum
=
accountSum
.
add
(
new
BigDecimal
(
amList
[
i
]
));
}
}
}
...
...
src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java
View file @
1dc95653
...
...
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -39,10 +40,10 @@ public class AccountHeadService {
if
(
null
!=
list
)
{
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
if
(
ah
.
getChangeamount
()
!=
null
)
{
ah
.
setChangeamount
(
Math
.
abs
(
ah
.
getChangeamount
()));
ah
.
setChangeamount
(
ah
.
getChangeamount
()
.
abs
(
));
}
if
(
ah
.
getTotalprice
()
!=
null
)
{
ah
.
setTotalprice
(
Math
.
abs
(
ah
.
getTotalprice
()));
ah
.
setTotalprice
(
ah
.
getTotalprice
()
.
abs
(
));
}
resList
.
add
(
ah
);
}
...
...
@@ -91,7 +92,7 @@ public class AccountHeadService {
return
accountHeadMapper
.
getMaxId
();
}
public
Double
findAllMoney
(
Integer
supplierId
,
String
type
,
String
mode
,
String
endTime
)
{
public
BigDecimal
findAllMoney
(
Integer
supplierId
,
String
type
,
String
mode
,
String
endTime
)
{
String
modeName
=
""
;
if
(
mode
.
equals
(
"实际"
))
{
modeName
=
"ChangeAmount"
;
...
...
@@ -107,10 +108,10 @@ public class AccountHeadService {
if
(
null
!=
list
)
{
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
if
(
ah
.
getChangeamount
()
!=
null
)
{
ah
.
setChangeamount
(
Math
.
abs
(
ah
.
getChangeamount
()));
ah
.
setChangeamount
(
ah
.
getChangeamount
()
.
abs
(
));
}
if
(
ah
.
getTotalprice
()
!=
null
)
{
ah
.
setTotalprice
(
Math
.
abs
(
ah
.
getTotalprice
()));
ah
.
setTotalprice
(
ah
.
getTotalprice
()
.
abs
(
));
}
resList
.
add
(
ah
);
}
...
...
src/main/java/com/jsh/erp/service/accountItem/AccountItemService.java
View file @
1dc95653
...
...
@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
static
com
.
jsh
.
erp
.
utils
.
ResponseJsonUtil
.
returnJson
;
...
...
@@ -108,13 +109,13 @@ public class AccountItemService {
accountItem
.
setInoutitemid
(
tempInsertedJson
.
getLong
(
"InOutItemId"
));
}
if
(
tempInsertedJson
.
get
(
"EachAmount"
)
!=
null
&&
!
tempInsertedJson
.
get
(
"EachAmount"
).
equals
(
""
))
{
Double
eachAmount
=
tempInsertedJson
.
get
Double
(
"EachAmount"
);
BigDecimal
eachAmount
=
tempInsertedJson
.
get
BigDecimal
(
"EachAmount"
);
if
(
listType
.
equals
(
"付款"
))
{
eachAmount
=
0
-
eachAmount
;
eachAmount
=
BigDecimal
.
ZERO
.
subtract
(
eachAmount
)
;
}
accountItem
.
setEachamount
(
eachAmount
);
}
else
{
accountItem
.
setEachamount
(
0.0
);
accountItem
.
setEachamount
(
BigDecimal
.
ZERO
);
}
accountItem
.
setRemark
(
tempInsertedJson
.
getString
(
"Remark"
));
this
.
insertAccountItemWithObj
(
accountItem
);
...
...
@@ -139,13 +140,13 @@ public class AccountItemService {
accountItem
.
setInoutitemid
(
tempUpdatedJson
.
getLong
(
"InOutItemId"
));
}
if
(
tempUpdatedJson
.
get
(
"EachAmount"
)
!=
null
&&
!
tempUpdatedJson
.
get
(
"EachAmount"
).
equals
(
""
))
{
Double
eachAmount
=
tempUpdatedJson
.
get
Double
(
"EachAmount"
);
BigDecimal
eachAmount
=
tempUpdatedJson
.
get
BigDecimal
(
"EachAmount"
);
if
(
listType
.
equals
(
"付款"
))
{
eachAmount
=
0
-
eachAmount
;
eachAmount
=
BigDecimal
.
ZERO
.
subtract
(
eachAmount
)
;
}
accountItem
.
setEachamount
(
eachAmount
);
}
else
{
accountItem
.
setEachamount
(
0.0
);
accountItem
.
setEachamount
(
BigDecimal
.
ZERO
);
}
accountItem
.
setRemark
(
tempUpdatedJson
.
getString
(
"Remark"
));
this
.
updateAccountItemWithObj
(
accountItem
);
...
...
src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
1dc95653
...
...
@@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.Date
;
...
...
@@ -54,10 +55,10 @@ public class DepotHeadService {
dh
.
setOthermoneyitem
(
otherMoneyItemStr
);
}
if
(
dh
.
getChangeamount
()
!=
null
)
{
dh
.
setChangeamount
(
Math
.
abs
(
dh
.
getChangeamount
()));
dh
.
setChangeamount
(
dh
.
getChangeamount
()
.
abs
(
));
}
if
(
dh
.
getTotalprice
()
!=
null
)
{
dh
.
setTotalprice
(
Math
.
abs
(
dh
.
getTotalprice
()));
dh
.
setTotalprice
(
dh
.
getTotalprice
()
.
abs
(
));
}
dh
.
setMaterialsList
(
findMaterialsListByHeaderId
(
dh
.
getId
()));
resList
.
add
(
dh
);
...
...
@@ -213,7 +214,7 @@ public class DepotHeadService {
return
depotHeadMapper
.
findStatementAccountCount
(
beginTime
,
endTime
,
organId
,
supType
);
}
public
Double
findAllMoney
(
Integer
supplierId
,
String
type
,
String
subType
,
String
mode
,
String
endTime
)
{
public
BigDecimal
findAllMoney
(
Integer
supplierId
,
String
type
,
String
subType
,
String
mode
,
String
endTime
)
{
String
modeName
=
""
;
if
(
mode
.
equals
(
"实际"
))
{
modeName
=
"ChangeAmount"
;
...
...
@@ -237,10 +238,10 @@ public class DepotHeadService {
dh
.
setOthermoneyitem
(
otherMoneyItemStr
);
}
if
(
dh
.
getChangeamount
()
!=
null
)
{
dh
.
setChangeamount
(
Math
.
abs
(
dh
.
getChangeamount
()));
dh
.
setChangeamount
(
dh
.
getChangeamount
()
.
abs
(
));
}
if
(
dh
.
getTotalprice
()
!=
null
)
{
dh
.
setTotalprice
(
Math
.
abs
(
dh
.
getTotalprice
()));
dh
.
setTotalprice
(
dh
.
getTotalprice
()
.
abs
(
));
}
dh
.
setMaterialsList
(
findMaterialsListByHeaderId
(
dh
.
getId
()));
resList
.
add
(
dh
);
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
1dc95653
...
...
@@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -157,7 +158,7 @@ public class DepotItemService {
return
depotItemMapper
.
findByAllCount
(
headIds
,
materialIds
);
}
public
Double
findByType
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
public
BigDecimal
findByType
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
if
(
TYPE
.
equals
(
type
))
{
if
(
isPrev
)
{
return
depotItemMapper
.
findByTypeInIsPrev
(
ProjectId
,
MId
,
MonthTime
);
...
...
@@ -173,7 +174,7 @@ public class DepotItemService {
}
}
public
Double
findPriceByType
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
public
BigDecimal
findPriceByType
(
String
type
,
Integer
ProjectId
,
Long
MId
,
String
MonthTime
,
Boolean
isPrev
)
{
if
(
TYPE
.
equals
(
type
))
{
if
(
isPrev
)
{
return
depotItemMapper
.
findPriceByTypeInIsPrev
(
ProjectId
,
MId
,
MonthTime
);
...
...
@@ -189,7 +190,7 @@ public class DepotItemService {
}
}
public
Double
buyOrSale
(
String
type
,
String
subType
,
Long
MId
,
String
MonthTime
,
String
sumType
)
{
public
BigDecimal
buyOrSale
(
String
type
,
String
subType
,
Long
MId
,
String
MonthTime
,
String
sumType
)
{
if
(
SUM_TYPE
.
equals
(
sumType
))
{
return
depotItemMapper
.
buyOrSaleNumber
(
type
,
subType
,
MId
,
MonthTime
,
sumType
);
}
else
{
...
...
@@ -197,7 +198,7 @@ public class DepotItemService {
}
}
public
Double
findGiftByType
(
String
subType
,
Integer
ProjectId
,
Long
MId
,
String
type
)
{
public
BigDecimal
findGiftByType
(
String
subType
,
Integer
ProjectId
,
Long
MId
,
String
type
)
{
if
(
IN
.
equals
(
type
))
{
return
depotItemMapper
.
findGiftByTypeIn
(
subType
,
ProjectId
,
MId
);
}
else
{
...
...
@@ -219,10 +220,10 @@ public class DepotItemService {
depotItem
.
setMaterialid
(
tempInsertedJson
.
getLong
(
"MaterialId"
));
depotItem
.
setMunit
(
tempInsertedJson
.
getString
(
"Unit"
));
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"OperNumber"
).
toString
()))
{
depotItem
.
setOpernumber
(
tempInsertedJson
.
get
Double
(
"OperNumber"
));
depotItem
.
setOpernumber
(
tempInsertedJson
.
get
BigDecimal
(
"OperNumber"
));
try
{
String
Unit
=
tempInsertedJson
.
get
(
"Unit"
).
toString
();
Double
oNumber
=
tempInsertedJson
.
get
Double
(
"OperNumber"
);
BigDecimal
oNumber
=
tempInsertedJson
.
get
BigDecimal
(
"OperNumber"
);
Long
mId
=
Long
.
parseLong
(
tempInsertedJson
.
get
(
"MaterialId"
).
toString
());
//以下进行单位换算
String
UnitName
=
findUnitName
(
mId
);
//查询计量单位名称
...
...
@@ -235,7 +236,7 @@ public class DepotItemService {
if
(
Unit
.
equals
(
basicUnit
))
{
//如果等于基础单位
depotItem
.
setBasicnumber
(
oNumber
);
//数量一致
}
else
if
(
Unit
.
equals
(
otherUnit
))
{
//如果等于副单位
depotItem
.
setBasicnumber
(
oNumber
*
ratio
);
//数量乘以比例
depotItem
.
setBasicnumber
(
oNumber
.
multiply
(
new
BigDecimal
(
ratio
))
);
//数量乘以比例
}
}
else
{
depotItem
.
setBasicnumber
(
oNumber
);
//其他情况
...
...
@@ -245,13 +246,13 @@ public class DepotItemService {
}
}
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"UnitPrice"
).
toString
()))
{
depotItem
.
setUnitprice
(
tempInsertedJson
.
get
Double
(
"UnitPrice"
));
depotItem
.
setUnitprice
(
tempInsertedJson
.
get
BigDecimal
(
"UnitPrice"
));
}
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"TaxUnitPrice"
).
toString
()))
{
depotItem
.
setTaxunitprice
(
tempInsertedJson
.
get
Double
(
"TaxUnitPrice"
));
depotItem
.
setTaxunitprice
(
tempInsertedJson
.
get
BigDecimal
(
"TaxUnitPrice"
));
}
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"AllPrice"
).
toString
()))
{
depotItem
.
setAllprice
(
tempInsertedJson
.
get
Double
(
"AllPrice"
));
depotItem
.
setAllprice
(
tempInsertedJson
.
get
BigDecimal
(
"AllPrice"
));
}
depotItem
.
setRemark
(
tempInsertedJson
.
getString
(
"Remark"
));
if
(
tempInsertedJson
.
get
(
"DepotId"
)
!=
null
&&
!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"DepotId"
).
toString
()))
{
...
...
@@ -261,13 +262,13 @@ public class DepotItemService {
depotItem
.
setAnotherdepotid
(
tempInsertedJson
.
getLong
(
"AnotherDepotId"
));
}
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"TaxRate"
).
toString
()))
{
depotItem
.
setTaxrate
(
tempInsertedJson
.
get
Double
(
"TaxRate"
));
depotItem
.
setTaxrate
(
tempInsertedJson
.
get
BigDecimal
(
"TaxRate"
));
}
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"TaxMoney"
).
toString
()))
{
depotItem
.
setTaxmoney
(
tempInsertedJson
.
get
Double
(
"TaxMoney"
));
depotItem
.
setTaxmoney
(
tempInsertedJson
.
get
BigDecimal
(
"TaxMoney"
));
}
if
(!
StringUtil
.
isEmpty
(
tempInsertedJson
.
get
(
"TaxLastMoney"
).
toString
()))
{
depotItem
.
setTaxlastmoney
(
tempInsertedJson
.
get
Double
(
"TaxLastMoney"
));
depotItem
.
setTaxlastmoney
(
tempInsertedJson
.
get
BigDecimal
(
"TaxLastMoney"
));
}
if
(
tempInsertedJson
.
get
(
"OtherField1"
)
!=
null
)
{
depotItem
.
setOtherfield1
(
tempInsertedJson
.
getString
(
"OtherField1"
));
...
...
@@ -304,10 +305,10 @@ public class DepotItemService {
depotItem
.
setMaterialid
(
tempUpdatedJson
.
getLong
(
"MaterialId"
));
depotItem
.
setMunit
(
tempUpdatedJson
.
getString
(
"Unit"
));
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"OperNumber"
).
toString
()))
{
depotItem
.
setOpernumber
(
tempUpdatedJson
.
get
Double
(
"OperNumber"
));
depotItem
.
setOpernumber
(
tempUpdatedJson
.
get
BigDecimal
(
"OperNumber"
));
try
{
String
Unit
=
tempUpdatedJson
.
get
(
"Unit"
).
toString
();
Double
oNumber
=
tempUpdatedJson
.
get
Double
(
"OperNumber"
);
BigDecimal
oNumber
=
tempUpdatedJson
.
get
BigDecimal
(
"OperNumber"
);
Long
mId
=
Long
.
parseLong
(
tempUpdatedJson
.
get
(
"MaterialId"
).
toString
());
//以下进行单位换算
String
UnitName
=
findUnitName
(
mId
);
//查询计量单位名称
...
...
@@ -320,7 +321,7 @@ public class DepotItemService {
if
(
Unit
.
equals
(
basicUnit
))
{
//如果等于基础单位
depotItem
.
setBasicnumber
(
oNumber
);
//数量一致
}
else
if
(
Unit
.
equals
(
otherUnit
))
{
//如果等于副单位
depotItem
.
setBasicnumber
(
oNumber
*
ratio
);
//数量乘以比例
depotItem
.
setBasicnumber
(
oNumber
.
multiply
(
new
BigDecimal
(
ratio
)
))
;
//数量乘以比例
}
}
else
{
depotItem
.
setBasicnumber
(
oNumber
);
//其他情况
...
...
@@ -330,13 +331,13 @@ public class DepotItemService {
}
}
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"UnitPrice"
).
toString
()))
{
depotItem
.
setUnitprice
(
tempUpdatedJson
.
get
Double
(
"UnitPrice"
));
depotItem
.
setUnitprice
(
tempUpdatedJson
.
get
BigDecimal
(
"UnitPrice"
));
}
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"TaxUnitPrice"
).
toString
()))
{
depotItem
.
setTaxunitprice
(
tempUpdatedJson
.
get
Double
(
"TaxUnitPrice"
));
depotItem
.
setTaxunitprice
(
tempUpdatedJson
.
get
BigDecimal
(
"TaxUnitPrice"
));
}
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"AllPrice"
).
toString
()))
{
depotItem
.
setAllprice
(
tempUpdatedJson
.
get
Double
(
"AllPrice"
));
depotItem
.
setAllprice
(
tempUpdatedJson
.
get
BigDecimal
(
"AllPrice"
));
}
depotItem
.
setRemark
(
tempUpdatedJson
.
getString
(
"Remark"
));
if
(
tempUpdatedJson
.
get
(
"DepotId"
)
!=
null
&&
!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"DepotId"
).
toString
()))
{
...
...
@@ -346,13 +347,13 @@ public class DepotItemService {
depotItem
.
setAnotherdepotid
(
tempUpdatedJson
.
getLong
(
"AnotherDepotId"
));
}
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"TaxRate"
).
toString
()))
{
depotItem
.
setTaxrate
(
tempUpdatedJson
.
get
Double
(
"TaxRate"
));
depotItem
.
setTaxrate
(
tempUpdatedJson
.
get
BigDecimal
(
"TaxRate"
));
}
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"TaxMoney"
).
toString
()))
{
depotItem
.
setTaxmoney
(
tempUpdatedJson
.
get
Double
(
"TaxMoney"
));
depotItem
.
setTaxmoney
(
tempUpdatedJson
.
get
BigDecimal
(
"TaxMoney"
));
}
if
(!
StringUtil
.
isEmpty
(
tempUpdatedJson
.
get
(
"TaxLastMoney"
).
toString
()))
{
depotItem
.
setTaxlastmoney
(
tempUpdatedJson
.
get
Double
(
"TaxLastMoney"
));
depotItem
.
setTaxlastmoney
(
tempUpdatedJson
.
get
BigDecimal
(
"TaxLastMoney"
));
}
depotItem
.
setOtherfield1
(
tempUpdatedJson
.
getString
(
"OtherField1"
));
depotItem
.
setOtherfield2
(
tempUpdatedJson
.
getString
(
"OtherField2"
));
...
...
src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
1dc95653
...
...
@@ -13,6 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -75,9 +76,9 @@ public class SupplierService {
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
int
updateAdvanceIn
(
Long
supplierId
,
Double
advanceIn
){
public
int
updateAdvanceIn
(
Long
supplierId
,
BigDecimal
advanceIn
){
Supplier
supplier
=
supplierMapper
.
selectByPrimaryKey
(
supplierId
);
supplier
.
setAdvancein
(
supplier
.
getAdvancein
()
+
advanceIn
);
//增加预收款的金额,可能增加的是负值
supplier
.
setAdvancein
(
supplier
.
getAdvancein
()
.
add
(
advanceIn
)
)
;
//增加预收款的金额,可能增加的是负值
return
supplierMapper
.
updateByPrimaryKeySelective
(
supplier
);
}
...
...
src/main/resources/mapper_xml/AccountHeadMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AccountHeadMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.AccountHead"
>
<!--
...
...
@@ -10,8 +10,8 @@
<result
column=
"Type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"OrganId"
jdbcType=
"BIGINT"
property=
"organid"
/>
<result
column=
"HandsPersonId"
jdbcType=
"BIGINT"
property=
"handspersonid"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
OUBLE
"
property=
"changeamount"
/>
<result
column=
"TotalPrice"
jdbcType=
"D
OUBLE
"
property=
"totalprice"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
ECIMAL
"
property=
"changeamount"
/>
<result
column=
"TotalPrice"
jdbcType=
"D
ECIMAL
"
property=
"totalprice"
/>
<result
column=
"AccountId"
jdbcType=
"BIGINT"
property=
"accountid"
/>
<result
column=
"BillNo"
jdbcType=
"VARCHAR"
property=
"billno"
/>
<result
column=
"BillTime"
jdbcType=
"TIMESTAMP"
property=
"billtime"
/>
...
...
@@ -147,7 +147,7 @@
AccountId, BillNo, BillTime,
Remark)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organid,jdbcType=BIGINT},
#{handspersonid,jdbcType=BIGINT}, #{changeamount,jdbcType=D
OUBLE
}, #{totalprice,jdbcType=D
OUBLE
},
#{handspersonid,jdbcType=BIGINT}, #{changeamount,jdbcType=D
ECIMAL
}, #{totalprice,jdbcType=D
ECIMAL
},
#{accountid,jdbcType=BIGINT}, #{billno,jdbcType=VARCHAR}, #{billtime,jdbcType=TIMESTAMP},
#{remark,jdbcType=VARCHAR})
</insert>
...
...
@@ -203,10 +203,10 @@
#{handspersonid,jdbcType=BIGINT},
</if>
<if
test=
"changeamount != null"
>
#{changeamount,jdbcType=D
OUBLE
},
#{changeamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"totalprice != null"
>
#{totalprice,jdbcType=D
OUBLE
},
#{totalprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"accountid != null"
>
#{accountid,jdbcType=BIGINT},
...
...
@@ -252,10 +252,10 @@
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
</if>
<if
test=
"record.changeamount != null"
>
ChangeAmount = #{record.changeamount,jdbcType=D
OUBLE
},
ChangeAmount = #{record.changeamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.totalprice != null"
>
TotalPrice = #{record.totalprice,jdbcType=D
OUBLE
},
TotalPrice = #{record.totalprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.accountid != null"
>
AccountId = #{record.accountid,jdbcType=BIGINT},
...
...
@@ -284,8 +284,8 @@
Type = #{record.type,jdbcType=VARCHAR},
OrganId = #{record.organid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=D
OUBLE
},
TotalPrice = #{record.totalprice,jdbcType=D
OUBLE
},
ChangeAmount = #{record.changeamount,jdbcType=D
ECIMAL
},
TotalPrice = #{record.totalprice,jdbcType=D
ECIMAL
},
AccountId = #{record.accountid,jdbcType=BIGINT},
BillNo = #{record.billno,jdbcType=VARCHAR},
BillTime = #{record.billtime,jdbcType=TIMESTAMP},
...
...
@@ -311,10 +311,10 @@
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
</if>
<if
test=
"changeamount != null"
>
ChangeAmount = #{changeamount,jdbcType=D
OUBLE
},
ChangeAmount = #{changeamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"totalprice != null"
>
TotalPrice = #{totalprice,jdbcType=D
OUBLE
},
TotalPrice = #{totalprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"accountid != null"
>
AccountId = #{accountid,jdbcType=BIGINT},
...
...
@@ -340,8 +340,8 @@
set Type = #{type,jdbcType=VARCHAR},
OrganId = #{organid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=D
OUBLE
},
TotalPrice = #{totalprice,jdbcType=D
OUBLE
},
ChangeAmount = #{changeamount,jdbcType=D
ECIMAL
},
TotalPrice = #{totalprice,jdbcType=D
ECIMAL
},
AccountId = #{accountid,jdbcType=BIGINT},
BillNo = #{billno,jdbcType=VARCHAR},
BillTime = #{billtime,jdbcType=TIMESTAMP},
...
...
src/main/resources/mapper_xml/AccountHeadMapperEx.xml
View file @
1dc95653
...
...
@@ -22,10 +22,10 @@
and ah.Type='${type}'
</if>
<if
test=
"beginTime != null"
>
and ah.BillTime gt;= '%${beginTime}%'
and ah.BillTime
&
gt;
= '%${beginTime}%'
</if>
<if
test=
"endTime != null"
>
and ah.BillTime lt;= '%${endTime}%'
and ah.BillTime
&
lt;
= '%${endTime}%'
</if>
order by ah.Id desc
<if
test=
"offset != null and rows != null"
>
...
...
@@ -46,10 +46,10 @@
and Type='${type}'
</if>
<if
test=
"beginTime != null"
>
and BillTime gt;= '%${beginTime}%'
and BillTime
&
gt;
= '%${beginTime}%'
</if>
<if
test=
"endTime != null"
>
and BillTime lt;= '%${endTime}%'
and BillTime
&
lt;
= '%${endTime}%'
</if>
</select>
...
...
@@ -57,9 +57,9 @@
select max(Id) as Id from jsh_accounthead
</select>
<select
id=
"findAllMoney"
resultType=
"java.
lang.Double
"
>
<select
id=
"findAllMoney"
resultType=
"java.
math.BigDecimal
"
>
select sum(${modeName}) as allMoney from jsh_accounthead where Type='${type}'
and OrganId =${supplierId} and BillTime
<
='${endTime}'
and OrganId =${supplierId} and BillTime
<![CDATA[ <
='${endTime}'
]]>
</select>
<select
id=
"getDetailByNumber"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"ResultMapEx"
>
...
...
src/main/resources/mapper_xml/AccountItemMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AccountItemMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.AccountItem"
>
<!--
...
...
@@ -10,7 +10,7 @@
<result
column=
"HeaderId"
jdbcType=
"BIGINT"
property=
"headerid"
/>
<result
column=
"AccountId"
jdbcType=
"BIGINT"
property=
"accountid"
/>
<result
column=
"InOutItemId"
jdbcType=
"BIGINT"
property=
"inoutitemid"
/>
<result
column=
"EachAmount"
jdbcType=
"D
OUBLE
"
property=
"eachamount"
/>
<result
column=
"EachAmount"
jdbcType=
"D
ECIMAL
"
property=
"eachamount"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
...
...
@@ -141,7 +141,7 @@
InOutItemId, EachAmount, Remark
)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=D
OUBLE
}, #{remark,jdbcType=VARCHAR}
#{inoutitemid,jdbcType=BIGINT}, #{eachamount,jdbcType=D
ECIMAL
}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AccountItem"
>
...
...
@@ -184,7 +184,7 @@
#{inoutitemid,jdbcType=BIGINT},
</if>
<if
test=
"eachamount != null"
>
#{eachamount,jdbcType=D
OUBLE
},
#{eachamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
...
...
@@ -221,7 +221,7 @@
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
</if>
<if
test=
"record.eachamount != null"
>
EachAmount = #{record.eachamount,jdbcType=D
OUBLE
},
EachAmount = #{record.eachamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.remark != null"
>
Remark = #{record.remark,jdbcType=VARCHAR},
...
...
@@ -241,7 +241,7 @@
HeaderId = #{record.headerid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
InOutItemId = #{record.inoutitemid,jdbcType=BIGINT},
EachAmount = #{record.eachamount,jdbcType=D
OUBLE
},
EachAmount = #{record.eachamount,jdbcType=D
ECIMAL
},
Remark = #{record.remark,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -264,7 +264,7 @@
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
</if>
<if
test=
"eachamount != null"
>
EachAmount = #{eachamount,jdbcType=D
OUBLE
},
EachAmount = #{eachamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"remark != null"
>
Remark = #{remark,jdbcType=VARCHAR},
...
...
@@ -281,7 +281,7 @@
set HeaderId = #{headerid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
InOutItemId = #{inoutitemid,jdbcType=BIGINT},
EachAmount = #{eachamount,jdbcType=D
OUBLE
},
EachAmount = #{eachamount,jdbcType=D
ECIMAL
},
Remark = #{remark,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT}
</update>
...
...
src/main/resources/mapper_xml/AccountMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AccountMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Account"
>
<!--
...
...
@@ -9,8 +9,8 @@
<id
column=
"Id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"SerialNo"
jdbcType=
"VARCHAR"
property=
"serialno"
/>
<result
column=
"InitialAmount"
jdbcType=
"D
OUBLE
"
property=
"initialamount"
/>
<result
column=
"CurrentAmount"
jdbcType=
"D
OUBLE
"
property=
"currentamount"
/>
<result
column=
"InitialAmount"
jdbcType=
"D
ECIMAL
"
property=
"initialamount"
/>
<result
column=
"CurrentAmount"
jdbcType=
"D
ECIMAL
"
property=
"currentamount"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"IsDefault"
jdbcType=
"BIT"
property=
"isdefault"
/>
</resultMap>
...
...
@@ -142,7 +142,7 @@
InitialAmount, CurrentAmount, Remark,
IsDefault)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{serialno,jdbcType=VARCHAR},
#{initialamount,jdbcType=D
OUBLE
}, #{currentamount,jdbcType=D
OUBLE
}, #{remark,jdbcType=VARCHAR},
#{initialamount,jdbcType=D
ECIMAL
}, #{currentamount,jdbcType=D
ECIMAL
}, #{remark,jdbcType=VARCHAR},
#{isdefault,jdbcType=BIT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Account"
>
...
...
@@ -185,10 +185,10 @@
#{serialno,jdbcType=VARCHAR},
</if>
<if
test=
"initialamount != null"
>
#{initialamount,jdbcType=D
OUBLE
},
#{initialamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"currentamount != null"
>
#{currentamount,jdbcType=D
OUBLE
},
#{currentamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
...
...
@@ -225,10 +225,10 @@
SerialNo = #{record.serialno,jdbcType=VARCHAR},
</if>
<if
test=
"record.initialamount != null"
>
InitialAmount = #{record.initialamount,jdbcType=D
OUBLE
},
InitialAmount = #{record.initialamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.currentamount != null"
>
CurrentAmount = #{record.currentamount,jdbcType=D
OUBLE
},
CurrentAmount = #{record.currentamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.remark != null"
>
Remark = #{record.remark,jdbcType=VARCHAR},
...
...
@@ -250,8 +250,8 @@
set Id = #{record.id,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
SerialNo = #{record.serialno,jdbcType=VARCHAR},
InitialAmount = #{record.initialamount,jdbcType=D
OUBLE
},
CurrentAmount = #{record.currentamount,jdbcType=D
OUBLE
},
InitialAmount = #{record.initialamount,jdbcType=D
ECIMAL
},
CurrentAmount = #{record.currentamount,jdbcType=D
ECIMAL
},
Remark = #{record.remark,jdbcType=VARCHAR},
IsDefault = #{record.isdefault,jdbcType=BIT}
<if
test=
"_parameter != null"
>
...
...
@@ -272,10 +272,10 @@
SerialNo = #{serialno,jdbcType=VARCHAR},
</if>
<if
test=
"initialamount != null"
>
InitialAmount = #{initialamount,jdbcType=D
OUBLE
},
InitialAmount = #{initialamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"currentamount != null"
>
CurrentAmount = #{currentamount,jdbcType=D
OUBLE
},
CurrentAmount = #{currentamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"remark != null"
>
Remark = #{remark,jdbcType=VARCHAR},
...
...
@@ -294,8 +294,8 @@
update jsh_account
set Name = #{name,jdbcType=VARCHAR},
SerialNo = #{serialno,jdbcType=VARCHAR},
InitialAmount = #{initialamount,jdbcType=D
OUBLE
},
CurrentAmount = #{currentamount,jdbcType=D
OUBLE
},
InitialAmount = #{initialamount,jdbcType=D
ECIMAL
},
CurrentAmount = #{currentamount,jdbcType=D
ECIMAL
},
Remark = #{remark,jdbcType=VARCHAR},
IsDefault = #{isdefault,jdbcType=BIT}
where Id = #{id,jdbcType=BIGINT}
...
...
src/main/resources/mapper_xml/AccountMapperEx.xml
View file @
1dc95653
...
...
@@ -9,7 +9,7 @@
<result
column=
"Number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"newType"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"supplier"
jdbcType=
"VARCHAR"
property=
"supplierName"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
OUBLE
"
property=
"changeAmount"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
ECIMAL
"
property=
"changeAmount"
/>
<result
column=
"oTime"
jdbcType=
"VARCHAR"
property=
"operTime"
/>
<result
column=
"AList"
jdbcType=
"VARCHAR"
property=
"aList"
/>
<result
column=
"AMList"
jdbcType=
"VARCHAR"
property=
"amList"
/>
...
...
src/main/resources/mapper_xml/AssetMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.AssetMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Asset"
>
<!--
...
...
@@ -12,7 +12,7 @@
<result
column=
"labels"
jdbcType=
"VARCHAR"
property=
"labels"
/>
<result
column=
"status"
jdbcType=
"SMALLINT"
property=
"status"
/>
<result
column=
"userID"
jdbcType=
"BIGINT"
property=
"userid"
/>
<result
column=
"price"
jdbcType=
"D
OUBLE
"
property=
"price"
/>
<result
column=
"price"
jdbcType=
"D
ECIMAL
"
property=
"price"
/>
<result
column=
"purchasedate"
jdbcType=
"TIMESTAMP"
property=
"purchasedate"
/>
<result
column=
"periodofvalidity"
jdbcType=
"TIMESTAMP"
property=
"periodofvalidity"
/>
<result
column=
"warrantydate"
jdbcType=
"TIMESTAMP"
property=
"warrantydate"
/>
...
...
@@ -195,7 +195,7 @@
addMonth)
values (#{id,jdbcType=BIGINT}, #{assetnameid,jdbcType=BIGINT}, #{location,jdbcType=VARCHAR},
#{labels,jdbcType=VARCHAR}, #{status,jdbcType=SMALLINT}, #{userid,jdbcType=BIGINT},
#{price,jdbcType=D
OUBLE
}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP},
#{price,jdbcType=D
ECIMAL
}, #{purchasedate,jdbcType=TIMESTAMP}, #{periodofvalidity,jdbcType=TIMESTAMP},
#{warrantydate,jdbcType=TIMESTAMP}, #{assetnum,jdbcType=VARCHAR}, #{serialnum,jdbcType=VARCHAR},
#{supplier,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=BIGINT},
#{updatetime,jdbcType=TIMESTAMP}, #{updator,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR},
...
...
@@ -286,7 +286,7 @@
#{userid,jdbcType=BIGINT},
</if>
<if
test=
"price != null"
>
#{price,jdbcType=D
OUBLE
},
#{price,jdbcType=D
ECIMAL
},
</if>
<if
test=
"purchasedate != null"
>
#{purchasedate,jdbcType=TIMESTAMP},
...
...
@@ -362,7 +362,7 @@
userID = #{record.userid,jdbcType=BIGINT},
</if>
<if
test=
"record.price != null"
>
price = #{record.price,jdbcType=D
OUBLE
},
price = #{record.price,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.purchasedate != null"
>
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
...
...
@@ -417,7 +417,7 @@
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=D
OUBLE
},
price = #{record.price,jdbcType=D
ECIMAL
},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
...
...
@@ -446,7 +446,7 @@
labels = #{record.labels,jdbcType=VARCHAR},
status = #{record.status,jdbcType=SMALLINT},
userID = #{record.userid,jdbcType=BIGINT},
price = #{record.price,jdbcType=D
OUBLE
},
price = #{record.price,jdbcType=D
ECIMAL
},
purchasedate = #{record.purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{record.periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{record.warrantydate,jdbcType=TIMESTAMP},
...
...
@@ -484,7 +484,7 @@
userID = #{userid,jdbcType=BIGINT},
</if>
<if
test=
"price != null"
>
price = #{price,jdbcType=D
OUBLE
},
price = #{price,jdbcType=D
ECIMAL
},
</if>
<if
test=
"purchasedate != null"
>
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
...
...
@@ -536,7 +536,7 @@
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=D
OUBLE
},
price = #{price,jdbcType=D
ECIMAL
},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
...
...
@@ -562,7 +562,7 @@
labels = #{labels,jdbcType=VARCHAR},
status = #{status,jdbcType=SMALLINT},
userID = #{userid,jdbcType=BIGINT},
price = #{price,jdbcType=D
OUBLE
},
price = #{price,jdbcType=D
ECIMAL
},
purchasedate = #{purchasedate,jdbcType=TIMESTAMP},
periodofvalidity = #{periodofvalidity,jdbcType=TIMESTAMP},
warrantydate = #{warrantydate,jdbcType=TIMESTAMP},
...
...
src/main/resources/mapper_xml/DepotHeadMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.DepotHeadMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.DepotHead"
>
<!--
...
...
@@ -18,18 +18,18 @@
<result
column=
"OrganId"
jdbcType=
"BIGINT"
property=
"organid"
/>
<result
column=
"HandsPersonId"
jdbcType=
"BIGINT"
property=
"handspersonid"
/>
<result
column=
"AccountId"
jdbcType=
"BIGINT"
property=
"accountid"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
OUBLE
"
property=
"changeamount"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
ECIMAL
"
property=
"changeamount"
/>
<result
column=
"AllocationProjectId"
jdbcType=
"BIGINT"
property=
"allocationprojectid"
/>
<result
column=
"TotalPrice"
jdbcType=
"D
OUBLE
"
property=
"totalprice"
/>
<result
column=
"TotalPrice"
jdbcType=
"D
ECIMAL
"
property=
"totalprice"
/>
<result
column=
"PayType"
jdbcType=
"VARCHAR"
property=
"paytype"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"Salesman"
jdbcType=
"VARCHAR"
property=
"salesman"
/>
<result
column=
"AccountIdList"
jdbcType=
"VARCHAR"
property=
"accountidlist"
/>
<result
column=
"AccountMoneyList"
jdbcType=
"VARCHAR"
property=
"accountmoneylist"
/>
<result
column=
"Discount"
jdbcType=
"D
OUBLE
"
property=
"discount"
/>
<result
column=
"DiscountMoney"
jdbcType=
"D
OUBLE
"
property=
"discountmoney"
/>
<result
column=
"DiscountLastMoney"
jdbcType=
"D
OUBLE
"
property=
"discountlastmoney"
/>
<result
column=
"OtherMoney"
jdbcType=
"D
OUBLE
"
property=
"othermoney"
/>
<result
column=
"Discount"
jdbcType=
"D
ECIMAL
"
property=
"discount"
/>
<result
column=
"DiscountMoney"
jdbcType=
"D
ECIMAL
"
property=
"discountmoney"
/>
<result
column=
"DiscountLastMoney"
jdbcType=
"D
ECIMAL
"
property=
"discountlastmoney"
/>
<result
column=
"OtherMoney"
jdbcType=
"D
ECIMAL
"
property=
"othermoney"
/>
<result
column=
"OtherMoneyList"
jdbcType=
"VARCHAR"
property=
"othermoneylist"
/>
<result
column=
"OtherMoneyItem"
jdbcType=
"VARCHAR"
property=
"othermoneyitem"
/>
<result
column=
"AccountDay"
jdbcType=
"INTEGER"
property=
"accountday"
/>
...
...
@@ -176,10 +176,10 @@
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, #{accountid,jdbcType=BIGINT},
#{changeamount,jdbcType=D
OUBLE
}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=D
OUBLE
},
#{changeamount,jdbcType=D
ECIMAL
}, #{allocationprojectid,jdbcType=BIGINT}, #{totalprice,jdbcType=D
ECIMAL
},
#{paytype,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{salesman,jdbcType=VARCHAR},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=D
OUBLE
},
#{discountmoney,jdbcType=D
OUBLE
}, #{discountlastmoney,jdbcType=D
OUBLE
}, #{othermoney,jdbcType=D
OUBLE
},
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=D
ECIMAL
},
#{discountmoney,jdbcType=D
ECIMAL
}, #{discountlastmoney,jdbcType=D
ECIMAL
}, #{othermoney,jdbcType=D
ECIMAL
},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{status,jdbcType=BIT})
</insert>
...
...
@@ -313,13 +313,13 @@
#{accountid,jdbcType=BIGINT},
</if>
<if
test=
"changeamount != null"
>
#{changeamount,jdbcType=D
OUBLE
},
#{changeamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"allocationprojectid != null"
>
#{allocationprojectid,jdbcType=BIGINT},
</if>
<if
test=
"totalprice != null"
>
#{totalprice,jdbcType=D
OUBLE
},
#{totalprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"paytype != null"
>
#{paytype,jdbcType=VARCHAR},
...
...
@@ -337,16 +337,16 @@
#{accountmoneylist,jdbcType=VARCHAR},
</if>
<if
test=
"discount != null"
>
#{discount,jdbcType=D
OUBLE
},
#{discount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"discountmoney != null"
>
#{discountmoney,jdbcType=D
OUBLE
},
#{discountmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"discountlastmoney != null"
>
#{discountlastmoney,jdbcType=D
OUBLE
},
#{discountlastmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"othermoney != null"
>
#{othermoney,jdbcType=D
OUBLE
},
#{othermoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"othermoneylist != null"
>
#{othermoneylist,jdbcType=VARCHAR},
...
...
@@ -416,13 +416,13 @@
AccountId = #{record.accountid,jdbcType=BIGINT},
</if>
<if
test=
"record.changeamount != null"
>
ChangeAmount = #{record.changeamount,jdbcType=D
OUBLE
},
ChangeAmount = #{record.changeamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.allocationprojectid != null"
>
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
</if>
<if
test=
"record.totalprice != null"
>
TotalPrice = #{record.totalprice,jdbcType=D
OUBLE
},
TotalPrice = #{record.totalprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.paytype != null"
>
PayType = #{record.paytype,jdbcType=VARCHAR},
...
...
@@ -440,16 +440,16 @@
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
</if>
<if
test=
"record.discount != null"
>
Discount = #{record.discount,jdbcType=D
OUBLE
},
Discount = #{record.discount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.discountmoney != null"
>
DiscountMoney = #{record.discountmoney,jdbcType=D
OUBLE
},
DiscountMoney = #{record.discountmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.discountlastmoney != null"
>
DiscountLastMoney = #{record.discountlastmoney,jdbcType=D
OUBLE
},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.othermoney != null"
>
OtherMoney = #{record.othermoney,jdbcType=D
OUBLE
},
OtherMoney = #{record.othermoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.othermoneylist != null"
>
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
...
...
@@ -486,18 +486,18 @@
OrganId = #{record.organid,jdbcType=BIGINT},
HandsPersonId = #{record.handspersonid,jdbcType=BIGINT},
AccountId = #{record.accountid,jdbcType=BIGINT},
ChangeAmount = #{record.changeamount,jdbcType=D
OUBLE
},
ChangeAmount = #{record.changeamount,jdbcType=D
ECIMAL
},
AllocationProjectId = #{record.allocationprojectid,jdbcType=BIGINT},
TotalPrice = #{record.totalprice,jdbcType=D
OUBLE
},
TotalPrice = #{record.totalprice,jdbcType=D
ECIMAL
},
PayType = #{record.paytype,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
Salesman = #{record.salesman,jdbcType=VARCHAR},
AccountIdList = #{record.accountidlist,jdbcType=VARCHAR},
AccountMoneyList = #{record.accountmoneylist,jdbcType=VARCHAR},
Discount = #{record.discount,jdbcType=D
OUBLE
},
DiscountMoney = #{record.discountmoney,jdbcType=D
OUBLE
},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=D
OUBLE
},
OtherMoney = #{record.othermoney,jdbcType=D
OUBLE
},
Discount = #{record.discount,jdbcType=D
ECIMAL
},
DiscountMoney = #{record.discountmoney,jdbcType=D
ECIMAL
},
DiscountLastMoney = #{record.discountlastmoney,jdbcType=D
ECIMAL
},
OtherMoney = #{record.othermoney,jdbcType=D
ECIMAL
},
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER},
...
...
@@ -547,13 +547,13 @@
AccountId = #{accountid,jdbcType=BIGINT},
</if>
<if
test=
"changeamount != null"
>
ChangeAmount = #{changeamount,jdbcType=D
OUBLE
},
ChangeAmount = #{changeamount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"allocationprojectid != null"
>
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
</if>
<if
test=
"totalprice != null"
>
TotalPrice = #{totalprice,jdbcType=D
OUBLE
},
TotalPrice = #{totalprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"paytype != null"
>
PayType = #{paytype,jdbcType=VARCHAR},
...
...
@@ -571,16 +571,16 @@
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
</if>
<if
test=
"discount != null"
>
Discount = #{discount,jdbcType=D
OUBLE
},
Discount = #{discount,jdbcType=D
ECIMAL
},
</if>
<if
test=
"discountmoney != null"
>
DiscountMoney = #{discountmoney,jdbcType=D
OUBLE
},
DiscountMoney = #{discountmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"discountlastmoney != null"
>
DiscountLastMoney = #{discountlastmoney,jdbcType=D
OUBLE
},
DiscountLastMoney = #{discountlastmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"othermoney != null"
>
OtherMoney = #{othermoney,jdbcType=D
OUBLE
},
OtherMoney = #{othermoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"othermoneylist != null"
>
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
...
...
@@ -614,18 +614,18 @@
OrganId = #{organid,jdbcType=BIGINT},
HandsPersonId = #{handspersonid,jdbcType=BIGINT},
AccountId = #{accountid,jdbcType=BIGINT},
ChangeAmount = #{changeamount,jdbcType=D
OUBLE
},
ChangeAmount = #{changeamount,jdbcType=D
ECIMAL
},
AllocationProjectId = #{allocationprojectid,jdbcType=BIGINT},
TotalPrice = #{totalprice,jdbcType=D
OUBLE
},
TotalPrice = #{totalprice,jdbcType=D
ECIMAL
},
PayType = #{paytype,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
Salesman = #{salesman,jdbcType=VARCHAR},
AccountIdList = #{accountidlist,jdbcType=VARCHAR},
AccountMoneyList = #{accountmoneylist,jdbcType=VARCHAR},
Discount = #{discount,jdbcType=D
OUBLE
},
DiscountMoney = #{discountmoney,jdbcType=D
OUBLE
},
DiscountLastMoney = #{discountlastmoney,jdbcType=D
OUBLE
},
OtherMoney = #{othermoney,jdbcType=D
OUBLE
},
Discount = #{discount,jdbcType=D
ECIMAL
},
DiscountMoney = #{discountmoney,jdbcType=D
ECIMAL
},
DiscountLastMoney = #{discountlastmoney,jdbcType=D
ECIMAL
},
OtherMoney = #{othermoney,jdbcType=D
ECIMAL
},
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER},
...
...
src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
1dc95653
...
...
@@ -14,9 +14,9 @@
<result
column=
"Number"
jdbcType=
"VARCHAR"
property=
"Number"
/>
<result
column=
"MName"
jdbcType=
"VARCHAR"
property=
"MName"
/>
<result
column=
"Model"
jdbcType=
"VARCHAR"
property=
"Model"
/>
<result
column=
"UnitPrice"
jdbcType=
"D
OUBLE
"
property=
"UnitPrice"
/>
<result
column=
"OperNumber"
jdbcType=
"D
OUBLE
"
property=
"OperNumber"
/>
<result
column=
"AllPrice"
jdbcType=
"D
OUBLE
"
property=
"AllPrice"
/>
<result
column=
"UnitPrice"
jdbcType=
"D
ECIMAL
"
property=
"UnitPrice"
/>
<result
column=
"OperNumber"
jdbcType=
"D
ECIMAL
"
property=
"OperNumber"
/>
<result
column=
"AllPrice"
jdbcType=
"D
ECIMAL
"
property=
"AllPrice"
/>
<result
column=
"SName"
jdbcType=
"VARCHAR"
property=
"SName"
/>
<result
column=
"DName"
jdbcType=
"VARCHAR"
property=
"DName"
/>
<result
column=
"OperTime"
jdbcType=
"VARCHAR"
property=
"OperTime"
/>
...
...
@@ -28,15 +28,15 @@
<result
column=
"mName"
jdbcType=
"VARCHAR"
property=
"mName"
/>
<result
column=
"Model"
jdbcType=
"VARCHAR"
property=
"Model"
/>
<result
column=
"categoryName"
jdbcType=
"VARCHAR"
property=
"categoryName"
/>
<result
column=
"numSum"
jdbcType=
"D
OUBLE
"
property=
"numSum"
/>
<result
column=
"priceSum"
jdbcType=
"D
OUBLE
"
property=
"priceSum"
/>
<result
column=
"numSum"
jdbcType=
"D
ECIMAL
"
property=
"numSum"
/>
<result
column=
"priceSum"
jdbcType=
"D
ECIMAL
"
property=
"priceSum"
/>
</resultMap>
<resultMap
id=
"ResultStatementAccount"
type=
"com.jsh.erp.datasource.vo.DepotHeadVo4StatementAccount"
>
<result
column=
"Number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"DiscountLastMoney"
jdbcType=
"D
OUBLE
"
property=
"discountLastMoney"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
OUBLE
"
property=
"changeAmount"
/>
<result
column=
"DiscountLastMoney"
jdbcType=
"D
ECIMAL
"
property=
"discountLastMoney"
/>
<result
column=
"ChangeAmount"
jdbcType=
"D
ECIMAL
"
property=
"changeAmount"
/>
<result
column=
"supplierName"
jdbcType=
"VARCHAR"
property=
"supplierName"
/>
<result
column=
"oTime"
jdbcType=
"VARCHAR"
property=
"oTime"
/>
</resultMap>
...
...
@@ -262,7 +262,7 @@
) cc
</select>
<select
id=
"findAllMoney"
resultType=
"java.
lang.Double
"
>
<select
id=
"findAllMoney"
resultType=
"java.
math.BigDecimal
"
>
select sum(${modeName}) as allMoney from jsh_depothead where Type='${type}' and SubType = '${subType}'
and OrganId =${supplierId} and OperTime
<
='${endTime}'
</select>
...
...
src/main/resources/mapper_xml/DepotItemMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.DepotItemMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.DepotItem"
>
<!--
...
...
@@ -10,19 +10,19 @@
<result
column=
"HeaderId"
jdbcType=
"BIGINT"
property=
"headerid"
/>
<result
column=
"MaterialId"
jdbcType=
"BIGINT"
property=
"materialid"
/>
<result
column=
"MUnit"
jdbcType=
"VARCHAR"
property=
"munit"
/>
<result
column=
"OperNumber"
jdbcType=
"D
OUBLE
"
property=
"opernumber"
/>
<result
column=
"BasicNumber"
jdbcType=
"D
OUBLE
"
property=
"basicnumber"
/>
<result
column=
"UnitPrice"
jdbcType=
"D
OUBLE
"
property=
"unitprice"
/>
<result
column=
"TaxUnitPrice"
jdbcType=
"D
OUBLE
"
property=
"taxunitprice"
/>
<result
column=
"AllPrice"
jdbcType=
"D
OUBLE
"
property=
"allprice"
/>
<result
column=
"OperNumber"
jdbcType=
"D
ECIMAL
"
property=
"opernumber"
/>
<result
column=
"BasicNumber"
jdbcType=
"D
ECIMAL
"
property=
"basicnumber"
/>
<result
column=
"UnitPrice"
jdbcType=
"D
ECIMAL
"
property=
"unitprice"
/>
<result
column=
"TaxUnitPrice"
jdbcType=
"D
ECIMAL
"
property=
"taxunitprice"
/>
<result
column=
"AllPrice"
jdbcType=
"D
ECIMAL
"
property=
"allprice"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"Img"
jdbcType=
"VARCHAR"
property=
"img"
/>
<result
column=
"Incidentals"
jdbcType=
"D
OUBLE
"
property=
"incidentals"
/>
<result
column=
"Incidentals"
jdbcType=
"D
ECIMAL
"
property=
"incidentals"
/>
<result
column=
"DepotId"
jdbcType=
"BIGINT"
property=
"depotid"
/>
<result
column=
"AnotherDepotId"
jdbcType=
"BIGINT"
property=
"anotherdepotid"
/>
<result
column=
"TaxRate"
jdbcType=
"D
OUBLE
"
property=
"taxrate"
/>
<result
column=
"TaxMoney"
jdbcType=
"D
OUBLE
"
property=
"taxmoney"
/>
<result
column=
"TaxLastMoney"
jdbcType=
"D
OUBLE
"
property=
"taxlastmoney"
/>
<result
column=
"TaxRate"
jdbcType=
"D
ECIMAL
"
property=
"taxrate"
/>
<result
column=
"TaxMoney"
jdbcType=
"D
ECIMAL
"
property=
"taxmoney"
/>
<result
column=
"TaxLastMoney"
jdbcType=
"D
ECIMAL
"
property=
"taxlastmoney"
/>
<result
column=
"OtherField1"
jdbcType=
"VARCHAR"
property=
"otherfield1"
/>
<result
column=
"OtherField2"
jdbcType=
"VARCHAR"
property=
"otherfield2"
/>
<result
column=
"OtherField3"
jdbcType=
"VARCHAR"
property=
"otherfield3"
/>
...
...
@@ -165,11 +165,11 @@
OtherField2, OtherField3, OtherField4,
OtherField5, MType)
values (#{id,jdbcType=BIGINT}, #{headerid,jdbcType=BIGINT}, #{materialid,jdbcType=BIGINT},
#{munit,jdbcType=VARCHAR}, #{opernumber,jdbcType=D
OUBLE
}, #{basicnumber,jdbcType=D
OUBLE
},
#{unitprice,jdbcType=D
OUBLE
}, #{taxunitprice,jdbcType=D
OUBLE
}, #{allprice,jdbcType=D
OUBLE
},
#{remark,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{incidentals,jdbcType=D
OUBLE
},
#{depotid,jdbcType=BIGINT}, #{anotherdepotid,jdbcType=BIGINT}, #{taxrate,jdbcType=D
OUBLE
},
#{taxmoney,jdbcType=D
OUBLE
}, #{taxlastmoney,jdbcType=D
OUBLE
}, #{otherfield1,jdbcType=VARCHAR},
#{munit,jdbcType=VARCHAR}, #{opernumber,jdbcType=D
ECIMAL
}, #{basicnumber,jdbcType=D
ECIMAL
},
#{unitprice,jdbcType=D
ECIMAL
}, #{taxunitprice,jdbcType=D
ECIMAL
}, #{allprice,jdbcType=D
ECIMAL
},
#{remark,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{incidentals,jdbcType=D
ECIMAL
},
#{depotid,jdbcType=BIGINT}, #{anotherdepotid,jdbcType=BIGINT}, #{taxrate,jdbcType=D
ECIMAL
},
#{taxmoney,jdbcType=D
ECIMAL
}, #{taxlastmoney,jdbcType=D
ECIMAL
}, #{otherfield1,jdbcType=VARCHAR},
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR}, #{otherfield4,jdbcType=VARCHAR},
#{otherfield5,jdbcType=VARCHAR}, #{mtype,jdbcType=VARCHAR})
</insert>
...
...
@@ -264,19 +264,19 @@
#{munit,jdbcType=VARCHAR},
</if>
<if
test=
"opernumber != null"
>
#{opernumber,jdbcType=D
OUBLE
},
#{opernumber,jdbcType=D
ECIMAL
},
</if>
<if
test=
"basicnumber != null"
>
#{basicnumber,jdbcType=D
OUBLE
},
#{basicnumber,jdbcType=D
ECIMAL
},
</if>
<if
test=
"unitprice != null"
>
#{unitprice,jdbcType=D
OUBLE
},
#{unitprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"taxunitprice != null"
>
#{taxunitprice,jdbcType=D
OUBLE
},
#{taxunitprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"allprice != null"
>
#{allprice,jdbcType=D
OUBLE
},
#{allprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
...
...
@@ -285,7 +285,7 @@
#{img,jdbcType=VARCHAR},
</if>
<if
test=
"incidentals != null"
>
#{incidentals,jdbcType=D
OUBLE
},
#{incidentals,jdbcType=D
ECIMAL
},
</if>
<if
test=
"depotid != null"
>
#{depotid,jdbcType=BIGINT},
...
...
@@ -294,13 +294,13 @@
#{anotherdepotid,jdbcType=BIGINT},
</if>
<if
test=
"taxrate != null"
>
#{taxrate,jdbcType=D
OUBLE
},
#{taxrate,jdbcType=D
ECIMAL
},
</if>
<if
test=
"taxmoney != null"
>
#{taxmoney,jdbcType=D
OUBLE
},
#{taxmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"taxlastmoney != null"
>
#{taxlastmoney,jdbcType=D
OUBLE
},
#{taxlastmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"otherfield1 != null"
>
#{otherfield1,jdbcType=VARCHAR},
...
...
@@ -352,19 +352,19 @@
MUnit = #{record.munit,jdbcType=VARCHAR},
</if>
<if
test=
"record.opernumber != null"
>
OperNumber = #{record.opernumber,jdbcType=D
OUBLE
},
OperNumber = #{record.opernumber,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.basicnumber != null"
>
BasicNumber = #{record.basicnumber,jdbcType=D
OUBLE
},
BasicNumber = #{record.basicnumber,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.unitprice != null"
>
UnitPrice = #{record.unitprice,jdbcType=D
OUBLE
},
UnitPrice = #{record.unitprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.taxunitprice != null"
>
TaxUnitPrice = #{record.taxunitprice,jdbcType=D
OUBLE
},
TaxUnitPrice = #{record.taxunitprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.allprice != null"
>
AllPrice = #{record.allprice,jdbcType=D
OUBLE
},
AllPrice = #{record.allprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.remark != null"
>
Remark = #{record.remark,jdbcType=VARCHAR},
...
...
@@ -373,7 +373,7 @@
Img = #{record.img,jdbcType=VARCHAR},
</if>
<if
test=
"record.incidentals != null"
>
Incidentals = #{record.incidentals,jdbcType=D
OUBLE
},
Incidentals = #{record.incidentals,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.depotid != null"
>
DepotId = #{record.depotid,jdbcType=BIGINT},
...
...
@@ -382,13 +382,13 @@
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT},
</if>
<if
test=
"record.taxrate != null"
>
TaxRate = #{record.taxrate,jdbcType=D
OUBLE
},
TaxRate = #{record.taxrate,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.taxmoney != null"
>
TaxMoney = #{record.taxmoney,jdbcType=D
OUBLE
},
TaxMoney = #{record.taxmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.taxlastmoney != null"
>
TaxLastMoney = #{record.taxlastmoney,jdbcType=D
OUBLE
},
TaxLastMoney = #{record.taxlastmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.otherfield1 != null"
>
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
...
...
@@ -423,19 +423,19 @@
HeaderId = #{record.headerid,jdbcType=BIGINT},
MaterialId = #{record.materialid,jdbcType=BIGINT},
MUnit = #{record.munit,jdbcType=VARCHAR},
OperNumber = #{record.opernumber,jdbcType=D
OUBLE
},
BasicNumber = #{record.basicnumber,jdbcType=D
OUBLE
},
UnitPrice = #{record.unitprice,jdbcType=D
OUBLE
},
TaxUnitPrice = #{record.taxunitprice,jdbcType=D
OUBLE
},
AllPrice = #{record.allprice,jdbcType=D
OUBLE
},
OperNumber = #{record.opernumber,jdbcType=D
ECIMAL
},
BasicNumber = #{record.basicnumber,jdbcType=D
ECIMAL
},
UnitPrice = #{record.unitprice,jdbcType=D
ECIMAL
},
TaxUnitPrice = #{record.taxunitprice,jdbcType=D
ECIMAL
},
AllPrice = #{record.allprice,jdbcType=D
ECIMAL
},
Remark = #{record.remark,jdbcType=VARCHAR},
Img = #{record.img,jdbcType=VARCHAR},
Incidentals = #{record.incidentals,jdbcType=D
OUBLE
},
Incidentals = #{record.incidentals,jdbcType=D
ECIMAL
},
DepotId = #{record.depotid,jdbcType=BIGINT},
AnotherDepotId = #{record.anotherdepotid,jdbcType=BIGINT},
TaxRate = #{record.taxrate,jdbcType=D
OUBLE
},
TaxMoney = #{record.taxmoney,jdbcType=D
OUBLE
},
TaxLastMoney = #{record.taxlastmoney,jdbcType=D
OUBLE
},
TaxRate = #{record.taxrate,jdbcType=D
ECIMAL
},
TaxMoney = #{record.taxmoney,jdbcType=D
ECIMAL
},
TaxLastMoney = #{record.taxlastmoney,jdbcType=D
ECIMAL
},
OtherField1 = #{record.otherfield1,jdbcType=VARCHAR},
OtherField2 = #{record.otherfield2,jdbcType=VARCHAR},
OtherField3 = #{record.otherfield3,jdbcType=VARCHAR},
...
...
@@ -463,19 +463,19 @@
MUnit = #{munit,jdbcType=VARCHAR},
</if>
<if
test=
"opernumber != null"
>
OperNumber = #{opernumber,jdbcType=D
OUBLE
},
OperNumber = #{opernumber,jdbcType=D
ECIMAL
},
</if>
<if
test=
"basicnumber != null"
>
BasicNumber = #{basicnumber,jdbcType=D
OUBLE
},
BasicNumber = #{basicnumber,jdbcType=D
ECIMAL
},
</if>
<if
test=
"unitprice != null"
>
UnitPrice = #{unitprice,jdbcType=D
OUBLE
},
UnitPrice = #{unitprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"taxunitprice != null"
>
TaxUnitPrice = #{taxunitprice,jdbcType=D
OUBLE
},
TaxUnitPrice = #{taxunitprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"allprice != null"
>
AllPrice = #{allprice,jdbcType=D
OUBLE
},
AllPrice = #{allprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"remark != null"
>
Remark = #{remark,jdbcType=VARCHAR},
...
...
@@ -484,7 +484,7 @@
Img = #{img,jdbcType=VARCHAR},
</if>
<if
test=
"incidentals != null"
>
Incidentals = #{incidentals,jdbcType=D
OUBLE
},
Incidentals = #{incidentals,jdbcType=D
ECIMAL
},
</if>
<if
test=
"depotid != null"
>
DepotId = #{depotid,jdbcType=BIGINT},
...
...
@@ -493,13 +493,13 @@
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT},
</if>
<if
test=
"taxrate != null"
>
TaxRate = #{taxrate,jdbcType=D
OUBLE
},
TaxRate = #{taxrate,jdbcType=D
ECIMAL
},
</if>
<if
test=
"taxmoney != null"
>
TaxMoney = #{taxmoney,jdbcType=D
OUBLE
},
TaxMoney = #{taxmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"taxlastmoney != null"
>
TaxLastMoney = #{taxlastmoney,jdbcType=D
OUBLE
},
TaxLastMoney = #{taxlastmoney,jdbcType=D
ECIMAL
},
</if>
<if
test=
"otherfield1 != null"
>
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
...
...
@@ -531,19 +531,19 @@
set HeaderId = #{headerid,jdbcType=BIGINT},
MaterialId = #{materialid,jdbcType=BIGINT},
MUnit = #{munit,jdbcType=VARCHAR},
OperNumber = #{opernumber,jdbcType=D
OUBLE
},
BasicNumber = #{basicnumber,jdbcType=D
OUBLE
},
UnitPrice = #{unitprice,jdbcType=D
OUBLE
},
TaxUnitPrice = #{taxunitprice,jdbcType=D
OUBLE
},
AllPrice = #{allprice,jdbcType=D
OUBLE
},
OperNumber = #{opernumber,jdbcType=D
ECIMAL
},
BasicNumber = #{basicnumber,jdbcType=D
ECIMAL
},
UnitPrice = #{unitprice,jdbcType=D
ECIMAL
},
TaxUnitPrice = #{taxunitprice,jdbcType=D
ECIMAL
},
AllPrice = #{allprice,jdbcType=D
ECIMAL
},
Remark = #{remark,jdbcType=VARCHAR},
Img = #{img,jdbcType=VARCHAR},
Incidentals = #{incidentals,jdbcType=D
OUBLE
},
Incidentals = #{incidentals,jdbcType=D
ECIMAL
},
DepotId = #{depotid,jdbcType=BIGINT},
AnotherDepotId = #{anotherdepotid,jdbcType=BIGINT},
TaxRate = #{taxrate,jdbcType=D
OUBLE
},
TaxMoney = #{taxmoney,jdbcType=D
OUBLE
},
TaxLastMoney = #{taxlastmoney,jdbcType=D
OUBLE
},
TaxRate = #{taxrate,jdbcType=D
ECIMAL
},
TaxMoney = #{taxmoney,jdbcType=D
ECIMAL
},
TaxLastMoney = #{taxlastmoney,jdbcType=D
ECIMAL
},
OtherField1 = #{otherfield1,jdbcType=VARCHAR},
OtherField2 = #{otherfield2,jdbcType=VARCHAR},
OtherField3 = #{otherfield3,jdbcType=VARCHAR},
...
...
src/main/resources/mapper_xml/DepotItemMapperEx.xml
View file @
1dc95653
...
...
@@ -169,7 +169,7 @@
group by m.id) cc
</select>
<select
id=
"findByTypeInIsPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findByTypeInIsPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
...
...
@@ -180,7 +180,7 @@
and MaterialId = ${MId} and dh.OperTime
<
'${MonthTime}-01 00:00:00'
</select>
<select
id=
"findByTypeInIsNotPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findByTypeInIsNotPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
...
...
@@ -192,14 +192,14 @@
and dh.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
<select
id=
"findByTypeOutIsPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findByTypeOutIsPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime
<
'${MonthTime}-01 00:00:00'
</select>
<select
id=
"findByTypeOutIsNotPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findByTypeOutIsNotPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
...
...
@@ -208,7 +208,7 @@
</select>
<select
id=
"findPriceByTypeInIsPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findPriceByTypeInIsPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(AllPrice) as AllPrice from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
...
...
@@ -219,7 +219,7 @@
and MaterialId = ${MId} and dh.OperTime
<
'${MonthTime}-01 00:00:00'
</select>
<select
id=
"findPriceByTypeInIsNotPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findPriceByTypeInIsNotPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(AllPrice) as AllPrice from jsh_depotitem di,jsh_depothead dh
where di.HeaderId = dh.id and
((type='入库' and DepotId=${ProjectId})
...
...
@@ -231,14 +231,14 @@
and dh.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
<select
id=
"findPriceByTypeOutIsPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findPriceByTypeOutIsPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
and jsh_depothead.OperTime
<
'${MonthTime}-01 00:00:00'
</select>
<select
id=
"findPriceByTypeOutIsNotPrev"
resultType=
"java.
lang.Double
"
>
<select
id=
"findPriceByTypeOutIsNotPrev"
resultType=
"java.
math.BigDecimal
"
>
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and type='出库'
and DepotId= ${ProjectId}
and MaterialId = ${MId}
...
...
@@ -246,28 +246,28 @@
and jsh_depothead.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
<select
id=
"buyOrSaleNumber"
resultType=
"java.
lang.Double
"
>
<select
id=
"buyOrSaleNumber"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime
>
= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
<select
id=
"buyOrSalePrice"
resultType=
"java.
lang.Double
"
>
<select
id=
"buyOrSalePrice"
resultType=
"java.
math.BigDecimal
"
>
select sum(AllPrice) as AllPrice from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and type='${type}' and subType='${subType}'
and MaterialId =${MId} and jsh_depothead.OperTime
>
= '${MonthTime}-01 00:00:00'
and jsh_depothead.OperTime
<
= '${MonthTime}-31 23:59:59'
</select>
<select
id=
"findGiftByTypeIn"
resultType=
"java.
lang.Double
"
>
<select
id=
"findGiftByTypeIn"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='${subType}'
and jsh_depotitem.AnotherDepotId=${ProjectId}
and jsh_depotitem.MaterialId =${MId}
</select>
<select
id=
"findGiftByTypeOut"
resultType=
"java.
lang.Double
"
>
<select
id=
"findGiftByTypeOut"
resultType=
"java.
math.BigDecimal
"
>
select sum(BasicNumber) as BasicNumber from jsh_depotitem,jsh_depothead
where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='${subType}'
and jsh_depotitem.DepotId=${ProjectId}
...
...
src/main/resources/mapper_xml/DepotMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.DepotMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Depot"
>
<!--
...
...
@@ -9,8 +9,8 @@
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"address"
jdbcType=
"VARCHAR"
property=
"address"
/>
<result
column=
"warehousing"
jdbcType=
"D
OUBLE
"
property=
"warehousing"
/>
<result
column=
"truckage"
jdbcType=
"D
OUBLE
"
property=
"truckage"
/>
<result
column=
"warehousing"
jdbcType=
"D
ECIMAL
"
property=
"warehousing"
/>
<result
column=
"truckage"
jdbcType=
"D
ECIMAL
"
property=
"truckage"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"sort"
jdbcType=
"VARCHAR"
property=
"sort"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
...
...
@@ -143,7 +143,7 @@
warehousing, truckage, type,
sort, remark)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{warehousing,jdbcType=D
OUBLE
}, #{truckage,jdbcType=D
OUBLE
}, #{type,jdbcType=INTEGER},
#{warehousing,jdbcType=D
ECIMAL
}, #{truckage,jdbcType=D
ECIMAL
}, #{type,jdbcType=INTEGER},
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Depot"
>
...
...
@@ -189,10 +189,10 @@
#{address,jdbcType=VARCHAR},
</if>
<if
test=
"warehousing != null"
>
#{warehousing,jdbcType=D
OUBLE
},
#{warehousing,jdbcType=D
ECIMAL
},
</if>
<if
test=
"truckage != null"
>
#{truckage,jdbcType=D
OUBLE
},
#{truckage,jdbcType=D
ECIMAL
},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
...
...
@@ -232,10 +232,10 @@
address = #{record.address,jdbcType=VARCHAR},
</if>
<if
test=
"record.warehousing != null"
>
warehousing = #{record.warehousing,jdbcType=D
OUBLE
},
warehousing = #{record.warehousing,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.truckage != null"
>
truckage = #{record.truckage,jdbcType=D
OUBLE
},
truckage = #{record.truckage,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.type != null"
>
type = #{record.type,jdbcType=INTEGER},
...
...
@@ -260,8 +260,8 @@
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
warehousing = #{record.warehousing,jdbcType=D
OUBLE
},
truckage = #{record.truckage,jdbcType=D
OUBLE
},
warehousing = #{record.warehousing,jdbcType=D
ECIMAL
},
truckage = #{record.truckage,jdbcType=D
ECIMAL
},
type = #{record.type,jdbcType=INTEGER},
sort = #{record.sort,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR}
...
...
@@ -283,10 +283,10 @@
address = #{address,jdbcType=VARCHAR},
</if>
<if
test=
"warehousing != null"
>
warehousing = #{warehousing,jdbcType=D
OUBLE
},
warehousing = #{warehousing,jdbcType=D
ECIMAL
},
</if>
<if
test=
"truckage != null"
>
truckage = #{truckage,jdbcType=D
OUBLE
},
truckage = #{truckage,jdbcType=D
ECIMAL
},
</if>
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
...
...
@@ -308,8 +308,8 @@
update jsh_depot
set name = #{name,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
warehousing = #{warehousing,jdbcType=D
OUBLE
},
truckage = #{truckage,jdbcType=D
OUBLE
},
warehousing = #{warehousing,jdbcType=D
ECIMAL
},
truckage = #{truckage,jdbcType=D
ECIMAL
},
type = #{type,jdbcType=INTEGER},
sort = #{sort,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR}
...
...
src/main/resources/mapper_xml/LogMapperEx.xml
View file @
1dc95653
...
...
@@ -18,10 +18,10 @@
and status=${status}
</if>
<if
test=
"beginTime != null"
>
and createtime gt;= '%${beginTime}%'
and createtime
&
gt;
= '%${beginTime}%'
</if>
<if
test=
"endTime != null"
>
and createtime lt;= '%${endTime}%'
and createtime
&
lt;
= '%${endTime}%'
</if>
<if
test=
"contentdetails != null"
>
and contentdetails like '%${contentdetails}%'
...
...
@@ -48,12 +48,12 @@
<if
test=
"status != null"
>
and status = ${status}
</if>
<if
test=
"beginTime != null"
>
and createtime
>
= '${beginTime}'
</if>
<if
test=
"endTime != null"
>
and createtime
<
= '${endTime}'
</if>
<if
test=
"beginTime != null"
>
<![CDATA[
and createtime
>
= '${beginTime}'
]]>
</if>
<if
test=
"endTime != null"
>
<![CDATA[
and createtime
<
= '${endTime}'
]]>
</if>
<if
test=
"contentdetails != null"
>
and contentdetails like '%${contentdetails}%'
</if>
...
...
src/main/resources/mapper_xml/MaterialMapper.xml
View file @
1dc95653
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jsh.erp.datasource.mappers.MaterialMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.jsh.erp.datasource.entities.Material"
>
<!--
...
...
@@ -10,17 +10,17 @@
<result
column=
"CategoryId"
jdbcType=
"BIGINT"
property=
"categoryid"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"Mfrs"
jdbcType=
"VARCHAR"
property=
"mfrs"
/>
<result
column=
"Packing"
jdbcType=
"D
OUBLE
"
property=
"packing"
/>
<result
column=
"SafetyStock"
jdbcType=
"D
OUBLE
"
property=
"safetystock"
/>
<result
column=
"Packing"
jdbcType=
"D
ECIMAL
"
property=
"packing"
/>
<result
column=
"SafetyStock"
jdbcType=
"D
ECIMAL
"
property=
"safetystock"
/>
<result
column=
"Model"
jdbcType=
"VARCHAR"
property=
"model"
/>
<result
column=
"Standard"
jdbcType=
"VARCHAR"
property=
"standard"
/>
<result
column=
"Color"
jdbcType=
"VARCHAR"
property=
"color"
/>
<result
column=
"Unit"
jdbcType=
"VARCHAR"
property=
"unit"
/>
<result
column=
"Remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"RetailPrice"
jdbcType=
"D
OUBLE
"
property=
"retailprice"
/>
<result
column=
"LowPrice"
jdbcType=
"D
OUBLE
"
property=
"lowprice"
/>
<result
column=
"PresetPriceOne"
jdbcType=
"D
OUBLE
"
property=
"presetpriceone"
/>
<result
column=
"PresetPriceTwo"
jdbcType=
"D
OUBLE
"
property=
"presetpricetwo"
/>
<result
column=
"RetailPrice"
jdbcType=
"D
ECIMAL
"
property=
"retailprice"
/>
<result
column=
"LowPrice"
jdbcType=
"D
ECIMAL
"
property=
"lowprice"
/>
<result
column=
"PresetPriceOne"
jdbcType=
"D
ECIMAL
"
property=
"presetpriceone"
/>
<result
column=
"PresetPriceTwo"
jdbcType=
"D
ECIMAL
"
property=
"presetpricetwo"
/>
<result
column=
"UnitId"
jdbcType=
"BIGINT"
property=
"unitid"
/>
<result
column=
"FirstOutUnit"
jdbcType=
"VARCHAR"
property=
"firstoutunit"
/>
<result
column=
"FirstInUnit"
jdbcType=
"VARCHAR"
property=
"firstinunit"
/>
...
...
@@ -165,10 +165,10 @@
PriceStrategy, Enabled, OtherField1,
OtherField2, OtherField3)
values (#{id,jdbcType=BIGINT}, #{categoryid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
#{mfrs,jdbcType=VARCHAR}, #{packing,jdbcType=D
OUBLE
}, #{safetystock,jdbcType=D
OUBLE
},
#{mfrs,jdbcType=VARCHAR}, #{packing,jdbcType=D
ECIMAL
}, #{safetystock,jdbcType=D
ECIMAL
},
#{model,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, #{color,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{retailprice,jdbcType=D
OUBLE
},
#{lowprice,jdbcType=D
OUBLE
}, #{presetpriceone,jdbcType=D
OUBLE
}, #{presetpricetwo,jdbcType=D
OUBLE
},
#{unit,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{retailprice,jdbcType=D
ECIMAL
},
#{lowprice,jdbcType=D
ECIMAL
}, #{presetpriceone,jdbcType=D
ECIMAL
}, #{presetpricetwo,jdbcType=D
ECIMAL
},
#{unitid,jdbcType=BIGINT}, #{firstoutunit,jdbcType=VARCHAR}, #{firstinunit,jdbcType=VARCHAR},
#{pricestrategy,jdbcType=VARCHAR}, #{enabled,jdbcType=BIT}, #{otherfield1,jdbcType=VARCHAR},
#{otherfield2,jdbcType=VARCHAR}, #{otherfield3,jdbcType=VARCHAR})
...
...
@@ -264,10 +264,10 @@
#{mfrs,jdbcType=VARCHAR},
</if>
<if
test=
"packing != null"
>
#{packing,jdbcType=D
OUBLE
},
#{packing,jdbcType=D
ECIMAL
},
</if>
<if
test=
"safetystock != null"
>
#{safetystock,jdbcType=D
OUBLE
},
#{safetystock,jdbcType=D
ECIMAL
},
</if>
<if
test=
"model != null"
>
#{model,jdbcType=VARCHAR},
...
...
@@ -285,16 +285,16 @@
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"retailprice != null"
>
#{retailprice,jdbcType=D
OUBLE
},
#{retailprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"lowprice != null"
>
#{lowprice,jdbcType=D
OUBLE
},
#{lowprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"presetpriceone != null"
>
#{presetpriceone,jdbcType=D
OUBLE
},
#{presetpriceone,jdbcType=D
ECIMAL
},
</if>
<if
test=
"presetpricetwo != null"
>
#{presetpricetwo,jdbcType=D
OUBLE
},
#{presetpricetwo,jdbcType=D
ECIMAL
},
</if>
<if
test=
"unitid != null"
>
#{unitid,jdbcType=BIGINT},
...
...
@@ -352,10 +352,10 @@
Mfrs = #{record.mfrs,jdbcType=VARCHAR},
</if>
<if
test=
"record.packing != null"
>
Packing = #{record.packing,jdbcType=D
OUBLE
},
Packing = #{record.packing,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.safetystock != null"
>
SafetyStock = #{record.safetystock,jdbcType=D
OUBLE
},
SafetyStock = #{record.safetystock,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.model != null"
>
Model = #{record.model,jdbcType=VARCHAR},
...
...
@@ -373,16 +373,16 @@
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if
test=
"record.retailprice != null"
>
RetailPrice = #{record.retailprice,jdbcType=D
OUBLE
},
RetailPrice = #{record.retailprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.lowprice != null"
>
LowPrice = #{record.lowprice,jdbcType=D
OUBLE
},
LowPrice = #{record.lowprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.presetpriceone != null"
>
PresetPriceOne = #{record.presetpriceone,jdbcType=D
OUBLE
},
PresetPriceOne = #{record.presetpriceone,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.presetpricetwo != null"
>
PresetPriceTwo = #{record.presetpricetwo,jdbcType=D
OUBLE
},
PresetPriceTwo = #{record.presetpricetwo,jdbcType=D
ECIMAL
},
</if>
<if
test=
"record.unitid != null"
>
UnitId = #{record.unitid,jdbcType=BIGINT},
...
...
@@ -423,17 +423,17 @@
CategoryId = #{record.categoryid,jdbcType=BIGINT},
Name = #{record.name,jdbcType=VARCHAR},
Mfrs = #{record.mfrs,jdbcType=VARCHAR},
Packing = #{record.packing,jdbcType=D
OUBLE
},
SafetyStock = #{record.safetystock,jdbcType=D
OUBLE
},
Packing = #{record.packing,jdbcType=D
ECIMAL
},
SafetyStock = #{record.safetystock,jdbcType=D
ECIMAL
},
Model = #{record.model,jdbcType=VARCHAR},
Standard = #{record.standard,jdbcType=VARCHAR},
Color = #{record.color,jdbcType=VARCHAR},
Unit = #{record.unit,jdbcType=VARCHAR},
Remark = #{record.remark,jdbcType=VARCHAR},
RetailPrice = #{record.retailprice,jdbcType=D
OUBLE
},
LowPrice = #{record.lowprice,jdbcType=D
OUBLE
},
PresetPriceOne = #{record.presetpriceone,jdbcType=D
OUBLE
},
PresetPriceTwo = #{record.presetpricetwo,jdbcType=D
OUBLE
},
RetailPrice = #{record.retailprice,jdbcType=D
ECIMAL
},
LowPrice = #{record.lowprice,jdbcType=D
ECIMAL
},
PresetPriceOne = #{record.presetpriceone,jdbcType=D
ECIMAL
},
PresetPriceTwo = #{record.presetpricetwo,jdbcType=D
ECIMAL
},
UnitId = #{record.unitid,jdbcType=BIGINT},
FirstOutUnit = #{record.firstoutunit,jdbcType=VARCHAR},
FirstInUnit = #{record.firstinunit,jdbcType=VARCHAR},
...
...
@@ -463,10 +463,10 @@
Mfrs = #{mfrs,jdbcType=VARCHAR},
</if>
<if
test=
"packing != null"
>
Packing = #{packing,jdbcType=D
OUBLE
},
Packing = #{packing,jdbcType=D
ECIMAL
},
</if>
<if
test=
"safetystock != null"
>
SafetyStock = #{safetystock,jdbcType=D
OUBLE
},
SafetyStock = #{safetystock,jdbcType=D
ECIMAL
},
</if>
<if
test=
"model != null"
>
Model = #{model,jdbcType=VARCHAR},
...
...
@@ -484,16 +484,16 @@
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"retailprice != null"
>
RetailPrice = #{retailprice,jdbcType=D
OUBLE
},
RetailPrice = #{retailprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"lowprice != null"
>
LowPrice = #{lowprice,jdbcType=D
OUBLE
},
LowPrice = #{lowprice,jdbcType=D
ECIMAL
},
</if>
<if
test=
"presetpriceone != null"
>
PresetPriceOne = #{presetpriceone,jdbcType=D
OUBLE
},
PresetPriceOne = #{presetpriceone,jdbcType=D
ECIMAL
},
</if>
<if
test=
"presetpricetwo != null"
>
PresetPriceTwo = #{presetpricetwo,jdbcType=D
OUBLE
},
PresetPriceTwo = #{presetpricetwo,jdbcType=D
ECIMAL
},
</if>
<if
test=
"unitid != null"
>
UnitId = #{unitid,jdbcType=BIGINT},
...
...
@@ -531,17 +531,17 @@
set CategoryId = #{categoryid,jdbcType=BIGINT},
Name = #{name,jdbcType=VARCHAR},
Mfrs = #{mfrs,jdbcType=VARCHAR},
Packing = #{packing,jdbcType=D
OUBLE
},
SafetyStock = #{safetystock,jdbcType=D
OUBLE
},
Packing = #{packing,jdbcType=D
ECIMAL
},
SafetyStock = #{safetystock,jdbcType=D
ECIMAL
},
Model = #{model,jdbcType=VARCHAR},
Standard = #{standard,jdbcType=VARCHAR},
Color = #{color,jdbcType=VARCHAR},
Unit = #{unit,jdbcType=VARCHAR},
Remark = #{remark,jdbcType=VARCHAR},
RetailPrice = #{retailprice,jdbcType=D
OUBLE
},
LowPrice = #{lowprice,jdbcType=D
OUBLE
},
PresetPriceOne = #{presetpriceone,jdbcType=D
OUBLE
},
PresetPriceTwo = #{presetpricetwo,jdbcType=D
OUBLE
},
RetailPrice = #{retailprice,jdbcType=D
ECIMAL
},
LowPrice = #{lowprice,jdbcType=D
ECIMAL
},
PresetPriceOne = #{presetpriceone,jdbcType=D
ECIMAL
},
PresetPriceTwo = #{presetpricetwo,jdbcType=D
ECIMAL
},
UnitId = #{unitid,jdbcType=BIGINT},
FirstOutUnit = #{firstoutunit,jdbcType=VARCHAR},
FirstInUnit = #{firstinunit,jdbcType=VARCHAR},
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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