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
366b16dd
Commit
366b16dd
authored
Oct 10, 2020
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aidea product update by Strive Date 2020-10-10
parent
bdbd1b23
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
628 deletions
+95
-628
ConsultSheetMapper.xml
...lasses/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
+82
-27
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+0
-49
orgunitlist_bak.html
.../webapp/WEB-INF/views/managerorgunit/orgunitlist_bak.html
+0
-537
OrgUnitController.java
.../main/java/com/cftech/base/org/web/OrgUnitController.java
+13
-15
No files found.
aidea-modules/consult-module/target/classes/com/cftech/consultsheet/dao/ConsultSheetMapper.xml
View file @
366b16dd
...
...
@@ -23,6 +23,13 @@
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"allergy"
property=
"allergy"
/>
<result
column=
"symptom"
property=
"symptom"
/>
<result
column=
"diagnosis"
property=
"diagnosis"
/>
<result
column=
"open_id"
property=
"openId"
></result>
<result
column=
"drugs_id"
property=
"drugsId"
></result>
<result
column=
"member_id"
property=
"memberId"
></result>
<result
column=
"order_id"
property=
"orderId"
></result>
</resultMap>
<sql
id=
"sqlWhere"
>
...
...
@@ -53,29 +60,39 @@
</sql>
<sql
id=
"sqlColumns"
>
id,
consult_id,
user_name,
number_id,
benebit_id,
sex,
iphone,
past_records,
prescription,
doctor_id,
customer_id,
illness,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
a.id,
a.consult_id,
a.user_name,
a.number_id,
a.benebit_id,
a.sex,
a.iphone,
a.past_records,
a.prescription,
a.doctor_id,
a.customer_id,
a.illness,
a.accounts_id,
a.del_flag,
a.STATUS,
a.create_time,
a.update_time,
a.description,
a.create_by,
a.update_by,
a.allergy,
a.symptom,
a.diagnosis,
a.open_id,
a.drugs_id,
a.member_id,
a.order_id,
b.`name` pharmaName,
c.`name` customerName
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.consultsheet.model.ConsultSheet"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_consult_sheet
...
...
@@ -104,19 +121,32 @@
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
#{updateBy, jdbcType=BIGINT},
#{allergy, jdbcType=VARCHAR},
#{updateBy, jdbcType=VARCHAR},
#{diagnosis,jdbcType=BIGINT}
#{doctorName, jdbcType=VARCHAR},
#{customerName,jdbcType=BIGINT},
#{openId,jdbcType=VARCHAR},
#{drugsId,jdbcType=BIGINT},
#{memberId,jdbcType=BIGINT},
#{orderId,jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_consult_sheet t
WHERE t.id=#{id}
FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
WHERE a.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT COUNT(1) FROM t_aidea_consult_sheet
SELECT COUNT(1) FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
<include
refid=
"sqlWhere"
/>
</select>
...
...
@@ -124,7 +154,9 @@
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_consult_sheet
FROM t_aidea_consult_sheet a
LEFT JOIN t_qyuser b ON b.id = a.doctor_id
LEFT JOIN t_qyuser c ON c.id = a.customer_id
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
...
...
@@ -153,7 +185,7 @@
sex = #{sex, jdbcType=BIGINT},
</if>
<if
test=
"iPhone != null"
>
i
_
phone = #{iPhone, jdbcType=VARCHAR},
iphone = #{iPhone, jdbcType=VARCHAR},
</if>
<if
test=
"pastRecords != null"
>
past_records = #{pastRecords, jdbcType=VARCHAR},
...
...
@@ -191,6 +223,27 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
<if
test=
"allergy != null"
>
allergy = #{allergy, jdbcType=VARCHAR},
</if>
<if
test=
"symptom != null"
>
symptom = #{symptom, jdbcType=VARCHAR},
</if>
<if
test=
"diagnosis != null"
>
diagnosis = #{diagnosis, jdbcType=BIGINT},
</if>
<if
test=
"openId != null"
>
open_id = #{openId, jdbcType=VARCHAR},
</if>
<if
test=
"openId != null"
>
drugs_id = #{drugsId, jdbcType=BIGINT},
</if>
<if
test=
"openId != null"
>
member_id = #{memberId, jdbcType=BIGINT},
</if>
<if
test=
"openId != null"
>
order_id = #{orderId, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
...
...
@@ -198,4 +251,6 @@
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_consult_sheet set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
</mapper>
cftech-common-web/src/main/resources/common-test.properties
View file @
366b16dd
...
...
@@ -24,8 +24,6 @@ AIDEA_QY_ACCOUNTS=349
#\u56FE\u7247\u8BBF\u95EE\u5730\u5740
IMAGEURL
=
/aidea/mobile/qybase/showPic?picFileName={PICFILENAME}
IMAGEURL
=
/schaeffler/mobile/qybase/showPic?picFileName={PICFILENAME}
ROOT_ORG_NAME
=
\u
4E1C
\u
660C
\u
96C6
\u
56E2
ROOT_PAPERCATEGORY_NAME
=
\u
95EE
\u5377\u
7C7B
\u
578B
ROOT_QUESTIONSCATEGORY_NAME
=
\u
95EE
\u9898\u
7C7B
\u
522B
ROOT_MATERIALCATEGORY_NAME
=
\u
7D20
\u6750\u
7C7B
\u
522B
...
...
@@ -46,53 +44,6 @@ quartz.isCluster=false
UPDATEDETAILS
=
6zMPHC8i7NIPHBd0iShjR_muuUAemJfxgLTd2fT6ivg
SIGNTEMPLATE
=
xFh_GMxX-u1vkTRqTN7OKbLO_zzXjjkhDTWs3IozRt0
email.host
=
smtp.exmail.qq.com
email.username
=
postmaster@wx-schaeffler.cn
email.password
=
Ali190325
email.from
=
postmaster@wx-schaeffler.cn
email.nickname
=
licensePath
=
license.xml
#docXmlTemplatePath = E:/\u6587\u6863/\u4FE1\u777F/\u820D\u5F17\u52D2/2020/\u54C1\u724C\u7533\u8BF7/\u5F00\u53D1\u6587\u6863/
docXmlTemplatePath
=
/Users/lisw/work/work-document/sfl-template/
#docXmlTemplatePath=/Users/lisw/work/work-document/sfl-template/
#\u0579\uFFFD\uFFFD\u0524\u053C\uFFFD\u0279\uFFFD\u0123\uFFFD\uFFFD\uFFFD\uFFFD\u03E2
showroomTemplateId
=
5DWV1fHynNTJuHXa_mOmNzev-ggb_nxoQAHNfyST6js
#showroomTemplateId =F7DnP-jHkeo1B1TBpkeM_qLhWX2kRf5AOb_myQEQWs4
# \u65B0\u589E\u6A21\u677F\u6D88\u606F
showroomTemplateIdNew
=
5DWV1fHynNTJuHXa_mOmNzev-ggb_nxoQAHNfyST6js
#\uFFFD\uFFFD\uFFFD\uFFFD\u01B7\uFFFD\uFFFD\uFFFD\uFFFD\u0279\uFFFD\u0123\uFFFD\uFFFD\uFFFD\uFFFD\u03E2
applyReserveTemplateId
=
uV5eoMqa5YjKVPdkhVzMryaZvd2B6638Q7-EaNqh6io
#\u0579\uFFFD\uFFFD\u0524\u053C\u0221\uFFFD\uFFFD\u0368\u05AA
cancelApplyReserveTemplateId
=
WXpzgxrsJNC3H0iBizmC0VraQzbtoFsfUfbBKe2OZI4
#\uFFFD\uFFFD\uFFFD\uFFFD\u01B7\uFFFD\uFFFD\uFFFD\uFFFD\u02A7\uFFFD\uFFFD\u0368\u05AA
applicationErrorTemplateId
=
KDk2V0yl-Zbw3Vx4lgPo9IWTQm6dhwqmBvmZBSWliBo
#\uFFFD\uFFFD\uFFFD\uFFFD\u01B7\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u07BD\uFFFD\uFFFD
WORKFLOW.MAXPRICE
=
5000
#\uFFFD\u0271\uFFFD\uFFFD\uFFFD\uFFFD\u0123\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u01B7\uFFFD\uFFFD\uFFFD\uFFFD\u02B9\uFFFD\u00E3\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u02F5\u0133\u0271\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u00F5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u05AE\u04BB\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u01F7\uFFFD\uFD7D\uFFFD\uFFFD\uFFFD\u07B6\uFFFD\uFFFD\uFFFD\uFFFD\uBD7D\uFFFD\u0433\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD
COSTCENTERS
=
0189-1806,0189-1807,0199-2042,0199-2066,0199-3872,0199-3876
STATISTICSCOSTCENTERS
=
0189-1806,0189-1807,0199-3872,0199-3876,0189-1800,0189-1801
#\uFFFD\uFFFD\uFFFD\uFFFD\u01B7pdf\uFFFD\u9D75,\uFFFD\uFFFD\uFFFD\uFFFD\u0531\uFFFD\uFFFD\uFFFD\uFFFD
MANAGEREMAIL
=
starsoy@163.com
#\u4FC3\u9500\u54C1\u7533\u8BF7\u5DE5\u4F5C\u6D41\u9700\u6C42\u63D0\u4EA4\u6210\u529F\u901A\u77E5
commonSubmitSuccessTemplateId
=
QHtD8WYcnIduw8bGQJZjffeaAYl8_YixXOLaQ6hhb4A
#\u4FC3\u9500\u54C1\u7533\u8BF7\u5DE5\u4F5C\u6D41\u8BA2\u5355\u53D7\u7406\u901A\u77E5
orderAcceptanceSuccessTemplateId
=
ucM6LnFgLux3jnoOThkQpNgUZMbmdpC3Cq89rQnpXYA
#\u4FC3\u9500\u54C1\u8BA2\u5355\u53D1\u8D27\u901A\u77E5
orderDeliverGoodsTemplateId
=
TH3I5prFYPC54M14zFJfgN4gvjx8SpJayctIHmzThwg
#\u670D\u52A1\u5B8C\u6210\u901A\u77E5
serverEndTemplateId
=
7L1KIroXNxejxotFTzll-dVLdo1xbmqoiAo7UmDKWcc
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
brandApplyCommTemplateId
=
82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
brandApplyCompletedTemplateId
=
OHNQnY6duGKNsM2o3sDQrWg5UY4dSGCj5aROOMQys2I
brandApplyCanceledTemplateId
=
1JfwQZRqcqLyZGi9WK7LyJUZyp7SnBinDHagjtdg7hI
...
...
qy-modules/qy-orgunit-module-web/src/main/webapp/WEB-INF/views/managerorgunit/orgunitlist_bak.html
deleted
100644 → 0
View file @
bdbd1b23
<!DOCTYPE html>
<html
lang=
"en"
>
<!--<![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"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<link
rel=
"stylesheet"
href=
"plugins/ztree/css/metroStyle/metroStyle.css"
type=
"text/css"
/>
<title></title>
<!-- 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]-->
<!-- END THEME STYLES -->
</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=
"#springUrl('/a/orgunit/useradd')"
><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-md-3"
>
<div
class=
"box"
>
<div
class=
"box-body"
>
<div
class=
"zTreeDemoBackground left"
>
<a
href=
"#springUrl('/a/orgunit/exportExcel')"
class=
"btn btn-primary"
>
导出
</a>
<a
href=
"#"
class=
"btn btn-info btn-sm"
>
导入
</a>
<form
class=
"form-inline"
action=
"#springUrl('/a/orgunit/importExcel')"
method=
"post"
enctype=
"multipart/form-data"
>
<div
class=
"form-group"
>
<input
type=
"file"
name=
"file"
>
</div>
<button
type=
"submit"
class=
"btn btn-danger btn-sm"
>
导入
</button>
</form>
<ul
id=
"tree"
class=
"ztree"
></ul>
</div>
</div>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<div
class=
"col-md-9"
>
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div
class=
"box box-info"
>
<div
class=
"box-header with-border"
>
<h3
class=
"box-title"
>
详情
</h3>
</div>
<!-- /.box-header -->
<div
id=
"detail"
></div>
<script
id=
"template"
type=
"text/template7"
>
<
form
role
=
"form"
id
=
"form"
>
<
input
type
=
"text"
class
=
"form-control"
name
=
"id"
id
=
"id"
style
=
"display: none"
value
=
"{{id}}"
>
<
input
type
=
"text"
class
=
"form-control"
name
=
"parentId"
id
=
"parentId"
style
=
"display: none"
value
=
"{{parentId}}"
>
<
div
class
=
"box-body"
>
<
div
class
=
"form-group"
>
<
label
for
=
"number"
class
=
"col-md-2 control-label"
>
组织编码
<
/label
>
<
input
type
=
"text"
class
=
"form-control required"
minlength
=
"1"
maxlength
=
"30"
required
name
=
"number"
id
=
"number"
value
=
"{{number}}"
placeholder
=
"请输入组织编码"
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
for
=
"orgName"
class
=
"col-md-2 control-label"
>
组织名称
<
/label
>
<
input
type
=
"text"
class
=
"form-control required"
minlength
=
"1"
maxlength
=
"30"
required
name
=
"orgName"
id
=
"orgName"
value
=
"{{orgName}}"
placeholder
=
"请输入组织名称"
>
<
/div
>
<
div
class
=
"form-group form-md-line-input"
>
<
label
>
组织分类
<
/label
>
<
select
id
=
"orgtype"
class
=
"form-control select2"
name
=
"orgtype"
style
=
"width: 100%;"
tabindex
=
"-1"
aria
-
hidden
=
"true"
data
-
value
=
"{{orgtypeId}}"
>
<
/select
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
for
=
"wxorgId"
class
=
"col-md-2 control-label"
>
微信组织
ID
<
/label
>
<
input
type
=
"text"
class
=
"form-control required"
minlength
=
"1"
maxlength
=
"30"
disabled
name
=
"wxorgId"
id
=
"wxorgId"
value
=
"{{wxorgId}}"
>
<
/div
>
<
div
class
=
"checkbox"
>
<
label
>
<
input
type
=
"checkbox"
id
=
"isAdminUnit"
name
=
"isAdminUnit"
data
-
value
=
"{{isAdminUnit}}"
>
行政组织
<
/label
>
<
label
>
<
input
type
=
"checkbox"
id
=
"isSalesUnit"
name
=
"isSalesUnit"
data
-
value
=
"{{isSalesUnit}}"
>
销售组织
<
/label
>
<
/div
>
<
div
class
=
"form-actions"
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-offset-2 col-md-10"
>
<
input
class
=
"btn btn-primary"
onclick
=
"saveForm()"
id
=
"save"
type
=
"submit"
value
=
"保存"
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/form
>
</script>
</div>
<!-- END EXAMPLE TABLE PORTLET-->
</div>
</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 -->
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<!-- END FOOTER -->
<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/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<!-- AdminLTE for demo purposes -->
<script
src=
"dist/js/demo.js"
></script>
<script
src=
"dist/js/template7.js"
></script>
<script
src=
"plugins/ztree/js/jquery.ztree.all.min.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<script
src=
"plugins/bootbox/bootbox.min.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
Cfapp
.
init
();
var
accountId
=
$
!
{
accountId
};
var
searchTemplate
=
$
(
'#template'
).
html
();
var
compiledSearchTemplate
=
Template7
.
compile
(
searchTemplate
);
var
sSource
=
"#springUrl('/a/orgunit/fetchData')"
;
var
sMenSource
=
"#springUrl('/a/orgunit/update')"
;
var
dropStat
=
false
;
var
className
=
"dark"
;
function
beforeDrop
(
treeId
,
treeNodes
,
targetNode
,
moveType
,
isCopy
)
{
if
(
isCopy
!=
null
)
{
//修改节点信息
if
(
targetNode
)
{
if
(
treeNodes
[
0
].
pId
==
targetNode
.
id
)
{
return
false
;
}
else
{
dropStat
=
false
;
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
"#springUrl('/a/orgunit/move?id="
+
treeNodes
[
0
].
id
+
"&parentId="
+
targetNode
.
id
+
"')"
,
"dataType"
:
"json"
,
async
:
false
,
"success"
:
function
(
res
)
{
dropStat
=
true
;
}
});
if
(
dropStat
)
{
location
.
reload
();
return
false
;
}
else
{
Metronic
.
alert
({
type
:
'warning'
,
icon
:
'save'
,
message
:
'移动失败,请重试'
,
closeInSeconds
:
1
,
container
:
""
,
place
:
'prepend'
});
return
false
;
}
}
}
else
{
return
false
;
}
}
return
true
;
}
function
addHoverDom
(
treeId
,
treeNode
)
{
var
sObj
=
$
(
"#"
+
treeNode
.
tId
+
"_span"
);
if
(
treeNode
.
editNameFlag
||
$
(
"#addBtn_"
+
treeNode
.
tId
).
length
>
0
)
return
;
var
addStr
=
"<span class='button add' id='addBtn_"
+
treeNode
.
tId
+
"' title='add node' onfocus='this.blur();'></span>"
;
sObj
.
after
(
addStr
);
var
btn
=
$
(
"#addBtn_"
+
treeNode
.
tId
);
if
(
btn
)
btn
.
bind
(
"click"
,
function
()
{
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
"tree"
);
//ajax 进行增加节点
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
"#springUrl('/a/orgunit/save?parentId="
+
treeNode
.
id
+
"')"
,
"dataType"
:
"json"
,
"success"
:
function
(
res
)
{
zTree
.
addNodes
(
treeNode
,
{
id
:
res
.
aaData
.
id
,
pId
:
treeNode
.
id
,
name
:
"新增组织"
});
}
});
return
false
;
});
}
;
function
showRemoveBtn
(
treeId
,
treeNode
)
{
return
treeNode
.
level
>
0
;
}
var
cn
=
{
OK
:
'确定'
,
CANCEL
:
'取消'
,
CONFIRM
:
'确认'
};
bootbox
.
addLocale
(
"cn"
,
cn
);
bootbox
.
setLocale
(
"cn"
);
function
beforeRemove
(
treeId
,
treeNode
)
{
console
.
log
(
"before remove"
);
className
=
(
className
===
"dark"
?
""
:
"dark"
);
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
"tree"
);
zTree
.
selectNode
(
treeNode
);
if
(
delMenu
(
treeNode
))
{
return
true
;
}
return
false
;
}
function
delMenu
(
treeNode
)
{
bootbox
.
confirm
({
size
:
'large'
,
message
:
"确定要删除组织"
+
treeNode
.
name
+
"吗?"
,
callback
:
function
(
result
)
{
if
(
result
)
{
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
"#springUrl('/a/orgunit/remove?id="
+
treeNode
.
id
+
"')"
,
"dataType"
:
"json"
,
"success"
:
function
(
res
)
{
if
(
res
.
errorCode
==
'0'
)
{
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
"tree"
);
zTree
.
removeNode
(
treeNode
);
$
(
"#detail"
).
html
(
''
);
return
true
;
}
else
{
return
false
;
}
},
});
}
}
});
}
function
zTreeOnClick
(
event
,
treeId
,
treeNode
)
{
var
selectId
=
treeNode
.
id
;
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
"#springUrl('/a/orgunit/getDetail?id="
+
selectId
+
"')"
,
"dataType"
:
"json"
,
"success"
:
fillDetail
});
}
function
dblClickExpand
(
treeId
,
treeNode
)
{
return
treeNode
.
level
>
0
;
}
function
fillOrgTypes
(
data
)
{
if
(
!
data
.
aaData
)
return
;
var
orgTypeObj
=
$
(
'#orgtype'
);
var
selectedItemId
=
orgTypeObj
.
data
(
'value'
);
var
htmlStr
=
''
;
for
(
var
i
=
0
,
j
=
aaData
.
length
;
i
<
j
;
i
++
)
{
var
item
=
aaData
[
i
];
htmlStr
+=
'<option value="'
+
item
.
id
+
'" '
;
if
(
selectedItemId
&&
selectedItemId
!=
''
)
{
if
(
item
.
id
==
selectedItemId
)
{
htmlStr
+=
'selected="selected"'
;
}
}
htmlStr
+=
'>'
+
item
.
name
+
'</option>'
;
}
$
(
".select2"
).
select2
();
}
function
fillDetail
(
data
)
{
if
(
!
data
.
aaData
)
return
;
var
detailObj
=
$
(
'#detail'
);
detailObj
.
html
(
''
);
detailObj
.
append
(
compiledSearchTemplate
(
data
.
aaData
));
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
"#springUrl('/a/orgunit/getOrgTypes?accountId="
+
accountId
+
"')"
,
"dataType"
:
"json"
,
"success"
:
fillOrgTypes
});
detailObj
.
find
(
'input[type=checkbox]'
).
each
(
function
()
{
var
obj
=
$
(
this
);
var
checked
=
obj
.
data
(
'value'
);
if
(
checked
)
{
obj
.
prop
(
'checked'
,
'checked'
);
}
});
// $("#form").validate({
// submitHandler: function (form) {
// // some other code
// // maybe disabling submit button
// // then:
// }
// });
}
function
fnCallback
(
data
)
{
var
zNodes
=
data
.
aaData
;
$
.
fn
.
zTree
.
init
(
$
(
"#tree"
),
setting
,
zNodes
);
var
zTree
=
$
.
fn
.
zTree
.
getZTreeObj
(
"tree"
);
}
function
removeHoverDom
(
treeId
,
treeNode
)
{
}
var
setting
=
{
view
:
{
dblClickExpand
:
dblClickExpand
,
addHoverDom
:
addHoverDom
,
removeHoverDom
:
removeHoverDom
,
selectedMulti
:
false
},
edit
:
{
enable
:
true
,
editNameSelectAll
:
false
,
showRemoveBtn
:
showRemoveBtn
,
showRenameBtn
:
false
},
check
:
{
enable
:
false
},
data
:
{
simpleData
:
{
enable
:
true
}
},
callback
:
{
onClick
:
zTreeOnClick
,
beforeRemove
:
beforeRemove
,
beforeDrop
:
beforeDrop
}
};
jQuery
(
document
).
ready
(
function
()
{
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
sSource
,
"data"
:
{
accountId
:
accountId
},
"dataType"
:
"json"
,
"success"
:
fnCallback
});
});
function
saveForm
()
{
var
id
=
$
(
'#id'
).
val
();
var
parentId
=
$
(
'#parentId'
).
val
();
var
number
=
$
(
"#number"
).
val
();
if
(
!
number
||
number
==
''
)
{
Cfapp
.
alert
({
btntext
:
"确定"
,
message
:
"请输入组织编码"
,
success
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
return
false
;
}
var
orgName
=
$
(
"#orgName"
).
val
();
if
(
!
orgName
||
orgName
==
''
)
{
Cfapp
.
alert
({
btntext
:
"确定"
,
message
:
"请输入组织名称"
,
success
:
function
()
{
$
(
".modal-backdrop"
).
fadeOut
();
}
});
return
false
;
}
var
isAdminUnit
=
$
(
'#isAdminUnit'
).
prop
(
'checked'
);
var
isSalesUnit
=
$
(
'#isSalesUnit'
).
prop
(
'checked'
);
var
formdata
=
{
id
:
id
,
parentId
:
parentId
,
number
:
number
,
orgName
:
orgName
,
accountsId
:
accountId
,
isAdminUnit
:
isAdminUnit
,
isSalesUnit
:
isSalesUnit
};
$
.
ajax
({
"type"
:
"GET"
,
"contentType"
:
"application/json"
,
"url"
:
sMenSource
,
"data"
:
formdata
,
"dataType"
:
"json"
,
"success"
:
function
(
retdata
)
{
if
(
retdata
.
errorNo
==
0
)
{
Cfapp
.
confirm
({
message
:
"修改成功"
,
btnoktext
:
"确定"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
window
.
location
.
reload
();
},
cancel
:
function
()
{
window
.
location
.
reload
();
}
});
}
}
});
}
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
qy-modules/qy-orgunit-module/src/main/java/com/cftech/base/org/web/OrgUnitController.java
View file @
366b16dd
...
...
@@ -61,8 +61,7 @@ public class OrgUnitController {
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_VIEW
)
@RequestMapping
(
value
=
"/list"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
model
.
addAttribute
(
"accountId"
,
qyAccounts
);
return
"managerorgunit/orgunitlist"
;
}
...
...
@@ -70,7 +69,7 @@ public class OrgUnitController {
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_VIEW
)
@RequestMapping
(
value
=
"/form"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
Long
accountsId
=
Long
.
parseLong
(
qyAccounts
);
Sort
sort
=
new
Sort
(
"number"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
...
...
@@ -95,9 +94,8 @@ public class OrgUnitController {
model
.
addAttribute
(
"accountId"
,
orgUnit
.
getAccountsId
());
conds
.
equal
(
"accounts_id"
,
orgUnit
.
getAccountsId
());
}
else
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
conds
.
equal
(
"accounts_id"
,
accountId
);
model
.
addAttribute
(
"accountId"
,
accountsId
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
}
List
<
Orgtype
>
orgtypes
=
orgtypeService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
...
...
@@ -110,7 +108,7 @@ public class OrgUnitController {
@RequestMapping
(
value
=
"/formData"
,
method
=
{
RequestMethod
.
POST
})
@ResponseBody
public
JSONObject
formData
(
OrgUnit
orgUnit
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountsId
=
Long
.
parseLong
(
qyAccounts
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
orgUnit
!=
null
&&
orgUnit
.
getId
()
!=
null
)
{
...
...
@@ -253,7 +251,7 @@ public class OrgUnitController {
@RequestMapping
(
value
=
"/exportExcel"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
Sort
sort
=
new
Sort
(
"parent_id"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
...
...
@@ -277,7 +275,7 @@ public class OrgUnitController {
@RequestMapping
(
value
=
"/importExcel"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
...
...
@@ -350,7 +348,7 @@ public class OrgUnitController {
@RequestMapping
(
value
=
"treeData"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
public
JSONObject
getTreeData
(
HttpServletRequest
request
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
JSONObject
rtnJson
=
new
JSONObject
();
JSONArray
array
=
new
JSONArray
();
Sort
sort
=
new
Sort
(
"parent_id"
,
OrderType
.
ASC
);
...
...
@@ -387,7 +385,7 @@ public class OrgUnitController {
@RequestMapping
(
value
=
"treeDataNoAuth"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
public
JSONObject
treeDataNoAuth
(
HttpServletRequest
request
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
JSONObject
rtnJson
=
new
JSONObject
();
JSONArray
array
=
new
JSONArray
();
Sort
sort
=
new
Sort
(
"parent_id"
,
OrderType
.
ASC
);
...
...
@@ -426,10 +424,10 @@ public class OrgUnitController {
@RequestMapping
(
value
=
"/listDataNoAuth"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
public
JSONObject
listDataNoAuth
(
int
iDisplayStart
,
int
iDisplayLength
,
OrgUnit
orgUnit
,
HttpServletRequest
request
)
{
Long
account
sId
=
UserUtils
.
getmpaccounts
(
request
);
Long
account
Id
=
Long
.
parseLong
(
qyAccounts
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"t.del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"t.accounts_id"
,
account
s
Id
);
conds
.
equal
(
"t.accounts_id"
,
accountId
);
if
(!
StringUtils
.
isEmpty
(
orgUnit
.
getNumber
())){
conds
.
equal
(
"t.number"
,
orgUnit
.
getNumber
());
}
...
...
@@ -452,7 +450,7 @@ public class OrgUnitController {
Conds
myCond
=
new
Conds
();
myCond
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
myCond
.
equal
(
"accounts_id"
,
account
s
Id
);
myCond
.
equal
(
"accounts_id"
,
accountId
);
if
(!
StringUtils
.
isEmpty
(
orgUnit
.
getOrgName
()))
{
myCond
.
like
(
"org_name"
,
orgUnit
.
getOrgName
());
}
...
...
@@ -477,7 +475,7 @@ public class OrgUnitController {
@RequiresPermissions
(
value
=
PermissionSign
.
ORGUNIT_EDIT
)
@ResponseBody
public
JSONObject
sync
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Long
accountId
=
Long
.
parseLong
(
qyAccounts
);
// 同步微信端的部门,下拉到本地为主
JSONObject
retObj
=
qyOrgUtil
.
sync
(
accountId
);
log
.
info
(
"同步结果: {}"
,
retObj
.
toJSONString
());
...
...
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