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
432c86f0
Commit
432c86f0
authored
Feb 07, 2021
by
fanjr
Browse files
Options
Browse Files
Download
Plain Diff
“解决冲突
parents
364b77f4
a36b917f
Show whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
2789 additions
and
628 deletions
+2789
-628
checkcouponform.html
...ain/webapp/WEB-INF/views/checkcoupon/checkcouponform.html
+1
-1
checkcouponlist.html
...ain/webapp/WEB-INF/views/checkcoupon/checkcouponlist.html
+2
-2
CheckcouponMapper.xml
...ain/java/com/cftech/checkcoupon/dao/CheckcouponMapper.xml
+1
-1
CheckcouponController.java
...ava/com/cftech/checkcoupon/web/CheckcouponController.java
+1
-1
checkresultform.html
...ain/webapp/WEB-INF/views/checkresult/checkresultform.html
+187
-9
checkresultlist.html
...ain/webapp/WEB-INF/views/checkresult/checkresultlist.html
+121
-48
pom.xml
aidea-modules/checkresult-module/pom.xml
+8
-0
CheckresultMapper.xml
...ain/java/com/cftech/checkresult/dao/CheckresultMapper.xml
+196
-162
Checkresult.java
...c/main/java/com/cftech/checkresult/model/Checkresult.java
+65
-59
CheckresultController.java
...ava/com/cftech/checkresult/web/CheckresultController.java
+208
-148
consultSheetform.html
...n/webapp/WEB-INF/views/consultSheet/consultSheetform.html
+64
-49
pom.xml
aidea-modules/couponrecord-module-web/pom.xml
+0
-1
couponrecordform.html
...n/webapp/WEB-INF/views/couponrecord/couponrecordform.html
+1
-1
couponrecordlist.html
...n/webapp/WEB-INF/views/couponrecord/couponrecordlist.html
+49
-48
pom.xml
aidea-modules/couponrecord-module/pom.xml
+8
-0
CouponrecordMapper.java
.../java/com/cftech/couponrecord/dao/CouponrecordMapper.java
+11
-0
CouponrecordMapper.xml
...n/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
+28
-20
Couponrecord.java
...main/java/com/cftech/couponrecord/model/Couponrecord.java
+52
-46
CouponrecordService.java
.../com/cftech/couponrecord/service/CouponrecordService.java
+20
-1
CouponrecordServiceImpl.java
...ch/couponrecord/service/impl/CouponrecordServiceImpl.java
+188
-12
CouponrecordController.java
...a/com/cftech/couponrecord/web/CouponrecordController.java
+2
-1
pom.xml
aidea-modules/hospital-module-web/pom.xml
+27
-0
hospitalform.html
.../src/main/webapp/WEB-INF/views/hospital/hospitalform.html
+341
-0
hospitallist.html
.../src/main/webapp/WEB-INF/views/hospital/hospitallist.html
+336
-0
pom.xml
aidea-modules/hospital-module/pom.xml
+29
-0
HospitalMapper.java
...src/main/java/com/cftech/hospital/dao/HospitalMapper.java
+14
-0
HospitalMapper.xml
.../src/main/java/com/cftech/hospital/dao/HospitalMapper.xml
+216
-0
Hospital.java
...ule/src/main/java/com/cftech/hospital/model/Hospital.java
+77
-0
HospitalService.java
...ain/java/com/cftech/hospital/service/HospitalService.java
+14
-0
HospitalServiceImpl.java
...com/cftech/hospital/service/impl/HospitalServiceImpl.java
+31
-0
TxMapUtils.java
...le/src/main/java/com/cftech/hospital/util/TxMapUtils.java
+159
-0
HospitalController.java
...main/java/com/cftech/hospital/web/HospitalController.java
+296
-0
WechatPayUtils.java
...le/src/main/java/com/cftech/order/pay/WechatPayUtils.java
+0
-1
pom.xml
aidea-modules/pom.xml
+2
-0
FqHttpUtils.java
...e/src/main/java/com/cftech/waybill/utils/FqHttpUtils.java
+10
-9
application.properties
cftech-common-web/src/main/resources/application.properties
+6
-6
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+10
-0
redis-config.properties
cftech-common-web/src/main/resources/redis-config.properties
+2
-2
pom.xml
portal-web/pom.xml
+6
-0
No files found.
aidea-modules/checkcoupon-module-web/src/main/webapp/WEB-INF/views/checkcoupon/checkcouponform.html
View file @
432c86f0
...
...
@@ -56,7 +56,7 @@
<section
class=
"content-header"
>
<h1>
检测券管理
管理
检测券管理
<small>
检测券管理
</small>
</h1>
<ol
class=
"breadcrumb"
>
...
...
aidea-modules/checkcoupon-module-web/src/main/webapp/WEB-INF/views/checkcoupon/checkcouponlist.html
View file @
432c86f0
...
...
@@ -60,12 +60,12 @@
<section
class=
"content-header"
>
<h1>
检测券管理
管理
检测券管理
<small>
检测券管理
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
检测券管理
管理
列表
</a></li>
<li><a
class=
"active"
>
检测券管理列表
</a></li>
</ol>
</section>
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/dao/CheckcouponMapper.xml
View file @
432c86f0
...
...
@@ -112,7 +112,7 @@
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_check_coupon
FROM t_aidea_check_coupon
t
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
...
...
aidea-modules/checkcoupon-module/src/main/java/com/cftech/checkcoupon/web/CheckcouponController.java
View file @
432c86f0
...
...
@@ -65,7 +65,7 @@ public class CheckcouponController {
Checkcoupon
checkcoupon
=
checkcouponService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
checkcoupon
);
}
model
.
addAttribute
(
"
pageType"
,
pageType
);
model
.
addAttribute
(
"
isView"
,
pageType
.
equals
(
"View"
)
?
true
:
false
);
//是否查看页面
return
"checkcoupon/checkcouponform"
;
}
...
...
aidea-modules/checkresult-module-web/src/main/webapp/WEB-INF/views/checkresult/checkresultform.html
View file @
432c86f0
...
...
@@ -24,6 +24,7 @@
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
...
...
@@ -31,10 +32,12 @@
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- <!– Date Picker –>-->
<!-- <link rel="stylesheet" href="plugins/datepicker/datepicker3.css">-->
<!-- <!– Daterange picker –>-->
<!-- <link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">-->
<link
rel=
"stylesheet"
type=
"text/css"
media=
"all"
href=
"plugins/daterangepicker-master/daterangepicker.css"
/>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
...
...
@@ -56,7 +59,7 @@
<section
class=
"content-header"
>
<h1>
检测结果管理
管理
检测结果管理
<small>
检测结果管理
</small>
</h1>
<ol
class=
"breadcrumb"
>
...
...
@@ -75,12 +78,136 @@
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<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-6"
>
<label
for=
"sendCheckNo"
>
送检编号
</label>
<input
type=
"text"
class=
"form-control"
id=
"sendCheckNo"
name=
"sendCheckNo"
placeholder=
"送检编号"
value=
"$!{data.sendCheckNo}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"checkDateStr"
>
送检日期
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"checkDateStr"
name=
"checkDateStr"
value=
"$!{data.checkDateStr}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"reagentBatchNo"
>
检测试剂批号
</label>
<input
type=
"text"
class=
"form-control"
id=
"reagentBatchNo"
name=
"reagentBatchNo"
value=
"$!{data.reagentBatchNo}"
placeholder=
"检测试剂批号"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"reagentVerifDateStr"
>
检测试剂效期
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"reagentVerifDateStr"
name=
"reagentVerifDateStr"
value=
"$!{data.reagentVerifDateStr}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"checkNo"
>
检测编号
</label>
<input
type=
"text"
class=
"form-control"
id=
"checkNo"
name=
"checkNo"
placeholder=
"检测编号"
value=
"$!{data.checkNo}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"checkProject"
>
检测项目
</label>
<input
type=
"text"
class=
"form-control"
id=
"checkProject"
name=
"checkProject"
placeholder=
"检测项目"
value=
"$!{data.checkProject}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"lowerLimit"
>
试剂盒检测下限
</label>
<input
type=
"text"
class=
"form-control"
id=
"lowerLimit"
name=
"lowerLimit"
placeholder=
"试剂盒检测下限"
value=
"$!{data.lowerLimit}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"brand"
>
试剂
</label>
<input
type=
"text"
class=
"form-control"
id=
"brand"
name=
"brand"
placeholder=
"试剂"
value=
"$!{data.brand}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"checkMethod"
>
检测方法
</label>
<input
type=
"text"
class=
"form-control"
id=
"checkMethod"
name=
"checkMethod"
placeholder=
"检测方法"
value=
"$!{data.checkMethod}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"unit"
>
单位
</label>
<input
type=
"text"
class=
"form-control"
id=
"unit"
name=
"unit"
placeholder=
"单位"
value=
"$!{data.unit}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"instrument"
>
仪器名称
</label>
<input
type=
"text"
class=
"form-control"
id=
"instrument"
name=
"instrument"
placeholder=
"仪器名称"
value=
"$!{data.instrument}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"result"
>
检测结果
</label>
<textarea
class=
"form-control"
rows=
"3"
id=
"result"
name=
"result"
value=
"$!{data.result}"
#
if
($!{
pageType
}==
'
true
')
readonly=
"readonly"
#
end
></textarea>
</div>
</div>
</div>
</div>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:checkresult:edit"))
#if($!{pageType} == 'false')
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
#end
<a
href=
"#springUrl('/a/checkresult/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
...
...
@@ -122,13 +249,64 @@
<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
src=
"common/js/cfapp.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>
<!-- END PAGE LEVEL PLUGINS -->
<script>
//定义locale汉化插件
var
locale
=
{
"format"
:
'YYYY-MM-DD HH:mm'
,
"separator"
:
" -222 "
,
"applyLabel"
:
"确定"
,
"cancelLabel"
:
"取消"
,
"fromLabel"
:
"起始时间"
,
"toLabel"
:
"结束时间'"
,
"customRangeLabel"
:
"自定义"
,
"weekLabel"
:
"W"
,
"daysOfWeek"
:
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
],
"monthNames"
:
[
"一月"
,
"二月"
,
"三月"
,
"四月"
,
"五月"
,
"六月"
,
"七月"
,
"八月"
,
"九月"
,
"十月"
,
"十一月"
,
"十二月"
],
"firstDay"
:
1
};
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
initParams
();
$
(
'.datepicker'
).
daterangepicker
({
'locale'
:
locale
,
"singleDatePicker"
:
true
,
"timePicker"
:
true
,
"timePicker24Hour"
:
true
,
"showCustomRangeLabel"
:
true
},
function
(
start
,
end
,
label
)
{
console
.
log
(
"New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')"
);
});
});
var
initParams
=
function
()
{
let
checkProject
=
$
(
'#checkProject'
).
val
();
if
(
!
checkProject
||
checkProject
==
''
)
{
$
(
'#checkProject'
).
val
(
"HIV-1病毒载量"
);
}
let
lowerLimit
=
$
(
'#lowerLimit'
).
val
();
if
(
!
lowerLimit
||
lowerLimit
==
''
)
{
$
(
'#lowerLimit'
).
val
(
"40"
);
}
let
brand
=
$
(
'#brand'
).
val
();
if
(
!
brand
||
brand
==
''
)
{
$
(
'#brand'
).
val
(
"美国雅培"
);
}
let
checkMethod
=
$
(
'#checkMethod'
).
val
();
if
(
!
checkMethod
||
checkMethod
==
''
)
{
$
(
'#checkMethod'
).
val
(
"荧光定量PCR"
);
}
let
unit
=
$
(
'#unit'
).
val
();
if
(
!
unit
||
unit
==
''
)
{
$
(
'#unit'
).
val
(
"Copies/mL"
);
}
};
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
...
...
aidea-modules/checkresult-module-web/src/main/webapp/WEB-INF/views/checkresult/checkresultlist.html
View file @
432c86f0
...
...
@@ -60,12 +60,12 @@
<section
class=
"content-header"
>
<h1>
检测结果管理
管理
检测结果管理
<small>
检测结果管理
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
检测结果管理
管理
列表
</a></li>
<li><a
class=
"active"
>
检测结果管理列表
</a></li>
</ol>
</section>
...
...
@@ -77,10 +77,20 @@
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/checkresult/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"sendCheckNo"
placeholder=
"送检编号"
>
</div>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"name"
placeholder=
"患者名称"
>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:checkresult:edit"))
<a
href=
"#springUrl('/a/checkresult/form')"
class=
"btn btn-primary"
>
新增
</a>
<a
href=
"#springUrl('/a/checkresult/form')
?pageType=Edit
"
class=
"btn btn-primary"
>
新增
</a>
<a
href=
"#springUrl('/a/checkresult/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
...
...
@@ -91,7 +101,13 @@
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td><th>
创建时间
</th>
<td
hidden=
"true"
>
Id
</td>
<th>
送检编号
</th>
<th>
检测试剂批号
</th>
<th>
昵称
</th>
<th>
送检日期
</th>
<th>
检测试剂效期
</th>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
...
...
@@ -135,6 +151,10 @@
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
...
...
@@ -188,6 +208,21 @@
{
"mData"
:
"id"
},
{
"mData"
:
"sendCheckNo"
},
{
"mData"
:
"reagentBatchNo"
},
{
"mData"
:
"name"
},
{
"mData"
:
"checkDate"
},
{
"mData"
:
"reagentVerifDate"
},
{
"mData"
:
"createTime"
},
...
...
@@ -199,17 +234,53 @@
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
1
],
"mData"
:
"sendCheckNo"
},
{
"mData"
:
"reagentBatchNo"
},
{
"mData"
:
"name"
},
{
"aTargets"
:
[
4
],
"mData"
:
"checkDate"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
5
],
"mData"
:
"reagentVerifDate"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
6
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<a href="#springUrl("/a/checkresult/form?id='
+
c
.
id
+
'")" data-id="'
+
c
.
id
+
'" data-action="view">'
+
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
+
'</a>'
;
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
7
],
"mData"
:
""
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
html
=
''
;
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:checkresult:view"))<a href="#springUrl("/a/checkresult/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:checkresult:edit"))<a href="#springUrl("/a/checkresult/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'</ul></div>'
;
return
html
;
}
},
]
});
}
...
...
@@ -231,6 +302,7 @@
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
...
...
@@ -262,9 +334,10 @@
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/checkresult/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/checkresult/importExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/checkresult/importExcel')?_csrf_header="
+
csrfheader
.
value
+
"&_csrf="
+
csrftoken
.
value
;
Cfapp
.
importExcel
({
title
:
'检测结果管理导入'
,
importurl
:
importExcelUrl
,
...
...
aidea-modules/checkresult-module/pom.xml
View file @
432c86f0
...
...
@@ -10,6 +10,14 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
checkresult-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
couponrecord-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/checkresult-module/src/main/java/com/cftech/checkresult/dao/CheckresultMapper.xml
View file @
432c86f0
...
...
@@ -9,6 +9,7 @@
<result
column=
"reagent_batch_no"
property=
"reagentBatchNo"
/>
<result
column=
"reagent_verif_date"
property=
"reagentVerifDate"
/>
<result
column=
"number"
property=
"number"
/>
<result
column=
"check_no"
property=
"checkNo"
/>
<result
column=
"check_project"
property=
"checkProject"
/>
<result
column=
"openid"
property=
"openid"
/>
<result
column=
"result"
property=
"result"
/>
...
...
@@ -28,6 +29,7 @@
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"name"
property=
"name"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
...
...
@@ -58,12 +60,45 @@
</sql>
<sql
id=
"sqlColumns"
>
t.id,
t.send_check_no,
t.check_date,
t.reagent_batch_no,
t.reagent_verif_date,
t.number,
t.check_no,
t.check_project,
t.openid,
t.result,
t.lower_limit,
t.brand,
t.check_method,
t.unit,
t.instrument,
t.auditor,
t.audit_date,
t.checked_by,
t.accounts_id,
t.del_flag,
t.status,
t.create_time,
t.update_time,
t.description,
t.create_by,
t.update_by
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.checkresult.model.Checkresult"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_check_result
(
id,
send_check_no,
check_date,
reagent_batch_no,
reagent_verif_date,
number,
check_no,
check_project,
openid,
result,
...
...
@@ -83,23 +118,16 @@
description,
create_by,
update_by
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.checkresult.model.Checkresult"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_check_result
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{sendCheckNo, jdbcType=VARCHAR},
now()
,
#{checkDate, jdbcType=TIMESTAMP}
,
#{reagentBatchNo, jdbcType=VARCHAR},
now()
,
#{reagentVerifDate, jdbcType=TIMESTAMP}
,
#{number, jdbcType=VARCHAR},
#{checkNo, jdbcType=VARCHAR},
#{checkProject, jdbcType=VARCHAR},
#{openid, jdbcType=VARCHAR},
#{result, jdbcType=VARCHAR},
...
...
@@ -109,7 +137,7 @@
#{unit, jdbcType=VARCHAR},
#{instrument, jdbcType=VARCHAR},
#{auditor, jdbcType=VARCHAR},
now()
,
#{auditDate, jdbcType=TIMESTAMP}
,
#{checkedBy, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
...
...
@@ -130,15 +158,16 @@
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_check_result
SELECT COUNT(1) FROM t_aidea_check_result t
LEFT JOIN wx_mp_fanss f ON t.openid = f.openid AND f.delflag = '0'
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_check_result
<include
refid=
"sqlColumns"
/>
, f.nickname name
FROM t_aidea_check_result t
LEFT JOIN wx_mp_fanss f ON t.openid = f.openid AND f.delflag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
...
...
@@ -165,6 +194,9 @@
<if
test=
"number != null"
>
number = #{number, jdbcType=VARCHAR},
</if>
<if
test=
"checkNo != null"
>
check_no = #{checkNo},
</if>
<if
test=
"checkProject != null"
>
check_project = #{checkProject, jdbcType=VARCHAR},
</if>
...
...
@@ -224,7 +256,9 @@
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_check_result set del_flag=1 where id=#{id,jdbcType=BIGINT}
update t_aidea_check_result
set del_flag=1
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"checkResultsList"
resultType=
"map"
>
...
...
aidea-modules/checkresult-module/src/main/java/com/cftech/checkresult/model/Checkresult.java
View file @
432c86f0
...
...
@@ -7,82 +7,88 @@ import java.io.Serializable;
import
java.util.Date
;
/**
* 检测结果管理
*
* @author Strive
* @date: 2021-01-27 17:19
*/
* 检测结果管理
*
* @author Strive
* @date: 2021-01-27 17:19
*/
@Data
public
class
Checkresult
implements
Serializable
{
/* 主键id */
/* 主键id */
private
Long
id
;
/* 送检编号 */
@ExportConfig
(
value
=
"送检编号"
,
width
=
100
,
showLevel
=
1
)
/* 送检编号 */
@ExportConfig
(
value
=
"送检编号"
,
width
=
120
)
private
String
sendCheckNo
;
/* 送检时间 */
@ExportConfig
(
value
=
"送检时间"
,
width
=
100
,
showLevel
=
1
)
/* 送检时间 */
@ExportConfig
(
value
=
"送检日期(格式:yyyy-MM-dd)"
,
width
=
180
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
checkDate
;
/* 检测试剂编号 */
@ExportConfig
(
value
=
"检测试剂编号"
,
width
=
100
,
showLevel
=
1
)
/* 检测试剂编号 */
@ExportConfig
(
value
=
"检测试剂批号"
,
width
=
120
)
private
String
reagentBatchNo
;
/* 检测试剂有效期 */
@ExportConfig
(
value
=
"检测试剂有效期"
,
width
=
100
,
showLevel
=
1
)
/* 检测试剂有效期 */
@ExportConfig
(
value
=
"检测试剂效期(格式:yyyy-MM-dd)"
,
width
=
180
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
reagentVerifDate
;
/* 检测编号 */
@ExportConfig
(
value
=
"检测编号"
,
width
=
100
,
showLevel
=
1
)
/* 检测编号 */
@ExportConfig
(
value
=
"检测编号"
,
width
=
100
)
private
String
checkNo
;
/* 系统检测编号 */
@ExportConfig
(
value
=
"系统检测编号"
,
width
=
120
,
showLevel
=
1
)
private
String
number
;
/* 检测项目 */
@ExportConfig
(
value
=
"检测项目"
,
width
=
100
,
showLevel
=
1
)
/* 检测项目 */
@ExportConfig
(
value
=
"检测项目"
,
width
=
100
)
private
String
checkProject
;
/* 粉丝id */
@ExportConfig
(
value
=
"粉丝id"
,
width
=
100
,
showLevel
=
1
)
/* 粉丝id */
private
String
openid
;
/* 检测结果 */
@ExportConfig
(
value
=
"检测结果"
,
width
=
100
,
showLevel
=
1
)
private
String
result
;
/* 试剂盒检测下限 */
@ExportConfig
(
value
=
"试剂盒检测下限"
,
width
=
100
,
showLevel
=
1
)
/* 试剂盒检测下限 */
@ExportConfig
(
value
=
"试剂盒检测下限"
,
width
=
130
)
private
String
lowerLimit
;
/* 试剂品牌 */
@ExportConfig
(
value
=
"试剂品牌"
,
width
=
100
,
showLevel
=
1
)
/* 试剂品牌 */
@ExportConfig
(
value
=
"试剂"
,
width
=
100
)
private
String
brand
;
/* 检测方法 */
@ExportConfig
(
value
=
"检测方法"
,
width
=
100
,
showLevel
=
1
)
/* 检测方法 */
@ExportConfig
(
value
=
"检测方法"
,
width
=
100
)
private
String
checkMethod
;
/* 单位 */
@ExportConfig
(
value
=
"单位"
,
width
=
100
,
showLevel
=
1
)
/* 单位 */
@ExportConfig
(
value
=
"单位"
,
width
=
100
)
private
String
unit
;
/* 仪器名称 */
@ExportConfig
(
value
=
"仪器名称"
,
width
=
100
,
showLevel
=
1
)
/* 仪器名称 */
@ExportConfig
(
value
=
"仪器名称"
,
width
=
100
)
private
String
instrument
;
/* 审核人 */
@ExportConfig
(
value
=
"审核人"
,
width
=
100
,
showLevel
=
1
)
/* 检测结果 */
@ExportConfig
(
value
=
"检测结果"
,
width
=
100
)
private
String
result
;
/* 审核人 */
private
String
auditor
;
/* 审核时间 */
@ExportConfig
(
value
=
"审核时间"
,
width
=
100
,
showLevel
=
1
)
/* 审核时间 */
private
Date
auditDate
;
/* 检测人 */
@ExportConfig
(
value
=
"检测人"
,
width
=
100
,
showLevel
=
1
)
/* 检测人 */
private
String
checkedBy
;
/* 所属的账号 */
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
/* 状态 */
private
String
status
;
/* 创建时间 */
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
/* 备注 */
private
String
description
;
/* 创建人 */
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
/* 更新人 */
private
Long
updateBy
;
public
Checkresult
()
{
@ExportConfig
(
value
=
"粉丝昵称"
,
width
=
100
,
showLevel
=
1
)
private
String
name
;
//患者名称
@ExportConfig
(
value
=
"检测券编码"
,
width
=
120
,
showLevel
=
1
)
private
String
copponRecordNo
;
//检测券编码
private
String
checkDateStr
;
private
String
reagentVerifDateStr
;
public
Checkresult
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
...
...
aidea-modules/checkresult-module/src/main/java/com/cftech/checkresult/web/CheckresultController.java
View file @
432c86f0
package
com
.
cftech
.
checkresult
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.checkresult.model.Checkresult
;
import
com.cftech.checkresult.service.CheckresultService
;
import
com.cftech.core.poi.ExcelKit
;
...
...
@@ -8,14 +9,16 @@ import com.cftech.core.scope.OrderType;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.core.util.DateFormatUtils
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.couponrecord.service.CouponrecordService
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -28,157 +31,214 @@ import java.util.List;
/**
* 检测结果管理Controller
*
* 权限字符串说明:
* 查看:public static final String CHECKRESULT_VIEW = "qy:checkresult:view"
* 查看:public static final String CHECKRESULT_EDIT = "qy:checkresult:edit"
*
* @author Strive
* @date: 2021-01-27 17:19
*/
* 检测结果管理Controller
* <p>
* 权限字符串说明:
* 查看:public static final String CHECKRESULT_VIEW = "qy:checkresult:view"
* 查看:public static final String CHECKRESULT_EDIT = "qy:checkresult:edit"
*
* @author Strive
* @date: 2021-01-27 17:19
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/checkresult"
)
public
class
CheckresultController
{
public
static
final
String
CHECKRESULT_VIEW
=
"qy:checkresult:view"
;
public
static
final
String
CHECKRESULT_EDIT
=
"qy:checkresult:edit"
;
@Autowired
private
CheckresultService
checkresultService
;
//列表页面
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"checkresult/checkresultlist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Checkresult
checkresult
=
checkresultService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
checkresult
);
}
return
"checkresult/checkresultform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
CHECKRESULT_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Checkresult
checkresult
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
checkresult
!=
null
&&
checkresult
.
getId
()
!=
null
)
{
checkresult
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
checkresultService
.
update
(
checkresult
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
checkresult
.
setAccountsId
(
accountsId
);
checkresult
.
setDelFlag
(
false
);
checkresult
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
checkresult
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
checkresult
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
checkresultService
.
save
(
checkresult
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Checkresult
checkresult
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
List
<
Checkresult
>
list
=
checkresultService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
checkresultService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
CHECKRESULT_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
checkresultService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
public
static
final
String
CHECKRESULT_VIEW
=
"qy:checkresult:view"
;
public
static
final
String
CHECKRESULT_EDIT
=
"qy:checkresult:edit"
;
@Autowired
private
CheckresultService
checkresultService
;
@Autowired
private
CodingruleUtils
codingruleUtils
;
@Autowired
private
CouponrecordService
couponrecordService
;
//列表页面
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"checkresult/checkresultlist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
,
String
pageType
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Checkresult
checkresult
=
checkresultService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
checkresult
);
}
model
.
addAttribute
(
"pageType"
,
pageType
.
equals
(
"View"
)
?
true
:
false
);
//是否查看页面
return
"checkresult/checkresultform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
CHECKRESULT_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Checkresult
checkresult
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
//日期格式化
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getCheckDateStr
()))
{
checkresult
.
setCheckDate
(
DateFormatUtils
.
formatDate
(
checkresult
.
getCheckDateStr
(),
"yyyy-MM-dd HH:mm"
));
}
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getReagentVerifDateStr
()))
{
checkresult
.
setReagentVerifDate
(
DateFormatUtils
.
formatDate
(
checkresult
.
getReagentVerifDateStr
(),
"yyyy-MM-dd HH:mm"
));
}
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getSendCheckNo
()))
{
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"number"
,
checkresult
.
getSendCheckNo
());
Couponrecord
couponrecord
=
couponrecordService
.
fetchSearchByConds
(
conds
);
if
(
couponrecord
!=
null
)
checkresult
.
setOpenid
(
couponrecord
.
getOpenid
());
}
if
(
checkresult
!=
null
&&
checkresult
.
getId
()
!=
null
)
{
checkresult
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
checkresultService
.
update
(
checkresult
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
//设置检测结果系统编码
checkresult
.
setNumber
(
codingruleUtils
.
getNumber
(
accountsId
,
Checkresult
.
class
.
getName
()));
checkresult
.
setAccountsId
(
accountsId
);
checkresult
.
setDelFlag
(
false
);
checkresult
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
checkresult
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
checkresult
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
checkresultService
.
save
(
checkresult
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Checkresult
checkresult
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.accounts_id"
,
accountsId
);
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getName
()))
{
conds
.
like
(
"t.name"
,
checkresult
.
getName
());
}
if
(
StringUtils
.
isNoneBlank
(
checkresult
.
getCheckNo
()))
{
conds
.
like
(
"t.chech_no"
,
checkresult
.
getCheckNo
());
}
Sort
sort
=
new
Sort
(
"t.create_time"
,
OrderType
.
DESC
);
List
<
Checkresult
>
list
=
checkresultService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
checkresultService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
CHECKRESULT_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
checkresultService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"t.create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
0
);
conds
.
equal
(
"t.accounts_id"
,
accountId
);
List
<
Checkresult
>
list
=
checkresultService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Checkresult
.
class
,
response
).
toExcel
(
list
,
"检测结果管理信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Checkresult
.
class
,
response
).
toExcel
(
null
,
"检测结果管理信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
CHECKRESULT_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
CHECKRESULT_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Checkresult
.
class
,
response
).
toExcel
(
null
,
"检测结果管理信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
CHECKRESULT_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
0
)))
{
Checkresult
checkresult
=
new
Checkresult
();
checkresult
.
setAccountsId
(
accountId
);
checkresult
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Checkresult
.
class
.
getName
()));
//设置检测人员
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"number"
,
checkresult
.
getSendCheckNo
());
Couponrecord
couponrecord
=
couponrecordService
.
fetchSearchByConds
(
conds
);
if
(
couponrecord
!=
null
)
{
checkresult
.
setOpenid
(
couponrecord
.
getOpenid
());
}
checkresult
.
setSendCheckNo
(
rowData
.
get
(
0
));
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
1
)))
{
checkresult
.
setCheckDate
(
DateFormatUtils
.
formatDate
(
rowData
.
get
(
1
),
"yyyy-MM-dd"
));
}
checkresult
.
setReagentBatchNo
(
rowData
.
get
(
2
));
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
3
)))
{
checkresult
.
setReagentVerifDate
(
DateFormatUtils
.
formatDate
(
rowData
.
get
(
3
),
"yyyy-MM-dd"
));
}
checkresult
.
setCheckNo
(
rowData
.
get
(
4
));
checkresult
.
setCheckProject
(
rowData
.
get
(
5
));
checkresult
.
setLowerLimit
(
rowData
.
get
(
6
));
checkresult
.
setBrand
(
rowData
.
get
(
7
));
checkresult
.
setCheckMethod
(
rowData
.
get
(
8
));
checkresult
.
setUnit
(
rowData
.
get
(
9
));
checkresult
.
setInstrument
(
rowData
.
get
(
10
));
checkresult
.
setResult
(
rowData
.
get
(
11
));
checkresultService
.
save
(
checkresult
);
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
aidea-modules/consult-module-web/src/main/webapp/WEB-INF/views/consultSheet/consultSheetform.html
View file @
432c86f0
...
...
@@ -176,7 +176,8 @@
class=
"form-control"
name=
"fansAlias"
id=
"fansAlias"
maxlength=
"50"
placeholder=
"用药人姓名"
value=
"$!{data.fansAlias}"
#
if
($!{
isView
}
==
'
true
')
readonly=
"readonly"
#
elseif
($!{
data
.
fansAlias
})
readonly=
"readonly"
#
end
value=
"$!{data.fansAlias}"
#
if
($!{
isView
}==
'
true
')
readonly=
"readonly"
#
elseif
($!{
data
.
fansAlias
})
readonly=
"readonly"
#
end
>
</div>
...
...
@@ -267,7 +268,8 @@
<div
class=
"form-group form-md-line-input col-xs-3"
>
<label></label>
<div
class=
"input-group"
>
<input
type=
"text"
name=
"historySheet"
id=
"historySheet"
class=
"form-control"
<input
type=
"text"
name=
"historySheet"
id=
"historySheet"
class=
"form-control"
style=
"display: none"
>
<input
type=
"text"
id=
"historySheetName"
name=
"historySheetName"
class=
"form-control"
style=
"display: none"
>
...
...
@@ -283,12 +285,13 @@
<br/>
<div
class=
"form-group "
id=
"imageurl"
style=
"width: 130px; height: 120px; margin-left: 5px; padding: 10px; background-color: #f4f4f4; border: 1px solid #CCCCCC"
>
<img
id=
"prescription"
style=
"cursor:zoom-in; width: 100%; height: 100% "
src=
"$!{data.prescription}"
onclick=
"imgcli(this)"
>
<img
id=
"prescription"
style=
"cursor:zoom-in; width: 100%; height: 100% "
src=
"$!{data.prescription}"
onclick=
"imgcli(this)"
>
</div>
</div>
</div>
</div>
...
...
@@ -298,14 +301,24 @@
<div
class=
"form-group form-md-line-input"
>
<div
id=
"group"
class=
"list-group"
>
<li
class=
"list-group-item"
>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品名称
</label></th>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品购买数量
</label>
</th>
<th
style=
""
><label
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>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品名称
</label>
</th>
<th
style=
""
><label
style=
"width: 180px;margin-right: 50px;text-align: center"
>
商品购买数量
</label>
</th>
<th
style=
""
><label
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>
#if ($!{isView} != 'true')
<button
type=
"button"
class=
"search btn btn-primary"
onclick=
"clickAdd()"
>
添加商品
</button>
<button
type=
"button"
class=
"search btn btn-primary"
onclick=
"clickAdd()"
>
添加商品
</button>
#end
</div>
</div>
...
...
@@ -386,7 +399,7 @@
if
(
sheetGoods
!=
null
&&
sheetGoods
!=
''
)
{
let
goodsArr
=
JSON
.
parse
(
sheetGoods
);
if
(
goodsArr
.
length
!=
0
)
{
for
(
let
i
=
0
;
i
<
goodsArr
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
goodsArr
.
length
;
i
++
)
{
let
goods
=
goodsArr
[
i
];
clickAdd
(
consultId
,
goods
.
productId
,
goods
.
drugsNum
,
goods
.
price
,
goods
.
amount
);
}
...
...
@@ -407,10 +420,10 @@
}).
join
(
''
);
var
idHtml
=
""
;
if
(
id
&&
id
!=
null
){
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="`
+
id
+
`">`
;
}
else
{
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="">`
if
(
id
&&
id
!=
null
)
{
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="`
+
id
+
`">`
;
}
else
{
idHtml
+=
`<input type="hidden" id="idDetail" name="idDetail" value="">`
}
var
listHtml
=
""
;
...
...
@@ -422,18 +435,18 @@
var
HtmlPrice
=
""
;
if
(
price
&&
price
!=
null
)
{
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
price
+
`" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
price
+
`"></input>`
;
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
price
+
`" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
price
+
`"></input>`
;
}
else
{
let
priceTmp
=
goodsList
[
0
].
price
.
toFixed
(
2
);
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
priceTmp
+
`" style="width: 180px ;margin-right: 50px" type="text" readonly="readonly" value="`
+
priceTmp
+
`"></input>`
HtmlPrice
+=
`<input name="htmlPrice" class="form-control" data-price="`
+
priceTmp
+
`" style="width: 180px ;margin-right: 50px" type="text" readonly="readonly" value="`
+
priceTmp
+
`"></input>`
}
var
HtmlAmount
=
""
;
if
(
amount
&&
amount
!=
null
)
{
HtmlAmount
+=
`<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
amount
+
`" ></input>`
;
HtmlAmount
+=
`<input id="htmlAmount" class="form-control" name="htmlAmount" style="width: 180px ;margin-right: 50px" type='text' readonly="readonly" value="`
+
amount
+
`" ></input>`
;
}
else
{
var
amountTmp
=
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
=
""
;
...
...
@@ -480,12 +493,12 @@
$
(
value
).
parent
().
find
(
'input[name="htmlAmount"]'
).
val
(
totalPrice
.
toFixed
(
2
))
}
// function updatePrice(e) {
// // var orderAmount = $("#orderAmount");
// var valueSi = $(value).val();
// // var sign = Math.floor(valueSi * 100 ) /100
// $("#orderAmount").val(valueSi.toFixed(2));
// }
// function updatePrice(e) {
// // var orderAmount = $("#orderAmount");
// var valueSi = $(value).val();
// // var sign = Math.floor(valueSi * 100 ) /100
// $("#orderAmount").val(valueSi.toFixed(2));
// }
function
deleteSelect
(
event
)
{
let
dom
=
event
.
target
;
...
...
@@ -537,7 +550,7 @@
let
algorithm
=
(
imgH
/
finalImgH
).
toFixed
(
2
);
let
finalImgW
=
(
imgW
/
algorithm
).
toFixed
(
2
);
let
val
=
(
1
-
(
finalImgW
/
$
(
'.content-wrapper'
).
width
()).
toFixed
(
2
))
/
2
*
100
-
3
;
let
val
=
(
1
-
(
finalImgW
/
$
(
'.content-wrapper'
).
width
()).
toFixed
(
2
))
/
2
*
100
-
3
;
$
(
'#divimg'
).
height
(
$
(
'.content-wrapper'
).
height
());
$
(
'#divimg img'
).
height
(
finalImgH
);
...
...
@@ -648,13 +661,14 @@
Cfapp
.
alert
({
message
:
"请先选择处方医院!"
,
btntext
:
"确定"
,
success
:
function
()
{}
success
:
function
()
{
}
});
return
;
}
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/wxQrcode/listUser?type="
+
3
+
"&allergy="
+
allergy
+
"')"
,
dataUrl
:
"#springUrl('/a/wxQrcode/listUser?type="
+
3
+
"&allergy="
+
allergy
+
"')"
,
checkType
:
"single"
,
// 多选为multi
title
:
'请选择医生'
,
btnoktext
:
"确定"
,
...
...
@@ -772,16 +786,16 @@
//验证是否增加商品
var
datas
=
[];
$
(
".translate"
).
each
(
function
(
index
,
item
)
{
$
(
".translate"
).
each
(
function
(
index
,
item
)
{
datas
.
push
({
productId
:
$
(
item
).
find
(
'[name="releas"]'
).
val
(),
drugsNum
:
$
(
item
).
find
(
'[name="listHtml"]'
).
val
(),
price
:
$
(
item
).
find
(
'[name="htmlPrice"]'
).
val
(),
amount
:
$
(
item
).
find
(
'[name="htmlAmount"]'
).
val
()
productId
:
$
(
item
).
find
(
'[name="releas"]'
).
val
(),
drugsNum
:
$
(
item
).
find
(
'[name="listHtml"]'
).
val
(),
price
:
$
(
item
).
find
(
'[name="htmlPrice"]'
).
val
(),
amount
:
$
(
item
).
find
(
'[name="htmlAmount"]'
).
val
()
});
});
if
(
datas
.
length
==
0
){
if
(
datas
.
length
==
0
)
{
Cfapp
.
alert
({
message
:
"咨询单至少包含一件商品"
,
btntext
:
"确定"
,
...
...
@@ -790,7 +804,8 @@
}
});
return
;
};
}
;
var
dataJSON
=
{
"consultId"
:
$
(
"#id"
).
val
(),
...
...
@@ -847,7 +862,7 @@
var
openid
=
`$!{data.openId}`
;
$
(
"#history"
).
click
(
function
()
{
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/consultSheet/listData?openId="
+
openid
+
"&status=')"
,
dataUrl
:
"#springUrl('/a/consultSheet/listData?openId="
+
openid
+
"&status=')"
,
checkType
:
"single"
,
// 多选为multi
title
:
'查看历史咨询单'
,
btnoktext
:
"确定"
,
...
...
@@ -902,7 +917,7 @@
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
a
;
}
},{
},
{
"aTargets"
:
[
4
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
...
@@ -914,7 +929,7 @@
return
"已拒绝"
;
}
}
},{
},
{
"aTargets"
:
[
6
],
"mData"
:
"auditTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
...
...
aidea-modules/couponrecord-module-web/pom.xml
View file @
432c86f0
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
...
...
aidea-modules/couponrecord-module-web/src/main/webapp/WEB-INF/views/couponrecord/couponrecordform.html
View file @
432c86f0
...
...
@@ -56,7 +56,7 @@
<section
class=
"content-header"
>
<h1>
发券信息管理
管理
发券信息管理
<small>
发券信息管理
</small>
</h1>
<ol
class=
"breadcrumb"
>
...
...
aidea-modules/couponrecord-module-web/src/main/webapp/WEB-INF/views/couponrecord/couponrecordlist.html
View file @
432c86f0
...
...
@@ -60,12 +60,12 @@
<section
class=
"content-header"
>
<h1>
发券信息管理
管理
发券信息管理
<small>
发券信息管理
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
发券信息管理
管理
列表
</a></li>
<li><a
class=
"active"
>
发券信息管理列表
</a></li>
</ol>
</section>
...
...
@@ -80,9 +80,7 @@
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:couponrecord:edit"))
<a
href=
"#springUrl('/a/couponrecord/form')"
class=
"btn btn-primary"
>
新增
</a>
<a
href=
"#springUrl('/a/couponrecord/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
</div>
</form>
...
...
@@ -91,7 +89,8 @@
<table
id=
"table"
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td
hidden=
"true"
>
Id
</td><th>
创建时间
</th>
<td
hidden=
"true"
>
Id
</td>
<th>
创建时间
</th>
<th>
操作
</th>
</tr>
</thead>
...
...
@@ -231,6 +230,7 @@
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
...
...
@@ -262,6 +262,7 @@
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/couponrecord/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/couponrecord/importExcel')"
;
...
...
aidea-modules/couponrecord-module/pom.xml
View file @
432c86f0
...
...
@@ -10,6 +10,14 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
couponrecord-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
checkcoupon-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/dao/CouponrecordMapper.java
View file @
432c86f0
...
...
@@ -8,6 +8,8 @@ import org.apache.ibatis.annotations.Param;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
* 发券信息管理Mapper
*
...
...
@@ -16,6 +18,7 @@ import java.util.Map;
*/
public
interface
CouponrecordMapper
extends
GenericDao
<
Couponrecord
>
{
<<<<<<<
HEAD
List
<
Map
<
String
,
Object
>>
CheckCouponDSYList
(
CouponrecordVo
vo
);
List
<
Map
<
String
,
Object
>>
CheckCouponYSYList
(
CouponrecordVo
vo
);
...
...
@@ -26,4 +29,12 @@ public interface CouponrecordMapper extends GenericDao<Couponrecord> {
Map
<
String
,
Object
>
checkCouponDetails
(
CouponrecordVo
vo
);
=======
/**
* 查询粉丝购药数量
* @param params
* @return
*/
Integer
buyingMedicineNumber
(
Map
<
String
,
Object
>
params
);
>>>>>>>
a36b917f9562e200889fcced02ed1de0d7aeb745
}
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/dao/CouponrecordMapper.xml
View file @
432c86f0
...
...
@@ -52,8 +52,7 @@
</sql>
<sql
id=
"sqlColumns"
>
id
,
id,
take_effect_year,
take_effect_month,
expire_month,
...
...
@@ -194,6 +193,7 @@
where id = #{id,jdbcType=BIGINT}
</update>
<<<<<<
< HEAD
<select
id=
"CheckCouponYSYList"
resultType=
"map"
>
SELECT
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status
...
...
@@ -246,5 +246,13 @@
id,number,DATE_FORMAT(create_time,'%Y-%m-%d') create_time,DATE_FORMAT(invalid_date,'%Y-%m-%d') invalid_date,status,description
from t_aidea_coupon_record
where id = #{id}
=======
<select
id=
"buyingMedicineNumber"
parameterType=
"java.util.Map"
resultType=
"map"
>
SELECT
SUM(d.number) number
FROM t_order t
LEFT JOIN t_order_details d ON t.id = d.order_id
<include
refid=
"sqlWhere"
/>
>>>>>>> a36b917f9562e200889fcced02ed1de0d7aeb745
</select>
</mapper>
\ No newline at end of file
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/model/Couponrecord.java
View file @
432c86f0
...
...
@@ -7,64 +7,70 @@ import java.io.Serializable;
import
java.util.Date
;
/**
* 发券信息管理
*
* @author Strive
* @date: 2021-01-27 15:54
*/
* 发券信息管理
*
* @author Strive
* @date: 2021-01-27 15:54
*/
@Data
public
class
Couponrecord
implements
Serializable
{
/* 主键id */
/* 主键id */
private
Long
id
;
/* 有效期年 */
/* 有效期年 */
@ExportConfig
(
value
=
"有效期年"
,
width
=
100
,
showLevel
=
1
)
private
String
takeEffectYear
;
/* 生效月 */
/* 生效月 */
@ExportConfig
(
value
=
"生效月"
,
width
=
100
,
showLevel
=
1
)
private
String
takeEffectMonth
;
/* 过期月份 */
/* 过期月份 */
@ExportConfig
(
value
=
"过期月份"
,
width
=
100
,
showLevel
=
1
)
private
String
expireMonth
;
/* 检测券类型 */
/* 检测券类型 */
@ExportConfig
(
value
=
"检测券类型"
,
width
=
100
,
showLevel
=
1
)
private
String
type
;
/* 检测券编码 */
/* 检测券编码 */
@ExportConfig
(
value
=
"检测券编码"
,
width
=
100
,
showLevel
=
1
)
private
String
number
;
/* 粉丝id */
/* 粉丝id */
@ExportConfig
(
value
=
"粉丝id"
,
width
=
100
,
showLevel
=
1
)
private
String
openid
;
/* 二维码链接 */
/* 二维码链接 */
@ExportConfig
(
value
=
"二维码链接"
,
width
=
100
,
showLevel
=
1
)
private
String
qrcode
;
/* 失效时间 */
/* 失效时间 */
@ExportConfig
(
value
=
"失效时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
invalidDate
;
/* 核销时间 */
/* 核销时间 */
@ExportConfig
(
value
=
"核销时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
verifDate
;
/* 设备号 */
/* 设备号 */
@ExportConfig
(
value
=
"设备号"
,
width
=
100
,
showLevel
=
1
)
private
Date
facilityNo
;
/* 所属的账号 */
/* 过期时间 */
@ExportConfig
(
value
=
"过期时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
expireDate
;
/* 过期时间 */
@ExportConfig
(
value
=
"生效时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
takeEffectDate
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
/* 状态 */
private
String
status
;
/* 创建时间 */
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
/* 备注 */
private
String
description
;
/* 创建人 */
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
/* 更新人 */
private
Long
updateBy
;
public
Couponrecord
()
{
public
Couponrecord
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
...
...
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/CouponrecordService.java
View file @
432c86f0
package
com
.
cftech
.
couponrecord
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.core.generic.GenericService
;
import
com.cftech.couponrecord.model.CouponrecordVo
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.core.generic.GenericService
;
import
java.util.List
;
/**
* 发券信息管理Service
...
...
@@ -38,4 +43,18 @@ public interface CouponrecordService extends GenericService<Couponrecord> {
* @return
**/
JSONObject
checkCouponById
(
CouponrecordVo
vo
);
/** 发放检测券
* @param couponId
* @param openid
* @return
*/
boolean
sendCouponRecord
(
Long
couponId
,
String
openid
);
/**
* 获取用户购药数量
* @param openid
* @return
*/
Integer
buyingMedicineNumber
(
String
openid
);
}
aidea-modules/couponrecord-module/src/main/java/com/cftech/couponrecord/service/impl/CouponrecordServiceImpl.java
View file @
432c86f0
package
com
.
cftech
.
couponrecord
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.checkcoupon.model.Checkcoupon
;
import
com.cftech.checkcoupon.service.CheckcouponService
;
import
com.cftech.checkcoupon.utils.QrcodeUtil
;
import
com.cftech.core.util.Constants
;
import
com.cftech.couponrecord.model.Couponrecord
;
import
com.cftech.couponrecord.dao.CouponrecordMapper
;
import
com.cftech.couponrecord.model.CouponrecordVo
;
...
...
@@ -8,30 +13,197 @@ import com.cftech.couponrecord.service.CouponrecordService;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
com.google.zxing.WriterException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.io.IOException
;
import
java.util.*
;
/**
* 发券信息管理ServiceImpl
*
* @author Strive
* @date: 2021-01-27 15:54
*/
* 发券信息管理ServiceImpl
*
* @author Strive
* @date: 2021-01-27 15:54
*/
@Service
(
"couponrecordService"
)
public
class
CouponrecordServiceImpl
extends
GenericServiceImpl
<
Couponrecord
>
implements
CouponrecordService
{
@Autowired
@Qualifier
(
"couponrecordMapper"
)
private
CouponrecordMapper
couponrecordMapper
;
@Autowired
@Qualifier
(
"couponrecordMapper"
)
private
CouponrecordMapper
couponrecordMapper
;
@Override
public
GenericDao
<
Couponrecord
>
getGenericMapper
()
{
return
couponrecordMapper
;
}
@Autowired
private
CheckcouponService
checkCoupouService
;
@Autowired
private
CodingruleUtils
codingruleUtils
;
@Override
public
GenericDao
<
Couponrecord
>
getGenericMapper
()
{
return
couponrecordMapper
;
}
public
boolean
sendCouponRecord
(
Long
couponId
,
String
openid
,
Long
accountId
)
throws
IOException
,
WriterException
{
Conds
couponConds
=
new
Conds
();
couponConds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
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
);
//购买数量
int
years
=
1
;
switch
(
sendCouponNumber
)
{
case
0
:
if
(
number
>=
3
&&
number
<
6
)
{
//赠送第一年第一张券
Checkcoupon
checkcoupon
=
this
.
findCheckCoupon
(
"1"
);
//生成卡券发放记录编码
String
no
=
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
());
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setNumber
(
no
);
couponrecord
.
setTakeEffectYear
(
String
.
valueOf
(
years
));
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setType
(
checkcoupon
.
getType
());
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setInvalidDate
(
dateCalculation
(
new
Date
(),
12
));
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//生效时间
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//过期时间
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecordMapper
.
save
(
couponrecord
);
//couponrecord.setInvalidDate(dateCalculation(new Date(), Integer.parseInt(checkcoupon.)));//失效时间
}
else
if
(
number
>=
6
)
{
Checkcoupon
checkcoupon
=
this
.
findCheckCoupon
(
"2"
);
//生成卡券发放记录编码
String
no
=
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
());
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setNumber
(
no
);
couponrecord
.
setTakeEffectYear
(
String
.
valueOf
(
years
));
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setType
(
checkcoupon
.
getType
());
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//生效时间
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//过期时间
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecordMapper
.
save
(
couponrecord
);
}
break
;
case
1
:
//int number = buyingMedicineNumber(openid);//购买数量
if
(
number
>=
6
)
{
Checkcoupon
checkcoupon
=
this
.
findCheckCoupon
(
"2"
);
//生成卡券发放记录编码
String
no
=
codingruleUtils
.
getNumber
(
accountId
,
Couponrecord
.
class
.
getName
());
Couponrecord
couponrecord
=
new
Couponrecord
();
couponrecord
.
setNumber
(
no
);
couponrecord
.
setTakeEffectYear
(
String
.
valueOf
(
years
));
couponrecord
.
setTakeEffectMonth
(
checkcoupon
.
getTakeEffectMonth
());
couponrecord
.
setExpireMonth
(
checkcoupon
.
getExpireMonth
());
couponrecord
.
setType
(
checkcoupon
.
getType
());
couponrecord
.
setOpenid
(
openid
);
couponrecord
.
setTakeEffectDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getTakeEffectMonth
())));
//生效时间
couponrecord
.
setExpireDate
(
dateCalculation
(
new
Date
(),
Integer
.
parseInt
(
checkcoupon
.
getExpireMonth
())));
//过期时间
couponrecord
.
setQrcode
(
QrcodeUtil
.
generateQrcode
(
no
));
//生成二维码
couponrecordMapper
.
save
(
couponrecord
);
}
break
;
case
2
:
//int number = buyingMedicineNumber(openid);//购买数量
break
;
case
3
:
break
;
case
4
:
break
;
case
5
:
break
;
case
6
:
break
;
default
:
//0张
}
// int number = buyingMedicineNumber(openid);
// if (number == 0) {
//
// }
// Conds couponConds = new Conds();
// couponConds.equal("t.del_flag", Constants.DEL_FLAG_0);
// Map<String, Object> params = new HashMap<>();
// params.put("conds", couponConds);
// couponrecordMapper.fetchSearchByPage(params);
// int number = buyingMedicineNumber(openid);
// if (number >= 3 && number <6) {//赠送第一张券
// Conds couponConds = new Conds();
// couponConds.equal("t.del_flag", Constants.DEL_FLAG_0);
// couponConds.equal("t.type", "1");//第一张券
// couponrecordMapper.f
//
// } else if (number >= 6) {//赠送第二张券
//
// }
return
false
;
}
@Override
public
boolean
sendCouponRecord
(
Long
couponId
,
String
openid
)
{
return
false
;
}
@Override
public
Integer
buyingMedicineNumber
(
String
openid
)
{
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.openid"
,
openid
);
conds
.
equal
(
"d.del_flag"
,
Constants
.
DEL_FLAG_0
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"conds"
,
conds
);
return
couponrecordMapper
.
buyingMedicineNumber
(
params
);
}
/**
* 获取卡券基础信息
* @param type
* @return
*/
public
Checkcoupon
findCheckCoupon
(
String
type
)
{
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.type"
,
type
);
return
checkCoupouService
.
fetchSearchByConds
(
conds
);
}
/**
* 时间计算
* @param date
* @param number
* @return
*/
public
Date
dateCalculation
(
Date
date
,
int
number
)
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
date
);
calendar
.
add
(
Calendar
.
MONTH
,
number
);
return
calendar
.
getTime
();
}
@Override
public
JSONObject
CheckCouponList
(
CouponrecordVo
vo
)
{
...
...
@@ -90,4 +262,8 @@ return couponrecordMapper;
}
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 @
432c86f0
...
...
@@ -61,11 +61,12 @@ public class CouponrecordController {
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
COUPONRECORD_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
,
String
pageType
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Couponrecord
couponrecord
=
couponrecordService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
couponrecord
);
}
model
.
addAttribute
(
"isView"
,
pageType
.
equals
(
"View"
)
?
true
:
false
);
//是否查看页面
return
"couponrecord/couponrecordform"
;
}
...
...
aidea-modules/hospital-module-web/pom.xml
0 → 100644
View file @
432c86f0
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<packaging>
war
</packaging>
<name>
hospital-module-web
</name>
<groupId>
com.cftech
</groupId>
<artifactId>
hospital-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
hospital-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
hospital-module-web
</finalName>
</build>
</project>
aidea-modules/hospital-module-web/src/main/webapp/WEB-INF/views/hospital/hospitalform.html
0 → 100644
View file @
432c86f0
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
<link
rel=
"stylesheet"
href=
"plugins/jquery-validation/css/validate.css"
>
<!--fileinput css-->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-fileinput/bootstrap-fileinput.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<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>
<![endif]-->
</head>
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<h1>
合作医院信息管理
<small>
合作医院信息
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
合作医院信息
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<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-6"
>
<label
for=
"name"
>
医院名称
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"name"
name=
"name"
value=
"$!{data.name}"
#
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"
>
<label>
处方医院
</label>
#if ($!{pageType} == 'true')
<input
type=
"text"
class=
"form-control"
value=
"$!{data.orgName}"
readonly=
"readonly"
maxlength=
"50"
placeholder=
"所属组织"
/>
#else
<div
class=
"input-group"
>
<input
type=
"text"
name=
"orgName"
id=
"orgName"
value=
"$!{data.orgName}"
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"
>
<button
type=
"button"
name=
"selOrg"
id=
"selOrg"
class=
"btn btn-info btn-flat"
>
选择
</button>
</span>
</div>
#end
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"address"
>
地址
</label>
<input
type=
"text"
class=
"form-control datepicker"
id=
"address"
name=
"address"
value=
"$!{data.address}"
#
if
($!{
pageType
}
==
'
true
')
readonly=
"readonly"
#
end
/>
</div>
#if($!{pageType} == 'true')
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"longitude"
>
经度
</label>
<input
type=
"text"
class=
"form-control"
id=
"longitude"
name=
"longitude"
placeholder=
"经度"
value=
"$!{data.longitude}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"latitude"
>
纬度
</label>
<input
type=
"text"
class=
"form-control"
id=
"latitude"
name=
"latitude"
placeholder=
"纬度"
value=
"$!{data.latitude}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"province"
>
省份
</label>
<input
type=
"text"
class=
"form-control"
id=
"province"
name=
"province"
placeholder=
"省份"
value=
"$!{data.province}"
readonly=
"readonly"
/>
</div>
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"city"
>
城市
</label>
<input
type=
"text"
class=
"form-control"
id=
"city"
name=
"city"
placeholder=
"城市"
value=
"$!{data.city}"
readonly=
"readonly"
/>
</div>
#end
<div
class=
"form-group form-md-line-input col-xs-6"
>
<label
for=
"remarks"
>
备注
</label>
<textarea
class=
"form-control"
rows=
"3"
id=
"remarks"
name=
"remarks"
value=
"$!{data.remarks}"
#
if
($!{
pageType
}==
'
true
')
readonly=
"readonly"
#
end
>
$!{data.remarks}
</textarea>
</div>
</div>
</div>
</div>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:hospital:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/hospital/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins/bootstrap-fileinput/bootstrap-fileinput.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/security/sha256.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"js/jquery.form.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.config.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
src=
"common/js/cfapp.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
});
/**
* 选择组织
*/
$
(
"#selOrg"
).
click
(
function
()
{
Cfapp
.
f7
({
dataUrl
:
"#springUrl('/a/wxQrcode/listOrg')"
,
checkType
:
"single"
,
// 多选为multi
title
:
'请选择医院'
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
columns
:
[
"选择"
,
"请选择医院"
],
isSearch
:
'0'
,
searchColumns
:
[
"name"
],
//搜索的字段名称
searchColumnsRemarks
:
[
"请选择医院"
],
//搜索的字段备注
aoColumns
:
[{
"mData"
:
"id"
},
{
"mData"
:
"name"
}],
aoColumnDefs
:
[{
"aTargets"
:
[
0
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
'<input class="bindId" value="'
+
a
+
'" type="radio" id="'
+
a
+
'" name="sel" data-value="'
+
a
+
'" data-name="'
+
c
.
name
+
'">'
;
}
},
{
"aTargets"
:
[
1
],
"mData"
:
"name"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
//a表示createtime对应的值,c表示当前记录行对象
return
a
;
}
}],
success
:
function
()
{
},
cancel
:
function
()
{
},
storeFields
:
'orgName'
,
//展示字段
displayFields
:
'orgId'
})
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
bindEvent
();
};
var
bindEvent
=
function
()
{
$
(
"#myForm"
).
validate
({
rules
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/hospital/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
message
:
"添加成功"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/hospital/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/hospital/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
Cfapp
.
alert
({
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/hospital/list')"
;
}
});
}
else
{
Cfapp
.
alert
({
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/hospital/list')"
;
}
});
}
});
}
})
}
initFormCtrl
();
}
return
{
//main function to initiate the module
init
:
function
()
{
initForm
();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
aidea-modules/hospital-module-web/src/main/webapp/WEB-INF/views/hospital/hospitallist.html
0 → 100644
View file @
432c86f0
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Morris chart -->
<link
rel=
"stylesheet"
href=
"plugins/morris/morris.css"
>
<!-- jvectormap -->
<link
rel=
"stylesheet"
href=
"plugins/jvectormap/jquery-jvectormap-1.2.2.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<link
rel=
"stylesheet"
href=
"plugins\bootstrap-fileinput\fileinput.min.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<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>
<![endif]-->
</head>
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<div
id=
"importExcelDiv"
></div>
<section
class=
"content-header"
>
<h1>
合作医院信息管理
<small>
合作医院信息
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
合作医院信息管理列表
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"box"
>
<div
class=
"box-header"
>
<form
id=
"seachTableForm"
action=
"#springUrl('/a/hospital/list')"
method=
"get"
>
<div
class=
"col-xs-2"
>
<input
type=
"text"
class=
"form-control"
name=
"name"
placeholder=
"合作医院名称"
>
</div>
<div
class=
"col-xs-5"
>
<button
type=
"button"
class=
"search btn btn-primary"
>
搜索
</button>
#if($shiro.hasPermission("qy:hospital:edit"))
<a
href=
"#springUrl('/a/hospital/form')?pageType=Edit"
class=
"btn btn-primary"
>
新增
</a>
<a
href=
"#springUrl('/a/hospital/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<a
onclick=
"importExcel();"
class=
"btn btn-primary"
>
导入
</a>
#end
</div>
</form>
</div>
<!-- /.box-header -->
<div
class=
"box-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>
<th>
操作
</th>
</tr>
</thead>
<tbody
id=
"tablebody"
>
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<script
src=
"plugins/datepicker/bootstrap-datepicker.js"
></script>
<script
src=
"plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins\bootstrap-fileinput\fileinput.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh.js"
></script>
<script
src=
"plugins/bootstrap-fileinput/zh2.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"common/js/cfapp.js"
></script>
<script>
var
csrfheader
=
{
name
:
'_csrf_header'
,
value
:
'${_csrf.headerName}'
};
var
csrftoken
=
{
name
:
'_csrf'
,
value
:
'${_csrf.token}'
};
</script>
<script>
function
formatDates
(
now
)
{
var
now
=
new
Date
(
now
);
var
year
=
now
.
getFullYear
();
var
month
=
now
.
getMonth
()
+
1
;
var
date
=
now
.
getDate
();
var
hour
=
now
.
getHours
();
var
minute
=
now
.
getMinutes
();
var
second
=
now
.
getSeconds
();
return
year
+
"-"
+
month
+
"-"
+
date
+
" "
+
hour
+
":"
+
minute
+
":"
+
second
;
}
function
seachTable
()
{
var
sSource
=
"#springUrl('/a/hospital/listData')"
;
var
aoData
=
{
iDisplayStart
:
1
,
iDosplayLength
:
10
}
var
retrieveData
=
function
(
sSource
,
aoData
,
fnCallback
)
{
$
(
"#seachTableForm input"
).
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"
,
"aoColumns"
:
[
{
"mData"
:
"id"
},
{
"mData"
:
"number"
},
{
"mData"
:
"name"
},
{
"mData"
:
"address"
},
{
"mData"
:
"telephone"
},
{
"mData"
:
"longitude"
},
{
"mData"
:
"latitude"
},
{
"mData"
:
"createTime"
},
{
"mData"
:
"id"
}],
"aoColumnDefs"
:
[
{
// set default column settings
'visible'
:
false
,
'targets'
:
[
0
]
},
{
"aTargets"
:
[
7
],
"mData"
:
"createTime"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
return
formatDates
(
a
,
"yyyy-MM-dd HH:mm:ss"
);
}
},
{
"aTargets"
:
[
8
],
"mData"
:
"id"
,
"mRender"
:
function
(
a
,
b
,
c
,
d
)
{
let
html
=
''
;
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:hospital:view"))<a href="#springUrl("/a/hospital/form?pageType=View&id='
+
a
+
'")" class="btn green">查看</a>#end</li>'
;
html
+=
'<li>#if($shiro.hasPermission("qy:hospital:edit"))<a href="#springUrl("/a/hospital/form?pageType=Edit&id='
+
a
+
'")" class="btn green">修改</a>#end</li>'
;
html
+=
'</ul></div>'
;
return
html
;
}
},
]
});
}
jQuery
(
document
).
ready
(
function
()
{
seachTable
();
$
(
'.datepicker'
).
datepicker
({
show
:
true
,
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
todayBtn
:
'linked'
,
clearBtn
:
'linked'
});
$
(
'.search'
).
click
(
function
()
{
$
(
"#table"
).
dataTable
().
fnClearTable
();
});
});
Cfapp
.
init
();
function
removeData
(
data
)
{
Cfapp
.
confirm
({
message
:
"确定要删除吗"
,
btnoktext
:
"确定"
,
btncanceltext
:
"取消"
,
success
:
function
()
{
$
.
ajax
({
type
:
"POST"
,
url
:
"#springUrl('/a/hospital/delete')"
,
data
:
{
id
:
data
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
errorNo
==
0
)
{
Cfapp
.
alert
({
message
:
"删除成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/hospital/list')"
;
}
});
}
},
error
:
function
()
{
}
})
},
cancel
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
}
function
importExcel
()
{
var
templateExcelUrl
=
"#springUrl('/a/hospital/templateExcel')"
;
var
importExcelUrl
=
"#springUrl('/a/hospital/importExcel')?_csrfheader="
+
csrfheader
.
value
+
"&_csrf="
+
csrftoken
.
value
;
Cfapp
.
importExcel
({
title
:
'合作医院信息导入'
,
importurl
:
importExcelUrl
,
templateurl
:
templateExcelUrl
,
cancel
:
function
()
{
},
success
:
function
()
{
}
});
}
</script>
</body>
</html>
aidea-modules/hospital-module/pom.xml
0 → 100644
View file @
432c86f0
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
hospital-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
order-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
waybill-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/dao/HospitalMapper.java
0 → 100644
View file @
432c86f0
package
com
.
cftech
.
hospital
.
dao
;
import
com.cftech.hospital.model.Hospital
;
import
com.cftech.core.generic.GenericDao
;
/**
* 合作医院信息Mapper
*
* @author Strive
* @date: 2021-02-02 11:56
*/
public
interface
HospitalMapper
extends
GenericDao
<
Hospital
>
{
}
\ No newline at end of file
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/dao/HospitalMapper.xml
0 → 100644
View file @
432c86f0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.hospital.dao.HospitalMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.hospital.model.Hospital"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"number"
property=
"number"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"address"
property=
"address"
/>
<result
column=
"telephone"
property=
"telephone"
/>
<result
column=
"longitude"
property=
"longitude"
/>
<result
column=
"latitude"
property=
"latitude"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"province"
property=
"province"
/>
<result
column=
"city"
property=
"city"
/>
<result
column=
"adcode"
property=
"adcode"
/>
<result
column=
"reliability"
property=
"reliability"
/>
<result
column=
"level"
property=
"level"
/>
<result
column=
"org_id"
property=
"orgId"
/>
<result
column=
"org_name"
property=
"orgName"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
t.id,
t.number,
t.name,
t.address,
t.telephone,
t.longitude,
t.latitude,
t.remarks,
t.province,
t.city,
t.adcode,
t.reliability,
t.level,
t.org_id,
t.accounts_id,
t.del_flag,
t.status,
t.create_time,
t.update_time,
t.description,
t.create_by,
t.update_by,
o.org_name
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.hospital.model.Hospital"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_hospital
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{number, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{address, jdbcType=VARCHAR},
#{telephone, jdbcType=VARCHAR},
#{longitude, jdbcType=VARCHAR},
#{latitude, jdbcType=VARCHAR},
#{remarks, jdbcType=VARCHAR},
#{province, jdbcType=VARCHAR},
#{city, jdbcType=VARCHAR},
#{adcode, jdbcType=VARCHAR},
#{reliability, jdbcType=VARCHAR},
#{level, jdbcType=VARCHAR},
#{orgId, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_hospital t
LEFT JOIN t_orgunit o ON o.id = t.org_id AND o.del_flag = 0
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_hospital t
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_hospital t
LEFT JOIN t_orgunit o ON o.id = t.org_id AND o.del_flag = 0
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.hospital.model.Hospital"
>
update t_aidea_hospital
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"number != null"
>
number = #{number, jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
name = #{name, jdbcType=VARCHAR},
</if>
<if
test=
"address != null"
>
address = #{address, jdbcType=VARCHAR},
</if>
<if
test=
"telephone != null"
>
telephone = #{telephone, jdbcType=VARCHAR},
</if>
<if
test=
"longitude != null"
>
longitude = #{longitude, jdbcType=VARCHAR},
</if>
<if
test=
"latitude != null"
>
latitude = #{latitude, jdbcType=VARCHAR},
</if>
<if
test=
"remarks != null"
>
remarks = #{remarks, jdbcType=VARCHAR},
</if>
<if
test=
"province != null"
>
province = #{province, jdbcType=VARCHAR},
</if>
<if
test=
"city != null"
>
city = #{city, jdbcType=VARCHAR},
</if>
<if
test=
"adcode != null"
>
adcode = #{adcode, jdbcType=VARCHAR},
</if>
<if
test=
"reliability != null"
>
reliability = #{reliability, jdbcType=VARCHAR},
</if>
<if
test=
"level != null"
>
level = #{level, jdbcType=VARCHAR},
</if>
<if
test=
"orgId != null"
>
org_id = #{orgId, jdbcType=VARCHAR},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_hospital
set del_flag=1
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/model/Hospital.java
0 → 100644
View file @
432c86f0
package
com
.
cftech
.
hospital
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 合作医院信息
*
* @author Strive
* @date: 2021-02-02 11:56
*/
@Data
public
class
Hospital
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 编码 */
@ExportConfig
(
value
=
"编码"
,
width
=
100
,
showLevel
=
1
)
private
String
number
;
/* 医院名称 */
@ExportConfig
(
value
=
"医院名称"
,
width
=
100
)
private
String
name
;
/* 地址 */
@ExportConfig
(
value
=
"地址"
,
width
=
100
)
private
String
address
;
/* 联系方式 */
@ExportConfig
(
value
=
"联系方式"
,
width
=
100
)
private
String
telephone
;
/* 备注 */
@ExportConfig
(
value
=
"备注"
,
width
=
100
)
private
String
remarks
;
/* 经度 */
@ExportConfig
(
value
=
"经度"
,
width
=
100
,
showLevel
=
1
)
private
String
longitude
;
/* 纬度 */
@ExportConfig
(
value
=
"纬度"
,
width
=
100
,
showLevel
=
1
)
private
String
latitude
;
/* 检测结果 */
@ExportConfig
(
value
=
"省份"
,
width
=
100
,
showLevel
=
1
)
private
String
province
;
/* 试剂盒检测下限 */
@ExportConfig
(
value
=
"城市"
,
width
=
100
,
showLevel
=
1
)
private
String
city
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
private
String
adcode
;
//行政区划代码
private
String
reliability
;
//可信度参考:值范围 1 <低可信> - 10 <高可信>
private
String
level
;
//解析精度级别,分为11个级别,一般>=9即可采用(定位到点,精度较高)
private
String
orgId
;
//组织id
@ExportConfig
(
value
=
"组织编码"
,
width
=
100
,
showLevel
=
2
)
private
String
orgCode
;
@ExportConfig
(
value
=
"组织名称"
,
width
=
100
,
showLevel
=
1
)
private
String
orgName
;
//组织名称
public
Hospital
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/service/HospitalService.java
0 → 100644
View file @
432c86f0
package
com
.
cftech
.
hospital
.
service
;
import
com.cftech.hospital.model.Hospital
;
import
com.cftech.core.generic.GenericService
;
/**
* 合作医院信息Service
*
* @author Strive
* @date: 2021-02-02 11:56
*/
public
interface
HospitalService
extends
GenericService
<
Hospital
>
{
}
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/service/impl/HospitalServiceImpl.java
0 → 100644
View file @
432c86f0
package
com
.
cftech
.
hospital
.
service
.
impl
;
import
com.cftech.hospital.model.Hospital
;
import
com.cftech.hospital.dao.HospitalMapper
;
import
com.cftech.hospital.service.HospitalService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
/**
* 合作医院信息ServiceImpl
*
* @author Strive
* @date: 2021-02-02 11:56
*/
@Service
(
"hospitalService"
)
public
class
HospitalServiceImpl
extends
GenericServiceImpl
<
Hospital
>
implements
HospitalService
{
@Autowired
@Qualifier
(
"hospitalMapper"
)
private
HospitalMapper
hospitalMapper
;
@Override
public
GenericDao
<
Hospital
>
getGenericMapper
()
{
return
hospitalMapper
;
}
}
\ No newline at end of file
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/util/TxMapUtils.java
0 → 100644
View file @
432c86f0
package
com
.
cftech
.
hospital
.
util
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.core.util.SystemConfig
;
import
com.cftech.order.pay.HashKit
;
import
com.cftech.waybill.utils.CloseableHttpEntity
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.http.client.ClientProtocolException
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.TreeMap
;
/**
* @Creator Strive
* @Date 2021/02/03
*/
@Slf4j
public
class
TxMapUtils
{
private
static
Map
<
String
,
String
>
headers
=
new
HashMap
<>();
private
static
RequestConfig
requestConfig
=
null
;
static
{
requestConfig
=
RequestConfig
.
custom
()
.
setSocketTimeout
(
60000
)
//连接时间
.
setConnectTimeout
(
60000
)
//超时时间
.
setConnectionRequestTimeout
(
60000
)
.
build
();
//headers.put("Accept", "application/x-www-form-urlencoded;charset=UTF-8");
headers
.
put
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
}
private
static
String
ADDRESS_RESOLVE
=
SystemConfig
.
p
.
getProperty
(
"map.ads_resolve"
);
//private static String ADDRESS_RESOLVE = "https://apis.map.qq.com/ws/geocoder/v1/?address=${address}";
private
static
String
DOMAIN_NAME
=
SystemConfig
.
p
.
getProperty
(
"map.domain_name"
);
//private static String DOMAIN_NAME = "apis.map.qq.com";
private
static
String
KEY
=
SystemConfig
.
p
.
getProperty
(
"map.key"
);
//private static String KEY = "OPIBZ-VYIW2-CK7UO-CM4WN-ELY2K-EUFYP";
private
static
String
SECERT_KEY
=
SystemConfig
.
p
.
getProperty
(
"map.secret_key"
);
//private static String SECERT_KEY = "W1je0RfMuDsfxCy73M0b3iEfZRF5cAcU";
private
static
String
getParamsSort
(
String
url
)
{
if
(!
url
.
contains
(
"?"
)
||
!
url
.
contains
(
"="
))
{
return
null
;
}
String
[]
arr
=
null
;
//获取get请求参数部分
String
params
=
url
.
split
(
"\\?"
)[
1
];
//将参数封装进map
if
(!
url
.
contains
(
"&"
))
{
arr
=
new
String
[]{
params
};
}
else
{
arr
=
params
.
split
(
"&"
);
}
TreeMap
<
String
,
String
>
map
=
new
TreeMap
<>();
for
(
String
str:
arr
)
{
if
(
StringUtils
.
isBlank
(
str
)
||
!
url
.
contains
(
"="
))
continue
;
map
.
put
(
str
.
split
(
"="
)[
0
],
str
.
split
(
"="
)[
1
]);
}
StringBuffer
retStr
=
new
StringBuffer
();
for
(
Map
.
Entry
<
String
,
String
>
s
:
map
.
entrySet
())
{
String
key
=
s
.
getKey
();
String
value
=
s
.
getValue
();
if
(
StringUtils
.
isBlank
(
value
))
{
continue
;
}
retStr
.
append
(
key
).
append
(
"="
).
append
(
value
).
append
(
"&"
);
}
String
str
=
retStr
.
substring
(
0
,
retStr
.
length
()-
1
);
return
str
;
}
/**
* GET请求根据url排序
* @return
*/
public
static
CloseableHttpEntity
sendHttpGet
(
String
address
)
{
String
domain
=
ADDRESS_RESOLVE
.
split
(
"\\?"
)[
0
];
String
path
=
domain
.
split
(
DOMAIN_NAME
)[
1
];
String
url
=
ADDRESS_RESOLVE
.
replace
(
"${address}"
,
address
)
+
"&key="
+
KEY
;
//生成签名
String
md5Str
=
HashKit
.
md5
(
path
+
"?"
+
getParamsSort
(
url
)
+
SECERT_KEY
).
toLowerCase
();
url
=
url
+
"&sig="
+
md5Str
;
CloseableHttpClient
httpClient
=
null
;
CloseableHttpResponse
httpResponse
=
null
;
try
{
httpClient
=
HttpClients
.
createDefault
();
HttpGet
httpGet
=
new
HttpGet
(
url
);
httpGet
.
setConfig
(
requestConfig
);
for
(
Map
.
Entry
<
String
,
String
>
entry
:
headers
.
entrySet
())
{
httpGet
.
setHeader
(
entry
.
getKey
(),
entry
.
getValue
());
}
httpResponse
=
httpClient
.
execute
(
httpGet
);
InputStream
inputStream
=
httpResponse
.
getEntity
().
getContent
();
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
inputStream
,
"UTF-8"
));
StringBuilder
strber
=
new
StringBuilder
();
String
line
=
null
;
while
((
line
=
reader
.
readLine
())
!=
null
)
{
strber
.
append
(
line
);
}
reader
.
close
();
inputStream
.
close
();
log
.
info
(
strber
.
toString
());
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
strber
==
null
?
null
:
JSONObject
.
parseObject
(
strber
.
toString
()));
}
catch
(
ClientProtocolException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
httpClient
!=
null
)
{
try
{
httpClient
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
if
(
httpResponse
!=
null
)
{
try
{
httpResponse
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
null
;
}
public
static
void
main
(
String
[]
args
)
{
sendHttpGet
(
"上海市徐汇区漕河泾新兴技术开发区钦州北路1198号智慧园88号楼5层"
);
}
}
aidea-modules/hospital-module/src/main/java/com/cftech/hospital/web/HospitalController.java
0 → 100644
View file @
432c86f0
package
com
.
cftech
.
hospital
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.base.codingrule.utils.CodingruleUtils
;
import
com.cftech.base.org.model.OrgUnit
;
import
com.cftech.base.org.service.OrgUnitService
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.hospital.util.TxMapUtils
;
import
com.cftech.hospital.model.Hospital
;
import
com.cftech.hospital.service.HospitalService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.UserUtils
;
import
com.cftech.waybill.utils.CloseableHttpEntity
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 合作医院信息Controller
* <p>
* 权限字符串说明:
* 查看:public static final String HOSPITAL_VIEW = "qy:hospital:view"
* 查看:public static final String HOSPITAL_EDIT = "qy:hospital:edit"
*
* @author Strive
* @date: 2021-02-02 11:56
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/hospital"
)
public
class
HospitalController
{
public
static
final
String
HOSPITAL_VIEW
=
"qy:hospital:view"
;
public
static
final
String
HOSPITAL_EDIT
=
"qy:hospital:edit"
;
@Autowired
private
HospitalService
hospitalService
;
@Autowired
private
CodingruleUtils
codingruleUtils
;
@Autowired
private
OrgUnitService
orgUnitService
;
//列表页面
@RequiresPermissions
(
value
=
HOSPITAL_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"hospital/hospitallist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
HOSPITAL_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
,
String
pageType
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Hospital
hospital
=
hospitalService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
hospital
);
}
model
.
addAttribute
(
"pageType"
,
pageType
.
equals
(
"View"
)
?
true
:
false
);
//是否查看页面
return
"hospital/hospitalform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
HOSPITAL_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Hospital
hospital
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
JSONObject
adsObj
=
null
;
try
{
//调用百度接口获取经纬度信息
if
(
StringUtils
.
isNoneBlank
(
hospital
.
getAddress
()))
{
CloseableHttpEntity
retObj
=
TxMapUtils
.
sendHttpGet
(
hospital
.
getAddress
());
if
(
retObj
.
getCode
()
==
200
)
{
adsObj
=
retObj
.
getRetObj
();
if
(
adsObj
.
getInteger
(
"status"
)
==
0
)
{
JSONObject
result
=
adsObj
.
getJSONObject
(
"result"
);
JSONObject
location
=
result
.
getJSONObject
(
"location"
);
hospital
.
setLongitude
(
location
.
getString
(
"lng"
));
hospital
.
setLatitude
(
location
.
getString
(
"lat"
));
JSONObject
ad_info
=
result
.
getJSONObject
(
"ad_info"
);
hospital
.
setAdcode
(
ad_info
.
getString
(
"adcode"
));
hospital
.
setReliability
(
result
.
getString
(
"reliability"
));
hospital
.
setLevel
(
result
.
getString
(
"level"
));
JSONObject
address_components
=
result
.
getJSONObject
(
"address_components"
);
hospital
.
setDescription
(
result
.
getString
(
"address_components"
));
hospital
.
setProvince
(
address_components
.
getString
(
"province"
));
hospital
.
setCity
(
address_components
.
getString
(
"city"
));
}
}
}
if
(
StringUtils
.
isNoneBlank
(
hospital
.
getOrgId
()))
{
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.number"
,
hospital
.
getOrgId
());
OrgUnit
orgUnit
=
orgUnitService
.
fetchSearchByConds
(
conds
);
if
(
orgUnit
!=
null
)
{
hospital
.
setOrgId
(
orgUnit
.
getId
().
toString
());
}
}
if
(
hospital
!=
null
&&
hospital
.
getId
()
!=
null
)
{
hospital
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
hospitalService
.
update
(
hospital
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
hospital
.
setNumber
(
codingruleUtils
.
getNumber
(
accountsId
,
Hospital
.
class
.
getName
()));
hospital
.
setDelFlag
(
false
);
hospital
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
hospital
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
hospital
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
hospitalService
.
save
(
hospital
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
HOSPITAL_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Hospital
hospital
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.accounts_id"
,
accountsId
);
if
(
StringUtils
.
isNoneBlank
(
hospital
.
getName
()))
{
conds
.
like
(
"t.name"
,
hospital
.
getName
());
}
Sort
sort
=
new
Sort
(
"t.create_time"
,
OrderType
.
DESC
);
List
<
Hospital
>
list
=
hospitalService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
hospitalService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
HOSPITAL_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
hospitalService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
HOSPITAL_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
Hospital
hospital
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
0
);
conds
.
equal
(
"t.accounts_id"
,
accountId
);
if
(
StringUtils
.
isNoneBlank
(
hospital
.
getName
()))
{
conds
.
like
(
"t.name"
,
hospital
.
getName
());
}
List
<
Hospital
>
list
=
hospitalService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Hospital
.
class
,
response
).
toExcel
(
list
,
"合作医院信息信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
HOSPITAL_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Hospital
.
class
,
response
).
toExcel
(
null
,
"合作医院信息信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
HOSPITAL_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
0
))
&&
StringUtils
.
isNoneBlank
(
rowData
.
get
(
1
)))
{
Hospital
hospital
=
null
;
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.address"
,
rowData
.
get
(
1
));
hospital
=
hospitalService
.
fetchSearchByConds
(
conds
);
if
(
hospital
==
null
)
{
hospital
=
new
Hospital
();
}
hospital
.
setName
(
rowData
.
get
(
0
));
//获取经纬度
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
1
)))
{
CloseableHttpEntity
retObj
=
TxMapUtils
.
sendHttpGet
(
rowData
.
get
(
1
));
if
(
retObj
.
getCode
()
==
200
)
{
JSONObject
adsObj
=
retObj
.
getRetObj
();
if
(
adsObj
.
getInteger
(
"status"
)
==
0
)
{
JSONObject
result
=
adsObj
.
getJSONObject
(
"result"
);
JSONObject
location
=
result
.
getJSONObject
(
"location"
);
hospital
.
setLongitude
(
location
.
getString
(
"lng"
));
hospital
.
setLatitude
(
location
.
getString
(
"lat"
));
JSONObject
ad_info
=
result
.
getJSONObject
(
"ad_info"
);
hospital
.
setAdcode
(
ad_info
.
getString
(
"adcode"
));
hospital
.
setReliability
(
result
.
getString
(
"reliability"
));
hospital
.
setLevel
(
result
.
getString
(
"level"
));
JSONObject
address_components
=
result
.
getJSONObject
(
"address_components"
);
hospital
.
setDescription
(
result
.
getString
(
"address_components"
));
hospital
.
setProvince
(
address_components
.
getString
(
"province"
));
hospital
.
setCity
(
address_components
.
getString
(
"city"
));
}
}
hospital
.
setAddress
(
rowData
.
get
(
1
));
}
hospital
.
setTelephone
(
rowData
.
get
(
2
));
hospital
.
setRemarks
(
rowData
.
get
(
3
));
//组织编码
if
(
StringUtils
.
isNoneBlank
(
rowData
.
get
(
4
)))
{
Conds
orgconds
=
new
Conds
();
orgconds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
orgconds
.
equal
(
"t.number"
,
rowData
.
get
(
4
));
OrgUnit
orgUnit
=
orgUnitService
.
fetchSearchByConds
(
orgconds
);
if
(
orgUnit
!=
null
)
{
hospital
.
setOrgId
(
orgUnit
.
getId
().
toString
());
}
}
hospital
.
setAccountsId
(
accountId
);
hospital
.
setNumber
(
codingruleUtils
.
getNumber
(
accountId
,
Hospital
.
class
.
getName
()));
hospital
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
hospital
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
if
(
hospital
==
null
)
{
hospitalService
.
save
(
hospital
);
}
else
{
hospitalService
.
update
(
hospital
);
}
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
aidea-modules/order-module/src/main/java/com/cftech/order/pay/WechatPayUtils.java
View file @
432c86f0
...
...
@@ -50,7 +50,6 @@ public class WechatPayUtils {
return
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
}
/**
* 生成签名
* @param params
...
...
aidea-modules/pom.xml
View file @
432c86f0
...
...
@@ -44,6 +44,8 @@
<module>
couponrecord-module-web
</module>
<module>
checkresult-module
</module>
<module>
checkresult-module-web
</module>
<module>
hospital-module
</module>
<module>
hospital-module-web
</module>
</modules>
<dependencies>
...
...
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/utils/FqHttpUtils.java
View file @
432c86f0
...
...
@@ -67,6 +67,7 @@ public class FqHttpUtils {
/**
* 服务端发送http get请求
*
* @param url
* @return
*/
...
...
@@ -100,7 +101,7 @@ public class FqHttpUtils {
reader
.
close
();
inputStream
.
close
();
log
.
info
(
strber
.
toString
());
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
strber
==
null
?
null
:
JSONObject
.
parseObject
(
strber
.
toString
()));
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
strber
==
null
?
null
:
JSONObject
.
parseObject
(
strber
.
toString
()));
}
catch
(
ClientProtocolException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
...
...
@@ -151,7 +152,7 @@ public class FqHttpUtils {
if
(
entity
!=
null
)
{
String
result
=
EntityUtils
.
toString
(
entity
,
CHARACTER_CODE_UTF8
);
log
.
info
(
result
);
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
result
==
null
?
null
:
JSONObject
.
parseObject
(
result
));
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
result
==
null
?
null
:
JSONObject
.
parseObject
(
result
));
}
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
...
...
@@ -210,23 +211,23 @@ public class FqHttpUtils {
String
result
=
EntityUtils
.
toString
(
entity
,
CHARACTER_CODE_UTF8
);
System
.
out
.
println
(
result
);
log
.
info
(
result
);
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
result
==
null
?
null
:
JSONObject
.
parseObject
(
result
));
return
new
CloseableHttpEntity
(
httpResponse
.
getStatusLine
().
getStatusCode
(),
result
==
null
?
null
:
JSONObject
.
parseObject
(
result
));
}
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"API HTTP POST UnsupportedEncodingException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
log
.
error
(
"API HTTP POST UnsupportedEncodingException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"API HTTP POST IOException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
log
.
error
(
"API HTTP POST IOException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"API HTTP POST NoSuchAlgorithmException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
log
.
error
(
"API HTTP POST NoSuchAlgorithmException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
}
catch
(
KeyStoreException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"API HTTP POST KeyStoreException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
log
.
error
(
"API HTTP POST KeyStoreException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
}
catch
(
KeyManagementException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"API HTTP POST KeyManagementException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
log
.
error
(
"API HTTP POST KeyManagementException 请求异常 url={"
+
url
+
"}; error = "
+
e
.
getMessage
()
);
}
finally
{
if
(
httpClient
!=
null
)
{
try
{
...
...
@@ -247,7 +248,7 @@ public class FqHttpUtils {
}
public
static
String
generateUUID
()
{
return
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
return
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
);
}
public
static
void
main
(
String
[]
args
)
{
...
...
cftech-common-web/src/main/resources/application.properties
View file @
432c86f0
##JDBC Global Setting
#\u5916\u7F51
jdbc.driver
=
com.mysql.jdbc.Driver
#jdbc.url=jdbc:mysql://58.220.99.124:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
#jdbc.username=root
#jdbc.password=Aidea@2017
#\u5185\u7F51
jdbc.url
=
jdbc:mysql://172.18.10.40:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
jdbc.url
=
jdbc:mysql://58.220.99.124:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
jdbc.username
=
root
jdbc.password
=
Aidea@2017
#\u5185\u7F51
#jdbc.url=jdbc:mysql://172.18.10.40:3306/aidea_wechat?useSSL=false&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
#jdbc.username=root
#jdbc.password=Aidea@2017
##DataSource Global Setting
...
...
cftech-common-web/src/main/resources/common-test.properties
View file @
432c86f0
...
...
@@ -107,3 +107,13 @@ mch.secret_key=4bcd5546d65f4d88bf1ba549436e0e9f
mch.notify_url
=
https://pd.shxrtech.com/aidea/mobile/auth/order/wechatCallback
#\u4ED8\u6B3E\u754C\u9762\u6807\u9898
mch.title
=
\u
8BFA
\u
5EB7
\u5927\u
836F
\u
623F
\u
54A8
\u
8BE2
\u
5E73
\u
53F0
#\u817E\u8BAFMAP\u914D\u7F6E\u4FE1\u606F\u53C2\u6570
#\u63A5\u53E3\u5730\u5740\u57DF\u540D
map.domain_name
=
apis.map.qq.com
#\u5730\u5740\u89E3\u6790\u63A5\u53E3
map.ads_resolve
=
https://apis.map.qq.com/ws/geocoder/v1/?address=${address}
#\u5F00\u53D1\u8005\u5BC6\u94A5
map.key
=
OPIBZ-VYIW2-CK7UO-CM4WN-ELY2K-EUFYP
#\u7B7E\u540D\u5BC6\u94A5
map.secret_key
=
W1je0RfMuDsfxCy73M0b3iEfZRF5cAcU
cftech-common-web/src/main/resources/redis-config.properties
View file @
432c86f0
...
...
@@ -2,9 +2,9 @@
# Redis\uFFFD\uFFFD\uFFFD\u077F\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u012C\uFFFD\uFFFD\u03AA0\uFFFD\uFFFD
spring.redis.database
=
10
# Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05B7
#
spring.redis.host=58.220.99.124
spring.redis.host
=
58.220.99.124
# \u5185\u7F51Reids
spring.redis.host
=
172.18.10.44
#
spring.redis.host=172.18.10.44
# Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u04F6\u02FF\uFFFD
spring.redis.port
=
6379
# Redis\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uB8E8\u012C\uFFFD\uFFFD\u03AA\uFFFD\u0563\uFFFD
...
...
portal-web/pom.xml
View file @
432c86f0
...
...
@@ -340,6 +340,12 @@
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
hospital-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
</dependencies>
<build>
<finalName>
portal-web
</finalName>
...
...
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