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
77f3700c
Commit
77f3700c
authored
Feb 26, 2021
by
fanjr
Browse files
Options
Browse Files
Download
Plain Diff
修改
parents
637ec26a
a0367b59
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1366 additions
and
616 deletions
+1366
-616
checkcouponform.html
...ain/webapp/WEB-INF/views/checkcoupon/checkcouponform.html
+76
-17
checkcouponlist.html
...ain/webapp/WEB-INF/views/checkcoupon/checkcouponlist.html
+17
-14
CheckcouponMapper.java
...in/java/com/cftech/checkcoupon/dao/CheckcouponMapper.java
+5
-5
CheckcouponMapper.xml
...ain/java/com/cftech/checkcoupon/dao/CheckcouponMapper.xml
+23
-19
Checkcoupon.java
...c/main/java/com/cftech/checkcoupon/model/Checkcoupon.java
+6
-3
CheckcouponService.java
...va/com/cftech/checkcoupon/service/CheckcouponService.java
+6
-6
CheckcouponServiceImpl.java
...tech/checkcoupon/service/impl/CheckcouponServiceImpl.java
+12
-12
LogoConfig.java
...rc/main/java/com/cftech/checkcoupon/utils/LogoConfig.java
+7
-7
MatrixToImageWriter.java
...ava/com/cftech/checkcoupon/utils/MatrixToImageWriter.java
+2
-2
QrcodeUtil.java
...rc/main/java/com/cftech/checkcoupon/utils/QrcodeUtil.java
+1
-0
CheckcouponController.java
...ava/com/cftech/checkcoupon/web/CheckcouponController.java
+20
-7
checkresultform.html
...ain/webapp/WEB-INF/views/checkresult/checkresultform.html
+29
-1
CheckresultController.java
...ava/com/cftech/checkresult/web/CheckresultController.java
+2
-2
consultSheetform.html
...n/webapp/WEB-INF/views/consultSheet/consultSheetform.html
+211
-24
consultSheetlist.html
...n/webapp/WEB-INF/views/consultSheet/consultSheetlist.html
+77
-20
ConsultSheetMapper.xml
...n/java/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
+6
-1
ConsultSheet.java
...main/java/com/cftech/consultsheet/model/ConsultSheet.java
+1
-0
ConsultSheetController.java
...a/com/cftech/consultsheet/web/ConsultSheetController.java
+7
-1
couponrecordform.html
...n/webapp/WEB-INF/views/couponrecord/couponrecordform.html
+105
-4
couponrecordlist.html
...n/webapp/WEB-INF/views/couponrecord/couponrecordlist.html
+75
-5
CouponrecordMapper.xml
...n/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
+113
-76
CouponRecordJob.java
...ain/java/com/cftech/couponrecord/job/CouponRecordJob.java
+44
-0
Couponrecord.java
...main/java/com/cftech/couponrecord/model/Couponrecord.java
+7
-0
CouponrecordService.java
.../com/cftech/couponrecord/service/CouponrecordService.java
+5
-2
CouponrecordServiceImpl.java
...ch/couponrecord/service/impl/CouponrecordServiceImpl.java
+131
-65
CouponrecordController.java
...a/com/cftech/couponrecord/web/CouponrecordController.java
+25
-7
hospitalform.html
.../src/main/webapp/WEB-INF/views/hospital/hospitalform.html
+27
-18
hospitallist.html
.../src/main/webapp/WEB-INF/views/hospital/hospitallist.html
+9
-2
HospitalMapper.xml
.../src/main/java/com/cftech/hospital/dao/HospitalMapper.xml
+25
-24
Hospital.java
...ule/src/main/java/com/cftech/hospital/model/Hospital.java
+4
-4
HospitalController.java
...main/java/com/cftech/hospital/web/HospitalController.java
+4
-2
orderform.html
...le-web/src/main/webapp/WEB-INF/views/order/orderform.html
+205
-187
orderlist.html
...le-web/src/main/webapp/WEB-INF/views/order/orderlist.html
+78
-78
OrderMapper.xml
...module/src/main/java/com/cftech/order/dao/OrderMapper.xml
+1
-1
No files found.
aidea-modules/checkcoupon-module-web/src/main/webapp/WEB-INF/views/checkcoupon/checkcouponform.html
View file @
77f3700c
...
@@ -87,13 +87,13 @@
...
@@ -87,13 +87,13 @@
id=
"name"
name=
"name"
id=
"name"
name=
"name"
placeholder=
"检测券名称"
placeholder=
"检测券名称"
value=
"$!{data.name}"
value=
"$!{data.name}"
#
if
($!{
pageType
}==
'
View
')
readonly=
"readonly"
#
end
/>
#
if
($!{
pageType
}==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"takeEffectYear"
>
生效年
</label>
<label
for=
"takeEffectYear"
>
有效期(年)
</label>
<select
class=
"form-control"
name=
"takeEffectYear"
id=
"takeEffectYear"
<select
class=
"form-control"
name=
"takeEffectYear"
id=
"takeEffectYear"
#
if
($!{
pageType
}==
'
View
')
disabled=
"disabled"
#
end
>
#
if
($!{
pageType
}==
'
true
')
disabled=
"disabled"
#
end
>
<option
value=
""
>
请选择
</option>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
#
if
($!{
data
.
takeEffectYear
}==
<option
value=
"1"
#
if
($!{
data
.
takeEffectYear
}==
'
1
')
selected=
"selected"
#
end
>
1
</option>
'
1
')
selected=
"selected"
#
end
>
1
</option>
...
@@ -105,9 +105,9 @@
...
@@ -105,9 +105,9 @@
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"takeEffectMonth"
>
生效月
</label>
<label
for=
"takeEffectMonth"
>
有效期(月)
</label>
<select
class=
"form-control select2"
name=
"takeEffectMonth"
<select
class=
"form-control select2"
name=
"takeEffectMonth"
id=
"takeEffectMonth"
#
if
($!{
pageType
}==
'
View
')
disabled=
"disabled"
id=
"takeEffectMonth"
#
if
($!{
pageType
}==
'
true
')
disabled=
"disabled"
#
end
>
#
end
>
<option
value=
""
>
请选择
</option>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
#
if
($!{
data
.
takeEffectMonth
}==
<option
value=
"1"
#
if
($!{
data
.
takeEffectMonth
}==
...
@@ -138,9 +138,9 @@
...
@@ -138,9 +138,9 @@
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"expireMonth"
>
过期月
</label>
<label
for=
"expireMonth"
>
第一张券延期使用时间(月)
</label>
<select
class=
"form-control select2"
name=
"expireMonth"
id=
"expireMonth"
<select
class=
"form-control select2"
name=
"expireMonth"
id=
"expireMonth"
#
if
($!{
pageType
}==
'
View
')
disabled=
"disabled"
#
end
>
#
if
($!{
pageType
}==
'
true
')
disabled=
"disabled"
#
end
>
<option
value=
""
>
请选择
</option>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
#
if
($!{
data
.
expireMonth
}==
<option
value=
"1"
#
if
($!{
data
.
expireMonth
}==
'
1
')
selected=
"selected"
#
end
>
1
</option>
'
1
')
selected=
"selected"
#
end
>
1
</option>
...
@@ -170,14 +170,34 @@
...
@@ -170,14 +170,34 @@
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"
type"
>
检测券类型
</label>
<label
for=
"
expireTwoMonth"
>
第二张券延期使用时间(月)
</label>
<select
class=
"form-control select2"
name=
"
type"
id=
"type
"
<select
class=
"form-control select2"
name=
"
expireTwoMonth"
id=
"expireTwoMonth
"
#
if
($!{
pageType
}==
'
View
')
disabled=
"disabled"
#
end
>
#
if
($!{
pageType
}==
'
true
')
disabled=
"disabled"
#
end
>
<option
value=
""
>
请选择
</option>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
#
if
($!{
data
.
type
}==
<option
value=
"1"
#
if
($!{
data
.
expireTwoMonth
}==
'
1
')
selected=
"selected"
#
end
>
第一张
</option>
'
1
')
selected=
"selected"
#
end
>
1
</option>
<option
value=
"2"
#
if
($!{
data
.
type
}==
<option
value=
"2"
#
if
($!{
data
.
expireTwoMonth
}==
'
2
')
selected=
"selected"
#
end
>
第二张
</option>
'
2
')
selected=
"selected"
#
end
>
2
</option>
<option
value=
"3"
#
if
($!{
data
.
expireTwoMonth
}==
'
3
')
selected=
"selected"
#
end
>
3
</option>
<option
value=
"4"
#
if
($!{
data
.
expireTwoMonth
}==
'
4
')
selected=
"selected"
#
end
>
4
</option>
<option
value=
"5"
#
if
($!{
data
.
expireTwoMonth
}==
'
5
')
selected=
"selected"
#
end
>
5
</option>
<option
value=
"6"
#
if
($!{
data
.
expireTwoMonth
}==
'
6
')
selected=
"selected"
#
end
>
6
</option>
<option
value=
"7"
#
if
($!{
data
.
expireTwoMonth
}==
'
7
')
selected=
"selected"
#
end
>
7
</option>
<option
value=
"8"
#
if
($!{
data
.
expireTwoMonth
}==
'
8
')
selected=
"selected"
#
end
>
8
</option>
<option
value=
"9"
#
if
($!{
data
.
expireTwoMonth
}==
'
9
')
selected=
"selected"
#
end
>
9
</option>
<option
value=
"10"
#
if
($!{
data
.
expireTwoMonth
}==
'
10
')
selected=
"selected"
#
end
>
10
</option>
<option
value=
"11"
#
if
($!{
data
.
expireTwoMonth
}==
'
11
')
selected=
"selected"
#
end
>
11
</option>
<option
value=
"12"
#
if
($!{
data
.
expireTwoMonth
}==
'
12
')
selected=
"selected"
#
end
>
12
</option>
</select>
</select>
</div>
</div>
...
@@ -186,8 +206,8 @@
...
@@ -186,8 +206,8 @@
<div
class=
"form-group form-md-line-input col-xs-12"
>
<div
class=
"form-group form-md-line-input col-xs-12"
>
<label
for=
"remarks"
>
描述
</label>
<label
for=
"remarks"
>
描述
</label>
<textarea
class=
"form-control"
rows=
"3"
id=
"remarks"
name=
"remarks"
<textarea
class=
"form-control"
rows=
"3"
id=
"remarks"
name=
"remarks"
#
if
($!{
pageType
}==
'
View
')
readonly=
"readonly"
#
if
($!{
pageType
}==
'
true
')
readonly=
"readonly"
#
end
>
$!{data.
instruction
s}
</textarea>
#
end
>
$!{data.
remark
s}
</textarea>
</div>
</div>
<br/>
<br/>
...
@@ -195,7 +215,7 @@
...
@@ -195,7 +215,7 @@
<div
class=
"form-group form-md-line-input col-xs-12"
>
<div
class=
"form-group form-md-line-input col-xs-12"
>
<label
for=
"instructions"
>
使用说明
</label>
<label
for=
"instructions"
>
使用说明
</label>
<textarea
class=
"form-control"
rows=
"3"
id=
"instructions"
<textarea
class=
"form-control"
rows=
"3"
id=
"instructions"
name=
"instructions"
#
if
($!{
pageType
}==
'
View
')
readonly=
"readonly"
name=
"instructions"
#
if
($!{
pageType
}==
'
true
')
readonly=
"readonly"
#
end
>
$!{data.instructions}
</textarea>
#
end
>
$!{data.instructions}
</textarea>
</div>
</div>
...
@@ -250,9 +270,48 @@
...
@@ -250,9 +270,48 @@
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- END PAGE LEVEL PLUGINS -->
<script>
<script>
//通过系统获取换行符
function
getSpaceBySystem
(){
let
space
=
""
;
let
browser
=
navigator
.
appName
;
let
b_version
=
navigator
.
appVersion
;
let
version
=
b_version
.
split
(
";"
);
let
trim_Version
=
version
[
1
].
replace
(
/
[
]
/g
,
""
);
if
(
browser
==
"Microsoft Internet Explorer"
&&
(
trim_Version
==
"MSIE7.0"
||
trim_Version
==
"MSIE8.0"
))
{
space
=
'
\
r
\
n'
;
}
else
{
space
=
'
\
n'
;
}
let
remarks
=
"$!{data.remarks}"
;
if
(
remarks
!=
null
&&
remarks
!=
""
)
{
if
(
space
==
'
\
r
\
n'
)
{
remarks
=
remarks
.
replace
(
/<br>/g
,
'
\
r
\
n'
);
//IE9、FF、chrome
}
else
{
remarks
=
remarks
.
replace
(
/<br>/g
,
'
\
n'
);
//IE7-8
}
$
(
"#remarks"
).
text
(
remarks
);
}
let
instructions
=
"$!{data.instructions}"
;
if
(
instructions
!=
null
&&
instructions
!=
""
)
{
if
(
space
==
'
\
r
\
n'
)
{
instructions
=
instructions
.
replace
(
/<br>/g
,
'
\
r
\
n'
);
//IE9、FF、chrome
}
else
{
instructions
=
instructions
.
replace
(
/<br>/g
,
'
\
n'
);
//IE7-8
}
$
(
"#instructions"
).
text
(
instructions
);
}
}
$
().
ready
(
function
()
{
$
().
ready
(
function
()
{
Cfapp
.
init
();
Cfapp
.
init
();
recdTypeAdd
.
init
();
recdTypeAdd
.
init
();
getSpaceBySystem
();
});
});
...
...
aidea-modules/checkcoupon-module-web/src/main/webapp/WEB-INF/views/checkcoupon/checkcouponlist.html
View file @
77f3700c
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
<div
class=
"col-xs-2"
>
<div
class=
"col-xs-2"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:checkcoupon:edit"))
#if($shiro.hasPermission("qy:checkcoupon:edit"))
<
a
href=
"#springUrl('/a/checkcoupon/form')"
class=
"btn btn-primary"
>
新增
</a
>
<
!-- <a href="#springUrl('/a/checkcoupon/form')" class="btn btn-primary">新增</a>--
>
<!-- <a href="#springUrl('/a/checkcoupon/exportExcel')" class="btn btn-primary">导出</a>-->
<!-- <a href="#springUrl('/a/checkcoupon/exportExcel')" class="btn btn-primary">导出</a>-->
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end
#end
...
@@ -99,10 +99,10 @@
...
@@ -99,10 +99,10 @@
<tr>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td
hidden=
"true"
>
Id
</td>
<th>
检测券名称
</th>
<th>
检测券名称
</th>
<th>
生效年
</th>
<th>
有效期(年)
</th>
<th>
生效月
</th>
<th>
有效期(月)
</th>
<th>
过期月
</th>
<th>
第一张券延期使用(月)
</th>
<th>
检测券类型
</th>
<th>
第二章券延期使用(月)
</th>
<th>
描述
</th>
<th>
描述
</th>
<th>
使用说明
</th>
<th>
使用说明
</th>
<th>
创建时间
</th>
<th>
创建时间
</th>
...
@@ -198,6 +198,9 @@
...
@@ -198,6 +198,9 @@
"sAjaxSource"
:
sSource
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"pagingType"
:
"full_numbers"
,
// "autoWidth": true,
// "scrollX": true,
// "sScrollY": false,
"aoColumns"
:
[
"aoColumns"
:
[
{
{
"mData"
:
"id"
"mData"
:
"id"
...
@@ -259,15 +262,15 @@
...
@@ -259,15 +262,15 @@
"mData"
:
"id"
,
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
html
=
''
;
let
html
=
''
;
html
+=
'<div class="btn-group">'
+
html
+=
'<div class="btn-group">'
+
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">'
+
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">'
+
' <span class="caret"></span>'
+
' <span class="caret"></span>'
+
' <span class="sr-only">Toggle Dropdown</span>'
+
' <span class="sr-only">Toggle Dropdown</span>'
+
'</button>'
+
'</button>'
+
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkcoupon:view"))<a href="#springUrl("/a/checkcoupon/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkcoupon:view"))<a href="#springUrl("/a/checkcoupon/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkcoupon:edit"))<a href="#springUrl("/a/checkcoupon/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkcoupon:edit"))<a href="#springUrl("/a/checkcoupon/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'</ul></div>'
;
html
+=
'</ul></div>'
;
return
html
;
return
html
;
}
}
}
}
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/dao/CheckcouponMapper.java
View file @
77f3700c
...
@@ -4,11 +4,11 @@ import com.cftech.checkcoupon.model.Checkcoupon;
...
@@ -4,11 +4,11 @@ import com.cftech.checkcoupon.model.Checkcoupon;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericDao
;
/**
/**
* 检测券管理Mapper
* 检测券管理Mapper
*
*
* @author Strive
* @author Strive
* @date: 2021-01-25 14:42
* @date: 2021-01-25 14:42
*/
*/
public
interface
CheckcouponMapper
extends
GenericDao
<
Checkcoupon
>
{
public
interface
CheckcouponMapper
extends
GenericDao
<
Checkcoupon
>
{
}
}
\ No newline at end of file
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/dao/CheckcouponMapper.xml
View file @
77f3700c
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<result
column=
"take_effect_month"
property=
"takeEffectMonth"
/>
<result
column=
"take_effect_month"
property=
"takeEffectMonth"
/>
<result
column=
"take_effect_year"
property=
"takeEffectYear"
/>
<result
column=
"take_effect_year"
property=
"takeEffectYear"
/>
<result
column=
"expire_month"
property=
"expireMonth"
/>
<result
column=
"expire_month"
property=
"expireMonth"
/>
<result
column=
"expire_two_month"
property=
"expireTwoMonth"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"remarks"
property=
"remarks"
/>
...
@@ -49,23 +50,23 @@
...
@@ -49,23 +50,23 @@
</sql>
</sql>
<sql
id=
"sqlColumns"
>
<sql
id=
"sqlColumns"
>
id
id
,
,
take_effect_month
,
take_effect_month
,
take_effect_year
,
take_effect_year
,
expire_month
,
expire
_month,
expire_two
_month,
type,
type,
name,
name,
remarks,
remarks,
instructions,
instructions,
accounts_id,
accounts_id,
del_flag,
del_flag,
status,
status,
create_time,
create_time,
update_time,
update_time,
description,
description,
create_by,
create_by,
update_by
update_by
</sql>
</sql>
...
@@ -81,6 +82,7 @@
...
@@ -81,6 +82,7 @@
#{takeEffectMonth, jdbcType=VARCHAR},
#{takeEffectMonth, jdbcType=VARCHAR},
#{takeEffectYear, jdbcType=VARCHAR},
#{takeEffectYear, jdbcType=VARCHAR},
#{expireMonth, jdbcType=VARCHAR},
#{expireMonth, jdbcType=VARCHAR},
#{expireTwoMonth, jdbcType=VARCHAR},
#{type, jdbcType=VARCHAR},
#{type, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{remarks, jdbcType=VARCHAR},
#{remarks, jdbcType=VARCHAR},
...
@@ -104,9 +106,8 @@
...
@@ -104,9 +106,8 @@
</select>
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_check_coupon
SELECT COUNT(1) FROM t_aidea_check_coupon
t
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
...
@@ -133,6 +134,9 @@
...
@@ -133,6 +134,9 @@
<if
test=
"expireMonth != null"
>
<if
test=
"expireMonth != null"
>
expire_month = #{expireMonth, jdbcType=VARCHAR},
expire_month = #{expireMonth, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"expireTwoMonth != null"
>
expire_two_month = #{expireTwoMonth, jdbcType=VARCHAR},
</if>
<if
test=
"type != null"
>
<if
test=
"type != null"
>
type = #{type, jdbcType=VARCHAR},
type = #{type, jdbcType=VARCHAR},
</if>
</if>
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/model/Checkcoupon.java
View file @
77f3700c
...
@@ -18,14 +18,17 @@ public class Checkcoupon implements Serializable {
...
@@ -18,14 +18,17 @@ public class Checkcoupon implements Serializable {
/* 主键id */
/* 主键id */
private
Long
id
;
private
Long
id
;
/* 有效期年 */
/* 有效期年 */
@ExportConfig
(
value
=
"有效期
年
"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"有效期
(年)
"
,
width
=
100
,
showLevel
=
1
)
private
String
takeEffectYear
;
private
String
takeEffectYear
;
/* 生效月 */
/* 生效月 */
@ExportConfig
(
value
=
"
生效月
"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"
有效期(月)
"
,
width
=
100
,
showLevel
=
1
)
private
String
takeEffectMonth
;
private
String
takeEffectMonth
;
/* 过期月份 */
/* 过期月份 */
@ExportConfig
(
value
=
"
过期月份
"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"
第一张券延期(月)
"
,
width
=
100
,
showLevel
=
1
)
private
String
expireMonth
;
private
String
expireMonth
;
/* 使用说明 */
@ExportConfig
(
value
=
"第二张券延期(月)"
,
width
=
100
,
showLevel
=
1
)
private
String
expireTwoMonth
;
/* 检测券类型 */
/* 检测券类型 */
@ExportConfig
(
value
=
"检测券类型"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"检测券类型"
,
width
=
100
,
showLevel
=
1
)
private
String
type
;
private
String
type
;
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/service/CheckcouponService.java
View file @
77f3700c
...
@@ -2,13 +2,13 @@ package com.cftech.checkcoupon.service;
...
@@ -2,13 +2,13 @@ package com.cftech.checkcoupon.service;
import
com.cftech.checkcoupon.model.Checkcoupon
;
import
com.cftech.checkcoupon.model.Checkcoupon
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.core.generic.GenericService
;
/**
/**
* 检测券管理Service
* 检测券管理Service
*
*
* @author Strive
* @author Strive
* @date: 2021-01-25 14:42
* @date: 2021-01-25 14:42
*/
*/
public
interface
CheckcouponService
extends
GenericService
<
Checkcoupon
>
{
public
interface
CheckcouponService
extends
GenericService
<
Checkcoupon
>
{
}
}
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/service/impl/CheckcouponServiceImpl.java
View file @
77f3700c
...
@@ -11,21 +11,21 @@ import org.springframework.beans.factory.annotation.Qualifier;
...
@@ -11,21 +11,21 @@ import org.springframework.beans.factory.annotation.Qualifier;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
* 检测券管理ServiceImpl
* 检测券管理ServiceImpl
*
*
* @author Strive
* @author Strive
* @date: 2021-01-25 14:42
* @date: 2021-01-25 14:42
*/
*/
@Service
(
"checkcouponService"
)
@Service
(
"checkcouponService"
)
public
class
CheckcouponServiceImpl
extends
GenericServiceImpl
<
Checkcoupon
>
implements
CheckcouponService
{
public
class
CheckcouponServiceImpl
extends
GenericServiceImpl
<
Checkcoupon
>
implements
CheckcouponService
{
@Autowired
@Autowired
@Qualifier
(
"checkcouponMapper"
)
@Qualifier
(
"checkcouponMapper"
)
private
CheckcouponMapper
checkcouponMapper
;
private
CheckcouponMapper
checkcouponMapper
;
@Override
@Override
public
GenericDao
<
Checkcoupon
>
getGenericMapper
()
{
public
GenericDao
<
Checkcoupon
>
getGenericMapper
()
{
return
checkcouponMapper
;
return
checkcouponMapper
;
}
}
}
}
\ No newline at end of file
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/utils/LogoConfig.java
View file @
77f3700c
...
@@ -18,10 +18,10 @@ public class LogoConfig {
...
@@ -18,10 +18,10 @@ public class LogoConfig {
/**
/**
* 设置 logo
* 设置 logo
*
* @param matrixImage 源二维码图片
* @param matrixImage 源二维码图片
* @return 返回带有logo的二维码图片
* @return 返回带有logo的二维码图片
* @throws IOException
* @throws IOException
* @author Administrator sangwenhao
*/
*/
public
BufferedImage
LogoMatrix
(
BufferedImage
matrixImage
)
throws
IOException
{
public
BufferedImage
LogoMatrix
(
BufferedImage
matrixImage
)
throws
IOException
{
/**
/**
...
@@ -38,23 +38,23 @@ public class LogoConfig {
...
@@ -38,23 +38,23 @@ public class LogoConfig {
BufferedImage
logo
=
ImageIO
.
read
(
new
File
(
"E:\\logo.png"
));
BufferedImage
logo
=
ImageIO
.
read
(
new
File
(
"E:\\logo.png"
));
//开始绘制图片
//开始绘制图片
g2
.
drawImage
(
logo
,
matrixWidth
/
5
*
2
,
matrixHeigh
/
5
*
2
,
matrixWidth
/
5
,
matrixHeigh
/
5
,
null
);
//绘制
g2
.
drawImage
(
logo
,
matrixWidth
/
5
*
2
,
matrixHeigh
/
5
*
2
,
matrixWidth
/
5
,
matrixHeigh
/
5
,
null
);
//绘制
BasicStroke
stroke
=
new
BasicStroke
(
5
,
BasicStroke
.
CAP_ROUND
,
BasicStroke
.
JOIN_ROUND
);
BasicStroke
stroke
=
new
BasicStroke
(
5
,
BasicStroke
.
CAP_ROUND
,
BasicStroke
.
JOIN_ROUND
);
g2
.
setStroke
(
stroke
);
// 设置笔画对象
g2
.
setStroke
(
stroke
);
// 设置笔画对象
//指定弧度的圆角矩形
//指定弧度的圆角矩形
RoundRectangle2D
.
Float
round
=
new
RoundRectangle2D
.
Float
(
matrixWidth
/
5
*
2
,
matrixHeigh
/
5
*
2
,
matrixWidth
/
5
,
matrixHeigh
/
5
,
20
,
20
);
RoundRectangle2D
.
Float
round
=
new
RoundRectangle2D
.
Float
(
matrixWidth
/
5
*
2
,
matrixHeigh
/
5
*
2
,
matrixWidth
/
5
,
matrixHeigh
/
5
,
20
,
20
);
g2
.
setColor
(
Color
.
white
);
g2
.
setColor
(
Color
.
white
);
g2
.
draw
(
round
);
// 绘制圆弧矩形
g2
.
draw
(
round
);
// 绘制圆弧矩形
//设置logo 有一道灰色边框
//设置logo 有一道灰色边框
BasicStroke
stroke2
=
new
BasicStroke
(
1
,
BasicStroke
.
CAP_ROUND
,
BasicStroke
.
JOIN_ROUND
);
BasicStroke
stroke2
=
new
BasicStroke
(
1
,
BasicStroke
.
CAP_ROUND
,
BasicStroke
.
JOIN_ROUND
);
g2
.
setStroke
(
stroke2
);
// 设置笔画对象
g2
.
setStroke
(
stroke2
);
// 设置笔画对象
RoundRectangle2D
.
Float
round2
=
new
RoundRectangle2D
.
Float
(
matrixWidth
/
5
*
2
+
2
,
matrixHeigh
/
5
*
2
+
2
,
matrixWidth
/
5
-
4
,
matrixHeigh
/
5
-
4
,
20
,
20
);
RoundRectangle2D
.
Float
round2
=
new
RoundRectangle2D
.
Float
(
matrixWidth
/
5
*
2
+
2
,
matrixHeigh
/
5
*
2
+
2
,
matrixWidth
/
5
-
4
,
matrixHeigh
/
5
-
4
,
20
,
20
);
g2
.
setColor
(
new
Color
(
128
,
128
,
128
));
g2
.
setColor
(
new
Color
(
128
,
128
,
128
));
g2
.
draw
(
round2
);
// 绘制圆弧矩形
g2
.
draw
(
round2
);
// 绘制圆弧矩形
g2
.
dispose
();
g2
.
dispose
();
matrixImage
.
flush
()
;
matrixImage
.
flush
();
return
matrixImage
;
return
matrixImage
;
}
}
}
}
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/utils/MatrixToImageWriter.java
View file @
77f3700c
...
@@ -28,7 +28,7 @@ public class MatrixToImageWriter {
...
@@ -28,7 +28,7 @@ public class MatrixToImageWriter {
BufferedImage
image
=
new
BufferedImage
(
width
,
height
,
BufferedImage
.
TYPE_INT_RGB
);
BufferedImage
image
=
new
BufferedImage
(
width
,
height
,
BufferedImage
.
TYPE_INT_RGB
);
for
(
int
x
=
0
;
x
<
width
;
x
++)
{
for
(
int
x
=
0
;
x
<
width
;
x
++)
{
for
(
int
y
=
0
;
y
<
height
;
y
++)
{
for
(
int
y
=
0
;
y
<
height
;
y
++)
{
image
.
setRGB
(
x
,
y
,
(
matrix
.
get
(
x
,
y
)
?
BLACK
:
WHITE
));
image
.
setRGB
(
x
,
y
,
(
matrix
.
get
(
x
,
y
)
?
BLACK
:
WHITE
));
// image.setRGB(x, y, (matrix.get(x, y) ? Color.YELLOW.getRGB() : Color.CYAN.getRGB()));
// image.setRGB(x, y, (matrix.get(x, y) ? Color.YELLOW.getRGB() : Color.CYAN.getRGB()));
}
}
}
}
...
@@ -46,7 +46,7 @@ public class MatrixToImageWriter {
...
@@ -46,7 +46,7 @@ public class MatrixToImageWriter {
if
(!
ImageIO
.
write
(
image
,
format
,
file
))
{
if
(!
ImageIO
.
write
(
image
,
format
,
file
))
{
throw
new
IOException
(
"Could not write an image of format "
+
format
+
" to "
+
file
);
throw
new
IOException
(
"Could not write an image of format "
+
format
+
" to "
+
file
);
}
else
{
}
else
{
log
.
info
(
"图片生成成功!"
);
log
.
info
(
"图片生成成功!"
);
return
true
;
return
true
;
}
}
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/utils/QrcodeUtil.java
View file @
77f3700c
...
@@ -32,6 +32,7 @@ public class QrcodeUtil {
...
@@ -32,6 +32,7 @@ public class QrcodeUtil {
/**
/**
* 对应卡券编码
* 对应卡券编码
*
* @param contents
* @param contents
* @return
* @return
* @throws WriterException
* @throws WriterException
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/web/CheckcouponController.java
View file @
77f3700c
...
@@ -65,7 +65,7 @@ public class CheckcouponController {
...
@@ -65,7 +65,7 @@ public class CheckcouponController {
Checkcoupon
checkcoupon
=
checkcouponService
.
fetchById
(
id
);
Checkcoupon
checkcoupon
=
checkcouponService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
checkcoupon
);
model
.
addAttribute
(
"data"
,
checkcoupon
);
}
}
model
.
addAttribute
(
"
isView
"
,
pageType
.
equals
(
"View"
)
?
true
:
false
);
//是否查看页面
model
.
addAttribute
(
"
pageType
"
,
pageType
.
equals
(
"View"
)
?
true
:
false
);
//是否查看页面
return
"checkcoupon/checkcouponform"
;
return
"checkcoupon/checkcouponform"
;
}
}
...
@@ -77,6 +77,19 @@ public class CheckcouponController {
...
@@ -77,6 +77,19 @@ public class CheckcouponController {
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
JSONObject
rtnJson
=
new
JSONObject
();
try
{
try
{
//替换文本域中换行符
if
(
StringUtils
.
isNoneBlank
(
checkcoupon
.
getRemarks
()))
{
String
remarks
=
checkcoupon
.
getRemarks
()
//
.
replaceAll
(
"\r\n"
,
"<br>"
)
.
replaceAll
(
"\n"
,
"<br>"
);
checkcoupon
.
setRemarks
(
remarks
);
}
if
(
StringUtils
.
isNoneBlank
(
checkcoupon
.
getInstructions
()))
{
String
instructions
=
checkcoupon
.
getInstructions
()
//
.
replaceAll
(
"\r\n"
,
"<br>"
)
.
replaceAll
(
"\n"
,
"<br>"
);
checkcoupon
.
setInstructions
(
instructions
);
}
if
(
checkcoupon
!=
null
&&
checkcoupon
.
getId
()
!=
null
)
{
if
(
checkcoupon
!=
null
&&
checkcoupon
.
getId
()
!=
null
)
{
checkcoupon
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
checkcoupon
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
checkcouponService
.
update
(
checkcoupon
);
checkcouponService
.
update
(
checkcoupon
);
...
@@ -108,12 +121,12 @@ public class CheckcouponController {
...
@@ -108,12 +121,12 @@ public class CheckcouponController {
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Checkcoupon
checkcoupon
,
HttpServletRequest
request
)
{
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Checkcoupon
checkcoupon
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"
t.
del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
conds
.
equal
(
"
t.
accounts_id"
,
accountsId
);
if
(
StringUtils
.
isNoneBlank
(
checkcoupon
.
getName
()))
{
if
(
StringUtils
.
isNoneBlank
(
checkcoupon
.
getName
()))
{
conds
.
like
(
"name"
,
checkcoupon
.
getName
());
conds
.
like
(
"
t.
name"
,
checkcoupon
.
getName
());
}
}
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
Sort
sort
=
new
Sort
(
"
t.
create_time"
,
OrderType
.
DESC
);
List
<
Checkcoupon
>
list
=
checkcouponService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
List
<
Checkcoupon
>
list
=
checkcouponService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
checkcouponService
.
count
(
conds
);
Integer
counts
=
checkcouponService
.
count
(
conds
);
...
@@ -145,8 +158,8 @@ public class CheckcouponController {
...
@@ -145,8 +158,8 @@ public class CheckcouponController {
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"
t.
del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
conds
.
equal
(
"
t.
accounts_id"
,
accountId
);
List
<
Checkcoupon
>
list
=
checkcouponService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
List
<
Checkcoupon
>
list
=
checkcouponService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Checkcoupon
.
class
,
response
).
toExcel
(
list
,
"检测券管理信息"
);
ExcelKit
.
$Export
(
Checkcoupon
.
class
,
response
).
toExcel
(
list
,
"检测券管理信息"
);
}
}
...
...
aidea-modules/checkresult-module-web/src/main/webapp/WEB-INF/views/checkresult/checkresultform.html
View file @
77f3700c
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<![endif]-->
<link
rel=
"stylesheet"
href=
"common/css/uePicPicker.css"
>
</head>
</head>
<!-- END HEAD -->
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
...
@@ -197,6 +198,9 @@
...
@@ -197,6 +198,9 @@
value=
"$!{data.result}"
#
if
($!{
pageType
}==
'
true
')
value=
"$!{data.result}"
#
if
($!{
pageType
}==
'
true
')
readonly=
"readonly"
#
end
></textarea>
readonly=
"readonly"
#
end
></textarea>
</div>
</div>
<div
class=
"form-group form-md-line-input col-md-12"
id=
"img"
>
</div>
</div>
</div>
</div>
</div>
...
@@ -252,6 +256,10 @@
...
@@ -252,6 +256,10 @@
<script
type=
"text/javascript"
src=
"plugins/daterangepicker-master/moment.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/daterangepicker-master/moment.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/daterangepicker-master/daterangepicker.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/daterangepicker-master/daterangepicker.js"
></script>
<script
src=
"js/jquery.serializejson.js"
></script>
<script
src=
"plugins/Sortable/Sortable.min.js"
></script>
<script
src=
"common/component/uePicPicker.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- END PAGE LEVEL PLUGINS -->
<script>
<script>
//定义locale汉化插件
//定义locale汉化插件
...
@@ -269,10 +277,25 @@
...
@@ -269,10 +277,25 @@
"firstDay"
:
1
"firstDay"
:
1
};
};
var
coverPP
=
null
;
var
initPicsSel
=
function
()
{
var
resultImg
=
"$!{data.description}"
;
coverPP
=
new
uePicPicker
({
tarId
:
'img'
,
title
:
'检测结果上传'
,
sizeDes
:
''
,
max
:
1
,
datas
:
resultImg
==
''
?
null
:
resultImg
.
split
(
","
),
success
:
null
});
coverPP
.
init
();
};
$
().
ready
(
function
()
{
$
().
ready
(
function
()
{
Cfapp
.
init
();
Cfapp
.
init
();
recdTypeAdd
.
init
();
recdTypeAdd
.
init
();
initParams
();
initParams
();
initPicsSel
();
$
(
'.datepicker'
).
daterangepicker
({
$
(
'.datepicker'
).
daterangepicker
({
'locale'
:
locale
,
'locale'
:
locale
,
...
@@ -320,7 +343,12 @@
...
@@ -320,7 +343,12 @@
messages
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/checkresult/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
var
description
=
coverPP
.
getStringValues
().
split
(
','
)[
0
];
var
data
=
$
(
"#myForm"
).
serializeJSON
();
data
.
description
=
description
;
$
.
getJSON
(
"#springUrl('/a/checkresult/formData')"
,
data
,
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
Cfapp
.
confirm
({
...
...
aidea-modules/checkresult-module/src/main/java/com/cftech/checkresult/web/CheckresultController.java
View file @
77f3700c
...
@@ -95,8 +95,8 @@ public class CheckresultController {
...
@@ -95,8 +95,8 @@ public class CheckresultController {
}
}
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getSendCheckNo
()))
{
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getSendCheckNo
()))
{
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"
t.
del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"number"
,
checkresult
.
getSendCheckNo
());
conds
.
equal
(
"
t.
number"
,
checkresult
.
getSendCheckNo
());
Couponrecord
couponrecord
=
couponrecordService
.
fetchSearchByConds
(
conds
);
Couponrecord
couponrecord
=
couponrecordService
.
fetchSearchByConds
(
conds
);
if
(
couponrecord
!=
null
)
if
(
couponrecord
!=
null
)
checkresult
.
setOpenid
(
couponrecord
.
getOpenid
());
checkresult
.
setOpenid
(
couponrecord
.
getOpenid
());
...
...
aidea-modules/consult-module-web/src/main/webapp/WEB-INF/views/consultSheet/consultSheetform.html
View file @
77f3700c
...
@@ -224,10 +224,10 @@
...
@@ -224,10 +224,10 @@
<input
type=
"text"
name=
"allergy"
id=
"allergy"
value=
"$!{data.allergy}"
<input
type=
"text"
name=
"allergy"
id=
"allergy"
value=
"$!{data.allergy}"
class=
"form-control"
style=
"display: none"
>
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"hospital"
name=
"hospital"
<input
type=
"text"
id=
"hospital"
name=
"hospital"
value=
"$!{data.hospital}"
class=
"form-control
"
disabled
>
value=
"$!{data.hospital}"
class=
"form-control
selHospital"
readonly
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
name=
"selHospital"
id=
"selHospital"
<button
type=
"button"
name=
"selHospital"
id=
"selHospital"
class=
"btn btn-info btn-flat"
>
选择
</button>
class=
"btn btn-info btn-flat
selHospital
"
>
选择
</button>
</span>
</span>
</div>
</div>
#end
#end
...
@@ -246,10 +246,10 @@
...
@@ -246,10 +246,10 @@
value=
"$!{data.pastRecords}"
class=
"form-control"
value=
"$!{data.pastRecords}"
class=
"form-control"
style=
"display: none"
>
style=
"display: none"
>
<input
type=
"text"
id=
"pharmacist"
name=
"pharmacist"
<input
type=
"text"
id=
"pharmacist"
name=
"pharmacist"
value=
"$!{data.pharmacist}"
class=
"form-control
"
disabled
>
value=
"$!{data.pharmacist}"
class=
"form-control
selDoctor"
readonly
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
name=
"selDoctor"
id=
"selDoctor"
<button
type=
"button"
name=
"selDoctor"
id=
"selDoctor"
class=
"btn btn-info btn-flat"
>
选择
</button>
class=
"btn btn-info btn-flat
selDoctor
"
>
选择
</button>
</span>
</span>
</div>
</div>
#end
#end
...
@@ -265,20 +265,20 @@
...
@@ -265,20 +265,20 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-3"
>
<!-- <div class="form-group form-md-line-input col-xs-3">--
>
<label></label
>
<!-- <label></label>--
>
<div
class=
"input-group"
>
<!-- <div class="input-group">--
>
<input
type=
"text"
name=
"historySheet"
id=
"historySheet"
<!-- <input type="text" name="historySheet" id="historySheet"-->
class=
"form-control"
<!-- class="form-control"-->
style=
"display: none"
>
<!-- style="display: none">--
>
<input
type=
"text"
id=
"historySheetName"
name=
"historySheetName"
<!-- <input type="text" id="historySheetName" name="historySheetName"-->
class=
"form-control"
style=
"display: none"
>
<!-- class="form-control" style="display: none">--
>
<span
class=
"input-group-btn"
>
<!-- <span class="input-group-btn">--
>
<button
type=
"button"
name=
"history"
id=
"history"
<!-- <button type="button" name="history" id="history"-->
class=
"btn btn-info btn-flat"
>
查看历史咨询单
</button
>
<!-- class="btn btn-info btn-flat">查看历史咨询单</button>--
>
</span
>
<!-- </span>--
>
</div
>
<!-- </div>--
>
</div
>
<!-- </div>--
>
<div
class=
"form-group form-md-line-input col-xs-3"
>
<div
class=
"form-group form-md-line-input col-xs-3"
>
<label>
处方单
<font
style=
"color: red"
></font></label>
<label>
处方单
<font
style=
"color: red"
></font></label>
...
@@ -324,15 +324,39 @@
...
@@ -324,15 +324,39 @@
</div>
</div>
</div>
</div>
<!-- 查询历史咨询单 -->
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
历史咨询单
</div>
<div
class=
"panel-body"
>
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td>
<th>
咨询单编码
</th>
<th>
订单编码
</th>
<th>
用药人姓名
</th>
<th>
审核状态
</th>
<th>
拒绝原由
</th>
<th>
提交时间
</th>
<th>
审核时间
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
</div>
<div
class=
"box-footer"
>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:consultSheet:edit"))
#if($shiro.hasPermission("qy:consultSheet:edit"))
<input
class=
"btn btn-info"
id=
"save"
value=
"通过"
type=
"submit"
>
<input
class=
"btn btn-info"
id=
"save"
value=
"通过"
type=
"submit"
>
#end
#end
<a
id=
"reject"
class=
"btn btn-danger"
data-toggle=
"modal"
<a
id=
"reject"
class=
"btn btn-danger"
data-toggle=
"modal"
data-target=
"#exampleModal"
>
不通过
</a>
data-target=
"#exampleModal"
>
拒绝
</a>
<a
href=
"#springUrl('/a/consultSheet/list')"
class=
"btn btn-default"
>
返回
</a>
<a
href=
"#springUrl('/a/consultSheet/list')"
class=
"btn btn-default"
>
返回
</a>
</div>
</div>
</div>
</div>
</form>
</form>
...
@@ -380,6 +404,7 @@
...
@@ -380,6 +404,7 @@
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"js/moment.min.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- END PAGE LEVEL PLUGINS -->
<script>
<script>
...
@@ -531,6 +556,7 @@
...
@@ -531,6 +556,7 @@
goodList
();
goodList
();
Cfapp
.
init
();
Cfapp
.
init
();
recdTypeAdd
.
init
();
recdTypeAdd
.
init
();
initTables
();
});
});
...
@@ -612,7 +638,7 @@
...
@@ -612,7 +638,7 @@
/**
/**
* 处方医院
* 处方医院
*/
*/
$
(
"
#
selHospital"
).
click
(
function
()
{
$
(
"
.
selHospital"
).
click
(
function
()
{
Cfapp
.
f7
({
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/wxQrcode/listOrg')"
,
dataUrl
:
"#springUrl('/a/wxQrcode/listOrg')"
,
checkType
:
"single"
,
// 多选为multi
checkType
:
"single"
,
// 多选为multi
...
@@ -655,7 +681,7 @@
...
@@ -655,7 +681,7 @@
/**
/**
* 处方医生
* 处方医生
*/
*/
$
(
"
#
selDoctor"
).
click
(
function
()
{
$
(
"
.
selDoctor"
).
click
(
function
()
{
let
allergy
=
$
(
`input[name='allergy']`
).
val
();
let
allergy
=
$
(
`input[name='allergy']`
).
val
();
if
(
allergy
==
null
||
allergy
==
''
)
{
if
(
allergy
==
null
||
allergy
==
''
)
{
Cfapp
.
alert
({
Cfapp
.
alert
({
...
@@ -962,6 +988,167 @@
...
@@ -962,6 +988,167 @@
return
year
+
"-"
+
(
month
<=
9
?
"0"
+
month
:
month
)
+
"-"
+
(
date
<=
9
?
"0"
+
date
:
date
)
+
" "
+
(
hour
<=
9
?
"0"
+
hour
:
hour
)
+
":"
return
year
+
"-"
+
(
month
<=
9
?
"0"
+
month
:
month
)
+
"-"
+
(
date
<=
9
?
"0"
+
date
:
date
)
+
" "
+
(
hour
<=
9
?
"0"
+
hour
:
hour
)
+
":"
+
(
minute
<=
9
?
"0"
+
minute
:
minute
)
+
":"
+
(
second
<=
9
?
"0"
+
second
:
second
);
+
(
minute
<=
9
?
"0"
+
minute
:
minute
)
+
":"
+
(
second
<=
9
?
"0"
+
second
:
second
);
}
}
function
initTables
()
{
var
sSource
=
"#springUrl('/a/consultSheet/listData')?openId="
+
openid
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
// $("#seachTableForm input,select").each(function () {
// var params = {
// name: $(this).attr("name"),
// value: $(this).val()
// };
// aoData.push(params);
// });
$
.
ajax
({
"type"
:
"GET"
,
"url"
:
sSource
,
"dataType"
:
"json"
,
"data"
:
aoData
,
//以json格式传递
"success"
:
fnCallback
});
};
$
(
'#table'
).
DataTable
({
"lengthChange"
:
false
,
"searching"
:
false
,
"ordering"
:
false
,
"bFiltered"
:
false
,
"bStateSave"
:
true
,
// save datatable state(pagination, sort, etc) in cookie.
"bProcessing"
:
true
,
"bServerSide"
:
true
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
// "autoWidth": true,
// "scrollX": true,
"sScrollY"
:
"300px"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"consultId"
},
{
"mData"
:
"orderCode"
},
{
"mData"
:
"userName"
},
{
"mData"
:
"status"
},
{
"mData"
:
"description"
},
{
"mData"
:
"createTime"
},
{
"mData"
:
"auditTime"
}
],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
],
},
{
"aTargets"
:
[
1
],
"mData"
:
"consultId"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
)
{
return
a
;
}
else
{
return
null
;
}
}
},
{
"aTargets"
:
[
2
],
"mData"
:
"orderCode"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
)
{
var
html
=
`#if($shiro.hasPermission("qy:order:view"))<a href="#springUrl("/a/consultSheet/orderlist?orderCode=`
+
a
+
`")">`
+
a
+
`</a>#else`
+
a
+
`#end`
;
return
html
;
}
else
{
return
''
;
}
}
},
{
"aTargets"
:
[
3
],
"mData"
:
"userName"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
c
)
{
return
c
.
userName
.
slice
(
0
,
1
)
+
'*'
+
c
.
userName
.
slice
(
2
,
c
.
userName
.
length
);
}
else
{
return
null
;
}
}
},
{
"aTargets"
:
[
4
],
"mData"
:
"status"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
0
)
{
return
"待审核"
;
}
else
if
(
a
==
1
)
{
return
"已通过"
;
}
else
if
(
a
==
2
)
{
return
"已拒绝"
;
}
}
},
{
"aTargets"
:
[
5
],
"mData"
:
"description"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
)
{
return
a
;
}
else
{
return
null
;
}
}
},
{
"aTargets"
:
[
6
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
)
{
return
moment
(
a
).
format
(
'YYYY-MM-DD HH:mm:ss'
);;
}
else
{
return
null
;
}
}
},
{
"aTargets"
:
[
7
],
"mData"
:
"auditTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
)
{
return
a
;
}
else
{
return
null
;
}
}
}
]
});
}
</script>
</script>
</body>
</body>
...
...
aidea-modules/consult-module-web/src/main/webapp/WEB-INF/views/consultSheet/consultSheetlist.html
View file @
77f3700c
...
@@ -82,6 +82,18 @@
...
@@ -82,6 +82,18 @@
name=
"consultId"
placeholder=
"咨询单编码"
>
name=
"consultId"
placeholder=
"咨询单编码"
>
</div>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"fansAlias"
placeholder=
"别名"
>
</div>
<div
class=
"col-xs-2"
>
<select
id=
"isThree"
name=
"isThree"
class=
"form-control required"
>
<option
value=
""
>
请选择患者类型
</option>
<option
value=
"3"
>
三期患者
</option>
</select>
</div>
<div
class=
"col-xs-2"
>
<div
class=
"col-xs-2"
>
<select
id=
"status"
name=
"status"
class=
"form-control required"
>
<select
id=
"status"
name=
"status"
class=
"form-control required"
>
<option
value=
""
>
请选择审核状态
</option>
<option
value=
""
>
请选择审核状态
</option>
...
@@ -162,11 +174,13 @@
...
@@ -162,11 +174,13 @@
<th>
咨询单编码
</th>
<th>
咨询单编码
</th>
<th>
订单编码
</th>
<th>
订单编码
</th>
<th>
用药人姓名
</th>
<th>
用药人姓名
</th>
<th>
性别
</th>
<th>
别名
</th>
<th>
联系电话
</th>
<!-- <th>性别</th>-->
<!-- <th>联系电话</th>-->
<th>
是否购药
</th>
<th>
三期患者
</th>
<th>
三期患者
</th>
<th>
药师
姓名
</th>
<th>
药师
</th>
<th>
客服
姓名
</th>
<th>
客服
</th>
<th>
审核状态
</th>
<th>
审核状态
</th>
<th>
拒绝原由
</th>
<th>
拒绝原由
</th>
<th>
提交时间
</th>
<th>
提交时间
</th>
...
@@ -267,8 +281,9 @@
...
@@ -267,8 +281,9 @@
"sAjaxSource"
:
sSource
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"pagingType"
:
"full_numbers"
,
"auto
w
idth"
:
true
,
"auto
W
idth"
:
true
,
"scrollX"
:
true
,
"scrollX"
:
true
,
"sScrollY"
:
false
,
"aoColumns"
:
[
"aoColumns"
:
[
{
{
"mData"
:
"id"
"mData"
:
"id"
...
@@ -283,10 +298,16 @@
...
@@ -283,10 +298,16 @@
"mData"
:
"userName"
"mData"
:
"userName"
},
},
{
{
"mData"
:
"
sex
"
"mData"
:
"
fansAlias
"
},
},
// {
// "mData": "sex"
// },
// {
// "mData": "phone"
// },
{
{
"mData"
:
"
phone
"
"mData"
:
"
isSales
"
},
},
{
{
"mData"
:
"isThree"
"mData"
:
"isThree"
...
@@ -317,9 +338,10 @@
...
@@ -317,9 +338,10 @@
"aoColumnDefs"
:
[
"aoColumnDefs"
:
[
{
// set default column settings
{
// set default column settings
'visible'
:
false
,
'visible'
:
false
,
'targets'
:
[
0
]
'targets'
:
[
0
]
,
},
},
{
{
width
:
"100px"
,
"aTargets"
:
[
1
],
"aTargets"
:
[
1
],
"mData"
:
"consultId"
,
"mData"
:
"consultId"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -332,6 +354,7 @@
...
@@ -332,6 +354,7 @@
}
}
},
},
{
{
"width"
:
"100px"
,
"aTargets"
:
[
2
],
"aTargets"
:
[
2
],
"mData"
:
"orderCode"
,
"mData"
:
"orderCode"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -346,6 +369,7 @@
...
@@ -346,6 +369,7 @@
}
}
},
},
{
{
"width"
:
"70px"
,
"aTargets"
:
[
3
],
"aTargets"
:
[
3
],
"mData"
:
"userName"
,
"mData"
:
"userName"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -357,31 +381,57 @@
...
@@ -357,31 +381,57 @@
}
}
},
},
{
{
"width"
:
"60px"
,
"aTargets"
:
[
4
],
"aTargets"
:
[
4
],
"mData"
:
"
sex
"
,
"mData"
:
"
fansAlias
"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
0
)
{
if
(
a
)
{
return
"女"
;
return
a
;
}
else
{
}
else
{
return
"男"
;
return
null
;
}
}
}
}
},
},
// {
// "aTargets": [4],
// "mData": "sex",
// "mRender": function (a, b, c, d) {
// if (a == 0) {
// return "女";
// } else {
// return "男";
// }
//
// }
// },
// {
// "aTargets": [5],
// "mData": "phone",
// "mRender": function (a, b, c, d) {
// if (c) {
// return c.phone.slice(0, 3) + '****' + c.phone.slice(7);
//
// } else {
// return null;
// }
// }
//
// },
{
{
"width"
:
"60px"
,
"aTargets"
:
[
5
],
"aTargets"
:
[
5
],
"mData"
:
"
phone
"
,
"mData"
:
"
isSales
"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
c
)
{
if
(
a
==
'1'
)
{
return
c
.
phone
.
slice
(
0
,
3
)
+
'****'
+
c
.
phone
.
slice
(
7
);
return
'是'
;
}
else
if
(
a
==
'0'
)
{
}
else
{
return
'否'
;
return
null
;
}
}
}
}
},
},
{
{
"width"
:
"60px"
,
"aTargets"
:
[
6
],
"aTargets"
:
[
6
],
"mData"
:
"isThree"
,
"mData"
:
"isThree"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -394,6 +444,7 @@
...
@@ -394,6 +444,7 @@
},
},
{
{
"width"
:
"50px"
,
"aTargets"
:
[
7
],
"aTargets"
:
[
7
],
"mData"
:
"pharmaName"
,
"mData"
:
"pharmaName"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -405,6 +456,7 @@
...
@@ -405,6 +456,7 @@
}
}
},
},
{
{
"width"
:
"50px"
,
"aTargets"
:
[
8
],
"aTargets"
:
[
8
],
"mData"
:
"customerName"
,
"mData"
:
"customerName"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -416,6 +468,7 @@
...
@@ -416,6 +468,7 @@
}
}
},
},
{
{
"width"
:
"60px"
,
"aTargets"
:
[
9
],
"aTargets"
:
[
9
],
"mData"
:
"status"
,
"mData"
:
"status"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -429,6 +482,7 @@
...
@@ -429,6 +482,7 @@
}
}
},
},
{
{
"width"
:
"120px"
,
"aTargets"
:
[
10
],
"aTargets"
:
[
10
],
"mData"
:
"description"
,
"mData"
:
"description"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -440,6 +494,7 @@
...
@@ -440,6 +494,7 @@
}
}
},
},
{
{
"width"
:
"120px"
,
"aTargets"
:
[
11
],
"aTargets"
:
[
11
],
"mData"
:
"createTime"
,
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -451,6 +506,7 @@
...
@@ -451,6 +506,7 @@
}
}
},
},
{
{
"width"
:
"120px"
,
"aTargets"
:
[
12
],
"aTargets"
:
[
12
],
"mData"
:
"auditTime"
,
"mData"
:
"auditTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
@@ -462,12 +518,13 @@
...
@@ -462,12 +518,13 @@
}
}
},
},
{
{
"width"
:
"80px"
,
"aTargets"
:
[
13
],
"aTargets"
:
[
13
],
"mData"
:
"id"
,
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
html
=
''
;
let
html
=
''
;
html
+=
'<div class="btn-group">
\
n'
+
html
+=
'<div class="btn-group">
\
n'
+
'<button type="button" class="btn btn-success btn-flat">操作</button>
\
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'
+
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">
\
n'
+
' <span class="caret"></span>
\
n'
+
' <span class="caret"></span>
\
n'
+
' <span class="sr-only">Toggle Dropdown</span>
\
n'
+
' <span class="sr-only">Toggle Dropdown</span>
\
n'
+
...
...
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
View file @
77f3700c
...
@@ -208,19 +208,24 @@
...
@@ -208,19 +208,24 @@
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0'
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
<if
test=
"id!=null"
>
and (a.doctor_id = ${id} or a.service_id =${id} )
</if>
<if
test=
"id!=null"
>
and (a.doctor_id = ${id} or a.service_id =${id} )
</if>
</select>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultType=
"com.cftech.consultsheet.model.ConsultSheet"
>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultType=
"com.cftech.consultsheet.model.ConsultSheet"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
, o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree
<include
refid=
"sqlColumns"
/>
,
o.number orderCode, CASE WHEN au.name IS NOT NULL THEN 1 ELSE 0 END isThree,
CASE WHEN o.status = '2' OR o.status = '3' OR o.status = '4' THEN 1 ELSE 0 END isSales,
f.store fansAlias
FROM t_aidea_consult_sheet a
FROM t_aidea_consult_sheet a
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_order o ON a.order_id = o.id
LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser b ON b.id = a.doctor_id AND b.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN t_qyuser c ON c.id = a.service_id AND c.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN wx_mp_member m ON m.open_id = a.open_id AND m.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN t_aidea_authentication au ON m.cardid = au.id_card AND au.del_flag = '0'
LEFT JOIN wx_mp_fanss f ON f.openid = a.open_id AND f.delflag = '0'
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
<if
test=
"id!=null"
>
AND (a.doctor_id = ${id} or a.service_id =${id})
</if>
<if
test=
"id!=null"
>
AND (a.doctor_id = ${id} or a.service_id =${id})
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
...
...
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/model/ConsultSheet.java
View file @
77f3700c
...
@@ -94,6 +94,7 @@ public class ConsultSheet extends UserSheet implements Serializable {
...
@@ -94,6 +94,7 @@ public class ConsultSheet extends UserSheet implements Serializable {
private
String
fansAlias
;
//粉丝别名
private
String
fansAlias
;
//粉丝别名
private
String
nickName
;
//昵称
private
String
nickName
;
//昵称
private
String
isThree
;
//是否三期患者
private
String
isThree
;
//是否三期患者
private
String
isSales
;
//是否购买
public
ConsultSheet
()
{
public
ConsultSheet
()
{
this
.
delFlag
=
false
;
this
.
delFlag
=
false
;
...
...
aidea-modules/consult-module/src/main/java/com/cftech/consultsheet/web/ConsultSheetController.java
View file @
77f3700c
...
@@ -191,7 +191,13 @@ public class ConsultSheetController {
...
@@ -191,7 +191,13 @@ public class ConsultSheetController {
conds
.
equal
(
"a.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"a.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"a.accounts_id"
,
accountsId
);
conds
.
equal
(
"a.accounts_id"
,
accountsId
);
if
(
StringUtils
.
isNoneBlank
(
consultSheet
.
getConsultId
()))
{
if
(
StringUtils
.
isNoneBlank
(
consultSheet
.
getConsultId
()))
{
conds
.
like
(
"a.consult_id"
,
"%"
+
consultSheet
.
getConsultId
()
+
"%"
);
conds
.
like
(
"a.consult_id"
,
consultSheet
.
getConsultId
());
}
if
(
StringUtils
.
isNoneBlank
(
consultSheet
.
getFansAlias
()))
{
conds
.
like
(
"f.store"
,
consultSheet
.
getFansAlias
());
}
if
(
StringUtils
.
equals
(
consultSheet
.
getIsThree
(),
"3"
))
{
conds
.
notNull
(
"au.name"
);
}
}
if
(
StringUtils
.
isNoneBlank
(
consultSheet
.
getStatus
()))
{
if
(
StringUtils
.
isNoneBlank
(
consultSheet
.
getStatus
()))
{
conds
.
equal
(
"a.status"
,
consultSheet
.
getStatus
());
conds
.
equal
(
"a.status"
,
consultSheet
.
getStatus
());
...
...
aidea-modules/couponrecord-module-web/src/main/webapp/WEB-INF/views/couponrecord/couponrecordform.html
View file @
77f3700c
...
@@ -73,10 +73,111 @@
...
@@ -73,10 +73,111 @@
<!-- general form elements disabled -->
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
<div
class=
"box-body"
>
</div>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
基础信息
</div>
<div
class=
"panel-body"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"couponName"
>
检测券名称
</label>
<input
type=
"text"
class=
"form-control"
id=
"couponName"
name=
"couponName"
placeholder=
"检测券名称"
value=
"$!{data.couponName}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"number"
>
检测券编码
</label>
<input
type=
"text"
class=
"form-control"
id=
"number"
name=
"number"
placeholder=
"检测券编码"
value=
"$!{data.number}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"nickName"
>
患者名称
</label>
<input
type=
"text"
class=
"form-control"
id=
"nickName"
name=
"nickName"
placeholder=
"患者名称"
value=
"$!{data.nickName}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"openid"
>
患者openid
</label>
<input
type=
"text"
class=
"form-control"
id=
"openid"
name=
"openid"
placeholder=
"患者openid"
value=
"$!{data.openid}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"createTime"
>
发放日期
</label>
<input
type=
"text"
class=
"form-control"
id=
"createTime"
name=
"createTime"
placeholder=
"发放日期"
value =
"$!date.format('yyyy-MM-dd HH:mm:ss ',$!data.createTime)"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"expireDate"
>
失效时间
</label>
<input
type=
"text"
class=
"form-control"
id=
"expireDate"
name=
"expireDate"
placeholder=
"失效时间"
value=
"$!date.format('yyyy-MM-dd HH:mm:ss ',$!data.expireDate)"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"verifDate"
>
核销时间
</label>
<input
type=
"text"
class=
"form-control"
id=
"verifDate"
name=
"verifDate"
placeholder=
"核销时间"
value=
"$!date.format('yyyy-MM-dd HH:mm:ss ',$!data.verifDate)"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"hospitalName"
>
核销医院
</label>
<input
type=
"text"
class=
"form-control"
id=
"hospitalName"
name=
"hospitalName"
placeholder=
"核销医院"
value=
"$!{data.hospitalName}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"status"
>
状态
</label>
<input
type=
"text"
class=
"form-control"
id=
"status"
name=
"status"
placeholder=
"状态"
#
if
($!{
data
.
status
}==
'
0
')
value=
"未激活"
#
elseif
($!{
data
.
status
}
==
'
1
')
value=
"待核销"
#
elseif
($!{
data
.
status
}
==
'
2
')
value=
"已核销"
#
else
value=
"已过期"
#
end
readonly=
"readonly"
/>
</div>
</div>
</div>
</div>
<div
class=
"box-footer"
>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:couponrecord:edit"))
#if($shiro.hasPermission("qy:couponrecord:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
...
@@ -136,7 +237,7 @@
...
@@ -136,7 +237,7 @@
bindEvent
();
bindEvent
();
};
};
var
bindEvent
=
function
()
{
var
bindEvent
=
function
()
{
$
(
"#myForm"
).
validate
({
$
(
"#myForm"
).
validate
({
rules
:
{},
rules
:
{},
messages
:
{},
messages
:
{},
...
...
aidea-modules/couponrecord-module-web/src/main/webapp/WEB-INF/views/couponrecord/couponrecordlist.html
View file @
77f3700c
...
@@ -77,10 +77,30 @@
...
@@ -77,10 +77,30 @@
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/couponrecord/list')"
method=
"get"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/couponrecord/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"number"
placeholder=
"检测券编码"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"nickName"
placeholder=
"昵称"
>
</div>
<div
class=
"col-xs-2"
>
<select
id=
"status"
name=
"status"
class=
"form-control required"
>
<option
value=
""
>
请选择状态
</option>
<option
value=
"0"
>
未激活
</option>
<option
value=
"1"
>
待核销
</option>
<option
value=
"2"
>
已核销
</option>
<option
value=
"3"
>
已过期
</option>
</select>
</div>
<div
class=
"col-xs-5"
>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:couponrecord:edit"))
#if($shiro.hasPermission("qy:couponrecord:edit"))
<a
href=
"#springUrl('/a/couponrecord/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<a
href=
"#springUrl('/a/couponrecord/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
#end
#end
</div>
</div>
</form>
</form>
...
@@ -90,7 +110,12 @@
...
@@ -90,7 +110,12 @@
<thead>
<thead>
<tr>
<tr>
<td
hidden=
"true"
>
Id
</td>
<td
hidden=
"true"
>
Id
</td>
<th>
创建时间
</th>
<th>
检测券名称
</th>
<th>
检测券编码
</th>
<th>
患者名称
</th>
<th>
发放日期
</th>
<th>
状态
</th>
<!-- <th>创建时间</th>-->
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -187,9 +212,21 @@
...
@@ -187,9 +212,21 @@
{
{
"mData"
:
"id"
"mData"
:
"id"
},
},
{
"mData"
:
"couponName"
},
{
"mData"
:
"number"
},
{
"mData"
:
"nickName"
},
{
{
"mData"
:
"createTime"
"mData"
:
"createTime"
},
},
{
"mData"
:
"status"
},
{
{
"mData"
:
"id"
"mData"
:
"id"
}],
}],
...
@@ -198,13 +235,46 @@
...
@@ -198,13 +235,46 @@
'visible'
:
false
,
'visible'
:
false
,
'targets'
:
[
0
]
'targets'
:
[
0
]
},
},
{
"aTargets"
:
[
4
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
5
],
"mData"
:
"status"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
if
(
a
==
"0"
)
{
return
"未激活"
;
}
else
if
(
a
==
"1"
)
{
return
"待核销"
;
}
else
if
(
a
==
"2"
)
{
return
"已核销"
;
}
else
if
(
a
==
"3"
)
{
return
"已过期"
;
}
else
{
return
""
;
}
}
},
{
{
"aTargets"
:
[
1
],
"aTargets"
:
[
6
],
"mData"
:
"createTime"
,
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<a href="#springUrl("/a/couponrecord/form?id='
+
c
.
id
+
'")" data-id="'
+
c
.
id
+
'" data-action="view">'
+
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
let
html
=
''
;
+
'</a>'
;
html
+=
'<div class="btn-group">'
+
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">'
+
' <span class="caret"></span>'
+
' <span class="sr-only">Toggle Dropdown</span>'
+
'</button>'
+
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">'
;
html
+=
'<li>#if($shiro.hasPermission("qy:couponrecord:view"))<a href="#springUrl("/a/couponrecord/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
// html += '
<
li
>
#
if
(
$shiro
.
hasPermission
(
"qy:couponrecord:edit"
))
<
a
href
=
"#springUrl("
/
a
/
couponrecord
/
form
?
pageType
=
Edit
&
id
=
' + a + '
")"
class
=
"btn green"
>
修改
<
/a>#end</
li
>
';
html += '
<
/ul></
div
>
';
return html;
}
}
},
},
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
View file @
77f3700c
...
@@ -16,13 +16,19 @@
...
@@ -16,13 +16,19 @@
<result
column=
"verif_date"
property=
"verifDate"
/>
<result
column=
"verif_date"
property=
"verifDate"
/>
<result
column=
"facility_no"
property=
"facilityNo"
/>
<result
column=
"facility_no"
property=
"facilityNo"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"coupon_id"
property=
"couponId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"expire_date"
property=
"expireDate"
/>
<result
column=
"take_effect_date"
property=
"takeEffectDate"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<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=
"couponName"
property=
"couponName"
/>
<result
column=
"nickName"
property=
"nickName"
/>
<result
column=
"hospitalName"
property=
"hospitalName"
/>
</resultMap>
</resultMap>
<sql
id=
"sqlWhere"
>
<sql
id=
"sqlWhere"
>
...
@@ -53,26 +59,29 @@
...
@@ -53,26 +59,29 @@
</sql>
</sql>
<sql
id=
"sqlColumns"
>
<sql
id=
"sqlColumns"
>
id,
t.id,
take_effect_year,
t.take_effect_year,
take_effect_month,
t.take_effect_month,
expire_month,
t.expire_month,
type,
t.type,
number,
t.number,
openid,
t.openid,
qrcode,
t.qrcode,
invalid_date,
t.invalid_date,
verif_date,
t.verif_date,
facility_no,
t.facility_no,
hospital_id,
t.hospital_id,
accounts_id,
t.accounts_id,
del_flag,
t.coupon_id,
status,
t.del_flag,
create_time,
t.status,
update_time,
t.expire_date,
description,
t.take_effect_date,
create_by,
t.create_time,
update_by
t.update_time,
t.description,
t.create_by,
t.update_by
</sql>
</sql>
...
@@ -80,50 +89,61 @@
...
@@ -80,50 +89,61 @@
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_aidea_coupon_record
insert into t_aidea_coupon_record
(
(
<include
refid=
"sqlColumns"
/>
id, take_effect_year, take_effect_month, expire_month, type, number, openid, qrcode, invalid_date, verif_date,
facility_no, hospital_id, accounts_id, coupon_id, del_flag, status, expire_date, take_effect_date, create_time,
update_time, description, create_by, update_by
)
)
values
values
(
(
#{id, jdbcType=BIGINT},
#{id, jdbcType=BIGINT},
#{takeEffectYear, jdbcType=VARCHAR},
#{takeEffectYear, jdbcType=VARCHAR},
#{takeEffectMonth, jdbcType=VARCHAR},
#{takeEffectMonth, jdbcType=VARCHAR},
#{expireMonth, jdbcType=VARCHAR},
#{expireMonth, jdbcType=VARCHAR},
#{type, jdbcType=VARCHAR},
#{type, jdbcType=VARCHAR},
#{number, jdbcType=VARCHAR},
#{number, jdbcType=VARCHAR},
#{openid, jdbcType=VARCHAR},
#{openid, jdbcType=VARCHAR},
#{qrcode, jdbcType=VARCHAR},
#{qrcode, jdbcType=VARCHAR},
now(),
#{invalidDate, jdbcType=TIMESTAMP},
now(),
#{verifDate, jdbcType=TIMESTAMP},
#{facilityNo, jdbcType=VARCHAR},
#{facilityNo, jdbcType=VARCHAR},
#{hospitalId, jdbcType=BIGINT},
#{hospitalId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{couponId, jdbcType=BIGINT},
#{status, jdbcType=VARCHAR},
#{delFlag, jdbcType=TINYINT},
now(),
#{status, jdbcType=VARCHAR},
now(),
#{expireDate, jdbcType=TIMESTAMP},
#{description, jdbcType=VARCHAR},
#{takeEffectDate, jdbcType=TIMESTAMP},
#{createBy, jdbcType=BIGINT},
now(),
#{updateBy, jdbcType=BIGINT}
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
)
</insert>
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
, c.name couponName, f.nickname nickName, h.name hospitalName
FROM t_aidea_coupon_record t
FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid AND f.delflag = '0'
LEFT JOIN t_aidea_hospital h ON t.hospital_id = h.id AND h.del_flag = '0'
WHERE t.id=#{id}
WHERE t.id=#{id}
</select>
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_coupon_record
SELECT COUNT(1) FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
SELECT
<include
refid=
"sqlColumns"
/>
<include
refid=
"sqlColumns"
/>
, c.name couponName, f.nickname nickName
FROM t_aidea_coupon_record
FROM t_aidea_coupon_record t
LEFT JOIN t_aidea_check_coupon c ON t.coupon_id = c.id
LEFT JOIN wx_mp_fanss f ON f.openid = t.openid AND f.delflag = '0'
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
...
@@ -171,12 +191,21 @@
...
@@ -171,12 +191,21 @@
<if
test=
"accountsId != null"
>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
</if>
<if
test=
"status != null"
>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
status = #{status, jdbcType=VARCHAR},
</if>
</if>
<if
test=
"expireDate != null"
>
expire_date = #{expireDate, jdbcType=TIMESTAMP},
</if>
<if
test=
"takeEffectDate != null"
>
take_effect_date = #{takeEffectDate, jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
</if>
...
@@ -201,7 +230,8 @@
...
@@ -201,7 +230,8 @@
<select
id=
"CheckCouponYSYList"
resultType=
"map"
>
<select
id=
"CheckCouponYSYList"
resultType=
"map"
>
SELECT
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d')
invalid_date,status
from t_aidea_coupon_record
from t_aidea_coupon_record
where del_flag = 0 and status=2
where del_flag = 0 and status=2
<if
test=
"openId!=null"
>
<if
test=
"openId!=null"
>
...
@@ -215,7 +245,8 @@
...
@@ -215,7 +245,8 @@
<select
id=
"CheckCouponYGQList"
resultType=
"map"
>
<select
id=
"CheckCouponYGQList"
resultType=
"map"
>
SELECT
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d')
invalid_date,status
from t_aidea_coupon_record
from t_aidea_coupon_record
where del_flag = 0 and status=3
where del_flag = 0 and status=3
<if
test=
"openId!=null"
>
<if
test=
"openId!=null"
>
...
@@ -227,11 +258,12 @@
...
@@ -227,11 +258,12 @@
</if>
</if>
</select>
</select>
<select
id=
"CheckCouponDSYList"
resultType=
"map"
>
<select
id=
"CheckCouponDSYList"
resultType=
"map"
>
SELECT
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d')
from t_aidea_coupon_record
invalid_date,status
where del_flag = 0 and status=1
from t_aidea_coupon_record
where del_flag = 0 and status=1
<if
test=
"openId!=null"
>
<if
test=
"openId!=null"
>
and openid = #{openId}
and openid = #{openId}
</if>
</if>
...
@@ -242,44 +274,49 @@
...
@@ -242,44 +274,49 @@
</select>
</select>
<select
id=
"checkCouponDetails"
resultType=
"map"
>
<select
id=
"checkCouponDetails"
resultType=
"map"
>
SELECT
SELECT id,
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status,description,qrcode,hospital_Id
number,
DATE_FORMAT(create_time, '%Y-%m-%d') create_time,
DATE_FORMAT(invalid_date, '%Y-%m-%d') invalid_date,
status,
description,
qrcode,
hospital_Id
from t_aidea_coupon_record
from t_aidea_coupon_record
where id = #{id}
where id = #{id}
</select>
</select>
<select
id=
"buyingMedicineNumber"
parameterType=
"java.util.Map"
resultType=
"
map
"
>
<select
id=
"buyingMedicineNumber"
parameterType=
"java.util.Map"
resultType=
"
java.lang.Integer
"
>
SELECT
SELECT
SUM(d.drugs_num
) number
IFNULL(SUM(d.drugs_num), 0
) number
FROM t_order t
FROM t_order t
LEFT JOIN t_order_details d ON t.id = d.order_id
LEFT JOIN t_order_details d ON t.id = d.order_id
<include
refid=
"sqlWhere"
/>
<include
refid=
"sqlWhere"
/>
</select>
</select>
<update
id=
"updatePdaLog"
parameterType=
"java.util.Map"
>
<update
id=
"updatePdaLog"
parameterType=
"java.util.Map"
>
update t_aidea_PdaLog
set
update t_aidea_PdaLog
resultJson
= #{resultJson, jdbcType=VARCHAR},
set resultJson
= #{resultJson, jdbcType=VARCHAR},
status
= #{status, jdbcType=BIGINT},
status
= #{status, jdbcType=BIGINT},
update_time = now()
update_time = now()
where id
=
#{id,jdbcType=VARCHAR}
where id
=
#{id,jdbcType=VARCHAR}
</update>
</update>
<insert
id=
"insertPdaLog"
parameterType=
"java.util.Map"
useGeneratedKeys=
"true"
<insert
id=
"insertPdaLog"
parameterType=
"java.util.Map"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_aidea_PdaLog (id,content,create_time)
insert into t_aidea_PdaLog (id, content, create_time)
values
values (#{id, jdbcType=VARCHAR}, #{content, jdbcType=VARCHAR}, now())
(#{id, jdbcType=VARCHAR},#{content, jdbcType=VARCHAR},now())
</insert>
</insert>
<select
id=
"isWriteOff"
resultMap=
"resultMap"
>
<select
id=
"isWriteOff"
resultMap=
"resultMap"
>
SELECT
SELECT
id,
id,
status
status
FROM t_aidea_coupon_record
FROM t_aidea_coupon_record
where number
=
#{number}
where number
=
#{number}
</select>
</select>
<select
id=
"getHospitalIdByfaNo"
resultType=
"map"
>
<select
id=
"getHospitalIdByfaNo"
resultType=
"map"
>
SELECT
SELECT
id
id
FROM t_aidea_hospital t
FROM t_aidea_hospital t WHERE t.facility_no=
#{facilityNo}
WHERE t.facility_no =
#{facilityNo}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/job/CouponRecordJob.java
0 → 100644
View file @
77f3700c
package
com
.
cftech
.
couponrecord
.
job
;
import
com.cftech.accounts.model.SysJob
;
import
com.cftech.accounts.service.JobService
;
import
com.cftech.core.util.SpringContextHolder
;
import
com.cftech.core.util.SystemConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
org.quartz.Job
;
import
org.quartz.JobDataMap
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
import
java.text.SimpleDateFormat
;
@Slf4j
public
class
CouponRecordJob
implements
Job
{
@Override
public
void
execute
(
JobExecutionContext
context
)
throws
JobExecutionException
{
boolean
isCluster
=
Boolean
.
valueOf
(
SystemConfig
.
p
.
getProperty
(
"quartz.isCluster"
));
if
(!
isCluster
)
{
return
;
}
//获得明细数据
JobDataMap
jobInfo
=
context
.
getJobDetail
().
getJobDataMap
();
String
id
=
jobInfo
.
get
(
"uid"
)
==
null
?
""
:
jobInfo
.
getString
(
"uid"
);
//这个也是ID主键
log
.
info
(
"任务ID:"
+
id
);
//执行更新操作
if
(
context
.
getNextFireTime
()
!=
null
)
{
log
.
info
(
"同步检测券时间定时任务:下次执行时间====="
+
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
).
format
(
context
.
getNextFireTime
())
+
"=============="
);
}
else
{
JobService
jobService
=
SpringContextHolder
.
getBean
(
JobService
.
class
);
SysJob
sysJob
=
new
SysJob
();
sysJob
.
setJobuid
(
id
);
sysJob
.
setStatus
(
"0"
);
jobService
.
updateStatus
(
sysJob
);
log
.
info
(
"同步检测券时间定时任务,已执行完成!"
);
}
}
}
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/model/Couponrecord.java
View file @
77f3700c
...
@@ -57,6 +57,8 @@ public class Couponrecord implements Serializable {
...
@@ -57,6 +57,8 @@ public class Couponrecord implements Serializable {
private
Long
hospitalId
;
private
Long
hospitalId
;
/* 所属的账号 */
/* 所属的账号 */
private
Long
accountsId
;
private
Long
accountsId
;
/* 检测券Id */
private
Long
couponId
;
/* 删除标识 */
/* 删除标识 */
private
boolean
delFlag
;
private
boolean
delFlag
;
/* 状态 */
/* 状态 */
...
@@ -72,6 +74,11 @@ public class Couponrecord implements Serializable {
...
@@ -72,6 +74,11 @@ public class Couponrecord implements Serializable {
/* 更新人 */
/* 更新人 */
private
Long
updateBy
;
private
Long
updateBy
;
//未映射字段
private
String
couponName
;
private
String
nickName
;
private
String
hospitalName
;
public
Couponrecord
()
{
public
Couponrecord
()
{
this
.
delFlag
=
false
;
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
this
.
status
=
"0"
;
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/CouponrecordService.java
View file @
77f3700c
...
@@ -10,6 +10,7 @@ import com.cftech.core.generic.GenericService;
...
@@ -10,6 +10,7 @@ import com.cftech.core.generic.GenericService;
import
com.google.zxing.WriterException
;
import
com.google.zxing.WriterException
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -39,10 +40,12 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
...
@@ -39,10 +40,12 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
/**
/**
*
*
购买发券逻辑
* @param openId
* @param openId
* @param accountsId
* @param accountsId
* @return
* @return
* @throws IOException
* @throws WriterException
*/
*/
boolean
sendCouponRecord
(
String
openId
,
Long
accountsId
)
throws
IOException
,
WriterException
;
boolean
sendCouponRecord
(
String
openId
,
Long
accountsId
)
throws
IOException
,
WriterException
;
...
@@ -51,5 +54,5 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
...
@@ -51,5 +54,5 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
* @param openid
* @param openid
* @return
* @return
*/
*/
Integer
buyingMedicineNumber
(
String
openid
);
Integer
buyingMedicineNumber
(
String
openid
,
Date
date
);
}
}
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/impl/CouponrecordServiceImpl.java
View file @
77f3700c
...
@@ -5,7 +5,10 @@ import com.cftech.base.codingrule.utils.CodingruleUtils;
...
@@ -5,7 +5,10 @@ import com.cftech.base.codingrule.utils.CodingruleUtils;
import
com.cftech.checkcoupon.model.Checkcoupon
;
import
com.cftech.checkcoupon.model.Checkcoupon
;
import
com.cftech.checkcoupon.service.CheckcouponService
;
import
com.cftech.checkcoupon.service.CheckcouponService
;
import
com.cftech.checkcoupon.utils.QrcodeUtil
;
import
com.cftech.checkcoupon.utils.QrcodeUtil
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.core.util.Constants
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.couponrecord.dao.CouponrecordMapper
;
import
com.cftech.couponrecord.dao.CouponrecordMapper
;
import
com.cftech.couponrecord.model.CouponrecordVo
;
import
com.cftech.couponrecord.model.CouponrecordVo
;
...
@@ -14,6 +17,7 @@ import com.cftech.core.generic.GenericDao;
...
@@ -14,6 +17,7 @@ import com.cftech.core.generic.GenericDao;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Conds
;
import
com.google.zxing.WriterException
;
import
com.google.zxing.WriterException
;
import
javafx.scene.control.TableColumn
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Qualifier
;
...
@@ -50,93 +54,163 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -50,93 +54,163 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
}
}
public
boolean
sendCouponRecord
(
String
openid
,
Long
accountId
)
throws
IOException
,
WriterException
{
public
boolean
sendCouponRecord
(
String
openid
,
Long
accountId
)
throws
IOException
,
WriterException
{
Conds
couponConds
=
new
Conds
();
//卡券基础信息
couponConds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
Checkcoupon
checkcoupon
=
this
.
findCheckCoupon
();
couponConds
.
equal
(
"t.openid"
,
openid
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"conds"
,
couponConds
);
List
<
Couponrecord
>
couponrecordList
=
couponrecordMapper
.
fetchSearchByPage
(
params
);
int
sendCouponNumber
=
couponrecordList
==
null
?
0
:
couponrecordList
.
size
();
//粉丝获取卡券数量
int
number
=
buyingMedicineNumber
(
openid
);
//购买数量
List
<
Couponrecord
>
couponrecordList
=
findCouponrecordBySort
(
null
);
double
num
=
Math
.
floor
(
number
/
3
);
//推送单数或双数券
int
number
=
0
;
double
year
=
Math
.
ceil
(
num
/
2
);
String
no
=
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()
);
if
(
num
%
2
==
1
)
{
//第一张
if
(
couponrecordList
.
size
()
==
0
)
{
//第一次赠券
Checkcoupon
checkcoupon
=
this
.
findCheckCoupon
(
"1"
);
number
=
buyingMedicineNumber
(
openid
,
null
);
//购买数量
if
(
new
Double
(
year
).
intValue
()
>
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectYear
()))
{
if
(
number
>=
3
)
{
//赠送第一张
log
.
info
(
"发券失败,超过时间限制"
);
Couponrecord
couponrecord
=
new
Couponrecord
();
return
false
;
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
couponrecord
.
setTakeEffectYear
(
"1"
);
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setType
(
"1"
);
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecordMapper
.
save
(
couponrecord
);
}
}
if
(
number
>=
6
)
{
//赠送第二张
//获取张券
Couponrecord
couponrecord_one
=
findCouponrecordBySort
(
"1"
).
get
(
0
);
//生成卡券发放记录编码
Couponrecord
couponrecord
=
new
Couponrecord
();
String
no
=
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
());
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
couponrecord
.
setTakeEffectYear
(
"1"
);
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setTakeEffectYear
(
String
.
valueOf
(
year
));
couponrecord
.
setType
(
"2"
);
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setType
(
checkcoupon
.
getType
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//生效时间
couponrecord
.
setExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//过期时间
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecordMapper
.
save
(
couponrecord
);
couponrecordMapper
.
save
(
couponrecord
);
}
else
{
//第二张
Checkcoupon
checkcoupon
=
this
.
findCheckCoupon
(
"2"
);
if
(
new
Double
(
year
).
intValue
()
>
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectYear
()))
{
log
.
info
(
"发券失败,超过时间限制"
);
return
false
;
}
}
}
else
{
Couponrecord
couponrecordMax
=
findCouponrecordBySort
(
"1"
).
get
(
0
);
if
(
couponrecordMax
.
getType
().
equals
(
"2"
))
{
//获取第二张结束时间购买数量
number
=
buyingMedicineNumber
(
openid
,
couponrecordMax
.
getTakeEffectDate
());
//获取最后一张券购买数量
//生成卡券发放记录编码
if
(
number
>=
3
)
{
//赠送第一张
String
no
=
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
());
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setTakeEffectYear
((
Integer
.
parseInt
(
couponrecordMax
.
getTakeEffectYear
())
+
1
)
+
""
);
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setTakeEffectYear
(
String
.
valueOf
(
year
));
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setType
(
"1"
);
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setType
(
checkcoupon
.
getType
());
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//生效时间
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//过期时间
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecordMapper
.
save
(
couponrecord
);
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
}
couponrecordMapper
.
save
(
couponrecord
);
}
if
(
number
>=
6
)
{
//赠送第二张
//获取第一张券
Couponrecord
couponrecord_one
=
findCouponrecordBySort
(
"1"
).
get
(
0
);
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
couponrecord
.
setTakeEffectYear
((
Integer
.
parseInt
(
couponrecordMax
.
getTakeEffectYear
())
+
1
)
+
""
);
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setType
(
"2"
);
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecordMapper
.
save
(
couponrecord
);
}
}
else
if
(
couponrecordMax
.
getType
().
equals
(
"1"
))
{
//通过第一张开始时间获取购买数量
List
<
Couponrecord
>
couponrecordTwoMaxList
=
findCouponrecordBySort
(
"2"
);
number
=
buyingMedicineNumber
(
openid
,
couponrecordTwoMaxList
.
size
()
==
0
?
null
:
couponrecordTwoMaxList
.
get
(
0
).
getTakeEffectDate
());
//获取最后一张券购买数量
//通过第一张最后购买数量,所以只需赠送第二章
if
(
number
>=
6
)
{
//赠送第二张
//获取第一张券
Couponrecord
couponrecord_one
=
findCouponrecordBySort
(
"1"
).
get
(
0
);
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
()));
couponrecord
.
setTakeEffectYear
(
couponrecordMax
.
getTakeEffectYear
());
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setType
(
"2"
);
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setCouponId
(
checkcoupon
.
getId
());
couponrecord
.
setAccountsId
(
accountId
);
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecord
.
setExpireDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//延期使用时间(可核销开始时间)
couponrecord
.
setInvalidDate
(
dateCalculation
(
couponrecord_one
.
getTakeEffectDate
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())
+
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
couponrecordMapper
.
save
(
couponrecord
);
}
}
}
return
false
;
return
false
;
}
}
@Override
@Override
public
Integer
buyingMedicineNumber
(
String
openid
)
{
public
Integer
buyingMedicineNumber
(
String
openid
,
Date
date
)
{
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"d.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.openid"
,
openid
);
conds
.
equal
(
"t.openid"
,
openid
);
conds
.
equal
(
"d.del_flag"
,
Constants
.
DEL_FLAG_0
);
if
(
date
!=
null
)
{
conds
.
greatEqual
(
"t.pay_time"
,
date
);
}
conds
.
in
(
"t.status"
,
new
String
[]{
"2"
,
"3"
,
"4"
});
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"conds"
,
conds
);
return
couponrecordMapper
.
buyingMedicineNumber
(
params
);
return
couponrecordMapper
.
buyingMedicineNumber
(
params
);
}
}
/**
/**
* 获取卡券基础信息
* 获取病载卡券信息
* @param type
* @return
* @return
*/
*/
public
Checkcoupon
findCheckCoupon
(
String
type
)
{
public
Checkcoupon
findCheckCoupon
()
{
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.type"
,
type
);
return
checkCoupouService
.
fetchSearchByConds
(
conds
);
return
checkCoupouService
.
fetchSearchByConds
(
conds
);
}
}
/**
* 获取最后一条病载赠券记录
* @param type 1:第一张;2:第二张
* @return
*/
public
List
<
Couponrecord
>
findCouponrecordBySort
(
String
type
)
{
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
if
(
StringUtils
.
isNoneBlank
(
type
))
conds
.
equal
(
"t.type"
,
type
);
Sort
sort
=
new
Sort
(
"t.take_effect_date"
,
OrderType
.
DESC
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"sort"
,
sort
);
List
<
Couponrecord
>
couponrecordList
=
couponrecordMapper
.
fetchSearchByPage
(
params
);
return
couponrecordList
;
}
/**
/**
* 时间计算
* 时间计算
* @param date
* @param date
...
@@ -189,12 +263,4 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
...
@@ -189,12 +263,4 @@ public class CouponrecordServiceImpl extends GenericServiceImpl<Couponrecord> im
}
}
return
rtnJson
;
return
rtnJson
;
}
}
/**
* 获取卡券最大失效时间。重新计算
*/
//public Date findMax
}
}
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/web/CouponrecordController.java
View file @
77f3700c
package
com
.
cftech
.
couponrecord
.
web
;
package
com
.
cftech
.
couponrecord
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.couponrecord.service.CouponrecordService
;
import
com.cftech.couponrecord.service.CouponrecordService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.poi.ExcelKit
;
...
@@ -15,7 +16,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
...
@@ -15,7 +16,6 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -104,9 +104,18 @@ public class CouponrecordController {
...
@@ -104,9 +104,18 @@ public class CouponrecordController {
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Couponrecord
couponrecord
,
HttpServletRequest
request
)
{
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Couponrecord
couponrecord
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
conds
.
equal
(
"t.accounts_id"
,
accountsId
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
if
(
StringUtils
.
isNoneBlank
(
couponrecord
.
getCouponName
()))
{
conds
.
like
(
"c.name"
,
couponrecord
.
getCouponName
());
}
if
(
StringUtils
.
isNoneBlank
(
couponrecord
.
getNumber
()))
{
conds
.
like
(
"t.number"
,
couponrecord
.
getNumber
());
}
if
(
StringUtils
.
isNoneBlank
(
couponrecord
.
getStatus
()))
{
conds
.
equal
(
"t.status"
,
couponrecord
.
getStatus
());
}
Sort
sort
=
new
Sort
(
"t.create_time"
,
OrderType
.
DESC
);
List
<
Couponrecord
>
list
=
couponrecordService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
List
<
Couponrecord
>
list
=
couponrecordService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
couponrecordService
.
count
(
conds
);
Integer
counts
=
couponrecordService
.
count
(
conds
);
...
@@ -134,12 +143,21 @@ public class CouponrecordController {
...
@@ -134,12 +143,21 @@ public class CouponrecordController {
@RequestMapping
(
"/exportExcel"
)
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
COUPONRECORD_VIEW
)
@RequiresPermissions
(
value
=
COUPONRECORD_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Couponrecord
couponrecord
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"t.del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
conds
.
equal
(
"t.accounts_id"
,
accountId
);
if
(
StringUtils
.
isNoneBlank
(
couponrecord
.
getCouponName
()))
{
conds
.
like
(
"c.name"
,
couponrecord
.
getCouponName
());
}
if
(
StringUtils
.
isNoneBlank
(
couponrecord
.
getNumber
()))
{
conds
.
like
(
"t.number"
,
couponrecord
.
getNumber
());
}
if
(
StringUtils
.
isNoneBlank
(
couponrecord
.
getStatus
()))
{
conds
.
equal
(
"t.status"
,
couponrecord
.
getStatus
());
}
List
<
Couponrecord
>
list
=
couponrecordService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
List
<
Couponrecord
>
list
=
couponrecordService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Couponrecord
.
class
,
response
).
toExcel
(
list
,
"发券信息管理信息"
);
ExcelKit
.
$Export
(
Couponrecord
.
class
,
response
).
toExcel
(
list
,
"发券信息管理信息"
);
}
}
...
...
aidea-modules/hospital-module-web/src/main/webapp/WEB-INF/views/hospital/hospitalform.html
View file @
77f3700c
...
@@ -90,18 +90,8 @@
...
@@ -90,18 +90,8 @@
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"telephone"
>
联系方式
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"telephone"
name=
"telephone"
value=
"$!{data.telephone}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label>
处方医院
</label>
<label>
处方医院
</label>
#if ($!{pageType} == 'true')
#if ($!{pageType} == 'true')
<input
type=
"text"
<input
type=
"text"
class=
"form-control"
value=
"$!{data.orgName}"
class=
"form-control"
value=
"$!{data.orgName}"
...
@@ -109,17 +99,33 @@
...
@@ -109,17 +99,33 @@
maxlength=
"50"
placeholder=
"所属组织"
/>
maxlength=
"50"
placeholder=
"所属组织"
/>
#else
#else
<div
class=
"input-group"
>
<div
class=
"input-group"
>
<input
type=
"text"
name=
"orgName"
id=
"orgName"
value=
"$!{data.orgName}"
<input
type=
"text"
name=
"orgName"
id=
"orgName"
value=
"$!{data.orgName}"
class=
"form-control"
disabled
>
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"orgId"
name=
"orgId"
value=
"$!{data.orgId}"
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"orgId"
name=
"orgId"
value=
"$!{data.orgId}"
class=
"form-control"
disabled
>
<span
class=
"input-group-btn"
>
<span
class=
"input-group-btn"
>
<button
type=
"button"
name=
"selOrg"
id=
"selOrg"
class=
"btn btn-info btn-flat"
>
选择
</button>
<button
type=
"button"
name=
"selOrg"
id=
"selOrg"
class=
"btn btn-info btn-flat
selOrg
"
>
选择
</button>
</span>
</span>
</div>
</div>
#end
#end
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"facilityNo"
>
设备号
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"facilityNo"
name=
"facilityNo"
value=
"$!{data.facilityNo}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"telephone"
>
联系方式
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"telephone"
name=
"telephone"
value=
"$!{data.telephone}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"address"
>
地址
</label>
<label
for=
"address"
>
地址
</label>
<input
type=
"text"
<input
type=
"text"
...
@@ -237,7 +243,7 @@
...
@@ -237,7 +243,7 @@
/**
/**
* 选择组织
* 选择组织
*/
*/
$
(
"
#
selOrg"
).
click
(
function
()
{
$
(
"
.
selOrg"
).
click
(
function
()
{
Cfapp
.
f7
({
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/wxQrcode/listOrg')"
,
dataUrl
:
"#springUrl('/a/wxQrcode/listOrg')"
,
checkType
:
"single"
,
// 多选为multi
checkType
:
"single"
,
// 多选为multi
...
@@ -272,8 +278,8 @@
...
@@ -272,8 +278,8 @@
cancel
:
function
()
{
cancel
:
function
()
{
},
},
storeFields
:
'org
Name'
,
//展示
字段
storeFields
:
'org
Id'
,
//存储
字段
displayFields
:
'org
Id'
displayFields
:
'org
Name'
//展示字段
})
})
});
});
...
@@ -288,6 +294,9 @@
...
@@ -288,6 +294,9 @@
rules
:
{},
rules
:
{},
messages
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
submitHandler
:
function
(
form
)
{
console
.
log
(
form
);
console
.
log
(
"=="
+
$
(
"#myForm"
).
serialize
());
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/hospital/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
.
getJSON
(
"#springUrl('/a/hospital/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
$
(
"#save"
).
attr
(
"disabled"
,
false
);
...
...
aidea-modules/hospital-module-web/src/main/webapp/WEB-INF/views/hospital/hospitallist.html
View file @
77f3700c
...
@@ -101,6 +101,7 @@
...
@@ -101,6 +101,7 @@
<td
hidden=
"true"
>
Id
</td>
<td
hidden=
"true"
>
Id
</td>
<th>
医院编码
</th>
<th>
医院编码
</th>
<th>
医院名称
</th>
<th>
医院名称
</th>
<th>
设备号
</th>
<th>
地址
</th>
<th>
地址
</th>
<th>
联系方式
</th>
<th>
联系方式
</th>
<th>
经度
</th>
<th>
经度
</th>
...
@@ -202,6 +203,9 @@
...
@@ -202,6 +203,9 @@
"sAjaxSource"
:
sSource
,
"sAjaxSource"
:
sSource
,
"fnServerData"
:
retrieveData
,
"fnServerData"
:
retrieveData
,
"pagingType"
:
"full_numbers"
,
"pagingType"
:
"full_numbers"
,
"autoWidth"
:
true
,
"scrollX"
:
true
,
"sScrollY"
:
false
,
"aoColumns"
:
[
"aoColumns"
:
[
{
{
"mData"
:
"id"
"mData"
:
"id"
...
@@ -212,6 +216,9 @@
...
@@ -212,6 +216,9 @@
{
{
"mData"
:
"name"
"mData"
:
"name"
},
},
{
"mData"
:
"facilityNo"
},
{
{
"mData"
:
"address"
"mData"
:
"address"
},
},
...
@@ -236,7 +243,7 @@
...
@@ -236,7 +243,7 @@
'targets'
:
[
0
]
'targets'
:
[
0
]
},
},
{
{
"aTargets"
:
[
7
],
"aTargets"
:
[
8
],
"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"
);
...
@@ -244,7 +251,7 @@
...
@@ -244,7 +251,7 @@
}
}
},
},
{
{
"aTargets"
:
[
8
],
"aTargets"
:
[
9
],
"mData"
:
"id"
,
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
html
=
''
;
let
html
=
''
;
...
...
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/dao/HospitalMapper.xml
View file @
77f3700c
...
@@ -88,33 +88,34 @@
...
@@ -88,33 +88,34 @@
keyProperty=
"id"
>
keyProperty=
"id"
>
insert into t_aidea_hospital
insert into t_aidea_hospital
(
(
<include
refid=
"sqlColumns"
/>
id, number, name, address, telephone, longitude, latitude, remarks, province, city, adcode, reliability, level, org_id,
facility_no, accounts_id, del_flag, status, create_time, update_time, description, create_by, update_by
)
)
values
values
(
(
#{id, jdbcType=BIGINT},
#{id, jdbcType=BIGINT},
#{number, jdbcType=VARCHAR},
#{number, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{address, jdbcType=VARCHAR},
#{address, jdbcType=VARCHAR},
#{telephone, jdbcType=VARCHAR},
#{telephone, jdbcType=VARCHAR},
#{longitude, jdbcType=VARCHAR},
#{longitude, jdbcType=VARCHAR},
#{latitude, jdbcType=VARCHAR},
#{latitude, jdbcType=VARCHAR},
#{remarks, jdbcType=VARCHAR},
#{remarks, jdbcType=VARCHAR},
#{province, jdbcType=VARCHAR},
#{province, jdbcType=VARCHAR},
#{city, jdbcType=VARCHAR},
#{city, jdbcType=VARCHAR},
#{adcode, jdbcType=VARCHAR},
#{adcode, jdbcType=VARCHAR},
#{reliability, jdbcType=VARCHAR},
#{reliability, jdbcType=VARCHAR},
#{level, jdbcType=VARCHAR},
#{level, jdbcType=VARCHAR},
#{orgId, jdbcType=VARCHAR},
#{orgId, jdbcType=VARCHAR},
#{facilityNo, jdbcType=VARCHAR},
#{facilityNo, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
#{status, jdbcType=VARCHAR},
now(),
now(),
now(),
now(),
#{description, jdbcType=VARCHAR},
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
#{updateBy, jdbcType=BIGINT}
)
)
</insert>
</insert>
...
...
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/model/Hospital.java
View file @
77f3700c
...
@@ -29,9 +29,6 @@ public class Hospital implements Serializable {
...
@@ -29,9 +29,6 @@ public class Hospital implements Serializable {
/* 联系方式 */
/* 联系方式 */
@ExportConfig
(
value
=
"联系方式"
,
width
=
100
)
@ExportConfig
(
value
=
"联系方式"
,
width
=
100
)
private
String
telephone
;
private
String
telephone
;
/* 备注 */
@ExportConfig
(
value
=
"备注"
,
width
=
100
)
private
String
remarks
;
/* 经度 */
/* 经度 */
@ExportConfig
(
value
=
"经度"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"经度"
,
width
=
100
,
showLevel
=
1
)
private
String
longitude
;
private
String
longitude
;
...
@@ -45,7 +42,7 @@ public class Hospital implements Serializable {
...
@@ -45,7 +42,7 @@ public class Hospital implements Serializable {
@ExportConfig
(
value
=
"城市"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"城市"
,
width
=
100
,
showLevel
=
1
)
private
String
city
;
private
String
city
;
/* 设备号 */
/* 设备号 */
@ExportConfig
(
value
=
"设备号"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"设备号"
,
width
=
100
)
private
String
facilityNo
;
private
String
facilityNo
;
/* 所属的账号 */
/* 所属的账号 */
private
Long
accountsId
;
private
Long
accountsId
;
...
@@ -71,6 +68,9 @@ public class Hospital implements Serializable {
...
@@ -71,6 +68,9 @@ public class Hospital implements Serializable {
private
String
orgCode
;
private
String
orgCode
;
@ExportConfig
(
value
=
"组织名称"
,
width
=
100
,
showLevel
=
1
)
@ExportConfig
(
value
=
"组织名称"
,
width
=
100
,
showLevel
=
1
)
private
String
orgName
;
//组织名称
private
String
orgName
;
//组织名称
/* 备注 */
@ExportConfig
(
value
=
"备注"
,
width
=
100
)
private
String
remarks
;
public
Hospital
()
{
public
Hospital
()
{
this
.
delFlag
=
false
;
this
.
delFlag
=
false
;
...
...
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/web/HospitalController.java
View file @
77f3700c
...
@@ -117,7 +117,7 @@ public class HospitalController {
...
@@ -117,7 +117,7 @@ public class HospitalController {
if
(
StringUtils
.
isNoneBlank
(
hospital
.
getOrgId
()))
{
if
(
StringUtils
.
isNoneBlank
(
hospital
.
getOrgId
()))
{
Conds
conds
=
new
Conds
();
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.
number
"
,
hospital
.
getOrgId
());
conds
.
equal
(
"t.
id
"
,
hospital
.
getOrgId
());
OrgUnit
orgUnit
=
orgUnitService
.
fetchSearchByConds
(
conds
);
OrgUnit
orgUnit
=
orgUnitService
.
fetchSearchByConds
(
conds
);
if
(
orgUnit
!=
null
)
{
if
(
orgUnit
!=
null
)
{
hospital
.
setOrgId
(
orgUnit
.
getId
().
toString
());
hospital
.
setOrgId
(
orgUnit
.
getId
().
toString
());
...
@@ -261,7 +261,7 @@ public class HospitalController {
...
@@ -261,7 +261,7 @@ public class HospitalController {
}
}
hospital
.
setTelephone
(
rowData
.
get
(
2
));
hospital
.
setTelephone
(
rowData
.
get
(
2
));
hospital
.
set
Remarks
(
rowData
.
get
(
3
));
hospital
.
set
FacilityNo
(
rowData
.
get
(
3
));
//组织编码
//组织编码
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
4
)))
{
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
4
)))
{
...
@@ -274,6 +274,8 @@ public class HospitalController {
...
@@ -274,6 +274,8 @@ public class HospitalController {
}
}
}
}
hospital
.
setRemarks
(
rowData
.
get
(
5
));
hospital
.
setAccountsId
(
accountId
);
hospital
.
setAccountsId
(
accountId
);
hospital
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Hospital
.
class
.
getName
()));
hospital
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Hospital
.
class
.
getName
()));
hospital
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
hospital
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
...
...
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderform.html
View file @
77f3700c
...
@@ -75,166 +75,175 @@
...
@@ -75,166 +75,175 @@
<!-- general form elements disabled -->
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<div
class=
"box box-primary"
>
<!--<form role="form" id="myForm">-->
<!--<form role="form" id="myForm">-->
<input
id=
"id"
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<input
id=
"id"
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
订单信息
</div>
<div
class=
"panel-body"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
订单编码
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"orderCode"
id=
"number"
readonly=
"readonly"
maxlength=
"50"
placeholder=
"订单编码"
value=
"$!{data.number}"
>
</div>
<div
class=
"panel panel-primary"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"panel-heading"
>
订单信息
</div>
<label>
顺丰运单号
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"courierNumber"
id=
"courierNumber"
readonly=
"readonly"
maxlength=
"50"
placeholder=
"顺丰运单号"
value=
"$!{data.courierNumber}"
>
</div>
<div
class=
"
panel-body
"
>
<div
class=
"
form-group form-md-line-input col-xs-5
"
>
<
div
class=
"form-group form-md-line-input col-xs-5"
>
<
label>
订单总价
<font
style=
"color: red"
></font></label
>
<label>
订单编码
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<input
type=
"tex
t"
class=
"form-control"
name=
"orderAmoun
t"
class=
"form-control"
name=
"orderCode
"
id=
"orderAmount"
readonly=
"readonly
"
id=
"number"
readonly=
"readonly
"
maxlength=
"50"
placeholder=
"订单总价
"
maxlength=
"50"
placeholder=
"订单编码
"
value=
"$!{data.orderAmount}
"
value=
"$!{data.number}"
>
>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<!--<div class="form-group form-md-line-input col-xs-5">-->
<label>
顺丰运单号
<font
style=
"color: red"
></font></label>
<!--<label>收货地址<font style="color: red"></font></label>-->
<input
type=
"text"
<!--<input type="text"-->
class=
"form-control"
name=
"courierNumber"
<!--class="form-control" name="address"-->
id=
"courierNumber"
readonly=
"readonly"
<!--id="address" readonly="readonly"-->
maxlength=
"50"
placeholder=
"顺丰运单号"
<!--maxlength="50" placeholder="收货地址"-->
value=
"$!{data.courierNumber}"
>
<!--value="$!{data.address}"-->
</div>
<!-->-->
<!--</div>-->
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
订单状态
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"status"
id=
"status"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
value=
"$!{data.status}"
>
</div>
<!--<div class="form-group form-md-line-input col-xs-5">-->
<!--<label>支付备注<font style="color: red"></font></label>-->
<!--<input type="text"-->
<!--class="form-control" name="description"-->
<!--id="description" readonly="readonly"-->
<!--maxlength="50" placeholder=""-->
<!--value="$!{data.description}"-->
<!-->-->
<!--</div>-->
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
支付交易号
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"tradeNo"
id=
"tradeNo"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
value=
"$!{data.tradeNo}"
>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
订单总价
<font
style=
"color: red"
></font></label>
<label>
创建时间
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<input
type=
"text"
class=
"form-control"
name=
"orderAmount
"
class=
"form-control"
name=
"createTime
"
id=
"orderAmount
"
readonly=
"readonly"
id=
"createTime
"
readonly=
"readonly"
maxlength=
"50"
placeholder=
"订单总价
"
maxlength=
"50"
placeholder=
"
"
value=
"$!{data.orderAmount
}"
value=
"$!{data.createTime
}"
>
>
</div>
</div>
<!--<div class="form-group form-md-line-input col-xs-5">-->
<div
class=
"form-group form-md-line-input col-xs-5"
>
<!--<label>收货地址<font style="color: red"></font></label>-->
<label>
openid
<font
style=
"color: red"
></font></label>
<!--<input type="text"-->
<input
type=
"text"
<!--class="form-control" name="address"-->
class=
"form-control"
name=
"openid"
<!--id="address" readonly="readonly"-->
id=
"openid"
readonly=
"readonly"
<!--maxlength="50" placeholder="收货地址"-->
maxlength=
"50"
placeholder=
""
<!--value="$!{data.address}"-->
value=
"$!{data.openid}"
<!-->-->
>
<!--</div>-->
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
订单状态
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"status"
id=
"status"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
value=
"$!{data.status}"
>
</div>
<!--<div class="form-group form-md-line-input col-xs-5">-->
<!--<label>支付备注<font style="color: red"></font></label>-->
<!--<input type="text"-->
<!--class="form-control" name="description"-->
<!--id="description" readonly="readonly"-->
<!--maxlength="50" placeholder=""-->
<!--value="$!{data.description}"-->
<!-->-->
<!--</div>-->
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
支付交易号
<font
style=
"color: red"
></font></label>
<input
type=
"text"
class=
"form-control"
name=
"tradeNo"
id=
"tradeNo"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
value=
"$!{data.tradeNo}"
>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
创建时间
<font
style=
"color: red"
></font></label>
<label>
是否三期用户
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<input
type=
"text"
class=
"form-control"
name=
"createTim
e"
class=
"form-control"
name=
"isThre
e"
id=
"createTim
e"
readonly=
"readonly"
id=
"isThre
e"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
maxlength=
"50"
placeholder=
""
value=
"$!{data.createTim
e}"
value=
"$!{isThre
e}"
>
>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<div
class=
"form-group form-md-line-input col-xs-8"
>
<label>
openid
<font
style=
"color: red"
></font></label>
<label>
订单取消原因
<font
style=
"color: red"
></font></label>
<input
type=
"text"
<textarea
class=
"form-control"
id=
"orderCancel"
name=
"orderCancel"
rows=
"3"
class=
"form-control"
name=
"openid"
readonly
>
$!{data.orderCancel}
</textarea>
id=
"openid"
readonly=
"readonly"
</div>
maxlength=
"50"
placeholder=
""
value=
"$!{data.openid}"
>
</div>
<div
class=
"form-group form-md-line-input col-xs-5"
>
<label>
是否三期用户
<font
style=
"color: red"
></font></label>
<div
class=
"form-group form-md-line-input col-xs-8"
>
<label>
付款链接
<font
style=
"color: red"
></font></label>
<div
style=
"display: flex; justify-content: center; align-items: center;"
>
<input
type=
"text"
<input
type=
"text"
class=
"form-control"
name=
"
isThree
"
class=
"form-control"
name=
"
payUrl
"
id=
"
isThree
"
readonly=
"readonly"
id=
"
payUrl
"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
maxlength=
"50"
placeholder=
""
value=
"$!{
isThree
}"
value=
"$!{
data.payUrl
}"
>
>
<button
type=
"button"
class=
"btn btn-info"
onclick=
"copy(this)"
>
复制
</button>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-8"
>
</div>
<label>
订单取消原因
<font
style=
"color: red"
></font></label>
<textarea
class=
"form-control"
id=
"orderCancel"
name=
"orderCancel"
rows=
"3"
readonly
>
$!{data.orderCancel}
</textarea>
</div>
<div
class=
"form-group form-md-line-input col-xs-8"
>
<label>
付款链接
<font
style=
"color: red"
></font></label>
<div
style=
"display: flex; justify-content: center; align-items: center;"
>
<input
type=
"text"
class=
"form-control"
name=
"payUrl"
id=
"payUrl"
readonly=
"readonly"
maxlength=
"50"
placeholder=
""
value=
"$!{data.payUrl}"
>
<button
type=
"button"
class=
"btn btn-info"
onclick=
"copy(this)"
>
复制
</button>
</div>
</div>
<div
class=
"form-group form-md-line-input col-xs-10"
>
<div
class=
"form-group form-md-line-input col-xs-10"
>
<label>
付款二维码
<font
style=
"color: red"
></font></label>
<label>
付款二维码
<font
style=
"color: red"
></font></label>
<div
id=
"qrcodeDiv"
></div>
<div
id=
"qrcodeDiv"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-heading"
>
商品信息
</div>
<div
class=
"panel panel-primary"
>
<div
class=
"panel-body"
>
<div
class=
"panel-heading"
>
商品信息
</div>
<div
class=
"form-group form-md-line-input"
>
<div
class=
"panel-body"
>
<div
id=
"group"
class=
"list-group"
>
<div
class=
"form-group form-md-line-input"
>
<li
class=
"list-group-item"
>
<div
id=
"group"
class=
"list-group"
>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品名称
</label></th>
<li
class=
"list-group-item"
>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品购买数量
</label>
</th>
<th
style=
""
><label
<th
style=
""
><label
style=
"width: 160px;margin-right: 50px;text-align: center"
>
商品单价
</label></th>
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品名称
</label>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品总价
</label></th>
</th>
</li>
<th
style=
""
><label
</div>
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品购买数量
</label>
#if ($!{isView} != 'true')
</th>
<button
type=
"button"
class=
"search btn btn-primary"
onclick=
"clickAdd()"
>
添加商品
</button>
<th
style=
""
><label
#end
style=
"width: 160px;margin-right: 50px;text-align: center"
>
商品单价
</label>
</th>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品总价
</label>
</th>
</li>
</div>
</div>
#if ($!{isView} != 'true')
<button
type=
"button"
class=
"search btn btn-primary"
onclick=
"clickAdd()"
>
添加商品
</button>
#end
</div>
</div>
</div>
</div>
</div>
<div
class=
"box-footer"
>
#if ($!{isView} != 'true')
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:order:edit"))
#if ($!{isView} != 'true')
<button
class=
"btn btn-primary"
onclick=
"save()"
>
保存
</button>
#if($shiro.hasPermission("qy:order:edit"))
#end
<button
class=
"btn btn-primary"
onclick=
"save()"
>
确认
</button>
#end
#end
<a
href=
"#springUrl('/a/order/list')"
class=
"btn btn-default"
>
取消
</a>
#end
</div>
<a
href=
"#springUrl('/a/order/list')"
class=
"btn btn-default"
>
取消
</a>
<!--</form>-->
</div>
<!-- /.box-body -->
<!--</form>-->
</div>
<!-- /.box -->
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
</div>
</div>
<!-- /.col -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.row -->
...
@@ -276,8 +285,8 @@
...
@@ -276,8 +285,8 @@
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- END PAGE LEVEL PLUGINS -->
<script>
<script>
var
csrf
=
'${_csrf.token}'
;
var
csrf
=
'${_csrf.token}'
;
var
csrf_header
=
'${_csrf.headerName}'
;
var
csrf_header
=
'${_csrf.headerName}'
;
var
goodsList
=
[];
var
goodsList
=
[];
var
isView
=
`$!{isView}`
;
var
isView
=
`$!{isView}`
;
...
@@ -313,6 +322,7 @@
...
@@ -313,6 +322,7 @@
}
}
goodList
();
goodList
();
function
goodList
()
{
function
goodList
()
{
var
url
=
"#springUrl('/a/order/fromProduct')"
var
url
=
"#springUrl('/a/order/fromProduct')"
$
.
ajax
({
$
.
ajax
({
...
@@ -325,7 +335,7 @@
...
@@ -325,7 +335,7 @@
console
.
log
(
details
);
console
.
log
(
details
);
if
(
details
!=
null
&&
details
!=
''
&&
details
!=
'[]'
)
{
if
(
details
!=
null
&&
details
!=
''
&&
details
!=
'[]'
)
{
let
arr
=
JSON
.
parse
(
details
);
let
arr
=
JSON
.
parse
(
details
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
obj
=
arr
[
i
];
let
obj
=
arr
[
i
];
clickAdd
(
obj
.
id
,
obj
.
productId
,
obj
.
drugsNum
,
obj
.
price
,
obj
.
amount
);
clickAdd
(
obj
.
id
,
obj
.
productId
,
obj
.
drugsNum
,
obj
.
price
,
obj
.
amount
);
}
}
...
@@ -334,7 +344,7 @@
...
@@ -334,7 +344,7 @@
let
datas
=
`$!{data.description}`
;
let
datas
=
`$!{data.description}`
;
if
(
datas
!=
null
&&
datas
!=
""
)
{
if
(
datas
!=
null
&&
datas
!=
""
)
{
let
arr
=
JSON
.
parse
(
datas
);
let
arr
=
JSON
.
parse
(
datas
);
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
obj
=
arr
[
i
];
let
obj
=
arr
[
i
];
clickAdd
(
null
,
obj
.
productId
,
obj
.
drugsNum
,
obj
.
price
,
obj
.
amount
);
clickAdd
(
null
,
obj
.
productId
,
obj
.
drugsNum
,
obj
.
price
,
obj
.
amount
);
}
}
...
@@ -354,10 +364,10 @@
...
@@ -354,10 +364,10 @@
}).
join
(
''
);
}).
join
(
''
);
var
idHtml
=
""
;
var
idHtml
=
""
;
if
(
id
&&
id
!=
null
){
if
(
id
&&
id
!=
null
)
{
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="`
+
id
+
`">`
;
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="`
+
id
+
`">`
;
}
else
{
}
else
{
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="">`
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="">`
}
}
var
listHtml
=
""
;
var
listHtml
=
""
;
...
@@ -370,23 +380,27 @@
...
@@ -370,23 +380,27 @@
let
bool
=
`$!{isThree}`
;
let
bool
=
`$!{isThree}`
;
var
HtmlPrice
=
""
;
var
HtmlPrice
=
""
;
if
(
price
!=
null
)
{
if
(
price
!=
null
)
{
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
price
+
`" style="width: 180px ;margin-right: 50px" type='text' `
;
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
price
+
`" style="width: 180px ;margin-right: 50px" type='text' `
;
if
(
bool
==
"1"
||
isView
==
"true"
)
{
HtmlPrice
+=
`readonly="readonly"`
;
}
if
(
bool
==
"1"
||
isView
==
"true"
)
{
HtmlPrice
+=
`readonly="readonly"`
;
}
let
priceTmp
=
parseInt
(
price
).
toFixed
(
2
);
let
priceTmp
=
parseInt
(
price
).
toFixed
(
2
);
HtmlPrice
+=
` onchange="updatePrice(this)" value="`
+
priceTmp
+
`"></input>`
;
HtmlPrice
+=
` onchange="updatePrice(this)" value="`
+
priceTmp
+
`"></input>`
;
}
else
{
}
else
{
let
priceTmp
=
parseInt
(
goodsList
[
0
].
price
).
toFixed
(
2
);
let
priceTmp
=
parseInt
(
goodsList
[
0
].
price
).
toFixed
(
2
);
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
priceTmp
+
`" style="width: 180px ;margin-right: 50px" type="text" `
;
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
priceTmp
+
`" style="width: 180px ;margin-right: 50px" type="text" `
;
if
(
bool
==
"1"
||
isView
==
"true"
)
{
HtmlPrice
+=
`readonly="readonly"`
;
}
if
(
bool
==
"1"
||
isView
==
"true"
)
{
HtmlPrice
+=
` onchange="updatePrice(this)" value="`
+
priceTmp
+
`"></input>`
;
HtmlPrice
+=
`readonly="readonly"`
;
}
HtmlPrice
+=
` onchange="updatePrice(this)" value="`
+
priceTmp
+
`"></input>`
;
}
}
var
HtmlAmount
=
""
;
var
HtmlAmount
=
""
;
if
(
amount
!=
null
)
{
if
(
amount
!=
null
)
{
HtmlAmount
+=
`<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
parseInt
(
amount
).
toFixed
(
2
)
+
`" ></input>`
;
HtmlAmount
+=
`<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
parseInt
(
amount
).
toFixed
(
2
)
+
`" ></input>`
;
}
else
{
}
else
{
var
amountTmp
=
parseInt
(
goodsList
[
0
].
price
).
toFixed
(
2
);
var
amountTmp
=
parseInt
(
goodsList
[
0
].
price
).
toFixed
(
2
);
HtmlAmount
+=
`<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px;margin-right: 50px" type="number" readonly="readonly" value="`
+
amountTmp
+
`"></input>`
HtmlAmount
+=
`<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px;margin-right: 50px" type="number" readonly="readonly" value="`
+
amountTmp
+
`"></input>`
}
}
let
htmlDel
=
""
;
let
htmlDel
=
""
;
...
@@ -455,7 +469,7 @@
...
@@ -455,7 +469,7 @@
*/
*/
function
toTal
()
{
function
toTal
()
{
var
amount
=
0
;
var
amount
=
0
;
$
(
'.translate [name="htmlAmount"]'
).
each
(
function
(
index
,
item
)
{
$
(
'.translate [name="htmlAmount"]'
).
each
(
function
(
index
,
item
)
{
amount
+=
+
item
.
value
amount
+=
+
item
.
value
})
})
$
(
"#orderAmount"
).
val
(
amount
.
toFixed
(
2
));
$
(
"#orderAmount"
).
val
(
amount
.
toFixed
(
2
));
...
@@ -488,7 +502,7 @@
...
@@ -488,7 +502,7 @@
var
id
=
$
(
"#id"
).
val
();
var
id
=
$
(
"#id"
).
val
();
var
orderAmount
=
$
(
"#orderAmount"
).
val
();
var
orderAmount
=
$
(
"#orderAmount"
).
val
();
var
datas
=
[];
var
datas
=
[];
$
(
".translate"
).
each
(
function
(
index
,
item
)
{
$
(
".translate"
).
each
(
function
(
index
,
item
)
{
const
idDetail
=
$
(
item
).
find
(
'[name="idDetail"]'
).
val
()
const
idDetail
=
$
(
item
).
find
(
'[name="idDetail"]'
).
val
()
const
productId
=
$
(
item
).
find
(
'[name="releas"]'
).
val
()
const
productId
=
$
(
item
).
find
(
'[name="releas"]'
).
val
()
const
drugsNum
=
$
(
item
).
find
(
'[name="listHtml"]'
).
val
()
const
drugsNum
=
$
(
item
).
find
(
'[name="listHtml"]'
).
val
()
...
@@ -505,16 +519,16 @@
...
@@ -505,16 +519,16 @@
}
}
datas
.
push
({
datas
.
push
({
id
:
id
,
id
:
id
,
idDetail
:
idDetail
,
idDetail
:
idDetail
,
productId
:
productId
,
productId
:
productId
,
drugsNum
:
drugsNum
,
drugsNum
:
drugsNum
,
price
:
price
,
price
:
price
,
amount
:
amount
,
amount
:
amount
,
orderAmount
:
orderAmount
orderAmount
:
orderAmount
})
})
})
})
if
(
!
datas
[
0
].
productId
){
if
(
!
datas
[
0
].
productId
)
{
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"订单至少包含一件商品"
,
message
:
"订单至少包含一件商品"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
...
@@ -530,31 +544,33 @@
...
@@ -530,31 +544,33 @@
$
.
ajax
({
$
.
ajax
({
url
:
url
,
url
:
url
,
type
:
"POST"
,
type
:
"POST"
,
dateType
:
'json'
,
dateType
:
'json'
,
headers
:{
"Accept"
:
"application/json;charset=UTF-8"
},
headers
:
{
"Accept"
:
"application/json;charset=UTF-8"
},
data
:
{
_csrf
:
csrf
,
_csrf_header
:
csrf_header
,
data
:
{
datas
:
JSON
.
stringify
(
datas
)},
_csrf
:
csrf
,
_csrf_header
:
csrf_header
,
success
:
function
(
rsp
)
{
datas
:
JSON
.
stringify
(
datas
)
},
success
:
function
(
rsp
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
$
(
"#save"
).
attr
(
"disabled"
,
false
);
console
.
log
(
rsp
);
console
.
log
(
rsp
);
if
(
rsp
.
errorNo
==
"0"
)
{
if
(
rsp
.
errorNo
==
"0"
)
{
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"修改成功"
,
message
:
"修改成功"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
success
:
function
()
{
location
.
href
=
"#springUrl('/a/order/list')"
;
location
.
href
=
"#springUrl('/a/order/list')"
;
}
}
});
});
}
else
{
}
else
{
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"修改失败"
,
message
:
"修改失败"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
success
:
function
()
{
let
idTmp
=
$
(
'input[name="id"]'
).
val
();
let
idTmp
=
$
(
'input[name="id"]'
).
val
();
location
.
href
=
"#springUrl('/a/order/form?id="
+
idTmp
+
"')"
;
location
.
href
=
"#springUrl('/a/order/form?id="
+
idTmp
+
"')"
;
}
}
});
});
}
}
}
}
});
});
...
@@ -577,13 +593,15 @@
...
@@ -577,13 +593,15 @@
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"链接复制成功!"
,
message
:
"链接复制成功!"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
}
success
:
function
()
{
}
});
});
}
else
{
}
else
{
Cfapp
.
alert
({
Cfapp
.
alert
({
message
:
"链接复制失败!"
,
message
:
"链接复制失败!"
,
btntext
:
"确定"
,
btntext
:
"确定"
,
success
:
function
()
{
}
success
:
function
()
{
}
});
});
}
}
}
}
...
...
aidea-modules/order-module-web/src/main/webapp/WEB-INF/views/order/orderlist.html
View file @
77f3700c
...
@@ -267,11 +267,11 @@
...
@@ -267,11 +267,11 @@
<th>
是否开票
</th>
<th>
是否开票
</th>
<th>
三期患者
</th>
<th>
三期患者
</th>
<th>
创建时间
</th>
<th>
创建时间
</th>
<th>
确认时间
</th
>
<!-- <th>确认时间</th>--
>
<th>
付款时间
</th
>
<!-- <th>付款时间</th>--
>
<th>
发货时间
</th
>
<!-- <th>发货时间</th>--
>
<th>
签收时间
</th
>
<!-- <th>签收时间</th>--
>
<th>
取消时间
</th
>
<!-- <th>取消时间</th>--
>
<th>
操作
</th>
<th>
操作
</th>
</tr>
</tr>
</thead>
</thead>
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
"pagingType"
:
"full_numbers"
,
"pagingType"
:
"full_numbers"
,
"autowidth"
:
true
,
"autowidth"
:
true
,
"scrollX"
:
true
,
"scrollX"
:
true
,
"sScrollY"
:
"480px"
,
"sScrollY"
:
false
,
"aoColumns"
:
[
"aoColumns"
:
[
{
{
"mData"
:
"id"
"mData"
:
"id"
...
@@ -441,26 +441,26 @@
...
@@ -441,26 +441,26 @@
"mData"
:
"createTime"
"mData"
:
"createTime"
}
}
,
,
{
//
{
"mData"
:
"orderTime"
//
"mData": "orderTime"
}
//
}
,
//
,
{
//
{
"mData"
:
"payTime"
//
"mData": "payTime"
}
//
}
,
//
,
{
//
{
"mData"
:
"sendExpressDateStr"
//
"mData": "sendExpressDateStr"
}
//
}
,
//
,
{
//
{
"mData"
:
"acceptExpressDateStr"
//
"mData": "acceptExpressDateStr"
}
//
}
,
//
,
{
//
{
"mData"
:
"cancelTime"
//
"mData": "cancelTime"
}
//
}
,
//
,
{
{
"mData"
:
"id"
"mData"
:
"id"
}
}
...
@@ -637,60 +637,60 @@
...
@@ -637,60 +637,60 @@
}
}
}
}
,
,
// {
// "aTargets": [13],
// "mData": "orderTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
// ,
// {
// "aTargets": [14],
// "mData": "payTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
// ,
// {
// "aTargets": [15],
// "mData": "sendExpressDateStr",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
// {
// "aTargets": [16],
// "mData": "acceptExpressDateStr",
// "mRender": function (a, b, c, d) {
// return a;
// }
// }
// ,
// {
// "aTargets": [17],
// "mData": "cancelTime",
// "mRender": function (a, b, c, d) {
// let time = formatDates(a);
// if (time.indexOf("1970") != -1) {
// return '';
// }
// return formatDates(a);
// }
// }
//,
{
{
"aTargets"
:
[
13
],
"aTargets"
:
[
13
],
"mData"
:
"orderTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
time
=
formatDates
(
a
);
if
(
time
.
indexOf
(
"1970"
)
!=
-
1
)
{
return
''
;
}
return
formatDates
(
a
);
}
}
,
{
"aTargets"
:
[
14
],
"mData"
:
"payTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
time
=
formatDates
(
a
);
if
(
time
.
indexOf
(
"1970"
)
!=
-
1
)
{
return
''
;
}
return
formatDates
(
a
);
}
}
,
{
"aTargets"
:
[
15
],
"mData"
:
"sendExpressDateStr"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
a
;
}
}
,
{
"aTargets"
:
[
16
],
"mData"
:
"acceptExpressDateStr"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
a
;
}
}
,
{
"aTargets"
:
[
17
],
"mData"
:
"cancelTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
time
=
formatDates
(
a
);
if
(
time
.
indexOf
(
"1970"
)
!=
-
1
)
{
return
''
;
}
return
formatDates
(
a
);
}
}
,
{
"aTargets"
:
[
18
],
"mData"
:
"id"
,
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
var
html
=
'#if($shiro.hasPermission("qy:order:edit"))'
;
var
html
=
'#if($shiro.hasPermission("qy:order:edit"))'
;
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/dao/OrderMapper.xml
View file @
77f3700c
...
@@ -364,7 +364,7 @@
...
@@ -364,7 +364,7 @@
</select>
</select>
<select
id=
"listProduct"
resultType=
"com.cftech.order.model.ProductOrder"
>
<select
id=
"listProduct"
resultType=
"com.cftech.order.model.ProductOrder"
>
SELECT id,
product_name as productName,
price FROM t_aidea_product where del_flag = 0
SELECT id,
common_name as productName,
price FROM t_aidea_product where del_flag = 0
</select>
</select>
<update
id=
"update"
parameterType=
"com.cftech.order.model.Order"
>
<update
id=
"update"
parameterType=
"com.cftech.order.model.Order"
>
...
...
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