diff --git a/.gitignore b/.gitignore
index 4d43acc..b82a7cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@
*.jar
*.war
*.ear
+/crm/src/main/webapp/Charts/exporting-server/java/highcharts-export/highcharts-export-convert/target/
+/crm/src/main/webapp/Charts/exporting-server/java/highcharts-export/highcharts-export-web/target/
\ No newline at end of file
diff --git a/README.md b/README.md
index c419565..0800f68 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-tigerp
+fei
======
-Tiger's public repo for the CRM system.
+Fy's public repo for the BaaS system.
Some notes:
@@ -9,7 +9,7 @@ Some notes:
1. You can create your database schema and restore database by executing following command
mysql -ucrm crmdb < src/main/db/dump.sql
-2. If you want to try 'offline' version of this CRM, you can check it out at http://localhost:8080/offline/home.html
+2. If you want to try 'offline' version of the service, you can check it out at http://localhost:8080/offline/home.html
some users/password roles for the testing.
diff --git a/a.txt b/a.txt
deleted file mode 100644
index e18c374..0000000
--- a/a.txt
+++ /dev/null
@@ -1 +0,0 @@
-just for test
\ No newline at end of file
diff --git a/crm/ReportEngine/genReport.bat b/crm/ReportEngine/genReport.bat
new file mode 100644
index 0000000..b9273ea
--- /dev/null
+++ b/crm/ReportEngine/genReport.bat
@@ -0,0 +1,91 @@
+ECHO off
+
+REM org.eclipse.birt.report.engine.impl.ReportRunner Usage:
+REM --mode/-m [ run | render | runrender] the default is runrender
+REM for runrender mode:
+REM we should add it in the end
+REM --format/-f [ HTML \| PDF ]
+REM --output/-o
+REM --htmlType/-t < HTML \| ReportletNoCSS >
+REM --locale /-l
+REM --parameter/-p <"parameterName=parameterValue">
+REM --file/-F
+REM --encoding/-e
+REM
+REM Locale: default is english
+REM parameters in command line will overide parameters in parameter file
+REM parameter name cant include characters such as \ ', '=', ':'
+REM
+REM For RUN mode:
+REM we should add it in the end
+REM --output/-o
+REM --locale /-l
+REM --parameter/-p
+REM --file/-F
+REM
+REM Locale: default is english
+REM parameters in command line will overide parameters in parameter file
+REM parameter name cant include characters such as \ ', '=', ':'
+REM
+REM For RENDER mode:
+REM we should add it in the end
+REM --output/-o
+REM --page/-p
+REM --locale /-l
+REM
+REM Locale: default is english
+IF not "%BIRT_HOME%" == "" GOTO runBirt
+ECHO "Please set BIRT_HOME first."
+GOTO end
+:runBirt
+
+
+SET java.io.tmpdir=%BIRT_HOME%\ReportEngine\tmpdir
+SET org.eclipse.datatools_workspacepath=%java.io.tmpdir%\workspace_dtp
+
+
+IF not exist %java.io.tmpdir% mkdir %java.io.tmpdir%
+IF not exist %org.eclipse.datatools_workspacepath% mkdir %org.eclipse.datatools_workspacepath%
+
+
+REM set the birt class path.
+setlocal enabledelayedexpansion
+set BIRTCLASSPATH=
+for %%i in (%BIRT_HOME%\ReportEngine\lib\*.jar) do set BIRTCLASSPATH=%%i;!BIRTCLASSPATH!
+
+
+REM set command
+SET JAVACMD=java
+set p1=%1
+set p2=%2
+set p3=%3
+set p4=%4
+set p5=%5
+set p6=%6
+set p7=%7
+set p8=%8
+set p9=%9
+shift
+set p10=%9
+shift
+set p11=%9
+shift
+set p12=%9
+shift
+set p13=%9
+shift
+set p14=%9
+shift
+set p15=%9
+shift
+set p16=%9
+shift
+set p17=%9
+shift
+set p18=%9
+shift
+set p19=%9
+
+%JAVACMD% -cp "%BIRTCLASSPATH%" -DBIRT_HOME="%BIRT_HOME%\ReportEngine" org.eclipse.birt.report.engine.api.ReportRunner %p1% %p2% %p3% %p4% %p5% %p6% %p7% %p8% %p9% %p10% %p11% %p12% %p13% %p14% %p15% %p16% %p17% %p18% %p19%
+
+:end
diff --git a/crm/ReportEngine/genReport.sh b/crm/ReportEngine/genReport.sh
new file mode 100644
index 0000000..49530d2
--- /dev/null
+++ b/crm/ReportEngine/genReport.sh
@@ -0,0 +1,53 @@
+################USAGE OF REPORTRUNNER#########################
+# echo "org.eclipse.birt.report.engine.impl.ReportRunner Usage:";
+# echo "--mode/-m [ run | render | runrender] the default is runrender "
+# echo "for runrender mode: "
+# echo "" "we should add it in the end "
+# echo "" "--format/-f [ HTML | PDF ] "
+# echo "" "--output/-o "
+# echo "" "--htmlType/-t < HTML | ReportletNoCSS >"
+# echo "" "--locale /-l"
+# echo "" "--parameter/-p <"parameterName=parameterValue">"
+# echo "" "--file/-F "
+# echo "" "--encoding/-e "
+# echo " "
+# echo "Locale: default is english"
+# echo "parameters in command line will overide parameters in parameter file"
+# echo "parameter name cant include characters such as \ ', '=', ':'"
+# echo " "
+# echo "For RUN mode:"
+# echo "we should add it in the end"
+# echo "" "--output/-o "
+# echo "" "--locale /-l"
+# echo "" "--parameter/-p "
+# echo "" "--file/-F "
+# echo " "
+# echo "Locale: default is english"
+# echo "parameters in command line will overide parameters in parameter file"
+# echo "parameter name cant include characters such as \ ', '=', ':'"
+# echo " "
+# echo "For RENDER mode:"
+# echo "" "we should add it in the end"
+# echo "" "--output/-o "
+# echo "" "--page/-p "
+# echo "" "--locale /-l"
+# echo " "
+# echo "Locale: default is english"
+################END OF USAGE #########################
+if [ "$BIRT_HOME" = "" ];
+
+then
+echo " The BIRT_HOME need be set before BirtRunner can run.";
+else
+
+
+java_io_tmpdir=$BIRT_HOME/ReportEngine/tmpdir
+org_eclipse_datatools_workspacepath=$java_io_tmpdir/workspace_dtp
+mkdir -p $org_eclipse_datatools_workspacepath
+unset BIRTCLASSPATH
+for i in `ls $BIRT_HOME/ReportEngine/lib/*.jar`;do export BIRTCLASSPATH=$i:$BIRTCLASSPATH;done
+
+JAVACMD='java';
+$JAVACMD -Djava.awt.headless=true -cp "$BIRTCLASSPATH" -DBIRT_HOME="$BIRT_HOME/ReportEngine" -Dorg.eclipse.datatools_workspacepath="$org_eclipse_datatools_workspacepath" org.eclipse.birt.report.engine.api.ReportRunner ${1+"$@"}
+
+fi
diff --git a/crm/ReportEngine/samples/AccountAndContact.rptdesign b/crm/ReportEngine/samples/AccountAndContact.rptdesign
new file mode 100644
index 0000000..6542a0d
--- /dev/null
+++ b/crm/ReportEngine/samples/AccountAndContact.rptdesign
@@ -0,0 +1,1473 @@
+
+
+ Eclipse BIRT Designer Version 4.3.1.v201309091055 Build <4.3.1.v20130917-1035>
+ in
+ /templates/blank_report.gif
+ ltr
+ 72
+
+
+
+
+ metadataBidiFormatStr
+ ILYNN
+
+
+ disabledMetadataBidiFormatStr
+
+
+ contentBidiFormatStr
+ ILYNN
+
+
+ disabledContentBidiFormatStr
+
+
+ com.mysql.jdbc.Driver
+ jdbc:mysql://localhost/crmdb
+ crm
+
+
+
+
+
+
+ id
+ measure
+ cid
+ cid
+
+
+ name
+ dimension
+ cname
+ cname
+
+
+ id_3
+ measure
+ aid
+ aid
+
+
+ name_4
+ dimension
+ aname
+ aname
+
+
+ bdm_code
+ dimension
+ BDMCode
+ BDMCode
+
+
+
+
+
+ 1
+ id
+ integer
+
+
+ 2
+ name
+ string
+
+
+ 3
+ id_3
+ integer
+
+
+ 4
+ name_4
+ string
+
+
+ 5
+ bdm_code
+ string
+
+
+
+ Data Source
+
+
+ 1
+ id
+ id
+ integer
+ 4
+
+
+ 2
+ name
+ name
+ string
+ 12
+
+
+ 3
+ id_3
+ id
+ integer
+ 4
+
+
+ 4
+ name_4
+ name
+ string
+ 12
+
+
+ 5
+ bdm_code
+ bdm_code
+ string
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ id
+ 1
+
+ 4
+ 9
+ 0
+ NotNullable
+
+ cid
+
+
+
+ cid
+
+ 9
+
+
+
+
+
+
+ name
+ 2
+
+ 12
+ 255
+ 0
+ NotNullable
+
+ cname
+
+
+
+ cname
+
+ 255
+
+
+
+
+
+
+ id
+ 3
+
+ 4
+ 9
+ 0
+ Nullable
+
+ aid
+
+
+
+ aid
+
+ 9
+
+
+
+
+
+
+ name
+ 4
+
+ 12
+ 255
+ 0
+ Nullable
+
+ aname
+
+
+
+ aname
+
+ 255
+
+
+
+
+
+
+ bdm_code
+ 5
+
+ 12
+ 255
+ 0
+ Nullable
+
+ BDMCode
+
+
+
+ BDMCode
+
+ 255
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ NewTabularHierarchy
+
+
+
+
+ integer
+ id_3
+
+
+
+
+
+
+ NewTabularHierarchy1
+
+
+
+
+ string
+ name_4
+
+
+
+
+
+
+
+
+
+
+ count
+ dataSetRow["name_4"]
+ integer
+
+
+
+
+ Account&Contact
+
+
+
+
+
+
+
+
+
+
+
+
+ html
+ new Date()]]>
+
+
+
+
+
+
+ solid
+ 1px
+ solid
+ 1px
+ solid
+ 1px
+ solid
+ 1px
+ 7.930555555555555in
+ Account&Contact
+
+
+ id
+ cid
+ dataSetRow["id"]
+ integer
+
+
+ name
+ cname
+ dataSetRow["name"]
+ string
+
+
+ id_3
+ aid
+ dataSetRow["id_3"]
+ integer
+
+
+ name_4
+ aname
+ dataSetRow["name_4"]
+ string
+
+
+ bdm_code
+ BDMCode
+ dataSetRow["bdm_code"]
+ string
+
+
+
+ justify
+ 1.5694444444444444in
+
+
+ 1.6111111111111112in
+
+
+ justify
+ 1.5833333333333333in
+
+
+ justify
+ 1.5833333333333333in
+
+
+ justify
+ 1.5833333333333333in
+
+
+
+ none
+ none
+ none
+ none
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ 医生ID
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ justify
+ 医生姓名
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ 医院ID
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ 医院名称
+
+ |
+
+ NewStyle
+ none
+ none
+ solid
+ medium
+ none
+
+ none
+ none
+ none
+ none
+ 医院BDM
+
+ |
+
+
+
+
+ none
+ none
+ none
+ none
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ id
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ name
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ id_3
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ name_4
+
+ |
+
+ NewStyle
+ solid
+ medium
+
+ none
+ none
+ none
+ none
+ bdm_code
+
+ |
+
+
+
+
+
+ solid
+ medium
+ |
+
+ solid
+ medium
+ |
+
+ solid
+ medium
+ |
+
+ solid
+ medium
+ |
+
+ solid
+ medium
+ |
+
+
+
+
+ Data Cube
+
+ 2.6.1
+ Pie Chart
+ Standard
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+ 医院医生数统计
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Categories
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+ 0
+
+ enable.area.alt
+ false
+
+
+
+ 'A','B','C','D','E'
+
+
+ 6,4,12,8,10
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ data["id/aname"]
+
+ Text
+ Sum
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ 0
+
+
+
+
+ 16.0
+ true
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+ 1
+ true
+
+ 10.0
+
+
+ Text
+ Sum
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ data["name/aname"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ Text
+ Sum
+
+
+
+]]>
+ SVG
+ false
+ 130pt
+ 212pt
+
+
+ id/aid
+ dimension["id"]["aid"]
+ integer
+
+
+ name/aname
+ dimension["name"]["aname"]
+ string
+
+
+ id/aid1
+ measure["aid"]
+ integer
+ SUM
+
+
+ id/aname
+ measure["aname"]
+ integer
+ SUM
+
+
+
+
+
diff --git a/crm/ReportEngine/samples/UserAndRole.rptdesign b/crm/ReportEngine/samples/UserAndRole.rptdesign
new file mode 100644
index 0000000..3b50061
--- /dev/null
+++ b/crm/ReportEngine/samples/UserAndRole.rptdesign
@@ -0,0 +1,2604 @@
+
+
+ Eclipse BIRT Designer Version 4.3.1.v201309091055 Build <4.3.1.v20130917-1035>
+ in
+ /templates/blank_report.gif
+ ltr
+ 72
+
+
+
+
+ metadataBidiFormatStr
+ ILYNN
+
+
+ disabledMetadataBidiFormatStr
+
+
+ contentBidiFormatStr
+ ILYNN
+
+
+ disabledContentBidiFormatStr
+
+
+ com.mysql.jdbc.Driver
+ jdbc:mysql://localhost/crmdb
+ crm
+
+
+
+
+
+
+ id
+ measure
+ uid
+ uid
+
+
+ name
+ dimension
+ uname
+ uname
+
+
+ id_3
+ measure
+ cid
+ cid
+
+
+ name_4
+ dimension
+ cname
+ cname
+
+
+ id_5
+ measure
+ rid
+ rid
+
+
+ val
+ dimension
+ rolename
+ rolename
+
+
+
+
+
+
+ 1
+ id
+ integer
+
+
+ 2
+ name
+ string
+
+
+ 3
+ id_3
+ integer
+
+
+ 4
+ name_4
+ string
+
+
+ 5
+ id_5
+ integer
+
+
+ 6
+ val
+ string
+
+
+
+ Data Source
+
+
+ 1
+ id
+ id
+ integer
+ 4
+
+
+ 2
+ name
+ name
+ string
+ 12
+
+
+ 3
+ id_3
+ id
+ integer
+ 4
+
+
+ 4
+ name_4
+ name
+ string
+ 12
+
+
+ 5
+ id_5
+ id
+ integer
+ 4
+
+
+ 6
+ val
+ val
+ string
+ 12
+
+
+ ""]]>
+
+
+ 2.0
+
+
+
+
+
+
+ id
+ 1
+
+ 4
+ 9
+ 0
+ NotNullable
+
+ uid
+
+
+
+ uid
+
+ 9
+
+
+
+
+
+
+ name
+ 2
+
+ 12
+ 255
+ 0
+ NotNullable
+
+ uname
+
+
+
+ uname
+
+ 255
+
+
+
+
+
+
+ id
+ 3
+
+ 4
+ 9
+ 0
+ Nullable
+
+ cid
+
+
+
+ cid
+
+ 9
+
+
+
+
+
+
+ name
+ 4
+
+ 12
+ 255
+ 0
+ Nullable
+
+ cname
+
+
+
+ cname
+
+ 255
+
+
+
+
+
+
+ id
+ 5
+
+ 4
+ 9
+ 0
+ Nullable
+
+ rid
+
+
+
+ rid
+
+ 9
+
+
+
+
+
+
+ val
+ 6
+
+ 12
+ 255
+ 0
+ Nullable
+
+ rolename
+
+
+
+ rolename
+
+ 255
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ NewTabularHierarchy
+
+
+
+
+ integer
+ id_3
+
+
+
+
+
+
+ NewTabularHierarchy1
+
+
+
+
+ string
+ name
+
+
+
+
+
+
+ NewTabularHierarchy2
+
+
+
+
+ string
+ val
+
+
+
+
+
+
+
+
+
+
+ count
+ false
+ dataSetRow["id_5"]
+ integer
+ true
+
+
+
+
+ User&Role
+
+
+
+
+
+
+
+
+
+
+
+ html
+ new Date()]]>
+
+
+
+
+
+
+ left
+ User&Role
+
+
+ id
+ uid
+ dataSetRow["id"]
+ integer
+
+
+ name
+ uname
+ dataSetRow["name"]
+ string
+
+
+ id_3
+ cid
+ dataSetRow["id_3"]
+ integer
+
+
+ name_4
+ cname
+ dataSetRow["name_4"]
+ string
+
+
+ id_5
+ rid
+ dataSetRow["id_5"]
+ integer
+
+
+ val
+ rolename
+ dataSetRow["val"]
+ string
+
+
+
+
+
+
+
+
+
+
+
+ 6
+ 1
+
+ 16pt
+ center
+ 用户--岗位-角色关系表
+
+ |
+
+
+ 12pt
+ bold
+ #996633
+
+
+ 用户ID
+
+ |
+
+
+ 用户名
+
+ |
+
+
+ 岗位ID
+
+ |
+
+
+ 岗位名称
+
+ |
+
+
+ 角色ID
+
+ |
+
+
+ 角色
+
+ |
+
+
+
+
+
+
+ id
+
+ |
+
+
+ name
+
+ |
+
+
+ id_3
+
+ |
+
+
+ name_4
+
+ |
+
+
+ id_5
+
+ |
+
+
+ val
+
+ |
+
+
+
+
+ 0.19444444444444445in
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+ User&Role
+
+
+
+
+
+
+ Data Cube
+
+ 2.6.1
+ Pie Chart
+ Standard
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+ 角色分布情况
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Categories
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+ 0
+
+ enable.area.alt
+ false
+
+
+
+ 'A','B','C','D','E'
+
+
+ 6,4,12,8,10
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ data["Summary Field/rid"]
+
+ false
+ Text
+
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ 0
+
+
+
+
+ 16.0
+ true
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+ 1
+ true
+
+ 10.0
+
+
+ Text
+ Sum
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ data["rname/rolename"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ false
+ Text
+ Sum
+
+
+
+]]>
+ SVG
+ false
+ 130pt
+ 212pt
+
+
+ cid/cid
+ dimension["cid"]["cid"]
+ integer
+
+
+ uname/uname
+ dimension["uname"]["uname"]
+ string
+
+
+ rname/rolename
+ dimension["rname"]["rolename"]
+ string
+
+
+ Summary Field/rid
+ measure["rid"]
+ integer
+ SUM
+
+
+
+ |
+
+
+ Data Cube
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+ 角色分布情况
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Categories
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ A, B, C
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ Text
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ data["Summary Field/rid"]
+
+ false
+ Text
+
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ data["rname/rolename"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ false
+ Text
+ Sum
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ JPG
+ false
+ 130pt
+ 212pt
+
+
+ cid/cid
+ dimension["cid"]["cid"]
+ integer
+
+
+ uname/uname
+ dimension["uname"]["uname"]
+ string
+
+
+ rname/rolename
+ dimension["rname"]["rolename"]
+ string
+
+
+ Summary Field/rid
+ measure["rid"]
+ integer
+ SUM
+
+
+
+ |
+
+
+
+
+
diff --git a/crm/WebContent/META-INF/MANIFEST.MF b/crm/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..254272e
--- /dev/null
+++ b/crm/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/crm/WebContent/WEB-INF/web.xml b/crm/WebContent/WEB-INF/web.xml
new file mode 100644
index 0000000..1aa8cdb
--- /dev/null
+++ b/crm/WebContent/WEB-INF/web.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/crm/nb-configuration.xml b/crm/nb-configuration.xml
new file mode 100644
index 0000000..6f59166
--- /dev/null
+++ b/crm/nb-configuration.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+ JDK_1.7
+
+ /less:/css
+ false
+ /scss:/css
+ false
+
+ bootstrap-datepicker/js/locales
+ Tomcat
+
+
diff --git a/crm/pom.xml b/crm/pom.xml
index 7689f0a..972de33 100644
--- a/crm/pom.xml
+++ b/crm/pom.xml
@@ -27,12 +27,35 @@
UTF-8
+
+ org.eclipse.birt.runtime
+ org.eclipse.birt.runtime
+ 4.3.0
+
+
+ org.apache.poi
+ org.eclipse.birt.runtime
+
+
+
+
+ org.apache.poi
+ poi
+ 3.9
+
+
org.apache.wicket
wicket-core
${wicket.version}
+
+
@@ -105,35 +128,13 @@
mysql
mysql-connector-java
- 5.1.6
+ 5.1.26
commons-beanutils
commons-beanutils
1.8.3
-
- org.hibernate
- hibernate-core
- 4.2.1.Final
-
-
- org.hibernate
- hibernate-entitymanager
- 4.2.1.Final
-
-
- org.hibernate
- hibernate-c3p0
- 4.2.1.Final
- runtime
-
-
- org.hibernate
- hibernate-ehcache
- 4.2.1.Final
- runtime
-
org.apache.commons
commons-lang3
@@ -156,6 +157,22 @@
mail
1.4
+
+ org.eclipse.persistence
+ eclipselink
+ 2.5.1
+
+
+ javax.transaction
+ jta
+ 1.1
+ provided
+
+
+ org.jumpmind.symmetric
+ symmetric-csv
+ 3.5.9
+
@@ -232,6 +249,48 @@
true
+
+
@@ -246,5 +305,11 @@
true
+
+ http://download.eclipse.org/rt/eclipselink/maven.repo/
+ eclipselink
+ default
+ Repository for library EclipseLink (JPA 2.1)
+
diff --git a/crm/src/main/db/dump.sql b/crm/src/main/db/dump.sql
index d684112..a2ded82 100644
--- a/crm/src/main/db/dump.sql
+++ b/crm/src/main/db/dump.sql
@@ -1,8 +1,8 @@
--- MySQL dump 10.13 Distrib 5.6.14, for Win64 (x86_64)
+-- MySQL dump 10.13 Distrib 5.5.30, for osx10.6 (i386)
--
-- Host: localhost Database: crmdb
-- ------------------------------------------------------
--- Server version 5.6.14-log
+-- Server version 5.5.30
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -26,8 +26,7 @@ CREATE TABLE `account` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`bdm_code` varchar(255) DEFAULT NULL,
- `administrativ_level` varchar(255) DEFAULT NULL,
- `grade` varchar(255) DEFAULT NULL,
+ `administrativ_level` mediumint(9) DEFAULT NULL,
`hospital_type` mediumint(9) DEFAULT NULL,
`local_or_army` mediumint(9) DEFAULT NULL,
`comprehensive_or_specialized` mediumint(9) DEFAULT NULL,
@@ -46,13 +45,13 @@ CREATE TABLE `account` (
`num_of_surgery_room` mediumint(9) DEFAULT NULL,
`num_of_using_opiates_medicine` mediumint(9) DEFAULT NULL,
`num_of_using_opiates_injection` mediumint(9) DEFAULT NULL,
- `date_of_establish` datetime DEFAULT NULL,
+ `date_of_establish` varchar(128) DEFAULT NULL,
`registered_capital` mediumint(9) DEFAULT NULL,
`tel` varchar(255) DEFAULT NULL,
`fax` varchar(255) DEFAULT NULL,
`market_classification` mediumint(9) DEFAULT NULL,
- `province` varchar(255) DEFAULT NULL,
- `city` varchar(255) DEFAULT NULL,
+ `province` int(11) DEFAULT NULL,
+ `city` int(11) DEFAULT NULL,
`districts` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`owner` varchar(255) DEFAULT NULL,
@@ -60,8 +59,9 @@ CREATE TABLE `account` (
`modifier` varchar(255) DEFAULT NULL,
`modify_datetime` datetime DEFAULT NULL,
`responsible_person` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `account_ix_01` (`bdm_code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -70,7 +70,6 @@ CREATE TABLE `account` (
LOCK TABLES `account` WRITE;
/*!40000 ALTER TABLE `account` DISABLE KEYS */;
-INSERT INTO `account` VALUES (5,'bh',NULL,'1','1',1,1,1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,'李99','2013-10-14 21:23:00','李99','2013-10-14 21:23:00',NULL),(6,'account1','','C','',0,0,0,0,0,'307',0,997,490,486,700,0,0,0,0,0,0,0,'0000-00-00 00:00:00',453,'','',0,'ĵ','','',NULL,NULL,NULL,NULL,NULL,NULL),(7,'account2','','C','',0,0,0,0,0,'543',0,1,837,789,1,0,0,0,0,0,0,1996,'0000-00-00 00:00:00',2253431,'','',0,'','','',NULL,NULL,NULL,NULL,NULL,NULL),(8,'account3','','C','',0,0,0,0,0,'397',0,910,510,471,926,0,0,0,0,0,0,2002,'0000-00-00 00:00:00',633,'','',0,'','','',NULL,NULL,NULL,NULL,NULL,NULL),(9,'account4','','B','',0,0,0,0,0,'',0,0,0,0,0,0,0,0,0,0,0,0,'0000-00-00 00:00:00',0,'','',0,'̩','̩ɽ','̩',NULL,NULL,NULL,NULL,NULL,NULL),(10,'account5','','C','',0,0,0,0,0,'280',0,796,538,460,601,0,0,0,0,0,0,1951,'0000-00-00 00:00:00',532,'','һ',0,'','','',NULL,NULL,NULL,NULL,NULL,NULL),(11,'account1','123213','1','1',1,1,1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,'李99','2013-10-17 11:12:00','李99','2013-10-17 11:12:00',NULL),(12,'北京宣武医院','account1','1','1',1,1,1,1,1,'炫舞',321,12,200,123,213,213,123,23,12313,212,321,12,NULL,10000,'12345678912','12133213213',1,'北京','北京','宣武区','长椿街120号','李99','2013-10-17 11:13:00','李99','2013-10-17 11:13:00',NULL),(13,'北京宣武医院','account1','1','1',1,1,1,1,1,'炫舞',321,123,123,123,123,432,123,123,1233,233,31,12,'2013-10-01 00:00:00',10000,'12345678912','12133213213',1,'北京','北京','宣武区','长椿街120号','李99','2013-10-17 14:02:00','李99','2013-10-17 14:02:00',NULL),(14,'fff',NULL,'1','1',1,1,1,1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,'李99','2013-10-17 15:09:00','李99','2013-10-17 15:09:00',NULL);
/*!40000 ALTER TABLE `account` ENABLE KEYS */;
UNLOCK TABLES;
@@ -94,7 +93,7 @@ CREATE TABLE `account_administrativ_level_pl` (
LOCK TABLES `account_administrativ_level_pl` WRITE;
/*!40000 ALTER TABLE `account_administrativ_level_pl` DISABLE KEYS */;
-INSERT INTO `account_administrativ_level_pl` VALUES (1,'一级'),(2,'一级甲等'),(3,'一级乙等'),(4,'一级丙等'),(5,'二级'),(6,'二级甲等'),(7,'二级乙等'),(8,'二级丙等'),(9,'三级'),(10,'三级甲等'),(11,'三级乙等'),(12,'三级丙等'),(13,'未评级未评等');
+INSERT INTO `account_administrativ_level_pl` VALUES (1,'一级'),(5,'二级'),(9,'三级'),(13,'未评级');
/*!40000 ALTER TABLE `account_administrativ_level_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -122,30 +121,6 @@ INSERT INTO `account_comprehensive_or_specialized_pl` VALUES (1,'综合医院'),
/*!40000 ALTER TABLE `account_comprehensive_or_specialized_pl` ENABLE KEYS */;
UNLOCK TABLES;
---
--- Table structure for table `account_grade_pl`
---
-
-DROP TABLE IF EXISTS `account_grade_pl`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_grade_pl` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_grade_pl`
---
-
-LOCK TABLES `account_grade_pl` WRITE;
-/*!40000 ALTER TABLE `account_grade_pl` DISABLE KEYS */;
-INSERT INTO `account_grade_pl` VALUES (1,'A'),(2,'B'),(3,'C'),(4,'D');
-/*!40000 ALTER TABLE `account_grade_pl` ENABLE KEYS */;
-UNLOCK TABLES;
-
--
-- Table structure for table `account_local_or_army_pl`
--
@@ -218,150 +193,6 @@ INSERT INTO `account_medicaltype_pl` VALUES (1,'麻药目标医院'),(2,'慢痛
/*!40000 ALTER TABLE `account_medicaltype_pl` ENABLE KEYS */;
UNLOCK TABLES;
---
--- Table structure for table `account_pl1`
---
-
-DROP TABLE IF EXISTS `account_pl1`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_pl1` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_pl1`
---
-
-LOCK TABLES `account_pl1` WRITE;
-/*!40000 ALTER TABLE `account_pl1` DISABLE KEYS */;
-INSERT INTO `account_pl1` VALUES (1,'有效'),(2,'无效'),(3,'终止'),(4,'候选');
-/*!40000 ALTER TABLE `account_pl1` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `account_pl2`
---
-
-DROP TABLE IF EXISTS `account_pl2`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_pl2` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_pl2`
---
-
-LOCK TABLES `account_pl2` WRITE;
-/*!40000 ALTER TABLE `account_pl2` DISABLE KEYS */;
-INSERT INTO `account_pl2` VALUES (1,'A'),(2,'B'),(3,'C'),(4,'D');
-/*!40000 ALTER TABLE `account_pl2` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `account_pl3`
---
-
-DROP TABLE IF EXISTS `account_pl3`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_pl3` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_pl3`
---
-
-LOCK TABLES `account_pl3` WRITE;
-/*!40000 ALTER TABLE `account_pl3` DISABLE KEYS */;
-INSERT INTO `account_pl3` VALUES (1,'是'),(2,'否');
-/*!40000 ALTER TABLE `account_pl3` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `account_pl4`
---
-
-DROP TABLE IF EXISTS `account_pl4`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_pl4` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_pl4`
---
-
-LOCK TABLES `account_pl4` WRITE;
-/*!40000 ALTER TABLE `account_pl4` DISABLE KEYS */;
-INSERT INTO `account_pl4` VALUES (1,'一级城市'),(2,'二级城市'),(3,'战略城市');
-/*!40000 ALTER TABLE `account_pl4` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `account_pl5`
---
-
-DROP TABLE IF EXISTS `account_pl5`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_pl5` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_pl5`
---
-
-LOCK TABLES `account_pl5` WRITE;
-/*!40000 ALTER TABLE `account_pl5` DISABLE KEYS */;
-INSERT INTO `account_pl5` VALUES (1,'北中国'),(2,'南中国'),(3,'东中国');
-/*!40000 ALTER TABLE `account_pl5` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `account_pl6`
---
-
-DROP TABLE IF EXISTS `account_pl6`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `account_pl6` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `account_pl6`
---
-
-LOCK TABLES `account_pl6` WRITE;
-/*!40000 ALTER TABLE `account_pl6` DISABLE KEYS */;
-INSERT INTO `account_pl6` VALUES (1,'麻药目标医院'),(2,'慢痛目标医院'),(3,'其他');
-/*!40000 ALTER TABLE `account_pl6` ENABLE KEYS */;
-UNLOCK TABLES;
-
--
-- Table structure for table `account_point_pl`
--
@@ -445,9 +276,16 @@ CREATE TABLE `accountcrmuser` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`accountId` mediumint(9) NOT NULL,
`crmuserId` mediumint(9) NOT NULL,
+ `externalId` varchar(45) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
- UNIQUE KEY `accountId` (`accountId`,`crmuserId`)
-) ENGINE=InnoDB AUTO_INCREMENT=2114 DEFAULT CHARSET=utf8;
+ UNIQUE KEY `accountId` (`accountId`,`crmuserId`),
+ KEY `account_crmuser_cons2` (`crmuserId`),
+ CONSTRAINT `account_crmuser_cons` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `account_crmuser_cons2` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -456,7 +294,6 @@ CREATE TABLE `accountcrmuser` (
LOCK TABLES `accountcrmuser` WRITE;
/*!40000 ALTER TABLE `accountcrmuser` DISABLE KEYS */;
-INSERT INTO `accountcrmuser` VALUES (2014,5,20),(2109,5,99),(2016,6,20),(2017,7,20),(2018,8,20),(2019,9,20),(2020,10,20),(2021,11,20),(2110,11,99),(2022,12,20),(2111,12,99),(2023,13,20),(2112,13,99),(2024,14,20),(2113,14,99),(2025,15,20),(2026,16,20),(2027,17,20),(2028,18,20),(2029,19,20),(2030,20,20),(2031,21,20),(2032,22,20),(2033,23,20),(2034,24,20),(2035,25,20),(2036,26,20),(2037,27,20),(2038,28,20),(2039,29,20),(2040,30,20),(2041,31,20),(2042,32,20),(2043,33,20),(2044,34,20),(2045,35,20),(2046,36,20),(2047,37,20),(2048,38,20),(2049,39,20),(2050,40,20),(2051,41,20),(2052,42,20),(2053,43,20),(2054,44,20),(2055,45,20),(2056,46,20),(2057,47,20),(2058,48,20),(2059,49,20),(2060,50,20),(2061,51,20),(2062,52,20),(2063,53,20),(2064,54,20),(2065,55,20),(2066,56,20),(2067,57,20),(2068,58,20),(2069,59,20),(2070,60,20),(2071,61,20),(2072,62,20),(2073,63,20),(2074,64,20),(2075,65,20),(2076,66,20),(2077,67,20),(2078,68,20),(2079,69,20),(2080,70,20),(2081,71,20),(2082,72,20),(2083,73,20),(2084,74,20),(2085,75,20),(2086,76,20),(2087,77,20),(2088,78,20),(2089,79,20),(2090,80,20),(2091,81,20),(2092,82,20),(2093,83,20),(2094,84,20),(2095,85,20),(2096,86,20),(2097,87,20),(2098,88,20),(2099,89,20),(2100,90,20),(2101,91,20),(2102,92,20),(2103,93,20),(2104,94,20),(2105,95,20),(2106,96,20),(2107,97,20),(2108,98,20);
/*!40000 ALTER TABLE `accountcrmuser` ENABLE KEYS */;
UNLOCK TABLES;
@@ -478,6 +315,7 @@ CREATE TABLE `activity` (
`participants` varchar(512) DEFAULT NULL,
`activity_type` mediumint(9) DEFAULT NULL,
`contactId` mediumint(9) DEFAULT NULL,
+ `coacheeId` int(32) DEFAULT NULL,
`status` mediumint(9) DEFAULT NULL,
`visiting_purpose` mediumint(9) DEFAULT NULL,
`feature_product` mediumint(9) DEFAULT NULL,
@@ -487,7 +325,7 @@ CREATE TABLE `activity` (
`modifier` varchar(255) DEFAULT NULL,
`modify_datetime` datetime DEFAULT NULL,
`responsible_person` varchar(255) DEFAULT NULL,
- `coach` varchar(255) DEFAULT NULL,
+ `coach` int(32) DEFAULT NULL,
`location` varchar(255) DEFAULT NULL,
`total_score` mediumint(9) DEFAULT NULL,
`planing` mediumint(9) DEFAULT NULL,
@@ -496,7 +334,17 @@ CREATE TABLE `activity` (
`deliverable` mediumint(9) DEFAULT NULL,
`objection_handing` mediumint(9) DEFAULT NULL,
`summary` mediumint(9) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
+ `whetherCoach` mediumint(9) DEFAULT NULL,
+ `coachTime` mediumint(9) DEFAULT NULL,
+ `accountId` mediumint(9) DEFAULT NULL,
+ `department` mediumint(9) DEFAULT NULL,
+ `whether_coach` varchar(255) DEFAULT NULL,
+ `activity_daypart` mediumint(9) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ KEY `crmuserId_activity_cons` (`crmuserId`),
+ KEY `contactId_activity_cons` (`contactId`),
+ CONSTRAINT `contactId_activity_cons` FOREIGN KEY (`contactId`) REFERENCES `contact` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `crmuserId_activity_cons` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -533,6 +381,71 @@ INSERT INTO `activity_activity_types_pl` VALUES (1,'专业化拜访'),(2,'事务
/*!40000 ALTER TABLE `activity_activity_types_pl` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Temporary table structure for view `activity_alert`
+--
+
+DROP TABLE IF EXISTS `activity_alert`;
+/*!50001 DROP VIEW IF EXISTS `activity_alert`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `activity_alert` (
+ `id` tinyint NOT NULL,
+ `time` tinyint NOT NULL,
+ `title` tinyint NOT NULL,
+ `name` tinyint NOT NULL,
+ `times` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Table structure for table `activity_coachtime_pl`
+--
+
+DROP TABLE IF EXISTS `activity_coachtime_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `activity_coachtime_pl` (
+ `id` int(11) NOT NULL,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `activity_coachtime_pl`
+--
+
+LOCK TABLES `activity_coachtime_pl` WRITE;
+/*!40000 ALTER TABLE `activity_coachtime_pl` DISABLE KEYS */;
+INSERT INTO `activity_coachtime_pl` VALUES (1,'无'),(2,'半天'),(3,'全天');
+/*!40000 ALTER TABLE `activity_coachtime_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `activity_daypart_pl`
+--
+
+DROP TABLE IF EXISTS `activity_daypart_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `activity_daypart_pl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `activity_daypart_pl`
+--
+
+LOCK TABLES `activity_daypart_pl` WRITE;
+/*!40000 ALTER TABLE `activity_daypart_pl` DISABLE KEYS */;
+INSERT INTO `activity_daypart_pl` VALUES (1,'上午'),(2,'下午');
+/*!40000 ALTER TABLE `activity_daypart_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
--
-- Table structure for table `activity_event_type_pl`
--
@@ -544,7 +457,7 @@ CREATE TABLE `activity_event_type_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -553,7 +466,7 @@ CREATE TABLE `activity_event_type_pl` (
LOCK TABLES `activity_event_type_pl` WRITE;
/*!40000 ALTER TABLE `activity_event_type_pl` DISABLE KEYS */;
-INSERT INTO `activity_event_type_pl` VALUES (1,'拜访'),(2,'辅导');
+INSERT INTO `activity_event_type_pl` VALUES (1,'拜访'),(2,'拜访辅导'),(3,'科室会辅导');
/*!40000 ALTER TABLE `activity_event_type_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -581,6 +494,78 @@ INSERT INTO `activity_feature_product_pl` VALUES (1,'美施康定'),(2,'奥施
/*!40000 ALTER TABLE `activity_feature_product_pl` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Table structure for table `activity_score3_pl`
+--
+
+DROP TABLE IF EXISTS `activity_score3_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `activity_score3_pl` (
+ `id` int(11) NOT NULL,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `activity_score3_pl`
+--
+
+LOCK TABLES `activity_score3_pl` WRITE;
+/*!40000 ALTER TABLE `activity_score3_pl` DISABLE KEYS */;
+INSERT INTO `activity_score3_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10');
+/*!40000 ALTER TABLE `activity_score3_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `activity_score4_pl`
+--
+
+DROP TABLE IF EXISTS `activity_score4_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `activity_score4_pl` (
+ `id` int(11) NOT NULL,
+ `val` varchar(25) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `activity_score4_pl`
+--
+
+LOCK TABLES `activity_score4_pl` WRITE;
+/*!40000 ALTER TABLE `activity_score4_pl` DISABLE KEYS */;
+INSERT INTO `activity_score4_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15'),(16,'16'),(17,'17'),(18,'18'),(19,'19'),(20,'20'),(21,'21'),(22,'22'),(23,'23'),(24,'24'),(25,'25');
+/*!40000 ALTER TABLE `activity_score4_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `activity_score5_pl`
+--
+
+DROP TABLE IF EXISTS `activity_score5_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `activity_score5_pl` (
+ `id` int(11) NOT NULL,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `activity_score5_pl`
+--
+
+LOCK TABLES `activity_score5_pl` WRITE;
+/*!40000 ALTER TABLE `activity_score5_pl` DISABLE KEYS */;
+INSERT INTO `activity_score5_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15'),(16,'16'),(17,'17'),(18,'18'),(19,'19'),(20,'20'),(21,'21'),(22,'22'),(23,'23'),(24,'24'),(25,'25'),(26,'26'),(27,'27'),(28,'28'),(29,'29'),(30,'30'),(31,'31'),(32,'32'),(33,'33'),(34,'34'),(35,'35'),(36,'36'),(37,'37'),(38,'38'),(39,'39'),(40,'40'),(41,'41'),(42,'42'),(43,'43'),(44,'44'),(45,'45'),(46,'46'),(47,'47'),(48,'48'),(49,'49'),(50,'50');
+/*!40000 ALTER TABLE `activity_score5_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
--
-- Table structure for table `activity_status`
--
@@ -625,7 +610,7 @@ CREATE TABLE `activity_status_pl` (
LOCK TABLES `activity_status_pl` WRITE;
/*!40000 ALTER TABLE `activity_status_pl` DISABLE KEYS */;
-INSERT INTO `activity_status_pl` VALUES (1,'计划'),(2,'完成'),(3,'取消');
+INSERT INTO `activity_status_pl` VALUES (1,'计划'),(2,'完成'),(3,'未执行');
/*!40000 ALTER TABLE `activity_status_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -664,6 +649,7 @@ CREATE TABLE `activity_visiting_purpose_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
`activity_type` mediumint(9) DEFAULT NULL,
+ `parentId` mediumint(9) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -674,10 +660,34 @@ CREATE TABLE `activity_visiting_purpose_pl` (
LOCK TABLES `activity_visiting_purpose_pl` WRITE;
/*!40000 ALTER TABLE `activity_visiting_purpose_pl` DISABLE KEYS */;
-INSERT INTO `activity_visiting_purpose_pl` VALUES (1,'传递产品知识',1),(2,'处方观念沟通',1),(3,'病例沟通',1),(4,'会议安排',2),(5,'会议跟进',2),(6,'交接工作',2),(7,'了解竞争',2);
+INSERT INTO `activity_visiting_purpose_pl` VALUES (1,'传递产品知识',1,1),(2,'处方观念沟通',1,1),(3,'病例沟通',1,1),(4,'会议安排',2,2),(5,'会议跟进',2,2),(6,'交接工作',2,2),(7,'了解竞争',2,2);
/*!40000 ALTER TABLE `activity_visiting_purpose_pl` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Table structure for table `activity_whethercoach_pl`
+--
+
+DROP TABLE IF EXISTS `activity_whethercoach_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `activity_whethercoach_pl` (
+ `id` mediumint(9) NOT NULL,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `activity_whethercoach_pl`
+--
+
+LOCK TABLES `activity_whethercoach_pl` WRITE;
+/*!40000 ALTER TABLE `activity_whethercoach_pl` DISABLE KEYS */;
+INSERT INTO `activity_whethercoach_pl` VALUES (1,'协访半天'),(2,'协访一天');
+/*!40000 ALTER TABLE `activity_whethercoach_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
--
-- Table structure for table `activitycrmuser`
--
@@ -690,8 +700,11 @@ CREATE TABLE `activitycrmuser` (
`activityId` mediumint(9) NOT NULL,
`crmuserId` mediumint(9) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
- UNIQUE KEY `activityId` (`activityId`,`crmuserId`)
-) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
+ UNIQUE KEY `activityId` (`activityId`,`crmuserId`),
+ KEY `crm_activity_cons` (`crmuserId`),
+ CONSTRAINT `crm_activity_cons` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `crm_activity_cons2` FOREIGN KEY (`activityId`) REFERENCES `activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -700,88 +713,170 @@ CREATE TABLE `activitycrmuser` (
LOCK TABLES `activitycrmuser` WRITE;
/*!40000 ALTER TABLE `activitycrmuser` DISABLE KEYS */;
-INSERT INTO `activitycrmuser` VALUES (18,3,20),(19,3,21),(20,4,21),(21,5,99),(22,6,99),(23,7,99),(24,8,99),(25,9,99),(26,10,20),(27,11,20),(28,12,20),(29,13,99);
/*!40000 ALTER TABLE `activitycrmuser` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `appinfo`
+-- Table structure for table `alert`
--
-DROP TABLE IF EXISTS `appinfo`;
+DROP TABLE IF EXISTS `alert`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `appinfo` (
+CREATE TABLE `alert` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
+ `name` varchar(255) NOT NULL,
+ `publishDate` bigint(20) DEFAULT NULL,
+ `expired` bigint(20) DEFAULT NULL,
+ `priority` mediumint(9) DEFAULT NULL,
+ `towhom` mediumint(9) DEFAULT NULL,
+ `description` longtext,
+ `owner` varchar(255) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `appinfo`
+-- Dumping data for table `alert`
--
-LOCK TABLES `appinfo` WRITE;
-/*!40000 ALTER TABLE `appinfo` DISABLE KEYS */;
-INSERT INTO `appinfo` VALUES (1,'爱奇艺'),(2,'影视圈'),(3,'多米音乐'),(4,'百度地图'),(5,'新浪微博'),(6,'三星学习'),(7,'印象笔记'),(8,'愤怒的小鸟'),(9,'疯狂飙车'),(10,'股票专家'),(11,'名片全能王'),(12,'携程旅游');
-/*!40000 ALTER TABLE `appinfo` ENABLE KEYS */;
+LOCK TABLES `alert` WRITE;
+/*!40000 ALTER TABLE `alert` DISABLE KEYS */;
+/*!40000 ALTER TABLE `alert` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `boolean_pl`
+-- Table structure for table `alert_priority_pl`
--
-DROP TABLE IF EXISTS `boolean_pl`;
+DROP TABLE IF EXISTS `alert_priority_pl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `boolean_pl` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+CREATE TABLE `alert_priority_pl` (
+ `id` mediumint(9) NOT NULL,
`val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `boolean_pl`
+-- Dumping data for table `alert_priority_pl`
--
-LOCK TABLES `boolean_pl` WRITE;
-/*!40000 ALTER TABLE `boolean_pl` DISABLE KEYS */;
-INSERT INTO `boolean_pl` VALUES (1,'是'),(2,'否');
-/*!40000 ALTER TABLE `boolean_pl` ENABLE KEYS */;
+LOCK TABLES `alert_priority_pl` WRITE;
+/*!40000 ALTER TABLE `alert_priority_pl` DISABLE KEYS */;
+INSERT INTO `alert_priority_pl` VALUES (1,'高级'),(2,'中级'),(3,'低级');
+/*!40000 ALTER TABLE `alert_priority_pl` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `city`
+-- Table structure for table `alert_publicobject_pl`
--
-DROP TABLE IF EXISTS `city`;
+DROP TABLE IF EXISTS `alert_publicobject_pl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `city` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL,
- `provinceId` varchar(255) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
+CREATE TABLE `alert_publicobject_pl` (
+ `id` mediumint(9) NOT NULL,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `city`
+-- Dumping data for table `alert_publicobject_pl`
--
-LOCK TABLES `city` WRITE;
-/*!40000 ALTER TABLE `city` DISABLE KEYS */;
-INSERT INTO `city` VALUES (1,'牡丹江','1'),(2,'济宁','2'),(3,'日照','2'),(4,'泰安','2'),(5,'青岛','2');
-/*!40000 ALTER TABLE `city` ENABLE KEYS */;
+LOCK TABLES `alert_publicobject_pl` WRITE;
+/*!40000 ALTER TABLE `alert_publicobject_pl` DISABLE KEYS */;
+INSERT INTO `alert_publicobject_pl` VALUES (1,'管理员'),(2,'主管'),(3,'代表');
+/*!40000 ALTER TABLE `alert_publicobject_pl` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `com_visiting_purpose_pl`
+-- Table structure for table `appinfo`
--
-DROP TABLE IF EXISTS `com_visiting_purpose_pl`;
+DROP TABLE IF EXISTS `appinfo`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `appinfo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `appinfo`
+--
+
+LOCK TABLES `appinfo` WRITE;
+/*!40000 ALTER TABLE `appinfo` DISABLE KEYS */;
+INSERT INTO `appinfo` VALUES (1,'爱奇艺'),(2,'影视圈'),(3,'多米音乐'),(4,'百度地图'),(5,'新浪微博'),(6,'三星学习'),(7,'印象笔记'),(8,'愤怒的小鸟'),(9,'疯狂飙车'),(10,'股票专家'),(11,'名片全能王'),(12,'携程旅游');
+/*!40000 ALTER TABLE `appinfo` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `boolean_pl`
+--
+
+DROP TABLE IF EXISTS `boolean_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `boolean_pl` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `boolean_pl`
+--
+
+LOCK TABLES `boolean_pl` WRITE;
+/*!40000 ALTER TABLE `boolean_pl` DISABLE KEYS */;
+INSERT INTO `boolean_pl` VALUES (1,'是'),(2,'否');
+/*!40000 ALTER TABLE `boolean_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `city`
+--
+
+DROP TABLE IF EXISTS `city`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `city` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ `parentId` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `city_parentid_cons` (`parentId`),
+ CONSTRAINT `city_parentid_cons` FOREIGN KEY (`parentId`) REFERENCES `province` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=344 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `city`
+--
+
+LOCK TABLES `city` WRITE;
+/*!40000 ALTER TABLE `city` DISABLE KEYS */;
+INSERT INTO `city` VALUES (1,'北京','110100',1),(2,'石家庄','130100',3),(3,'唐山','130200',3),(4,'秦皇岛','130300',3),(5,'邯郸','130400',3),(6,'邢台','130500',3),(7,'保定','130600',3),(8,'张家口','130700',3),(9,'承德','130800',3),(10,'沧州','130900',3),(11,'廊坊','131000',3),(12,'衡水','131100',3),(13,'太原','140100',4),(14,'大同','140200',4),(15,'阳泉','140300',4),(16,'长治','140400',4),(17,'晋城','140500',4),(18,'朔州','140600',4),(19,'晋中','140700',4),(20,'运城','140800',4),(21,'忻州','140900',4),(22,'临汾','141000',4),(23,'吕梁','141100',4),(24,'呼和浩特','150100',5),(25,'包头','150200',5),(26,'乌海','150300',5),(27,'赤峰','150400',5),(28,'通辽','150500',5),(29,'鄂尔多斯','150600',5),(30,'呼伦贝尔','150700',5),(31,'巴彦淖尔','150800',5),(32,'乌兰察布','150900',5),(33,'兴安盟','152200',5),(34,'锡林郭勒盟','152500',5),(35,'阿拉善盟','152900',5),(36,'沈阳','210100',6),(37,'大连','210200',6),(38,'鞍山','210300',6),(39,'抚顺','210400',6),(40,'本溪','210500',6),(41,'丹东','210600',6),(42,'锦州','210700',6),(43,'营口','210800',6),(44,'阜新','210900',6),(45,'辽阳','211000',6),(46,'盘锦','211100',6),(47,'铁岭','211200',6),(48,'朝阳','211300',6),(49,'葫芦岛','211400',6),(50,'长春','220100',7),(51,'吉林','220200',7),(52,'四平','220300',7),(53,'辽源','220400',7),(54,'通化','220500',7),(55,'白山','220600',7),(56,'松原','220700',7),(57,'白城','220800',7),(58,'延边朝鲜族自治州','222400',7),(59,'哈尔滨','230100',8),(60,'齐齐哈尔','230200',8),(61,'鸡西','230300',8),(62,'鹤岗','230400',8),(63,'双鸭山','230500',8),(64,'大庆','230600',8),(65,'伊春','230700',8),(66,'佳木斯','230800',8),(67,'七台河','230900',8),(68,'牡丹江','231000',8),(69,'黑河','231100',8),(70,'绥化','231200',8),(71,'大兴安岭地区','232700',8),(72,'上海','310100',9),(73,'县','310200',9),(74,'南京','320100',10),(75,'无锡','320200',10),(76,'徐州','320300',10),(77,'常州','320400',10),(78,'苏州','320500',10),(79,'南通','320600',10),(80,'连云港','320700',10),(81,'淮安','320800',10),(82,'盐城','320900',10),(83,'扬州','321000',10),(84,'镇江','321100',10),(85,'泰州','321200',10),(86,'宿迁','321300',10),(87,'杭州','330100',11),(88,'宁波','330200',11),(89,'温州','330300',11),(90,'嘉兴','330400',11),(91,'湖州','330500',11),(92,'绍兴','330600',11),(93,'金华','330700',11),(94,'衢州','330800',11),(95,'舟山','330900',11),(96,'台州','331000',11),(97,'丽水','331100',11),(98,'合肥','340100',12),(99,'芜湖','340200',12),(100,'蚌埠','340300',12),(101,'淮南','340400',12),(102,'马鞍山','340500',12),(103,'淮北','340600',12),(104,'铜陵','340700',12),(105,'安庆','340800',12),(106,'黄山','341000',12),(107,'滁州','341100',12),(108,'阜阳','341200',12),(109,'宿州','341300',12),(110,'巢湖','341400',12),(111,'六安','341500',12),(112,'亳州','341600',12),(113,'池州','341700',12),(114,'宣城','341800',12),(115,'福州','350100',13),(116,'厦门','350200',13),(117,'莆田','350300',13),(118,'三明','350400',13),(119,'泉州','350500',13),(120,'漳州','350600',13),(121,'南平','350700',13),(122,'龙岩','350800',13),(123,'宁德','350900',13),(124,'南昌','360100',14),(125,'景德镇','360200',14),(126,'萍乡','360300',14),(127,'九江','360400',14),(128,'新余','360500',14),(129,'鹰潭','360600',14),(130,'赣州','360700',14),(131,'吉安','360800',14),(132,'宜春','360900',14),(133,'抚州','361000',14),(134,'上饶','361100',14),(135,'济南','370100',15),(136,'青岛','370200',15),(137,'淄博','370300',15),(138,'枣庄','370400',15),(139,'东营','370500',15),(140,'烟台','370600',15),(141,'潍坊','370700',15),(142,'济宁','370800',15),(143,'泰安','370900',15),(144,'威海','371000',15),(145,'日照','371100',15),(146,'莱芜','371200',15),(147,'临沂','371300',15),(148,'德州','371400',15),(149,'聊城','371500',15),(150,'滨州','371600',15),(151,'荷泽','371700',15),(152,'郑州','410100',16),(153,'开封','410200',16),(154,'洛阳','410300',16),(155,'平顶山','410400',16),(156,'安阳','410500',16),(157,'鹤壁','410600',16),(158,'新乡','410700',16),(159,'焦作','410800',16),(160,'濮阳','410900',16),(161,'许昌','411000',16),(162,'漯河','411100',16),(163,'三门峡','411200',16),(164,'南阳','411300',16),(165,'商丘','411400',16),(166,'信阳','411500',16),(167,'周口','411600',16),(168,'驻马店','411700',16),(169,'武汉','420100',17),(170,'黄石','420200',17),(171,'十堰','420300',17),(172,'宜昌','420500',17),(173,'襄樊','420600',17),(174,'鄂州','420700',17),(175,'荆门','420800',17),(176,'孝感','420900',17),(177,'荆州','421000',17),(178,'黄冈','421100',17),(179,'咸宁','421200',17),(180,'随州','421300',17),(181,'恩施土家族苗族自治州','422800',17),(182,'省直辖行政单位','429000',17),(183,'长沙','430100',18),(184,'株洲','430200',18),(185,'湘潭','430300',18),(186,'衡阳','430400',18),(187,'邵阳','430500',18),(188,'岳阳','430600',18),(189,'常德','430700',18),(190,'张家界','430800',18),(191,'益阳','430900',18),(192,'郴州','431000',18),(193,'永州','431100',18),(194,'怀化','431200',18),(195,'娄底','431300',18),(196,'湘西土家族苗族自治州','433100',18),(197,'广州','440100',19),(198,'韶关','440200',19),(199,'深圳','440300',19),(200,'珠海','440400',19),(201,'汕头','440500',19),(202,'佛山','440600',19),(203,'江门','440700',19),(204,'湛江','440800',19),(205,'茂名','440900',19),(206,'肇庆','441200',19),(207,'惠州','441300',19),(208,'梅州','441400',19),(209,'汕尾','441500',19),(210,'河源','441600',19),(211,'阳江','441700',19),(212,'清远','441800',19),(213,'东莞','441900',19),(214,'中山','442000',19),(215,'潮州','445100',19),(216,'揭阳','445200',19),(217,'云浮','445300',19),(218,'南宁','450100',20),(219,'柳州','450200',20),(220,'桂林','450300',20),(221,'梧州','450400',20),(222,'北海','450500',20),(223,'防城港','450600',20),(224,'钦州','450700',20),(225,'贵港','450800',20),(226,'玉林','450900',20),(227,'百色','451000',20),(228,'贺州','451100',20),(229,'河池','451200',20),(230,'来宾','451300',20),(231,'崇左','451400',20),(232,'海口','460100',21),(233,'三亚','460200',21),(234,'省直辖县级行政单位','469000',21),(235,'辖区','500100',22),(236,'县','500200',22),(237,'','500300',22),(238,'成都','510100',23),(239,'自贡','510300',23),(240,'攀枝花','510400',23),(241,'泸州','510500',23),(242,'德阳','510600',23),(243,'绵阳','510700',23),(244,'广元','510800',23),(245,'遂宁','510900',23),(246,'内江','511000',23),(247,'乐山','511100',23),(248,'南充','511300',23),(249,'眉山','511400',23),(250,'宜宾','511500',23),(251,'广安','511600',23),(252,'达州','511700',23),(253,'雅安','511800',23),(254,'巴中','511900',23),(255,'资阳','512000',23),(256,'阿坝藏族羌族自治州','513200',23),(257,'甘孜藏族自治州','513300',23),(258,'凉山彝族自治州','513400',23),(259,'贵阳','520100',24),(260,'六盘水','520200',24),(261,'遵义','520300',24),(262,'安顺','520400',24),(263,'铜仁地区','522200',24),(264,'黔西南布依族苗族自治州','522300',24),(265,'毕节地区','522400',24),(266,'黔东南苗族侗族自治州','522600',24),(267,'黔南布依族苗族自治州','522700',24),(268,'昆明','530100',25),(269,'曲靖','530300',25),(270,'玉溪','530400',25),(271,'保山','530500',25),(272,'昭通','530600',25),(273,'丽江','530700',25),(274,'思茅','530800',25),(275,'临沧','530900',25),(276,'楚雄彝族自治州','532300',25),(277,'红河哈尼族彝族自治州','532500',25),(278,'文山壮族苗族自治州','532600',25),(279,'西双版纳傣族自治州','532800',25),(280,'大理白族自治州','532900',25),(281,'德宏傣族景颇族自治州','533100',25),(282,'怒江傈僳族自治州','533300',25),(283,'迪庆藏族自治州','533400',25),(284,'拉萨','540100',26),(285,'昌都地区','542100',26),(286,'山南地区','542200',26),(287,'日喀则地区','542300',26),(288,'那曲地区','542400',26),(289,'阿里地区','542500',26),(290,'林芝地区','542600',26),(291,'西安','610100',27),(292,'铜川','610200',27),(293,'宝鸡','610300',27),(294,'咸阳','610400',27),(295,'渭南','610500',27),(296,'延安','610600',27),(297,'汉中','610700',27),(298,'榆林','610800',27),(299,'安康','610900',27),(300,'商洛','611000',27),(301,'兰州','620100',28),(302,'嘉峪关','620200',28),(303,'金昌','620300',28),(304,'白银','620400',28),(305,'天水','620500',28),(306,'武威','620600',28),(307,'张掖','620700',28),(308,'平凉','620800',28),(309,'酒泉','620900',28),(310,'庆阳','621000',28),(311,'定西','621100',28),(312,'陇南','621200',28),(313,'临夏回族自治州','622900',28),(314,'甘南藏族自治州','623000',28),(315,'西宁','630100',29),(316,'海东地区','632100',29),(317,'海北藏族自治州','632200',29),(318,'黄南藏族自治州','632300',29),(319,'海南藏族自治州','632500',29),(320,'果洛藏族自治州','632600',29),(321,'玉树藏族自治州','632700',29),(322,'海西蒙古族藏族自治州','632800',29),(323,'银川','640100',30),(324,'石嘴山','640200',30),(325,'吴忠','640300',30),(326,'固原','640400',30),(327,'中卫','640500',30),(328,'乌鲁木齐','650100',31),(329,'克拉玛依','650200',31),(330,'吐鲁番地区','652100',31),(331,'哈密地区','652200',31),(332,'昌吉回族自治州','652300',31),(333,'博尔塔拉蒙古自治州','652700',31),(334,'巴音郭楞蒙古自治州','652800',31),(335,'阿克苏地区','652900',31),(336,'克孜勒苏柯尔克孜自治州','653000',31),(337,'喀什地区','653100',31),(338,'和田地区','653200',31),(339,'伊犁哈萨克自治州','654000',31),(340,'塔城地区','654200',31),(341,'阿勒泰地区','654300',31),(342,'省直辖行政单位','659000',31),(343,'天津',NULL,2);
+/*!40000 ALTER TABLE `city` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `com_visiting_purpose_pl`
+--
+
+DROP TABLE IF EXISTS `com_visiting_purpose_pl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `com_visiting_purpose_pl` (
@@ -812,7 +907,7 @@ CREATE TABLE `contact` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`accountId` mediumint(9) NOT NULL,
- `department` varchar(255) DEFAULT NULL,
+ `department` mediumint(9) DEFAULT NULL,
`sex` mediumint(9) DEFAULT NULL,
`native_place` varchar(255) DEFAULT NULL,
`office_tel` varchar(255) DEFAULT NULL,
@@ -822,8 +917,8 @@ CREATE TABLE `contact` (
`status` varchar(255) DEFAULT NULL,
`market_classification` mediumint(9) DEFAULT NULL,
`grade` mediumint(9) DEFAULT NULL,
- `province` varchar(255) DEFAULT NULL,
- `city` varchar(255) DEFAULT NULL,
+ `province` int(11) DEFAULT NULL,
+ `city` int(11) DEFAULT NULL,
`districts` varchar(255) DEFAULT NULL,
`duty` mediumint(9) DEFAULT NULL,
`job_title` mediumint(9) DEFAULT NULL,
@@ -834,8 +929,16 @@ CREATE TABLE `contact` (
`modifier` varchar(255) DEFAULT NULL,
`modify_datetime` datetime DEFAULT NULL,
`responsible_person` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+ `contactCode` varchar(255) DEFAULT NULL,
+ `num_of_monthlySurgery` mediumint(9) DEFAULT NULL,
+ `num_of_monthlyAnalgesia` mediumint(9) DEFAULT NULL,
+ `externalId` varchar(128) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `contactCode_UNIQUE` (`contactCode`),
+ UNIQUE KEY `externalId` (`externalId`),
+ KEY `account_id_cons` (`accountId`),
+ CONSTRAINT `account_id_cons` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -844,7 +947,6 @@ CREATE TABLE `contact` (
LOCK TABLES `contact` WRITE;
/*!40000 ALTER TABLE `contact` DISABLE KEYS */;
-INSERT INTO `contact` VALUES (5,'BBcdcdcd',3,'1',1,NULL,NULL,NULL,NULL,NULL,'1',1,2,NULL,NULL,NULL,1,1,NULL,NULL,'李99','2013-09-28 17:00:40','李99','2013-10-04 08:38:00',NULL),(6,'122',3,'1',1,NULL,NULL,NULL,NULL,'sd@sina.sdfdsf','1',1,1,NULL,NULL,NULL,1,2,NULL,NULL,'李99','2013-09-28 21:48:12','李99','2013-09-30 21:15:00',NULL),(7,'asdsd',3,'1',1,'as',NULL,NULL,NULL,NULL,'1',1,1,NULL,NULL,NULL,1,1,NULL,NULL,'李99','2013-09-30 07:45:00','李99','2013-09-30 07:45:00',NULL),(8,'BBBB',4,'1',1,NULL,NULL,NULL,NULL,NULL,'1',1,2,NULL,NULL,NULL,1,1,NULL,NULL,'李99','2013-10-01 02:23:00','李99','2013-10-04 08:38:00',NULL);
/*!40000 ALTER TABLE `contact` ENABLE KEYS */;
UNLOCK TABLES;
@@ -859,7 +961,7 @@ CREATE TABLE `contact_department_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -868,7 +970,7 @@ CREATE TABLE `contact_department_pl` (
LOCK TABLES `contact_department_pl` WRITE;
/*!40000 ALTER TABLE `contact_department_pl` DISABLE KEYS */;
-INSERT INTO `contact_department_pl` VALUES (1,'ICU'),(2,'内科'),(3,'外科'),(4,'中医科'),(5,'化疗科'),(6,'关怀科'),(7,'牙科'),(8,'急症科'),(9,'骨科'),(10,'肝胆外科'),(11,'血液科'),(12,'风湿科'),(13,'呼吸科');
+INSERT INTO `contact_department_pl` VALUES (1,'ICU'),(2,'内科'),(3,'外科'),(4,'中医科'),(5,'化疗科'),(6,'关怀科'),(7,'牙科'),(8,'急症科'),(9,'骨科'),(10,'肝胆外科'),(11,'血液科'),(12,'风湿科'),(13,'呼吸科'),(14,'保健科'),(15,'采购科'),(16,'传染科'),(17,'创伤外科'),(18,'儿科'),(19,'耳鼻喉科'),(20,'方便门诊'),(21,'放化疗科'),(22,'放疗科'),(23,'放射科'),(24,'妇产科'),(25,'妇科'),(26,'感染科'),(27,'肛肠科'),(28,'姑息科'),(29,'国际医疗科'),(30,'核医学科'),(31,'呼吸内科'),(32,'护理科'),(33,'急诊科'),(34,'介入科'),(35,'康复科'),(36,'口腔科'),(37,'老干科'),(38,'麻醉科'),(39,'泌尿外科'),(40,'脑外科'),(41,'内分泌科'),(42,'宁养科'),(43,'皮肤科'),(44,'普外科'),(45,'其他'),(46,'乳腺外科'),(47,'烧伤整形科'),(48,'神经科'),(49,'神经内科'),(50,'神经外科'),(51,'肾内科'),(52,'生物治疗科'),(53,'特需科'),(54,'疼痛科'),(55,'微创科'),(56,'胃肠外科'),(57,'消化科'),(58,'消化内科'),(59,'消化外科'),(60,'心内科'),(61,'心胸外科'),(62,'血管外科'),(63,'血透科'),(64,'药剂科'),(65,'医保办'),(66,'医务科'),(67,'整形美容科'),(68,'质控科'),(69,'中西医结合科'),(70,'肿瘤科'),(71,'肿瘤内科'),(72,'肿瘤外科'),(73,'综合科');
/*!40000 ALTER TABLE `contact_department_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -883,7 +985,7 @@ CREATE TABLE `contact_duty_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -892,7 +994,7 @@ CREATE TABLE `contact_duty_pl` (
LOCK TABLES `contact_duty_pl` WRITE;
/*!40000 ALTER TABLE `contact_duty_pl` DISABLE KEYS */;
-INSERT INTO `contact_duty_pl` VALUES (1,'主任'),(2,'主治医师'),(3,'科室主任'),(4,'采购'),(5,'科室主任'),(6,'院长'),(7,'副院长'),(8,'药剂科主任');
+INSERT INTO `contact_duty_pl` VALUES (1,'主任'),(2,'主治医师'),(3,'科室主任'),(4,'采购'),(5,'科室主任'),(6,'院长'),(7,'副院长'),(8,'药剂科主任'),(9,'医生'),(10,'副主任'),(11,'院长助理'),(12,'书记'),(13,'副书记'),(14,'护士'),(15,'护士长'),(16,'库管'),(17,'采购科科长'),(18,'药师'),(19,'药剂科副主任'),(20,'医务科科长'),(21,'医务科副科长'),(22,'医保办主任'),(23,'科教科主任'),(24,'信息卡科长'),(25,'其他');
/*!40000 ALTER TABLE `contact_duty_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -931,7 +1033,7 @@ CREATE TABLE `contact_grade_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -940,7 +1042,7 @@ CREATE TABLE `contact_grade_pl` (
LOCK TABLES `contact_grade_pl` WRITE;
/*!40000 ALTER TABLE `contact_grade_pl` DISABLE KEYS */;
-INSERT INTO `contact_grade_pl` VALUES (1,'A'),(2,'B'),(3,'C'),(4,'D');
+INSERT INTO `contact_grade_pl` VALUES (1,'A'),(2,'B'),(3,'C'),(4,'D'),(5,'V'),(6,'非目标医生');
/*!40000 ALTER TABLE `contact_grade_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -955,7 +1057,7 @@ CREATE TABLE `contact_job_title_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -964,7 +1066,7 @@ CREATE TABLE `contact_job_title_pl` (
LOCK TABLES `contact_job_title_pl` WRITE;
/*!40000 ALTER TABLE `contact_job_title_pl` DISABLE KEYS */;
-INSERT INTO `contact_job_title_pl` VALUES (1,'住院医师'),(2,'主治医师'),(3,'副主任医师'),(4,'主任医师'),(5,'护士'),(6,'主管护师'),(7,'药师'),(8,'技师');
+INSERT INTO `contact_job_title_pl` VALUES (1,'住院医师'),(2,'主治医师'),(3,'副主任医师'),(4,'主任医师'),(5,'护士'),(6,'主管护士'),(7,'药师'),(8,'技师'),(9,'副主任护士'),(10,'主任护师'),(11,'主管药师'),(12,'副主任药师'),(13,'主任药师'),(14,'主管技师'),(15,'副主任技师'),(16,'主任技师'),(17,'其他');
/*!40000 ALTER TABLE `contact_job_title_pl` ENABLE KEYS */;
UNLOCK TABLES;
@@ -993,294 +1095,268 @@ INSERT INTO `contact_market_classification_pl` VALUES (1,'战略城市'),(2,'一
UNLOCK TABLES;
--
--- Table structure for table `contact_pl1`
+-- Table structure for table `contact_status_pl`
--
-DROP TABLE IF EXISTS `contact_pl1`;
+DROP TABLE IF EXISTS `contact_status_pl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_pl1` (
+CREATE TABLE `contact_status_pl` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_pl1`
+-- Dumping data for table `contact_status_pl`
--
-LOCK TABLES `contact_pl1` WRITE;
-/*!40000 ALTER TABLE `contact_pl1` DISABLE KEYS */;
-INSERT INTO `contact_pl1` VALUES (1,'肿瘤科'),(2,'内科'),(3,'外科'),(4,'中医科'),(5,'化疗科'),(6,'关怀科'),(7,'牙科'),(8,'急症科'),(9,'骨科'),(10,'肝胆外科'),(11,'血液科'),(12,'风湿科'),(13,'呼吸科');
-/*!40000 ALTER TABLE `contact_pl1` ENABLE KEYS */;
+LOCK TABLES `contact_status_pl` WRITE;
+/*!40000 ALTER TABLE `contact_status_pl` DISABLE KEYS */;
+INSERT INTO `contact_status_pl` VALUES (1,'有效'),(2,'无效');
+/*!40000 ALTER TABLE `contact_status_pl` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contact_pl2`
+-- Table structure for table `contactcrmuser`
--
-DROP TABLE IF EXISTS `contact_pl2`;
+DROP TABLE IF EXISTS `contactcrmuser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_pl2` (
+CREATE TABLE `contactcrmuser` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+ `contactId` mediumint(9) NOT NULL,
+ `crmuserId` mediumint(9) NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `contactId` (`contactId`,`crmuserId`),
+ KEY `crm_contact_cons1` (`crmuserId`),
+ CONSTRAINT `crm_contact_cons1` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `crm_contact_cons2` FOREIGN KEY (`contactId`) REFERENCES `contact` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_pl2`
+-- Dumping data for table `contactcrmuser`
--
-LOCK TABLES `contact_pl2` WRITE;
-/*!40000 ALTER TABLE `contact_pl2` DISABLE KEYS */;
-INSERT INTO `contact_pl2` VALUES (1,'主任'),(2,'主治医师'),(3,'科室主任'),(4,'采购'),(5,'科室主任'),(6,'院长');
-/*!40000 ALTER TABLE `contact_pl2` ENABLE KEYS */;
+LOCK TABLES `contactcrmuser` WRITE;
+/*!40000 ALTER TABLE `contactcrmuser` DISABLE KEYS */;
+/*!40000 ALTER TABLE `contactcrmuser` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contact_pl3`
+-- Table structure for table `crmuser`
--
-DROP TABLE IF EXISTS `contact_pl3`;
+DROP TABLE IF EXISTS `crmuser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_pl3` (
+CREATE TABLE `crmuser` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+ `name` varchar(255) NOT NULL,
+ `code` varchar(255) DEFAULT NULL,
+ `reportto` mediumint(9) DEFAULT NULL,
+ `role` mediumint(9) DEFAULT NULL,
+ `pl1` mediumint(9) DEFAULT NULL,
+ `pl2` mediumint(9) DEFAULT NULL,
+ `pl4` mediumint(9) DEFAULT NULL,
+ `pl5` mediumint(9) DEFAULT NULL,
+ `city` mediumint(9) DEFAULT NULL,
+ `department` varchar(255) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` date DEFAULT NULL,
+ `owner` varchar(255) DEFAULT NULL,
+ `level` mediumint(9) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `code` (`code`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_pl3`
+-- Dumping data for table `crmuser`
--
-LOCK TABLES `contact_pl3` WRITE;
-/*!40000 ALTER TABLE `contact_pl3` DISABLE KEYS */;
-INSERT INTO `contact_pl3` VALUES (1,'住院医师'),(2,'主治医师'),(3,'副主任医师'),(4,'主任医师'),(5,'护士'),(6,'主管护师'),(7,'药师'),(8,'技师');
-/*!40000 ALTER TABLE `contact_pl3` ENABLE KEYS */;
+LOCK TABLES `crmuser` WRITE;
+/*!40000 ALTER TABLE `crmuser` DISABLE KEYS */;
+INSERT INTO `crmuser` VALUES (-1,'无','BJ',0,-1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(1,'管理员','BJ231011001',-1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+/*!40000 ALTER TABLE `crmuser` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contact_pl4`
+-- Table structure for table `crmuser_activited`
--
-DROP TABLE IF EXISTS `contact_pl4`;
+DROP TABLE IF EXISTS `crmuser_activited`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_pl4` (
+CREATE TABLE `crmuser_activited` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_pl4`
+-- Dumping data for table `crmuser_activited`
--
-LOCK TABLES `contact_pl4` WRITE;
-/*!40000 ALTER TABLE `contact_pl4` DISABLE KEYS */;
-INSERT INTO `contact_pl4` VALUES (1,'奥施康定'),(2,'奇曼丁'),(3,'意施丁'),(4,'综合'),(5,'麻药'),(6,'慢痛');
-/*!40000 ALTER TABLE `contact_pl4` ENABLE KEYS */;
+LOCK TABLES `crmuser_activited` WRITE;
+/*!40000 ALTER TABLE `crmuser_activited` DISABLE KEYS */;
+INSERT INTO `crmuser_activited` VALUES (0,'未激活'),(1,'已激活');
+/*!40000 ALTER TABLE `crmuser_activited` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contact_pl5`
+-- Table structure for table `crmuser_level_pl`
--
-DROP TABLE IF EXISTS `contact_pl5`;
+DROP TABLE IF EXISTS `crmuser_level_pl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_pl5` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+CREATE TABLE `crmuser_level_pl` (
+ `id` int(11) NOT NULL,
+ `val` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_pl5`
+-- Dumping data for table `crmuser_level_pl`
--
-LOCK TABLES `contact_pl5` WRITE;
-/*!40000 ALTER TABLE `contact_pl5` DISABLE KEYS */;
-INSERT INTO `contact_pl5` VALUES (1,'有效'),(2,'无效');
-/*!40000 ALTER TABLE `contact_pl5` ENABLE KEYS */;
+LOCK TABLES `crmuser_level_pl` WRITE;
+/*!40000 ALTER TABLE `crmuser_level_pl` DISABLE KEYS */;
+INSERT INTO `crmuser_level_pl` VALUES (11,'11'),(21,'21'),(31,'31');
+/*!40000 ALTER TABLE `crmuser_level_pl` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contact_pl6`
+-- Table structure for table `crmuser_pl1`
--
-DROP TABLE IF EXISTS `contact_pl6`;
+DROP TABLE IF EXISTS `crmuser_pl1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_pl6` (
+CREATE TABLE `crmuser_pl1` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_pl6`
+-- Dumping data for table `crmuser_pl1`
--
-LOCK TABLES `contact_pl6` WRITE;
-/*!40000 ALTER TABLE `contact_pl6` DISABLE KEYS */;
-INSERT INTO `contact_pl6` VALUES (1,'A'),(2,'B'),(3,'C'),(4,'D');
-/*!40000 ALTER TABLE `contact_pl6` ENABLE KEYS */;
+LOCK TABLES `crmuser_pl1` WRITE;
+/*!40000 ALTER TABLE `crmuser_pl1` DISABLE KEYS */;
+INSERT INTO `crmuser_pl1` VALUES (1,'有效'),(2,'无效');
+/*!40000 ALTER TABLE `crmuser_pl1` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contact_status_pl`
+-- Table structure for table `crmuser_pl2`
--
-DROP TABLE IF EXISTS `contact_status_pl`;
+DROP TABLE IF EXISTS `crmuser_pl2`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contact_status_pl` (
+CREATE TABLE `crmuser_pl2` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contact_status_pl`
+-- Dumping data for table `crmuser_pl2`
--
-LOCK TABLES `contact_status_pl` WRITE;
-/*!40000 ALTER TABLE `contact_status_pl` DISABLE KEYS */;
-INSERT INTO `contact_status_pl` VALUES (1,'有效'),(2,'无效');
-/*!40000 ALTER TABLE `contact_status_pl` ENABLE KEYS */;
+LOCK TABLES `crmuser_pl2` WRITE;
+/*!40000 ALTER TABLE `crmuser_pl2` DISABLE KEYS */;
+INSERT INTO `crmuser_pl2` VALUES (1,'麻药'),(2,'慢痛'),(3,'奥诺美'),(4,'全部');
+/*!40000 ALTER TABLE `crmuser_pl2` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `contactcrmuser`
+-- Table structure for table `data_exchange_operation`
--
-DROP TABLE IF EXISTS `contactcrmuser`;
+DROP TABLE IF EXISTS `data_exchange_operation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `contactcrmuser` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `contactId` mediumint(9) NOT NULL,
- `crmuserId` mediumint(9) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE KEY `contactId` (`contactId`,`crmuserId`)
-) ENGINE=InnoDB AUTO_INCREMENT=1332 DEFAULT CHARSET=utf8;
+CREATE TABLE `data_exchange_operation` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `version` bigint(20) NOT NULL,
+ `val` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `val` (`val`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `contactcrmuser`
+-- Dumping data for table `data_exchange_operation`
--
-LOCK TABLES `contactcrmuser` WRITE;
-/*!40000 ALTER TABLE `contactcrmuser` DISABLE KEYS */;
-INSERT INTO `contactcrmuser` VALUES (1138,7,20),(1139,8,20),(1331,8,99),(1140,9,20),(1141,10,20),(1142,11,20),(1143,12,20),(1144,13,20),(1145,14,20),(1146,15,20),(1147,16,20),(1148,17,20),(1149,18,20),(1150,19,20),(1151,20,20),(1152,21,20),(1153,22,20),(1154,23,20),(1155,24,20),(1156,25,20),(1157,26,20),(1158,27,20),(1159,28,20),(1160,29,20),(1161,30,20),(1162,31,20),(1163,32,20),(1164,33,20),(1165,34,20),(1166,35,20),(1167,36,20),(1168,37,20),(1169,38,20),(1170,39,20),(1171,40,20),(1172,41,20),(1173,42,20),(1174,43,20),(1175,44,20),(1176,45,20),(1177,46,20),(1178,47,20),(1179,48,20),(1180,49,20),(1181,50,20),(1182,51,20),(1183,52,20),(1184,53,20),(1185,54,20),(1186,55,20),(1187,56,20),(1188,57,20),(1189,58,20),(1190,59,20),(1191,60,20),(1192,61,20),(1193,62,20),(1194,63,20),(1195,64,20),(1196,65,20),(1197,66,20),(1198,67,20),(1199,68,20),(1200,69,20),(1201,70,20),(1202,71,20),(1203,72,20),(1204,73,20),(1205,74,20),(1206,75,20),(1207,76,20),(1208,77,20),(1209,78,20),(1210,79,20),(1211,80,20),(1212,81,20),(1213,82,20),(1214,83,20),(1215,84,20),(1216,85,20),(1217,86,20),(1218,87,20),(1219,88,20),(1220,89,20),(1221,90,20),(1222,91,20),(1223,92,20),(1224,93,20),(1225,94,20),(1226,95,20),(1227,96,20),(1228,97,20),(1229,98,20),(1230,99,20),(1231,100,20),(1232,101,20),(1233,102,20),(1234,103,20),(1235,104,20),(1236,105,20),(1237,106,20),(1238,107,20),(1239,108,20),(1240,109,20),(1241,110,20),(1242,111,20),(1243,112,20),(1244,113,20),(1245,114,20),(1246,115,20),(1247,116,20),(1248,117,20),(1249,118,20),(1250,119,20),(1251,120,20),(1252,121,20),(1253,122,20),(1254,123,20),(1255,124,20),(1256,125,20),(1257,126,20),(1258,127,20),(1259,128,20),(1260,129,20),(1261,130,20),(1262,131,20),(1263,132,20),(1264,133,20),(1265,134,20),(1266,135,20),(1267,136,20),(1268,137,20),(1269,138,20),(1270,139,20),(1271,140,20),(1272,141,20),(1273,142,20),(1274,143,20),(1275,144,20),(1276,145,20),(1277,146,20),(1278,147,20),(1279,148,20),(1280,149,20),(1281,150,20),(1282,151,20),(1283,152,20),(1284,153,20),(1285,154,20),(1286,155,20),(1287,156,20),(1288,157,20),(1289,158,20),(1290,159,20),(1291,160,20),(1292,161,20),(1293,162,20),(1294,163,20),(1295,164,20),(1296,165,20),(1297,166,20),(1298,167,20),(1299,168,20),(1300,169,20),(1301,170,20),(1302,171,20),(1303,172,20),(1304,173,20),(1305,174,20),(1306,175,20),(1307,176,20),(1308,177,20),(1309,178,20),(1310,179,20),(1311,180,20),(1312,181,20),(1313,182,20),(1314,183,20),(1315,184,20),(1316,185,20),(1317,186,20),(1318,187,20),(1319,188,20),(1320,189,20),(1321,190,20),(1322,191,20),(1323,192,20),(1324,193,20),(1325,194,20),(1326,195,20),(1327,196,20),(1328,197,20),(1329,198,20),(1330,199,20);
-/*!40000 ALTER TABLE `contactcrmuser` ENABLE KEYS */;
+LOCK TABLES `data_exchange_operation` WRITE;
+/*!40000 ALTER TABLE `data_exchange_operation` DISABLE KEYS */;
+INSERT INTO `data_exchange_operation` VALUES (1,0,'Import'),(2,0,'Export');
+/*!40000 ALTER TABLE `data_exchange_operation` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `crmuser`
+-- Table structure for table `data_exchange_status`
--
-DROP TABLE IF EXISTS `crmuser`;
+DROP TABLE IF EXISTS `data_exchange_status`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `crmuser` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL,
- `department` varchar(255) DEFAULT NULL,
- `division` varchar(255) DEFAULT NULL,
- `cellPhone` varchar(255) DEFAULT NULL,
- `email` varchar(255) DEFAULT NULL,
- `employeeNumber` varchar(255) DEFAULT NULL,
- `photo` varchar(255) DEFAULT NULL,
- `jobTitle` varchar(255) DEFAULT NULL,
- `pl1` mediumint(9) DEFAULT NULL,
- `pl2` mediumint(9) DEFAULT NULL,
- `role` mediumint(9) DEFAULT NULL,
- `pl4` mediumint(9) DEFAULT NULL,
- `pl5` mediumint(9) DEFAULT NULL,
- `sex` mediumint(9) DEFAULT NULL,
- `loginName` varchar(255) DEFAULT NULL,
- `password` varchar(255) DEFAULT NULL,
- `sessionKey` varchar(255) DEFAULT NULL,
- `lastLoginTime` bigint(20) DEFAULT NULL,
- `whenadded` datetime DEFAULT NULL,
- `reportto` mediumint(9) DEFAULT NULL,
- `parcel` varchar(255) DEFAULT NULL,
- `modifier` varchar(255) DEFAULT NULL,
- `modify_datetime` datetime DEFAULT NULL,
- `owner` varchar(255) DEFAULT NULL,
- `postId` varchar(255) DEFAULT NULL,
- `city` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8;
+CREATE TABLE `data_exchange_status` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `version` bigint(20) NOT NULL,
+ `val` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `val` (`val`)
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `crmuser`
+-- Dumping data for table `data_exchange_status`
--
-LOCK TABLES `crmuser` WRITE;
-/*!40000 ALTER TABLE `crmuser` DISABLE KEYS */;
-INSERT INTO `crmuser` VALUES (99,'李99',NULL,'医疗设备部','','li',NULL,'','职员',1,1,1,1,1,1,'li','827ccb0eea8a706c4c34a16891f84e7b','53856',NULL,NULL,100,NULL,'李99','2013-10-14 21:31:00',NULL,NULL,'1'),(100,'gvg',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,1,1,1,1,'jjj',NULL,NULL,NULL,'2013-10-14 18:58:00',101,NULL,'李99','2013-10-14 18:58:00','李99',NULL,NULL),(101,'gvg',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,1,1,1,1,'jjj','e10adc3949ba59abbe56e057f20f883e',NULL,NULL,'2013-10-14 18:58:00',99,NULL,'李99','2013-10-14 18:58:00','李99',NULL,NULL),(102,'brenda4',NULL,NULL,'18812348765','brenda.yuan@rexen.com.cn',NULL,NULL,'职员',1,1,1,1,1,2,'brenda4','827ccb0eea8a706c4c34a16891f84e7b',NULL,NULL,'2013-10-16 22:33:00',-1,NULL,'李99','2013-10-16 22:33:00','李99',NULL,NULL),(117,'yuan',NULL,NULL,'18812348765','brenda.yuan@rexen.com.cn',NULL,NULL,'职员',1,1,1,1,1,1,'yuan',NULL,NULL,NULL,'2013-10-17 12:44:00',-1,NULL,'李99','2013-10-17 12:44:00','李99',NULL,NULL);
-/*!40000 ALTER TABLE `crmuser` ENABLE KEYS */;
+LOCK TABLES `data_exchange_status` WRITE;
+/*!40000 ALTER TABLE `data_exchange_status` DISABLE KEYS */;
+INSERT INTO `data_exchange_status` VALUES (1,0,'Pending'),(2,0,'Abort'),(3,0,'Completed'),(4,0,'Cancelled');
+/*!40000 ALTER TABLE `data_exchange_status` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `crmuser_pl1`
+-- Table structure for table `data_exchange_teample`
--
-DROP TABLE IF EXISTS `crmuser_pl1`;
+DROP TABLE IF EXISTS `data_exchange_teample`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `crmuser_pl1` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping data for table `crmuser_pl1`
---
-
-LOCK TABLES `crmuser_pl1` WRITE;
-/*!40000 ALTER TABLE `crmuser_pl1` DISABLE KEYS */;
-INSERT INTO `crmuser_pl1` VALUES (1,'有效'),(2,'无效');
-/*!40000 ALTER TABLE `crmuser_pl1` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Table structure for table `crmuser_pl2`
---
-
-DROP TABLE IF EXISTS `crmuser_pl2`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `crmuser_pl2` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `val` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+CREATE TABLE `data_exchange_teample` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `template` longtext NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name` (`name`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `crmuser_pl2`
+-- Dumping data for table `data_exchange_teample`
--
-LOCK TABLES `crmuser_pl2` WRITE;
-/*!40000 ALTER TABLE `crmuser_pl2` DISABLE KEYS */;
-INSERT INTO `crmuser_pl2` VALUES (1,'麻药'),(2,'慢痛'),(3,'全部');
-/*!40000 ALTER TABLE `crmuser_pl2` ENABLE KEYS */;
+LOCK TABLES `data_exchange_teample` WRITE;
+/*!40000 ALTER TABLE `data_exchange_teample` DISABLE KEYS */;
+INSERT INTO `data_exchange_teample` VALUES (1,'Account Full Import Template 1.0','\r\n\r\n 1000 \r\n Account \r\n BdmCode \r\n account.csv \r\n crm_mysql \r\n \r\n 记录行ID \r\n String \r\n BdmCode \r\n \r\n \r\n \r\n 年诊疗人数 \r\n Integer \r\n NumOfTreatPerYear \r\n \r\n\r\n \r\n 成立时间 \r\n Date \r\n DateOfEstablish \r\n m/d/yy \r\n \r\n \r\n\r\n \r\n 客户名称 \r\n String \r\n Name \r\n \r\n\r\n \r\n 医院行政级别 \r\n Lookup \r\n AdministrativLevel \r\n AccountAdministrativLevelPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 医院分级 \r\n Lookup \r\n Grade \r\n AccountGradePl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 医院类型 \r\n Lookup \r\n HospitalType \r\n AccountTypePl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 地方军队医院 \r\n Lookup \r\n LocalOrArmy \r\n AccountLocalOrArmyPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 综合专科医院 \r\n Lookup \r\n ComprehensiveOrSpecialized \r\n AccountComprehensiveOrSpecializedPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 重点医院 \r\n Lookup \r\n KeyType \r\n AccountPointPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 状态 \r\n Lookup \r\n Status \r\n AccountStatusPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 法人 \r\n String \r\n DutyOfficer \r\n \r\n\r\n \r\n 医生数量 \r\n Integer \r\n NumOfDoctors \r\n \r\n\r\n \r\n 助理医师人数 \r\n Integer \r\n NumOfAssistantDoctors \r\n \r\n \r\n \r\n 员工总数 \r\n Integer \r\n NumOfStaff \r\n \r\n\r\n \r\n 门诊人数 \r\n Integer \r\n NumOfOutpatient \r\n \r\n\r\n \r\n 总病床数 \r\n Integer \r\n TotalNumOfSickbed \r\n \r\n\r\n \r\n 麻醉科医生数 \r\n Integer \r\n NumOfAnesthesiaDoctor \r\n \r\n\r\n \r\n 疼痛学组医生数 \r\n Integer \r\n NumOfPainDoctor \r\n \r\n\r\n \r\n 手术量年 \r\n Integer \r\n NumOfSurgeryPerYear \r\n \r\n\r\n \r\n 手术间 \r\n Integer \r\n NumOfSurgeryRoom \r\n \r\n\r\n \r\n 阿片类用药量 \r\n Integer \r\n NumOfUsingOpiatesMedicine \r\n \r\n\r\n \r\n 阿片类注射剂量 \r\n Integer \r\n NumOfUsingOpiatesInjection \r\n \r\n\r\n \r\n 注册资金 \r\n Integer \r\n RegisteredCapital \r\n \r\n\r\n \r\n 主要电话号码 \r\n String \r\n Tel \r\n \r\n\r\n \r\n 主要传真号码 \r\n String \r\n Fax \r\n \r\n\r\n \r\n 市场分类 \r\n Lookup \r\n MarketClassification \r\n AccountMarketClassificationPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 医院省份 \r\n String \r\n Province \r\n \r\n\r\n \r\n 医院区县 \r\n String \r\n Districts \r\n \r\n \r\n \r\n 医院详细地址 \r\n String \r\n Address \r\n \r\n ');
+/*!40000 ALTER TABLE `data_exchange_teample` ENABLE KEYS */;
UNLOCK TABLES;
--
@@ -1368,13 +1444,13 @@ INSERT INTO `dl` VALUES (1,'N2',2,'2013-10-09 14:42:28'),(2,'N3',3,'2013-10-20 1
UNLOCK TABLES;
--
--- Table structure for table `externalmeeting`
+-- Table structure for table `externalMeeting`
--
-DROP TABLE IF EXISTS `externalmeeting`;
+DROP TABLE IF EXISTS `externalMeeting`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `externalmeeting` (
+CREATE TABLE `externalMeeting` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`crmuserId` mediumint(9) NOT NULL,
`endtime` bigint(20) DEFAULT NULL,
@@ -1385,27 +1461,109 @@ CREATE TABLE `externalmeeting` (
`activity_type` mediumint(9) DEFAULT NULL,
`coachId` mediumint(9) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `externalMeeting`
+--
+
+LOCK TABLES `externalMeeting` WRITE;
+/*!40000 ALTER TABLE `externalMeeting` DISABLE KEYS */;
+/*!40000 ALTER TABLE `externalMeeting` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `importMetaInfo`
+--
+
+DROP TABLE IF EXISTS `importMetaInfo`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `importMetaInfo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `entity_name` varchar(255) DEFAULT NULL,
+ `importfilename` varchar(255) DEFAULT NULL,
+ `logfilename` varchar(255) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ `num_of_total_record` mediumint(9) DEFAULT NULL,
+ `num_of_imported` mediumint(9) DEFAULT NULL,
+ `num_of_failed` mediumint(9) DEFAULT NULL,
+ `status` mediumint(9) DEFAULT NULL,
+ `result` mediumint(9) DEFAULT NULL,
+ `num_of_updated` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `importMetaInfo`
+--
+
+LOCK TABLES `importMetaInfo` WRITE;
+/*!40000 ALTER TABLE `importMetaInfo` DISABLE KEYS */;
+/*!40000 ALTER TABLE `importMetaInfo` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `importresult`
+--
+
+DROP TABLE IF EXISTS `importresult`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `importresult` (
+ `id` int(11) NOT NULL,
+ `val` varchar(45) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `importresult`
+--
+
+LOCK TABLES `importresult` WRITE;
+/*!40000 ALTER TABLE `importresult` DISABLE KEYS */;
+INSERT INTO `importresult` VALUES (0,'成功'),(1,'失败');
+/*!40000 ALTER TABLE `importresult` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `importstatus`
+--
+
+DROP TABLE IF EXISTS `importstatus`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `importstatus` (
+ `id` int(11) NOT NULL,
+ `val` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `externalmeeting`
+-- Dumping data for table `importstatus`
--
-LOCK TABLES `externalmeeting` WRITE;
-/*!40000 ALTER TABLE `externalmeeting` DISABLE KEYS */;
-INSERT INTO `externalmeeting` VALUES (32,20,1375804800000,1375804800000,'拜访','[7,167]',2,2,0);
-/*!40000 ALTER TABLE `externalmeeting` ENABLE KEYS */;
+LOCK TABLES `importstatus` WRITE;
+/*!40000 ALTER TABLE `importstatus` DISABLE KEYS */;
+INSERT INTO `importstatus` VALUES (0,'运行'),(1,'已完成');
+/*!40000 ALTER TABLE `importstatus` ENABLE KEYS */;
UNLOCK TABLES;
--
--- Table structure for table `internalmeeting`
+-- Table structure for table `internalMeeting`
--
-DROP TABLE IF EXISTS `internalmeeting`;
+DROP TABLE IF EXISTS `internalMeeting`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `internalmeeting` (
+CREATE TABLE `internalMeeting` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`crmuserId` mediumint(9) NOT NULL,
`endtime` bigint(20) DEFAULT NULL,
@@ -1420,14 +1578,131 @@ CREATE TABLE `internalmeeting` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Dumping data for table `internalmeeting`
+-- Dumping data for table `internalMeeting`
+--
+
+LOCK TABLES `internalMeeting` WRITE;
+/*!40000 ALTER TABLE `internalMeeting` DISABLE KEYS */;
+/*!40000 ALTER TABLE `internalMeeting` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `loginhistory`
+--
+
+DROP TABLE IF EXISTS `loginhistory`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `loginhistory` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `sessionId` varchar(128) DEFAULT NULL,
+ `loginName` varchar(256) DEFAULT NULL,
+ `loginTime` datetime DEFAULT NULL,
+ `logoutTime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `sessionId` (`sessionId`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `loginhistory`
--
-LOCK TABLES `internalmeeting` WRITE;
-/*!40000 ALTER TABLE `internalmeeting` DISABLE KEYS */;
-/*!40000 ALTER TABLE `internalmeeting` ENABLE KEYS */;
+LOCK TABLES `loginhistory` WRITE;
+/*!40000 ALTER TABLE `loginhistory` DISABLE KEYS */;
+/*!40000 ALTER TABLE `loginhistory` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Temporary table structure for view `parent_position`
+--
+
+DROP TABLE IF EXISTS `parent_position`;
+/*!50001 DROP VIEW IF EXISTS `parent_position`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `parent_position` (
+ `id` tinyint NOT NULL,
+ `name` tinyint NOT NULL,
+ `code` tinyint NOT NULL,
+ `reportto` tinyint NOT NULL,
+ `role` tinyint NOT NULL,
+ `pl1` tinyint NOT NULL,
+ `pl2` tinyint NOT NULL,
+ `pl4` tinyint NOT NULL,
+ `pl5` tinyint NOT NULL,
+ `city` tinyint NOT NULL,
+ `department` tinyint NOT NULL,
+ `whenadded` tinyint NOT NULL,
+ `modifier` tinyint NOT NULL,
+ `modify_datetime` tinyint NOT NULL,
+ `owner` tinyint NOT NULL,
+ `level` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Temporary table structure for view `parent_user_info`
+--
+
+DROP TABLE IF EXISTS `parent_user_info`;
+/*!50001 DROP VIEW IF EXISTS `parent_user_info`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `parent_user_info` (
+ `id` tinyint NOT NULL,
+ `name` tinyint NOT NULL,
+ `department` tinyint NOT NULL,
+ `division` tinyint NOT NULL,
+ `cellPhone` tinyint NOT NULL,
+ `email` tinyint NOT NULL,
+ `employeeNumber` tinyint NOT NULL,
+ `photo` tinyint NOT NULL,
+ `jobTitle` tinyint NOT NULL,
+ `pl1` tinyint NOT NULL,
+ `pl2` tinyint NOT NULL,
+ `role` tinyint NOT NULL,
+ `pl4` tinyint NOT NULL,
+ `pl5` tinyint NOT NULL,
+ `sex` tinyint NOT NULL,
+ `loginName` tinyint NOT NULL,
+ `password` tinyint NOT NULL,
+ `sessionKey` tinyint NOT NULL,
+ `lastLoginTime` tinyint NOT NULL,
+ `whenadded` tinyint NOT NULL,
+ `parcel` tinyint NOT NULL,
+ `modifier` tinyint NOT NULL,
+ `modify_datetime` tinyint NOT NULL,
+ `owner` tinyint NOT NULL,
+ `province` tinyint NOT NULL,
+ `city` tinyint NOT NULL,
+ `office_tel` tinyint NOT NULL,
+ `num_of_signIn` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Temporary table structure for view `parent_user_position`
+--
+
+DROP TABLE IF EXISTS `parent_user_position`;
+/*!50001 DROP VIEW IF EXISTS `parent_user_position`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `parent_user_position` (
+ `id` tinyint NOT NULL,
+ `userId` tinyint NOT NULL,
+ `positionId` tinyint NOT NULL,
+ `status` tinyint NOT NULL,
+ `createtime` tinyint NOT NULL,
+ `isPrimary` tinyint NOT NULL,
+ `externalId` tinyint NOT NULL,
+ `whenadded` tinyint NOT NULL,
+ `modifier` tinyint NOT NULL,
+ `modify_datetime` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
--
-- Table structure for table `province`
--
@@ -1436,10 +1711,11 @@ DROP TABLE IF EXISTS `province`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `province` (
- `id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1448,10 +1724,61 @@ CREATE TABLE `province` (
LOCK TABLES `province` WRITE;
/*!40000 ALTER TABLE `province` DISABLE KEYS */;
-INSERT INTO `province` VALUES (1,'黑龙江'),(2,'山东');
+INSERT INTO `province` VALUES (1,'北京','110000'),(2,'天津','120000'),(3,'河北','130000'),(4,'山西','140000'),(5,'内蒙古','150000'),(6,'辽宁','210000'),(7,'吉林','220000'),(8,'黑龙江','230000'),(9,'上海','310000'),(10,'江苏','320000'),(11,'浙江','330000'),(12,'安徽','340000'),(13,'福建','350000'),(14,'江西','360000'),(15,'山东','370000'),(16,'河南','410000'),(17,'湖北','420000'),(18,'湖南','430000'),(19,'广东','440000'),(20,'广西','450000'),(21,'海南','460000'),(22,'重庆','500000'),(23,'四川','510000'),(24,'贵州','520000'),(25,'云南','530000'),(26,'西藏','540000'),(27,'陕西','610000'),(28,'甘肃','620000'),(29,'青海','630000'),(30,'宁夏','640000'),(31,'新疆','650000'),(32,'台湾','710000'),(33,'香港','810000'),(34,'澳门','820000');
/*!40000 ALTER TABLE `province` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Table structure for table `province1`
+--
+
+DROP TABLE IF EXISTS `province1`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `province1` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `code` varchar(6) NOT NULL,
+ `val` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `province1`
+--
+
+LOCK TABLES `province1` WRITE;
+/*!40000 ALTER TABLE `province1` DISABLE KEYS */;
+INSERT INTO `province1` VALUES (1,'110000','北京市'),(2,'120000','天津市'),(3,'130000','河北省'),(4,'140000','山西省'),(5,'150000','内蒙古'),(6,'210000','辽宁省'),(7,'220000','吉林省'),(8,'230000','黑龙江'),(9,'310000','上海市'),(10,'320000','江苏省'),(11,'330000','浙江省'),(12,'340000','安徽省'),(13,'350000','福建省'),(14,'360000','江西省'),(15,'370000','山东省'),(16,'410000','河南省'),(17,'420000','湖北省'),(18,'430000','湖南省'),(19,'440000','广东省'),(20,'450000','广 西'),(21,'460000','海南省'),(22,'500000','重庆市'),(23,'510000','四川省'),(24,'520000','贵州省'),(25,'530000','云南省'),(26,'540000','西 藏'),(27,'610000','陕西省'),(28,'620000','甘肃省'),(29,'630000','青海省'),(30,'640000','宁 夏'),(31,'650000','新 疆'),(32,'710000','台湾省'),(33,'810000','香 港'),(34,'820000','澳 门');
+/*!40000 ALTER TABLE `province1` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `record_type`
+--
+
+DROP TABLE IF EXISTS `record_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `record_type` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `version` bigint(20) NOT NULL,
+ `val` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `val` (`val`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `record_type`
+--
+
+LOCK TABLES `record_type` WRITE;
+/*!40000 ALTER TABLE `record_type` DISABLE KEYS */;
+INSERT INTO `record_type` VALUES (1,0,'Account'),(2,0,'Contact'),(3,0,'Call'),(4,0,'Coaching'),(5,0,'AccuntTeam'),(6,0,'ContactTeam');
+/*!40000 ALTER TABLE `record_type` ENABLE KEYS */;
+UNLOCK TABLES;
+
--
-- Table structure for table `region_level1_pl`
--
@@ -1510,6 +1837,7 @@ DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`val` varchar(255) DEFAULT NULL,
+ `name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -1520,7 +1848,7 @@ CREATE TABLE `role` (
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
-INSERT INTO `role` VALUES (1,'高级用户'),(2,'主管'),(3,'销售代表');
+INSERT INTO `role` VALUES (1,'高级用户','全部'),(2,'主管','只读'),(3,'销售代表','只读');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;
@@ -1548,6 +1876,54 @@ INSERT INTO `sales_visiting_purpose_pl` VALUES (1,'会议安排'),(2,'会议跟
/*!40000 ALTER TABLE `sales_visiting_purpose_pl` ENABLE KEYS */;
UNLOCK TABLES;
+--
+-- Table structure for table `score1_pl`
+--
+
+DROP TABLE IF EXISTS `score1_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `score1_pl` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `score1_pl`
+--
+
+LOCK TABLES `score1_pl` WRITE;
+/*!40000 ALTER TABLE `score1_pl` DISABLE KEYS */;
+INSERT INTO `score1_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15');
+/*!40000 ALTER TABLE `score1_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `score2_pl`
+--
+
+DROP TABLE IF EXISTS `score2_pl`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `score2_pl` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `score2_pl`
+--
+
+LOCK TABLES `score2_pl` WRITE;
+/*!40000 ALTER TABLE `score2_pl` DISABLE KEYS */;
+INSERT INTO `score2_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15'),(16,'16'),(17,'17'),(18,'18'),(19,'19'),(20,'20');
+/*!40000 ALTER TABLE `score2_pl` ENABLE KEYS */;
+UNLOCK TABLES;
+
--
-- Table structure for table `sex_pl`
--
@@ -1571,6 +1947,315 @@ LOCK TABLES `sex_pl` WRITE;
INSERT INTO `sex_pl` VALUES (1,'男'),(2,'女');
/*!40000 ALTER TABLE `sex_pl` ENABLE KEYS */;
UNLOCK TABLES;
+
+--
+-- Table structure for table `test_main`
+--
+
+DROP TABLE IF EXISTS `test_main`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `test_main` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `value` varchar(10) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `test_main`
+--
+
+LOCK TABLES `test_main` WRITE;
+/*!40000 ALTER TABLE `test_main` DISABLE KEYS */;
+INSERT INTO `test_main` VALUES (1,'ONE'),(2,'TWO');
+/*!40000 ALTER TABLE `test_main` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `test_sub`
+--
+
+DROP TABLE IF EXISTS `test_sub`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `test_sub` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `main_id` int(11) DEFAULT NULL,
+ `value` varchar(10) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `test_sub`
+--
+
+LOCK TABLES `test_sub` WRITE;
+/*!40000 ALTER TABLE `test_sub` DISABLE KEYS */;
+INSERT INTO `test_sub` VALUES (1,1,'ONEONE'),(2,2,'TWOTWO');
+/*!40000 ALTER TABLE `test_sub` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `user_position`
+--
+
+DROP TABLE IF EXISTS `user_position`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `user_position` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `userId` int(32) DEFAULT NULL,
+ `positionId` int(32) DEFAULT NULL,
+ `status` int(11) DEFAULT NULL,
+ `createtime` datetime DEFAULT NULL,
+ `isPrimary` int(11) DEFAULT NULL,
+ `externalId` varchar(128) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `positionId` (`positionId`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `user_position`
+--
+
+LOCK TABLES `user_position` WRITE;
+/*!40000 ALTER TABLE `user_position` DISABLE KEYS */;
+INSERT INTO `user_position` VALUES (1,1,1,NULL,NULL,1,NULL,NULL,NULL,NULL);
+/*!40000 ALTER TABLE `user_position` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Temporary table structure for view `user_position_account`
+--
+
+DROP TABLE IF EXISTS `user_position_account`;
+/*!50001 DROP VIEW IF EXISTS `user_position_account`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `user_position_account` (
+ `id` tinyint NOT NULL,
+ `userName` tinyint NOT NULL,
+ `loginName` tinyint NOT NULL,
+ `email` tinyint NOT NULL,
+ `sex` tinyint NOT NULL,
+ `addTime` tinyint NOT NULL,
+ `positionName` tinyint NOT NULL,
+ `positionCode` tinyint NOT NULL,
+ `reportTo` tinyint NOT NULL,
+ `reporttto` tinyint NOT NULL,
+ `role` tinyint NOT NULL,
+ `regoin1` tinyint NOT NULL,
+ `regoin2` tinyint NOT NULL,
+ `city` tinyint NOT NULL,
+ `accountName` tinyint NOT NULL,
+ `BDMCode` tinyint NOT NULL,
+ `adminLevel` tinyint NOT NULL,
+ `status` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Temporary table structure for view `user_position_query`
+--
+
+DROP TABLE IF EXISTS `user_position_query`;
+/*!50001 DROP VIEW IF EXISTS `user_position_query`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE TABLE `user_position_query` (
+ `user_id` tinyint NOT NULL,
+ `position_id` tinyint NOT NULL,
+ `area` tinyint NOT NULL,
+ `region` tinyint NOT NULL,
+ `province` tinyint NOT NULL,
+ `productLine` tinyint NOT NULL,
+ `position_level` tinyint NOT NULL,
+ `position_name` tinyint NOT NULL,
+ `position_code` tinyint NOT NULL,
+ `delegatePosition` tinyint NOT NULL,
+ `delegateName` tinyint NOT NULL,
+ `manager_position_id` tinyint NOT NULL,
+ `managerPosition` tinyint NOT NULL,
+ `manager_position_name` tinyint NOT NULL,
+ `manager_position_level` tinyint NOT NULL,
+ `manager_employee_number` tinyint NOT NULL,
+ `regionManager` tinyint NOT NULL,
+ `accountName` tinyint NOT NULL,
+ `BDMcode` tinyint NOT NULL
+) ENGINE=MyISAM */;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Table structure for table `userinfo`
+--
+
+DROP TABLE IF EXISTS `userinfo`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `userinfo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `department` varchar(255) DEFAULT NULL,
+ `division` varchar(255) DEFAULT NULL,
+ `cellPhone` varchar(255) DEFAULT NULL,
+ `email` varchar(255) DEFAULT NULL,
+ `employeeNumber` varchar(255) DEFAULT NULL,
+ `photo` varchar(255) DEFAULT NULL,
+ `jobTitle` varchar(255) DEFAULT NULL,
+ `pl1` mediumint(9) DEFAULT NULL,
+ `pl2` mediumint(9) DEFAULT NULL,
+ `role` mediumint(9) DEFAULT NULL,
+ `pl4` mediumint(9) DEFAULT NULL,
+ `pl5` mediumint(9) DEFAULT NULL,
+ `sex` mediumint(9) DEFAULT NULL,
+ `loginName` varchar(255) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `sessionKey` varchar(255) DEFAULT NULL,
+ `lastLoginTime` bigint(20) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `parcel` varchar(255) DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ `owner` varchar(255) DEFAULT NULL,
+ `province` int(11) DEFAULT NULL,
+ `city` int(11) DEFAULT NULL,
+ `office_tel` varchar(255) DEFAULT NULL,
+ `num_of_signIn` mediumint(9) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `employeeNumber` (`employeeNumber`),
+ UNIQUE KEY `loginName_UNIQUE` (`loginName`)
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `userinfo`
+--
+
+LOCK TABLES `userinfo` WRITE;
+/*!40000 ALTER TABLE `userinfo` DISABLE KEYS */;
+INSERT INTO `userinfo` VALUES (-1,'无',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,1,NULL,NULL,1,'dummy','827ccb0eea8a706c4c34a16891f84e7b',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(1,'Admin Nam',NULL,NULL,NULL,'tigerzhou@rexen.com.cn',NULL,NULL,NULL,1,NULL,1,NULL,NULL,1,'admin','827ccb0eea8a706c4c34a16891f84e7b',NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL);
+/*!40000 ALTER TABLE `userinfo` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Final view structure for view `activity_alert`
+--
+
+/*!50001 DROP TABLE IF EXISTS `activity_alert`*/;
+/*!50001 DROP VIEW IF EXISTS `activity_alert`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`crm`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `activity_alert` AS select `act`.`id` AS `id`,(case when ((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) = 0) then '今天' when ((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) = 1) then '昨天' when ((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) = 2) then '前天' when (((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) >= 3) and ((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) < 7)) then '三天以前' when ((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) >= 7) then '七天以前' else '错误' end) AS `time`,`act`.`title` AS `title`,`act`.`owner` AS `name`,`act`.`starttime` AS `times` from `activity` `act` where ((`act`.`status` = 1) and ((to_days(curdate()) - to_days(date_format(from_unixtime((`act`.`starttime` / 1000)),'%Y-%m-%d'))) >= 0)) order by `act`.`starttime` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+
+--
+-- Final view structure for view `parent_position`
+--
+
+/*!50001 DROP TABLE IF EXISTS `parent_position`*/;
+/*!50001 DROP VIEW IF EXISTS `parent_position`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`crm`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `parent_position` AS select `crmuser`.`id` AS `id`,`crmuser`.`name` AS `name`,`crmuser`.`code` AS `code`,`crmuser`.`reportto` AS `reportto`,`crmuser`.`role` AS `role`,`crmuser`.`pl1` AS `pl1`,`crmuser`.`pl2` AS `pl2`,`crmuser`.`pl4` AS `pl4`,`crmuser`.`pl5` AS `pl5`,`crmuser`.`city` AS `city`,`crmuser`.`department` AS `department`,`crmuser`.`whenadded` AS `whenadded`,`crmuser`.`modifier` AS `modifier`,`crmuser`.`modify_datetime` AS `modify_datetime`,`crmuser`.`owner` AS `owner`,`crmuser`.`level` AS `level` from `crmuser` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+
+--
+-- Final view structure for view `parent_user_info`
+--
+
+/*!50001 DROP TABLE IF EXISTS `parent_user_info`*/;
+/*!50001 DROP VIEW IF EXISTS `parent_user_info`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`crm`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `parent_user_info` AS select `userinfo`.`id` AS `id`,`userinfo`.`name` AS `name`,`userinfo`.`department` AS `department`,`userinfo`.`division` AS `division`,`userinfo`.`cellPhone` AS `cellPhone`,`userinfo`.`email` AS `email`,`userinfo`.`employeeNumber` AS `employeeNumber`,`userinfo`.`photo` AS `photo`,`userinfo`.`jobTitle` AS `jobTitle`,`userinfo`.`pl1` AS `pl1`,`userinfo`.`pl2` AS `pl2`,`userinfo`.`role` AS `role`,`userinfo`.`pl4` AS `pl4`,`userinfo`.`pl5` AS `pl5`,`userinfo`.`sex` AS `sex`,`userinfo`.`loginName` AS `loginName`,`userinfo`.`password` AS `password`,`userinfo`.`sessionKey` AS `sessionKey`,`userinfo`.`lastLoginTime` AS `lastLoginTime`,`userinfo`.`whenadded` AS `whenadded`,`userinfo`.`parcel` AS `parcel`,`userinfo`.`modifier` AS `modifier`,`userinfo`.`modify_datetime` AS `modify_datetime`,`userinfo`.`owner` AS `owner`,`userinfo`.`province` AS `province`,`userinfo`.`city` AS `city`,`userinfo`.`office_tel` AS `office_tel`,`userinfo`.`num_of_signIn` AS `num_of_signIn` from `userinfo` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+
+--
+-- Final view structure for view `parent_user_position`
+--
+
+/*!50001 DROP TABLE IF EXISTS `parent_user_position`*/;
+/*!50001 DROP VIEW IF EXISTS `parent_user_position`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`crm`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `parent_user_position` AS select `user_position`.`id` AS `id`,`user_position`.`userId` AS `userId`,`user_position`.`positionId` AS `positionId`,`user_position`.`status` AS `status`,`user_position`.`createtime` AS `createtime`,`user_position`.`isPrimary` AS `isPrimary`,`user_position`.`externalId` AS `externalId`,`user_position`.`whenadded` AS `whenadded`,`user_position`.`modifier` AS `modifier`,`user_position`.`modify_datetime` AS `modify_datetime` from `user_position` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+
+--
+-- Final view structure for view `user_position_account`
+--
+
+/*!50001 DROP TABLE IF EXISTS `user_position_account`*/;
+/*!50001 DROP VIEW IF EXISTS `user_position_account`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`crm`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `user_position_account` AS select `ac`.`id` AS `id`,`u`.`name` AS `userName`,`u`.`loginName` AS `loginName`,`u`.`email` AS `email`,`sp`.`val` AS `sex`,`u`.`whenadded` AS `addTime`,`c`.`name` AS `positionName`,`c`.`code` AS `positionCode`,(select `crm`.`name` from `crmuser` `crm` where (`crm`.`id` = `c`.`reportto`)) AS `reportTo`,(select `c1`.`name` from `crmuser` `c1` where (`c1`.`id` = (select `c2`.`reportto` from `crmuser` `c2` where (`c2`.`id` = `c`.`reportto`)))) AS `reporttto`,`r`.`val` AS `role`,`rlp4`.`val` AS `regoin1`,`rlp5`.`val` AS `regoin2`,`ct`.`val` AS `city`,`a`.`name` AS `accountName`,`a`.`bdm_code` AS `BDMCode`,`aalp`.`val` AS `adminLevel`,`asp`.`val` AS `status` from (((((((((((`userinfo` `u` left join `sex_pl` `sp` on((`u`.`sex` = `sp`.`id`))) left join `user_position` `up` on((`u`.`id` = `up`.`userId`))) left join `crmuser` `c` on((`up`.`positionId` = `c`.`id`))) left join `role` `r` on((`c`.`role` = `r`.`id`))) left join `region_level1_pl` `rlp4` on((`c`.`pl4` = `rlp4`.`id`))) left join `region_level1_pl` `rlp5` on((`c`.`pl5` = `rlp5`.`id`))) left join `city` `ct` on((`c`.`city` = `ct`.`id`))) left join `accountcrmuser` `ac` on((`c`.`id` = `ac`.`crmuserId`))) left join `account` `a` on((`ac`.`accountId` = `a`.`id`))) left join `account_status_pl` `asp` on((`a`.`status` = `asp`.`id`))) left join `account_administrativ_level_pl` `aalp` on((`a`.`administrativ_level` = `aalp`.`id`))) where (`up`.`status` = 1) order by `ac`.`id` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+
+--
+-- Final view structure for view `user_position_query`
+--
+
+/*!50001 DROP TABLE IF EXISTS `user_position_query`*/;
+/*!50001 DROP VIEW IF EXISTS `user_position_query`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`crm`@`localhost` SQL SECURITY DEFINER */
+/*!50001 VIEW `user_position_query` AS select `user_position`.`userId` AS `user_id`,`user_position`.`positionId` AS `position_id`,`region_level1_pl`.`val` AS `area`,`region_level2_pl`.`val` AS `region`,`province`.`val` AS `province`,`crmuser_pl2`.`val` AS `productLine`,`crmuser`.`level` AS `position_level`,`crmuser`.`name` AS `position_name`,`crmuser`.`code` AS `position_code`,`userinfo`.`employeeNumber` AS `delegatePosition`,`userinfo`.`name` AS `delegateName`,`parent_position`.`id` AS `manager_position_id`,`parent_position`.`code` AS `managerPosition`,`parent_position`.`name` AS `manager_position_name`,`parent_position`.`level` AS `manager_position_level`,`parent_user_info`.`employeeNumber` AS `manager_employee_number`,`parent_user_info`.`name` AS `regionManager`,`account`.`name` AS `accountName`,`account`.`bdm_code` AS `BDMcode` from (((((((((((`user_position` left join `crmuser` on((`user_position`.`positionId` = `crmuser`.`id`))) left join `userinfo` on((`user_position`.`userId` = `userinfo`.`id`))) left join `parent_position` on((`crmuser`.`reportto` = `parent_position`.`id`))) left join `parent_user_position` on((`parent_position`.`id` = `parent_user_position`.`positionId`))) left join `parent_user_info` on((`parent_user_position`.`userId` = `parent_user_info`.`id`))) join `accountcrmuser` on((`user_position`.`positionId` = `accountcrmuser`.`crmuserId`))) join `account` on((`accountcrmuser`.`accountId` = `account`.`id`))) left join `region_level1_pl` on((`crmuser`.`pl4` = `region_level1_pl`.`id`))) left join `region_level2_pl` on((`crmuser`.`pl5` = `region_level2_pl`.`id`))) left join `province` on((`account`.`province` = `province`.`id`))) left join `crmuser_pl2` on((`crmuser_pl2`.`id` = `crmuser`.`pl2`))) */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
@@ -1581,4 +2266,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2013-10-17 16:06:41
+-- Dump completed on 2013-11-26 23:55:19
diff --git a/crm/src/main/db/load.sql b/crm/src/main/db/load.sql
index 847db6c..ceb1d92 100644
--- a/crm/src/main/db/load.sql
+++ b/crm/src/main/db/load.sql
@@ -1,117 +1,467 @@
-INSERT INTO account_pl1 (val) VALUES ('有效');
-INSERT INTO account_pl1 (val) VALUES('无效');
-INSERT INTO account_pl1 (val) VALUES('终止');
-INSERT INTO account_pl1 (val) VALUES('候选');
-
-
--- 医院分级;
-INSERT INTO account_pl2 (val) VALUES('A');
-INSERT INTO account_pl2 (val) VALUES('B');
-INSERT INTO account_pl2 (val) VALUES('C');
-INSERT INTO account_pl2 (val) VALUES('D');
-
--- 重点医院;
-INSERT INTO account_pl3 (val) VALUES('是');
-INSERT INTO account_pl3 (val) VALUES('否');
-
--- 市场分类;
-INSERT INTO account_pl4 (val) VALUES('一级城市');
-INSERT INTO account_pl4 (val) VALUES('二级城市');
-INSERT INTO account_pl4 (val) VALUES('战略城市');
-
--- 客户中国区域;
-INSERT INTO account_pl5 (val) VALUES('北中国');
-INSERT INTO account_pl5 (val) VALUES('南中国');
-INSERT INTO account_pl5 (val) VALUES('东中国');
-
-
--- 医院类型;
-INSERT INTO account_pl6 (val) VALUES('麻药目标医院');
-INSERT INTO account_pl6 (val) VALUES('慢痛目标医院');
-INSERT INTO account_pl6 (val) VALUES('其他');
+drop table if exists boolean_pl;
+CREATE TABLE boolean_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO boolean_pl (val) VALUES('是');
+INSERT INTO boolean_pl (val) VALUES('否');
+
+-- 医院行政级别
+drop table if exists account_administrativ_level_pl;
+CREATE TABLE account_administrativ_level_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_administrativ_level_pl (val) VALUES('一级');
+INSERT INTO account_administrativ_level_pl (val) VALUES('一级甲等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('一级乙等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('一级丙等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('二级');
+INSERT INTO account_administrativ_level_pl (val) VALUES('二级甲等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('二级乙等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('二级丙等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('三级');
+INSERT INTO account_administrativ_level_pl (val) VALUES('三级甲等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('三级乙等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('三级丙等');
+INSERT INTO account_administrativ_level_pl (val) VALUES('未评级未评等');
+
+-- 医院分级
+drop table if exists account_grade_pl;
+CREATE TABLE account_grade_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_grade_pl (val) VALUES('A');
+INSERT INTO account_grade_pl (val) VALUES('B');
+INSERT INTO account_grade_pl (val) VALUES('C');
+INSERT INTO account_grade_pl (val) VALUES('D');
+
+
+-- 医院状态
+drop table if exists account_status_pl;
+CREATE TABLE account_status_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_status_pl (val) VALUES ('无效');
+INSERT INTO account_status_pl (val) VALUES('有效');
+
+
+drop table if exists account_local_or_army_pl;
+CREATE TABLE account_local_or_army_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_local_or_army_pl (val) VALUES ('地方医院');
+INSERT INTO account_local_or_army_pl (val) VALUES('部队医院');
+
+drop table if exists account_comprehensive_or_specialized_pl;
+CREATE TABLE account_comprehensive_or_specialized_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_comprehensive_or_specialized_pl (val) VALUES ('综合医院');
+INSERT INTO account_comprehensive_or_specialized_pl (val) VALUES('专科医院');
+
+
+drop table if exists account_market_classification_pl;
+CREATE TABLE account_market_classification_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_market_classification_pl (val) VALUES ('战略城市');
+INSERT INTO account_market_classification_pl (val) VALUES('一级城市');
+INSERT INTO account_market_classification_pl (val) VALUES('二级城市');
+INSERT INTO account_market_classification_pl (val) VALUES('三级城市');
+INSERT INTO account_market_classification_pl (val) VALUES('四级城市');
+
+drop table if exists account_type_pl;
+CREATE TABLE account_type_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_type_pl (val) VALUES ('癌痛目标医院');
+INSERT INTO account_type_pl (val) VALUES('慢痛目标医院');
+INSERT INTO account_type_pl (val) VALUES('奥诺美目标医院');
+INSERT INTO account_type_pl (val) VALUES('非目标医院');
+
+drop table if exists account_point_pl;
+CREATE TABLE account_point_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO account_point_pl (val) VALUES ('癌痛重点医院');
+INSERT INTO account_point_pl (val) VALUES('慢痛重点医院');
+INSERT INTO account_point_pl (val) VALUES('奥诺美重点医院');
+INSERT INTO account_point_pl (val) VALUES('非重点医院');
+
+
+--activity related picklist
+-- 类型
+drop table if exists activity_event_type_pl;
+CREATE TABLE activity_event_type_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO activity_event_type_pl (val) VALUES('拜访');
+INSERT INTO activity_event_type_pl (val) VALUES('辅导');
+
+-- 活动状态;
+drop table if exists activity_status_pl;
+CREATE TABLE activity_status_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO activity_status_pl (val) VALUES('计划');
+INSERT INTO activity_status_pl (val) VALUES('完成');
+INSERT INTO activity_status_pl (val) VALUES('取消');
+
+drop table if exists activity_activity_types_pl;
+CREATE TABLE activity_activity_types_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO activity_activity_types_pl (val) VALUES('专业化拜访');
+INSERT INTO activity_activity_types_pl (val) VALUES('事务性拜访');
+
+drop table if exists activity_visiting_purpose_pl;
+CREATE TABLE activity_visiting_purpose_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ activity_type MEDIUMINT,
+ parentId MEDIUMINT,
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('传递产品知识',1,1);
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('处方观念沟通',1,1);
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('病例沟通',1,1);
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('会议安排',2,2);
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('会议跟进',2,2);
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('交接工作',2,2);
+INSERT INTO activity_visiting_purpose_pl (val,activity_type,parentId) VALUES('了解竞争',2,2);
+
+-- 拜访目的1
+drop table if exists sales_visiting_purpose_pl;
+CREATE TABLE sales_visiting_purpose_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO sales_visiting_purpose_pl (val) VALUES('会议安排');
+INSERT INTO sales_visiting_purpose_pl (val) VALUES('会议跟进');
+INSERT INTO sales_visiting_purpose_pl (val) VALUES('交接工作');
+INSERT INTO sales_visiting_purpose_pl (val) VALUES('了解竞争');
+
+-- 拜访目的2
+drop table if exists com_visiting_purpose_pl;
+CREATE TABLE com_visiting_purpose_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO com_visiting_purpose_pl (val) VALUES('处方观念沟通');
+INSERT INTO com_visiting_purpose_pl (val) VALUES('病例沟通');
+
+
+drop table if exists activity_feature_product_pl;
+CREATE TABLE activity_feature_product_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO activity_feature_product_pl (val) VALUES('美施康定');
+INSERT INTO activity_feature_product_pl (val) VALUES('奥施康定');
+INSERT INTO activity_feature_product_pl (val) VALUES('奇曼丁');
+INSERT INTO activity_feature_product_pl (val) VALUES('若思本');
+INSERT INTO activity_feature_product_pl (val) VALUES('奥诺美');
-- 性别;
+drop table if exists sex_pl;
+CREATE TABLE sex_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
INSERT INTO sex_pl (val) VALUES('男');
INSERT INTO sex_pl (val) VALUES('女');
-
--- 科室;
+-- 科室
+drop table if exists contact_department_pl;
+CREATE TABLE contact_department_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
INSERT INTO contact_department_pl (val) VALUES('ICU');
+INSERT INTO contact_department_pl (val) VALUES('保健科');
+INSERT INTO contact_department_pl (val) VALUES('采购科');
+INSERT INTO contact_department_pl (val) VALUES('传染科');
+INSERT INTO contact_department_pl (val) VALUES('创伤外科');
+INSERT INTO contact_department_pl (val) VALUES('儿科');
+INSERT INTO contact_department_pl (val) VALUES('耳鼻喉科');
+INSERT INTO contact_department_pl (val) VALUES('方便门诊');
+INSERT INTO contact_department_pl (val) VALUES('放化疗科');
+INSERT INTO contact_department_pl (val) VALUES('放疗科');
+INSERT INTO contact_department_pl (val) VALUES('放射科');
+INSERT INTO contact_department_pl (val) VALUES('风湿科');
+INSERT INTO contact_department_pl (val) VALUES('妇产科');
+INSERT INTO contact_department_pl (val) VALUES('妇科');
+INSERT INTO contact_department_pl (val) VALUES('肝胆外科');
+INSERT INTO contact_department_pl (val) VALUES('感染科');
+INSERT INTO contact_department_pl (val) VALUES('肛肠科');
+INSERT INTO contact_department_pl (val) VALUES('姑息科');
+INSERT INTO contact_department_pl (val) VALUES('骨科');
+INSERT INTO contact_department_pl (val) VALUES('国际医疗科');
+INSERT INTO contact_department_pl (val) VALUES('核医学科');
+INSERT INTO contact_department_pl (val) VALUES('呼吸内科');
+INSERT INTO contact_department_pl (val) VALUES('护理部');
+INSERT INTO contact_department_pl (val) VALUES('急诊科');
+INSERT INTO contact_department_pl (val) VALUES('介入科');
+INSERT INTO contact_department_pl (val) VALUES('康复科');
+INSERT INTO contact_department_pl (val) VALUES('口腔科');
+INSERT INTO contact_department_pl (val) VALUES('老干科');
+INSERT INTO contact_department_pl (val) VALUES('麻醉科');
+INSERT INTO contact_department_pl (val) VALUES('泌尿外科');
+INSERT INTO contact_department_pl (val) VALUES('脑外科');
+INSERT INTO contact_department_pl (val) VALUES('内分泌科');
INSERT INTO contact_department_pl (val) VALUES('内科');
+INSERT INTO contact_department_pl (val) VALUES('宁养院');
+INSERT INTO contact_department_pl (val) VALUES('皮肤科');
+INSERT INTO contact_department_pl (val) VALUES('普外科');
+INSERT INTO contact_department_pl (val) VALUES('乳腺外科');
+INSERT INTO contact_department_pl (val) VALUES('烧伤整形科');
+INSERT INTO contact_department_pl (val) VALUES('神经科');
+INSERT INTO contact_department_pl (val) VALUES('神经内科');
+INSERT INTO contact_department_pl (val) VALUES('神经外科');
+INSERT INTO contact_department_pl (val) VALUES('肾内科');
+INSERT INTO contact_department_pl (val) VALUES('生物治疗科');
+INSERT INTO contact_department_pl (val) VALUES('特需科');
+INSERT INTO contact_department_pl (val) VALUES('疼痛科');
INSERT INTO contact_department_pl (val) VALUES('外科');
-INSERT INTO contact_department_pl (val) VALUES('中医科');
-INSERT INTO contact_department_pl (val) VALUES('化疗科');
-INSERT INTO contact_department_pl (val) VALUES('关怀科');
-INSERT INTO contact_department_pl (val) VALUES('牙科');
-INSERT INTO contact_department_pl (val) VALUES('急症科');
-INSERT INTO contact_department_pl (val) VALUES('骨科');
-INSERT INTO contact_department_pl (val) VALUES('肝胆外科');
+INSERT INTO contact_department_pl (val) VALUES('微创科');
+INSERT INTO contact_department_pl (val) VALUES('胃肠外科');
+INSERT INTO contact_department_pl (val) VALUES('消化科');
+INSERT INTO contact_department_pl (val) VALUES('消化内科');
+INSERT INTO contact_department_pl (val) VALUES('消化外科');
+INSERT INTO contact_department_pl (val) VALUES('心内科');
+INSERT INTO contact_department_pl (val) VALUES('心胸外科');
+INSERT INTO contact_department_pl (val) VALUES('血管外科');
+INSERT INTO contact_department_pl (val) VALUES('血透室');
INSERT INTO contact_department_pl (val) VALUES('血液科');
-INSERT INTO contact_department_pl (val) VALUES('风湿科');
-INSERT INTO contact_department_pl (val) VALUES('呼吸科');
-
--- 职务;
+INSERT INTO contact_department_pl (val) VALUES('药剂科');
+INSERT INTO contact_department_pl (val) VALUES('医保办');
+INSERT INTO contact_department_pl (val) VALUES('医务科');
+INSERT INTO contact_department_pl (val) VALUES('整形美容科');
+INSERT INTO contact_department_pl (val) VALUES('质控科');
+INSERT INTO contact_department_pl (val) VALUES('中西医结合科');
+INSERT INTO contact_department_pl (val) VALUES('中医科');
+INSERT INTO contact_department_pl (val) VALUES('肿瘤科');
+INSERT INTO contact_department_pl (val) VALUES('肿瘤内科');
+INSERT INTO contact_department_pl (val) VALUES('肿瘤外科');
+INSERT INTO contact_department_pl (val) VALUES('综合科');
+INSERT INTO contact_department_pl (val) VALUES('其他');
+
+-- 行政职务;
+drop table if exists contact_duty_pl;
+CREATE TABLE contact_duty_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+
+INSERT INTO contact_duty_pl (val) VALUES('医生');
+INSERT INTO contact_duty_pl (val) VALUES('副主任');
INSERT INTO contact_duty_pl (val) VALUES('主任');
-INSERT INTO contact_duty_pl (val) VALUES('主治医师');
-INSERT INTO contact_duty_pl (val) VALUES('科室主任');
-INSERT INTO contact_duty_pl (val) VALUES('采购');
-INSERT INTO contact_duty_pl (val) VALUES('科室主任');
-INSERT INTO contact_duty_pl (val) VALUES('院长');
INSERT INTO contact_duty_pl (val) VALUES('副院长');
+INSERT INTO contact_duty_pl (val) VALUES('院长');
+INSERT INTO contact_duty_pl (val) VALUES('院长助理');
+INSERT INTO contact_duty_pl (val) VALUES('副书记');
+INSERT INTO contact_duty_pl (val) VALUES('书记');
+INSERT INTO contact_duty_pl (val) VALUES('护士');
+INSERT INTO contact_duty_pl (val) VALUES('护士长');
+INSERT INTO contact_duty_pl (val) VALUES('库管');
+INSERT INTO contact_duty_pl (val) VALUES('采购');
+INSERT INTO contact_duty_pl (val) VALUES('采购科科长');
+INSERT INTO contact_duty_pl (val) VALUES('药师');
+INSERT INTO contact_duty_pl (val) VALUES('药剂科副主任');
INSERT INTO contact_duty_pl (val) VALUES('药剂科主任');
-
--- 职称;
-INSERT INTO contact_pl3 (val) VALUES('住院医师');
-INSERT INTO contact_pl3 (val) VALUES('主治医师');
-INSERT INTO contact_pl3 (val) VALUES('副主任医师');
-INSERT INTO contact_pl3 (val) VALUES('主任医师');
-INSERT INTO contact_pl3 (val) VALUES('护士');
-INSERT INTO contact_pl3 (val) VALUES('主管护师');
-INSERT INTO contact_pl3 (val) VALUES('药师');
-INSERT INTO contact_pl3 (val) VALUES('技师');
-
-
--- 主要产品;
-INSERT INTO contact_pl4 (val) VALUES('奥施康定');
-INSERT INTO contact_pl4 (val) VALUES('奇曼丁');
-INSERT INTO contact_pl4 (val) VALUES('意施丁');
-INSERT INTO contact_pl4 (val) VALUES('综合');
-INSERT INTO contact_pl4 (val) VALUES('麻药');
-INSERT INTO contact_pl4 (val) VALUES('慢痛');
+INSERT INTO contact_duty_pl (val) VALUES('医务科副科长');
+INSERT INTO contact_duty_pl (val) VALUES('医务科科长');
+INSERT INTO contact_duty_pl (val) VALUES('医保办主任');
+INSERT INTO contact_duty_pl (val) VALUES('科教科主任');
+INSERT INTO contact_duty_pl (val) VALUES('信息科科长');
+INSERT INTO contact_duty_pl (val) VALUES('其他');
+
+
+-- 专业职务;
+drop table if exists contact_job_title_pl;
+CREATE TABLE contact_job_title_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO contact_job_title_pl (val) VALUES('住院医师');
+INSERT INTO contact_job_title_pl (val) VALUES('主治医师');
+INSERT INTO contact_job_title_pl (val) VALUES('副主任医师');
+INSERT INTO contact_job_title_pl (val) VALUES('主任医师');
+INSERT INTO contact_job_title_pl (val) VALUES('护士');
+INSERT INTO contact_job_title_pl (val) VALUES('主管护师');
+INSERT INTO contact_job_title_pl (val) VALUES('副主任护士');
+INSERT INTO contact_job_title_pl (val) VALUES('主任护师');
+INSERT INTO contact_job_title_pl (val) VALUES('药师');
+INSERT INTO contact_job_title_pl (val) VALUES('主管药师');
+INSERT INTO contact_job_title_pl (val) VALUES('副主任药师');
+INSERT INTO contact_job_title_pl (val) VALUES('主任药师');
+INSERT INTO contact_job_title_pl (val) VALUES('技师');
+INSERT INTO contact_job_title_pl (val) VALUES('主管技师');
+INSERT INTO contact_job_title_pl (val) VALUES('副主任技师');
+INSERT INTO contact_job_title_pl (val) VALUES('主任技师');
+INSERT INTO contact_job_title_pl (val) VALUES('其他');
-- 状态;
-INSERT INTO contact_pl5 (val) VALUES('有效');
-INSERT INTO contact_pl5 (val) VALUES('无效');
-
--- 医生分级
-INSERT INTO contact_pl6 (val) VALUES('A');
-INSERT INTO contact_pl6 (val) VALUES('B');
-INSERT INTO contact_pl6 (val) VALUES('C');
-INSERT INTO contact_pl6 (val) VALUES('D');
-
+drop table if exists contact_status_pl;
+CREATE TABLE contact_status_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO contact_status_pl (val) VALUES('无效');
+INSERT INTO contact_status_pl (val) VALUES('有效');
+
+-- 级别;
+drop table if exists contact_grade_pl;
+CREATE TABLE contact_grade_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO contact_grade_pl (val) VALUES('A');
+INSERT INTO contact_grade_pl (val) VALUES('B');
+INSERT INTO contact_grade_pl (val) VALUES('C');
+INSERT INTO contact_grade_pl (val) VALUES('D');
+
+drop table if exists contact_market_classification_pl;
+CREATE TABLE contact_market_classification_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO contact_market_classification_pl (val) VALUES ('战略城市');
+INSERT INTO contact_market_classification_pl (val) VALUES('一级城市');
+INSERT INTO contact_market_classification_pl (val) VALUES('二级城市');
+INSERT INTO contact_market_classification_pl (val) VALUES('三级城市');
+INSERT INTO contact_market_classification_pl (val) VALUES('四级城市');
+
+
+drop table if exists contact_generalization_target_pl;
+CREATE TABLE contact_generalization_target_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO contact_generalization_target_pl (val) VALUES ('美施康定');
+INSERT INTO contact_generalization_target_pl (val) VALUES('奥施康定');
+INSERT INTO contact_generalization_target_pl (val) VALUES('奇曼丁');
+INSERT INTO contact_generalization_target_pl (val) VALUES('若思本');
+INSERT INTO contact_generalization_target_pl (val) VALUES('奥诺美');
+
+
+-- pick list for crmuser
-- 状态;
-INSERT INTO crmuser_pl1 (val) VALUES('有效');
-INSERT INTO crmuser_pl1 (val) VALUES('无效');
+drop table if exists crmuser_pl1;
+CREATE TABLE crmuser_pl1
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO `crmuser_pl1` (val) VALUES ('无效');
+INSERT INTO `crmuser_pl1` (val) VALUES ('有效');
-- 产品线;
-INSERT INTO crmuser_pl2 (val) VALUES('麻药');
-INSERT INTO crmuser_pl2 (val) VALUES('慢痛');
-INSERT INTO crmuser_pl2 (val) VALUES('全部');
-
-
--- 角色;
-INSERT INTO role (val) VALUES('高级用户');
-INSERT INTO role (val) VALUES('主管');
-INSERT INTO role (val) VALUES('销售代表');
--- INSERT INTO role (val) VALUES('区域经理');
--- INSERT INTO role (val) VALUES('服务经理');
-
+drop table if exists crmuser_pl2;
+CREATE TABLE crmuser_pl2
+(
+ id MEDIUMINT NOT NULL,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+-- 产品线;
+INSERT INTO crmuser_pl2 (id,val) VALUES(1,'麻药');
+INSERT INTO crmuser_pl2 (id,val) VALUES(2,'慢痛');
+INSERT INTO crmuser_pl2 (id,val) VALUES(3,'奥诺美');
+INSERT INTO crmuser_pl2 (id,val) VALUES(4,'全部');
+
+
+-- 角色;
+drop table if exists role;
+CREATE TABLE role
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+INSERT INTO `role` (val) VALUES ('管理员');
+INSERT INTO `role` (val) VALUES ('销售经理');
+INSERT INTO `role` (val) VALUES ('销售代表');
+
+-- 一级区域;
+drop table if exists region_level1_pl;
+CREATE TABLE region_level1_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
--- 一级区域;
INSERT INTO region_level1_pl (val) VALUES('北中国');
INSERT INTO region_level1_pl (val) VALUES('南中国');
INSERT INTO region_level1_pl (val) VALUES('东中国');
--- 二级区域;
+-- 二级区域;
+drop table if exists region_level2_pl;
+CREATE TABLE region_level2_pl
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
INSERT INTO region_level2_pl (val) VALUES('华北');
INSERT INTO region_level2_pl (val) VALUES('西北');
INSERT INTO region_level2_pl (val) VALUES('东北');
@@ -120,28 +470,106 @@ INSERT INTO region_level2_pl (val) VALUES('华南');
INSERT INTO region_level2_pl (val) VALUES('华中');
INSERT INTO region_level2_pl (val) VALUES('华东');
+-- END of pick list for crmuser
+
+drop table if exists city;
+CREATE TABLE city
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ name VARCHAR(255) NOT NULL,
+ provinceId VARCHAR(255) NOT NULL,
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+
+drop table if exists province;
+CREATE TABLE province
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ name VARCHAR(255) NOT NULL,
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+
+
-- 拜访类型
INSERT INTO activity_types (val) VALUES('拜访');
INSERT INTO activity_types (val) VALUES('外部会议');
INSERT INTO activity_types (val) VALUES('内部会议');
+DROP TABLE IF EXISTS `score1_pl`;
+CREATE TABLE `score1_pl` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `score1_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15');
--- 拜访状态
-INSERT INTO activity_status (val) VALUES('计划');
-INSERT INTO activity_status (val) VALUES('完成');
+DROP TABLE IF EXISTS `score2_pl`;
+CREATE TABLE `score2_pl` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `score2_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15'),(16,'16'),(17,'17'),(18,'18'),(19,'19'),(20,'20');
--- ramdom update table
-UPDATE activity SET contactId = FLOOR(78* RAND()+1);
+DROP TABLE IF EXISTS `crmuser_activited`;
+CREATE TABLE `crmdb`.`crmuser_activited` (
+ `id` MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB;
+INSERT INTO `crmdb`.`crmuser_activited` (`id`, `val`) VALUES ('1', '已激活');
+INSERT INTO `crmdb`.`crmuser_activited` (`id`, `val`) VALUES ('2', '未激活');
-INSERT INTO contactcrmuser (contactId,crmuserId) VALUES(FLOOR(78* RAND()+1),20);
+DROP TABLE IF EXISTS `area`;
+DROP TABLE IF EXISTS `city`;
+DROP TABLE IF EXISTS `province`;
+
+DROP TABLE IF EXISTS `area`;
+CREATE TABLE `area` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ `parentId` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `area_parentid_cons` FOREIGN KEY (`parentId`) REFERENCES `city` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE InnoDB;
+DROP TABLE IF EXISTS `city`;
+CREATE TABLE `city` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ `parentId` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ CONSTRAINT `city_parentid_cons` FOREIGN KEY (`parentId`) REFERENCES `province` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE InnoDB;
+
+DROP TABLE IF EXISTS `province`;
+CREATE TABLE `province` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE InnoDB;
+
+
+insert into crmuser (id,name) values(-1,"dummy");
+insert into account (id,name) values(-1,"dummy");
+insert into contact (id,name,accountId) values(-1,"dummy",-1);
+
+
+
+
+
+-- ramdom update table for testing purpose
+UPDATE activity SET contactId = FLOOR(78* RAND()+1);
+INSERT INTO contactcrmuser (contactId,crmuserId) VALUES(FLOOR(78* RAND()+1),20);
UPDATE crmuser SET loginName = FLOOR(1000000* RAND()+1000);
UPDATE crmuser SET password = FLOOR(1000000* RAND()+1000);
UPDATE crmuser SET sessionKey = FLOOR(1000000* RAND()+1000);
-
diff --git a/crm/src/main/db/setup.sql b/crm/src/main/db/setup.sql
index c8c3930..f89b7ba 100644
--- a/crm/src/main/db/setup.sql
+++ b/crm/src/main/db/setup.sql
@@ -1,6 +1,13 @@
-
USE crmdb;
+drop table if exists accountcrmuser;
+drop table if exists activitycrmuser;
+drop table if exists contactcrmuser;
+drop table if exists activity;
+drop table if exists contact;
+drop table if exists crmuser;
+drop table if exists account;
+
drop table if exists account;
CREATE TABLE account
(
@@ -32,8 +39,8 @@ CREATE TABLE account
tel VARCHAR(255),
fax VARCHAR(255),
market_classification MEDIUMINT,
- province VARCHAR(255),
- city VARCHAR(255),
+ province int(11),
+ city int(11),
districts VARCHAR(255),
address VARCHAR(255),
owner VARCHAR(255),
@@ -41,124 +48,38 @@ CREATE TABLE account
modifier VARCHAR(255),
modify_datetime DATETIME,
responsible_person VARCHAR(255),
+ UNIQUE INDEX `account_ix_01` (`bdm_code` ASC),
PRIMARY KEY USING BTREE (id)
) ENGINE InnoDB;
-drop table if exists boolean_pl;
-CREATE TABLE boolean_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO boolean_pl (val) VALUES('是');
-INSERT INTO boolean_pl (val) VALUES('否');
-
--- 医院行政级别
-drop table if exists account_administrativ_level_pl;
-CREATE TABLE account_administrativ_level_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_administrativ_level_pl (val) VALUES('一级');
-INSERT INTO account_administrativ_level_pl (val) VALUES('一级甲等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('一级乙等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('一级丙等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('二级');
-INSERT INTO account_administrativ_level_pl (val) VALUES('二级甲等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('二级乙等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('二级丙等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('三级');
-INSERT INTO account_administrativ_level_pl (val) VALUES('三级甲等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('三级乙等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('三级丙等');
-INSERT INTO account_administrativ_level_pl (val) VALUES('未评级未评等');
-
--- 医院分级
-drop table if exists account_grade_pl;
-CREATE TABLE account_grade_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_grade_pl (val) VALUES('A');
-INSERT INTO account_grade_pl (val) VALUES('B');
-INSERT INTO account_grade_pl (val) VALUES('C');
-INSERT INTO account_grade_pl (val) VALUES('D');
-
-
--- 医院状态
-drop table if exists account_status_pl;
-CREATE TABLE account_status_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_status_pl (val) VALUES ('无效');
-INSERT INTO account_status_pl (val) VALUES('有效');
-
-
-drop table if exists account_local_or_army_pl;
-CREATE TABLE account_local_or_army_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_local_or_army_pl (val) VALUES ('地方医院');
-INSERT INTO account_local_or_army_pl (val) VALUES('部队医院');
-
-drop table if exists account_comprehensive_or_specialized_pl;
-CREATE TABLE account_comprehensive_or_specialized_pl
+drop table if exists crmuser;
+CREATE TABLE crmuser
(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ name VARCHAR(255) NOT NULL,
+ code varchar(255),
+ reportto MEDIUMINT,
+ role MEDIUMINT,
+ pl1 MEDIUMINT,
+ pl2 MEDIUMINT,
+ pl4 MEDIUMINT,
+ pl5 MEDIUMINT,
+ city VARCHAR(255),
+ department VARCHAR(255),
+ whenadded DATETIME,
+ modifier VARCHAR(255),
+ modify_datetime date,
+ owner VARCHAR(255),
+ level MEDIUMINT,
+ PRIMARY KEY USING BTREE (id)
) ENGINE InnoDB;
-INSERT INTO account_comprehensive_or_specialized_pl (val) VALUES ('综合医院');
-INSERT INTO account_comprehensive_or_specialized_pl (val) VALUES('专科医院');
+insert into crmuser (id,name,code,reportto,role) values
+(-1,'无','BJ',0,-1),
+(1,'管理员','BJ231011001',-1,1),
+(2,'北区地区经理01','BJ131011001',1,2),
+(3,'北区代表001','BJ131001001',2,3);
-drop table if exists account_market_classification_pl;
-CREATE TABLE account_market_classification_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_market_classification_pl (val) VALUES ('战略城市');
-INSERT INTO account_market_classification_pl (val) VALUES('一级城市');
-INSERT INTO account_market_classification_pl (val) VALUES('二级城市');
-INSERT INTO account_market_classification_pl (val) VALUES('三级城市');
-INSERT INTO account_market_classification_pl (val) VALUES('四级城市');
-
-drop table if exists account_type_pl;
-CREATE TABLE account_type_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_type_pl (val) VALUES ('癌痛目标医院');
-INSERT INTO account_type_pl (val) VALUES('慢痛目标医院');
-INSERT INTO account_type_pl (val) VALUES('奥诺美目标医院');
-INSERT INTO account_type_pl (val) VALUES('非目标医院');
-
-drop table if exists account_point_pl;
-CREATE TABLE account_point_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO account_point_pl (val) VALUES ('癌痛重点医院');
-INSERT INTO account_point_pl (val) VALUES('慢痛重点医院');
-INSERT INTO account_point_pl (val) VALUES('奥诺美重点医院');
-INSERT INTO account_point_pl (val) VALUES('非重点医院');
drop table if exists accountcrmuser;
CREATE TABLE accountcrmuser
@@ -167,38 +88,44 @@ CREATE TABLE accountcrmuser
accountId MEDIUMINT NOT NULL,
crmuserId MEDIUMINT NOT NULL,
UNIQUE KEY(accountId,crmuserId),
- PRIMARY KEY USING BTREE (id)
+ PRIMARY KEY USING BTREE (id),
+ CONSTRAINT `account_crmuser_cons` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `account_crmuser_cons2` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE InnoDB;
-drop table if exists externalMeeting;
-CREATE TABLE externalMeeting
+drop table if exists contact;
+CREATE TABLE contact
(
id MEDIUMINT NOT NULL AUTO_INCREMENT,
- crmuserId MEDIUMINT NOT NULL,
- endtime BIGINT,
- starttime BIGINT NOT NULL DEFAULT 0,
- title VARCHAR(128),
- contactIds VARCHAR(512),
- status MEDIUMINT,
- activity_type MEDIUMINT,
- PRIMARY KEY USING BTREE (id)
+ name VARCHAR(255) NOT NULL,
+ accountId MEDIUMINT NOT NULL,
+ department VARCHAR(255),
+ sex MEDIUMINT,
+ native_place VARCHAR(255),
+ office_tel VARCHAR(255),
+ office_fax VARCHAR(255),
+ cellphone VARCHAR(255),
+ email VARCHAR(255),
+ status VARCHAR(255),
+ market_classification MEDIUMINT,
+ grade MEDIUMINT,
+ province int(11),
+ city int(11),
+ districts VARCHAR(255),
+ duty MEDIUMINT,
+ job_title MEDIUMINT,
+ visiting_target MEDIUMINT,
+ product_target VARCHAR(255),
+ owner VARCHAR(255),
+ whenadded DATETIME,
+ modifier VARCHAR(255),
+ modify_datetime DATETIME,
+ responsible_person VARCHAR(255),
+ PRIMARY KEY USING BTREE (id),
+ CONSTRAINT `account_id_cons` FOREIGN KEY (`accountId`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE InnoDB;
-ALTER table externalMeeting ADD coachId MEDIUMINT;
-drop table if exists internalMeeting;
-CREATE TABLE internalMeeting
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- crmuserId MEDIUMINT NOT NULL,
- endtime BIGINT,
- starttime BIGINT NOT NULL DEFAULT 0,
- title VARCHAR(128),
- contactId MEDIUMINT,
- crmusermanagerId MEDIUMINT,
- status MEDIUMINT,
- activity_type MEDIUMINT,
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
+
drop table if exists activity;
CREATE TABLE activity
@@ -213,6 +140,7 @@ CREATE TABLE activity
participants VARCHAR(512),
activity_type MEDIUMINT,
contactId MEDIUMINT,
+ coacheeId int(32),
status MEDIUMINT,
visiting_purpose MEDIUMINT,
feature_product MEDIUMINT,
@@ -222,96 +150,19 @@ CREATE TABLE activity
modifier VARCHAR(255),
modify_datetime DATETIME,
responsible_person VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
--- 类型
-drop table if exists activity_event_type_pl;
-CREATE TABLE activity_event_type_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO activity_event_type_pl (val) VALUES('拜访');
-INSERT INTO activity_event_type_pl (val) VALUES('辅导');
-
--- 活动状态;
-drop table if exists activity_status_pl;
-CREATE TABLE activity_status_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO activity_status_pl (val) VALUES('计划');
-INSERT INTO activity_status_pl (val) VALUES('完成');
-INSERT INTO activity_status_pl (val) VALUES('取消');
-
-drop table if exists activity_activity_types_pl;
-CREATE TABLE activity_activity_types_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO activity_activity_types_pl (val) VALUES('专业化拜访');
-INSERT INTO activity_activity_types_pl (val) VALUES('事务性拜访');
-
-drop table if exists activity_visiting_purpose_pl;
-CREATE TABLE activity_visiting_purpose_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- activity_type MEDIUMINT,
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('传递产品知识',1);
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('处方观念沟通',1);
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('病例沟通',1);
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('会议安排',2);
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('会议跟进',2);
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('交接工作',2);
-INSERT INTO activity_visiting_purpose_pl (val,activity_type) VALUES('了解竞争',2);
-
--- 拜访目的1
-drop table if exists sales_visiting_purpose_pl;
-CREATE TABLE sales_visiting_purpose_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO sales_visiting_purpose_pl (val) VALUES('会议安排');
-INSERT INTO sales_visiting_purpose_pl (val) VALUES('会议跟进');
-INSERT INTO sales_visiting_purpose_pl (val) VALUES('交接工作');
-INSERT INTO sales_visiting_purpose_pl (val) VALUES('了解竞争');
-
--- 拜访目的2
-drop table if exists com_visiting_purpose_pl;
-CREATE TABLE com_visiting_purpose_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
+ coach int(32),
+ location VARCHAR(255),
+ total_score MEDIUMINT,
+ planing MEDIUMINT,
+ openling MEDIUMINT,
+ enquery_listening MEDIUMINT,
+ deliverable MEDIUMINT,
+ objection_handing MEDIUMINT,
+ summary MEDIUMINT,
+ PRIMARY KEY USING BTREE (id),
+ CONSTRAINT `crmuserId_activity_cons` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `contactId_activity_cons` FOREIGN KEY (`contactId`) REFERENCES `contact` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE InnoDB;
-INSERT INTO com_visiting_purpose_pl (val) VALUES('处方观念沟通');
-INSERT INTO com_visiting_purpose_pl (val) VALUES('病例沟通');
-
-
-drop table if exists activity_feature_product_pl;
-CREATE TABLE activity_feature_product_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO activity_feature_product_pl (val) VALUES('美施康定');
-INSERT INTO activity_feature_product_pl (val) VALUES('奥施康定');
-INSERT INTO activity_feature_product_pl (val) VALUES('奇曼丁');
-INSERT INTO activity_feature_product_pl (val) VALUES('若思本');
-INSERT INTO activity_feature_product_pl (val) VALUES('奥诺美');
-
drop table if exists activitycrmuser;
CREATE TABLE activitycrmuser
@@ -320,237 +171,11 @@ CREATE TABLE activitycrmuser
activityId MEDIUMINT NOT NULL,
crmuserId MEDIUMINT NOT NULL,
UNIQUE KEY(activityId,crmuserId),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
-drop table if exists contact;
-CREATE TABLE contact
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
- accountId MEDIUMINT NOT NULL,
- department VARCHAR(255),
- sex MEDIUMINT,
- native_place VARCHAR(255),
- office_tel VARCHAR(255),
- office_fax VARCHAR(255),
- cellphone VARCHAR(255),
- email VARCHAR(255),
- status VARCHAR(255),
- market_classification MEDIUMINT,
- grade MEDIUMINT,
- province VARCHAR(255),
- city VARCHAR(255),
- districts VARCHAR(255),
- duty MEDIUMINT,
- job_title MEDIUMINT,
- visiting_target MEDIUMINT,
- product_target VARCHAR(255),
- owner VARCHAR(255),
- whenadded DATETIME,
- modifier VARCHAR(255),
- modify_datetime DATETIME,
- responsible_person VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
-
--- 性别;
-drop table if exists sex_pl;
-CREATE TABLE sex_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO sex_pl (val) VALUES('男');
-INSERT INTO sex_pl (val) VALUES('女');
--- 科室
-drop table if exists contact_department_pl;
-CREATE TABLE contact_department_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO contact_department_pl (val) VALUES('ICU');
-INSERT INTO contact_department_pl (val) VALUES('保健科');
-INSERT INTO contact_department_pl (val) VALUES('采购科');
-INSERT INTO contact_department_pl (val) VALUES('传染科');
-INSERT INTO contact_department_pl (val) VALUES('创伤外科');
-INSERT INTO contact_department_pl (val) VALUES('儿科');
-INSERT INTO contact_department_pl (val) VALUES('耳鼻喉科');
-INSERT INTO contact_department_pl (val) VALUES('方便门诊');
-INSERT INTO contact_department_pl (val) VALUES('放化疗科');
-INSERT INTO contact_department_pl (val) VALUES('放疗科');
-INSERT INTO contact_department_pl (val) VALUES('放射科');
-INSERT INTO contact_department_pl (val) VALUES('风湿科');
-INSERT INTO contact_department_pl (val) VALUES('妇产科');
-INSERT INTO contact_department_pl (val) VALUES('妇科');
-INSERT INTO contact_department_pl (val) VALUES('肝胆外科');
-INSERT INTO contact_department_pl (val) VALUES('感染科');
-INSERT INTO contact_department_pl (val) VALUES('肛肠科');
-INSERT INTO contact_department_pl (val) VALUES('姑息科');
-INSERT INTO contact_department_pl (val) VALUES('骨科');
-INSERT INTO contact_department_pl (val) VALUES('国际医疗科');
-INSERT INTO contact_department_pl (val) VALUES('核医学科');
-INSERT INTO contact_department_pl (val) VALUES('呼吸内科');
-INSERT INTO contact_department_pl (val) VALUES('护理部');
-INSERT INTO contact_department_pl (val) VALUES('急诊科');
-INSERT INTO contact_department_pl (val) VALUES('介入科');
-INSERT INTO contact_department_pl (val) VALUES('康复科');
-INSERT INTO contact_department_pl (val) VALUES('口腔科');
-INSERT INTO contact_department_pl (val) VALUES('老干科');
-INSERT INTO contact_department_pl (val) VALUES('麻醉科');
-INSERT INTO contact_department_pl (val) VALUES('泌尿外科');
-INSERT INTO contact_department_pl (val) VALUES('脑外科');
-INSERT INTO contact_department_pl (val) VALUES('内分泌科');
-INSERT INTO contact_department_pl (val) VALUES('内科');
-INSERT INTO contact_department_pl (val) VALUES('宁养院');
-INSERT INTO contact_department_pl (val) VALUES('皮肤科');
-INSERT INTO contact_department_pl (val) VALUES('普外科');
-INSERT INTO contact_department_pl (val) VALUES('乳腺外科');
-INSERT INTO contact_department_pl (val) VALUES('烧伤整形科');
-INSERT INTO contact_department_pl (val) VALUES('神经科');
-INSERT INTO contact_department_pl (val) VALUES('神经内科');
-INSERT INTO contact_department_pl (val) VALUES('神经外科');
-INSERT INTO contact_department_pl (val) VALUES('肾内科');
-INSERT INTO contact_department_pl (val) VALUES('生物治疗科');
-INSERT INTO contact_department_pl (val) VALUES('特需科');
-INSERT INTO contact_department_pl (val) VALUES('疼痛科');
-INSERT INTO contact_department_pl (val) VALUES('外科');
-INSERT INTO contact_department_pl (val) VALUES('微创科');
-INSERT INTO contact_department_pl (val) VALUES('胃肠外科');
-INSERT INTO contact_department_pl (val) VALUES('消化科');
-INSERT INTO contact_department_pl (val) VALUES('消化内科');
-INSERT INTO contact_department_pl (val) VALUES('消化外科');
-INSERT INTO contact_department_pl (val) VALUES('心内科');
-INSERT INTO contact_department_pl (val) VALUES('心胸外科');
-INSERT INTO contact_department_pl (val) VALUES('血管外科');
-INSERT INTO contact_department_pl (val) VALUES('血透室');
-INSERT INTO contact_department_pl (val) VALUES('血液科');
-INSERT INTO contact_department_pl (val) VALUES('药剂科');
-INSERT INTO contact_department_pl (val) VALUES('医保办');
-INSERT INTO contact_department_pl (val) VALUES('医务科');
-INSERT INTO contact_department_pl (val) VALUES('整形美容科');
-INSERT INTO contact_department_pl (val) VALUES('质控科');
-INSERT INTO contact_department_pl (val) VALUES('中西医结合科');
-INSERT INTO contact_department_pl (val) VALUES('中医科');
-INSERT INTO contact_department_pl (val) VALUES('肿瘤科');
-INSERT INTO contact_department_pl (val) VALUES('肿瘤内科');
-INSERT INTO contact_department_pl (val) VALUES('肿瘤外科');
-INSERT INTO contact_department_pl (val) VALUES('综合科');
-INSERT INTO contact_department_pl (val) VALUES('其他');
-
--- 行政职务;
-drop table if exists contact_duty_pl;
-CREATE TABLE contact_duty_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
-INSERT INTO contact_duty_pl (val) VALUES('医生');
-INSERT INTO contact_duty_pl (val) VALUES('副主任');
-INSERT INTO contact_duty_pl (val) VALUES('主任');
-INSERT INTO contact_duty_pl (val) VALUES('副院长');
-INSERT INTO contact_duty_pl (val) VALUES('院长');
-INSERT INTO contact_duty_pl (val) VALUES('院长助理');
-INSERT INTO contact_duty_pl (val) VALUES('副书记');
-INSERT INTO contact_duty_pl (val) VALUES('书记');
-INSERT INTO contact_duty_pl (val) VALUES('护士');
-INSERT INTO contact_duty_pl (val) VALUES('护士长');
-INSERT INTO contact_duty_pl (val) VALUES('库管');
-INSERT INTO contact_duty_pl (val) VALUES('采购');
-INSERT INTO contact_duty_pl (val) VALUES('采购科科长');
-INSERT INTO contact_duty_pl (val) VALUES('药师');
-INSERT INTO contact_duty_pl (val) VALUES('药剂科副主任');
-INSERT INTO contact_duty_pl (val) VALUES('药剂科主任');
-INSERT INTO contact_duty_pl (val) VALUES('医务科副科长');
-INSERT INTO contact_duty_pl (val) VALUES('医务科科长');
-INSERT INTO contact_duty_pl (val) VALUES('医保办主任');
-INSERT INTO contact_duty_pl (val) VALUES('科教科主任');
-INSERT INTO contact_duty_pl (val) VALUES('信息科科长');
-INSERT INTO contact_duty_pl (val) VALUES('其他');
-
-
--- 专业职务;
-drop table if exists contact_job_title_pl;
-CREATE TABLE contact_job_title_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO contact_job_title_pl (val) VALUES('住院医师');
-INSERT INTO contact_job_title_pl (val) VALUES('主治医师');
-INSERT INTO contact_job_title_pl (val) VALUES('副主任医师');
-INSERT INTO contact_job_title_pl (val) VALUES('主任医师');
-INSERT INTO contact_job_title_pl (val) VALUES('护士');
-INSERT INTO contact_job_title_pl (val) VALUES('主管护师');
-INSERT INTO contact_job_title_pl (val) VALUES('副主任护士');
-INSERT INTO contact_job_title_pl (val) VALUES('主任护师');
-INSERT INTO contact_job_title_pl (val) VALUES('药师');
-INSERT INTO contact_job_title_pl (val) VALUES('主管药师');
-INSERT INTO contact_job_title_pl (val) VALUES('副主任药师');
-INSERT INTO contact_job_title_pl (val) VALUES('主任药师');
-INSERT INTO contact_job_title_pl (val) VALUES('技师');
-INSERT INTO contact_job_title_pl (val) VALUES('主管技师');
-INSERT INTO contact_job_title_pl (val) VALUES('副主任技师');
-INSERT INTO contact_job_title_pl (val) VALUES('主任技师');
-INSERT INTO contact_job_title_pl (val) VALUES('其他');
-
--- 状态;
-drop table if exists contact_status_pl;
-CREATE TABLE contact_status_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO contact_status_pl (val) VALUES('无效');
-INSERT INTO contact_status_pl (val) VALUES('有效');
-
--- 级别;
-drop table if exists contact_grade_pl;
-CREATE TABLE contact_grade_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
+ PRIMARY KEY USING BTREE (id),
+ CONSTRAINT `crm_activity_cons` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ,
+ CONSTRAINT `crm_activity_cons2` FOREIGN KEY (`activityId`) REFERENCES `activity` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE InnoDB;
-INSERT INTO contact_grade_pl (val) VALUES('A');
-INSERT INTO contact_grade_pl (val) VALUES('B');
-INSERT INTO contact_grade_pl (val) VALUES('C');
-INSERT INTO contact_grade_pl (val) VALUES('D');
-drop table if exists contact_market_classification_pl;
-CREATE TABLE contact_market_classification_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO contact_market_classification_pl (val) VALUES ('战略城市');
-INSERT INTO contact_market_classification_pl (val) VALUES('一级城市');
-INSERT INTO contact_market_classification_pl (val) VALUES('二级城市');
-INSERT INTO contact_market_classification_pl (val) VALUES('三级城市');
-INSERT INTO contact_market_classification_pl (val) VALUES('四级城市');
-
-
-drop table if exists contact_generalization_target_pl;
-CREATE TABLE contact_generalization_target_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO contact_generalization_target_pl (val) VALUES ('美施康定');
-INSERT INTO contact_generalization_target_pl (val) VALUES('奥施康定');
-INSERT INTO contact_generalization_target_pl (val) VALUES('奇曼丁');
-INSERT INTO contact_generalization_target_pl (val) VALUES('若思本');
-INSERT INTO contact_generalization_target_pl (val) VALUES('奥诺美');
drop table if exists contactcrmuser;
CREATE TABLE contactcrmuser
@@ -559,152 +184,160 @@ CREATE TABLE contactcrmuser
contactId MEDIUMINT NOT NULL,
crmuserId MEDIUMINT NOT NULL,
UNIQUE KEY(contactId,crmuserId),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
-
-drop table if exists crmuser;
-CREATE TABLE crmuser
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
- department VARCHAR(255),
- division VARCHAR(255),
- cellPhone VARCHAR(255),
- email VARCHAR(255),
- employeeNumber VARCHAR(255),
- photo VARCHAR(255),
- jobTitle VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-ALTER table crmuser ADD pl1 MEDIUMINT;
-ALTER table crmuser ADD pl2 MEDIUMINT;
-ALTER table crmuser ADD role MEDIUMINT;
-ALTER table crmuser ADD pl4 MEDIUMINT;
-ALTER table crmuser ADD pl5 MEDIUMINT;
-ALTER table crmuser ADD sex MEDIUMINT;
-ALTER table crmuser ADD loginName VARCHAR(255);
-ALTER table crmuser ADD password VARCHAR(255);
-ALTER table crmuser ADD sessionKey VARCHAR(255);
-ALTER table crmuser ADD lastLoginTime BIGINT;
-ALTER table crmuser ADD whenadded DATETIME;
-ALTER table crmuser ADD reportto MEDIUMINT;
-ALTER table crmuser ADD parcel VARCHAR(255);
-ALTER table crmuser ADD modifier VARCHAR(255);
-ALTER table crmuser ADD modify_datetime date;
-ALTER table crmuser ADD owner VARCHAR(255);
-ALTER table crmuser ADD postId VARCHAR(255);
-ALTER table crmuser ADD city VARCHAR(255);
--- pick list for crmuser
--- 状态;
-drop table if exists crmuser_pl1;
-CREATE TABLE crmuser_pl1
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO `crmuser_pl1` (val) VALUES ('无效');
-INSERT INTO `crmuser_pl1` (val) VALUES ('有效');
--- 产品线;
-drop table if exists crmuser_pl2;
-CREATE TABLE crmuser_pl2
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
--- 角色;
-drop table if exists role;
-CREATE TABLE role
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-INSERT INTO `role` (val) VALUES ('管理员');
-INSERT INTO `role` (val) VALUES ('销售经理');
-INSERT INTO `role` (val) VALUES ('销售代表');
--- 一级区域;
-drop table if exists region_level1_pl;
-CREATE TABLE region_level1_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
--- 二级区域;
-drop table if exists region_level2_pl;
-CREATE TABLE region_level2_pl
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- val VARCHAR(255),
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-
--- END of pick list for crmuser
+ PRIMARY KEY USING BTREE (id),
+ CONSTRAINT `crm_contact_cons1` FOREIGN KEY (`crmuserId`) REFERENCES `crmuser` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `crm_contact_cons2` FOREIGN KEY (`contactId`) REFERENCES `contact` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE InnoDB;
+
+
+
+drop table if exists user_position;
+create table user_position (
+ id mediumint(9) auto_increment,
+ userId int(32),
+ positionId int(32),
+ primary key (id),
+ unique index user_position_unique (userId,positionId)
+)ENGINE InnoDB;
+
+DROP TABLE IF EXISTS userInfo;
+CREATE TABLE userInfo (
+ id mediumint(9) NOT NULL AUTO_INCREMENT,
+ name varchar(255) NOT NULL,
+ department varchar(255) DEFAULT NULL,
+ division varchar(255) DEFAULT NULL,
+ cellPhone varchar(255) DEFAULT NULL,
+ email varchar(255) DEFAULT NULL,
+ employeeNumber varchar(255) DEFAULT NULL,
+ photo varchar(255) DEFAULT NULL,
+ jobTitle varchar(255) DEFAULT NULL,
+ pl1 mediumint(9) DEFAULT NULL,
+ pl2 mediumint(9) DEFAULT NULL,
+ role mediumint(9) DEFAULT NULL,
+ pl4 mediumint(9) DEFAULT NULL,
+ pl5 mediumint(9) DEFAULT NULL,
+ sex mediumint(9) DEFAULT NULL,
+ loginName varchar(255) DEFAULT NULL,
+ password varchar(255) DEFAULT NULL,
+ sessionKey varchar(255) DEFAULT NULL,
+ lastLoginTime bigint(20) DEFAULT NULL,
+ whenadded datetime DEFAULT NULL,
+ parcel varchar(255) DEFAULT NULL,
+ modifier varchar(255) DEFAULT NULL,
+ modify_datetime datetime DEFAULT NULL,
+ owner varchar(255) DEFAULT NULL,
+ province int(11),
+ city int(11),
+ isActivited mediumint(9) DEFAULT NULL,
+ ts bigint(20) DEFAULT NULL,
+ positionId mediumint(9) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE InnoDB;
+
+INSERT INTO `userInfo` (id,name,loginname,password,role,isActivited,ts,positionId,pl1) VALUES
+(-1,'无','dummy','827ccb0eea8a706c4c34a16891f84e7b',1,2,1386766666,-1,1),
+(1,'Admin Nam','admin','827ccb0eea8a706c4c34a16891f84e7b',1,2,1386766666,1,1),
+(2,'Sales Manager','salesman','827ccb0eea8a706c4c34a16891f84e7b',2,2,1386766666,2,1),
+(3,'Sales','sales','827ccb0eea8a706c4c34a16891f84e7b',3,2,1386766666,3,1);
-drop table if exists city;
-CREATE TABLE city
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
- provinceId VARCHAR(255) NOT NULL,
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
-drop table if exists province;
-CREATE TABLE province
+drop table if exists externalMeeting;
+CREATE TABLE externalMeeting
(
id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
+ crmuserId MEDIUMINT NOT NULL,
+ endtime BIGINT,
+ starttime BIGINT NOT NULL DEFAULT 0,
+ title VARCHAR(128),
+ contactIds VARCHAR(512),
+ status MEDIUMINT,
+ activity_type MEDIUMINT,
PRIMARY KEY USING BTREE (id)
) ENGINE InnoDB;
+ALTER table externalMeeting ADD coachId MEDIUMINT;
-
-
-drop table if exists dealerAccount;
-CREATE TABLE dealerAccount
+drop table if exists internalMeeting;
+CREATE TABLE internalMeeting
(
id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
- address VARCHAR(255),
- tele VARCHAR(255),
+ crmuserId MEDIUMINT NOT NULL,
+ endtime BIGINT,
+ starttime BIGINT NOT NULL DEFAULT 0,
+ title VARCHAR(128),
+ contactId MEDIUMINT,
+ crmusermanagerId MEDIUMINT,
status MEDIUMINT,
- pl1 MEDIUMINT,
- pl2 MEDIUMINT,
+ activity_type MEDIUMINT,
PRIMARY KEY USING BTREE (id)
) ENGINE InnoDB;
-ALTER table dealerAccount ADD whenadded DATETIME;
-drop table if exists dealerContact;
-CREATE TABLE dealerContact
+DROP TABLE IF EXISTS `data_exchange_teample`;
+DROP TABLE IF EXISTS `data_exchange_operation`;
+DROP TABLE IF EXISTS data_exchange_status;
+DROP TABLE IF EXISTS `record_type`;
+
+DROP TABLE IF EXISTS `record_type`;
+CREATE TABLE `record_type` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `version` bigint(20) NOT NULL,
+ `val` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `val` (`val`)
+) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+INSERT INTO `record_type` VALUES (1,0,'Account'),(2,0,'Contact'),(3,0,'Call'),(4,0,'Coaching'),(5,0,'AccuntTeam'),(6,0,'ContactTeam');
+
+DROP TABLE IF EXISTS data_exchange_status;
+CREATE TABLE data_exchange_status (
+ id bigint(20) NOT NULL AUTO_INCREMENT,
+ version bigint(20) NOT NULL,
+ val varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `val` (`val`)
+) ENGINE=InnoDB;
+INSERT INTO `data_exchange_status` VALUES (1,0,'Pending'),(2,0,'Abort'),(3,0,'Completed'),(4,0,'Cancelled');
+
+DROP TABLE IF EXISTS `data_exchange_operation`;
+CREATE TABLE `data_exchange_operation` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `version` bigint(20) NOT NULL,
+ `val` varchar(255) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `val` (`val`)
+) ENGINE=InnoDB;
+INSERT INTO `data_exchange_operation` VALUES (1,0,'Import'),(2,0,'Export');
+
+
+DROP TABLE IF EXISTS `data_exchange_teample`;
+CREATE TABLE `data_exchange_teample` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `version` bigint(20) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `operation_id` bigint(20) NOT NULL,
+ `type_id` bigint(20) NOT NULL,
+ `template` longtext NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `name` (`name`),
+ KEY `FK8AE35445D557144C` (`type_id`),
+ KEY `FK8AE35445199BCB6C` (`operation_id`),
+ CONSTRAINT `FK8AE35445199BCB6C` FOREIGN KEY (`operation_id`) REFERENCES `data_exchange_operation` (`id`),
+ CONSTRAINT `FK8AE35445D557144C` FOREIGN KEY (`type_id`) REFERENCES `record_type` (`id`)
+) ENGINE=InnoDB;
+
+INSERT INTO `data_exchange_teample` VALUES (1,1,'Account Full Import Template 1.0',1,1,'\r\n\r\n 1000 \r\n Account \r\n BdmCode \r\n account.csv \r\n crm_mysql \r\n \r\n 记录行ID \r\n String \r\n BdmCode \r\n \r\n \r\n \r\n 年诊疗人数 \r\n Integer \r\n NumOfTreatPerYear \r\n \r\n\r\n \r\n 成立时间 \r\n Date \r\n DateOfEstablish \r\n m/d/yy \r\n \r\n \r\n\r\n \r\n 客户名称 \r\n String \r\n Name \r\n \r\n\r\n \r\n 医院行政级别 \r\n Lookup \r\n AdministrativLevel \r\n AccountAdministrativLevelPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 医院分级 \r\n Lookup \r\n Grade \r\n AccountGradePl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 医院类型 \r\n Lookup \r\n HospitalType \r\n AccountTypePl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 地方军队医院 \r\n Lookup \r\n LocalOrArmy \r\n AccountLocalOrArmyPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 综合专科医院 \r\n Lookup \r\n ComprehensiveOrSpecialized \r\n AccountComprehensiveOrSpecializedPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 重点医院 \r\n Lookup \r\n KeyType \r\n AccountPointPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 状态 \r\n Lookup \r\n Status \r\n AccountStatusPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 法人 \r\n String \r\n DutyOfficer \r\n \r\n\r\n \r\n 医生数量 \r\n Integer \r\n NumOfDoctors \r\n \r\n\r\n \r\n 助理医师人数 \r\n Integer \r\n NumOfAssistantDoctors \r\n \r\n \r\n \r\n 员工总数 \r\n Integer \r\n NumOfStaff \r\n \r\n\r\n \r\n 门诊人数 \r\n Integer \r\n NumOfOutpatient \r\n \r\n\r\n \r\n 总病床数 \r\n Integer \r\n TotalNumOfSickbed \r\n \r\n\r\n \r\n 麻醉科医生数 \r\n Integer \r\n NumOfAnesthesiaDoctor \r\n \r\n\r\n \r\n 疼痛学组医生数 \r\n Integer \r\n NumOfPainDoctor \r\n \r\n\r\n \r\n 手术量年 \r\n Integer \r\n NumOfSurgeryPerYear \r\n \r\n\r\n \r\n 手术间 \r\n Integer \r\n NumOfSurgeryRoom \r\n \r\n\r\n \r\n 阿片类用药量 \r\n Integer \r\n NumOfUsingOpiatesMedicine \r\n \r\n\r\n \r\n 阿片类注射剂量 \r\n Integer \r\n NumOfUsingOpiatesInjection \r\n \r\n\r\n \r\n 注册资金 \r\n Integer \r\n RegisteredCapital \r\n \r\n\r\n \r\n 主要电话号码 \r\n String \r\n Tel \r\n \r\n\r\n \r\n 主要传真号码 \r\n String \r\n Fax \r\n \r\n\r\n \r\n 市场分类 \r\n Lookup \r\n MarketClassification \r\n AccountMarketClassificationPl \r\n Val \r\n Id \r\n \r\n\r\n \r\n 医院省份 \r\n String \r\n Province \r\n \r\n\r\n \r\n 医院区县 \r\n String \r\n Districts \r\n \r\n \r\n \r\n 医院详细地址 \r\n String \r\n Address \r\n \r\n ');
+
+
+drop table if exists loginhistory;
+CREATE TABLE loginhistory
(
id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
- sex MEDIUMINT,
- tel_work VARCHAR(255),
- dealerAccountId MEDIUMINT NOT NULL,
- status MEDIUMINT,
- pl1 MEDIUMINT,
+ sessionId varchar(128),
+ loginName varchar(256),
+ loginTime datetime,
+ logoutTime datetime,
+ UNIQUE KEY `sessionId` (`sessionId`),
PRIMARY KEY USING BTREE (id)
) ENGINE InnoDB;
-ALTER table dealerContact ADD whenadded DATETIME;
-drop table if exists dealerContact;
-CREATE TABLE dealerContact
-(
- id MEDIUMINT NOT NULL AUTO_INCREMENT,
- name VARCHAR(255) NOT NULL,
- sex MEDIUMINT,
- tel_work VARCHAR(255),
- dealerAccountId MEDIUMINT NOT NULL,
- status MEDIUMINT,
- pl1 MEDIUMINT,
- PRIMARY KEY USING BTREE (id)
-) ENGINE InnoDB;
diff --git a/crm/src/main/db/update35.sql b/crm/src/main/db/update35.sql
new file mode 100644
index 0000000..4979096
--- /dev/null
+++ b/crm/src/main/db/update35.sql
@@ -0,0 +1,5 @@
+ALTER TABLE `crmdb`.`role`
+ADD COLUMN `name` VARCHAR(45) NULL AFTER `val`;
+UPDATE `crmdb`.`role` SET `name`='全部' WHERE `id`='1';
+UPDATE `crmdb`.`role` SET `name`='只读' WHERE `id`='2';
+UPDATE `crmdb`.`role` SET `name`='只读' WHERE `id`='3';
diff --git a/crm/src/main/db/update_1.sql b/crm/src/main/db/update_1.sql
new file mode 100644
index 0000000..a5ff31b
--- /dev/null
+++ b/crm/src/main/db/update_1.sql
@@ -0,0 +1,23 @@
+
+ALTER table crmuser ADD ts BIGINT;
+UPDATE `crmdb`.`crmuser` SET `email`='brenda.yuan@rexen.com.cn', `isActivited`='1', `ts`='1382611111318' WHERE `id`='101';
+UPDATE `crmdb`.`crmuser` SET `isActivited`='1', `ts`='1382615122318' WHERE `id`='99';
+UPDATE `crmdb`.`crmuser` SET `isActivited`='1', `ts`='1382613388598' WHERE `id`='100';
+
+
+DROP TABLE IF EXISTS `score1_pl`;
+CREATE TABLE `score1_pl` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `score1_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15');
+
+
+DROP TABLE IF EXISTS `score2_pl`;
+CREATE TABLE `score2_pl` (
+ `id` int(11) NOT NULL DEFAULT '0',
+ `val` varchar(255) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `score2_pl` VALUES (0,'0'),(1,'1'),(2,'2'),(3,'3'),(4,'4'),(5,'5'),(6,'6'),(7,'7'),(8,'8'),(9,'9'),(10,'10'),(11,'11'),(12,'12'),(13,'13'),(14,'14'),(15,'15'),(16,'16'),(17,'17'),(18,'18'),(19,'19'),(20,'20');
\ No newline at end of file
diff --git a/crm/src/main/db/update_2.sql b/crm/src/main/db/update_2.sql
new file mode 100644
index 0000000..c3d43bd
--- /dev/null
+++ b/crm/src/main/db/update_2.sql
@@ -0,0 +1,47 @@
+use crmdb;
+
+
+ALTER table account modify province int(11) default 1;
+ALTER table account modify city int(11) default 1;
+update account set province=1,city=1;
+
+ALTER table contact modify province int(11) default 1;
+ALTER table contact modify city int(11) default 1;
+update contact set province=1,city=1;
+
+
+DROP TABLE IF EXISTS `area`;
+DROP TABLE IF EXISTS `city`;
+DROP TABLE IF EXISTS `province`;
+
+
+
+CREATE TABLE `province` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `city` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ `parentId` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `city_parentid_cons` (`parentId`),
+ CONSTRAINT `city_parentid_cons` FOREIGN KEY (`parentId`) REFERENCES `province` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB AUTO_INCREMENT=344 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `area` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ `parentId` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `area_parentid_cons` (`parentId`),
+ CONSTRAINT `area_parentid_cons` FOREIGN KEY (`parentId`) REFERENCES `city` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+INSERT INTO `province` VALUES (1,'北京市','110000'),(2,'天津市','120000'),(3,'河北省','130000'),(4,'山西省','140000'),(5,'内蒙古','150000'),(6,'辽宁省','210000'),(7,'吉林省','220000'),(8,'黑龙江','230000'),(9,'上海市','310000'),(10,'江苏省','320000'),(11,'浙江省','330000'),(12,'安徽省','340000'),(13,'福建省','350000'),(14,'江西省','360000'),(15,'山东省','370000'),(16,'河南省','410000'),(17,'湖北省','420000'),(18,'湖南省','430000'),(19,'广东省','440000'),(20,'广 西','450000'),(21,'海南省','460000'),(22,'重庆市','500000'),(23,'四川省','510000'),(24,'贵州省','520000'),(25,'云南省','530000'),(26,'西 藏','540000'),(27,'陕西省','610000'),(28,'甘肃省','620000'),(29,'青海省','630000'),(30,'宁 夏','640000'),(31,'新 疆','650000'),(32,'台湾省','710000'),(33,'香 港','810000'),(34,'澳 门','820000');
+INSERT INTO `city` VALUES (1,'北京市','110100',1),(2,'石家庄市','130100',3),(3,'唐山市','130200',3),(4,'秦皇岛市','130300',3),(5,'邯郸市','130400',3),(6,'邢台市','130500',3),(7,'保定市','130600',3),(8,'张家口市','130700',3),(9,'承德市','130800',3),(10,'沧州市','130900',3),(11,'廊坊市','131000',3),(12,'衡水市','131100',3),(13,'太原市','140100',4),(14,'大同市','140200',4),(15,'阳泉市','140300',4),(16,'长治市','140400',4),(17,'晋城市','140500',4),(18,'朔州市','140600',4),(19,'晋中市','140700',4),(20,'运城市','140800',4),(21,'忻州市','140900',4),(22,'临汾市','141000',4),(23,'吕梁市','141100',4),(24,'呼和浩特市','150100',5),(25,'包头市','150200',5),(26,'乌海市','150300',5),(27,'赤峰市','150400',5),(28,'通辽市','150500',5),(29,'鄂尔多斯市','150600',5),(30,'呼伦贝尔市','150700',5),(31,'巴彦淖尔市','150800',5),(32,'乌兰察布市','150900',5),(33,'兴安盟','152200',5),(34,'锡林郭勒盟','152500',5),(35,'阿拉善盟','152900',5),(36,'沈阳市','210100',6),(37,'大连市','210200',6),(38,'鞍山市','210300',6),(39,'抚顺市','210400',6),(40,'本溪市','210500',6),(41,'丹东市','210600',6),(42,'锦州市','210700',6),(43,'营口市','210800',6),(44,'阜新市','210900',6),(45,'辽阳市','211000',6),(46,'盘锦市','211100',6),(47,'铁岭市','211200',6),(48,'朝阳市','211300',6),(49,'葫芦岛市','211400',6),(50,'长春市','220100',7),(51,'吉林市','220200',7),(52,'四平市','220300',7),(53,'辽源市','220400',7),(54,'通化市','220500',7),(55,'白山市','220600',7),(56,'松原市','220700',7),(57,'白城市','220800',7),(58,'延边朝鲜族自治州','222400',7),(59,'哈尔滨市','230100',8),(60,'齐齐哈尔市','230200',8),(61,'鸡西市','230300',8),(62,'鹤岗市','230400',8),(63,'双鸭山市','230500',8),(64,'大庆市','230600',8),(65,'伊春市','230700',8),(66,'佳木斯市','230800',8),(67,'七台河市','230900',8),(68,'牡丹江市','231000',8),(69,'黑河市','231100',8),(70,'绥化市','231200',8),(71,'大兴安岭地区','232700',8),(72,'市辖区','310100',9),(73,'县','310200',9),(74,'南京市','320100',10),(75,'无锡市','320200',10),(76,'徐州市','320300',10),(77,'常州市','320400',10),(78,'苏州市','320500',10),(79,'南通市','320600',10),(80,'连云港市','320700',10),(81,'淮安市','320800',10),(82,'盐城市','320900',10),(83,'扬州市','321000',10),(84,'镇江市','321100',10),(85,'泰州市','321200',10),(86,'宿迁市','321300',10),(87,'杭州市','330100',11),(88,'宁波市','330200',11),(89,'温州市','330300',11),(90,'嘉兴市','330400',11),(91,'湖州市','330500',11),(92,'绍兴市','330600',11),(93,'金华市','330700',11),(94,'衢州市','330800',11),(95,'舟山市','330900',11),(96,'台州市','331000',11),(97,'丽水市','331100',11),(98,'合肥市','340100',12),(99,'芜湖市','340200',12),(100,'蚌埠市','340300',12),(101,'淮南市','340400',12),(102,'马鞍山市','340500',12),(103,'淮北市','340600',12),(104,'铜陵市','340700',12),(105,'安庆市','340800',12),(106,'黄山市','341000',12),(107,'滁州市','341100',12),(108,'阜阳市','341200',12),(109,'宿州市','341300',12),(110,'巢湖市','341400',12),(111,'六安市','341500',12),(112,'亳州市','341600',12),(113,'池州市','341700',12),(114,'宣城市','341800',12),(115,'福州市','350100',13),(116,'厦门市','350200',13),(117,'莆田市','350300',13),(118,'三明市','350400',13),(119,'泉州市','350500',13),(120,'漳州市','350600',13),(121,'南平市','350700',13),(122,'龙岩市','350800',13),(123,'宁德市','350900',13),(124,'南昌市','360100',14),(125,'景德镇市','360200',14),(126,'萍乡市','360300',14),(127,'九江市','360400',14),(128,'新余市','360500',14),(129,'鹰潭市','360600',14),(130,'赣州市','360700',14),(131,'吉安市','360800',14),(132,'宜春市','360900',14),(133,'抚州市','361000',14),(134,'上饶市','361100',14),(135,'济南市','370100',15),(136,'青岛市','370200',15),(137,'淄博市','370300',15),(138,'枣庄市','370400',15),(139,'东营市','370500',15),(140,'烟台市','370600',15),(141,'潍坊市','370700',15),(142,'济宁市','370800',15),(143,'泰安市','370900',15),(144,'威海市','371000',15),(145,'日照市','371100',15),(146,'莱芜市','371200',15),(147,'临沂市','371300',15),(148,'德州市','371400',15),(149,'聊城市','371500',15),(150,'滨州市','371600',15),(151,'荷泽市','371700',15),(152,'郑州市','410100',16),(153,'开封市','410200',16),(154,'洛阳市','410300',16),(155,'平顶山市','410400',16),(156,'安阳市','410500',16),(157,'鹤壁市','410600',16),(158,'新乡市','410700',16),(159,'焦作市','410800',16),(160,'濮阳市','410900',16),(161,'许昌市','411000',16),(162,'漯河市','411100',16),(163,'三门峡市','411200',16),(164,'南阳市','411300',16),(165,'商丘市','411400',16),(166,'信阳市','411500',16),(167,'周口市','411600',16),(168,'驻马店市','411700',16),(169,'武汉市','420100',17),(170,'黄石市','420200',17),(171,'十堰市','420300',17),(172,'宜昌市','420500',17),(173,'襄樊市','420600',17),(174,'鄂州市','420700',17),(175,'荆门市','420800',17),(176,'孝感市','420900',17),(177,'荆州市','421000',17),(178,'黄冈市','421100',17),(179,'咸宁市','421200',17),(180,'随州市','421300',17),(181,'恩施土家族苗族自治州','422800',17),(182,'省直辖行政单位','429000',17),(183,'长沙市','430100',18),(184,'株洲市','430200',18),(185,'湘潭市','430300',18),(186,'衡阳市','430400',18),(187,'邵阳市','430500',18),(188,'岳阳市','430600',18),(189,'常德市','430700',18),(190,'张家界市','430800',18),(191,'益阳市','430900',18),(192,'郴州市','431000',18),(193,'永州市','431100',18),(194,'怀化市','431200',18),(195,'娄底市','431300',18),(196,'湘西土家族苗族自治州','433100',18),(197,'广州市','440100',19),(198,'韶关市','440200',19),(199,'深圳市','440300',19),(200,'珠海市','440400',19),(201,'汕头市','440500',19),(202,'佛山市','440600',19),(203,'江门市','440700',19),(204,'湛江市','440800',19),(205,'茂名市','440900',19),(206,'肇庆市','441200',19),(207,'惠州市','441300',19),(208,'梅州市','441400',19),(209,'汕尾市','441500',19),(210,'河源市','441600',19),(211,'阳江市','441700',19),(212,'清远市','441800',19),(213,'东莞市','441900',19),(214,'中山市','442000',19),(215,'潮州市','445100',19),(216,'揭阳市','445200',19),(217,'云浮市','445300',19),(218,'南宁市','450100',20),(219,'柳州市','450200',20),(220,'桂林市','450300',20),(221,'梧州市','450400',20),(222,'北海市','450500',20),(223,'防城港市','450600',20),(224,'钦州市','450700',20),(225,'贵港市','450800',20),(226,'玉林市','450900',20),(227,'百色市','451000',20),(228,'贺州市','451100',20),(229,'河池市','451200',20),(230,'来宾市','451300',20),(231,'崇左市','451400',20),(232,'海口市','460100',21),(233,'三亚市','460200',21),(234,'省直辖县级行政单位','469000',21),(235,'市辖区','500100',22),(236,'县','500200',22),(237,'市','500300',22),(238,'成都市','510100',23),(239,'自贡市','510300',23),(240,'攀枝花市','510400',23),(241,'泸州市','510500',23),(242,'德阳市','510600',23),(243,'绵阳市','510700',23),(244,'广元市','510800',23),(245,'遂宁市','510900',23),(246,'内江市','511000',23),(247,'乐山市','511100',23),(248,'南充市','511300',23),(249,'眉山市','511400',23),(250,'宜宾市','511500',23),(251,'广安市','511600',23),(252,'达州市','511700',23),(253,'雅安市','511800',23),(254,'巴中市','511900',23),(255,'资阳市','512000',23),(256,'阿坝藏族羌族自治州','513200',23),(257,'甘孜藏族自治州','513300',23),(258,'凉山彝族自治州','513400',23),(259,'贵阳市','520100',24),(260,'六盘水市','520200',24),(261,'遵义市','520300',24),(262,'安顺市','520400',24),(263,'铜仁地区','522200',24),(264,'黔西南布依族苗族自治州','522300',24),(265,'毕节地区','522400',24),(266,'黔东南苗族侗族自治州','522600',24),(267,'黔南布依族苗族自治州','522700',24),(268,'昆明市','530100',25),(269,'曲靖市','530300',25),(270,'玉溪市','530400',25),(271,'保山市','530500',25),(272,'昭通市','530600',25),(273,'丽江市','530700',25),(274,'思茅市','530800',25),(275,'临沧市','530900',25),(276,'楚雄彝族自治州','532300',25),(277,'红河哈尼族彝族自治州','532500',25),(278,'文山壮族苗族自治州','532600',25),(279,'西双版纳傣族自治州','532800',25),(280,'大理白族自治州','532900',25),(281,'德宏傣族景颇族自治州','533100',25),(282,'怒江傈僳族自治州','533300',25),(283,'迪庆藏族自治州','533400',25),(284,'拉萨市','540100',26),(285,'昌都地区','542100',26),(286,'山南地区','542200',26),(287,'日喀则地区','542300',26),(288,'那曲地区','542400',26),(289,'阿里地区','542500',26),(290,'林芝地区','542600',26),(291,'西安市','610100',27),(292,'铜川市','610200',27),(293,'宝鸡市','610300',27),(294,'咸阳市','610400',27),(295,'渭南市','610500',27),(296,'延安市','610600',27),(297,'汉中市','610700',27),(298,'榆林市','610800',27),(299,'安康市','610900',27),(300,'商洛市','611000',27),(301,'兰州市','620100',28),(302,'嘉峪关市','620200',28),(303,'金昌市','620300',28),(304,'白银市','620400',28),(305,'天水市','620500',28),(306,'武威市','620600',28),(307,'张掖市','620700',28),(308,'平凉市','620800',28),(309,'酒泉市','620900',28),(310,'庆阳市','621000',28),(311,'定西市','621100',28),(312,'陇南市','621200',28),(313,'临夏回族自治州','622900',28),(314,'甘南藏族自治州','623000',28),(315,'西宁市','630100',29),(316,'海东地区','632100',29),(317,'海北藏族自治州','632200',29),(318,'黄南藏族自治州','632300',29),(319,'海南藏族自治州','632500',29),(320,'果洛藏族自治州','632600',29),(321,'玉树藏族自治州','632700',29),(322,'海西蒙古族藏族自治州','632800',29),(323,'银川市','640100',30),(324,'石嘴山市','640200',30),(325,'吴忠市','640300',30),(326,'固原市','640400',30),(327,'中卫市','640500',30),(328,'乌鲁木齐市','650100',31),(329,'克拉玛依市','650200',31),(330,'吐鲁番地区','652100',31),(331,'哈密地区','652200',31),(332,'昌吉回族自治州','652300',31),(333,'博尔塔拉蒙古自治州','652700',31),(334,'巴音郭楞蒙古自治州','652800',31),(335,'阿克苏地区','652900',31),(336,'克孜勒苏柯尔克孜自治州','653000',31),(337,'喀什地区','653100',31),(338,'和田地区','653200',31),(339,'伊犁哈萨克自治州','654000',31),(340,'塔城地区','654200',31),(341,'阿勒泰地区','654300',31),(342,'省直辖行政单位','659000',31),(343,'天津',NULL,2);
diff --git a/crm/src/main/db/update_20.sql b/crm/src/main/db/update_20.sql
new file mode 100644
index 0000000..cc91922
--- /dev/null
+++ b/crm/src/main/db/update_20.sql
@@ -0,0 +1,116 @@
+use crmdb;
+ALTER TABLE `crmdb`.`contact`
+ADD COLUMN `contactCode` VARCHAR(255) NULL AFTER `responsible_person`,
+ADD UNIQUE INDEX `contactCode_UNIQUE` (`contactCode` ASC);
+
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('14', '保健科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('15', '采购科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('16', '传染科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('17', '创伤外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('18', '儿科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('19', '耳鼻喉科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('20', '方便门诊');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('21', '放化疗科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('22', '放疗科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('23', '放射科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('24', '妇产科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('25', '妇科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('26', '感染科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('27', '肛肠科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('28', '姑息科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('29', '国际医疗科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('30', '核医学科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('31', '呼吸内科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('32', '护理科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('33', '急诊科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('34', '介入科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('35', '康复科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('36', '口腔科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('37', '老干科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('38', '麻醉科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('39', '泌尿外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('40', '脑外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('41', '内分泌科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('42', '宁养科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('43', '皮肤科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('44', '普外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('45', '其他');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('46', '乳腺外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('47', '烧伤整形科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('48', '神经科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('49', '神经内科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('50', '神经外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('51', '肾内科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('52', '生物治疗科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('53', '特需科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('54', '疼痛科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('55', '微创科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('56', '胃肠外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('57', '消化科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('58', '消化内科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('59', '消化外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('60', '心内科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('61', '心胸外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('62', '血管外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('63', '血透科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('64', '药剂科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('65', '医保办');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('66', '医务科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('67', '整形美容科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('68', '质控科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('69', '中西医结合科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('70', '肿瘤科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('71', '肿瘤内科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('72', '肿瘤外科');
+INSERT INTO `crmdb`.`contact_department_pl` (`id`, `val`) VALUES ('73', '综合科');
+
+
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('9', '医生');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('10', '副主任');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('11', '院长助理');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('12', '书记');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('13', '副书记');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('14', '护士');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('15', '护士长');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('16', '库管');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('17', '采购科科长');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('18', '药师');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('19', '药剂科副主任');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('20', '医务科科长');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('21', '医务科副科长');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('22', '医保办主任');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('23', '科教科主任');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('24', '信息卡科长');
+INSERT INTO `crmdb`.`contact_duty_pl` (`id`, `val`) VALUES ('25', '其他');
+
+UPDATE `crmdb`.`contact_job_title_pl` SET `val`='主管护士' WHERE `id`='6';
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('9', '副主任护士');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('10', '主任护师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('11', '主管药师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('12', '副主任药师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('13', '主任药师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('14', '主管技师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('15', '副主任技师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('16', '主任技师');
+INSERT INTO `crmdb`.`contact_job_title_pl` (`id`, `val`) VALUES ('17', '其他');
+
+
+ALTER TABLE `crmdb`.`userinfo`
+ADD COLUMN `office_tel` VARCHAR(255) NULL AFTER `positionId`;
+
+DROP TABLE IF EXISTS `activity_whethercoach_pl`;
+CREATE TABLE `crmdb`.`activity_whethercoach_pl` (
+ `id` MEDIUMINT(9) NOT NULL,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+
+INSERT INTO `crmdb`.`activity_whethercoach_pl` (`id`, `val`) VALUES ('1', '否');
+INSERT INTO `crmdb`.`activity_whethercoach_pl` (`id`, `val`) VALUES ('2', '协防半天');
+INSERT INTO `crmdb`.`activity_whethercoach_pl` (`id`, `val`) VALUES ('3', '协防一天');
+
+UPDATE `crmdb`.`activity_event_type_pl` SET `val`='拜访辅导' WHERE `id`='2';
+INSERT INTO `crmdb`.`activity_event_type_pl` (`id`, `val`) VALUES ('3', '科室会辅导');
+
+ALTER TABLE `crmdb`.`activity`
+ADD COLUMN `whetherCoach` MEDIUMINT(9) NULL AFTER `summary`;
\ No newline at end of file
diff --git a/crm/src/main/db/update_21.sql b/crm/src/main/db/update_21.sql
new file mode 100644
index 0000000..f3f3f18
--- /dev/null
+++ b/crm/src/main/db/update_21.sql
@@ -0,0 +1,27 @@
+use crmdb;
+UPDATE `crmdb`.`activity_whethercoach_pl` SET `val`='协访半天' WHERE `id`='2';
+UPDATE `crmdb`.`activity_whethercoach_pl` SET `val`='协访一天' WHERE `id`='3';
+UPDATE `crmdb`.`crmuser_activited` SET `id`='0', `val`='未激活' WHERE `id`='1';
+UPDATE `crmdb`.`crmuser_activited` SET `id`='1', `val`='已激活' WHERE `id`='2';
+DELETE FROM `crmdb`.`activity_whethercoach_pl` WHERE `id`='1';
+UPDATE `crmdb`.`activity_whethercoach_pl` SET `id`='1' WHERE `id`='2';
+UPDATE `crmdb`.`activity_whethercoach_pl` SET `id`='2' WHERE `id`='3';
+UPDATE `crmdb`.`userinfo` SET `email`='tigerzhou@rexen.com.cn', `sex`='1', `isActivited`='1' WHERE `id`='1';
+UPDATE `crmdb`.`userinfo` SET `email`='alexsong@rexen.com.cn', `sex`='1', `isActivited`='1' WHERE `id`='2';
+UPDATE `crmdb`.`userinfo` SET `email`='feiyunzhou@rexen.com.cn', `sex`='1', `isActivited`='1' WHERE `id`='3';
+UPDATE `crmdb`.`userinfo` SET `sex`='1', `isActivited`='1' WHERE `id`='-1';
+UPDATE `crmdb`.`userinfo` SET `city`='1' WHERE `id`='1';
+UPDATE `crmdb`.`userinfo` SET `city`='1' WHERE `id`='2';
+UPDATE `crmdb`.`userinfo` SET `city`='1' WHERE `id`='3';
+UPDATE `crmdb`.`userinfo` SET `province`='1' WHERE `id`='1';
+UPDATE `crmdb`.`userinfo` SET `province`='1' WHERE `id`='2';
+UPDATE `crmdb`.`userinfo` SET `province`='1' WHERE `id`='3';
+
+ALTER TABLE `crmdb`.`activity`
+ADD COLUMN `coachTime` MEDIUMINT(9) NULL AFTER `whetherCoach`;
+
+ALTER TABLE `crmdb`.`contact`
+ADD COLUMN `num_of_monthlySurgery` MEDIUMINT(9) NULL AFTER `contactCode`,
+ADD COLUMN `num_of_monthlyAnalgesia` MEDIUMINT(9) NULL AFTER `num_of_monthlySurgery`;
+
+
diff --git a/crm/src/main/db/update_22.sql b/crm/src/main/db/update_22.sql
new file mode 100644
index 0000000..8befd28
--- /dev/null
+++ b/crm/src/main/db/update_22.sql
@@ -0,0 +1,125 @@
+use crmdb;
+
+
+drop table if exists activity_score3_pl;
+CREATE TABLE `crmdb`.`activity_score3_pl` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+
+ drop table if exists activity_score4_pl;
+CREATE TABLE `crmdb`.`activity_score4_pl` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(25) NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+
+
+drop table if exists activity_score5_pl;
+CREATE TABLE `crmdb`.`activity_score5_pl` (
+`id` INT NOT NULL,
+`val` VARCHAR(255) NULL,
+PRIMARY KEY (`id`)
+)ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('0', '0');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('1', '1');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('2', '2');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('3', '3');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('4', '4');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('5', '5');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('6', '6');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('7', '7');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('8', '8');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('9', '9');
+INSERT INTO `crmdb`.`activity_score3_pl` (`id`, `val`) VALUES ('10', '10');
+
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('0', '0');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('1', '1');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('2', '2');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('3', '3');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('4', '4');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('5', '5');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('6', '6');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('7', '7');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('8', '8');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('9', '9');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('10', '10');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('11', '11');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('12', '12');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('13', '13');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('14', '14');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('15', '15');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('16', '16');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('17', '17');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('18', '18');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('19', '19');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('20', '20');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('21', '21');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('22', '22');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('23', '23');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('24', '24');
+INSERT INTO `crmdb`.`activity_score4_pl` (`id`, `val`) VALUES ('25', '25');
+
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('0', '0');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('1', '1');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('2', '2');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('3', '3');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('4', '4');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('5', '5');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('6', '6');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('7', '7');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('8', '8');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('9', '9');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('10', '10');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('11', '11');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('12', '12');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('13', '13');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('14', '14');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('15', '15');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('16', '16');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('17', '17');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('18', '18');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('19', '19');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('20', '20');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('21', '21');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('22', '22');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('23', '23');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('24', '24');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('25', '25');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('26', '26');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('27', '27');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('28', '28');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('29', '29');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('30', '30');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('31', '31');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('32', '32');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('33', '33');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('34', '34');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('35', '35');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('36', '36');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('37', '37');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('38', '38');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('39', '39');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('40', '40');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('41', '41');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('42', '42');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('43', '43');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('44', '44');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('45', '45');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('46', '46');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('47', '47');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('48', '48');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('49', '49');
+INSERT INTO `crmdb`.`activity_score5_pl` (`id`, `val`) VALUES ('50', '50');
+
+
+UPDATE `crmdb`.`crmuser_pl2` SET `id`='3', `val`='奥诺美' WHERE `id`='3';
+ INSERT INTO `crmdb`.`crmuser_pl2` (`id`, `val`) VALUES ('4', '全部');
+UPDATE `crmdb`.`activity_visiting_purpose_pl` SET `activity_type`='1', `parentId`='1' WHERE `id`='3';
+
+ALTER TABLE `crmdb`.`activity`
+ADD COLUMN `accountId` MEDIUMINT(9) NULL AFTER `coachTime`,
+ADD COLUMN `department` MEDIUMINT(9) NULL AFTER `accountId`,
+ADD COLUMN `whether_coach` VARCHAR(255) NULL AFTER `department`;
\ No newline at end of file
diff --git a/crm/src/main/db/update_23.sql b/crm/src/main/db/update_23.sql
new file mode 100644
index 0000000..d165a13
--- /dev/null
+++ b/crm/src/main/db/update_23.sql
@@ -0,0 +1,11 @@
+use crmdb;
+DROP TABLE IF EXISTS `activity_coachtime_pl`;
+CREATE TABLE `crmdb`.`activity_coachtime_pl` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+
+INSERT INTO `crmdb`.`activity_coachtime_pl` (`id`, `val`) VALUES ('1', '无');
+INSERT INTO `crmdb`.`activity_coachtime_pl` (`id`, `val`) VALUES ('2', '半天');
+INSERT INTO `crmdb`.`activity_coachtime_pl` (`id`, `val`) VALUES ('3', '全天');
\ No newline at end of file
diff --git a/crm/src/main/db/update_24.sql b/crm/src/main/db/update_24.sql
new file mode 100644
index 0000000..d4fea0e
--- /dev/null
+++ b/crm/src/main/db/update_24.sql
@@ -0,0 +1,8 @@
+use crmdb;
+ALTER TABLE `crmdb`.`userinfo`
+ADD COLUMN `num_of_signIn` MEDIUMINT(9) NULL AFTER `office_tel`;
+
+ALTER TABLE `crmdb`.`user_position`
+ADD COLUMN `status` INT NULL DEFAULT NULL AFTER `positionId`,
+ADD COLUMN `createtime` DATETIME NULL DEFAULT NULL AFTER `status`,
+ADD COLUMN `isPrimary` INT NULL DEFAULT NULL AFTER `createtime`;
\ No newline at end of file
diff --git a/crm/src/main/db/update_25.sql b/crm/src/main/db/update_25.sql
new file mode 100644
index 0000000..349f319
--- /dev/null
+++ b/crm/src/main/db/update_25.sql
@@ -0,0 +1,13 @@
+use crmdb;
+ALTER TABLE `crmdb`.`account`
+CHANGE COLUMN `administrativ_level` `administrativ_level` MEDIUMINT(9) NULL DEFAULT NULL ,
+CHANGE COLUMN `grade` `grade` MEDIUMINT(9) NULL DEFAULT NULL ;
+
+ALTER TABLE `crmdb`.`contact`
+CHANGE COLUMN `department` `department` MEDIUMINT(9) NULL ;
+
+ALTER TABLE `crmdb`.`crmuser`
+CHANGE COLUMN `city` `city` MEDIUMINT(9) NULL DEFAULT NULL ;
+
+ALTER TABLE `crmdb`.`accountcrmuser`
+ADD COLUMN `externalId` VARCHAR(45) NULL AFTER `crmuserId`;
\ No newline at end of file
diff --git a/crm/src/main/db/update_26.sql b/crm/src/main/db/update_26.sql
new file mode 100644
index 0000000..9c55073
--- /dev/null
+++ b/crm/src/main/db/update_26.sql
@@ -0,0 +1,10 @@
+use crmdb;
+ALTER TABLE `crmdb`.`data_exchange_teample`
+DROP FOREIGN KEY `FK8AE35445D557144C`,
+DROP FOREIGN KEY `FK8AE35445199BCB6C`;
+ALTER TABLE `crmdb`.`data_exchange_teample`
+DROP COLUMN `type_id`,
+DROP COLUMN `operation_id`,
+DROP COLUMN `version`,
+DROP INDEX `FK8AE35445199BCB6C` ,
+DROP INDEX `FK8AE35445D557144C` ;
\ No newline at end of file
diff --git a/crm/src/main/db/update_28.sql b/crm/src/main/db/update_28.sql
new file mode 100644
index 0000000..45f1cea
--- /dev/null
+++ b/crm/src/main/db/update_28.sql
@@ -0,0 +1,50 @@
+DROP TABLE IF EXISTS `alert`;
+CREATE TABLE `crmdb`.`alert` (
+ `id` MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
+ `name` VARCHAR(255) NOT NULL,
+ `publishDate` BIGINT(20) NULL,
+ `expired` BIGINT(20) NULL,
+ `priority` MEDIUMINT(9) NULL,
+ `towhom` MEDIUMINT(9) NULL,
+ `description` LONGTEXT NULL,
+ `owner` VARCHAR(255) NULL,
+ `whenadded` DATETIME NULL,
+ `modifier` VARCHAR(255) NULL,
+ `modify_datetime` DATETIME NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS `alert_priority_pl`;
+ CREATE TABLE `crmdb`.`alert_priority_pl` (
+ `id` MEDIUMINT(9) NOT NULL,
+ `val` VARCHAR(255) NULL,
+PRIMARY KEY (`id`)
+)ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS `alert_publicobject_pl`;
+CREATE TABLE `crmdb`.`alert_publicobject_pl` (
+ `id` MEDIUMINT(9) NOT NULL,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
+
+INSERT INTO `crmdb`.`alert_priority_pl` (`id`, `val`) VALUES ('1', '高级');
+INSERT INTO `crmdb`.`alert_priority_pl` (`id`, `val`) VALUES ('2', '中级');
+INSERT INTO `crmdb`.`alert_priority_pl` (`id`, `val`) VALUES ('3', '低级');
+
+INSERT INTO `crmdb`.`alert_publicobject_pl` (`id`, `val`) VALUES ('1', '管理员');
+INSERT INTO `crmdb`.`alert_publicobject_pl` (`id`, `val`) VALUES ('2', '主管');
+INSERT INTO `crmdb`.`alert_publicobject_pl` (`id`, `val`) VALUES ('3', '代表');
+
+drop view if exists crmdb.activity_alert;
+create view crmdb.activity_alert as
+SELECT id,
+case when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))=0 THEN '今天'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))=1 THEN '昨天'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))=2 THEN '前天'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))>=3 and to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))<7 THEN '三天以前'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))>=7 THEN '七天以前'
+ELSE '错误' END as time,
+title
+FROM crmdb.activity act where event_type=1 and status=1 order by time
+
diff --git a/crm/src/main/db/update_29.sql b/crm/src/main/db/update_29.sql
new file mode 100644
index 0000000..da59ebe
--- /dev/null
+++ b/crm/src/main/db/update_29.sql
@@ -0,0 +1,33 @@
+use crmdb;
+drop view if exists crmdb.user_position_account;
+create view user_position_account as
+select ac.id as id,u.name as userName,u.loginName as loginName,u.email as email,sp.val as sex,u.whenadded as addTime,
+c.name as positionName,c.code as positionCode,(select name from crmuser crm where crm.id=c.reportto) as reportTo,(select name from crmuser c1 where c1.id =(select c2.reportto from crmuser c2 where id=c.reportto)) as reporttto,r.val as role,rlp4.val as regoin1,rlp5.val as regoin2,ct.val as city,
+a.name as accountName,a.bdm_code as BDMCode,aalp.val as adminLevel,asp.val as status
+from userinfo u
+left join sex_pl sp
+on u.sex=sp.id
+left join user_position up
+on u.id=up.userId
+left join crmuser c
+on up.positionId =c.id
+left join role r
+on c.role=r.id
+left join region_level1_pl rlp4
+on c.pl4=rlp4.id
+left join region_level1_pl rlp5
+on c.pl5=rlp5.id
+left join city ct
+on c.city=ct.id
+left join accountcrmuser ac
+on c.id=ac.crmuserId
+left join account a
+on ac.accountId=a.id
+left join account_status_pl asp
+on a.status =asp.id
+left join account_administrativ_level_pl aalp on
+a.administrativ_level=aalp.id
+where up.status=1 order by id;
+
+ALTER TABLE `crmdb`.`userinfo`
+DROP COLUMN `positionId`;
diff --git a/crm/src/main/db/update_3.sql b/crm/src/main/db/update_3.sql
new file mode 100644
index 0000000..5970e59
--- /dev/null
+++ b/crm/src/main/db/update_3.sql
@@ -0,0 +1,5 @@
+
+ALTER TABLE `crmdb`.`activity`
+CHANGE COLUMN `coach` `coach` MEDIUMINT(9) NULL DEFAULT NULL ;
+ALTER TABLE `crmdb`.`activity`
+ADD COLUMN `coacheeId` MEDIUMINT(9) NULL AFTER `contactId`;
diff --git a/crm/src/main/db/update_31.sql b/crm/src/main/db/update_31.sql
new file mode 100644
index 0000000..0367b55
--- /dev/null
+++ b/crm/src/main/db/update_31.sql
@@ -0,0 +1,34 @@
+UPDATE `crmdb`.`activity_status_pl` SET `val`='未执行' WHERE `id`='3';
+
+ALTER TABLE `crmdb`.`activity`
+ADD COLUMN `activity_daypart` MEDIUMINT(9) NULL AFTER `whether_coach`;
+
+drop table if exists activity_daypart_pl;
+CREATE TABLE `crmdb`.`activity_daypart_pl` (
+ `id` MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`));
+
+INSERT INTO `crmdb`.`activity_daypart_pl` (`id`, `val`) VALUES ('1', '上午');
+INSERT INTO `crmdb`.`activity_daypart_pl` (`id`, `val`) VALUES ('2', '下午');
+
+-- ALTER TABLE `crmdb`.`activitycrmuser`
+-- DROP FOREIGN KEY `crm_activity_cons2`;
+
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='2';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='3';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='4';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='6';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='7';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='8';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='10';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='11';
+DELETE FROM `crmdb`.`account_administrativ_level_pl` WHERE `id`='12';
+
+UPDATE `crmdb`.`account_administrativ_level_pl` SET `val`='未评级' WHERE `id`= '13';
+
+drop table `crmdb`.`account_grade_pl`;
+
+ALTER TABLE `crmdb`.`account`
+DROP COLUMN `grade`;
+
diff --git a/crm/src/main/db/update_32.sql b/crm/src/main/db/update_32.sql
new file mode 100644
index 0000000..99fe9d9
--- /dev/null
+++ b/crm/src/main/db/update_32.sql
@@ -0,0 +1,42 @@
+use crmdb;
+
+set session old_alter_table =on;
+ALTER IGNORE TABLE crmuser ADD UNIQUE (code);
+set session old_alter_table =off;
+
+ALTER table contact ADD externalId varchar(128);
+set session old_alter_table =on;
+ALTER IGNORE TABLE contact ADD UNIQUE (externalId);
+set session old_alter_table =off;
+
+set session old_alter_table =on;
+ALTER IGNORE TABLE userinfo ADD UNIQUE (employeeNumber);
+set session old_alter_table =off;
+
+
+DROP TABLE IF EXISTS `area`;
+DROP TABLE IF EXISTS `city`;
+DROP TABLE IF EXISTS `province`;
+
+DROP TABLE IF EXISTS `province`;
+CREATE TABLE `province` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB;
+INSERT INTO `province` VALUES (1,'北京','110000'),(2,'天津','120000'),(3,'河北','130000'),(4,'山西','140000'),(5,'内蒙古','150000'),(6,'辽宁','210000'),(7,'吉林','220000'),(8,'黑龙江','230000'),(9,'上海','310000'),(10,'江苏','320000'),(11,'浙江','330000'),(12,'安徽','340000'),(13,'福建','350000'),(14,'江西','360000'),(15,'山东','370000'),(16,'河南','410000'),(17,'湖北','420000'),(18,'湖南','430000'),(19,'广东','440000'),(20,'广西','450000'),(21,'海南','460000'),(22,'重庆','500000'),(23,'四川','510000'),(24,'贵州','520000'),(25,'云南','530000'),(26,'西藏','540000'),(27,'陕西','610000'),(28,'甘肃','620000'),(29,'青海','630000'),(30,'宁夏','640000'),(31,'新疆','650000'),(32,'台湾','710000'),(33,'香港','810000'),(34,'澳门','820000');
+
+DROP TABLE IF EXISTS `city`;
+CREATE TABLE `city` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `val` varchar(20) DEFAULT NULL,
+ `externalId` varchar(20) DEFAULT NULL,
+ `parentId` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `city_parentid_cons` (`parentId`),
+ CONSTRAINT `city_parentid_cons` FOREIGN KEY (`parentId`) REFERENCES `province` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB;
+
+INSERT INTO `city` VALUES (1,'北京','110100',1),(2,'石家庄','130100',3),(3,'唐山','130200',3),(4,'秦皇岛','130300',3),(5,'邯郸','130400',3),(6,'邢台','130500',3),(7,'保定','130600',3),(8,'张家口','130700',3),(9,'承德','130800',3),(10,'沧州','130900',3),(11,'廊坊','131000',3),(12,'衡水','131100',3),(13,'太原','140100',4),(14,'大同','140200',4),(15,'阳泉','140300',4),(16,'长治','140400',4),(17,'晋城','140500',4),(18,'朔州','140600',4),(19,'晋中','140700',4),(20,'运城','140800',4),(21,'忻州','140900',4),(22,'临汾','141000',4),(23,'吕梁','141100',4),(24,'呼和浩特','150100',5),(25,'包头','150200',5),(26,'乌海','150300',5),(27,'赤峰','150400',5),(28,'通辽','150500',5),(29,'鄂尔多斯','150600',5),(30,'呼伦贝尔','150700',5),(31,'巴彦淖尔','150800',5),(32,'乌兰察布','150900',5),(33,'兴安盟','152200',5),(34,'锡林郭勒盟','152500',5),(35,'阿拉善盟','152900',5),(36,'沈阳','210100',6),(37,'大连','210200',6),(38,'鞍山','210300',6),(39,'抚顺','210400',6),(40,'本溪','210500',6),(41,'丹东','210600',6),(42,'锦州','210700',6),(43,'营口','210800',6),(44,'阜新','210900',6),(45,'辽阳','211000',6),(46,'盘锦','211100',6),(47,'铁岭','211200',6),(48,'朝阳','211300',6),(49,'葫芦岛','211400',6),(50,'长春','220100',7),(51,'吉林','220200',7),(52,'四平','220300',7),(53,'辽源','220400',7),(54,'通化','220500',7),(55,'白山','220600',7),(56,'松原','220700',7),(57,'白城','220800',7),(58,'延边朝鲜族自治州','222400',7),(59,'哈尔滨','230100',8),(60,'齐齐哈尔','230200',8),(61,'鸡西','230300',8),(62,'鹤岗','230400',8),(63,'双鸭山','230500',8),(64,'大庆','230600',8),(65,'伊春','230700',8),(66,'佳木斯','230800',8),(67,'七台河','230900',8),(68,'牡丹江','231000',8),(69,'黑河','231100',8),(70,'绥化','231200',8),(71,'大兴安岭地区','232700',8),(72,'上海','310100',9),(73,'县','310200',9),(74,'南京','320100',10),(75,'无锡','320200',10),(76,'徐州','320300',10),(77,'常州','320400',10),(78,'苏州','320500',10),(79,'南通','320600',10),(80,'连云港','320700',10),(81,'淮安','320800',10),(82,'盐城','320900',10),(83,'扬州','321000',10),(84,'镇江','321100',10),(85,'泰州','321200',10),(86,'宿迁','321300',10),(87,'杭州','330100',11),(88,'宁波','330200',11),(89,'温州','330300',11),(90,'嘉兴','330400',11),(91,'湖州','330500',11),(92,'绍兴','330600',11),(93,'金华','330700',11),(94,'衢州','330800',11),(95,'舟山','330900',11),(96,'台州','331000',11),(97,'丽水','331100',11),(98,'合肥','340100',12),(99,'芜湖','340200',12),(100,'蚌埠','340300',12),(101,'淮南','340400',12),(102,'马鞍山','340500',12),(103,'淮北','340600',12),(104,'铜陵','340700',12),(105,'安庆','340800',12),(106,'黄山','341000',12),(107,'滁州','341100',12),(108,'阜阳','341200',12),(109,'宿州','341300',12),(110,'巢湖','341400',12),(111,'六安','341500',12),(112,'亳州','341600',12),(113,'池州','341700',12),(114,'宣城','341800',12),(115,'福州','350100',13),(116,'厦门','350200',13),(117,'莆田','350300',13),(118,'三明','350400',13),(119,'泉州','350500',13),(120,'漳州','350600',13),(121,'南平','350700',13),(122,'龙岩','350800',13),(123,'宁德','350900',13),(124,'南昌','360100',14),(125,'景德镇','360200',14),(126,'萍乡','360300',14),(127,'九江','360400',14),(128,'新余','360500',14),(129,'鹰潭','360600',14),(130,'赣州','360700',14),(131,'吉安','360800',14),(132,'宜春','360900',14),(133,'抚州','361000',14),(134,'上饶','361100',14),(135,'济南','370100',15),(136,'青岛','370200',15),(137,'淄博','370300',15),(138,'枣庄','370400',15),(139,'东营','370500',15),(140,'烟台','370600',15),(141,'潍坊','370700',15),(142,'济宁','370800',15),(143,'泰安','370900',15),(144,'威海','371000',15),(145,'日照','371100',15),(146,'莱芜','371200',15),(147,'临沂','371300',15),(148,'德州','371400',15),(149,'聊城','371500',15),(150,'滨州','371600',15),(151,'荷泽','371700',15),(152,'郑州','410100',16),(153,'开封','410200',16),(154,'洛阳','410300',16),(155,'平顶山','410400',16),(156,'安阳','410500',16),(157,'鹤壁','410600',16),(158,'新乡','410700',16),(159,'焦作','410800',16),(160,'濮阳','410900',16),(161,'许昌','411000',16),(162,'漯河','411100',16),(163,'三门峡','411200',16),(164,'南阳','411300',16),(165,'商丘','411400',16),(166,'信阳','411500',16),(167,'周口','411600',16),(168,'驻马店','411700',16),(169,'武汉','420100',17),(170,'黄石','420200',17),(171,'十堰','420300',17),(172,'宜昌','420500',17),(173,'襄樊','420600',17),(174,'鄂州','420700',17),(175,'荆门','420800',17),(176,'孝感','420900',17),(177,'荆州','421000',17),(178,'黄冈','421100',17),(179,'咸宁','421200',17),(180,'随州','421300',17),(181,'恩施土家族苗族自治州','422800',17),(182,'省直辖行政单位','429000',17),(183,'长沙','430100',18),(184,'株洲','430200',18),(185,'湘潭','430300',18),(186,'衡阳','430400',18),(187,'邵阳','430500',18),(188,'岳阳','430600',18),(189,'常德','430700',18),(190,'张家界','430800',18),(191,'益阳','430900',18),(192,'郴州','431000',18),(193,'永州','431100',18),(194,'怀化','431200',18),(195,'娄底','431300',18),(196,'湘西土家族苗族自治州','433100',18),(197,'广州','440100',19),(198,'韶关','440200',19),(199,'深圳','440300',19),(200,'珠海','440400',19),(201,'汕头','440500',19),(202,'佛山','440600',19),(203,'江门','440700',19),(204,'湛江','440800',19),(205,'茂名','440900',19),(206,'肇庆','441200',19),(207,'惠州','441300',19),(208,'梅州','441400',19),(209,'汕尾','441500',19),(210,'河源','441600',19),(211,'阳江','441700',19),(212,'清远','441800',19),(213,'东莞','441900',19),(214,'中山','442000',19),(215,'潮州','445100',19),(216,'揭阳','445200',19),(217,'云浮','445300',19),(218,'南宁','450100',20),(219,'柳州','450200',20),(220,'桂林','450300',20),(221,'梧州','450400',20),(222,'北海','450500',20),(223,'防城港','450600',20),(224,'钦州','450700',20),(225,'贵港','450800',20),(226,'玉林','450900',20),(227,'百色','451000',20),(228,'贺州','451100',20),(229,'河池','451200',20),(230,'来宾','451300',20),(231,'崇左','451400',20),(232,'海口','460100',21),(233,'三亚','460200',21),(234,'省直辖县级行政单位','469000',21),(235,'辖区','500100',22),(236,'县','500200',22),(237,'','500300',22),(238,'成都','510100',23),(239,'自贡','510300',23),(240,'攀枝花','510400',23),(241,'泸州','510500',23),(242,'德阳','510600',23),(243,'绵阳','510700',23),(244,'广元','510800',23),(245,'遂宁','510900',23),(246,'内江','511000',23),(247,'乐山','511100',23),(248,'南充','511300',23),(249,'眉山','511400',23),(250,'宜宾','511500',23),(251,'广安','511600',23),(252,'达州','511700',23),(253,'雅安','511800',23),(254,'巴中','511900',23),(255,'资阳','512000',23),(256,'阿坝藏族羌族自治州','513200',23),(257,'甘孜藏族自治州','513300',23),(258,'凉山彝族自治州','513400',23),(259,'贵阳','520100',24),(260,'六盘水','520200',24),(261,'遵义','520300',24),(262,'安顺','520400',24),(263,'铜仁地区','522200',24),(264,'黔西南布依族苗族自治州','522300',24),(265,'毕节地区','522400',24),(266,'黔东南苗族侗族自治州','522600',24),(267,'黔南布依族苗族自治州','522700',24),(268,'昆明','530100',25),(269,'曲靖','530300',25),(270,'玉溪','530400',25),(271,'保山','530500',25),(272,'昭通','530600',25),(273,'丽江','530700',25),(274,'思茅','530800',25),(275,'临沧','530900',25),(276,'楚雄彝族自治州','532300',25),(277,'红河哈尼族彝族自治州','532500',25),(278,'文山壮族苗族自治州','532600',25),(279,'西双版纳傣族自治州','532800',25),(280,'大理白族自治州','532900',25),(281,'德宏傣族景颇族自治州','533100',25),(282,'怒江傈僳族自治州','533300',25),(283,'迪庆藏族自治州','533400',25),(284,'拉萨','540100',26),(285,'昌都地区','542100',26),(286,'山南地区','542200',26),(287,'日喀则地区','542300',26),(288,'那曲地区','542400',26),(289,'阿里地区','542500',26),(290,'林芝地区','542600',26),(291,'西安','610100',27),(292,'铜川','610200',27),(293,'宝鸡','610300',27),(294,'咸阳','610400',27),(295,'渭南','610500',27),(296,'延安','610600',27),(297,'汉中','610700',27),(298,'榆林','610800',27),(299,'安康','610900',27),(300,'商洛','611000',27),(301,'兰州','620100',28),(302,'嘉峪关','620200',28),(303,'金昌','620300',28),(304,'白银','620400',28),(305,'天水','620500',28),(306,'武威','620600',28),(307,'张掖','620700',28),(308,'平凉','620800',28),(309,'酒泉','620900',28),(310,'庆阳','621000',28),(311,'定西','621100',28),(312,'陇南','621200',28),(313,'临夏回族自治州','622900',28),(314,'甘南藏族自治州','623000',28),(315,'西宁','630100',29),(316,'海东地区','632100',29),(317,'海北藏族自治州','632200',29),(318,'黄南藏族自治州','632300',29),(319,'海南藏族自治州','632500',29),(320,'果洛藏族自治州','632600',29),(321,'玉树藏族自治州','632700',29),(322,'海西蒙古族藏族自治州','632800',29),(323,'银川','640100',30),(324,'石嘴山','640200',30),(325,'吴忠','640300',30),(326,'固原','640400',30),(327,'中卫','640500',30),(328,'乌鲁木齐','650100',31),(329,'克拉玛依','650200',31),(330,'吐鲁番地区','652100',31),(331,'哈密地区','652200',31),(332,'昌吉回族自治州','652300',31),(333,'博尔塔拉蒙古自治州','652700',31),(334,'巴音郭楞蒙古自治州','652800',31),(335,'阿克苏地区','652900',31),(336,'克孜勒苏柯尔克孜自治州','653000',31),(337,'喀什地区','653100',31),(338,'和田地区','653200',31),(339,'伊犁哈萨克自治州','654000',31),(340,'塔城地区','654200',31),(341,'阿勒泰地区','654300',31),(342,'省直辖行政单位','659000',31),(343,'天津',NULL,2);
+-- ALTER table userinfo drop positionId;
diff --git a/crm/src/main/db/update_33.sql b/crm/src/main/db/update_33.sql
new file mode 100644
index 0000000..6f7798d
--- /dev/null
+++ b/crm/src/main/db/update_33.sql
@@ -0,0 +1,47 @@
+drop table if exists importMetaInfo;
+CREATE TABLE importMetaInfo
+(
+ id MEDIUMINT NOT NULL AUTO_INCREMENT,
+ name VARCHAR(255) NOT NULL,
+ entity_name VARCHAR(255),
+ importfilename VARCHAR(255),
+ logfilename VARCHAR(255),
+ whenadded DATETIME,
+ modifier VARCHAR(255),
+ modify_datetime DATETIME,
+ num_of_total_record MEDIUMINT,
+ num_of_imported MEDIUMINT,
+ num_of_failed MEDIUMINT,
+ status MEDIUMINT,
+ result MEDIUMINT,
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB;
+
+
+
+DROP TABLE IF EXISTS `importstatus`;
+CREATE TABLE `crmdb`.`importstatus` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(45),
+ PRIMARY KEY (`id`)
+) ENGINE InnoDB;
+INSERT INTO importstatus (id,val) VALUES(0,'运行');
+INSERT INTO importstatus (id,val) VALUES(1,'已完成');
+
+DROP TABLE IF EXISTS `importresult`;
+CREATE TABLE `crmdb`.`importresult` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(45) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE InnoDB;
+INSERT INTO importresult (id,val) VALUES(0,'成功');
+INSERT INTO importresult (id,val) VALUES(1,'失败');
+
+
+ALTER table user_position add externalId varchar(128);
+ALTER table user_position add whenadded DATETIME;
+ALTER table user_position add modifier VARCHAR(255);
+ALTER table user_position add modify_datetime DATETIME;
+
+
+ALTER TABLE user_position drop KEY user_position_unique;
\ No newline at end of file
diff --git a/crm/src/main/db/update_34.sql b/crm/src/main/db/update_34.sql
new file mode 100644
index 0000000..aae5ef3
--- /dev/null
+++ b/crm/src/main/db/update_34.sql
@@ -0,0 +1,15 @@
+ALTER TABLE `crmdb`.`userinfo`
+DROP COLUMN `ts`,
+DROP COLUMN `isActivited`,
+ADD UNIQUE INDEX `loginName_UNIQUE` (`loginName` ASC);
+
+
+alter table importMetaInfo add num_of_updated int;
+
+
+-- ALTER table accountcrmuser add externalId varchar(128);
+ALTER table accountcrmuser add whenadded DATETIME;
+ALTER table accountcrmuser add modifier VARCHAR(255);
+ALTER table accountcrmuser add modify_datetime DATETIME;
+
+insert into user_position (userId,positionId,isPrimary) values(1,1,1);
\ No newline at end of file
diff --git a/crm/src/main/db/update_35.sql b/crm/src/main/db/update_35.sql
new file mode 100644
index 0000000..8f89aab
--- /dev/null
+++ b/crm/src/main/db/update_35.sql
@@ -0,0 +1,4 @@
+-- ALTER TABLE `crmdb`.`userinfo`
+-- DROP COLUMN `ts`,
+-- DROP COLUMN `isActivited`,
+-- ADD UNIQUE INDEX `loginName_UNIQUE` (`loginName` ASC);
\ No newline at end of file
diff --git a/crm/src/main/db/update_36.sql b/crm/src/main/db/update_36.sql
new file mode 100644
index 0000000..147081d
--- /dev/null
+++ b/crm/src/main/db/update_36.sql
@@ -0,0 +1,7 @@
+
+use crmdb;
+
+
+set session old_alter_table =on;
+ALTER IGNORE TABLE user_position ADD UNIQUE (positionId);
+set session old_alter_table =off;
diff --git a/crm/src/main/db/update_37.sql b/crm/src/main/db/update_37.sql
new file mode 100644
index 0000000..7abe7e6
--- /dev/null
+++ b/crm/src/main/db/update_37.sql
@@ -0,0 +1,13 @@
+drop view if exists crmdb.activity_alert;
+create view crmdb.activity_alert as
+SELECT id,
+case when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))=0 THEN '今天'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))=1 THEN '昨天'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))=2 THEN '前天'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))>=3 and to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))<7 THEN '三天以前'
+when to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))>=7 THEN '七天以前'
+ELSE '错误' END as time,
+title,
+act.owner as name,
+act.starttime as times
+FROM crmdb.activity act where status=1 and to_days(curdate())-to_days(DATE_FORMAT(from_unixtime(act.starttime/1000),'%Y-%m-%d'))>=0 order by times
\ No newline at end of file
diff --git a/crm/src/main/db/update_38.sql b/crm/src/main/db/update_38.sql
new file mode 100644
index 0000000..516bab5
--- /dev/null
+++ b/crm/src/main/db/update_38.sql
@@ -0,0 +1,3 @@
+use crmdb;
+
+alter table account CHANGE COLUMN date_of_establish date_of_establish varchar(128);
\ No newline at end of file
diff --git a/crm/src/main/db/update_39.sql b/crm/src/main/db/update_39.sql
new file mode 100644
index 0000000..c5c6a02
--- /dev/null
+++ b/crm/src/main/db/update_39.sql
@@ -0,0 +1,41 @@
+drop view if exists parent_user_info;
+drop view if exists parent_user_position;
+drop view if exists parent_position;
+create view parent_user_info as select * from userinfo;
+create view parent_user_position as select * from user_position;
+create view parent_position as select * from crmuser;
+
+drop view if exists user_position_query;
+
+create view user_position_query as
+select user_position.userid user_id,
+ user_position.positionid position_id,
+ region_level1_pl.val area,
+ region_level2_pl.val region,
+ province.val province,
+ crmuser_pl2.val productLine,
+ crmuser.level position_level,
+ crmuser.name position_name,
+ crmuser.code position_code,
+ userinfo.employeenumber delegatePosition,
+ userinfo.name delegateName,
+ parent_position.id manager_position_id,
+ parent_position.code managerPosition,
+ parent_position.name manager_position_name,
+ parent_position.level manager_position_level,
+ parent_user_info.employeenumber manager_employee_number,
+ parent_user_info.name regionManager,
+ account.name accountName,
+ account.bdm_code BDMcode
+from user_position
+left join crmuser on user_position.positionid = crmuser.id
+left join userinfo on user_position.userid = userinfo.id
+left join parent_position on crmuser.reportto = parent_position.id
+left join parent_user_position on parent_position.id = parent_user_position.positionid
+left join parent_user_info on parent_user_position.userid = parent_user_info.id
+inner join accountcrmuser on user_position.positionid = accountcrmuser.crmuserid
+inner join account on accountcrmuser.accountid = account.id
+left join region_level1_pl on crmuser.pl4 = region_level1_pl.id
+left join region_level2_pl on crmuser.pl5 = region_level2_pl.id
+left join province on account.province = province.id
+left join crmuser_pl2 on crmuser_pl2.id = crmuser.pl2
diff --git a/crm/src/main/db/update_4.sql b/crm/src/main/db/update_4.sql
new file mode 100644
index 0000000..a00a678
--- /dev/null
+++ b/crm/src/main/db/update_4.sql
@@ -0,0 +1,19 @@
+use crmdb;
+
+drop trigger if exists activity_score_insert;
+DELIMITER |
+
+CREATE TRIGGER activity_score_insert BEFORE INSERT ON activity
+ FOR EACH ROW BEGIN
+ SET NEW.total_score = (NEW.planing + NEW.openling + NEW.enquery_listening + NEW.deliverable + NEW.objection_handing + NEW.summary);
+ END;
+|
+
+drop trigger if exists activity_score_update;
+CREATE TRIGGER activity_score_update BEFORE UPDATE ON activity
+ FOR EACH ROW BEGIN
+ SET NEW.total_score = (NEW.planing + NEW.openling + NEW.enquery_listening + NEW.deliverable + NEW.objection_handing + NEW.summary);
+ END;
+|
+
+DELIMITER ;
\ No newline at end of file
diff --git a/crm/src/main/db/update_40.sql b/crm/src/main/db/update_40.sql
new file mode 100644
index 0000000..991b60a
--- /dev/null
+++ b/crm/src/main/db/update_40.sql
@@ -0,0 +1,8 @@
+drop table if exists crmuser_level_pl;
+CREATE TABLE `crmdb`.`crmuser_level_pl` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(45) NULL,
+ PRIMARY KEY (`id`));
+ INSERT INTO `crmdb`.`crmuser_level_pl` (`id`, `val`) VALUES ('11', '11');
+INSERT INTO `crmdb`.`crmuser_level_pl` (`id`, `val`) VALUES ('21', '21');
+INSERT INTO `crmdb`.`crmuser_level_pl` (`id`, `val`) VALUES ('31', '31');
\ No newline at end of file
diff --git a/crm/src/main/db/update_41.sql b/crm/src/main/db/update_41.sql
new file mode 100644
index 0000000..d0ee79e
--- /dev/null
+++ b/crm/src/main/db/update_41.sql
@@ -0,0 +1,2 @@
+INSERT INTO `crmdb`.`contact_grade_pl` (`val`) VALUES ('V');
+INSERT INTO `crmdb`.`contact_grade_pl` (`val`) VALUES ('非目标医生');
diff --git a/crm/src/main/db/update_5.sql b/crm/src/main/db/update_5.sql
new file mode 100644
index 0000000..693b2bd
--- /dev/null
+++ b/crm/src/main/db/update_5.sql
@@ -0,0 +1,15 @@
+use crmdb;
+ALTER TABLE `crmdb`.`crmuser`
+CHANGE COLUMN `isActivited` `isActivited` MEDIUMINT(9) NULL DEFAULT NULL ;
+
+DROP TABLE IF EXISTS `crmuser_activited`;
+CREATE TABLE `crmdb`.`crmuser_activited` (
+ `id` MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB;
+INSERT INTO `crmdb`.`crmuser_activited` (`id`, `val`) VALUES ('1', '已激活');
+INSERT INTO `crmdb`.`crmuser_activited` (`id`, `val`) VALUES ('2', '未激活');
+
+ALTER TABLE `crmdb`.`account`
+ADD UNIQUE INDEX `account_ix_01` (`bdm_code` ASC);
\ No newline at end of file
diff --git a/crm/src/main/db/update_51.sql b/crm/src/main/db/update_51.sql
new file mode 100644
index 0000000..e1da5ce
--- /dev/null
+++ b/crm/src/main/db/update_51.sql
@@ -0,0 +1,16 @@
+DELETE FROM `crmdb`.`activity_coachtime_pl` WHERE `id`='1';
+DROP TABLE `crmdb`.`activity_whethercoach_pl`;
+UPDATE `crmdb`.`city` SET `val`='菏泽' WHERE `id`='151';
+UPDATE `crmdb`.`city` SET `val`='重庆' WHERE `id`='235';
+DELETE FROM `crmdb`.`city` WHERE `id`='236';
+INSERT INTO `crmdb`.`city` (`id`, `val`, `parentId`) VALUES ('345', '未知地域', '31');
+INSERT INTO `crmdb`.`city` (`id`, `val`, `parentId`) VALUES ('346', '未知地域', '27');
+INSERT INTO `crmdb`.`city` (`id`, `val`, `parentId`) VALUES ('347', '三河(虚拟)', '1');
+
+UPDATE `crmdb`.`region_level2_pl` SET `val`='奥诺美北区' WHERE `id`='1';
+UPDATE `crmdb`.`region_level2_pl` SET `val`='奥诺美东北区' WHERE `id`='2';
+UPDATE `crmdb`.`region_level2_pl` SET `val`='奥诺美东一区' WHERE `id`='3';
+UPDATE `crmdb`.`region_level2_pl` SET `val`='奥诺美东二区' WHERE `id`='4';
+UPDATE `crmdb`.`region_level2_pl` SET `val`='奥诺美西区' WHERE `id`='5';
+UPDATE `crmdb`.`region_level2_pl` SET `val`='奥诺美南区' WHERE `id`='6';
+DELETE FROM `crmdb`.`region_level2_pl` WHERE `id`='7';
\ No newline at end of file
diff --git a/crm/src/main/db/update_52.sql b/crm/src/main/db/update_52.sql
new file mode 100644
index 0000000..ac3c3ff
--- /dev/null
+++ b/crm/src/main/db/update_52.sql
@@ -0,0 +1,8 @@
+UPDATE `crmdb`.`alert_publicobject_pl` SET `val`='系统管理员' WHERE `id`='1';
+UPDATE `crmdb`.`alert_publicobject_pl` SET `val`='地区经理' WHERE `id`='2';
+UPDATE `crmdb`.`alert_publicobject_pl` SET `val`='销售代表' WHERE `id`='3';
+
+DELETE FROM `crmdb`.`contact_grade_pl` WHERE `id`='4';
+UPDATE `crmdb`.`contact_grade_pl` SET `id`='4' WHERE `id`='5';
+UPDATE `crmdb`.`contact_grade_pl` SET `id`='5' WHERE `id`='6';
+
diff --git a/crm/src/main/db/update_53.sql b/crm/src/main/db/update_53.sql
new file mode 100644
index 0000000..9f503f0
--- /dev/null
+++ b/crm/src/main/db/update_53.sql
@@ -0,0 +1,51 @@
+DELETE FROM `crmdb`.`crmuser_pl2` WHERE `id`='4';
+
+INSERT INTO `crmdb`.`alert_publicobject_pl` (`id`, `val`) VALUES ('4', '所有人');
+
+drop view if exists crmdb.call_export;
+create view crmdb.call_export as
+SELECT act.id as id,act.title as Activity_title,acp.val as Activity_whetherCoach,afpp.val as Activity_feature_product,at.val as Activity_types,act.whenadded as Activity_addTime,act.modify_datetime as Activity_modifyTime,from_unixtime(act.starttime/1000) as Activity_start,from_unixtime(act.endtime/1000) as Activity_end,
+u.name as Position_name,rlp1.val as Region_level_1,rlp2.val as Region_level_2,u.code as position_code,r.val as position_role,
+c.name as Contact_name,cgp.val as Contact_grade,cdp.val as Contact_department,sp.val as Contact_sex,c.email as Contact_email,cdp2.val as Contact_duty,cjtp.val as Contact_job_title,
+a.name as Account_name , a.bdm_code as Account_BDMCode,atl.val as Account_type,aalp.val as Account_administrative_level,aloap.val as local_or_army,acosp.val as comprehensive_or_specialized,app.val as isKey,asp.val as Account_status
+FROM crmdb.activity act
+left join crmdb.activity_coachtime_pl acp on
+act.whetherCoach=acp.id
+left join crmdb.activity_feature_product_pl afpp on
+act.feature_product=afpp.id
+left join crmdb.activity_types at on
+act.activity_type=at.id
+left join crmdb.crmuser u on
+act.crmuserId = u.id
+left join crmdb.contact c on
+act.contactId = c.id
+left join crmdb.contact_grade_pl cgp on
+c.grade=cgp.id
+left join crmdb.contact_department_pl cdp on
+c.department=cdp.id
+left join crmdb.sex_pl sp on
+c.sex=sp.id
+left join crmdb.contact_duty_pl cdp2 on
+c.duty=cdp2.id
+left join crmdb.contact_job_title_pl cjtp on
+c.job_title=cjtp.id
+left join crmdb.region_level1_pl rlp1 on
+u.pl5=rlp1.id
+left join crmdb.region_level2_pl rlp2 on
+u.pl4=rlp2.id
+left join crmdb.role r on
+u.role=r.id
+left join crmdb.account a on
+c.accountId= a.id
+left join crmdb.account_type_pl atl on
+a.hospital_type = atl.id
+left join crmdb.account_administrativ_level_pl aalp on
+a.administrativ_level=aalp.id
+left join crmdb.account_local_or_army_pl aloap on
+a.local_or_army=aloap.id
+left join crmdb.account_comprehensive_or_specialized_pl acosp on
+a.comprehensive_or_specialized=acosp.id
+left join crmdb.account_point_pl app on
+a.key_type=app.id
+left join crmdb.account_status_pl asp on
+a.status=asp.id order by id
\ No newline at end of file
diff --git a/crm/src/main/db/update_54.sql b/crm/src/main/db/update_54.sql
new file mode 100644
index 0000000..1c02bb6
--- /dev/null
+++ b/crm/src/main/db/update_54.sql
@@ -0,0 +1,13 @@
+CREATE TABLE `product` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL,
+ `status` int(11) NOT NULL DEFAULT '1',
+ `parentid` int(11) DEFAULT NULL,
+ `specification` varchar(512) DEFAULT NULL,
+ `created_date` datetime DEFAULT NULL,
+ `modified_date` datetime DEFAULT NULL,
+ `created_by_user_id` int(11) DEFAULT NULL,
+ `modfied_by_user_id` int(11) DEFAULT NULL,
+ `level` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
diff --git a/crm/src/main/db/update_55.sql b/crm/src/main/db/update_55.sql
new file mode 100644
index 0000000..a4c4ebd
--- /dev/null
+++ b/crm/src/main/db/update_55.sql
@@ -0,0 +1,15 @@
+use crmdb;
+
+drop table if exists activity_coachtime_pl;
+CREATE TABLE activity_coachtime_pl
+(
+ id MEDIUMINT NOT NULL,
+ val VARCHAR(255),
+ PRIMARY KEY USING BTREE (id)
+) ENGINE InnoDB DEFAULT CHARSET=utf8;
+INSERT INTO `crmdb`.`activity_coachtime_pl` (`id`, `val`) VALUES ('1', '半天');
+INSERT INTO `crmdb`.`activity_coachtime_pl` (`id`, `val`) VALUES ('2', '全天');
+
+
+ALTER table accountcrmuser add owner VARCHAR(255);
+ALTER table user_position add owner VARCHAR(255);
\ No newline at end of file
diff --git a/crm/src/main/db/update_56.sql b/crm/src/main/db/update_56.sql
new file mode 100644
index 0000000..0a31884
--- /dev/null
+++ b/crm/src/main/db/update_56.sql
@@ -0,0 +1,32 @@
+DELETE FROM `crmdb`.`region_level1_pl` WHERE `id`='3';
+DELETE FROM `crmdb`.`region_level1_pl` WHERE `id`='1';
+DELETE FROM `crmdb`.`region_level1_pl` WHERE `id`='2';
+INSERT INTO `crmdb`.`region_level1_pl` (`id`, `val`) VALUES ('1', '中国区');
+
+ALTER TABLE `crmdb`.`alert`
+ADD COLUMN `alertRegion` MEDIUMINT(9) NULL AFTER `modify_datetime`;
+
+DROP TABLE IF EXISTS `crmdb`.`alert_region_pl`;
+CREATE TABLE `crmdb`.`alert_region_pl` (
+ `id` INT NOT NULL,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('1', '奥诺美北区');
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('2', '奥诺美东北区');
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('3', '奥诺美东一区');
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('4', '奥诺美东二区');
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('5', '奥诺美西区');
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('6', '奥诺美南区');
+INSERT INTO `crmdb`.`alert_region_pl` (`id`, `val`) VALUES ('7', '所有区');
+
+DELETE FROM `crmdb`.`data_exchange_teample` WHERE `id`='1';
+
+INSERT INTO `crmdb`.`data_exchange_teample` (`id`, `name`, `template`) VALUES ('1', 'Account Export Full Template 1.0', '\n\n 1000 \n Account \n BdmCode \n account.csv \n crm_mysql \n 100000 \n GBK \n \n Id \n Integer \n Id \n \n\n \n Name \n String \n Name \n \n\n\n \n BdmCode \n String \n BdmCode \n \n\n\n \n DutyOfficer \n String \n DutyOfficer \n \n\n \n numofdoctors \n Integer \n numofdoctors \n \n\n \n numofsurgeryroom \n Integer \n numofsurgeryroom \n \n \n numofsurgeryperyear \n Integer \n numofsurgeryperyear \n \n \n numofpaindoctor \n Integer \n numofpaindoctor \n \n \n numofanesthesiadoctor \n Integer \n numofanesthesiadoctor \n \n \n totalnumofsickbed \n Integer \n totalnumofsickbed \n \n \n numofoutpatient \n Integer \n numofoutpatient \n \n \n numoftreatperyear \n Integer \n numoftreatperyear \n \n \n numofstaff \n Integer \n numofstaff \n \n \n numofassistantdoctors \n Integer \n numofassistantdoctors \n \n\n \n registeredcapital \n Integer \n registeredcapital \n \n \n numofusingopiatesinjection \n Integer \n numofusingopiatesinjection \n \n \n numofusingopiatesmedicine \n Integer \n numofusingopiatesmedicine \n \n\n \n dateofestablish \n Date \n dateofestablish \n m/d/yy \n \n\n \n fax \n Integer \n fax \n \n\n \n tel \n Integer \n tel \n \n\n \n districts \n Integer \n districts \n \n \n address \n Integer \n address \n \n \n owner \n Integer \n owner \n \n \n responsibleperson \n Integer \n responsibleperson \n \n\n\n \n whenadded \n Date \n whenadded \n m/d/yy \n \n\n \n modifydatetime \n Date \n modifydatetime \n m/d/yy \n \n\n \n modifier \n String \n modifier \n \n\n \n administrativlevel \n Integer \n administrativlevel \n \n\n\n \n 医院类型 \n Lookup \n HospitalType \n AccountTypePl \n Val \n Id \n \n\n \n localorarmy \n Lookup \n localorarmy \n AccountLocalOrArmyPl \n Val \n Id \n \n\n \n comprehensiveorspecialized \n Lookup \n comprehensiveorspecialized \n AccountComprehensiveOrSpecializedPl \n Val \n Id \n \n\n\n \n keytype \n Lookup \n keytype \n AccountPointPl \n Val \n Id \n \n \n status \n Lookup \n status \n AccountStatusPl \n Val \n Id \n \n\n \n marketclassification \n Lookup \n marketclassification \n AccountMarketClassificationPl \n Val \n Id \n \n \n province \n Lookup \n province \n Province \n Val \n Id \n \n \n city \n Lookup \n city \n City \n Val \n Id \n \n \n');
+INSERT INTO `crmdb`.`data_exchange_teample` (`id`, `name`, `template`) VALUES ('2', 'Contact Export Full Template 1.0', '\n\n 1000 \n Contact \n contact.csv \n contactCode \n crm_mysql \n GBK \n 100000 \n \n contactCode \n String \n contactCode \n \n \n duty \n Lookup \n duty \n ContactDutyPl \n val \n Id \n \n \n grade \n Lookup \n grade \n ContactGradePl \n val \n Id \n \n \n \n \n \n marketclassification \n Lookup \n marketclassification \n ContactMarketClassificationPl \n val \n Id \n \n \n \n jobtitle \n Lookup \n jobtitle \n ContactJobTitlePl \n val \n Id \n \n \n \n accountId \n Lookup \n accountId \n Account \n Name \n Id \n \n \n \n \n \n city \n Lookup \n city \n City \n val \n Id \n \n \n \n sex \n Lookup \n sex \n SexPl \n val \n Id \n \n \n \n \n \n province \n Lookup \n province \n Province \n val \n Id \n \n \n cellphone \n String \n cellphone \n \n \n contactCode \n String \n contactCode \n \n \n 科室 \n Lookup \n department \n ContactDepartmentPl \n val \n id \n \n \n districts \n String \n districts \n \n \n email \n String \n email \n \n \n modifier \n String \n modifier \n \n \n name \n String \n name \n \n \n nativeplace \n String \n nativeplace \n \n \n officefax \n String \n officefax \n \n \n officetel \n String \n officetel \n \n \n owner \n String \n owner \n \n \n producttarget \n String \n producttarget \n \n \n responsibleperson \n String \n responsibleperson \n \n \n status \n String \n status \n \n \n modifydatetime \n Date \n modifydatetime \n m/d/yy \n \n \n whenadded \n Date \n whenadded \n m/d/yy \n \n \n \n \n \n \n ');
+INSERT INTO `crmdb`.`data_exchange_teample` (`id`, `name`, `template`) VALUES ('3', 'Position Export Full Template 1.0', '\n\n 1000 \n Crmuser \n Id \n position.csv \n crm_mysql \n GBK \n 100000 \n \n Id \n Integer \n Id \n \n \n Name \n String \n Name \n \n \n code \n String \n code \n \n \n reportto \n Integer \n reportto \n \n \n role \n Lookup \n role \n Role \n Val \n Id \n \n \n pl1 \n Lookup \n pl1 \n CrmuserPl1 \n Val \n Id \n \n \n pl2 \n Lookup \n pl2 \n CrmuserPl2 \n Val \n Id \n \n \n role \n Lookup \n role \n Role \n Val \n Id \n \n \n role \n Lookup \n role \n Role \n Val \n Id \n \n \n 城市 \n Lookup \n city \n City \n Val \n Id \n \n \n modifier \n String \n Name \n \n \n department \n String \n Name \n \n\n \n pl4 \n Lookup \n pl4 \n RegionLevel1Pl \n Val \n Id \n \n \n pl5 \n Lookup \n pl5 \n RegionLevel2Pl \n Val \n Id \n \n \n whenadded \n Date \n whenadded \n m/d/yy \n \n \n modifydatetime \n Date \n modifydatetime \n m/d/yy \n \n \n owner \n String \n owner \n \n \n level \n Integer \n level \n \n ');
+INSERT INTO `crmdb`.`data_exchange_teample` (`id`, `name`, `template`) VALUES ('4', 'Activity Export Full Template 1.0', '\n\n 1000 \n Activity \n Id \n Activity.csv \n crm_mysql \n GBK \n 100000 \n \n Id \n Integer \n Id \n \n \n Name \n String \n Name \n \n \n eventtype \n Lookup \n eventtype \n ActivityEventTypePl \n val \n Id \n \n \n starttime \n Date \n starttime \n m/d/yy \n \n \n endtime \n Date \n endtime \n m/d/yy \n \n \n title \n String \n title \n \n \n participants \n String \n participants \n \n \n activitytype \n Lookup \n activitytype \n \n ActivityTypes \n val \n Id \n \n \n');
+INSERT INTO `crmdb`.`data_exchange_teample` (`id`, `name`, `template`) VALUES ('5', 'Account Team Export Full Template 1.0', '\n\n 1000 \n Accountcrmuser \n account_position.csv \n Id \n crm_mysql \n GBK \n 100000 \n \n Id \n Integer \n Id \n \n \n \n accountId \n Lookup \n accountId \n Account \n Name \n Id \n \n \n \n crmuser \n Lookup \n crmuserid \n Crmuser \n name \n Id \n \n ');
+INSERT INTO `crmdb`.`data_exchange_teample` (`id`, `name`, `template`) VALUES ('6', 'UserPosition Team Export Full Template 1.0', '\n\n 1000 \n UserPosition \n user_position.csv \n ExternalId \n crm_mysql \n GBK \n 100000 \n \n Id \n Integer \n Id \n \n positionId \n Integer \n positionId \n \n userId \n Integer \n userId \n \n \n positionid \n Lookup \n positionId \n Crmuser \n Name \n Id \n \n \n userId \n Lookup \n userId \n Userinfo \n name \n Id \n \n \n externalId \n String \n externalId \n \n ');
+
diff --git a/crm/src/main/db/update_57.sql b/crm/src/main/db/update_57.sql
new file mode 100644
index 0000000..17e6698
--- /dev/null
+++ b/crm/src/main/db/update_57.sql
@@ -0,0 +1,14 @@
+ALTER TABLE `crmdb`.`activity`
+ADD COLUMN `activity_coachType` MEDIUMINT(9) NULL AFTER `activity_daypart`;
+
+DROP TABLE IF EXISTS `crmdb`.`activity_coachtype_pl`;
+CREATE TABLE `crmdb`.`activity_coachtype_pl` (
+ `id` MEDIUMINT(9) NOT NULL,
+ `val` VARCHAR(255) NULL,
+ PRIMARY KEY (`id`)
+ ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+
+INSERT INTO `crmdb`.`activity_coachtype_pl` (`id`, `val`) VALUES ('1', '拜访辅导');
+INSERT INTO `crmdb`.`activity_coachtype_pl` (`id`, `val`) VALUES ('2', '科室会辅导');
+DELETE FROM `crmdb`.`activity_event_type_pl` WHERE `id`='3';
+UPDATE `crmdb`.`activity_event_type_pl` SET `val`='辅导' WHERE `id`='2';
\ No newline at end of file
diff --git a/crm/src/main/db/update_58.sql b/crm/src/main/db/update_58.sql
new file mode 100644
index 0000000..eaeec28
--- /dev/null
+++ b/crm/src/main/db/update_58.sql
@@ -0,0 +1,11 @@
+DROP TABLE IF EXISTS `crmdb`.`data_audit`;
+CREATE TABLE `crmdb`.`data_audit` (
+ `id` INT NOT NULL AUTO_INCREMENT,
+ `entity_name` VARCHAR(45) NOT NULL,
+ `record_id` INT NOT NULL,
+ `modify_time` DATETIME NOT NULL,
+ `modifier` VARCHAR(45) NOT NULL,
+ `column_name` VARCHAR(45) NOT NULL,
+ `old_value` VARCHAR(45) ,
+ `new_value` VARCHAR(45) ,
+ PRIMARY KEY (`id`));
\ No newline at end of file
diff --git a/crm/src/main/db/update_59.sql b/crm/src/main/db/update_59.sql
new file mode 100644
index 0000000..9057d01
--- /dev/null
+++ b/crm/src/main/db/update_59.sql
@@ -0,0 +1,44 @@
+use crmdb;
+drop table if Exists product;
+drop table if Exists productline;
+drop table if Exists productcategory;
+CREATE TABLE `product` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL,
+ `status` int(11) NOT NULL DEFAULT '1',
+ `productlineId` int(11) NOT NULL,
+ `description` varchar(512) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ `owner` varchar(50) DEFAULT NULL,
+ `modifier` varchar(50) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `productcategory` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL,
+ `status` int(11) NOT NULL DEFAULT '1',
+ `productId` int(11) NOT NULL,
+ `description` varchar(512) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ `owner` varchar(50) DEFAULT NULL,
+ `modifier` varchar(50) DEFAULT NULL,
+ `productlineId` int(11) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=utf8;
+
+CREATE TABLE `productline` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) NOT NULL,
+ `status` int(11) NOT NULL DEFAULT '1',
+ `description` varchar(512) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ `owner` varchar(50) DEFAULT NULL,
+ `modifier` varchar(50) DEFAULT NULL,
+ `val` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
+
diff --git a/crm/src/main/db/update_6.sql b/crm/src/main/db/update_6.sql
new file mode 100644
index 0000000..e0752ff
--- /dev/null
+++ b/crm/src/main/db/update_6.sql
@@ -0,0 +1,5 @@
+use crmdb;
+
+-- ALTER table activity_visiting_purpose_pl change activity_type parentId mediumint(9);
+ALTER table activity_visiting_purpose_pl add parentId mediumint(9);
+update activity_visiting_purpose_pl set parentId = activity_type;
\ No newline at end of file
diff --git a/crm/src/main/db/update_60.sql b/crm/src/main/db/update_60.sql
new file mode 100644
index 0000000..7b963de
--- /dev/null
+++ b/crm/src/main/db/update_60.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `crmdb`.`activity`
+CHANGE COLUMN `endtime` `endtime` DATETIME NULL ,
+CHANGE COLUMN `starttime` `starttime` DATETIME NOT NULL ;
\ No newline at end of file
diff --git a/crm/src/main/db/update_61.sql b/crm/src/main/db/update_61.sql
new file mode 100644
index 0000000..433a86d
--- /dev/null
+++ b/crm/src/main/db/update_61.sql
@@ -0,0 +1,15 @@
+CREATE TABLE `crmdb`.`accountcrmuser_relation_history` (
+ `id` INT NOT NULL AUTO_INCREMENT,
+ `position_id` INT NOT NULL,
+ `account_id` INT NOT NULL,
+ `modify_time` DATE NOT NULL,
+ `modifier` VARCHAR(45) NOT NULL,
+ PRIMARY KEY (`id`));
+
+CREATE TABLE `crmdb`.`userposition_relation_history` (
+ `id` INT NOT NULL AUTO_INCREMENT,
+ `position_id` INT NOT NULL,
+ `userinfo_id` INT NOT NULL,
+ `modify_time` DATE NOT NULL,
+ `modifier` VARCHAR(45) NOT NULL,
+ PRIMARY KEY (`id`));
diff --git a/crm/src/main/db/update_62.sql b/crm/src/main/db/update_62.sql
new file mode 100644
index 0000000..f5039ce
--- /dev/null
+++ b/crm/src/main/db/update_62.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `crmdb`.`alert`
+CHANGE COLUMN `expired` `expired` DATETIME NULL DEFAULT NULL ,
+CHANGE COLUMN `publishDate` `publishDate` DATETIME NULL DEFAULT NULL ;
diff --git a/crm/src/main/db/update_63.sql b/crm/src/main/db/update_63.sql
new file mode 100644
index 0000000..e305f40
--- /dev/null
+++ b/crm/src/main/db/update_63.sql
@@ -0,0 +1,15 @@
+drop view if exists crmdb.activity_alert;
+create view crmdb.activity_alert as
+select
+id,
+case
+when to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))=0 THEN '今天'
+when to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))=1 THEN '昨天'
+when to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))=2 THEN '前天'
+when to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))>=3 and to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))<7 THEN '三天以前'
+when to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))>=7 THEN '七天以前'
+ELSE '错误' END as time,
+title,
+act.owner as name,
+act.starttime as times
+from activity act where status=1 and to_days(curdate())-to_days(DATE_FORMAT(act.starttime,'%Y-%m-%d'))>=0 order by times
\ No newline at end of file
diff --git a/crm/src/main/db/update_64.sql b/crm/src/main/db/update_64.sql
new file mode 100644
index 0000000..11123b5
--- /dev/null
+++ b/crm/src/main/db/update_64.sql
@@ -0,0 +1,15 @@
+ALTER TABLE `crmdb`.`alert`
+ADD COLUMN `attachment` MEDIUMINT(9) NULL AFTER `alertRegion`;
+
+CREATE TABLE `crmdb`.`alertattachment` (
+ `id` MEDIUMINT(9) NOT NULL,
+ `fileName` VARCHAR(255) NULL,
+ `whenadded` DATETIME NULL,
+ `owner` VARCHAR(255) NULL,
+ `alertId` MEDIUMINT(9) NULL,
+ `modify_datetime` DATETIME NULL,
+ PRIMARY KEY (`id`)
+ )ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
+
+ALTER TABLE `crmdb`.`data_audit`
+CHANGE COLUMN `modify_time` `modify_time` DATETIME NOT NULL ;
diff --git a/crm/src/main/db/update_65.sql b/crm/src/main/db/update_65.sql
new file mode 100644
index 0000000..c74f2e8
--- /dev/null
+++ b/crm/src/main/db/update_65.sql
@@ -0,0 +1,35 @@
+drop view if exists user_position_query;
+create view user_position_query as select
+accountcrmuser.id as id,
+ `user_position`.`userId` AS `user_id`,
+ `user_position`.`positionId` AS `position_id`,
+ `region_level1_pl`.`val` AS `area`,
+ `region_level2_pl`.`val` AS `region`,
+ `province`.`val` AS `province`,
+ `crmuser_pl2`.`val` AS `productLine`,
+ `crmuser`.`level` AS `position_level`,
+ `crmuser`.`name` AS `position_name`,
+ `crmuser`.`code` AS `position_code`,
+ `userinfo`.`employeeNumber` AS `delegatePosition`,
+ `userinfo`.`name` AS `delegateName`,
+ `parent_position`.`id` AS `manager_position_id`,
+ `parent_position`.`code` AS `managerPosition`,
+ `parent_position`.`name` AS `manager_position_name`,
+ `parent_position`.`level` AS `manager_position_level`,
+ `parent_user_info`.`employeeNumber` AS `manager_employee_number`,
+ `parent_user_info`.`name` AS `regionManager`,
+ `account`.`name` AS `accountName`,
+ `account`.`bdm_code` AS `BDMcode`
+ from
+ (((((((((((`user_position`
+ left join `crmuser` ON ((`user_position`.`positionId` = `crmuser`.`id`)))
+ left join `userinfo` ON ((`user_position`.`userId` = `userinfo`.`id`)))
+ left join `parent_position` ON ((`crmuser`.`reportto` = `parent_position`.`id`)))
+ left join `parent_user_position` ON ((`parent_position`.`id` = `parent_user_position`.`positionId`)))
+ left join `parent_user_info` ON ((`parent_user_position`.`userId` = `parent_user_info`.`id`)))
+ join `accountcrmuser` ON ((`user_position`.`positionId` = `accountcrmuser`.`crmuserId`)))
+ join `account` ON ((`accountcrmuser`.`accountId` = `account`.`id`)))
+ left join `region_level1_pl` ON ((`crmuser`.`pl4` = `region_level1_pl`.`id`)))
+ left join `region_level2_pl` ON ((`crmuser`.`pl5` = `region_level2_pl`.`id`)))
+ left join `province` ON ((`account`.`province` = `province`.`id`)))
+ left join `crmuser_pl2` ON ((`crmuser_pl2`.`id` = `crmuser`.`pl2`)))
\ No newline at end of file
diff --git a/crm/src/main/db/update_66.sql b/crm/src/main/db/update_66.sql
new file mode 100644
index 0000000..d92785a
--- /dev/null
+++ b/crm/src/main/db/update_66.sql
@@ -0,0 +1,8 @@
+ALTER TABLE `crmdb`.`userposition_relation_history`
+CHANGE COLUMN `userinfo_id` `user_id` INT(11) NOT NULL ,
+CHANGE COLUMN `modify_time` `modify_time` DATETIME NOT NULL ;
+
+
+ALTER TABLE `crmdb`.`accountcrmuser_relation_history`
+CHANGE COLUMN `modify_time` `modify_time` DATETIME NOT NULL ;
+
diff --git a/crm/src/main/db/update_67.sql b/crm/src/main/db/update_67.sql
new file mode 100644
index 0000000..970ae93
--- /dev/null
+++ b/crm/src/main/db/update_67.sql
@@ -0,0 +1,41 @@
+drop VIEW if exists user_position_query;
+USE `crmdb`;
+CREATE
+ OR REPLACE ALGORITHM = UNDEFINED
+ DEFINER = `crm`@`localhost`
+ SQL SECURITY DEFINER
+VIEW `user_position_query` AS
+ select
+ `accountcrmuser`.`id` AS `id`,
+ `user_position`.`userId` AS `user_id`,
+ `user_position`.`positionId` AS `position_id`,
+ `region_level1_pl`.`val` AS `area`,
+ `region_level2_pl`.`val` AS `region`,
+ `province`.`val` AS `province`,
+ `productline`.`val` AS `productLine`,
+ `crmuser`.`level` AS `position_level`,
+ `crmuser`.`name` AS `position_name`,
+ `crmuser`.`code` AS `position_code`,
+ `userinfo`.`employeeNumber` AS `delegatePosition`,
+ `userinfo`.`name` AS `delegateName`,
+ `parent_position`.`id` AS `manager_position_id`,
+ `parent_position`.`code` AS `managerPosition`,
+ `parent_position`.`name` AS `manager_position_name`,
+ `parent_position`.`level` AS `manager_position_level`,
+ `parent_user_info`.`employeeNumber` AS `manager_employee_number`,
+ `parent_user_info`.`name` AS `regionManager`,
+ `account`.`name` AS `accountName`,
+ `account`.`bdm_code` AS `BDMcode`
+ from
+ (((((((((((`user_position`
+ left join `crmuser` ON ((`user_position`.`positionId` = `crmuser`.`id`)))
+ left join `userinfo` ON ((`user_position`.`userId` = `userinfo`.`id`)))
+ left join `parent_position` ON ((`crmuser`.`reportto` = `parent_position`.`id`)))
+ left join `parent_user_position` ON ((`parent_position`.`id` = `parent_user_position`.`positionId`)))
+ left join `parent_user_info` ON ((`parent_user_position`.`userId` = `parent_user_info`.`id`)))
+ join `accountcrmuser` ON ((`user_position`.`positionId` = `accountcrmuser`.`crmuserId`)))
+ join `account` ON ((`accountcrmuser`.`accountId` = `account`.`id`)))
+ left join `region_level1_pl` ON ((`crmuser`.`pl4` = `region_level1_pl`.`id`)))
+ left join `region_level2_pl` ON ((`crmuser`.`pl5` = `region_level2_pl`.`id`)))
+ left join `province` ON ((`account`.`province` = `province`.`id`)))
+ left join `productline` ON ((`productline`.`id` = `crmuser`.`pl2`)));
diff --git a/crm/src/main/db/update_68.sql b/crm/src/main/db/update_68.sql
new file mode 100644
index 0000000..184f650
--- /dev/null
+++ b/crm/src/main/db/update_68.sql
@@ -0,0 +1,22 @@
+drop view if exists activity_alert;
+create view activity_alert as
+
+select `act`.`id` AS `id`,
+(case when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) = 0) then '今天'
+when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) = 1) then '昨天'
+when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) = 2) then '前天'
+when (((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) >= 3) and ((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) < 7)) then '三天以前'
+when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) >= 7) then '七天以前'
+ else '错误' end) AS `time`,
+`act`.`title` AS `title`,`act`.`owner` AS `name`,`act`.`starttime` AS `starttime` ,act.endtime as endtime,
+c.name as contact,avpp.val as purpose,act.whenadded as addtime,pl.val as product,acp.val as coachtype
+from `activity` `act`
+left join contact c on
+c.id=act.contactId
+left join activity_visiting_purpose_pl avpp on
+act.visiting_purpose=avpp.id
+left join productline pl on
+pl.id=act.feature_product
+left join activity_coachtype_pl acp on
+acp.id=act.activity_coachType
+ where ((`act`.`status` = 1) and ((to_days(curdate()) - to_days(date_format(`act`.`starttime`,'%Y-%m-%d'))) >= 0)) order by `starttime` desc;
diff --git a/crm/src/main/db/update_69.sql b/crm/src/main/db/update_69.sql
new file mode 100644
index 0000000..a247244
--- /dev/null
+++ b/crm/src/main/db/update_69.sql
@@ -0,0 +1,20 @@
+drop view if exists user_position_account;
+create view user_position_account as
+select `ac`.`id` AS `id`,`u`.`name` AS `userName`,`u`.`loginName` AS `loginName`,`u`.`email` AS `email`,`sp`.`val` AS `sex`,`u`.`whenadded` AS `addTime`,`c`.`name` AS `positionName`,`c`.`code` AS `positionCode`,
+(select `crm`.`name` from `crmuser` `crm` where (`crm`.`id` = `c`.`reportto`)) AS `reportTo`,
+(select u.name from userinfo u left join user_position iup on iup.userId=u.id left join crmuser ic on ic.id=iup.positionId where ic.name=(select `crm`.`name` from `crmuser` `crm` where (`crm`.`id` = `c`.`reportto`))) as DSMName,
+(select `c1`.`name` from `crmuser` `c1` where (`c1`.`id` = (select `c2`.`reportto` from `crmuser` `c2` where (`c2`.`id` = `c`.`reportto`)))) AS `reporttto`,
+(select u.name from userinfo u left join user_position iup on iup.userId=u.id left join crmuser ic on ic.id=iup.positionId where ic.name=(select `c1`.`name` from `crmuser` `c1` where (`c1`.`id` = (select `c2`.`reportto` from `crmuser` `c2` where (`c2`.`id` = `c`.`reportto`))))) as RSMName,
+`r`.`val` AS `role`,`rlp4`.`val` AS `regoin1`,`rlp5`.`val` AS `regoin2`,`ct`.`val` AS `city`,`a`.`name` AS `accountName`,`a`.`bdm_code` AS `BDMCode`,`aalp`.`val` AS `adminLevel`,`asp`.`val` AS `status` from (((((((((((`userinfo` `u`
+left join `sex_pl` `sp` on((`u`.`sex` = `sp`.`id`)))
+left join `user_position` `up` on((`u`.`id` = `up`.`userId`)))
+left join `crmuser` `c` on((`up`.`positionId` = `c`.`id`)))
+left join `role` `r` on((`c`.`role` = `r`.`id`)))
+left join `region_level1_pl` `rlp4` on((`c`.`pl4` = `rlp4`.`id`)))
+left join `region_level1_pl` `rlp5` on((`c`.`pl5` = `rlp5`.`id`)))
+left join `city` `ct` on((`c`.`city` = `ct`.`id`)))
+ left join `accountcrmuser` `ac` on((`c`.`id` = `ac`.`crmuserId`)))
+left join `account` `a` on((`ac`.`accountId` = `a`.`id`)))
+left join `account_status_pl` `asp` on((`a`.`status` = `asp`.`id`)))
+left join `account_administrativ_level_pl` `aalp` on((`a`.`administrativ_level` = `aalp`.`id`)))
+where up.status = 1 and c.role>2 and ac.id>0 order by `ac`.`id`;
diff --git a/crm/src/main/db/update_7.sql b/crm/src/main/db/update_7.sql
new file mode 100644
index 0000000..ba1e6a5
--- /dev/null
+++ b/crm/src/main/db/update_7.sql
@@ -0,0 +1,59 @@
+
+
+
+
+DROP TABLE IF EXISTS `userInfo`;
+CREATE TABLE `userInfo` (
+ `id` mediumint(9) NOT NULL AUTO_INCREMENT,
+ `name` varchar(255) NOT NULL,
+ `department` varchar(255) DEFAULT NULL,
+ `division` varchar(255) DEFAULT NULL,
+ `cellPhone` varchar(255) DEFAULT NULL,
+ `email` varchar(255) DEFAULT NULL,
+ `employeeNumber` varchar(255) DEFAULT NULL,
+ `photo` varchar(255) DEFAULT NULL,
+ `jobTitle` varchar(255) DEFAULT NULL,
+ `pl1` mediumint(9) DEFAULT NULL,
+ `pl2` mediumint(9) DEFAULT NULL,
+ `role` mediumint(9) DEFAULT NULL,
+ `pl4` mediumint(9) DEFAULT NULL,
+ `pl5` mediumint(9) DEFAULT NULL,
+ `sex` mediumint(9) DEFAULT NULL,
+ `loginName` varchar(255) DEFAULT NULL,
+ `password` varchar(255) DEFAULT NULL,
+ `sessionKey` varchar(255) DEFAULT NULL,
+ `lastLoginTime` bigint(20) DEFAULT NULL,
+ `whenadded` datetime DEFAULT NULL,
+ `reportto` mediumint(9) DEFAULT NULL,
+ `parcel` varchar(255) DEFAULT NULL,
+ `modifier` varchar(255) DEFAULT NULL,
+ `modify_datetime` datetime DEFAULT NULL,
+ `owner` varchar(255) DEFAULT NULL,
+ `postId` varchar(255) DEFAULT NULL,
+ `city` varchar(255) DEFAULT NULL,
+ `isActivited` mediumint(9) DEFAULT NULL,
+ `ts` bigint(20) DEFAULT NULL,
+ `positionId` mediumint(9) DEFAULT NULL,
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8;
+
+INSERT INTO `userInfo` (id,name,loginname,password,role,isActivited,ts,positionId) VALUES
+(-1,'无','dummy','827ccb0eea8a706c4c34a16891f84e7b',1,2,1386766666,-1),
+(1,'Admin Nam','admin','827ccb0eea8a706c4c34a16891f84e7b',1,2,1386766666,1),
+(2,'Sales Manager','salesman','827ccb0eea8a706c4c34a16891f84e7b',2,2,1386766666,2),
+(3,'Sales','sales','827ccb0eea8a706c4c34a16891f84e7b',3,2,1386766666,3);
+
+insert into crmuser (id,name,code,reportto,role) values
+(-1,'无','BJ',0,-1),
+(1,'管理员','BJ231011001',-1,1),
+(2,'北区地区经理01','BJ131011001',1,2),
+(3,'北区代表001','BJ131001001',2,3);
+
+
+
+ALTER table crmuser ADD level MEDIUMINT;
+ALTER table crmuser ADD position_code varchar(255);
+
+
+
+
diff --git a/crm/src/main/db/update_70.sql b/crm/src/main/db/update_70.sql
new file mode 100644
index 0000000..b5a7b34
--- /dev/null
+++ b/crm/src/main/db/update_70.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `crmdb`.`alertattachment`
+CHANGE COLUMN `id` `id` MEDIUMINT(9) NOT NULL AUTO_INCREMENT ,
+ADD COLUMN `modifier` VARCHAR(255) NULL AFTER `modify_datetime`;
\ No newline at end of file
diff --git a/crm/src/main/db/update_71.sql b/crm/src/main/db/update_71.sql
new file mode 100644
index 0000000..27c0cc2
--- /dev/null
+++ b/crm/src/main/db/update_71.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `crmdb`.`alertattachment`
+ADD COLUMN `srcForFile` VARCHAR(255) NULL AFTER `modifier`;
\ No newline at end of file
diff --git a/crm/src/main/db/update_72.sql b/crm/src/main/db/update_72.sql
new file mode 100644
index 0000000..d8cd489
--- /dev/null
+++ b/crm/src/main/db/update_72.sql
@@ -0,0 +1,3 @@
+ALTER TABLE `crmdb`.`contact`
+ADD COLUMN `initializationdepartment` VARCHAR(128) NULL AFTER `externalId`;
+UPDATE `crmdb`.`contact_grade_pl` SET `val`='VIP' WHERE `id`='4';
\ No newline at end of file
diff --git a/crm/src/main/db/update_73.sql b/crm/src/main/db/update_73.sql
new file mode 100644
index 0000000..217b5a6
--- /dev/null
+++ b/crm/src/main/db/update_73.sql
@@ -0,0 +1,82 @@
+USE `crmdb`;
+drop view if exists activity_alert;
+CREATE
+ OR REPLACE ALGORITHM = UNDEFINED
+ DEFINER = `crm`@`localhost`
+ SQL SECURITY DEFINER
+VIEW `activity_alert` AS
+ select
+ `act`.`id` AS `id`,
+ (case
+ when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) = 0) then '今天'
+ when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) = 1) then '昨天'
+ when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) = 2) then '前天'
+ when
+ (((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) >= 3)
+ and ((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) < 7))
+ then
+ '三天以前'
+ when ((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) >= 7) then '七天以前'
+ else '错误'
+ end) AS `time`,
+ `act`.`title` AS `title`,
+ `act`.`owner` AS `name`,
+ `act`.`starttime` AS `starttime`,
+ `act`.`endtime` AS `endtime`,
+ `c`.`id` AS `contact`,
+ `avpp`.`val` AS `purpose`,
+ `act`.`whenadded` AS `addtime`,
+ `pl`.`val` AS `product`,
+ `acp`.`val` AS `coachtype`
+ from
+ ((((`activity` `act`
+ left join `contact` `c` ON ((`c`.`id` = `act`.`contactId`)))
+ left join `activity_visiting_purpose_pl` `avpp` ON ((`act`.`visiting_purpose` = `avpp`.`id`)))
+ left join `productline` `pl` ON ((`pl`.`id` = `act`.`feature_product`)))
+ left join `activity_coachtype_pl` `acp` ON ((`acp`.`id` = `act`.`activity_coachType`)))
+ where
+ ((`act`.`status` = 1)
+ and ((to_days(curdate()) - to_days(date_format(`act`.`starttime`, '%Y-%m-%d'))) >= 0))
+ order by `act`.`starttime` desc;
+
+
+ drop view if exists user_position_query;
+ CREATE
+ ALGORITHM = UNDEFINED
+ DEFINER = `crm`@`localhost`
+ SQL SECURITY DEFINER
+VIEW `user_position_query` AS
+ select
+ `accountcrmuser`.`id` AS `id`,
+ `user_position`.`userId` AS `user_id`,
+ `user_position`.`positionId` AS `position_id`,
+ `region_level1_pl`.`val` AS `area`,
+ `region_level2_pl`.`val` AS `region`,
+ `province`.`val` AS `province`,
+ `productline`.`val` AS `productLine`,
+ `crmuser`.`level` AS `position_level`,
+ `crmuser`.`name` AS `position_name`,
+ `crmuser`.`code` AS `position_code`,
+ `userinfo`.`employeeNumber` AS `delegatePosition`,
+ `userinfo`.`name` AS `delegateName`,
+ `parent_position`.`id` AS `manager_position_id`,
+ `parent_position`.`code` AS `managerPosition`,
+ `parent_position`.`name` AS `manager_position_name`,
+ `parent_position`.`level` AS `manager_position_level`,
+ `parent_user_info`.`employeeNumber` AS `manager_employee_number`,
+ `parent_user_info`.`name` AS `regionManager`,
+ `account`.`id` AS `accountName`,
+ `account`.`bdm_code` AS `BDMcode`
+ from
+ (((((((((((`user_position`
+ left join `crmuser` ON ((`user_position`.`positionId` = `crmuser`.`id`)))
+ left join `userinfo` ON ((`user_position`.`userId` = `userinfo`.`id`)))
+ left join `parent_position` ON ((`crmuser`.`reportto` = `parent_position`.`id`)))
+ left join `parent_user_position` ON ((`parent_position`.`id` = `parent_user_position`.`positionId`)))
+ left join `parent_user_info` ON ((`parent_user_position`.`userId` = `parent_user_info`.`id`)))
+ join `accountcrmuser` ON ((`user_position`.`positionId` = `accountcrmuser`.`crmuserId`)))
+ join `account` ON ((`accountcrmuser`.`accountId` = `account`.`id`)))
+ left join `region_level1_pl` ON ((`crmuser`.`pl4` = `region_level1_pl`.`id`)))
+ left join `region_level2_pl` ON ((`crmuser`.`pl5` = `region_level2_pl`.`id`)))
+ left join `province` ON ((`account`.`province` = `province`.`id`)))
+ left join `productline` ON ((`productline`.`id` = `crmuser`.`pl2`)))
diff --git a/crm/src/main/db/update_8.sql b/crm/src/main/db/update_8.sql
new file mode 100644
index 0000000..1b91b40
--- /dev/null
+++ b/crm/src/main/db/update_8.sql
@@ -0,0 +1,9 @@
+
+drop table if exists user_position;
+create table user_position (
+id int(64) auto_increment,
+userId int(64),
+positionId int(64),
+primary key (id),
+unique index user_position_unique (userId,positionId)
+)ENGINE InnoDB;
\ No newline at end of file
diff --git a/crm/src/main/doc/account_crmuser_import.csv b/crm/src/main/doc/account_crmuser_import.csv
new file mode 100644
index 0000000..babebdb
--- /dev/null
+++ b/crm/src/main/doc/account_crmuser_import.csv
@@ -0,0 +1 @@
+BDM,λ,ExternalId
16940,SH131011001,16940SH131011001
16879,SH131011001,16879SH131011001
16836,SH131011001,16836SH131011001
\ No newline at end of file
diff --git a/crm/src/main/doc/account_crmuser_import.xml b/crm/src/main/doc/account_crmuser_import.xml
new file mode 100644
index 0000000..192c097
--- /dev/null
+++ b/crm/src/main/doc/account_crmuser_import.xml
@@ -0,0 +1,30 @@
+
+
+ 1000
+ Accountcrmuser
+ account_crmuser_import.csv
+ ExternalId
+ crm_mysql
+ 100000
+
+ ExternalId
+ String
+ ExternalId
+
+
+ BDM编码
+ Lookup
+ accountId
+ Account
+ BdmCode
+ Id
+
+
+ 岗位编码
+ Lookup
+ crmuserid
+ Crmuser
+ Code
+ Id
+
+
\ No newline at end of file
diff --git a/crm/src/main/doc/account_export.xml b/crm/src/main/doc/account_export.xml
new file mode 100644
index 0000000..00327ea
--- /dev/null
+++ b/crm/src/main/doc/account_export.xml
@@ -0,0 +1,246 @@
+
+
+ 1000
+ Account
+ BdmCode
+ account.csv
+ crm_mysql
+ 100000
+
+ Id
+ Integer
+ Id
+
+
+
+ Name
+ String
+ Name
+
+
+
+
+ BdmCode
+ String
+ BdmCode
+
+
+
+
+ Grade
+ String
+ Grade
+
+
+
+ DutyOfficer
+ String
+ DutyOfficer
+
+
+
+ numofdoctors
+ Integer
+ numofdoctors
+
+
+
+ numofsurgeryroom
+ Integer
+ numofsurgeryroom
+
+
+ numofsurgeryperyear
+ Integer
+ numofsurgeryperyear
+
+
+ numofpaindoctor
+ Integer
+ numofpaindoctor
+
+
+ numofanesthesiadoctor
+ Integer
+ numofanesthesiadoctor
+
+
+ totalnumofsickbed
+ Integer
+ totalnumofsickbed
+
+
+ numofoutpatient
+ Integer
+ numofoutpatient
+
+
+ numoftreatperyear
+ Integer
+ numoftreatperyear
+
+
+ numofstaff
+ Integer
+ numofstaff
+
+
+ numofassistantdoctors
+ Integer
+ numofassistantdoctors
+
+
+
+ registeredcapital
+ Integer
+ registeredcapital
+
+
+ numofusingopiatesinjection
+ Integer
+ numofusingopiatesinjection
+
+
+ numofusingopiatesmedicine
+ Integer
+ numofusingopiatesmedicine
+
+
+
+ dateofestablish
+ Date
+ dateofestablish
+ m/d/yy
+
+
+
+ fax
+ Integer
+ fax
+
+
+
+ tel
+ Integer
+ tel
+
+
+
+ districts
+ Integer
+ districts
+
+
+ address
+ Integer
+ address
+
+
+ owner
+ Integer
+ owner
+
+
+ responsibleperson
+ Integer
+ responsibleperson
+
+
+
+
+ whenadded
+ Date
+ whenadded
+ m/d/yy
+
+
+
+ modifydatetime
+ Date
+ modifydatetime
+ m/d/yy
+
+
+
+ modifier
+ String
+ modifier
+
+
+
+ administrativlevel
+ String
+ administrativlevel
+
+
+
+
+ 医院类型
+ Lookup
+ HospitalType
+ AccountTypePl
+ Val
+ Id
+
+
+
+ localorarmy
+ Lookup
+ localorarmy
+ AccountLocalOrArmyPl
+ Val
+ Id
+
+
+
+ comprehensiveorspecialized
+ Lookup
+ comprehensiveorspecialized
+ AccountComprehensiveOrSpecializedPl
+ Val
+ Id
+
+
+
+
+ keytype
+ Lookup
+ keytype
+ AccountPointPl
+ Val
+ Id
+
+
+ status
+ Lookup
+ status
+ AccountStatusPl
+ Val
+ Id
+
+
+
+ marketclassification
+ Lookup
+ marketclassification
+ AccountMarketClassificationPl
+ Val
+ Id
+
+
+ province
+ Lookup
+ province
+ Province
+ Val
+ Id
+
+
+ city
+ Lookup
+ city
+ City
+ Val
+ Id
+
+
diff --git a/crm/src/main/doc/account_import.csv b/crm/src/main/doc/account_import.csv
new file mode 100644
index 0000000..f408d14
--- /dev/null
+++ b/crm/src/main/doc/account_import.csv
@@ -0,0 +1 @@
+BDM,ҽԺ,ʡ,,,,ҽԺ,طҽԺ,ۺרҽԺ,صҽԺ,״̬,ҽԺּ,г
10071,ѪܲרҽԺ,,,,,ŵĿҽԺ,طҽԺ,ۺҽԺ,ŵصҽԺ,Ч,,սԳ
11139,йһͻְҽԺ,,,ϳ,δ,ĿҽԺ,ҽԺ,רҽԺ,صҽԺ,Ч,,һ
1114,дȾҽԺ,,,,,ʹĿҽԺ,ҽԺ,ۺҽԺ,ŵصҽԺ,Ч,,
\ No newline at end of file
diff --git a/crm/src/main/doc/account_import.xml b/crm/src/main/doc/account_import.xml
new file mode 100644
index 0000000..fc82666
--- /dev/null
+++ b/crm/src/main/doc/account_import.xml
@@ -0,0 +1,106 @@
+
+
+ 1000
+ Account
+ BdmCode
+ account_import.csv
+ crm_mysql
+ 100000
+
+ BDM编码
+ String
+ BdmCode
+
+
+ 标准医院名
+ String
+ Name
+
+
+ 省份
+ Lookup
+ Province
+ Province
+ Val
+ Id
+
+
+ 城市
+ Lookup
+ city
+ City
+ Val
+ Id
+
+
+ 区县
+ String
+ districts
+
+
+ true
+ 行政级别
+ Lookup
+ AdministrativLevel
+ AccountAdministrativLevelPl
+ Val
+ Id
+
+
+ true
+ 医院分级
+ Lookup
+ Grade
+ AccountGradePl
+ Val
+ Id
+
+
+ 医院类型
+ Lookup
+ HospitalType
+ AccountTypePl
+ Val
+ Id
+
+
+ 地方军队医院
+ Lookup
+ LocalOrArmy
+ AccountLocalOrArmyPl
+ Val
+ Id
+
+
+ 综合专科医院
+ Lookup
+ ComprehensiveOrSpecialized
+ AccountComprehensiveOrSpecializedPl
+ Val
+ Id
+
+
+ 重点医院
+ Lookup
+ KeyType
+ AccountPointPl
+ Val
+ Id
+
+
+ 状态
+ Lookup
+ Status
+ AccountStatusPl
+ Val
+ Id
+
+
+ 市场分类
+ Lookup
+ MarketClassification
+ AccountMarketClassificationPl
+ Val
+ Id
+
+
diff --git a/crm/src/main/doc/account_position_export.xml b/crm/src/main/doc/account_position_export.xml
new file mode 100644
index 0000000..876b701
--- /dev/null
+++ b/crm/src/main/doc/account_position_export.xml
@@ -0,0 +1,32 @@
+
+
+ 1000
+ Accountcrmuser
+ account_position.csv
+ Id
+ crm_mysql
+ 100000
+
+ Id
+ Integer
+ Id
+
+
+
+ accountId
+ Lookup
+ accountId
+ Account
+ Name
+ Id
+
+
+
+ crmuser
+ Lookup
+ crmuserid
+ Crmuser
+ name
+ Id
+
+
\ No newline at end of file
diff --git a/crm/src/main/doc/activity_crmuser_export.xml b/crm/src/main/doc/activity_crmuser_export.xml
new file mode 100644
index 0000000..33499ae
--- /dev/null
+++ b/crm/src/main/doc/activity_crmuser_export.xml
@@ -0,0 +1,35 @@
+
+
+ 1000
+ Activitycrmuser
+ activity_crmuser.csv
+ Id
+ crm_mysql
+ 100000
+
+ Id
+ Integer
+ Id
+
+
+
+ activityid
+ Lookup
+ activityid
+ Activity
+ Name
+ Id
+
+
+
+ crmuserid
+ Lookup
+ crmuserid
+ Userinfo
+ name
+ Id
+
+
+
+
+
\ No newline at end of file
diff --git a/crm/src/main/doc/activity_export.xml b/crm/src/main/doc/activity_export.xml
new file mode 100644
index 0000000..364059b
--- /dev/null
+++ b/crm/src/main/doc/activity_export.xml
@@ -0,0 +1,67 @@
+
+
+ 1000
+ Activity
+ Id
+ Activity.csv
+ crm_mysql
+ 100000
+
+ Id
+ Integer
+ Id
+
+
+ Name
+ String
+ Name
+
+
+
+ crmuserId
+ Lookup
+ crmuserId
+ Userinfo
+ Name
+ Id
+
+
+ eventtype
+ Lookup
+ eventtype
+ ActivityEventTypePl
+ val
+ Id
+
+
+ starttime
+ Date
+ starttime
+ m/d/yy
+
+
+ endtime
+ Date
+ endtime
+ m/d/yy
+
+
+ title
+ String
+ title
+
+
+ participants
+ String
+ participants
+
+
+ activitytype
+ Lookup
+ activitytype
+
+ ActivityTypes
+ val
+ Id
+
+
diff --git a/crm/src/main/doc/configuration.xml b/crm/src/main/doc/configuration.xml
new file mode 100644
index 0000000..94d59d6
--- /dev/null
+++ b/crm/src/main/doc/configuration.xml
@@ -0,0 +1,37 @@
+
+
+ 1000
+ crm_mysql
+ Account
+ ExternalId
+
+ false
+ Id
+ Integer
+ Id
+
+
+ false
+ ExternalId
+ Integer
+ ExternalId
+
+
+ false
+ StartTime
+ Date
+ StartTime
+ YYYY-MM-DD
+
+
+ true
+ Department
+ Lookup
+ DepartmentId
+ Department
+ Name
+ Id
+
+ account.csv
+ 1000000
+
diff --git a/crm/src/main/doc/contact_export.xml b/crm/src/main/doc/contact_export.xml
new file mode 100644
index 0000000..349d7f6
--- /dev/null
+++ b/crm/src/main/doc/contact_export.xml
@@ -0,0 +1,180 @@
+
+
+ 1000
+ Contact
+ contact.csv
+ contactCode
+ crm_mysql
+ 100000
+
+ contactCode
+ String
+ contactCode
+
+
+ duty
+ Lookup
+ duty
+ ContactDutyPl
+ val
+ Id
+
+
+ grade
+ Lookup
+ grade
+ ContactGradePl
+ val
+ Id
+
+
+
+
+
+ marketclassification
+ Lookup
+ marketclassification
+ ContactMarketClassificationPl
+ val
+ Id
+
+
+
+ jobtitle
+ Lookup
+ jobtitle
+ ContactJobTitlePl
+ val
+ Id
+
+
+
+ accountId
+ Lookup
+ accountId
+ Account
+ Name
+ Id
+
+
+
+
+
+ city
+ Lookup
+ city
+ City
+ val
+ Id
+
+
+
+ sex
+ Lookup
+ sex
+ SexPl
+ val
+ Id
+
+
+
+
+
+ province
+ Lookup
+ province
+ Province
+ val
+ Id
+
+
+ cellphone
+ String
+ cellphone
+
+
+ contactCode
+ String
+ contactCode
+
+
+ 科室
+ Lookup
+ department
+ ContactDepartmentPl
+ val
+ id
+
+
+ districts
+ String
+ districts
+
+
+ email
+ String
+ email
+
+
+ modifier
+ String
+ modifier
+
+
+ name
+ String
+ name
+
+
+ nativeplace
+ String
+ nativeplace
+
+
+ officefax
+ String
+ officefax
+
+
+ officetel
+ String
+ officetel
+
+
+ owner
+ String
+ owner
+
+
+ producttarget
+ String
+ producttarget
+
+
+ responsibleperson
+ String
+ responsibleperson
+
+
+ status
+ String
+ status
+
+
+ modifydatetime
+ Date
+ modifydatetime
+ m/d/yy
+
+
+ whenadded
+ Date
+ whenadded
+ m/d/yy
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/crm/src/main/doc/contact_import.csv b/crm/src/main/doc/contact_import.csv
new file mode 100644
index 0000000..2a6d48c
--- /dev/null
+++ b/crm/src/main/doc/contact_import.csv
@@ -0,0 +1 @@
+,ҽּ,¾,ʹ̨,ְ,ְ,Ա,ֻ,BDM,״̬,CRMҽ,ο,
ƽ,A,80,80,סԺҽʦ,,,13888888888,20540,Ч,D0000001,,
лȻ,A,20,20,ҽʦ,,Ů,13777777777,20540,Ч,D0000002,,
,A,20,20,ҽʦ,ɹ,,13555555555,20151,Ч,D0000003,,
\ No newline at end of file
diff --git a/crm/src/main/doc/contact_import.xml b/crm/src/main/doc/contact_import.xml
new file mode 100644
index 0000000..be95619
--- /dev/null
+++ b/crm/src/main/doc/contact_import.xml
@@ -0,0 +1,76 @@
+
+
+ 1000
+ Contact
+ contact_import.csv
+ ContactCode
+ crm_mysql
+ 100000
+
+
+ Code
+ String
+ ContactCode
+
+
+
+ 目标医生姓名
+ String
+ name
+
+
+ 医生级别
+ Lookup
+ grade
+ ContactGradePl
+ val
+ Id
+
+
+ 职称
+ Lookup
+ jobtitle
+ ContactJobTitlePl
+ val
+ Id
+
+
+
+ 行政职务(如有)
+ Lookup
+ duty
+ ContactDutyPl
+ val
+ Id
+
+
+ 医院ID
+ Lookup
+ accountid
+ Account
+ BdmCode
+ Id
+
+
+ 科室
+ Lookup
+ department
+ ContactDepartmentPl
+ val
+ id
+
+
+ 性别
+ Lookup
+ sex
+ SexPl
+ val
+ Id
+
+
+
+ 手机
+ String
+ cellphone
+
+
\ No newline at end of file
diff --git a/crm/src/main/doc/crmuser_import.csv b/crm/src/main/doc/crmuser_import.csv
new file mode 100644
index 0000000..0cff48d
--- /dev/null
+++ b/crm/src/main/doc/crmuser_import.csv
@@ -0,0 +1 @@
+λ,λ,ϼλ,ɫ,״̬,Ʒ,,һ,,
E1131031001,E1131031001,,,Ч,ŵ,31,й,,ŵһ
һ01,SH131021001,E1131031001,,Ч,ŵ,21,й,Ϻ,ŵһ
һ001,SH131011001,SH131021001,۴,Ч,ŵ,11,й,Ϻ,ŵһ
\ No newline at end of file
diff --git a/crm/src/main/doc/crmuser_reportto_import.csv b/crm/src/main/doc/crmuser_reportto_import.csv
new file mode 100644
index 0000000..0cff48d
--- /dev/null
+++ b/crm/src/main/doc/crmuser_reportto_import.csv
@@ -0,0 +1 @@
+λ,λ,ϼλ,ɫ,״̬,Ʒ,,һ,,
E1131031001,E1131031001,,,Ч,ŵ,31,й,,ŵһ
һ01,SH131021001,E1131031001,,Ч,ŵ,21,й,Ϻ,ŵһ
һ001,SH131011001,SH131021001,۴,Ч,ŵ,11,й,Ϻ,ŵһ
\ No newline at end of file
diff --git a/crm/src/main/doc/mag.rptdesign b/crm/src/main/doc/mag.rptdesign
new file mode 100644
index 0000000..903ef96
--- /dev/null
+++ b/crm/src/main/doc/mag.rptdesign
@@ -0,0 +1,8302 @@
+
+
+ Eclipse BIRT Designer Version 4.3.1.v201309091055 Build <4.3.1.v20130918-1142>
+
+
+ Data Cube - dl_by_dn_date.dl_by_dn_date.x
+ integer
+ false
+
+
+ Data Cube - dl_by_dn_date.dl_by_dn_date.y
+ integer
+ false
+
+
+ downloading_mag.downloading_of_magazine.x
+ integer
+ false
+
+
+ downloading_mag.downloading_of_magazine.y
+ integer
+ false
+
+
+ downloading_mag.downloading_of_magazine.width
+ integer
+ false
+
+
+ downloading_mag.downloading_of_magazine.height
+ integer
+ false
+
+
+ downloading_mag.Group3.NewTabularHierarchy4.x
+ integer
+ false
+
+
+ downloading_mag.Group3.NewTabularHierarchy4.y
+ integer
+ false
+
+
+ 135
+ 80
+ 226
+ 46
+ 150
+ 200
+ 12
+ 46
+
+
+ queryText
+ 297
+
+
+ queryTimeOut
+ 297
+
+
+ rowFetchSize
+ 297
+
+
+ queryText
+ 273
+
+
+ queryTimeOut
+ 273
+
+
+ rowFetchSize
+ 273
+
+
+ queryText
+ 275
+
+
+ queryTimeOut
+ 275
+
+
+ rowFetchSize
+ 275
+
+
+ in
+ /templates/blank_report.gif
+ auto layout
+ ltr
+ 96
+
+
+
+
+ metadataBidiFormatStr
+ ILYNN
+
+
+ disabledMetadataBidiFormatStr
+
+
+ contentBidiFormatStr
+ ILYNN
+
+
+ disabledContentBidiFormatStr
+
+
+ com.mysql.jdbc.Driver
+ jdbc:mysql://localhost:3306/analyzerdb
+ analyzer
+ New BIRT JDBC Data Source
+ abc
+
+
+
+
+
+
+ id
+ measure
+ id
+ id
+
+
+ device_id
+ dimension
+ device_id
+ device_id
+
+
+ log_time
+ dimension
+ log_time
+ log_time
+
+
+ event_type
+ dimension
+ event_type
+ event_type
+
+
+ param1
+ dimension
+ param1
+ param1
+
+
+ param2
+ dimension
+ param2
+ param2
+
+
+ param3
+ dimension
+ param3
+ param3
+
+
+ param4
+ dimension
+ param4
+ param4
+
+
+ param5
+ dimension
+ param5
+ param5
+
+
+ param6
+ dimension
+ param6
+ param6
+
+
+
+
+
+ 1
+ id
+ decimal
+
+
+ 2
+ device_id
+ string
+
+
+ 3
+ log_time
+ date-time
+
+
+ 4
+ event_type
+ string
+
+
+ 5
+ param1
+ string
+
+
+ 6
+ param2
+ string
+
+
+ 7
+ param3
+ string
+
+
+ 8
+ param4
+ string
+
+
+ 9
+ param5
+ string
+
+
+ 10
+ param6
+ string
+
+
+
+ analyzer data source
+
+
+ 1
+ id
+ id
+ decimal
+ -5
+
+
+ 2
+ device_id
+ device_id
+ string
+ 12
+
+
+ 3
+ log_time
+ log_time
+ date-time
+ 93
+
+
+ 4
+ event_type
+ event_type
+ string
+ 12
+
+
+ 5
+ param1
+ param1
+ string
+ 12
+
+
+ 6
+ param2
+ param2
+ string
+ 12
+
+
+ 7
+ param3
+ param3
+ string
+ 12
+
+
+ 8
+ param4
+ param4
+ string
+ 12
+
+
+ 9
+ param5
+ param5
+ string
+ 12
+
+
+ 10
+ param6
+ param6
+ string
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ id
+ 1
+
+ -5
+ 20
+ 0
+ NotNullable
+
+ id
+
+
+
+ id
+
+ 20
+
+
+
+
+
+
+ device_id
+ 2
+
+ 12
+ 64
+ 0
+ NotNullable
+
+ device_id
+
+
+
+ device_id
+
+ 64
+
+
+
+
+
+
+ log_time
+ 3
+
+ 93
+ 19
+ 0
+ NotNullable
+
+ log_time
+
+
+
+ log_time
+
+ 19
+
+
+
+
+
+
+ event_type
+ 4
+
+ 12
+ 32
+ 0
+ Nullable
+
+ event_type
+
+
+
+ event_type
+
+ 32
+
+
+
+
+
+
+ param1
+ 5
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param1
+
+
+
+ param1
+
+ 64
+
+
+
+
+
+
+ param2
+ 6
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param2
+
+
+
+ param2
+
+ 64
+
+
+
+
+
+
+ param3
+ 7
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param3
+
+
+
+ param3
+
+ 64
+
+
+
+
+
+
+ param4
+ 8
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param4
+
+
+
+ param4
+
+ 64
+
+
+
+
+
+
+ param5
+ 9
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param5
+
+
+
+ param5
+
+ 64
+
+
+
+
+
+
+ param6
+ 10
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param6
+
+
+
+ param6
+
+ 64
+
+
+
+
+
+
+
+ ]]>
+
+
+ nulls lowest
+
+
+ count(id)
+ measure
+ count(id)
+ count(id)
+
+
+ dldt
+ dimension
+ dldt
+ dldt
+
+
+
+
+
+
+ 1
+ count(id)
+ decimal
+
+
+ 2
+ dldt
+ date
+
+
+
+ analyzer data source
+
+
+ 1
+ count(id)
+ count(id)
+ decimal
+ -5
+
+
+ 2
+ dldt
+ dldt
+ date
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ imei
+ 1
+
+ 12
+ 32
+ 0
+ Nullable
+
+ imei
+
+
+
+ imei
+
+ 32
+
+
+
+
+
+
+ dldt
+ 2
+
+ 12
+ 10
+ 0
+ Nullable
+
+ dldt
+
+
+
+ dldt
+
+ 10
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ count(device_id)
+ measure
+ count(device_id)
+ count(device_id)
+
+
+ dt
+ dimension
+ dt
+ dt
+
+
+
+
+
+
+ 1
+ count(device_id)
+ decimal
+
+
+ 2
+ dt
+ date
+
+
+
+ analyzer data source
+
+
+ 1
+ count(device_id)
+ count(device_id)
+ decimal
+ -5
+
+
+ 2
+ dt
+ dt
+ date
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ count(device_id)
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ count(device_id)
+
+
+
+ count(device_id)
+
+ 21
+
+
+
+
+
+
+ dt
+ 2
+
+ 12
+ 8
+ 0
+ Nullable
+
+ dt
+
+
+
+ dt
+
+ 8
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ count(id)
+ measure
+ count(id)
+ count(id)
+
+
+ dt
+ dimension
+ dt
+ dt
+
+
+
+
+
+
+ 1
+ count(id)
+ decimal
+
+
+ 2
+ dt
+ string
+
+
+
+ analyzer data source
+
+
+ 1
+ count(id)
+ count(id)
+ decimal
+ -5
+
+
+ 2
+ dt
+ dt
+ string
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ count(id)
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ count(id)
+
+
+
+ count(id)
+
+ 21
+
+
+
+
+
+
+ dt
+ 2
+
+ 12
+ 8
+ 0
+ Nullable
+
+ dt
+
+
+
+ dt
+
+ 8
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ count(id)
+ measure
+ count(id)
+ count(id)
+
+
+ dt
+ dimension
+ dt
+ dt
+
+
+
+
+
+
+ 1
+ count(id)
+ decimal
+
+
+ 2
+ dt
+ date
+
+
+
+ analyzer data source
+
+
+ 1
+ count(id)
+ count(id)
+ decimal
+ -5
+
+
+ 2
+ dt
+ dt
+ date
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ count(id)
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ count(id)
+
+
+
+ count(id)
+
+ 21
+
+
+
+
+
+
+ dt
+ 2
+
+ 12
+ 8
+ 0
+ Nullable
+
+ dt
+
+
+
+ dt
+
+ 8
+
+
+
+
+
+
+
+ ]]>
+
+
+ nulls lowest
+
+
+ dt
+ dimension
+ dt
+ dt
+
+
+ MagazineName
+ dimension
+ MagazineName
+ MagazineName
+
+
+ count(magazine.MagazineId)
+ measure
+ count(magazine.MagazineId)
+ count(magazine.MagazineId)
+
+
+
+
+
+
+ 1
+ dt
+ date
+
+
+ 2
+ MagazineName
+ string
+
+
+ 3
+ count(magazine.MagazineId)
+ decimal
+
+
+
+ analyzer data source
+
+
+ 1
+ dt
+ dt
+ date
+ 12
+
+
+ 2
+ MagazineName
+ MagazineName
+ string
+ 12
+
+
+ 3
+ count(magazine.MagazineId)
+ count(magazine.MagazineId)
+ decimal
+ -5
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ id
+ 1
+
+ -5
+ 20
+ 0
+ NotNullable
+
+ id
+
+
+
+ id
+
+ 20
+
+
+
+
+
+
+ device_id
+ 2
+
+ 12
+ 64
+ 0
+ NotNullable
+
+ device_id
+
+
+
+ device_id
+
+ 64
+
+
+
+
+
+
+ log_time
+ 3
+
+ 93
+ 19
+ 0
+ NotNullable
+
+ log_time
+
+
+
+ log_time
+
+ 19
+
+
+
+
+
+
+ event_type
+ 4
+
+ 12
+ 32
+ 0
+ Nullable
+
+ event_type
+
+
+
+ event_type
+
+ 32
+
+
+
+
+
+
+ param1
+ 5
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param1
+
+
+
+ param1
+
+ 64
+
+
+
+
+
+
+ param2
+ 6
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param2
+
+
+
+ param2
+
+ 64
+
+
+
+
+
+
+ param3
+ 7
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param3
+
+
+
+ param3
+
+ 64
+
+
+
+
+
+
+ param4
+ 8
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param4
+
+
+
+ param4
+
+ 64
+
+
+
+
+
+
+ param5
+ 9
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param5
+
+
+
+ param5
+
+ 64
+
+
+
+
+
+
+ param6
+ 10
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param6
+
+
+
+ param6
+
+ 64
+
+
+
+
+
+
+ MagazineId
+ 11
+
+ -5
+ 20
+ 0
+ NotNullable
+
+ MagazineId
+
+
+
+ MagazineId
+
+ 20
+
+
+
+
+
+
+ Description
+ 12
+
+ 12
+ 21845
+ 0
+ Nullable
+
+ Description
+
+
+
+ Description
+
+ 21845
+
+
+
+
+
+
+ MagazineName
+ 13
+
+ 12
+ 64
+ 0
+ Nullable
+
+ MagazineName
+
+
+
+ MagazineName
+
+ 64
+
+
+
+
+
+
+ MagazineCover
+ 14
+
+ 12
+ 256
+ 0
+ Nullable
+
+ MagazineCover
+
+
+
+ MagazineCover
+
+ 256
+
+
+
+
+
+
+ AdminId
+ 15
+
+ -5
+ 20
+ 0
+ NotNullable
+
+ AdminId
+
+
+
+ AdminId
+
+ 20
+
+
+
+
+
+
+ CreateDate
+ 16
+
+ 93
+ 19
+ 0
+ Nullable
+
+ CreateDate
+
+
+
+ CreateDate
+
+ 19
+
+
+
+
+
+
+ CategoryId
+ 17
+
+ -5
+ 20
+ 0
+ Nullable
+
+ CategoryId
+
+
+
+ CategoryId
+
+ 20
+
+
+
+
+
+
+ PublishDate
+ 18
+
+ 93
+ 19
+ 0
+ Nullable
+
+ PublishDate
+
+
+
+ PublishDate
+
+ 19
+
+
+
+
+
+
+ PressId
+ 19
+
+ -5
+ 20
+ 0
+ Nullable
+
+ PressId
+
+
+
+ PressId
+
+ 20
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ param2
+ dimension
+ param2
+ param2
+
+
+ log_time
+ dimension
+ log_time
+ log_time
+
+
+ ct
+ measure
+ ct
+ ct
+
+
+
+
+
+
+ 1
+ param2
+ string
+
+
+ 2
+ log_time
+ date-time
+
+
+ 3
+ ct
+ decimal
+
+
+
+ analyzer data source
+
+
+ 1
+ param2
+ param2
+ string
+ 12
+
+
+ 2
+ log_time
+ log_time
+ date-time
+ 93
+
+
+ 3
+ ct
+ ct
+ decimal
+ -5
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ id
+ 1
+
+ -5
+ 20
+ 0
+ NotNullable
+
+ id
+
+
+
+ id
+
+ 20
+
+
+
+
+
+
+ device_id
+ 2
+
+ 12
+ 64
+ 0
+ NotNullable
+
+ device_id
+
+
+
+ device_id
+
+ 64
+
+
+
+
+
+
+ log_time
+ 3
+
+ 93
+ 19
+ 0
+ NotNullable
+
+ log_time
+
+
+
+ log_time
+
+ 19
+
+
+
+
+
+
+ event_type
+ 4
+
+ 12
+ 32
+ 0
+ Nullable
+
+ event_type
+
+
+
+ event_type
+
+ 32
+
+
+
+
+
+
+ param1
+ 5
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param1
+
+
+
+ param1
+
+ 64
+
+
+
+
+
+
+ param2
+ 6
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param2
+
+
+
+ param2
+
+ 64
+
+
+
+
+
+
+ param3
+ 7
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param3
+
+
+
+ param3
+
+ 64
+
+
+
+
+
+
+ param4
+ 8
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param4
+
+
+
+ param4
+
+ 64
+
+
+
+
+
+
+ param5
+ 9
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param5
+
+
+
+ param5
+
+ 64
+
+
+
+
+
+
+ param6
+ 10
+
+ 12
+ 64
+ 0
+ Nullable
+
+ param6
+
+
+
+ param6
+
+ 64
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ MagazineId
+ measure
+ MagazineId
+ MagazineId
+
+
+ MagazineName
+ dimension
+ MagazineName
+ MagazineName
+
+
+
+
+
+ 1
+ MagazineId
+ decimal
+
+
+ 2
+ MagazineName
+ string
+
+
+
+ analyzer data source
+
+
+ 1
+ MagazineId
+ MagazineId
+ decimal
+ -5
+
+
+ 2
+ MagazineName
+ MagazineName
+ string
+ 12
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ MagazineId
+ 1
+
+ -5
+ 20
+ 0
+ NotNullable
+
+ MagazineId
+
+
+
+ MagazineId
+
+ 20
+
+
+
+
+
+
+ MagazineName
+ 2
+
+ 12
+ 64
+ 0
+ Nullable
+
+ MagazineName
+
+
+
+ MagazineName
+
+ 64
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ count(distinct id)
+ measure
+ count(distinct id)
+ count(distinct id)
+
+
+
+
+
+
+ 1
+ count(distinct id)
+ decimal
+
+
+
+ analyzer data source
+
+
+ 1
+ count(distinct id)
+ count(distinct id)
+ decimal
+ -5
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ count(distinct id)
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ count(distinct id)
+
+
+
+ count(distinct id)
+
+ 21
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+ NewTabularHierarchy
+
+
+
+
+ string
+ event_type
+
+
+
+
+
+
+ NewTabularHierarchy1
+
+
+
+
+ string
+ device_id
+
+
+
+
+
+
+
+
+
+
+ count
+ false
+ dataSetRow["event_type"]
+ integer
+ true
+
+
+
+
+ event_data
+
+
+
+
+ NewTabularHierarchy2
+
+
+
+
+ string
+ dt
+
+
+
+
+
+
+ NewTabularHierarchy3
+
+
+
+
+ string
+ MagazineName
+
+
+
+
+
+
+
+
+
+
+ sum
+ false
+ dataSetRow["count(magazine.MagazineId)"]
+ decimal
+ true
+
+
+
+
+ download_spec_magazine_by_date
+
+
+
+
+ true
+ NewTabularHierarchy5
+
+
+
+
+ integer
+ year
+
+
+ DateTime
+ date-time
+
+
+ log_time
+
+
+ integer
+ month
+
+
+ DateTime
+ date-time
+
+
+ log_time
+
+
+ integer
+ week-of-year
+
+
+ DateTime
+ date-time
+
+
+ log_time
+
+
+ integer
+ day-of-month
+
+
+ DateTime
+ date-time
+
+
+ log_time
+
+
+
+
+
+
+ NewTabularHierarchy4
+
+
+
+
+ string
+ MagazineName
+
+
+ decimal
+ MagazineId
+
+
+ magazineInfo
+
+
+
+
+
+
+
+
+ dataSetRow["ct"]
+ decimal
+
+
+
+
+ downloading_of_magazine
+
+
+
+
+ param2
+ MagazineId
+
+
+ NewTabularHierarchy4
+
+
+
+
+
+
+
+
+
+
+
+ 0in
+
+
+ html
+ new Date()]]>
+
+
+
+
+
+
+ 19.927083333333332in
+ 8.291666666666666in
+
+ 1.0208333333333333in
+
+
+ 4.53125in
+
+
+ 2.7395833333333335in
+
+
+ 0.3958333333333333in
+
+
+ 12pt
+ bold
+ right
+ auto
+
+
+ |
+
+
+ 12pt
+ bold
+ num_of_device_id
+
+
+ count(distinct id)
+ count(distinct id)
+ dataSetRow["count(distinct id)"]
+ decimal
+
+
+ count(distinct id)
+
+ |
+ |
+
+
+ 0.3541666666666667in
+
+ 3
+ 1
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 4pt
+ 4pt
+ 4pt
+ 每日新增用户
+
+ |
+
+
+ 2.96875in
+
+ 3
+ 1
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ 'A','B','C','D','E'
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ Text
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+ Text
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["count(id)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+
+
+
+ 1
+
+ 255
+ 128
+ 128
+ 128
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ North
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["dldt"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Years
+ Text
+ Sum
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 68.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+ 1
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+ false
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+ false
+
+]]>
+ SVG
+ false
+ 2.5520833333333335in
+ 8.104166666666666in
+ devices_by_date
+
+
+ count(id)
+ dataSetRow["count(id)"]
+ decimal
+
+
+ dldt
+ dataSetRow["dldt"]
+ string
+
+
+
+ |
+
+
+ 0.3333333333333333in
+
+ 3
+ 1
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 4pt
+ 4pt
+ 4pt
+ 每日活跃用户
+
+ |
+
+
+ 4in
+
+ 3
+ 1
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ Active devices by date
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ A, B, C
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ Text
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["count(device_id)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+
+
+
+ 1
+
+ 255
+ 128
+ 128
+ 128
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ North
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 0.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+ true
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["dt"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Text
+ Sum
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 45.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ SVG
+ false
+ 3.5625in
+ 8.0625in
+ active_device_by_date
+
+
+ count(device_id)
+ dataSetRow["count(device_id)"]
+ decimal
+
+
+ dt
+ dataSetRow["dt"]
+ string
+
+
+
+ |
+
+
+ 0.23958333333333334in
+
+ 3
+ 1
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 4pt
+ 4pt
+ 4pt
+ 每日访问量
+
+ |
+
+
+ 3.6041666666666665in
+
+ 3
+ 1
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ # of visiting by date
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ A, B, C
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ Text
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["count(id)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+
+
+
+ 1
+
+ 255
+ 128
+ 128
+ 128
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ North
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["dt"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Text
+ Sum
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 43.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+ false
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ SVG
+ false
+ 3.1666666666666665in
+ 8.020833333333334in
+ visiting_by_date
+
+
+ count(id)
+ dataSetRow["count(id)"]
+ decimal
+
+
+ dt
+ dataSetRow["dt"]
+ string
+
+
+
+ |
+
+
+ 0.23958333333333334in
+
+ 3
+ 1
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 4pt
+ 4pt
+ 4pt
+ 每日下载量
+
+ |
+
+
+ 3.8020833333333335in
+
+ 3
+ 1
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ # of downloading start by date
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ A, B, C
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ Text
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["count(id)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["dt"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Text
+ Sum
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 45.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ SVG
+ false
+ 3.3541666666666665in
+ 8.21875in
+ start_download_by_date
+
+
+ count(id)
+ dataSetRow["count(id)"]
+ decimal
+
+
+ dt
+ dataSetRow["dt"]
+ string
+
+
+
+ |
+
+
+ 0.3229166666666667in
+
+ 3
+ 1
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 4pt
+ 4pt
+ 4pt
+ 每日杂志下载量
+
+ |
+
+
+ 3.46875in
+
+ 3
+ 1
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ Download per magazine name by date
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ A, B, C
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ Text
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+ row["MagazineName"]
+
+ Text
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 255
+ 149
+ 117
+
+ 90.0
+
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 250
+ 209
+ 63
+
+ 90.0
+
+
+
+ 255
+ 98
+ 196
+ 117
+
+
+ 255
+ 128
+ 255
+ 128
+
+ 90.0
+
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 103
+ 205
+ 142
+
+ 90.0
+
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 159
+ 189
+ 203
+
+ 90.0
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["count(magazine.MagazineId)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["dt"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Text
+ Sum
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 45.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ SVG
+ false
+ 3.1979166666666665in
+ 8.125in
+ download_spec_magazine_by_date
+
+
+ dt
+ dataSetRow["dt"]
+ string
+
+
+ MagazineName
+ dataSetRow["MagazineName"]
+ string
+
+
+ count(magazine.MagazineId)
+ dataSetRow["count(magazine.MagazineId)"]
+ decimal
+
+
+
+ |
+
+
+ 0.3645833333333333in
+
+ 3
+ 1
+ |
+
+
+
+
+
+ report
+
+
+
diff --git a/crm/src/main/doc/nb-configuration.xml b/crm/src/main/doc/nb-configuration.xml
new file mode 100644
index 0000000..d2aae48
--- /dev/null
+++ b/crm/src/main/doc/nb-configuration.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+ none
+ JDK_1.7
+
+
diff --git a/crm/src/main/doc/nbactions-release-profile.xml b/crm/src/main/doc/nbactions-release-profile.xml
new file mode 100644
index 0000000..6b2c7a8
--- /dev/null
+++ b/crm/src/main/doc/nbactions-release-profile.xml
@@ -0,0 +1,83 @@
+
+
+
+ run
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ Xms2048m -classpath %classpath ${packageClassName} account.xml
+ java
+
+
+
+ debug
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} Xms2048m -classpath %classpath ${packageClassName} account.xml
+ java
+ true
+
+
+
+ profile
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ ${profiler.args} Xms2048m -classpath %classpath ${packageClassName} account.xml
+ ${profiler.java}
+
+
+
+ build-with-dependencies
+ also-make
+
+ install
+
+
+ /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
+
+
+
+ profile.single.main
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ -classpath %classpath ${packageClassName}
+ java
+ ${classPathScope}
+ /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
+
+
+
+ run.single.main
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ -classpath %classpath ${packageClassName}
+ java
+ ${classPathScope}
+ /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
+
+
+
+ rebuild
+
+ clean
+ install
+
+
+ /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
+
+
+
diff --git a/crm/src/main/doc/nbactions.xml b/crm/src/main/doc/nbactions.xml
new file mode 100644
index 0000000..70b02d3
--- /dev/null
+++ b/crm/src/main/doc/nbactions.xml
@@ -0,0 +1,40 @@
+
+
+
+ run
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ -Xms1024m -classpath %classpath com.rexen.crm.integration.DataImport contact_import.xml
+ java
+ /Users/Ralf/NetBeansProjects/dataloader
+
+
+
+ debug
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ -Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -Xms1024m -classpath %classpath com.rexen.crm.integration.DataImport contact_import.xml
+ java
+ true
+ /Users/Ralf/NetBeansProjects/dataloader
+
+
+
+ profile
+
+ process-classes
+ org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
+
+
+ ${profiler.args} -Xms1024m -classpath %classpath com.rexen.crm.integration.DataImport contact_import.xml
+ ${profiler.java}
+ /Users/Ralf/NetBeansProjects/dataloader
+
+
+
diff --git a/crm/src/main/doc/newCrmDB.xlsx b/crm/src/main/doc/newCrmDB.xlsx
new file mode 100644
index 0000000..e3e2a9c
Binary files /dev/null and b/crm/src/main/doc/newCrmDB.xlsx differ
diff --git a/crm/src/main/doc/pom.xml b/crm/src/main/doc/pom.xml
new file mode 100644
index 0000000..dba4d7b
--- /dev/null
+++ b/crm/src/main/doc/pom.xml
@@ -0,0 +1,87 @@
+
+ 4.0.0
+
+ crm
+ dataloader
+ 1.0
+ jar
+
+ dataloader
+ http://maven.apache.org
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+ 1.7
+ 1.7
+ true
+
+
+
+
+ maven-assembly-plugin
+
+
+
+ dataloader.core.DataLoader
+
+
+
+ jar-with-dependencies
+
+
+
+
+ make-assembly
+ package
+
+ single
+
+
+
+
+
+
+
+
+ UTF-8
+
+
+
+
+ org.eclipse.persistence
+ eclipselink
+ 2.5.1
+
+
+ log4j
+ log4j
+ 1.2.17
+
+
+ org.jumpmind.symmetric
+ symmetric-csv
+ 3.5.9
+
+
+ mysql
+ mysql-connector-java
+ 5.1.26
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+
+ config/sun_checks.xml
+
+
+
+
+
diff --git a/crm/src/main/doc/premium.rptdesign b/crm/src/main/doc/premium.rptdesign
new file mode 100644
index 0000000..48f188d
--- /dev/null
+++ b/crm/src/main/doc/premium.rptdesign
@@ -0,0 +1,5876 @@
+
+
+ Eclipse BIRT Designer Version 4.3.1.v201309091055 Build <4.3.1.v20130918-1142>
+
+
+ queryText
+ 108
+
+
+ queryTimeOut
+ 108
+
+
+ rowFetchSize
+ 108
+
+
+ in
+ /templates/grouped_listing.gif
+ org.eclipse.birt.report.designer.ui.cheatsheet.groupedlisting
+ auto layout
+ ltr
+ 96
+
+
+
+
+ metadataBidiFormatStr
+ ILYNN
+
+
+ disabledMetadataBidiFormatStr
+
+
+ contentBidiFormatStr
+ ILYNN
+
+
+ disabledContentBidiFormatStr
+
+
+ com.mysql.jdbc.Driver
+ jdbc:mysql://localhost:3306/analyzerdb
+ analyzer
+
+
+
+
+
+ metadataBidiFormatStr
+ ILYNN
+
+
+ disabledMetadataBidiFormatStr
+
+
+ contentBidiFormatStr
+ ILYNN
+
+
+ disabledContentBidiFormatStr
+
+
+ com.mysql.jdbc.Driver
+ jdbc:mysql://localhost:3306/analyzerdb
+ analyzer
+
+
+
+
+
+
+ deviceName
+ dimension
+ deviceName
+ deviceName
+
+
+ appId
+ measure
+ appId
+ appId
+
+
+ dldt
+ dimension
+ dldt
+ dldt
+
+
+ id
+ measure
+ id
+ id
+
+
+ appName
+ dimension
+ appName
+ appName
+
+
+
+
+
+
+ 1
+ deviceName
+ string
+
+
+ 2
+ appId
+ integer
+
+
+ 3
+ dldt
+ date-time
+
+
+ 4
+ id
+ integer
+
+
+ 5
+ appName
+ string
+
+
+
+ Data Source
+
+
+ 1
+ deviceName
+ deviceName
+ string
+
+
+ 2
+ appId
+ appId
+ integer
+
+
+ 3
+ dldt
+ dldt
+ date-time
+
+
+ 4
+ id
+ id
+ integer
+
+
+ 5
+ appName
+ appName
+ string
+
+
+ '2013-10-01' AND `analyzerdb`.`appinfo`.ID > 104
+]]>
+
+
+ 2.0
+
+
+
+
+
+
+ deviceName
+ 1
+
+ 12
+ 255
+ 0
+ Nullable
+
+ deviceName
+
+
+
+ deviceName
+
+ 255
+
+
+
+
+
+
+ appId
+ 2
+
+ 4
+ 9
+ 0
+ Nullable
+
+ appId
+
+
+
+ appId
+
+ 9
+
+
+
+
+
+
+ dldt
+ 3
+
+ 93
+ 19
+ 0
+ Nullable
+
+ dldt
+
+
+
+ dldt
+
+ 19
+
+
+
+
+
+
+ id
+ 4
+
+ 4
+ 9
+ 0
+ NotNullable
+
+ id
+
+
+
+ id
+
+ 9
+
+
+
+
+
+
+ appName
+ 5
+
+ 12
+ 255
+ 0
+ Nullable
+
+ appName
+
+
+
+ appName
+
+ 255
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ COUNT_BY_APP
+ measure
+ COUNT_BY_APP
+ COUNT_BY_APP
+
+
+ appName
+ dimension
+ appName
+ appName
+
+
+
+
+
+
+ 1
+ COUNT_BY_APP
+ decimal
+
+
+ 2
+ appName
+ string
+
+
+
+ Data Source
+
+
+ 1
+ COUNT_BY_APP
+ COUNT_BY_APP
+ decimal
+
+
+ 2
+ appName
+ appName
+ string
+
+
+ '2013-10-01' AND `analyzerdb`.`appinfo`.ID > 104
+ GROUP BY `analyzerdb`.`appinfo`.APPNAME]]>
+
+
+ 2.0
+
+
+
+
+
+
+ COUNT_BY_APP
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ COUNT_BY_APP
+
+
+
+ COUNT_BY_APP
+
+ 21
+
+
+
+
+
+
+ appName
+ 2
+
+ 12
+ 255
+ 0
+ Nullable
+
+ appName
+
+
+
+ appName
+
+ 255
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ COUNT(ID)
+ measure
+ COUNT(ID)
+ COUNT(ID)
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ dimension
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+
+
+
+
+
+
+ 1
+ COUNT(ID)
+ decimal
+
+
+ 2
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ string
+
+
+
+ Data Source
+
+
+ 1
+ COUNT(ID)
+ COUNT(ID)
+ decimal
+
+
+ 2
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ string
+
+
+ '2013-10-01' AND APPID > 104
+ GROUP BY DATE_FORMAT(DLDT, '%Y-%m-%d')
+]]>
+
+
+ 2.0
+
+
+
+
+
+
+ COUNT(ID)
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ COUNT(ID)
+
+
+
+ COUNT(ID)
+
+ 21
+
+
+
+
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ 2
+
+ 12
+ 10
+ 0
+ Nullable
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+
+ 10
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ COUNT_BY_DN
+ measure
+ COUNT_BY_DN
+ COUNT_BY_DN
+
+
+ deviceName
+ dimension
+ DEVICENAME
+ DEVICENAME
+
+
+
+
+
+
+ 1
+ COUNT_BY_DN
+ decimal
+
+
+ 2
+ deviceName
+ string
+
+
+
+ Data Source
+
+
+ 1
+ COUNT_BY_DN
+ COUNT_BY_DN
+ decimal
+
+
+ 2
+ deviceName
+ deviceName
+ string
+
+
+ '2013-10-01' AND APPID > 104
+ GROUP BY DEVICENAME
+]]>
+
+
+ 2.0
+
+
+
+
+
+
+ COUNT_BY_DN
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ COUNT_BY_DN
+
+
+
+ COUNT_BY_DN
+
+ 21
+
+
+
+
+
+
+ deviceName
+ 2
+
+ 12
+ 255
+ 0
+ Nullable
+
+ DEVICENAME
+
+
+
+ DEVICENAME
+
+ 255
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ dimension
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+
+
+ deviceName
+ dimension
+ DEVICENAME
+ DEVICENAME
+
+
+ COUNT(ID)
+ measure
+ COUNT(ID)
+ COUNT(ID)
+
+
+
+
+
+
+ 1
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ string
+
+
+ 2
+ deviceName
+ string
+
+
+ 3
+ COUNT(ID)
+ decimal
+
+
+
+ Data Source
+
+
+ 1
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ string
+
+
+ 2
+ deviceName
+ deviceName
+ string
+
+
+ 3
+ COUNT(ID)
+ COUNT(ID)
+ decimal
+
+
+ '2013-10-01' AND APPID > 104
+ GROUP BY DATE_FORMAT(DLDT, '%Y-%m-%d'),DEVICENAME
+]]>
+
+
+ 2.0
+
+
+
+
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ 1
+
+ 12
+ 10
+ 0
+ Nullable
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+
+ 10
+
+
+
+
+
+
+ deviceName
+ 2
+
+ 12
+ 255
+ 0
+ Nullable
+
+ DEVICENAME
+
+
+
+ DEVICENAME
+
+ 255
+
+
+
+
+
+
+ COUNT(ID)
+ 3
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ COUNT(ID)
+
+
+
+ COUNT(ID)
+
+ 21
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ CT
+ measure
+ CT
+ CT
+
+
+ dt
+ dimension
+ DT
+ DT
+
+
+
+
+
+ 1
+ CT
+ decimal
+
+
+ 2
+ dt
+ date
+
+
+
+ 109_105_47_77_analyzer
+
+
+ 1
+ CT
+ CT
+ decimal
+ -5
+
+
+ 2
+ dt
+ dt
+ date
+ 91
+
+
+ = '2013-11-01'
+ GROUP BY DT
+]]>
+
+
+ 2.0
+
+
+
+
+
+
+ CT
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ CT
+
+
+
+ CT
+
+ 21
+
+
+
+
+
+
+ dt
+ 2
+
+ 91
+ 10
+ 0
+ Nullable
+
+ DT
+
+
+
+ DT
+
+ 10
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ COUNT(*)
+ measure
+ COUNT(*)
+ COUNT(*)
+
+
+ site
+ dimension
+ SITE
+ SITE
+
+
+ page
+ dimension
+ PAGE
+ PAGE
+
+
+ trackdatetime
+ dimension
+ trackdatetime
+ trackdatetime
+
+
+
+
+
+ 1
+ COUNT(*)
+ decimal
+
+
+ 2
+ site
+ string
+
+
+ 3
+ page
+ string
+
+
+ 4
+ trackdatetime
+ date
+
+
+
+ 109_105_47_77_analyzer
+
+
+ 1
+ COUNT(*)
+ COUNT(*)
+ decimal
+ -5
+
+
+ 2
+ site
+ site
+ string
+ 12
+
+
+ 3
+ page
+ page
+ string
+ 12
+
+
+ 4
+ trackdatetime
+ trackdatetime
+ date
+ 91
+
+
+
+
+
+ 2.0
+
+
+
+
+
+
+ COUNT(*)
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ COUNT(*)
+
+
+
+ COUNT(*)
+
+ 21
+
+
+
+
+
+
+ site
+ 2
+
+ 12
+ 255
+ 0
+ Nullable
+
+ SITE
+
+
+
+ SITE
+
+ 255
+
+
+
+
+
+
+ page
+ 3
+
+ 12
+ 255
+ 0
+ Nullable
+
+ PAGE
+
+
+
+ PAGE
+
+ 255
+
+
+
+
+
+
+ trackdatetime
+ 4
+
+ 91
+ 10
+ 0
+ Nullable
+
+ trackdatetime
+
+
+
+ trackdatetime
+
+ 10
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+ COUNT_OF_ROW
+ measure
+ COUNT_OF_ROW
+ COUNT_OF_ROW
+
+
+
+
+
+
+ 1
+ COUNT_OF_ROW
+ decimal
+
+
+
+ 109_105_47_77_analyzer
+
+
+ 1
+ COUNT_OF_ROW
+ COUNT_OF_ROW
+ decimal
+ -5
+
+
+ '2013-10-01' AND APPID > 104
+]]>
+
+
+ 2.0
+
+
+
+
+
+
+ COUNT_OF_ROW
+ 1
+
+ -5
+ 21
+ 0
+ NotNullable
+
+ COUNT_OF_ROW
+
+
+
+ COUNT_OF_ROW
+
+ 21
+
+
+
+
+
+
+
+ ]]>
+
+
+ nulls lowest
+
+
+ adt
+ dimension
+ dt
+ dt
+
+
+ ct
+ measure
+ ct
+ ct
+
+
+
+
+
+
+ 1
+ adt
+ date
+
+
+ 2
+ ct
+ decimal
+
+
+
+ 109_105_47_77_analyzer
+
+
+ 1
+ adt
+ adt
+ date
+ 91
+
+
+ 2
+ ct
+ ct
+ decimal
+ -5
+
+
+ ='2013-11-01' group by adt) as a
+left JOIN (
+SELECT COUNT(ID) as bct, DATE_FORMAT(DLDT, '%Y-%m-%d')
+as bdt
+FROM `analyzerdb`.`dl`
+ WHERE DLDT >= '2013-11-01'
+ AND APPID > 104
+ GROUP BY DATE_FORMAT(DLDT, '%Y-%m-%d')) as b
+ on a.adt=b.bdt) as c;]]>
+
+
+ 2.0
+
+
+
+
+
+
+ id
+ 1
+
+ 4
+ 9
+ 0
+ NotNullable
+
+ id
+
+
+
+ id
+
+ 9
+
+
+
+
+
+
+ dt
+ 2
+
+ 91
+ 10
+ 0
+ Nullable
+
+ dt
+
+
+
+ dt
+
+ 10
+
+
+
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+ 0in
+
+
+ 100%
+
+
+
+
+ html
+ new Date()]]>
+
+ |
+
+
+
+
+
+
+
+ 18.34375in
+ 9.59375in
+
+ 9.59375in
+
+
+ 0.23958333333333334in
+
+
+ 12pt
+ bold
+ Download report for Premium Pack
+
+ |
+
+
+ 0.2708333333333333in
+
+
+ total_downloading
+
+
+ COUNT_OF_ROW
+ COUNT_OF_ROW
+ dataSetRow["COUNT_OF_ROW"]
+ decimal
+
+
+ "Total number of download: "+row["COUNT_OF_ROW"]
+ html
+
+ |
+
+
+ 0.375in
+
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 2pt
+ 2pt
+ Page view
+
+ |
+
+
+ 3.9166666666666665in
+
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ Chart Title
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ 01/05/2000,02/01/2000,04/12/2000,03/12/2000,02/29/2000
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ DateTime
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["COUNT(*)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+
+
+
+ 1
+
+ 255
+ 128
+ 128
+ 128
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ North
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["trackdatetime"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Days
+ DateTime
+ Sum
+
+
+ en_US
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 45.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+ yyyy-MM-dd
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+ false
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+ false
+
+]]>
+ SVG
+ false
+ 3.6041666666666665in
+ 8.135416666666666in
+ pageview
+
+
+ COUNT(*)
+ dataSetRow["COUNT(*)"]
+ decimal
+
+
+ site
+ dataSetRow["site"]
+ string
+
+
+ page
+ dataSetRow["page"]
+ string
+
+
+ trackdatetime
+ dataSetRow["trackdatetime"]
+ date
+
+
+
+ |
+
+
+ 0.3541666666666667in
+
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 2pt
+ 2pt
+ Download by app
+
+ |
+
+
+ 4.40625in
+
+
+
+ 2.6.1
+ Pie Chart
+ Standard
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ Chart Title
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Categories
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional_With_Depth
+ Points
+ 10.0
+ 0
+
+ enable.area.alt
+ false
+
+
+
+ 'A','B','C','D','E'
+
+
+ 6,4,12,8,10
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+ row["COUNT_BY_APP"]
+
+ Text
+ Sum
+
+
+
+
+ Orthogonal_Value
+
+
+ Percentile_Orthogonal_Value
+
+ (
+ %)
+ 100.0
+ 2
+
+
+
+ Base_Value
+
+
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ 0
+
+
+
+
+ 16.0
+ true
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Below
+
+
+ 1
+ true
+
+ 10.0
+
+
+ Text
+ Sum
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["appName"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Text
+ Sum
+
+
+
+]]>
+ SVG
+ false
+ 4.125in
+ 8.0625in
+ dl_by_app
+
+
+ COUNT_BY_APP
+ dataSetRow["COUNT_BY_APP"]
+ decimal
+
+
+ appName
+ dataSetRow["appName"]
+ string
+
+
+
+ |
+
+
+
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 2pt
+ 2pt
+ auto
+
+
+ |
+
+
+ 3.2083333333333335in
+
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ Chart Title
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ 01/05/2000,02/01/2000,04/12/2000,03/12/2000,02/29/2000
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ DateTime
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["COUNT(ID)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+
+
+
+ 1
+
+ 255
+ 128
+ 128
+ 128
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ North
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["DATE_FORMAT(DLDT, '%Y-%m-%d')"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Days
+ DateTime
+ Sum
+
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 46.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+ Y-M-d
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ SVG
+ false
+ 3.6in
+ 8.135416666666666in
+ dl_by_date
+
+
+ COUNT(ID)
+ dataSetRow["COUNT(ID)"]
+ decimal
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ dataSetRow["DATE_FORMAT(DLDT, '%Y-%m-%d')"]
+ date
+
+
+
+ |
+
+
+ 0.23958333333333334in
+
+
+ #808080
+ bold
+ #FFFFFF
+ 4pt
+ 2pt
+ 2pt
+ Download per device by date
+
+ |
+
+
+ 2.4270833333333335in
+
+
+
+ 2.6.1
+ Bar Chart
+ Side-by-side
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ false
+
+
+ Chart Title
+
+ 16.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+ 5
+ 5
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+
+
+
+ 0.0
+ 0.0
+ 0.0
+ 0.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+
+
+ 0
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 2.0
+ 2.0
+ 2.0
+ 2.0
+
+
+
+
+
+
+
+
+ Vertical
+ Top_Bottom
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+ Right
+ Series
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Above
+
+
+ 0.0
+ 0.0
+ 212.0
+ 130.0
+
+
+ 3.0
+ 3.0
+ 3.0
+ 3.0
+
+ -1
+ -1
+ -1
+ -1
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+ true
+
+ Two_Dimensional
+ Points
+ 10.0
+
+ enable.area.alt
+ false
+
+
+
+ 01/05/2000,02/01/2000,04/12/2000,03/12/2000,02/29/2000
+
+
+ 5,4,12
+ 0
+
+
+
+
+
+ This chart contains no data.
+
+
+ Center
+ Center
+
+
+
+
+ 64
+ 127
+ 127
+ 127
+
+
+
+ 128
+ 127
+ 127
+ 127
+
+ true
+
+
+ 10.0
+ 10.0
+ 10.0
+ 10.0
+
+ false
+
+
+ DateTime
+
+
+ X-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Below
+
+ Linear
+
+
+ Y-Axis Title
+
+ 14.0
+ true
+
+ Center
+ Center
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+ Left
+
+
+ row["deviceName"]
+
+ Text
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 108
+ 222
+ 228
+
+ 90.0
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["COUNT(ID)"]
+
+ Text
+ Sum
+
+
+ Series 1
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+ onmouseover
+
+ Show_Tooltip
+
+
+ 200
+
+
+
+ Rectangle
+
+
+ Text
+ Sum
+
+
+ Vertical
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+ Left
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ false
+
+
+
+
+
+
+
+ 255
+ 80
+ 166
+ 218
+
+
+ 255
+ 242
+ 88
+ 106
+
+
+ 255
+ 232
+ 172
+ 57
+
+
+ 255
+ 128
+ 255
+ 128
+
+
+ 255
+ 64
+ 128
+ 128
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 170
+ 85
+ 85
+
+
+ 255
+ 128
+ 128
+ 0
+
+
+ 255
+ 192
+ 192
+ 192
+
+
+ 255
+ 255
+ 255
+ 128
+
+
+ 255
+ 128
+ 192
+ 128
+
+
+ 255
+ 7
+ 146
+ 94
+
+
+ 255
+ 0
+ 128
+ 255
+
+
+ 255
+ 255
+ 128
+ 192
+
+
+ 255
+ 0
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 128
+
+
+ 255
+ 0
+ 128
+ 192
+
+
+ 255
+ 128
+ 128
+ 192
+
+
+ 255
+ 255
+ 0
+ 255
+
+
+ 255
+ 128
+ 64
+ 64
+
+
+ 255
+ 255
+ 128
+ 64
+
+
+ 255
+ 80
+ 240
+ 120
+
+
+ 255
+ 0
+ 64
+ 128
+
+
+ 255
+ 128
+ 0
+ 64
+
+
+ 255
+ 255
+ 0
+ 128
+
+
+ 255
+ 128
+ 128
+ 64
+
+
+ 255
+ 128
+ 128
+ 128
+
+
+ 255
+ 255
+ 128
+ 255
+
+
+ 255
+ 0
+ 64
+ 0
+
+
+ 255
+ 0
+ 0
+ 0
+
+
+ 255
+ 255
+ 255
+ 255
+
+
+ 255
+ 255
+ 128
+ 0
+
+
+
+ true
+
+
+
+
+
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ false
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ false
+
+
+ row["DATE_FORMAT(DLDT, '%Y-%m-%d')"]
+
+
+
+
+ Orthogonal_Value
+
+ ,
+
+ Outside
+ false
+
+
+ true
+ Days
+ DateTime
+ Sum
+
+ Ascending
+
+ row["DATE_FORMAT(DLDT, '%Y-%m-%d')"]
+
+
+ Horizontal
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+ true
+
+
+
+
+
+
+ 41.0
+
+
+
+ 0
+ 255
+ 255
+ 255
+
+
+
+ 1
+
+ 255
+ 0
+ 0
+ 0
+
+
+
+ 0.0
+ 2.0
+ 0.0
+ 3.0
+
+ true
+
+
+ Y-M-dd
+
+ Below
+
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 196
+ 196
+ 196
+
+ true
+
+
+
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+ Across
+
+
+ 1
+
+ 255
+ 225
+ 225
+ 225
+
+ false
+
+
+
+ 5
+
+
+ Min
+
+ 0.0
+
+
+ true
+ true
+ false
+
+ Vertical
+ 50.0
+
+
+ -20.0
+ 45.0
+ 0.0
+ None
+
+
+
+]]>
+ SVG
+ false
+ 3.6in
+ 8.114583333333334in
+ dl_by_dn_date
+
+
+ DATE_FORMAT(DLDT, '%Y-%m-%d')
+ dataSetRow["DATE_FORMAT(DLDT, '%Y-%m-%d')"]
+ date
+
+
+ deviceName
+ dataSetRow["deviceName"]
+ string
+
+
+ COUNT(ID)
+ dataSetRow["COUNT(ID)"]
+ decimal
+
+
+
+ |
+
+
+
+
diff --git a/crm/src/main/doc/user_position_import.csv b/crm/src/main/doc/user_position_import.csv
new file mode 100644
index 0000000..99a8756
--- /dev/null
+++ b/crm/src/main/doc/user_position_import.csv
@@ -0,0 +1 @@
+PositionExternalId,EmployeeNumber,ExternalId,Ƿ
E1131031001,101SH218,E1131031001101SH218,
NT131031001,101BJ144,NT131031001101BJ144,
NE131031001,101LN098,NE131031001101LN098,
\ No newline at end of file
diff --git a/crm/src/main/doc/userinfo_import.csv b/crm/src/main/doc/userinfo_import.csv
new file mode 100644
index 0000000..edb49d8
--- /dev/null
+++ b/crm/src/main/doc/userinfo_import.csv
@@ -0,0 +1 @@
+,email,employeeNumber,¼,Password,û״̬,Ƿ
ʢ,sample@mail.com,101SH218,101SH218,12345,Ч,Ѽ
,sample@mail.com,101BJ144,101BJ144,12345,Ч,Ѽ
,sample@qq.com,101LN098,101LN098,12345,Ч,Ѽ
\ No newline at end of file
diff --git a/crm/src/main/java/com/rex/crm/AccountPage.html b/crm/src/main/java/com/rex/crm/AccountPage.html
index 4100483..1ae9b30 100755
--- a/crm/src/main/java/com/rex/crm/AccountPage.html
+++ b/crm/src/main/java/com/rex/crm/AccountPage.html
@@ -1,37 +1,51 @@
-
-
-
-
+ });// end onDomReady function
+
+
-
-
+
+