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
16b51948
Commit
16b51948
authored
Jul 01, 2021
by
季圣华
Browse files
优化财务单据
parent
c5b7a447
Changes
8
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
16b51948
...
@@ -231,10 +231,10 @@ public class DepotHeadController {
...
@@ -231,10 +231,10 @@ public class DepotHeadController {
allPrice
=
p1
.
subtract
(
p2
);
allPrice
=
p1
.
subtract
(
p2
);
}
else
if
(
type
.
equals
(
"采购退货出库"
))
{
}
else
if
(
type
.
equals
(
"采购退货出库"
))
{
allPrice
=
p1
.
subtract
(
p2
);
allPrice
=
p1
.
subtract
(
p2
);
}
else
if
(
type
.
equals
(
"付款"
))
{
allPrice
=
p1
.
add
(
p2
);
}
else
if
(
type
.
equals
(
"收款"
))
{
}
else
if
(
type
.
equals
(
"收款"
))
{
allPrice
=
BigDecimal
.
ZERO
.
subtract
(
p1
.
add
(
p2
));
allPrice
=
BigDecimal
.
ZERO
.
subtract
(
p1
);
}
else
if
(
type
.
equals
(
"付款"
))
{
allPrice
=
p1
;
}
else
if
(
type
.
equals
(
"收入"
))
{
}
else
if
(
type
.
equals
(
"收入"
))
{
allPrice
=
p1
.
subtract
(
p2
);
allPrice
=
p1
.
subtract
(
p2
);
}
else
if
(
type
.
equals
(
"支出"
))
{
}
else
if
(
type
.
equals
(
"支出"
))
{
...
...
jshERP-boot/src/main/java/com/jsh/erp/controller/SystemConfigController.java
View file @
16b51948
...
@@ -17,16 +17,17 @@ import org.slf4j.Logger;
...
@@ -17,16 +17,17 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.util.AntPathMatcher
;
import
org.springframework.util.FileCopyUtils
;
import
org.springframework.util.FileCopyUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
import
org.springframework.web.servlet.HandlerMapping
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.*
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -192,4 +193,76 @@ public class SystemConfigController {
...
@@ -192,4 +193,76 @@ public class SystemConfigController {
}
}
return
""
;
return
""
;
}
}
/**
* 预览图片&下载文件
* 请求地址:http://localhost:8080/common/static/{financial/afsdfasdfasdf_1547866868179.txt}
*
* @param request
* @param response
*/
@GetMapping
(
value
=
"/static/**"
)
public
void
view
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
// ISO-8859-1 ==> UTF-8 进行编码转换
String
imgPath
=
extractPathFromPattern
(
request
);
if
(
StringUtil
.
isEmpty
(
imgPath
)
||
imgPath
==
"null"
){
return
;
}
// 其余处理略
InputStream
inputStream
=
null
;
OutputStream
outputStream
=
null
;
try
{
imgPath
=
imgPath
.
replace
(
".."
,
""
);
if
(
imgPath
.
endsWith
(
","
))
{
imgPath
=
imgPath
.
substring
(
0
,
imgPath
.
length
()
-
1
);
}
String
fileUrl
=
filePath
+
File
.
separator
+
imgPath
;
File
file
=
new
File
(
fileUrl
);
if
(!
file
.
exists
()){
response
.
setStatus
(
404
);
throw
new
RuntimeException
(
"文件不存在.."
);
}
response
.
setContentType
(
"application/force-download"
);
// 设置强制下载不打开
response
.
addHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
file
.
getName
().
getBytes
(
"UTF-8"
),
"iso-8859-1"
));
inputStream
=
new
BufferedInputStream
(
new
FileInputStream
(
fileUrl
));
outputStream
=
response
.
getOutputStream
();
byte
[]
buf
=
new
byte
[
1024
];
int
len
;
while
((
len
=
inputStream
.
read
(
buf
))
>
0
)
{
outputStream
.
write
(
buf
,
0
,
len
);
}
response
.
flushBuffer
();
}
catch
(
IOException
e
)
{
logger
.
error
(
"预览文件失败"
+
e
.
getMessage
());
response
.
setStatus
(
404
);
e
.
printStackTrace
();
}
finally
{
if
(
inputStream
!=
null
)
{
try
{
inputStream
.
close
();
}
catch
(
IOException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
}
if
(
outputStream
!=
null
)
{
try
{
outputStream
.
close
();
}
catch
(
IOException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
}
}
}
/**
* 把指定URL后的字符串全部截断当成参数
* 这么做是为了防止URL中包含中文或者特殊字符(/等)时,匹配不了的问题
* @param request
* @return
*/
private
static
String
extractPathFromPattern
(
final
HttpServletRequest
request
)
{
String
path
=
(
String
)
request
.
getAttribute
(
HandlerMapping
.
PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE
);
String
bestMatchPattern
=
(
String
)
request
.
getAttribute
(
HandlerMapping
.
BEST_MATCHING_PATTERN_ATTRIBUTE
);
return
new
AntPathMatcher
().
extractPathWithinPattern
(
bestMatchPattern
,
path
);
}
}
}
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHead.java
View file @
16b51948
...
@@ -16,6 +16,8 @@ public class AccountHead {
...
@@ -16,6 +16,8 @@ public class AccountHead {
private
BigDecimal
changeAmount
;
private
BigDecimal
changeAmount
;
private
BigDecimal
discountMoney
;
private
BigDecimal
totalPrice
;
private
BigDecimal
totalPrice
;
private
Long
accountId
;
private
Long
accountId
;
...
@@ -80,6 +82,14 @@ public class AccountHead {
...
@@ -80,6 +82,14 @@ public class AccountHead {
this
.
changeAmount
=
changeAmount
;
this
.
changeAmount
=
changeAmount
;
}
}
public
BigDecimal
getDiscountMoney
()
{
return
discountMoney
;
}
public
void
setDiscountMoney
(
BigDecimal
discountMoney
)
{
this
.
discountMoney
=
discountMoney
;
}
public
BigDecimal
getTotalPrice
()
{
public
BigDecimal
getTotalPrice
()
{
return
totalPrice
;
return
totalPrice
;
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHeadExample.java
View file @
16b51948
...
@@ -476,6 +476,66 @@ public class AccountHeadExample {
...
@@ -476,6 +476,66 @@ public class AccountHeadExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andDiscountMoneyIsNull
()
{
addCriterion
(
"discount_money is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyIsNotNull
()
{
addCriterion
(
"discount_money is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"discount_money ="
,
value
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"discount_money <>"
,
value
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"discount_money >"
,
value
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"discount_money >="
,
value
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyLessThan
(
BigDecimal
value
)
{
addCriterion
(
"discount_money <"
,
value
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"discount_money <="
,
value
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"discount_money in"
,
values
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"discount_money not in"
,
values
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"discount_money between"
,
value1
,
value2
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDiscountMoneyNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"discount_money not between"
,
value1
,
value2
,
"discountMoney"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTotalPriceIsNull
()
{
public
Criteria
andTotalPriceIsNull
()
{
addCriterion
(
"total_price is null"
);
addCriterion
(
"total_price is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/AccountHeadVo4ListEx.java
View file @
16b51948
...
@@ -3,150 +3,18 @@ package com.jsh.erp.datasource.entities;
...
@@ -3,150 +3,18 @@ package com.jsh.erp.datasource.entities;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
public
class
AccountHeadVo4ListEx
{
public
class
AccountHeadVo4ListEx
extends
AccountHead
{
private
Long
id
;
private
String
type
;
private
Long
organId
;
private
Long
handsPersonId
;
private
BigDecimal
changeAmount
;
private
BigDecimal
totalPrice
;
private
Long
accountId
;
private
String
billNo
;
private
Date
billTime
;
private
String
remark
;
private
String
fileName
;
private
Long
tenantId
;
private
String
deleteFlag
;
private
String
organName
;
private
String
organName
;
private
String
handsPersonName
;
private
String
handsPersonName
;
private
Long
creator
;
private
String
userName
;
private
String
userName
;
private
String
accountName
;
private
String
accountName
;
private
String
billTimeStr
;
private
String
billTimeStr
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
public
Long
getOrganId
()
{
return
organId
;
}
public
void
setOrganId
(
Long
organId
)
{
this
.
organId
=
organId
;
}
public
Long
getHandsPersonId
()
{
return
handsPersonId
;
}
public
void
setHandsPersonId
(
Long
handsPersonId
)
{
this
.
handsPersonId
=
handsPersonId
;
}
public
BigDecimal
getChangeAmount
()
{
return
changeAmount
;
}
public
void
setChangeAmount
(
BigDecimal
changeAmount
)
{
this
.
changeAmount
=
changeAmount
;
}
public
BigDecimal
getTotalPrice
()
{
return
totalPrice
;
}
public
void
setTotalPrice
(
BigDecimal
totalPrice
)
{
this
.
totalPrice
=
totalPrice
;
}
public
Long
getAccountId
()
{
return
accountId
;
}
public
void
setAccountId
(
Long
accountId
)
{
this
.
accountId
=
accountId
;
}
public
String
getBillNo
()
{
return
billNo
;
}
public
void
setBillNo
(
String
billNo
)
{
this
.
billNo
=
billNo
;
}
public
Date
getBillTime
()
{
return
billTime
;
}
public
void
setBillTime
(
Date
billTime
)
{
this
.
billTime
=
billTime
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
Long
getTenantId
()
{
return
tenantId
;
}
public
void
setTenantId
(
Long
tenantId
)
{
this
.
tenantId
=
tenantId
;
}
public
String
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
String
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
String
getOrganName
()
{
public
String
getOrganName
()
{
return
organName
;
return
organName
;
}
}
...
@@ -163,14 +31,6 @@ public class AccountHeadVo4ListEx {
...
@@ -163,14 +31,6 @@ public class AccountHeadVo4ListEx {
this
.
handsPersonName
=
handsPersonName
;
this
.
handsPersonName
=
handsPersonName
;
}
}
public
Long
getCreator
()
{
return
creator
;
}
public
void
setCreator
(
Long
creator
)
{
this
.
creator
=
creator
;
}
public
String
getUserName
()
{
public
String
getUserName
()
{
return
userName
;
return
userName
;
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/filter/LogCostFilter.java
View file @
16b51948
...
@@ -18,8 +18,9 @@ import java.util.regex.Pattern;
...
@@ -18,8 +18,9 @@ import java.util.regex.Pattern;
@WebFilter
(
filterName
=
"LogCostFilter"
,
urlPatterns
=
{
"/*"
},
@WebFilter
(
filterName
=
"LogCostFilter"
,
urlPatterns
=
{
"/*"
},
initParams
=
{
@WebInitParam
(
name
=
"ignoredUrl"
,
value
=
".ico"
),
initParams
=
{
@WebInitParam
(
name
=
"ignoredUrl"
,
value
=
".ico"
),
@WebInitParam
(
name
=
"filterPath"
,
@WebInitParam
(
name
=
"filterPath"
,
value
=
"/jshERP-boot/user/login#/jshERP-boot/user/registerUser#/jshERP-boot/user/randomImage"
+
value
=
"/jshERP-boot/user/login#/jshERP-boot/user/registerUser#/jshERP-boot/user/randomImage#"
+
"#/jshERP-boot/platformConfig/getPlatform#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars"
)})
"/jshERP-boot/platformConfig/getPlatform#/jshERP-boot/v2/api-docs#/jshERP-boot/webjars#"
+
"/jshERP-boot/systemConfig/static"
)})
public
class
LogCostFilter
implements
Filter
{
public
class
LogCostFilter
implements
Filter
{
private
static
final
String
FILTER_PATH
=
"filterPath"
;
private
static
final
String
FILTER_PATH
=
"filterPath"
;
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/accountHead/AccountHeadService.java
View file @
16b51948
...
@@ -18,6 +18,7 @@ import com.jsh.erp.utils.StringUtil;
...
@@ -18,6 +18,7 @@ import com.jsh.erp.utils.StringUtil;
import
com.jsh.erp.utils.Tools
;
import
com.jsh.erp.utils.Tools
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
...
@@ -49,6 +50,8 @@ public class AccountHeadService {
...
@@ -49,6 +50,8 @@ public class AccountHeadService {
private
LogService
logService
;
private
LogService
logService
;
@Resource
@Resource
private
AccountItemMapperEx
accountItemMapperEx
;
private
AccountItemMapperEx
accountItemMapperEx
;
@Value
(
value
=
"${file.path}"
)
private
String
filePath
;
public
AccountHead
getAccountHead
(
long
id
)
throws
Exception
{
public
AccountHead
getAccountHead
(
long
id
)
throws
Exception
{
AccountHead
result
=
null
;
AccountHead
result
=
null
;
...
@@ -85,27 +88,26 @@ public class AccountHeadService {
...
@@ -85,27 +88,26 @@ public class AccountHeadService {
}
}
public
List
<
AccountHeadVo4ListEx
>
select
(
String
type
,
String
roleType
,
String
billNo
,
String
beginTime
,
String
endTime
,
int
offset
,
int
rows
)
throws
Exception
{
public
List
<
AccountHeadVo4ListEx
>
select
(
String
type
,
String
roleType
,
String
billNo
,
String
beginTime
,
String
endTime
,
int
offset
,
int
rows
)
throws
Exception
{
List
<
AccountHeadVo4ListEx
>
resList
=
new
ArrayList
<
AccountHeadVo4ListEx
>();
List
<
AccountHeadVo4ListEx
>
resList
=
new
ArrayList
<>();
List
<
AccountHeadVo4ListEx
>
list
=
null
;
try
{
try
{
String
[]
creatorArray
=
getCreatorArray
(
roleType
);
String
[]
creatorArray
=
getCreatorArray
(
roleType
);
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
list
=
accountHeadMapperEx
.
selectByConditionAccountHead
(
type
,
creatorArray
,
billNo
,
beginTime
,
endTime
,
offset
,
rows
);
List
<
AccountHeadVo4ListEx
>
list
=
accountHeadMapperEx
.
selectByConditionAccountHead
(
type
,
creatorArray
,
billNo
,
beginTime
,
endTime
,
offset
,
rows
);
}
catch
(
Exception
e
){
if
(
null
!=
list
)
{
JshException
.
readFail
(
logger
,
e
);
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
}
if
(
ah
.
getChangeAmount
()
!=
null
)
{
if
(
null
!=
list
)
{
ah
.
setChangeAmount
(
ah
.
getChangeAmount
().
abs
());
for
(
AccountHeadVo4ListEx
ah
:
list
)
{
}
if
(
ah
.
getChangeAmount
()
!=
null
)
{
if
(
ah
.
getTotalPrice
()
!=
null
)
{
ah
.
setChangeAmount
(
ah
.
getChangeAmount
().
abs
());
ah
.
setTotalPrice
(
ah
.
getTotalPrice
().
abs
());
}
ah
.
setBillTimeStr
(
getCenternTime
(
ah
.
getBillTime
()));
resList
.
add
(
ah
);
}
}
if
(
ah
.
getTotalPrice
()
!=
null
)
{
ah
.
setTotalPrice
(
ah
.
getTotalPrice
().
abs
());
}
ah
.
setBillTimeStr
(
getCenternTime
(
ah
.
getBillTime
()));
resList
.
add
(
ah
);
}
}
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
}
return
resList
;
return
resList
;
}
}
...
@@ -315,8 +317,8 @@ public class AccountHeadService {
...
@@ -315,8 +317,8 @@ public class AccountHeadService {
i
=
-
1
;
i
=
-
1
;
}
}
//收付款部分
//收付款部分
sum
=
sum
.
add
((
allMoney
(
getS
,
"
付
款"
,
"合计"
,
endTime
)
.
add
(
allMoney
(
getS
,
"付款"
,
"实际"
,
endTime
))
).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"
收
款"
,
"合计"
,
endTime
)).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"
收
款"
,
"合计"
,
endTime
)
.
add
(
allMoney
(
getS
,
"收款"
,
"实际"
,
endTime
))
).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
add
((
allMoney
(
getS
,
"
付
款"
,
"合计"
,
endTime
)).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
add
((
allMoney
(
getS
,
"收入"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"收入"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
add
((
allMoney
(
getS
,
"收入"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"收入"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"支出"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"支出"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
sum
=
sum
.
subtract
((
allMoney
(
getS
,
"支出"
,
"合计"
,
endTime
).
subtract
(
allMoney
(
getS
,
"支出"
,
"实际"
,
endTime
))).
multiply
(
new
BigDecimal
(
i
)));
return
sum
;
return
sum
;
...
...
jshERP-boot/src/main/resources/mapper_xml/AccountHeadMapper.xml
View file @
16b51948
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
<result
column=
"hands_person_id"
jdbcType=
"BIGINT"
property=
"handsPersonId"
/>
<result
column=
"hands_person_id"
jdbcType=
"BIGINT"
property=
"handsPersonId"
/>
<result
column=
"creator"
jdbcType=
"BIGINT"
property=
"creator"
/>
<result
column=
"creator"
jdbcType=
"BIGINT"
property=
"creator"
/>
<result
column=
"change_amount"
jdbcType=
"DECIMAL"
property=
"changeAmount"
/>
<result
column=
"change_amount"
jdbcType=
"DECIMAL"
property=
"changeAmount"
/>
<result
column=
"discount_money"
jdbcType=
"DECIMAL"
property=
"discountMoney"
/>
<result
column=
"total_price"
jdbcType=
"DECIMAL"
property=
"totalPrice"
/>
<result
column=
"total_price"
jdbcType=
"DECIMAL"
property=
"totalPrice"
/>
<result
column=
"account_id"
jdbcType=
"BIGINT"
property=
"accountId"
/>
<result
column=
"account_id"
jdbcType=
"BIGINT"
property=
"accountId"
/>
<result
column=
"bill_no"
jdbcType=
"VARCHAR"
property=
"billNo"
/>
<result
column=
"bill_no"
jdbcType=
"VARCHAR"
property=
"billNo"
/>
...
@@ -76,8 +77,8 @@
...
@@ -76,8 +77,8 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, type, organ_id, hands_person_id, creator, change_amount,
total_price, account_id
,
id, type, organ_id, hands_person_id, creator, change_amount,
discount_money, total_price
,
bill_no, bill_time, remark, file_name, tenant_id, delete_flag
account_id,
bill_no, bill_time, remark, file_name, tenant_id, delete_flag
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.AccountHeadExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -112,14 +113,16 @@
...
@@ -112,14 +113,16 @@
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
insert into jsh_account_head (id, type, organ_id,
insert into jsh_account_head (id, type, organ_id,
hands_person_id, creator, change_amount,
hands_person_id, creator, change_amount,
total_price, account_id, bill_no,
discount_money, total_price, account_id,
bill_time, remark, file_name,
bill_no, bill_time, remark,
tenant_id, delete_flag)
file_name, tenant_id, delete_flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{organId,jdbcType=BIGINT},
#{handsPersonId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{handsPersonId,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{changeAmount,jdbcType=DECIMAL},
#{totalPrice,jdbcType=DECIMAL}, #{accountId,jdbcType=BIGINT}, #{billNo,jdbcType=VARCHAR},
#{discountMoney,jdbcType=DECIMAL}, #{totalPrice,jdbcType=DECIMAL}, #{accountId,jdbcType=BIGINT},
#{billTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR},
#{billNo,jdbcType=VARCHAR}, #{billTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
#{fileName,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.AccountHead"
>
insert into jsh_account_head
insert into jsh_account_head
...
@@ -142,6 +145,9 @@
...
@@ -142,6 +145,9 @@
<if
test=
"changeAmount != null"
>
<if
test=
"changeAmount != null"
>
change_amount,
change_amount,
</if>
</if>
<if
test=
"discountMoney != null"
>
discount_money,
</if>
<if
test=
"totalPrice != null"
>
<if
test=
"totalPrice != null"
>
total_price,
total_price,
</if>
</if>
...
@@ -186,6 +192,9 @@
...
@@ -186,6 +192,9 @@
<if
test=
"changeAmount != null"
>
<if
test=
"changeAmount != null"
>
#{changeAmount,jdbcType=DECIMAL},
#{changeAmount,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"discountMoney != null"
>
#{discountMoney,jdbcType=DECIMAL},
</if>
<if
test=
"totalPrice != null"
>
<if
test=
"totalPrice != null"
>
#{totalPrice,jdbcType=DECIMAL},
#{totalPrice,jdbcType=DECIMAL},
</if>
</if>
...
@@ -239,6 +248,9 @@
...
@@ -239,6 +248,9 @@
<if
test=
"record.changeAmount != null"
>
<if
test=
"record.changeAmount != null"
>
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"record.discountMoney != null"
>
discount_money = #{record.discountMoney,jdbcType=DECIMAL},
</if>
<if
test=
"record.totalPrice != null"
>
<if
test=
"record.totalPrice != null"
>
total_price = #{record.totalPrice,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
</if>
</if>
...
@@ -276,6 +288,7 @@
...
@@ -276,6 +288,7 @@
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
hands_person_id = #{record.handsPersonId,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
change_amount = #{record.changeAmount,jdbcType=DECIMAL},
discount_money = #{record.discountMoney,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
total_price = #{record.totalPrice,jdbcType=DECIMAL},
account_id = #{record.accountId,jdbcType=BIGINT},
account_id = #{record.accountId,jdbcType=BIGINT},
bill_no = #{record.billNo,jdbcType=VARCHAR},
bill_no = #{record.billNo,jdbcType=VARCHAR},
...
@@ -306,6 +319,9 @@
...
@@ -306,6 +319,9 @@
<if
test=
"changeAmount != null"
>
<if
test=
"changeAmount != null"
>
change_amount = #{changeAmount,jdbcType=DECIMAL},
change_amount = #{changeAmount,jdbcType=DECIMAL},
</if>
</if>
<if
test=
"discountMoney != null"
>
discount_money = #{discountMoney,jdbcType=DECIMAL},
</if>
<if
test=
"totalPrice != null"
>
<if
test=
"totalPrice != null"
>
total_price = #{totalPrice,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
</if>
</if>
...
@@ -340,6 +356,7 @@
...
@@ -340,6 +356,7 @@
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
hands_person_id = #{handsPersonId,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
creator = #{creator,jdbcType=BIGINT},
change_amount = #{changeAmount,jdbcType=DECIMAL},
change_amount = #{changeAmount,jdbcType=DECIMAL},
discount_money = #{discountMoney,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
total_price = #{totalPrice,jdbcType=DECIMAL},
account_id = #{accountId,jdbcType=BIGINT},
account_id = #{accountId,jdbcType=BIGINT},
bill_no = #{billNo,jdbcType=VARCHAR},
bill_no = #{billNo,jdbcType=VARCHAR},
...
...
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