Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
56d4700b
Commit
56d4700b
authored
Jan 09, 2020
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-invoice-modular' into dev
parents
dbb93607
3d99ed2f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
5 deletions
+26
-5
QueryOrderDTO.java
...ava/com/xxfc/platform/order/pojo/order/QueryOrderDTO.java
+3
-0
OrderInvoiceBiz.java
...ain/java/com/xxfc/platform/order/biz/OrderInvoiceBiz.java
+10
-1
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+8
-0
InvoiceController.java
...xxfc/platform/universal/controller/InvoiceController.java
+1
-1
InvoiceDaoImpl.java
...atform/universal/service/invoice/impl/InvoiceDaoImpl.java
+4
-3
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/QueryOrderDTO.java
View file @
56d4700b
...
...
@@ -43,4 +43,7 @@ public class QueryOrderDTO extends PageParam {
* 开票状态,0未开票,1已开票
*/
private
Integer
invoiceStatus
;
private
String
orderIds
;
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderInvoiceBiz.java
View file @
56d4700b
...
...
@@ -28,6 +28,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import
tk.mybatis.mapper.entity.Example
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigDecimal
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -51,6 +52,10 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
@Autowired
ThirdFeign
thirdFeign
;
@Autowired
OrderAccountBiz
orderAccountBiz
;
/**
* 添加发票记录
* @return
...
...
@@ -86,7 +91,11 @@ public class OrderInvoiceBiz extends BaseBiz<OrderInvoiceMapper, OrderInvoice> {
if
(
baseOrder
.
getType
()
==
OrderTypeEnum
.
MEMBER
.
getCode
())
{
orderData
.
setOrderName
(
OrderTypeEnum
.
MEMBER
.
getDesc
());
}
orderData
.
setPrice
(
baseOrder
.
getRealAmount
());
BigDecimal
cost
=
orderAccountBiz
.
getAllOrderCost
(
baseOrder
.
getId
());
log
.
info
(
"{}退款费用总计:{}"
,
baseOrder
.
getNo
(),
cost
);
log
.
info
(
"{}订单实际金额:{}"
,
baseOrder
.
getNo
(),
baseOrder
.
getRealAmount
());
orderData
.
setPrice
(
baseOrder
.
getRealAmount
().
multiply
(
cost
));
log
.
info
(
"{}用户实际支付金额: {}"
,
baseOrder
.
getNo
(),
orderData
.
getPrice
());
list
.
add
(
orderData
);
continue
;
}
else
{
//已开票
...
...
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
56d4700b
...
...
@@ -101,6 +101,14 @@
</foreach>
)
</if>
<if
test=
"orderIds != null and orderIds != ''"
>
and
(
<foreach
collection=
"orderIds.split(',')"
index=
"sIndex"
item=
"orderId"
separator=
" or "
>
id = #{orderId}
</foreach>
)
</if>
<if
test=
"multiTypes != null"
>
and
(
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/InvoiceController.java
View file @
56d4700b
...
...
@@ -64,7 +64,7 @@ public class InvoiceController extends BaseController<InvoiceBiz, Invoice> {
try
{
String
invoicing
=
baseBiz
.
Invoicing
(
invoiceVo
);
return
ObjectRestResponse
.
succ
(
invoicing
);
}
catch
(
JSON
Exception
e
)
{
}
catch
(
Base
Exception
e
)
{
log
.
error
(
"开票错误信息={}"
,
e
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
e
.
getMessage
());
}
catch
(
Exception
e
)
{
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/invoice/impl/InvoiceDaoImpl.java
View file @
56d4700b
...
...
@@ -178,15 +178,16 @@ public class InvoiceDaoImpl implements InvoiceDao {
//调用第三方接口
String
result
=
sdk
.
sendPostSyncRequest
(
invoiceUrl
,
senid
,
appKey2
,
appSecret2
,
token
,
taxnum2
,
method
,
jsonString
);
//把字符串json数据转换为map
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
try
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
result
);
Map
<
String
,
String
>
data
=
(
Map
<
String
,
String
>)
jsonObject
.
get
(
"result"
);
String
invoiceSerialNum
=
data
.
get
(
"invoiceSerialNum"
);
return
invoiceSerialNum
;
}
catch
(
JSON
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"失败原因={}"
,
result
);
throw
new
JSON
Exception
(
result
);
throw
new
Base
Exception
(
result
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment