Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
4b06a432
Commit
4b06a432
authored
Nov 28, 2020
by
卜远杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化人员新增
parent
b76f6404
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
234 additions
and
24 deletions
+234
-24
invoiceform.html
...eb/src/main/webapp/WEB-INF/views/invoice/invoiceform.html
+114
-3
invoicelist.html
...eb/src/main/webapp/WEB-INF/views/invoice/invoicelist.html
+29
-2
InvoiceMapper.xml
...le/src/main/java/com/cftech/invoice/dao/InvoiceMapper.xml
+14
-2
Invoice.java
...odule/src/main/java/com/cftech/invoice/model/Invoice.java
+8
-0
InvoiceController.java
...c/main/java/com/cftech/invoice/web/InvoiceController.java
+17
-0
OrderServiceImpl.java
.../java/com/cftech/order/service/impl/OrderServiceImpl.java
+13
-4
InvoiceUtil.java
...ule/src/main/java/com/cftech/order/utils/InvoiceUtil.java
+10
-4
OrderController.java
...e/src/main/java/com/cftech/order/web/OrderController.java
+9
-2
qyuseradd.html
...rc/main/webapp/WEB-INF/views/managerqyuser/qyuseradd.html
+4
-4
qyuserlist.html
...c/main/webapp/WEB-INF/views/managerqyuser/qyuserlist.html
+7
-1
QyuserController.java
...c/main/java/com/cftech/base/org/web/QyuserController.java
+9
-2
No files found.
aidea-modules/invoice-module-web/src/main/webapp/WEB-INF/views/invoice/invoiceform.html
View file @
4b06a432
...
@@ -77,10 +77,121 @@
...
@@ -77,10 +77,121 @@
<div
class=
"box-body"
>
<div
class=
"box-body"
>
</div>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
发票抬头
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.invoiceTitle}"
maxlength=
"500"
required
name=
"productName"
placeholder=
"发票抬头"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
抬头类型
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.status}"
maxlength=
"500"
required
name=
"status"
placeholder=
"抬头类型"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
发票内容
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.invoiceContent}"
maxlength=
"500"
required
name=
"invoiceContent"
placeholder=
"发票内容"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
发票类型
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.invoiceType}"
maxlength=
"500"
required
name=
"invoiceType"
placeholder=
"发票类型"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
来源
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.invoiceForm}"
maxlength=
"500"
required
name=
"invoiceForm"
placeholder=
"来源"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
发票内容
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.invoiceContent}"
maxlength=
"500"
required
name=
"invoiceContent"
placeholder=
"发票内容"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
开票人
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.clerkId}"
maxlength=
"500"
required
name=
"clerkId"
placeholder=
"开票人"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
openId
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.openId}"
maxlength=
"500"
required
name=
"openId"
placeholder=
"openId"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
操作人
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.operator}"
maxlength=
"500"
required
name=
"operator"
placeholder=
"operator"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
订单编码
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.orderId}"
maxlength=
"500"
required
name=
"orderId"
placeholder=
"订单编码"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
推送方式
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.pushMode}"
maxlength=
"500"
required
name=
"pushMode"
placeholder=
"推送方式"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
推送邮箱
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.email}"
maxlength=
"500"
required
name=
"email"
placeholder=
"推送邮箱"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
发票流水号
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.invoiceSerialNum}"
maxlength=
"500"
required
name=
"invoiceSerialNum"
placeholder=
"发票流水号"
>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
>
<label>
创建时间
</label>
<input
type=
"text"
required
class=
"form-control pull-right"
readonly
value=
"$!{data.description}"
maxlength=
"500"
required
name=
"description"
placeholder=
"创建时间"
>
</div>
<div
class=
"box-footer"
>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:invoice:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/invoice/list')"
class=
"btn btn-default"
>
取消
</a>
<a
href=
"#springUrl('/a/invoice/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</div>
</form>
</form>
...
...
aidea-modules/invoice-module-web/src/main/webapp/WEB-INF/views/invoice/invoicelist.html
View file @
4b06a432
...
@@ -103,6 +103,8 @@
...
@@ -103,6 +103,8 @@
<td>
发票类型
</td>
<td>
发票类型
</td>
<td>
来源
</td>
<td>
来源
</td>
<td>
开票人
</td>
<td>
开票人
</td>
<td>
openId
</td>
<td>
操作人
</td>
<td>
订单编码
</td>
<td>
订单编码
</td>
<td>
推送方式
</td>
<td>
推送方式
</td>
<td>
推送邮箱
</td>
<td>
推送邮箱
</td>
...
@@ -225,6 +227,11 @@
...
@@ -225,6 +227,11 @@
{
{
"mData"
:
"clerkId"
"mData"
:
"clerkId"
},
},
{
"mData"
:
"openId"
},{
"mData"
:
"operator"
},
{
{
"mData"
:
"orderId"
"mData"
:
"orderId"
},
},
...
@@ -239,6 +246,8 @@
...
@@ -239,6 +246,8 @@
},
},
{
{
"mData"
:
"createTime"
"mData"
:
"createTime"
},{
"mData"
:
"id"
}],
}],
"aoColumnDefs"
:
[
"aoColumnDefs"
:
[
{
// set default column settings
{
// set default column settings
...
@@ -291,7 +300,7 @@
...
@@ -291,7 +300,7 @@
},
},
{
{
"aTargets"
:
[
9
],
"aTargets"
:
[
11
],
"mData"
:
"pushMode"
,
"mData"
:
"pushMode"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
0
){
if
(
a
==
0
){
...
@@ -304,12 +313,30 @@
...
@@ -304,12 +313,30 @@
},
},
{
{
"aTargets"
:
[
1
2
],
"aTargets"
:
[
1
4
],
"mData"
:
"createTime"
,
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
}
},
},
{
"aTargets"
:
[
15
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
var
html
=
'#if($shiro.hasPermission("qy:invoice:edit"))'
;
html
+=
'<div class="btn-group" style="min-width: 100px;">
\
n'
+
'<button type="button" class="btn btn-success btn-flat">操作</button>
\
n'
+
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">
\
n'
+
' <span class="caret"></span>
\
n'
+
' <span class="sr-only">Toggle Dropdown</span>
\
n'
+
'</button>
\
n'
+
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">
\
n'
;
html
+=
'<li><a href="#springUrl("/a/invoice/form?id='
+
a
+
'")">查看</a></li>'
;
html
+=
'</ul>'
;
html
+=
'#end'
;
return
html
;
}
}
]
]
});
});
...
...
aidea-modules/invoice-module/src/main/java/com/cftech/invoice/dao/InvoiceMapper.xml
View file @
4b06a432
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
<result
column=
"description"
property=
"description"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"operator"
property=
"operator"
/>
<result
column=
"openId"
property=
"openId"
/>
</resultMap>
</resultMap>
<sql
id=
"sqlWhere"
>
<sql
id=
"sqlWhere"
>
...
@@ -72,7 +74,9 @@
...
@@ -72,7 +74,9 @@
update_time,
update_time,
description,
description,
create_by,
create_by,
update_by
update_by,
operator,
open_id
</sql>
</sql>
...
@@ -103,7 +107,9 @@
...
@@ -103,7 +107,9 @@
now(),
now(),
#{description, jdbcType=VARCHAR},
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
#{updateBy, jdbcType=BIGINT},
#{operator, jdbcType=VARCHAR},
#{openId, jdbcType=VARCHAR}
)
)
</insert>
</insert>
...
@@ -189,6 +195,12 @@
...
@@ -189,6 +195,12 @@
<if
test=
"updateBy != null"
>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</if>
<if
test=
"operator != null"
>
operator = #{operator,jdbcType=VARCHAR},
</if>
<if
test=
"openId != null"
>
open_id = #{openId,jdbcType=VARCHAR},
</if>
</set>
</set>
where id=#{id,jdbcType=BIGINT}
where id=#{id,jdbcType=BIGINT}
</update>
</update>
...
...
aidea-modules/invoice-module/src/main/java/com/cftech/invoice/model/Invoice.java
View file @
4b06a432
...
@@ -69,6 +69,14 @@ public class Invoice implements Serializable {
...
@@ -69,6 +69,14 @@ public class Invoice implements Serializable {
private
Long
createBy
;
private
Long
createBy
;
/** 更新人 */
/** 更新人 */
private
Long
updateBy
;
private
Long
updateBy
;
/**
* openId
*/
private
String
openId
;
/**
* 操作者
*/
private
String
operator
;
public
Invoice
()
{
public
Invoice
()
{
this
.
delFlag
=
false
;
this
.
delFlag
=
false
;
...
...
aidea-modules/invoice-module/src/main/java/com/cftech/invoice/web/InvoiceController.java
View file @
4b06a432
...
@@ -24,6 +24,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -24,6 +24,7 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
import
java.util.List
;
...
@@ -64,6 +65,22 @@ public class InvoiceController {
...
@@ -64,6 +65,22 @@ public class InvoiceController {
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Invoice
invoice
=
invoiceService
.
fetchById
(
id
);
Invoice
invoice
=
invoiceService
.
fetchById
(
id
);
if
(!
StringUtils
.
isEmpty
(
invoice
.
getInvoiceType
())){
invoice
.
setInvoiceType
(
invoice
.
getInvoiceType
().
equals
(
"1"
)
?
"蓝票"
:
"红票"
);
}
if
(!
StringUtils
.
isEmpty
(
invoice
.
getInvoiceForm
())){
invoice
.
setInvoiceForm
(
invoice
.
getInvoiceForm
().
equals
(
"0"
)
?
"移动端"
:
"后台"
);
}
if
(!
StringUtils
.
isEmpty
(
invoice
.
getPushMode
())){
invoice
.
setPushMode
(
invoice
.
getPushMode
().
equals
(
"0"
)
?
"邮箱"
:
""
);
}
if
(!
StringUtils
.
isEmpty
(
invoice
.
getStatus
())){
invoice
.
setStatus
(
invoice
.
getStatus
().
equals
(
"0"
)
?
"个人"
:
"企业"
);
}
if
(
invoice
.
getCreateTime
()
!=
null
){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
invoice
.
setDescription
(
format
.
format
(
invoice
.
getCreateTime
()));
}
model
.
addAttribute
(
"data"
,
invoice
);
model
.
addAttribute
(
"data"
,
invoice
);
}
}
return
"invoice/invoiceform"
;
return
"invoice/invoiceform"
;
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/service/impl/OrderServiceImpl.java
View file @
4b06a432
...
@@ -55,7 +55,6 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -55,7 +55,6 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
private
InvoiceService
invoiceService
;
private
InvoiceService
invoiceService
;
@Override
@Override
public
GenericDao
<
Order
>
getGenericMapper
()
{
public
GenericDao
<
Order
>
getGenericMapper
()
{
return
orderMapper
;
return
orderMapper
;
...
@@ -311,7 +310,14 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -311,7 +310,14 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
for
(
Order
order
:
list
){
for
(
Order
order
:
list
){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
order
.
setCreateTimeStr
(
format
.
format
(
order
.
getCreateTime
()));
order
.
setCreateTimeStr
(
format
.
format
(
order
.
getCreateTime
()));
String
str
=
invoiceUtil
.
startInvoice
(
order
,
order
.
getNickName
(),
invoiceDto
.
getEmail
(),
"0"
,
"0"
);
//抬头类型为企业设置发票税号
String
unitTax
=
null
;
if
(
invoiceDto
.
getType
().
equals
(
"1"
)){
unitTax
=
invoiceDto
.
getUnitTaxNumber
();
}
String
str
=
invoiceUtil
.
startInvoice
(
order
,
order
.
getNickName
(),
invoiceDto
.
getEmail
(),
invoiceDto
.
getType
(),
"0"
,
unitTax
);
JSONObject
json
=
JSON
.
parseObject
(
str
);
JSONObject
json
=
JSON
.
parseObject
(
str
);
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
json
.
getString
(
"code"
))
&&
json
.
getString
(
"code"
).
equals
(
"E0000"
)){
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
json
.
getString
(
"code"
))
&&
json
.
getString
(
"code"
).
equals
(
"E0000"
)){
//开票成功 添加一条开票记录
//开票成功 添加一条开票记录
...
@@ -320,9 +326,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -320,9 +326,10 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
Invoice
invoice
=
new
Invoice
();
Invoice
invoice
=
new
Invoice
();
//发票抬头
//发票抬头
if
(
invoiceDto
.
getType
().
equals
(
"1"
)){
if
(
invoiceDto
.
getType
().
equals
(
"1"
)){
//抬头类型为公司则
设置发票抬头
//抬头类型为公司则
发票税号
invoice
.
set
InvoiceTitle
(
invoiceDto
.
getInvoiceTitle
());
invoice
.
set
UnitTaxNumber
(
invoiceDto
.
getUnitTaxNumber
());
}
}
invoice
.
setInvoiceTitle
(
invoiceDto
.
getInvoiceTitle
());
invoice
.
setInvoiceContent
(
invoiceDto
.
getInvoiceContent
());
invoice
.
setInvoiceContent
(
invoiceDto
.
getInvoiceContent
());
invoice
.
setInvoiceType
(
"1"
);
invoice
.
setInvoiceType
(
"1"
);
invoice
.
setInvoiceForm
(
"1"
);
invoice
.
setInvoiceForm
(
"1"
);
...
@@ -333,6 +340,8 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
...
@@ -333,6 +340,8 @@ public class OrderServiceImpl extends GenericServiceImpl<Order> implements Order
invoice
.
setStatus
(
"0"
);
invoice
.
setStatus
(
"0"
);
invoice
.
setInvoiceSerialNum
(
invoiceSerialNum
);
invoice
.
setInvoiceSerialNum
(
invoiceSerialNum
);
invoice
.
setAccountsId
(
mpAccountsEntity
.
getId
());
invoice
.
setAccountsId
(
mpAccountsEntity
.
getId
());
invoice
.
setOpenId
(
order
.
getOpenid
());
invoice
.
setOperator
(
order
.
getNickName
());
invoiceService
.
save
(
invoice
);
invoiceService
.
save
(
invoice
);
jsonObject
.
put
(
"errorNo"
,
0
);
jsonObject
.
put
(
"errorNo"
,
0
);
}
else
{
}
else
{
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/utils/InvoiceUtil.java
View file @
4b06a432
...
@@ -3,6 +3,7 @@ package com.cftech.order.utils;
...
@@ -3,6 +3,7 @@ package com.cftech.order.utils;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.order.model.Order
;
import
com.cftech.order.model.Order
;
import
com.cftech.product.model.Product
;
import
com.cftech.product.model.Product
;
...
@@ -35,9 +36,10 @@ public class InvoiceUtil {
...
@@ -35,9 +36,10 @@ public class InvoiceUtil {
* @param email 邮箱
* @param email 邮箱
* @param type 0:
* @param type 0:
* @param from 0:移动端 1:后台
* @param from 0:移动端 1:后台
* @param unitTax 单位税号 移动端发票抬头为公司需要填写税号
* @return
* @return
*/
*/
public
String
startInvoice
(
Order
orderObj
,
String
clerk
,
String
email
,
String
type
,
String
from
){
public
String
startInvoice
(
Order
orderObj
,
String
clerk
,
String
email
,
String
type
,
String
from
,
String
unitTax
){
NNOpenSDK
sdk
=
NNOpenSDK
.
getIntance
();
NNOpenSDK
sdk
=
NNOpenSDK
.
getIntance
();
...
@@ -73,9 +75,13 @@ public class InvoiceUtil {
...
@@ -73,9 +75,13 @@ public class InvoiceUtil {
//收款人 非必填
//收款人 非必填
order
.
put
(
"payee"
,
SystemConfig
.
p
.
getProperty
(
"PAYEE"
));
order
.
put
(
"payee"
,
SystemConfig
.
p
.
getProperty
(
"PAYEE"
));
//购方地址 非必填
//购方地址 非必填
order
.
put
(
"buyerAddress"
,
orderObj
.
getAddress
());
order
.
put
(
"buyerAddress"
,
orderObj
.
getAddress
Des
());
//购方税号(企业要填,个人可为空)
//购方税号(企业要填,个人可为空)
if
(
StringUtils
.
isNotBlank
(
unitTax
)){
order
.
put
(
"buyerTaxNum"
,
unitTax
);
}
else
{
order
.
put
(
"buyerTaxNum"
,
""
);
order
.
put
(
"buyerTaxNum"
,
""
);
}
//开票类型:1:蓝票;2:红票 必填
//开票类型:1:蓝票;2:红票 必填
order
.
put
(
"invoiceType"
,
"1"
);
order
.
put
(
"invoiceType"
,
"1"
);
//发票种类:p,普通发票(电票)(默认);c,普通发票(纸票);s,专用发票;e,收购发票(电票);f,收购发票(纸质);r,普通发票(卷式) 非必填
//发票种类:p,普通发票(电票)(默认);c,普通发票(纸票);s,专用发票;e,收购发票(电票);f,收购发票(纸质);r,普通发票(卷式) 非必填
...
@@ -87,7 +93,7 @@ public class InvoiceUtil {
...
@@ -87,7 +93,7 @@ public class InvoiceUtil {
//销方电话 必填
//销方电话 必填
order
.
put
(
"salerTel"
,
SystemConfig
.
p
.
getProperty
(
"SALER_TEL"
));
order
.
put
(
"salerTel"
,
SystemConfig
.
p
.
getProperty
(
"SALER_TEL"
));
//订单号 (每个企业唯一) 必填
//订单号 (每个企业唯一) 必填
order
.
put
(
"orderNo"
,
"OD1998011
5
"
);
//todo
order
.
put
(
"orderNo"
,
"OD1998011
9
"
);
//todo
// 开票完成回传发票信息地址 非必填
// 开票完成回传发票信息地址 非必填
order
.
put
(
"callBackUrl"
,
"http:127.0.0.1/invoice/callback/"
);
order
.
put
(
"callBackUrl"
,
"http:127.0.0.1/invoice/callback/"
);
// 购方名称 必填
// 购方名称 必填
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/web/OrderController.java
View file @
4b06a432
...
@@ -27,6 +27,7 @@ import com.cftech.order.utils.DoubleJSONFilter;
...
@@ -27,6 +27,7 @@ import com.cftech.order.utils.DoubleJSONFilter;
import
com.cftech.order.utils.InvoiceUtil
;
import
com.cftech.order.utils.InvoiceUtil
;
import
com.cftech.orderdetail.web.OrderDetailsController
;
import
com.cftech.orderdetail.web.OrderDetailsController
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.service.UserService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
@@ -87,6 +88,9 @@ public class OrderController {
...
@@ -87,6 +88,9 @@ public class OrderController {
@Autowired
@Autowired
private
QyMsgUtil
qyMsgUtil
;
private
QyMsgUtil
qyMsgUtil
;
@Autowired
private
UserService
userService
;
//列表页面
//列表页面
@RequiresPermissions
(
value
=
ORDER_VIEW
)
@RequiresPermissions
(
value
=
ORDER_VIEW
)
@RequestMapping
(
"/list"
)
@RequestMapping
(
"/list"
)
...
@@ -256,7 +260,7 @@ public class OrderController {
...
@@ -256,7 +260,7 @@ public class OrderController {
for
(
Order
order
:
list
){
for
(
Order
order
:
list
){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
order
.
setCreateTimeStr
(
format
.
format
(
order
.
getCreateTime
()));
order
.
setCreateTimeStr
(
format
.
format
(
order
.
getCreateTime
()));
String
str
=
invoiceUtil
.
startInvoice
(
order
,
String
.
valueOf
(
userid
),
email
,
"0"
,
"1"
);
String
str
=
invoiceUtil
.
startInvoice
(
order
,
String
.
valueOf
(
userid
),
email
,
"0"
,
"1"
,
null
);
JSONObject
json
=
JSON
.
parseObject
(
str
);
JSONObject
json
=
JSON
.
parseObject
(
str
);
if
(
StringUtils
.
isNotBlank
(
json
.
getString
(
"code"
))
&&
json
.
getString
(
"code"
).
equals
(
"E0000"
)){
if
(
StringUtils
.
isNotBlank
(
json
.
getString
(
"code"
))
&&
json
.
getString
(
"code"
).
equals
(
"E0000"
)){
//开票成功 添加一条开票记录
//开票成功 添加一条开票记录
...
@@ -264,7 +268,7 @@ public class OrderController {
...
@@ -264,7 +268,7 @@ public class OrderController {
String
invoiceSerialNum
=
json
.
getJSONObject
(
"result"
).
getString
(
"invoiceSerialNum"
);
String
invoiceSerialNum
=
json
.
getJSONObject
(
"result"
).
getString
(
"invoiceSerialNum"
);
Invoice
invoice
=
new
Invoice
();
Invoice
invoice
=
new
Invoice
();
//发票抬头
//发票抬头
//invoice.setInvoiceTitle("0"
);
invoice
.
setInvoiceTitle
(
order
.
getNickName
()
);
invoice
.
setInvoiceContent
(
"商品费用"
);
invoice
.
setInvoiceContent
(
"商品费用"
);
invoice
.
setInvoiceType
(
"1"
);
invoice
.
setInvoiceType
(
"1"
);
invoice
.
setInvoiceForm
(
"1"
);
invoice
.
setInvoiceForm
(
"1"
);
...
@@ -275,6 +279,9 @@ public class OrderController {
...
@@ -275,6 +279,9 @@ public class OrderController {
invoice
.
setStatus
(
"0"
);
invoice
.
setStatus
(
"0"
);
invoice
.
setInvoiceSerialNum
(
invoiceSerialNum
);
invoice
.
setInvoiceSerialNum
(
invoiceSerialNum
);
invoice
.
setAccountsId
(
accountsId
);
invoice
.
setAccountsId
(
accountsId
);
invoice
.
setOpenId
(
order
.
getOpenid
());
String
userName
=
userService
.
fetchAuthById
(
userid
).
getWxUserName
();
invoice
.
setOperator
(
StringUtils
.
isEmpty
(
userName
)
?
""
:
userName
);
invoiceService
.
save
(
invoice
);
invoiceService
.
save
(
invoice
);
jsonObject
.
put
(
"errorNo"
,
0
);
jsonObject
.
put
(
"errorNo"
,
0
);
}
else
{
}
else
{
...
...
qy-modules/qy-orgunit-module-web/src/main/webapp/WEB-INF/views/managerqyuser/qyuseradd.html
View file @
4b06a432
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
#if($shiro.hasPermission("sys:qyuser:edit"))
#if($shiro.hasPermission("sys:qyuser:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
#end
<a
href=
"#springUrl('/a/
orgunit
/list')"
class=
"btn btn-default"
>
取消
</a>
<a
href=
"#springUrl('/a/
qyuser
/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</div>
</form>
</form>
<!-- /.box-body -->
<!-- /.box-body -->
...
@@ -296,7 +296,7 @@
...
@@ -296,7 +296,7 @@
var
coverPP
=
null
;
var
coverPP
=
null
;
var
initPicsSel
=
function
()
{
var
initPicsSel
=
function
()
{
var
smallimg
=
"$!{data.
img
}"
;
var
smallimg
=
"$!{data.
description
}"
;
coverPP
=
new
uePicPicker
({
coverPP
=
new
uePicPicker
({
tarId
:
'img'
,
tarId
:
'img'
,
title
:
'客服名片'
,
title
:
'客服名片'
,
...
@@ -577,7 +577,7 @@
...
@@ -577,7 +577,7 @@
location
.
href
=
"#springUrl('/a/qyuser/form')"
;
location
.
href
=
"#springUrl('/a/qyuser/form')"
;
},
},
cancel
:
function
()
{
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/
orgunit
/list')"
;
location
.
href
=
"#springUrl('/a/
qyuser
/list')"
;
}
}
});
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
...
@@ -585,7 +585,7 @@
...
@@ -585,7 +585,7 @@
message
:
"更新成功"
,
message
:
"更新成功"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
success
:
function
()
{
location
.
href
=
"#springUrl('/a/
orgunit
/list')"
;
location
.
href
=
"#springUrl('/a/
qyuser
/list')"
;
}
}
});
});
}
else
if
(
returnobj
.
errorNo
==
3
)
{
}
else
if
(
returnobj
.
errorNo
==
3
)
{
...
...
qy-modules/qy-orgunit-module-web/src/main/webapp/WEB-INF/views/managerqyuser/qyuserlist.html
View file @
4b06a432
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
#if($shiro.hasPermission("sys:qyuser:edit"))
#if($shiro.hasPermission("sys:qyuser:edit"))
<!--<a onclick="syncWx();" class="btn btn-success">同步微信</a>-->
<!--<a onclick="syncWx();" class="btn btn-success">同步微信</a>-->
<a
href=
"#springUrl('/a/qyuser/form')"
class=
"btn btn-primary"
>
新增
</a>
<a
onclick=
"addUser()"
class=
"btn btn-primary"
>
新增
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
#end
</div>
</div>
...
@@ -410,6 +410,12 @@
...
@@ -410,6 +410,12 @@
initOrgTree
();
initOrgTree
();
});
});
//新增用户
function
addUser
(){
var
orgId
=
$
(
"[name='orgId']"
).
val
();
location
.
href
=
"#springUrl('/a/qyuser/form')?orgId="
+
orgId
;
}
var
orgTreeUri
=
"#springUrl('/a/orgunit/treeDataNoAuth')"
;
var
orgTreeUri
=
"#springUrl('/a/orgunit/treeDataNoAuth')"
;
function
initOrgTree
()
{
function
initOrgTree
()
{
...
...
qy-modules/qy-orgunit-module/src/main/java/com/cftech/base/org/web/QyuserController.java
View file @
4b06a432
...
@@ -26,6 +26,7 @@ import com.cftech.sys.model.User;
...
@@ -26,6 +26,7 @@ import com.cftech.sys.model.User;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.sys.service.UserService
;
import
com.cftech.sys.service.UserService
;
import
javafx.scene.shape.QuadCurve
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -87,7 +88,7 @@ public class QyuserController {
...
@@ -87,7 +88,7 @@ public class QyuserController {
//返回编辑页面(新增、修改)
//返回编辑页面(新增、修改)
@RequiresPermissions
(
value
=
PermissionSign
.
QYUSER_VIEW
)
@RequiresPermissions
(
value
=
PermissionSign
.
QYUSER_VIEW
)
@RequestMapping
(
value
=
"/form"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/form"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
,
String
orgId
)
{
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
if
(!
StringUtils
.
isEmpty
(
id
))
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Qyuser
qyuser
=
qyuserService
.
fetchById
(
id
);
Qyuser
qyuser
=
qyuserService
.
fetchById
(
id
);
...
@@ -103,7 +104,13 @@ public class QyuserController {
...
@@ -103,7 +104,13 @@ public class QyuserController {
model
.
addAttribute
(
"data"
,
qyuser
);
model
.
addAttribute
(
"data"
,
qyuser
);
model
.
addAttribute
(
"accountId"
,
qyuser
.
getAccountsId
());
model
.
addAttribute
(
"accountId"
,
qyuser
.
getAccountsId
());
}
else
{
}
else
{
if
(!
StringUtils
.
isEmpty
(
orgId
)){
Qyuser
qyuser
=
new
Qyuser
();
qyuser
.
setOrgId
(
Long
.
valueOf
(
orgId
));
OrgUnit
orgUnit
=
orgUnitService
.
fetchById
(
orgId
);
model
.
addAttribute
(
"orgName"
,
orgUnit
.
getOrgName
());
model
.
addAttribute
(
"data"
,
qyuser
);
}
model
.
addAttribute
(
"accountId"
,
accountId
);
model
.
addAttribute
(
"accountId"
,
accountId
);
}
}
return
"managerqyuser/qyuseradd"
;
return
"managerqyuser/qyuseradd"
;
...
...
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