diff --git a/.classpath b/.classpath index 52e7eea..016d248 100644 --- a/.classpath +++ b/.classpath @@ -20,17 +20,17 @@ - + + + - + - + - + - - diff --git a/.gitignore b/.gitignore index afa74e6..a62d74a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -target/* +/target/* pom.properties MANIFEST.MF .project diff --git a/.project b/.project deleted file mode 100644 index 5351214..0000000 --- a/.project +++ /dev/null @@ -1,47 +0,0 @@ - - - KOSMO_BANK_PJ - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.wst.common.project.facet.core.builder - - - - - org.springframework.ide.eclipse.core.springbuilder - - - - - org.eclipse.wst.jsdt.core.javascriptValidator - - - - - org.eclipse.wst.validation.validationbuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.springframework.ide.eclipse.core.springnature - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.wst.jsdt.core.jsNature - - diff --git a/.settings/.jsdtscope b/.settings/.jsdtscope new file mode 100644 index 0000000..d6bee98 --- /dev/null +++ b/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 3a0745f..0fee6a9 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -10,7 +10,6 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs b/.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs deleted file mode 100644 index 7c8126d..0000000 --- a/.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs +++ /dev/null @@ -1,5 +0,0 @@ -XDOCLETBUILDERACTIVE=true -XDOCLETHOME= -XDOCLETUSEGLOBAL=true -XDOCLETVERSION=1.2.1 -eclipse.preferences.version=1 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index f897a7f..0000000 --- a/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 7c70e41..064eee7 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,11 +1,12 @@ - - - - - + + + + - - - + + + + + diff --git a/.settings/org.eclipse.wst.common.project.facet.core.xml b/.settings/org.eclipse.wst.common.project.facet.core.xml index ef3edfe..4062e2e 100644 --- a/.settings/org.eclipse.wst.common.project.facet.core.xml +++ b/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -1,8 +1,6 @@ - - - + - + diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.container b/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/.settings/org.eclipse.wst.jsdt.ui.superType.name b/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/.settings/org.eclipse.wst.validation.prefs b/.settings/org.eclipse.wst.validation.prefs deleted file mode 100644 index 75abca5..0000000 --- a/.settings/org.eclipse.wst.validation.prefs +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 06 17:00:12 BST 2008 -DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator; -USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; -USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator; -USER_PREFERENCE=overrideGlobalPreferencesfalse -eclipse.preferences.version=1 diff --git a/.settings/org.springframework.ide.eclipse.beans.core.prefs b/.settings/org.springframework.ide.eclipse.beans.core.prefs deleted file mode 100644 index bb50bcf..0000000 --- a/.settings/org.springframework.ide.eclipse.beans.core.prefs +++ /dev/null @@ -1,78 +0,0 @@ -#Mon Oct 18 12:37:52 EDT 2010 -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.osgi.org/xmlns/blueprint/v1.0.0= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/aop= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/batch= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/beans= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/context= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/faces= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/flex= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/file= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/http= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/httpinvoker= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/ip= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/jdbc= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/jms= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/jmx= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/mail= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/rmi= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/security= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/stream= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/ws= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/integration/xml= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/jdbc= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/jee= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/jms= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/lang= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/mvc= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/osgi= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/osgi-compendium= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/oxm= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/p= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/security= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/task= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/tx= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/util= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/web-services= -//org.springframework.ide.eclipse.beans.core.default.version.http\://www.springframework.org/schema/webflow-config= -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.osgi.org/xmlns/blueprint/v1.0.0=bp -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/aop=aop -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/batch=batch -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/beans=beans -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/context=context -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/faces=faces -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/flex=flex -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration=int -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/file=int-file -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/http=int-http -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/httpinvoker=int-httpinvoker -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/ip=int-ip -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/jdbc=int-jdbc -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/jms=int-jms -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/jmx=int-jmx -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/mail=int-mail -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/rmi=int-rmi -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/security=int-security -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/stream=int-stream -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/ws=int-ws -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/integration/xml=int-xml -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/jdbc=jdbc -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/jee=jee -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/jms=jms -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/lang=lang -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/mvc=mvc -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/osgi=osgi -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/osgi-compendium=osgix -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/oxm=oxm -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/p=p -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/security=sec -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/task=task -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/tx=tx -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/util=util -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/web-services=ws -//org.springframework.ide.eclipse.beans.core.prefix.http\://www.springframework.org/schema/webflow-config=flow -eclipse.preferences.version=1 -org.springframework.ide.eclipse.beans.core.default.version.check.classpath=true -org.springframework.ide.eclipse.beans.core.enable.project.preferences=false -org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false -org.springframework.ide.eclipse.beans.core.loadNamespaceHandlerFromClasspath=false diff --git a/.settings/org.springframework.ide.eclipse.core.prefs b/.settings/org.springframework.ide.eclipse.core.prefs deleted file mode 100644 index 0f65cd5..0000000 --- a/.settings/org.springframework.ide.eclipse.core.prefs +++ /dev/null @@ -1,69 +0,0 @@ -#Tue Apr 20 16:59:06 EDT 2010 -eclipse.preferences.version=1 -org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true -org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true -org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=false -org.springframework.ide.eclipse.core.enable.project.preferences=false -org.springframework.ide.eclipse.core.validator.enable.com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false -org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivationPolicyRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivatorRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleManifestVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.exportPackageRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.importRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.parsingProblemsRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.requireBundleRule-com.springsource.server.ide.manifest.core.manifestvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.RefElementRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importLibraryVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importPackageVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.requireBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.autowire.autowire-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.toolAnnotation-org.springframework.ide.eclipse.beans.core.beansvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true -org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true diff --git a/README.md b/README.md index e1ed6f2..c934388 100644 --- a/README.md +++ b/README.md @@ -1 +1,4 @@ -# Kosmo_Bank \ No newline at end of file +# Kosmo_Bank + +gitignore 적용 안될 때 * +https://coding-groot.tistory.com/59 diff --git a/jar/activation.jar b/jar/activation.jar deleted file mode 100644 index 29a59a9..0000000 Binary files a/jar/activation.jar and /dev/null differ diff --git a/jar/javax.mail.jar b/jar/javax.mail.jar deleted file mode 100644 index 60f8201..0000000 Binary files a/jar/javax.mail.jar and /dev/null differ diff --git a/pom.xml b/pom.xml index 9536747..b81d34d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,16 @@ 1.6.10 1.6.6 + + + + + jitpack.io + https://jitpack.io + + + + @@ -262,6 +272,14 @@ + + + com.github.iamport + iamport-rest-client-java + 0.2.15 + + + junit @@ -306,6 +324,19 @@ org.test.int1.Main + + org.apache.maven.plugins + maven-war-plugin + 2.4 + + src/main/webapp + sample + + false + + + + diff --git a/src/main/java/com/spring/bank/HomeController.java b/src/main/java/com/spring/bank/HomeController.java index ff1e7aa..6c06826 100644 --- a/src/main/java/com/spring/bank/HomeController.java +++ b/src/main/java/com/spring/bank/HomeController.java @@ -4,13 +4,18 @@ import java.util.Date; import java.util.Locale; +import javax.servlet.http.HttpServletRequest; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import com.spring.bank.user.service.CustomerService; + /** * Handles requests for the application home page. */ @@ -23,19 +28,28 @@ public class HomeController { /** * Simply selects the home view to render by returning its name. */ + @Autowired + CustomerService service; - @RequestMapping(value = "/", method = RequestMethod.GET) public String - home(Locale locale, Model model) { + @RequestMapping(value = {"/", "index"}, method = RequestMethod.GET) + public String home(Locale locale, Model model) { logger.info("Welcome home! The client locale is {}.", locale); Date date = new Date(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); String formattedDate = dateFormat.format(date); - + //service.exchanges(model); model.addAttribute("serverTime", formattedDate ); - return "index"; } + return "index"; + } - + // 회원가입 페이지 + @RequestMapping("register") + public String register(HttpServletRequest req, Model model) { + + + return "customer/account/register"; + } } diff --git a/src/main/java/com/spring/bank/admin/controller/AdminController.java b/src/main/java/com/spring/bank/admin/controller/AdminController.java index 1da1136..737dee9 100644 --- a/src/main/java/com/spring/bank/admin/controller/AdminController.java +++ b/src/main/java/com/spring/bank/admin/controller/AdminController.java @@ -2,27 +2,28 @@ import java.io.File; import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Date; +import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartHttpServletRequest; -import com.spring.bank.HomeController; import com.spring.bank.admin.service.AdminServiceImpl; +import com.spring.bank.user.service.CustomerServiceImpl; import com.spring.bank.util.ImageUploaderHandler; + + //@WebServlet("시작url") : 웹브라우저의 모든 요청은 하나의 서블릿에서 처리한다. 즉 모든 요청의 단일 진입점에서 시작 url을 지정 /* Servlet => 클라이언트의 요청을 받아서 비즈니스 로직 처리, DB에 접근 등의 요청을 처리한 후, @@ -49,19 +50,22 @@ //여기서 설정한 용량을 넘어갈 경우 location 에 upload_e1969376_b006_4781_b1cc_006e6e948798_00000074.tmp 같은형태로 저장됩니다. //ref : https://gs.saro.me/dev?tn=131 -@MultipartConfig(location = "C:\\dev88\\workspace\\SPRING_PJ_ABH\\src\\main\\webapp\\resources\\images\\upload", fileSizeThreshold = 1024 +@MultipartConfig(location = "C:\\Dev88\\KOSMO_BANK_PJ\\src\\main\\webapp\\resources\\images\\admin\\upload", fileSizeThreshold = 1024 * 1024, maxFileSize = 1024 * 1024 * 5, maxRequestSize = 1024 * 1024 * 5 * 5) @Controller @RequestMapping("manager") public class AdminController { - private static final String IMG_UPLOAD_DIR = "C:\\\\dev88\\\\workspace\\\\SPRING_PJ_ABH\\\\src\\\\main\\\\webapp\\\\resources\\\\images\\\\upload"; + private static final String IMG_UPLOAD_DIR = "C:\\\\Dev88\\\\KOSMO_BANK_PJ\\\\src\\\\main\\\\webapp\\\\resources\\\\images\\\\admin\\\\upload"; private ImageUploaderHandler uploader; - private static final Logger logger = LoggerFactory.getLogger(HomeController.class); + private static final Logger logger = LoggerFactory.getLogger(AdminController.class); @Autowired private AdminServiceImpl service; + @Autowired + private CustomerServiceImpl service2; + /* // 스케쥴링 테스트 @Scheduled(fixedDelay=60000) @@ -75,6 +79,7 @@ public void TestScheduler(){ @RequestMapping("index") public String index(HttpServletRequest req, Model model) { System.out.println("[index.ad]"); + // 이동할 페이지 return "index(manager)"; @@ -123,7 +128,7 @@ public String requestupload1(MultipartHttpServletRequest mRequest) { String src = mRequest.getParameter("src"); MultipartFile mf = mRequest.getFile("file"); - String path = "G:\\dev88\\workspace\\SPRING_PJ_ABH\\src\\main\\webapp\\resources\\images\\upload\\"; + String path = "C:\\Dev88\\KOSMO_BANK_PJ\\src\\main\\webapp\\resources\\images\\admin\\upload\\"; String originFileName = mf.getOriginalFilename(); // 원본 파일 명 long fileSize = mf.getSize(); // 파일 사이즈 @@ -173,6 +178,16 @@ public String customerDelete(HttpServletRequest req, Model model) { return "manager/customerInfo/customerInfo"; } + //관리자 - 금융상품 관리 + @RequestMapping("bankingAccept") + public String bankingAccept(HttpServletRequest req, Model model) { + logger.info("url => bankingAccept"); + + service.selectBanking(req, model); + + return "manager/customerInfo/bankingAccept"; + } + // 관리자 - 예금관리 - 상품등록페이지 @RequestMapping("depositProductInsert") public String depositProductInsert(HttpServletRequest req, Model model) { @@ -239,6 +254,144 @@ public String depositProductDelete(HttpServletRequest req, Model model) { return "manager/depositProduct/depositProductList"; } + // 관리자 - 적금관리 - 상품등록(지호) + @RequestMapping("savingProductInsert") + public String savingProductInsert(HttpServletRequest req, Model model) { + System.out.println("[url ==> savingProductInsert]"); + + return "manager/savingProduct/savingProductInsert"; + } + + // 관리자 - 적금관리 - 상품등록처리(지호) + @RequestMapping("savingProductInsertAction") + public String savingProductInsertAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductInsertAction]"); + service.savingProductInsertAction(req, model); + return "manager/savingProduct/savingProductInsertAction"; + } + + // 관리자 - 적금관리 - 상품조회(지호) + @RequestMapping("savingProductList") + public String savingProductList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductList]"); + service.selectSavingProduct(req, model); + return "manager/savingProduct/savingProductList"; + } + + // 관리자 - 적금관리 - 상품검색(지호) + @RequestMapping("savingProductSearch") + public String savingProductSearch(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductSearch]"); + service.searchSavingProduct(req, model); + return "manager/savingProduct/savingProductSearch"; + } + + // 관리자 적금 관리 - 상품 상세조회 + @RequestMapping("savingProductInfo") + public String savingProductInfo(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductInfo]"); + service.getSavingProductInfo(req, model); + return "manager/savingProduct/savingProductInfo"; + } + + // 관리자 적금 관리 - 상품 수정 페이지 + @RequestMapping("savingProductUpdate") + public String savingProductUpdate(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductUpdate]"); + service.getSavingProductInfo(req, model); + return "manager/savingProduct/savingProductUpdate"; + } + + // 관리자 적금 관리 - 상품 수정 처리 + @RequestMapping("savingProductUpdateAction") + public String savingProductUpdateAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductUpdateAction]"); + service.updateSavingProduct(req, model); + return "manager/savingProduct/savingProductUpdateAction"; + } + + // 관리자 - 적금관리 - 상품삭제(지호) + @RequestMapping("savingProductDelete") + public String savingProductDelete(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductDelete]"); + service.deleteSavingProduct(req, model); + service.selectSavingProduct(req, model); + return "manager/savingProduct/savingProductList"; + } + + // 관리자 - 펀드관리 - 상품추가 (지호) + @RequestMapping("fundProductInsert") + public String fundProductInsert(HttpServletRequest req ,Model model) { + System.out.println("url ==> fundProductInsert"); + + return "manager/fundProduct/fundProductInsert"; + } + + // 관리자 - 펀드관리 - 상품등록처리(지호) + @RequestMapping("fundProductInsertAction") + public String fundProductInsertAction(HttpServletRequest req, Model model) throws ServletException, IOException { + System.out.println("[url ==> /fundProductInsertAction]"); + + // 이미지 업로드 설정 시작 + String contentType = req.getContentType(); + if(contentType != null && contentType.toLowerCase().startsWith("multipart/")) { + uploader = new ImageUploaderHandler(); + System.out.println("IMG_UPLOAD" + IMG_UPLOAD_DIR); + uploader.setUploadPath(IMG_UPLOAD_DIR); + uploader.imageUpload(req, model); + } + // 이미지 업로드 설정 끝 + service.fundProductInsertAction(req, model); + return "manager/fundProduct/fundProductInsertAction"; + } + // 관리자 - 펀드관리 - 상품조회(지호) + @RequestMapping("fundProductList") + public String fundProductList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductList]"); + service.selectFundProduct(req, model); + return "manager/fundProduct/fundProductList"; + } + + // 관리자 - 펀드관리 - 상품검색(지호) + @RequestMapping("fundProductSearch") + public String fundProductSearch(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductSearch]"); + service.searchFundProduct(req, model); + return "manager/fundProduct/fundProductSearch"; + } + + // 관리자 - 펀드관리 - 상품 상세조회 + @RequestMapping("fundProductInfo") + public String fundProductInfo(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductInfo]"); + service.getFundProductInfo(req, model); + return "manager/fundProduct/fundProductInfo"; + } + + // 관리자 - 펀드관리 - 상품 수정 페이지 + @RequestMapping("fundProductUpdate") + public String fundProductUpdate(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductUpdate]"); + service.getFundProductInfo(req, model); + return "manager/fundProduct/fundProductUpdate"; + } + + // 관리자 - 펀드관리 - 상품 수정 처리 + @RequestMapping("fundProductUpdateAction") + public String fundProductUpdateAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductUpdateAction]"); + service.updateFundProduct(req, model); + return "manager/fundProduct/fundProductUpdateAction"; + } + + // 관리자 - 펀드관리 - 상품삭제(지호) + @RequestMapping("fundProductDelete") + public String fundProductDelete(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductDelete]"); + service.deleteFundProduct(req, model); + service.selectFundProduct(req, model); + return "manager/fundProduct/fundProductList"; + } //qnalist 회원이 작성한것 리스트 가져오기(지현) @RequestMapping("qnaList_mng") @@ -333,6 +486,83 @@ public String faqDelete(HttpServletRequest req, Model model) { return "manager/qna/faqDeleteAction"; } + //관리자 - 연금 추가(지현) + @RequestMapping("irpProductInsert") + public String irpAdd(HttpServletRequest req, Model model) { + logger.info("url => irpInsert"); + + return "manager/irp/irpProductInsert"; + } + + //관리자 - 연금 추가 처리 (지현) + @RequestMapping("irpProductInsertAction") + public String irpProductInsertAction(HttpServletRequest req, Model model) { + logger.info("url => irpProductInsertAction"); + + service.insertIrpProduct(req, model); + + return "manager/irp/irpProductInsertAction"; + } + + // 관리자 - 연금관리 - 상품조회페이지 + @RequestMapping("IrpProductList") + public String IrpProductList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /IrpProductList]"); + + service.selectIrpProduct(req, model); + + return "manager/irp/irpProductList"; + } + + // 관리자 - 연금관리 - 상품검색 + @RequestMapping("irpProductSearch") + public String irpProductSearch(HttpServletRequest req, Model model) { + System.out.println("[url ==> /irpProductSearch]"); + service.searchIrpProduct(req, model); + return "manager/irp/irpProductSearch"; + } + + // 관리자 - 연금 관리 - 상품 상세조회 + @RequestMapping("irpProductInfo") + public String irpProductInfo(HttpServletRequest req, Model model) { + System.out.println("[url ==> /irpProductInfo]"); + + service.getIrpProductInfo(req, model); + + return "manager/irp/irpProductInfo"; + } + + // 관리자 연금 관리 - 상품 수정 페이지 + @RequestMapping("irpProductUpdate") + public String irpProductUpdate(HttpServletRequest req, Model model) { + System.out.println("[url ==> /irpProductUpdate]"); + + service.getIrpProductInfo(req, model); + + return "manager/irp/irpProductUpdate"; + } + + // 관리자 연금 관리 - 상품 수정 처리 + @RequestMapping("irpProductUpdateAction") + public String irpProductUpdateAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /irpProductUpdateAction]"); + + service.updateIrpProduct(req, model); + + return "manager/irp/irpProductUpdateAction"; + } + + // 관리자 - 연금 관리 - 상품삭제 + @RequestMapping("irpProductDelete") + public String irpProductDelete(HttpServletRequest req, Model model) { + System.out.println("[url ==> /irpProductDelete]"); + + service.deleteIrpProduct(req, model); + service.selectIrpProduct(req, model); + + return "manager/irp/irpProductList"; + } + // 회원별 계좌목록페이지 @RequestMapping("customerAccountInfo") public String customerAccountInfo(HttpServletRequest req, Model model) { @@ -347,5 +577,235 @@ public String customerAccountSearch(HttpServletRequest req, Model model) { logger.info("url => customerAccountSearch"); service.searchCustomerAccountList(req, model); return "manager/customerInfo/customerAccountSearch"; - } + } + + // 고객 TEST 계좌 추가 + @RequestMapping("testAccountData") + public String testAccountData(HttpServletRequest req, Model model) { + + + return "manager/test/accountData"; + } + + // 고객 TEST 계좌 추가 + @ResponseBody + @RequestMapping(value="testAccountInsert", method= {RequestMethod.POST}) + public int testAccountInsert(HttpServletRequest req, Model model) { + System.out.println("url => testAccountInsert"); + logger.info("url => testAccountInsert"); + + return service.insertTestAccount(req, model); + } + + //!지은! + // 대출 상품 목록 + @RequestMapping("loanProductList.do") + public String loanProductList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanProductList]"); + service.loanProductList(req, model); + return "manager/loan/loanProductList"; + } + + // 대출 상품 검색 + @RequestMapping("searchLoanProductList.do") + public String searchLoanProductList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /searchLoanProductList]"); + service.searchLoanProductList(req, model); + return "manager/loan/searchLoanProductList"; + } + + // 대출 상품 추가 + @RequestMapping("loanProductInsert.do") + public String loanProductInsert(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanProductInsert]"); + return "manager/loan/loanProductInsert"; + } + + // 대출 상품 추가 처리 + @RequestMapping("loanProductInsertAction.do") + public String loanProductInsertAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanProductInsertAction]"); + service.loanProductInsertAction(req, model); + return "manager/loan/loanProductInsertAction"; + } + + // 대출 상품 수정 + @RequestMapping("loanProductUpdate.do") + public String loanProductUpdate(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanProductUpdate]"); + service.loanProductUpdate(req, model); + return "manager/loan/loanProductUpdate"; + } + + // 대출 상품 수정 처리 + @RequestMapping("loanProductUpdateAction.do") + public String loanProductUpdateAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanProductUpdateAction]"); + service.loanProductUpdateAction(req, model); + return "manager/loan/loanProductUpdateAction"; + } + + // 대출 상품 삭제 + @RequestMapping("loanProductDelete.do") + public String loanProductDelete(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanProductDelete]"); + service.loanProductDelete(req, model); + return "manager/loan/loanProductDeleteAction"; + } + + // 대출 요청 목록 + @RequestMapping("loanRequestList.do") + public String loanRequestList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanRequestList]"); + service.loanRequestList(req, model); + return "manager/loan/loanRequestList"; + } + + // 대출 승인 처리 + @RequestMapping("loanRequestAction.do") + public String loanRequestAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanRequestList]"); + service.loanRequestAction(req, model); + return "manager/loan/loanRequestAction"; + } + + // 대출 거절 + @RequestMapping("loanRefusalAction.do") + public String loanRefusalAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanRequestList]"); + service.loanRefusalAction(req, model); + return "manager/loan/loanRefusalAction"; + } + + // 대출 목록 + @RequestMapping("loanList.do") + public String loanList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanRequestList]"); + service.loanList(req, model); + return "manager/loan/loanList"; + } + + // 대출 해지 목록 + @RequestMapping("loanCancelList.do") + public String loanCancelList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanCancelList]"); + service.loanCancelList(req, model); + return "manager/loan/loanCancelList"; + } + + // 대출 요청 목록 검색 + @RequestMapping("searchLoanRequestList.do") + public String searchLoanRequestAction(HttpServletRequest req, Model model) { + System.out.println("[url ==> /searchLoanRequestList]"); + service.searchLoanRequestList(req, model); + return "manager/loan/searchLoanRequestList"; + } + + //대출 목록 검색 + @RequestMapping("searchLoanList.do") + public String searchLoanList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /loanRequestList]"); + service.searchLoanList(req, model); + return "manager/loan/loanList"; + } + //!지은! + + // 공지사항리스트 - 관리자(민재) + @RequestMapping("mngNoticeList") + public String noticeList(HttpServletRequest req, Model model) { + + logger.info("[url ==> /mngNoticeList.us]"); + + service2.noticeList(req, model); + + // 이동할 페이지 + return "customer/notice/noticeList"; + } + + // 공지사항 글쓰기 - 관리자(민재) + @RequestMapping("mngNoticeWrite") + public String mngNoticeWrite(HttpServletRequest req, Model model) { + + logger.info("[url ==> /mngNoticeWrite.us]"); + + req.setAttribute("notice_writer", req.getSession().getAttribute("adminID")); + req.setAttribute("pageNum", req.getParameter("pageNum")); + System.out.println("mngNoticeWrite.do 끝"); + // 이동할 페이지 + return "manager/notice/mngNoticeWrite"; + } + + // 공지사항 글쓰기처리 - 관리자(민재) + @RequestMapping("mngNoticeWriteAction") + public String mngNoticeWriteAction(HttpServletRequest req, Model model) { + logger.info("[url ==> /mngNoticeWriteAction.us]"); + + service.mngNoticeWriteAction(req, model); + + // 이동할 페이지 + return "manager/notice/mngNoticeWriteAction"; + } + + // 공지사항 수정하기(비밀번호인증) - 관리자(민재) + @RequestMapping("mngNoticeModify") + public String mngNoticeModify(HttpServletRequest req, Model model) { + + logger.info("[url ==> /mngNoticeModify.us]"); + + req.setAttribute("notice_num", Integer.parseInt(req.getParameter("notice_num"))); + req.setAttribute("pageNum", Integer.parseInt(req.getParameter("pageNum"))); + + // 이동할 페이지 + return "manager/notice/mngNoticeModify"; + } + + // 공지사항 수정페이지 + @RequestMapping("mngNoticeModifyDetail") + public String mngNoticeModifyDetail(HttpServletRequest req, Model model) { + logger.info("[url ==> /mngNoticeModifyDetail.us]"); + + service.mngNoticeModifyDetail(req, model); + + // 이동할 페이지 + return "manager/notice/mngNoticeModifyDetail"; + } + + // 공지사항 수정처리 + @RequestMapping("mngNoticeModifyAction") + public String mngNoticeModifyAction(HttpServletRequest req, Model model) { + + logger.info("[url ==> /mngNoticeModifyAction.us]"); + + service.mngNoticeModifyAction(req, model); + + // 이동할 페이지 + return "manager/notice/mngNoticeModifyAction"; + } + + // 공지사항 삭제하기(비밀번호인증) - 관리자(민재) + @RequestMapping("mngNoticeDelete") + public String mngNoticeDelete(HttpServletRequest req, Model model) { + + logger.info("[url ==> /mngNoticeDelete.us]"); + + req.setAttribute("notice_num", Integer.parseInt(req.getParameter("notice_num"))); + req.setAttribute("pageNum", Integer.parseInt(req.getParameter("pageNum"))); + + // 이동할 페이지 + return "manager/notice/mngNoticeDelete"; + } + + // 공지사항 삭제처리 + @RequestMapping("mngNoticeDeleteAction") + public String mngNoticeDeleteAction(HttpServletRequest req, Model model) { + + logger.info("[url ==> /mngNoticeDeleteAction.us]"); + + service.mngNoticeDeleteAction(req, model); + + // 이동할 페이지 + return "manager/notice/mngNoticeDeleteAction"; + } + + } diff --git a/src/main/java/com/spring/bank/admin/dao/AdminDAO.java b/src/main/java/com/spring/bank/admin/dao/AdminDAO.java index b0cbcdb..e4afddf 100644 --- a/src/main/java/com/spring/bank/admin/dao/AdminDAO.java +++ b/src/main/java/com/spring/bank/admin/dao/AdminDAO.java @@ -5,8 +5,16 @@ import java.util.Map; import com.spring.bank.product.vo.DepositProductVO; +import com.spring.bank.product.vo.IrpProductVO; +import com.spring.bank.product.vo.FundProductVO; +import com.spring.bank.product.vo.SavingProductVO; +import com.spring.bank.user.vo.AccountVO; import com.spring.bank.user.vo.CustomerAccountVO; import com.spring.bank.user.vo.InquiryVO; +import com.spring.bank.product.vo.LoanProductVO; +import com.spring.bank.user.vo.LoanVO; +import com.spring.bank.user.vo.NoticeVO; +import com.spring.bank.user.vo.TransferVO; import com.spring.bank.user.vo.UserVO; import com.spring.bank.user.vo.faqVO; @@ -52,6 +60,79 @@ public interface AdminDAO { // 관리자 페이지 예금 상품 삭제 public int deleteDepositProduct(String deposit_product_name); + // 관리자 페이지 적금 상품 등록 + public int insertSavingProduct(SavingProductVO vo); + + // 관리자 페이지 적금 상품 수 + public int getSavingProductCnt(); + + // 관리자 페이지 적금 상품 조회 + public ArrayList selectSavingProduct(Map map); + + // 관리자 페이지 적금 상품 수(검색결과수) + public int getSavingProductSearchCnt(String search); + + // 관리자 페이지 적금 상품 검색(입력받아서 검색) + public ArrayList searchSavingProduct(Map map); + + // 관리자 페이지 적금 상품 상세조회 + public SavingProductVO getSavingProductInfo(String saving_product_name); + + // 관리자 페이지 적금 상품 수정 + public int updateSavingProduct(SavingProductVO vo); + + // 관리자 페이지 적금 상품 삭제 + public int deleteSavingProduct(String saving_product_name); + + // 관리자 페이지 펀드 상품 등록 + public int insertFundProduct(FundProductVO vo); + + // 관리자 페이지 펀드 상품 수 + public int getFundProductCnt(); + + // 관리자 페이지 펀드 상품 조회 + public ArrayList selectFundProduct(Map map); + + // 관리자 페이지 펀드 상품 수(검색결과수) + public int getFundProductSearchCnt(String search); + + // 관리자 페이지 펀드 상품 검색(입력받아서 검색) + public ArrayList searchFundProduct(Map map); + + // 관리자 페이지 펀드 상품 상세조회 + public FundProductVO getFundProductInfo(String fund_title); + + // 관리자 페이지 펀드 상품 수정 + public int updateFundProduct(FundProductVO vo); + + // 관리자 페이지 펀드 상품 삭제 + public int deleteFundProduct(String fund_title); + + //지현 + // 관리자 페이지 연금 상품 등록 + public int insertIrpProduct(IrpProductVO vo); + + // 관리자 페이지 연금 상품 수 + public int getIrpProductCnt(); + + // 관리자 페이지 연금 상품 조회 + public ArrayList selectIrpProduct(Map map); + + // 관리자 페이지 연금 상품 수(검색결과수) + public int getIrpProductSearchCnt(String search); + + // 관리자 페이지 연금 상품 검색(입력받아서 검색) + public ArrayList searchIrpProduct(Map map); + + // 관리자 페이지 연금 상품 상세조회 + public IrpProductVO getIrpProductInfo(String deposit_product_name); + + // 관리자 페이지 연금 상품 수정 + public int updateIrpProduct(IrpProductVO vo); + + // 관리자 페이지 연금 상품 삭제 + public int deleteIrpProduct(String irp_product_name); + //문의사항 갯수 (지현) public int getInquiryCnt(); @@ -86,5 +167,103 @@ public interface AdminDAO { public int getSerachCustomerAccountCnt(String search); // 관리자 페이지 회원계좌 검색결과목록 - public ArrayList getSearchCustomerAccountList(Map map); + public ArrayList getSearchCustomerAccountList(Map map); + + // 관리자 페이지 TEST 계좌 생성(복환) + public int insertTestAccount(AccountVO vo); + + // !지은! + // 대출 상품 개수 + public int getLoanProductCnt(); + + // 대출 상품 목록 + public ArrayList getLoanProductList(Map map); + + // 대출 상품 검색 + public ArrayList searchLoanProductList(Map map); + + // 대출 상품 추가 + public int loanProductInsert(LoanProductVO l); + + // 대출 상품 수정 + public int loanProductUpdate(LoanProductVO l); + + // 대출 상품 삭제 + public int loanProductDelete(String loan_product_name); + + // 대출 상품 조회 + public LoanProductVO getLoanProductInfo(String loan_product_name); + + // 대출 상품 검색 개수 + public int getSearchLoanProductCnt(String keyword); + + // 대출 목록 개수 + public int getLoanCnt(); + + // 대출 계좌 정상 변경 + public int changeAccountState0(Map map); + + // 대출 요청 목록 개수 + public int getLoanRequestCnt(); + + // 대출 목록 + public ArrayList getLoanList(Map map); + + // 대출 요청 목록 + public ArrayList getLoanRequestList(Map map); + + // 대출 신청 승인 처리 + public int loanRequestAction(Map map); + + // 대출 신청 검색 개수 + public int getSearchLoanRequestCnt(String keyword); + + // 대출 검색 개수 + public int getSearchLoanCnt(String keyword); + + // 대출 요청 검색 목록 + public ArrayList searchLoanRequestList(Map map); + + // 대출 검색 목록 + public ArrayList searchLoanList(Map map); + + // 대출 해지? 목록 + public ArrayList getLoanCancelList(Map map); + + // 대출 해지 개수 + public int getLoanCancelCnt(); + + // 대출 정보 얻어오기 + public LoanVO getLoanInfo(Map map); + + // 신규 대출 요금 계좌에 넣기 + public int transNewLoanAccount(TransferVO trans); + + // 계좌 잔고 올려주기 + public int setNewLoanAccount(Map map); + + // 입금 정정 + public TransferVO resetNewLoanAccount(Map map); + + // 회원 정보 가져오기 + public UserVO getUserInfo(String member_id); + + + // !지은! + + // 공지사항 쓰기 처리(민재) + public int mngNoticeWriteAction(NoticeVO vo); + + // 공지사항 - 비밀번호 인증(민재) + public String noticePWDCheck(int notice_num); + + // 공지사항 상세페이지(민재) + public NoticeVO getNoticeDetail(int notice_num); + + // 공지사항 수정처리(민재) + public int noticeModifyAction(NoticeVO vo); + + // 공지사항 수정처리(민재) + public int noticeDeleteAction(int notice_num); + } diff --git a/src/main/java/com/spring/bank/admin/dao/AdminDAOImpl.java b/src/main/java/com/spring/bank/admin/dao/AdminDAOImpl.java index 11699b0..d405c2f 100644 --- a/src/main/java/com/spring/bank/admin/dao/AdminDAOImpl.java +++ b/src/main/java/com/spring/bank/admin/dao/AdminDAOImpl.java @@ -9,8 +9,16 @@ import org.springframework.stereotype.Repository; import com.spring.bank.product.vo.DepositProductVO; +import com.spring.bank.product.vo.FundProductVO; +import com.spring.bank.product.vo.IrpProductVO; +import com.spring.bank.product.vo.SavingProductVO; +import com.spring.bank.user.vo.AccountVO; import com.spring.bank.user.vo.CustomerAccountVO; import com.spring.bank.user.vo.InquiryVO; +import com.spring.bank.product.vo.LoanProductVO; +import com.spring.bank.user.vo.LoanVO; +import com.spring.bank.user.vo.NoticeVO; +import com.spring.bank.user.vo.TransferVO; import com.spring.bank.user.vo.UserVO; import com.spring.bank.user.vo.faqVO; @@ -98,6 +106,152 @@ public int deleteDepositProduct(String deposit_product_name) { return sqlSession.getMapper(AdminDAO.class).deleteDepositProduct(deposit_product_name); } + // 관리자 페이지 적금 상품 등록 + @Override + public int insertSavingProduct(SavingProductVO vo) { + System.out.println("[DAO = insertSavingProduct]"); + return sqlSession.getMapper(AdminDAO.class).insertSavingProduct(vo); + } + + // 관리자 페이지 적금 상품 수 + @Override + public int getSavingProductCnt() { + return sqlSession.getMapper(AdminDAO.class).getSavingProductCnt(); + } + + // 관리자 페이지 적금 상품 조회 + @Override + public ArrayList selectSavingProduct(Map map) { + return sqlSession.getMapper(AdminDAO.class).selectSavingProduct(map); + } + + // 관리자 페이지 적금 상품 수(검색결과수) + @Override + public int getSavingProductSearchCnt(String search) { + return sqlSession.getMapper(AdminDAO.class).getSavingProductSearchCnt(search); + } + + // 관리자 페이지 적금 상품 검색(입력받아서 검색) + @Override + public ArrayList searchSavingProduct(Map map) { + return sqlSession.getMapper(AdminDAO.class).searchSavingProduct(map); + } + + // 관리자 페이지 적금 상품 상세조회 + @Override + public SavingProductVO getSavingProductInfo(String saving_product_name) { + return sqlSession.getMapper(AdminDAO.class).getSavingProductInfo(saving_product_name); + } + + // 관리자 페이지 적금 상품 수정 + @Override + public int updateSavingProduct(SavingProductVO vo) { + return sqlSession.getMapper(AdminDAO.class).updateSavingProduct(vo); + } + + // 관리자 페이지 적금 상품 삭제 + @Override + public int deleteSavingProduct(String saving_product_name) { + return sqlSession.getMapper(AdminDAO.class).deleteSavingProduct(saving_product_name); + } + + // 관리자 페이지 연금 상품 등록 + public int insertIrpProduct(IrpProductVO vo) { + return sqlSession.getMapper(AdminDAO.class).insertIrpProduct(vo); + }; + + // 관리자 페이지 연금 상품 수 + @Override + public int getIrpProductCnt() { + return sqlSession.getMapper(AdminDAO.class).getIrpProductCnt(); + } + + // 관리자 페이지 연금 상품 조회 + @Override + public ArrayList selectIrpProduct(Map map) { + return sqlSession.getMapper(AdminDAO.class).selectIrpProduct(map); + } + + // 관리자 페이지 연금 상품 수(검색결과수) + @Override + public int getIrpProductSearchCnt(String search) { + return sqlSession.getMapper(AdminDAO.class).getIrpProductSearchCnt(search); + } + + // 관리자 페이지 연금 상품 검색(입력받아서 검색) + @Override + public ArrayList searchIrpProduct(Map map) { + return sqlSession.getMapper(AdminDAO.class).searchIrpProduct(map); + } + + // 관리자 페이지 연금 상품 상세조회 + @Override + public IrpProductVO getIrpProductInfo(String irp_product_name) { + return sqlSession.getMapper(AdminDAO.class).getIrpProductInfo(irp_product_name); + } + + // 관리자 페이지 펀드 상품 등록 + @Override + public int insertFundProduct(FundProductVO vo) { + System.out.println("[DAO = insertFundProduct]"); + return sqlSession.getMapper(AdminDAO.class).insertFundProduct(vo); + } + + // 관리자 페이지 펀드 상품 수 + @Override + public int getFundProductCnt() { + return sqlSession.getMapper(AdminDAO.class).getFundProductCnt(); + } + + // 관리자 페이지 펀드 상품 조회 + @Override + public ArrayList selectFundProduct(Map map) { + return sqlSession.getMapper(AdminDAO.class).selectFundProduct(map); + } + + // 관리자 페이지 펀드 상품 수(검색결과수) + @Override + public int getFundProductSearchCnt(String search) { + return sqlSession.getMapper(AdminDAO.class).getFundProductSearchCnt(search); + } + + // 관리자 페이지 펀드 상품 검색(입력받아서 검색) + @Override + public ArrayList searchFundProduct(Map map) { + return sqlSession.getMapper(AdminDAO.class).searchFundProduct(map); + } + + // 관리자 페이지 펀드 상품 상세조회 + @Override + public FundProductVO getFundProductInfo(String fund_title) { + return sqlSession.getMapper(AdminDAO.class).getFundProductInfo(fund_title); + } + + // 관리자 페이지 펀드 상품 수정 + @Override + public int updateFundProduct(FundProductVO vo) { + return sqlSession.getMapper(AdminDAO.class).updateFundProduct(vo); + } + + // 관리자 페이지 펀드 상품 삭제 + @Override + public int deleteFundProduct(String fund_title) { + return sqlSession.getMapper(AdminDAO.class).deleteFundProduct(fund_title); + } + + + // 관리자 페이지 연금 상품 수정 + @Override + public int updateIrpProduct(IrpProductVO vo) { + return sqlSession.getMapper(AdminDAO.class).updateIrpProduct(vo); + } + + // // 관리자 페이지 연금 상품 삭제 + @Override + public int deleteIrpProduct(String irp_product_name) { + return sqlSession.getMapper(AdminDAO.class).deleteIrpProduct(irp_product_name); + } + //qna 개수(지현) @Override public int getInquiryCnt() { @@ -183,4 +337,206 @@ public int getSerachCustomerAccountCnt(String search) { public ArrayList getSearchCustomerAccountList(Map map){ return sqlSession.getMapper(AdminDAO.class).getSearchCustomerAccountList(map); } + + // 관리자 페이지 TEST 계좌 생성(복환) + @Override + public int insertTestAccount(AccountVO vo) { + System.out.println("DAO => insertTestAccount"); + + return sqlSession.getMapper(AdminDAO.class).insertTestAccount(vo); + } + + // !지은! + // 대출 상품 개수 + public int getLoanProductCnt() { + System.out.println("[AdminDAO => getLoanProductCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanProductCnt(); + } + + // 대출 상품 목록 + public ArrayList getLoanProductList(Map map) { + System.out.println("[AdminDAO => getLoanProductList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanProductList(map); + } + + // + public ArrayList searchLoanProductList(Map map) { // parameter : keyword, start, end + System.out.println("[AdminDAO => searchLoanProductList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.searchLoanProductList(map); + } + + public int loanProductInsert(LoanProductVO l) { + System.out.println("[AdminDAO => loanProductInsert()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.loanProductInsert(l); + } + + public int loanProductUpdate(LoanProductVO l) { + System.out.println("[AdminDAO => loanProductUpdate()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.loanProductUpdate(l); + } + + public int loanProductDelete(String loan_product_name) { + System.out.println("[AdminDAO => loanProductDelete()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.loanProductDelete(loan_product_name); + } + + public LoanProductVO getLoanProductInfo(String loan_product_name) { + System.out.println("[AdminDAO => getLoanProductInfo()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanProductInfo(loan_product_name); + } + + public ArrayList getLoanList(Map map) { + System.out.println("[AdminDAO => getLoanList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanList(map); + } + + public ArrayList getLoanRequestList(Map map) { + System.out.println("[AdminDAO => getLoanRequestList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanRequestList(map); + } + + public int getSearchLoanProductCnt(String keyword) { + System.out.println("[AdminDAO => getSearchLoanProductCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getSearchLoanProductCnt(keyword); + } + + public int getLoanCnt() { + System.out.println("[AdminDAO => getLoanCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanCnt(); + } + + public int getLoanRequestCnt() { + System.out.println("[AdminDAO => getLoanRequestCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanRequestCnt(); + } + + public int loanRequestAction(Map map) { + System.out.println("[AdminDAO => loanRequestAction()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.loanRequestAction(map); + } + + public int getSearchLoanRequestCnt(String keyword) { + System.out.println("[AdminDAO => getSearchLoanRequestCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getSearchLoanRequestCnt(keyword); + } + + public int getSearchLoanCnt(String keyword) { + System.out.println("[AdminDAO => getSearchLoanCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getSearchLoanCnt(keyword); + } + + public ArrayList searchLoanRequestList(Map map) { + System.out.println("[AdminDAO => searchLoanRequestList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.searchLoanRequestList(map); + } + + public ArrayList searchLoanList(Map map) { + System.out.println("[AdminDAO => searchLoanList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.searchLoanList(map); + } + + public int getLoanCancelCnt() { + System.out.println("[AdminDAO => getLoanCancelCnt()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanCancelCnt(); + } + + public ArrayList getLoanCancelList(Map map) { + System.out.println("[AdminDAO => getLoanCancelList()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanCancelList(map); + } + + public LoanVO getLoanInfo(Map map) { + System.out.println("[AdminDAO => getLoanInfo()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getLoanInfo(map); + } + + public int transNewLoanAccount(TransferVO trans) { + System.out.println("[AdminDAO => transNewLoanAccount()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.transNewLoanAccount(trans); + } + + public int setNewLoanAccount(Map map) { + System.out.println("[AdminDAO => setNewLoanAccount()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.setNewLoanAccount(map); + } + + public TransferVO resetNewLoanAccount(Map map) { + System.out.println("[AdminDAO => resetNewLoanAccount()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.resetNewLoanAccount(map); + } + + // 회원정보 상세 페이지 + @Override + public UserVO getUserInfo(String member_id) { + System.out.println("[DAO => getUserInfo()]"); + AdminDAO dao = sqlSession.getMapper(AdminDAO.class); + return dao.getUserInfo(member_id); + } + + + //대출계좌 정상으로 두기 + public int changeAccountState0(Map map) { + return sqlSession.update("com.spring.bank.admin.dao.AdminDAO.changeAccountState0", map); + + } + // !지은! + + // 공지사항 쓰기 처리(민재) + @Override + public int mngNoticeWriteAction(NoticeVO vo) { + + return sqlSession.insert("com.spring.bank.admin.dao.AdminDAO.mngNoticeWriteAction", vo); + } + + // 공지사항 - 비밀번호 인증(민재) + @Override + public String noticePWDCheck(int notice_num) { + + return sqlSession.selectOne("com.spring.bank.admin.dao.AdminDAO.noticePWDCheck", notice_num); + } + + // 공지사항 상세페이지(민재) + @Override + public NoticeVO getNoticeDetail(int notice_num) { + + return sqlSession.selectOne("com.spring.bank.admin.dao.AdminDAO.getNoticeDetail", notice_num); + } + + // 공지사항 수정처리(민재) + @Override + public int noticeModifyAction(NoticeVO vo) { + + return sqlSession.update("com.spring.bank.admin.dao.AdminDAO.noticeModifyAction", vo); + } + + // 공지사항 수정처리(민재) + @Override + public int noticeDeleteAction(int notice_num) { + + return sqlSession.delete("com.spring.bank.admin.dao.AdminDAO.noticeDeleteAction", notice_num); + } + } diff --git a/src/main/java/com/spring/bank/admin/service/AdminService.java b/src/main/java/com/spring/bank/admin/service/AdminService.java index dbd998f..7e82014 100644 --- a/src/main/java/com/spring/bank/admin/service/AdminService.java +++ b/src/main/java/com/spring/bank/admin/service/AdminService.java @@ -15,6 +15,9 @@ public interface AdminService { // 관리자 페이지 회원삭제 public void deleteCustomer(HttpServletRequest req, Model model); + // 관리자 금융관리 조회 + public void selectBanking(HttpServletRequest req, Model model); + // 관리자 페이지 예금 상품 등록 public void insertDepositProduct(HttpServletRequest req, Model model); @@ -33,6 +36,60 @@ public interface AdminService { // 관리자 페이지 예금 상품 삭제 public void deleteDepositProduct(HttpServletRequest req, Model model); + // 관리자 페이지 적금 상품 등록 처리 + public void savingProductInsertAction(HttpServletRequest req, Model model); + + // 관리자 페이지 적금 상품 조회 + public void selectSavingProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 적금 상품 검색 + public void searchSavingProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 적금 상품 상세 조회 + public void getSavingProductInfo(HttpServletRequest req, Model model); + + // 관리자 페이지 적금 상품 수정 + public void updateSavingProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 적금 상품 삭제 + public void deleteSavingProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 연금 상품 등록(지현) + public void insertIrpProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 연금 상품 조회(지현) + public void selectIrpProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 연금 상품 검색(지현) + public void searchIrpProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 연금 상품 상세 조회(지현) + public void getIrpProductInfo(HttpServletRequest req, Model model); + + // 관리자 페이지 연금 상품 수정(지현) + public void updateIrpProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 연금 상품 삭제(지현) + public void deleteIrpProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 펀드 상품 등록 처리 + public void fundProductInsertAction(HttpServletRequest req, Model model); + + // 관리자 페이지 펀드 상품 조회 + public void selectFundProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 펀드 상품 검색 + public void searchFundProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 펀드 상품 상세 조회 + public void getFundProductInfo(HttpServletRequest req, Model model); + + // 관리자 페이지 펀드 상품 수정 + public void updateFundProduct(HttpServletRequest req, Model model); + + // 관리자 페이지 펀드 상품 삭제 + public void deleteFundProduct(HttpServletRequest req, Model model); + //qna게시글 조회(지현) public void qnaList_mng(HttpServletRequest req, Model model); @@ -56,4 +113,19 @@ public interface AdminService { // 관리자 페이지 회원계좌검색목록 public void searchCustomerAccountList(HttpServletRequest req, Model model); + + // 관리자 페이지 TEST계좌생성(복환) + public int insertTestAccount(HttpServletRequest req, Model model); + + // 공지사항 쓰기 처리(민재) + public void mngNoticeWriteAction(HttpServletRequest req, Model model); + + // 공지사항 수정(민재) + public void mngNoticeModifyDetail(HttpServletRequest req, Model model); + + // 공지사항 수정처리(민재) + public void mngNoticeModifyAction(HttpServletRequest req, Model model); + + // 공지사항 삭제처리(민재) + public void mngNoticeDeleteAction(HttpServletRequest req, Model model); } diff --git a/src/main/java/com/spring/bank/admin/service/AdminServiceImpl.java b/src/main/java/com/spring/bank/admin/service/AdminServiceImpl.java index cbf8a81..696c3a4 100644 --- a/src/main/java/com/spring/bank/admin/service/AdminServiceImpl.java +++ b/src/main/java/com/spring/bank/admin/service/AdminServiceImpl.java @@ -1,5 +1,6 @@ package com.spring.bank.admin.service; +import java.sql.Date; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -8,118 +9,130 @@ import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.ui.Model; import com.spring.bank.admin.dao.AdminDAOImpl; import com.spring.bank.product.vo.DepositProductVO; +import com.spring.bank.product.vo.FundProductVO; +import com.spring.bank.product.vo.IrpProductVO; +import com.spring.bank.product.vo.SavingProductVO; +import com.spring.bank.user.vo.AccountVO; import com.spring.bank.user.vo.CustomerAccountVO; import com.spring.bank.user.vo.InquiryVO; +import com.spring.bank.product.vo.LoanProductVO; +import com.spring.bank.user.vo.LoanVO; +import com.spring.bank.user.vo.NoticeVO; +import com.spring.bank.user.vo.TransferVO; import com.spring.bank.user.vo.UserVO; import com.spring.bank.user.vo.faqVO; @Service public class AdminServiceImpl implements AdminService { - + @Autowired AdminDAOImpl dao; + @Autowired + BCryptPasswordEncoder bCryptPasswordEncoder; + // 관리자 페이지 회원목록 조회 @Override public void customerList(HttpServletRequest req, Model model) { // 3단계. 화면으로부터 입력받은 값을 받아온다. // 페이징 - int pageSize = 10; // 한 페이지당 출력할 회원수 - int pageBlock = 3; // 한 블럭당 페이지 갯수 - - int cnt = 0; // 회원수 - int start = 0; // 현재 페이지 시작 글 번호 - int end = 0; // 현재 페이지 마지막 글 번호 - int number = 0; // 출력용 글 번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작 페이지 - int endPage = 0; // 마지막 페이지 - - // 5-1단계. 회원 수 조회 + int pageSize = 10; // 한 페이지당 출력할 회원수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 회원수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 5-1단계. 회원 수 조회 cnt = dao.getCustomerCnt(); System.out.println("회원 수 : " + cnt); - + pageNum = req.getParameter("pageNum"); - - if(pageNum == null) { - pageNum = "1"; // 첫 페이지를 1페이지로 지정 + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - + // 글 30건 기준 currentPage = Integer.parseInt(pageNum); System.out.println("currentPage : " + currentPage); - + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); - + ArrayList dtos = null; - if(cnt > 0) { + if (cnt > 0) { // 5-2단계. 회원수 조회 dtos = dao.getCustomerList(map); } - + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 회원 목록 - model.addAttribute("cnt", cnt); // 회원수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 회원번호 - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 + model.addAttribute("dtos", dtos); // 회원 목록 + model.addAttribute("cnt", cnt); // 회원수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 회원번호 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 } } @@ -130,127 +143,133 @@ public void searchCustomer(HttpServletRequest req, Model model) { String search = req.getParameter("search"); System.out.println("관리자 페이지 회원 검색어 : " + search); // 페이징 - int pageSize = 10; // 한 페이지당 출력할 회원수 - int pageBlock = 3; // 한 블럭당 페이지 갯수 - - int cnt = 0; // 회원수 - int start = 0; // 현재 페이지 시작 글 번호 - int end = 0; // 현재 페이지 마지막 글 번호 - int number = 0; // 출력용 글 번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작 페이지 - int endPage = 0; // 마지막 페이지 - - // 5-1단계. 회원 수 조회 + int pageSize = 10; // 한 페이지당 출력할 회원수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 회원수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 5-1단계. 회원 수 조회 cnt = dao.getCustomerSearchCnt(search); - + System.out.println("검색된 회원 수 : " + cnt); - + pageNum = req.getParameter("pageNum"); - - if(pageNum == null) { - pageNum = "1"; // 첫 페이지를 1페이지로 지정 + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - + // 글 30건 기준 currentPage = Integer.parseInt(pageNum); System.out.println("currentPage : " + currentPage); - + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); map.put("search", search); - + ArrayList dtos = null; - if(cnt > 0) { + if (cnt > 0) { // 5-2단계. 회원수 조회 dtos = dao.getCustomerSearchList(map); } - + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 회원 목록 - model.addAttribute("cnt", cnt); // 회원수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 회원번호 + model.addAttribute("dtos", dtos); // 회원 목록 + model.addAttribute("cnt", cnt); // 회원수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 회원번호 model.addAttribute("search", search); - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 } } // 관리자 페이지 회원 삭제 @Override public void deleteCustomer(HttpServletRequest req, Model model) { - + int deleteCnt = 0; String member_ids[] = req.getParameterValues("check"); - if(member_ids != null) { - for(int i=0; i 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); - + ArrayList dtos = null; - if(cnt > 0) { + if (cnt > 0) { // 5-2단계. 회원수 조회 dtos = dao.selectDepositProduct(map); } - + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 예금 상품 목록 - model.addAttribute("cnt", cnt); // 예금 상품 수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 번호 - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 - } - } - + model.addAttribute("dtos", dtos); // 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + // 관리자 페이지 예금 상품검색 @Override public void searchDepositProduct(HttpServletRequest req, Model model) { - + // 입력받은 검색어 String search = req.getParameter("search"); System.out.println("관리자 페이지 회원 검색어 : " + search); - + // 페이징 - int pageSize = 10; // 한 페이지당 출력할 예금상품 - int pageBlock = 3; // 한 블럭당 페이지 갯수 - - int cnt = 0; // 예금상품 수 - int start = 0; // 현재 페이지 시작 글 번호 - int end = 0; // 현재 페이지 마지막 글 번호 - int number = 0; // 출력용 글 번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작 페이지 - int endPage = 0; // 마지막 페이지 - + int pageSize = 10; // 한 페이지당 출력할 예금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 예금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + // 검색 된 예금 상품 수 조회 cnt = dao.getDepositProductSearchCnt(search); System.out.println("검색 된 예금 상품 수 : " + cnt); - + pageNum = req.getParameter("pageNum"); - - if(pageNum == null) { - pageNum = "1"; // 첫 페이지를 1페이지로 지정 + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - + // 상품 30건 기준 currentPage = Integer.parseInt(pageNum); System.out.println("currentPage : " + currentPage); - + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); map.put("search", search); - + ArrayList dtos = null; - if(cnt > 0) { + if (cnt > 0) { dtos = dao.searchDepositProduct(map); } - + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 검색된 예금 상품 목록 - model.addAttribute("cnt", cnt); // 예금 상품 수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 번호 - model.addAttribute("search", search); // 검색어 - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 + model.addAttribute("dtos", dtos); // 검색된 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 } } - + // 관리자 페이지 예금 상품 상세 조회 @Override public void getDepositProductInfo(HttpServletRequest req, Model model) { String deposit_product_name = req.getParameter("deposit_product_name"); - int pageNum= Integer.parseInt(req.getParameter("pageNum")); - System.out.println(deposit_product_name+" 상품 상세조회"); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + System.out.println(deposit_product_name + " 상품 상세조회"); DepositProductVO vo = dao.getDepositProductInfo(deposit_product_name); model.addAttribute("vo", vo); model.addAttribute("pageNum", pageNum); } - + // 관리자 페이지 예금 상품 수정 @Override public void updateDepositProduct(HttpServletRequest req, Model model) { @@ -498,27 +517,28 @@ public void updateDepositProduct(HttpServletRequest req, Model model) { vo.setDeposit_product_explanation(req.getParameter("deposit_product_explanation")); vo.setDeposit_product_notice(req.getParameter("deposit_product_notice")); vo.setDeposit_product_bankCode(Integer.parseInt(req.getParameter("deposit_product_bankCode"))); - + int updateCnt = dao.updateDepositProduct(vo); System.out.println("예금 상품 updateCnt : " + updateCnt); System.out.println("pageNum : " + pageNum); model.addAttribute("updateCnt", updateCnt); model.addAttribute("pageNum", pageNum); + } // 관리자 페이지 예금 상품 삭제 @Override public void deleteDepositProduct(HttpServletRequest req, Model model) { - + int deleteCnt = 0; String deposit_product_names[] = req.getParameterValues("check"); - if(deposit_product_names != null) { - for(int i=0; i " + cnt); - - // 5-2단계. 게시글 목록 조회 - pageNum = req.getParameter("pageNum"); - - if (pageNum == null) { - pageNum = "1"; // 첫페이지를 1페이지로 지정 - } - - // 글 30건 기준 - currentPage = Integer.parseInt(pageNum); - System.out.println("currentPage : " + currentPage); - - // 페이지 갯수 6 = (30/5) + (0) - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 - - // 현재페이지 시작 글번호(페이지별) - // start = (currentPage - 1) * pageSize +1; - // 1 = (1 - 1 )* 5 + 1 - start = (currentPage - 1) * pageSize + 1; - - // 현재페이지 마지막 글번호(페이지별) - // end = start + pageSize - 1; - // 5 = 1 + 5 - 1 - end = start + pageSize - 1; - - System.out.println("start : " + start); - System.out.println("end : " + end); - - // 출력용 글번호 - // 30 = 30 - (1 - 1) * 5 //1페이지 - // number = cnt- (currentPage - 1) * pageSize; - number = cnt - (currentPage - 1) * pageSize; - - System.out.println("number : " + number); - System.out.println("pageSize : " + pageSize); - // 시작페이지 - // 1 = (1 / 3) * 3 + 1; - // startPage = (currentPage / pageBlock) * pageBlock + 1; - startPage = (currentPage / pageBlock) * pageBlock + 1; - if (currentPage % pageBlock == 0) - startPage -= pageBlock; - - System.out.println("startPage : " + startPage); - - // 마지막 페이지 - // 3 = 1 + 3 - 1 - endPage = startPage + pageBlock - 1; - if (endPage > pageCount) - endPage = pageCount; + // 관리자 페이지 적금 상품 등록 처리 + @Override + public void savingProductInsertAction(HttpServletRequest req, Model model) { + SavingProductVO vo = new SavingProductVO(); + vo.setSaving_product_name(req.getParameter("saving_product_name")); + vo.setSaving_product_summary(req.getParameter("saving_product_summary")); + vo.setSaving_product_interRate(Float.parseFloat(req.getParameter("saving_product_interRate"))); + vo.setSaving_product_type(Integer.parseInt(req.getParameter("saving_product_type"))); + vo.setSaving_product_maxDate(Integer.parseInt(req.getParameter("saving_product_maxDate"))); + vo.setSaving_product_minDate(Integer.parseInt(req.getParameter("saving_product_minDate"))); + vo.setSaving_product_minPrice(Integer.parseInt(req.getParameter("saving_product_minPrice"))); + vo.setSaving_product_explanation(req.getParameter("saving_product_explanation")); + vo.setSaving_product_notice(req.getParameter("saving_product_notice")); + vo.setSaving_product_bankCode(Integer.parseInt(req.getParameter("saving_product_bankCode"))); + + int insertCnt = dao.insertSavingProduct(vo); + System.out.println("적금상품등록 insertCnt : " + insertCnt); + model.addAttribute("insertCnt", insertCnt); + } - System.out.println("endPage : " + endPage); + // 관리자 페이지 적금 상품 조회 + @Override + public void selectSavingProduct(HttpServletRequest req, Model model) { + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 적금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 - System.out.println("--------------------------"); + int cnt = 0; // 적금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 - List dtos = null; + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 - if (cnt > 0) { - // 5-2단계. 게시글 목록 조회 - Map map = new HashMap(); - map.put("start", start); - map.put("end", end); - dtos = dao.getInquiryList(map); - } + // 적금상품 수 조회 + cnt = dao.getSavingProductCnt(); + System.out.println("등록 된 적금 상품 수 : " + cnt); - // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 - req.setAttribute("dtos", dtos); // 게시글 목록 - req.setAttribute("cnt", cnt); // 글개수 - req.setAttribute("pageNum", pageNum); // 페이지 번호 - req.setAttribute("number", number); // 출력용 글번호 - - if (cnt > 0) { - req.setAttribute("startPage", startPage); // 시작페이지 - req.setAttribute("endPage", endPage); // 마지막 페이지 - req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 - req.setAttribute("pageCount", pageCount); // 페이지 갯수 - req.setAttribute("currentPage", currentPage); // 현재페이지 - } + pageNum = req.getParameter("pageNum"); + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - - //faq 게시글 조회(지현) - @Override - public void faqList_mng(HttpServletRequest req,Model model) { - // 3단계. 화면으로부터 입력받은 값을 받아온다. - // 페이징 - int pageSize = 5; // 한페이지당 출력할 글 갯수 - int pageBlock = 3; // 한 블록당 페이지 갯수 - - int cnt = 0; // 글 갯수 - int start = 0; // 현재페이지 시작 글 번호 - int end = 0; // 현재페이지 마지막 글 번호 - int number = 0; // 출력용 글번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작페이지 - int endPage = 0; // 마지막페이지 - // 5-1단계. 게시글 갯수 조회 - cnt = dao.getFaqCnt(); - - System.out.println("cnt ==> " + cnt); + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); - // 5-2단계. 게시글 목록 조회 - pageNum = req.getParameter("pageNum"); + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - if (pageNum == null) { - pageNum = "1"; // 첫페이지를 1페이지로 지정 - } + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; - // 글 30건 기준 - currentPage = Integer.parseInt(pageNum); - System.out.println("currentPage : " + currentPage); + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1; - // 페이지 갯수 6 = (30/5) + (0) - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 + System.out.println("start : " + start); + System.out.println("end : " + end); - // 현재페이지 시작 글번호(페이지별) - // start = (currentPage - 1) * pageSize +1; - // 1 = (1 - 1 )* 5 + 1 - start = (currentPage - 1) * pageSize + 1; + // 출력용 글 번호 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; - // 현재페이지 마지막 글번호(페이지별) - // end = start + pageSize - 1; - // 5 = 1 + 5 - 1 - end = start + pageSize - 1; + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); - System.out.println("start : " + start); - System.out.println("end : " + end); + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); - // 출력용 글번호 - // 30 = 30 - (1 - 1) * 5 //1페이지 - // number = cnt- (currentPage - 1) * pageSize; - number = cnt - (currentPage - 1) * pageSize; + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); - System.out.println("number : " + number); - System.out.println("pageSize : " + pageSize); + System.out.println("==================================="); - // 시작페이지 - // 1 = (1 / 3) * 3 + 1; - // startPage = (currentPage / pageBlock) * pageBlock + 1; - startPage = (currentPage / pageBlock) * pageBlock + 1; - if (currentPage % pageBlock == 0) - startPage -= pageBlock; + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); - System.out.println("startPage : " + startPage); + ArrayList dtos = null; + if (cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.selectSavingProduct(map); + } - // 마지막 페이지 - // 3 = 1 + 3 - 1 - endPage = startPage + pageBlock - 1; - if (endPage > pageCount) - endPage = pageCount; + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 적금 상품 목록 + model.addAttribute("cnt", cnt); // 적금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } - System.out.println("endPage : " + endPage); + // 관리자 페이지 적금 상품 검색 + @Override + public void searchSavingProduct(HttpServletRequest req, Model model) { + // 입력받은 검색어 + String search = req.getParameter("search"); + System.out.println("관리자 페이지 회원 검색어 : " + search); - System.out.println("--------------------------"); + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 적금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 - List dtos = null; + int cnt = 0; // 적금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 - if (cnt > 0) { - // 5-2단계. 게시글 목록 조회 - Map map = new HashMap(); - map.put("start", start); - map.put("end", end); - dtos = dao.getFaqList(map); - } + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 - // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 - req.setAttribute("dtos", dtos); // 게시글 목록 - req.setAttribute("cnt", cnt); // 글개수 - req.setAttribute("pageNum", pageNum); // 페이지 번호 - req.setAttribute("number", number); // 출력용 글번호 - - if (cnt > 0) { - req.setAttribute("startPage", startPage); // 시작페이지 - req.setAttribute("endPage", endPage); // 마지막 페이지 - req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 - req.setAttribute("pageCount", pageCount); // 페이지 갯수 - req.setAttribute("currentPage", currentPage); // 현재페이지 - } + // 검색 된 적금 상품 수 조회 + cnt = dao.getSavingProductSearchCnt(search); + System.out.println("검색 된 적금 상품 수 : " + cnt); - } - - //faq 게시글 추가(지현) - @Override - public void faqAdd(HttpServletRequest req, Model model) { - int insertCnt = 0; - - faqVO vo = new faqVO(); - // 3-1단계. 화면으로부터 입력받은 값(hidden값)을 받아온다. - int pageNum = Integer.parseInt(req.getParameter("pageNum")); - - // 3-2단계. 화면으로부터 입력받은 값(input 값 = 작성자, 비밀번호, 글제목, 글내용)을 받아와서 바구니에 담는다 - vo.setFaq_title(req.getParameter("faq_title")); - vo.setFaq_content(req.getParameter("faq_content")); - - // 5단계. 게시글 작성 - insertCnt = dao.faqAdd(vo); - System.out.println("insertCnt : " + insertCnt); - - // 6단계 - req.setAttribute("insertCnt", insertCnt); - req.setAttribute("pageNum", pageNum); - - } - - //faq 수정 상세(지현) - @Override - public void faqModifyDetail(HttpServletRequest req, Model model) { - int faq_id = Integer.parseInt(req.getParameter("faq_id")); - int pageNum = Integer.parseInt(req.getParameter("pageNum")); - - // 5-2 단계. 상세페이지 조회 - faqVO vo = dao.getFaqDetail(faq_id); - - // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 - req.setAttribute("dto", vo); - req.setAttribute("faq_id", faq_id); - req.setAttribute("pageNum", pageNum); - } - - //faq 수정 처리(지현) - @Override - public void faqModify(HttpServletRequest req, Model model) { - - System.out.println(req.getParameter("faq_id")); - int faq_id = Integer.parseInt(req.getParameter("faq_id")); - int pageNum = Integer.parseInt(req.getParameter("pageNum")); - - // QnaVO바구니 생성 - // 화면으로부터 입력받은 값(input값 - 작성자,비밀번호, 제목, 내용), num을 받아온다. - faqVO vo = new faqVO(); - vo.setFaq_title(req.getParameter("faq_title")); - vo.setFaq_content(req.getParameter("faq_content")); - vo.setFaq_id(faq_id); - - // 5단계. 게시글 수정처리 - int updateCnt = dao.updateFaq(vo); - System.out.println("updateCnt : " + updateCnt); - - // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 - req.setAttribute("updateCnt", updateCnt); - req.setAttribute("pageNum", pageNum); - req.setAttribute("faq_id", faq_id); - } - - //faq 삭제(지현) - @Override - public void faqDelete(HttpServletRequest req, Model model) { - System.out.println("삭제처리 아이디 : " + req.getParameter("faq_id")); - int faq_id = Integer.parseInt(req.getParameter("faq_id")); - int pageNum = Integer.parseInt(req.getParameter("pageNum")); - - // 5단계. 게시글 수정처리 - int deleteCnt = dao.deleteFaq(faq_id); - System.out.println("deleteCnt : " + deleteCnt); - - // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 - req.setAttribute("deleteCnt", deleteCnt); - req.setAttribute("pageNum", pageNum); - req.setAttribute("faq_id", faq_id); - } - // 관리자 페이지 회원계좌목록 - public void customerAccountList(HttpServletRequest req, Model model) { - int pageSize = 10; // 한 페이지당 출력할 수 - int pageBlock = 3; // 한 블럭당 페이지 갯수 - - int cnt = 0; // 회원계좌 수 - int start = 0; // 현재 페이지 시작 글 번호 - int end = 0; // 현재 페이지 마지막 글 번호 - int number = 0; // 출력용 글 번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작 페이지 - int endPage = 0; // 마지막 페이지 - - // 예금상품 수 조회 - cnt = dao.getCustomerAccountCnt(); - System.out.println("등록 된 회원별 계좌수 : " + cnt); - pageNum = req.getParameter("pageNum"); - - if(pageNum == null) { - pageNum = "1"; // 첫 페이지를 1페이지로 지정 + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - + // 상품 30건 기준 currentPage = Integer.parseInt(pageNum); System.out.println("currentPage : " + currentPage); - + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); - - ArrayList dtos = null; - if(cnt > 0) { - // 5-2단계. 회원수 조회 - dtos = dao.getCustomerAccountList(map); + map.put("search", search); + + ArrayList dtos = null; + if (cnt > 0) { + + dtos = dao.searchSavingProduct(map); } - + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 예금 상품 목록 - model.addAttribute("cnt", cnt); // 예금 상품 수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 번호 - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 - } - } - - // 관리자 페이지 회원계좌검색목록 - public void searchCustomerAccountList(HttpServletRequest req, Model model) { - String search = req.getParameter("search"); - - int pageSize = 10; // 한 페이지당 출력할 수 - int pageBlock = 3; // 한 블럭당 페이지 갯수 - - int cnt = 0; // 회원계좌 수 - int start = 0; // 현재 페이지 시작 글 번호 - int end = 0; // 현재 페이지 마지막 글 번호 - int number = 0; // 출력용 글 번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작 페이지 - int endPage = 0; // 마지막 페이지 - - // 예금상품 수 조회 - cnt = dao.getSerachCustomerAccountCnt(search); - System.out.println("검색된 회원별 계좌수 : " + cnt); - + model.addAttribute("dtos", dtos); // 검색된 적금 상품 목록 + model.addAttribute("cnt", cnt); // 적금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 적금 상품 상세 조회 + @Override + public void getSavingProductInfo(HttpServletRequest req, Model model) { + String saving_product_name = req.getParameter("saving_product_name"); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + System.out.println("req.getParameter('pageNum')" + req.getParameter("pageNum")); + System.out.println(saving_product_name + " 상품 상세조회"); + SavingProductVO vo = dao.getSavingProductInfo(saving_product_name); + model.addAttribute("vo", vo); + model.addAttribute("pageNum", pageNum); + } + + // 관리자 페이지 적금 상품 수정 + @Override + public void updateSavingProduct(HttpServletRequest req, Model model) { + + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + SavingProductVO vo = new SavingProductVO(); + vo.setSaving_product_name(req.getParameter("saving_product_name")); + vo.setSaving_product_summary(req.getParameter("saving_product_summary")); + vo.setSaving_product_interRate(Float.parseFloat(req.getParameter("saving_product_interRate"))); + vo.setSaving_product_type(Integer.parseInt(req.getParameter("saving_product_type"))); + vo.setSaving_product_maxDate(Integer.parseInt(req.getParameter("saving_product_maxDate"))); + vo.setSaving_product_minDate(Integer.parseInt(req.getParameter("saving_product_minDate"))); + vo.setSaving_product_minPrice(Integer.parseInt(req.getParameter("saving_product_minPrice"))); + vo.setSaving_product_explanation(req.getParameter("saving_product_explanation")); + vo.setSaving_product_notice(req.getParameter("saving_product_notice")); + vo.setSaving_product_bankCode(Integer.parseInt(req.getParameter("saving_product_bankCode"))); + + int updateCnt = dao.updateSavingProduct(vo); + System.out.println("적금 상품 updateCnt : " + updateCnt); + System.out.println("pageNum : " + pageNum); + model.addAttribute("updateCnt", updateCnt); + model.addAttribute("pageNum", pageNum); + } + + // 관리자 페이지 적금 상품 삭제 + @Override + public void deleteSavingProduct(HttpServletRequest req, Model model) { + int deleteCnt = 0; + String saving_product_names[] = req.getParameterValues("check"); + if (saving_product_names != null) { + for (int i = 0; i < saving_product_names.length; i++) { + deleteCnt = dao.deleteSavingProduct(saving_product_names[i]); + System.out.println("삭제선택된 적금상품명: " + saving_product_names[i]); + } + model.addAttribute("msg", "적금상품 삭제처리되었습니다"); + } else { + model.addAttribute("msg", "삭제하실 상품을 선택해주세요."); + } + System.out.println("적금상품 삭제여부 : " + deleteCnt); + model.addAttribute("deleteCnt", deleteCnt); + } + + // 관리자 페이지 연금 상품 등록(지현) + @Override + public void insertIrpProduct(HttpServletRequest req, Model model) { + IrpProductVO vo = new IrpProductVO(); + vo.setIrp_product_name(req.getParameter("irp_product_name")); + vo.setIrp_product_summary(req.getParameter("irp_product_summary")); + System.out.println("rateart" + req.getParameter("irp_product_bankCode")); + vo.setIrp_product_interRate(Float.parseFloat(req.getParameter("irp_product_interRate"))); + vo.setIrp_product_expiryTerm(Integer.parseInt(req.getParameter("irp_product_expiryTerm"))); + vo.setIrp_product_explanation(req.getParameter("irp_product_explanation")); + vo.setIrp_product_notice(req.getParameter("irp_product_notice")); + vo.setIrp_product_bankCode(Integer.parseInt(req.getParameter("irp_product_bankCode"))); + vo.setIrp_product_money(Integer.parseInt(req.getParameter("irp_product_money")) * 10000); + + int insertCnt = dao.insertIrpProduct(vo); + System.out.println("연금상품등록 insertCnt : " + insertCnt); + model.addAttribute("insertCnt", insertCnt); + + } + + // 관리자 페이지 연금 상품 조회(지현) + @Override + public void selectIrpProduct(HttpServletRequest req, Model model) { + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 예금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 예금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 예금상품 수 조회 + cnt = dao.getIrpProductCnt(); + System.out.println("등록 된 연금 상품 수 : " + cnt); + pageNum = req.getParameter("pageNum"); - - if(pageNum == null) { - pageNum = "1"; // 첫 페이지를 1페이지로 지정 + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - + // 상품 30건 기준 currentPage = Integer.parseInt(pageNum); System.out.println("currentPage : " + currentPage); - + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); - map.put("search", search); - - ArrayList dtos = null; - if(cnt > 0) { + + ArrayList dtos = null; + if (cnt > 0) { // 5-2단계. 회원수 조회 - dtos = dao.getSearchCustomerAccountList(map); + dtos = dao.selectIrpProduct(map); } - + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 연금 상품 검색(지현) + @Override + public void searchIrpProduct(HttpServletRequest req, Model model) { + + // 입력받은 검색어 + String search = req.getParameter("search"); + System.out.println("관리자 페이지 회원 검색어 : " + search); + + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 예금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 예금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 검색 된 예금 상품 수 조회 + cnt = dao.getIrpProductSearchCnt(search); + System.out.println("검색 된 연금 상품 수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("search", search); + + ArrayList dtos = null; + if (cnt > 0) { + + dtos = dao.searchIrpProduct(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 검색된 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 연금 상품 상세 조회(지현) + @Override + public void getIrpProductInfo(HttpServletRequest req, Model model) { + String irp_product_name = req.getParameter("irp_product_name"); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + System.out.println(irp_product_name + " 상품 상세조회"); + IrpProductVO vo = dao.getIrpProductInfo(irp_product_name); + model.addAttribute("vo", vo); + model.addAttribute("pageNum", pageNum); + + } + + // 관리자 페이지 연금 상품 수정(지현) + @Override + public void updateIrpProduct(HttpServletRequest req, Model model) { + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + IrpProductVO vo = new IrpProductVO(); + vo.setIrp_product_name(req.getParameter("irp_product_name")); + vo.setIrp_product_summary(req.getParameter("irp_product_summary")); + vo.setIrp_product_interRate(Float.parseFloat(req.getParameter("irp_product_interRate"))); + vo.setIrp_product_expiryTerm(Integer.parseInt(req.getParameter("irp_product_expiryTerm"))); + vo.setIrp_product_explanation(req.getParameter("irp_product_explanation")); + vo.setIrp_product_money(Integer.parseInt(req.getParameter("irp_product_money")) * 10000); + vo.setIrp_product_notice(req.getParameter("irp_product_notice")); + vo.setIrp_product_bankCode(Integer.parseInt(req.getParameter("irp_product_bankCode"))); + + int updateCnt = dao.updateIrpProduct(vo); + System.out.println("연금 상품 updateCnt : " + updateCnt); + System.out.println("pageNum : " + pageNum); + model.addAttribute("updateCnt", updateCnt); + model.addAttribute("pageNum", pageNum); + } + + // 관리자 페이지 연금 상품 삭제(지현) + @Override + public void deleteIrpProduct(HttpServletRequest req, Model model) { + int deleteCnt = 0; + String irp_product_names[] = req.getParameterValues("check"); + if (irp_product_names != null) { + for (int i = 0; i < irp_product_names.length; i++) { + deleteCnt = dao.deleteIrpProduct(irp_product_names[i]); + System.out.println("삭제선택된 연금상품명: " + irp_product_names[i]); + } + // String deposit_product_name = String.join(",", deposit_product_names); + // System.out.println("선택된 상품들: " + deposit_product_name); + model.addAttribute("msg", "연금상품 삭제처리되었습니다"); + } else { + model.addAttribute("msg", "삭제하실 상품을 선택해주세요."); + } + System.out.println("연금상품 삭제여부 : " + deleteCnt); + model.addAttribute("deleteCnt", deleteCnt); + } + + // 관리자 페이지 펀드 상품 등록 처리 + @Override + public void fundProductInsertAction(HttpServletRequest req, Model model) { + FundProductVO vo = new FundProductVO(); + + vo.setFund_title(req.getParameter("fund_title")); + vo.setFund_content(req.getParameter("fund_content")); + vo.setFund_summary(req.getParameter("fund_summary")); + vo.setFund_start_date(Date.valueOf(req.getParameter("fund_start_date"))); + vo.setFund_end_date(Date.valueOf(req.getParameter("fund_end_date"))); + vo.setFund_goal_money(Integer.parseInt(req.getParameter("fund_goal_money"))); + vo.setFund_category(req.getParameter("fund_category")); + vo.setFund_approve(req.getParameter("saving_product_explanation")); + vo.setFund_mem_name(req.getParameter("fund_mem_name")); + + String hp1 = req.getParameter("fund_mem_hp1"); + String hp2 = req.getParameter("fund_mem_hp2"); + String hp3 = req.getParameter("fund_mem_hp3"); + + String hp = hp1 + "-" + hp2 + "-" + hp3; + vo.setFund_mem_hp(hp); + + String email1 = req.getParameter("fund_mem_email1"); + String email2 = req.getParameter("fund_mem_email2"); + + String email = email1 + "@" + email2; + vo.setFund_mem_email(email); + + vo.setFund_bank_code(Integer.parseInt(req.getParameter("fund_bank_code"))); + System.out.println("req.getParameter('fund_bank_code') : " + req.getParameter("fund_bank_code")); + vo.setFund_account(req.getParameter("fund_account")); + String img = "../resources/images/admin/upload/" + req.getParameter("fund_filename"); + vo.setFund_filename(img); + + int insertCnt = dao.insertFundProduct(vo); + System.out.println("펀드상품등록 insertCnt : " + insertCnt); + model.addAttribute("insertCnt", insertCnt); + } + + // 관리자 페이지 펀드 상품 조회 + @Override + public void selectFundProduct(HttpServletRequest req, Model model) { + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 펀드상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 펀드상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 펀드상품 수 조회 + cnt = dao.getFundProductCnt(); + System.out.println("등록 된 펀드 상품 수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + ArrayList dtos = null; + if (cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.selectFundProduct(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 펀드 상품 목록 + model.addAttribute("cnt", cnt); // 펀드 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 펀드 상품 검색 + @Override + public void searchFundProduct(HttpServletRequest req, Model model) { + // 입력받은 검색어 + String search = req.getParameter("search"); + System.out.println("관리자 페이지 회원 검색어 : " + search); + + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 펀드상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 펀드상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 검색 된 펀드 상품 수 조회 + cnt = dao.getSavingProductSearchCnt(search); + System.out.println("검색 된 펀드 상품 수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("search", search); + + ArrayList dtos = null; + if (cnt > 0) { + + dtos = dao.searchSavingProduct(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 검색된 펀드 상품 목록 + model.addAttribute("cnt", cnt); // 펀드 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 펀드 상품 상세 조회 + @Override + public void getFundProductInfo(HttpServletRequest req, Model model) { + String fund_title = req.getParameter("fund_title"); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + System.out.println("req.getParameter('pageNum')" + req.getParameter("pageNum")); + System.out.println(fund_title + " 상품 상세조회"); + FundProductVO vo = dao.getFundProductInfo(fund_title); + model.addAttribute("vo", vo); + model.addAttribute("pageNum", pageNum); + } + + // 관리자 페이지 펀드 상품 수정 + @Override + public void updateFundProduct(HttpServletRequest req, Model model) { + + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + FundProductVO vo = new FundProductVO(); + + vo.setFund_title(req.getParameter("fund_title")); + vo.setFund_content(req.getParameter("fund_content")); + vo.setFund_summary(req.getParameter("fund_summary")); + vo.setFund_start_date(Date.valueOf(req.getParameter("fund_start_date"))); + vo.setFund_end_date(Date.valueOf(req.getParameter("fund_end_date"))); + vo.setFund_goal_money(Integer.parseInt(req.getParameter("fund_goal_money"))); + vo.setFund_category(req.getParameter("fund_category")); + vo.setFund_approve(req.getParameter("saving_product_explanation")); + vo.setFund_mem_name(req.getParameter("fund_mem_name")); + + String hp1 = req.getParameter("fund_mem_hp1"); + String hp2 = req.getParameter("fund_mem_hp2"); + String hp3 = req.getParameter("fund_mem_hp3"); + + String hp = hp1 + "-" + hp2 + "-" + hp3; + vo.setFund_mem_hp(hp); + + String email1 = req.getParameter("fund_mem_email1"); + String email2 = req.getParameter("fund_mem_email2"); + + String email = email1 + "@" + email2; + vo.setFund_mem_email(email); + + vo.setFund_bank_code(Integer.parseInt(req.getParameter("fund_bank_code"))); + System.out.println("req.getParameter('fund_bank_code') : " + req.getParameter("fund_bank_code")); + vo.setFund_account(req.getParameter("fund_account")); + String img = "../resources/images/admin/upload/" + req.getParameter("fund_filename"); + vo.setFund_filename(img); + + int updateCnt = dao.updateFundProduct(vo); + System.out.println("펀드 상품 updateCnt : " + updateCnt); + System.out.println("pageNum : " + pageNum); + model.addAttribute("updateCnt", updateCnt); + model.addAttribute("pageNum", pageNum); + } + + // 관리자 페이지 펀드 상품 삭제 + @Override + public void deleteFundProduct(HttpServletRequest req, Model model) { + int deleteCnt = 0; + String fund_title[] = req.getParameterValues("check"); + if (fund_title != null) { + for (int i = 0; i < fund_title.length; i++) { + deleteCnt = dao.deleteFundProduct(fund_title[i]); + System.out.println("삭제선택된 펀드상품명: " + fund_title[i]); + } + model.addAttribute("msg", "펀드상품 삭제처리되었습니다"); + } else { + model.addAttribute("msg", "삭제하실 상품을 선택해주세요."); + } + System.out.println("펀드상품 삭제여부 : " + deleteCnt); + model.addAttribute("deleteCnt", deleteCnt); + } + + // qna 조회(지현) + @Override + public void qnaList_mng(HttpServletRequest req, Model model) { + // 3단계. 화면으로부터 입력받은 값을 받아온다. + // 페이징 + int pageSize = 5; // 한페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블록당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재페이지 시작 글 번호 + int end = 0; // 현재페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작페이지 + int endPage = 0; // 마지막페이지 + + // 5-1단계. 게시글 갯수 조회 + cnt = dao.getInquiryCnt(); + + System.out.println("cnt ==> " + cnt); + + // 5-2단계. 게시글 목록 조회 + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫페이지를 1페이지로 지정 + } + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize +1; + // 1 = (1 - 1 )* 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5 //1페이지 + // number = cnt- (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("--------------------------"); + + List dtos = null; + + if (cnt > 0) { + // 5-2단계. 게시글 목록 조회 + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + dtos = dao.getInquiryList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dtos", dtos); // 게시글 목록 + req.setAttribute("cnt", cnt); // 글개수 + req.setAttribute("pageNum", pageNum); // 페이지 번호 + req.setAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + req.setAttribute("startPage", startPage); // 시작페이지 + req.setAttribute("endPage", endPage); // 마지막 페이지 + req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 + req.setAttribute("pageCount", pageCount); // 페이지 갯수 + req.setAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // faq 게시글 조회(지현) + @Override + public void faqList_mng(HttpServletRequest req, Model model) { + // 3단계. 화면으로부터 입력받은 값을 받아온다. + // 페이징 + int pageSize = 5; // 한페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블록당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재페이지 시작 글 번호 + int end = 0; // 현재페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작페이지 + int endPage = 0; // 마지막페이지 + + // 5-1단계. 게시글 갯수 조회 + cnt = dao.getFaqCnt(); + + System.out.println("cnt ==> " + cnt); + + // 5-2단계. 게시글 목록 조회 + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫페이지를 1페이지로 지정 + } + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize +1; + // 1 = (1 - 1 )* 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5 //1페이지 + // number = cnt- (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("--------------------------"); + + List dtos = null; + + if (cnt > 0) { + // 5-2단계. 게시글 목록 조회 + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + dtos = dao.getFaqList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dtos", dtos); // 게시글 목록 + req.setAttribute("cnt", cnt); // 글개수 + req.setAttribute("pageNum", pageNum); // 페이지 번호 + req.setAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + req.setAttribute("startPage", startPage); // 시작페이지 + req.setAttribute("endPage", endPage); // 마지막 페이지 + req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 + req.setAttribute("pageCount", pageCount); // 페이지 갯수 + req.setAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // faq 게시글 추가(지현) + @Override + public void faqAdd(HttpServletRequest req, Model model) { + int insertCnt = 0; + + faqVO vo = new faqVO(); + // 3-1단계. 화면으로부터 입력받은 값(hidden값)을 받아온다. + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + + // 3-2단계. 화면으로부터 입력받은 값(input 값 = 작성자, 비밀번호, 글제목, 글내용)을 받아와서 바구니에 담는다 + vo.setFaq_title(req.getParameter("faq_title")); + vo.setFaq_content(req.getParameter("faq_content")); + + // 5단계. 게시글 작성 + insertCnt = dao.faqAdd(vo); + System.out.println("insertCnt : " + insertCnt); + + // 6단계 + req.setAttribute("insertCnt", insertCnt); + req.setAttribute("pageNum", pageNum); + + } + + // faq 수정 상세(지현) + @Override + public void faqModifyDetail(HttpServletRequest req, Model model) { + int faq_id = Integer.parseInt(req.getParameter("faq_id")); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + + // 5-2 단계. 상세페이지 조회 + faqVO vo = dao.getFaqDetail(faq_id); + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dto", vo); + req.setAttribute("faq_id", faq_id); + req.setAttribute("pageNum", pageNum); + } + + // faq 수정 처리(지현) + @Override + public void faqModify(HttpServletRequest req, Model model) { + + System.out.println(req.getParameter("faq_id")); + int faq_id = Integer.parseInt(req.getParameter("faq_id")); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + + // QnaVO바구니 생성 + // 화면으로부터 입력받은 값(input값 - 작성자,비밀번호, 제목, 내용), num을 받아온다. + faqVO vo = new faqVO(); + vo.setFaq_title(req.getParameter("faq_title")); + vo.setFaq_content(req.getParameter("faq_content")); + vo.setFaq_id(faq_id); + + // 5단계. 게시글 수정처리 + int updateCnt = dao.updateFaq(vo); + System.out.println("updateCnt : " + updateCnt); + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("updateCnt", updateCnt); + req.setAttribute("pageNum", pageNum); + req.setAttribute("faq_id", faq_id); + } + + // faq 삭제(지현) + @Override + public void faqDelete(HttpServletRequest req, Model model) { + System.out.println("삭제처리 아이디 : " + req.getParameter("faq_id")); + int faq_id = Integer.parseInt(req.getParameter("faq_id")); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + + // 5단계. 게시글 수정처리 + int deleteCnt = dao.deleteFaq(faq_id); + System.out.println("deleteCnt : " + deleteCnt); + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("deleteCnt", deleteCnt); + req.setAttribute("pageNum", pageNum); + req.setAttribute("faq_id", faq_id); + } + + // 관리자 페이지 회원계좌목록 + public void customerAccountList(HttpServletRequest req, Model model) { + int pageSize = 10; // 한 페이지당 출력할 수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 회원계좌 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 예금상품 수 조회 + cnt = dao.getCustomerAccountCnt(); + System.out.println("등록 된 회원별 계좌수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + ArrayList dtos = null; + if (cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.getCustomerAccountList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 회원계좌검색목록 + public void searchCustomerAccountList(HttpServletRequest req, Model model) { + String search = req.getParameter("search"); + + int pageSize = 10; // 한 페이지당 출력할 수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 회원계좌 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 예금상품 수 조회 + cnt = dao.getSerachCustomerAccountCnt(search); + System.out.println("검색된 회원별 계좌수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("search", search); + + ArrayList dtos = null; + if (cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.getSearchCustomerAccountList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 관리자 페이지 TEST계좌생성(복환) + @Override + public int insertTestAccount(HttpServletRequest req, Model model) { + System.out.println("Service => insertTestAccount"); + + String account_bankCode = req.getParameter("account_bankCode"); + String account_id = createAccountId(Integer.parseInt(account_bankCode)); + String account_password = req.getParameter("account_password"); + String account_balance = req.getParameter("account_balance"); + String account_type = req.getParameter("account_type"); + String account_state = req.getParameter("account_state"); + String account_stateContent = req.getParameter("account_stateContent"); + String account_limit = req.getParameter("account_limit"); + String unique_key = req.getParameter("unique_key"); + + AccountVO vo = new AccountVO(); + + vo.setAccount_bankCode(Integer.parseInt(account_bankCode)); + vo.setAccount_id(account_id); + vo.setAccount_password(account_password); + vo.setAccount_balance(Integer.parseInt(account_balance)); + vo.setAccount_type(Integer.parseInt(account_type)); + vo.setAccount_state(Integer.parseInt(account_state)); + vo.setAccount_stateContent(account_stateContent); + vo.setAccount_limit(Integer.parseInt(account_limit)); + vo.setUnique_key(unique_key); + + return dao.insertTestAccount(vo); + } + + // 계좌 생성 Method + public String createAccountId(int account_type) { + String account_id = ""; + + if (account_type == 1) { + // 국민(14) > 6 - 2 - 6 + String st1 = String.format("%06d", (int) (Math.random() * 1000000)); + String st2 = String.format("%02d", (int) (Math.random() * 100)); + String st3 = String.format("%06d", (int) (Math.random() * 1000000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } else if (account_type == 2) { + // 우리(13) > 4 - 3 - 6 + String st1 = String.format("%04d", (int) (Math.random() * 10000)); + String st2 = String.format("%03d", (int) (Math.random() * 1000)); + String st3 = String.format("%06d", (int) (Math.random() * 1000000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } else if (account_type == 3) { + // 농협(13) > 3 - 4 - 4 - 2 + String st1 = String.format("%03d", (int) (Math.random() * 1000)); + String st2 = String.format("%04d", (int) (Math.random() * 10000)); + String st3 = String.format("%04d", (int) (Math.random() * 10000)); + String st4 = String.format("%02d", (int) (Math.random() * 100)); + + account_id = st1 + "-" + st2 + "-" + st3 + "-" + st4; + + System.out.println("account_id : " + account_id); + + } else if (account_type == 4) { + // 신한(12) > 3 - 3 - 6 + String st1 = String.format("%03d", (int) (Math.random() * 1000)); + String st2 = String.format("%03d", (int) (Math.random() * 1000)); + String st3 = String.format("%06d", (int) (Math.random() * 1000000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } else if (account_type == 5) { + // 하나(14) > 3 - 6 - 5 + String st1 = String.format("%03d", (int) (Math.random() * 1000)); + String st2 = String.format("%06d", (int) (Math.random() * 1000000)); + String st3 = String.format("%05d", (int) (Math.random() * 100000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } + + return account_id; + } + + // 공지사항 쓰기 처리(민재) + @Override + public void mngNoticeWriteAction(HttpServletRequest req, Model model) { + System.out.println("여기들어와?"); + NoticeVO vo = new NoticeVO(); + + // 히든값 받아오기 -> 바구니에 넣기 + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + vo.setNotice_writer(req.getParameter("notice_writer")); + + // input값 받아오기 -> 바구니에 넣기 + vo.setNotice_subject(req.getParameter("notice_subject")); + vo.setNotice_password(req.getParameter("notice_password")); + vo.setNotice_content(req.getParameter("notice_content")); + + // 작성일 + // vo.setNotice_date(new Date()); + + // insert + int insertCnt = dao.mngNoticeWriteAction(vo); + System.out.println("insertCnt : " + insertCnt); + + // jsp로 insertCnt값 넘기기 + model.addAttribute("insertCnt", insertCnt); + model.addAttribute("pageNum", pageNum); + } + + // 공지사항 수정인증(민재) + @Override + public void mngNoticeModifyDetail(HttpServletRequest req, Model model) { + + // 히든값 + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int notice_num = Integer.parseInt(req.getParameter("notice_num")); + + String rawPwd = (String) req.getParameter("notice_password"); + + // 암호화된 비밀번호 가져오기 + String bCryptPasswordEncoderPwd = dao.noticePWDCheck(notice_num); + + int selectCnt = 0; + boolean result = bCryptPasswordEncoder.matches(rawPwd, bCryptPasswordEncoderPwd); + + // 비밀번호 인증 + // 인증성공 :: selectCnt = 1, 인증실패 :: selectCnt = 0 + if (result == true) { + selectCnt = 1; + } + + System.out.println("공지사항 수정인증 selectCnt : " + selectCnt); + // 상세페이지 조회 + NoticeVO vo = dao.getNoticeDetail(notice_num); + + model.addAttribute("pageNum", pageNum); + model.addAttribute("selectCnt", selectCnt); + model.addAttribute("vo", vo); + + } + + // 공지사항 수정처리(민재) + @Override + public void mngNoticeModifyAction(HttpServletRequest req, Model model) { + + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + + NoticeVO vo = new NoticeVO(); + + vo.setNotice_num(Integer.parseInt(req.getParameter("notice_num"))); + vo.setNotice_subject(req.getParameter("notice_subject")); + vo.setNotice_password(req.getParameter("notice_password")); + vo.setNotice_content(req.getParameter("notice_content")); + + int updateCnt = dao.noticeModifyAction(vo); + + model.addAttribute("pageNum", pageNum); + model.addAttribute("updateCnt", updateCnt); + } + + // 공지사항 삭제처리(민재) + @Override + public void mngNoticeDeleteAction(HttpServletRequest req, Model model) { + + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int notice_num = (Integer.parseInt(req.getParameter("notice_num"))); + + String rawPwd = (String) req.getParameter("notice_password"); + + // 암호화된 비밀번호 가져오기 + String bCryptPasswordEncoderPwd = dao.noticePWDCheck(notice_num); + + int deleteCnt = 0; + boolean result = bCryptPasswordEncoder.matches(rawPwd, bCryptPasswordEncoderPwd); + + // 비밀번호 인증 + // 인증성공 :: selectCnt = 1, 인증실패 :: selectCnt = 0 + if (result == true) { + deleteCnt = dao.noticeDeleteAction(notice_num); + } + + System.out.println("공지사항 삭제인증 deleteCnt : " + deleteCnt); + + model.addAttribute("pageNum", pageNum); + model.addAttribute("deleteCnt", deleteCnt); + } + + // 대출 상품 목록 + public void loanProductList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanProductList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanProductCnt(); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loanProducts = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loanProducts = dao.getLoanProductList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loanProducts", loanProducts); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // 대출 해지 목록 + public void loanCancelList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanCancelList()]"); + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanCancelCnt(); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loanProducts = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loanProducts = dao.getLoanCancelList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loanProducts", loanProducts); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // 대출 상품 검색 + public void searchLoanProductList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanProductList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + String keyword = (String) req.getParameter("keyword"); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getSearchLoanProductCnt(keyword); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loanProducts = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("keyword", keyword); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loanProducts = dao.searchLoanProductList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loanProducts", loanProducts); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + model.addAttribute("keyword", keyword); // keyword + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // 대출 상품 삭제 + public void loanProductDelete(HttpServletRequest req, Model model) { // 지은 + String loan_product_name = req.getParameter("loan_product_name"); + int deleteCnt = dao.loanProductDelete(loan_product_name); + model.addAttribute("deleteCnt", deleteCnt); + } + + // 대출 상품 수정 처리 + public void loanProductUpdateAction(HttpServletRequest req, Model model) { // 지은 + String loan_product_name = req.getParameter("loan_product_name"); + float loan_product_rate = (float) Double.parseDouble((String) req.getParameter("loan_product_rate")); + String loan_product_summary = req.getParameter("loan_product_summary"); + int loan_product_minPrice = Integer.parseInt((String) req.getParameter("loan_product_minPrice")); + long loan_product_maxPrice = Long.parseLong((String) req.getParameter("loan_product_maxPrice")); + int loan_product_minDate = Integer.parseInt((String) req.getParameter("loan_product_minDate")); + int loan_product_maxDate = Integer.parseInt((String) req.getParameter("loan_product_maxDate")); + int loan_product_bankCode = Integer.parseInt((String) req.getParameter("loan_product_bankCode")); + float loan_product_prepaymentRate = (float) Double + .parseDouble((String) req.getParameter("loan_product_prepaymentRate")); + String pre_loan_product_name = req.getParameter("pre_loan_product_name"); + + LoanProductVO l = new LoanProductVO(); + l.setLoan_product_name(loan_product_name); + l.setPre_loan_product_name(pre_loan_product_name); + l.setLoan_product_rate(loan_product_rate); + l.setLoan_product_summary(loan_product_summary); + l.setLoan_product_minPrice(loan_product_minPrice); + l.setLoan_product_maxPrice(loan_product_maxPrice); + l.setLoan_product_minDate(loan_product_minDate); + l.setLoan_product_maxDate(loan_product_maxDate); + l.setLoan_product_bankCode(loan_product_bankCode); + l.setLoan_product_prepaymentRate(loan_product_prepaymentRate); + + int updateCnt = dao.loanProductUpdate(l); + model.addAttribute("updateCnt", updateCnt); + } + + // 대출 상품 수정 폼 + public void loanProductUpdate(HttpServletRequest req, Model model) { // 지은 + LoanProductVO loanProduct = dao.getLoanProductInfo(req.getParameter("loan_product_name")); + model.addAttribute("loanProduct", loanProduct); + } + + // 대출 상품 등록 처리 + public void loanProductInsertAction(HttpServletRequest req, Model model) { // 지은 + String loan_product_name = req.getParameter("loan_product_name"); + float loan_product_rate = (float) Double.parseDouble((String) req.getParameter("loan_product_rate")); + String loan_product_summary = req.getParameter("loan_product_summary"); + int loan_product_minPrice = Integer.parseInt((String) req.getParameter("loan_product_minPrice")); + int loan_product_maxPrice = Integer.parseInt((String) req.getParameter("loan_product_maxPrice")); + int loan_product_minDate = Integer.parseInt((String) req.getParameter("loan_product_minDate")); + int loan_product_maxDate = Integer.parseInt((String) req.getParameter("loan_product_maxDate")); + int loan_product_bankCode = Integer.parseInt((String) req.getParameter("loan_product_bankCode")); + float loan_product_prepaymentRate = (float) Double + .parseDouble((String) req.getParameter("loan_product_prepaymentRate")); + + LoanProductVO l = new LoanProductVO(); + l.setLoan_product_name(loan_product_name); + l.setLoan_product_rate(loan_product_rate); + l.setLoan_product_summary(loan_product_summary); + l.setLoan_product_minPrice(loan_product_minPrice); + l.setLoan_product_maxPrice(loan_product_maxPrice); + l.setLoan_product_minDate(loan_product_minDate); + l.setLoan_product_maxDate(loan_product_maxDate); + l.setLoan_product_bankCode(loan_product_bankCode); + l.setLoan_product_prepaymentRate(loan_product_prepaymentRate); + + int insertCnt = dao.loanProductInsert(l); + model.addAttribute("insertCnt", insertCnt); + } + + // 대출 요청 목록 + public void loanRequestList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanRequestList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanRequestCnt(); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loans = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loans = dao.getLoanRequestList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loans", loans); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 대출 목록 + public void loanList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanCnt(); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loans = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loans = dao.getLoanList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loans", loans); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 대출 승인 + public void loanRequestAction(HttpServletRequest req, Model model) { // 지은 + Map map = new HashMap(); + map.put("loan_id", req.getParameter("loan_id")); + map.put("state", 2); // 승인 + int updateCnt = dao.loanRequestAction(map); + + LoanVO loan = dao.getLoanInfo(map); + map.put("account_id", loan.getAccount_id()); // 승인 + if (updateCnt == 1) { // 승인 완료 + dao.changeAccountState0(map); + + } + + model.addAttribute("updateCnt", updateCnt); + } + + // 대출 요청 목록 검색 + public void searchLoanRequestList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => searchLoanRequestList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + String keyword = (String) req.getParameter("keyword"); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getSearchLoanRequestCnt(keyword); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loans = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("keyword", keyword); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loans = dao.searchLoanRequestList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loans", loans); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + model.addAttribute("keyword", keyword); // keyword + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 대출 목록 검색 + public void searchLoanList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => searchLoanList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + String keyword = (String) req.getParameter("keyword"); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getSearchLoanCnt(keyword); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loans = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("keyword", keyword); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loans = dao.searchLoanList(map); + } + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 예금 상품 목록 - model.addAttribute("cnt", cnt); // 예금 상품 수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 번호 - model.addAttribute("search", search); // 검색어 - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 + model.addAttribute("loans", loans); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + model.addAttribute("keyword", keyword); // keyword + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 대출 거절 처리 + public void loanRefusalAction(HttpServletRequest req, Model model) { // 지은 + Map map = new HashMap(); + map.put("loan_id", req.getParameter("loan_id")); + map.put("state", 3); // 거절 + int updateCnt = dao.loanRequestAction(map); + model.addAttribute("updateCnt", updateCnt); + } + + // 은행별 img + public String getBankImg(int account_bankCode) { + // 은행코드 0(미기재) 1(국민) 2(우리) 3(농협) 4(신한) 5(하나) 6(코스모) + + String bankImg = ""; + switch (account_bankCode) { + case 1: + bankImg = "/bank/resources/images/bank/gookminicon.jpg"; + break; + + case 2: + bankImg = "/bank/resources/images/bank/uriicon.jpg"; + break; + + case 3: + bankImg = "/bank/resources/images/bank/nhicon.jpg"; + break; + + case 4: + bankImg = "/bank/resources/images/bank/shinhanicon.png"; + break; + + case 5: + bankImg = "/bank/resources/images/bank/hanaicon.jpg"; + break; + + case 6: + bankImg = "/bank/resources/images/bank/uriicon.jpg"; + break; + } + + return bankImg; } } diff --git a/src/main/java/com/spring/bank/customer/encrypt/UserDeniedHandler.java b/src/main/java/com/spring/bank/customer/encrypt/UserDeniedHandler.java index 7664603..cac887a 100644 --- a/src/main/java/com/spring/bank/customer/encrypt/UserDeniedHandler.java +++ b/src/main/java/com/spring/bank/customer/encrypt/UserDeniedHandler.java @@ -18,7 +18,7 @@ public void handle(HttpServletRequest request, HttpServletResponse response, request.setAttribute("errMsg", "관리자만 접근할 수 있는 페이지입니다."); - RequestDispatcher dispatcher = request.getRequestDispatcher("/WEB-INF/views/user/account/denied.jsp"); + RequestDispatcher dispatcher = request.getRequestDispatcher("/WEB-INF/views/common/denied.jsp"); dispatcher.forward(request, response); } diff --git a/src/main/java/com/spring/bank/product/vo/DepositProductVO.java b/src/main/java/com/spring/bank/product/vo/DepositProductVO.java index 3d57365..7fc01ea 100644 --- a/src/main/java/com/spring/bank/product/vo/DepositProductVO.java +++ b/src/main/java/com/spring/bank/product/vo/DepositProductVO.java @@ -106,6 +106,7 @@ public void setDeposit_product_minPrice(int deposit_product_minPrice) { this.deposit_product_minPrice = deposit_product_minPrice; } + public String getDeposit_product_explanation() { return deposit_product_explanation; } diff --git a/src/main/java/com/spring/bank/product/vo/FundProductVO.java b/src/main/java/com/spring/bank/product/vo/FundProductVO.java new file mode 100644 index 0000000..39d9e31 --- /dev/null +++ b/src/main/java/com/spring/bank/product/vo/FundProductVO.java @@ -0,0 +1,135 @@ +package com.spring.bank.product.vo; + +import java.util.Date; + +public class FundProductVO { + + private String fund_title; // 펀딩제목 + private String fund_content; // 펀딩 내용 + private String fund_summary; // 펀딩 상품 한줄 요약 + private Date fund_start_date; // 펀딩기간(시작) + private Date fund_end_date; // 펀딩기간(종료) + private int fund_goal_money; // 목표금액 + private String fund_category; // 펀딩종목 + private String fund_approve; // 펀딩승인 + private String fund_mem_name; // 등록자 이름 + private String fund_mem_hp; // 등록자 연락처 + private String fund_mem_email; // 등록자 이메일 + private int fund_bank_code; // 은행코드 + private String fund_account; // 모금계좌 + private String fund_filename; // 첨부파일 + + public String getFund_title() { + return fund_title; + } + + public void setFund_title(String fund_title) { + this.fund_title = fund_title; + } + + public String getFund_content() { + return fund_content; + } + + public void setFund_content(String fund_content) { + this.fund_content = fund_content; + } + + public String getFund_summary() { + return fund_summary; + } + + public void setFund_summary(String fund_summary) { + this.fund_summary = fund_summary; + } + + public Date getFund_start_date() { + return fund_start_date; + } + + public void setFund_start_date(Date fund_start_date) { + this.fund_start_date = fund_start_date; + } + + public Date getFund_end_date() { + return fund_end_date; + } + + public void setFund_end_date(Date fund_end_date) { + this.fund_end_date = fund_end_date; + } + + public int getFund_goal_money() { + return fund_goal_money; + } + + public void setFund_goal_money(int fund_goal_money) { + this.fund_goal_money = fund_goal_money; + } + + public String getFund_category() { + return fund_category; + } + + public void setFund_category(String fund_category) { + this.fund_category = fund_category; + } + + public String getFund_approve() { + return fund_approve; + } + + public void setFund_approve(String fund_approve) { + this.fund_approve = fund_approve; + } + + public String getFund_mem_name() { + return fund_mem_name; + } + + public void setFund_mem_name(String fund_mem_name) { + this.fund_mem_name = fund_mem_name; + } + + public String getFund_mem_hp() { + return fund_mem_hp; + } + + public void setFund_mem_hp(String fund_mem_hp) { + this.fund_mem_hp = fund_mem_hp; + } + + public String getFund_mem_email() { + return fund_mem_email; + } + + public void setFund_mem_email(String fund_mem_email) { + this.fund_mem_email = fund_mem_email; + } + + public int getFund_bank_code() { + return fund_bank_code; + } + + public void setFund_bank_code(int fund_bank_code) { + this.fund_bank_code = fund_bank_code; + } + + public String getFund_account() { + return fund_account; + } + + public void setFund_account(String fund_account) { + this.fund_account = fund_account; + } + + public String getFund_filename() { + return fund_filename; + } + + public void setFund_filename(String fund_filename) { + this.fund_filename = fund_filename; + } + + +} diff --git a/src/main/java/com/spring/bank/product/vo/IrpProductVO.java b/src/main/java/com/spring/bank/product/vo/IrpProductVO.java new file mode 100644 index 0000000..0e21572 --- /dev/null +++ b/src/main/java/com/spring/bank/product/vo/IrpProductVO.java @@ -0,0 +1,90 @@ +package com.spring.bank.product.vo; + +import java.util.Date; + +//연금 상품 +public class IrpProductVO { + + private String irp_product_name; // 연금상품이름 + private String irp_product_summary; // 연금상품한줄요약 + private Date irp_product_date; // 연금등록일 + private float irp_product_interRate; // 연금금리 + private int irp_product_expiryTerm; //연금 납입기간 + private String irp_product_explanation; // 연금설명 + private String irp_product_notice; // 유의사항 + private int irp_product_money; //연금 금액 + private int irp_product_bankCode; // 은행코드 + + public String getIrp_product_name() { + return irp_product_name; + } + + public void setIrp_product_name(String irp_product_name) { + this.irp_product_name = irp_product_name; + } + + public String getIrp_product_summary() { + return irp_product_summary; + } + + public void setIrp_product_summary(String irp_product_summary) { + this.irp_product_summary = irp_product_summary; + } + + public Date getIrp_product_date() { + return irp_product_date; + } + + public void setIrp_product_date(Date irp_product_date) { + this.irp_product_date = irp_product_date; + } + + public float getIrp_product_interRate() { + return irp_product_interRate; + } + + public void setIrp_product_interRate(float irp_product_interRate) { + this.irp_product_interRate = irp_product_interRate; + } + + public int getIrp_product_expiryTerm() { + return irp_product_expiryTerm; + } + + public void setIrp_product_expiryTerm(int irp_product_expiryTerm) { + this.irp_product_expiryTerm = irp_product_expiryTerm; + } + + public String getIrp_product_explanation() { + return irp_product_explanation; + } + + public void setIrp_product_explanation(String irp_product_explanation) { + this.irp_product_explanation = irp_product_explanation; + } + + public String getIrp_product_notice() { + return irp_product_notice; + } + + public void setIrp_product_notice(String irp_product_notice) { + this.irp_product_notice = irp_product_notice; + } + + public int getIrp_product_money() { + return irp_product_money; + } + + public void setIrp_product_money(int irp_product_money) { + this.irp_product_money = irp_product_money; + } + + public int getIrp_product_bankCode() { + return irp_product_bankCode; + } + + public void setIrp_product_bankCode(int irp_product_bankCode) { + this.irp_product_bankCode = irp_product_bankCode; + } + +} diff --git a/src/main/java/com/spring/bank/product/vo/LoanProductVO.java b/src/main/java/com/spring/bank/product/vo/LoanProductVO.java new file mode 100644 index 0000000..fdd8cfc --- /dev/null +++ b/src/main/java/com/spring/bank/product/vo/LoanProductVO.java @@ -0,0 +1,96 @@ +package com.spring.bank.product.vo; + +import java.sql.Date; + +public class LoanProductVO { + private String loan_product_name; + private float loan_product_rate; + private String loan_product_summary; + private int loan_product_minPrice; + private long loan_product_maxPrice; + private int loan_product_minDate; + private int loan_product_maxDate; + private int loan_product_bankCode; + private Date loan_product_baseDate; + private float loan_product_prepaymentRate; + + private String pre_loan_product_name; // pk가 얘라서 수정할때 where절로 이전 pk값을 찾아줘야함 + + public String getLoan_product_name() { + return loan_product_name; + } + public void setLoan_product_name(String loan_product_name) { + this.loan_product_name = loan_product_name; + } + public float getLoan_product_rate() { + return loan_product_rate; + } + public void setLoan_product_rate(float loan_product_rate) { + this.loan_product_rate = loan_product_rate; + } + public String getLoan_product_summary() { + return loan_product_summary; + } + public void setLoan_product_summary(String loan_product_summary) { + this.loan_product_summary = loan_product_summary; + } + public int getLoan_product_minPrice() { + return loan_product_minPrice; + } + public void setLoan_product_minPrice(int loan_product_minPrice) { + this.loan_product_minPrice = loan_product_minPrice; + } + public long getLoan_product_maxPrice() { + return loan_product_maxPrice; + } + public void setLoan_product_maxPrice(long loan_product_maxPrice) { + this.loan_product_maxPrice = loan_product_maxPrice; + } + public int getLoan_product_minDate() { + return loan_product_minDate; + } + public void setLoan_product_minDate(int loan_product_minDate) { + this.loan_product_minDate = loan_product_minDate; + } + public int getLoan_product_maxDate() { + return loan_product_maxDate; + } + public void setLoan_product_maxDate(int loan_product_maxDate) { + this.loan_product_maxDate = loan_product_maxDate; + } + public int getLoan_product_bankCode() { + return loan_product_bankCode; + } + public void setLoan_product_bankCode(int loan_product_bankCode) { + this.loan_product_bankCode = loan_product_bankCode; + } + public Date getLoan_product_baseDate() { + return loan_product_baseDate; + } + public void setLoan_product_baseDate(Date loan_product_baseDate) { + this.loan_product_baseDate = loan_product_baseDate; + } + public float getLoan_product_prepaymentRate() { + return loan_product_prepaymentRate; + } + public void setLoan_product_prepaymentRate(float loan_product_prepaymentRate) { + this.loan_product_prepaymentRate = loan_product_prepaymentRate; + } + @Override + public String toString() { + return "LoanProductVO [loan_product_name=" + loan_product_name + ", loan_product_rate=" + loan_product_rate + + ", loan_product_summary=" + loan_product_summary + ", loan_product_minPrice=" + loan_product_minPrice + + ", loan_product_maxPrice=" + loan_product_maxPrice + ", loan_product_minDate=" + loan_product_minDate + + ", loan_product_maxDate=" + loan_product_maxDate + ", loan_product_bankCode=" + loan_product_bankCode + + ", loan_product_baseDate=" + loan_product_baseDate + ", loan_product_prepaymentRate=" + + loan_product_prepaymentRate + "]"; + } + public String getPre_loan_product_name() { + return pre_loan_product_name; + } + public void setPre_loan_product_name(String pre_loan_product_name) { + this.pre_loan_product_name = pre_loan_product_name; + } + + +} diff --git a/src/main/java/com/spring/bank/product/vo/SavingProductVO.java b/src/main/java/com/spring/bank/product/vo/SavingProductVO.java new file mode 100644 index 0000000..65c4258 --- /dev/null +++ b/src/main/java/com/spring/bank/product/vo/SavingProductVO.java @@ -0,0 +1,110 @@ +package com.spring.bank.product.vo; + +import java.sql.Date; + +public class SavingProductVO { + + private String saving_product_name; // 적금 상품 이름 + private String saving_product_summary; // 적금 상품 한줄 요약 + private Date saving_product_date; // // 적금 등록일 + private float saving_product_interRate; // 금리 + private int saving_product_type; // 적금 과목 + private int saving_product_maxDate; // 최대 적금 기간 + private int saving_product_minDate; // 최소 적금 기간 + private int saving_product_minPrice; // 최소 금액 + private String saving_product_explanation; // 적금 상품 설명 + private String saving_product_notice; // 유의사항 + private int saving_product_bankCode; // 은행코드 + + public SavingProductVO() {} + + public String getSaving_product_name() { + return saving_product_name; + } + + public void setSaving_product_name(String saving_product_name) { + this.saving_product_name = saving_product_name; + } + + public String getSaving_product_summary() { + return saving_product_summary; + } + + public void setSaving_product_summary(String saving_product_summary) { + this.saving_product_summary = saving_product_summary; + } + + public Date getSaving_product_date() { + return saving_product_date; + } + + public void setSaving_product_date(Date saving_product_date) { + this.saving_product_date = saving_product_date; + } + + public float getSaving_product_interRate() { + return saving_product_interRate; + } + + public void setSaving_product_interRate(float saving_product_interRate) { + this.saving_product_interRate = saving_product_interRate; + } + + public int getSaving_product_type() { + return saving_product_type; + } + + public void setSaving_product_type(int saving_product_type) { + this.saving_product_type = saving_product_type; + } + + public int getSaving_product_maxDate() { + return saving_product_maxDate; + } + + public void setSaving_product_maxDate(int saving_product_maxDate) { + this.saving_product_maxDate = saving_product_maxDate; + } + + public int getSaving_product_minDate() { + return saving_product_minDate; + } + + public void setSaving_product_minDate(int saving_product_minDate) { + this.saving_product_minDate = saving_product_minDate; + } + + public int getSaving_product_minPrice() { + return saving_product_minPrice; + } + + public void setSaving_product_minPrice(int saving_product_minPrice) { + this.saving_product_minPrice = saving_product_minPrice; + } + + public String getSaving_product_explanation() { + return saving_product_explanation; + } + + public void setSaving_product_explanation(String saving_product_explanation) { + this.saving_product_explanation = saving_product_explanation; + } + + public String getSaving_product_notice() { + return saving_product_notice; + } + + public void setSaving_product_notice(String saving_product_notice) { + this.saving_product_notice = saving_product_notice; + } + + public int getSaving_product_bankCode() { + return saving_product_bankCode; + } + + public void setSaving_product_bankCode(int saving_product_bankCode) { + this.saving_product_bankCode = saving_product_bankCode; + } + + +} diff --git a/src/main/java/com/spring/bank/restapi/RestController.java b/src/main/java/com/spring/bank/restapi/RestController.java deleted file mode 100644 index f5581df..0000000 --- a/src/main/java/com/spring/bank/restapi/RestController.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.spring.bank.restapi; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -@ResponseBody -@RequestMapping("customer") -public class RestController { - - private static final Logger logger = LoggerFactory.getLogger(RestController.class); - - - - -} diff --git a/src/main/java/com/spring/bank/user/contoller/CustomerController.java b/src/main/java/com/spring/bank/user/contoller/CustomerController.java index dd29c19..718f57a 100644 --- a/src/main/java/com/spring/bank/user/contoller/CustomerController.java +++ b/src/main/java/com/spring/bank/user/contoller/CustomerController.java @@ -5,6 +5,7 @@ import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; +import java.text.ParseException; import java.util.HashMap; import java.util.Map; import java.util.Random; @@ -12,6 +13,7 @@ import javax.inject.Inject; import javax.mail.internet.MimeMessage; import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; import org.json.simple.JSONObject; import org.slf4j.Logger; @@ -25,123 +27,153 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; +import com.siot.IamportRestClient.IamportClient; +import com.siot.IamportRestClient.response.AccessToken; +import com.siot.IamportRestClient.response.IamportResponse; import com.spring.bank.user.service.CustomerServiceImpl; @Controller + @RequestMapping("customer") public class CustomerController { private static final Logger logger = LoggerFactory.getLogger(CustomerController.class); - + @Autowired private CustomerServiceImpl service; - + @Inject private JavaMailSender javaMailSender; + + + private IamportClient api = new IamportClient("imp_apikey", "ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f"); // main 화면(크롤링, 지호) @RequestMapping("index.do") public String home(HttpServletRequest req, Model model) { System.out.println("url ==> index"); - //service.exchanges(req, model); + // service.exchanges(req, model); + + // 로그인 시 계좌 불러오기 + String member_id = (String) req.getSession().getAttribute("customerID"); + if(member_id != null) { + service.accountLoad(req, model); + } + return "index"; } // 회원가입 페이지 @RequestMapping("register.do") public String register(HttpServletRequest req, Model model) { - + + return "customer/account/register"; } - + // 회원가입 중복확인 페이지 confirmId.do @ResponseBody - @RequestMapping(value="confirmId.do", method= {RequestMethod.GET, RequestMethod.POST}) + @RequestMapping(value = "confirmId.do", method = { RequestMethod.GET, RequestMethod.POST }) public int confirId(HttpServletRequest req, Model model) { System.out.println("[url => confirId]"); - + String member_id = req.getParameter("member_id"); - + System.out.println(member_id); - + Map map = new HashMap(); map.put("member_id", member_id); + + return service.confirmIdAction(map); + } + + // 회원가입 본인인증 토큰생성 + @ResponseBody + @RequestMapping(value="getToken.do", method= {RequestMethod.POST}) + public IamportResponse getToken(HttpSession session, Model model) throws Exception { + System.out.println("[url => getToken.do]"); - - return service.confirmIdAction(map); + return api.getAuth(); } - // 회원본인인증 - @RequestMapping(value="authResult.do", method= {RequestMethod.GET, RequestMethod.POST}) - public String callAPIhttp(HttpServletRequest req, Model model) throws Exception { - System.out.println("[url => authResult]"); - logger.info("[url => authResult]"); + // 회원가입 본인인증 후 결과 조회 및 삭제 + @ResponseBody + @RequestMapping(value="certifications.do", method= {RequestMethod.GET}) + public String certifications(HttpServletRequest req, HttpSession session, Model model) throws Exception { + System.out.println("[url => certifications]"); + logger.info("[url => certifications]"); StringBuffer result = new StringBuffer(); - + req.setCharacterEncoding("UTF-8"); - String code = req.getParameter("code"); - - String urlstr = "https://testapi.openbanking.or.kr/oauth/2.0/token?" + // 클라이언트가 요청을 보낼 서버의 URL 주소 - "code="+ code +"&" + - "client_id=072579e4-c1b5-4ad1-a6a4-78c69cab659c&" + - "client_secret=6e5b6b5d-4aa9-4a53-90a0-deeb196c10ee&" + - "redirect_uri=http://localhost/bank/customer/authResult.do&" + - "grant_type=authorization_code"; - - URL url = new URL(urlstr); - HttpURLConnection urlconnection = (HttpURLConnection) url.openConnection(); - urlconnection.setRequestMethod("POST"); - - BufferedReader br = new BufferedReader(new InputStreamReader(urlconnection.getInputStream(), "UTF-8")); - - String returnLine; - - while((returnLine = br.readLine()) != null) { - result.append(returnLine); - System.out.println(br.readLine()); - } - - urlconnection.disconnect(); - - System.out.println(result.toString()); - - req.setAttribute("json", result); - - return "customer/account/authToken"; - } - - // 회원가입 본인인증 페이지 - @RequestMapping("certifications.do") - public String certifications(HttpServletRequest req, Model model) { - - - return "customer/account/certifications"; + // ajax 에서 받아온 값 + String imp_uid = req.getParameter("imp_uid"); + String access_token = req.getParameter("access_token"); + + String urlstr = "https://api.iamport.kr/certifications/" + imp_uid + + "?_token=" + access_token; // 클라이언트가 요청을 보낼 서버의 URL 주소 + + URL url = new URL(urlstr); + HttpURLConnection urlconnection = (HttpURLConnection) url.openConnection(); + // get 방식으로 전송 + urlconnection.setRequestMethod("GET"); + + BufferedReader br = new BufferedReader(new InputStreamReader(urlconnection.getInputStream(), "UTF-8")); + + String returnLine; + + while((returnLine = br.readLine()) != null) { + result.append(returnLine); + System.out.println(br.readLine()); + } + + urlconnection.disconnect(); + + System.out.println(result.toString()); + + + req.setAttribute("json", result); + + return result.toString(); + } - + // 회원가입 본인인증 토큰생성 + @ResponseBody + @RequestMapping(value="duplicate.do", method= {RequestMethod.POST}) + public int duplicate(HttpServletRequest req, Model model) throws Exception { + System.out.println("[url => duplicate]"); + + String unique_key = req.getParameter("unique_key"); + + Map map = new HashMap(); + map.put("unique_key", unique_key); + + return service.duplicateAction(map); + } + // 회원가입 처리 페이지 @RequestMapping("registerAction.do") public String registerAction(HttpServletRequest req, Model model) { - + service.registerAction(req, model); - + return "customer/account/registerAction"; } - - // 회원가입 성공 + + // 회원가입 성공 @RequestMapping("mainSuccess.do") public String mainSuccess(HttpServletRequest req, Model model) { - + // mainSuccess.do?insertCnt=" + cnt int cnt = Integer.parseInt(req.getParameter("selectCnt")); req.setAttribute("selectCnt", cnt); - + return "customer/account/login"; } - + // 이메일 인증 처리 @ResponseBody @RequestMapping(value = "usermailCheck.do", method = RequestMethod.POST) @@ -150,9 +182,9 @@ public String usermailSending(HttpServletRequest req, Model model) throws IOExce Random r = new Random(); int dice = r.nextInt(4589362) + 49311; // 이메일로 받는 인증코드 부분 (난수) String setfrom = "xkrrhsdl7@gmail.com"; // 전송자 이메일 - + String toEmail = req.getParameter("userEmail"); // 받는 사람 이메일 - + System.out.println("email : " + toEmail); String title = "[본인인증]KOSMO BANK 회원가입 인증 이메일입니다."; // 제목 String content = @@ -195,114 +227,96 @@ public String usermailSending(HttpServletRequest req, Model model) throws IOExce return jo.toJSONString(); } - + // 로그인 페이지 @RequestMapping("login") public String loginform(HttpServletRequest req, Model model) { System.out.println("url==>login"); logger.info("url ==> login"); - + return "/customer/account/login"; } - - /* - * // 로그인 처리 - * - * @RequestMapping("loginAction") public String loginAction(HttpServletRequest - * req, Model model) { logger.info("url ==> loginAction"); - * - * service.loginAction(req, model); - * - * return "customer/account/login"; } - */ - + // 로그아웃 페이지 @RequestMapping("logoutAction.do") public String logout(HttpServletRequest req, Model model) { System.out.println("url ==> logout"); logger.info("url ==> logout"); - + return "customer/account/logOutAction"; } - + // 회원탈퇴 확인 팝업 @RequestMapping("deleteCustomer") public String deletecustomer(HttpServletRequest req, Model model) { logger.info("[url ==> /deletecustomer.us]"); - - - + // 이동할 페이지 return "/customer/account/deletecustomer"; } - + // 회원탈퇴 처리 @RequestMapping("deleteCustomerAction") public String deletecustomerAction(HttpServletRequest req, Model model) { logger.info("[url ==> /deletecustomerAction.us]"); - + service.deleteCustomerAction(req, model); - + // 이동할 페이지 - return "/customer/account/deletecustomerAction"; + return "/customer/account/deletecustomerAction"; } - - + // 회원수정 인증 페이지 @RequestMapping("customerUpdate") public String customerUpdate(HttpServletRequest req, Model model) { logger.info("[url ==> /customerUpdate.us]"); - - - + // 이동할 페이지 return "/customer/account/customerUpdate"; } - - + // 회원수정 인증 처리 후 수정 페이지 @RequestMapping("customerDetailAction") public String customerDetailAction(HttpServletRequest req, Model model) { - + logger.info("[url ==> /customerDetailAction]"); - + service.modifyDetailAction(req, model); - + // 이동할 페이지 return "/customer/account/customerDetailAction"; } - + // 회원수정 처리 페이지 @RequestMapping("customerUpdateAction") public String customerUpdateAction(HttpServletRequest req, Model model) { - + logger.info("[url ==> /customerUpdateAction.us]"); - + service.modifyCustomerAction(req, model); - - + // 이동할 페이지 return "/customer/account/customerUpdateAction"; } - + // 마이페이지(탁곤) @RequestMapping("myPage") public String mypage(HttpServletRequest req, Model model) { System.out.println("url ==> mypage"); logger.info("url ==> mypage"); - + return "customer/myPage"; } - + // 아이디 찾기 페이지(탁곤) @RequestMapping("idFind.do") public String idFind(HttpServletRequest req, Model model) { System.out.println("url ==> idFind.do"); logger.info("url ==> idFind.do"); - + return "customer/account/idFind"; } - + // 아이디 찾기 액션(탁곤) @RequestMapping("idFindAction.do") public String idFindAction(HttpServletRequest req, Model model) { @@ -311,16 +325,16 @@ public String idFindAction(HttpServletRequest req, Model model) { service.idFindAction(req, model); return "customer/account/idFindAction"; } - + // 비밀번호 찾기 페이지(탁곤) @RequestMapping("pwFind.do") public String pwFind(HttpServletRequest req, Model model) { System.out.println("url ==> pwFind.do"); logger.info("url ==> pwFind.do"); - + return "customer/account/pwFind"; } - + // 비밀번호 찾기 액션(탁곤) @RequestMapping("pwFindAction.do") public String pwFindAction(HttpServletRequest req, Model model) { @@ -328,58 +342,234 @@ public String pwFindAction(HttpServletRequest req, Model model) { logger.info("url ==> pwFindAction.do"); service.pwFindAction(req, model); return "customer/account/pwFindAction"; - } - - //예금 상품 조회(지현) depositList + } + + // 예금 상품 조회(지현) depositList @RequestMapping("depositList.do") public String depositList(HttpServletRequest req, Model model) { logger.info("url => depositList"); - + service.depositList(req, model); - + return "customer/depositProduct/depositList"; } - - //예금상품검색(지현) + + // 예금상품검색(지현) @RequestMapping("depositProductSearch.do") public String depositProductSearch(HttpServletRequest req, Model model) { System.out.println("[url ==> /depositProductSearch]"); service.searchDepositProduct(req, model); return "customer/depositProduct/depositProductSearch"; } - - //예금 상품 상세 보기 (지현) + + // 예금 상품 상세 보기 (지현) @RequestMapping("depositDetail.do") public String depositDetail(HttpServletRequest req, Model model) { logger.info("url => depositDetail"); - + service.depositDetail(req, model); - + return "customer/depositProduct/depositDetail"; } + + //예금 상품 상세에서 신청하기 누르면 신청 화면 (지현) + @RequestMapping("depositProductJoin") + public String depositProductInsert(HttpServletRequest req, Model model) { + logger.info("url => depositProductJoin"); + + service.setDepositProductJoin(req, model); + + return "customer/depositProduct/depositProductJoin"; + } - //예금 상품 신청(지현) + //예금 상품 신청 화면에서 확인 눌렀을때 -> account 계좌 생성 & deposit 테이블에 insert(지현) @RequestMapping("depositProductAction") - public String depositProductInsert(HttpServletRequest req, Model model) { - logger.info("url => depositProductInsert"); + public String depositAccess(HttpServletRequest req, Model model) { + logger.info("url => depositAccess"); + + //계좌개설 insert account + service.makeAccount(req, model); + + System.out.println("계좌 개설 후 예금 테이블 insert service go ======"); + + //예금 상품 insert + service.insertDeposit(req, model); + + return "customer/depositProduct/depositAction"; + } + + //연금 상품 목록 (지현) + @RequestMapping("irpProductList.do") + public String irpProductList(HttpServletRequest req, Model model) { + logger.info("url => irpProductList"); - service.insertDeposit(req, model); + service.irpList(req, model); + + return "customer/irp/irpProductList"; + } + + //연금 상품검색(지현) - 고객 + @RequestMapping("irpProductSearch.do") + public String irpProductSearch(HttpServletRequest req, Model model) { + System.out.println("[url ==> /irpProductSearch]"); - return "customer/depositProduct/depositProductAction"; + service.irpProductSearch(req, model); + + return "customer/irp/irpProductSearch"; + } + + //연금 상품 상세 보기 (지현) -고객 + @RequestMapping("irpDetail.do") + public String irpDetail(HttpServletRequest req, Model model) { + logger.info("url => irpDetail"); + + service.irpDetail(req, model); + + return "customer/irp/irpDetail"; + } + + //연금 상품 신청화면(지현) - 고객 + @RequestMapping("irpProductJoin") + public String irpProductAction(HttpServletRequest req, Model model) { + logger.info("url => irpProductJoin"); + + service.irpProductJoin(req, model); + + return "customer/irp/irpProductJoin"; + } + + //연금 상품 신청 화면에서 확인 눌렀을때 -> account 계좌 생성 & irp 테이블에 insert(지현) + @RequestMapping("irpProductAction") + public String irpAccess(HttpServletRequest req, Model model) { + logger.info("url => irpProductAction"); + + //계좌개설 insert account + service.makeAccount(req, model); + + System.out.println("계좌 개설 후 예금 테이블 insert service go ======"); + + //연금 상품 insert + service.insertIrp(req, model); + + return "customer/irp/irpAction"; + } + + + //적금 상품 조회(지호) - 고객 + @RequestMapping("savingList") + public String savingList(HttpServletRequest req, Model model) { + logger.info("url => savingList"); + + service.savingList(req, model); + + return "customer/savingProduct/savingList"; + } + + //적금 상품검색(지호) - 고객 + @RequestMapping("savingProductSearch") + public String savingProductSearch(HttpServletRequest req, Model model) { + System.out.println("[url ==> /savingProductSearch]"); + service.savingProductSearch(req, model); + return "customer/savingProduct/savingProductSearch"; + } + + //적금 상품 상세 보기 (지호) -고객 + @RequestMapping("savingDetail") + public String savingDetail(HttpServletRequest req, Model model) { + logger.info("url => savingDetail"); + + service.savingDetail(req, model); + + return "customer/savingProduct/savingDetail"; + } + + //적금 상품 신청(지호) + @RequestMapping("savingProductInsert") + public String savingProductInsert(HttpServletRequest req, Model model) { + logger.info("url => savingProductInsert"); + + service.savingProductAction(req, model); + + return "customer/savingProduct/savingProductJoin"; + } + + // 적금 상품 신청 처리(지호) 해야함 + @RequestMapping("savingProductAction") + public String savingProductAction(HttpServletRequest req, Model model) { + logger.info("url => savingProductAction"); + + return "customer/savingProduct/savingProductAction"; + } + + //예금 상품 상세에서 신청하기 누르면 신청 화면 (지현) +// @RequestMapping("depositProductJoin") +// public String depositProductInsert(HttpServletRequest req, Model model) { +// logger.info("url => depositProductJoin"); +// +// service.setDepositProductJoin(req, model); +// +// return "customer/depositProduct/depositProductJoin"; +// } + + // + // 펀드 상품 조회(지호) - 고객 + @RequestMapping("fundList") + public String fundList(HttpServletRequest req, Model model) { + logger.info("url => fundList"); + + service.fundList(req, model); + + return "customer/fundProduct/fundList"; + } + + // 펀드 상품검색(지호) - 고객 + @RequestMapping("fundProductSearch") + public String fundProductSearch(HttpServletRequest req, Model model) { + System.out.println("[url ==> /fundProductSearch]"); + service.fundProductSearch(req, model); + return "customer/fundProduct/fundProductSearch"; + } + + // 펀드 상품 상세 보기 (지호) -고객 + @RequestMapping("fundDetail") + public String fundDetail(HttpServletRequest req, Model model) { + logger.info("url => savingDetail"); + + service.fundDetail(req, model); + + return "customer/fundProduct/fundDetail"; + } + + // 펀드 상품 신청(지호) + @RequestMapping("fundProductInsert") + public String fundProductInsert(HttpServletRequest req, Model model) { + logger.info("url => fundProductInsert"); + + service.fundProductAction(req, model); + + return "customer/fundProduct/fundProductInsert"; + } + + // 펀드 상품 신청 처리(지호) 해야함 + @RequestMapping("fundProductAction") + public String fundProductAction(HttpServletRequest req, Model model) { + logger.info("url => fundProductAction"); + + return "customer/fundProduct/fundProductAction"; } //qna 게시판(지현) @RequestMapping("qnaList") public String qnaList(HttpServletRequest req, Model model) { logger.info("url => qnaList"); - - //회원qna리스트 출력 메서드 service + + // 회원qna리스트 출력 메서드 service service.inquiryList(req, model); - + return "customer/qna/qnaList"; } - - //qna 작성 게시판 (지현) + + // qna 작성 게시판 (지현) @RequestMapping("qnaWrite") public String qnaWrite(HttpServletRequest req, Model model) { logger.info("url => qnaWrite"); @@ -402,114 +592,435 @@ public String qnaWrite(HttpServletRequest req, Model model) { req.setAttribute("inquiry_id", inquiry_id); req.setAttribute("pageNum", pageNum); req.setAttribute("inquiry_ref", inquiry_ref); - + return "customer/qna/qnaWrite"; } - - //qna 작성 처리페이지(지현) + + // qna 작성 처리페이지(지현) @RequestMapping("qnaWriteAction") public String qnaWriteAction(HttpServletRequest req, Model model) { logger.info("url => qnaWriteAction"); - + service.inquiryWriteAction(req, model); - + return "customer/qna/qnaWriteAction"; } - - //qna 상세보기 (지현) + + // qna 상세보기 (지현) @RequestMapping("qnaDetail") public String qnaDetail(HttpServletRequest req, Model model) { logger.info("url => qnaDetail"); - + service.InquiryDetailAction(req, model); - + return "customer/qna/qnaDetail"; } - - //qna 비밀번호 check(지현) + + // qna 비밀번호 check(지현) @RequestMapping("qnaModifyCheck") public String qnaModifyCheck(HttpServletRequest req, Model model) { logger.info("url => qnaModifyCheck"); - + int inquiry_id = Integer.parseInt(req.getParameter("inquiry_id")); int pageNum = Integer.parseInt(req.getParameter("pageNum")); - - //4단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + + // 4단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 req.setAttribute("inquiry_id", inquiry_id); req.setAttribute("pageNum", pageNum); - + return "customer/qna/qnaModifyCheck"; } - - //qna 수정 상세 페이지 (지현) + + // qna 수정 상세 페이지 (지현) @RequestMapping("qnaModifyDetail") public String qnaModifyDetail(HttpServletRequest req, Model model) { logger.info("url => qnaModifyDetail"); - + service.InquiryModifyDetailAction(req, model); - + return "customer/qna/qnaModifyDetail"; - + } - - //수정비밀번호 (지현) + + // 수정비밀번호 (지현) @RequestMapping("qnaConfirm") public String qnaConfirm(HttpServletRequest req, Model model) { - + service.QnaPasswordConfirm(req, model); - + return "customer/qna/qnaConfirm"; } - - //qna 수정 처리 페이지 (지현) + + // qna 수정 처리 페이지 (지현) @RequestMapping("qnaModifyAction") public String qnaModifyAction(HttpServletRequest req, Model model) { logger.info("url => qnaModifyAction"); - + service.inquiryModifyAction(req, model); - + return "customer/qna/qnaModifyAction"; } - - - //삭제 처리 (지현) + + // 삭제 처리 (지현) @RequestMapping("qnaDeleteAction") public String qnaDeleteAction(HttpServletRequest req, Model model) { logger.info("url => qnaDeleteAction"); - + service.inquiryDelete(req, model); - + return "customer/qna/qnaDeleteAction"; } - - //자주묻는 질문 (지현) + + // 자주묻는 질문 (지현) @RequestMapping("faqList.do") public String faqList(HttpServletRequest req, Model model) { logger.info("url => faqList"); - + service.faqList(req, model); - + return "customer/qna/faqList"; } - // 환율 리스트 출력(지호) @RequestMapping("exchangeList.do") public String exchangeList(HttpServletRequest req, Model model) { System.out.println("url ==> exchangeList.do"); - + service.exchangeList(req, model); - + return "exchangeList"; } - + // 환전하기 (지호) @RequestMapping("exchange.do") public String exchange(HttpServletRequest req, Model model) { System.out.println("url ==> exchange.do"); - + return "exchange"; - } + } + + // 회원 이체(계좌 찾기)(유성) + @RequestMapping("transfer") + public String transfer(HttpServletRequest req, Model model) { + System.out.println("ulr ==> transfer"); + logger.info("url ==> transfer"); + + service.getAccount(req, model); + + return "customer/bank/transfer"; + } + + // 회원 이체(계좌 비밀번호 인증)(유성) + @RequestMapping("account_confirm") + public String account_password(HttpServletRequest req, Model model) { + System.out.println("ulr ==> account_confirm"); + logger.info("url ==> account_confirm"); + + // service.accountPwdConfirm(req, model); + + return "customer/bank/account_confirm"; + } + + //!!!!!!!!!!지은!!!!!!!!!!! + + + // 대출 상환 목록 + @RequestMapping("loanHistoryList.do") + public String loanHistoryList(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanHistoryList]"); + //service.loanHistoryList(req, model); + return "customer/loan/loanHistoryList"; + } + + // 대출중인 상품 목록 + @RequestMapping("loanAccountList.do") + public String loanAccountList(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanAccountList]"); + service.loanList(req, model); + return "customer/loan/loanAccountList"; + } + + // 대출 계좌 거래내역 + @RequestMapping("loanAccountDetail.do") + public String loanAccountDetail(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanAccountDetail]"); + return "customer/loan/loanAccountDetail"; + } + + // 대출 해지 목록 + @RequestMapping("loanCancelList.do") + public String loanCancelList(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanCancelList]"); + service.loanCancelList(req, model); + return "customer/loan/loanCancelList"; + } + + // 대출 해지 처리 + @RequestMapping("loanCancelAction.do") + public String loanCancelAction(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanCancelAction]"); + service.loanAccountCancelAction(req, model); + return "customer/loan/loanCancelAction"; + } + + // 대출 해지 상세 + @RequestMapping("loanCancelDetail.do") + public String loanCancelDetail(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanCancelDetail]"); + return "customer/loan/loanCancelDetail"; + } + + // 대출 자동이체 + @RequestMapping("loanDirectDebit.do") + public String loanDirectDebit(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanDirectDebit]"); + return "customer/loan/loanDirectDebit"; + } + + // 대출 원금 목록 + @RequestMapping("loanPrincipalList.do") + public String loanPrincipalList(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanPrincipalList]"); + return "customer/loan/loanPrincipalList"; + } + + // 대출 상환 상세 + @RequestMapping("loanPrincipalRateList.do") + public String loanPrincipalRateList(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanPrincipalRateList]"); + service.loanPrincipalRateList(req, model); + return "customer/loan/loanPrincipalRateList"; + } + + // 대출 원금 상세 + @RequestMapping("loanPrincipalDetail.do") + public String loanPrincipalDetail(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanPrincipalDetail]"); + return "customer/loan/loanPrincipalDetail"; + } + + // 대출 원금 납부 + @RequestMapping("loanPrincipalRatePayment.do") + public String loanPrincipalRatePayment(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanPrincipalRatePayment]"); + service.loanPaymentDetail(req, model); + return "customer/loan/loanPrincipalRatePayment"; + } + + // 대출 원금 납부 + @RequestMapping("loanPaymentAction.do") + public String loanPaymentAction(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanPaymentAction]"); + service.loanPaymentAction(req, model); + return "customer/loan/loanPaymentAction"; + } + + // 대출 원금 납부 + @RequestMapping("loanPrincipalPayment.do") + public String loanPrincipalPayment(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanPrincipalPayment]"); + return "customer/loan/loanPrincipalPayment"; + } + + // 대출 이자 목록 + @RequestMapping("loanRateList.do") + public String loanRateList(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanRateList]"); + return "customer/loan/loanRateList"; + } + + // 대출 이자 상세 + @RequestMapping("lo" + + "anRateDetail.do") + public String loanRateDetail(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanRateDetail]"); + return "customer/loan/loanRateDetail"; + } + + // 대출 이자 납부 + @RequestMapping("loanRatePayment.do") + public String loanRatePayment(HttpServletRequest req, Model model) { + logger.info("[url ==> /loanRatePayment]"); + return "customer/loan/loanRatePayment"; + } + + // 대출 상품 목록 + @RequestMapping("newLoanList.do") + public String newLoanList(HttpServletRequest req, Model model) { + logger.info("[url ==> /newLoanList]"); + + service.loanProductList(req, model); + return "customer/loan/newLoanList"; + } + + // 대출 상품 상세 + @RequestMapping("newLoanDetail.do") + public String newLoanDetail(HttpServletRequest req, Model model) { + logger.info("[url ==> /newLoanDetail]"); + service.newLoanDetail(req, model); + return "customer/loan/newLoanDetail"; + } + + // 신규대출폼 + @RequestMapping("newLoanSign.do") + public String newLoanSign(HttpServletRequest req, Model model) { + logger.info("[url ==> /newLoanSign]"); + service.signInfo(req, model); + return "customer/loan/newLoanSign"; + } + + // 신규대출신청 + @RequestMapping("newLoanSignAction.do") + public String newLoanSignAction(HttpServletRequest req, Model model) throws ParseException { + logger.info("[url ==> /newLoanSign]"); + service.newLoanSignAction(req, model); + return "customer/loan/newLoanSignAction"; + } + + // 대출약관 + @RequestMapping("terms.do") + public String terms(HttpServletRequest req, Model model) { + logger.info("[url ==> /terms]"); + return "customer/loan/terms"; + } + + @RequestMapping("searchLoanProductList.do") + public String searchLoanProductList(HttpServletRequest req, Model model) { + System.out.println("[url ==> /searchLoanProductList]"); + service.searchLoanProductList(req, model); + return "customer/loan/searchLoanProductList"; + } + //!!!!!!!!!!지은!!!!!!!!!!! + + // 회원 자동 이체(유성) + @RequestMapping("auto_transfer") + public String auto_transfer(HttpServletRequest req, Model model) { + System.out.println("ulr ==> auto_transfer"); + logger.info("url ==> auto_transfer"); + + return "customer/bank/auto_transfer"; + } + + // 회원 다계좌 이체(유성) + @RequestMapping("transfer_one_to_num") + public String transfer_one_to_num(HttpServletRequest req, Model model) { + System.out.println("ulr ==> transfer_one_to_num"); + logger.info("url ==> transfer_one_to_num"); + + return "customer/bank/transfer_one_to_num"; + } + + + // 예금리스트(민재) + @RequestMapping("deposit.do") + public String deposit(HttpServletRequest req, Model model) { + + logger.info("[url ==> /deposit.us]"); + + service.myDepositList(req, model); + + // 이동할 페이지 + return "customer/myaccount/myDepositList"; + } + + // 예금서브리스트(민재) + @RequestMapping("myDepositSubList.do") + public String subList(HttpServletRequest req, Model model) { + + logger.info("[url ==> /myDepositSubList.us]"); + + service.myDepositSubList(req, model); + + // 이동할 페이지 + return "customer/myaccount/myDepositSubList"; + } + + // 적금리스트(민재) + @RequestMapping("saving.do") + public String saving(HttpServletRequest req, Model model) { + + logger.info("[url ==> /saving.us]"); + + service.mySavingList(req, model); + + // 이동할 페이지 + return "customer/myaccount/mySavingList"; + } + + // 적금서브리스트(민재) + @RequestMapping("mySavingSubList.do") + public String mySavingSubList(HttpServletRequest req, Model model) { + + logger.info("[url ==> /myDepositSubList.us]"); + + service.mySavingSubList(req, model); + + // 이동할 페이지 + return "customer/myaccount/mySavingSubList"; + } + + // 연금리스트(민재) + @RequestMapping("irp.do") + public String irp(HttpServletRequest req, Model model) { + + logger.info("[url ==> /irp.us]"); + + service.myIrpList(req, model); + + // 이동할 페이지 + return "customer/myaccount/myIRPList"; + } + + // 공지사항리스트(민재) + @RequestMapping("noticeList.do") + public String noticeList(HttpServletRequest req, Model model) { + + logger.info("[url ==> /noticeList.us]"); + + service.noticeList(req, model); + + // 이동할 페이지 + return "customer/notice/noticeList"; + } + + // 공지사항상세페이지(민재) + @RequestMapping("noticeDetail.do") + public String noticeDetail(HttpServletRequest req, Model model) { + + logger.info("[url ==> /noticeList.us]"); + + service.noticeDetailAction(req, model); + + // 이동할 페이지 + return "customer/notice/noticeDetail"; + } + + // 회원 이체(유성) + @RequestMapping("transfer_confirm") + public String transfer_confirm(HttpServletRequest req, Model model) { + System.out.println("ulr ==> transfer_confirm"); + logger.info("url ==> transfer_confirm"); + + return "customer/bank/transfer_confirm"; + } + + // 회원 이체 내역(유성) + @RequestMapping("transfer_List") + public String transfer_List(HttpServletRequest req, Model model) { + System.out.println("ulr ==> transfer_List"); + logger.info("url ==> transfer_List"); + + return "customer/bank/transfer_List"; + } + + // 회원 자동이체 내역(유성) + @RequestMapping("auto_transfer_List") + public String auto_transfer_List(HttpServletRequest req, Model model) { + System.out.println("ulr ==> auto_transfer_List"); + logger.info("url ==> auto_transfer_List"); + + return "customer/bank/auto_transfer_List"; + } // 가계부 페이지 @RequestMapping("accountBook") @@ -538,4 +1049,20 @@ public String deleteAccountBook(HttpServletRequest req, Model model) { return "redirect:accountBook"; } + + // 계좌연동 + @RequestMapping("myAccountList") + public String myAccountList(HttpServletRequest req, Model model) { + + + return "customer/bank/myAccountList"; + } + + // 계좌연동 + @RequestMapping("accountConnect") + public String accountConnect(HttpServletRequest req, Model model) { + + + return "customer/bank/accountConnect"; + } } diff --git a/src/main/java/com/spring/bank/user/dao/CustomerDAO.java b/src/main/java/com/spring/bank/user/dao/CustomerDAO.java index e499ef2..f3da6e8 100644 --- a/src/main/java/com/spring/bank/user/dao/CustomerDAO.java +++ b/src/main/java/com/spring/bank/user/dao/CustomerDAO.java @@ -1,107 +1,211 @@ package com.spring.bank.user.dao; +import java.sql.Date; import java.util.ArrayList; import java.util.List; import java.util.Map; import com.spring.bank.product.vo.DepositProductVO; +import com.spring.bank.product.vo.FundProductVO; +import com.spring.bank.product.vo.IrpProductVO; +import com.spring.bank.product.vo.SavingProductVO; import com.spring.bank.user.vo.AccountBookVO; +import com.spring.bank.user.vo.AccountVO; import com.spring.bank.user.vo.CrawlerVO; +import com.spring.bank.user.vo.DepositVO; import com.spring.bank.user.vo.InquiryVO; +import com.spring.bank.user.vo.LoanHistoryVO; +import com.spring.bank.product.vo.LoanProductVO; +import com.spring.bank.user.vo.LoanVO; +import com.spring.bank.user.vo.MyDepositVO; +import com.spring.bank.user.vo.MyIRPVO; +import com.spring.bank.user.vo.MySavingVO; +import com.spring.bank.user.vo.NoticeVO; +import com.spring.bank.user.vo.TransferVO; import com.spring.bank.user.vo.UserVO; import com.spring.bank.user.vo.faqVO; public interface CustomerDAO { - + // ID 중복확인 처리 public int idCheck(Map map); + // 명의 중복확인 처리 + public int duplicateCheck(Map map); + // 회원가입 처리 public int insertUser(UserVO vo); - + // 로그인 처리 public int idPasswordChk(Map map); - + // 이메일 인증 성공 처리 public int emailSuccess(UserVO vo); - + // 이메일 인증 public int emailChk(String strId); // 회원정보 탈퇴 처리 public int deleteUser(String strId); - + // 회원정보 상세 페이지 처리 public UserVO getUserInfo(String strId); - + // 회원 정보 수정 처리 public int updateUser(UserVO vo); - + // 아이디 찾기 public UserVO idFind(Map map); - + // 비밀번호 찾기(입력받은 정보로 멤버 정보 가져오기) 이메일 발송 위해 public UserVO customerFind(Map map); - + // 비밀번호 변경(재설정한 비밀번호 저장) public int updatePassword(UserVO vo); - //문의사항 갯수 + // 문의사항 갯수 public int getInquiryCnt(); - - //문의사항 조회 + + // 문의사항 조회 public List getInquiryList(Map map); - //문의사항 추가 처리 + // 문의사항 추가 처리 public int insertInquiry(InquiryVO vo); - - //문의사항 조회수 증가 + + // 문의사항 조회수 증가 public int addReadCnt(int inquiry_id); - - //문의사항 상세페이지 조회 + + // 문의사항 상세페이지 조회 public InquiryVO getQnaDetail(int inquiry_id); // //qna 게시글 비밀번호 인증,(수정, 삭제 ) // public int numPasswordCheck(Map map); - // - //qna 수정 처리 + + // qna 수정 처리 public int updateQna(InquiryVO vo); - - //qna 삭제 처리 + + // qna 삭제 처리 public int deleteQna(int inquiry_id); - - //faq 갯수 구하기 + + // faq 갯수 구하기 public int getFaqCnt(); - - //faq 조회 + + // faq 조회 public List getFaqList(Map map); - - //예금 상품갯수 + + // 예금 상품갯수 public int getDepositCnt(); //예금 상품 조회 - public List getDepositList(Map map); + public List getDepositList(Map map); // 관리자 페이지 예금 상품 수(검색결과수) public int getDepositProductSearchCnt(String search); - + // 관리자 페이지 예금 상품 검색(입력받아서 검색) public ArrayList searchDepositProduct(Map map); - - //예금 상품 상세 보기 + + // 예금 상품 상세 보기 public DepositProductVO getDepositDetail(String deposit_product_name); + + // 연금 상품갯수 + public int getIrpCnt(); + + // 연금 상품 조회 + public List getIrpList(Map map); + + // 연금 상품 수(검색결과수) + public int getIrpProductSearchCnt(String search); + + // 연금 상품 검색(입력받아서 검색) + public ArrayList searchIrpProduct(Map map); + + // 연금 상품 상세 보기 + public IrpProductVO getIrpDetail(String irp_product_name); + + //연금 상품 신청하기 +// public int irpInsert(IrpProductVO vo); + + // 적금 상품갯수 + public int getSavingCnt(); + + // 적금 상품 조회 + public List getSavingList(Map map); + + // 적금 상품 수(검색결과수) + public int getSavingProductSearchCnt(String search); + + // 적금 상품 검색(입력받아서 검색) + public ArrayList searchSavingProduct(Map map); + + // 적금 상품 상세 보기 + public SavingProductVO getSavingDetail(String saving_product_name); + + // 적금 신청 + public int savingProductAction(SavingProductVO vo); + + // 펀드 상품갯수 + public int getFundCnt(); + // 펀드 상품 조회 + public List getFundList(Map map); + + // 펀드 상품 수(검색결과수) + public int getFundProductSearchCnt(String search); + + // 펀드 상품 검색(입력받아서 검색) + public ArrayList searchFundProduct(Map map); + + // 펀드 상품 상세 보기 + public FundProductVO getFundDetail(String fund_title); + + // 펀드 신청 + public int fundProductAction(FundProductVO vo); + + //예금 신청 처리 insert + public int insertDeposit(DepositVO vo); + + //멤버의 unique_key가져오기 + public String getUniqueKey(String id); + + //예금 신청 시 계좌 생성 + public int insertAccount(AccountVO vo); + // 환율 저장 후 출력 public int exchangeIn(CrawlerVO vo); - + // 환율 체크 public int exchangeChk(String exchange_country); - + // 환율 최신화 public int exchangeUpd(CrawlerVO vo); - + // 환율 증감식 -> db에 있는 정보 출력 public String exchangeVary(String country); + + // 회원 계좌 찾기 + public List accountFind(String strId); + + // 회원 계좌 비밀번호 확인 + public int account_pwd(String strId); + + // 회원 이체 확인 + public int transfer_confirm(TransferVO vo); + + // 회원 이체(보낸 사람 이체 정보 추가) + public int transferSenderConfirm(TransferVO vo); + + // 받는 사람 이체 정보 추가 + public int transferReceiverConfirm(TransferVO vo); + + // 보낸사람 계좌 정보 변경(금액) + public int transfer_sender(AccountVO vo); + + // 받는사람 계좌 정보 변경(금액) + public int transfer_receiver(AccountVO vo); + + // json db에 넣기 + //public int jsonIn(List list); // 가계부 내역추가 public int insertAccountBook(AccountBookVO vo); @@ -114,4 +218,103 @@ public interface CustomerDAO { // 가계부 통계조회 public ArrayList getAccountBookReport(String member_id); + + public ArrayList loanList(); + + public Date getLoanDate(); + + public ArrayList getLoanCancelList(Map map); + + public int getLoanCancelCnt(String member_id); + + public ArrayList getLoanList(Map map); + + public int getLoanCnt(Map map); + + public ArrayList searchLoanProductList(Map map); + + public int getSearchLoanProductCnt(String keyword); + + public ArrayList getLoanProductList(Map map); + + public int getLoanProductCnt(); + + public LoanProductVO getLoanProductInfo(String loan_product_name); + + public ArrayList getLoanHistoryList(Map map); + + public int getLoanHistoryCnt(String member_id); + + public int newLoanSignAction(LoanVO loan); + + public LoanVO getLoanInfo(Map map); + + // 회원이름 불러오기(민재) + public String getName(String strId); + + // 예금리스트 불러오기(민재) + public List depositList(Map map); + + // 예금서브리스트 불러오기(민재) + public List depositSubList(Map map); + + // 적금리스트 불러오기(민재) + public List savingList(Map map); + + // 적금서브리스트 불러오기(민재) + public List savingSubList(Map map); + + // 연금리스트 불러오기(민재) + public List irpList(Map map); + + // 공지사항 글 개수 구하기(민재) + public int getNoticeCnt(); + + // 공지사항 리스트 불러오기(민재) + public List getNoticeList(Map map); + + // 공지사항 조회수 증가(민재) + public int addNoticeReadCnt(int notice_num); + + // 공지사항 상세 페이지(민재) + public NoticeVO getNoticeDetail(int notice_num); + + // 대표 계좌 불러오기 + public AccountVO getAccountDefault(String unique_key); + + // 계좌 불러오기(연동 O) + public List getAccountLinked(String unique_key); + + // 계좌 불러오기(연동 X) + public List getAccountUnLinked(String unique_key); + + // 계좌 연동하기 + public int accountLinkAction(Map map); + + // 계좌 연동해지 + public int accountUnLinkAction(Map map); + + public int accountPayment(Map map); + + public AccountVO getAccountInfo(Map map); + + public int transferLoan(TransferVO trans); + + public Integer getTransID(TransferVO trans); + + public ArrayList getAccountInfos(Map map); + + public int addLoanHistory(LoanHistoryVO history); + + public int updateLoanPayment(LoanVO loan); + + public int loanRequestAction(Map map); + + public int loanAccountState1(Map map); + + public int accountUniqueloan(Map map); + + + // 대표 계좌 설정 + } diff --git a/src/main/java/com/spring/bank/user/dao/CustomerDAOImpl.java b/src/main/java/com/spring/bank/user/dao/CustomerDAOImpl.java index d99cda3..de2935b 100644 --- a/src/main/java/com/spring/bank/user/dao/CustomerDAOImpl.java +++ b/src/main/java/com/spring/bank/user/dao/CustomerDAOImpl.java @@ -1,5 +1,6 @@ package com.spring.bank.user.dao; +import java.sql.Date; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -8,11 +9,23 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -import com.spring.bank.admin.dao.AdminDAO; import com.spring.bank.product.vo.DepositProductVO; +import com.spring.bank.product.vo.FundProductVO; +import com.spring.bank.product.vo.IrpProductVO; +import com.spring.bank.product.vo.SavingProductVO; import com.spring.bank.user.vo.AccountBookVO; +import com.spring.bank.user.vo.AccountVO; import com.spring.bank.user.vo.CrawlerVO; +import com.spring.bank.user.vo.DepositVO; import com.spring.bank.user.vo.InquiryVO; +import com.spring.bank.user.vo.LoanHistoryVO; +import com.spring.bank.product.vo.LoanProductVO; +import com.spring.bank.user.vo.LoanVO; +import com.spring.bank.user.vo.MyDepositVO; +import com.spring.bank.user.vo.MyIRPVO; +import com.spring.bank.user.vo.MySavingVO; +import com.spring.bank.user.vo.NoticeVO; +import com.spring.bank.user.vo.TransferVO; import com.spring.bank.user.vo.UserVO; import com.spring.bank.user.vo.faqVO; @@ -21,14 +34,21 @@ public class CustomerDAOImpl implements CustomerDAO { @Autowired SqlSession sqlSession; - + // 회원 가입 아이디 중복확인 @Override public int idCheck(Map map) { - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + + System.out.println(map.get("member_id")); + return sqlSession.getMapper(CustomerDAO.class).idCheck(map); + } + + // 회원가입 명의 중복확인 + @Override + public int duplicateCheck(Map map) { System.out.println(map.get("member_id")); - return dao.idCheck(map); + return sqlSession.getMapper(CustomerDAO.class).duplicateCheck(map); } // 회원가입 처리 @@ -36,67 +56,57 @@ public int idCheck(Map map) { public int insertUser(UserVO vo) { System.out.println("[DAO => InsertUser()]"); - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - return dao.insertUser(vo); + return sqlSession.getMapper(CustomerDAO.class).insertUser(vo); } // 이메일 인증 성공 처리 @Override public int emailSuccess(UserVO vo) { - + System.out.println("[DAO => emailSuccess()]"); - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - return dao.emailSuccess(vo); + return sqlSession.getMapper(CustomerDAO.class).emailSuccess(vo); } // 이메일 체크 @Override public int emailChk(String id) { System.out.println("[DAO => emailChk()]"); - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.emailChk(id); + + return sqlSession.getMapper(CustomerDAO.class).emailChk(id); } // 로그인 및 회원 인증 @Override public int idPasswordChk(Map map) { System.out.println("[DAO => idPasswordChk()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.idPasswordChk(map); + + + return sqlSession.getMapper(CustomerDAO.class).idPasswordChk(map); } - + // 회원 탈퇴 - @Override + @Override public int deleteUser(String id) { System.out.println("[DAO => updateUser()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.deleteUser(id); - + + return sqlSession.getMapper(CustomerDAO.class).deleteUser(id); + } - + // 회원정보 상세 페이지 @Override - public UserVO getUserInfo(String id) { + public UserVO getUserInfo(String id) { System.out.println("[DAO => getUserInfo()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.getUserInfo(id); + + return sqlSession.getMapper(CustomerDAO.class).getUserInfo(id); } - + // 회원정보 수정 처리 @Override public int updateUser(UserVO vo) { System.out.println("[DAO => updateUser()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.updateUser(vo); + + return sqlSession.getMapper(CustomerDAO.class).updateUser(vo); } // 아이디 찾기 @@ -116,152 +126,321 @@ public UserVO customerFind(Map map) { public int updatePassword(UserVO vo) { return sqlSession.getMapper(CustomerDAO.class).updatePassword(vo); } - - //문의사항 갯수(지현) + // 문의사항 갯수(지현) @Override public int getInquiryCnt() { - - int selectCnt = sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getInquiryCnt"); - return selectCnt; + + return sqlSession.getMapper(CustomerDAO.class).getInquiryCnt(); } - //문의사항 조회(지현) + // 문의사항 조회(지현) @Override public List getInquiryList(Map map) { - // List list = sqlSession.selectList("com.spring.bank.admin.dao.AdminDAO.getInquiryList"); - List list = sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.getInquiryList", map); - return list; + + return sqlSession.getMapper(CustomerDAO.class).getInquiryList(map); } - - //문의사항 추가 처리 페이지(지현) + + // 문의사항 추가 처리 페이지(지현) public int insertInquiry(InquiryVO vo) { + + + return sqlSession.getMapper(CustomerDAO.class).insertInquiry(vo); + } + + // 문의사항 조회수 증가(지현) + public int addReadCnt(int inquiry_id) { + + return sqlSession.getMapper(CustomerDAO.class).addReadCnt(inquiry_id); + } + + // 문의사항 상세페이지 조회(지현) + public InquiryVO getQnaDetail(int inquiry_id) { + + return sqlSession.getMapper(CustomerDAO.class).getQnaDetail(inquiry_id); + } + + // qna 수정 처리 (지현) + public int updateQna(InquiryVO vo) { + + return sqlSession.getMapper(CustomerDAO.class).updateQna(vo); + } + + // qna 삭제 처리(지현) + public int deleteQna(int inquiry_id) { + + return sqlSession.getMapper(CustomerDAO.class).deleteQna(inquiry_id); + } + + // 자주묻는 질문 갯수 (지현) + @Override + public int getFaqCnt() { + + return sqlSession.getMapper(CustomerDAO.class).getFaqCnt(); + } + + // 자주묻는 질문 조회(지현) + @Override + public List getFaqList(Map map) { + + return sqlSession.getMapper(CustomerDAO.class).getFaqList(map); + } + + // 예금 상품 갯수(지현) + @Override + public int getDepositCnt() { + + return sqlSession.getMapper(CustomerDAO.class).getDepositCnt(); + } + + // 예금 상품 조회 + @Override + public List getDepositList(Map map){ + + return sqlSession.getMapper(CustomerDAO.class).getDepositList(map); + } + + // 관리자 페이지 예금 상품 수(검색결과수) + @Override + public int getDepositProductSearchCnt(String search) { + return sqlSession.getMapper(CustomerDAO.class).getDepositProductSearchCnt(search); + } + + // 관리자 페이지 예금 상품 검색(입력받아서 검색) + @Override + public ArrayList searchDepositProduct(Map map) { + return sqlSession.getMapper(CustomerDAO.class).searchDepositProduct(map); + } + + // 예금 상품 상세 보기 + @Override + public DepositProductVO getDepositDetail(String deposit_product_name) { - int selectCnt = sqlSession.insert("com.spring.bank.user.dao.CustomerDAO.insertInquiry", vo); + return sqlSession.getMapper(CustomerDAO.class).getDepositDetail(deposit_product_name); + } + + // 연금 상품 갯수 + @Override + public int getIrpCnt(){ - return selectCnt; + return sqlSession.getMapper(CustomerDAO.class).getIrpCnt(); + } + + // 연금 상품 조회 + @Override + public List getIrpList(Map map){ + + return sqlSession.getMapper(CustomerDAO.class).getIrpList(map); } - //문의사항 조회수 증가(지현) - public int addReadCnt(int inquiry_id) { - int readCnt = sqlSession.update("com.spring.bank.user.dao.CustomerDAO.addReadCnt", inquiry_id); + // 관리자 페이지 연금 상품 수(검색결과수) + @Override + public int getIrpProductSearchCnt(String search) { + return sqlSession.getMapper(CustomerDAO.class).getIrpProductSearchCnt(search); + } + + // 관리자 페이지 연금 상품 검색(입력받아서 검색) + @Override + public ArrayList searchIrpProduct(Map map){ - return readCnt; + return sqlSession.getMapper(CustomerDAO.class).searchIrpProduct(map); } - //문의사항 상세페이지 조회(지현) - public InquiryVO getQnaDetail(int inquiry_id) { + // 연금 상품 상세 보기 + @Override + public IrpProductVO getIrpDetail(String irp_product_name) { + + return sqlSession.getMapper(CustomerDAO.class).getIrpDetail(irp_product_name); + } + + + // 적금 상품 갯수 + @Override + public int getSavingCnt(){ - InquiryVO vo = sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getInquiryDetail", inquiry_id); + return sqlSession.getMapper(CustomerDAO.class).getSavingCnt(); + } + + // 적금 상품 조회 + @Override + public List getSavingList(Map map){ - return vo; + return sqlSession.getMapper(CustomerDAO.class).getSavingList(map); } - //qna 수정 처리 (지현) - public int updateQna(InquiryVO vo) { - int updateCnt = sqlSession.update("com.spring.bank.user.dao.CustomerDAO.updateQna", vo); - - return updateCnt; + // 적금 상품 수(검색결과수) + @Override + public int getSavingProductSearchCnt(String search) { + return sqlSession.getMapper(CustomerDAO.class).getSavingProductSearchCnt(search); } - //qna 삭제 처리(지현) - public int deleteQna(int inquiry_id) { - int deleteCnt = sqlSession.delete("com.spring.bank.user.dao.CustomerDAO.deleteQna", inquiry_id); - - return deleteCnt; + // 적금 상품 검색(입력받아서 검색) + @Override + public ArrayList searchSavingProduct(Map map){ + return sqlSession.getMapper(CustomerDAO.class).searchSavingProduct(map); } - //자주묻는 질문 갯수 (지현) + // 적금 상품 상세 보기 @Override - public int getFaqCnt() { - int selectCnt = sqlSession.selectOne("com.spring.bank.admin.dao.AdminDAO.getFaqCnt"); ; - + public SavingProductVO getSavingDetail(String saving_product_name) { - return selectCnt; + return sqlSession.getMapper(CustomerDAO.class).getSavingDetail(saving_product_name); } - //자주묻는 질문 조회(지현) + // 적금 신청 @Override - public List getFaqList(Map map) { - - List list = sqlSession.selectList("com.spring.bank.admin.dao.AdminDAO.getFaqList", map); - return list; + public int savingProductAction(SavingProductVO vo) { + return sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.savingProductAction",vo); } - //예금 상품 갯수(지현) + // 펀드 상품 갯수 @Override - public int getDepositCnt(){ - int selectCnt =sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getDepositCnt"); - return selectCnt; + public int getFundCnt(){ + + return sqlSession.getMapper(CustomerDAO.class).getFundCnt(); } - //예금 상품 조회 + // 적금 상품 조회 @Override - public List getDepositList(Map map){ - List list = sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.getDepositList", map); + public List getFundList(Map map){ - return list; + return sqlSession.getMapper(CustomerDAO.class).getFundList(map); } - // 관리자 페이지 예금 상품 수(검색결과수) + // 관리자 페이지 적금 상품 수(검색결과수) @Override - public int getDepositProductSearchCnt(String search) { - return sqlSession.getMapper(CustomerDAO.class).getDepositProductSearchCnt(search); + public int getFundProductSearchCnt(String search) { + return sqlSession.getMapper(CustomerDAO.class).getFundProductSearchCnt(search); } - // 관리자 페이지 예금 상품 검색(입력받아서 검색) + // 관리자 페이지 적금 상품 검색(입력받아서 검색) @Override - public ArrayList searchDepositProduct(Map map){ - return sqlSession.getMapper(CustomerDAO.class).searchDepositProduct(map); + public ArrayList searchFundProduct(Map map){ + return sqlSession.getMapper(CustomerDAO.class).searchFundProduct(map); } - //예금 상품 상세 보기 + // 펀드 상품 상세 보기 @Override - public DepositProductVO getDepositDetail(String deposit_product_name) { - DepositProductVO vo = sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getDepositDetail",deposit_product_name); - System.out.println("상세보기 : "+vo.getDeposit_product_name()); - return vo; + public FundProductVO getFundDetail(String fund_title) { + + return sqlSession.getMapper(CustomerDAO.class).getFundDetail(fund_title); } + // 펀드 신청 + @Override + public int fundProductAction(FundProductVO vo) { + return sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.savingProductAction",vo); + } + + //멤버의 unique_key가져오기 + @Override + public String getUniqueKey(String id) { + + return sqlSession.getMapper(CustomerDAO.class).getUniqueKey(id); + } + + //예금 신청 시 계좌 개설 + @Override + public int insertAccount(AccountVO vo) { + + return sqlSession.getMapper(CustomerDAO.class).insertAccount(vo); + } + + //예금 신청 처리 insert + @Override + public int insertDeposit(DepositVO vo) { + + return sqlSession.getMapper(CustomerDAO.class).insertDeposit(vo); + } + // 환율 저장 후 출력 @Override public int exchangeIn(CrawlerVO vo) { System.out.println("[DAO => exchangeIn()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.exchangeIn(vo); + + + return sqlSession.getMapper(CustomerDAO.class).exchangeIn(vo); } // 환율 체크 @Override public int exchangeChk(String exchange_country) { System.out.println("[DAO => exchangeChk()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.exchangeChk(exchange_country); + + + return sqlSession.getMapper(CustomerDAO.class).exchangeChk(exchange_country); } // 환율 최신화 @Override public int exchangeUpd(CrawlerVO vo) { System.out.println("[DAO => exchangeUpd()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.exchangeUpd(vo); + + + return sqlSession.getMapper(CustomerDAO.class).exchangeUpd(vo); } // 환율 증감식 -> db에있는 정보 출력 @Override public String exchangeVary(String country) { System.out.println("[DAO => exchangeVary()]"); - - CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); - - return dao.exchangeVary(country); + + return sqlSession.getMapper(CustomerDAO.class).exchangeVary(country); } + + // 회원 계좌 찾기 + @Override + public List accountFind(String strId) { + + + return sqlSession.getMapper(CustomerDAO.class).accountFind(strId); + } + + // 계좌 비밀번호 + @Override + public int account_pwd(String strId) { + return sqlSession.getMapper(CustomerDAO.class).account_pwd(strId); + } + + // 회원 이체 확인 + @Override + public int transfer_confirm(TransferVO vo) { + return sqlSession.getMapper(CustomerDAO.class).transfer_confirm(vo); + } + + // 회원 이체(보낸 사람 이체 정보 추가) + @Override + public int transferSenderConfirm(TransferVO vo) { + return sqlSession.getMapper(CustomerDAO.class).transferSenderConfirm(vo); + } + + // 받는 사람 이체 정보 추가 + @Override + public int transferReceiverConfirm(TransferVO vo) { + return sqlSession.getMapper(CustomerDAO.class).transferReceiverConfirm(vo); + } + + // 보낸사람 계좌 정보 변경 + @Override + public int transfer_sender(AccountVO vo) { + return sqlSession.getMapper(CustomerDAO.class).transfer_sender(vo); + } + + // 받는사람 계좌 정보 변경 + @Override + public int transfer_receiver(AccountVO vo) { + return sqlSession.getMapper(CustomerDAO.class).transfer_receiver(vo); + } + + // test +// @Override +// public int jsonIn(List list) { +// System.out.println("[DAO ==> test()]"); +// +// CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); +// +// return dao.jsonIn(list); +// } // 가계부 내역추가 public int insertAccountBook(AccountBookVO vo) { @@ -283,4 +462,253 @@ public ArrayList getAccountBookReport(String member_id) { return sqlSession.getMapper(CustomerDAO.class).getAccountBookReport(member_id); } + //지은~!~!@@@@! + + // 대출 가입 상품 + @Override + public ArrayList loanList() { + System.out.println("[DAO => loanList()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.loanList(); + } + + public int getLoanCancelCnt(String member_id) { + System.out.println("[DAO => getLoanCancelCnt()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanCancelCnt(member_id); + } + + public ArrayList getLoanCancelList(Map map) { + System.out.println("[DAO => getLoanCancelList()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanCancelList(map); + } + + public int getLoanCnt(Map map) { + System.out.println("[DAO => getLoanCnt()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanCnt(map); + } + + public ArrayList getLoanList(Map map) { + System.out.println("[DAO => getLoanList()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanList(map); + } + + // 대출 상품 개수 + public int getLoanProductCnt() { + System.out.println("[UserDAO => getLoanProductCnt()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanProductCnt(); + } + + // 대출 상품 목록 + public ArrayList getLoanProductList(Map map) { + System.out.println("[UserDAO => getLoanProductList()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanProductList(map); + } + + public int getSearchLoanProductCnt(String keyword) { + System.out.println("[UserDAO => getSearchLoanProductCnt()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getSearchLoanProductCnt(keyword); + } + + public ArrayList searchLoanProductList(Map map) { // parameter : keyword, start, end + System.out.println("[UserDAO => searchLoanProductList()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.searchLoanProductList(map); + } + + public LoanProductVO getLoanProductInfo(String loan_product_name) { + System.out.println("[UserDAO => getLoanProductInfo()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanProductInfo(loan_product_name); + } + + public ArrayList getLoanHistoryList(Map map) { + System.out.println("[UserDAO => getLoanHistoryList()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanHistoryList(map); + } + + public int getLoanHistoryCnt(String member_id) { + System.out.println("[UserDAO => getLoanHistoryCnt()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanHistoryCnt(member_id); + } + + public int newLoanSignAction(LoanVO loan) { + System.out.println("[UserDAO => newLoanSignAction()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.newLoanSignAction(loan); + } + + public LoanVO getLoanInfo(Map map) { + System.out.println("[UserDAO => getLoanInfo()]"); + CustomerDAO dao = sqlSession.getMapper(CustomerDAO.class); + return dao.getLoanInfo(map); + } + + public int getLoanHistoryCntToLoan(Map map) { + return sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getLoanHistoryCntToLoan", map); + } + + public Date getLoanDate() { + return sqlSession.getMapper(CustomerDAO.class).getLoanDate(); + } + + ////// + public int accountPayment(Map map) { + return sqlSession.getMapper(CustomerDAO.class).accountPayment(map); + + } + + public AccountVO getAccountInfo(Map map) { + return sqlSession.getMapper(CustomerDAO.class).getAccountInfo(map); + } + + public int transferLoan(TransferVO trans) { + return sqlSession.getMapper(CustomerDAO.class).transferLoan(trans); + } + + public Integer getTransID(TransferVO trans) { + return sqlSession.getMapper(CustomerDAO.class).getTransID(trans); + } + + public ArrayList getAccountInfos(Map map) { + return sqlSession.getMapper(CustomerDAO.class).getAccountInfos(map); + } + + public int addLoanHistory(LoanHistoryVO history) { + return sqlSession.getMapper(CustomerDAO.class).addLoanHistory(history); + } + + public int updateLoanPayment(LoanVO loan) { + return sqlSession.getMapper(CustomerDAO.class).updateLoanPayment(loan); + + } + + public int loanRequestAction(Map map) { + return sqlSession.getMapper(CustomerDAO.class).loanRequestAction(map); + } + + public int loanAccountState1(Map map) { + return sqlSession.getMapper(CustomerDAO.class).loanAccountState1(map); + } + + public int accountUniqueloan(Map map) { + return sqlSession.getMapper(CustomerDAO.class).accountUniqueloan(map); + + } +//// + + //지은!!!!!!!!1 + + // 회원 이름 불러오기(민재) + @Override + public String getName(String id) { + + return sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getName", id); + } + + // 예금리스트 불러오기(민재) + @Override + public List depositList(Map map) { + + return sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.depositList", map); + } + + // 예금서브리스트 불러오기(민재) + @Override + public List depositSubList(Map map) { + + return sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.depositSubList", map); + } + + // 적금리스트 불러오기(민재) + @Override + public List savingList(Map map) { + + return sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.savingList", map); + } + + // 적금서브리스트 불러오기(민재) + @Override + public List savingSubList(Map map) { + + return sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.savingSubList", map); + } + + // 연금리스트 불러오기(민재) + @Override + public List irpList(Map map) { + + return sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.irpList", map); + } + + // 공지사항 글 개수 구하기(민재) + @Override + public int getNoticeCnt() { + + return sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getNoticeCnt"); + } + + // 공지사항 리스트 불러오기(민재) + public List getNoticeList(Map map){ + + return sqlSession.selectList("com.spring.bank.user.dao.CustomerDAO.getNoticeList", map); + } + + // 공지사항 조회수 증가(민재) + public int addNoticeReadCnt(int notice_num) { + + return sqlSession.update("com.spring.bank.user.dao.CustomerDAO.addNoticeReadCnt", notice_num); + + } + + // 공지사항 상세페이지(민재) + public NoticeVO getNoticeDetail(int notice_num) { + + return sqlSession.selectOne("com.spring.bank.user.dao.CustomerDAO.getNoticeDetail", notice_num); + + } + + // 대표 계좌 불러오기 + @Override + public AccountVO getAccountDefault(String unique_key) { + System.out.println("DAO - 대표계좌불러오기"); + + return sqlSession.getMapper(CustomerDAO.class).getAccountDefault(unique_key); + } + + // 계좌 불러오기(연동 O) + @Override + public List getAccountLinked(String unique_key) { + System.out.println("DAO - 연동계좌불러오기"); + return sqlSession.getMapper(CustomerDAO.class).getAccountLinked(unique_key); + } + + // 계좌 불러오기(연동 X) + @Override + public List getAccountUnLinked(String unique_key) { + System.out.println("DAO - 비연동계좌불러오기"); + return sqlSession.getMapper(CustomerDAO.class).getAccountUnLinked(unique_key); + } + + @Override + public int accountLinkAction(Map map) { + return sqlSession.getMapper(CustomerDAO.class).accountLinkAction(map); + } + + @Override + public int accountUnLinkAction(Map map) { + return sqlSession.getMapper(CustomerDAO.class).accountUnLinkAction(map); + } + + + + } diff --git a/src/main/java/com/spring/bank/user/service/CustomerService.java b/src/main/java/com/spring/bank/user/service/CustomerService.java index bffeb8a..2c9753c 100644 --- a/src/main/java/com/spring/bank/user/service/CustomerService.java +++ b/src/main/java/com/spring/bank/user/service/CustomerService.java @@ -8,77 +8,137 @@ public interface CustomerService { - // 중복확인 처리 + // 로그인 시 계좌 불러오기 + public void accountLoad(HttpServletRequest req, Model model); + + // 아이디 중복확인 처리 public int confirmIdAction(Map map); - + + // 명의중복 + public int duplicateAction(Map map); + // 회원가입 처리 public void registerAction(HttpServletRequest req, Model model); - - // 이메일 인증 성공 처리 - // public void emailSuccess(HttpServletRequest req, Model model); - + // 회원정보 인증 public void confirmAction(HttpServletRequest req, Model model); - + // 회원정보 인증 및 탈퇴 처리 public void deleteCustomerAction(HttpServletRequest req, Model model); - + // 회원정보 인증 및 상세 페이지 public void modifyDetailAction(HttpServletRequest req, Model model); - + // 회원정보 수정 처리 public void modifyCustomerAction(HttpServletRequest req, Model model); - + // id찾기 public void idFindAction(HttpServletRequest req, Model model); - + // pw 재설정 이메일전송 public void sendEmail(Map map); - + // pw 찾기(재설정) public void pwFindAction(HttpServletRequest req, Model model); - - //qna 작성 + + // qna 작성 public void inquiryList(HttpServletRequest req, Model model); - - //qna작성 처리페이지 + + // qna작성 처리페이지 public void inquiryWriteAction(HttpServletRequest req, Model model); - - //qna 상세보기 페이지 + + // qna 상세보기 페이지 public void InquiryDetailAction(HttpServletRequest req, Model model); - - //qna 수정 + + // qna 수정 public void InquiryModifyDetailAction(HttpServletRequest req, Model model); - - //qna 수정 처리 + + // qna 수정 처리 public void inquiryModifyAction(HttpServletRequest req, Model model); - + // qna 비번 확인 public void QnaPasswordConfirm(HttpServletRequest req, Model model); - - //qna 삭제 처리 + + // qna 삭제 처리 public void inquiryDelete(HttpServletRequest req, Model model); - - //faq 조회 + + // faq 조회 public void faqList(HttpServletRequest req, Model model); - //예금 상품 조회 + // 예금 상품 조회 public void depositList(HttpServletRequest req, Model model); - - //예금 상품 검색 + + // 예금 상품 검색 public void searchDepositProduct(HttpServletRequest req, Model model); - - //예금 상품 상세보기 + + // 예금 상품 상세보기 public void depositDetail(HttpServletRequest req, Model model); - //예금 신청 + // 금융상품 신청 시 계좌번호 생성 insert + public void makeAccount(HttpServletRequest req, Model model); + + // 예금 신청 public void insertDeposit(HttpServletRequest req, Model model); + + // 회원 계좌 찾기 + public void getAccount(HttpServletRequest req, Model model); + + // 회원 계좌 비밀번호 확인 + public void accountPwdConfirm(HttpServletRequest req, Model model); + + // 회원 이체 최종 확인 + public void transferConfirm(HttpServletRequest req, Model model); + + // 연금 상품 조회 + public void irpList(HttpServletRequest req, Model model); + + // 연금 상품 검색 + public void irpProductSearch(HttpServletRequest req, Model model); + + // 연금 상품 상세보기 + public void irpDetail(HttpServletRequest req, Model model); + + // 연금 상품 신청 화면 + public void irpProductJoin(HttpServletRequest req, Model model); + + // 연금 신청 irp insert + public void insertIrp(HttpServletRequest req, Model model); + + // 적금 상품 조회 + public void savingList(HttpServletRequest req, Model model); + // 적금 상품 검색 + public void savingProductSearch(HttpServletRequest req, Model model); + + // 적금 상품 상세보기 + public void savingDetail(HttpServletRequest req, Model model); + + // 적금 신청 + public void savingProductAction(HttpServletRequest req, Model model); + + // 펀드 상품 조회 + public void fundList(HttpServletRequest req, Model model); + + // 펀드 상품 검색 + public void fundProductSearch(HttpServletRequest req, Model model); + + // 펀드 상품 상세보기 + public void fundDetail(HttpServletRequest req, Model model); + + // 펀드 신청 + public void fundProductAction(HttpServletRequest req, Model model); + + //예금 신청 상세 화면 + public void setDepositProductJoin(HttpServletRequest req, Model model); + // 환율 데이터 입력 후 출력 - public void exchanges(HttpServletRequest req, Model model); + public void exchanges(Model model); // 환율 목록 출력 - public void exchangeList(HttpServletRequest req, Model model); + public void exchangeList(HttpServletRequest req, Model model); + + // db json 넣기 + //public void test(HttpServletRequest req, Model model); // 가계부 내역 추가 public void insertAccountBook(HttpServletRequest req, Model model); @@ -88,4 +148,26 @@ public interface CustomerService { // 가계부 내역 조회 public void getAccountBook(HttpServletRequest req, Model model); + + // 예금리스트처리(민재) + public void myDepositList(HttpServletRequest req, Model model); + + // 예금서브리스트처리(민재) + public void myDepositSubList(HttpServletRequest req, Model model); + + // 적금리스트처리(민재) + public void mySavingList(HttpServletRequest req, Model model); + + // 적금서브리스트처리(민재) + public void mySavingSubList(HttpServletRequest req, Model model); + + // 연금리스트처리(민재) + public void myIrpList(HttpServletRequest req, Model model); + + // 공지사항리스트(민재) + public void noticeList(HttpServletRequest req, Model model); + + // 공지사항상세페이지(민재) + public void noticeDetailAction(HttpServletRequest req, Model model); + } diff --git a/src/main/java/com/spring/bank/user/service/CustomerServiceImpl.java b/src/main/java/com/spring/bank/user/service/CustomerServiceImpl.java index 65cecb4..cca4e76 100644 --- a/src/main/java/com/spring/bank/user/service/CustomerServiceImpl.java +++ b/src/main/java/com/spring/bank/user/service/CustomerServiceImpl.java @@ -2,6 +2,9 @@ import java.sql.Date; import java.sql.Timestamp; +import java.text.ParseException; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -20,85 +23,117 @@ import org.springframework.mail.javamail.JavaMailSender; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.ui.Model; import com.spring.bank.customer.encrypt.UserAuthenticationService; import com.spring.bank.product.vo.DepositProductVO; +import com.spring.bank.product.vo.FundProductVO; +import com.spring.bank.product.vo.IrpProductVO; +import com.spring.bank.product.vo.SavingProductVO; import com.spring.bank.user.dao.CustomerDAOImpl; import com.spring.bank.user.vo.AccountBookVO; +import com.spring.bank.user.vo.AccountVO; import com.spring.bank.user.vo.CrawlerVO; +import com.spring.bank.user.vo.DepositVO; import com.spring.bank.user.vo.InquiryVO; +import com.spring.bank.user.vo.IrpVO; +import com.spring.bank.user.vo.LoanHistoryVO; +import com.spring.bank.product.vo.LoanProductVO; +import com.spring.bank.user.vo.LoanVO; +import com.spring.bank.user.vo.MyDepositVO; +import com.spring.bank.user.vo.MyIRPVO; +import com.spring.bank.user.vo.MySavingVO; +import com.spring.bank.user.vo.NoticeVO; +import com.spring.bank.user.vo.TransferVO; import com.spring.bank.user.vo.UserVO; import com.spring.bank.user.vo.faqVO; - @Service public class CustomerServiceImpl implements CustomerService { @Autowired CustomerDAOImpl dao; - + @Autowired BCryptPasswordEncoder bCryptPasswordEncoder; - + @Autowired SqlSessionTemplate sqlSession; - + @Autowired JavaMailSender mailSender; + // 로그인 시 index 에 계좌 불러오기 + @Override + public void accountLoad(HttpServletRequest req, Model model) { + System.out.println("[서비스 => 계좌불러오기]"); + + String member_id = (String) req.getSession().getAttribute("customerID"); + + // 세션 ID를 받아와 멤버 정보에 있는 고유키(unique_key)를 받아온다. + String unique_key = dao.getUniqueKey(member_id); + + // 고유키를 통해 해당하는 연동된 계좌들을 불러온다. + List dtos = dao.getAccountLinked(unique_key); + + // 대표계좌 불러오기 + AccountVO vo = dao.getAccountDefault(unique_key); + + req.setAttribute("vo", vo); + req.setAttribute("dtos", dtos); + + + } + // 아이디 중복확인 @Override public int confirmIdAction(Map map) { - + System.out.println("[서비스 => ID 중복확인 처리]"); - + System.out.println(map.get("member_id")); - + return dao.idCheck(map); } + + // 명의 중복확인 + @Override + public int duplicateAction(Map map) { + + System.out.println("[서비스 => 명의 중복확인 처리]"); + + System.out.println(map.get("unique_key")); + + return dao.duplicateCheck(map); + } // 회원가입 처리 @Override public void registerAction(HttpServletRequest req, Model model) { System.out.println("[서비스 => 회원가입 처리]"); + + String unique_key = req.getParameter("unique_key"); - String access_token = req.getParameter("access_token"); - String refresh_token = req.getParameter("refresh_token"); - String user_seq_no = req.getParameter("user_seq_no"); - - System.out.println("at : " + access_token); - System.out.println("rt : " + refresh_token); - System.out.println("usn : " + user_seq_no); + System.out.println("uk : " + unique_key); // 3단계. 화면으로부터 입력 받은 값을 받아온다. 바구니에 담는다. UserVO vo = new UserVO(); - + String strPassword = bCryptPasswordEncoder.encode(req.getParameter("password")); - String hp = ""; - String hp1 = req.getParameter("hp1"); - String hp2 = req.getParameter("hp2"); - String hp3 = req.getParameter("hp3"); - - // hp가 필수가 아니므로 null 값이 들어올 수 있으므로 값이 존재할 때만 처리 - if(!hp1.equals("") && !hp2.equals("") && !hp3.equals("")) { - hp = hp1 + "-" + hp2 + "-" + hp3; - } - + String hp = req.getParameter("hp"); + String email = ""; String email1 = req.getParameter("email1"); String email2 = req.getParameter("email2"); - + email = email1 + "@" + email2; - - String zipcode= req.getParameter("address_zipcode"); - /* - * if(zipcode.length() == 4 ) { zipcode = "0" + zipcode; } - */ - + + String zipcode = req.getParameter("address_zipcode"); + vo.setMember_id(req.getParameter("id")); vo.setMember_password(strPassword); vo.setMember_name(req.getParameter("name")); @@ -109,89 +144,78 @@ public void registerAction(HttpServletRequest req, Model model) { vo.setMember_addr1(req.getParameter("address_addr1")); vo.setMember_addr2(req.getParameter("address_addr2")); vo.setMember_addr3(req.getParameter("address_addr3")); - vo.setAccess_token(req.getParameter("access_token")); - vo.setRefresh_token(req.getParameter("refresh_token")); - vo.setUser_seq_no(req.getParameter("user_seq_no")); + vo.setUnique_key(req.getParameter("unique_key")); // regDate는 입력값이 없으면 defalut가 sysdate - vo.setMember_indate(new Timestamp(System.currentTimeMillis())); - - // CustomerDAOImpl dao = new CustomerDAOImpl(); - // 4단계. 싱글톤 방식으로 dao 객체 생성 // 5단계. 회원가입 처리 int insertCnt = dao.insertUser(vo); System.out.println("insertCnt : " + insertCnt); - + // 6단계. jsp로 결과 전달(request나 session으로 처리 결과를 저장 후) req.setAttribute("insertCnt", insertCnt); - model.addAttribute("selectCnt", insertCnt); - // 이메일 인증 - req.setAttribute("email", email); } - + @Override public void deleteCustomerAction(HttpServletRequest req, Model model) { System.out.println("[서비스 => 회원탈퇴 처리]"); - + // 3단계. 화면으로부터 입력 받은 값을 가져오기 - String id = (String) req.getSession().getAttribute("userID"); - + String id = (String) req.getSession().getAttribute("customerID"); + // 4단계. 싱글톤 방식으로 dao 객체 생성, 다형성 적용 // 5-1단계. 회원탈퇴 인증 처리 int deleteCnt = 0; - + // 5-2단계. 인증성공 시 탈퇴처리 - if(id != null) { + if (id != null) { deleteCnt = dao.deleteUser(id); System.out.println("deleteCnt : " + deleteCnt); } - + // 6단계. jsp로 결과 전달(request나 session으로 처리 결과를 저장 후) req.setAttribute("deleteCnt", deleteCnt); } @Override public void modifyDetailAction(HttpServletRequest req, Model model) { - + System.out.println("[서비스 => 회원수정 인증 및 상세화면]"); - - String id = (String) req.getSession().getAttribute("userID"); - + + String id = (String) req.getSession().getAttribute("customerID"); + UserAuthenticationService confirm = new UserAuthenticationService(sqlSession); - + // 3단계. 화면으로부터 입력 받은 값을 가져오기 - + System.out.println("세션 아이디 : " + id); String password = req.getParameter("password"); - + String ecPassword = confirm.loadUserByUsername(id).getPassword(); - - + String encodePassword = ecPassword.replace("{bcrypt}", ""); - + boolean chk = bCryptPasswordEncoder.matches(password, encodePassword); - + System.out.println(chk); - + System.out.println("password : " + password); System.out.println("ecPassword : " + ecPassword); - + Map map = new HashMap(); map.put("id", id); map.put("password", encodePassword); - - + // 5-1단계. 회원수정 인증 처리 int idPwdChkCnt = dao.idPasswordChk(map); - + // 5-2단계. 인증성공 시 상세 정보 조회 UserVO vo = null; - if(chk) { + if (chk) { vo = dao.getUserInfo(id); System.out.println("타니?"); } - + System.out.println("vo : " + vo.getMember_name()); System.out.println("vo : " + vo.getMember_birth()); System.out.println("vo : " + vo.getMember_id()); @@ -202,69 +226,66 @@ public void modifyDetailAction(HttpServletRequest req, Model model) { System.out.println("vo : " + vo.getMember_addr2()); System.out.println("vo : " + vo.getMember_addr3()); System.out.println("vo : " + vo.getMember_indate()); - - + System.out.println("idPwdChkCnt : " + idPwdChkCnt); - + // 6단계. jsp로 결과 전달(request나 session으로 처리 결과를 저장 후) req.setAttribute("selectCnt", idPwdChkCnt); req.setAttribute("vo", vo); - + } @Override public void modifyCustomerAction(HttpServletRequest req, Model model) { System.out.println("[서비스 => 회원수정 처리]"); - + // 3단계. 화면으로부터 입력 받은 값을 가져오기 - String strId = (String) req.getSession().getAttribute("userID"); + String strId = (String) req.getSession().getAttribute("customerID"); String strPassword = req.getParameter("password"); - + Map map = new HashMap(); map.put("id", strId); map.put("password", strPassword); - + // 4단계. 싱글톤 방식으로 dao 객체 생성, 다형성 적용 int idPwdCheck = dao.idPasswordChk(map); - + // id, password, name, hp, email UserVO vo = new UserVO(); - + String hp = ""; String hp1 = req.getParameter("hp1"); String hp2 = req.getParameter("hp2"); String hp3 = req.getParameter("hp3"); // hp가 필수가 아니므로 null 값이 들어올 수 있으므로 값이 존재할 때만 처리 - if(!hp1.equals("") && !hp2.equals("") && !hp3.equals("")) { + if (!hp1.equals("") && !hp2.equals("") && !hp3.equals("")) { hp = hp1 + "-" + hp2 + "-" + hp3; } - + String email1 = req.getParameter("email1"); String email2 = req.getParameter("email2"); String email = email1 + "@" + email2; - - + String password = ""; String passwordChange = req.getParameter("password_change"); - String enPasswordChange= bCryptPasswordEncoder.encode(passwordChange); - - - if(idPwdCheck == 1) { + String enPasswordChange = bCryptPasswordEncoder.encode(passwordChange); + + if (idPwdCheck == 1) { // 비밀번호 변경 값이 존재하지 않을 때 - if(passwordChange == "") { + if (passwordChange == "") { // 기존 비밀번호 유지 password = req.getParameter("password"); - - // 비밀번호 변경 값이 존재할 때 + + // 비밀번호 변경 값이 존재할 때 } else { // 비밀번호 변경 값으로 변경 password = enPasswordChange; } } - + vo.setMember_name(req.getParameter("name")); vo.setMember_birth(Date.valueOf(req.getParameter("birth"))); - vo.setMember_id((String)req.getSession().getAttribute("userID")); + vo.setMember_id((String) req.getSession().getAttribute("customerID")); vo.setMember_password(password); vo.setMember_hp(hp); vo.setMember_email(email); @@ -272,12 +293,11 @@ public void modifyCustomerAction(HttpServletRequest req, Model model) { vo.setMember_addr1(req.getParameter("address_addr1")); vo.setMember_addr2(req.getParameter("address_addr2")); vo.setMember_addr3(req.getParameter("address_addr3")); - - + // 5단계. 회원수정 인증 처리 int updateCnt = dao.updateUser(vo); System.out.println("updateCnt : " + updateCnt); - + // 6단계. jsp로 결과 전달(request나 session으로 처리 결과를 저장 후) req.setAttribute("updateCnt", updateCnt); } @@ -285,27 +305,27 @@ public void modifyCustomerAction(HttpServletRequest req, Model model) { // 회원 인증 화면 @Override public void confirmAction(HttpServletRequest req, Model model) { - + System.out.println("[서비스 => 회원 인증 화면]"); - + // 3단계. 화면으로부터 입력 받은 값을 가져오기 - String strId = (String) req.getSession().getAttribute("userID"); + String strId = (String) req.getSession().getAttribute("customerID"); String strPassword = req.getParameter("password"); - + System.out.println("strId : " + strId); System.out.println("strPassword : " + strPassword); - + Map map = new HashMap(); map.put("id", strId); map.put("password", strPassword); - + // 4단계. 싱글톤 방식으로 dao 객체 생성, 다형성 적용 int idPwdChkCnt = dao.idPasswordChk(map); - + System.out.println("idPwdChkCnt : " + idPwdChkCnt); // 6단계. jsp로 결과 전달(request나 session으로 처리 결과를 저장 후) req.setAttribute("selectCnt", idPwdChkCnt); - + } // id 찾기 @@ -313,17 +333,17 @@ public void confirmAction(HttpServletRequest req, Model model) { public void idFindAction(HttpServletRequest req, Model model) { String member_name = req.getParameter("member_name"); String member_email = req.getParameter("member_email"); - + Map map = new HashMap(); map.put("member_name", member_name); map.put("member_email", member_email); - + // id 찾기 처리 UserVO vo = dao.idFind(map); - if(vo != null) { + if (vo != null) { System.out.println("찾은 id : " + vo.getMember_id()); } - + // jsp로 결과 전달 model.addAttribute("vo", vo); } @@ -331,21 +351,20 @@ public void idFindAction(HttpServletRequest req, Model model) { // 임시비밀번호로 변경하고 이메일 전송 @Override public void sendEmail(Map map) { - try{ - - MimeMessage message = mailSender.createMimeMessage(); - String txt = "KOSMO BANK 임시비밀번호 전송메일입니다.
" - + "임시비밀번호 : " + (String)map.get("member_password") - + "
해당 비밀번호로 로그인 하시고 비밀번호 변경해주세요~!"; - message.setSubject("KOSMO BANK 임시비밀번호 전송메일입니다"); - message.setText(txt, "UTF-8", "html"); - message.setFrom(new InternetAddress("xkrrhsdl7@gmail.com")); // 보내는사람 - message.addRecipient(RecipientType.TO, new InternetAddress((String)map.get("member_email"))); // 받는사람 - mailSender.send(message); - - }catch(Exception e){ - e.printStackTrace(); - } + try { + + MimeMessage message = mailSender.createMimeMessage(); + String txt = "KOSMO BANK 임시비밀번호 전송메일입니다.
" + "임시비밀번호 : " + (String) map.get("member_password") + + "
해당 비밀번호로 로그인 하시고 비밀번호 변경해주세요~!"; + message.setSubject("KOSMO BANK 임시비밀번호 전송메일입니다"); + message.setText(txt, "UTF-8", "html"); + message.setFrom(new InternetAddress("xkrrhsdl7@gmail.com")); // 보내는사람 + message.addRecipient(RecipientType.TO, new InternetAddress((String) map.get("member_email"))); // 받는사람 + mailSender.send(message); + + } catch (Exception e) { + e.printStackTrace(); + } } // 임시비밀번호로 재설정 @@ -355,17 +374,17 @@ public void pwFindAction(HttpServletRequest req, Model model) { String member_name = req.getParameter("member_name"); String member_email = req.getParameter("member_email"); String member_id = req.getParameter("member_id"); - + Map map = new HashMap(); map.put("member_name", member_name); map.put("member_email", member_email); map.put("member_id", member_id); - + UserVO vo = dao.customerFind(map); System.out.print("vo : " + vo); int updateCnt = 0; - - if(vo == null) { + + if (vo == null) { System.out.println("입력하신 정보로 회원정보를 찾을 수 없습니다."); } else { // 임시 비밀번호 생성 @@ -379,13 +398,13 @@ public void pwFindAction(HttpServletRequest req, Model model) { sendMap.put("member_password", pw); sendMap.put("member_email", member_email); System.out.println("설정한 임시비밀번호 : " + pw); - + // 저장은 임시비밀번호를 암호화해서 저장한다. vo.setMember_password(bCryptPasswordEncoder.encode(pw)); - + // 비밀번호 변경 updateCnt = dao.updatePassword(vo); - + // 비밀번호 변경 메일 발송(아이디와 암호화되기전 비밀번호를 보낸다) sendEmail(sendMap); @@ -393,8 +412,8 @@ public void pwFindAction(HttpServletRequest req, Model model) { System.out.println("updateCnt: " + updateCnt); model.addAttribute("updateCnt", updateCnt); } - - //문의내역 List + + // 문의내역 List @Override public void inquiryList(HttpServletRequest req, Model model) { // 3단계. 화면으로부터 입력받은 값을 받아온다. @@ -480,7 +499,7 @@ public void inquiryList(HttpServletRequest req, Model model) { map.put("start", start); map.put("end", end); dtos = dao.getInquiryList(map); - + } // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 @@ -498,12 +517,12 @@ public void inquiryList(HttpServletRequest req, Model model) { } } - - //QNA 글쓰기 처리 + + // QNA 글쓰기 처리 @Override public void inquiryWriteAction(HttpServletRequest req, Model model) { int insertCnt = 0; - + InquiryVO vo = new InquiryVO(); // 3-1단계. 화면으로부터 입력받은 값(hidden값)을 받아온다. @@ -530,7 +549,7 @@ public void inquiryWriteAction(HttpServletRequest req, Model model) { } - //qna 상세보기 페이지 + // qna 상세보기 페이지 @Override public void InquiryDetailAction(HttpServletRequest req, Model model) { // 3단계. 화면으로부터 입력받은 값을 받아온다. @@ -552,14 +571,14 @@ public void InquiryDetailAction(HttpServletRequest req, Model model) { req.setAttribute("pageNum", pageNum); req.setAttribute("number", number); } - - //qna 수정 + + // qna 수정 @Override public void InquiryModifyDetailAction(HttpServletRequest req, Model model) { int inquiry_id = Integer.parseInt(req.getParameter("inquiry_id")); int pageNum = Integer.parseInt(req.getParameter("pageNum")); - + // 5-2 단계. 상세페이지 조회 InquiryVO vo = dao.getQnaDetail(inquiry_id); @@ -569,8 +588,8 @@ public void InquiryModifyDetailAction(HttpServletRequest req, Model model) { req.setAttribute("pageNum", pageNum); } - - //qna 수정 처리 + + // qna 수정 처리 @Override public void inquiryModifyAction(HttpServletRequest req, Model model) { @@ -596,10 +615,10 @@ public void inquiryModifyAction(HttpServletRequest req, Model model) { req.setAttribute("inquiry_id", inquiry_id); } - //수정, 삭제 할때 비밀번호 확인 + // QNA 수정, 삭제 할때 비밀번호 확인 @Override public void QnaPasswordConfirm(HttpServletRequest req, Model model) { - + // 3단계. 화면으로부터 입력받은 값(input값)을 받아온다. String id = (String) req.getSession().getAttribute("customerID"); int pageNum = Integer.parseInt(req.getParameter("pageNum")); @@ -616,10 +635,10 @@ public void QnaPasswordConfirm(HttpServletRequest req, Model model) { String encodePassword = ecPassword.replace("{bcrypt}", ""); boolean chk = bCryptPasswordEncoder.matches(inquiry_password, encodePassword); - - int selectCnt =0; - - if(chk) { + + int selectCnt = 0; + + if (chk) { // QnaModify.bo?num=30&pageNum=1 // hidden으로 넘어온 값(hidden 값) 받아온다. System.out.println(req.getParameter("inquiry_id")); @@ -628,12 +647,12 @@ public void QnaPasswordConfirm(HttpServletRequest req, Model model) { System.out.println("qna 수정 , 삭제 시 비밀번호 확인 selectCnt = " + selectCnt); } model.addAttribute("selectCnt", selectCnt); - model.addAttribute("inquiry_id",inquiry_id); + model.addAttribute("inquiry_id", inquiry_id); model.addAttribute("pageNum", pageNum); - + } - - //qna 삭제 처리 + + // qna 삭제 처리 @Override public void inquiryDelete(HttpServletRequest req, Model model) { System.out.println("삭제처리 아이디 : " + req.getParameter("inquiry_id")); @@ -650,7 +669,7 @@ public void inquiryDelete(HttpServletRequest req, Model model) { req.setAttribute("inquiry_id", inquiry_id); } - //faq 조회 + // faq 조회 @Override public void faqList(HttpServletRequest req, Model model) { // 3단계. 화면으로부터 입력받은 값을 받아온다. @@ -753,8 +772,8 @@ public void faqList(HttpServletRequest req, Model model) { } } - - //예금 상품 조회 + + // 예금 상품 조회 @Override public void depositList(HttpServletRequest req, Model model) { // 3단계. 화면으로부터 입력받은 값을 받아온다. @@ -836,7 +855,8 @@ public void depositList(HttpServletRequest req, Model model) { if (cnt > 0) { // 5-2단계. 게시글 목록 조회 - Map map = new HashMap(); + + Map map = new HashMap(); map.put("start", start); map.put("end", end); dtos = dao.getDepositList(map); @@ -856,113 +876,113 @@ public void depositList(HttpServletRequest req, Model model) { req.setAttribute("currentPage", currentPage); // 현재페이지 } } - - //예금 상품 검색 + + // 예금 상품 검색 @Override public void searchDepositProduct(HttpServletRequest req, Model model) { // 입력받은 검색어 String search = req.getParameter("search"); System.out.println("관리자 페이지 회원 검색어 : " + search); - + // 페이징 - int pageSize = 10; // 한 페이지당 출력할 예금상품 - int pageBlock = 3; // 한 블럭당 페이지 갯수 - - int cnt = 0; // 예금상품 수 - int start = 0; // 현재 페이지 시작 글 번호 - int end = 0; // 현재 페이지 마지막 글 번호 - int number = 0; // 출력용 글 번호 - String pageNum = ""; // 페이지 번호 - int currentPage = 0; // 현재 페이지 - - int pageCount = 0; // 페이지 갯수 - int startPage = 0; // 시작 페이지 - int endPage = 0; // 마지막 페이지 - + int pageSize = 10; // 한 페이지당 출력할 예금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 예금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + // 검색 된 예금 상품 수 조회 cnt = dao.getDepositProductSearchCnt(search); System.out.println("검색 된 예금 상품 수 : " + cnt); - + pageNum = req.getParameter("pageNum"); - - if(pageNum == null) { - pageNum = "1"; // 첫 페이지를 1페이지로 지정 + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 } - + // 상품 30건 기준 currentPage = Integer.parseInt(pageNum); System.out.println("currentPage : " + currentPage); - + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 - pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 - + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + // 현재 페이지 시작 글 번호(페이지별) // start = (currentPage - 1) * pageSize + 1; // 1 = (1 - 1) * 10 + 1 start = (currentPage - 1) * pageSize + 1; - + // 현재 페이지 시작 글 번호(페이지별) // end = start + pageSize - 1; // 10 = 1 + 10 - 1 - end = start + pageSize - 1 ; - + end = start + pageSize - 1; + System.out.println("start : " + start); System.out.println("end : " + end); - + // 출력용 글 번호 - //number = cnt - (currentPage - 1) * pageSize; + // number = cnt - (currentPage - 1) * pageSize; number = cnt - (currentPage - 1) * pageSize; - + System.out.println("number : " + number); System.out.println("pageSize : " + pageSize); - + // 시작 페이지 // 1 = (1 / 3) * 3 + 1; // startPage = (currentPage / pageBlock) * pageBlock + 1; startPage = (currentPage / pageBlock) * pageBlock + 1; - if(currentPage % pageBlock == 0) { + if (currentPage % pageBlock == 0) { startPage -= pageBlock; } System.out.println("startPage : " + startPage); - + // 마지막 페이지 // 3 = 1 + 3 - 1 endPage = startPage + pageBlock - 1; - if(endPage > pageCount) { + if (endPage > pageCount) { endPage = pageCount; } System.out.println("endPage : " + endPage); - + System.out.println("==================================="); - + Map map = new HashMap(); map.put("start", start); map.put("end", end); map.put("search", search); - + ArrayList dtos = null; - if(cnt > 0) { + if (cnt > 0) { // 5-2단계. 회원수 조회 dtos = dao.searchDepositProduct(map); } - + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 - model.addAttribute("dtos", dtos); // 검색된 예금 상품 목록 - model.addAttribute("cnt", cnt); // 예금 상품 수 - model.addAttribute("pageNum", pageNum); // 페이지 번호 - model.addAttribute("number", number); // 출력용 번호 - model.addAttribute("search", search); // 검색어 - if(cnt > 0) { - model.addAttribute("startPage", startPage); // 시작 페이지 - model.addAttribute("endPage", endPage); // 마지막 페이지 - model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 - model.addAttribute("pageCount", pageCount); // 페이지 갯수 - model.addAttribute("currentPage", currentPage); // 현재 페이지 + model.addAttribute("dtos", dtos); // 검색된 예금 상품 목록 + model.addAttribute("cnt", cnt); // 예금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 } } - - //예금 상품 상세보기 + + // 예금 상품 상세보기 @Override public void depositDetail(HttpServletRequest req, Model model) { // http://localhost/jsp_mvcBoard_jjh/boardDetail.bo?=num=30&pageNum=1&number=30 @@ -980,193 +1000,2322 @@ public void depositDetail(HttpServletRequest req, Model model) { req.setAttribute("pageNum", pageNum); req.setAttribute("number", number); } - - //예금 신청 + + // 예금 신청 하기상세 화면 @Override - public void insertDeposit(HttpServletRequest req, Model model) { + public void setDepositProductJoin(HttpServletRequest req, Model model) { + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); String deposit_product_name = req.getParameter("deposit_product_name"); - - //작은바구니 생성 + String deposit_product_interRate = req.getParameter("deposit_product_interRate"); + Float interRate = Float.valueOf(deposit_product_interRate); + String deposit_product_summary = req.getParameter("deposit_product_summary"); + String id = req.getParameter("customerID"); + + String unique_key = dao.getUniqueKey(id); + String account_id = createAccountId(Integer.parseInt(req.getParameter("deposit_product_bankCode"))); + // 작은 바구니 생성 DepositProductVO vo = new DepositProductVO(); + vo.setDeposit_product_name(deposit_product_name); + vo.setDeposit_product_bankCode(Integer.parseInt(req.getParameter("deposit_product_bankCode"))); + vo.setDeposit_product_interRate(interRate); + vo.setDeposit_product_minPrice(Integer.parseInt(req.getParameter("deposit_product_minPrice"))); + vo.setDeposit_product_summary(deposit_product_summary); - } + + req.setAttribute("unique_key", unique_key); + req.setAttribute("account_id", account_id); + req.setAttribute("dto", vo); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); - // 환율 데이터 입력 후 출력(지호) - @Scheduled(cron = "0 0/5 9-17 * * *") // 9시부터 17시까지 - @Scheduled(fixedRate = 6000) // 1분마다 한번씩 + } + + // 예금 가입시 계좌 개설(insert account) @Override - public void exchanges(HttpServletRequest req, Model model) { + public void makeAccount(HttpServletRequest req, Model model) { + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); - String country =""; - String strJson=""; - String rate=""; - String exchange_country=""; - JSONArray array = null; - JSONObject obj = null; - JSONObject obj2 = null; - int num = 0; - List list = null; - CrawlerVO vo = null; - // db에 있는 환율 가져올 list - //List listRate =null; - String listRate = ""; - try { - strJson = Jsoup.connect("http://fx.kebhana.com/FER1101M.web").get().select("body").text().replaceAll("},] }", "} ]"); - // 0번째 부터 시작 - strJson = strJson.substring(strJson.indexOf("[")); - list = new ArrayList(); - - // JSONArray에 "리스트" : [] 출력 - array = new JSONArray(strJson); - //System.out.println("array.length :" + array.length()); // 49 - // 환율 db체크 - obj2 = new JSONObject(array.get(1).toString()); - exchange_country = obj2.get("통화명").toString(); - num = dao.exchangeChk(exchange_country); - System.out.println("num : " + num); - - // 환율 데이터 저장 - if(num != 1) { - for(int i=0; i 예금 (1) + // vo.setAccount_limit(account_limit); + vo.setAccount_bankCode(Integer.parseInt(req.getParameter("account_bankCode"))); + vo.setUnique_key(req.getParameter("unique_key")); + vo.setAccount_balance(Integer.parseInt(req.getParameter("account_balance"))*10000); + //예금은 한도 = 예치금 = 잔액 + + int insertCnt = dao.insertAccount(vo); + + req.setAttribute("insertCnt", insertCnt); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); } - - //환율 목록 출력(지호) - @Scheduled(cron = "0 0/5 9-17 * * *") // 9시부터 17시까지 - @Scheduled(fixedRate = 6000) // 1분마다 한번씩 + + // 예금 가입시 예금(deposit) 테이블 insert @Override - public void exchangeList(HttpServletRequest req, Model model) { + public void insertDeposit(HttpServletRequest req, Model model) { + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + String deposit_product_name = req.getParameter("deposit_product_name"); + + // 작은바구니 생성 + DepositVO vo = new DepositVO(); + + String account_id = req.getParameter("account_id"); + vo.setDeposit_product_name(deposit_product_name); + vo.setAccount_id(account_id); + String deposit_rate = req.getParameter("deposit_product_interRate"); + Float rate = Float.valueOf(deposit_rate); + vo.setDeposit_rate(rate); + vo.setDeposit_type(Integer.parseInt(req.getParameter("deposit_product_type"))); + String deposit_endDate = req.getParameter("deposit_endDate"); + Date date = Date.valueOf(deposit_endDate); + vo.setDeposit_endDate(date); + /* + * vo.setDeposit_balance(Integer.parseInt(req.getParameter("deposit_balance"))); + */ + + int insertDeposit = dao.insertDeposit(vo); + + req.setAttribute("insertDeposit", insertDeposit); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + + } - String strJson=""; - String exchange_country =""; - String exchange_rate=""; - String exchange_buy=""; - String exchange_sell=""; - String exchange_transfer=""; - String exchange_recive=""; - JSONArray array = null; - JSONObject obj = null; - List list = null; - CrawlerVO vo = null; - // db에 있는 환율 가져올 list - try { - strJson = Jsoup.connect("http://fx.kebhana.com/FER1101M.web").get().select("body").text().replaceAll("},] }", "} ]"); - // 0번째 부터 시작 - strJson = strJson.substring(strJson.indexOf("[")); - list = new ArrayList(); - - // JSONArray에 "리스트" : [] 출력 - array = new JSONArray(strJson); - - // 환율 데이터 저장 - for(int i=0; i " + cnt); + + // 5-2단계. 게시글 목록 조회 + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫페이지를 1페이지로 지정 + } + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize +1; + // 1 = (1 - 1 )* 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5 //1페이지 + // number = cnt- (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("--------------------------"); + + List dtos = null; + + if (cnt > 0) { + // 5-2단계. 게시글 목록 조회 + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + dtos = dao.getIrpList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dtos", dtos); // 게시글 목록 + req.setAttribute("cnt", cnt); // 글개수 + req.setAttribute("pageNum", pageNum); // 페이지 번호 + req.setAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + req.setAttribute("startPage", startPage); // 시작페이지 + req.setAttribute("endPage", endPage); // 마지막 페이지 + req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 + req.setAttribute("pageCount", pageCount); // 페이지 갯수 + req.setAttribute("currentPage", currentPage); // 현재페이지 } - model.addAttribute("list", list); } - // 가계부 내역 추가 - public void insertAccountBook(HttpServletRequest req, Model model) { - // 로그인한 아이디 받아오기 - String member_id = (String) req.getSession().getAttribute("customerID"); - - AccountBookVO vo = new AccountBookVO(); - vo.setMember_id(member_id); - vo.setIncome(Integer.parseInt(req.getParameter("income"))); - vo.setExpense(Integer.parseInt(req.getParameter("expense"))); - vo.setRegister_date(req.getParameter("register_date")); - - int insertCnt = dao.insertAccountBook(vo); - System.out.println("가계부내역추가 insertCnt : " + insertCnt); - model.addAttribute("insertCnt", insertCnt); - } + + // 연금 상품 검색 + @Override + public void irpProductSearch(HttpServletRequest req, Model model) { + + // 입력받은 검색어 + String search = req.getParameter("search"); + System.out.println("관리자 페이지 회원 검색어 : " + search); + + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 예금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 예금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 검색 된 예금 상품 수 조회 + cnt = dao.getIrpProductSearchCnt(search); + System.out.println("검색 된 적금 상품 수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if(pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1 ; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + //number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if(currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if(endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("search", search); + + ArrayList dtos = null; + if(cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.searchIrpProduct(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 검색된 적금 상품 목록 + model.addAttribute("cnt", cnt); // 적금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if(cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 연금 상품 상세보기 + @Override + public void irpDetail(HttpServletRequest req, Model model) { + String irp_product_name = req.getParameter("irp_product_name"); + System.out.println("irp_product_name : " + irp_product_name); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + + // 5-2단계. 게시글 상세페이지 조회 + // getQnaDetail + IrpProductVO vo = dao.getIrpDetail(irp_product_name); + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dto", vo); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + } + + //연금 신청 상세화면 + @Override + public void irpProductJoin(HttpServletRequest req, Model model) { + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + + String unique_key = dao.getUniqueKey(req.getParameter("customerID")); + String account_id = createAccountId(Integer.parseInt(req.getParameter("irp_product_bankCode"))); + // 작은 바구니 생성 + IrpProductVO vo = new IrpProductVO(); + vo.setIrp_product_name(req.getParameter("irp_product_name")); + vo.setIrp_product_bankCode(Integer.parseInt(req.getParameter("irp_product_bankCode"))); + vo.setIrp_product_interRate(Float.valueOf(req.getParameter("irp_product_interRate"))); + vo.setIrp_product_summary(req.getParameter("irp_product_summary")); + + req.setAttribute("unique_key", unique_key); + req.setAttribute("account_id", account_id); + req.setAttribute("dto", vo); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + } + + // 연금 가입시 연금(deposit) 테이블 insert + @Override + public void insertIrp(HttpServletRequest req, Model model) { + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + String irp_product_name = req.getParameter("irp_product_name"); + + // 작은바구니 생성 + IrpVO vo = new IrpVO(); + + String account_id = req.getParameter("account_id"); + vo.setIrp_product_name(irp_product_name); + vo.setAccount_id(account_id); + String deposit_rate = req.getParameter("deposit_product_interRate"); + Float rate = Float.valueOf(deposit_rate); +// vo.setDeposit_rate(rate); +// vo.setDeposit_type(Integer.parseInt(req.getParameter("deposit_product_type"))); +// String deposit_endDate = req.getParameter("deposit_endDate"); +// Date date = Date.valueOf(deposit_endDate); +// vo.setDeposit_endDate(date); +// /* +// * vo.setDeposit_balance(Integer.parseInt(req.getParameter("deposit_balance"))); +// */ +// +// int insertDeposit = dao.insertDeposit(vo); + +// req.setAttribute("insertDeposit", insertDeposit); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + + } + + // 적금 상품 조회 + @Override + public void savingList(HttpServletRequest req, Model model) { + // 3단계. 화면으로부터 입력받은 값을 받아온다. + // 페이징 + int pageSize = 8; // 한페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블록당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재페이지 시작 글 번호 + int end = 0; // 현재페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작페이지 + int endPage = 0; // 마지막페이지 + + // 5-1단계. 게시글 갯수 조회 + cnt = dao.getSavingCnt(); + + System.out.println("cnt ==> " + cnt); + + // 5-2단계. 게시글 목록 조회 + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫페이지를 1페이지로 지정 + } + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize +1; + // 1 = (1 - 1 )* 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5 //1페이지 + // number = cnt- (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("--------------------------"); + + List dtos = null; + + if (cnt > 0) { + // 5-2단계. 게시글 목록 조회 + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + dtos = dao.getSavingList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dtos", dtos); // 게시글 목록 + req.setAttribute("cnt", cnt); // 글개수 + req.setAttribute("pageNum", pageNum); // 페이지 번호 + req.setAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + req.setAttribute("startPage", startPage); // 시작페이지 + req.setAttribute("endPage", endPage); // 마지막 페이지 + req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 + req.setAttribute("pageCount", pageCount); // 페이지 갯수 + req.setAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 적금 상품 검색 + @Override + public void savingProductSearch(HttpServletRequest req, Model model) { + + // 입력받은 검색어 + String search = req.getParameter("search"); + System.out.println("관리자 페이지 회원 검색어 : " + search); + + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 적금상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 적금상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 검색 된 예금 상품 수 조회 + cnt = dao.getSavingProductSearchCnt(search); + System.out.println("검색 된 적금 상품 수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if(pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1 ; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + //number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if(currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if(endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("search", search); + + ArrayList dtos = null; + if(cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.searchSavingProduct(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 검색된 적금 상품 목록 + model.addAttribute("cnt", cnt); // 적금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if(cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + //적금 상품 상세보기 + @Override + public void savingDetail(HttpServletRequest req, Model model) { + String saving_product_name = req.getParameter("saving_product_name"); + System.out.println("saving_product_name : " + saving_product_name); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + + // 5-2단계. 게시글 상세페이지 조회 + // getQnaDetail + SavingProductVO vo = dao.getSavingDetail(saving_product_name); + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dto", vo); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + } + + // 적금 신청 + @Override + public void savingProductAction(HttpServletRequest req, Model model) { + + //작은바구니 생성 + + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + String id = (String)req.getSession().getAttribute("customerID"); + + // members 테이블에 있는 unique키 가져오기 + String unique_key = dao.getUniqueKey(id); + + // 계좌생성 메서드 -> 은행코드 가져와서 생성 + String account_id = createAccountId(Integer.parseInt(req.getParameter("deposit_product_bankCode"))); + + SavingProductVO vo = new SavingProductVO(); + vo.setSaving_product_name(req.getParameter("saving_product_name")); + vo.setSaving_product_interRate(Float.parseFloat(req.getParameter("saving_product_interRate"))); + vo.setSaving_product_type(Integer.parseInt(req.getParameter("saving_product_type"))); + vo.setSaving_product_maxDate(Integer.parseInt(req.getParameter("saving_product_maxDate"))); + vo.setSaving_product_minDate(Integer.parseInt(req.getParameter("saving_product_minDate"))); + vo.setSaving_product_minPrice(Integer.parseInt(req.getParameter("saving_product_minPrice"))); + vo.setSaving_product_bankCode(Integer.parseInt(req.getParameter("saving_product_bankCode"))); + vo.setSaving_product_summary(req.getParameter("saving_product_summary")); + + int insertCnt = dao.savingProductAction(vo); + + model.addAttribute("unique_key", unique_key); + model.addAttribute("account_id", account_id); + model.addAttribute("vo", vo); + model.addAttribute("pageNum", pageNum); + model.addAttribute("number", number); + model.addAttribute("inserCnt", insertCnt); + } + + // + // 적금 상품 조회 + @Override + public void fundList(HttpServletRequest req, Model model) { + // 3단계. 화면으로부터 입력받은 값을 받아온다. + // 페이징 + int pageSize = 8; // 한페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블록당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재페이지 시작 글 번호 + int end = 0; // 현재페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작페이지 + int endPage = 0; // 마지막페이지 + + // 5-1단계. 게시글 갯수 조회 + cnt = dao.getFundCnt(); + + System.out.println("cnt ==> " + cnt); + + // 5-2단계. 게시글 목록 조회 + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫페이지를 1페이지로 지정 + } + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지 있으면 1페이지 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize +1; + // 1 = (1 - 1 )* 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5 //1페이지 + // number = cnt- (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("--------------------------"); + + List dtos = null; + + if (cnt > 0) { + // 5-2단계. 게시글 목록 조회 + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + dtos = dao.getFundList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dtos", dtos); // 게시글 목록 + req.setAttribute("cnt", cnt); // 글개수 + req.setAttribute("pageNum", pageNum); // 페이지 번호 + req.setAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + req.setAttribute("startPage", startPage); // 시작페이지 + req.setAttribute("endPage", endPage); // 마지막 페이지 + req.setAttribute("pageBlock", pageBlock); // 한블럭당 페이지 갯수 + req.setAttribute("pageCount", pageCount); // 페이지 갯수 + req.setAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 펀드 상품 검색 + @Override + public void fundProductSearch(HttpServletRequest req, Model model) { + + // 입력받은 검색어 + String search = req.getParameter("search"); + System.out.println("관리자 페이지 회원 검색어 : " + search); + + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 펀드상품 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 펀드상품 수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글 번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 검색 된 펀드 상품 수 조회 + cnt = dao.getFundProductSearchCnt(search); + System.out.println("검색 된 펀드 상품 수 : " + cnt); + + pageNum = req.getParameter("pageNum"); + + if(pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 상품 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6 = (회원수 30건 / 한 페이지당 10개) + 나머지0 + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재 페이지 시작 글 번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 10 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재 페이지 시작 글 번호(페이지별) + // end = start + pageSize - 1; + // 10 = 1 + 10 - 1 + end = start + pageSize - 1 ; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글 번호 + //number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if(currentPage % pageBlock == 0) { + startPage -= pageBlock; + } + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if(endPage > pageCount) { + endPage = pageCount; + } + System.out.println("endPage : " + endPage); + + System.out.println("==================================="); + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("search", search); + + ArrayList dtos = null; + if(cnt > 0) { + // 5-2단계. 회원수 조회 + dtos = dao.searchFundProduct(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("dtos", dtos); // 검색된 펀드 상품 목록 + model.addAttribute("cnt", cnt); // 적금 상품 수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 번호 + model.addAttribute("search", search); // 검색어 + if(cnt > 0) { + model.addAttribute("startPage", startPage); // 시작 페이지 + model.addAttribute("endPage", endPage); // 마지막 페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + // 펀드 상품 상세보기 + @Override + public void fundDetail(HttpServletRequest req, Model model) { + String fund_title = req.getParameter("fund_title"); + System.out.println("fund_title : " + fund_title); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + + // 5-2단계. 게시글 상세페이지 조회 + // getQnaDetail + FundProductVO vo = dao.getFundDetail(fund_title); + + // 6단계. jsp로 전달하기 위해 request나 session에 처리 결과를 저장 + req.setAttribute("dto", vo); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + } + + // 펀드 신청 + @Override + public void fundProductAction(HttpServletRequest req, Model model) { + + //작은바구니 생성 + FundProductVO vo = new FundProductVO(); +// vo.setSaving_product_name(req.getParameter("saving_product_name")); +// vo.setSaving_product_interRate(Float.parseFloat(req.getParameter("saving_product_interRate"))); +// vo.setSaving_product_type(Integer.parseInt(req.getParameter("saving_product_type"))); +// vo.setSaving_product_maxDate(Integer.parseInt(req.getParameter("saving_product_maxDate"))); +// vo.setSaving_product_minDate(Integer.parseInt(req.getParameter("saving_product_minDate"))); +// vo.setSaving_product_minPrice(Integer.parseInt(req.getParameter("saving_product_minPrice"))); +// vo.setSaving_product_bankCode(Integer.parseInt(req.getParameter("saving_product_bankCode"))); + + int insertCnt = dao.fundProductAction(vo); + + model.addAttribute("inserCnt", insertCnt); + } + + + // 환율 데이터 입력 후 출력(지호) + @Scheduled(cron = "0 0/5 9-17 * * *") // 9시부터 17시까지 + @Scheduled(fixedRate = 6000) // 1분마다 한번씩 + @Override + public void exchanges(Model model) { + + String country =""; + String strJson=""; + String rate=""; + String exchange_country=""; + JSONArray array = null; + JSONObject obj = null; + JSONObject obj2 = null; + int num = 0; + List list = null; + CrawlerVO vo = null; + // db에 있는 환율 가져올 list + // List listRate =null; + String listRate = ""; + try { + strJson = Jsoup.connect("http://fx.kebhana.com/FER1101M.web").get().select("body").text() + .replaceAll("},] }", "} ]"); + // 0번째 부터 시작 + strJson = strJson.substring(strJson.indexOf("[")); + list = new ArrayList(); + + // JSONArray에 "리스트" : [] 출력 + array = new JSONArray(strJson); + // System.out.println("array.length :" + array.length()); // 49 + // 환율 db체크 + obj2 = new JSONObject(array.get(1).toString()); + exchange_country = obj2.get("통화명").toString(); + num = dao.exchangeChk(exchange_country); + System.out.println("num : " + num); + + // 환율 데이터 저장 + if (num != 1) { + for (int i = 0; i < array.length(); i++) { + System.out.println("환율 데이터 저장"); + obj = new JSONObject(array.get(i).toString()); + country = obj.get("통화명").toString(); + rate = obj.get("매매기준율").toString(); + vo = new CrawlerVO(country, rate); + dao.exchangeIn(vo); + + // 화면 출력용 + if (i < 6) { + obj = new JSONObject(array.get(i).toString()); + country = obj.get("통화명").toString(); + rate = obj.get("매매기준율").toString(); + vo = new CrawlerVO(country, rate); + list.add(vo); + } + + } + } else { + // 환율 최신화 + System.out.println("array.length :" + array.length()); + for (int i = 0; i < array.length(); i++) { + System.out.println("환율 최신화"); + obj = new JSONObject(array.get(i).toString()); + country = obj.get("통화명").toString(); + rate = obj.get("매매기준율").toString(); + + // 최신화 전 환율 비교 + listRate = dao.exchangeVary(country); + + //double lr = (((Double.parseDouble(rate)*100) / Double.parseDouble(listRate.get(i))) -100)*100; + double lr = (((Double.parseDouble(rate)*100) / Double.parseDouble(listRate)) -100)*100; + double compare = Math.round(lr*100)/100.0; + System.out.println("compare : " + compare); + + String comStr = String.format("%1$,.2f", compare); + // 최신화 + dao.exchangeUpd(vo); + + // 증감률 까지 + vo = new CrawlerVO(country, rate, comStr); + list.add(vo); + // 화면 출력용 +// if(i<6) { +// obj = new JSONObject(array.get(i).toString()); +// country = obj.get("통화명").toString(); +// rate = obj.get("매매기준율").toString(); +// vo = new CrawlerVO(country, rate, compare); +// list.add(vo); +// } + + } + } + } catch (Exception e) { + + } + model.addAttribute("list", list); + } + + // 환율 목록 출력(지호) + @Scheduled(cron = "0 0/5 9-17 * * *") // 9시부터 17시까지 + @Scheduled(fixedRate = 6000) // 1분마다 한번씩 + @Override + public void exchangeList(HttpServletRequest req, Model model) { + + String strJson = ""; + String exchange_country = ""; + String exchange_rate = ""; + String exchange_buy = ""; + String exchange_sell = ""; + String exchange_transfer = ""; + String exchange_recive = ""; + JSONArray array = null; + JSONObject obj = null; + List list = null; + CrawlerVO vo = null; + // db에 있는 환율 가져올 list + try { + strJson = Jsoup.connect("http://fx.kebhana.com/FER1101M.web").get().select("body").text() + .replaceAll("},] }", "} ]"); + // 0번째 부터 시작 + strJson = strJson.substring(strJson.indexOf("[")); + list = new ArrayList(); + + // JSONArray에 "리스트" : [] 출력 + array = new JSONArray(strJson); + + // 환율 데이터 저장 + for (int i = 0; i < array.length(); i++) { + System.out.println("환율 데이터 출력"); + obj = new JSONObject(array.get(i).toString()); + exchange_country = obj.get("통화명").toString(); + exchange_rate = obj.get("매매기준율").toString(); + exchange_buy = obj.get("현찰사실때").toString(); + exchange_sell = obj.get("현찰파실때").toString(); + exchange_transfer = obj.get("송금_전신환보내실때").toString(); + exchange_recive = obj.get("송금_전신환받으실때").toString(); + + vo = new CrawlerVO(exchange_country, exchange_rate, exchange_buy, exchange_sell, exchange_transfer, + exchange_recive); + list.add(vo); + + } + } catch (Exception e) { + + } + model.addAttribute("list", list); + } + + // 회원 계좌 찾기 + @Override + public void getAccount(HttpServletRequest req, Model model) { + + String strId = (String) req.getSession().getAttribute("customerID"); + System.out.println("서비스확인(회원 아이디strId): " + strId); + List list = null; + list = dao.accountFind(strId); + + System.out.println("list: " + list.size()); + + for (int i = 0; i < list.size(); i++) { + System.out.println(list.get(i) + " "); + } + + model.addAttribute("dtos", list); + } + + // 회원 계좌 비밀번호 확인 + @Override + public void accountPwdConfirm(HttpServletRequest req, Model model) { + String strId = req.getParameter("account_password"); + + int cnt = dao.account_pwd(strId); + System.out.println("서비스확인(account_password): " + cnt); + + model.addAttribute("selectCnt", cnt); + model.addAttribute("account_password", strId); + } + + // 회원 이체 + @Override + public void transferConfirm(HttpServletRequest req, Model model) { + + String member_id = (String) req.getSession().getAttribute("CustomerID"); + String account_id = req.getParameter("account_id"); + int account_password = Integer.parseInt(req.getParameter("account_password")); + + int account_bank = Integer.parseInt(req.getParameter("account_bank")); + String transfer_senderAccount = req.getParameter("transfer_senderAccount"); + int transfer_money = Integer.parseInt(req.getParameter("transfer_money")); + + System.out.println("서비스 확인(member_id): " + member_id); + System.out.println("서비스 확인(account_id): " + account_id); + System.out.println("서비스 확인(account_password): " + account_password); + System.out.println("서비스 확인(account_bank): " + account_bank); + + TransferVO vo = new TransferVO(); + vo.setAccount_id(account_id); + vo.setTransfer_bankCode(account_bank); + vo.setTransfer_senderAccount(transfer_senderAccount); + vo.setTransfer_money(transfer_money); + + String transfer_inComment = ""; + transfer_inComment = req.getParameter("transfer_inComment"); + if (!transfer_inComment.equals("")) { + vo.setTransfer_inComment(transfer_inComment); + } + + String transfer_outComment = ""; + transfer_outComment = req.getParameter("transfer_outComment"); + if (!transfer_outComment.equals("")) { + vo.setTransfer_outComment(transfer_outComment); + } + + } + // test +// @Override // json형태로 한번에 넣는 +// public void test(HttpServletRequest req, Model model) { +// String country =""; +// String strJson=""; +// String rate=""; +// String exchange_country=""; +// JSONArray array = null; +// JSONObject obj = null; +// JSONObject obj2 = null; +// int num = 0; +// List list = null; +// CrawlerVO vo = null; +// // db에 있는 환율 가져올 list +// //List listRate =null; +// String listRate = ""; +// try { +// strJson = Jsoup.connect("http://fx.kebhana.com/FER1101M.web").get().select("body").text().replaceAll("},] }", "} ]"); +// strJson = strJson.substring(strJson.indexOf("[")); +// ObjectMapper mapper = new ObjectMapper(); +// +// String jsonStr = mapper.writeValueAsString(strJson); +// String json1 = jsonStr.substring(0,3472); +// String json2 = jsonStr.substring(3473, 7013); +// list = new ArrayList(); +// list.add(json1); +// list.add(json2); +// int insertCnt = dao.jsonIn(list); +// System.out.println("insertCnt : " + insertCnt); +// }catch(Exception e) { +// +// } +// } + + + // 가계부 내역 추가 + public void insertAccountBook(HttpServletRequest req, Model model) { + // 로그인한 아이디 받아오기 + String member_id = (String) req.getSession().getAttribute("customerID"); + + AccountBookVO vo = new AccountBookVO(); + vo.setMember_id(member_id); + vo.setIncome(Integer.parseInt(req.getParameter("income"))); + vo.setExpense(Integer.parseInt(req.getParameter("expense"))); + vo.setRegister_date(req.getParameter("register_date")); + + int insertCnt = dao.insertAccountBook(vo); + System.out.println("가계부내역추가 insertCnt : " + insertCnt); + model.addAttribute("insertCnt", insertCnt); + } // 가계부 내역 삭제 public void deleteAccountBook(HttpServletRequest req, Model model) { // 로그인한 아이디 받아오기 String member_id = (String) req.getSession().getAttribute("customerID"); - AccountBookVO vo = new AccountBookVO(); - vo.setMember_id(member_id); - vo.setRegister_date(req.getParameter("register_date")); + AccountBookVO vo = new AccountBookVO(); + vo.setMember_id(member_id); + vo.setRegister_date(req.getParameter("register_date")); + + int deleteCnt = dao.deleteAccountBook(vo); + System.out.println("가계부내역삭제 deleteCnt : " + deleteCnt); + model.addAttribute("deleteCnt", deleteCnt); + } + + // 가계부 내역 조회 + public void getAccountBook(HttpServletRequest req, Model model) { + // 로그인한 아이디 받아오기 + String member_id = (String) req.getSession().getAttribute("customerID"); + ArrayList list = dao.getAccountBook(member_id); + ArrayList report = dao.getAccountBookReport(member_id); + + model.addAttribute("report", report); + model.addAttribute("list", list); + System.out.println("report 사이즈 : " + report.size()); + } + + // 예금 리스트(민재) + @Override + public void myDepositList(HttpServletRequest req, Model model) { + System.out.println("[보유상품목록 => 예금화면]"); + + String strId = (String) req.getSession().getAttribute("customerID"); + // strId = "kim"; + System.out.println("strId : " + strId); + + // 회원 이름 가져오기 + String member_name = dao.getName(strId); + System.out.println("member_name : " + member_name); + + req.setAttribute("member_name", member_name); + req.setAttribute("boardName", "예금"); + } + + // 예금서브 리스트(민재) + @Override + public void myDepositSubList(HttpServletRequest req, Model model) { + System.out.println("[보유상품목록 => 예금서브리스트]"); + + String strId = (String) req.getSession().getAttribute("customerID"); + // strId = "kim"; + System.out.println("strId : " + strId); + + int selectValue = Integer.parseInt(req.getParameter("select")); + System.out.println("selectValue : " + selectValue); + + Map map = new HashMap(); + map.put("member_id", strId); + map.put("account_type", 1); + + List list; + // 리스트 가져오기 + if(selectValue == 0) { + list = dao.depositList(map); + } else { + map.put("account_bankCode", selectValue); + list = dao.depositSubList(map); + } + + int cnt = list.size(); + System.out.println("cnt : " + cnt); + System.out.println("list : " + list); + System.out.println("서브리스트"); + req.setAttribute("boardName", "예금"); + req.setAttribute("list", list); + req.setAttribute("cnt", cnt); + } + + // 적금 리스트(민재) + @Override + public void mySavingList(HttpServletRequest req, Model model) { + System.out.println("[보유상품목록 => 적금화면]"); + + String strId = (String) req.getSession().getAttribute("customerID"); + // strId = "kim"; + System.out.println("strId : " + strId); + + // 회원 이름 가져오기 + String member_name = dao.getName(strId); + System.out.println("member_name : " + member_name); + + req.setAttribute("member_name", member_name); + req.setAttribute("boardName", "적금"); + } + + // 적금서브 리스트(민재) + @Override + public void mySavingSubList(HttpServletRequest req, Model model) { + System.out.println("[보유상품목록 => 적금서브리스트]"); + + String strId = (String) req.getSession().getAttribute("customerID"); + // strId = "kim"; + System.out.println("strId : " + strId); + + int selectValue = Integer.parseInt(req.getParameter("select")); + System.out.println("selectValue : " + selectValue); + + Map map = new HashMap(); + map.put("member_id", strId); + map.put("account_type", 2); + + List list; + // 리스트 가져오기 + if(selectValue == 0) { + list = dao.savingList(map); + } else { + map.put("account_bankCode", selectValue); + list = dao.savingSubList(map); + } + + int cnt = list.size(); + System.out.println("cnt : " + cnt); + System.out.println("list : " + list); + System.out.println("서브리스트"); + req.setAttribute("boardName", "적금"); + req.setAttribute("list", list); + req.setAttribute("cnt", cnt); + } + + // 연금 리스트(민재) + @Override + public void myIrpList(HttpServletRequest req, Model model) { + System.out.println("[보유상품목록 => 연금화면]"); + + String strId = (String) req.getSession().getAttribute("customerID"); + // strId = "kim"; + System.out.println("strId : " + strId); + + // 회원 이름 가져오기 + String member_name = dao.getName(strId); + System.out.println("member_name : " + member_name); + + req.setAttribute("member_name", member_name); + req.setAttribute("boardName", "연금"); + + List list = null; + // 리스트 가져오기 + Map map = new HashMap(); + map.put("member_id", strId); + map.put("account_type", 3); + + list = dao.irpList(map); + + int cnt = list.size(); + System.out.println("cnt : " + cnt); + System.out.println("list : " + list); + System.out.println("서브리스트"); + req.setAttribute("boardName", "연금"); + req.setAttribute("list", list); + req.setAttribute("cnt", cnt); + } + + // 공지사항리스트(민재) + @Override + public void noticeList(HttpServletRequest req, Model model) { + System.out.println("[고객센터목록 => 공지사항리스트]"); + + // 3단계. 화면으로부터 입력받은 값을 받아온다. + // 페이징 + int pageSize = 10; // 한 페이지당 출력할 글 갯수 + int pageBlock = 5; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글번호 + int end = 0; // 현재 페이지 마지막 글번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + // 4단계. 다형성 적용, 싱글톤 방식으로 dao 객체 생성 + + // 5-1단계. 게시글 갯수 조회 + cnt = dao.getNoticeCnt(); + System.out.println("cnt ==> " + cnt); + + pageNum = req.getParameter("pageNum"); + + + if(pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 // 6페이지 = (30건 / 한 페이지당 5건 ) + (나머지 : 0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지갯수 + 나머지 있으면 1페이지 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1 - 1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if(currentPage % pageBlock == 0) startPage -= pageBlock; + System.out.println("starPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1; + endPage = startPage + pageBlock - 1; + if(endPage > pageCount) endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("================================"); + + List list = null; + + if(cnt>0) { + // 5-2단계. 게시글 목록 조회 + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + list = dao.getNoticeList(map); + System.out.println("list : " + list); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + req.setAttribute("list", list); // 게시글목록 + req.setAttribute("cnt", cnt); // 글갯수 + req.setAttribute("pageNum", pageNum); // 페이지번호 + req.setAttribute("number", number); // 출력용 글번호 + + if(cnt>0) { + req.setAttribute("startPage", startPage); // 시작페이지 + req.setAttribute("endPage", endPage); // 마지막페이지 + req.setAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + req.setAttribute("pageCount", pageCount); // 페이지 갯수 + req.setAttribute("currentPage", currentPage); // 현재 페이지 + } + } + + + // 계좌 생성 Method + public String createAccountId(int account_type) { + String account_id = ""; + + if(account_type == 1) { + // 국민(14) > 6 - 2 - 6 + String st1 = String.format("%06d", (int)(Math.random()*1000000)); + String st2 = String.format("%02d", (int)(Math.random()*100)); + String st3 = String.format("%06d", (int)(Math.random()*1000000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } else if(account_type ==2) { + // 우리(13) > 4 - 3 - 6 + String st1 = String.format("%04d", (int)(Math.random()*10000)); + String st2 = String.format("%03d", (int)(Math.random()*1000)); + String st3 = String.format("%06d", (int)(Math.random()*1000000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } else if(account_type ==3) { + // 농협(13) > 3 - 4 - 4 - 2 + String st1 = String.format("%03d", (int)(Math.random()*1000)); + String st2 = String.format("%04d", (int)(Math.random()*10000)); + String st3 = String.format("%04d", (int)(Math.random()*10000)); + String st4 = String.format("%02d", (int)(Math.random()*100)); + + account_id = st1 + "-" + st2 + "-" + st3 + "-" + st4; + + System.out.println("account_id : " + account_id); + + } else if(account_type ==4) { + // 신한(12) > 3 - 3 - 6 + String st1 = String.format("%03d", (int)(Math.random()*1000)); + String st2 = String.format("%03d", (int)(Math.random()*1000)); + String st3 = String.format("%06d", (int)(Math.random()*1000000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } else if(account_type ==5) { + // 하나(14) > 3 - 6 - 5 + String st1 = String.format("%03d", (int)(Math.random()*1000)); + String st2 = String.format("%06d", (int)(Math.random()*1000000)); + String st3 = String.format("%05d", (int)(Math.random()*100000)); + + account_id = st1 + "-" + st2 + "-" + st3; + + System.out.println("account_id : " + account_id); + + } + + return account_id; + } + + + // 공지사항 상세페이지(민재) + @Override + public void noticeDetailAction(HttpServletRequest req, Model model) { + System.out.println("[고객센터목록 => 공지사항상세페이지]"); + + // 화면으로부터 값 받아오기(get방식) + int notice_num = Integer.parseInt(req.getParameter("notice_num")); + int pageNum = Integer.parseInt(req.getParameter("pageNum")); + int number = Integer.parseInt(req.getParameter("number")); + + String id = (String)req.getSession().getAttribute("customerID"); + + // 조회수증가(관리자 조회수파악용) => 관리자는 타면 안된다. + if (id != null) { + dao.addNoticeReadCnt(notice_num); + } + + // 게시글 상세조회 + NoticeVO vo = dao.getNoticeDetail(notice_num); + + // jsp로 전송 + req.setAttribute("vo", vo); + req.setAttribute("pageNum", pageNum); + req.setAttribute("number", number); + } + + // 대출 해지 목록 + public void loanCancelList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[UserService => loanCancelList()]"); + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanCancelCnt((String) req.getSession().getAttribute("customerID")); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loans = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("member_id", req.getSession().getAttribute("customerID")); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loans = dao.getLoanCancelList(map); + System.out.println(loans); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loans", loans); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + //대출 해지 액션 + public void loanAccountCancelAction(HttpServletRequest req, Model model) { + //loanid에서 해지state + Map map = new HashMap(); + map.put("loan_id", req.getParameter("loan_id")); + map.put("state", 4); // 해지 + int updateCnt = dao.loanRequestAction(map); + + LoanVO loan = dao.getLoanInfo(map); + //account 에서 돈 빠져나가고 해지 + String member_id = (String) req.getSession().getAttribute("customerID"); + UserVO user = dao.getUserInfo(member_id); + map.clear(); + map.put("unique_key", user.getUnique_key()); + map.put("account_id", loan.getAccount_id()); + AccountVO account = dao.getAccountInfo(map); + + map.put("account_balance", account.getAccount_balance() - loan.getLoan_balance()); + int updateCnt3 = dao.accountPayment(map); + int updateCnt2 = dao.loanAccountState1(map); + + model.addAttribute("updateCnt", updateCnt); + model.addAttribute("updateCnt2", updateCnt2); + model.addAttribute("updateCnt3", updateCnt3); + + } + + // 보유중인 대출 목록 + public void loanList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[UserService => loanList()]"); + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + String member_id = (String) req.getSession().getAttribute("customerID"); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + Map map = new HashMap(); + map.put("member_id", member_id); + cnt = dao.getLoanCnt(map); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loans = null; + + map.put("start", start); + map.put("end", end); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loans = dao.getLoanList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loans", loans); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // 대출 상품 목록 + public void loanProductList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanProductList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanProductCnt(); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loanProducts = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loanProducts = dao.getLoanProductList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loanProducts", loanProducts); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // 대출 상품 검색 + public void searchLoanProductList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanProductList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + String keyword = (String) req.getParameter("keyword"); + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getSearchLoanProductCnt(keyword); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loanProducts = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("keyword", keyword); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loanProducts = dao.searchLoanProductList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loanProducts", loanProducts); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + model.addAttribute("keyword", keyword); // keyword + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + + } + + // 대출 상품 상세 + public void newLoanDetail(HttpServletRequest req, Model model) { // 지은 + String loan_product_name = req.getParameter("loan_product_name"); + + LoanProductVO loanProduct = dao.getLoanProductInfo(loan_product_name); + + model.addAttribute("loanProduct", loanProduct); + model.addAttribute("loan_product_name", loan_product_name); + } + + // 대출 신청 폼 + public void newLoanSign(HttpServletRequest req, Model model) { // 지은 + String loan_product_name = req.getParameter("loan_product_name"); + + LoanProductVO loanProduct = dao.getLoanProductInfo(loan_product_name); + UserVO user = dao.getUserInfo((String) req.getSession().getAttribute("customerID")); + + model.addAttribute("loanProduct", loanProduct); + model.addAttribute("user", user); + model.addAttribute("loan_product_name", loan_product_name); + } + + // 대출 상환 내역 + public void loanHistoryList(HttpServletRequest req, Model model) { // 지은 + System.out.println("[AdminService => loanHistoryList()]"); + + // 페이징 + int pageSize = 5; // 한 페이지당 출력할 글 갯수 + int pageBlock = 3; // 한 블럭당 페이지 갯수 + + int cnt = 0; // 글 갯수 + int start = 0; // 현재 페이지 시작 글 번호 + int end = 0; // 현재 페이지 마지막 글 번호 + int number = 0; // 출력용 글번호 + String pageNum = ""; // 페이지 번호 + int currentPage = 0; // 현재 페이지 + + int pageCount = 0; // 페이지 갯수 + int startPage = 0; // 시작 페이지 + int endPage = 0; // 마지막 페이지 + + pageNum = req.getParameter("pageNum"); + + if (pageNum == null) { + pageNum = "1"; // 첫 페이지를 1페이지로 지정 + } + + cnt = dao.getLoanHistoryCnt((String) req.getSession().getAttribute("customerID")); + System.out.println("cnt : " + cnt); + + // 글 30건 기준 + currentPage = Integer.parseInt(pageNum); + System.out.println("currentPage : " + currentPage); + + // 페이지 갯수 6= (30/5) + (0) + pageCount = (cnt / pageSize) + (cnt % pageSize > 0 ? 1 : 0); // 페이지 갯수 + 나머지가 있으면 1페이지 추가 + + // 현재페이지 시작 글번호(페이지별) + // start = (currentPage - 1) * pageSize + 1; + // 1 = (1-1) * 5 + 1 + start = (currentPage - 1) * pageSize + 1; + + // 현재페이지 마지막 글번호(페이지별) + // end = start + pageSize - 1; + // 5 = 1 + 5 - 1 + end = start + pageSize - 1; + + System.out.println("start : " + start); + System.out.println("end : " + end); + + // 출력용 글번호 + // 30 = 30 - (1 - 1) * 5; // 1페이지 + // number = cnt - (currentPage - 1) * pageSize; + number = cnt - (currentPage - 1) * pageSize; + + System.out.println("number : " + number); + System.out.println("pageSize : " + pageSize); + + // 시작 페이지 + // 1 = (1 / 3) * 3 + 1; + // startPage = (currentPage / pageBlock) * pageBlock + 1; + startPage = (currentPage / pageBlock) * pageBlock + 1; + if (currentPage % pageBlock == 0) + startPage -= pageBlock; + + System.out.println("startPage : " + startPage); + + // 마지막 페이지 + // 3 = 1 + 3 - 1 + endPage = startPage + pageBlock - 1; + if (endPage > pageCount) + endPage = pageCount; + + System.out.println("endPage : " + endPage); + + System.out.println("=============================================="); + + ArrayList loanHistorys = null; + + Map map = new HashMap(); + map.put("start", start); + map.put("end", end); + map.put("member_id", req.getSession().getAttribute("customerID")); + + if (cnt > 0) { + // 5-2 게시글 목록 조회 + loanHistorys = dao.getLoanHistoryList(map); + } + + // 6단계. jsp로 전달하기 위해 request나 session에 처리결과를 저장 + model.addAttribute("loanHistorys", loanHistorys); // 게시글 목록 + model.addAttribute("cnt", cnt); // 게시글 갯수 + model.addAttribute("pageNum", pageNum); // 페이지 번호 + model.addAttribute("number", number); // 출력용 글번호 + + if (cnt > 0) { + model.addAttribute("startPage", startPage); // 시작페이지 + model.addAttribute("endPage", endPage); // 마지막페이지 + model.addAttribute("pageBlock", pageBlock); // 한 블럭당 페이지 갯수 + model.addAttribute("pageCount", pageCount); // 페이지 갯수 + model.addAttribute("currentPage", currentPage); // 현재페이지 + } + } + + // 대출 신청자 정보 + public void signInfo(HttpServletRequest req, Model model) { // 지은 + String loan_product_name = (String) req.getParameter("loan_product_name"); + String member_id = (String) req.getSession().getAttribute("customerID"); + + Map map = new HashMap(); + map.put("member_id", member_id); + + UserVO loanMember = dao.getUserInfo(member_id); + LoanProductVO loanProduct = dao.getLoanProductInfo(loan_product_name); - int deleteCnt = dao.deleteAccountBook(vo); - System.out.println("가계부내역삭제 deleteCnt : " + deleteCnt); - model.addAttribute("deleteCnt", deleteCnt); + + model.addAttribute("loanMember", loanMember); + model.addAttribute("loanProduct", loanProduct); } - - // 가계부 내역 조회 - public void getAccountBook(HttpServletRequest req, Model model) { - // 로그인한 아이디 받아오기 + + //신규대출신청 insert + public void newLoanSignAction(HttpServletRequest req, Model model) throws ParseException { + String loan_product_name = (String) req.getParameter("loan_product_name"); + String member_id = (String) req.getParameter("member_id"); + String account_id = createAccountId(Integer.parseInt(req.getParameter("account_bankCode"))); + int loan_state = 1; // final static int선언해야됨. 1:신청 + int loan_amount = Integer.parseInt((String) req.getParameter("loan_amount")); + + String enPassword = bCryptPasswordEncoder.encode(req.getParameter("account_password")); + + String unique_key = dao.getUniqueKey(member_id); + + AccountVO account = new AccountVO(); + account.setAccount_id(account_id); + account.setMember_id((String)req.getSession().getAttribute("customerID")); + account.setAccount_password(enPassword); + account.setAccount_type(3); //대출 + // vo.setAccount_limit(account_limit); + account.setAccount_bankCode(Integer.parseInt(req.getParameter("account_bankCode"))); + account.setUnique_key(unique_key); + account.setAccount_balance(loan_amount); + + int insertCnt = dao.insertAccount(account); + Map map = new HashMap(); + map.put("account_id", account_id); + map.put("unique_key", unique_key); + + int updateCnt3 = dao.loanAccountState1(map); + int updateCnt4 = dao.accountUniqueloan(map); + req.setAttribute("insertCnt", insertCnt); + + DateTimeFormatter format = DateTimeFormatter.ofPattern("yyyy/MM/dd"); + String str_loan_startDate = (String) req.getParameter("loan_startDate"); + Date loan_startDate = Date.valueOf(LocalDate.parse(str_loan_startDate, format)); + String str_loan_endDate = (String) req.getParameter("loan_endDate"); + Date loan_endDate = Date.valueOf(LocalDate.parse(str_loan_endDate, format)); + + int loan_month = Integer.parseInt((String) req.getParameter("loan_month")); + int loan_repaymentType = Integer.parseInt((String) req.getParameter("loan_repaymentType")); + float loan_rate = Float.parseFloat((String) req.getParameter("loan_rate")); + int loan_monthlyRepayment = Integer.parseInt((String) req.getParameter("loan_monthlyRepayment")); + int loan_balance = loan_amount; + int loan_interest = Integer.parseInt((String) req.getParameter("loan_interest")); + int loan_tranAmount = Integer.parseInt((String) req.getParameter("loan_tranAmount")); + int loan_tranInterest = Integer.parseInt((String) req.getParameter("loan_tranInterest")); + int loan_delinquency = 0; + float loan_prepaymentRate = Float.parseFloat((String) req.getParameter("loan_prepaymentRate")); + + LoanVO loan = new LoanVO(); + loan.setLoan_product_name(loan_product_name); + loan.setMember_id(member_id); + loan.setAccount_id(account_id); + loan.setLoan_state(loan_state); + loan.setLoan_startDate(loan_startDate); + loan.setLoan_endDate(loan_endDate); + loan.setLoan_month(loan_month); + loan.setLoan_repaymentType(loan_repaymentType); + loan.setLoan_rate(loan_rate); + loan.setLoan_monthlyRepayment(loan_monthlyRepayment); + loan.setLoan_amount(loan_amount); + loan.setLoan_balance(loan_balance); + loan.setLoan_interest(loan_interest); + loan.setLoan_tranAmount(loan_tranAmount); + loan.setLoan_tranInterest(loan_tranInterest); + loan.setLoan_delinquency(loan_delinquency); + loan.setLoan_prepaymentRate(loan_prepaymentRate); + + int insertCnt2 = dao.newLoanSignAction(loan); + model.addAttribute("insertCnt", insertCnt); + model.addAttribute("insertCnt2", insertCnt2); + } + + // 대출 원금/이자 목록 + public void loanPrincipalRateList(HttpServletRequest req, Model model) { // 지은 + String loan_id = (String) req.getParameter("loan_id"); + + Map map = new HashMap(); + map.put("loan_id", loan_id); + + LoanVO loan = dao.getLoanInfo(map); + System.out.println(loan); + req.setAttribute("loan", loan); + } + + public void loanPaymentDetail(HttpServletRequest req, Model model) { + String loan_id = (String) req.getParameter("loan_id"); String member_id = (String) req.getSession().getAttribute("customerID"); - ArrayList list = dao.getAccountBook(member_id); - ArrayList report = dao.getAccountBookReport(member_id); + + Map map = new HashMap(); + map.put("loan_id", loan_id); + LoanVO loan = dao.getLoanInfo(map); + LoanProductVO loanProduct = dao.getLoanProductInfo(loan.getLoan_product_name()); + int cnt = dao.getLoanHistoryCntToLoan(map); + Date date = dao.getLoanDate(); + + LocalDate cntDate = loan.getLoan_startDate().toLocalDate(); + LocalDate btnDate = loan.getLoan_startDate().toLocalDate(); + btnDate = btnDate.plusMonths(cnt); + cntDate = cntDate.plusMonths(cnt+1); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); + String cnt_date = cntDate.format(formatter); + System.out.println("btnDate " + btnDate); + System.out.println("cntDate " + cntDate); + System.out.println("(cntDate.isAfter(date.toLocalDate()) " + (cntDate.isAfter(date.toLocalDate()))); + System.out.println("date.toLocalDate().isAfter(btnDate)) " + date.toLocalDate().isAfter(btnDate)); + System.out.println("cntDate.isEqual(date.toLocalDate()) " + cntDate.isEqual(date.toLocalDate())); + System.out.println("cntDate.isBefore(date.toLocalDate()) " + cntDate.isBefore(date.toLocalDate())); + String cnt_state = ""; + int disabledBtn = 0; + if((cntDate.isAfter(date.toLocalDate()) && date.toLocalDate().isAfter(btnDate)) || cntDate.isEqual(date.toLocalDate())) { + cnt_state = "정상납부"; + } else if(cntDate.isBefore(date.toLocalDate())) { + cnt_state = "연체"; + } else { + cnt_state = "납부월이 아닙니다."; + disabledBtn = 1; + } - model.addAttribute("report", report); - model.addAttribute("list", list); - System.out.println("report 사이즈 : " + report.size()); + if(loan.getLoan_state() == 1) { + cnt_state = "승인되지 않은 대출입니다."; + disabledBtn = 1; + } + + map.put("member_id", member_id); + UserVO user = dao.getUserInfo(member_id); + + map.put("unique_key", user.getUnique_key()); + ArrayList loanAccount = dao.getAccountInfos(map); + + model.addAttribute("loan", loan); + model.addAttribute("loanProduct", loanProduct); + model.addAttribute("date", date); + model.addAttribute("cnt", cnt); + model.addAttribute("cnt_date", cnt_date); + model.addAttribute("cnt_state", cnt_state); + model.addAttribute("loanAccount", loanAccount); + model.addAttribute("disabledBtn", disabledBtn); + + + } + public void loanPaymentAction(HttpServletRequest req, Model model) { + // 변수 받아오기 + String loan_id = (String) req.getParameter("loan_id"); + String member_id = (String) req.getSession().getAttribute("customerID"); + int cnt = Integer.parseInt(req.getParameter("cnt")); + + UserVO user = dao.getUserInfo(member_id); + + Map map = new HashMap(); + map.put("loan_id", loan_id); + LoanVO loan = dao.getLoanInfo(map); + + String account_id = req.getParameter("account_id"); + String account_password = req.getParameter("account_password"); + + String transfer_senderAccount = loan.getAccount_id(); + int transfer_money = Integer.parseInt(req.getParameter("loan_monthlyRepayment")); + + TransferVO trans = new TransferVO(); + trans.setAccount_id(account_id); + trans.setMember_id(member_id); + trans.setTransfer_senderAccount(transfer_senderAccount); + trans.setTransfer_money(transfer_money); + + String transfer_outComment = req.getParameter("transfer_outComment"); + + trans.setTransfer_outComment(transfer_outComment); + trans.setTransfer_senderName(user.getMember_name()); + trans.setTransfer_receiverName(loan.getLoan_id() + "대출상환"); + + map.clear(); + map.put("unique_key", user.getUnique_key()); + System.out.println(user.getUnique_key()); + map.put("account_id", account_id); + AccountVO account = dao.getAccountInfo(map); + + trans.setTransfer_bankCode(account.getAccount_bankCode()); + if(bCryptPasswordEncoder.matches( + account_password, + account.getAccount_password())) { + //계좌 비밀번호 비교 성공 + + map.put("account_balance", account.getAccount_balance() - transfer_money); + int updateCnt = dao.accountPayment(map); + int insertCnt = dao.transferLoan(trans); + Integer transfer_id = dao.getTransID(trans); + + LoanHistoryVO history = new LoanHistoryVO(); + history.setLoan_id(loan.getLoan_id()); + history.setTransfer_id(transfer_id); + history.setLoan_history_amount((int)loan.getLoan_monthlyRepayment()); + history.setLoan_history_tranAmount((int)loan.getLoan_tranAmount()); + history.setLoan_history_tranInterest(loan.getLoan_tranInterest()); + + int insertCnt2 = dao.addLoanHistory(history); + + if(loan.getLoan_repaymentType() == 1) { + long balance = loan.getLoan_balance(); + loan.setLoan_balance(balance - loan.getLoan_tranAmount()); + int inter = loan.getLoan_interest(); + loan.setLoan_interest(inter - loan.getLoan_tranInterest()); + loan.setLoan_tranInterest(Math.round(loan.getLoan_balance() * ((loan.getLoan_rate()/100) /12))); + loan.setLoan_monthlyRepayment(loan.getLoan_tranAmount() + loan.getLoan_tranInterest()); + if(cnt > loan.getLoan_month()) { + loan.setLoan_tranAmount(0); + loan.setLoan_tranInterest(0); + loan.setLoan_monthlyRepayment(0); + } + } else if(loan.getLoan_repaymentType() == 2) {//리 + long balance = loan.getLoan_balance(); + loan.setLoan_balance(balance - loan.getLoan_tranAmount()); + int inter = loan.getLoan_interest(); + loan.setLoan_interest(inter - loan.getLoan_tranInterest()); + loan.setLoan_tranInterest(Math.round(loan.getLoan_balance() * ((loan.getLoan_rate()/100) /12))); + loan.setLoan_tranAmount(loan.getLoan_monthlyRepayment() - loan.getLoan_tranInterest()); + if(cnt > loan.getLoan_month()) { + loan.setLoan_tranAmount(0); + loan.setLoan_tranInterest(0); + loan.setLoan_monthlyRepayment(0); + } + } else if(loan.getLoan_repaymentType() == 3) {//만 + if(cnt == loan.getLoan_month()) { + loan.setLoan_tranAmount(loan.getLoan_amount()); + loan.setLoan_monthlyRepayment(loan.getLoan_tranAmount() + loan.getLoan_tranInterest()); + } else if(cnt < loan.getLoan_month()) { + int inter = loan.getLoan_interest(); + loan.setLoan_interest(inter - loan.getLoan_tranInterest()); + } else { + int inter = loan.getLoan_interest(); + loan.setLoan_interest(inter - loan.getLoan_tranInterest()); + long balance = loan.getLoan_balance(); + loan.setLoan_balance(balance - loan.getLoan_tranAmount()); + loan.setLoan_tranInterest(0); + loan.setLoan_tranAmount(0); + loan.setLoan_monthlyRepayment(0); + } + } + + int updateCnt2 = dao.updateLoanPayment(loan); + + model.addAttribute("updateCnt2", updateCnt2); + model.addAttribute("updateCnt", updateCnt); + model.addAttribute("insertCnt2", insertCnt2); + model.addAttribute("insertCnt", insertCnt); + } } } diff --git a/src/main/java/com/spring/bank/user/service/test.java b/src/main/java/com/spring/bank/user/service/test.java new file mode 100644 index 0000000..e5d5dc3 --- /dev/null +++ b/src/main/java/com/spring/bank/user/service/test.java @@ -0,0 +1,26 @@ +package com.spring.bank.user.service; + +import java.io.IOException; + +import org.jsoup.Jsoup; + +import com.fasterxml.jackson.databind.ObjectMapper; + +public class test { + public static void main(String[] args) throws IOException { + String strJson = Jsoup.connect("http://fx.kebhana.com/FER1101M.web").get().select("body").text().replaceAll("},] }", "} ]"); + strJson = strJson.substring(strJson.indexOf("[")); + ObjectMapper mapper = new ObjectMapper(); + + String jsonStr = mapper.writeValueAsString(strJson); + String json1 = jsonStr.substring(0,3472); + String json2 = jsonStr.substring(3473, 7013); + + json1 = strJson.substring(0,3472); + json2 = strJson.substring(3473, 7013); + String jsonStr1 = mapper.writeValueAsString(json1); + System.out.println(json1); + + } + +} diff --git a/src/main/java/com/spring/bank/user/vo/AccountVO.java b/src/main/java/com/spring/bank/user/vo/AccountVO.java new file mode 100644 index 0000000..fea8b3b --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/AccountVO.java @@ -0,0 +1,156 @@ +package com.spring.bank.user.vo; + +import java.sql.Date; + +public class AccountVO { + + int account_bankCode; + String account_id; + String account_password; + String member_id; + int account_balance; + int account_type; + int account_state; + String account_stateContent; + int account_limit; + Date account_deleteDate; + Date account_sleepDate; + Date account_newDate; + String unique_key; + int account_default; + int account_linked; + + // 은행 logo 이미지 + String account_bankImg; + + public int getAccount_bankCode() { + return account_bankCode; + } + + public void setAccount_bankCode(int account_bankCode) { + this.account_bankCode = account_bankCode; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public String getAccount_password() { + return account_password; + } + + public void setAccount_password(String account_password) { + this.account_password = account_password; + } + + public String getMember_id() { + return member_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public int getAccount_balance() { + return account_balance; + } + + public void setAccount_balance(int account_balance) { + this.account_balance = account_balance; + } + + public int getAccount_type() { + return account_type; + } + + public void setAccount_type(int account_type) { + this.account_type = account_type; + } + + public int getAccount_state() { + return account_state; + } + + public void setAccount_state(int account_state) { + this.account_state = account_state; + } + + public String getAccount_stateContent() { + return account_stateContent; + } + + public void setAccount_stateContent(String account_stateContent) { + this.account_stateContent = account_stateContent; + } + + public int getAccount_limit() { + return account_limit; + } + + public void setAccount_limit(int account_limit) { + this.account_limit = account_limit; + } + + public Date getAccount_deleteDate() { + return account_deleteDate; + } + + public void setAccount_deleteDate(Date account_deleteDate) { + this.account_deleteDate = account_deleteDate; + } + + public Date getAccount_sleepDate() { + return account_sleepDate; + } + + public void setAccount_sleepDate(Date account_sleepDate) { + this.account_sleepDate = account_sleepDate; + } + + public Date getAccount_newDate() { + return account_newDate; + } + + public void setAccount_newDate(Date account_newDate) { + this.account_newDate = account_newDate; + } + + public String getUnique_key() { + return unique_key; + } + + public void setUnique_key(String unique_key) { + this.unique_key = unique_key; + } + + public int getAccount_default() { + return account_default; + } + + public void setAccount_default(int account_default) { + this.account_default = account_default; + } + + public int getAccount_linked() { + return account_linked; + } + + public void setAccount_linked(int account_linked) { + this.account_linked = account_linked; + } + + public String getAccount_bankImg() { + return account_bankImg; + } + + public void setAccount_bankImg(String account_bankImg) { + this.account_bankImg = account_bankImg; + } + + + +} diff --git a/src/main/java/com/spring/bank/user/vo/Auto_TransferVO.java b/src/main/java/com/spring/bank/user/vo/Auto_TransferVO.java new file mode 100644 index 0000000..bf6b0b6 --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/Auto_TransferVO.java @@ -0,0 +1,100 @@ +package com.spring.bank.user.vo; + +import java.util.Date; + +public class Auto_TransferVO { + + private int auto_id; + private String account_id; + private String auto_senderAccount; + private int auto_type; + private Date auto_outDate; + private int auto_money; + private String auto_cycle; + private Date auto_registDate; + private Date auto_expirationDate; + private Date auto_cancle; + private String auto_inPlace; + private int auto_status; + private Date auto_lastDay; + + int getAuto_id() { + return auto_id; + } + void setAuto_id(int auto_id) { + this.auto_id = auto_id; + } + String getAccount_id() { + return account_id; + } + void setAccount_id(String account_id) { + this.account_id = account_id; + } + String getAuto_senderAccount() { + return auto_senderAccount; + } + void setAuto_senderAccount(String auto_senderAccount) { + this.auto_senderAccount = auto_senderAccount; + } + int getAuto_type() { + return auto_type; + } + void setAuto_type(int auto_type) { + this.auto_type = auto_type; + } + Date getAuto_outDate() { + return auto_outDate; + } + void setAuto_outDate(Date auto_outDate) { + this.auto_outDate = auto_outDate; + } + int getAuto_money() { + return auto_money; + } + void setAuto_money(int auto_money) { + this.auto_money = auto_money; + } + String getAuto_cycle() { + return auto_cycle; + } + void setAuto_cycle(String auto_cycle) { + this.auto_cycle = auto_cycle; + } + Date getAuto_registDate() { + return auto_registDate; + } + void setAuto_registDate(Date auto_registDate) { + this.auto_registDate = auto_registDate; + } + Date getAuto_expirationDate() { + return auto_expirationDate; + } + void setAuto_expirationDate(Date auto_expirationDate) { + this.auto_expirationDate = auto_expirationDate; + } + Date getAuto_cancle() { + return auto_cancle; + } + void setAuto_cancle(Date auto_cancle) { + this.auto_cancle = auto_cancle; + } + String getAuto_inPlace() { + return auto_inPlace; + } + void setAuto_inPlace(String auto_inPlace) { + this.auto_inPlace = auto_inPlace; + } + int getAuto_status() { + return auto_status; + } + void setAuto_status(int auto_status) { + this.auto_status = auto_status; + } + Date getAuto_lastDay() { + return auto_lastDay; + } + void setAuto_lastDay(Date auto_lastDay) { + this.auto_lastDay = auto_lastDay; + } + +} diff --git a/src/main/java/com/spring/bank/user/vo/CrawlerVO.java b/src/main/java/com/spring/bank/user/vo/CrawlerVO.java index e9adde9..76d43c1 100644 --- a/src/main/java/com/spring/bank/user/vo/CrawlerVO.java +++ b/src/main/java/com/spring/bank/user/vo/CrawlerVO.java @@ -8,8 +8,8 @@ public class CrawlerVO { String exchange_sell; // 현찰 팔 때 String exchange_transfer; // 전신환 보낼 때 String exchange_recive; // 전신환 받을 때 - //String exchange_vary; // 증감율 - double exchange_com; // 환율 비교 +// String exchange_state; // 증감율 + String exchange_com; // 환율 비교 public CrawlerVO() {} @@ -23,7 +23,7 @@ public CrawlerVO(String exchange_country, String exchange_rate, String exchange_ this.exchange_recive = exchange_recive; } - public CrawlerVO(String exchange_country, String exchange_rate, double exchange_com) { + public CrawlerVO(String exchange_country, String exchange_rate, String exchange_com) { this.exchange_country = exchange_country; this.exchange_rate = exchange_rate; this.exchange_com = exchange_com; @@ -82,12 +82,12 @@ public void setExchange_recive(String exchange_recive) { this.exchange_recive = exchange_recive; } - public double getExchange_com() { + public String getExchange_com() { return exchange_com; } - public void setExchange_com(double exchange_com) { + public void setExchange_com(String exchange_com) { this.exchange_com = exchange_com; } diff --git a/src/main/java/com/spring/bank/user/vo/DepositVO.java b/src/main/java/com/spring/bank/user/vo/DepositVO.java index 09cda57..4791720 100644 --- a/src/main/java/com/spring/bank/user/vo/DepositVO.java +++ b/src/main/java/com/spring/bank/user/vo/DepositVO.java @@ -5,15 +5,16 @@ //신청한 예금 정보 public class DepositVO { - private int deposit_id; // 예금번호 - private String deposit_product_name; // 예금상품이름 - private String account_id; // 계좌번호 - private Date deposit_joinDate; // 예금가입날짜 - private int deposit_state; // 예금상태 - private int deposit_rate; // 예금금리 - private int deposit_type; // 예금종류(복/단) - private int deposit_balance; // 예치금액 - private Date deposit_endDate; // 만기일 + private int deposit_id; // 예금번호 + private String deposit_product_name; // 예금상품이름 + private String account_id; // 계좌번호 + private Date deposit_joinDate; // 예금가입날짜 + private int deposit_state; // 예금상태 0:신청 1:승인 2:해지 + private Float deposit_rate; // 예금금리 + private int deposit_type; // 예금종류(복/단) + private int deposit_balance; // 예치금액 + private Date deposit_endDate; // 만기일 + private int account_bankCode; // public int getDeposit_id() { return deposit_id; @@ -55,11 +56,11 @@ public void setDeposit_state(int deposit_state) { this.deposit_state = deposit_state; } - public int getDeposit_rate() { + public Float getDeposit_rate() { return deposit_rate; } - public void setDeposit_rate(int deposit_rate) { + public void setDeposit_rate(Float deposit_rate) { this.deposit_rate = deposit_rate; } @@ -87,4 +88,12 @@ public void setDeposit_endDate(Date deposit_endDate) { this.deposit_endDate = deposit_endDate; } + public int getAccount_bankCode() { + return account_bankCode; + } + + public void setAccount_bankCode(int account_bankCode) { + this.account_bankCode = account_bankCode; + } + } diff --git a/src/main/java/com/spring/bank/user/vo/IrpVO.java b/src/main/java/com/spring/bank/user/vo/IrpVO.java new file mode 100644 index 0000000..8547385 --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/IrpVO.java @@ -0,0 +1,90 @@ +package com.spring.bank.user.vo; + +import java.util.Date; + +//연금 +public class IrpVO { + + private int irp_id; // 연금번호 + private String irp_product_name; // 연금상품이름 + private String member_id; // 가입 고객id + private String account_id; // 계좌번호 + private Date irp_joinDate; // 연금가입날짜 + private int irp_state; // 연금상태 + private float irp_rate; // 연금금리 + private String irp_money; // 연금금액 + private String irp_endDate; // 만기일 + + public int getIrp_id() { + return irp_id; + } + + public void setIrp_id(int irp_id) { + this.irp_id = irp_id; + } + + public String getIrp_product_name() { + return irp_product_name; + } + + public void setIrp_product_name(String irp_product_name) { + this.irp_product_name = irp_product_name; + } + + public String getMember_id() { + return member_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public Date getIrp_joinDate() { + return irp_joinDate; + } + + public void setIrp_joinDate(Date irp_joinDate) { + this.irp_joinDate = irp_joinDate; + } + + public int getIrp_state() { + return irp_state; + } + + public void setIrp_state(int irp_state) { + this.irp_state = irp_state; + } + + public float getIrp_rate() { + return irp_rate; + } + + public void setIrp_rate(float irp_rate) { + this.irp_rate = irp_rate; + } + + public String getIrp_money() { + return irp_money; + } + + public void setIrp_money(String irp_money) { + this.irp_money = irp_money; + } + + public String getIrp_endDate() { + return irp_endDate; + } + + public void setIrp_endDate(String irp_endDate) { + this.irp_endDate = irp_endDate; + } + +} \ No newline at end of file diff --git a/src/main/java/com/spring/bank/user/vo/LoanHistoryVO.java b/src/main/java/com/spring/bank/user/vo/LoanHistoryVO.java new file mode 100644 index 0000000..79e3e4f --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/LoanHistoryVO.java @@ -0,0 +1,71 @@ +package com.spring.bank.user.vo; + +import java.sql.Date; + +public class LoanHistoryVO { + private int loan_history_id; + private int loan_id; + private int transfer_id; + private Date loan_history_date; + private int loan_history_state;//1정상/2연체/3중도상환+수수료/4해지로 인한 원금 상환 + private int loan_history_amount; + private int loan_history_tranAmount; + private int loan_history_tranInterest; + public int getLoan_history_id() { + return loan_history_id; + } + public void setLoan_history_id(int loan_history_id) { + this.loan_history_id = loan_history_id; + } + public int getLoan_id() { + return loan_id; + } + public void setLoan_id(int loan_id) { + this.loan_id = loan_id; + } + public int getTransfer_id() { + return transfer_id; + } + public void setTransfer_id(int transfer_id) { + this.transfer_id = transfer_id; + } + public Date getLoan_history_date() { + return loan_history_date; + } + public void setLoan_history_date(Date loan_history_date) { + this.loan_history_date = loan_history_date; + } + public int getLoan_history_state() { + return loan_history_state; + } + public void setLoan_history_state(int loan_history_state) { + this.loan_history_state = loan_history_state; + } + public int getLoan_history_amount() { + return loan_history_amount; + } + public void setLoan_history_amount(int loan_history_amount) { + this.loan_history_amount = loan_history_amount; + } + public int getLoan_history_tranAmount() { + return loan_history_tranAmount; + } + public void setLoan_history_tranAmount(int loan_history_tranAmount) { + this.loan_history_tranAmount = loan_history_tranAmount; + } + public int getLoan_history_tranInterest() { + return loan_history_tranInterest; + } + public void setLoan_history_tranInterest(int loan_history_tranInterest) { + this.loan_history_tranInterest = loan_history_tranInterest; + } + @Override + public String toString() { + return "LoanHistoryVO [loan_history_id=" + loan_history_id + ", loan_id=" + loan_id + ", transfer_id=" + + transfer_id + ", loan_history_date=" + loan_history_date + ", loan_history_state=" + + loan_history_state + ", loan_history_amount=" + loan_history_amount + ", loan_history_tranAmount=" + + loan_history_tranAmount + ", loan_history_tranInterest=" + loan_history_tranInterest + "]"; + } + + +} diff --git a/src/main/java/com/spring/bank/user/vo/LoanVO.java b/src/main/java/com/spring/bank/user/vo/LoanVO.java new file mode 100644 index 0000000..b6d2823 --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/LoanVO.java @@ -0,0 +1,180 @@ +package com.spring.bank.user.vo; + +import java.sql.Date; + +public class LoanVO { + private int loan_id; + private String loan_product_name; + private String member_id; + private String account_id; + private int loan_state; + private Date loan_startDate; + private Date loan_endDate; + private int loan_month; + private int loan_repaymentType; + private float loan_rate; + private long loan_monthlyRepayment; + private long loan_amount; + private long loan_balance; + private int loan_interest; + private long loan_tranAmount; + private int loan_tranInterest; + private long loan_delinquency; + private float loan_prepaymentRate; + + public int getLoan_id() { + return loan_id; + } + + public void setLoan_id(int loan_id) { + this.loan_id = loan_id; + } + + public String getLoan_product_name() { + return loan_product_name; + } + + public void setLoan_product_name(String loan_product_name) { + this.loan_product_name = loan_product_name; + } + + public String getMember_id() { + return member_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public int getLoan_state() { + return loan_state; + } + + public void setLoan_state(int loan_state) { + this.loan_state = loan_state; + } + + public Date getLoan_startDate() { + return loan_startDate; + } + + public void setLoan_startDate(Date loan_startDate) { + this.loan_startDate = loan_startDate; + } + + public Date getLoan_endDate() { + return loan_endDate; + } + + public void setLoan_endDate(Date loan_endDate) { + this.loan_endDate = loan_endDate; + } + + public int getLoan_month() { + return loan_month; + } + + public void setLoan_month(int loan_month) { + this.loan_month = loan_month; + } + + public int getLoan_repaymentType() { + return loan_repaymentType; + } + + public void setLoan_repaymentType(int loan_repaymentType) { + this.loan_repaymentType = loan_repaymentType; + } + + public float getLoan_rate() { + return loan_rate; + } + + public void setLoan_rate(float loan_rate) { + this.loan_rate = loan_rate; + } + + public long getLoan_monthlyRepayment() { + return loan_monthlyRepayment; + } + + public void setLoan_monthlyRepayment(long loan_monthlyRepayment) { + this.loan_monthlyRepayment = loan_monthlyRepayment; + } + + public long getLoan_amount() { + return loan_amount; + } + + public void setLoan_amount(long loan_amount) { + this.loan_amount = loan_amount; + } + + public long getLoan_balance() { + return loan_balance; + } + + public void setLoan_balance(long loan_balance) { + this.loan_balance = loan_balance; + } + + public int getLoan_interest() { + return loan_interest; + } + + public void setLoan_interest(int loan_interest) { + this.loan_interest = loan_interest; + } + + public long getLoan_tranAmount() { + return loan_tranAmount; + } + + public void setLoan_tranAmount(long loan_tranAmount) { + this.loan_tranAmount = loan_tranAmount; + } + + public int getLoan_tranInterest() { + return loan_tranInterest; + } + + public void setLoan_tranInterest(int loan_tranInterest) { + this.loan_tranInterest = loan_tranInterest; + } + + public long getLoan_delinquency() { + return loan_delinquency; + } + + public void setLoan_delinquency(long loan_delinquency) { + this.loan_delinquency = loan_delinquency; + } + + public float getLoan_prepaymentRate() { + return loan_prepaymentRate; + } + + public void setLoan_prepaymentRate(float loan_prepaymentRate) { + this.loan_prepaymentRate = loan_prepaymentRate; + } + + @Override + public String toString() { + return "LoanVO [loan_id=" + loan_id + ", loan_product_name=" + loan_product_name + ", member_id=" + member_id + + ", account_id=" + account_id + ", loan_state=" + loan_state + ", loan_startDate=" + loan_startDate + + ", loan_endDate=" + loan_endDate + ", loan_month=" + loan_month + ", loan_repaymentType=" + + loan_repaymentType + ", loan_rate=" + loan_rate + ", loan_monthlyRepayment=" + loan_monthlyRepayment + + ", loan_amount=" + loan_amount + ", loan_balance=" + loan_balance + ", loan_interest=" + loan_interest + + ", loan_tranAmount=" + loan_tranAmount + ", loan_tranInterest=" + loan_tranInterest + + ", loan_delinquency=" + loan_delinquency + ", loan_prepaymentRate=" + loan_prepaymentRate + "]"; + } + +} diff --git a/src/main/java/com/spring/bank/user/vo/MyDepositVO.java b/src/main/java/com/spring/bank/user/vo/MyDepositVO.java new file mode 100644 index 0000000..4c22d0a --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/MyDepositVO.java @@ -0,0 +1,111 @@ +package com.spring.bank.user.vo; + +import java.util.Date; + +public class MyDepositVO { + + /* 적금은? + * saving_id + * saving_product_name + * account_id + * saving_joinDate + * saving_rate + * saving_money + * saving_endDate + * + * 연금은? + * irp_id + * irp_product_name + * account_id + * irp_joinDate + * irp_rate + * irp_money + * irp_endDate + */ + + // 상품이름, 계좌번호, 은행명, 가입날짜, 상태, 금리, 금액, 만기일 + // 예금 테이블 + private int deposit_id; // 예금번호 + private String deposit_product_name; // 상품이름 + private String account_id; // 계좌번호 + private Date deposit_joinDate; // 가입날짜 + private int deposit_state; // 예금상태 + private int deposit_rate; // 예금금리 + private int deposit_balance; // 예금금액 + private Date deposit_endDate; // 예금만기일 + + // 참조 테이블 + private int deposit_product_bankCode; // 은행명코드 + + public int getDeposit_id() { + return deposit_id; + } + + public void setDeposit_id(int deposit_id) { + this.deposit_id = deposit_id; + } + + public String getDeposit_product_name() { + return deposit_product_name; + } + + public void setDeposit_product_name(String deposit_product_name) { + this.deposit_product_name = deposit_product_name; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public Date getDeposit_joinDate() { + return deposit_joinDate; + } + + public void setDeposit_joinDate(Date deposit_joinDate) { + this.deposit_joinDate = deposit_joinDate; + } + + public int getDeposit_state() { + return deposit_state; + } + + public void setDeposit_state(int deposit_state) { + this.deposit_state = deposit_state; + } + + public int getDeposit_rate() { + return deposit_rate; + } + + public void setDeposit_rate(int deposit_rate) { + this.deposit_rate = deposit_rate; + } + + public int getDeposit_balance() { + return deposit_balance; + } + + public void setDeposit_balance(int deposit_balance) { + this.deposit_balance = deposit_balance; + } + + public Date getDeposit_endDate() { + return deposit_endDate; + } + + public void setDeposit_endDate(Date deposit_endDate) { + this.deposit_endDate = deposit_endDate; + } + + public int getDeposit_product_bankCode() { + return deposit_product_bankCode; + } + + public void setDeposit_product_bankCode(int deposit_product_bankCode) { + this.deposit_product_bankCode = deposit_product_bankCode; + } +} diff --git a/src/main/java/com/spring/bank/user/vo/MyIRPVO.java b/src/main/java/com/spring/bank/user/vo/MyIRPVO.java new file mode 100644 index 0000000..af19e6e --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/MyIRPVO.java @@ -0,0 +1,115 @@ +package com.spring.bank.user.vo; + +import java.util.Date; + +public class MyIRPVO { + + /* 적금은? + * saving_id + * saving_product_name + * account_id + * saving_joinDate + * saving_state + * saving_rate + * saving_money + * saving_endDate + * + * 연금은? + * irp_id + * irp_product_name + * account_id + * irp_joinDate + * irp_state + * irp_rate + * irp_money + * irp_endDate + */ + + // 상품이름, 계좌번호, 은행명, 가입날짜, 상태, 금리, 금액, 만기일 + // 예금 테이블 + private int irp_id; // 연금번호 + private String irp_product_name; // 상품이름 + private String account_id; // 계좌번호 + private Date irp_joinDate; // 가입날짜 + private int irp_state; // 연금상태 + private int irp_rate; // 연금금리 + private int irp_money; // 연금금액 + private Date irp_endDate; // 연금만기일 + + // 참조 테이블 + private int irp_product_bankCode; // 은행명코드 + + public int getIrp_id() { + return irp_id; + } + + public void setIrp_id(int irp_id) { + this.irp_id = irp_id; + } + + public String getIrp_product_name() { + return irp_product_name; + } + + public void setIrp_product_name(String irp_product_name) { + this.irp_product_name = irp_product_name; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public Date getIrp_joinDate() { + return irp_joinDate; + } + + public void setIrp_joinDate(Date irp_joinDate) { + this.irp_joinDate = irp_joinDate; + } + + public int getIrp_state() { + return irp_state; + } + + public void setIrp_state(int irp_state) { + this.irp_state = irp_state; + } + + public int getIrp_rate() { + return irp_rate; + } + + public void setIrp_rate(int irp_rate) { + this.irp_rate = irp_rate; + } + + public int getIrp_money() { + return irp_money; + } + + public void setIrp_money(int irp_money) { + this.irp_money = irp_money; + } + + public Date getIrp_endDate() { + return irp_endDate; + } + + public void setIrp_endDate(Date irp_endDate) { + this.irp_endDate = irp_endDate; + } + + public int getIrp_product_bankCode() { + return irp_product_bankCode; + } + + public void setIrp_product_bankCode(int irp_product_bankCode) { + this.irp_product_bankCode = irp_product_bankCode; + } + + +} diff --git a/src/main/java/com/spring/bank/user/vo/MySavingVO.java b/src/main/java/com/spring/bank/user/vo/MySavingVO.java new file mode 100644 index 0000000..c0ef779 --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/MySavingVO.java @@ -0,0 +1,113 @@ +package com.spring.bank.user.vo; + +import java.util.Date; + +public class MySavingVO { + + /* 적금은? + * saving_id + * saving_product_name + * account_id + * saving_joinDate + * saving_state + * saving_rate + * saving_money + * saving_endDate + * + * 연금은? + * irp_id + * irp_product_name + * account_id + * irp_joinDate + * irp_state + * irp_rate + * irp_money + * irp_endDate + */ + + // 상품이름, 계좌번호, 은행명, 가입날짜, 상태, 금리, 금액, 만기일 + // 예금 테이블 + private int saving_id; // 적금번호 + private String saving_product_name; // 상품이름 + private String account_id; // 계좌번호 + private Date saving_joinDate; // 가입날짜 + private int saving_state; // 적금상태 + private int saving_rate; // 적금금리 + private int saving_money; // 적금금액 + private Date saving_endDate; // 적금만기일 + + // 참조 테이블 + private int saving_product_bankCode; // 은행명코드 + + public int getSaving_id() { + return saving_id; + } + + public void setSaving_id(int saving_id) { + this.saving_id = saving_id; + } + + public String getSaving_product_name() { + return saving_product_name; + } + + public void setSaving_product_name(String saving_product_name) { + this.saving_product_name = saving_product_name; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public Date getSaving_joinDate() { + return saving_joinDate; + } + + public void setSaving_joinDate(Date saving_joinDate) { + this.saving_joinDate = saving_joinDate; + } + + public int getSaving_state() { + return saving_state; + } + + public void setSaving_state(int saving_state) { + this.saving_state = saving_state; + } + + public int getSaving_rate() { + return saving_rate; + } + + public void setSaving_rate(int saving_rate) { + this.saving_rate = saving_rate; + } + + public int getSaving_money() { + return saving_money; + } + + public void setSaving_money(int saving_money) { + this.saving_money = saving_money; + } + + public Date getSaving_endDate() { + return saving_endDate; + } + + public void setSaving_endDate(Date saving_endDate) { + this.saving_endDate = saving_endDate; + } + + public int getSaving_product_bankCode() { + return saving_product_bankCode; + } + + public void setSaving_product_bankCode(int saving_product_bankCode) { + this.saving_product_bankCode = saving_product_bankCode; + } +} diff --git a/src/main/java/com/spring/bank/user/vo/NoticeVO.java b/src/main/java/com/spring/bank/user/vo/NoticeVO.java new file mode 100644 index 0000000..f419aeb --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/NoticeVO.java @@ -0,0 +1,70 @@ +package com.spring.bank.user.vo; + +import java.sql.Date; + +public class NoticeVO { + + private int notice_num; // 공지사항고유번호 + private String notice_writer; // 공지사항작성자 // 관리자 + private String notice_subject; // 공지사항제목 // 관리자 + 고객 + private String notice_password; // 공지사항비밀번호 // 관리자 + private String notice_content; // 공지사항글 // 관리자 + 고객 + private String notice_readCnt; // 공지사항조회수 // 관리자 + private Date notice_date; // 공지사항작성일 // 관리자 + 고객 + + public int getNotice_num() { + return notice_num; + } + + public void setNotice_num(int notice_num) { + this.notice_num = notice_num; + } + + public String getNotice_writer() { + return notice_writer; + } + + public void setNotice_writer(String notice_writer) { + this.notice_writer = notice_writer; + } + + public String getNotice_subject() { + return notice_subject; + } + + public void setNotice_subject(String notice_subject) { + this.notice_subject = notice_subject; + } + + public String getNotice_password() { + return notice_password; + } + + public void setNotice_password(String notice_password) { + this.notice_password = notice_password; + } + + public String getNotice_content() { + return notice_content; + } + + public void setNotice_content(String notice_content) { + this.notice_content = notice_content; + } + + public String getNotice_readCnt() { + return notice_readCnt; + } + + public void setNotice_readCnt(String notice_readCnt) { + this.notice_readCnt = notice_readCnt; + } + + public Date getNotice_date() { + return notice_date; + } + + public void setNotice_date(Date notice_date) { + this.notice_date = notice_date; + } +} diff --git a/src/main/java/com/spring/bank/user/vo/TransferVO.java b/src/main/java/com/spring/bank/user/vo/TransferVO.java new file mode 100644 index 0000000..6b872fb --- /dev/null +++ b/src/main/java/com/spring/bank/user/vo/TransferVO.java @@ -0,0 +1,115 @@ +package com.spring.bank.user.vo; + +import java.sql.Date; + +public class TransferVO { + private int transfer_id; + private String account_id; + private String member_id; + private String transfer_senderAccount; + private int transfer_money; + private String transfer_inOut; + private Date transfer_inOutDate; + private String transfer_outComment; + private String transfer_inComment; + private String transfer_senderName; + private String transfer_receiverName; + private int transfer_bankCode; + + public int getTransfer_bankCode() { + return transfer_bankCode; + } + + public void setTransfer_bankCode(int transfer_bankCode) { + this.transfer_bankCode = transfer_bankCode; + } + + public int getTransfer_id() { + return transfer_id; + } + + public void setTransfer_id(int transfer_id) { + this.transfer_id = transfer_id; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public String getMember_id() { + return member_id; + } + + public void setMember_id(String member_id) { + this.member_id = member_id; + } + + public String getTransfer_senderAccount() { + return transfer_senderAccount; + } + + public void setTransfer_senderAccount(String transfer_senderAccount) { + this.transfer_senderAccount = transfer_senderAccount; + } + + public int getTransfer_money() { + return transfer_money; + } + + public void setTransfer_money(int transfer_money) { + this.transfer_money = transfer_money; + } + + public String getTransfer_inOut() { + return transfer_inOut; + } + + public void setTransfer_inOut(String transfer_inOut) { + this.transfer_inOut = transfer_inOut; + } + + public Date getTransfer_inOutDate() { + return transfer_inOutDate; + } + + public void setTransfer_inOutDate(Date transfer_inOutDate) { + this.transfer_inOutDate = transfer_inOutDate; + } + + public String getTransfer_outComment() { + return transfer_outComment; + } + + public void setTransfer_outComment(String transfer_outComment) { + this.transfer_outComment = transfer_outComment; + } + + public String getTransfer_inComment() { + return transfer_inComment; + } + + public void setTransfer_inComment(String transfer_inComment) { + this.transfer_inComment = transfer_inComment; + } + + public String getTransfer_senderName() { + return transfer_senderName; + } + + public void setTransfer_senderName(String transfer_senderName) { + this.transfer_senderName = transfer_senderName; + } + + public String getTransfer_receiverName() { + return transfer_receiverName; + } + + public void setTransfer_receiverName(String transfer_receiverName) { + this.transfer_receiverName = transfer_receiverName; + } + +} diff --git a/src/main/java/com/spring/bank/user/vo/UserVO.java b/src/main/java/com/spring/bank/user/vo/UserVO.java index ac0cc22..885e809 100644 --- a/src/main/java/com/spring/bank/user/vo/UserVO.java +++ b/src/main/java/com/spring/bank/user/vo/UserVO.java @@ -20,9 +20,8 @@ public class UserVO{ private int member_enabled; // 이메일 인증키 private String member_authority; // 회원등급 코드 - private String access_token; - private String refresh_token; - private String user_seq_no; + // 본인인증 고유키 + private String unique_key; public UserVO() {} @@ -131,31 +130,14 @@ public void setMember_authority(String member_authority) { this.member_authority = member_authority; } - public String getAccess_token() { - return access_token; + public String getUnique_key() { + return unique_key; } - public void setAccess_token(String access_token) { - this.access_token = access_token; + public void setUnique_key(String unique_key) { + this.unique_key = unique_key; } - public String getRefresh_token() { - return refresh_token; - } - - public void setRefresh_token(String refresh_token) { - this.refresh_token = refresh_token; - } - - public String getUser_seq_no() { - return user_seq_no; - } - - public void setUser_seq_no(String user_seq_no) { - this.user_seq_no = user_seq_no; - } - - } diff --git a/src/main/resources/mappers/adminSqlMapper.xml b/src/main/resources/mappers/adminSqlMapper.xml index 4bad411..f4e7df6 100644 --- a/src/main/resources/mappers/adminSqlMapper.xml +++ b/src/main/resources/mappers/adminSqlMapper.xml @@ -101,7 +101,172 @@ DELETE FROM deposit_product WHERE deposit_product_name IN ( #{deposit_product_name} ) + + + INSERT INTO saving_product(saving_product_name, saving_product_summary, saving_product_date, saving_product_interRate, saving_product_type, saving_product_maxDate, saving_product_minDate, saving_product_minPrice, saving_product_explanation, saving_product_notice, saving_product_bankCode) + VALUES(#{saving_product_name}, #{saving_product_summary}, sysdate, #{saving_product_interRate}, #{saving_product_type}, #{saving_product_maxDate}, #{saving_product_minDate}, #{saving_product_minPrice}, #{saving_product_explanation}, #{saving_product_notice}, #{saving_product_bankCode}) + + + + + + + + + + + + + + + + + + + + UPDATE saving_product set saving_product_summary=#{saving_product_summary}, saving_product_interRate=#{saving_product_interRate}, saving_product_type=#{saving_product_type}, saving_product_maxDate=#{saving_product_maxDate}, saving_product_minDate=#{saving_product_minDate}, saving_product_minPrice=#{saving_product_minPrice}, saving_product_explanation=#{saving_product_explanation}, saving_product_notice=#{saving_product_notice}, saving_product_bankCode=#{saving_product_bankCode} + WHERE saving_product_name=#{saving_product_name} + + + + + DELETE FROM saving_product WHERE saving_product_name IN ( #{saving_product_name} ) + + + + + + INSERT INTO fund(fund_id, fund_title, fund_content, fund_start_date, fund_end_date, fund_goal_money, fund_category, fund_approve, fund_mem_name, fund_mem_hp, fund_mem_email, fund_account, fund_filename, fund_summary, fund_bank_code) + VALUES(fund_id.nextval, #{fund_title}, #{fund_content}, #{fund_start_date}, #{fund_end_date}, #{fund_goal_money}, #{fund_category}, 0, #{fund_mem_name}, #{fund_mem_hp}, #{fund_mem_email}, #{fund_account}, #{fund_filename}, #{fund_summary}, #{fund_bank_code}) + + + + + + + + + + + + + + + + + + + + UPDATE fund set fund_content=#{fund_content}, fund_start_date=#{fund_start_date}, fund_end_date=#{fund_end_date}, fund_goal_money=#{fund_goal_money}, fund_category=#{fund_category} + , fund_mem_name=#{fund_mem_name}, fund_mem_hp=#{fund_mem_hp}, fund_mem_email=#{fund_mem_email}, fund_account=#{fund_account}, fund_filename=#{fund_filename}, fund_summary=#{fund_summary}, fund_bank_code=#{fund_bank_code} + WHERE fund_title=#{fund_title} + + + + + DELETE FROM fund WHERE fund_title IN ( #{fund_title} ) + + + + + + INSERT INTO irp_product(irp_product_name, irp_product_summary, irp_product_date, irp_product_interRate, irp_product_expiryTerm, irp_product_explanation,irp_product_money, irp_product_notice, irp_product_bankCode) + VALUES(#{irp_product_name}, #{irp_product_summary}, sysdate, #{irp_product_interRate}, #{irp_product_expiryTerm}, #{irp_product_explanation}, #{irp_product_money},#{irp_product_notice}, #{irp_product_bankCode}) + + + + + + + + + + + + + + + + + + + + UPDATE irp_product SET irp_product_summary=#{irp_product_summary}, irp_product_interRate=#{irp_product_interRate}, irp_product_expiryTerm=#{irp_product_expiryTerm}, irp_product_explanation=#{irp_product_explanation},irp_product_money=#{irp_product_money}, irp_product_notice=#{irp_product_notice}, irp_product_bankCode=#{irp_product_bankCode} + WHERE irp_product_name=#{irp_product_name} + + + + + DELETE FROM irp_product WHERE irp_product_name IN ( #{irp_product_name} ) + + + + + + INSERT INTO account(account_bankCode, account_id, account_password, account_balance, account_type, account_state, account_stateContent, account_limit, account_newDate, unique_key, account_default, account_linked, account_bankImg) + VALUES(#{account_bankCode}, #{account_id}, #{account_password}, #{account_balance}, #{account_type}, #{account_state}, #{account_stateContent}, #{account_limit}, sysdate, #{unique_key}, 0, 0, #{account_bankImg}) + + + + + + + UPDATE account SET account_state = 0 WHERE account_id = #{account_id} + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO loan_product(loan_product_name + , loan_product_rate + , loan_product_minPrice + , loan_product_maxPrice + , loan_product_minDate + , loan_product_maxDate + , loan_product_bankCode + , loan_product_baseDate + , loan_product_prepaymentRate + , loan_product_summary + ) + VALUES(#{loan_product_name} + , #{loan_product_rate} + , #{loan_product_minPrice} + , #{loan_product_maxPrice} + , #{loan_product_minDate} + , #{loan_product_maxDate} + , #{loan_product_bankCode} + , sysdate + , #{loan_product_prepaymentRate} + , #{loan_product_summary} + ) + + + + UPDATE loan_product + SET loan_product_rate = #{loan_product_rate} + , loan_product_minPrice = #{loan_product_minPrice} + , loan_product_maxPrice = #{loan_product_maxPrice} + , loan_product_minDate = #{loan_product_minDate} + , loan_product_maxDate = #{loan_product_maxDate} + , loan_product_bankCode = #{loan_product_bankCode} + , loan_product_prepaymentRate = #{loan_product_prepaymentRate} + , loan_product_summary = #{loan_product_summary} + WHERE loan_product_name = #{pre_loan_product_name} + + + + DELETE loan_product + WHERE loan_product_name = #{loan_product_name} + + + + + + + + + + + + + + UPDATE loan + SET loan_state = #{state} + WHERE loan_id = #{loan_id} + + + + + + + + + + + + + + + + + + INSERT INTO transfer(transfer_id + , account_id + , transfer_senderAccount + , transfer_money + , transfer_inOut + , transfer_inOutDate + , transfer_inComment + , transfer_senderName + , transfer_receiverName + , transfer_bankCode + ) + VALUES(transfer_seq.nextval + , #{account_id} + , #{account_id} + , #{transfer_money} + , #{transfer_inOut} + , SYSDATE + , #{transfer_inComment} + , #{transfer_senderName} + , #{transfer_receiverName} + , #{transfer_bankCode} + ) + + + + + DELETE transfer WHERE transfer_inComment LIKE '%'||#{transfer_inComment}||'%' + + + + + UPDATE account + SET account_balance = account_balance + #{loan_amount} + WHERE account_id = #{account_id} + + + + + + + + + + + INSERT INTO NOTICE(NOTICE_NUM, NOTICE_WRITER, NOTICE_SUBJECT, NOTICE_PASSWORD, NOTICE_CONTENT, NOTICE_READCNT) + VALUES (notice_num_seq.nextval, #{notice_writer}, #{notice_subject}, #{notice_password}, #{notice_content}, 0) + + + + + + + + + + + UPDATE NOTICE SET notice_subject = #{notice_subject}, notice_password = #{notice_password}, notice_content = #{notice_content} + WHERE notice_num = #{notice_num} + + + + + DELETE FROM NOTICE WHERE notice_num = #{notice_num} + + \ No newline at end of file diff --git a/src/main/resources/mappers/userSqlMapper.xml b/src/main/resources/mappers/userSqlMapper.xml index 7fa31f3..4805e36 100644 --- a/src/main/resources/mappers/userSqlMapper.xml +++ b/src/main/resources/mappers/userSqlMapper.xml @@ -2,7 +2,7 @@ - + @@ -10,22 +10,17 @@ SELECT COUNT(*) as cnt FROM members WHERE member_id = #{member_id} + + + - INSERT INTO members(member_id, member_password, member_name, member_birth, member_hp, member_email, member_zipcode, member_addr1, member_addr2, member_addr3, member_indate, member_enabled, member_authority, access_token, refresh_token, user_seq_no) - VALUES(#{member_id}, #{member_password}, #{member_name}, #{member_birth}, #{member_hp}, #{member_email}, #{member_zipcode}, #{member_addr1}, #{member_addr2}, #{member_addr3}, sysdate, 1, 'ROLE_USER', #{access_token}, #{refresh_token}, #{user_seq_no}) + INSERT INTO members(member_id, member_password, member_name, member_birth, member_hp, member_email, member_zipcode, member_addr1, member_addr2, member_addr3, member_indate, member_enabled, member_authority, unique_key) + VALUES(#{member_id}, #{member_password}, #{member_name}, #{member_birth}, #{member_hp}, #{member_email}, #{member_zipcode}, #{member_addr1}, #{member_addr2}, #{member_addr3}, sysdate, 1, 'ROLE_USER', #{unique_key}) - - - UPDATE members SET member_enabled = #{member_enabled} WHERE member_email = #{member_email} - - - - - SELECT * FROM members WHERE member_name=#{member_name} AND member_email=#{member_email} - + - + SELECT * FROM members WHERE member_name=#{member_name} AND + member_email=#{member_email} AND member_id=#{member_id} - + - - UPDATE members set member_password=#{member_password} WHERE member_id=#{member_id} + + UPDATE members set member_password=#{member_password} + WHERE member_id=#{member_id} - + - - - INSERT INTO inquiry(inquiry_id, inquiry_title,inquiry_content,member_id, inquiry_ref,inquiry_regDate) - VALUES(inquiry_seq.nextval, #{inquiry_title}, #{inquiry_content}, #{member_id}, inquiry_seq.currval,#{inquiry_regDate}) - + + INSERT INTO inquiry(inquiry_id, + inquiry_title,inquiry_content,member_id, inquiry_ref,inquiry_regDate) + VALUES(inquiry_seq.nextval, #{inquiry_title}, #{inquiry_content}, + #{member_id}, inquiry_seq.currval,#{inquiry_regDate}) + - UPDATE inquiry SET readCnt = readCnt+1 - WHERE inquiry_id=#{inquiry_id} + UPDATE inquiry SET readCnt = + readCnt+1 + WHERE inquiry_id=#{inquiry_id} - + - + UPDATE inquiry SET inquiry_id=#{inquiry_id}, - inquiry_title=#{inquiry_title}, inquiry_content=#{inquiry_content} + inquiry_title=#{inquiry_title}, inquiry_content=#{inquiry_content} WHERE inquiry_id=#{inquiry_id} - DELETE FROM inquiry - WHERE inquiry_id=#{inquiry_id} + DELETE FROM inquiry + WHERE + inquiry_id=#{inquiry_id} - + - + SELECT COUNT(*) as cnt + FROM faq - - - = #{start} AND rNum <= #{end} ]]> - + - - - = #{start} AND rNum <= #{end} ]]> - - - - + - = #{start} and rNum <= #{end} + ]]> + + + + + + + + + + + + + + + + + INSERT INTO transfer + VALUES(transfer_seq.nextval, + #{account_id}, #{member_id} #{transfer_senderAccount}, + #{transfer_money}, + '출금', + SYSDATE, #{transfer_outComment}, + #{transfer_inComment},#{transfer_senderName}, + #{transfer_reseiverName}, #{transfer_bankCode}) + + + + + UPDATE account + SET + account_balance=#{account_balance} + WHERE + account_id=#{account_id} + + + + + UPDATE account + SET + account_balance=#{account_balance} + WHERE + account_id=#{account_id} + + + + + + + + + + + + + - - + SELECT * FROM saving_product + WHERE saving_product_name=#{saving_product_name} + + + + + INSERT INTO saving(saving_id, saving_product_name, account_id, saving_joinDate, saving_state, saving_rate, saving_money, saving_type, saving_totalMoney, saving_method, saving_endDate) + VALUES (saving_id.nextval, ) + + + + + + + + + + + + + + + + + + + + INSERT INTO fund(saving_id, saving_product_name, account_id, saving_joinDate, saving_state, saving_rate, saving_money, saving_type, saving_totalMoney, saving_method, saving_endDate) + VALUES (saving_id.nextval, ) + + + + + + + + INSERT INTO account(account_id,account_password, member_id, account_type, account_newDate, account_bankCode, account_balance) + VALUES(#{account_id}, #{account_password}, #{member_id}, #{account_type}, sysdate, #{account_bankCode}, #{account_balance}) + + + + + INSERT INTO deposit(deposit_id, deposit_product_name, account_id,deposit_joinDate, deposit_rate, deposit_type, deposit_endDate) + VALUES(deposit_seq.nextval, #{deposit_product_name}, #{account_id}, sysdate, #{deposit_rate}, #{deposit_type}, #{deposit_endDate}) + + + + + + + + + + + + + + + + @@ -185,17 +400,23 @@ UPDATE exchange_rate - SET exchange_rate=#{exchange_rate} + SET exchange_rate=#{exchange_rate}, exchange_com=#{exchange_com} WHERE exchange_country=#{exchange_country} + + + INSERT INTO ACCOUNTBOOK(ACCOUNTBOOK_ID, MEMBER_ID, EXPENSE, INCOME, REGISTER_DATE) @@ -226,4 +447,466 @@ WHERE MEMBER_ID = #{member_id} GROUP BY SUBSTR(REGISTER_DATE,0,6) + + + + + + + + + + + UPDATE loan + SET loan_state = #{state} + WHERE loan_id = #{loan_id} + + + + + + + + + + UPDATE account SET account_balance = #{account_balance} WHERE account_id = #{account_id} + + + + UPDATE account SET account_state = 1 WHERE account_id = #{account_id} + + + + UPDATE account SET unique_key = #{unique_key} WHERE account_id = #{account_id} + + + + INSERT INTO transfer(transfer_id + , account_id + , member_id + , transfer_senderAccount + , transfer_money + , transfer_inOut + , transfer_inOutDate + , transfer_outComment + , transfer_senderName + , transfer_receiverName + , transfer_bankCode + ) + VALUES(transfer_seq.nextval, #{account_id}, #{member_id} + , #{transfer_senderAccount} + , #{transfer_money} + , '출금' + , sysdate + , #{transfer_outComment} + , #{transfer_senderName} + , #{transfer_receiverName} + , #{transfer_bankCode}) + + + + + UPDATE loan + SET loan_monthlyRepayment = #{loan_monthlyRepayment} + , loan_balance = #{loan_balance} + , loan_interest = #{loan_interest} + , loan_tranAmount = #{loan_tranAmount} + , loan_tranInterest = #{loan_tranInterest} + WHERE loan_id = #{loan_id} + + + + + + + + INSERT INTO loan_history(loan_history_id + , loan_id + , transfer_id + , loan_history_date + , loan_history_state + , loan_history_amount + , loan_history_tranInterest + , loan_history_tranAmount) + VALUES(loan_history_seq.nextval + , #{loan_id} + , #{transfer_id} + , sysdate + , 1 + , #{loan_history_amount} + , #{loan_history_tranInterest} + , #{loan_history_tranAmount}) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO loan(loan_id + , loan_product_name + , member_id + , account_id + , loan_state + , loan_startDate + , loan_endDate + , loan_month + , loan_repaymentType + , loan_rate + , loan_monthlyRepayment + , loan_amount + , loan_balance + , loan_interest + , loan_tranAmount + , loan_tranInterest + , loan_delinquency + , loan_prepaymentRate + ) + VALUES(loan_seq.nextval + , #{loan_product_name} + , #{member_id} + , #{account_id} + , #{loan_state} + , #{loan_startDate} + , #{loan_endDate} + , #{loan_month} + , #{loan_repaymentType} + , #{loan_rate} + , #{loan_monthlyRepayment} + , #{loan_amount} + , #{loan_balance} + , #{loan_interest} + , #{loan_tranAmount} + , #{loan_tranInterest} + , #{loan_delinquency} + , #{loan_prepaymentRate} + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE NOTICE SET notice_readCnt = notice_readCnt + 1 + WHERE notice_num = #{notice_num} + + + + + + + + + + + + + + + + + + UPDATE account SET account_linked = 1, member_id = #{member_id} WHERE account_id = #{account_id} AND unique_key = #{unique_key} AND account_liked = 0 + + + + + UPDATE account SET account_linked = 0, member_id = null WHERE account_id = #{account_id} AND member_id = #{member_id} AND account_liked = 1 + + + + + + + + + UPDATE account SET account_default = 0 WHERE member_id = #{member_id} AND account_default = 1 + + + + + UPDATE account SET account_password = #{account_password}, account_default = #{account_default} + WHERE unique_key = #{unique_key} AND account_id = #{account_id} + + + + + \ No newline at end of file diff --git a/src/main/resources/security-context.xml b/src/main/resources/security-context.xml index 6e37749..da76e78 100644 --- a/src/main/resources/security-context.xml +++ b/src/main/resources/security-context.xml @@ -78,7 +78,10 @@ authentication-manager-ref="adminAuthManager" > - + + + + diff --git a/src/main/webapp/META-INF/maven/com.spring/mvc/pom.xml b/src/main/webapp/META-INF/maven/com.spring/mvc/pom.xml index 9536747..b81d34d 100644 --- a/src/main/webapp/META-INF/maven/com.spring/mvc/pom.xml +++ b/src/main/webapp/META-INF/maven/com.spring/mvc/pom.xml @@ -13,6 +13,16 @@ 1.6.10 1.6.6 + + + + + jitpack.io + https://jitpack.io + + + + @@ -262,6 +272,14 @@ + + + com.github.iamport + iamport-rest-client-java + 0.2.15 + + + junit @@ -306,6 +324,19 @@ org.test.int1.Main + + org.apache.maven.plugins + maven-war-plugin + 2.4 + + src/main/webapp + sample + + false + + + + diff --git a/src/main/webapp/WEB-INF/views/common/denied.jsp b/src/main/webapp/WEB-INF/views/common/denied.jsp index 102a1fc..92f926e 100644 --- a/src/main/webapp/WEB-INF/views/common/denied.jsp +++ b/src/main/webapp/WEB-INF/views/common/denied.jsp @@ -14,5 +14,10 @@

관리자 페이지



${errMsg }

+ \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/account/idFind.jsp b/src/main/webapp/WEB-INF/views/customer/account/idFind.jsp index 0a31c35..abf8ed9 100644 --- a/src/main/webapp/WEB-INF/views/customer/account/idFind.jsp +++ b/src/main/webapp/WEB-INF/views/customer/account/idFind.jsp @@ -14,7 +14,7 @@
- + @@ -56,7 +56,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/customer/account/login.jsp b/src/main/webapp/WEB-INF/views/customer/account/login.jsp index d39ce99..68a605d 100644 --- a/src/main/webapp/WEB-INF/views/customer/account/login.jsp +++ b/src/main/webapp/WEB-INF/views/customer/account/login.jsp @@ -21,6 +21,14 @@ + + + + + + <% //쿠키가져오기 Cookie[] cookies = request.getCookies(); diff --git a/src/main/webapp/WEB-INF/views/customer/account/pwFind.jsp b/src/main/webapp/WEB-INF/views/customer/account/pwFind.jsp index ab68bb0..cd0119d 100644 --- a/src/main/webapp/WEB-INF/views/customer/account/pwFind.jsp +++ b/src/main/webapp/WEB-INF/views/customer/account/pwFind.jsp @@ -12,7 +12,7 @@
- + @@ -57,7 +57,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/customer/account/register.jsp b/src/main/webapp/WEB-INF/views/customer/account/register.jsp index d09a418..32dcf63 100644 --- a/src/main/webapp/WEB-INF/views/customer/account/register.jsp +++ b/src/main/webapp/WEB-INF/views/customer/account/register.jsp @@ -10,7 +10,14 @@ - + + + + + + + + - @@ -236,20 +242,18 @@ - - - + - + - + @@ -257,7 +261,7 @@ @@ -358,7 +362,7 @@ @@ -856,19 +860,5 @@ --> - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/accountBook.jsp b/src/main/webapp/WEB-INF/views/customer/accountBook.jsp index dd66163..a89e3f4 100644 --- a/src/main/webapp/WEB-INF/views/customer/accountBook.jsp +++ b/src/main/webapp/WEB-INF/views/customer/accountBook.jsp @@ -147,7 +147,7 @@
- + @@ -221,7 +221,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/customer/bank/accountConnect.jsp b/src/main/webapp/WEB-INF/views/customer/bank/accountConnect.jsp new file mode 100644 index 0000000..cb52208 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/accountConnect.jsp @@ -0,0 +1,157 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +계좌 연동 + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ +
+
+
+
제 1금융권
+
+
+
+ placeholder="중복체크를 해주세요." autofocus onkeyup="confirmId();">

@@ -294,9 +298,9 @@

- - - - - + +

- +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
은행명
+ + 국민은행 + + +
+ + 우리은행 + + +
+ + 농협은행 + + +
+ + 신한은행 + + +
+ + 하나은행 + + +
+ + 코스모은행 + + +
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/account_confirm.jsp b/src/main/webapp/WEB-INF/views/customer/bank/account_confirm.jsp new file mode 100644 index 0000000..44a0522 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/account_confirm.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@ include file="/WEB-INF/views/include/setting.jsp"%> + + + + +account_pwdConfirm + + + + + + +
+ + + + + + + + + + + + + + + + +
+ ${account_password}는 사용할 수 없습니다 +
비밀번호: + +
+ + +
+
+ + + + + + + + + + + +
+ ${account_password}는 사용할 수 있습니다 +
+ +
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/auto_transfer.jsp b/src/main/webapp/WEB-INF/views/customer/bank/auto_transfer.jsp new file mode 100644 index 0000000..f039e50 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/auto_transfer.jsp @@ -0,0 +1,314 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
자동 이체
+
+
+ +
+ + +
+
+ + + + + + + + + + + + + + + +
출금정보
출금계좌번호 +
계좌비밀번호
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
입금정보
입금은행
입금계좌번호 +
이체금액원 +
+ + + + + + + + +
이체 주기
*매일 이체방식은 영업일에만 이체처리됩니다.
(토요일, 일요일, + 공휴일의 경우 이체처리 되지 않습니다.)
이체시작일/이체종료일 ~ +
휴일이체구분 당행이체 자동이체일 경우 선택
받는통장 메모
내통장 메모
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ + + +
+ <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/auto_transfer_List.jsp b/src/main/webapp/WEB-INF/views/customer/bank/auto_transfer_List.jsp new file mode 100644 index 0000000..4416180 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/auto_transfer_List.jsp @@ -0,0 +1,193 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
자동이체 내역
+
+
+ + + + + + + + + + + + +
거래내역 조회
출금계좌번호 +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
이체기관명입금계좌번호이체금액이체 주기이체일선택
{받는사람계좌}{출금일자}{이체주기}{이체금액}{이체기관명} +
+ + + +
+
+ +
+
+ <%-- + + + + + + [◀◀] + [◀] + + + + + + [${i}] + + + + [${i}] + + + + + + [▶] + [▶▶] + + + + --%> +
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ + + <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/balance.jsp b/src/main/webapp/WEB-INF/views/customer/bank/balance.jsp deleted file mode 100644 index ce046b5..0000000 --- a/src/main/webapp/WEB-INF/views/customer/bank/balance.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - -Insert title here - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/myAccountList.jsp b/src/main/webapp/WEB-INF/views/customer/bank/myAccountList.jsp new file mode 100644 index 0000000..e71657b --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/myAccountList.jsp @@ -0,0 +1,87 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +계좌 연동 + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ + +
+
+
제 1금융권
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#은행명
1Mark
2Jacob
3Larry the Bird
+
+
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/transfer.jsp b/src/main/webapp/WEB-INF/views/customer/bank/transfer.jsp new file mode 100644 index 0000000..e0a3fc9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/transfer.jsp @@ -0,0 +1,227 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
이체
+
+
+ +
+ + + + + +
+
+ + + + + + + + + + + + + + + + + +
출금정보
출금계좌번호 +
계좌비밀번호 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
입금정보
입금은행
입금계좌번호 +
이체금액원 +
+ + + + + + + + +
내통장 메모
받는통장 메모
+ +
+
+ +
+ + +
+ +
+
+
+
+
+
+
+
+ + + +
+ <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/transfer_List.jsp b/src/main/webapp/WEB-INF/views/customer/bank/transfer_List.jsp new file mode 100644 index 0000000..1fb01ee --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/transfer_List.jsp @@ -0,0 +1,258 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
이체 내역
+
+
+ + + + + + + + + + + + + + + + +
거래내역 조회
계좌번호 +
기간 선택 ~ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
거래일자보낸사람출금(원)입금(원)내용잔액
Tiger NixonSystem ArchitectEdinburgh612011/04/25$320,800
Garrett WintersAccountantTokyo632011/07/25$170,750
Ashton CoxJunior Technical AuthorSan Francisco662009/01/12$86,000
Cedric KellySenior Javascript DeveloperEdinburgh222012/03/29$433,060
Airi SatouAccountantTokyo332008/11/28$162,700
Brielle WilliamsonIntegration SpecialistNew York612012/12/02$372,000
Herrod ChandlerSales AssistantSan Francisco592012/08/06$137,500
Rhona DavidsonIntegration SpecialistTokyo552010/10/14$327,900
Colleen HurstJavascript DeveloperSan Francisco392009/09/15$205,500
Sonya FrostSoftware EngineerEdinburgh232008/12/13$103,600
+ +
+
+ <%-- + + + + + + [◀◀] + [◀] + + + + + + [${i}] + + + + [${i}] + + + + + + [▶] + [▶▶] + + + + --%> +
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+ + + <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/transfer_confirm.jsp b/src/main/webapp/WEB-INF/views/customer/bank/transfer_confirm.jsp new file mode 100644 index 0000000..ff4d96e --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/transfer_confirm.jsp @@ -0,0 +1,153 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
이체 확인
+
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
출금계좌입금은행
입금계좌 +
받은분이체금액(원)날짜내통장
메모 +
받는통장
메모 +
{출금계좌번호}{입금은행}
{입금계좌} +
{받는분}{이체금액}{날짜}{내통장메모}{받은통장메모}
+ + + + + + + + +
{이체건수}{이체금액}
+
+
+ +
+ + + +
+ +
+ +
+
+
+
+
+
+
+
+ + + +
+ <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/bank/transfer_one_to_num.jsp b/src/main/webapp/WEB-INF/views/customer/bank/transfer_one_to_num.jsp new file mode 100644 index 0000000..66f0b19 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/bank/transfer_one_to_num.jsp @@ -0,0 +1,242 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +다계좌이체 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
다계좌이체
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
출금정보
출금계좌번호 + +
계좌비밀번호
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
삭제No입금은행입금계좌이체금액받은통장메모내통장메모
1
2
3
4
+ + + + + + + + +
총 이체건수${totla_send_sum}총 이체금액${total_send_money}
+ +
+
+ +
+ + + +
+
+
+
+
+
+
+
+
+
+ + + +
+ <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositAction.jsp b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositAction.jsp new file mode 100644 index 0000000..05563ae --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositAction.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> + + + + +고객 - 예금 상품 추가 처리 페이지 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositDetail.jsp b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositDetail.jsp index 4f686f8..6d55cf9 100644 --- a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositDetail.jsp +++ b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositDetail.jsp @@ -22,7 +22,7 @@ - +
@@ -43,7 +43,7 @@
-

예금상품 상세

+

예금 상품 가입하기

@@ -51,10 +51,13 @@
${dto.deposit_product_name}
-
+ + + + @@ -68,7 +71,9 @@ - + @@ -80,6 +85,7 @@ 단리 + @@ -94,7 +100,10 @@ - + + @@ -105,31 +114,39 @@ 미기재 - 신한은행 + 국민은행 - 국민은행 + 우리은행 - 우리은행 + 농협은행 - 기업은행 + 신한은행 - 하나은행 + 하나은행 + + + 코스모 뱅크 + + - + +
상품명
금리${dto.deposit_product_interRate}%${dto.deposit_product_interRate}% + +
종류
최소금액원 + +
등록일${dto.deposit_product_date}${dto.deposit_product_date} +
- + +
@@ -186,100 +203,5 @@ - + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositList.jsp b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositList.jsp index 244bba1..5e1265f 100644 --- a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositList.jsp +++ b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositList.jsp @@ -9,38 +9,11 @@ 예금 상품 목록 조회 - 고객 - - - + - +
@@ -89,15 +62,22 @@ 최소금액 은행코드 등록일 - 상세정보 + ${number} - ${dto.deposit_product_name} + + + + + + + ${dto.deposit_product_summary} ${dto.deposit_product_interRate}% @@ -113,31 +93,33 @@ ${dto.deposit_product_maxDate}개월 원 - + 미기재 - 신한은행 + 국민은행 - 국민은행 + 우리은행 - 우리은행 + 농협은행 - 기업은행 + 신한은행 하나은행 + + 코스모 은행 + ${dto.deposit_product_date} - + @@ -193,7 +175,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductAction.jsp b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductAction.jsp deleted file mode 100644 index ce046b5..0000000 --- a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductAction.jsp +++ /dev/null @@ -1,12 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8"%> - - - - -Insert title here - - - - - \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductJoin.jsp b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductJoin.jsp new file mode 100644 index 0000000..623b86c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductJoin.jsp @@ -0,0 +1,319 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + + +고객 예금 신청 상세 + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

예금 가입 정보 입력

+
+
+
+
+
${dto.deposit_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
신청자${sessionScope.customerID}
상품명${dto.deposit_product_name} + +
상품 요약${dto.deposit_product_summary}
금리${dto.deposit_product_interRate}% + +
종류 + + 복리 + + + + 단리 + + +
기간 설정 + + + +
예치금 *10만원 이상 + + 만원
은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모 은행 + + + +
계좌번호 확인${account_id} + +
계좌 비밀번호 *4자리 숫자로 입력 +
계좌 비밀번호 확인 +
+
+ +
+ + +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductSearch.jsp b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductSearch.jsp index 19d9f9e..f1e8081 100644 --- a/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductSearch.jsp +++ b/src/main/webapp/WEB-INF/views/customer/depositProduct/depositProductSearch.jsp @@ -19,7 +19,7 @@
- + @@ -94,25 +94,28 @@ ${dto.deposit_product_maxDate}개월 원 - + 미기재 - 신한은행 + 국민은행 - 국민은행 + 우리은행 - 우리은행 + 농협은행 - 기업은행 + 신한은행 하나은행 + + 코스모 은행 + ${dto.deposit_product_date} @@ -172,7 +175,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/customer/fundProduct/fundDetail.jsp b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundDetail.jsp new file mode 100644 index 0000000..f3c223e --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundDetail.jsp @@ -0,0 +1,295 @@ + <%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +펀드 상세 보기 + + + + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

펀드상품 상세

+
+
+
+
+
${dto.fund_title}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
펀드상품 한줄요약${dto.fund_summary} + +
${dto.fund_filename} + +
펀딩 기간 ~ + + +
달성도 +
목표 금액원 + +
입금 계좌 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${vo.fund_account}
${vo.fund_content}
등록자 이름 + ${vo.fund_mem_name} +
등록자 연락처 + ${vo.fund_mem_hp} +
등록자 이메일${vo.fund_mem_email}
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/fundProduct/fundList.jsp b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundList.jsp new file mode 100644 index 0000000..b0a84a4 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundList.jsp @@ -0,0 +1,296 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +펀드 상품 목록 조회 - 고객 + + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

펀드 상품 리스트

+ +
+ + + + + +
+
전체 펀드 상품 수 ${cnt}건
+
+ +
+
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
+ +
전체
+ +
+ +
+
+ +
+ <%-- --%> +
+ +
+
+
+
+
+
~
+
${dto.fund_summary}
+
${dto.fund_category} | ${dto.fund_mem_name}
+
+
+
+
+
+
+ +
+ +
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductInsert.jsp b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductInsert.jsp new file mode 100644 index 0000000..2753e86 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductInsert.jsp @@ -0,0 +1,300 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +펀드신청하기 + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

펀드상품 신청

+
+
+
+
+
${dto.saving_product_name}
+
+
+ + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + --%> +
상품명${dto.saving_product_name} + +
펀드 금리 + +
납입 금액 + +
펀드종류 + + 복리 + + + + 단리 + + +
최소기간${dto.saving_product_minDate}개월 + +
최대기간${dto.saving_product_maxDate}개월 + +
최소금액원 + +
유의사항${dto.saving_product_notice} + +
은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + +
등록일${dto.saving_product_date} + +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductSearch.jsp b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductSearch.jsp new file mode 100644 index 0000000..65ff6e3 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductSearch.jsp @@ -0,0 +1,183 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +고객 페이지 - 펀드 상품 검색 조회 + + + + + + +
+ + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

펀드 상품 리스트

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호사진펀드종목펀드상품 이름펀드상품 한줄 요약펀딩기간목표금액회사명회사 연락처회사 이메일
+ + ${number} + + + + + ${dto.fund_category}${dto.fund_title}${dto.fund_summary} ~ ${dto.fund_mem_name}${dto.fund_mem_hp}${dto.fund_mem_email} + 등록된 펀드 상품이 없습니다. +
+ + +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductSuccess.jsp b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductSuccess.jsp new file mode 100644 index 0000000..88f0b08 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/fundProduct/fundProductSuccess.jsp @@ -0,0 +1,274 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금 신청완료 페이지 + + + + + + + + + + +
+
+ +
+
+

적금상품 구매완료

+
+
+
+
+
${dto.saving_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
적금상품이름${dto.saving_product_name} + +
계좌번호${dto.saving_product_explanation} + +
적금 가입날짜${dto.saving_product_interRate}% + +
적금 상태 + + 복리 + + + + 단리 + + +
적금 금리${dto.saving_product_minDate}개월 + +
적금 종류${dto.saving_product_maxDate}개월 + +
총 납입 금액원 + +
만기시 이자${dto.saving_product_maxDate}개월 + +
적금방법${dto.saving_product_notice} + +
만기일 + +
등록일${dto.saving_product_date} + +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/irp/irpAction.jsp b/src/main/webapp/WEB-INF/views/customer/irp/irpAction.jsp new file mode 100644 index 0000000..4646cad --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/irp/irpAction.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> + + + + +고객 - 연금 상품 추가 처리 페이지 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/irp/irpDetail.jsp b/src/main/webapp/WEB-INF/views/customer/irp/irpDetail.jsp new file mode 100644 index 0000000..b5982bb --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/irp/irpDetail.jsp @@ -0,0 +1,288 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +연금 상세 보기 + + + + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

연금상품 상세

+
+
+
+
+
${dto.irp_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
상품명${dto.irp_product_name} + +
상품 설명${dto.irp_product_explanation} + +
금리${dto.irp_product_interRate}% + +
연금 금액원 +
연금 납입(가입) 기간${dto.irp_product_expiryTerm}개월 + +
유의사항${dto.irp_product_notice} + +
은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + +
등록일 + +
+
+ + +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/irp/irpProductJoin.jsp b/src/main/webapp/WEB-INF/views/customer/irp/irpProductJoin.jsp new file mode 100644 index 0000000..e68c594 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/irp/irpProductJoin.jsp @@ -0,0 +1,290 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + + +고객 예금 신청 상세 + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

연금 가입 정보 입력

+
+
+
+
+
${dto.irp_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
신청자${sessionScope.customerID}
상품명${dto.irp_product_name} + +
상품 요약${dto.irp_product_summary}
금리${dto.irp_product_interRate}% + +
연금 금액 *10만원 단위 + 만원
은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모 뱅크 + + + +
계좌번호 확인${account_id} + +
계좌 비밀번호 *4자리 숫자로 입력 +
계좌 비밀번호 확인 +
+
+ +
+ + +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/irp/irpProductList.jsp b/src/main/webapp/WEB-INF/views/customer/irp/irpProductList.jsp new file mode 100644 index 0000000..c963a83 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/irp/irpProductList.jsp @@ -0,0 +1,207 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +연금 상품 목록 - 고객 + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

연금 상품 리스트

+ +
+ + + + + +
+
전체 연금 상품 수 ${cnt}건
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호상품명상품요약금리연금 금액연금 납입(가입) 기간은행코드등록일
${number} + + + + + + ${dto.irp_product_summary}${dto.irp_product_interRate}%${dto.irp_product_expiryTerm}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모 뱅크 + + + + +
+ 등록된 연금 상품이 없습니다. +
+ + +
+ +
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/irp/irpProductSearch.jsp b/src/main/webapp/WEB-INF/views/customer/irp/irpProductSearch.jsp new file mode 100644 index 0000000..fba656a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/irp/irpProductSearch.jsp @@ -0,0 +1,204 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +연금 상품 목록 - 고객 + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

연금 상품 리스트

+ +
+ + + + + +
+
전체 연금 상품 수 ${cnt}건
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호상품명상품요약금리연금 금액 연금 납입(가입) 기간은행코드등록일상세정보
${number} + + ${dto.irp_product_name} ${dto.irp_product_summary}${dto.irp_product_interRate}%${dto.irp_product_expiryTerm}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모 뱅크 + + + ${dto.irp_product_date}
+ 검색된 연금 상품이 없습니다. +
+ + +
+ +
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanAccountDetail.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanAccountDetail.jsp new file mode 100644 index 0000000..70f8cec --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanAccountDetail.jsp @@ -0,0 +1,114 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 계좌 거래내역

+
+
+
+
+
거래내역 조회
+
+
+ + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + --%> + +
거래일거래시간입/출금거래유형통장식별내용거래금액거래후잔액거래점명
${t.tran_date}${t.tran_time}${t.inout_type}${t.tran_type}${t.print_content}${t.tran_amt} 원${t.after_balance_amt} 원${t.branch_name}
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanAccountList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanAccountList.jsp new file mode 100644 index 0000000..abf4f75 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanAccountList.jsp @@ -0,0 +1,257 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ +
+
+
+
+
+
+
+ 대출 가입 내역 조회 + <%--
+ + + + --%> +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + <%-- --%> + + <%-- --%> + + + + + + + + + +
대출번호대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출잔액익월 상환액
${l.loan_id}${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
+ + 대출 실행일 :
+ 대출 만기일 : +
+
+ + + 원금 + + + 원리금 + + + 만기 + + + ${l.loan_rate} % 원 원 원 원 + <%--
+ + 익월 납입원금 :  원
+ 익월 납입이자 :  원 +
--%> +
+
+ + 체납액 :  원
+ 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
+
+ +
대출 가입 내역이 존재하지 않습니다.
+ + +
+ +
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanCancelAction.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanCancelAction.jsp new file mode 100644 index 0000000..b709fca --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanCancelAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanCancelDetail.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanCancelDetail.jsp new file mode 100644 index 0000000..3826b57 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanCancelDetail.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 해지 상품

+
+
+
+
+
대출계약 철회완료
+
+
+

대출금이 모두 상환되었으며, 코스모뱅크 및 신용정보사의 대출취급이력이 함께 삭제되었습니다.

+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanCancelList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanCancelList.jsp new file mode 100644 index 0000000..0aca82d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanCancelList.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ +
+
+
+
+
+
+
+ 대출 해지/만기 내역 조회 + <%--
+ + + + --%> +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
대출번호대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출원금대출잔액이자잔액익월 상환액요약
${l.loan_id}${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
+ + 대출 실행일 :
+ 대출 만기일 : +
+
+ + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + + ${l.loan_rate} % 원 원 원 원 +
+ + 익월 납입원금 :  원
+ 익월 납입이자 :  원 +
+
+
+ + 체납액 :  원
+ 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
+
대출 해지/만기 내역이 존재하지 않습니다.
+ + +
+ +
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanDirectDebit.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanDirectDebit.jsp new file mode 100644 index 0000000..5d5a2f4 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanDirectDebit.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 자동이체 신청

+
+
+
+
+
자동이체 신청
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanHistoryList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanHistoryList.jsp new file mode 100644 index 0000000..3e0bb73 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanHistoryList.jsp @@ -0,0 +1,204 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ +
+
+
+
+
+
+
+ 대출 상환 내역 조회 + <%--
+ + + + --%> +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
대출상환번호대출번호이체번호대출상환일자대출상환종류월 상환 총액월 납입원금월 납입이자
${l.loan_history_id}${l.loan_id}${l.transfer_id} + + + 정상 + + + 연체 + + + 중도상환 + + + 해지 + + +
대출 상환 내역이 존재하지 않습니다.
+ + +
+ +
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanPaymentAction.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanPaymentAction.jsp new file mode 100644 index 0000000..d7fc3df --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanPaymentAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalDetail.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalDetail.jsp new file mode 100644 index 0000000..d5fd1c0 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalDetail.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 원금 조회

+
+
+
+
+
대출 원금 조회
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalList.jsp new file mode 100644 index 0000000..ea1c4a2 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalList.jsp @@ -0,0 +1,123 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 원금 조회

+
+
+
+
+
대출 상품 원금 목록
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
상품명대출 계좌대출금액금리은행상환금계약 기간
....... + + +
....... + + +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalPayment.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalPayment.jsp new file mode 100644 index 0000000..9821c82 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalPayment.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 원금 납부

+
+
+
+
+
대출 원금 납부
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalRateList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalRateList.jsp new file mode 100644 index 0000000..31e44f8 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalRateList.jsp @@ -0,0 +1,304 @@ +<%@page import="java.time.format.DateTimeFormatter"%> +<%@ page import="java.time.LocalDate" %> +<%@ page import="java.sql.Date" %> +<%@ page import="com.spring.bank.user.vo.LoanVO" %> +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 원금/이자 조회

+
+
+
+
+
+ ${loan.loan_product_name} ( + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + ) +
+
+
+
+ + + + + + + + + + + + + + + + <% + LoanVO loan = (LoanVO) request.getAttribute("loan"); + //out.println("loan : " + loan); + float rate = loan.getLoan_rate() / 100; + //out.println("rate : " + rate); + long amount = loan.getLoan_amount(); + //out.println("amount : " + amount); + int month = loan.getLoan_month(); + //out.println("month : " + month); + LocalDate loan_startDate = loan.getLoan_startDate().toLocalDate(); + //out.println("loan_startDate : " + loan_startDate); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy/MM/dd"); + + + %> + + <% + long first_tran_amount = Math.round(amount / month); + //out.println("first_tran_amount : " + first_tran_amount); + long first_tran_interest = Math.round((amount * (rate / 12))); + //out.println("first_tran_interest : " + first_tran_interest); + + long ta = first_tran_amount; + //out.println("ta : " + ta); + long ti = first_tran_interest; + //out.println("ti : " + ti); + long sum_amount = amount; + //out.println("sum_amount : " + sum_amount); + long sum_interest = first_tran_interest; + //out.println("sum_interest : " + sum_interest); + for(int i = 1; i <= month; i++) { + //out.println("i : " + i); + sum_amount -= ta; + //out.println("sum_amount : " + sum_amount); + ti = Math.round((sum_amount * (rate / 12))); + //out.println("ti : " + ti); + sum_interest += ti; + //out.println("sum_interest : " + sum_interest); + } + + long first_monthlyRepayment = first_tran_amount + first_tran_interest; + //out.println("first_monthlyRepayment : " + first_monthlyRepayment); + %> + + + + + + + + + + <% + sum_amount = amount; + //out.println("sum_amount : " + sum_amount); + long monthly = first_monthlyRepayment; + //out.println("monthly : " + monthly); + long tran_amount = first_tran_amount; + //out.println("tran_amount : " + tran_amount); + long tran_interest = first_tran_interest; + //out.println("tran_interest : " + tran_interest); + LocalDate return_date = loan_startDate.plusMonths(1); + //out.println("return_date : " + return_date); + String date = return_date.format(formatter); + for(int i = 1; i <= month; i++) { + //out.println("i : " + i); + return_date = loan_startDate.plusMonths(i); + //out.println("return_date : " + return_date); + date = return_date.format(formatter); + sum_amount -= tran_amount; + //out.println("sum_amount : " + sum_amount); + sum_interest -= tran_interest; + //out.println("sum_interest : " + sum_interest); + monthly = tran_interest + tran_amount; + //out.println("monthly : " + monthly); + %> + + + + + + + + + + + <% + tran_interest = Math.round((sum_amount * (rate / 12))); + //out.println("tran_interest : " + tran_interest); + } + %> + + + <% + long first_tran_interest = Math.round((amount * (rate / 12))); + + double pow = Math.pow((1 + (rate / 12)), month); + long monthlyRepayment = Math.round((amount * (rate / 12) * pow) / (pow - 1)); + + long first_tran_amount = monthlyRepayment - first_tran_interest; + + long sum_amount = amount; + long sum_interest = Math.round((monthlyRepayment * month) - amount); + %> + + + + + + + + + + <% + long tran_amount = first_tran_amount; + long tran_interest = first_tran_interest; + LocalDate return_date = loan_startDate.plusMonths(1); + String date = return_date.format(formatter); + for(int i = 1; i <= month; i++) { + return_date = loan_startDate.plusMonths(i); + date = return_date.format(formatter); + sum_amount -= tran_amount; + sum_interest -= tran_interest; + %> + + + + + + + + + + + <% + tran_interest = Math.round((sum_amount * (rate / 12))); + tran_amount = monthlyRepayment - tran_interest; + } + %> + + + <% + long first_tran_amount = 0; + long first_tran_interest = Math.round((amount * (rate / 12))); + long sum_amount = amount; + long sum_interest = Math.round((amount * (rate / 12)) * month); + long first_monthlyRepayment = first_tran_amount + first_tran_interest; + %> + + + + + + + + + + <% + long monthly = first_monthlyRepayment; + long tran_amount = first_tran_amount; + long tran_interest = first_tran_interest; + LocalDate return_date = loan_startDate.plusMonths(1); + String date = return_date.format(formatter); + for(int i = 1; i <= month; i++) { + return_date = loan_startDate.plusMonths(i); + date = return_date.format(formatter); + sum_amount -= tran_amount; + sum_interest -= tran_interest; + monthly = tran_interest + tran_amount; + %> + + + + + + + + + + + <% + if(i == month - 1) tran_amount = amount; + } + %> + + +
대출원금잔액대출이자잔액월상환액월납입원금월납입이자상환예정일
<%=i%>차<%=date%><%-- --%>
<%=i%>차<%=date%><%-- --%>
<%=i%>차<%=date%><%-- --%>
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalRatePayment.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalRatePayment.jsp new file mode 100644 index 0000000..cb66ef0 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanPrincipalRatePayment.jsp @@ -0,0 +1,195 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+
+
+
+
+ + [국민은행] + + + [우리은행] + + + [농협은행] + + + [신한은행] + + + [하나은행] + + + [코스모은행] + +  ${loanProduct.loan_product_name} : ${cnt + 1}회차 납부
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
  +    =  
+ + + +
+


+   + + + +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanRateDetail.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanRateDetail.jsp new file mode 100644 index 0000000..d6d50ee --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanRateDetail.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 이자 조회

+
+
+
+
+
이자 납입 내역
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanRateList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanRateList.jsp new file mode 100644 index 0000000..897d09f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanRateList.jsp @@ -0,0 +1,123 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출 이자 조회

+
+
+
+
+
대출 이자 조회
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
상품명은행대출 계좌금리이번달 이자다음달(예상) 이자계약 기간
....... + + +
....... + + +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/loanRatePayment.jsp b/src/main/webapp/WEB-INF/views/customer/loan/loanRatePayment.jsp new file mode 100644 index 0000000..c9d159e --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/loanRatePayment.jsp @@ -0,0 +1,361 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+
+
+
+
신규 대출 신청
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ <%-- --%> + +
+ +
+ +
+ +
  +    =  
+ + + +
+

+ + +
+


+   + +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/newLoanDetail.jsp b/src/main/webapp/WEB-INF/views/customer/loan/newLoanDetail.jsp new file mode 100644 index 0000000..b080004 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/newLoanDetail.jsp @@ -0,0 +1,240 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+ [ + + 미기재 + + + 국민 + + + 우리 + + + 농협 + + + 신한 + + + 하나 + + + 코스모 + + ] ${loanProduct.loan_product_name} +
+
+
+
+
+
+
+
+ +
+
+
+
+

금리

+

${loanProduct.loan_product_rate} %

+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

최대 대출금액

+

 원

+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

대출기간

+

${loanProduct.loan_product_minDate} ~ ${loanProduct.loan_product_maxDate} 년

+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+

중도상환수수료요율

+

${loanProduct.loan_product_prepaymentRate} %

+
+
+
+
+
+
+
+
+
+
+
+ ${loanProduct.loan_product_name} +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
개요   KOSMO BANK 가입 고객을 위한 ${loanProduct.loan_product_name}
대출대상   KOSMO BANK 가입 고객
대출한도   +  개인별 최대  원 +  ※ 최소 금액은  원 +
대출기간   만기일시상환 및 한도대출(마이너스통장 방식) : 최장 ${loanProduct.loan_product_maxDate}년까지 약정가능
 원(리)금분할상환대출 : 최장 ${loanProduct.loan_product_maxDate}년까지 약정가능
기본금리   기준금리 : 기간별 고정금리, 연체이자율 적용 없음
상환방법   만기일시상환, 통장식상환 : 대출만기일에 전액 상환
 원(리)금 균등분할 상환 : 매달 원(리)금을 분할하여 상환
담보   .
고객부담비용   【대출 신규취급시】인지세 : 대출약정시 납부세금(인지세법)
 ※ 은행과 고객이 각각 50% 부담(대출금액별 상이)
 【대출 상환시】중도상환해약금 : 대출 취급후 ${loanProduct.loan_product_minDate}년 이내 상환시 발생
 ※ 대출 취급후 ${loanProduct.loan_product_minDate}년 경과 또는 만기 1개월 이내 : 면제
이용시간   신청가능시간 : 24시간, 365일 가능
+
+ +
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/newLoanList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/newLoanList.jsp new file mode 100644 index 0000000..7537d6c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/newLoanList.jsp @@ -0,0 +1,230 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
+ + + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ +
+
+
+
+
+
+
+ 대출 상품 조회 +
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
대출상품명금리대출금액대출기간은행상품등록일요약
+ ${p.loan_product_name} + ${p.loan_product_rate} % ~  원${p.loan_product_minDate} ~ ${p.loan_product_maxDate} 년 + + 미기재 + + + 국민 + + + 우리 + + + 농협 + + + 신한 + + + 하나 + + + 코스모 + +
+ + ${p.loan_product_summary} +
+

중도상환수수료 요율 : ${p.loan_product_prepaymentRate}%

+
+
+ +
대출 상품이 존재하지 않습니다.
+ + +
+ +
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/newLoanSign.jsp b/src/main/webapp/WEB-INF/views/customer/loan/newLoanSign.jsp new file mode 100644 index 0000000..b98a4a7 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/newLoanSign.jsp @@ -0,0 +1,369 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+
+
+
+
신규 대출 신청
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+ +
+ +
  +    =  
+ + + +
+

+ + +
+


+   + +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/newLoanSignAction.jsp b/src/main/webapp/WEB-INF/views/customer/loan/newLoanSignAction.jsp new file mode 100644 index 0000000..952ff40 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/newLoanSignAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/readme.txt b/src/main/webapp/WEB-INF/views/customer/loan/readme.txt new file mode 100644 index 0000000..fcda73a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/readme.txt @@ -0,0 +1,18 @@ +loanAccountList 대출 목록 +loanAccountDetail 대출 계좌 거래내역 + +loanCancelList 대출 해지 목록 +loanCancelDetail 대출 해지 상세 + +loanDirectDebit 대출 자동이체 + +loanPrincipalList 대출 원금 목록 +loanPrincipalDetail 대출 원금 상세 +loanPrincipalPayment 대출 원금 납부 + +loanRateList 대출 이자 목록 +loanRateDetail 대출 이자 상세 +loanRatePayment 대출 이자 납부 + +newLoanList 대출 상품 목록 +newLoanSign 신규대출 diff --git a/src/main/webapp/WEB-INF/views/customer/loan/searchLoanProductList.jsp b/src/main/webapp/WEB-INF/views/customer/loan/searchLoanProductList.jsp new file mode 100644 index 0000000..8a34a5d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/searchLoanProductList.jsp @@ -0,0 +1,218 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
+ + + +
+
+ +
+
+
+
+

KOSMO BANK

+
+

+ KOSMO BANK에 오신 것을 환영합니다.
저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

+
+
+
+
+ +
+
+
+
+
+
+
+ 대출 상품 조회 +
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
대출상품명금리대출금액대출기간은행상품등록일요약
${p.loan_product_name}${p.loan_product_rate} % ~  원${p.loan_product_minDate} ~ ${p.loan_product_maxDate} 년 + + 미기재 + + + 국민 + + + 우리 + + + 농협 + + + 신한 + + + 하나 + + + 코스모 + +
+ + ${p.loan_product_summary} +
+

중도상환수수료 요율 : ${p.loan_product_prepaymentRate}%

+
+ +
대출 상품이 존재하지 않습니다.
+ + +
+ +
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/terms.jsp b/src/main/webapp/WEB-INF/views/customer/loan/terms.jsp new file mode 100644 index 0000000..1be0860 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/terms.jsp @@ -0,0 +1,35 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +은행여신거래기본약관 + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/loan/tool.jsp b/src/main/webapp/WEB-INF/views/customer/loan/tool.jsp new file mode 100644 index 0000000..da7d48b --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/loan/tool.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
+ + + +
+
+
+

대출상품 관리

+
+
+
+
+
대출상품 등록
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/myPage.jsp b/src/main/webapp/WEB-INF/views/customer/myPage.jsp index 31484f1..2ed160f 100644 --- a/src/main/webapp/WEB-INF/views/customer/myPage.jsp +++ b/src/main/webapp/WEB-INF/views/customer/myPage.jsp @@ -10,7 +10,7 @@
- + @@ -35,7 +35,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/customer/myaccount/myDepositList.jsp b/src/main/webapp/WEB-INF/views/customer/myaccount/myDepositList.jsp new file mode 100644 index 0000000..ca9e46a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/myaccount/myDepositList.jsp @@ -0,0 +1,208 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + +
+ + + + +
+
+
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

   ${member_name}님의 ${boardName}리스트

+<%-- + + + + + + +

버튼은 보류

--%> +
+ +
+ +
+

위의 select box를 이용하세요!

+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/myaccount/myDepositSubList.jsp b/src/main/webapp/WEB-INF/views/customer/myaccount/myDepositSubList.jsp new file mode 100644 index 0000000..215483f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/myaccount/myDepositSubList.jsp @@ -0,0 +1,104 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +Insert title here + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ ${boardName}상품이름 + + ${boardName}계좌번호 + + ${boardName}은행명 + + ${boardName}가입날짜 + + ${boardName}상태 + + ${boardName}금리 + + ${boardName}금액 + + ${boardName}만기일 +
+ ${vo.deposit_product_name} + + ${vo.account_id} + + + + + + + + + + + + + + + + + + + + + + ${vo.deposit_joinDate} + + ${vo.deposit_state} + + ${vo.deposit_rate} + + ${vo.deposit_balance} + + +
+ +
+ + +
+ +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/myaccount/myIRPList.jsp b/src/main/webapp/WEB-INF/views/customer/myaccount/myIRPList.jsp new file mode 100644 index 0000000..3f3afb9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/myaccount/myIRPList.jsp @@ -0,0 +1,286 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + +
+ + + + +
+
+
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

   ${member_name}님의 ${boardName}리스트

+<%-- + + + + + + +

버튼은 보류

--%> +
+
+ +
+ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ ${boardName}상품이름 + + ${boardName}계좌번호 + + ${boardName}은행명 + + ${boardName}가입날짜 + + ${boardName}상태 + + ${boardName}금리 + + ${boardName}금액 + + ${boardName}만기일 +
+ ${vo.irp_product_name} + + ${vo.account_id} + + + + + + + + + + + + + + + + + + + + + + ${vo.irp_joinDate} + + ${vo.irp_state} + + ${vo.irp_rate} + + ${vo.irp_balance} + + ${vo.irp_endDate} +
+ +
+ + +
+ +
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/myaccount/mySavingList.jsp b/src/main/webapp/WEB-INF/views/customer/myaccount/mySavingList.jsp new file mode 100644 index 0000000..dabcc7a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/myaccount/mySavingList.jsp @@ -0,0 +1,208 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + +
+ + + + +
+
+
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+
+

   ${member_name}님의 ${boardName}리스트

+<%-- + + + + + + +

버튼은 보류

--%> +
+ +
+ +
+

위의 select box를 이용하세요!

+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/myaccount/mySavingSubList.jsp b/src/main/webapp/WEB-INF/views/customer/myaccount/mySavingSubList.jsp new file mode 100644 index 0000000..63e697b --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/myaccount/mySavingSubList.jsp @@ -0,0 +1,104 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +Insert title here + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+ ${boardName}상품이름 + + ${boardName}계좌번호 + + ${boardName}은행명 + + ${boardName}가입날짜 + + ${boardName}상태 + + ${boardName}금리 + + ${boardName}금액 + + ${boardName}만기일 +
+ ${vo.saving_product_name} + + ${vo.account_id} + + + + + + + + + + + + + + + + + + + + + + ${vo.saving_joinDate} + + ${vo.saving_state} + + ${vo.saving_rate} + + ${vo.saving_balance} + + ${vo.saving_endDate} +
+ +
+ + +
+ +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/notice/noticeDetail.jsp b/src/main/webapp/WEB-INF/views/customer/notice/noticeDetail.jsp new file mode 100644 index 0000000..4741ac0 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/notice/noticeDetail.jsp @@ -0,0 +1,263 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + +
+ + + + + + + + + + +
+
+
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
${vo.notice_subject}
작성자 : ${vo.notice_writer} 조회수 : ${vo.notice_readCnt} + 작성일 : + + +
+ ${vo.notice_content} +
+ + + + + +
+ + + + + + +
+ + + + + [◀◀] + [◀] + + + + + + [${i}] + + + + [${i}] + + + + + + [▶] + [▶▶] + + +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/notice/noticeList.jsp b/src/main/webapp/WEB-INF/views/customer/notice/noticeList.jsp new file mode 100644 index 0000000..323b536 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/notice/noticeList.jsp @@ -0,0 +1,304 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + +
+ + + + + + + + + + +
+
+
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
글번호 글제목 작성자 작성일 조회수
${number} + + + + ${vo.notice_subject} + + ${vo.notice_writer} + + ${vo.notice_readCnt}
+ 게시글이 없습니다. 글을 작성해주세요!! +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
글번호 글제목 작성일
${number} + + + + ${vo.notice_subject} + + + +
+ 공지사항 게시글이 없습니다. +
+
+ + + + + + +
+ + + + + [◀◀] + [◀] + + + + + + [${i}] + + + + [${i}] + + + + + + [▶] + [▶▶] + + +
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/qna/faqList.jsp b/src/main/webapp/WEB-INF/views/customer/qna/faqList.jsp index 5e83f24..fd9714a 100644 --- a/src/main/webapp/WEB-INF/views/customer/qna/faqList.jsp +++ b/src/main/webapp/WEB-INF/views/customer/qna/faqList.jsp @@ -37,7 +37,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/customer/qna/qnaDetail.jsp b/src/main/webapp/WEB-INF/views/customer/qna/qnaDetail.jsp index 79a7147..b96f4de 100644 --- a/src/main/webapp/WEB-INF/views/customer/qna/qnaDetail.jsp +++ b/src/main/webapp/WEB-INF/views/customer/qna/qnaDetail.jsp @@ -38,7 +38,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/customer/qna/qnaList.jsp b/src/main/webapp/WEB-INF/views/customer/qna/qnaList.jsp index ee63bc6..77d1649 100644 --- a/src/main/webapp/WEB-INF/views/customer/qna/qnaList.jsp +++ b/src/main/webapp/WEB-INF/views/customer/qna/qnaList.jsp @@ -37,7 +37,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyCheck.jsp b/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyCheck.jsp index fce767b..438d2dd 100644 --- a/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyCheck.jsp +++ b/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyCheck.jsp @@ -24,7 +24,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyDetail.jsp b/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyDetail.jsp index 1b56142..ab7e5b6 100644 --- a/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyDetail.jsp +++ b/src/main/webapp/WEB-INF/views/customer/qna/qnaModifyDetail.jsp @@ -40,7 +40,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/customer/qna/qnaWrite.jsp b/src/main/webapp/WEB-INF/views/customer/qna/qnaWrite.jsp index 9285001..67e4164 100644 --- a/src/main/webapp/WEB-INF/views/customer/qna/qnaWrite.jsp +++ b/src/main/webapp/WEB-INF/views/customer/qna/qnaWrite.jsp @@ -42,7 +42,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/customer/savingProduct/savingDetail.jsp b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingDetail.jsp new file mode 100644 index 0000000..3859ec5 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingDetail.jsp @@ -0,0 +1,309 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금 상세 보기 + + + + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

적금상품 상세

+
+
+
+
+
${dto.saving_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
상품명${dto.saving_product_name} + +
상품 설명${dto.saving_product_explanation} + +
금리${dto.saving_product_interRate}% + +
종류 + + 복리 + + + + 단리 + + +
최소기간${dto.saving_product_minDate}개월 + +
최대기간${dto.saving_product_maxDate}개월 + +
최소금액원 + +
유의사항${dto.saving_product_notice} + +
은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + +
등록일${dto.saving_product_date} + +
+
+ + +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/savingProduct/savingList.jsp b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingList.jsp new file mode 100644 index 0000000..3597122 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingList.jsp @@ -0,0 +1,245 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금 상품 목록 조회 - 고객 + + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

적금 상품 리스트

+ +
+ + + + + +
+
전체 적금 상품 수 ${cnt}건
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호상품명상품요약금리종류최소기간최대기간최소금액은행코드등록일
${number} + + + + + + + ${dto.saving_product_summary}${dto.saving_product_interRate}% + + 복리 + + + + 단리 + + ${dto.saving_product_minDate}개월${dto.saving_product_maxDate}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${dto.saving_product_date}
+ 등록된 적금 상품이 없습니다. +
+
+ +
+ +
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductJoin.jsp b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductJoin.jsp new file mode 100644 index 0000000..621410c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductJoin.jsp @@ -0,0 +1,310 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금신청하기 + + + + + + + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

적금상품 신청

+
+
+
+
+
${dto.saving_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + --%> +
신청자${sessionScope.customerID}
상품명 + + +
상품 요약${vo.saving_product_summary}
적금 금리${vo.saving_product_interRate}%
납입 금액 + +
적금종류 + + 복리 + + + + 단리 + + +
최소기간${dto.saving_product_minDate}개월 + +
최대기간${dto.saving_product_maxDate}개월 + +
최소금액원 + +
유의사항${dto.saving_product_notice} + +
은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + +
등록일${dto.saving_product_date} + +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductSearch.jsp b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductSearch.jsp new file mode 100644 index 0000000..b8e7a1f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductSearch.jsp @@ -0,0 +1,220 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +고객 페이지 - 적금 상품 검색 조회 + + + + + + +
+ + + + +
+
+ +
+
+
+
+

KOSMO BANK


+

KOSMO BANK에 오신 것을 환영합니다.
+ 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
+ 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

+
+
+
+
+
+
+

적금 상품 리스트

+ +
+ + + + + +
+
전체 적금 상품 수 ${cnt}건
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
번호상품명상품요약금리종류최소기간최대기간최소금액은행코드등록일상세정보
${number} + + ${dto.saving_product_name} ${dto.saving_product_summary}${dto.saving_product_interRate}% + + 복리 + + + + 단리 + + ${dto.saving_product_minDate}개월${dto.saving_product_maxDate}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${dto.saving_product_date}
+ 검색된 적금 상품이 없습니다. +
+
+ +
+ +
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductSuccess.jsp b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductSuccess.jsp new file mode 100644 index 0000000..88f0b08 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/savingProduct/savingProductSuccess.jsp @@ -0,0 +1,274 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금 신청완료 페이지 + + + + + + + + + + +
+
+ +
+
+

적금상품 구매완료

+
+
+
+
+
${dto.saving_product_name}
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
적금상품이름${dto.saving_product_name} + +
계좌번호${dto.saving_product_explanation} + +
적금 가입날짜${dto.saving_product_interRate}% + +
적금 상태 + + 복리 + + + + 단리 + + +
적금 금리${dto.saving_product_minDate}개월 + +
적금 종류${dto.saving_product_maxDate}개월 + +
총 납입 금액원 + +
만기시 이자${dto.saving_product_maxDate}개월 + +
적금방법${dto.saving_product_notice} + +
만기일 + +
등록일${dto.saving_product_date} + +
+
+ +
+ +
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/utility_bill/apt_maintenance.jsp b/src/main/webapp/WEB-INF/views/customer/utility_bill/apt_maintenance.jsp new file mode 100644 index 0000000..24b7494 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/utility_bill/apt_maintenance.jsp @@ -0,0 +1,134 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
아파트 관리비
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
전자납부번호아파트 주소관리비선택
{고지번호}{아파트주소}{요금} +
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + + +
+ <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/customer/utility_bill/tuition.jsp b/src/main/webapp/WEB-INF/views/customer/utility_bill/tuition.jsp new file mode 100644 index 0000000..4252d23 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/customer/utility_bill/tuition.jsp @@ -0,0 +1,134 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + +코스모 뱅크 + + + + + +
+ + <%@ include file="/WEB-INF/views/include/header.jsp"%> + <%@ include file="/WEB-INF/views/include/sidebar.jsp"%> + +
+
+ +
+ +
+ +
+
+
+
등록금
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
학교이름등록금선택
{학교}{이름}{등록금} +
+ + +
+
+ + +
+
+
+
+
+
+
+
+ + + +
+ <%@ include file="/WEB-INF/views/include/footer.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%@ include file="/WEB-INF/views/include/chatbot.jsp"%> + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/exchange.jsp b/src/main/webapp/WEB-INF/views/exchange.jsp index e548f57..c7e33ab 100644 --- a/src/main/webapp/WEB-INF/views/exchange.jsp +++ b/src/main/webapp/WEB-INF/views/exchange.jsp @@ -11,7 +11,7 @@
- + @@ -34,8 +34,11 @@ *환전신청금액 - + + + + + @@ -198,7 +202,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/exchangeList.jsp b/src/main/webapp/WEB-INF/views/exchangeList.jsp index f4373f7..1deeca3 100644 --- a/src/main/webapp/WEB-INF/views/exchangeList.jsp +++ b/src/main/webapp/WEB-INF/views/exchangeList.jsp @@ -11,7 +11,7 @@
- +
@@ -55,7 +55,7 @@
- + diff --git a/src/main/webapp/WEB-INF/views/include/footerB.jsp b/src/main/webapp/WEB-INF/views/include/footer.jsp similarity index 100% rename from src/main/webapp/WEB-INF/views/include/footerB.jsp rename to src/main/webapp/WEB-INF/views/include/footer.jsp diff --git a/src/main/webapp/WEB-INF/views/include/footerJS.jsp b/src/main/webapp/WEB-INF/views/include/footerJS.jsp new file mode 100644 index 0000000..12c724f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/include/footerJS.jsp @@ -0,0 +1,39 @@ +<%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/include/headerB.jsp b/src/main/webapp/WEB-INF/views/include/header.jsp similarity index 69% rename from src/main/webapp/WEB-INF/views/include/headerB.jsp rename to src/main/webapp/WEB-INF/views/include/header.jsp index e41ae25..27bbde0 100644 --- a/src/main/webapp/WEB-INF/views/include/headerB.jsp +++ b/src/main/webapp/WEB-INF/views/include/header.jsp @@ -49,10 +49,30 @@ - + + <% + Cookie[] cookies = request.getCookies(); + if(cookies != null){ + for(Cookie tempCookie : cookies){ + // 쿠키에 userID란 문자열이 있으면 + if(tempCookie.getName().equals("customerID")){ + //쿠키값으로 대신 로그인 처리함 + session.setAttribute("customerID", tempCookie.getValue()); + + // 쿠키에 adminID란 문자열이 있으면 + } else if(tempCookie.getName().equals("adminID")){ + //쿠키값으로 대신 로그인 처리함 + session.setAttribute("adminID", tempCookie.getValue()); + } + } + } + %>
- - - - - -
  • -
    -
    -

    로그인해주세요!

    +
  • + + + + +
  • + -
  • - - - + + +
    diff --git a/src/main/webapp/WEB-INF/views/include/mngSidebar.jsp b/src/main/webapp/WEB-INF/views/include/mngSidebar.jsp index d445bee..c5eefdb 100644 --- a/src/main/webapp/WEB-INF/views/include/mngSidebar.jsp +++ b/src/main/webapp/WEB-INF/views/include/mngSidebar.jsp @@ -79,11 +79,11 @@ 회원 한도 승인 - +
    @@ -132,107 +127,101 @@ + + + @@ -251,6 +240,9 @@ 자주묻는 질문 + + 공지사항 관리 + @@ -287,17 +279,15 @@ - +
    diff --git a/src/main/webapp/WEB-INF/views/include/setting.jsp b/src/main/webapp/WEB-INF/views/include/setting.jsp index 829a7ba..2d6f092 100644 --- a/src/main/webapp/WEB-INF/views/include/setting.jsp +++ b/src/main/webapp/WEB-INF/views/include/setting.jsp @@ -16,5 +16,12 @@ - + + + + + + + + diff --git a/src/main/webapp/WEB-INF/views/include/sidebar.jsp b/src/main/webapp/WEB-INF/views/include/sidebar.jsp index 2161bfb..21fe147 100644 --- a/src/main/webapp/WEB-INF/views/include/sidebar.jsp +++ b/src/main/webapp/WEB-INF/views/include/sidebar.jsp @@ -18,38 +18,43 @@ - + + + + 관리자 + + + + + ${sessionScope.customerID} - + - + - 사용자 + 로그인 - + +
    @@ -88,7 +107,7 @@ +
  • - + 공지사항
  • @@ -276,6 +358,29 @@
    + + +
    diff --git a/src/main/webapp/WEB-INF/views/index(manager).jsp b/src/main/webapp/WEB-INF/views/index(manager).jsp index 519dea5..33b90d8 100644 --- a/src/main/webapp/WEB-INF/views/index(manager).jsp +++ b/src/main/webapp/WEB-INF/views/index(manager).jsp @@ -11,7 +11,7 @@
    - + @@ -126,7 +126,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp index 6f656d1..2a268d9 100644 --- a/src/main/webapp/WEB-INF/views/index.jsp +++ b/src/main/webapp/WEB-INF/views/index.jsp @@ -9,7 +9,7 @@
    - + @@ -30,89 +30,88 @@
    -
    - +
    + +
    +
    +
    +
    Welcome KOSMO BANK,
    +
    + 환영합니다! 더 많은 서비스를 이용하고 싶다면,
    + 로그인을 해주세요! +
    +
    + +
    +
    +
    +
    +
    + + +
    -
    보유중인 계좌
    + +
    보유중인 계좌 + +
    + + + +
    +
    +
    대표계좌
    -

    200,000,000원

    -
    01202-30934-023 국민
    - +

    +
    ${vo.account_id}
    +
    + + +
    대표계좌
    +

    대표를 계좌를 설정해주세요!

    +
    + +
    +
    - +

    +
    - ... -
    -
    -
    200,000,000원
    -
    012-30434-023 국민
    -
    - -
    -
    -
    - ... + ...
    -
    100,000원
    -
    10-2031-2157 신한
    +
    +
    ${account_id} 국민
    -
    -
    -
    - ... -
    -
    -
    100,000,000원
    -
    957-345-2-1-85 우리
    -
    - -
    -
    -
    - ... -
    -
    -
    100,000,000원
    -
    5-3-74865-232 기업
    -
    - -
    -
    -
    - ... -
    -
    -
    100,000,000원
    -
    3542-34-35747-1 하나
    -
    - -
    - +
    + +
    @@ -170,6 +169,7 @@
    +
    @@ -240,7 +240,7 @@
    - +
    @@ -393,8 +393,10 @@
    - +
    + + diff --git a/src/main/webapp/WEB-INF/views/manager/account/mngLogin.jsp b/src/main/webapp/WEB-INF/views/manager/account/mngLogin.jsp index 974d1f1..ff8f18d 100644 --- a/src/main/webapp/WEB-INF/views/manager/account/mngLogin.jsp +++ b/src/main/webapp/WEB-INF/views/manager/account/mngLogin.jsp @@ -21,6 +21,14 @@
    + + + + + +
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/customerInfo/customerAccountSearch.jsp b/src/main/webapp/WEB-INF/views/manager/customerInfo/customerAccountSearch.jsp index dc2624e..01f7478 100644 --- a/src/main/webapp/WEB-INF/views/manager/customerInfo/customerAccountSearch.jsp +++ b/src/main/webapp/WEB-INF/views/manager/customerInfo/customerAccountSearch.jsp @@ -12,7 +12,7 @@
    - + @@ -177,7 +177,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/customerInfo/customerInfo.jsp b/src/main/webapp/WEB-INF/views/manager/customerInfo/customerInfo.jsp index 804ac5c..8405035 100644 --- a/src/main/webapp/WEB-INF/views/manager/customerInfo/customerInfo.jsp +++ b/src/main/webapp/WEB-INF/views/manager/customerInfo/customerInfo.jsp @@ -40,7 +40,7 @@
    - + @@ -161,7 +161,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/customerInfo/customerSearch.jsp b/src/main/webapp/WEB-INF/views/manager/customerInfo/customerSearch.jsp index 7d4e07b..4353e02 100644 --- a/src/main/webapp/WEB-INF/views/manager/customerInfo/customerSearch.jsp +++ b/src/main/webapp/WEB-INF/views/manager/customerInfo/customerSearch.jsp @@ -33,7 +33,7 @@
    - + @@ -155,7 +155,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInfo.jsp b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInfo.jsp index 8ce1ea5..953d79b 100644 --- a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInfo.jsp +++ b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInfo.jsp @@ -13,7 +13,7 @@
    - + @@ -137,8 +137,8 @@
    - - + +
    @@ -146,7 +146,7 @@ - + diff --git a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInsert.jsp b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInsert.jsp index b6e800d..72cda51 100644 --- a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInsert.jsp +++ b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductInsert.jsp @@ -13,7 +13,7 @@
    - + @@ -135,7 +135,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductList.jsp b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductList.jsp index 76acf9d..78cb24a 100644 --- a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductList.jsp +++ b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductList.jsp @@ -40,7 +40,7 @@
    - + @@ -202,7 +202,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductSearch.jsp b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductSearch.jsp index 759d5e3..f9dc5d4 100644 --- a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductSearch.jsp +++ b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductSearch.jsp @@ -9,7 +9,7 @@ 관리자 페이지 - 예금 상품 조회 - + +
    - + @@ -202,7 +203,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductUpdate.jsp b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductUpdate.jsp index 5fb18bc..58a25ff 100644 --- a/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductUpdate.jsp +++ b/src/main/webapp/WEB-INF/views/manager/depositProduct/depositProductUpdate.jsp @@ -13,7 +13,7 @@
    - + @@ -207,7 +207,7 @@
    - + diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInfo.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInfo.jsp new file mode 100644 index 0000000..abbc765 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInfo.jsp @@ -0,0 +1,181 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 펀드 상품 상세조회 + +<%-- --%> + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    펀드상품 상세조회

    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    펀드상품 한줄요약
    + ${vo.fund_summary} +
    펀딩 기간 ~
    달성도
    목표 금액
    입금 계좌 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + : ${vo.fund_account}
    ${vo.fund_content}
    등록자 이름 + ${vo.fund_mem_name} +
    등록자 연락처 + ${vo.fund_mem_hp} +
    등록자 이메일${vo.fund_mem_email}
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInsert.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInsert.jsp new file mode 100644 index 0000000..88e7e3a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInsert.jsp @@ -0,0 +1,222 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 펀드 상품 등록 + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    펀드상품등록

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    펀드종목 + +
    펀딩기간 + + - + +
    목표금액 + +
    --- 펀드 메이커 정보 입력 ---
    등록자 회사(이름) + +
    등록자 연락처 + + - + + - + +
    등록자 이메일 + + @ + + +
    펀드상품이름 + +
    펀드상품 한줄요약 + +
    펀딩내용 + +
    모금계좌 + + +
    첨부파일 + +
    + + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInsertAction.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInsertAction.jsp new file mode 100644 index 0000000..6e383ab --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductInsertAction.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +Insert title here + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductList.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductList.jsp new file mode 100644 index 0000000..7800328 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductList.jsp @@ -0,0 +1,224 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 펀드 상품 조회 + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    펀드 상품 리스트

    + +
    + + + +
    + +
    +
    전체 펀드 상품 수 ${cnt}건
    +
    + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    번호사진펀드종목펀드상품 이름펀드상품 한줄 요약펀딩기간목표금액회사명회사 연락처회사 이메일
    + + ${number} + + + + + ${dto.fund_category}${dto.fund_title}${dto.fund_summary} ~ ${dto.fund_mem_name}${dto.fund_mem_hp}${dto.fund_mem_email} + 등록된 펀드 상품이 없습니다. +
    +
    + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductSearch.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductSearch.jsp new file mode 100644 index 0000000..7022a68 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductSearch.jsp @@ -0,0 +1,219 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 펀드 상품 조회 + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    적금 상품 리스트

    +
    + +
    + + + +
    + +
    +
    전체 펀드 상품 수 ${cnt}건
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    번호사진펀드 종목펀드상품 이름펀드상품 한줄 요약펀딩기간목표금액회사명회사 연락처회사 이메일
    ${number} + + + + + ${dto.fund_category}${dto.fund_title}${dto.fund_summary} ~ ${dto.fund_mem_name}${dto.fund_mem_hp}${dto.fund_mem_email} + 등록된 예금 상품이 없습니다. +
    +
    + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductUpdate.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductUpdate.jsp new file mode 100644 index 0000000..388580b --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductUpdate.jsp @@ -0,0 +1,291 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 펀드 상품 수정 + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    펀드상품수정

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    펀드종목 + +
    펀딩기간 + + - + +
    목표금액 + +
    --- 펀드 메이커 정보 입력 ---
    등록자 회사(이름) + +
    등록자 연락처 + + + - + + - + +
    등록자 이메일 + + + @ + + +
    펀드상품이름 + + +
    펀드상품 한줄요약 + +
    펀딩내용 + +
    모금계좌 + + +
    첨부파일 + +
    + + + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductUpdateAction.jsp b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductUpdateAction.jsp new file mode 100644 index 0000000..9c11ac9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/fundProduct/fundProductUpdateAction.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금 상품 수정 처리 + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductInfo.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductInfo.jsp new file mode 100644 index 0000000..80de09c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductInfo.jsp @@ -0,0 +1,181 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 연금 상품 상세조회 + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    +

    연금상품 상세조회

    +
    +
    +
    +
    +
    ${vo.irp_product_name}
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    연금상품이름 + ${vo.irp_product_name} +
    연금상품 한줄요약 + ${vo.irp_product_summary} +
    금리(%) + ${vo.irp_product_interRate}% +
    연금 금액
    연금 납입(가입) 기간 + ${vo.irp_product_expiryTerm}개월 +
    연금 설명 + ${vo.irp_product_explanation} +
    유의사항 + ${vo.irp_product_notice} +
    은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + +
    + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductInsert.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductInsert.jsp new file mode 100644 index 0000000..6c0e94d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductInsert.jsp @@ -0,0 +1,164 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 연금 상품 등록 + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    +

    연금상품등록

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    연금상품이름 + +
    연금상품 한줄요약 + +
    금리(%) + +
    연금 금액 + 만원 +
    연금 납입(가입) 기간 + +
    연금설명 + +
    유의사항 + +
    은행코드 + +
    + + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductInsertAction.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductInsertAction.jsp new file mode 100644 index 0000000..c771cee --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductInsertAction.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +연금상품등록 + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductList.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductList.jsp new file mode 100644 index 0000000..6d0dc06 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductList.jsp @@ -0,0 +1,248 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 연금 상품 조회 + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    +

    연금 상품 리스트

    + +
    + + + + + +
    +
    전체 연금 상품 수 ${cnt}건
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    번호상품명상품요약금리연금 납입(가입) 기간연금 금액 은행등록일
    ${number} + + ${dto.irp_product_name}${dto.irp_product_summary}${dto.irp_product_interRate}%${dto.irp_product_expiryTerm}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${dto.irp_product_date}
    + 등록된 연금 상품이 없습니다. +
    + + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductSearch.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductSearch.jsp new file mode 100644 index 0000000..a093622 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductSearch.jsp @@ -0,0 +1,237 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 연금 상품 조회 + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    +

    연금 상품 리스트

    + +
    + + + + + +
    +
    전체 연금 상품 수 ${cnt}건
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    번호상품명상품요약금리연금 납입(가입) 기간연금 금액은행코드등록일
    ${number} + + ${dto.irp_product_name}${dto.irp_product_summary}${dto.irp_product_interRate}%${dto.irp_product_expiryTerm}개월${dto.irp_product_money} + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${dto.irp_product_date}
    + 검색된 연금 상품이 없습니다. +
    + + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductUpdate.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductUpdate.jsp new file mode 100644 index 0000000..e4b0a1e --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductUpdate.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + + + +관리자 페이지 - 연금 상품 수정 + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    +

    예금상품 수정

    +
    +
    +
    +
    +
    ${vo.irp_product_name}
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    연금상품이름 + ${vo.irp_product_name} +
    연금상품 한줄요약 + +
    금리(%) + +
    연금 납입(가입) 기간 + +
    예금설명 + +
    예금 금액 + 만원 +
    유의사항 + +
    은행코드 + +
    + + + +
    + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/irp/irpProductUpdateAction.jsp b/src/main/webapp/WEB-INF/views/manager/irp/irpProductUpdateAction.jsp new file mode 100644 index 0000000..ce1191c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/irp/irpProductUpdateAction.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +연금 상품 수정 처리 + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanCancelList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanCancelList.jsp new file mode 100644 index 0000000..6dd4403 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanCancelList.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 가입 내역 조회 + <%--
    + + + + --%> +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출번호대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출원금대출잔액이자잔액익월 상환액요약
    ${l.loan_id}${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
    + + 대출 실행일 :
    + 대출 만기일 : +
    +
    + + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + + ${l.loan_rate} % 원 원 원 원 +
    + + 익월 납입원금 :  원
    + 익월 납입이자 :  원 +
    +
    +
    + + 체납액 :  원
    + 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
    +
    대출 가입 내역이 존재하지 않습니다.
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanList.jsp new file mode 100644 index 0000000..476a26a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanList.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 가입 내역 조회 + <%--
    + + + + --%> +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출번호대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출원금대출잔액이자잔액익월 상환액요약
    ${l.loan_id}${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
    + + 대출 실행일 :
    + 대출 만기일 : +
    +
    + + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + + ${l.loan_rate} % 원 원 원 원 +
    + + 익월 납입원금 :  원
    + 익월 납입이자 :  원 +
    +
    +
    + + 체납액 :  원
    + 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
    +
    대출 가입 내역이 존재하지 않습니다.
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanProductDeleteAction.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanProductDeleteAction.jsp new file mode 100644 index 0000000..20e3acd --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanProductDeleteAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanProductInsert.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanProductInsert.jsp new file mode 100644 index 0000000..a33b683 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanProductInsert.jsp @@ -0,0 +1,147 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +

    대출상품 관리

    +
    +
    +
    +
    +
    대출상품 등록
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +


    +   + +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanProductInsertAction.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanProductInsertAction.jsp new file mode 100644 index 0000000..9a2ccbf --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanProductInsertAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanProductList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanProductList.jsp new file mode 100644 index 0000000..fdc1fdf --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanProductList.jsp @@ -0,0 +1,252 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 상품 조회 +
    + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출상품명금리대출금액대출기간은행상품등록일요약
    ${p.loan_product_name} + ${p.loan_product_rate} % ~  원${p.loan_product_minDate} ~ ${p.loan_product_maxDate} 년 + + 미기재 + + + 국민 + + + 우리 + + + 농협 + + + 신한 + + + 하나 + + + 코스모 + +
    + + ${p.loan_product_summary} +
    +

    중도상환수수료 요율 : ${p.loan_product_prepaymentRate}%

    +
    + + + +
    대출 상품이 존재하지 않습니다.
    + + +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanProductUpdate.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanProductUpdate.jsp new file mode 100644 index 0000000..22486b8 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanProductUpdate.jsp @@ -0,0 +1,172 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +

    대출상품 관리

    +
    +
    +
    +
    +
    대출상품 등록
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +


    +   + +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanProductUpdateAction.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanProductUpdateAction.jsp new file mode 100644 index 0000000..87023ff --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanProductUpdateAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanRefusalAction.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanRefusalAction.jsp new file mode 100644 index 0000000..f84b694 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanRefusalAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanRequestAction.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanRequestAction.jsp new file mode 100644 index 0000000..894835d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanRequestAction.jsp @@ -0,0 +1,95 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/loanRequestList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/loanRequestList.jsp new file mode 100644 index 0000000..a8333fc --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/loanRequestList.jsp @@ -0,0 +1,267 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 가입 내역 조회 + <%--
    + + + + --%> +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출원금대출잔액이자잔액익월 상환액요약
    ${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
    + + 대출 실행일 :
    + 대출 만기일 : +
    +
    + + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + + ${l.loan_rate} % 원 원 원 원 +
    + + 익월 납입원금 :  원
    + 익월 납입이자 :  원 +
    +
    +
    + + 체납액 :  원
    + 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
    +
    + + + + +
    대출 가입 내역이 존재하지 않습니다.
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/mngTransactionalInfoList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/mngTransactionalInfoList.jsp new file mode 100644 index 0000000..59da25d --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/mngTransactionalInfoList.jsp @@ -0,0 +1,299 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + + + + +
    + + + +
    +
    +
    +

    계좌 거래내역 관리

    +
    +
    +
    +
    +
    거래내역 조회  + +
    +
    +
    + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + --%> + +
    거래일거래시간입/출금거래유형통장식별내용거래금액거래후잔액거래점명
    ${t.tran_date}${t.tran_time}${t.inout_type}${t.tran_type}${t.print_content}${t.tran_amt} 원${t.after_balance_amt} 원${t.branch_name}
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/mngUserTrans.jsp b/src/main/webapp/WEB-INF/views/manager/loan/mngUserTrans.jsp new file mode 100644 index 0000000..8c95aa9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/mngUserTrans.jsp @@ -0,0 +1,85 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    +
    +

    계좌 거래내역 관리

    +
    +
    +
    +
    +
    사용자 일련번호 입력
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/mngloanList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/mngloanList.jsp new file mode 100644 index 0000000..c33b133 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/mngloanList.jsp @@ -0,0 +1,120 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    +
    +

    대출상품 관리

    +
    +
    +
    +
    +
    대출상품 목록
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    상품명금리최소 대출금액최대 대출금액최소 대출기간최대 대출기간은행상품 등록일설명
    + + ${p.loan_product_name}${p.loan_product_rate} %${p.loan_product_minPrice} 만 원${p.loan_product_maxPrice} 만 원${p.loan_product_minDate} 년${p.loan_product_maxDate} 년${p.loan_product_bankCode} +
    + + ${p.loan_product_summary} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/mngloanUpdate.jsp b/src/main/webapp/WEB-INF/views/manager/loan/mngloanUpdate.jsp new file mode 100644 index 0000000..0c78e9a --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/mngloanUpdate.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +코스모 뱅크 + + +
    + + + +
    +
    +
    +

    대출상품 관리

    +
    +
    +
    +
    +
    대출상품 등록
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +


    +   + +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/searchLoanList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/searchLoanList.jsp new file mode 100644 index 0000000..975c2f9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/searchLoanList.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 가입 내역 조회 +
    + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출번호대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출원금대출잔액이자잔액익월 상환액요약
    ${l.loan_id}${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
    + + 대출 실행일 :
    + 대출 만기일 : +
    +
    + + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + + ${l.loan_rate} % 원 원 원 원 +
    + + 익월 납입원금 :  원
    + 익월 납입이자 :  원 +
    +
    +
    + + 체납액 :  원
    + 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
    +
    대출 가입 내역이 존재하지 않습니다.
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/searchLoanProductList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/searchLoanProductList.jsp new file mode 100644 index 0000000..45967ec --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/searchLoanProductList.jsp @@ -0,0 +1,251 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 상품 조회 +
    + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출상품명금리대출금액대출기간은행상품등록일요약
    + ${p.loan_product_name} + + ${p.loan_product_rate} % ~  원${p.loan_product_minDate} ~ ${p.loan_product_maxDate} 년 + + 미기재 + + + 국민 + + + 우리 + + + 농협 + + + 신한 + + + 하나 + + + 코스모 + +
    + + ${p.loan_product_summary} +
    +

    중도상환수수료 요율 : ${p.loan_product_prepaymentRate}%

    +
    + + + +
    대출 상품이 존재하지 않습니다.
    + + +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/loan/searchLoanRequestList.jsp b/src/main/webapp/WEB-INF/views/manager/loan/searchLoanRequestList.jsp new file mode 100644 index 0000000..d4f7009 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/loan/searchLoanRequestList.jsp @@ -0,0 +1,263 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp"%> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp"%> + + + + +코스모 뱅크 + + +
    + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK

    +
    +

    + KOSMO BANK에 오신 것을 환영합니다.
    저희는 고객님의 자산관리를 + 효율적이고, 안전하게 도와드립니다.
    또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 + 통합하여 금융상품을 이용하실 수 있습니다. +

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + 대출 가입 내역 조회 +
    + + + + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    대출상품명회원계좌번호대출상태대출기간상환방법대출금리대출원금대출잔액이자잔액익월 상환액요약
    ${l.loan_product_name}${l.member_id}${l.account_id} + + + 신청 + + + 승인 + + + 거절 + + + 해지 + + + 만기 + + + 중도상환완료 + + + 체납 + + + ${l.loan_month} 개월 +
    + + 대출 실행일 :
    + 대출 만기일 : +
    +
    + + + 원금균등상환 + + + 원리금균등상환 + + + 만기일시상환 + + + ${l.loan_rate} % 원 원 원 원 +
    + + 익월 납입원금 :  원
    + 익월 납입이자 :  원 +
    +
    +
    + + 체납액 :  원
    + 중도상환수수료 요율 : ${l.loan_prepaymentRate} % +
    +
    + + +
    대출 가입 내역이 존재하지 않습니다.
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeDelete.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeDelete.jsp new file mode 100644 index 0000000..4e5b14c --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeDelete.jsp @@ -0,0 +1,215 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    + 공지사항삭제 비밀번호 인증 +
    비밀번호 + +
    + + +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeDeleteAction.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeDeleteAction.jsp new file mode 100644 index 0000000..5e88bcd --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeDeleteAction.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +코스모 뱅크 +<%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModify.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModify.jsp new file mode 100644 index 0000000..d7f5e24 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModify.jsp @@ -0,0 +1,215 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    + 공지사항수정 비밀번호 인증 +
    비밀번호 + +
    + + +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModifyAction.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModifyAction.jsp new file mode 100644 index 0000000..eff72e1 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModifyAction.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +코스모 뱅크 +<%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModifyDetail.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModifyDetail.jsp new file mode 100644 index 0000000..351b7b3 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeModifyDetail.jsp @@ -0,0 +1,242 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    + + + + + + + + +
    + + + + + +

    공지사항 수정하기!!

    + + + + + + + + + + + + + + + + + + + + +
    + 글제목 : + + +
    작성자 : ${vo.notice_writer} 비밀번호 : + +
    글내용 : + +
    + + + +
    + +
    +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeWrite.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeWrite.jsp new file mode 100644 index 0000000..b4b5999 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeWrite.jsp @@ -0,0 +1,224 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + 코스모 뱅크 + + + <%@ include file="/WEB-INF/views/include/setting.jsp" %> + + +
    + + + + + + + + + + +
    +
    +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    + + + + +

    공지사항 글쓰기!!

    + + + + + + + + + + + + + + + + + + +
    + 글제목 : + + +
    작성자 : ${notice_writer} 비밀번호 : + +
    글내용 : + +
    + + +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeWriteAction.jsp b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeWriteAction.jsp new file mode 100644 index 0000000..55f01e9 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/notice/mngNoticeWriteAction.jsp @@ -0,0 +1,29 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +코스모 뱅크 +<%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/qna/faq.jsp b/src/main/webapp/WEB-INF/views/manager/qna/faq.jsp index c0e041e..8629272 100644 --- a/src/main/webapp/WEB-INF/views/manager/qna/faq.jsp +++ b/src/main/webapp/WEB-INF/views/manager/qna/faq.jsp @@ -37,7 +37,7 @@
    - +
    diff --git a/src/main/webapp/WEB-INF/views/manager/qna/faqAdd.jsp b/src/main/webapp/WEB-INF/views/manager/qna/faqAdd.jsp index 6309e46..8f58795 100644 --- a/src/main/webapp/WEB-INF/views/manager/qna/faqAdd.jsp +++ b/src/main/webapp/WEB-INF/views/manager/qna/faqAdd.jsp @@ -36,7 +36,7 @@
    - +
    diff --git a/src/main/webapp/WEB-INF/views/manager/qna/faqModifyDetail.jsp b/src/main/webapp/WEB-INF/views/manager/qna/faqModifyDetail.jsp index 94e6d78..242df5b 100644 --- a/src/main/webapp/WEB-INF/views/manager/qna/faqModifyDetail.jsp +++ b/src/main/webapp/WEB-INF/views/manager/qna/faqModifyDetail.jsp @@ -20,7 +20,7 @@
    - +
    diff --git a/src/main/webapp/WEB-INF/views/manager/qna/qnaList_mng.jsp b/src/main/webapp/WEB-INF/views/manager/qna/qnaList_mng.jsp index 352183e..e32d276 100644 --- a/src/main/webapp/WEB-INF/views/manager/qna/qnaList_mng.jsp +++ b/src/main/webapp/WEB-INF/views/manager/qna/qnaList_mng.jsp @@ -39,7 +39,7 @@
    - +
    diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInfo.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInfo.jsp new file mode 100644 index 0000000..db8242f --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInfo.jsp @@ -0,0 +1,192 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 적금 상품 상세조회 + +<%-- --%> + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    적금상품 상세조회

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    적금상품이름 + ${vo.saving_product_name} +
    적금상품 한줄요약 + ${vo.saving_product_summary} +
    적금종류 + + 복리 + + + + 단리 + +
    금리(%) + ${vo.saving_product_interRate}% +
    최소적금기간(6개월~) + ${vo.saving_product_minDate}개월 +
    최대적금기간(~36개월) + ${vo.saving_product_maxDate}개월 +
    최소예치금액 + 원 +
    적금설명 + ${vo.saving_product_explanation} +
    유의사항 + ${vo.saving_product_notice} +
    은행코드 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + +
    + +
    + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInsert.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInsert.jsp new file mode 100644 index 0000000..90a9602 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInsert.jsp @@ -0,0 +1,180 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 적금 상품 등록 + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    적금상품등록

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    적금상품이름 + +
    적금상품 한줄요약 + +
    적금종류(과목) + +
    금리(%) + +
    최소적금기간(6개월~) + +
    최대적금기간(~36개월) + +
    최소예치금액 + +
    적금설명 + +
    유의사항 + +
    은행코드 + +
    + + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInsertAction.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInsertAction.jsp new file mode 100644 index 0000000..34341ae --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductInsertAction.jsp @@ -0,0 +1,26 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금상품등록 + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductList.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductList.jsp new file mode 100644 index 0000000..f00a5bd --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductList.jsp @@ -0,0 +1,250 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 적금 상품 조회 + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    적금 상품 리스트

    +
    + +
    + + + + +
    + +
    +
    전체 적금 상품 수 ${cnt}건
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    번호상품명상품요약금리종류최소기간최대기간최소금액은행코드등록일
    ${number} + + ${dto.saving_product_name}${dto.saving_product_summary}${dto.saving_product_interRate}% + + 복리 + + + + 단리 + + ${dto.saving_product_minDate}개월${dto.saving_product_maxDate}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${dto.saving_product_date}
    + 등록된 예금 상품이 없습니다. +
    +
    + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductSearch.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductSearch.jsp new file mode 100644 index 0000000..c51d019 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductSearch.jsp @@ -0,0 +1,249 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 적금 상품 조회 + + + + + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    적금 상품 리스트

    +
    + +
    + + + +
    + +
    +
    전체 적금 상품 수 ${cnt}건
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    번호상품명상품요약금리종류최소기간최대기간최소금액은행코드등록일
    ${number} + + ${dto.saving_product_name}${dto.saving_product_summary}${dto.saving_product_interRate}% + + 복리 + + + + 단리 + + ${dto.saving_product_minDate}개월${dto.saving_product_maxDate}개월 + + + 미기재 + + + 국민은행 + + + 우리은행 + + + 농협은행 + + + 신한은행 + + + 하나은행 + + + 코스모은행 + + + ${dto.saving_product_date}
    + 등록된 예금 상품이 없습니다. +
    +
    + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductUpdate.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductUpdate.jsp new file mode 100644 index 0000000..61b52db --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductUpdate.jsp @@ -0,0 +1,251 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +관리자 페이지 - 적금 상품 수정 + + + +
    + + + + +
    +
    + +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    +
    +
    +

    적금상품 수정

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    적금상품이름 + ${vo.saving_product_name} +
    적금상품 한줄요약 + +
    적금종류 + +
    금리(%) + +
    최소적금기간(6개월~) + +
    최대적금기간(~36개월) + +
    최소예치금액 + +
    예금설명 + +
    유의사항 + +
    은행코드 + +
    + + + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductUpdateAction.jsp b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductUpdateAction.jsp new file mode 100644 index 0000000..100d580 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/savingProduct/savingProductUpdateAction.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> +<%@ include file="/WEB-INF/views/include/bootstrap.jsp" %> + + + + +적금 상품 수정 처리 + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/manager/test/accountData.jsp b/src/main/webapp/WEB-INF/views/manager/test/accountData.jsp new file mode 100644 index 0000000..4a46022 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/manager/test/accountData.jsp @@ -0,0 +1,333 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@ include file="/WEB-INF/views/include/setting.jsp" %> + + + + + 코스모 뱅크 + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    +
    +
    +
    +
    +
    +

    KOSMO BANK


    +

    KOSMO BANK에 오신 것을 환영합니다.
    + 저희는 고객님의 자산관리를 효율적이고, 안전하게 도와드립니다.
    + 또한 오픈뱅킹 서비스를 활용하여 보다 편리하게 통합하여 금융상품을 이용하실 수 있습니다.

    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    + +
    + + +

    TEST 계좌 생성

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + +
    +
    +
    + +
    + +
    + +

    +
    + + +
    +
    + +
    +
    +
    +
    +
    +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/test.txt b/src/main/webapp/WEB-INF/views/test.txt index 5024abb..4fa6b42 100644 --- a/src/main/webapp/WEB-INF/views/test.txt +++ b/src/main/webapp/WEB-INF/views/test.txt @@ -1 +1,34 @@ -tesr \ No newline at end of file +tesr + +account_id 계좌번호 +account_password 계좌비밀번호 +member_id 고객 아이디 +account_balance +account_type +account_stateW +account_stateContent +account_limit +account_deleteDate +account_sleepDate +account_newDate +account_bankCode +unique_key +account_default + +account_id VARCHAR2(20) PK 계좌번호 +account_password NUMBER(5) Y 계좌 비밀번호 +member_name VARCHAR2(30) FK 고객 이름 +account_balance NUMBER(30) 0 계좌 잔액 +account_type NUMBER(1) Y 계좌종류 +account_state NUMBER(1) 사용 계좌상태 +account_stateContent 계좌상태설명 +account_limit NUMBER(20) 일일한도 +account_deleteDate DATE 해지일 +account_sleepDate DATE 휴면일 +account_newDate DATE 신규일 +account_bankCode NUMBER(1) 0(미기재) 은행코드 +unique_key VARCHAR2(500) Y UK 인증고유번호 +account_default NUMBER(1) 0 대표계좌설정 +account_linked NUMBER(1) 0 계좌연동상태 + +-- 은행코드 0(미기재) 1(국민) 2(우리) 3(농협) 4(신한) 5(하나) 6(코스모) \ No newline at end of file diff --git a/src/main/webapp/resources/css/atlantis.css b/src/main/webapp/resources/css/atlantis.css index 0a2539e..babeca9 100644 --- a/src/main/webapp/resources/css/atlantis.css +++ b/src/main/webapp/resources/css/atlantis.css @@ -77,6 +77,32 @@ warning-color : #ffa534 danger-color : #f3545d -------------------------------------------------------------------*/ +/* index 커스텀 시작 */ + +.login-btn-wrap { + text-align: center; +} + +.login-btn { + border: none; + font-weight: bold; + width: 300px; + font-size: 18px; + color: white; + border-radius: 30px; + height: 70px; + background-image: url(/bank/resources/images/img/ico-sign-00.png); + background-position: left 20px top 13px; + background-size: 35px; + background-repeat: no-repeat; + background-color: cadetblue; + padding-left: 35px; + cursor: pointer; +} + + +/* index 커스텀 끝 */ + *:focus { outline: 0 !important; -webkit-box-shadow: none !important; @@ -2185,7 +2211,7 @@ body { margin-bottom: 5px; font-weight: 400; } .card-list .item-list .info-user .status { - font-size: 11px; + font-size: 14px; color: #7d7b7b; } .card-title { @@ -4294,9 +4320,9 @@ label.error { min-width: 2rem; width: 2rem; } .btn-icon.btn-xs { - height: 1.6875rem; - min-width: 1.6875rem; - width: 1.6875rem; } + height: 20px; + min-width: 20px; + width: 20pxrem; } /* Button States */ .btn-white { diff --git a/src/main/webapp/resources/css/atlantis.min.css b/src/main/webapp/resources/css/atlantis.min.css index c47a4c3..61c24b0 100644 --- a/src/main/webapp/resources/css/atlantis.min.css +++ b/src/main/webapp/resources/css/atlantis.min.css @@ -77,6 +77,35 @@ warning-color : #ffa534 danger-color : #f3545d -------------------------------------------------------------------*/ + +/* index 커스텀 시작 */ + +.login-btn-wrap { + text-align: center; +} + +.login-btn { + border: none; + font-weight: bold; + width: 300px; + font-size: 18px; + color: white; + border-radius: 30px; + height: 70px; + background-image: url(/bank/resources/images/img/ico-sign-00.png); + background-position: left 20px top 13px; + background-size: 35px; + background-repeat: no-repeat; + background-color: cadetblue; + padding-left: 35px; + cursor: pointer; +} + + + +/* index 커스텀 끝 */ + + :focus { outline: 0 !important; -webkit-box-shadow: none !important; @@ -4076,7 +4105,7 @@ body { } .card-list .item-list .info-user .status { - font-size: 11px; + font-size: 14px; color: #7d7b7b } @@ -7276,9 +7305,9 @@ label.error { } .btn-icon.btn-xs { - height: 1.6875rem; - min-width: 1.6875rem; - width: 1.6875rem + height: 20px; + min-width: 20px; + width: 20px } .btn-white { diff --git a/src/main/webapp/resources/css/datepicker.css b/src/main/webapp/resources/css/datepicker.css new file mode 100644 index 0000000..52ee39f --- /dev/null +++ b/src/main/webapp/resources/css/datepicker.css @@ -0,0 +1,622 @@ +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Datepicker cells + ------------------------------------------------- */ +.datepicker--cells { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; } + +.datepicker--cell { + border-radius: 4px; + box-sizing: border-box; + cursor: pointer; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + position: relative; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + height: 32px; + z-index: 1; } + .datepicker--cell.-focus- { + background: #f0f0f0; } + .datepicker--cell.-current- { + color: #4EB5E6; } + .datepicker--cell.-current-.-focus- { + color: #4a4a4a; } + .datepicker--cell.-current-.-in-range- { + color: #4EB5E6; } + .datepicker--cell.-in-range- { + background: rgba(92, 196, 239, 0.1); + color: #4a4a4a; + border-radius: 0; } + .datepicker--cell.-in-range-.-focus- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell.-disabled- { + cursor: default; + color: #aeaeae; } + .datepicker--cell.-disabled-.-focus- { + color: #aeaeae; } + .datepicker--cell.-disabled-.-in-range- { + color: #a1a1a1; } + .datepicker--cell.-disabled-.-current-.-focus- { + color: #aeaeae; } + .datepicker--cell.-range-from- { + border: 1px solid rgba(92, 196, 239, 0.5); + background-color: rgba(92, 196, 239, 0.1); + border-radius: 4px 0 0 4px; } + .datepicker--cell.-range-to- { + border: 1px solid rgba(92, 196, 239, 0.5); + background-color: rgba(92, 196, 239, 0.1); + border-radius: 0 4px 4px 0; } + .datepicker--cell.-range-from-.-range-to- { + border-radius: 4px; } + .datepicker--cell.-selected- { + color: #fff; + border: none; + background: #5cc4ef; } + .datepicker--cell.-selected-.-current- { + color: #fff; + background: #5cc4ef; } + .datepicker--cell.-selected-.-focus- { + background: #45bced; } + .datepicker--cell:empty { + cursor: default; } + +.datepicker--days-names { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin: 8px 0 3px; } + +.datepicker--day-name { + color: #FF9A19; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + text-align: center; + text-transform: uppercase; + font-size: .8em; } + +.datepicker--cell-day { + width: 14.28571%; } + +.datepicker--cells-months { + height: 170px; } + +.datepicker--cell-month { + width: 33.33%; + height: 25%; } + +.datepicker--years { + height: 170px; } + +.datepicker--cells-years { + height: 170px; } + +.datepicker--cell-year { + width: 25%; + height: 33.33%; } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Datepicker + ------------------------------------------------- */ +.datepickers-container { + position: absolute; + left: 0; + top: 0; } + @media print { + .datepickers-container { + display: none; } } + +.datepicker { + background: #fff; + border: 1px solid #dbdbdb; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + border-radius: 4px; + box-sizing: content-box; + font-family: Tahoma, sans-serif; + font-size: 14px; + color: #4a4a4a; + width: 250px; + position: absolute; + left: -100000px; + opacity: 0; + transition: opacity 0.3s ease, left 0s 0.3s, -webkit-transform 0.3s ease; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0.3s; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0.3s, -webkit-transform 0.3s ease; + z-index: 100; } + .datepicker.-from-top- { + -webkit-transform: translateY(-8px); + transform: translateY(-8px); } + .datepicker.-from-right- { + -webkit-transform: translateX(8px); + transform: translateX(8px); } + .datepicker.-from-bottom- { + -webkit-transform: translateY(8px); + transform: translateY(8px); } + .datepicker.-from-left- { + -webkit-transform: translateX(-8px); + transform: translateX(-8px); } + .datepicker.active { + opacity: 1; + -webkit-transform: translate(0); + transform: translate(0); + transition: opacity 0.3s ease, left 0s 0s, -webkit-transform 0.3s ease; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0s; + transition: opacity 0.3s ease, transform 0.3s ease, left 0s 0s, -webkit-transform 0.3s ease; } + +.datepicker-inline .datepicker { + border-color: #d7d7d7; + box-shadow: none; + position: static; + left: auto; + right: auto; + opacity: 1; + -webkit-transform: none; + transform: none; } + +.datepicker-inline .datepicker--pointer { + display: none; } + +.datepicker--content { + box-sizing: content-box; + padding: 4px; } + .-only-timepicker- .datepicker--content { + display: none; } + +.datepicker--pointer { + position: absolute; + background: #fff; + border-top: 1px solid #dbdbdb; + border-right: 1px solid #dbdbdb; + width: 10px; + height: 10px; + z-index: -1; } + .-top-left- .datepicker--pointer, .-top-center- .datepicker--pointer, .-top-right- .datepicker--pointer { + top: calc(100% - 4px); + -webkit-transform: rotate(135deg); + transform: rotate(135deg); } + .-right-top- .datepicker--pointer, .-right-center- .datepicker--pointer, .-right-bottom- .datepicker--pointer { + right: calc(100% - 4px); + -webkit-transform: rotate(225deg); + transform: rotate(225deg); } + .-bottom-left- .datepicker--pointer, .-bottom-center- .datepicker--pointer, .-bottom-right- .datepicker--pointer { + bottom: calc(100% - 4px); + -webkit-transform: rotate(315deg); + transform: rotate(315deg); } + .-left-top- .datepicker--pointer, .-left-center- .datepicker--pointer, .-left-bottom- .datepicker--pointer { + left: calc(100% - 4px); + -webkit-transform: rotate(45deg); + transform: rotate(45deg); } + .-top-left- .datepicker--pointer, .-bottom-left- .datepicker--pointer { + left: 10px; } + .-top-right- .datepicker--pointer, .-bottom-right- .datepicker--pointer { + right: 10px; } + .-top-center- .datepicker--pointer, .-bottom-center- .datepicker--pointer { + left: calc(50% - 10px / 2); } + .-left-top- .datepicker--pointer, .-right-top- .datepicker--pointer { + top: 10px; } + .-left-bottom- .datepicker--pointer, .-right-bottom- .datepicker--pointer { + bottom: 10px; } + .-left-center- .datepicker--pointer, .-right-center- .datepicker--pointer { + top: calc(50% - 10px / 2); } + +.datepicker--body { + display: none; } + .datepicker--body.active { + display: block; } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Navigation + ------------------------------------------------- */ +.datepicker--nav { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + border-bottom: 1px solid #efefef; + min-height: 32px; + padding: 4px; } + .-only-timepicker- .datepicker--nav { + display: none; } + +.datepicker--nav-title, +.datepicker--nav-action { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + cursor: pointer; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; } + +.datepicker--nav-action { + width: 32px; + border-radius: 4px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } + .datepicker--nav-action:hover { + background: #f0f0f0; } + .datepicker--nav-action.-disabled- { + visibility: hidden; } + .datepicker--nav-action svg { + width: 32px; + height: 32px; } + .datepicker--nav-action path { + fill: none; + stroke: #9c9c9c; + stroke-width: 2px; } + +.datepicker--nav-title { + border-radius: 4px; + padding: 0 8px; } + .datepicker--nav-title i { + font-style: normal; + color: #9c9c9c; + margin-left: 5px; } + .datepicker--nav-title:hover { + background: #f0f0f0; } + .datepicker--nav-title.-disabled- { + cursor: default; + background: none; } + +.datepicker--buttons { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + padding: 4px; + border-top: 1px solid #efefef; } + +.datepicker--button { + color: #4EB5E6; + cursor: pointer; + border-radius: 4px; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + display: -webkit-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + height: 32px; } + .datepicker--button:hover { + color: #4a4a4a; + background: #f0f0f0; } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } + +/* ------------------------------------------------- + Timepicker + ------------------------------------------------- */ +.datepicker--time { + border-top: 1px solid #efefef; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + padding: 4px; + position: relative; } + .datepicker--time.-am-pm- .datepicker--time-sliders { + -webkit-flex: 0 1 138px; + -ms-flex: 0 1 138px; + flex: 0 1 138px; + max-width: 138px; } + .-only-timepicker- .datepicker--time { + border-top: none; } + +.datepicker--time-sliders { + -webkit-flex: 0 1 153px; + -ms-flex: 0 1 153px; + flex: 0 1 153px; + margin-right: 10px; + max-width: 153px; } + +.datepicker--time-label { + display: none; + font-size: 12px; } + +.datepicker--time-current { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + font-size: 14px; + text-align: center; + margin: 0 0 0 10px; } + +.datepicker--time-current-colon { + margin: 0 2px 3px; + line-height: 1; } + +.datepicker--time-current-hours, +.datepicker--time-current-minutes { + line-height: 1; + font-size: 19px; + font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif; + position: relative; + z-index: 1; } + .datepicker--time-current-hours:after, + .datepicker--time-current-minutes:after { + content: ''; + background: #f0f0f0; + border-radius: 4px; + position: absolute; + left: -2px; + top: -3px; + right: -2px; + bottom: -2px; + z-index: -1; + opacity: 0; } + .datepicker--time-current-hours.-focus-:after, + .datepicker--time-current-minutes.-focus-:after { + opacity: 1; } + +.datepicker--time-current-ampm { + text-transform: uppercase; + -webkit-align-self: flex-end; + -ms-flex-item-align: end; + align-self: flex-end; + color: #9c9c9c; + margin-left: 6px; + font-size: 11px; + margin-bottom: 1px; } + +.datepicker--time-row { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -ms-flex-align: center; + align-items: center; + font-size: 11px; + height: 17px; + background: linear-gradient(to right, #dedede, #dedede) left 50%/100% 1px no-repeat; } + .datepicker--time-row:first-child { + margin-bottom: 4px; } + .datepicker--time-row input[type='range'] { + background: none; + cursor: pointer; + -webkit-flex: 1; + -ms-flex: 1; + flex: 1; + height: 100%; + padding: 0; + margin: 0; + -webkit-appearance: none; } + .datepicker--time-row input[type='range']::-webkit-slider-thumb { + -webkit-appearance: none; } + .datepicker--time-row input[type='range']::-ms-tooltip { + display: none; } + .datepicker--time-row input[type='range']:hover::-webkit-slider-thumb { + border-color: #b8b8b8; } + .datepicker--time-row input[type='range']:hover::-moz-range-thumb { + border-color: #b8b8b8; } + .datepicker--time-row input[type='range']:hover::-ms-thumb { + border-color: #b8b8b8; } + .datepicker--time-row input[type='range']:focus { + outline: none; } + .datepicker--time-row input[type='range']:focus::-webkit-slider-thumb { + background: #5cc4ef; + border-color: #5cc4ef; } + .datepicker--time-row input[type='range']:focus::-moz-range-thumb { + background: #5cc4ef; + border-color: #5cc4ef; } + .datepicker--time-row input[type='range']:focus::-ms-thumb { + background: #5cc4ef; + border-color: #5cc4ef; } + .datepicker--time-row input[type='range']::-webkit-slider-thumb { + box-sizing: border-box; + height: 12px; + width: 12px; + border-radius: 3px; + border: 1px solid #dedede; + background: #fff; + cursor: pointer; + transition: background .2s; } + .datepicker--time-row input[type='range']::-moz-range-thumb { + box-sizing: border-box; + height: 12px; + width: 12px; + border-radius: 3px; + border: 1px solid #dedede; + background: #fff; + cursor: pointer; + transition: background .2s; } + .datepicker--time-row input[type='range']::-ms-thumb { + box-sizing: border-box; + height: 12px; + width: 12px; + border-radius: 3px; + border: 1px solid #dedede; + background: #fff; + cursor: pointer; + transition: background .2s; } + .datepicker--time-row input[type='range']::-webkit-slider-thumb { + margin-top: -6px; } + .datepicker--time-row input[type='range']::-webkit-slider-runnable-track { + border: none; + height: 1px; + cursor: pointer; + color: transparent; + background: transparent; } + .datepicker--time-row input[type='range']::-moz-range-track { + border: none; + height: 1px; + cursor: pointer; + color: transparent; + background: transparent; } + .datepicker--time-row input[type='range']::-ms-track { + border: none; + height: 1px; + cursor: pointer; + color: transparent; + background: transparent; } + .datepicker--time-row input[type='range']::-ms-fill-lower { + background: transparent; } + .datepicker--time-row input[type='range']::-ms-fill-upper { + background: transparent; } + .datepicker--time-row span { + padding: 0 12px; } + +.datepicker--time-icon { + color: #9c9c9c; + border: 1px solid; + border-radius: 50%; + font-size: 16px; + position: relative; + margin: 0 5px -1px 0; + width: 1em; + height: 1em; } + .datepicker--time-icon:after, .datepicker--time-icon:before { + content: ''; + background: currentColor; + position: absolute; } + .datepicker--time-icon:after { + height: .4em; + width: 1px; + left: calc(50% - 1px); + top: calc(50% + 1px); + -webkit-transform: translateY(-100%); + transform: translateY(-100%); } + .datepicker--time-icon:before { + width: .4em; + height: 1px; + top: calc(50% + 1px); + left: calc(50% - 1px); } + +.datepicker--cell-day.-other-month-, .datepicker--cell-year.-other-decade- { + color: #dedede; } + .datepicker--cell-day.-other-month-:hover, .datepicker--cell-year.-other-decade-:hover { + color: #c5c5c5; } + .-disabled-.-focus-.datepicker--cell-day.-other-month-, .-disabled-.-focus-.datepicker--cell-year.-other-decade- { + color: #dedede; } + .-selected-.datepicker--cell-day.-other-month-, .-selected-.datepicker--cell-year.-other-decade- { + color: #fff; + background: #a2ddf6; } + .-selected-.-focus-.datepicker--cell-day.-other-month-, .-selected-.-focus-.datepicker--cell-year.-other-decade- { + background: #8ad5f4; } + .-in-range-.datepicker--cell-day.-other-month-, .-in-range-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.1); + color: #cccccc; } + .-in-range-.-focus-.datepicker--cell-day.-other-month-, .-in-range-.-focus-.datepicker--cell-year.-other-decade- { + background-color: rgba(92, 196, 239, 0.2); } + .datepicker--cell-day.-other-month-:empty, .datepicker--cell-year.-other-decade-:empty { + background: none; + border: none; } \ No newline at end of file diff --git a/src/main/webapp/resources/css/datepicker.min.css b/src/main/webapp/resources/css/datepicker.min.css new file mode 100644 index 0000000..bc3cd6c --- /dev/null +++ b/src/main/webapp/resources/css/datepicker.min.css @@ -0,0 +1 @@ +.datepicker--cells{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.datepicker--cell{border-radius:4px;box-sizing:border-box;cursor:pointer;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:32px;z-index:1}.datepicker--cell.-focus-{background:#f0f0f0}.datepicker--cell.-current-{color:#4EB5E6}.datepicker--cell.-current-.-focus-{color:#4a4a4a}.datepicker--cell.-current-.-in-range-{color:#4EB5E6}.datepicker--cell.-in-range-{background:rgba(92,196,239,.1);color:#4a4a4a;border-radius:0}.datepicker--cell.-in-range-.-focus-{background-color:rgba(92,196,239,.2)}.datepicker--cell.-disabled-{cursor:default;color:#aeaeae}.datepicker--cell.-disabled-.-focus-{color:#aeaeae}.datepicker--cell.-disabled-.-in-range-{color:#a1a1a1}.datepicker--cell.-disabled-.-current-.-focus-{color:#aeaeae}.datepicker--cell.-range-from-{border:1px solid rgba(92,196,239,.5);background-color:rgba(92,196,239,.1);border-radius:4px 0 0 4px}.datepicker--cell.-range-to-{border:1px solid rgba(92,196,239,.5);background-color:rgba(92,196,239,.1);border-radius:0 4px 4px 0}.datepicker--cell.-selected-,.datepicker--cell.-selected-.-current-{color:#fff;background:#5cc4ef}.datepicker--cell.-range-from-.-range-to-{border-radius:4px}.datepicker--cell.-selected-{border:none}.datepicker--cell.-selected-.-focus-{background:#45bced}.datepicker--cell:empty{cursor:default}.datepicker--days-names{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:8px 0 3px}.datepicker--day-name{color:#FF9A19;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:1;-ms-flex:1;flex:1;text-align:center;text-transform:uppercase;font-size:.8em}.-only-timepicker- .datepicker--content,.datepicker--body,.datepicker-inline .datepicker--pointer{display:none}.datepicker--cell-day{width:14.28571%}.datepicker--cells-months{height:170px}.datepicker--cell-month{width:33.33%;height:25%}.datepicker--cells-years,.datepicker--years{height:170px}.datepicker--cell-year{width:25%;height:33.33%}.datepickers-container{position:absolute;left:0;top:0}@media print{.datepickers-container{display:none}}.datepicker{background:#fff;border:1px solid #dbdbdb;box-shadow:0 4px 12px rgba(0,0,0,.15);border-radius:4px;box-sizing:content-box;font-family:Tahoma,sans-serif;font-size:14px;color:#4a4a4a;width:250px;position:absolute;left:-100000px;opacity:0;transition:opacity .3s ease,left 0s .3s,-webkit-transform .3s ease;transition:opacity .3s ease,transform .3s ease,left 0s .3s;transition:opacity .3s ease,transform .3s ease,left 0s .3s,-webkit-transform .3s ease;z-index:100}.datepicker.-from-top-{-webkit-transform:translateY(-8px);transform:translateY(-8px)}.datepicker.-from-right-{-webkit-transform:translateX(8px);transform:translateX(8px)}.datepicker.-from-bottom-{-webkit-transform:translateY(8px);transform:translateY(8px)}.datepicker.-from-left-{-webkit-transform:translateX(-8px);transform:translateX(-8px)}.datepicker.active{opacity:1;-webkit-transform:translate(0);transform:translate(0);transition:opacity .3s ease,left 0s 0s,-webkit-transform .3s ease;transition:opacity .3s ease,transform .3s ease,left 0s 0s;transition:opacity .3s ease,transform .3s ease,left 0s 0s,-webkit-transform .3s ease}.datepicker-inline .datepicker{border-color:#d7d7d7;box-shadow:none;position:static;left:auto;right:auto;opacity:1;-webkit-transform:none;transform:none}.datepicker--content{box-sizing:content-box;padding:4px}.datepicker--pointer{position:absolute;background:#fff;border-top:1px solid #dbdbdb;border-right:1px solid #dbdbdb;width:10px;height:10px;z-index:-1}.datepicker--nav-action:hover,.datepicker--nav-title:hover{background:#f0f0f0}.-top-center- .datepicker--pointer,.-top-left- .datepicker--pointer,.-top-right- .datepicker--pointer{top:calc(100% - 4px);-webkit-transform:rotate(135deg);transform:rotate(135deg)}.-right-bottom- .datepicker--pointer,.-right-center- .datepicker--pointer,.-right-top- .datepicker--pointer{right:calc(100% - 4px);-webkit-transform:rotate(225deg);transform:rotate(225deg)}.-bottom-center- .datepicker--pointer,.-bottom-left- .datepicker--pointer,.-bottom-right- .datepicker--pointer{bottom:calc(100% - 4px);-webkit-transform:rotate(315deg);transform:rotate(315deg)}.-left-bottom- .datepicker--pointer,.-left-center- .datepicker--pointer,.-left-top- .datepicker--pointer{left:calc(100% - 4px);-webkit-transform:rotate(45deg);transform:rotate(45deg)}.-bottom-left- .datepicker--pointer,.-top-left- .datepicker--pointer{left:10px}.-bottom-right- .datepicker--pointer,.-top-right- .datepicker--pointer{right:10px}.-bottom-center- .datepicker--pointer,.-top-center- .datepicker--pointer{left:calc(50% - 10px / 2)}.-left-top- .datepicker--pointer,.-right-top- .datepicker--pointer{top:10px}.-left-bottom- .datepicker--pointer,.-right-bottom- .datepicker--pointer{bottom:10px}.-left-center- .datepicker--pointer,.-right-center- .datepicker--pointer{top:calc(50% - 10px / 2)}.datepicker--body.active{display:block}.datepicker--nav{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;border-bottom:1px solid #efefef;min-height:32px;padding:4px}.-only-timepicker- .datepicker--nav{display:none}.datepicker--nav-action,.datepicker--nav-title{display:-webkit-flex;display:-ms-flexbox;display:flex;cursor:pointer;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.datepicker--nav-action{width:32px;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.datepicker--nav-action.-disabled-{visibility:hidden}.datepicker--nav-action svg{width:32px;height:32px}.datepicker--nav-action path{fill:none;stroke:#9c9c9c;stroke-width:2px}.datepicker--nav-title{border-radius:4px;padding:0 8px}.datepicker--buttons,.datepicker--time{border-top:1px solid #efefef;padding:4px}.datepicker--nav-title i{font-style:normal;color:#9c9c9c;margin-left:5px}.datepicker--nav-title.-disabled-{cursor:default;background:0 0}.datepicker--buttons{display:-webkit-flex;display:-ms-flexbox;display:flex}.datepicker--button{color:#4EB5E6;cursor:pointer;border-radius:4px;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:32px}.datepicker--button:hover{color:#4a4a4a;background:#f0f0f0}.datepicker--time{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative}.datepicker--time.-am-pm- .datepicker--time-sliders{-webkit-flex:0 1 138px;-ms-flex:0 1 138px;flex:0 1 138px;max-width:138px}.-only-timepicker- .datepicker--time{border-top:none}.datepicker--time-sliders{-webkit-flex:0 1 153px;-ms-flex:0 1 153px;flex:0 1 153px;margin-right:10px;max-width:153px}.datepicker--time-label{display:none;font-size:12px}.datepicker--time-current{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-flex:1;-ms-flex:1;flex:1;font-size:14px;text-align:center;margin:0 0 0 10px}.datepicker--time-current-colon{margin:0 2px 3px;line-height:1}.datepicker--time-current-hours,.datepicker--time-current-minutes{line-height:1;font-size:19px;font-family:"Century Gothic",CenturyGothic,AppleGothic,sans-serif;position:relative;z-index:1}.datepicker--time-current-hours:after,.datepicker--time-current-minutes:after{content:'';background:#f0f0f0;border-radius:4px;position:absolute;left:-2px;top:-3px;right:-2px;bottom:-2px;z-index:-1;opacity:0}.datepicker--time-current-hours.-focus-:after,.datepicker--time-current-minutes.-focus-:after{opacity:1}.datepicker--time-current-ampm{text-transform:uppercase;-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;color:#9c9c9c;margin-left:6px;font-size:11px;margin-bottom:1px}.datepicker--time-row{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;font-size:11px;height:17px;background:linear-gradient(to right,#dedede,#dedede) left 50%/100% 1px no-repeat}.datepicker--time-row:first-child{margin-bottom:4px}.datepicker--time-row input[type=range]{background:0 0;cursor:pointer;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;padding:0;margin:0;-webkit-appearance:none}.datepicker--time-row input[type=range]::-ms-tooltip{display:none}.datepicker--time-row input[type=range]:hover::-webkit-slider-thumb{border-color:#b8b8b8}.datepicker--time-row input[type=range]:hover::-moz-range-thumb{border-color:#b8b8b8}.datepicker--time-row input[type=range]:hover::-ms-thumb{border-color:#b8b8b8}.datepicker--time-row input[type=range]:focus{outline:0}.datepicker--time-row input[type=range]:focus::-webkit-slider-thumb{background:#5cc4ef;border-color:#5cc4ef}.datepicker--time-row input[type=range]:focus::-moz-range-thumb{background:#5cc4ef;border-color:#5cc4ef}.datepicker--time-row input[type=range]:focus::-ms-thumb{background:#5cc4ef;border-color:#5cc4ef}.datepicker--time-row input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid #dedede;background:#fff;cursor:pointer;transition:background .2s;margin-top:-6px}.datepicker--time-row input[type=range]::-moz-range-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid #dedede;background:#fff;cursor:pointer;transition:background .2s}.datepicker--time-row input[type=range]::-ms-thumb{box-sizing:border-box;height:12px;width:12px;border-radius:3px;border:1px solid #dedede;background:#fff;cursor:pointer;transition:background .2s}.datepicker--time-row input[type=range]::-webkit-slider-runnable-track{border:none;height:1px;cursor:pointer;color:transparent;background:0 0}.datepicker--time-row input[type=range]::-moz-range-track{border:none;height:1px;cursor:pointer;color:transparent;background:0 0}.datepicker--time-row input[type=range]::-ms-track{border:none;height:1px;cursor:pointer;color:transparent;background:0 0}.datepicker--time-row input[type=range]::-ms-fill-lower{background:0 0}.datepicker--time-row input[type=range]::-ms-fill-upper{background:0 0}.datepicker--time-row span{padding:0 12px}.datepicker--time-icon{color:#9c9c9c;border:1px solid;border-radius:50%;font-size:16px;position:relative;margin:0 5px -1px 0;width:1em;height:1em}.datepicker--time-icon:after,.datepicker--time-icon:before{content:'';background:currentColor;position:absolute}.datepicker--time-icon:after{height:.4em;width:1px;left:calc(50% - 1px);top:calc(50% + 1px);-webkit-transform:translateY(-100%);transform:translateY(-100%)}.datepicker--time-icon:before{width:.4em;height:1px;top:calc(50% + 1px);left:calc(50% - 1px)}.datepicker--cell-day.-other-month-,.datepicker--cell-year.-other-decade-{color:#dedede}.datepicker--cell-day.-other-month-:hover,.datepicker--cell-year.-other-decade-:hover{color:#c5c5c5}.-disabled-.-focus-.datepicker--cell-day.-other-month-,.-disabled-.-focus-.datepicker--cell-year.-other-decade-{color:#dedede}.-selected-.datepicker--cell-day.-other-month-,.-selected-.datepicker--cell-year.-other-decade-{color:#fff;background:#a2ddf6}.-selected-.-focus-.datepicker--cell-day.-other-month-,.-selected-.-focus-.datepicker--cell-year.-other-decade-{background:#8ad5f4}.-in-range-.datepicker--cell-day.-other-month-,.-in-range-.datepicker--cell-year.-other-decade-{background-color:rgba(92,196,239,.1);color:#ccc}.-in-range-.-focus-.datepicker--cell-day.-other-month-,.-in-range-.-focus-.datepicker--cell-year.-other-decade-{background-color:rgba(92,196,239,.2)}.datepicker--cell-day.-other-month-:empty,.datepicker--cell-year.-other-decade-:empty{background:0 0;border:none} \ No newline at end of file diff --git a/src/main/webapp/resources/css/manager/fund.css b/src/main/webapp/resources/css/manager/fund.css new file mode 100644 index 0000000..c543473 --- /dev/null +++ b/src/main/webapp/resources/css/manager/fund.css @@ -0,0 +1,166 @@ +@charset "UTF-8"; + +/* 아이콘 */ + +.icon_tab { + display: inline-flex; + flex-shrink: 0; + align-items: center; + justify-content: center; + min-width: 30px; + max-width: 200px; + vertical-align: middle; + white-space: normal; + transition: transform .2s ease-out; +} + +li { + list-style: none; +} + +.imgTab { + border: 0; + background-color: transparent; + cursor: pointer; + width: 83px; + height: 80px; + overflow: hidden; +} + +.imgTab_in{ + display: flex; + justify-content: center; +} + +button { + border-radius: 0; + font-weight: 400; + background: none; +} + +.imgTab_thumnail{ + position: relative; + border: 2px solid transparent; + box-sizing: border-box; + border-radius: 16px; + background-color: #f2f4f6; + padding: 6px; + width: 56px; + height: 56px; + overflow: hidden; +} + +.contents_middle_in{ + position: sticky; + top: 50px; + z-index: 100; + background-color: #fff; + padding: 12px 0; +} + +.imgTab_thumnail_in{ + background: no-repeat 50%/cover border-box; + width: 40px; + height: 40px; +} + +.imgTab_span{ + display: flex; + justify-content: center; + margin-top: 6px; + width: 100%; +} + +.imgTab_span .imgTab_span_in{ + line-height: 18px; + letter-spacing: 0; + font-size: 12px; + font-weight: 400; + font-style: normal; + color: #495057; +} + +.all{ + line-height: 30px; + letter-spacing: -.6px; + font-size: 20px; + font-weight: 700; + font-style: normal; + border-bottom: 1px solid #f2f4f6; + padding-top: 24px; + padding-bottom: 8px; +} + + +/* 메인 */ +.Main{ + display: block; + position: relative; +} + +.Main_container{ + display: grid; + grid-template-columns: repeat(3,calc(33.33333% - 30px)); + grid-row-gap: 40px; + grid-column-gap: 30px; +} + +.Main_container_in{ + margin: 0; + width: auto; + clear: both; + display: block; +} + +.Main_container_init{ + padding-bottom: 18px; + min-height: auto; +} + +.Main_a{ + float: none; + margin-right: 0; + margin-bottom: 10px; + padding-top: 56.25%; + width: 100%; + height: auto; +} + +.Main_span{ + position: absolute; + top: 0; + left: 0; + display: block; + position: relative; + width: 100%; + height: 100%; + overflow: hidden; + box-sizing: border-box; +} + +.Main_span_in{ + transform: scale(1); + opacity: 1; + /* display: block; + transform: scale(1.05); + transition: .25s ease-in-out; + transition-property: opacity,transform; + opacity: 0; + background: no-repeat 50%/cover border-box; + width: 100%; + height: 100%; */ +} + +.Main_content{ + position: relative; + z-index: 2; + margin-right: 16px; + line-height: 16px; + letter-spacing: 0; + color: #90949c; + font-size: 12px; + font-weight: 500; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file diff --git a/src/main/webapp/resources/css/manager/insertProduct.css b/src/main/webapp/resources/css/manager/insertProduct.css index 03c72cd..924ce4b 100644 --- a/src/main/webapp/resources/css/manager/insertProduct.css +++ b/src/main/webapp/resources/css/manager/insertProduct.css @@ -7,11 +7,6 @@ button { background: none; } -img { - width: 100%; - height: 100%; -} - h1 { font-size: 36px; font-weight: bold; diff --git a/src/main/webapp/resources/css/user/accountConnect.css b/src/main/webapp/resources/css/user/accountConnect.css new file mode 100644 index 0000000..168dce1 --- /dev/null +++ b/src/main/webapp/resources/css/user/accountConnect.css @@ -0,0 +1,77 @@ +@charset "UTF-8"; + + +.wrap { + text-align: -webkit-center; +} + +.card { +} + +.card-title { + font-size: 30px !important; + font-weight: 900 !important; + margin-right: 170px; +} + +.main { + font-size: 25px !important; + font-weight: 600 !important; +} + +.card-body { + align-self: center; + width:100%; +} + +.table-hover { + text-align: center; +} + +.bank-td { + font-size: 18px !important; + font-weight: 600 !important; + height: 100px !important; +} + +.btn-td { + text-align: left; +} + +.bankImg { + width: 50px; + height: 50px; + box-shadow: 1px 1px lightgrey; + border: 1px solid lightgrey; + border-radius: 10px; +} + +.bankname { + padding-left: 15px; + font-size: 20px; +} + +.btn-xs { + background-color: #00800061 !important; + border: none; + font-size: 14px; +} + +.account-add-wrap { + +} + +.account-add { + color:green; + font-weight:800; + font-size:18px; +} + +.btn-icon.btn-xs { + height: 30px; + min-width: 30px; + width: 30px; + top: -3px; + left: -5px; +} + diff --git a/src/main/webapp/resources/css/user/accountList.css b/src/main/webapp/resources/css/user/accountList.css new file mode 100644 index 0000000..a12d293 --- /dev/null +++ b/src/main/webapp/resources/css/user/accountList.css @@ -0,0 +1,25 @@ +@charset "UTF-8"; + +.select{ + font-size : 20px; + + +} + +.btn_image{ +} + +#bank_logo{ + width: 100px; + height: 100px; +} + +#subListTable{ + width:70%; + align-content: center; + align-items: center; +} + +#subListTable th{ + background: blue; +} \ No newline at end of file diff --git a/src/main/webapp/resources/css/user/register.css b/src/main/webapp/resources/css/user/register.css index ca7b8c5..4eff496 100644 --- a/src/main/webapp/resources/css/user/register.css +++ b/src/main/webapp/resources/css/user/register.css @@ -133,6 +133,9 @@ body { margin-left: 10px; } +#pass { + font-weight: bold; +} #hp1 { width: 40px; diff --git "a/src/main/webapp/resources/images/admin/fund/\353\260\230\353\240\244\353\217\231\353\254\274.png" "b/src/main/webapp/resources/images/admin/fund/\353\260\230\353\240\244\353\217\231\353\254\274.png" new file mode 100644 index 0000000..8a2a9eb Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\353\260\230\353\240\244\353\217\231\353\254\274.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\353\262\240\354\235\264\353\271\204\355\202\244\354\246\210.png" "b/src/main/webapp/resources/images/admin/fund/\353\262\240\354\235\264\353\271\204\355\202\244\354\246\210.png" new file mode 100644 index 0000000..3e572e2 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\353\262\240\354\235\264\353\271\204\355\202\244\354\246\210.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\353\267\260\355\213\260.png" "b/src/main/webapp/resources/images/admin/fund/\353\267\260\355\213\260.png" new file mode 100644 index 0000000..7c4488f Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\353\267\260\355\213\260.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\354\212\244\355\217\254\354\270\240\353\252\250\353\271\214\353\246\254\355\213\260.png" "b/src/main/webapp/resources/images/admin/fund/\354\212\244\355\217\254\354\270\240\353\252\250\353\271\214\353\246\254\355\213\260.png" new file mode 100644 index 0000000..8cd5f78 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\354\212\244\355\217\254\354\270\240\353\252\250\353\271\214\353\246\254\355\213\260.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\354\227\254\355\226\211\353\240\210\354\240\270.png" "b/src/main/webapp/resources/images/admin/fund/\354\227\254\355\226\211\353\240\210\354\240\270.png" new file mode 100644 index 0000000..aaead31 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\354\227\254\355\226\211\353\240\210\354\240\270.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\354\272\220\353\246\255\355\204\260\352\265\277\354\246\210.png" "b/src/main/webapp/resources/images/admin/fund/\354\272\220\353\246\255\355\204\260\352\265\277\354\246\210.png" new file mode 100644 index 0000000..99a85f1 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\354\272\220\353\246\255\355\204\260\352\265\277\354\246\210.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\355\205\214\355\201\254\352\260\200\354\240\204.png" "b/src/main/webapp/resources/images/admin/fund/\355\205\214\355\201\254\352\260\200\354\240\204.png" new file mode 100644 index 0000000..c8699f1 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\355\205\214\355\201\254\352\260\200\354\240\204.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\355\214\250\354\205\230\354\236\241\355\231\224.png" "b/src/main/webapp/resources/images/admin/fund/\355\214\250\354\205\230\354\236\241\355\231\224.png" new file mode 100644 index 0000000..789361a Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\355\214\250\354\205\230\354\236\241\355\231\224.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\355\221\270\353\223\234.png" "b/src/main/webapp/resources/images/admin/fund/\355\221\270\353\223\234.png" new file mode 100644 index 0000000..73dcda4 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\355\221\270\353\223\234.png" differ diff --git "a/src/main/webapp/resources/images/admin/fund/\355\231\210\353\246\254\353\271\231.png" "b/src/main/webapp/resources/images/admin/fund/\355\231\210\353\246\254\353\271\231.png" new file mode 100644 index 0000000..06215a8 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/fund/\355\231\210\353\246\254\353\271\231.png" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\353\213\250\353\260\261\354\247\210 \354\212\244\353\254\264\353\224\224.PNG" "b/src/main/webapp/resources/images/admin/upload/\353\213\250\353\260\261\354\247\210 \354\212\244\353\254\264\353\224\224.PNG" new file mode 100644 index 0000000..f6d6446 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\353\213\250\353\260\261\354\247\210 \354\212\244\353\254\264\353\224\224.PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\353\240\210\355\212\270\353\241\234 \355\202\244\353\263\264\353\223\234.PNG" "b/src/main/webapp/resources/images/admin/upload/\353\240\210\355\212\270\353\241\234 \355\202\244\353\263\264\353\223\234.PNG" new file mode 100644 index 0000000..8403644 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\353\240\210\355\212\270\353\241\234 \355\202\244\353\263\264\353\223\234.PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\353\247\210\354\212\244\355\201\254\355\225\204\355\204\260(\353\262\240\354\235\264\353\271\204.\355\202\244\354\246\210).PNG" "b/src/main/webapp/resources/images/admin/upload/\353\247\210\354\212\244\355\201\254\355\225\204\355\204\260(\353\262\240\354\235\264\353\271\204.\355\202\244\354\246\210).PNG" new file mode 100644 index 0000000..2fbd9b2 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\353\247\210\354\212\244\355\201\254\355\225\204\355\204\260(\353\262\240\354\235\264\353\271\204.\355\202\244\354\246\210).PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\353\254\264\354\244\221\353\240\245 \355\216\230\354\235\264\354\273\244\354\202\255\354\212\244.PNG" "b/src/main/webapp/resources/images/admin/upload/\353\254\264\354\244\221\353\240\245 \355\216\230\354\235\264\354\273\244\354\202\255\354\212\244.PNG" new file mode 100644 index 0000000..3070db7 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\353\254\264\354\244\221\353\240\245 \355\216\230\354\235\264\354\273\244\354\202\255\354\212\244.PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\353\267\260\355\213\260.PNG" "b/src/main/webapp/resources/images/admin/upload/\353\267\260\355\213\260.PNG" new file mode 100644 index 0000000..2cc2d84 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\353\267\260\355\213\260.PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\354\206\220\353\252\251\353\263\264\355\230\270\353\214\200(\354\212\244\355\217\254\354\270\240.\353\252\250\353\271\214\353\246\254\355\213\260)(.PNG" "b/src/main/webapp/resources/images/admin/upload/\354\206\220\353\252\251\353\263\264\355\230\270\353\214\200(\354\212\244\355\217\254\354\270\240.\353\252\250\353\271\214\353\246\254\355\213\260)(.PNG" new file mode 100644 index 0000000..165ec38 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\354\206\220\353\252\251\353\263\264\355\230\270\353\214\200(\354\212\244\355\217\254\354\270\240.\353\252\250\353\271\214\353\246\254\355\213\260)(.PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\354\272\220\353\246\255\355\204\260.\352\265\277\354\246\210(\354\232\260\353\223\234 \354\272\230\353\246\260\353\215\224).PNG" "b/src/main/webapp/resources/images/admin/upload/\354\272\220\353\246\255\355\204\260.\352\265\277\354\246\210(\354\232\260\353\223\234 \354\272\230\353\246\260\353\215\224).PNG" new file mode 100644 index 0000000..fd446ce Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\354\272\220\353\246\255\355\204\260.\352\265\277\354\246\210(\354\232\260\353\223\234 \354\272\230\353\246\260\353\215\224).PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\354\273\265\355\231\200\353\215\224(\354\227\254\355\226\211.\353\240\210\354\240\200).PNG" "b/src/main/webapp/resources/images/admin/upload/\354\273\265\355\231\200\353\215\224(\354\227\254\355\226\211.\353\240\210\354\240\200).PNG" new file mode 100644 index 0000000..b446872 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\354\273\265\355\231\200\353\215\224(\354\227\254\355\226\211.\353\240\210\354\240\200).PNG" differ diff --git "a/src/main/webapp/resources/images/admin/upload/\355\231\210.\353\246\254\353\271\231(\354\235\264\353\270\224).PNG" "b/src/main/webapp/resources/images/admin/upload/\355\231\210.\353\246\254\353\271\231(\354\235\264\353\270\224).PNG" new file mode 100644 index 0000000..4fe0179 Binary files /dev/null and "b/src/main/webapp/resources/images/admin/upload/\355\231\210.\353\246\254\353\271\231(\354\235\264\353\270\224).PNG" differ diff --git a/src/main/webapp/resources/images/bank/kosmoicon.png b/src/main/webapp/resources/images/bank/kosmoicon.png new file mode 100644 index 0000000..0d2dc10 Binary files /dev/null and b/src/main/webapp/resources/images/bank/kosmoicon.png differ diff --git a/src/main/webapp/resources/images/bank/nhicon.png b/src/main/webapp/resources/images/bank/nhicon.png new file mode 100644 index 0000000..c59304e Binary files /dev/null and b/src/main/webapp/resources/images/bank/nhicon.png differ diff --git a/src/main/webapp/resources/images/img/ico-sign-00.png b/src/main/webapp/resources/images/img/ico-sign-00.png new file mode 100644 index 0000000..64b9f92 Binary files /dev/null and b/src/main/webapp/resources/images/img/ico-sign-00.png differ diff --git a/src/main/webapp/resources/js/ajax.js b/src/main/webapp/resources/js/ajax.js new file mode 100644 index 0000000..00ef0f4 --- /dev/null +++ b/src/main/webapp/resources/js/ajax.js @@ -0,0 +1,305 @@ +/** + * + */ + + +// 본인인증 ajax +function confirm() { + IMP.init('iamport'); + var token = $("meta[name='_csrf']").attr("content"); + var header = $("meta[name='_csrf_header']").attr("content"); + var access_token; + $.ajax({ + type : 'POST', + url : 'getToken.do', + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + } + + }).done(function(rsp) { + // 이후 Business Logic 처리하시면 됩니다. + console.log(rsp.response.token); + access_token = rsp.response.token; + }); + + IMP.certification({ + merchant_uid : 'merchant_' + new Date().getTime() //본인인증과 연관된 가맹점 내부 주문번호가 있다면 넘겨주세요 + }, function(rsp) { + if ( rsp.success ) { + // 인증성공 + console.log(rsp.imp_uid); + console.log(rsp.merchant_uid); + console.log(token); + var imp_uid = rsp.imp_uid; + $.ajax({ + type : 'get', + url : 'certifications.do', + dataType : 'json', + data : { + "imp_uid" : imp_uid, + "access_token" : access_token + }, + + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + } + + }).done(function(rsp) { + // 이후 Business Logic 처리하시면 됩니다. + console.log(rsp.response); + + var info = rsp.response; + + + var unique_key = info.unique_key; + + // 명의 중복확인 + $.ajax({ + type : 'post', + url : 'duplicate.do', + dataType : 'text', + data : { + "unique_key" : unique_key + }, + + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + } + + }).done(function(rsp) { + console.log("요청 성공"); + console.log(rsp); + var duplicate = parseInt(rsp); + + if (duplicate == 0) { + document.registerform.userName.value = info.name; + document.registerform.userBirth.value = info.birthday; + document.registerform.hp.value = info.phone; + document.registerform.unique_key.value = info.unique_key; + + $("#pass").val("본인인증완료"); + $("#pass").attr("diabled", true); + $("#pass").css("color", "black"); + + } else { + alert("이미 가입된 계정이 존재합니다."); + return false; + } + + }).fail(function() { + alert("요청 실패"); + + }) + + }); + + } else { + // 인증취소 또는 인증실패 + var msg = '인증에 실패하였습니다.'; + msg += '에러내용 : ' + rsp.error_msg; + + alert(msg); + } + }); +} +// 본인인증 ajax 끝 + +//아이디 중복확인 AJAX +function confirmId() { + + var token = $("meta[name='_csrf']").attr("content"); + var header = $("meta[name='_csrf_header']").attr("content"); + var member_id = $("#userId").val(); + console.log("member_id : " + member_id); + setTimeout(function() { + $.ajax({ + url : "confirmId.do", + data: {"member_id":member_id}, + type: "post", + dataType: 'json', + + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + }, + + success : function(data) { + console.log("성공"); + $("#id_check").text(""); + if (data == 1) { + // 1 : 아이디가 중복되는 문구 + $("#id_check").text("사용중인 아이디입니다."); + $("#id_check").css("color", "red"); + $("#userId").css("border-color", "red"); + + $("input[name=hiddenId]").val(0); + console.log($("input[name=hiddenId]").val()); + + } else { + // 0 : 사용가능 + $("#id_check").text("사용 가능한 아이디입니다."); + $("#id_check").css("color","green"); + $("#userId").css("border-color", "#d7d7d7"); + $("input[name=hiddenId]").val(1); + console.log($("input[name=hiddenId]").val()); + + // input 입력 값 없을 시 id_check 초기화 + if(member_id == "") { + $("#id_check").text(""); + } + } + + }, error : function() {console.log("실패");} + }); + }, 10); +} + +//회원가입 이메일 인증 +function emailChk() { + + console.log("emailChk - ON"); + + var token = $("meta[name='_csrf']").attr("content"); + var header = $("meta[name='_csrf_header']").attr("content"); + + var dice; + var sss; + var click=0; + var userEmail; + var counter; + + $('#mail1').click(function() { + $("#dice").val(''); + + userEmail1 = $("input[name=email1").val(); + userEmail2 = $("input[name=email2").val(); + userEmail = userEmail1 + "@" + userEmail2; + console.log("이메일 : " + userEmail); + // var idJ = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; + if(userEmail1 == ""){ + alert("형식에 맞게 이메일을 입력해 주세요!"); + return; + } else if(userEmail2 == "") { + alert("형식에 맞게 이메일을 입력해 주세요!"); + return; + } + click++; + $('#dice_check').css('display',''); + + if(click>=1){ + $("#mail1").css('display','none').css('margin-top','0px').css('border','1px solid').css('cursor','pointer') + $("#mail2").css('display','') + $("#dice_check1").css('display',''); + + } + + var stop = false; + var mm=5; + var ss=59; + // 인증번호 카운터 + counter = setInterval(function(){ + if(!stop){ + var time_text = mm+':'+ss+'초'; + $("#dice_check").text(time_text); + $("#dice_check").css('color','red').css('display','inline-block'); + $("input[name=counter]").val(1); + ss--; + if(ss==-1){ + if(mm < 1){ + mm=0; + if(ss<0){ + clearInterval(counter); + $("#dice_check").text(''); + $("#dice_check1").css('display','none'); + + $("#mail1").css('display','').css('margin-top','0px').css('border','1px solid').css('cursor','pointer'); + $("#mail2").css('display','none'); + } + } + else{mm--;} + ss=10; + } + if(ss<=9){ + ss = '0'+ss; + } + } + else{ + clearInterval(counter); + } + },1000); + + $.ajax({ + url : "usermailCheck.do", + type: "POST", + data: {"userEmail":userEmail}, + dataType: 'json', + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + }, + success : function(data) { + dice = data.dice; + }, error : function() {console.log("실패");} + }) + + + // 다시 보내기 버튼 + $('#mail2').click(function() { + + mm=5; + ss=59; + + userEmail1 = $("input[name=email1").val(); + userEmail2 = $("input[name=email2").val(); + userEmail = userEmail1 + "@" + userEmail2; + console.log("이메일 : "+userEmail); + + $("input[name=emailChk]").val(0); + $("#dice").val(''); + + + $.ajax({ + url : "usermailCheck.do", + type: "POST", + data: {"userEmail":userEmail}, + dataType: 'json', + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + }, + success : function(data) { + dice = data.dice; + }, error : function() {console.log("실패");} + }) + + }) + }); + + + var suc; + $("#btn_dice").click(function(){ + console.log("인증번호 확인버튼 누름"); + if(dice==$("#dice").val()){ + alert('성공'); + clearInterval(counter); + suc =1; + $("#dice_check").html("") ; + //$("#dice_check").css("color","green"); + $("#dice_check1").css('display','none'); + $("#mail2").html("인증완료"); + // pointer-events - none : a 태그 클릭 비활성화 + $("#mail2").css("pointer-events", "none").css("color", "green"); + + $("#dice").css('display','none'); + $("#btn_dice").css('display','none'); + $("input[name=emailChk]").val("1"); + console.log("이메일인증" + $("input[name=emailChk]").val()); + mm=0; + ss=0; + + } + else{ + alert('인증번호를 확인해주세요'); + } + }); + +} +// -- 회원가입이메일인증 + diff --git a/src/main/webapp/resources/js/datepicker.en.js b/src/main/webapp/resources/js/datepicker.en.js new file mode 100644 index 0000000..32072f6 --- /dev/null +++ b/src/main/webapp/resources/js/datepicker.en.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['en'] = { + days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + daysMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], + months: ['January','February','March','April','May','June', 'July','August','September','October','November','December'], + monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + today: 'Today', + clear: 'Clear', + dateFormat: 'mm/dd/yyyy', + timeFormat: 'hh:ii aa', + firstDay: 0 +}; })(jQuery); \ No newline at end of file diff --git a/src/main/webapp/resources/js/datepicker.js b/src/main/webapp/resources/js/datepicker.js new file mode 100644 index 0000000..ad69b4f --- /dev/null +++ b/src/main/webapp/resources/js/datepicker.js @@ -0,0 +1,2236 @@ +;(function (window, $, undefined) { ;(function () { + var VERSION = '2.2.3', + pluginName = 'datepicker', + autoInitSelector = '.datepicker-here', + $body, $datepickersContainer, + containerBuilt = false, + baseTemplate = '' + + '
    ' + + '' + + '' + + '
    ' + + '
    ', + defaults = { + classes: '', + inline: false, + language: 'ru', + startDate: new Date(), + firstDay: '', + weekends: [6, 0], + dateFormat: '', + altField: '', + altFieldDateFormat: '@', + toggleSelected: true, + keyboardNav: true, + + position: 'bottom left', + offset: 12, + + view: 'days', + minView: 'days', + + showOtherMonths: true, + selectOtherMonths: true, + moveToOtherMonthsOnSelect: true, + + showOtherYears: true, + selectOtherYears: true, + moveToOtherYearsOnSelect: true, + + minDate: '', + maxDate: '', + disableNavWhenOutOfRange: true, + + multipleDates: false, // Boolean or Number + multipleDatesSeparator: ',', + range: false, + + todayButton: false, + clearButton: false, + + showEvent: 'focus', + autoClose: false, + + // navigation + monthsField: 'monthsShort', + prevHtml: '', + nextHtml: '', + navTitles: { + days: 'MM, yyyy', + months: 'yyyy', + years: 'yyyy1 - yyyy2' + }, + + // timepicker + timepicker: false, + onlyTimepicker: false, + dateTimeSeparator: ' ', + timeFormat: '', + minHours: 0, + maxHours: 24, + minMinutes: 0, + maxMinutes: 59, + hoursStep: 1, + minutesStep: 1, + + // events + onSelect: '', + onShow: '', + onHide: '', + onChangeMonth: '', + onChangeYear: '', + onChangeDecade: '', + onChangeView: '', + onRenderCell: '' + }, + hotKeys = { + 'ctrlRight': [17, 39], + 'ctrlUp': [17, 38], + 'ctrlLeft': [17, 37], + 'ctrlDown': [17, 40], + 'shiftRight': [16, 39], + 'shiftUp': [16, 38], + 'shiftLeft': [16, 37], + 'shiftDown': [16, 40], + 'altUp': [18, 38], + 'altRight': [18, 39], + 'altLeft': [18, 37], + 'altDown': [18, 40], + 'ctrlShiftUp': [16, 17, 38] + }, + datepicker; + + var Datepicker = function (el, options) { + this.el = el; + this.$el = $(el); + + this.opts = $.extend(true, {}, defaults, options, this.$el.data()); + + if ($body == undefined) { + $body = $('body'); + } + + if (!this.opts.startDate) { + this.opts.startDate = new Date(); + } + + if (this.el.nodeName == 'INPUT') { + this.elIsInput = true; + } + + if (this.opts.altField) { + this.$altField = typeof this.opts.altField == 'string' ? $(this.opts.altField) : this.opts.altField; + } + + this.inited = false; + this.visible = false; + this.silent = false; // Need to prevent unnecessary rendering + + this.currentDate = this.opts.startDate; + this.currentView = this.opts.view; + this._createShortCuts(); + this.selectedDates = []; + this.views = {}; + this.keys = []; + this.minRange = ''; + this.maxRange = ''; + this._prevOnSelectValue = ''; + + this.init() + }; + + datepicker = Datepicker; + + datepicker.prototype = { + VERSION: VERSION, + viewIndexes: ['days', 'months', 'years'], + + init: function () { + if (!containerBuilt && !this.opts.inline && this.elIsInput) { + this._buildDatepickersContainer(); + } + this._buildBaseHtml(); + this._defineLocale(this.opts.language); + this._syncWithMinMaxDates(); + + if (this.elIsInput) { + if (!this.opts.inline) { + // Set extra classes for proper transitions + this._setPositionClasses(this.opts.position); + this._bindEvents() + } + if (this.opts.keyboardNav && !this.opts.onlyTimepicker) { + this._bindKeyboardEvents(); + } + this.$datepicker.on('mousedown', this._onMouseDownDatepicker.bind(this)); + this.$datepicker.on('mouseup', this._onMouseUpDatepicker.bind(this)); + } + + if (this.opts.classes) { + this.$datepicker.addClass(this.opts.classes) + } + + if (this.opts.timepicker) { + this.timepicker = new $.fn.datepicker.Timepicker(this, this.opts); + this._bindTimepickerEvents(); + } + + if (this.opts.onlyTimepicker) { + this.$datepicker.addClass('-only-timepicker-'); + } + + this.views[this.currentView] = new $.fn.datepicker.Body(this, this.currentView, this.opts); + this.views[this.currentView].show(); + this.nav = new $.fn.datepicker.Navigation(this, this.opts); + this.view = this.currentView; + + this.$el.on('clickCell.adp', this._onClickCell.bind(this)); + this.$datepicker.on('mouseenter', '.datepicker--cell', this._onMouseEnterCell.bind(this)); + this.$datepicker.on('mouseleave', '.datepicker--cell', this._onMouseLeaveCell.bind(this)); + + this.inited = true; + }, + + _createShortCuts: function () { + this.minDate = this.opts.minDate ? this.opts.minDate : new Date(-8639999913600000); + this.maxDate = this.opts.maxDate ? this.opts.maxDate : new Date(8639999913600000); + }, + + _bindEvents : function () { + this.$el.on(this.opts.showEvent + '.adp', this._onShowEvent.bind(this)); + this.$el.on('mouseup.adp', this._onMouseUpEl.bind(this)); + this.$el.on('blur.adp', this._onBlur.bind(this)); + this.$el.on('keyup.adp', this._onKeyUpGeneral.bind(this)); + $(window).on('resize.adp', this._onResize.bind(this)); + $('body').on('mouseup.adp', this._onMouseUpBody.bind(this)); + }, + + _bindKeyboardEvents: function () { + this.$el.on('keydown.adp', this._onKeyDown.bind(this)); + this.$el.on('keyup.adp', this._onKeyUp.bind(this)); + this.$el.on('hotKey.adp', this._onHotKey.bind(this)); + }, + + _bindTimepickerEvents: function () { + this.$el.on('timeChange.adp', this._onTimeChange.bind(this)); + }, + + isWeekend: function (day) { + return this.opts.weekends.indexOf(day) !== -1; + }, + + _defineLocale: function (lang) { + if (typeof lang == 'string') { + this.loc = $.fn.datepicker.language[lang]; + if (!this.loc) { + console.warn('Can\'t find language "' + lang + '" in Datepicker.language, will use "ru" instead'); + this.loc = $.extend(true, {}, $.fn.datepicker.language.ru) + } + + this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, $.fn.datepicker.language[lang]) + } else { + this.loc = $.extend(true, {}, $.fn.datepicker.language.ru, lang) + } + + if (this.opts.dateFormat) { + this.loc.dateFormat = this.opts.dateFormat + } + + if (this.opts.timeFormat) { + this.loc.timeFormat = this.opts.timeFormat + } + + if (this.opts.firstDay !== '') { + this.loc.firstDay = this.opts.firstDay + } + + if (this.opts.timepicker) { + this.loc.dateFormat = [this.loc.dateFormat, this.loc.timeFormat].join(this.opts.dateTimeSeparator); + } + + if (this.opts.onlyTimepicker) { + this.loc.dateFormat = this.loc.timeFormat; + } + + var boundary = this._getWordBoundaryRegExp; + if (this.loc.timeFormat.match(boundary('aa')) || + this.loc.timeFormat.match(boundary('AA')) + ) { + this.ampm = true; + } + }, + + _buildDatepickersContainer: function () { + containerBuilt = true; + $body.append('
    '); + $datepickersContainer = $('#datepickers-container'); + }, + + _buildBaseHtml: function () { + var $appendTarget, + $inline = $('
    '); + + if(this.el.nodeName == 'INPUT') { + if (!this.opts.inline) { + $appendTarget = $datepickersContainer; + } else { + $appendTarget = $inline.insertAfter(this.$el) + } + } else { + $appendTarget = $inline.appendTo(this.$el) + } + + this.$datepicker = $(baseTemplate).appendTo($appendTarget); + this.$content = $('.datepicker--content', this.$datepicker); + this.$nav = $('.datepicker--nav', this.$datepicker); + }, + + _triggerOnChange: function () { + if (!this.selectedDates.length) { + // Prevent from triggering multiple onSelect callback with same argument (empty string) in IE10-11 + if (this._prevOnSelectValue === '') return; + this._prevOnSelectValue = ''; + return this.opts.onSelect('', '', this); + } + + var selectedDates = this.selectedDates, + parsedSelected = datepicker.getParsedDate(selectedDates[0]), + formattedDates, + _this = this, + dates = new Date( + parsedSelected.year, + parsedSelected.month, + parsedSelected.date, + parsedSelected.hours, + parsedSelected.minutes + ); + + formattedDates = selectedDates.map(function (date) { + return _this.formatDate(_this.loc.dateFormat, date) + }).join(this.opts.multipleDatesSeparator); + + // Create new dates array, to separate it from original selectedDates + if (this.opts.multipleDates || this.opts.range) { + dates = selectedDates.map(function(date) { + var parsedDate = datepicker.getParsedDate(date); + return new Date( + parsedDate.year, + parsedDate.month, + parsedDate.date, + parsedDate.hours, + parsedDate.minutes + ); + }) + } + + this._prevOnSelectValue = formattedDates; + this.opts.onSelect(formattedDates, dates, this); + }, + + next: function () { + var d = this.parsedDate, + o = this.opts; + switch (this.view) { + case 'days': + this.date = new Date(d.year, d.month + 1, 1); + if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year); + break; + case 'months': + this.date = new Date(d.year + 1, d.month, 1); + if (o.onChangeYear) o.onChangeYear(this.parsedDate.year); + break; + case 'years': + this.date = new Date(d.year + 10, 0, 1); + if (o.onChangeDecade) o.onChangeDecade(this.curDecade); + break; + } + }, + + prev: function () { + var d = this.parsedDate, + o = this.opts; + switch (this.view) { + case 'days': + this.date = new Date(d.year, d.month - 1, 1); + if (o.onChangeMonth) o.onChangeMonth(this.parsedDate.month, this.parsedDate.year); + break; + case 'months': + this.date = new Date(d.year - 1, d.month, 1); + if (o.onChangeYear) o.onChangeYear(this.parsedDate.year); + break; + case 'years': + this.date = new Date(d.year - 10, 0, 1); + if (o.onChangeDecade) o.onChangeDecade(this.curDecade); + break; + } + }, + + formatDate: function (string, date) { + date = date || this.date; + var result = string, + boundary = this._getWordBoundaryRegExp, + locale = this.loc, + leadingZero = datepicker.getLeadingZeroNum, + decade = datepicker.getDecade(date), + d = datepicker.getParsedDate(date), + fullHours = d.fullHours, + hours = d.hours, + ampm = string.match(boundary('aa')) || string.match(boundary('AA')), + dayPeriod = 'am', + replacer = this._replacer, + validHours; + + if (this.opts.timepicker && this.timepicker && ampm) { + validHours = this.timepicker._getValidHoursFromDate(date, ampm); + fullHours = leadingZero(validHours.hours); + hours = validHours.hours; + dayPeriod = validHours.dayPeriod; + } + + switch (true) { + case /@/.test(result): + result = result.replace(/@/, date.getTime()); + case /aa/.test(result): + result = replacer(result, boundary('aa'), dayPeriod); + case /AA/.test(result): + result = replacer(result, boundary('AA'), dayPeriod.toUpperCase()); + case /dd/.test(result): + result = replacer(result, boundary('dd'), d.fullDate); + case /d/.test(result): + result = replacer(result, boundary('d'), d.date); + case /DD/.test(result): + result = replacer(result, boundary('DD'), locale.days[d.day]); + case /D/.test(result): + result = replacer(result, boundary('D'), locale.daysShort[d.day]); + case /mm/.test(result): + result = replacer(result, boundary('mm'), d.fullMonth); + case /m/.test(result): + result = replacer(result, boundary('m'), d.month + 1); + case /MM/.test(result): + result = replacer(result, boundary('MM'), this.loc.months[d.month]); + case /M/.test(result): + result = replacer(result, boundary('M'), locale.monthsShort[d.month]); + case /ii/.test(result): + result = replacer(result, boundary('ii'), d.fullMinutes); + case /i/.test(result): + result = replacer(result, boundary('i'), d.minutes); + case /hh/.test(result): + result = replacer(result, boundary('hh'), fullHours); + case /h/.test(result): + result = replacer(result, boundary('h'), hours); + case /yyyy/.test(result): + result = replacer(result, boundary('yyyy'), d.year); + case /yyyy1/.test(result): + result = replacer(result, boundary('yyyy1'), decade[0]); + case /yyyy2/.test(result): + result = replacer(result, boundary('yyyy2'), decade[1]); + case /yy/.test(result): + result = replacer(result, boundary('yy'), d.year.toString().slice(-2)); + } + + return result; + }, + + _replacer: function (str, reg, data) { + return str.replace(reg, function (match, p1,p2,p3) { + return p1 + data + p3; + }) + }, + + _getWordBoundaryRegExp: function (sign) { + var symbols = '\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;'; + + return new RegExp('(^|>|' + symbols + ')(' + sign + ')($|<|' + symbols + ')', 'g'); + }, + + + selectDate: function (date) { + var _this = this, + opts = _this.opts, + d = _this.parsedDate, + selectedDates = _this.selectedDates, + len = selectedDates.length, + newDate = ''; + + if (Array.isArray(date)) { + date.forEach(function (d) { + _this.selectDate(d) + }); + return; + } + + if (!(date instanceof Date)) return; + + this.lastSelectedDate = date; + + // Set new time values from Date + if (this.timepicker) { + this.timepicker._setTime(date); + } + + // On this step timepicker will set valid values in it's instance + _this._trigger('selectDate', date); + + // Set correct time values after timepicker's validation + // Prevent from setting hours or minutes which values are lesser then `min` value or + // greater then `max` value + if (this.timepicker) { + date.setHours(this.timepicker.hours); + date.setMinutes(this.timepicker.minutes) + } + + if (_this.view == 'days') { + if (date.getMonth() != d.month && opts.moveToOtherMonthsOnSelect) { + newDate = new Date(date.getFullYear(), date.getMonth(), 1); + } + } + + if (_this.view == 'years') { + if (date.getFullYear() != d.year && opts.moveToOtherYearsOnSelect) { + newDate = new Date(date.getFullYear(), 0, 1); + } + } + + if (newDate) { + _this.silent = true; + _this.date = newDate; + _this.silent = false; + _this.nav._render() + } + + if (opts.multipleDates && !opts.range) { // Set priority to range functionality + if (len === opts.multipleDates) return; + if (!_this._isSelected(date)) { + _this.selectedDates.push(date); + } + } else if (opts.range) { + if (len == 2) { + _this.selectedDates = [date]; + _this.minRange = date; + _this.maxRange = ''; + } else if (len == 1) { + _this.selectedDates.push(date); + if (!_this.maxRange){ + _this.maxRange = date; + } else { + _this.minRange = date; + } + // Swap dates if they were selected via dp.selectDate() and second date was smaller then first + if (datepicker.bigger(_this.maxRange, _this.minRange)) { + _this.maxRange = _this.minRange; + _this.minRange = date; + } + _this.selectedDates = [_this.minRange, _this.maxRange] + + } else { + _this.selectedDates = [date]; + _this.minRange = date; + } + } else { + _this.selectedDates = [date]; + } + + _this._setInputValue(); + + if (opts.onSelect) { + _this._triggerOnChange(); + } + + if (opts.autoClose && !this.timepickerIsActive) { + if (!opts.multipleDates && !opts.range) { + _this.hide(); + } else if (opts.range && _this.selectedDates.length == 2) { + _this.hide(); + } + } + + _this.views[this.currentView]._render() + }, + + removeDate: function (date) { + var selected = this.selectedDates, + _this = this; + + if (!(date instanceof Date)) return; + + return selected.some(function (curDate, i) { + if (datepicker.isSame(curDate, date)) { + selected.splice(i, 1); + + if (!_this.selectedDates.length) { + _this.minRange = ''; + _this.maxRange = ''; + _this.lastSelectedDate = ''; + } else { + _this.lastSelectedDate = _this.selectedDates[_this.selectedDates.length - 1]; + } + + _this.views[_this.currentView]._render(); + _this._setInputValue(); + + if (_this.opts.onSelect) { + _this._triggerOnChange(); + } + + return true + } + }) + }, + + today: function () { + this.silent = true; + this.view = this.opts.minView; + this.silent = false; + this.date = new Date(); + + if (this.opts.todayButton instanceof Date) { + this.selectDate(this.opts.todayButton) + } + }, + + clear: function () { + this.selectedDates = []; + this.minRange = ''; + this.maxRange = ''; + this.views[this.currentView]._render(); + this._setInputValue(); + if (this.opts.onSelect) { + this._triggerOnChange() + } + }, + + /** + * Updates datepicker options + * @param {String|Object} param - parameter's name to update. If object then it will extend current options + * @param {String|Number|Object} [value] - new param value + */ + update: function (param, value) { + var len = arguments.length, + lastSelectedDate = this.lastSelectedDate; + + if (len == 2) { + this.opts[param] = value; + } else if (len == 1 && typeof param == 'object') { + this.opts = $.extend(true, this.opts, param) + } + + this._createShortCuts(); + this._syncWithMinMaxDates(); + this._defineLocale(this.opts.language); + this.nav._addButtonsIfNeed(); + if (!this.opts.onlyTimepicker) this.nav._render(); + this.views[this.currentView]._render(); + + if (this.elIsInput && !this.opts.inline) { + this._setPositionClasses(this.opts.position); + if (this.visible) { + this.setPosition(this.opts.position) + } + } + + if (this.opts.classes) { + this.$datepicker.addClass(this.opts.classes) + } + + if (this.opts.onlyTimepicker) { + this.$datepicker.addClass('-only-timepicker-'); + } + + if (this.opts.timepicker) { + if (lastSelectedDate) this.timepicker._handleDate(lastSelectedDate); + this.timepicker._updateRanges(); + this.timepicker._updateCurrentTime(); + // Change hours and minutes if it's values have been changed through min/max hours/minutes + if (lastSelectedDate) { + lastSelectedDate.setHours(this.timepicker.hours); + lastSelectedDate.setMinutes(this.timepicker.minutes); + } + } + + this._setInputValue(); + + return this; + }, + + _syncWithMinMaxDates: function () { + var curTime = this.date.getTime(); + this.silent = true; + if (this.minTime > curTime) { + this.date = this.minDate; + } + + if (this.maxTime < curTime) { + this.date = this.maxDate; + } + this.silent = false; + }, + + _isSelected: function (checkDate, cellType) { + var res = false; + this.selectedDates.some(function (date) { + if (datepicker.isSame(date, checkDate, cellType)) { + res = date; + return true; + } + }); + return res; + }, + + _setInputValue: function () { + var _this = this, + opts = _this.opts, + format = _this.loc.dateFormat, + altFormat = opts.altFieldDateFormat, + value = _this.selectedDates.map(function (date) { + return _this.formatDate(format, date) + }), + altValues; + + if (opts.altField && _this.$altField.length) { + altValues = this.selectedDates.map(function (date) { + return _this.formatDate(altFormat, date) + }); + altValues = altValues.join(this.opts.multipleDatesSeparator); + this.$altField.val(altValues); + } + + value = value.join(this.opts.multipleDatesSeparator); + + this.$el.val(value) + }, + + /** + * Check if date is between minDate and maxDate + * @param date {object} - date object + * @param type {string} - cell type + * @returns {boolean} + * @private + */ + _isInRange: function (date, type) { + var time = date.getTime(), + d = datepicker.getParsedDate(date), + min = datepicker.getParsedDate(this.minDate), + max = datepicker.getParsedDate(this.maxDate), + dMinTime = new Date(d.year, d.month, min.date).getTime(), + dMaxTime = new Date(d.year, d.month, max.date).getTime(), + types = { + day: time >= this.minTime && time <= this.maxTime, + month: dMinTime >= this.minTime && dMaxTime <= this.maxTime, + year: d.year >= min.year && d.year <= max.year + }; + return type ? types[type] : types.day + }, + + _getDimensions: function ($el) { + var offset = $el.offset(); + + return { + width: $el.outerWidth(), + height: $el.outerHeight(), + left: offset.left, + top: offset.top + } + }, + + _getDateFromCell: function (cell) { + var curDate = this.parsedDate, + year = cell.data('year') || curDate.year, + month = cell.data('month') == undefined ? curDate.month : cell.data('month'), + date = cell.data('date') || 1; + + return new Date(year, month, date); + }, + + _setPositionClasses: function (pos) { + pos = pos.split(' '); + var main = pos[0], + sec = pos[1], + classes = 'datepicker -' + main + '-' + sec + '- -from-' + main + '-'; + + if (this.visible) classes += ' active'; + + this.$datepicker + .removeAttr('class') + .addClass(classes); + }, + + setPosition: function (position) { + position = position || this.opts.position; + + var dims = this._getDimensions(this.$el), + selfDims = this._getDimensions(this.$datepicker), + pos = position.split(' '), + top, left, + offset = this.opts.offset, + main = pos[0], + secondary = pos[1]; + + switch (main) { + case 'top': + top = dims.top - selfDims.height - offset; + break; + case 'right': + left = dims.left + dims.width + offset; + break; + case 'bottom': + top = dims.top + dims.height + offset; + break; + case 'left': + left = dims.left - selfDims.width - offset; + break; + } + + switch(secondary) { + case 'top': + top = dims.top; + break; + case 'right': + left = dims.left + dims.width - selfDims.width; + break; + case 'bottom': + top = dims.top + dims.height - selfDims.height; + break; + case 'left': + left = dims.left; + break; + case 'center': + if (/left|right/.test(main)) { + top = dims.top + dims.height/2 - selfDims.height/2; + } else { + left = dims.left + dims.width/2 - selfDims.width/2; + } + } + + this.$datepicker + .css({ + left: left, + top: top + }) + }, + + show: function () { + var onShow = this.opts.onShow; + + this.setPosition(this.opts.position); + this.$datepicker.addClass('active'); + this.visible = true; + + if (onShow) { + this._bindVisionEvents(onShow) + } + }, + + hide: function () { + var onHide = this.opts.onHide; + + this.$datepicker + .removeClass('active') + .css({ + left: '-100000px' + }); + + this.focused = ''; + this.keys = []; + + this.inFocus = false; + this.visible = false; + this.$el.blur(); + + if (onHide) { + this._bindVisionEvents(onHide) + } + }, + + down: function (date) { + this._changeView(date, 'down'); + }, + + up: function (date) { + this._changeView(date, 'up'); + }, + + _bindVisionEvents: function (event) { + this.$datepicker.off('transitionend.dp'); + event(this, false); + this.$datepicker.one('transitionend.dp', event.bind(this, this, true)) + }, + + _changeView: function (date, dir) { + date = date || this.focused || this.date; + + var nextView = dir == 'up' ? this.viewIndex + 1 : this.viewIndex - 1; + if (nextView > 2) nextView = 2; + if (nextView < 0) nextView = 0; + + this.silent = true; + this.date = new Date(date.getFullYear(), date.getMonth(), 1); + this.silent = false; + this.view = this.viewIndexes[nextView]; + + }, + + _handleHotKey: function (key) { + var date = datepicker.getParsedDate(this._getFocusedDate()), + focusedParsed, + o = this.opts, + newDate, + totalDaysInNextMonth, + monthChanged = false, + yearChanged = false, + decadeChanged = false, + y = date.year, + m = date.month, + d = date.date; + + switch (key) { + case 'ctrlRight': + case 'ctrlUp': + m += 1; + monthChanged = true; + break; + case 'ctrlLeft': + case 'ctrlDown': + m -= 1; + monthChanged = true; + break; + case 'shiftRight': + case 'shiftUp': + yearChanged = true; + y += 1; + break; + case 'shiftLeft': + case 'shiftDown': + yearChanged = true; + y -= 1; + break; + case 'altRight': + case 'altUp': + decadeChanged = true; + y += 10; + break; + case 'altLeft': + case 'altDown': + decadeChanged = true; + y -= 10; + break; + case 'ctrlShiftUp': + this.up(); + break; + } + + totalDaysInNextMonth = datepicker.getDaysCount(new Date(y,m)); + newDate = new Date(y,m,d); + + // If next month has less days than current, set date to total days in that month + if (totalDaysInNextMonth < d) d = totalDaysInNextMonth; + + // Check if newDate is in valid range + if (newDate.getTime() < this.minTime) { + newDate = this.minDate; + } else if (newDate.getTime() > this.maxTime) { + newDate = this.maxDate; + } + + this.focused = newDate; + + focusedParsed = datepicker.getParsedDate(newDate); + if (monthChanged && o.onChangeMonth) { + o.onChangeMonth(focusedParsed.month, focusedParsed.year) + } + if (yearChanged && o.onChangeYear) { + o.onChangeYear(focusedParsed.year) + } + if (decadeChanged && o.onChangeDecade) { + o.onChangeDecade(this.curDecade) + } + }, + + _registerKey: function (key) { + var exists = this.keys.some(function (curKey) { + return curKey == key; + }); + + if (!exists) { + this.keys.push(key) + } + }, + + _unRegisterKey: function (key) { + var index = this.keys.indexOf(key); + + this.keys.splice(index, 1); + }, + + _isHotKeyPressed: function () { + var currentHotKey, + found = false, + _this = this, + pressedKeys = this.keys.sort(); + + for (var hotKey in hotKeys) { + currentHotKey = hotKeys[hotKey]; + if (pressedKeys.length != currentHotKey.length) continue; + + if (currentHotKey.every(function (key, i) { return key == pressedKeys[i]})) { + _this._trigger('hotKey', hotKey); + found = true; + } + } + + return found; + }, + + _trigger: function (event, args) { + this.$el.trigger(event, args) + }, + + _focusNextCell: function (keyCode, type) { + type = type || this.cellType; + + var date = datepicker.getParsedDate(this._getFocusedDate()), + y = date.year, + m = date.month, + d = date.date; + + if (this._isHotKeyPressed()){ + return; + } + + switch(keyCode) { + case 37: // left + type == 'day' ? (d -= 1) : ''; + type == 'month' ? (m -= 1) : ''; + type == 'year' ? (y -= 1) : ''; + break; + case 38: // up + type == 'day' ? (d -= 7) : ''; + type == 'month' ? (m -= 3) : ''; + type == 'year' ? (y -= 4) : ''; + break; + case 39: // right + type == 'day' ? (d += 1) : ''; + type == 'month' ? (m += 1) : ''; + type == 'year' ? (y += 1) : ''; + break; + case 40: // down + type == 'day' ? (d += 7) : ''; + type == 'month' ? (m += 3) : ''; + type == 'year' ? (y += 4) : ''; + break; + } + + var nd = new Date(y,m,d); + if (nd.getTime() < this.minTime) { + nd = this.minDate; + } else if (nd.getTime() > this.maxTime) { + nd = this.maxDate; + } + + this.focused = nd; + + }, + + _getFocusedDate: function () { + var focused = this.focused || this.selectedDates[this.selectedDates.length - 1], + d = this.parsedDate; + + if (!focused) { + switch (this.view) { + case 'days': + focused = new Date(d.year, d.month, new Date().getDate()); + break; + case 'months': + focused = new Date(d.year, d.month, 1); + break; + case 'years': + focused = new Date(d.year, 0, 1); + break; + } + } + + return focused; + }, + + _getCell: function (date, type) { + type = type || this.cellType; + + var d = datepicker.getParsedDate(date), + selector = '.datepicker--cell[data-year="' + d.year + '"]', + $cell; + + switch (type) { + case 'month': + selector = '[data-month="' + d.month + '"]'; + break; + case 'day': + selector += '[data-month="' + d.month + '"][data-date="' + d.date + '"]'; + break; + } + $cell = this.views[this.currentView].$el.find(selector); + + return $cell.length ? $cell : $(''); + }, + + destroy: function () { + var _this = this; + _this.$el + .off('.adp') + .data('datepicker', ''); + + _this.selectedDates = []; + _this.focused = ''; + _this.views = {}; + _this.keys = []; + _this.minRange = ''; + _this.maxRange = ''; + + if (_this.opts.inline || !_this.elIsInput) { + _this.$datepicker.closest('.datepicker-inline').remove(); + } else { + _this.$datepicker.remove(); + } + }, + + _handleAlreadySelectedDates: function (alreadySelected, selectedDate) { + if (this.opts.range) { + if (!this.opts.toggleSelected) { + // Add possibility to select same date when range is true + if (this.selectedDates.length != 2) { + this._trigger('clickCell', selectedDate); + } + } else { + this.removeDate(selectedDate); + } + } else if (this.opts.toggleSelected){ + this.removeDate(selectedDate); + } + + // Change last selected date to be able to change time when clicking on this cell + if (!this.opts.toggleSelected) { + this.lastSelectedDate = alreadySelected; + if (this.opts.timepicker) { + this.timepicker._setTime(alreadySelected); + this.timepicker.update(); + } + } + }, + + _onShowEvent: function (e) { + if (!this.visible) { + this.show(); + } + }, + + _onBlur: function () { + if (!this.inFocus && this.visible) { + this.hide(); + } + }, + + _onMouseDownDatepicker: function (e) { + this.inFocus = true; + }, + + _onMouseUpDatepicker: function (e) { + this.inFocus = false; + e.originalEvent.inFocus = true; + if (!e.originalEvent.timepickerFocus) this.$el.focus(); + }, + + _onKeyUpGeneral: function (e) { + var val = this.$el.val(); + + if (!val) { + this.clear(); + } + }, + + _onResize: function () { + if (this.visible) { + this.setPosition(); + } + }, + + _onMouseUpBody: function (e) { + if (e.originalEvent.inFocus) return; + + if (this.visible && !this.inFocus) { + this.hide(); + } + }, + + _onMouseUpEl: function (e) { + e.originalEvent.inFocus = true; + setTimeout(this._onKeyUpGeneral.bind(this),4); + }, + + _onKeyDown: function (e) { + var code = e.which; + this._registerKey(code); + + // Arrows + if (code >= 37 && code <= 40) { + e.preventDefault(); + this._focusNextCell(code); + } + + // Enter + if (code == 13) { + if (this.focused) { + if (this._getCell(this.focused).hasClass('-disabled-')) return; + if (this.view != this.opts.minView) { + this.down() + } else { + var alreadySelected = this._isSelected(this.focused, this.cellType); + + if (!alreadySelected) { + if (this.timepicker) { + this.focused.setHours(this.timepicker.hours); + this.focused.setMinutes(this.timepicker.minutes); + } + this.selectDate(this.focused); + return; + } + this._handleAlreadySelectedDates(alreadySelected, this.focused) + } + } + } + + // Esc + if (code == 27) { + this.hide(); + } + }, + + _onKeyUp: function (e) { + var code = e.which; + this._unRegisterKey(code); + }, + + _onHotKey: function (e, hotKey) { + this._handleHotKey(hotKey); + }, + + _onMouseEnterCell: function (e) { + var $cell = $(e.target).closest('.datepicker--cell'), + date = this._getDateFromCell($cell); + + // Prevent from unnecessary rendering and setting new currentDate + this.silent = true; + + if (this.focused) { + this.focused = '' + } + + $cell.addClass('-focus-'); + + this.focused = date; + this.silent = false; + + if (this.opts.range && this.selectedDates.length == 1) { + this.minRange = this.selectedDates[0]; + this.maxRange = ''; + if (datepicker.less(this.minRange, this.focused)) { + this.maxRange = this.minRange; + this.minRange = ''; + } + this.views[this.currentView]._update(); + } + }, + + _onMouseLeaveCell: function (e) { + var $cell = $(e.target).closest('.datepicker--cell'); + + $cell.removeClass('-focus-'); + + this.silent = true; + this.focused = ''; + this.silent = false; + }, + + _onTimeChange: function (e, h, m) { + var date = new Date(), + selectedDates = this.selectedDates, + selected = false; + + if (selectedDates.length) { + selected = true; + date = this.lastSelectedDate; + } + + date.setHours(h); + date.setMinutes(m); + + if (!selected && !this._getCell(date).hasClass('-disabled-')) { + this.selectDate(date); + } else { + this._setInputValue(); + if (this.opts.onSelect) { + this._triggerOnChange(); + } + } + }, + + _onClickCell: function (e, date) { + if (this.timepicker) { + date.setHours(this.timepicker.hours); + date.setMinutes(this.timepicker.minutes); + } + this.selectDate(date); + }, + + set focused(val) { + if (!val && this.focused) { + var $cell = this._getCell(this.focused); + + if ($cell.length) { + $cell.removeClass('-focus-') + } + } + this._focused = val; + if (this.opts.range && this.selectedDates.length == 1) { + this.minRange = this.selectedDates[0]; + this.maxRange = ''; + if (datepicker.less(this.minRange, this._focused)) { + this.maxRange = this.minRange; + this.minRange = ''; + } + } + if (this.silent) return; + this.date = val; + }, + + get focused() { + return this._focused; + }, + + get parsedDate() { + return datepicker.getParsedDate(this.date); + }, + + set date (val) { + if (!(val instanceof Date)) return; + + this.currentDate = val; + + if (this.inited && !this.silent) { + this.views[this.view]._render(); + this.nav._render(); + if (this.visible && this.elIsInput) { + this.setPosition(); + } + } + return val; + }, + + get date () { + return this.currentDate + }, + + set view (val) { + this.viewIndex = this.viewIndexes.indexOf(val); + + if (this.viewIndex < 0) { + return; + } + + this.prevView = this.currentView; + this.currentView = val; + + if (this.inited) { + if (!this.views[val]) { + this.views[val] = new $.fn.datepicker.Body(this, val, this.opts) + } else { + this.views[val]._render(); + } + + this.views[this.prevView].hide(); + this.views[val].show(); + this.nav._render(); + + if (this.opts.onChangeView) { + this.opts.onChangeView(val) + } + if (this.elIsInput && this.visible) this.setPosition(); + } + + return val + }, + + get view() { + return this.currentView; + }, + + get cellType() { + return this.view.substring(0, this.view.length - 1) + }, + + get minTime() { + var min = datepicker.getParsedDate(this.minDate); + return new Date(min.year, min.month, min.date).getTime() + }, + + get maxTime() { + var max = datepicker.getParsedDate(this.maxDate); + return new Date(max.year, max.month, max.date).getTime() + }, + + get curDecade() { + return datepicker.getDecade(this.date) + } + }; + + // Utils + // ------------------------------------------------- + + datepicker.getDaysCount = function (date) { + return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(); + }; + + datepicker.getParsedDate = function (date) { + return { + year: date.getFullYear(), + month: date.getMonth(), + fullMonth: (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1, // One based + date: date.getDate(), + fullDate: date.getDate() < 10 ? '0' + date.getDate() : date.getDate(), + day: date.getDay(), + hours: date.getHours(), + fullHours: date.getHours() < 10 ? '0' + date.getHours() : date.getHours() , + minutes: date.getMinutes(), + fullMinutes: date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() + } + }; + + datepicker.getDecade = function (date) { + var firstYear = Math.floor(date.getFullYear() / 10) * 10; + + return [firstYear, firstYear + 9]; + }; + + datepicker.template = function (str, data) { + return str.replace(/#\{([\w]+)\}/g, function (source, match) { + if (data[match] || data[match] === 0) { + return data[match] + } + }); + }; + + datepicker.isSame = function (date1, date2, type) { + if (!date1 || !date2) return false; + var d1 = datepicker.getParsedDate(date1), + d2 = datepicker.getParsedDate(date2), + _type = type ? type : 'day', + + conditions = { + day: d1.date == d2.date && d1.month == d2.month && d1.year == d2.year, + month: d1.month == d2.month && d1.year == d2.year, + year: d1.year == d2.year + }; + + return conditions[_type]; + }; + + datepicker.less = function (dateCompareTo, date, type) { + if (!dateCompareTo || !date) return false; + return date.getTime() < dateCompareTo.getTime(); + }; + + datepicker.bigger = function (dateCompareTo, date, type) { + if (!dateCompareTo || !date) return false; + return date.getTime() > dateCompareTo.getTime(); + }; + + datepicker.getLeadingZeroNum = function (num) { + return parseInt(num) < 10 ? '0' + num : num; + }; + + /** + * Returns copy of date with hours and minutes equals to 0 + * @param date {Date} + */ + datepicker.resetTime = function (date) { + if (typeof date != 'object') return; + date = datepicker.getParsedDate(date); + return new Date(date.year, date.month, date.date) + }; + + $.fn.datepicker = function ( options ) { + return this.each(function () { + if (!$.data(this, pluginName)) { + $.data(this, pluginName, + new Datepicker( this, options )); + } else { + var _this = $.data(this, pluginName); + + _this.opts = $.extend(true, _this.opts, options); + _this.update(); + } + }); + }; + + $.fn.datepicker.Constructor = Datepicker; + + $.fn.datepicker.language = { + ru: { + days: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'], + daysShort: ['Вос','Пон','Вто','Сре','Чет','Пят','Суб'], + daysMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], + months: ['Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'], + monthsShort: ['Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек'], + today: 'Сегодня', + clear: 'Очистить', + dateFormat: 'dd.mm.yyyy', + timeFormat: 'hh:ii', + firstDay: 1 + } + }; + + $(function () { + $(autoInitSelector).datepicker(); + }) + +})(); + +;(function () { + var templates = { + days:'' + + '
    ' + + '
    ' + + '
    ' + + '
    ', + months: '' + + '
    ' + + '
    ' + + '
    ', + years: '' + + '
    ' + + '
    ' + + '
    ' + }, + datepicker = $.fn.datepicker, + dp = datepicker.Constructor; + + datepicker.Body = function (d, type, opts) { + this.d = d; + this.type = type; + this.opts = opts; + this.$el = $(''); + + if (this.opts.onlyTimepicker) return; + this.init(); + }; + + datepicker.Body.prototype = { + init: function () { + this._buildBaseHtml(); + this._render(); + + this._bindEvents(); + }, + + _bindEvents: function () { + this.$el.on('click', '.datepicker--cell', $.proxy(this._onClickCell, this)); + }, + + _buildBaseHtml: function () { + this.$el = $(templates[this.type]).appendTo(this.d.$content); + this.$names = $('.datepicker--days-names', this.$el); + this.$cells = $('.datepicker--cells', this.$el); + }, + + _getDayNamesHtml: function (firstDay, curDay, html, i) { + curDay = curDay != undefined ? curDay : firstDay; + html = html ? html : ''; + i = i != undefined ? i : 0; + + if (i > 7) return html; + if (curDay == 7) return this._getDayNamesHtml(firstDay, 0, html, ++i); + + html += '
    ' + this.d.loc.daysMin[curDay] + '
    '; + + return this._getDayNamesHtml(firstDay, ++curDay, html, ++i); + }, + + _getCellContents: function (date, type) { + var classes = "datepicker--cell datepicker--cell-" + type, + currentDate = new Date(), + parent = this.d, + minRange = dp.resetTime(parent.minRange), + maxRange = dp.resetTime(parent.maxRange), + opts = parent.opts, + d = dp.getParsedDate(date), + render = {}, + html = d.date; + + switch (type) { + case 'day': + if (parent.isWeekend(d.day)) classes += " -weekend-"; + if (d.month != this.d.parsedDate.month) { + classes += " -other-month-"; + if (!opts.selectOtherMonths) { + classes += " -disabled-"; + } + if (!opts.showOtherMonths) html = ''; + } + break; + case 'month': + html = parent.loc[parent.opts.monthsField][d.month]; + break; + case 'year': + var decade = parent.curDecade; + html = d.year; + if (d.year < decade[0] || d.year > decade[1]) { + classes += ' -other-decade-'; + if (!opts.selectOtherYears) { + classes += " -disabled-"; + } + if (!opts.showOtherYears) html = ''; + } + break; + } + + if (opts.onRenderCell) { + render = opts.onRenderCell(date, type) || {}; + html = render.html ? render.html : html; + classes += render.classes ? ' ' + render.classes : ''; + } + + if (opts.range) { + if (dp.isSame(minRange, date, type)) classes += ' -range-from-'; + if (dp.isSame(maxRange, date, type)) classes += ' -range-to-'; + + if (parent.selectedDates.length == 1 && parent.focused) { + if ( + (dp.bigger(minRange, date) && dp.less(parent.focused, date)) || + (dp.less(maxRange, date) && dp.bigger(parent.focused, date))) + { + classes += ' -in-range-' + } + + if (dp.less(maxRange, date) && dp.isSame(parent.focused, date)) { + classes += ' -range-from-' + } + if (dp.bigger(minRange, date) && dp.isSame(parent.focused, date)) { + classes += ' -range-to-' + } + + } else if (parent.selectedDates.length == 2) { + if (dp.bigger(minRange, date) && dp.less(maxRange, date)) { + classes += ' -in-range-' + } + } + } + + + if (dp.isSame(currentDate, date, type)) classes += ' -current-'; + if (parent.focused && dp.isSame(date, parent.focused, type)) classes += ' -focus-'; + if (parent._isSelected(date, type)) classes += ' -selected-'; + if (!parent._isInRange(date, type) || render.disabled) classes += ' -disabled-'; + + return { + html: html, + classes: classes + } + }, + + /** + * Calculates days number to render. Generates days html and returns it. + * @param {object} date - Date object + * @returns {string} + * @private + */ + _getDaysHtml: function (date) { + var totalMonthDays = dp.getDaysCount(date), + firstMonthDay = new Date(date.getFullYear(), date.getMonth(), 1).getDay(), + lastMonthDay = new Date(date.getFullYear(), date.getMonth(), totalMonthDays).getDay(), + daysFromPevMonth = firstMonthDay - this.d.loc.firstDay, + daysFromNextMonth = 6 - lastMonthDay + this.d.loc.firstDay; + + daysFromPevMonth = daysFromPevMonth < 0 ? daysFromPevMonth + 7 : daysFromPevMonth; + daysFromNextMonth = daysFromNextMonth > 6 ? daysFromNextMonth - 7 : daysFromNextMonth; + + var startDayIndex = -daysFromPevMonth + 1, + m, y, + html = ''; + + for (var i = startDayIndex, max = totalMonthDays + daysFromNextMonth; i <= max; i++) { + y = date.getFullYear(); + m = date.getMonth(); + + html += this._getDayHtml(new Date(y, m, i)) + } + + return html; + }, + + _getDayHtml: function (date) { + var content = this._getCellContents(date, 'day'); + + return '
    ' + content.html + '
    '; + }, + + /** + * Generates months html + * @param {object} date - date instance + * @returns {string} + * @private + */ + _getMonthsHtml: function (date) { + var html = '', + d = dp.getParsedDate(date), + i = 0; + + while(i < 12) { + html += this._getMonthHtml(new Date(d.year, i)); + i++ + } + + return html; + }, + + _getMonthHtml: function (date) { + var content = this._getCellContents(date, 'month'); + + return '
    ' + content.html + '
    ' + }, + + _getYearsHtml: function (date) { + var d = dp.getParsedDate(date), + decade = dp.getDecade(date), + firstYear = decade[0] - 1, + html = '', + i = firstYear; + + for (i; i <= decade[1] + 1; i++) { + html += this._getYearHtml(new Date(i , 0)); + } + + return html; + }, + + _getYearHtml: function (date) { + var content = this._getCellContents(date, 'year'); + + return '
    ' + content.html + '
    ' + }, + + _renderTypes: { + days: function () { + var dayNames = this._getDayNamesHtml(this.d.loc.firstDay), + days = this._getDaysHtml(this.d.currentDate); + + this.$cells.html(days); + this.$names.html(dayNames) + }, + months: function () { + var html = this._getMonthsHtml(this.d.currentDate); + + this.$cells.html(html) + }, + years: function () { + var html = this._getYearsHtml(this.d.currentDate); + + this.$cells.html(html) + } + }, + + _render: function () { + if (this.opts.onlyTimepicker) return; + this._renderTypes[this.type].bind(this)(); + }, + + _update: function () { + var $cells = $('.datepicker--cell', this.$cells), + _this = this, + classes, + $cell, + date; + $cells.each(function (cell, i) { + $cell = $(this); + date = _this.d._getDateFromCell($(this)); + classes = _this._getCellContents(date, _this.d.cellType); + $cell.attr('class',classes.classes) + }); + }, + + show: function () { + if (this.opts.onlyTimepicker) return; + this.$el.addClass('active'); + this.acitve = true; + }, + + hide: function () { + this.$el.removeClass('active'); + this.active = false; + }, + + // Events + // ------------------------------------------------- + + _handleClick: function (el) { + var date = el.data('date') || 1, + month = el.data('month') || 0, + year = el.data('year') || this.d.parsedDate.year, + dp = this.d; + // Change view if min view does not reach yet + if (dp.view != this.opts.minView) { + dp.down(new Date(year, month, date)); + return; + } + // Select date if min view is reached + var selectedDate = new Date(year, month, date), + alreadySelected = this.d._isSelected(selectedDate, this.d.cellType); + + if (!alreadySelected) { + dp._trigger('clickCell', selectedDate); + return; + } + + dp._handleAlreadySelectedDates.bind(dp, alreadySelected, selectedDate)(); + + }, + + _onClickCell: function (e) { + var $el = $(e.target).closest('.datepicker--cell'); + + if ($el.hasClass('-disabled-')) return; + + this._handleClick.bind(this)($el); + } + }; +})(); + +;(function () { + var template = '' + + '
    #{prevHtml}
    ' + + '
    #{title}
    ' + + '
    #{nextHtml}
    ', + buttonsContainerTemplate = '
    ', + button = '#{label}', + datepicker = $.fn.datepicker, + dp = datepicker.Constructor; + + datepicker.Navigation = function (d, opts) { + this.d = d; + this.opts = opts; + + this.$buttonsContainer = ''; + + this.init(); + }; + + datepicker.Navigation.prototype = { + init: function () { + this._buildBaseHtml(); + this._bindEvents(); + }, + + _bindEvents: function () { + this.d.$nav.on('click', '.datepicker--nav-action', $.proxy(this._onClickNavButton, this)); + this.d.$nav.on('click', '.datepicker--nav-title', $.proxy(this._onClickNavTitle, this)); + this.d.$datepicker.on('click', '.datepicker--button', $.proxy(this._onClickNavButton, this)); + }, + + _buildBaseHtml: function () { + if (!this.opts.onlyTimepicker) { + this._render(); + } + this._addButtonsIfNeed(); + }, + + _addButtonsIfNeed: function () { + if (this.opts.todayButton) { + this._addButton('today') + } + if (this.opts.clearButton) { + this._addButton('clear') + } + }, + + _render: function () { + var title = this._getTitle(this.d.currentDate), + html = dp.template(template, $.extend({title: title}, this.opts)); + this.d.$nav.html(html); + if (this.d.view == 'years') { + $('.datepicker--nav-title', this.d.$nav).addClass('-disabled-'); + } + this.setNavStatus(); + }, + + _getTitle: function (date) { + return this.d.formatDate(this.opts.navTitles[this.d.view], date) + }, + + _addButton: function (type) { + if (!this.$buttonsContainer.length) { + this._addButtonsContainer(); + } + + var data = { + action: type, + label: this.d.loc[type] + }, + html = dp.template(button, data); + + if ($('[data-action=' + type + ']', this.$buttonsContainer).length) return; + this.$buttonsContainer.append(html); + }, + + _addButtonsContainer: function () { + this.d.$datepicker.append(buttonsContainerTemplate); + this.$buttonsContainer = $('.datepicker--buttons', this.d.$datepicker); + }, + + setNavStatus: function () { + if (!(this.opts.minDate || this.opts.maxDate) || !this.opts.disableNavWhenOutOfRange) return; + + var date = this.d.parsedDate, + m = date.month, + y = date.year, + d = date.date; + + switch (this.d.view) { + case 'days': + if (!this.d._isInRange(new Date(y, m-1, 1), 'month')) { + this._disableNav('prev') + } + if (!this.d._isInRange(new Date(y, m+1, 1), 'month')) { + this._disableNav('next') + } + break; + case 'months': + if (!this.d._isInRange(new Date(y-1, m, d), 'year')) { + this._disableNav('prev') + } + if (!this.d._isInRange(new Date(y+1, m, d), 'year')) { + this._disableNav('next') + } + break; + case 'years': + var decade = dp.getDecade(this.d.date); + if (!this.d._isInRange(new Date(decade[0] - 1, 0, 1), 'year')) { + this._disableNav('prev') + } + if (!this.d._isInRange(new Date(decade[1] + 1, 0, 1), 'year')) { + this._disableNav('next') + } + break; + } + }, + + _disableNav: function (nav) { + $('[data-action="' + nav + '"]', this.d.$nav).addClass('-disabled-') + }, + + _activateNav: function (nav) { + $('[data-action="' + nav + '"]', this.d.$nav).removeClass('-disabled-') + }, + + _onClickNavButton: function (e) { + var $el = $(e.target).closest('[data-action]'), + action = $el.data('action'); + + this.d[action](); + }, + + _onClickNavTitle: function (e) { + if ($(e.target).hasClass('-disabled-')) return; + + if (this.d.view == 'days') { + return this.d.view = 'months' + } + + this.d.view = 'years'; + } + } + +})(); + +;(function () { + var template = '
    ' + + '
    ' + + ' #{hourVisible}' + + ' :' + + ' #{minValue}' + + '
    ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + ' ' + + '
    ' + + '
    ' + + '
    ', + datepicker = $.fn.datepicker, + dp = datepicker.Constructor; + + datepicker.Timepicker = function (inst, opts) { + this.d = inst; + this.opts = opts; + + this.init(); + }; + + datepicker.Timepicker.prototype = { + init: function () { + var input = 'input'; + this._setTime(this.d.date); + this._buildHTML(); + + if (navigator.userAgent.match(/trident/gi)) { + input = 'change'; + } + + this.d.$el.on('selectDate', this._onSelectDate.bind(this)); + this.$ranges.on(input, this._onChangeRange.bind(this)); + this.$ranges.on('mouseup', this._onMouseUpRange.bind(this)); + this.$ranges.on('mousemove focus ', this._onMouseEnterRange.bind(this)); + this.$ranges.on('mouseout blur', this._onMouseOutRange.bind(this)); + }, + + _setTime: function (date) { + var _date = dp.getParsedDate(date); + + this._handleDate(date); + this.hours = _date.hours < this.minHours ? this.minHours : _date.hours; + this.minutes = _date.minutes < this.minMinutes ? this.minMinutes : _date.minutes; + }, + + /** + * Sets minHours and minMinutes from date (usually it's a minDate) + * Also changes minMinutes if current hours are bigger then @date hours + * @param date {Date} + * @private + */ + _setMinTimeFromDate: function (date) { + this.minHours = date.getHours(); + this.minMinutes = date.getMinutes(); + + // If, for example, min hours are 10, and current hours are 12, + // update minMinutes to default value, to be able to choose whole range of values + if (this.d.lastSelectedDate) { + if (this.d.lastSelectedDate.getHours() > date.getHours()) { + this.minMinutes = this.opts.minMinutes; + } + } + }, + + _setMaxTimeFromDate: function (date) { + this.maxHours = date.getHours(); + this.maxMinutes = date.getMinutes(); + + if (this.d.lastSelectedDate) { + if (this.d.lastSelectedDate.getHours() < date.getHours()) { + this.maxMinutes = this.opts.maxMinutes; + } + } + }, + + _setDefaultMinMaxTime: function () { + var maxHours = 23, + maxMinutes = 59, + opts = this.opts; + + this.minHours = opts.minHours < 0 || opts.minHours > maxHours ? 0 : opts.minHours; + this.minMinutes = opts.minMinutes < 0 || opts.minMinutes > maxMinutes ? 0 : opts.minMinutes; + this.maxHours = opts.maxHours < 0 || opts.maxHours > maxHours ? maxHours : opts.maxHours; + this.maxMinutes = opts.maxMinutes < 0 || opts.maxMinutes > maxMinutes ? maxMinutes : opts.maxMinutes; + }, + + /** + * Looks for min/max hours/minutes and if current values + * are out of range sets valid values. + * @private + */ + _validateHoursMinutes: function (date) { + if (this.hours < this.minHours) { + this.hours = this.minHours; + } else if (this.hours > this.maxHours) { + this.hours = this.maxHours; + } + + if (this.minutes < this.minMinutes) { + this.minutes = this.minMinutes; + } else if (this.minutes > this.maxMinutes) { + this.minutes = this.maxMinutes; + } + }, + + _buildHTML: function () { + var lz = dp.getLeadingZeroNum, + data = { + hourMin: this.minHours, + hourMax: lz(this.maxHours), + hourStep: this.opts.hoursStep, + hourValue: this.hours, + hourVisible: lz(this.displayHours), + minMin: this.minMinutes, + minMax: lz(this.maxMinutes), + minStep: this.opts.minutesStep, + minValue: lz(this.minutes) + }, + _template = dp.template(template, data); + + this.$timepicker = $(_template).appendTo(this.d.$datepicker); + this.$ranges = $('[type="range"]', this.$timepicker); + this.$hours = $('[name="hours"]', this.$timepicker); + this.$minutes = $('[name="minutes"]', this.$timepicker); + this.$hoursText = $('.datepicker--time-current-hours', this.$timepicker); + this.$minutesText = $('.datepicker--time-current-minutes', this.$timepicker); + + if (this.d.ampm) { + this.$ampm = $('') + .appendTo($('.datepicker--time-current', this.$timepicker)) + .html(this.dayPeriod); + + this.$timepicker.addClass('-am-pm-'); + } + }, + + _updateCurrentTime: function () { + var h = dp.getLeadingZeroNum(this.displayHours), + m = dp.getLeadingZeroNum(this.minutes); + + this.$hoursText.html(h); + this.$minutesText.html(m); + + if (this.d.ampm) { + this.$ampm.html(this.dayPeriod); + } + }, + + _updateRanges: function () { + this.$hours.attr({ + min: this.minHours, + max: this.maxHours + }).val(this.hours); + + this.$minutes.attr({ + min: this.minMinutes, + max: this.maxMinutes + }).val(this.minutes) + }, + + /** + * Sets minHours, minMinutes etc. from date. If date is not passed, than sets + * values from options + * @param [date] {object} - Date object, to get values from + * @private + */ + _handleDate: function (date) { + this._setDefaultMinMaxTime(); + if (date) { + if (dp.isSame(date, this.d.opts.minDate)) { + this._setMinTimeFromDate(this.d.opts.minDate); + } else if (dp.isSame(date, this.d.opts.maxDate)) { + this._setMaxTimeFromDate(this.d.opts.maxDate); + } + } + + this._validateHoursMinutes(date); + }, + + update: function () { + this._updateRanges(); + this._updateCurrentTime(); + }, + + /** + * Calculates valid hour value to display in text input and datepicker's body. + * @param date {Date|Number} - date or hours + * @param [ampm] {Boolean} - 12 hours mode + * @returns {{hours: *, dayPeriod: string}} + * @private + */ + _getValidHoursFromDate: function (date, ampm) { + var d = date, + hours = date; + + if (date instanceof Date) { + d = dp.getParsedDate(date); + hours = d.hours; + } + + var _ampm = ampm || this.d.ampm, + dayPeriod = 'am'; + + if (_ampm) { + switch(true) { + case hours == 0: + hours = 12; + break; + case hours == 12: + dayPeriod = 'pm'; + break; + case hours > 11: + hours = hours - 12; + dayPeriod = 'pm'; + break; + default: + break; + } + } + + return { + hours: hours, + dayPeriod: dayPeriod + } + }, + + set hours (val) { + this._hours = val; + + var displayHours = this._getValidHoursFromDate(val); + + this.displayHours = displayHours.hours; + this.dayPeriod = displayHours.dayPeriod; + }, + + get hours() { + return this._hours; + }, + + // Events + // ------------------------------------------------- + + _onChangeRange: function (e) { + var $target = $(e.target), + name = $target.attr('name'); + + this.d.timepickerIsActive = true; + + this[name] = $target.val(); + this._updateCurrentTime(); + this.d._trigger('timeChange', [this.hours, this.minutes]); + + this._handleDate(this.d.lastSelectedDate); + this.update() + }, + + _onSelectDate: function (e, data) { + this._handleDate(data); + this.update(); + }, + + _onMouseEnterRange: function (e) { + var name = $(e.target).attr('name'); + $('.datepicker--time-current-' + name, this.$timepicker).addClass('-focus-'); + }, + + _onMouseOutRange: function (e) { + var name = $(e.target).attr('name'); + if (this.d.inFocus) return; // Prevent removing focus when mouse out of range slider + $('.datepicker--time-current-' + name, this.$timepicker).removeClass('-focus-'); + }, + + _onMouseUpRange: function (e) { + this.d.timepickerIsActive = false; + } + }; +})(); + })(window, jQuery); \ No newline at end of file diff --git a/src/main/webapp/resources/js/datepicker.ko.js b/src/main/webapp/resources/js/datepicker.ko.js new file mode 100644 index 0000000..c56ed23 --- /dev/null +++ b/src/main/webapp/resources/js/datepicker.ko.js @@ -0,0 +1,12 @@ +;(function ($) { $.fn.datepicker.language['ko'] = { + days: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'], + daysShort: ['일', '월', '화', '수', '목', '금', '토'], + daysMin: ['일', '월', '화', '수', '목', '금', '토'], + months: ['1월','2월','3월','4월','5월','6월', '7월','8월','9월','10월','11월','12월'], + monthsShort: ['1월','2월','3월','4월','5월','6월', '7월','8월','9월','10월','11월','12월'], + today: '오늘', + clear: 'Clear', + dateFormat: 'yyyy/mm/dd', + timeFormat: 'hh:ii aa', + firstDay: 0 +}; })(jQuery); \ No newline at end of file diff --git a/src/main/webapp/resources/js/datepicker.min.js b/src/main/webapp/resources/js/datepicker.min.js new file mode 100644 index 0000000..31537f1 --- /dev/null +++ b/src/main/webapp/resources/js/datepicker.min.js @@ -0,0 +1,2 @@ +!function(t,e,i){!function(){var s,a,n,h="2.2.3",o="datepicker",r=".datepicker-here",c=!1,d='
    ',l={classes:"",inline:!1,language:"ru",startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"@",toggleSelected:!0,keyboardNav:!0,position:"bottom left",offset:12,view:"days",minView:"days",showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:",",range:!1,todayButton:!1,clearButton:!1,showEvent:"focus",autoClose:!1,monthsField:"monthsShort",prevHtml:'',nextHtml:'',navTitles:{days:"MM, yyyy",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:"",onShow:"",onHide:"",onChangeMonth:"",onChangeYear:"",onChangeDecade:"",onChangeView:"",onRenderCell:""},u={ctrlRight:[17,39],ctrlUp:[17,38],ctrlLeft:[17,37],ctrlDown:[17,40],shiftRight:[16,39],shiftUp:[16,38],shiftLeft:[16,37],shiftDown:[16,40],altUp:[18,38],altRight:[18,39],altLeft:[18,37],altDown:[18,40],ctrlShiftUp:[16,17,38]},m=function(t,a){this.el=t,this.$el=e(t),this.opts=e.extend(!0,{},l,a,this.$el.data()),s==i&&(s=e("body")),this.opts.startDate||(this.opts.startDate=new Date),"INPUT"==this.el.nodeName&&(this.elIsInput=!0),this.opts.altField&&(this.$altField="string"==typeof this.opts.altField?e(this.opts.altField):this.opts.altField),this.inited=!1,this.visible=!1,this.silent=!1,this.currentDate=this.opts.startDate,this.currentView=this.opts.view,this._createShortCuts(),this.selectedDates=[],this.views={},this.keys=[],this.minRange="",this.maxRange="",this._prevOnSelectValue="",this.init()};n=m,n.prototype={VERSION:h,viewIndexes:["days","months","years"],init:function(){c||this.opts.inline||!this.elIsInput||this._buildDatepickersContainer(),this._buildBaseHtml(),this._defineLocale(this.opts.language),this._syncWithMinMaxDates(),this.elIsInput&&(this.opts.inline||(this._setPositionClasses(this.opts.position),this._bindEvents()),this.opts.keyboardNav&&!this.opts.onlyTimepicker&&this._bindKeyboardEvents(),this.$datepicker.on("mousedown",this._onMouseDownDatepicker.bind(this)),this.$datepicker.on("mouseup",this._onMouseUpDatepicker.bind(this))),this.opts.classes&&this.$datepicker.addClass(this.opts.classes),this.opts.timepicker&&(this.timepicker=new e.fn.datepicker.Timepicker(this,this.opts),this._bindTimepickerEvents()),this.opts.onlyTimepicker&&this.$datepicker.addClass("-only-timepicker-"),this.views[this.currentView]=new e.fn.datepicker.Body(this,this.currentView,this.opts),this.views[this.currentView].show(),this.nav=new e.fn.datepicker.Navigation(this,this.opts),this.view=this.currentView,this.$el.on("clickCell.adp",this._onClickCell.bind(this)),this.$datepicker.on("mouseenter",".datepicker--cell",this._onMouseEnterCell.bind(this)),this.$datepicker.on("mouseleave",".datepicker--cell",this._onMouseLeaveCell.bind(this)),this.inited=!0},_createShortCuts:function(){this.minDate=this.opts.minDate?this.opts.minDate:new Date(-86399999136e5),this.maxDate=this.opts.maxDate?this.opts.maxDate:new Date(86399999136e5)},_bindEvents:function(){this.$el.on(this.opts.showEvent+".adp",this._onShowEvent.bind(this)),this.$el.on("mouseup.adp",this._onMouseUpEl.bind(this)),this.$el.on("blur.adp",this._onBlur.bind(this)),this.$el.on("keyup.adp",this._onKeyUpGeneral.bind(this)),e(t).on("resize.adp",this._onResize.bind(this)),e("body").on("mouseup.adp",this._onMouseUpBody.bind(this))},_bindKeyboardEvents:function(){this.$el.on("keydown.adp",this._onKeyDown.bind(this)),this.$el.on("keyup.adp",this._onKeyUp.bind(this)),this.$el.on("hotKey.adp",this._onHotKey.bind(this))},_bindTimepickerEvents:function(){this.$el.on("timeChange.adp",this._onTimeChange.bind(this))},isWeekend:function(t){return-1!==this.opts.weekends.indexOf(t)},_defineLocale:function(t){"string"==typeof t?(this.loc=e.fn.datepicker.language[t],this.loc||(console.warn("Can't find language \""+t+'" in Datepicker.language, will use "ru" instead'),this.loc=e.extend(!0,{},e.fn.datepicker.language.ru)),this.loc=e.extend(!0,{},e.fn.datepicker.language.ru,e.fn.datepicker.language[t])):this.loc=e.extend(!0,{},e.fn.datepicker.language.ru,t),this.opts.dateFormat&&(this.loc.dateFormat=this.opts.dateFormat),this.opts.timeFormat&&(this.loc.timeFormat=this.opts.timeFormat),""!==this.opts.firstDay&&(this.loc.firstDay=this.opts.firstDay),this.opts.timepicker&&(this.loc.dateFormat=[this.loc.dateFormat,this.loc.timeFormat].join(this.opts.dateTimeSeparator)),this.opts.onlyTimepicker&&(this.loc.dateFormat=this.loc.timeFormat);var i=this._getWordBoundaryRegExp;(this.loc.timeFormat.match(i("aa"))||this.loc.timeFormat.match(i("AA")))&&(this.ampm=!0)},_buildDatepickersContainer:function(){c=!0,s.append('
    '),a=e("#datepickers-container")},_buildBaseHtml:function(){var t,i=e('
    ');t="INPUT"==this.el.nodeName?this.opts.inline?i.insertAfter(this.$el):a:i.appendTo(this.$el),this.$datepicker=e(d).appendTo(t),this.$content=e(".datepicker--content",this.$datepicker),this.$nav=e(".datepicker--nav",this.$datepicker)},_triggerOnChange:function(){if(!this.selectedDates.length){if(""===this._prevOnSelectValue)return;return this._prevOnSelectValue="",this.opts.onSelect("","",this)}var t,e=this.selectedDates,i=n.getParsedDate(e[0]),s=this,a=new Date(i.year,i.month,i.date,i.hours,i.minutes);t=e.map(function(t){return s.formatDate(s.loc.dateFormat,t)}).join(this.opts.multipleDatesSeparator),(this.opts.multipleDates||this.opts.range)&&(a=e.map(function(t){var e=n.getParsedDate(t);return new Date(e.year,e.month,e.date,e.hours,e.minutes)})),this._prevOnSelectValue=t,this.opts.onSelect(t,a,this)},next:function(){var t=this.parsedDate,e=this.opts;switch(this.view){case"days":this.date=new Date(t.year,t.month+1,1),e.onChangeMonth&&e.onChangeMonth(this.parsedDate.month,this.parsedDate.year);break;case"months":this.date=new Date(t.year+1,t.month,1),e.onChangeYear&&e.onChangeYear(this.parsedDate.year);break;case"years":this.date=new Date(t.year+10,0,1),e.onChangeDecade&&e.onChangeDecade(this.curDecade)}},prev:function(){var t=this.parsedDate,e=this.opts;switch(this.view){case"days":this.date=new Date(t.year,t.month-1,1),e.onChangeMonth&&e.onChangeMonth(this.parsedDate.month,this.parsedDate.year);break;case"months":this.date=new Date(t.year-1,t.month,1),e.onChangeYear&&e.onChangeYear(this.parsedDate.year);break;case"years":this.date=new Date(t.year-10,0,1),e.onChangeDecade&&e.onChangeDecade(this.curDecade)}},formatDate:function(t,e){e=e||this.date;var i,s=t,a=this._getWordBoundaryRegExp,h=this.loc,o=n.getLeadingZeroNum,r=n.getDecade(e),c=n.getParsedDate(e),d=c.fullHours,l=c.hours,u=t.match(a("aa"))||t.match(a("AA")),m="am",p=this._replacer;switch(this.opts.timepicker&&this.timepicker&&u&&(i=this.timepicker._getValidHoursFromDate(e,u),d=o(i.hours),l=i.hours,m=i.dayPeriod),!0){case/@/.test(s):s=s.replace(/@/,e.getTime());case/aa/.test(s):s=p(s,a("aa"),m);case/AA/.test(s):s=p(s,a("AA"),m.toUpperCase());case/dd/.test(s):s=p(s,a("dd"),c.fullDate);case/d/.test(s):s=p(s,a("d"),c.date);case/DD/.test(s):s=p(s,a("DD"),h.days[c.day]);case/D/.test(s):s=p(s,a("D"),h.daysShort[c.day]);case/mm/.test(s):s=p(s,a("mm"),c.fullMonth);case/m/.test(s):s=p(s,a("m"),c.month+1);case/MM/.test(s):s=p(s,a("MM"),this.loc.months[c.month]);case/M/.test(s):s=p(s,a("M"),h.monthsShort[c.month]);case/ii/.test(s):s=p(s,a("ii"),c.fullMinutes);case/i/.test(s):s=p(s,a("i"),c.minutes);case/hh/.test(s):s=p(s,a("hh"),d);case/h/.test(s):s=p(s,a("h"),l);case/yyyy/.test(s):s=p(s,a("yyyy"),c.year);case/yyyy1/.test(s):s=p(s,a("yyyy1"),r[0]);case/yyyy2/.test(s):s=p(s,a("yyyy2"),r[1]);case/yy/.test(s):s=p(s,a("yy"),c.year.toString().slice(-2))}return s},_replacer:function(t,e,i){return t.replace(e,function(t,e,s,a){return e+i+a})},_getWordBoundaryRegExp:function(t){var e="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+e+")("+t+")($|<|"+e+")","g")},selectDate:function(t){var e=this,i=e.opts,s=e.parsedDate,a=e.selectedDates,h=a.length,o="";if(Array.isArray(t))return void t.forEach(function(t){e.selectDate(t)});if(t instanceof Date){if(this.lastSelectedDate=t,this.timepicker&&this.timepicker._setTime(t),e._trigger("selectDate",t),this.timepicker&&(t.setHours(this.timepicker.hours),t.setMinutes(this.timepicker.minutes)),"days"==e.view&&t.getMonth()!=s.month&&i.moveToOtherMonthsOnSelect&&(o=new Date(t.getFullYear(),t.getMonth(),1)),"years"==e.view&&t.getFullYear()!=s.year&&i.moveToOtherYearsOnSelect&&(o=new Date(t.getFullYear(),0,1)),o&&(e.silent=!0,e.date=o,e.silent=!1,e.nav._render()),i.multipleDates&&!i.range){if(h===i.multipleDates)return;e._isSelected(t)||e.selectedDates.push(t)}else i.range?2==h?(e.selectedDates=[t],e.minRange=t,e.maxRange=""):1==h?(e.selectedDates.push(t),e.maxRange?e.minRange=t:e.maxRange=t,n.bigger(e.maxRange,e.minRange)&&(e.maxRange=e.minRange,e.minRange=t),e.selectedDates=[e.minRange,e.maxRange]):(e.selectedDates=[t],e.minRange=t):e.selectedDates=[t];e._setInputValue(),i.onSelect&&e._triggerOnChange(),i.autoClose&&!this.timepickerIsActive&&(i.multipleDates||i.range?i.range&&2==e.selectedDates.length&&e.hide():e.hide()),e.views[this.currentView]._render()}},removeDate:function(t){var e=this.selectedDates,i=this;if(t instanceof Date)return e.some(function(s,a){return n.isSame(s,t)?(e.splice(a,1),i.selectedDates.length?i.lastSelectedDate=i.selectedDates[i.selectedDates.length-1]:(i.minRange="",i.maxRange="",i.lastSelectedDate=""),i.views[i.currentView]._render(),i._setInputValue(),i.opts.onSelect&&i._triggerOnChange(),!0):void 0})},today:function(){this.silent=!0,this.view=this.opts.minView,this.silent=!1,this.date=new Date,this.opts.todayButton instanceof Date&&this.selectDate(this.opts.todayButton)},clear:function(){this.selectedDates=[],this.minRange="",this.maxRange="",this.views[this.currentView]._render(),this._setInputValue(),this.opts.onSelect&&this._triggerOnChange()},update:function(t,i){var s=arguments.length,a=this.lastSelectedDate;return 2==s?this.opts[t]=i:1==s&&"object"==typeof t&&(this.opts=e.extend(!0,this.opts,t)),this._createShortCuts(),this._syncWithMinMaxDates(),this._defineLocale(this.opts.language),this.nav._addButtonsIfNeed(),this.opts.onlyTimepicker||this.nav._render(),this.views[this.currentView]._render(),this.elIsInput&&!this.opts.inline&&(this._setPositionClasses(this.opts.position),this.visible&&this.setPosition(this.opts.position)),this.opts.classes&&this.$datepicker.addClass(this.opts.classes),this.opts.onlyTimepicker&&this.$datepicker.addClass("-only-timepicker-"),this.opts.timepicker&&(a&&this.timepicker._handleDate(a),this.timepicker._updateRanges(),this.timepicker._updateCurrentTime(),a&&(a.setHours(this.timepicker.hours),a.setMinutes(this.timepicker.minutes))),this._setInputValue(),this},_syncWithMinMaxDates:function(){var t=this.date.getTime();this.silent=!0,this.minTime>t&&(this.date=this.minDate),this.maxTime=this.minTime&&i<=this.maxTime,month:o>=this.minTime&&r<=this.maxTime,year:s.year>=a.year&&s.year<=h.year};return e?c[e]:c.day},_getDimensions:function(t){var e=t.offset();return{width:t.outerWidth(),height:t.outerHeight(),left:e.left,top:e.top}},_getDateFromCell:function(t){var e=this.parsedDate,s=t.data("year")||e.year,a=t.data("month")==i?e.month:t.data("month"),n=t.data("date")||1;return new Date(s,a,n)},_setPositionClasses:function(t){t=t.split(" ");var e=t[0],i=t[1],s="datepicker -"+e+"-"+i+"- -from-"+e+"-";this.visible&&(s+=" active"),this.$datepicker.removeAttr("class").addClass(s)},setPosition:function(t){t=t||this.opts.position;var e,i,s=this._getDimensions(this.$el),a=this._getDimensions(this.$datepicker),n=t.split(" "),h=this.opts.offset,o=n[0],r=n[1];switch(o){case"top":e=s.top-a.height-h;break;case"right":i=s.left+s.width+h;break;case"bottom":e=s.top+s.height+h;break;case"left":i=s.left-a.width-h}switch(r){case"top":e=s.top;break;case"right":i=s.left+s.width-a.width;break;case"bottom":e=s.top+s.height-a.height;break;case"left":i=s.left;break;case"center":/left|right/.test(o)?e=s.top+s.height/2-a.height/2:i=s.left+s.width/2-a.width/2}this.$datepicker.css({left:i,top:e})},show:function(){var t=this.opts.onShow;this.setPosition(this.opts.position),this.$datepicker.addClass("active"),this.visible=!0,t&&this._bindVisionEvents(t)},hide:function(){var t=this.opts.onHide;this.$datepicker.removeClass("active").css({left:"-100000px"}),this.focused="",this.keys=[],this.inFocus=!1,this.visible=!1,this.$el.blur(),t&&this._bindVisionEvents(t)},down:function(t){this._changeView(t,"down")},up:function(t){this._changeView(t,"up")},_bindVisionEvents:function(t){this.$datepicker.off("transitionend.dp"),t(this,!1),this.$datepicker.one("transitionend.dp",t.bind(this,this,!0))},_changeView:function(t,e){t=t||this.focused||this.date;var i="up"==e?this.viewIndex+1:this.viewIndex-1;i>2&&(i=2),0>i&&(i=0),this.silent=!0,this.date=new Date(t.getFullYear(),t.getMonth(),1),this.silent=!1,this.view=this.viewIndexes[i]},_handleHotKey:function(t){var e,i,s,a=n.getParsedDate(this._getFocusedDate()),h=this.opts,o=!1,r=!1,c=!1,d=a.year,l=a.month,u=a.date;switch(t){case"ctrlRight":case"ctrlUp":l+=1,o=!0;break;case"ctrlLeft":case"ctrlDown":l-=1,o=!0;break;case"shiftRight":case"shiftUp":r=!0,d+=1;break;case"shiftLeft":case"shiftDown":r=!0,d-=1;break;case"altRight":case"altUp":c=!0,d+=10;break;case"altLeft":case"altDown":c=!0,d-=10;break;case"ctrlShiftUp":this.up()}s=n.getDaysCount(new Date(d,l)),i=new Date(d,l,u),u>s&&(u=s),i.getTime()this.maxTime&&(i=this.maxDate),this.focused=i,e=n.getParsedDate(i),o&&h.onChangeMonth&&h.onChangeMonth(e.month,e.year),r&&h.onChangeYear&&h.onChangeYear(e.year),c&&h.onChangeDecade&&h.onChangeDecade(this.curDecade)},_registerKey:function(t){var e=this.keys.some(function(e){return e==t});e||this.keys.push(t)},_unRegisterKey:function(t){var e=this.keys.indexOf(t);this.keys.splice(e,1)},_isHotKeyPressed:function(){var t,e=!1,i=this,s=this.keys.sort();for(var a in u)t=u[a],s.length==t.length&&t.every(function(t,e){return t==s[e]})&&(i._trigger("hotKey",a),e=!0);return e},_trigger:function(t,e){this.$el.trigger(t,e)},_focusNextCell:function(t,e){e=e||this.cellType;var i=n.getParsedDate(this._getFocusedDate()),s=i.year,a=i.month,h=i.date;if(!this._isHotKeyPressed()){switch(t){case 37:"day"==e?h-=1:"","month"==e?a-=1:"","year"==e?s-=1:"";break;case 38:"day"==e?h-=7:"","month"==e?a-=3:"","year"==e?s-=4:"";break;case 39:"day"==e?h+=1:"","month"==e?a+=1:"","year"==e?s+=1:"";break;case 40:"day"==e?h+=7:"","month"==e?a+=3:"","year"==e?s+=4:""}var o=new Date(s,a,h);o.getTime()this.maxTime&&(o=this.maxDate),this.focused=o}},_getFocusedDate:function(){var t=this.focused||this.selectedDates[this.selectedDates.length-1],e=this.parsedDate;if(!t)switch(this.view){case"days":t=new Date(e.year,e.month,(new Date).getDate());break;case"months":t=new Date(e.year,e.month,1);break;case"years":t=new Date(e.year,0,1)}return t},_getCell:function(t,i){i=i||this.cellType;var s,a=n.getParsedDate(t),h='.datepicker--cell[data-year="'+a.year+'"]';switch(i){case"month":h='[data-month="'+a.month+'"]';break;case"day":h+='[data-month="'+a.month+'"][data-date="'+a.date+'"]'}return s=this.views[this.currentView].$el.find(h),s.length?s:e("")},destroy:function(){var t=this;t.$el.off(".adp").data("datepicker",""),t.selectedDates=[],t.focused="",t.views={},t.keys=[],t.minRange="",t.maxRange="",t.opts.inline||!t.elIsInput?t.$datepicker.closest(".datepicker-inline").remove():t.$datepicker.remove()},_handleAlreadySelectedDates:function(t,e){this.opts.range?this.opts.toggleSelected?this.removeDate(e):2!=this.selectedDates.length&&this._trigger("clickCell",e):this.opts.toggleSelected&&this.removeDate(e),this.opts.toggleSelected||(this.lastSelectedDate=t,this.opts.timepicker&&(this.timepicker._setTime(t),this.timepicker.update()))},_onShowEvent:function(t){this.visible||this.show()},_onBlur:function(){!this.inFocus&&this.visible&&this.hide()},_onMouseDownDatepicker:function(t){this.inFocus=!0},_onMouseUpDatepicker:function(t){this.inFocus=!1,t.originalEvent.inFocus=!0,t.originalEvent.timepickerFocus||this.$el.focus()},_onKeyUpGeneral:function(t){var e=this.$el.val();e||this.clear()},_onResize:function(){this.visible&&this.setPosition()},_onMouseUpBody:function(t){t.originalEvent.inFocus||this.visible&&!this.inFocus&&this.hide()},_onMouseUpEl:function(t){t.originalEvent.inFocus=!0,setTimeout(this._onKeyUpGeneral.bind(this),4)},_onKeyDown:function(t){var e=t.which;if(this._registerKey(e),e>=37&&40>=e&&(t.preventDefault(),this._focusNextCell(e)),13==e&&this.focused){if(this._getCell(this.focused).hasClass("-disabled-"))return;if(this.view!=this.opts.minView)this.down();else{var i=this._isSelected(this.focused,this.cellType);if(!i)return this.timepicker&&(this.focused.setHours(this.timepicker.hours),this.focused.setMinutes(this.timepicker.minutes)),void this.selectDate(this.focused);this._handleAlreadySelectedDates(i,this.focused)}}27==e&&this.hide()},_onKeyUp:function(t){var e=t.which;this._unRegisterKey(e)},_onHotKey:function(t,e){this._handleHotKey(e)},_onMouseEnterCell:function(t){var i=e(t.target).closest(".datepicker--cell"),s=this._getDateFromCell(i);this.silent=!0,this.focused&&(this.focused=""),i.addClass("-focus-"),this.focused=s,this.silent=!1,this.opts.range&&1==this.selectedDates.length&&(this.minRange=this.selectedDates[0],this.maxRange="",n.less(this.minRange,this.focused)&&(this.maxRange=this.minRange,this.minRange=""),this.views[this.currentView]._update())},_onMouseLeaveCell:function(t){var i=e(t.target).closest(".datepicker--cell");i.removeClass("-focus-"),this.silent=!0,this.focused="",this.silent=!1},_onTimeChange:function(t,e,i){var s=new Date,a=this.selectedDates,n=!1;a.length&&(n=!0,s=this.lastSelectedDate),s.setHours(e),s.setMinutes(i),n||this._getCell(s).hasClass("-disabled-")?(this._setInputValue(),this.opts.onSelect&&this._triggerOnChange()):this.selectDate(s)},_onClickCell:function(t,e){this.timepicker&&(e.setHours(this.timepicker.hours),e.setMinutes(this.timepicker.minutes)),this.selectDate(e)},set focused(t){if(!t&&this.focused){var e=this._getCell(this.focused);e.length&&e.removeClass("-focus-")}this._focused=t,this.opts.range&&1==this.selectedDates.length&&(this.minRange=this.selectedDates[0],this.maxRange="",n.less(this.minRange,this._focused)&&(this.maxRange=this.minRange,this.minRange="")),this.silent||(this.date=t)},get focused(){return this._focused},get parsedDate(){return n.getParsedDate(this.date)},set date(t){return t instanceof Date?(this.currentDate=t,this.inited&&!this.silent&&(this.views[this.view]._render(),this.nav._render(),this.visible&&this.elIsInput&&this.setPosition()),t):void 0},get date(){return this.currentDate},set view(t){return this.viewIndex=this.viewIndexes.indexOf(t),this.viewIndex<0?void 0:(this.prevView=this.currentView,this.currentView=t,this.inited&&(this.views[t]?this.views[t]._render():this.views[t]=new e.fn.datepicker.Body(this,t,this.opts),this.views[this.prevView].hide(),this.views[t].show(),this.nav._render(),this.opts.onChangeView&&this.opts.onChangeView(t),this.elIsInput&&this.visible&&this.setPosition()),t)},get view(){return this.currentView},get cellType(){return this.view.substring(0,this.view.length-1)},get minTime(){var t=n.getParsedDate(this.minDate);return new Date(t.year,t.month,t.date).getTime()},get maxTime(){var t=n.getParsedDate(this.maxDate);return new Date(t.year,t.month,t.date).getTime()},get curDecade(){return n.getDecade(this.date)}},n.getDaysCount=function(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},n.getParsedDate=function(t){return{year:t.getFullYear(),month:t.getMonth(),fullMonth:t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,date:t.getDate(),fullDate:t.getDate()<10?"0"+t.getDate():t.getDate(),day:t.getDay(),hours:t.getHours(),fullHours:t.getHours()<10?"0"+t.getHours():t.getHours(),minutes:t.getMinutes(),fullMinutes:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes()}},n.getDecade=function(t){var e=10*Math.floor(t.getFullYear()/10);return[e,e+9]},n.template=function(t,e){return t.replace(/#\{([\w]+)\}/g,function(t,i){return e[i]||0===e[i]?e[i]:void 0})},n.isSame=function(t,e,i){if(!t||!e)return!1;var s=n.getParsedDate(t),a=n.getParsedDate(e),h=i?i:"day",o={day:s.date==a.date&&s.month==a.month&&s.year==a.year,month:s.month==a.month&&s.year==a.year,year:s.year==a.year};return o[h]},n.less=function(t,e,i){return t&&e?e.getTime()t.getTime():!1},n.getLeadingZeroNum=function(t){return parseInt(t)<10?"0"+t:t},n.resetTime=function(t){return"object"==typeof t?(t=n.getParsedDate(t),new Date(t.year,t.month,t.date)):void 0},e.fn.datepicker=function(t){return this.each(function(){if(e.data(this,o)){var i=e.data(this,o);i.opts=e.extend(!0,i.opts,t),i.update()}else e.data(this,o,new m(this,t))})},e.fn.datepicker.Constructor=m,e.fn.datepicker.language={ru:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.mm.yyyy",timeFormat:"hh:ii",firstDay:1}},e(function(){e(r).datepicker()})}(),function(){var t={days:'
    ',months:'
    ',years:'
    '},s=e.fn.datepicker,a=s.Constructor;s.Body=function(t,i,s){this.d=t,this.type=i,this.opts=s,this.$el=e(""),this.opts.onlyTimepicker||this.init()},s.Body.prototype={init:function(){this._buildBaseHtml(),this._render(),this._bindEvents()},_bindEvents:function(){this.$el.on("click",".datepicker--cell",e.proxy(this._onClickCell,this))},_buildBaseHtml:function(){this.$el=e(t[this.type]).appendTo(this.d.$content),this.$names=e(".datepicker--days-names",this.$el),this.$cells=e(".datepicker--cells",this.$el)},_getDayNamesHtml:function(t,e,s,a){return e=e!=i?e:t,s=s?s:"",a=a!=i?a:0,a>7?s:7==e?this._getDayNamesHtml(t,0,s,++a):(s+='
    '+this.d.loc.daysMin[e]+"
    ",this._getDayNamesHtml(t,++e,s,++a))},_getCellContents:function(t,e){var i="datepicker--cell datepicker--cell-"+e,s=new Date,n=this.d,h=a.resetTime(n.minRange),o=a.resetTime(n.maxRange),r=n.opts,c=a.getParsedDate(t),d={},l=c.date;switch(e){case"day":n.isWeekend(c.day)&&(i+=" -weekend-"),c.month!=this.d.parsedDate.month&&(i+=" -other-month-",r.selectOtherMonths||(i+=" -disabled-"),r.showOtherMonths||(l=""));break;case"month":l=n.loc[n.opts.monthsField][c.month];break;case"year":var u=n.curDecade;l=c.year,(c.yearu[1])&&(i+=" -other-decade-",r.selectOtherYears||(i+=" -disabled-"),r.showOtherYears||(l=""))}return r.onRenderCell&&(d=r.onRenderCell(t,e)||{},l=d.html?d.html:l,i+=d.classes?" "+d.classes:""),r.range&&(a.isSame(h,t,e)&&(i+=" -range-from-"),a.isSame(o,t,e)&&(i+=" -range-to-"),1==n.selectedDates.length&&n.focused?((a.bigger(h,t)&&a.less(n.focused,t)||a.less(o,t)&&a.bigger(n.focused,t))&&(i+=" -in-range-"),a.less(o,t)&&a.isSame(n.focused,t)&&(i+=" -range-from-"),a.bigger(h,t)&&a.isSame(n.focused,t)&&(i+=" -range-to-")):2==n.selectedDates.length&&a.bigger(h,t)&&a.less(o,t)&&(i+=" -in-range-")),a.isSame(s,t,e)&&(i+=" -current-"),n.focused&&a.isSame(t,n.focused,e)&&(i+=" -focus-"),n._isSelected(t,e)&&(i+=" -selected-"),(!n._isInRange(t,e)||d.disabled)&&(i+=" -disabled-"),{html:l,classes:i}},_getDaysHtml:function(t){var e=a.getDaysCount(t),i=new Date(t.getFullYear(),t.getMonth(),1).getDay(),s=new Date(t.getFullYear(),t.getMonth(),e).getDay(),n=i-this.d.loc.firstDay,h=6-s+this.d.loc.firstDay;n=0>n?n+7:n,h=h>6?h-7:h;for(var o,r,c=-n+1,d="",l=c,u=e+h;u>=l;l++)r=t.getFullYear(),o=t.getMonth(),d+=this._getDayHtml(new Date(r,o,l));return d},_getDayHtml:function(t){var e=this._getCellContents(t,"day");return'
    '+e.html+"
    "},_getMonthsHtml:function(t){for(var e="",i=a.getParsedDate(t),s=0;12>s;)e+=this._getMonthHtml(new Date(i.year,s)),s++;return e},_getMonthHtml:function(t){var e=this._getCellContents(t,"month");return'
    '+e.html+"
    "},_getYearsHtml:function(t){var e=(a.getParsedDate(t),a.getDecade(t)),i=e[0]-1,s="",n=i;for(n;n<=e[1]+1;n++)s+=this._getYearHtml(new Date(n,0));return s},_getYearHtml:function(t){var e=this._getCellContents(t,"year");return'
    '+e.html+"
    "},_renderTypes:{days:function(){var t=this._getDayNamesHtml(this.d.loc.firstDay),e=this._getDaysHtml(this.d.currentDate);this.$cells.html(e),this.$names.html(t)},months:function(){var t=this._getMonthsHtml(this.d.currentDate);this.$cells.html(t)},years:function(){var t=this._getYearsHtml(this.d.currentDate);this.$cells.html(t)}},_render:function(){this.opts.onlyTimepicker||this._renderTypes[this.type].bind(this)()},_update:function(){var t,i,s,a=e(".datepicker--cell",this.$cells),n=this;a.each(function(a,h){i=e(this),s=n.d._getDateFromCell(e(this)),t=n._getCellContents(s,n.d.cellType),i.attr("class",t.classes)})},show:function(){this.opts.onlyTimepicker||(this.$el.addClass("active"),this.acitve=!0)},hide:function(){this.$el.removeClass("active"),this.active=!1},_handleClick:function(t){var e=t.data("date")||1,i=t.data("month")||0,s=t.data("year")||this.d.parsedDate.year,a=this.d;if(a.view!=this.opts.minView)return void a.down(new Date(s,i,e));var n=new Date(s,i,e),h=this.d._isSelected(n,this.d.cellType);return h?void a._handleAlreadySelectedDates.bind(a,h,n)():void a._trigger("clickCell",n)},_onClickCell:function(t){var i=e(t.target).closest(".datepicker--cell");i.hasClass("-disabled-")||this._handleClick.bind(this)(i)}}}(),function(){var t='
    #{prevHtml}
    #{title}
    #{nextHtml}
    ',i='
    ',s='#{label}',a=e.fn.datepicker,n=a.Constructor;a.Navigation=function(t,e){this.d=t,this.opts=e,this.$buttonsContainer="",this.init()},a.Navigation.prototype={init:function(){this._buildBaseHtml(),this._bindEvents()},_bindEvents:function(){this.d.$nav.on("click",".datepicker--nav-action",e.proxy(this._onClickNavButton,this)),this.d.$nav.on("click",".datepicker--nav-title",e.proxy(this._onClickNavTitle,this)),this.d.$datepicker.on("click",".datepicker--button",e.proxy(this._onClickNavButton,this))},_buildBaseHtml:function(){this.opts.onlyTimepicker||this._render(),this._addButtonsIfNeed()},_addButtonsIfNeed:function(){this.opts.todayButton&&this._addButton("today"),this.opts.clearButton&&this._addButton("clear")},_render:function(){var i=this._getTitle(this.d.currentDate),s=n.template(t,e.extend({title:i},this.opts));this.d.$nav.html(s),"years"==this.d.view&&e(".datepicker--nav-title",this.d.$nav).addClass("-disabled-"),this.setNavStatus()},_getTitle:function(t){return this.d.formatDate(this.opts.navTitles[this.d.view],t)},_addButton:function(t){this.$buttonsContainer.length||this._addButtonsContainer();var i={action:t,label:this.d.loc[t]},a=n.template(s,i);e("[data-action="+t+"]",this.$buttonsContainer).length||this.$buttonsContainer.append(a)},_addButtonsContainer:function(){this.d.$datepicker.append(i),this.$buttonsContainer=e(".datepicker--buttons",this.d.$datepicker)},setNavStatus:function(){if((this.opts.minDate||this.opts.maxDate)&&this.opts.disableNavWhenOutOfRange){var t=this.d.parsedDate,e=t.month,i=t.year,s=t.date;switch(this.d.view){case"days":this.d._isInRange(new Date(i,e-1,1),"month")||this._disableNav("prev"),this.d._isInRange(new Date(i,e+1,1),"month")||this._disableNav("next");break;case"months":this.d._isInRange(new Date(i-1,e,s),"year")||this._disableNav("prev"),this.d._isInRange(new Date(i+1,e,s),"year")||this._disableNav("next");break;case"years":var a=n.getDecade(this.d.date);this.d._isInRange(new Date(a[0]-1,0,1),"year")||this._disableNav("prev"),this.d._isInRange(new Date(a[1]+1,0,1),"year")||this._disableNav("next")}}},_disableNav:function(t){e('[data-action="'+t+'"]',this.d.$nav).addClass("-disabled-")},_activateNav:function(t){e('[data-action="'+t+'"]',this.d.$nav).removeClass("-disabled-")},_onClickNavButton:function(t){var i=e(t.target).closest("[data-action]"),s=i.data("action");this.d[s]()},_onClickNavTitle:function(t){return e(t.target).hasClass("-disabled-")?void 0:"days"==this.d.view?this.d.view="months":void(this.d.view="years")}}}(),function(){var t='
    #{hourVisible} : #{minValue}
    ',i=e.fn.datepicker,s=i.Constructor;i.Timepicker=function(t,e){this.d=t,this.opts=e,this.init()},i.Timepicker.prototype={init:function(){var t="input";this._setTime(this.d.date),this._buildHTML(),navigator.userAgent.match(/trident/gi)&&(t="change"),this.d.$el.on("selectDate",this._onSelectDate.bind(this)),this.$ranges.on(t,this._onChangeRange.bind(this)),this.$ranges.on("mouseup",this._onMouseUpRange.bind(this)),this.$ranges.on("mousemove focus ",this._onMouseEnterRange.bind(this)),this.$ranges.on("mouseout blur",this._onMouseOutRange.bind(this))},_setTime:function(t){var e=s.getParsedDate(t);this._handleDate(t),this.hours=e.hourst.getHours()&&(this.minMinutes=this.opts.minMinutes)},_setMaxTimeFromDate:function(t){ +this.maxHours=t.getHours(),this.maxMinutes=t.getMinutes(),this.d.lastSelectedDate&&this.d.lastSelectedDate.getHours()t?0:i.minHours,this.minMinutes=i.minMinutes<0||i.minMinutes>e?0:i.minMinutes,this.maxHours=i.maxHours<0||i.maxHours>t?t:i.maxHours,this.maxMinutes=i.maxMinutes<0||i.maxMinutes>e?e:i.maxMinutes},_validateHoursMinutes:function(t){this.hoursthis.maxHours&&(this.hours=this.maxHours),this.minutesthis.maxMinutes&&(this.minutes=this.maxMinutes)},_buildHTML:function(){var i=s.getLeadingZeroNum,a={hourMin:this.minHours,hourMax:i(this.maxHours),hourStep:this.opts.hoursStep,hourValue:this.hours,hourVisible:i(this.displayHours),minMin:this.minMinutes,minMax:i(this.maxMinutes),minStep:this.opts.minutesStep,minValue:i(this.minutes)},n=s.template(t,a);this.$timepicker=e(n).appendTo(this.d.$datepicker),this.$ranges=e('[type="range"]',this.$timepicker),this.$hours=e('[name="hours"]',this.$timepicker),this.$minutes=e('[name="minutes"]',this.$timepicker),this.$hoursText=e(".datepicker--time-current-hours",this.$timepicker),this.$minutesText=e(".datepicker--time-current-minutes",this.$timepicker),this.d.ampm&&(this.$ampm=e('').appendTo(e(".datepicker--time-current",this.$timepicker)).html(this.dayPeriod),this.$timepicker.addClass("-am-pm-"))},_updateCurrentTime:function(){var t=s.getLeadingZeroNum(this.displayHours),e=s.getLeadingZeroNum(this.minutes);this.$hoursText.html(t),this.$minutesText.html(e),this.d.ampm&&this.$ampm.html(this.dayPeriod)},_updateRanges:function(){this.$hours.attr({min:this.minHours,max:this.maxHours}).val(this.hours),this.$minutes.attr({min:this.minMinutes,max:this.maxMinutes}).val(this.minutes)},_handleDate:function(t){this._setDefaultMinMaxTime(),t&&(s.isSame(t,this.d.opts.minDate)?this._setMinTimeFromDate(this.d.opts.minDate):s.isSame(t,this.d.opts.maxDate)&&this._setMaxTimeFromDate(this.d.opts.maxDate)),this._validateHoursMinutes(t)},update:function(){this._updateRanges(),this._updateCurrentTime()},_getValidHoursFromDate:function(t,e){var i=t,a=t;t instanceof Date&&(i=s.getParsedDate(t),a=i.hours);var n=e||this.d.ampm,h="am";if(n)switch(!0){case 0==a:a=12;break;case 12==a:h="pm";break;case a>11:a-=12,h="pm"}return{hours:a,dayPeriod:h}},set hours(t){this._hours=t;var e=this._getValidHoursFromDate(t);this.displayHours=e.hours,this.dayPeriod=e.dayPeriod},get hours(){return this._hours},_onChangeRange:function(t){var i=e(t.target),s=i.attr("name");this.d.timepickerIsActive=!0,this[s]=i.val(),this._updateCurrentTime(),this.d._trigger("timeChange",[this.hours,this.minutes]),this._handleDate(this.d.lastSelectedDate),this.update()},_onSelectDate:function(t,e){this._handleDate(e),this.update()},_onMouseEnterRange:function(t){var i=e(t.target).attr("name");e(".datepicker--time-current-"+i,this.$timepicker).addClass("-focus-")},_onMouseOutRange:function(t){var i=e(t.target).attr("name");this.d.inFocus||e(".datepicker--time-current-"+i,this.$timepicker).removeClass("-focus-")},_onMouseUpRange:function(t){this.d.timepickerIsActive=!1}}}()}(window,jQuery); \ No newline at end of file diff --git a/src/main/webapp/resources/js/deposit.js b/src/main/webapp/resources/js/deposit.js new file mode 100644 index 0000000..d108e6c --- /dev/null +++ b/src/main/webapp/resources/js/deposit.js @@ -0,0 +1,66 @@ +/** + * validation check + */ + +// 에러메시지 +var insertError = "회원가입에 실패하였습니다. \n확인 후 다시 시도하세요!!"; +var updateError = "회원수정에 실패하였습니다. \n확인 후 다시 시도하세요!!"; +var deleteError = "회원탈퇴에 실패하였습니다. \n확인 후 다시 시도하세요!!"; +var passwordError = "입력하신 비밀번호가 일치하지 않습니다. \n확인 후 다시 시도하세요!!"; +var sessionError = "로그아웃 되었습니다. \n확인 후 다시 시도하세요!!"; + + + +function errorAlert(errorMsg) { + alert(errorMsg); + window.history.back(); // 이전 페이지로 이동 +} + + + +//-- 예금 가입 페이지 +function joinInCheck() { + var currentMonth = $("#currentMonth").val().replaceAll('-',''); + var account_limit = $("#account_limit").val(); + var sysdate = convertDateFormat(new Date()); + + console.log('currentMonth', currentMonth); + + /*// + if(sysdate > currentMonth){ + alert("가입기간을 다시 확인해주세요"); + return false;*/ + // 한도금액 + //} + if(!account_limit){ + alert("한도를 입력해주세요"); + return false; + + // 비밀번호 + } else if(!document.depositProductForm.account_password.value) { + alert("비밀번호를 입력하세요!!"); + document.depositProductForm.account_password.focus(); + return false; + + // 비밀번호 확인 + } else if(document.depositProductForm.account_password.value != document.depositProductForm.REaccount_password.value) { + alert("비밀번호가 일치하지않습니다!!"); + document.depositProductForm.REaccount_password.focus(); + return false; + } + +} + + +function convertDateFormat(date) { + var year = date.getFullYear(); + var month = date.getMonth() + 1; + + month = month >= 10 ? month : '0' + month; + + var day = date.getDate(); + + day = day >= 10 ? day : '0' + day; + + return [year, month, day].join(''); +} diff --git a/src/main/webapp/resources/js/exchange/exchange.js b/src/main/webapp/resources/js/exchange/exchange.js new file mode 100644 index 0000000..f26eb4a --- /dev/null +++ b/src/main/webapp/resources/js/exchange/exchange.js @@ -0,0 +1,15 @@ +/** + * + */ + +function exchangeVal(ex){ + var exchangeInto =$(ex).attr('attr-a'); + //exchangeInto = document.getElementById("exchange").val(); + console.log(exchangeInto); + //$('select.exchange option[value=' + exchangeInto +']').attr('selected','selected'); + window.location='exchange.do?exchange=' + exchangeInto; +} + +function change(){ + +} \ No newline at end of file diff --git a/src/main/webapp/resources/js/script.js b/src/main/webapp/resources/js/script.js index 2aebd7d..649e134 100644 --- a/src/main/webapp/resources/js/script.js +++ b/src/main/webapp/resources/js/script.js @@ -10,6 +10,7 @@ var passwordError = "입력하신 비밀번호가 일치하지 않습니다. \n var sessionError = "로그아웃 되었습니다. \n확인 후 다시 시도하세요!!"; + function errorAlert(errorMsg) { alert(errorMsg); window.history.back(); // 이전 페이지로 이동 @@ -19,13 +20,13 @@ function errorAlert(errorMsg) { function signIncheck() { // 이름 if(!document.registerform.name.value) { - alert("이름을 입력하세요!!"); + alert("본인인증이 완료되지 않았습니다. \n 본인인증을 시도해주세요!!"); document.registerform.name.focus(); return false; // 생년월일 } else if(!document.registerform.birth.value) { - alert("생년월일을 입력하세요!!"); + alert("본인인증이 완료되지 않았습니다. \n 본인인증을 시도해주세요!!"); document.registerform.birth.focus(); return false; @@ -48,19 +49,11 @@ function signIncheck() { return false; // 연락처 - } else if(!document.registerform.hp1.value) { - alert("휴대폰 번호를 입력하세요!!"); - document.registerform.hp1.focus(); - return false; - } else if(!document.registerform.hp2.value) { + } else if(!document.registerform.hp.value) { alert("휴대폰 번호를 입력하세요!!"); - document.registerform.hp2.focus(); + document.registerform.hp.focus(); return false; - } else if(!document.registerform.hp3.value) { - alert("휴대폰 번호를 입력하세요!!"); - document.registerform.hp3.focus(); - return false; - + // 이메일 } else if(!document.registerform.email1.value) { alert("이메일을 입력하세요!!"); @@ -79,225 +72,22 @@ function signIncheck() { // id 중복확인 버튼을 클릭하지 않는 경우 // signIn.jsp - hiddenId : 중복확인 버튼 클릭 여부 체크(0:클릭 안함, 1:클릭함) } else if(document.registerform.hiddenId.value == 0) { - alert("중복 확인을 해주세요!!"); + alert("아이디 중복 확인을 해주세요!!"); document.registerform.dupChk.focus(); return false; - } else if(document.registerform.access_token.value == "") { - alert("본인 인증을 해주세요!!"); - document.registerform.pass.focus(); - return false; - } else if(document.registerform.refresh_token.value == "") { - alert("본인 인증을 해주세요!!"); + } else if(document.registerform.unique_key.value == "") { + alert("본인인증이 완료되지 않았습니다. \n 본인인증을 시도해주세요!!"); document.registerform.pass.focus(); return false; - } else if(document.registerform.user_seq_no.value == "") { - alert("본인 인증을 해주세요!!"); - document.registerform.pass.focus(); - return false; - } + } } -// 아이디 중복확인 AJAX -function confirmId() { - - var token = $("meta[name='_csrf']").attr("content"); - var header = $("meta[name='_csrf_header']").attr("content"); - var member_id = $("#userId").val(); - console.log("member_id : " + member_id); - setTimeout(function() { - $.ajax({ - url : "confirmId.do", - data: {"member_id":member_id}, - type: "post", - dataType: 'json', - - beforeSend : function(xhr){ - xhr.setRequestHeader(header, token); - }, - - success : function(data) { - console.log("성공"); - $("#id_check").text(""); - if (data == 1) { - // 1 : 아이디가 중복되는 문구 - $("#id_check").text("사용중인 아이디입니다."); - $("#id_check").css("color", "red"); - $("#userId").css("border-color", "red"); - - $("input[name=hiddenId]").val(0); - console.log($("input[name=hiddenId]").val()); - - } else { - // 0 : 사용가능 - $("#id_check").text("사용 가능한 아이디입니다."); - $("#id_check").css("color","green"); - $("#userId").css("border-color", "#d7d7d7"); - $("input[name=hiddenId]").val(1); - console.log($("input[name=hiddenId]").val()); - - // input 입력 값 없을 시 id_check 초기화 - if(member_id == "") { - $("#id_check").text(""); - } - } - - }, error : function() {console.log("실패");} - }); - }, 10); -} -//회원가입 이메일 인증 -function emailChk() { - - console.log("emailChk - ON"); - - var token = $("meta[name='_csrf']").attr("content"); - var header = $("meta[name='_csrf_header']").attr("content"); - - var dice; - var sss; - var click=0; - var userEmail; - var counter; - - $('#mail1').click(function() { - $("#dice").val(''); - - userEmail1 = $("input[name=email1").val(); - userEmail2 = $("input[name=email2").val(); - userEmail = userEmail1 + "@" + userEmail2; - console.log("이메일 : " + userEmail); - // var idJ = /([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; - if(userEmail1 == ""){ - alert("형식에 맞게 이메일을 입력해 주세요!"); - return; - } else if(userEmail2 == "") { - alert("형식에 맞게 이메일을 입력해 주세요!"); - return; - } - click++; - $('#dice_check').css('display',''); - - if(click>=1){ - $("#mail1").css('display','none').css('margin-top','0px').css('border','1px solid').css('cursor','pointer') - $("#mail2").css('display','') - $("#dice_check1").css('display',''); - - } - - var stop = false; - var mm=5; - var ss=59; - // 인증번호 카운터 - counter = setInterval(function(){ - if(!stop){ - var time_text = mm+':'+ss+'초'; - $("#dice_check").text(time_text); - $("#dice_check").css('color','red').css('display','inline-block'); - $("input[name=counter]").val(1); - ss--; - if(ss==-1){ - if(mm < 1){ - mm=0; - if(ss<0){ - clearInterval(counter); - $("#dice_check").text(''); - $("#dice_check1").css('display','none'); - - $("#mail1").css('display','').css('margin-top','0px').css('border','1px solid').css('cursor','pointer'); - $("#mail2").css('display','none'); - } - } - else{mm--;} - ss=10; - } - if(ss<=9){ - ss = '0'+ss; - } - } - else{ - clearInterval(counter); - } - },1000); - - $.ajax({ - url : "usermailCheck.do", - type: "POST", - data: {"userEmail":userEmail}, - dataType: 'json', - beforeSend : function(xhr){ - xhr.setRequestHeader(header, token); - }, - success : function(data) { - dice = data.dice; - }, error : function() {console.log("실패");} - }) - - - // 다시 보내기 버튼 - $('#mail2').click(function() { - - mm=5; - ss=59; - - userEmail1 = $("input[name=email1").val(); - userEmail2 = $("input[name=email2").val(); - userEmail = userEmail1 + "@" + userEmail2; - console.log("이메일 : "+userEmail); - - $("input[name=emailChk]").val(0); - $("#dice").val(''); - - - $.ajax({ - url : "usermailCheck.do", - type: "POST", - data: {"userEmail":userEmail}, - dataType: 'json', - beforeSend : function(xhr){ - xhr.setRequestHeader(header, token); - }, - success : function(data) { - dice = data.dice; - }, error : function() {console.log("실패");} - }) - - }) - }); - - - var suc; - $("#btn_dice").click(function(){ - console.log("인증번호 확인버튼 누름"); - if(dice==$("#dice").val()){ - alert('성공'); - clearInterval(counter); - suc =1; - $("#dice_check").html("") ; - //$("#dice_check").css("color","green"); - $("#dice_check1").css('display','none'); - $("#mail2").html("인증완료"); - // pointer-events - none : a 태그 클릭 비활성화 - $("#mail2").css("pointer-events", "none").css("color", "green"); - - $("#dice").css('display','none'); - $("#btn_dice").css('display','none'); - $("input[name=emailChk]").val("1"); - console.log("이메일인증" + $("input[name=emailChk]").val()); - mm=0; - ss=0; - - } - else{ - alert('인증번호를 확인해주세요'); - } - }); -} -// -- 회원가입이메일인증 + // 로그인 페이지 function logcheck() { @@ -315,7 +105,6 @@ function logcheck() { } - //------------------------------------------------------------------------ function nextHp1() { @@ -385,25 +174,6 @@ function selectEmailChk_update() { //------------------------------------------------------------------------ - -function confirmMe() { - - var popupX = (window.screen.width / 2) - (500 / 2); // 윈도우 픽셀 기준 X축 중간 - var popupY = (window.screen.height / 2) - (750 / 2); // 윈도우 픽셀 기준 Y축 중간 - var url = "https://testapi.openbanking.or.kr/oauth/2.0/authorize?" + - "response_type=code&"+ - "client_id=072579e4-c1b5-4ad1-a6a4-78c69cab659c&"+ - "redirect_uri=http://localhost/bank/customer/authResult.do&"+ - "scope=login inquiry transfer&"+ - "state=b80BLsfigm9OokPTjy03elbJqRHOfGSY&"+ - "auth_type=0"; - - window.open(url, "about:blank", "menubar=no, width=550, height=750, left="+popupX +", top="+popupY); - - -} - - // 회원 탈퇴 function deleteUser() { var popupX = (window.screen.width / 2) - (500 / 2); @@ -604,3 +374,108 @@ function depositProductInsertCheck() { //----------------------------------------------------------------- + +//민재----------------------------------------------------------------- +//예금 +function depositList() { + + var token = $("meta[name='_csrf']").attr("content"); + var header = $("meta[name='_csrf_header']").attr("content"); + var select = $("#selectBank").val(); + + $.ajax({ + url : 'myDepositSubList.do', + type : 'POST', + data : {"select" : select}, + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + }, + + success : function(data){ + $('.selectTable').html(data); + } + }); +} + +//적금 +function savingList() { + + var token = $("meta[name='_csrf']").attr("content"); + var header = $("meta[name='_csrf_header']").attr("content"); + var select = $("#selectBank").val(); + + $.ajax({ + url : 'mySavingSubList.do', + type : 'POST', + data : {"select" : select}, + beforeSend : function(xhr){ + xhr.setRequestHeader(header, token); + }, + + success : function(data){ + $('.selectTable').html(data); + } + }); +} + + +//----------------------------------------------------------------- + +//진지현 +//연금상품등록 유효성 체크 +function irpProductInsertCheck() { + if(!document.irpProductInsertForm.irp_product_name.value) { + alert("연금 상품 이름을 입력하세요!!"); + document.irpProductInsertForm.irp_product_name.focus(); + return false; + } else if(!document.irpProductInsertForm.irp_product_summary.value) { + alert("연금 상품 요약을 입력하세요!!"); + document.irpProductInsertForm.irp_product_summary.focus(); + return false; + } else if(!document.irpProductInsertForm.irp_product_interRate.value) { + alert("금리를 입력하세요!!"); + document.irpProductInsertForm.irp_product_interRate.focus(); + return false; + } else if(!document.irpProductInsertForm.irp_product_expiryTerm.value) { + alert("연금 가입 기간을 입력하세요!!"); + document.irpProductInsertForm.irp_product_expiryTerm.focus(); + return false; + } else if(!document.irpProductInsertForm.irp_product_explanation.value) { + alert("연금 설명을 입력하세요!!"); + document.irpProductInsertForm.irp_product_explanation.focus(); + return false; + } else if(!document.irpProductInsertForm.irp_product_notice.value) { + alert("유의 사항을 입력하세요!!"); + document.irpProductInsertForm.irp_product_notice.focus(); + return false; + } else if(!document.irpProductInsertForm.irp_product_bankCode.value) { + alert("은행코드를 선택하세요!!"); + document.irpProductInsertForm.irp_product_bankCode.focus(); + return false; + } + +} + +//연금 상품 가입 시 체크 +function irpJoinInCheck() { + var sysdate = convertDateFormat(new Date()); + + if(!account_limit){ + alert("한도를 입력해주세요"); + return false; + + // 비밀번호 + } else if(!document.depositProductForm.account_password.value) { + alert("비밀번호를 입력하세요!!"); + document.depositProductForm.account_password.focus(); + return false; + + // 비밀번호 확인 + } else if(document.depositProductForm.account_password.value != document.depositProductForm.REaccount_password.value) { + alert("비밀번호가 일치하지않습니다!!"); + document.depositProductForm.REaccount_password.focus(); + return false; + } + +} + diff --git a/src/main/webapp/resources/js/transfer_page.js b/src/main/webapp/resources/js/transfer_page.js new file mode 100644 index 0000000..08c29f5 --- /dev/null +++ b/src/main/webapp/resources/js/transfer_page.js @@ -0,0 +1,77 @@ +// 계좌 비밀번호 확인 +function account_confirmPwd(){ + if(!document.transferform.account_password.value){ + alert("계좌 비밀번호를 입력하세요"); + document.transferform.account_password.focus(); + return false; + } + + var url = "account_confirm?account_password=" + document.transferform.account_password.value; + window.open(url, "confirm", "menubar=no, width=500, height=400"); +} + +function account_confirmPwdFocus(){ + document.confirmform.account_password.focus(); +} + +function confirmPwdCheck(){ + if(!document.confirmform.account_password.value){ + alert("계좌 비밀번호를 입력하세요"); + document.confirmform.account_password.focus(); + return false; + } +} + +function setId(account_password) { + opener.document.transferform.account_password.value = account_password; // opener = window 객체의 open() + opener.document.transferform.hiddenPassword.value = 1; // 메서드로 열린 새 창(=중복확인창)에서 + self.close(); // 부모창(=회원가입)에 접근할 때 사용 +} + + +// 이체시 필요한 정보 입력 +function transferCheck() { + + // 계좌 비밀번호 + if (!document.transferform.account_password.value) { + alert("계좌 비밀번호를 입력하세요"); + document.transferform.account_password.focus(); + return false; + + // 입금계좌번호 + } else if (!document.transferform.transfer_senderAccount.value) { + alert("입금할 계좌번호를 입력하세요"); + document.transferform.transfer_senderAccount.focus(); + return false; + + // 이체 금액 + } else if (!document.transferform.transfer_money.value) { + alert("입금할 금액을 입력하세요"); + document.transferform.transfer_money.focus(); + return false; + } + return true; +} + +// 이체 금액 버튼 누를시 해당 금액 추가 +function addPrice() { + const resultElement = document.getElementById('transfer_money'); + + let number = resultElement.innerText; + + if (document.transferform.transfer_money.value === '10000') { + number = parseInt(number) + 10000; + } else if (document.transferform.transfer_money.value === '30000') { + number = parseInt(number) + 30000; + } else if (document.transferform.transfer_money.value === '50000') { + number = parseInt(number) + 50000; + } else if (document.transferform.transfer_money.value === '100000') { + number = parseInt(number) + 100000; + } else if (document.transferform.transfer_money.value === '500000') { + number = parseInt(number) + 500000; + } else if (document.transferform.transfer_money.value === '1000000') { + number = parseInt(number) + 1000000; + } + + resultElement.innerText = number; +} diff --git a/target/classes/com/spring/bank/HomeController.class b/target/classes/com/spring/bank/HomeController.class deleted file mode 100644 index 78a4344..0000000 Binary files a/target/classes/com/spring/bank/HomeController.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/controller/AdminController.class b/target/classes/com/spring/bank/admin/controller/AdminController.class deleted file mode 100644 index 13c5924..0000000 Binary files a/target/classes/com/spring/bank/admin/controller/AdminController.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/dao/AdminDAO.class b/target/classes/com/spring/bank/admin/dao/AdminDAO.class deleted file mode 100644 index ba3b381..0000000 Binary files a/target/classes/com/spring/bank/admin/dao/AdminDAO.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/dao/AdminDAOImpl.class b/target/classes/com/spring/bank/admin/dao/AdminDAOImpl.class deleted file mode 100644 index 8e88d68..0000000 Binary files a/target/classes/com/spring/bank/admin/dao/AdminDAOImpl.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/encrypt/AdminAuthenticationService.class b/target/classes/com/spring/bank/admin/encrypt/AdminAuthenticationService.class deleted file mode 100644 index 68a6c27..0000000 Binary files a/target/classes/com/spring/bank/admin/encrypt/AdminAuthenticationService.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/encrypt/AdminLoginFailureHandler.class b/target/classes/com/spring/bank/admin/encrypt/AdminLoginFailureHandler.class deleted file mode 100644 index 4fd6331..0000000 Binary files a/target/classes/com/spring/bank/admin/encrypt/AdminLoginFailureHandler.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/encrypt/AdminLoginSuccessHandler.class b/target/classes/com/spring/bank/admin/encrypt/AdminLoginSuccessHandler.class deleted file mode 100644 index 1dd3a25..0000000 Binary files a/target/classes/com/spring/bank/admin/encrypt/AdminLoginSuccessHandler.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/service/AdminService.class b/target/classes/com/spring/bank/admin/service/AdminService.class deleted file mode 100644 index f58ccdb..0000000 Binary files a/target/classes/com/spring/bank/admin/service/AdminService.class and /dev/null differ diff --git a/target/classes/com/spring/bank/admin/service/AdminServiceImpl.class b/target/classes/com/spring/bank/admin/service/AdminServiceImpl.class deleted file mode 100644 index c90d426..0000000 Binary files a/target/classes/com/spring/bank/admin/service/AdminServiceImpl.class and /dev/null differ diff --git a/target/classes/com/spring/bank/customer/encrypt/UserAuthenticationService.class b/target/classes/com/spring/bank/customer/encrypt/UserAuthenticationService.class deleted file mode 100644 index 9ec9e88..0000000 Binary files a/target/classes/com/spring/bank/customer/encrypt/UserAuthenticationService.class and /dev/null differ diff --git a/target/classes/com/spring/bank/customer/encrypt/UserDeniedHandler.class b/target/classes/com/spring/bank/customer/encrypt/UserDeniedHandler.class deleted file mode 100644 index e7290c1..0000000 Binary files a/target/classes/com/spring/bank/customer/encrypt/UserDeniedHandler.class and /dev/null differ diff --git a/target/classes/com/spring/bank/customer/encrypt/UserLoginFailureHandler.class b/target/classes/com/spring/bank/customer/encrypt/UserLoginFailureHandler.class deleted file mode 100644 index 67c05c0..0000000 Binary files a/target/classes/com/spring/bank/customer/encrypt/UserLoginFailureHandler.class and /dev/null differ diff --git a/target/classes/com/spring/bank/customer/encrypt/UserLoginSuccessHandler.class b/target/classes/com/spring/bank/customer/encrypt/UserLoginSuccessHandler.class deleted file mode 100644 index 514462f..0000000 Binary files a/target/classes/com/spring/bank/customer/encrypt/UserLoginSuccessHandler.class and /dev/null differ diff --git a/target/classes/com/spring/bank/emailHandler/EmailHandler.class b/target/classes/com/spring/bank/emailHandler/EmailHandler.class deleted file mode 100644 index d0150e1..0000000 Binary files a/target/classes/com/spring/bank/emailHandler/EmailHandler.class and /dev/null differ diff --git a/target/classes/com/spring/bank/emailHandler/SHA256.class b/target/classes/com/spring/bank/emailHandler/SHA256.class deleted file mode 100644 index 552e680..0000000 Binary files a/target/classes/com/spring/bank/emailHandler/SHA256.class and /dev/null differ diff --git a/target/classes/com/spring/bank/product/vo/DepositProductVO.class b/target/classes/com/spring/bank/product/vo/DepositProductVO.class deleted file mode 100644 index 6f5e004..0000000 Binary files a/target/classes/com/spring/bank/product/vo/DepositProductVO.class and /dev/null differ diff --git a/target/classes/com/spring/bank/restapi/RestController.class b/target/classes/com/spring/bank/restapi/RestController.class deleted file mode 100644 index a83867f..0000000 Binary files a/target/classes/com/spring/bank/restapi/RestController.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/contoller/CustomerController.class b/target/classes/com/spring/bank/user/contoller/CustomerController.class deleted file mode 100644 index e1d3d45..0000000 Binary files a/target/classes/com/spring/bank/user/contoller/CustomerController.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/dao/CustomerDAO.class b/target/classes/com/spring/bank/user/dao/CustomerDAO.class deleted file mode 100644 index bbe97de..0000000 Binary files a/target/classes/com/spring/bank/user/dao/CustomerDAO.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/dao/CustomerDAOImpl.class b/target/classes/com/spring/bank/user/dao/CustomerDAOImpl.class deleted file mode 100644 index d58694c..0000000 Binary files a/target/classes/com/spring/bank/user/dao/CustomerDAOImpl.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/service/CustomerService.class b/target/classes/com/spring/bank/user/service/CustomerService.class deleted file mode 100644 index 46d0d21..0000000 Binary files a/target/classes/com/spring/bank/user/service/CustomerService.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/service/CustomerServiceImpl.class b/target/classes/com/spring/bank/user/service/CustomerServiceImpl.class deleted file mode 100644 index b48a25f..0000000 Binary files a/target/classes/com/spring/bank/user/service/CustomerServiceImpl.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/vo/CrawlerVO.class b/target/classes/com/spring/bank/user/vo/CrawlerVO.class deleted file mode 100644 index 3c9259d..0000000 Binary files a/target/classes/com/spring/bank/user/vo/CrawlerVO.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/vo/MemberVO.class b/target/classes/com/spring/bank/user/vo/MemberVO.class deleted file mode 100644 index e67d17c..0000000 Binary files a/target/classes/com/spring/bank/user/vo/MemberVO.class and /dev/null differ diff --git a/target/classes/com/spring/bank/user/vo/UserVO.class b/target/classes/com/spring/bank/user/vo/UserVO.class deleted file mode 100644 index b6d7d5d..0000000 Binary files a/target/classes/com/spring/bank/user/vo/UserVO.class and /dev/null differ diff --git a/target/classes/com/spring/bank/util/ImageUploaderHandler.class b/target/classes/com/spring/bank/util/ImageUploaderHandler.class deleted file mode 100644 index 2653453..0000000 Binary files a/target/classes/com/spring/bank/util/ImageUploaderHandler.class and /dev/null differ diff --git a/target/classes/log4j.xml b/target/classes/log4j.xml deleted file mode 100644 index 8a8e0b8..0000000 --- a/target/classes/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/target/classes/mappers/adminSqlMapper.xml b/target/classes/mappers/adminSqlMapper.xml index 4bad411..f4e7df6 100644 --- a/target/classes/mappers/adminSqlMapper.xml +++ b/target/classes/mappers/adminSqlMapper.xml @@ -101,7 +101,172 @@ DELETE FROM deposit_product WHERE deposit_product_name IN ( #{deposit_product_name} ) + + + INSERT INTO saving_product(saving_product_name, saving_product_summary, saving_product_date, saving_product_interRate, saving_product_type, saving_product_maxDate, saving_product_minDate, saving_product_minPrice, saving_product_explanation, saving_product_notice, saving_product_bankCode) + VALUES(#{saving_product_name}, #{saving_product_summary}, sysdate, #{saving_product_interRate}, #{saving_product_type}, #{saving_product_maxDate}, #{saving_product_minDate}, #{saving_product_minPrice}, #{saving_product_explanation}, #{saving_product_notice}, #{saving_product_bankCode}) + + + + + + + + + + + + + + + + + + + + UPDATE saving_product set saving_product_summary=#{saving_product_summary}, saving_product_interRate=#{saving_product_interRate}, saving_product_type=#{saving_product_type}, saving_product_maxDate=#{saving_product_maxDate}, saving_product_minDate=#{saving_product_minDate}, saving_product_minPrice=#{saving_product_minPrice}, saving_product_explanation=#{saving_product_explanation}, saving_product_notice=#{saving_product_notice}, saving_product_bankCode=#{saving_product_bankCode} + WHERE saving_product_name=#{saving_product_name} + + + + + DELETE FROM saving_product WHERE saving_product_name IN ( #{saving_product_name} ) + + + + + + INSERT INTO fund(fund_id, fund_title, fund_content, fund_start_date, fund_end_date, fund_goal_money, fund_category, fund_approve, fund_mem_name, fund_mem_hp, fund_mem_email, fund_account, fund_filename, fund_summary, fund_bank_code) + VALUES(fund_id.nextval, #{fund_title}, #{fund_content}, #{fund_start_date}, #{fund_end_date}, #{fund_goal_money}, #{fund_category}, 0, #{fund_mem_name}, #{fund_mem_hp}, #{fund_mem_email}, #{fund_account}, #{fund_filename}, #{fund_summary}, #{fund_bank_code}) + + + + + + + + + + + + + + + + + + + + UPDATE fund set fund_content=#{fund_content}, fund_start_date=#{fund_start_date}, fund_end_date=#{fund_end_date}, fund_goal_money=#{fund_goal_money}, fund_category=#{fund_category} + , fund_mem_name=#{fund_mem_name}, fund_mem_hp=#{fund_mem_hp}, fund_mem_email=#{fund_mem_email}, fund_account=#{fund_account}, fund_filename=#{fund_filename}, fund_summary=#{fund_summary}, fund_bank_code=#{fund_bank_code} + WHERE fund_title=#{fund_title} + + + + + DELETE FROM fund WHERE fund_title IN ( #{fund_title} ) + + + + + + INSERT INTO irp_product(irp_product_name, irp_product_summary, irp_product_date, irp_product_interRate, irp_product_expiryTerm, irp_product_explanation,irp_product_money, irp_product_notice, irp_product_bankCode) + VALUES(#{irp_product_name}, #{irp_product_summary}, sysdate, #{irp_product_interRate}, #{irp_product_expiryTerm}, #{irp_product_explanation}, #{irp_product_money},#{irp_product_notice}, #{irp_product_bankCode}) + + + + + + + + + + + + + + + + + + + + UPDATE irp_product SET irp_product_summary=#{irp_product_summary}, irp_product_interRate=#{irp_product_interRate}, irp_product_expiryTerm=#{irp_product_expiryTerm}, irp_product_explanation=#{irp_product_explanation},irp_product_money=#{irp_product_money}, irp_product_notice=#{irp_product_notice}, irp_product_bankCode=#{irp_product_bankCode} + WHERE irp_product_name=#{irp_product_name} + + + + + DELETE FROM irp_product WHERE irp_product_name IN ( #{irp_product_name} ) + + + + + + INSERT INTO account(account_bankCode, account_id, account_password, account_balance, account_type, account_state, account_stateContent, account_limit, account_newDate, unique_key, account_default, account_linked, account_bankImg) + VALUES(#{account_bankCode}, #{account_id}, #{account_password}, #{account_balance}, #{account_type}, #{account_state}, #{account_stateContent}, #{account_limit}, sysdate, #{unique_key}, 0, 0, #{account_bankImg}) + + + + + + + UPDATE account SET account_state = 0 WHERE account_id = #{account_id} + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO loan_product(loan_product_name + , loan_product_rate + , loan_product_minPrice + , loan_product_maxPrice + , loan_product_minDate + , loan_product_maxDate + , loan_product_bankCode + , loan_product_baseDate + , loan_product_prepaymentRate + , loan_product_summary + ) + VALUES(#{loan_product_name} + , #{loan_product_rate} + , #{loan_product_minPrice} + , #{loan_product_maxPrice} + , #{loan_product_minDate} + , #{loan_product_maxDate} + , #{loan_product_bankCode} + , sysdate + , #{loan_product_prepaymentRate} + , #{loan_product_summary} + ) + + + + UPDATE loan_product + SET loan_product_rate = #{loan_product_rate} + , loan_product_minPrice = #{loan_product_minPrice} + , loan_product_maxPrice = #{loan_product_maxPrice} + , loan_product_minDate = #{loan_product_minDate} + , loan_product_maxDate = #{loan_product_maxDate} + , loan_product_bankCode = #{loan_product_bankCode} + , loan_product_prepaymentRate = #{loan_product_prepaymentRate} + , loan_product_summary = #{loan_product_summary} + WHERE loan_product_name = #{pre_loan_product_name} + + + + DELETE loan_product + WHERE loan_product_name = #{loan_product_name} + + + + + + + + + + + + + + UPDATE loan + SET loan_state = #{state} + WHERE loan_id = #{loan_id} + + + + + + + + + + + + + + + + + + INSERT INTO transfer(transfer_id + , account_id + , transfer_senderAccount + , transfer_money + , transfer_inOut + , transfer_inOutDate + , transfer_inComment + , transfer_senderName + , transfer_receiverName + , transfer_bankCode + ) + VALUES(transfer_seq.nextval + , #{account_id} + , #{account_id} + , #{transfer_money} + , #{transfer_inOut} + , SYSDATE + , #{transfer_inComment} + , #{transfer_senderName} + , #{transfer_receiverName} + , #{transfer_bankCode} + ) + + + + + DELETE transfer WHERE transfer_inComment LIKE '%'||#{transfer_inComment}||'%' + + + + + UPDATE account + SET account_balance = account_balance + #{loan_amount} + WHERE account_id = #{account_id} + + + + + + + + + + + INSERT INTO NOTICE(NOTICE_NUM, NOTICE_WRITER, NOTICE_SUBJECT, NOTICE_PASSWORD, NOTICE_CONTENT, NOTICE_READCNT) + VALUES (notice_num_seq.nextval, #{notice_writer}, #{notice_subject}, #{notice_password}, #{notice_content}, 0) + + + + + + + + + + + UPDATE NOTICE SET notice_subject = #{notice_subject}, notice_password = #{notice_password}, notice_content = #{notice_content} + WHERE notice_num = #{notice_num} + + + + + DELETE FROM NOTICE WHERE notice_num = #{notice_num} + + \ No newline at end of file diff --git a/target/classes/mappers/userSqlMapper.xml b/target/classes/mappers/userSqlMapper.xml deleted file mode 100644 index 7fa31f3..0000000 --- a/target/classes/mappers/userSqlMapper.xml +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - - - - INSERT INTO members(member_id, member_password, member_name, member_birth, member_hp, member_email, member_zipcode, member_addr1, member_addr2, member_addr3, member_indate, member_enabled, member_authority, access_token, refresh_token, user_seq_no) - VALUES(#{member_id}, #{member_password}, #{member_name}, #{member_birth}, #{member_hp}, #{member_email}, #{member_zipcode}, #{member_addr1}, #{member_addr2}, #{member_addr3}, sysdate, 1, 'ROLE_USER', #{access_token}, #{refresh_token}, #{user_seq_no}) - - - - - UPDATE members SET member_enabled = #{member_enabled} WHERE member_email = #{member_email} - - - - - - - - - - - - - DELETE FROM members WHERE member_id = #{member_id} - - - - - - - - UPDATE members SET member_password = #{member_password}, member_hp = #{member_hp}, member_email = #{member_email}, member_zipcode = #{member_zipcode}, member_addr1 = #{member_addr1}, member_addr2 = #{member_addr2}, member_addr3 = #{member_addr3} WHERE member_id = #{member_id} - - - - - - - - - - - UPDATE members set member_password=#{member_password} WHERE member_id=#{member_id} - - - - - - - - - - - - INSERT INTO inquiry(inquiry_id, inquiry_title,inquiry_content,member_id, inquiry_ref,inquiry_regDate) - VALUES(inquiry_seq.nextval, #{inquiry_title}, #{inquiry_content}, #{member_id}, inquiry_seq.currval,#{inquiry_regDate}) - - - - - UPDATE inquiry SET readCnt = readCnt+1 - WHERE inquiry_id=#{inquiry_id} - - - - - - - - - - - UPDATE inquiry SET inquiry_id=#{inquiry_id}, - inquiry_title=#{inquiry_title}, inquiry_content=#{inquiry_content} - WHERE inquiry_id=#{inquiry_id} - - - - - DELETE FROM inquiry - WHERE inquiry_id=#{inquiry_id} - - - - - - - - - - - - - - - - - - - - - - - - - - INSERT INTO exchange_rate(exchange_country, exchange_rate) - VALUES (#{exchange_country}, #{exchange_rate}) - - - - - - - - UPDATE exchange_rate - SET exchange_rate=#{exchange_rate} - WHERE exchange_country=#{exchange_country} - - - - - - - - INSERT INTO ACCOUNTBOOK(ACCOUNTBOOK_ID, MEMBER_ID, EXPENSE, INCOME, REGISTER_DATE) - VALUES(SEQ_accountBook_id.nextval,#{member_id},#{expense},#{income},#{register_date} ) - - - - - DELETE FROM ACCOUNTBOOK - WHERE MEMBER_ID = #{member_id} - AND REGISTER_DATE = #{register_date} - - - - - - - - \ No newline at end of file diff --git a/target/classes/security-context.xml b/target/classes/security-context.xml deleted file mode 100644 index 6e37749..0000000 --- a/target/classes/security-context.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/target/classes/security-dataSource.xml b/target/classes/security-dataSource.xml deleted file mode 100644 index 39b94e0..0000000 --- a/target/classes/security-dataSource.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF b/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF deleted file mode 100644 index 6e7c61c..0000000 --- a/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF +++ /dev/null @@ -1,5 +0,0 @@ -Manifest-Version: 1.0 -Built-By: Takgon -Build-Jdk: 1.8.0_241 -Created-By: Maven Integration for Eclipse - diff --git a/target/m2e-wtp/web-resources/META-INF/maven/com.spring/mvc/pom.properties b/target/m2e-wtp/web-resources/META-INF/maven/com.spring/mvc/pom.properties deleted file mode 100644 index e255450..0000000 --- a/target/m2e-wtp/web-resources/META-INF/maven/com.spring/mvc/pom.properties +++ /dev/null @@ -1,7 +0,0 @@ -#Generated by Maven Integration for Eclipse -#Tue Sep 28 23:20:33 KST 2021 -version=1.0.0-BUILD-SNAPSHOT -groupId=com.spring -m2e.projectName=KOSMO_BANK_PJ -m2e.projectLocation=C\:\\Dev88\\workspace\\new_kosmo_bank\\KOSMO_BANK_PJ -artifactId=mvc diff --git a/target/m2e-wtp/web-resources/META-INF/maven/com.spring/mvc/pom.xml b/target/m2e-wtp/web-resources/META-INF/maven/com.spring/mvc/pom.xml deleted file mode 100644 index 9536747..0000000 --- a/target/m2e-wtp/web-resources/META-INF/maven/com.spring/mvc/pom.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - 4.0.0 - com.spring - mvc - KOSMO_BANK_PJ - war - 1.0.0-BUILD-SNAPSHOT - - 1.8 - 5.2.1.RELEASE - 1.6.10 - 1.6.6 - - - - - org.springframework - spring-context - ${org.springframework-version} - - - - commons-logging - commons-logging - - - - - org.springframework - spring-webmvc - ${org.springframework-version} - - - - - org.aspectj - aspectjrt - ${org.aspectj-version} - - - - - org.slf4j - slf4j-api - ${org.slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${org.slf4j-version} - runtime - - - org.slf4j - slf4j-log4j12 - ${org.slf4j-version} - runtime - - - log4j - log4j - 1.2.15 - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - - - - - javax.inject - javax.inject - 1 - - - - - javax.servlet - javax.servlet-api - 3.0.1 - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - - - - - org.mybatis - mybatis-spring - 1.3.2 - - - - org.springframework - spring-jdbc - 5.1.8.RELEASE - - - - org.mybatis - mybatis - 3.4.6 - - - - org.springframework - spring-test - 5.1.8.RELEASE - test - - - - - - commons-fileupload - commons-fileupload - 1.3 - - - - - - org.springframework.security - spring-security-config - 5.2.1.RELEASE - - - - - org.springframework.security - spring-security-core - 5.2.1.RELEASE - - - - - org.springframework.security - spring-security-taglibs - 5.2.1.RELEASE - - - - - org.springframework.security - spring-security-web - 5.2.1.RELEASE - - - - - - commons-logging - commons-logging - 1.2 - - - - - commons-codec - commons-codec - 1.14 - - - - - org.junit.jupiter - junit-jupiter-api - 5.6.1 - test - - - - - - org.json - json - 20210307 - - - - - com.googlecode.json-simple - json-simple - 1.1.1 - - - - org.jsoup - jsoup - 1.13.1 - - - - - com.fasterxml.jackson.core - jackson-databind - 2.9.8 - - - - - - com.google.code.gson - gson - 2.8.5 - - - - - - - io.rest-assured - rest-assured - 4.4.0 - test - - - - - javax.mail - mail - 1.4.7 - - - - com.sun.mail - javax.mail - 1.6.2 - - - - org.springframework - spring-context-support - 4.3.0.RELEASE - - - - - - junit - junit - 4.7 - test - - - - - - maven-eclipse-plugin - 2.9 - - - org.springframework.ide.eclipse.core.springnature - - - org.springframework.ide.eclipse.core.springbuilder - - true - true - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.5.1 - - 1.6 - 1.6 - -Xlint:all - true - true - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - org.test.int1.Main - - - - - diff --git a/target/test-classes/log4j.xml b/target/test-classes/log4j.xml deleted file mode 100644 index 5e9bc0e..0000000 --- a/target/test-classes/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -