commit 70e3764011ea5942b9d43eb683c7796487708f85 Author: zhuyiyi <649091362@qq.com> Date: Thu Feb 20 15:14:38 2025 +0800 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e87c343 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/* +target/* diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/pom.properties b/pom.properties new file mode 100644 index 0000000..f784bbc --- /dev/null +++ b/pom.properties @@ -0,0 +1,5 @@ +#Generated by Maven +#Sun Feb 06 16:55:31 CST 2022 +version=0.0.1-SNAPSHOT +groupId=lingtao.net +artifactId=quote_price diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..4815562 --- /dev/null +++ b/pom.xml @@ -0,0 +1,211 @@ + + 4.0.0 + lingtao.net + quote_price + 0.0.1-SNAPSHOT + war + + quote_price + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-war-plugin + + + + src/main/resources/lib + WEB-INF/lib/ + + **/*.jar + + + + + + + + + + + com.github.pagehelper + pagehelper + 5.0.0 + + + + org.springframework + spring-webmvc + 4.2.4.RELEASE + + + + org.springframework + spring-jdbc + 4.2.4.RELEASE + + + + org.springframework + spring-aspects + 4.2.4.RELEASE + + + + org.mybatis + mybatis + 3.4.6 + + + + org.mybatis + mybatis-spring + 1.3.2 + + + + com.mchange + c3p0 + 0.9.5.2 + + + + + mysql + mysql-connector-java + 5.1.32 + + + + jstl + jstl + 1.2 + + + + taglibs + standard + 1.1.2 + + + javax.servlet + javax.servlet-api + 3.0.1 + provided + + + + junit + junit + 4.12 + + + + + org.springframework + spring-test + 4.2.4.RELEASE + + + javax.servlet + jsp-api + 2.0 + + + + com.fasterxml.jackson.core + jackson-databind + 2.8.8 + + + + org.hibernate + hibernate-validator + 5.3.6.Final + + + + + org.projectlombok + lombok + 1.18.12 + provided + + + + commons-fileupload + commons-fileupload + 1.3.3 + + + org.apache.poi + poi-ooxml + 3.14-beta1 + + + org.apache.poi + poi-ooxml-schemas + 3.14-beta1 + + + org.apache.poi + poi + 3.14-beta1 + + + org.apache.httpcomponents + httpclient + 4.5.2 + + + net.sf.json-lib + json-lib + 2.4 + jdk15 + + + org.slf4j + slf4j-log4j12 + 1.7.14 + + + + org.apache.shiro + shiro-all + 1.3.2 + + + + eu.bitwalker + UserAgentUtils + 1.20 + + + com.alibaba + fastjson + 1.2.24 + + + com.singularsys + jep + 3.5 + system + ${project.basedir}/src/main/resources/lib/jep-java-3.5-trial.jar + + + + + UTF-8 + + + \ No newline at end of file diff --git a/src/main/java/lingtao/net/base/ActionMessage.java b/src/main/java/lingtao/net/base/ActionMessage.java new file mode 100644 index 0000000..629aced --- /dev/null +++ b/src/main/java/lingtao/net/base/ActionMessage.java @@ -0,0 +1,16 @@ +package lingtao.net.base; + +public interface ActionMessage{ + public final String SYS_STATE = "state"; + public final String SYS_STATUS = "status"; + public final String SYS_MESSAGE = "message"; + public final String SYS_SUCESS_MESSAGE = "操作成功!"; + public final String SYS_FAIL_MESSAGE = "操作失败!"; + public final String SYS_NO_MESSAGE = "数据库无数据更新!"; + public static final String SYS_WARN = "系统出错!请联系管理员"; + public final String LMQ_SUCESS_MESSAGE = "SUCCESS"; + public final String LMQ_FAIL_MESSAGE = "FAIL"; + + public final String SYS_CODE = "code"; + public final String SYS_DATA = "data"; +} diff --git a/src/main/java/lingtao/net/bean/Article.java b/src/main/java/lingtao/net/bean/Article.java new file mode 100644 index 0000000..8b9c6d9 --- /dev/null +++ b/src/main/java/lingtao/net/bean/Article.java @@ -0,0 +1,125 @@ +package lingtao.net.bean; + +import java.util.Date; + +public class Article { + private Integer id; + + private String title; + + private String type; + + private String status; + + private String imagesUrl; + + private Integer hit; + + private String remark; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + + private String content; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title == null ? null : title.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getImagesUrl() { + return imagesUrl; + } + + public void setImagesUrl(String imagesUrl) { + this.imagesUrl = imagesUrl == null ? null : imagesUrl.trim(); + } + + public Integer getHit() { + return hit; + } + + public void setHit(Integer hit) { + this.hit = hit; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.trim(); + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/ArticleExample.java b/src/main/java/lingtao/net/bean/ArticleExample.java new file mode 100644 index 0000000..07fd71e --- /dev/null +++ b/src/main/java/lingtao/net/bean/ArticleExample.java @@ -0,0 +1,931 @@ +package lingtao.net.bean; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ArticleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ArticleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("type like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("type not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andImagesUrlIsNull() { + addCriterion("imagesUrl is null"); + return (Criteria) this; + } + + public Criteria andImagesUrlIsNotNull() { + addCriterion("imagesUrl is not null"); + return (Criteria) this; + } + + public Criteria andImagesUrlEqualTo(String value) { + addCriterion("imagesUrl =", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlNotEqualTo(String value) { + addCriterion("imagesUrl <>", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlGreaterThan(String value) { + addCriterion("imagesUrl >", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlGreaterThanOrEqualTo(String value) { + addCriterion("imagesUrl >=", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlLessThan(String value) { + addCriterion("imagesUrl <", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlLessThanOrEqualTo(String value) { + addCriterion("imagesUrl <=", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlLike(String value) { + addCriterion("imagesUrl like", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlNotLike(String value) { + addCriterion("imagesUrl not like", value, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlIn(List values) { + addCriterion("imagesUrl in", values, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlNotIn(List values) { + addCriterion("imagesUrl not in", values, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlBetween(String value1, String value2) { + addCriterion("imagesUrl between", value1, value2, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andImagesUrlNotBetween(String value1, String value2) { + addCriterion("imagesUrl not between", value1, value2, "imagesUrl"); + return (Criteria) this; + } + + public Criteria andHitIsNull() { + addCriterion("hit is null"); + return (Criteria) this; + } + + public Criteria andHitIsNotNull() { + addCriterion("hit is not null"); + return (Criteria) this; + } + + public Criteria andHitEqualTo(Integer value) { + addCriterion("hit =", value, "hit"); + return (Criteria) this; + } + + public Criteria andHitNotEqualTo(Integer value) { + addCriterion("hit <>", value, "hit"); + return (Criteria) this; + } + + public Criteria andHitGreaterThan(Integer value) { + addCriterion("hit >", value, "hit"); + return (Criteria) this; + } + + public Criteria andHitGreaterThanOrEqualTo(Integer value) { + addCriterion("hit >=", value, "hit"); + return (Criteria) this; + } + + public Criteria andHitLessThan(Integer value) { + addCriterion("hit <", value, "hit"); + return (Criteria) this; + } + + public Criteria andHitLessThanOrEqualTo(Integer value) { + addCriterion("hit <=", value, "hit"); + return (Criteria) this; + } + + public Criteria andHitIn(List values) { + addCriterion("hit in", values, "hit"); + return (Criteria) this; + } + + public Criteria andHitNotIn(List values) { + addCriterion("hit not in", values, "hit"); + return (Criteria) this; + } + + public Criteria andHitBetween(Integer value1, Integer value2) { + addCriterion("hit between", value1, value2, "hit"); + return (Criteria) this; + } + + public Criteria andHitNotBetween(Integer value1, Integer value2) { + addCriterion("hit not between", value1, value2, "hit"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andCreateByIsNull() { + addCriterion("createBy is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("createBy is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("createBy =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("createBy <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("createBy >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("createBy >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("createBy <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("createBy <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("createBy like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("createBy not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("createBy in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("createBy not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("createBy between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("createBy not between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateDateIsNull() { + addCriterion("createDate is null"); + return (Criteria) this; + } + + public Criteria andCreateDateIsNotNull() { + addCriterion("createDate is not null"); + return (Criteria) this; + } + + public Criteria andCreateDateEqualTo(Date value) { + addCriterion("createDate =", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateNotEqualTo(Date value) { + addCriterion("createDate <>", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateGreaterThan(Date value) { + addCriterion("createDate >", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateGreaterThanOrEqualTo(Date value) { + addCriterion("createDate >=", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateLessThan(Date value) { + addCriterion("createDate <", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateLessThanOrEqualTo(Date value) { + addCriterion("createDate <=", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateIn(List values) { + addCriterion("createDate in", values, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateNotIn(List values) { + addCriterion("createDate not in", values, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateBetween(Date value1, Date value2) { + addCriterion("createDate between", value1, value2, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateNotBetween(Date value1, Date value2) { + addCriterion("createDate not between", value1, value2, "createDate"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("updateBy is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("updateBy is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("updateBy =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("updateBy <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("updateBy >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("updateBy >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("updateBy <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("updateBy <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("updateBy like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("updateBy not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("updateBy in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("updateBy not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("updateBy between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("updateBy not between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateDateIsNull() { + addCriterion("updateDate is null"); + return (Criteria) this; + } + + public Criteria andUpdateDateIsNotNull() { + addCriterion("updateDate is not null"); + return (Criteria) this; + } + + public Criteria andUpdateDateEqualTo(Date value) { + addCriterion("updateDate =", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateNotEqualTo(Date value) { + addCriterion("updateDate <>", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateGreaterThan(Date value) { + addCriterion("updateDate >", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) { + addCriterion("updateDate >=", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateLessThan(Date value) { + addCriterion("updateDate <", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateLessThanOrEqualTo(Date value) { + addCriterion("updateDate <=", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateIn(List values) { + addCriterion("updateDate in", values, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateNotIn(List values) { + addCriterion("updateDate not in", values, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateBetween(Date value1, Date value2) { + addCriterion("updateDate between", value1, value2, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateNotBetween(Date value1, Date value2) { + addCriterion("updateDate not between", value1, value2, "updateDate"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/Bug.java b/src/main/java/lingtao/net/bean/Bug.java new file mode 100644 index 0000000..c0c7787 --- /dev/null +++ b/src/main/java/lingtao/net/bean/Bug.java @@ -0,0 +1,65 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 问题反馈 + * + * @author Administrator + * + */ +@Data +public class Bug { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProduct() { + return product; + } + + public void setProduct(String product) { + this.product = product; + } + + public String getBugRemark() { + return bugRemark; + } + + public void setBugRemark(String bugRemark) { + this.bugRemark = bugRemark; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + private Integer id; + + private String product; + + private String bugRemark; + + private String createBy; + + private Date createDate; +} diff --git a/src/main/java/lingtao/net/bean/CustomerAward.java b/src/main/java/lingtao/net/bean/CustomerAward.java new file mode 100644 index 0000000..cc08134 --- /dev/null +++ b/src/main/java/lingtao/net/bean/CustomerAward.java @@ -0,0 +1,129 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class CustomerAward { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public Double getPayPercent() { + return payPercent; + } + + public void setPayPercent(Double payPercent) { + this.payPercent = payPercent; + } + + public Double getAskNumber() { + return askNumber; + } + + public void setAskNumber(Double askNumber) { + this.askNumber = askNumber; + } + + public Double getCustomerPrice() { + return customerPrice; + } + + public void setCustomerPrice(Double customerPrice) { + this.customerPrice = customerPrice; + } + + public Integer getAward() { + return award; + } + + public void setAward(Integer award) { + this.award = award; + } + + public String getShopname() { + return shopname; + } + + public void setShopname(String shopname) { + this.shopname = shopname; + } + + public String getAwardDate() { + return awardDate; + } + + public void setAwardDate(String awardDate) { + this.awardDate = awardDate; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getCreateTimeBegin() { + return createTimeBegin; + } + + public void setCreateTimeBegin(String createTimeBegin) { + this.createTimeBegin = createTimeBegin; + } + + public String getCreateTimeEnd() { + return createTimeEnd; + } + + public void setCreateTimeEnd(String createTimeEnd) { + this.createTimeEnd = createTimeEnd; + } + + private Integer id; + + private String nickname; + + private Double payPercent; + + private Double askNumber; + + private Double customerPrice; + + private Integer award; + + private String shopname; + + private String awardDate; + + private String creator; + + private Date createDate; + + private String createTimeBegin; + + private String createTimeEnd; +} diff --git a/src/main/java/lingtao/net/bean/CustomerData.java b/src/main/java/lingtao/net/bean/CustomerData.java new file mode 100644 index 0000000..edf7ede --- /dev/null +++ b/src/main/java/lingtao/net/bean/CustomerData.java @@ -0,0 +1,241 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 客服数据 + * + * @author Administrator + * + */ +@Data +public class CustomerData { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public double getPrice() { + return price; + } + + public void setPrice(double price) { + this.price = price; + } + + public String getProductExplain() { + return productExplain; + } + + public void setProductExplain(String productExplain) { + this.productExplain = productExplain; + } + + public String getWangwang() { + return wangwang; + } + + public void setWangwang(String wangwang) { + this.wangwang = wangwang; + } + + public String getIsBuy() { + return isBuy; + } + + public void setIsBuy(String isBuy) { + this.isBuy = isBuy; + } + + public String getCommentSelf() { + return commentSelf; + } + + public void setCommentSelf(String commentSelf) { + this.commentSelf = commentSelf; + } + + public String getCommentManager() { + return commentManager; + } + + public void setCommentManager(String commentManager) { + this.commentManager = commentManager; + } + + public Date getCommentDate() { + return commentDate; + } + + public void setCommentDate(Date commentDate) { + this.commentDate = commentDate; + } + + public String getIsDelete() { + return isDelete; + } + + public void setIsDelete(String isDelete) { + this.isDelete = isDelete; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public Date getCompleteDate() { + return completeDate; + } + + public void setCompleteDate(Date completeDate) { + this.completeDate = completeDate; + } + + public String getRoleSearch() { + return roleSearch; + } + + public void setRoleSearch(String roleSearch) { + this.roleSearch = roleSearch; + } + + public String[] getRoleArr() { + return roleArr; + } + + public void setRoleArr(String[] roleArr) { + this.roleArr = roleArr; + } + + public String getCreateDateBegin() { + return createDateBegin; + } + + public void setCreateDateBegin(String createDateBegin) { + this.createDateBegin = createDateBegin; + } + + public String getCreateDateEnd() { + return createDateEnd; + } + + public void setCreateDateEnd(String createDateEnd) { + this.createDateEnd = createDateEnd; + } + + // 主键id + private Integer id; + + // 用户名 + private String username; + + // 真实姓名 + private String realname; + + // 所属店铺/角色 + private String role; + + // 价格 + private double price; + + // 产品说明 + private String productExplain; + + // 客人旺旺 + private String wangwang; + + // 是否购买 + private String isBuy; + + // 自评 + private String commentSelf; + + // 店长评语 + private String commentManager; + + // 店长评语时间 + private Date commentDate; + + // 是否删除 0:否 1:是 + private String isDelete; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + + // 完成时间 + private Date completeDate; + + // 根据角色(部门)查找数据 + private String roleSearch; + + // 用户所拥有的部门数组 + private String[] roleArr; + + private String createDateBegin; + + private String createDateEnd; + +} diff --git a/src/main/java/lingtao/net/bean/CustomerTrainContent.java b/src/main/java/lingtao/net/bean/CustomerTrainContent.java new file mode 100644 index 0000000..c3d3cd2 --- /dev/null +++ b/src/main/java/lingtao/net/bean/CustomerTrainContent.java @@ -0,0 +1,110 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class CustomerTrainContent { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProType() { + return proType; + } + + public void setProType(String proType) { + this.proType = proType; + } + + public String getKind() { + return kind; + } + + public void setKind(String kind) { + this.kind = kind; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private Integer id; + + private String proType; + + private String kind; + + private Integer sort; + + private String content; + + private String type; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + +} diff --git a/src/main/java/lingtao/net/bean/CustomerTrainKindLabel.java b/src/main/java/lingtao/net/bean/CustomerTrainKindLabel.java new file mode 100644 index 0000000..7cc1ada --- /dev/null +++ b/src/main/java/lingtao/net/bean/CustomerTrainKindLabel.java @@ -0,0 +1,110 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class CustomerTrainKindLabel { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProType() { + return proType; + } + + public void setProType(String proType) { + this.proType = proType; + } + + public String getKindLabel() { + return kindLabel; + } + + public void setKindLabel(String kindLabel) { + this.kindLabel = kindLabel; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private Integer id; + + private String proType; + + private String kindLabel; + + private String remark; + + private Integer sort; + + private String type; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + +} diff --git a/src/main/java/lingtao/net/bean/CustomerTrainProType.java b/src/main/java/lingtao/net/bean/CustomerTrainProType.java new file mode 100644 index 0000000..9216e48 --- /dev/null +++ b/src/main/java/lingtao/net/bean/CustomerTrainProType.java @@ -0,0 +1,100 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class CustomerTrainProType { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProType() { + return proType; + } + + public void setProType(String proType) { + this.proType = proType; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private Integer id; + + private String proType; + + private String remark; + + private Integer sort; + + private String type; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + +} diff --git a/src/main/java/lingtao/net/bean/ExpressFee.java b/src/main/java/lingtao/net/bean/ExpressFee.java new file mode 100644 index 0000000..923a129 --- /dev/null +++ b/src/main/java/lingtao/net/bean/ExpressFee.java @@ -0,0 +1,125 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 省份快递费 + * + * @author Administrator + * + */ +@Data +public class ExpressFee { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProvince() { + return province; + } + + public void setProvince(String province) { + this.province = province; + } + + public String getProTypeValue() { + return proTypeValue; + } + + public void setProTypeValue(String proTypeValue) { + this.proTypeValue = proTypeValue; + } + + public String getProTypeLabel() { + return proTypeLabel; + } + + public void setProTypeLabel(String proTypeLabel) { + this.proTypeLabel = proTypeLabel; + } + + public double getFirstWeightPrice() { + return firstWeightPrice; + } + + public void setFirstWeightPrice(double firstWeightPrice) { + this.firstWeightPrice = firstWeightPrice; + } + + public double getContinuedWeightPrice() { + return continuedWeightPrice; + } + + public void setContinuedWeightPrice(double continuedWeightPrice) { + this.continuedWeightPrice = continuedWeightPrice; + } + + public double getStartPrice() { + return startPrice; + } + + public void setStartPrice(double startPrice) { + this.startPrice = startPrice; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private Integer id; + + private String province; + + private String proTypeValue; + + private String proTypeLabel; + + private double firstWeightPrice; + + private double continuedWeightPrice; + + private double startPrice; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; +} diff --git a/src/main/java/lingtao/net/bean/Finance.java b/src/main/java/lingtao/net/bean/Finance.java new file mode 100644 index 0000000..9caf72e --- /dev/null +++ b/src/main/java/lingtao/net/bean/Finance.java @@ -0,0 +1,149 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class Finance { + + private Integer id; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Date getAddTime() { + return addTime; + } + + public void setAddTime(Date addTime) { + this.addTime = addTime; + } + + public String getSupplier() { + return supplier; + } + + public void setSupplier(String supplier) { + this.supplier = supplier; + } + + public String getShopname() { + return shopname; + } + + public void setShopname(String shopname) { + this.shopname = shopname; + } + + public String getKind() { + return kind; + } + + public void setKind(String kind) { + this.kind = kind; + } + + public String getKind2() { + return kind2; + } + + public void setKind2(String kind2) { + this.kind2 = kind2; + } + + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getCount() { + return count; + } + + public void setCount(String count) { + this.count = count; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public String getZhang() { + return zhang; + } + + public void setZhang(String zhang) { + this.zhang = zhang; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + private Date addTime; + + private String supplier; + + private String shopname; + + private String kind; + + private String kind2; + + private String orderNumber; + + private String filename; + + private String count; + + private String number; + + private String zhang; + + private String remark; + + private Date createDate; + + private String creator; +} diff --git a/src/main/java/lingtao/net/bean/FinanceDifference.java b/src/main/java/lingtao/net/bean/FinanceDifference.java new file mode 100644 index 0000000..31effb8 --- /dev/null +++ b/src/main/java/lingtao/net/bean/FinanceDifference.java @@ -0,0 +1,135 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 拆分补差价单号 + * + * @author Administrator + * + */ +@Data +public class FinanceDifference { + + private Integer id; + + private String orderNumber; + + private String shopname; + + private String wangwang; + + private Date payTime; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + public String getShopname() { + return shopname; + } + + public void setShopname(String shopname) { + this.shopname = shopname; + } + + public String getWangwang() { + return wangwang; + } + + public void setWangwang(String wangwang) { + this.wangwang = wangwang; + } + + public Date getPayTime() { + return payTime; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getTaobaoStatus() { + return taobaoStatus; + } + + public void setTaobaoStatus(String taobaoStatus) { + this.taobaoStatus = taobaoStatus; + } + + public String getOpenOrderNumber() { + return openOrderNumber; + } + + public void setOpenOrderNumber(String openOrderNumber) { + this.openOrderNumber = openOrderNumber; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + private String price; + + private String remark; + + private String taobaoStatus; + + private String openOrderNumber; + + private String filename; + + private String creator; + + private Date createDate; +} diff --git a/src/main/java/lingtao/net/bean/FinanceExtract.java b/src/main/java/lingtao/net/bean/FinanceExtract.java new file mode 100644 index 0000000..d7d0c88 --- /dev/null +++ b/src/main/java/lingtao/net/bean/FinanceExtract.java @@ -0,0 +1,115 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 提取尺寸 + * + * @author Administrator + * + */ +@Data +public class FinanceExtract { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + public String getLength() { + return length; + } + + public void setLength(String length) { + this.length = length; + } + + public String getWidth() { + return width; + } + + public void setWidth(String width) { + this.width = width; + } + + public String getHeight() { + return height; + } + + public void setHeight(String height) { + this.height = height; + } + + public String getCount() { + return count; + } + + public void setCount(String count) { + this.count = count; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getCreator() { + return creator; + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + private Integer id; + + private String orderNumber; + + private String length; + + private String width; + + private String height; + + private String count; + + private String remark; + + private String filename; + + private String creator; + + private Date createDate; +} diff --git a/src/main/java/lingtao/net/bean/Information.java b/src/main/java/lingtao/net/bean/Information.java new file mode 100644 index 0000000..5ce8fc3 --- /dev/null +++ b/src/main/java/lingtao/net/bean/Information.java @@ -0,0 +1,85 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 产品知识点; + * + * @author Administrator + * + */ +@Data +public class Information { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private Integer id; + + private String content; + + private String type; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; +} diff --git a/src/main/java/lingtao/net/bean/LoginIp.java b/src/main/java/lingtao/net/bean/LoginIp.java new file mode 100644 index 0000000..06141cb --- /dev/null +++ b/src/main/java/lingtao/net/bean/LoginIp.java @@ -0,0 +1,86 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 允许登录的IP + * + * @author Administrator + * + */ +@Data +public class LoginIp { + + private Integer id; + + private String agreeIp; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getAgreeIp() { + return agreeIp; + } + + public void setAgreeIp(String agreeIp) { + this.agreeIp = agreeIp; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return CreateDate; + } + + public void setCreateDate(Date createDate) { + CreateDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + private String remark; + + private String createBy; + + private Date CreateDate; + + private String updateBy; + + private Date updateTime; + +} diff --git a/src/main/java/lingtao/net/bean/LoginLog.java b/src/main/java/lingtao/net/bean/LoginLog.java new file mode 100644 index 0000000..bfa178c --- /dev/null +++ b/src/main/java/lingtao/net/bean/LoginLog.java @@ -0,0 +1,54 @@ +package lingtao.net.bean; + +import java.util.Date; +import lombok.Data; + +/** + * 登录日志 + * + * @author Administrator + * + */ +@Data +public class LoginLog { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Date getLoginTime() { + return loginTime; + } + + public void setLoginTime(Date loginTime) { + this.loginTime = loginTime; + } + + private Integer id; + + private String remark; + + private String status; + + private Date loginTime; +} diff --git a/src/main/java/lingtao/net/bean/Msg.java b/src/main/java/lingtao/net/bean/Msg.java new file mode 100644 index 0000000..2186167 --- /dev/null +++ b/src/main/java/lingtao/net/bean/Msg.java @@ -0,0 +1,102 @@ +package lingtao.net.bean; + +import java.util.HashMap; +import java.util.Map; + +import lombok.Data; + +/** + * 通用的返回的类 + */ +@Data +public class Msg { + + // 状态码 200--成功 100--失败 300禁用 + private int code; + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } + + public Map getData() { + return data; + } + + public void setData(Map data) { + this.data = data; + } + + // 提示信息 + private String msg; + + // 用户要返回给浏览器的数据 + private Map data = new HashMap(); + + public static Msg success() { + Msg result = new Msg(); + result.setCode(200); + result.setMsg("成功"); + return result; + } + + public static Msg success(String msg) { + Msg result = new Msg(); + result.setCode(200); + result.setMsg(msg); + return result; + } + + public static Msg fail() { + Msg result = new Msg(); + result.setCode(100); + result.setMsg("失败"); + return result; + } + + public static Msg fail(String msg) { + Msg result = new Msg(); + result.setCode(100); + result.setMsg(msg); + return result; + } + + public static Msg fail(Integer code, String msg) { + Msg result = new Msg(); + result.setCode(code); + result.setMsg(msg); + return result; + } + + public static Msg isDisable() { + Msg result = new Msg(); + result.setCode(300); + result.setMsg("失败"); + return result; + } + + public static Msg isDisable(String msg) { + Msg result = new Msg(); + result.setCode(300); + result.setMsg(msg); + return result; + } + + public Msg add(String key, Object value) { + this.getData().put(key, value); + return this; + + } + +} diff --git a/src/main/java/lingtao/net/bean/MyFile.java b/src/main/java/lingtao/net/bean/MyFile.java new file mode 100644 index 0000000..4b56d5d --- /dev/null +++ b/src/main/java/lingtao/net/bean/MyFile.java @@ -0,0 +1,85 @@ +package lingtao.net.bean; + +import java.util.Date; + +public class MyFile { + private Integer fileId; + + private String fileName; + + private String filePath; + + private String remark; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + + public Integer getFileId() { + return fileId; + } + + public void setFileId(Integer fileId) { + this.fileId = fileId; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName == null ? null : fileName.trim(); + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath == null ? null : filePath.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.trim(); + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/MyFileExample.java b/src/main/java/lingtao/net/bean/MyFileExample.java new file mode 100644 index 0000000..62b43f2 --- /dev/null +++ b/src/main/java/lingtao/net/bean/MyFileExample.java @@ -0,0 +1,731 @@ +package lingtao.net.bean; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class MyFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public MyFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andFileIdIsNull() { + addCriterion("fileId is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("fileId is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(Integer value) { + addCriterion("fileId =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(Integer value) { + addCriterion("fileId <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(Integer value) { + addCriterion("fileId >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(Integer value) { + addCriterion("fileId >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(Integer value) { + addCriterion("fileId <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(Integer value) { + addCriterion("fileId <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("fileId in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("fileId not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(Integer value1, Integer value2) { + addCriterion("fileId between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(Integer value1, Integer value2) { + addCriterion("fileId not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileNameIsNull() { + addCriterion("fileName is null"); + return (Criteria) this; + } + + public Criteria andFileNameIsNotNull() { + addCriterion("fileName is not null"); + return (Criteria) this; + } + + public Criteria andFileNameEqualTo(String value) { + addCriterion("fileName =", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotEqualTo(String value) { + addCriterion("fileName <>", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThan(String value) { + addCriterion("fileName >", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameGreaterThanOrEqualTo(String value) { + addCriterion("fileName >=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThan(String value) { + addCriterion("fileName <", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLessThanOrEqualTo(String value) { + addCriterion("fileName <=", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameLike(String value) { + addCriterion("fileName like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotLike(String value) { + addCriterion("fileName not like", value, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameIn(List values) { + addCriterion("fileName in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotIn(List values) { + addCriterion("fileName not in", values, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameBetween(String value1, String value2) { + addCriterion("fileName between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFileNameNotBetween(String value1, String value2) { + addCriterion("fileName not between", value1, value2, "fileName"); + return (Criteria) this; + } + + public Criteria andFilePathIsNull() { + addCriterion("filePath is null"); + return (Criteria) this; + } + + public Criteria andFilePathIsNotNull() { + addCriterion("filePath is not null"); + return (Criteria) this; + } + + public Criteria andFilePathEqualTo(String value) { + addCriterion("filePath =", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotEqualTo(String value) { + addCriterion("filePath <>", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathGreaterThan(String value) { + addCriterion("filePath >", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathGreaterThanOrEqualTo(String value) { + addCriterion("filePath >=", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathLessThan(String value) { + addCriterion("filePath <", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathLessThanOrEqualTo(String value) { + addCriterion("filePath <=", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathLike(String value) { + addCriterion("filePath like", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotLike(String value) { + addCriterion("filePath not like", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathIn(List values) { + addCriterion("filePath in", values, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotIn(List values) { + addCriterion("filePath not in", values, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathBetween(String value1, String value2) { + addCriterion("filePath between", value1, value2, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotBetween(String value1, String value2) { + addCriterion("filePath not between", value1, value2, "filePath"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andCreateByIsNull() { + addCriterion("createBy is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("createBy is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("createBy =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("createBy <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("createBy >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("createBy >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("createBy <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("createBy <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("createBy like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("createBy not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("createBy in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("createBy not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("createBy between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("createBy not between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateDateIsNull() { + addCriterion("createDate is null"); + return (Criteria) this; + } + + public Criteria andCreateDateIsNotNull() { + addCriterion("createDate is not null"); + return (Criteria) this; + } + + public Criteria andCreateDateEqualTo(Date value) { + addCriterion("createDate =", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateNotEqualTo(Date value) { + addCriterion("createDate <>", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateGreaterThan(Date value) { + addCriterion("createDate >", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateGreaterThanOrEqualTo(Date value) { + addCriterion("createDate >=", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateLessThan(Date value) { + addCriterion("createDate <", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateLessThanOrEqualTo(Date value) { + addCriterion("createDate <=", value, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateIn(List values) { + addCriterion("createDate in", values, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateNotIn(List values) { + addCriterion("createDate not in", values, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateBetween(Date value1, Date value2) { + addCriterion("createDate between", value1, value2, "createDate"); + return (Criteria) this; + } + + public Criteria andCreateDateNotBetween(Date value1, Date value2) { + addCriterion("createDate not between", value1, value2, "createDate"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("updateBy is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("updateBy is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("updateBy =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("updateBy <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("updateBy >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("updateBy >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("updateBy <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("updateBy <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("updateBy like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("updateBy not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("updateBy in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("updateBy not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("updateBy between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("updateBy not between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateDateIsNull() { + addCriterion("updateDate is null"); + return (Criteria) this; + } + + public Criteria andUpdateDateIsNotNull() { + addCriterion("updateDate is not null"); + return (Criteria) this; + } + + public Criteria andUpdateDateEqualTo(Date value) { + addCriterion("updateDate =", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateNotEqualTo(Date value) { + addCriterion("updateDate <>", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateGreaterThan(Date value) { + addCriterion("updateDate >", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) { + addCriterion("updateDate >=", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateLessThan(Date value) { + addCriterion("updateDate <", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateLessThanOrEqualTo(Date value) { + addCriterion("updateDate <=", value, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateIn(List values) { + addCriterion("updateDate in", values, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateNotIn(List values) { + addCriterion("updateDate not in", values, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateBetween(Date value1, Date value2) { + addCriterion("updateDate between", value1, value2, "updateDate"); + return (Criteria) this; + } + + public Criteria andUpdateDateNotBetween(Date value1, Date value2) { + addCriterion("updateDate not between", value1, value2, "updateDate"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/Product.java b/src/main/java/lingtao/net/bean/Product.java new file mode 100644 index 0000000..721802d --- /dev/null +++ b/src/main/java/lingtao/net/bean/Product.java @@ -0,0 +1,168 @@ +package lingtao.net.bean; + +import lombok.Data; + +import java.util.Date; + +@Data +public class Product { + // id + private Integer proId; + + // 长度 + private Double length; + + // 宽度 + private Double width; + + // 数量 + private Integer count; + + // 面积 + private Double area; + + // 价格 + private Double price; + + // 价格倍数 + private Double priceMultiple; + + // 折扣价 + private Double discountPrice; + + // 底价 + private Double floorPrice; + + // 重量 + private String weight; + + // 产品种类 + private String proTypeValue; + + // 产品种类说明 + private String proTypeLabel; + + // 产品品种类型 + private String kindValue; + + // 产品品种类型说明 + private String kindLabel; + + private String kind1Value; + + private String kind1Label; + + private String kind2Value; + + private String kind2Label; + + private String updater; + + private Date updateDate; + + /* ========================= */ + + // 尺寸 + private String size; + + // 工艺 + private String craft[]; + + // 不干胶种类标识--常规/少数量 + private String stickerKind; + // 透明不干胶印白墨 + private String yinbai; + // 款数 + private Integer number; + // 位数 + private Integer num; + // 手提袋/合版封套/房卡套种类标识 + private String k; + // 卡片、金属标种类标识 + private String kind; + // 吊旗300克铜版纸走优惠券价格--标识 + private String d; + // 吊旗300克铜版纸走优惠券价格--0-20位贵10块、20以上5块 + private Integer p; + // 卡片种类标识--常规/少数量 + private String couponKind; + // 自定义尺寸复选开关 + private boolean switchSize; + // 卡片- 特种纸名片 -珠光纸自定义数量 + private boolean switchCardCount; + // 卡片--存酒卡编码类型 + private String bianma; + // 手提袋自定义数量 + private boolean diyCount; + // 模切工艺 + private String craftQie; + // 不干胶模切工艺类型 + private String craftQieType; + // 覆膜/PVC名片印刷 + private String craftMo; + // 凹凸工艺 + private String aotu; + // 烫金工艺 + private String craftTang; + // 0.38PVC亮光异型卡片背胶工艺 + private String craftJiao; + // 海报-双喷布的工艺 + private String craftBu; + // 桌贴印刷工艺 + private String craftShua; + // 印刷烫金工艺长/宽 + private double lengthTang; + private double widthTang; + // 宣传单折页折数 + private Integer zheye; + // 宣传单压痕数 + private Integer yaheng; + // 便签本种类标识--联单/便签本 + private String notePaperKind; + // 画册P数 + private Integer pcount; + // 画册装订方式 + private String kind3Value; + // 角色标识--用于不同店铺不同价格 + private String role; + // UV转印贴显示信息(出货时间) + private String Msg; + // 报价给哪个客户旺旺号 + private String wangwang; + // 吊牌600克第二尺寸 + private String size1; + // 服装吊牌绳子 + private String craftSheng; + // 合板封套长/宽/舌头(高) + private double lengthSize; + private double widthSize; + private double heightSize; + private String craftTiao;//条幅工艺 + + // 印艺接口参数 + private Double xx;// 长度 + private Double yy;// 宽度 + private Integer shuliang;// 数量 + private Integer pinzhong;// 款数 + private String cailiao;// 种类 + private String fm;// 覆膜 + private String fmType;//卡片贴膜类型 0贴膜1配膜 + private Integer awards;//奖项 + private Integer stickNum;//几处贴膜 + + private String switchz3Size;//种子纸是否自定义尺寸 + private String z3type;//种子纸是否自定义尺寸 + + private String toothpick_size;//牙签规格 + + private String craftPai; + + //内部模切参数 + private Integer n_mq_num; + private String n_mq_size; + //位置数,颜色数 + private Integer po_number; + private Integer co_number; + private Integer shen_type; + private String shen_color; +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/ProductImg.java b/src/main/java/lingtao/net/bean/ProductImg.java new file mode 100644 index 0000000..f24e611 --- /dev/null +++ b/src/main/java/lingtao/net/bean/ProductImg.java @@ -0,0 +1,197 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class ProductImg { + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getProTypeLabel() { + return proTypeLabel; + } + + public void setProTypeLabel(String proTypeLabel) { + this.proTypeLabel = proTypeLabel; + } + + public String getProTypeValue() { + return proTypeValue; + } + + public void setProTypeValue(String proTypeValue) { + this.proTypeValue = proTypeValue; + } + + public String getKindValue() { + return kindValue; + } + + public void setKindValue(String kindValue) { + this.kindValue = kindValue; + } + + public String getKindLabel() { + return kindLabel; + } + + public void setKindLabel(String kindLabel) { + this.kindLabel = kindLabel; + } + + public String getKind2Value() { + return kind2Value; + } + + public void setKind2Value(String kind2Value) { + this.kind2Value = kind2Value; + } + + public String getKind2Label() { + return kind2Label; + } + + public void setKind2Label(String kind2Label) { + this.kind2Label = kind2Label; + } + + public String getImgUrl() { + return imgUrl; + } + + public void setImgUrl(String imgUrl) { + this.imgUrl = imgUrl; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public Long getCreator() { + return creator; + } + + public void setCreator(Long creator) { + this.creator = creator; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Long getUpdater() { + return updater; + } + + public void setUpdater(Long updater) { + this.updater = updater; + } + + public String getImgWidth() { + return imgWidth; + } + + public void setImgWidth(String imgWidth) { + this.imgWidth = imgWidth; + } + + public String getImgHeight() { + return imgHeight; + } + + public void setImgHeight(String imgHeight) { + this.imgHeight = imgHeight; + } + + /** + * + */ + private Long id; + + /** + * 产品名称 + */ + private String proTypeLabel; + + /** + * 名称编号 + */ + private String proTypeValue; + + /** + * 产品种类1 + */ + private String kindValue; + + /** + * 产品种类说明1 + */ + private String kindLabel; + + /** + * 产品种类2 + */ + private String kind2Value; + + /** + * 产品种类说明2 + */ + private String kind2Label; + + /** + * 图片地址 + */ + private String imgUrl; + + /** + * 产品说明 + */ + private String remark; + + /** + * 文件名字 + */ + private String filename; + + /** + * 创建者 + */ + private Long creator; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 更新者 + */ + private Long updater; + + private String imgWidth; + + private String imgHeight; +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/Question.java b/src/main/java/lingtao/net/bean/Question.java new file mode 100644 index 0000000..ee5a2d5 --- /dev/null +++ b/src/main/java/lingtao/net/bean/Question.java @@ -0,0 +1,146 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 产品知识测试表 + * + * @author Administrator + * + */ +@Data +public class Question { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getQuestion() { + return question; + } + + public void setQuestion(String question) { + this.question = question; + } + + public String getAnswer() { + return answer; + } + + public void setAnswer(String answer) { + this.answer = answer; + } + + public String getAnswer1() { + return answer1; + } + + public void setAnswer1(String answer1) { + this.answer1 = answer1; + } + + public String getAnswer2() { + return answer2; + } + + public void setAnswer2(String answer2) { + this.answer2 = answer2; + } + + public String getAnswer3() { + return answer3; + } + + public void setAnswer3(String answer3) { + this.answer3 = answer3; + } + + public String getAnswer4() { + return answer4; + } + + public void setAnswer4(String answer4) { + this.answer4 = answer4; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getAnsCount() { + return ansCount; + } + + public void setAnsCount(Integer ansCount) { + this.ansCount = ansCount; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private Integer id; + + private String question; + + private String answer; + + private String answer1; + + private String answer2; + + private String answer3; + + private String answer4; + + // 题目类型 0:单选 1:多选 + private String type; + + private Integer ansCount; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; +} diff --git a/src/main/java/lingtao/net/bean/QuoteData.java b/src/main/java/lingtao/net/bean/QuoteData.java new file mode 100644 index 0000000..5f643fa --- /dev/null +++ b/src/main/java/lingtao/net/bean/QuoteData.java @@ -0,0 +1,429 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 操作日志--供新增客服数据,只保留几天数据 + * + * @author Administrator + * + */ +@Data +public class QuoteData { + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getRemarkJudge() { + return remarkJudge; + } + + public void setRemarkJudge(String remarkJudge) { + this.remarkJudge = remarkJudge; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } + + public String getShopname() { + return shopname; + } + + public void setShopname(String shopname) { + this.shopname = shopname; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public Date getQuoteTime() { + return quoteTime; + } + + public void setQuoteTime(Date quoteTime) { + this.quoteTime = quoteTime; + } + + public String getWangwang() { + return wangwang; + } + + public void setWangwang(String wangwang) { + this.wangwang = wangwang; + } + + public String getIsBuy() { + return isBuy; + } + + public void setIsBuy(String isBuy) { + this.isBuy = isBuy; + } + + public Date getBuyDate() { + return buyDate; + } + + public void setBuyDate(Date buyDate) { + this.buyDate = buyDate; + } + + public String getIsBuyToDay() { + return isBuyToDay; + } + + public void setIsBuyToDay(String isBuyToDay) { + this.isBuyToDay = isBuyToDay; + } + + public Date getIsBuyToDayDate() { + return isBuyToDayDate; + } + + public void setIsBuyToDayDate(Date isBuyToDayDate) { + this.isBuyToDayDate = isBuyToDayDate; + } + + public String getCommentSelf() { + return commentSelf; + } + + public void setCommentSelf(String commentSelf) { + this.commentSelf = commentSelf; + } + + public Date getCommentSelfDate() { + return commentSelfDate; + } + + public void setCommentSelfDate(Date commentSelfDate) { + this.commentSelfDate = commentSelfDate; + } + + public String getCommentManager() { + return commentManager; + } + + public void setCommentManager(String commentManager) { + this.commentManager = commentManager; + } + + public Date getCommentManagerDate() { + return commentManagerDate; + } + + public void setCommentManagerDate(Date commentManagerDate) { + this.commentManagerDate = commentManagerDate; + } + + public String getIsSelect() { + return isSelect; + } + + public void setIsSelect(String isSelect) { + this.isSelect = isSelect; + } + + public Date getSelectDate() { + return selectDate; + } + + public void setSelectDate(Date selectDate) { + this.selectDate = selectDate; + } + + public String getIsFillIn() { + return isFillIn; + } + + public void setIsFillIn(String isFillIn) { + this.isFillIn = isFillIn; + } + + public Date getFillInDate() { + return fillInDate; + } + + public void setFillInDate(Date fillInDate) { + this.fillInDate = fillInDate; + } + + public String getProTypeLabel() { + return proTypeLabel; + } + + public void setProTypeLabel(String proTypeLabel) { + this.proTypeLabel = proTypeLabel; + } + + public Double getBuyPrice() { + return buyPrice; + } + + public void setBuyPrice(Double buyPrice) { + this.buyPrice = buyPrice; + } + + public String getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + public String getRoleSearch() { + return roleSearch; + } + + public void setRoleSearch(String roleSearch) { + this.roleSearch = roleSearch; + } + + public String[] getRoleArr() { + return roleArr; + } + + public void setRoleArr(String[] roleArr) { + this.roleArr = roleArr; + } + + public String[] getRoleSearchArr() { + return roleSearchArr; + } + + public void setRoleSearchArr(String[] roleSearchArr) { + this.roleSearchArr = roleSearchArr; + } + + public String getQuoteTimeBegin() { + return quoteTimeBegin; + } + + public void setQuoteTimeBegin(String quoteTimeBegin) { + this.quoteTimeBegin = quoteTimeBegin; + } + + public String getQuoteTimeEnd() { + return quoteTimeEnd; + } + + public void setQuoteTimeEnd(String quoteTimeEnd) { + this.quoteTimeEnd = quoteTimeEnd; + } + + public Double getAllData() { + return allData; + } + + public void setAllData(Double allData) { + this.allData = allData; + } + + public Double getAllNotBuy() { + return allNotBuy; + } + + public void setAllNotBuy(Double allNotBuy) { + this.allNotBuy = allNotBuy; + } + + public Double getAllBuy() { + return allBuy; + } + + public void setAllBuy(Double allBuy) { + this.allBuy = allBuy; + } + + public Double getTodayBuy() { + return todayBuy; + } + + public void setTodayBuy(Double todayBuy) { + this.todayBuy = todayBuy; + } + + public Double getNotTodayBuy() { + return notTodayBuy; + } + + public void setNotTodayBuy(Double notTodayBuy) { + this.notTodayBuy = notTodayBuy; + } + + public Double getAllBuyPrice() { + return allBuyPrice; + } + + public void setAllBuyPrice(Double allBuyPrice) { + this.allBuyPrice = allBuyPrice; + } + + public Double getTodayBuyPrice() { + return todayBuyPrice; + } + + public void setTodayBuyPrice(Double todayBuyPrice) { + this.todayBuyPrice = todayBuyPrice; + } + + public Double getNotTodayBuyPrice() { + return notTodayBuyPrice; + } + + public void setNotTodayBuyPrice(Double notTodayBuyPrice) { + this.notTodayBuyPrice = notTodayBuyPrice; + } + + public Double getAllBuyPercentage() { + return allBuyPercentage; + } + + public void setAllBuyPercentage(Double allBuyPercentage) { + this.allBuyPercentage = allBuyPercentage; + } + + public String getIsSelfShop() { + return isSelfShop; + } + + public void setIsSelfShop(String isSelfShop) { + this.isSelfShop = isSelfShop; + } + + public String getByProTypeLabel() { + return byProTypeLabel; + } + + public void setByProTypeLabel(String byProTypeLabel) { + this.byProTypeLabel = byProTypeLabel; + } + + private Integer id; + + private String remark; + + private String remarkJudge; + + private String role; + + private String username; + + private String realname; + + private String shopname; + + private Double price; + + private Date quoteTime; + + private String wangwang; + + private String isBuy; + + private Date buyDate; + + private String isBuyToDay; + + private Date isBuyToDayDate; + + private String commentSelf; + + private Date commentSelfDate; + + private String commentManager; + + private Date commentManagerDate; + + private String isSelect; + + private Date selectDate; + + private String isFillIn; + + private Date fillInDate; + + private String proTypeLabel; + + private Double buyPrice; + + private String orderNumber; + + /*================*/ + + // 根据角色(部门)查找数据 + private String roleSearch; + + // 用户所拥有的部门数组 + private String[] roleArr; + + private String[] roleSearchArr; + + private String quoteTimeBegin; + + private String quoteTimeEnd; + + private Double allData; + + private Double allNotBuy; + + private Double allBuy; + + private Double todayBuy; + + private Double notTodayBuy; + + private Double allBuyPrice; + + private Double todayBuyPrice; + + private Double notTodayBuyPrice; + + private Double allBuyPercentage; + + private String isSelfShop; + + private String byProTypeLabel; +} diff --git a/src/main/java/lingtao/net/bean/QuoteLog.java b/src/main/java/lingtao/net/bean/QuoteLog.java new file mode 100644 index 0000000..f548581 --- /dev/null +++ b/src/main/java/lingtao/net/bean/QuoteLog.java @@ -0,0 +1,135 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 报价操作日志 + * + * @author Administrator + * + */ +@Data +public class QuoteLog { + + public Integer getQuoteId() { + return quoteId; + } + + public void setQuoteId(Integer quoteId) { + this.quoteId = quoteId; + } + + public Date getQuoteTime() { + return quoteTime; + } + + public void setQuoteTime(Date quoteTime) { + this.quoteTime = quoteTime; + } + + public String getQuoteIp() { + return quoteIp; + } + + public void setQuoteIp(String quoteIp) { + this.quoteIp = quoteIp; + } + + public String getOs() { + return os; + } + + public void setOs(String os) { + this.os = os; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } + + public String getBrower() { + return brower; + } + + public void setBrower(String brower) { + this.brower = brower; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getShopname() { + return Shopname; + } + + public void setShopname(String shopname) { + Shopname = shopname; + } + + public Double getPrice() { + return price; + } + + public void setPrice(Double price) { + this.price = price; + } + + public String getQuoteTimeBegin() { + return quoteTimeBegin; + } + + public void setQuoteTimeBegin(String quoteTimeBegin) { + this.quoteTimeBegin = quoteTimeBegin; + } + + public String getQuoteTimeEnd() { + return quoteTimeEnd; + } + + public void setQuoteTimeEnd(String quoteTimeEnd) { + this.quoteTimeEnd = quoteTimeEnd; + } + + private Integer quoteId; + + private Date quoteTime; + + private String quoteIp; + + private String os; + + private String username; + + private String realname; + + private String brower; + + private String remark; + + private String Shopname; + + private Double price; + + private String quoteTimeBegin; + + private String quoteTimeEnd; +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/SysDictProduct.java b/src/main/java/lingtao/net/bean/SysDictProduct.java new file mode 100644 index 0000000..361211a --- /dev/null +++ b/src/main/java/lingtao/net/bean/SysDictProduct.java @@ -0,0 +1,161 @@ +package lingtao.net.bean; + +import lombok.Data; + +@Data +public class SysDictProduct { + + public Integer getProId() { + return proId; + } + + public void setProId(Integer proId) { + this.proId = proId; + } + + public String getKindValue() { + return kindValue; + } + + public void setKindValue(String kindValue) { + this.kindValue = kindValue; + } + + public String getKindLabel() { + return kindLabel; + } + + public void setKindLabel(String kindLabel) { + this.kindLabel = kindLabel; + } + + public String getKind2Value() { + return kind2Value; + } + + public void setKind2Value(String kind2Value) { + this.kind2Value = kind2Value; + } + + public String getKind2Label() { + return kind2Label; + } + + public void setKind2Label(String kind2Label) { + this.kind2Label = kind2Label; + } + + public Double getKindPrice() { + return kindPrice; + } + + public void setKindPrice(Double kindPrice) { + this.kindPrice = kindPrice; + } + + public Double getDiscountPrice() { + return discountPrice; + } + + public void setDiscountPrice(Double discountPrice) { + this.discountPrice = discountPrice; + } + + public Double getFloorPrice() { + return floorPrice; + } + + public void setFloorPrice(Double floorPrice) { + this.floorPrice = floorPrice; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getProTypeValue() { + return proTypeValue; + } + + public void setProTypeValue(String proTypeValue) { + this.proTypeValue = proTypeValue; + } + + public String getProTypeLabel() { + return proTypeLabel; + } + + public void setProTypeLabel(String proTypeLabel) { + this.proTypeLabel = proTypeLabel; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + /** + * + */ + private Integer proId; + + /** + * 值 + */ + private String kindValue; + + /** + * 种类名称 + */ + private String kindLabel; + /** + * 值 + */ + private String kind2Value; + + /** + * 种类名称 + */ + private String kind2Label; + /** + * 报价单价 + */ + private Double kindPrice; + + /** + * 打折报价 + */ + private Double discountPrice; + + /** + * 跳楼价报价 + */ + private Double floorPrice; + + /** + * 重量 + */ + private Double weight; + + /** + * 名称 + */ + private String proTypeValue; + + /** + * 产品类型 + */ + private String proTypeLabel; + + /** + * 说明 + */ + private String remark; +} diff --git a/src/main/java/lingtao/net/bean/SysDictSearchPro.java b/src/main/java/lingtao/net/bean/SysDictSearchPro.java new file mode 100644 index 0000000..529461d --- /dev/null +++ b/src/main/java/lingtao/net/bean/SysDictSearchPro.java @@ -0,0 +1,106 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +@Data +public class SysDictSearchPro { + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getProTypeLabel() { + return proTypeLabel; + } + public void setProTypeLabel(String proTypeLabel) { + this.proTypeLabel = proTypeLabel; + } + public String getLikeProTypeLabel() { + return likeProTypeLabel; + } + public void setLikeProTypeLabel(String likeProTypeLabel) { + this.likeProTypeLabel = likeProTypeLabel; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + public String getCreator() { + return creator; + } + public void setCreator(String creator) { + this.creator = creator; + } + public Date getCreateDate() { + return createDate; + } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + public String getUpdater() { + return updater; + } + public void setUpdater(String updater) { + this.updater = updater; + } + public Date getUpdateDate() { + return updateDate; + } + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + /** + * + */ + private Integer id; + + /** + * 产品名称 + */ + private String proTypeLabel; + + /** + * 产品名称 + */ + private String likeProTypeLabel; + + /** + * 产品名称 + */ + private String status; + + /** + * 图片地址 + */ + private String url; + + /** + * 创建者 + */ + private String creator; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 更新者 + */ + private String updater; + /** + * 创建时间 + */ + private Date updateDate; +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/SysPermission.java b/src/main/java/lingtao/net/bean/SysPermission.java new file mode 100644 index 0000000..a9aaf8a --- /dev/null +++ b/src/main/java/lingtao/net/bean/SysPermission.java @@ -0,0 +1,145 @@ +package lingtao.net.bean; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +import lombok.Data; + +@Data +public class SysPermission implements Serializable { + private static final long serialVersionUID = 1L; + private Integer perId; + private String perName; + private String url; + private String type; + private String perCode; + private String perIcon; + private Integer parentId; + public Integer getPerId() { + return perId; + } + + public void setPerId(Integer perId) { + this.perId = perId; + } + + public String getPerName() { + return perName; + } + + public void setPerName(String perName) { + this.perName = perName; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getPerCode() { + return perCode; + } + + public void setPerCode(String perCode) { + this.perCode = perCode; + } + + public String getPerIcon() { + return perIcon; + } + + public void setPerIcon(String perIcon) { + this.perIcon = perIcon; + } + + public Integer getParentId() { + return parentId; + } + + public void setParentId(Integer parentId) { + this.parentId = parentId; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getThirdOrderName() { + return thirdOrderName; + } + + public void setThirdOrderName(String thirdOrderName) { + this.thirdOrderName = thirdOrderName; + } + + public Integer getThirdParentId() { + return thirdParentId; + } + + public void setThirdParentId(Integer thirdParentId) { + this.thirdParentId = thirdParentId; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public boolean isOpen() { + return open; + } + + public void setOpen(boolean open) { + this.open = open; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + public static long getSerialversionuid() { + return serialVersionUID; + } + + private String orderNo; + private String thirdOrderName; + private Integer thirdParentId; + private String createBy; + private Date createDate; + + private boolean open = true; + + private List children; // 子权限集合 + +} diff --git a/src/main/java/lingtao/net/bean/SysRole.java b/src/main/java/lingtao/net/bean/SysRole.java new file mode 100644 index 0000000..8d88618 --- /dev/null +++ b/src/main/java/lingtao/net/bean/SysRole.java @@ -0,0 +1,95 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 角色 + * + * @author Administrator + * + */ +@Data +public class SysRole { + private Integer roleId; + + private String roleName; + + private String isRegist; + + private String remark; + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } + + public String getRoleName() { + return roleName; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + public String getIsRegist() { + return isRegist; + } + + public void setIsRegist(String isRegist) { + this.isRegist = isRegist; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/SysUser.java b/src/main/java/lingtao/net/bean/SysUser.java new file mode 100644 index 0000000..1d55371 --- /dev/null +++ b/src/main/java/lingtao/net/bean/SysUser.java @@ -0,0 +1,208 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 用户 + * + * @author Administrator + * + */ +@Data +public class SysUser { + private Integer userId; + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getRealname() { + return realname; + } + + public void setRealname(String realname) { + this.realname = realname; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getUserStatus() { + return userStatus; + } + + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getSysStatus() { + return sysStatus; + } + + public void setSysStatus(String sysStatus) { + this.sysStatus = sysStatus; + } + + public String getReadLogStatus() { + return readLogStatus; + } + + public void setReadLogStatus(String readLogStatus) { + this.readLogStatus = readLogStatus; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public String getBirthDay() { + return birthDay; + } + + public void setBirthDay(String birthDay) { + this.birthDay = birthDay; + } + + public String getBirthType() { + return birthType; + } + + public void setBirthType(String birthType) { + this.birthType = birthType; + } + + public Integer getIsBirthDay() { + return isBirthDay; + } + + public void setIsBirthDay(Integer isBirthDay) { + this.isBirthDay = isBirthDay; + } + + public String getEntryDate() { + return entryDate; + } + + public void setEntryDate(String entryDate) { + this.entryDate = entryDate; + } + + public String getNeedIp() { + return needIp; + } + + public void setNeedIp(String needIp) { + this.needIp = needIp; + } + + public String getRoleSearch() { + return roleSearch; + } + + public void setRoleSearch(String roleSearch) { + this.roleSearch = roleSearch; + } + + public String[] getRoleArr() { + return roleArr; + } + + public void setRoleArr(String[] roleArr) { + this.roleArr = roleArr; + } + + private String realname; + + private String username; + + private String password; + + private String userStatus; + + private String role; + + private String sysStatus; + + private String readLogStatus; + + private String createBy; + + private Date createDate; + + private String updateBy; + + private Date updateDate; + + private String birthDay; + + private String birthType; + + private Integer isBirthDay; + + private String entryDate; + + // 是否需要判断IP 0:否 1:是 + private String needIp; + + // 根据角色查找用户 + private String roleSearch; + + // 用户所拥有角色数组 + private String[] roleArr; + +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/bean/UpdateLog.java b/src/main/java/lingtao/net/bean/UpdateLog.java new file mode 100644 index 0000000..7387633 --- /dev/null +++ b/src/main/java/lingtao/net/bean/UpdateLog.java @@ -0,0 +1,97 @@ +package lingtao.net.bean; + +import java.util.Date; + +import lombok.Data; + +/** + * 更新日志 + * + * @author Administrator + * + */ +@Data +public class UpdateLog { + + private Integer id; + + private String content; + + private Date addTime; + + private String createBy; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Date getAddTime() { + return addTime; + } + + public void setAddTime(Date addTime) { + this.addTime = addTime; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getAddTimeStr() { + return addTimeStr; + } + + public void setAddTimeStr(String addTimeStr) { + this.addTimeStr = addTimeStr; + } + + public String getAdd_time_begin() { + return add_time_begin; + } + + public void setAdd_time_begin(String add_time_begin) { + this.add_time_begin = add_time_begin; + } + + public String getAdd_time_end() { + return add_time_end; + } + + public void setAdd_time_end(String add_time_end) { + this.add_time_end = add_time_end; + } + + private Date createDate; + + /* ================= */ + + private String addTimeStr; + + private String add_time_begin; + + private String add_time_end; +} diff --git a/src/main/java/lingtao/net/config/ResourceServerConfig.java b/src/main/java/lingtao/net/config/ResourceServerConfig.java new file mode 100644 index 0000000..8edea70 --- /dev/null +++ b/src/main/java/lingtao/net/config/ResourceServerConfig.java @@ -0,0 +1,21 @@ +package lingtao.net.config; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + + +@Configuration +public abstract class ResourceServerConfig implements WebMvcConfigurer { + + private String localPrefix = "abc"; + + private String localPath = "F:\\java_project\\bj\\upload"; + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/" + localPrefix + "/**") + .addResourceLocations("file:" + localPath); + } + +} diff --git a/src/main/java/lingtao/net/controller/AcountController.java b/src/main/java/lingtao/net/controller/AcountController.java new file mode 100644 index 0000000..774ed99 --- /dev/null +++ b/src/main/java/lingtao/net/controller/AcountController.java @@ -0,0 +1,197 @@ +package lingtao.net.controller; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysRole; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.SysUserMapper; +import lingtao.net.service.SysRoleService; +import lingtao.net.service.SysUserService; +import lingtao.net.util.MD5Util; +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authc.*; +import org.apache.shiro.subject.Subject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 用户登录注册、退出 + * + * @author Administrator + */ +@Controller +@RequestMapping("/SysUser") +public class AcountController { + + @Autowired + private SysUserService sysUserService; + + @Autowired + private SysRoleService sysRoleService; + + @Autowired + private SysUserMapper userMapper; + + /** + * 获取客户端IP + * + * @param request 请求对象 + * @return IP地址 + */ + public static String getIpAddr(HttpServletRequest request) { + if (request == null) { + return "unknown"; + } + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Forwarded-For"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Real-IP"); + } + + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + + return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : getMultistageReverseProxyIp(ip); + } + + /** + * 从多级反向代理中获得第一个非unknown IP地址 + * + * @param ip 获得的IP地址 + * @return 第一个非unknown IP地址 + */ + public static String getMultistageReverseProxyIp(String ip) { + // 多级反向代理检测 + if (ip != null && ip.indexOf(",") > 0) { + final String[] ips = ip.trim().split(","); + for (String subIp : ips) { + if (false == isUnknown(subIp)) { + ip = subIp; + break; + } + } + } + return StringUtils.substring(ip, 0, 255); + } + + /** + * 检测给定字符串是否为未知,多用于检测HTTP请求相关 + * + * @param checkString 被检测的字符串 + * @return 是否未知 + */ + public static boolean isUnknown(String checkString) { + return StringUtils.isBlank(checkString) || "unknown".equalsIgnoreCase(checkString); + } + + /** + * 登陆 + */ + @RequestMapping(value = "/login", method = RequestMethod.POST) + public ModelAndView login(@RequestParam("username") String username, @RequestParam("password") String password, + HttpServletRequest request, HttpServletResponse response) throws Exception { + password = new MD5Util().md5(password, "lingtao"); + // 使用 shiro 登录验证 + // 1 认证的核心组件:获取 Subject 对象 + Subject subject = SecurityUtils.getSubject(); + // 2 将登陆表单封装成 token 对象 + UsernamePasswordToken token = new UsernamePasswordToken(username, password); + token.setHost(getIpAddr(request)); + try { + // 3 让 shiro 框架进行登录验证:传递token给shiro的reaml + subject.login(token); + // return "redirect:/views/main.jsp"; + // 此处并没有跳转页面-前端根据状态码跳转对应页面 + return new ModelAndView("redirect:/views/main.jsp"); + } catch (UnknownAccountException uae) { + // 状态码 200--成功 100--失败 300禁用 + response.getWriter().print("100"); + throw new UnknownAccountException("账户或密码有误!"); + } catch (IncorrectCredentialsException ice) { + response.getWriter().print("100"); + throw new IncorrectCredentialsException("账户或密码有误!"); + } catch (LockedAccountException lae) { + response.getWriter().print("300"); + throw new LockedAccountException("用户未激活!!!"); + } catch (AuthenticationException re) { + response.getWriter().print("404"); + throw new AuthenticationException("未知IP!!!"); + } + /* catch (RuntimeException re) { response.getWriter().print("400"); throw new + * RuntimeException("用户已登录!!!"); } + */ + + } + + /** + * 注册 + */ + @RequestMapping("/register") + @ResponseBody + public Msg register(SysUser user) { + SysUser username = userMapper.getUserByUsername(user.getUsername()); + if (username != null) { + return Msg.fail("用户名已存在!"); + } + return sysUserService.register(user); + } + + /** + * 注销 + */ + @RequestMapping("/logout") + public String logout() { + Subject subject = SecurityUtils.getSubject(); + subject.logout(); + return "redirect:/login.jsp"; + } + + /** + * 获取可以被注册的角色名称 + * + * @return + */ + @RequestMapping("/getRoleName") + @ResponseBody + public Map roleNameList(@RequestParam(value = "isRegist") String isRegist) { + Map map = new HashMap(); + List allRoleNames = sysRoleService.getAllRoleName(isRegist); + + for (SysRole sysRole : allRoleNames) { + map.put(sysRole.getRoleId(), sysRole.getRoleName()); + } + + return map; + } + + @ResponseBody + @RequestMapping("/getIp") + public Msg getIp(HttpServletRequest request) { + String ip = getIpAddr(request); +// String ip = "120.38.127.157"; + if (ip != null) { + return Msg.success().add("ip", ip); + } + return Msg.fail(); + } +} diff --git a/src/main/java/lingtao/net/controller/ArticleController.java b/src/main/java/lingtao/net/controller/ArticleController.java new file mode 100644 index 0000000..f429fee --- /dev/null +++ b/src/main/java/lingtao/net/controller/ArticleController.java @@ -0,0 +1,137 @@ +package lingtao.net.controller; + +import java.io.File; +import java.util.Calendar; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Article; +import lingtao.net.bean.Msg; +import lingtao.net.service.ArticleService; + +@Controller +public class ArticleController { + + @Autowired + private ArticleService articleService; + + /** + * 获取所有的文章 + * + * @param article + * @return + */ + @RequestMapping("/getArticle") + @ResponseBody + public Msg articleList(Article article) { + PageHelper.startPage(1, 10); + List
articles = articleService.getArticle(article); + PageInfo
pageInfo = new PageInfo
(articles); + return Msg.success().add("articles", pageInfo); + } + + /** + * 新增文章 + */ + @RequestMapping("/addArticle") + @ResponseBody + public Msg addArticle(Article article) { + return articleService.addArticle(article); + } + + /** + * 文章中的图片 + */ + @RequestMapping(value = "/uploadconimage", method = RequestMethod.POST) + @ResponseBody + public Map uploadconimage(HttpServletRequest request, @RequestParam MultipartFile file) { + Map mv = new HashMap(); + Map mvv = new HashMap(); + try { + String rootPath = request.getSession().getServletContext().getRealPath("/image/"); + String contextPath = request.getContextPath(); + System.err.println(contextPath); + System.out.println(rootPath); + Calendar date = Calendar.getInstance(); // Calendar.getInstance()是获取一个Calendar对象并可以进行时间的计算,时区的指定 + String originalFile = file.getOriginalFilename(); // 获得文件最初的路径 + String uuid = UUID.randomUUID().toString(); // UUID转化为String对象 + String newfilename = date.get(Calendar.YEAR) + "" + (date.get(Calendar.MONTH) + 1) + "" + + date.get(Calendar.DATE) + uuid.replace("-", "") + originalFile; + // 得到完整路径名 + File newFile = new File(rootPath + newfilename); + /* 文件不存在就创建 */ + if (!newFile.getParentFile().exists()) { + newFile.getParentFile().mkdirs(); + } + String filename = originalFile.substring(0, originalFile.indexOf(".")); + System.out.println(originalFile); + System.out.println(filename); + file.transferTo(newFile); + System.out.println("newFile : " + newFile); + String urlpat = contextPath + "/image/" + newfilename; + mvv.put("src", urlpat); + mvv.put("title", newfilename); + mv.put("code", 0); + mv.put("msg", "上传成功"); + mv.put("data", mvv); + return mv; + } catch (Exception e) { + e.printStackTrace(); + mv.put("success", 1); + return mv; + } + } + + // 用户跳转页面 + @RequestMapping("/toUpdateArticle") + public String index(HttpServletRequest request, HttpServletResponse response) throws Exception { + return "updateArticle"; + //response.sendRedirect(request.getContextPath() + "/views/updateArticle.jsp"); + } + + /** + * 修改文章 + * + */ + @RequestMapping("/updateArticle") + @ResponseBody + public Msg updateArticle(Article article) { + return articleService.updateArticleById(article); + } + + /** + * 文章详情 + * + */ + @RequestMapping("/articleInfo") + @ResponseBody + public Msg articleInfo(@RequestParam("id") Integer id) { + Article article = articleService.articleInfo(id); + return Msg.success().add("article", article); + } + + /** + * 删除文章 + */ + @RequestMapping("/deleteArticle") + @ResponseBody + public Msg delArticle(@RequestParam("id") Integer id) { + return articleService.delArticleById(id); + } +} diff --git a/src/main/java/lingtao/net/controller/BugController.java b/src/main/java/lingtao/net/controller/BugController.java new file mode 100644 index 0000000..d057ef3 --- /dev/null +++ b/src/main/java/lingtao/net/controller/BugController.java @@ -0,0 +1,105 @@ +package lingtao.net.controller; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.util.Date; +import java.util.List; + +import javax.management.RuntimeErrorException; +import javax.servlet.http.HttpSession; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.http.client.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Bug; +import lingtao.net.bean.Msg; +import lingtao.net.service.BugService; + +@RestController +public class BugController { + + @Autowired + private BugService bugService; + + private String localPrefix = "abc\\bug"; + + private String localPath = "C:\\lingtao\\quote_price\\upload"; + + //private String localDomain = "http://47.114.150.226:8080/erp"; + + /** + * bug列表 + * + * @param page + * @param limit + * @return + */ + @RequestMapping("/getBugs") + public PageInfo getBugs(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Bug bug) { + PageHelper.startPage(page, limit); + List bugList = bugService.getBugs(bug); + PageInfo pageInfo = new PageInfo(bugList); + return pageInfo; + } + + /** + * 添加角色 + */ + @RequestMapping("/addBug") + public Msg addBug(Bug bug, HttpSession session) { + return bugService.addBug(bug, session); + } + + // 图片上传及新增 + @RequestMapping("/bugUpload") + public Msg upload(@RequestParam("file") MultipartFile file) throws Exception { + if (file.isEmpty()) { + return Msg.fail("文件不能为空"); + } + // 获取文件名后缀 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + // 获取path + String path = getPath(extension, FilenameUtils.getBaseName(file.getOriginalFilename())); + // 保存文件信息 + File newFile = new File(localPath + File.separator + path); + try { + FileUtils.copyInputStreamToFile(new ByteArrayInputStream(file.getBytes()), newFile); + } catch (IOException e) { + throw new RuntimeErrorException(null, ""); + } + return Msg.success(); + } + + /** + * + * @param prefixSelf 根据上传的接口存入自己的文件夹 + * @param suffix 文件的后缀 + * @param fileName 文件名 + * @return + */ + public String getPath(String suffix, String fileName) { + + // 生成uuid + // String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String path = null; + + // 文件路径 + path = DateUtils.formatDate(new Date(), "yyyyMMdd") + File.separator + fileName; + + path = localPrefix + File.separator + File.separator + path; + + return path + "." + suffix; + } + +} diff --git a/src/main/java/lingtao/net/controller/CustomerAwardController.java b/src/main/java/lingtao/net/controller/CustomerAwardController.java new file mode 100644 index 0000000..a7d68ec --- /dev/null +++ b/src/main/java/lingtao/net/controller/CustomerAwardController.java @@ -0,0 +1,109 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.CustomerAward; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.CustomerAwardService; +import lingtao.net.util.PublicMethods; + +@Controller +public class CustomerAwardController { + + @Autowired + private CustomerAwardService customerAwardService; + + // 用户跳转页面 + @RequestMapping("/customerAward/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/customerAward/customerAward.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getCustomerAward") + public PageInfo getCustomerAward(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, CustomerAward customerAward) { + PageHelper.startPage(page, limit); + List customerAwardList = customerAwardService.getCustomerAward(customerAward); + PageInfo pageInfo = new PageInfo(customerAwardList); + return pageInfo; + } + + /** + * 批量删除 + * + * @param ids + */ + @ResponseBody + @RequestMapping("/deleteDatas") + public Msg deleteBatch(@RequestParam(value = "ids") String ids, @RequestParam(value = "creators") String creators) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String[] arrCreators = creators.split(","); + boolean selfFlag = true; + for (String creator : arrCreators) { + if (!user.getRealname().equals(creator)) { + selfFlag = false; + break; + } + } + // 超管身份 + boolean flag = new PublicMethods().isSuper(); + // 不是超管 + if (!flag) { + // 判断是不是自己上传的数据 + if (!selfFlag) { + return Msg.fail("禁止删除其他人数据!"); + } + } + String[] arrIds = ids.split(","); + // String数组转为Integer数组 + int[] ints = new int[arrIds.length]; + for (int i = 0; i < arrIds.length; i++) { + ints[i] = Integer.parseInt(arrIds[i]); + } + return customerAwardService.deleteBatch(ints); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_customerAward") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return customerAwardService.ajaxUploadExcel(file); + } + } + + /** + * 获取上传过的店铺 + * + * @return + */ + @ResponseBody + @RequestMapping("/getArardShopname") + public List getArardShopname() { + List FilenameList = customerAwardService.getArardShopname(); + return FilenameList; + } +} diff --git a/src/main/java/lingtao/net/controller/CustomerDataControlle.java b/src/main/java/lingtao/net/controller/CustomerDataControlle.java new file mode 100644 index 0000000..969b483 --- /dev/null +++ b/src/main/java/lingtao/net/controller/CustomerDataControlle.java @@ -0,0 +1,129 @@ +package lingtao.net.controller; + +import java.util.List; + +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.CustomerData; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.CustomerDataService; + +@RestController +public class CustomerDataControlle { + + @Autowired + private CustomerDataService customerDataService; + + @RequestMapping("/getCustomerDatas") + public Msg getCustomerDatas(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, CustomerData customerData) { + PageHelper.startPage(page, limit); + List customerDatalist = customerDataService.getCustomerDatas(customerData); + PageInfo pageInfo = new PageInfo(customerDatalist); + return Msg.success().add("list", pageInfo); + } + + /** + * 添加数据 + * + * @throws Exception + */ + @RequestMapping("/addCustomerData") + public Msg addCustomerData(CustomerData customerData) throws Exception { + // 把字符串转为日期格式 + customerDataService.addCustomerData(customerData); + return Msg.success(); + } + + /** + * 修改数据 + */ + @RequestMapping("/updateCustomerData") + public Msg updateCustomerData(CustomerData customerData) { + customerDataService.updateCustomerDataById(customerData); + return Msg.success(); + } + + /** + * 删除数据 + */ + @RequestMapping("/deleteCustomerData") + public Msg deleteCustomerData(@RequestParam("id") Integer id) { + customerDataService.deleteCustomerDataById(id); + return Msg.success(); + } + + /** + * 店长修改说明数据 + * + * @param customerData + */ + @RequestMapping("/updateRemarkById") + public Msg updateRemarkById(@RequestParam(value = "id") int id, @RequestParam(value = "field") String field, + @RequestParam(value = "value") String value) { + // 超管、组长身份才允许修改comment + boolean flag = isSuperOrManager(); + if (!flag) { + return Msg.fail(); + } + customerDataService.updateRemarkById(id, field, value); + return Msg.success(); + } + + /** + * 修改完成状态 + * + * @param id + * @return + */ + @RequestMapping("/changeIsBuy") + public Msg changeIsBuy(@RequestParam(value = "id") Integer id, @RequestParam(value = "username") String username) { + // 超管、组长身份才允许修改【成交状态】 + boolean flag = isSuperOrManager(); + if (!flag) { + return Msg.fail(); + } + return customerDataService.changeIsBuy(id); + // 只有自己创建的数据才能更改【完成状态】 + /* + * if (username.equals(user.getUsername())) { } + */ + // return Msg.fail(); + } + + // 是否有超管或者组长身份 + public boolean isSuperOrManager() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String role = user.getRole(); + boolean flag = false; + if (role.contains(",")) { + String[] split = role.split(","); + for (int i = 0; i < split.length; i++) { + if ("1011".equals(split[i]) || "1".equals(split[i])) { + flag = true; + break; + } + } + } else { + if ("1011".equals(role) || "1".equals(role)) { + flag = true; + } + } + return flag; + } + + // 获取摘要 + @RequestMapping("/getProductExplain") + public List getProductExplain(@RequestParam("productExplain") String productExplain) { + List name = customerDataService.getProductExplain(productExplain); + return name; + } +} diff --git a/src/main/java/lingtao/net/controller/CustomerTrainController.java b/src/main/java/lingtao/net/controller/CustomerTrainController.java new file mode 100644 index 0000000..3d5285b --- /dev/null +++ b/src/main/java/lingtao/net/controller/CustomerTrainController.java @@ -0,0 +1,243 @@ +package lingtao.net.controller; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.management.RuntimeErrorException; +import javax.servlet.http.HttpSession; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.http.client.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.CustomerTrainContent; +import lingtao.net.bean.CustomerTrainKindLabel; +import lingtao.net.bean.CustomerTrainProType; +import lingtao.net.bean.Msg; +import lingtao.net.service.CustomerTrainService; + +@RestController +public class CustomerTrainController { + + @Autowired + private CustomerTrainService customerTrainService; + + private String localPrefix = "abc\\train"; + + private String localPath = "C:\\lingtao\\upload"; + + private String localDomain = "http://47.114.150.226:80/erp"; + + // 图片上传及新增 + @RequestMapping("/imgUpload") + public Object upload(@RequestParam("file") MultipartFile file) throws Exception { + if (file.isEmpty()) { + return Msg.fail("文件不能为空"); + } + // 获取文件名后缀 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + // 获取path + String path = getPath(extension, FilenameUtils.getBaseName(file.getOriginalFilename())); + // 保存文件信息 + File newFile = new File(localPath + File.separator + path); + try { + FileUtils.copyInputStreamToFile(new ByteArrayInputStream(file.getBytes()), newFile); + } catch (IOException e) { + throw new RuntimeErrorException(null, ""); + } + String serverPath = localDomain + "/" + path; + Map map = new HashMap(); + Map map2 = new HashMap(); + map.put("code", 0); // 0表示上传成功 + map.put("msg", "上传成功"); // 提示消息 + // src返回图片上传成功后的下载路径,这里直接给绝对路径 + map2.put("src", serverPath); + map.put("data", map2); + return map; + } + + /** + * + * @param prefixSelf 根据上传的接口存入自己的文件夹 + * @param suffix 文件的后缀 + * @param fileName 文件名 + * @return + */ + public String getPath(String suffix, String fileName) { + + // 生成uuid + // String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String path = null; + + // 文件路径 + path = DateUtils.formatDate(new Date(), "yyyyMMdd") + File.separator + fileName; + + path = localPrefix + File.separator + File.separator + path; + + return path + "." + suffix; + } + + /* =============产品知识内容================ */ + /** + * 查询 + * + * @param page + * @param limit + * @param customerTrainContent + * @return + */ + @RequestMapping("/getCustomerTrainContents") + public PageInfo getCustomerTrainContents( + @RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, + CustomerTrainContent customerTrainContent) { + PageHelper.startPage(page, limit); + List customerTrainContentList = customerTrainService + .getCustomerTrainContents(customerTrainContent); + PageInfo pageInfo = new PageInfo(customerTrainContentList); + return pageInfo; + } + + /** + * 添加 + * + */ + @RequestMapping("/addCustomerTrainContent") + public Msg addCustomerTrainContent(CustomerTrainContent customerTrainContent, HttpSession session) { + + return customerTrainService.addCustomerTrainContent(customerTrainContent, session); + } + + /** + * 修改 + */ + @RequestMapping("/updateCustomerTrainContent") + public Msg updateCustomerTrainContent(CustomerTrainContent customerTrainContent, HttpSession session) { + return customerTrainService.updateCustomerTrainContentById(customerTrainContent, session); + } + + /** + * 修改 + */ + @RequestMapping("/updateCustomerTrainContentSort") + public Msg updateById(@RequestParam(value = "id") int id, @RequestParam(value = "value") String value) { + return customerTrainService.updateCustomerTrainContentSort(id, value); + } + + /** + * 删除 + */ + @RequestMapping("/deleteCustomerTrainContent") + public Msg deleteCustomerTrainContent(@RequestParam("id") Integer id) { + return customerTrainService.deleteCustomerTrainContentById(id); + } + + /* =============产品种类================ */ + /** + * 查询 + * + * @param page + * @param limit + * @param customerTrainProType + * @return + */ + @RequestMapping("/getCustomerTrainProTypes") + public PageInfo getCustomerTrainProTypes( + @RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, + CustomerTrainProType customerTrainProType) { + PageHelper.startPage(page, limit); + List customerTrainProTypeList = customerTrainService + .getCustomerTrainProTypes(customerTrainProType); + PageInfo pageInfo = new PageInfo(customerTrainProTypeList); + return pageInfo; + } + + /** + * 添加 + * + */ + @RequestMapping("/addCustomerTrainProType") + public Msg addCustomerTrainProType(CustomerTrainProType customerTrainProType, HttpSession session) { + + return customerTrainService.addCustomerTrainProType(customerTrainProType, session); + } + + /** + * 修改 + */ + @RequestMapping("/updateCustomerTrainProType") + public Msg updateCustomerTrainProType(CustomerTrainProType customerTrainProType, HttpSession session) { + return customerTrainService.updateCustomerTrainProTypeById(customerTrainProType, session); + } + + /** + * 删除 + */ + @RequestMapping("/deleteCustomerTrainProType") + public Msg deleteCustomerTrainProType(@RequestParam("id") Integer id) { + return customerTrainService.deleteCustomerTrainProTypeById(id); + } + + /* =============产品类型================ */ + /** + * 查询 + * + * @param page + * @param limit + * @param customerTrainKindLabel + * @return + */ + @RequestMapping("/getCustomerTrainKindLabelsByProType") + public PageInfo getCustomerTrainKindLabelsByProType( + @RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, + @RequestParam(value = "needPage") String needPage, CustomerTrainKindLabel customerTrainKindLabel) { + // 0:不要分页 1:要分页 + if ("1".equals(needPage)) + PageHelper.startPage(page, limit); + List customerTrainKindLabelList = customerTrainService + .getCustomerTrainKindLabelsByProType(customerTrainKindLabel); + PageInfo pageInfo = new PageInfo(customerTrainKindLabelList); + return pageInfo; + } + + /** + * 添加 + * + */ + @RequestMapping("/addCustomerTrainKindLabel") + public Msg addCustomerTrainKindLabel(CustomerTrainKindLabel customerTrainKindLabel, HttpSession session) { + + return customerTrainService.addCustomerTrainKindLabel(customerTrainKindLabel, session); + } + + /** + * 修改 + */ + @RequestMapping("/updateCustomerTrainKindLabel") + public Msg updateCustomerTrainKindLabel(CustomerTrainKindLabel customerTrainKindLabel, HttpSession session) { + return customerTrainService.updateCustomerTrainKindLabelById(customerTrainKindLabel, session); + } + + /** + * 删除 + */ + @RequestMapping("/deleteCustomerTrainKindLabel") + public Msg deleteCustomerTrainKindLabel(@RequestParam("id") Integer id) { + return customerTrainService.deleteCustomerTrainKindLabelById(id); + } +} diff --git a/src/main/java/lingtao/net/controller/ExpressFeeController.java b/src/main/java/lingtao/net/controller/ExpressFeeController.java new file mode 100644 index 0000000..eb4932b --- /dev/null +++ b/src/main/java/lingtao/net/controller/ExpressFeeController.java @@ -0,0 +1,75 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.ExpressFee; +import lingtao.net.bean.Msg; +import lingtao.net.service.ExpressFeeService; + +@RestController +public class ExpressFeeController { + + @Autowired + private ExpressFeeService expressFeeService; + + /** + * 省份快递费列表 + * + * @return + */ + @RequestMapping("/getExpressFees") + public Msg getExpressFees(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, ExpressFee expressFee) { + PageHelper.startPage(page, limit); + // 带分页,用于列表展示 + List expressFeeList = expressFeeService.getExpressFees(expressFee); + // 全国省份 + List allProvinces = expressFeeService.getAllExpressFees(expressFee); + // 手提袋偏远地区运费 + List handBagExpressFees = expressFeeService.getHandBagExpressFees(expressFee); + // 封套:6、房卡套:7、吊旗:13 + List taoExpressFees = expressFeeService.getTaoExpressFees(expressFee); + // 其他产品偏远地区运费 + List orherExpressFees = expressFeeService.getOtherExpressFees(expressFee); + PageInfo pageInfo = new PageInfo(expressFeeList); + return Msg.success().add("list", pageInfo).add("allProvinces", allProvinces).add("handBag", handBagExpressFees) + .add("tao", taoExpressFees).add("other", orherExpressFees); + } + + /** + * 添加省份快递费 + */ + @RequestMapping("/addExpressFee") + public Msg addExpressFee(ExpressFee expressFee, HttpSession session) { + expressFeeService.addExpressFee(expressFee, session); + return Msg.success(); + } + + /** + * 修改省份快递费 + */ + @RequestMapping("/updateExpressFee") + public Msg updateExpressFee(HttpSession session, @RequestParam(value = "id") int id, + @RequestParam(value = "field") String field, @RequestParam(value = "value") String value) throws Exception { + return expressFeeService.updateExpressFeeById(session, id, field, value); + } + + /** + * 删除 + */ + @RequestMapping("/deleteExpressFee") + public Msg deleteExpressFee(@RequestParam("id") Integer id) { + expressFeeService.deleteExpressFeeById(id); + return Msg.success(); + } +} diff --git a/src/main/java/lingtao/net/controller/FileController.java b/src/main/java/lingtao/net/controller/FileController.java new file mode 100644 index 0000000..6ad3516 --- /dev/null +++ b/src/main/java/lingtao/net/controller/FileController.java @@ -0,0 +1,90 @@ +package lingtao.net.controller; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.apache.ibatis.annotations.Param; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.MyFile; +import lingtao.net.service.MyFileService; + +@Controller +public class FileController { + + @Autowired + private MyFileService fileService; + + /** + * 上传文件 + * + * @throws IOException + */ + @RequestMapping("/fileUpload") + @ResponseBody + public Msg uploadFile(@RequestParam("file") MultipartFile file, HttpServletRequest request) { + return fileService.fileUpload(file, request); + } + + /** + * 查询文件列表 + * @param page + * @param limit + * @param myFile + * @param session + * @return + */ + @RequestMapping("getAllFiles") + @ResponseBody + public Msg FileList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, MyFile myFile, HttpSession session) { + PageHelper.startPage(page, limit); + List fileList = fileService.getFileList(myFile, session); + PageInfo filesInfo = new PageInfo(fileList); + return Msg.success().add("fileList", filesInfo); + } + + /** + * 根据id删除文件 + * + */ + @RequestMapping("/deleteFile") + @ResponseBody + public Msg deleteFile(@Param("fileId") Integer fileId) { + return fileService.deleteFile(fileId); + } + + /** + * 批量删除 + * + * @param ids + */ + @ResponseBody + @RequestMapping("/deleteFiles") + public Msg deleteBatch(@RequestParam(value = "ids") String ids, @RequestParam(value = "fileNames") String fileNames, + HttpServletRequest request) { + String[] arrIds = ids.split(","); + String[] fileNameArr = fileNames.split(";"); + List del_ids = new ArrayList(); + String hasFileload = request.getSession().getServletContext().getRealPath("/") + "/deptFile/"; + for (int i = 0; i < fileNameArr.length; i++) { + del_ids.add(Integer.parseInt(arrIds[i])); + fileService.deleteBatch(del_ids); + fileService.deleteFile(hasFileload + fileNameArr[i]); + } + return Msg.success(); + } +} diff --git a/src/main/java/lingtao/net/controller/Finance2Controller.java b/src/main/java/lingtao/net/controller/Finance2Controller.java new file mode 100644 index 0000000..6924082 --- /dev/null +++ b/src/main/java/lingtao/net/controller/Finance2Controller.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.Finance2Service; + +@Controller +public class Finance2Controller { + + @Autowired + private Finance2Service finance2Service; + + // 用户跳转页面 + @RequestMapping("/finance_2/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance2.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_2") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = finance2Service.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename_2") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = finance2Service.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename_2") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return finance2Service.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_f2") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return finance2Service.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_2") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + finance2Service.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/Finance3Controller.java b/src/main/java/lingtao/net/controller/Finance3Controller.java new file mode 100644 index 0000000..018c07c --- /dev/null +++ b/src/main/java/lingtao/net/controller/Finance3Controller.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.Finance3Service; + +@Controller +public class Finance3Controller { + + @Autowired + private Finance3Service finance3Service; + + // 用户跳转页面 + @RequestMapping("/finance_3/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance3.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_3") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = finance3Service.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename_3") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = finance3Service.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename_3") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return finance3Service.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_f3") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return finance3Service.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_3") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + finance3Service.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/Finance4Controller.java b/src/main/java/lingtao/net/controller/Finance4Controller.java new file mode 100644 index 0000000..c5eff45 --- /dev/null +++ b/src/main/java/lingtao/net/controller/Finance4Controller.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.Finance4Service; + +@Controller +public class Finance4Controller { + + @Autowired + private Finance4Service finance4Service; + + // 用户跳转页面 + @RequestMapping("/finance_4/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance4.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_4") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = finance4Service.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename_4") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = finance4Service.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename_4") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return finance4Service.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_f4") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return finance4Service.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_4") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + finance4Service.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/Finance5Controller.java b/src/main/java/lingtao/net/controller/Finance5Controller.java new file mode 100644 index 0000000..2b090e6 --- /dev/null +++ b/src/main/java/lingtao/net/controller/Finance5Controller.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.Finance5Service; + +@Controller +public class Finance5Controller { + + @Autowired + private Finance5Service finance5Service; + + // 用户跳转页面 + @RequestMapping("/finance_5/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance5.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_5") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = finance5Service.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename_5") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = finance5Service.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename_5") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return finance5Service.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_f5") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return finance5Service.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_5") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + finance5Service.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/Finance6Controller.java b/src/main/java/lingtao/net/controller/Finance6Controller.java new file mode 100644 index 0000000..78cd6ca --- /dev/null +++ b/src/main/java/lingtao/net/controller/Finance6Controller.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.Finance6Service; + +@Controller +public class Finance6Controller { + + @Autowired + private Finance6Service finance6Service; + + // 用户跳转页面 + @RequestMapping("/finance_6/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance6.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_6") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = finance6Service.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename_6") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = finance6Service.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename_6") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return finance6Service.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_f6") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return finance6Service.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_6") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + finance6Service.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/Finance7Controller.java b/src/main/java/lingtao/net/controller/Finance7Controller.java new file mode 100644 index 0000000..f29cb7d --- /dev/null +++ b/src/main/java/lingtao/net/controller/Finance7Controller.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.Finance7Service; + +@Controller +public class Finance7Controller { + + @Autowired + private Finance7Service finance7Service; + + // 用户跳转页面 + @RequestMapping("/finance_7/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance7.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_7") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = finance7Service.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename_7") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = finance7Service.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename_7") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return finance7Service.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_f7") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return finance7Service.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_7") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + finance7Service.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/FinanceController.java b/src/main/java/lingtao/net/controller/FinanceController.java new file mode 100644 index 0000000..fc879c2 --- /dev/null +++ b/src/main/java/lingtao/net/controller/FinanceController.java @@ -0,0 +1,104 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.FinanceService; + +@Controller +public class FinanceController { + + @Autowired + private FinanceService financeService; + + // 用户跳转页面 + @RequestMapping("/finance/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/finance/finance"; + response.sendRedirect(request.getContextPath() + "/views/system/finance/finance.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Finance finance) { + PageHelper.startPage(page, limit); + List financeList = financeService.getFinance(finance); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getAllFilename") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = financeService.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return financeService.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_1") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return financeService.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + if (StringUtils.isEmpty(finance.getFilename())) { + return; + } + financeService.excel(response, finance); + } +} diff --git a/src/main/java/lingtao/net/controller/FinanceDifferenceController.java b/src/main/java/lingtao/net/controller/FinanceDifferenceController.java new file mode 100644 index 0000000..e186ac1 --- /dev/null +++ b/src/main/java/lingtao/net/controller/FinanceDifferenceController.java @@ -0,0 +1,87 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.FinanceDifference; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.FinanceDifferenceService; + +@Controller +public class FinanceDifferenceController { + + @Autowired + private FinanceDifferenceService differenceService; + + // 用户跳转页面 + @RequestMapping("/finance/difference/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + // return "/difference/difference"; + response.sendRedirect(request.getContextPath() + "/views/system/financeDifference/difference.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getDifference") + public PageInfo getFinance(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, FinanceDifference difference) { + PageHelper.startPage(page, limit); + List differenceList = differenceService.get(difference); + PageInfo pageInfo = new PageInfo(differenceList); + return pageInfo; + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return differenceService.ajaxUploadExcel(file); + } + } + + @ResponseBody + @RequestMapping("/getFilename") + public List getAllFilename() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = differenceService.getAllFilename(user.getRealname()); + return FilenameList; + } + + /** + * 导出 + * + * @param response + * @param request + * @param difference + * @throws Exception + */ + @RequestMapping("/excel_difference") + public void excel(HttpServletResponse response, FinanceDifference difference) throws Exception { + if (StringUtils.isEmpty(difference.getFilename())) { + return; + } + differenceService.excel(response, difference); + } +} diff --git a/src/main/java/lingtao/net/controller/FinanceExtractController.java b/src/main/java/lingtao/net/controller/FinanceExtractController.java new file mode 100644 index 0000000..f5e2fcb --- /dev/null +++ b/src/main/java/lingtao/net/controller/FinanceExtractController.java @@ -0,0 +1,103 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.FinanceExtract; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.FinanceExtractService; + +@Controller +public class FinanceExtractController { + + @Autowired + private FinanceExtractService financeExtractService; + + // 用户跳转页面 + @RequestMapping("/finance/extract/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/finance/extract/extract.jsp"); + } + + /** + * 根据条件查询数据 + * + */ + @ResponseBody + @RequestMapping("/getFinance_extract") + public PageInfo getFinanceExtract(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, FinanceExtract financeExtract) { + PageHelper.startPage(page, limit); + List financeList = financeExtractService.getFinanceExtract(financeExtract); + PageInfo pageInfo = new PageInfo(financeList); + return pageInfo; + } + + /** + * 获取自己上传过的文件名(用于导出文件) + * + * @return + */ + @ResponseBody + @RequestMapping("/getFilename_extract") + public List getFilename_extract() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + List FilenameList = financeExtractService.getFilename_extract(user.getRealname()); + return FilenameList; + } + + /** + * 根据文件名删除自己导入过的文件 + * + * @return + */ + @ResponseBody + @RequestMapping("/deleteDataByFilename2") + public Msg deleteDataByFilename(@RequestParam(value = "filename") String filename) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return financeExtractService.deleteDataByFilename(filename, user.getRealname()); + } + + /** + * + * 文件上传 + */ + @ResponseBody + @RequestMapping(value = "/ajaxUpload_2") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + synchronized (this) { + return financeExtractService.ajaxUploadExcel(file); + } + } + + /** + * 导出 + * + * @param response + * @param request + * @param finance + * @throws Exception + */ + @RequestMapping("/excel_extract") + public void excel(HttpServletResponse response, FinanceExtract financeExtract) throws Exception { + if (StringUtils.isEmpty(financeExtract.getFilename())) { + return; + } + financeExtractService.excel(response, financeExtract); + } +} diff --git a/src/main/java/lingtao/net/controller/InformationController.java b/src/main/java/lingtao/net/controller/InformationController.java new file mode 100644 index 0000000..73ee59f --- /dev/null +++ b/src/main/java/lingtao/net/controller/InformationController.java @@ -0,0 +1,65 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Information; +import lingtao.net.bean.Msg; +import lingtao.net.service.InformationService; + +@RestController +public class InformationController { + + @Autowired + private InformationService informationService; + + /** + * 产品知识列表 + * + * @return + */ + @RequestMapping("/getInformations") + public Msg getInformations(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Information information) { + PageHelper.startPage(page, limit); + List informationList = informationService.getInformations(information); + PageInfo pageInfo = new PageInfo(informationList); + return Msg.success().add("list", pageInfo); + } + + /** + * 添加产品知识 + */ + @RequestMapping("/addInformation") + public Msg addInformation(Information information, HttpSession session) { + informationService.addInformation(information, session); + return Msg.success(); + } + + /** + * 修改产品知识 + */ + @RequestMapping("/updateInformation") + public Msg updateInformation(Information information, HttpSession session) { + informationService.updateInformationById(information, session); + return Msg.success(); + } + + /** + * 删除 + */ + @RequestMapping("/deleteInformation") + public Msg deleteInformation(@RequestParam("id") Integer id) { + informationService.deleteInformationById(id); + return Msg.success(); + } +} diff --git a/src/main/java/lingtao/net/controller/LoginIpController.java b/src/main/java/lingtao/net/controller/LoginIpController.java new file mode 100644 index 0000000..b6f80bc --- /dev/null +++ b/src/main/java/lingtao/net/controller/LoginIpController.java @@ -0,0 +1,101 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.LoginIp; +import lingtao.net.bean.Msg; +import lingtao.net.service.LoginIpService; + +@Controller +public class LoginIpController { + + @Autowired + private LoginIpService loginIpService; + + // IP跳转页面 + @RequestMapping("/loginIp/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/loginIp/loginIp.jsp"); + } + + /** + * 查询所有IP + */ + @RequestMapping("/getLoginIpList") + @ResponseBody + private Msg IPList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, LoginIp loginIp) { + PageHelper.startPage(page, limit); + List list = loginIpService.getLoginIpList(loginIp); + PageInfo pageInfo = new PageInfo(list); + return Msg.success().add("ipList", pageInfo); + } + + /** + * 添加IP + */ + @ResponseBody + @RequestMapping("/addIp") + public Msg addIp(LoginIp loginIp) { + loginIpService.addIp(loginIp); + return Msg.success(); + } + + /** + * 修改IP + */ + @ResponseBody + @RequestMapping("/updateIp") + public Msg updateIp(LoginIp loginIp) { + loginIpService.updateIp(loginIp); + return Msg.success(); + } + + /** + * 删除 + */ + @RequestMapping("/deleteIp") + @ResponseBody + public Msg deleteIp(@RequestParam("id") Integer id) { + loginIpService.deleteIpById(id); + return Msg.success(); + } + + /** + * 批量删除 + * + * @param ids + */ + @ResponseBody + @RequestMapping("/deleteIps") + public Msg deleteBatch(@RequestParam(value = "ids") String ids) { + String[] arrIds = ids.split(","); + // String数组转为Integer数组 + int[] ints = new int[arrIds.length]; + for (int i = 0; i < arrIds.length; i++) { + ints[i] = Integer.parseInt(arrIds[i]); + } + return loginIpService.deleteBatch(ints); + } + + /** + * 检查授权IP是否存在 + */ + @ResponseBody + @RequestMapping("/checkIP") + public Msg checkIP(@RequestParam(value = "agreeIp") String agreeIp) { + return loginIpService.checkIP(agreeIp); + } +} diff --git a/src/main/java/lingtao/net/controller/LoginLogController.java b/src/main/java/lingtao/net/controller/LoginLogController.java new file mode 100644 index 0000000..2c59ea3 --- /dev/null +++ b/src/main/java/lingtao/net/controller/LoginLogController.java @@ -0,0 +1,45 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.LoginLog; +import lingtao.net.service.LoginLogService; + +@Controller +public class LoginLogController { + + @Autowired + private LoginLogService loginLogService; + + // 登录情况跳转页面 + @RequestMapping("/loginLog/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/loginLog/loginLog.jsp"); + } + + /** + * 查询所有登录情况 + */ + @RequestMapping("/getLoginLogList") + @ResponseBody + private PageInfo IPList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, LoginLog loginLog) { + PageHelper.startPage(page, limit); + List list = loginLogService.getLoginLogList(loginLog); + PageInfo pageInfo = new PageInfo(list); + return pageInfo; + } + +} diff --git a/src/main/java/lingtao/net/controller/ProductController.java b/src/main/java/lingtao/net/controller/ProductController.java new file mode 100644 index 0000000..dc6611e --- /dev/null +++ b/src/main/java/lingtao/net/controller/ProductController.java @@ -0,0 +1,397 @@ +package lingtao.net.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lingtao.net.bean.Msg; +import lingtao.net.bean.Product; +import lingtao.net.bean.SysDictSearchPro; +import lingtao.net.bean.SysUser; +import lingtao.net.service.ProductService; +import lingtao.net.service.QuoteLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +public class ProductController { + + @Autowired + private ProductService productService; + + @Autowired + private QuoteLogService quoteLogService; + + // 价格跳转页面 + @RequestMapping("/product/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/product/product.jsp"); + } + + /** + * 查询所有价格 + */ + @RequestMapping("/getProductList") + @ResponseBody + private Msg IPList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Product product) { + PageHelper.startPage(page, limit); + List list = productService.getProductList(product); + PageInfo pageInfo = new PageInfo(list); + return Msg.success().add("list", pageInfo); + } + + /** + * 修改价格 + * + * @param customerData + */ + @RequestMapping("/updatePriceById") + public Msg updatePriceById(@RequestParam(value = "proId") int proId, @RequestParam(value = "field") String field, + @RequestParam(value = "value") String value) { + return productService.updatePriceById(proId, field, value); + } + + /** + * 计算价格 + * + * @param product + * @return + */ + @RequestMapping("/getThanSum") + public Msg thanPrice(Product product, HttpServletRequest request) { + SysUser user = (SysUser) request.getSession().getAttribute("USER_SESSION"); + /*if (StringUtils.isEmpty(product.getWangwang().trim()) && user.getRole().contains("999") + && !user.getRole().contains("1049")) { + return Msg.fail("请填写客户旺旺!"); + }*/ + if ("帆布".equals(product.getProTypeValue())) { + if ("套餐".equals(product.getStickerKind())) { + product.setCount(1); + } + } else { + if (StringUtils.isEmpty(product.getCount()) || product.getCount() <= 0) { + return Msg.fail("数量必须大于0"); + } + } + // 透明不干胶进去后kindValue 会为1,记录起来,查询日志 + String toumingKind = ""; + if ("0".equals(product.getProTypeValue()) && "2".equals(product.getKindValue())) { + toumingKind = product.getKindValue(); + } + if ("18".equals(product.getProTypeValue()) && "4".equals(product.getKindValue())) { + product.setCount(Integer.valueOf(request.getParameter("count1"))); + } + product.setRole(user.getRole()); + + if ("菜单".equals(product.getProTypeLabel())) { + product.setSize(product.getSize1().replace(",", "")); + String s = request.getParameter("kindValue5"); + product.setKind1Value(s); + product.setSize(request.getParameter("ui_menu_size")); + } else if ("4".equals(product.getProTypeValue()) && "9".equals(product.getKind())) { + product.setSize(request.getParameter("ui_shk_size")); + } + + if (user.getRole().indexOf("1010") > -1) { + if ("0".equals(product.getKindValue()) && "专版打印".equals(product.getStickerKind())) { + double len = Double.valueOf(product.getSize().substring(0, product.getSize().indexOf("*"))); + double wid = Double.valueOf(product.getSize().substring(product.getSize().indexOf("*") + 1)); + if ((len <= 5 && wid < 4) || (len < 4 && wid <= 5)) { + product.setSize("5*4"); + } + } + } else { + if (product.getNumber() != null && product.getNumber() > 1) { + if ("专版打印".equals(product.getStickerKind()) || "少数量".equals(product.getCouponKind())) { + if (request.getParameter("desType") != null && !"".equals(request.getParameter("desType"))) { + product.setP(Integer.valueOf(request.getParameter("desType"))); + } + } + } + } + List proList = productService.getThanPrice(product, user.getRole()); + + if (proList == null) { + return Msg.fail("暂无报价"); + } + //银瑾单独报价 + if (user.getRole().indexOf("1010") > -1) { + double otherPrice = 0; + /*if("5".equals(product.getKind())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 30); + } + }else if("帆布".equals(product.getProTypeValue())) { + for (Product list : proList) { + otherPrice = Math.floor(list.getPrice() + 5); + list.setPrice(otherPrice > 40 ? otherPrice : 40); + if(product.getNumber() > 1) { + list.setPrice(Math.floor(list.getPrice() + 2 * (product.getNumber()-1))); + } + } + }else */ + if ("22".equals(product.getProTypeValue())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 50); + } + } else if ("桌布".equals(product.getProTypeValue())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 30); + } + } else if ("13".equals(product.getProTypeValue())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 80); + } + } else if ("亚克力".equals(product.getProTypeValue())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 40); + } + } else if ("11".equals(product.getProTypeValue())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 50); + } + } else if ("0".equals(product.getProTypeValue())) { + if ("0".equals(product.getKindValue()) && "常用种类".equals(product.getStickerKind())) { + double len = Double.valueOf(product.getSize().substring(0, product.getSize().indexOf("*"))); + ; + double wid = Double.valueOf(product.getSize().substring(product.getSize().indexOf("*") + 1)); + if ((len <= 5 && wid < 4) || (len < 4 && wid <= 5)) { + double priceArr[] = {45, 50, 75, 90, 170, 260, 440, 620, 810, 1000}; + double countArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000}; + for (Product list : proList) { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < list.getCount()) { + continue; + } + list.setPrice(priceArr[i]); + break; + } + + } + } + } else if ("11".equals(product.getKindValue()) || "布纹纸超白".equals(product.getKindValue())) { + for (Product list : proList) { + list.setPrice(Math.floor(list.getPrice() * 1.5)); + } + } else if ("拉丝金".equals(product.getKindValue()) || "拉丝银".equals(product.getKindValue())) { + for (Product list : proList) { + list.setPrice(Math.floor(list.getPrice() + 60)); + } + } + } else if ("金属标".equals(product.getProTypeValue()) && "UV转印贴".equals(product.getKind())) { + for (Product list : proList) { + if (list.getCount() > 500) { + list.setPrice(Math.floor(list.getPrice() * 0.95)); + } else { + list.setPrice(Math.floor(list.getPrice() * 0.9)); + } + } + } else if ("服装吊牌".equals(product.getProTypeValue()) && "异形模切".equals(product.getCraftQie())) { + for (Product list : proList) { + list.setPrice(list.getPrice() + 50); + } + } + } + + if ("0".equals(product.getProTypeValue())) { + if ("5".equals(product.getKindValue()) && proList == null) { + if (StringUtils.isEmpty(product.getAotu())) { + return Msg.fail("哑金不干胶该尺寸无法制作,最大做到 39*27 cm"); + } /*else { + return Msg.fail("哑金不干胶带凹凸工艺该尺寸无法制作 (1*1CM至11*11CM;10*6至12*8CM;20*4以内)"); + }*/ + } else if ("易碎纸不干胶".equals(product.getKindValue()) && proList == null) { + return Msg.fail("易碎纸不干胶该尺寸无法制作,最大做到 42*38 cm"); + } else if (("拉丝金".equals(product.getKindValue()) || "拉丝银".equals(product.getKindValue())) + && proList == null) { + return Msg.fail("拉丝金/银该尺寸无法制作,最大做到 42*38 cm"); + } else if ("格底珠光膜".equals(product.getKindValue()) && proList == null) { + return Msg.fail("格底珠光膜该尺寸无法制作,最大做到 42*38 cm"); + } + if (proList == null) { + if ("少数量".contentEquals(product.getStickerKind())) { + return Msg.fail("少数量最大做到 42*28.5 cm"); + } + /*return Msg.fail("该工艺、该尺寸无法制作,请单独报价");*/ + } + } else if ("20".equals(product.getProTypeValue())) { + if (proList == null && "0".equals(product.getKindValue())) { + return Msg.fail("双插盒该尺寸展开超过650*500MM,请另行报价"); + } else if (proList == null && "1".equals(product.getKindValue())) { + return Msg.fail("飞机盒该尺寸展开超过900*600MM,请另行报价"); + } + } + + if (!StringUtils.isEmpty(toumingKind)) { + product.setKindValue(toumingKind); + } + // 插入操作日志 + String log = quoteLogService.log(product, request, proList); + if ("登陆失效".equals(log)) { + return Msg.fail("登录信息失效~请刷新页面!"); + } + + // 把角色存入,前台判断,区分不同价格 + for (Product p : proList) { +// p.setPrice(Math.ceil(p.getPrice() * 1.3)); + p.setRole(user.getRole()); + } + + if (product.getKindValue() != null) {//判断是否大店报不干胶价格 + /*if(product.getKindValue().equals("0")) { + double width = 0, length = 0; + if(product.getWidth() != null) { + width = product.getWidth(); + } + if(product.getLength() != null) { + length = product.getLength(); + } + String role = user.getRole(); + if(length < width) { + length = product.getWidth(); + width = product.getLength(); + } + if(width == 0 && length == 0) { + }else if((length <= 5 && width <= 4)) { + String tang = product.getCraftTang(); + if(AStickersPrice.f_getRole(role) == 1 && tang == null) { + List price = new ArrayList(); + if(length == 1 && width == 1) { + int priceArr[] = {30, 35, 50, 55, 65, 90, 135, 185, 235, 285}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 2 && width == 1) { + int priceArr[] = {35, 40, 55, 60, 70, 95, 140, 190, 240, 290}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 3 && width == 1) { + int priceArr[] = {35, 40, 55, 70, 80, 125, 205, 290, 370, 455}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 4 && width == 1) { + int priceArr[] = {35, 40, 55, 70, 80, 125, 205, 290, 370, 455}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 5 && width == 1) { + int priceArr[] = {35, 40, 55, 70, 80, 125, 205, 290, 370, 455}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 2 && width == 2) { + int priceArr[] = {35, 40, 55, 70, 80, 125, 205, 290, 370, 455}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 3 && width == 2) { + int priceArr[] = {35, 40, 55, 70, 80, 125, 205, 290, 370, 455}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 4 && width == 2) { + int priceArr[] = {35, 40, 55, 70, 110, 170, 290, 410, 535, 665}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 5 && width == 2) { + int priceArr[] = {35, 40, 55, 70, 110, 170, 290, 410, 535, 665}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 3 && width == 3) { + int priceArr[] = {35, 40, 55, 70, 110, 170, 290, 410, 535, 665}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 4 && width == 3) { + int priceArr[] = {35, 40, 55, 70, 110, 170, 290, 410, 535, 665}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 5 && width == 3) { + int priceArr[] = {35, 40, 55, 70, 110, 170, 290, 410, 535, 665}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 4 && width == 4) { + int priceArr[] = {35, 40, 55, 70, 110, 170, 290, 410, 535, 665}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + }else if(length == 5 && width == 4) { + int priceArr[] = {35, 40, 55, 70, 150, 240, 420, 600, 790, 980}; + price = f_getPrice( priceArr, product.getCount(), product.getCraftMo()); + } + + if (proList.size() >= 4) { + proList = proList.subList(0, 4); + } + + for(int i = 0; i < price.size(); i ++){ + if(product.getNumber() > 1) { + proList.get(i).setPrice(price.get(i).getPrice() * product.getNumber()); + }else { + proList.get(i).setPrice(price.get(i).getPrice()); + } + } + } + } + }elseif(user.getRole().indexOf("1033") > 0 && product.getProTypeValue().equals("17")) { + if(product.getKindValue().equals("6")) { + for (Product products : proList) { + products.setPrice(Math.floor(products.getPrice() * 0.88)); + } + } + } */ + } + + + return Msg.success().add("proList", proList); + } + + /*public List f_getPrice( int priceArr[], int count, String craftMo) { + List list = new ArrayList(); + Product p = new Product(); + int countArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000 }; + for(int i = 0; i < countArr.length; i++) { + if(countArr[i] < count || list.size() > 3) { + continue; + } + p = new Product(); + p.setCount(countArr[i]); + if(craftMo.equals("覆哑膜")) { + p.setPrice(Math.ceil(Double.valueOf(priceArr[i]) * 1.2)); + }else { + p.setPrice(Double.valueOf(priceArr[i])); + } + + list.add(p); + } + + return list; + }*/ + + /** + * 根据产品种类获取材质 + * + * @param proTypeValue + * @return + */ + @RequestMapping(value = "/getKindsByPro") + public Map kindList(@RequestParam("proTypeValue") String proTypeValue) { + Map map = new HashMap(); + List proList = productService.getKindsByPro(proTypeValue); + for (Product product : proList) { + map.put(product.getKindValue(), product.getKindLabel()); + } + return map; + } + + /** + * 根据用户搜索的产品名称获取产品 + */ + @RequestMapping(value = "/getSearchPro") + public List searchPro(@RequestParam("likeProTypeLabel") String likeProTypeLabel) + throws Exception { + List proList = productService.searchPro(likeProTypeLabel); + return proList; + } + + /** + * 价格文件上传 + */ + @RequestMapping(value = "/priceUpload") + public Msg uploadExcel(@RequestParam("file") MultipartFile file) throws Exception { + System.out.println("进来了"); + productService.ajaxUploadExcel(file); + return Msg.success(); + } + +} diff --git a/src/main/java/lingtao/net/controller/ProductImgController.java b/src/main/java/lingtao/net/controller/ProductImgController.java new file mode 100644 index 0000000..a2a0755 --- /dev/null +++ b/src/main/java/lingtao/net/controller/ProductImgController.java @@ -0,0 +1,214 @@ +package lingtao.net.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import lingtao.net.bean.Msg; +import lingtao.net.bean.ProductImg; +import lingtao.net.bean.SysDictProduct; +import lingtao.net.service.ProductImgService; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.http.client.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import javax.management.RuntimeErrorException; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.IOException; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@RestController +public class ProductImgController { + + private String localPrefix = "abc\\product"; + + private String localPath = "C:\\lingtao\\upload"; + + private String localDomain = "http://47.114.150.226:80/erp"; + + @Autowired + private ProductImgService productImgService; + + /** + * 根据条件查询 + */ + @RequestMapping("/getImgList") + private Msg imgList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, ProductImg productImg) { + PageHelper.startPage(page, limit); + List list = productImgService.getProKindList(productImg); + PageInfo pageInfo = new PageInfo(list); + return Msg.success().add("list", pageInfo); + } + + /** + * 获取所有产品 + * + * @return + */ + @RequestMapping("/productList") + public Msg productList() { + Map map = new HashMap(); + List proList = productImgService.findAllPro(); + for (SysDictProduct entity : proList) { + map.put(entity.getProTypeValue(), entity.getProTypeLabel()); + } + return Msg.success().add("proMap", map); + } + + /** + * 根据产品种类获取材质 + * + * @param proTypeValue + * @return + */ + /* + * @RequestMapping("/getKindsByPro") public Msg + * kindList(@RequestParam("proTypeValue") String proTypeValue) { Map map = new HashMap(); List kindList = + * productImgService.getKindsByPro(proTypeValue); if (kindList.size() > 0) { for + * (SysDictProduct entity : kindList) { map.put(entity.getKindValue(), + * entity.getKindLabel()); } } return Msg.success().add("proMap", map); } + */ + + /** + * 根据材质获取规格 + * + * @param dto + * @return + */ + @RequestMapping(value = "/getKind2sByKind") + public Map kind2List(@RequestParam("proTypeValue") String proTypeValue, + @RequestParam("kindValue") String kindValue) { + Map map = new HashMap(); + List kind2List = productImgService.getKind2sByKind(proTypeValue, kindValue); + if (kind2List.size() > 0) { + for (SysDictProduct entity : kind2List) { + map.put(entity.getKind2Value(), entity.getKind2Label()); + } + } + return map; + } + + // 图片上传及新增 + @RequestMapping("/productUpload") + public Msg upload(@RequestParam("file") MultipartFile file, + @RequestParam(value = "proTypeValue", required = false) String proTypeValue, + @RequestParam(value = "kindValue", required = false) String kindValue, + @RequestParam(value = "kind2Value", required = false) String kind2Value, + @RequestParam(value = "remark", required = false) String remark) throws Exception { + if (file.isEmpty()) { + return Msg.fail("文件不能为空"); + } + // 获取文件名后缀 + String extension = FilenameUtils.getExtension(file.getOriginalFilename()); + // 获取path + String path = getPath(extension, FilenameUtils.getBaseName(file.getOriginalFilename())); + // 保存文件信息 + File newFile = new File(localPath + File.separator + path); + try { + FileUtils.copyInputStreamToFile(new ByteArrayInputStream(file.getBytes()), newFile); + } catch (IOException e) { + throw new RuntimeErrorException(null, ""); + } + + System.out.println("kind2Value=" + "null".equals(kind2Value)); + // 文件信息 + ProductImg productImg = new ProductImg(); + // productImg.setImgUrl(localPath + "/" + path); + productImg.setImgUrl(localDomain + "/" + path); + + // 保存图片信息 + productImg.setProTypeValue(proTypeValue); + if (StringUtils.isNotEmpty(kindValue)) { + productImg.setKindValue(kindValue); + } + if (StringUtils.isNotEmpty(kind2Value) && !"null".equals(kind2Value)) { + productImg.setKind2Value(kind2Value); + } + if (StringUtils.isNotEmpty(remark)) { + productImg.setRemark(remark); + } + // 根据value查询label + SysDictProduct label = productImgService.getLabel(productImg); + productImg.setProTypeLabel(label.getProTypeLabel()); + productImg.setKindLabel(label.getKindLabel()); + productImg.setKind2Label(label.getKind2Label()); + + // productImg.setImgUrl(productImg.getImgUrl()); + productImgService.addImgUrl(productImg); + + return Msg.success().add("imgList", productImg); + } + + /** + * 修改备注说明 + * + * @param id + * @param remark + * @return + */ + @RequestMapping("/updateImgUploadRemark") + public Msg updateImgUploadRemark(@RequestParam("id") Long id, @RequestParam("remark") String remark) { + ProductImg img = new ProductImg(); + img.setId(id); + img.setRemark(remark); + productImgService.updateImgUploadRemark(img); + return Msg.success(); + } + + /** + * @param prefixSelf 根据上传的接口存入自己的文件夹 + * @param suffix 文件的后缀 + * @param fileName 文件名 + * @return + */ + public String getPath(String suffix, String fileName) { + + // 生成uuid + // String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String path = null; + + // 文件路径 + path = DateUtils.formatDate(new Date(), "yyyyMMdd") + File.separator + fileName; + + path = localPrefix + File.separator + File.separator + path; + + return path + "." + suffix; + } + + /** + * 根据条件获取产品图片 + * + * @param dto + * @return + */ + @RequestMapping("/getImgs") + public List imgList(@RequestParam("proTypeValue") String proTypeValue, + @RequestParam(value = "kindValue", required = false) String kindValue, + @RequestParam(value = "craftValue", required = false) String craftValue, + @RequestParam(value = "kind2Value", required = false) String kind2Value) { + List imgList = productImgService.getImgsByProKind(proTypeValue, kindValue, kind2Value, craftValue); + return imgList; + } + + /** + * 获取视频地址 + * + * @param dto + * @return + */ + @RequestMapping("/getVideos") + public List videos() { + List videoUrls = productImgService.getVideos(); + return videoUrls; + } +} diff --git a/src/main/java/lingtao/net/controller/QuestionController.java b/src/main/java/lingtao/net/controller/QuestionController.java new file mode 100644 index 0000000..d043f64 --- /dev/null +++ b/src/main/java/lingtao/net/controller/QuestionController.java @@ -0,0 +1,122 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Information; +import lingtao.net.bean.Msg; +import lingtao.net.bean.Question; +import lingtao.net.bean.SysUser; +import lingtao.net.service.InformationService; +import lingtao.net.service.QuestionService; +import lingtao.net.service.SysUserService; + +@RestController +public class QuestionController { + + @Autowired + private QuestionService questionService; + + @Autowired + private InformationService informationService; + + @Autowired + private SysUserService sysUserService; + + /** + * 问题列表 + * + * @return + */ + @RequestMapping("/questions") + public Msg questions(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, Question question) { + PageHelper.startPage(page, limit); + List questionList = questionService.questions(question); + PageInfo pageInfo = new PageInfo(questionList); + return Msg.success().add("list", pageInfo); + } + + @RequestMapping("/getQuestions") + public Msg getQuestions(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit) { + PageHelper.startPage(page, limit); + // 单选题 + List singleQuestionList = questionService.getSingleQuestions(); + // 多选题 + List multipleQuestionList = questionService.getMultipleQuestions(); + // 填空题 + List fillQuestionList = questionService.getFillQuestions(); + // 简答题 + List shortAnswerList = informationService.getShortAnswers(); + + PageInfo single = new PageInfo(singleQuestionList); + PageInfo multiple = new PageInfo(multipleQuestionList); + PageInfo fill = new PageInfo(fillQuestionList); + PageInfo shortAnswer = new PageInfo(shortAnswerList); + // 转成json返回JSONArray.fromObject(questionList) + return Msg.success().add("single", single).add("multiple", multiple).add("fill", fill).add("shortAnswer", + shortAnswer); + } + + /** + * 添加问题 + */ + @RequestMapping("/addQuestion") + public Msg addQuestion(Question question, HttpSession session) { + questionService.addQuestion(question, session); + return Msg.success(); + } + + /** + * 修改问题 + */ + @RequestMapping("/updateQuestion") + public Msg updateQuestion(Question question, HttpSession session) { + questionService.updateQuestionById(question, session); + return Msg.success(); + } + + /** + * 删除 + */ + @RequestMapping("/deleteQuestion") + public Msg deleteQuestion(@RequestParam("id") Integer id) { + questionService.deleteQuestionById(id); + return Msg.success(); + } + + /** + * 答对80%后,改变系统状态 + * + * @return + */ + @RequestMapping("/videoOverToChangeSysStatus") + public Msg videoOverToChangeSysStatus(HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + return sysUserService.videoOverToChangeSysStatus(user.getUserId()); + } + @RequestMapping("/examOverToChangeSysStatus") + public Msg examOverToChangeSysStatus(HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + return sysUserService.examOverToChangeSysStatus(user.getUserId()); + } + /* + * @RequestMapping("/changeSysStatus") public Msg changeSysStatus(HttpSession + * session, @RequestBody Map map) { System.out.println(map); + * Set> entrySet = map.entrySet(); for (Entry key : entrySet) { System.out.println(key); } SysUser user = (SysUser) + * session.getAttribute("USER_SESSION"); return + * sysUserService.changeSysStatus(user.getUserId()); } + */ + +} diff --git a/src/main/java/lingtao/net/controller/QuoteDataController.java b/src/main/java/lingtao/net/controller/QuoteDataController.java new file mode 100644 index 0000000..914eddf --- /dev/null +++ b/src/main/java/lingtao/net/controller/QuoteDataController.java @@ -0,0 +1,165 @@ +package lingtao.net.controller; + +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.QuoteData; +import lingtao.net.bean.SysUser; +import lingtao.net.service.QuoteDataService; + +@RestController +public class QuoteDataController { + + @Autowired + private QuoteDataService quoteDataService; + + /** + * 获取操作日志列表 + * + * @param page + * @param limit + * @param quoteLog + * @return + */ + @RequestMapping("/getQuoteData") + public PageInfo logList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, QuoteData quoteData) { + PageHelper.startPage(page, limit); + List logList = quoteDataService.quoteDatas(quoteData); + PageInfo pageInfo = new PageInfo(logList); + return pageInfo; + } + + /** + * 修改数据 + * + */ + @RequestMapping("/updateById") + public Msg updateById(@RequestParam(value = "id") int id, @RequestParam(value = "field") String field, + @RequestParam(value = "value") String value, @RequestParam(value = "username") String username) { + return quoteDataService.updateById(id, field, value, username); + } + + /** + * 获取报过的产品 + * + */ + @RequestMapping("/getProTypeLabel") + public List getProType() { + return quoteDataService.getProType(); + } + + /** + * 修改【是否当天成交】状态(自己修改) + * + * @param id + * @return + */ + @RequestMapping("/changeIsBuyToDayStatus") + public Msg changeIsBuyToDay(@RequestParam(value = "id") Integer id, + @RequestParam(value = "username") String username) { + // 只有自己的数据才能更改【是否当天成交】状态 + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + // 超管、组长身份也能更改【是否当天成交】状态 + boolean flag = new CustomerDataControlle().isSuperOrManager(); + if (!username.equals(user.getUsername()) && !flag) { + return Msg.fail("只允许修改自己的数据!"); + } + return quoteDataService.changeIsBuyToDay(id); + } + + /** + * 修改【是否成交】状态(店长修改) + * + * @param id + * @return + */ + @RequestMapping("/changeIsBuyStatus") + public Msg changeIsBuy(@RequestParam(value = "id") Integer id) { + // 超管、组长身份才允许修改【成交状态】 + boolean flag = new CustomerDataControlle().isSuperOrManager(); + if (!flag) { + return Msg.fail(); + } + return quoteDataService.changeIsBuy(id); + } + + /** + * 修改所属店铺以及选择状态 + * + * @param id + * @return + */ + @RequestMapping("/updateShopname") + public Msg updateShopname(@RequestParam(value = "id") Integer id, @RequestParam(value = "shopname") String shopname, + @RequestParam(value = "username") String username) { + if (StringUtils.isEmpty(shopname)) { + return Msg.fail("请选择有效店铺!"); + } + // 只有自己的数据才能更改【所属店铺】 + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + if (!username.equals(user.getUsername())) { + return Msg.fail("只允许修改自己的数据!"); + } + return quoteDataService.updateShopnameSelect(shopname, id); + } + + @RequestMapping("/addOrderNumber") + public Msg addOrderNumber(@RequestParam(value = "id") Integer id, + @RequestParam(value = "orderNumber") String orderNumber) { + if (StringUtils.isEmpty(orderNumber)) { + return Msg.fail("请填写订单号"); + } + if (orderNumber.length() < 10 || orderNumber.length() > 25) { + return Msg.fail("请填写正确的订单号"); + } + return quoteDataService.addOrderNumber(id, orderNumber); + } + + /** + * 柱状图 + * + */ + @ResponseBody + @RequestMapping("/echartZhuSummary") + public Map echartZhuList(QuoteData quoteData) { + return quoteDataService.echartZhuList(quoteData, 0); + } + + /** + * 客服大单统计图 + * + */ + @ResponseBody + @RequestMapping("/echartKefuSummary") + public Map echartKefuList(QuoteData quoteData) { + return quoteDataService.echartZhuList(quoteData, 1); + } + + /** + * 导出 + * + * @param response + * @param request + * @param difference + * @throws Exception + */ + @RequestMapping("/excel_quoteData") + public void excel(HttpServletResponse response, QuoteData quoteData) throws Exception { + quoteDataService.excel(response, quoteData); + } +} diff --git a/src/main/java/lingtao/net/controller/QuoteLogController.java b/src/main/java/lingtao/net/controller/QuoteLogController.java new file mode 100644 index 0000000..e3f6b26 --- /dev/null +++ b/src/main/java/lingtao/net/controller/QuoteLogController.java @@ -0,0 +1,39 @@ +package lingtao.net.controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.QuoteLog; +import lingtao.net.service.QuoteLogService; + +@RestController +public class QuoteLogController { + + @Autowired + private QuoteLogService quoteLogService; + + /** + * 获取操作日志列表 + * + * @param page + * @param limit + * @param quoteLog + * @return + */ + @RequestMapping("/getQuoteLog") + public PageInfo logList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, QuoteLog quoteLog) { + PageHelper.startPage(page, limit); + List logList = quoteLogService.quoteLogs(quoteLog); + PageInfo pageInfo = new PageInfo(logList); + return pageInfo; + } + +} diff --git a/src/main/java/lingtao/net/controller/SysDictSearchProController.java b/src/main/java/lingtao/net/controller/SysDictSearchProController.java new file mode 100644 index 0000000..e2a293a --- /dev/null +++ b/src/main/java/lingtao/net/controller/SysDictSearchProController.java @@ -0,0 +1,67 @@ +package lingtao.net.controller; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysDictSearchPro; +import lingtao.net.service.SysDictSearchProService; + +@RestController +public class SysDictSearchProController { + + @Autowired + private SysDictSearchProService searchProService; + + /** + * 查询关键字 + * + * @param searchPro + * @return + */ + @RequestMapping("/getKeyWordsList") + public PageInfo keyWordsList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, SysDictSearchPro searchPro) { + PageHelper.startPage(page, limit); + List keyWordsList = searchProService.keyWordsList(searchPro); + PageInfo pageInfo = new PageInfo(keyWordsList); + return pageInfo; + } + + /** + * 添加关键字 + */ + @RequestMapping("/addSearchPro") + public Msg addSearchPro(SysDictSearchPro searchPro, HttpSession session) { + return searchProService.addSearchPro(searchPro, session); + } + + /** + * 根据id修改关键字 + * + */ + @ResponseBody + @RequestMapping("/updateKeyWord") + public Msg updateKeyWordById(HttpSession session, @RequestParam(value = "id") int id, + @RequestParam(value = "value") String value, @RequestParam(value = "field") String field) throws Exception { + return searchProService.updateKeyWordById(session, id, value, field); + } + + /** + * 改变用户状态 + */ + @RequestMapping("/changeKeyWordsStatus") + public Msg changeKeyWordStatus(@RequestParam(value = "id") Integer id) { + return searchProService.changeKeyWordStatus(id); + } +} diff --git a/src/main/java/lingtao/net/controller/SysPermissionController.java b/src/main/java/lingtao/net/controller/SysPermissionController.java new file mode 100644 index 0000000..e794b7a --- /dev/null +++ b/src/main/java/lingtao/net/controller/SysPermissionController.java @@ -0,0 +1,42 @@ +package lingtao.net.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import lingtao.net.bean.SysPermission; +import lingtao.net.service.SysPermissionService; + +@RequestMapping("/sysPermission") +@Controller +public class SysPermissionController { + + @Autowired + private SysPermissionService sysPermissionService; + + @RequestMapping("/index") + public String index() throws Exception { + return "system/permission/index"; + } + + @RequestMapping("/parentList") + @ResponseBody + public List parentList() { + return sysPermissionService.getParentPers(); + } + + @RequestMapping("/list") + @ResponseBody + public Map list() throws Exception { + Map map = new HashMap<>(); + map.put("code", 0); + map.put("msg", null); + map.put("data", sysPermissionService.getAll()); + return map; + } +} diff --git a/src/main/java/lingtao/net/controller/SysRoleController.java b/src/main/java/lingtao/net/controller/SysRoleController.java new file mode 100644 index 0000000..fcf1754 --- /dev/null +++ b/src/main/java/lingtao/net/controller/SysRoleController.java @@ -0,0 +1,172 @@ +package lingtao.net.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysRole; +import lingtao.net.bean.SysUser; +import lingtao.net.service.SysRoleService; + +/** + * 角色权限 + */ +@Controller +public class SysRoleController { + + @Autowired + private SysRoleService sysRoleService; + + // 用户跳转页面 + @RequestMapping("/role/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/role/role.jsp"); + } + + /** + * 根据条件查询角色 + */ + @RequestMapping("/getRoleList") + @ResponseBody + private Msg roleList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, SysRole role) { + PageHelper.startPage(page, limit); + List list = sysRoleService.getRoles(role); + // 查询所有的角色,不分页:用于查询 + List allRoleList = sysRoleService.getRoles(role); + PageInfo pageInfo = new PageInfo(list); + return Msg.success().add("roleList", pageInfo).add("allRoleList", allRoleList); + } + + /** + * 添加角色 + */ + @ResponseBody + @RequestMapping("/addRole") + public Msg addRole(SysRole role, HttpSession session) { + return sysRoleService.addRole(role, session); + } + + /** + * 修改角色 + */ + @ResponseBody + @RequestMapping("/updateRole") + public Msg updateRoleById(SysRole role) { + return sysRoleService.updateRoleById(role); + } + + /** + * 改变角色状态 + */ + @ResponseBody + @RequestMapping("/changeRoleStatus") + public Msg changeRoleStatus(@RequestParam(value = "roleId") String roleId) { + return sysRoleService.changeRoleStatus(roleId); + } + + /** + * 根据角色id查询角色拥有的权限 + * + * @param roleId + * @return List + */ + @RequestMapping("/rolePers") + @ResponseBody + public List rolePers(Integer roleId) throws Exception { + return sysRoleService.getPerIdsByRoleId(roleId); + } + + /** + * 根据角色id授权(先删除已有的权限,再插入新的权限集合) + */ + @RequestMapping("/assignPers") + @ResponseBody + public Map assignPers(Integer roleId, String persIds) throws Exception { + Map map = new HashMap<>(); + sysRoleService.deleteRolePermissions(roleId); + sysRoleService.addRolePermissions(roleId, persIds.split(",")); + return map; + } + + /** + * 角色名称字段转换 + * + * @return + */ + @RequestMapping("/changeRoleName") + @ResponseBody + public Map changeRoleName() { + Map map = new HashMap(); + List allRoleNames = sysRoleService.getAllRoleName(null); + + for (SysRole sysRole : allRoleNames) { + map.put(sysRole.getRoleId(), sysRole.getRoleName()); + } + + return map; + } + + /** + * 获取用户拥有的角色列表 + * + * @return + */ + @ResponseBody + @RequestMapping("/getUserRoles") + public Msg userRoles(String flag) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + // 用户角色集合 + List userRoleList = null; + // 用户所拥有的角色 + String[] roleList = user.getRole().split(","); + // 判断是否拥有超管身份标识 + boolean isSuper = false; + boolean isAllShop = false; + for (int i = 0; i < roleList.length; i++) { + // 有‘超级管理员’身份,状态改为true + if ("1".equals(roleList[i])) { + isSuper = true; + break; + } + + // 客服数据管理页面 + if (StringUtils.isNotEmpty(flag)) { + // 拥有‘所有店铺’身份,状态为ture + if ("777".equals(roleList[i])) { + isAllShop = true; + break; + } + } + } + + // 如果有‘超级管理员’身份,查询所有角色;如果没,就查询用户所拥有的且允许被创建的角色 + if (isSuper) { + userRoleList = sysRoleService.getRoles(null); + } else { + // 如果有‘所有店铺’身份,查询所有允许被创建的角色;如果没,就查询用户所拥有的且允许被创建的角色 + if (isAllShop) { + userRoleList = sysRoleService.getAllRoleName("1"); + } else { + userRoleList = sysRoleService.getRolesByUserId(user.getUserId()); + } + } + return Msg.success().add("userRoleList", userRoleList); + } +} diff --git a/src/main/java/lingtao/net/controller/SysUserController.java b/src/main/java/lingtao/net/controller/SysUserController.java new file mode 100644 index 0000000..ce1e367 --- /dev/null +++ b/src/main/java/lingtao/net/controller/SysUserController.java @@ -0,0 +1,240 @@ +package lingtao.net.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.service.SysUserService; +import lingtao.net.util.PublicMethods; + +/** + * 用户 + * + */ +@Controller +public class SysUserController { + + @Autowired + private SysUserService sysUserService; + + // 用户跳转页面 + @RequestMapping("/user/index") + public void index(HttpServletRequest request, HttpServletResponse response) throws Exception { + response.sendRedirect(request.getContextPath() + "/views/system/user/user.jsp"); + } + + /** + * 根据条件查询用户 + */ + @RequestMapping("/getUserList") + @ResponseBody + private Msg userList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, SysUser user) { + PageHelper.startPage(page, limit); + List list = sysUserService.getUsers(user); + PageInfo pageInfo = new PageInfo(list); + return Msg.success().add("userList", pageInfo); + } + + /** + * 检查用户名是否存在 + */ + @ResponseBody + @RequestMapping("/checkUsername") + public Msg checkUsername(@RequestParam(value = "username") String username) { + return sysUserService.checkUsername(username); + } + + /** + * 添加用户 + */ + @ResponseBody + @RequestMapping("/addUser") + public Msg addUser(SysUser user) { + sysUserService.addUser(user); + if (StringUtils.isNotEmpty(user.getRole())) { + addUserRoles(user); + } + return Msg.success(); + } + + /** + * 修改用户 + */ + @ResponseBody + @RequestMapping("/updateUser") + public Msg updateUserById(SysUser user) { + sysUserService.updateUserById(user); + sysUserService.deleteUserRoles(user.getUserId()); + if (StringUtils.isNotEmpty(user.getRole())) { + addUserRoles(user); + } + return Msg.success(); + } + + /** + * 删除用户 + */ + @RequestMapping("/deleteUserById") + @ResponseBody + public Msg deleteUserById(@RequestParam("id") Integer userId) { + return sysUserService.deleteUserById(userId); + } + + /** + * 根据用户编号更改角色 + * + * @param user + */ + public void addUserRoles(SysUser user) { + String[] array = user.getRole().split(","); + Integer[] ids = new Integer[array.length]; + for (int i = 0; i < array.length; i++) { + ids[i] = Integer.parseInt(array[i]); + } + Integer userId = user.getUserId(); + sysUserService.addUserRoles(userId, ids); + } + + /** + * 改变用户状态 + */ + @ResponseBody + @RequestMapping("/changeUserStatus") + public Msg changeUserStatus(@RequestParam(value = "userId") Integer userId) { + return sysUserService.changeUserStatus(userId); + } + + /** + * 改变用户系统状态 + */ + @ResponseBody + @RequestMapping("/changeSysStatus") + public Msg changeSysStatus(@RequestParam(value = "userId") Integer userId) { + return sysUserService.changeSysStatus(userId); + } + + /** + * 改变所有用户的Ip状态 + */ + @ResponseBody + @RequestMapping("/changeNeedIp") + public Msg changeNeedIp() { + return sysUserService.changeNeedIp(); + } + + /** + * 改变用户阅读日志状态 + */ + @ResponseBody + @RequestMapping("/changeReadLogStatus") + public Msg changeReadLogStatus(HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + sysUserService.changeReadLogStatus(user.getUserId()); + return Msg.success(); + } + + /** + * 获取用户信息 + * + * @param session + * @return + */ + @ResponseBody + @RequestMapping("/getUserInfo") + public Msg getUserInfo(HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + SysUser userInfo = sysUserService.getUserInfo(user.getUserId()); + if (userInfo != null) { + return Msg.success().add("userInfo", userInfo); + } + return Msg.fail(); + } + + /** + * 修改密码 + * + */ + @ResponseBody + @RequestMapping("/updatePassword") + public Msg updatePassword(SysUser user) { + return sysUserService.updatePassword(user); + } + + /** + * 补充生日 + * + */ + @ResponseBody + @RequestMapping("/addBirthDay") + public Msg addBirthDay(SysUser user) { + return sysUserService.addBirthDay(user); + } + + /** + * 改变用户生日状态 + */ + @ResponseBody + @RequestMapping("/changeIsBirthDay") + public Msg changeIsBirthDay(HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + sysUserService.changeIsBirthDay(user.getUserId()); + return Msg.success(); + } + + /** + * 从session中取出登录用户到信息 + * + * @return + */ + @ResponseBody + @RequestMapping("/loginAttribute") + public Msg loginAttribute(HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + if (user != null) { + return Msg.success().add("user", user); + } + return Msg.fail(); + } + + /** + * 客服数据 -- 根据搜索的店铺获取人员 + * + * @return + */ + @RequestMapping("/getRealnamesByShopname") + @ResponseBody + public Map getRealnamesByShopname(@RequestParam(value = "shopname") String shopname, + HttpServletRequest request) { + Map map = new HashMap(); + SysUser user = (SysUser) request.getSession().getAttribute("USER_SESSION"); + // 没有选择店铺 没有超管或者 没有店铺身份 + if (StringUtils.isEmpty(shopname) && (!new PublicMethods().isSuper() && !user.getRole().contains("777"))) { + return null; + } + List realnameList = sysUserService.getRealnamesByShopname(shopname); + + for (SysUser sysUser : realnameList) { + map.put(sysUser.getRealname(), sysUser.getRealname()); + } + + return map; + } + +} diff --git a/src/main/java/lingtao/net/controller/UpdateLogControllef.java b/src/main/java/lingtao/net/controller/UpdateLogControllef.java new file mode 100644 index 0000000..c4269ec --- /dev/null +++ b/src/main/java/lingtao/net/controller/UpdateLogControllef.java @@ -0,0 +1,67 @@ +package lingtao.net.controller; + +import com.github.pagehelper.PageHelper; +import lingtao.net.bean.Msg; +import lingtao.net.bean.UpdateLog; +import lingtao.net.service.UpdateLogService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpSession; +import java.text.SimpleDateFormat; +import java.util.List; + +@RestController +public class UpdateLogControllef { + + @Autowired + private UpdateLogService updateLogService; + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + @RequestMapping("/getUpdateLogs") + public Msg getUpdateLogs(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "10") Integer limit, UpdateLog updateLog) { + PageHelper.startPage(page, limit); + List updateLogList = updateLogService.getUpdateLogs(updateLog); + for (UpdateLog log : updateLogList) { + log.setAddTimeStr(sdf.format(log.getAddTime())); + } + return Msg.success().add("list", updateLogList); + } + + /** + * 添加更新日志 + * + * @throws Exception + */ + @RequestMapping("/addLog") + public Msg addLog(UpdateLog updateLog, HttpSession session) throws Exception { + // 把字符串转为日期格式 + updateLog.setAddTime(sdf.parse(updateLog.getAddTimeStr())); + updateLogService.addLog(updateLog, session); + // 更新日志后,把所有用户的阅读更新日志状态改为未读:0 + updateLogService.changeReadLogStatus(); + return Msg.success(); + } + + /** + * 修改更新日志 + */ + @RequestMapping("/updateLog") + public Msg updateLog(UpdateLog updateLog, HttpSession session) { + updateLogService.updateLogById(updateLog, session); + return Msg.success(); + } + + /** + * 删除 + */ + @RequestMapping("/deleteLog") + public Msg deleteLog(@RequestParam("id") Integer id) { + updateLogService.deleteLogById(id); + return Msg.success(); + } +} diff --git a/src/main/java/lingtao/net/dao/ArticleMapper.java b/src/main/java/lingtao/net/dao/ArticleMapper.java new file mode 100644 index 0000000..32b1b28 --- /dev/null +++ b/src/main/java/lingtao/net/dao/ArticleMapper.java @@ -0,0 +1,38 @@ +package lingtao.net.dao; + +import java.util.List; +import lingtao.net.bean.Article; +import lingtao.net.bean.ArticleExample; +import org.apache.ibatis.annotations.Param; + +public interface ArticleMapper { + long countByExample(ArticleExample example); + + int deleteByExample(ArticleExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(Article record); + + int insertSelective(Article record); + + List
selectByExampleWithBLOBs(ArticleExample example); + + List
selectByExample(ArticleExample example); + + Article selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") Article record, @Param("example") ArticleExample example); + + int updateByExampleWithBLOBs(@Param("record") Article record, @Param("example") ArticleExample example); + + int updateByExample(@Param("record") Article record, @Param("example") ArticleExample example); + + int updateByPrimaryKeySelective(Article record); + + int updateByPrimaryKeyWithBLOBs(Article record); + + int updateByPrimaryKey(Article record); + + List
getArticle(Article article); +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/dao/BugMapper.java b/src/main/java/lingtao/net/dao/BugMapper.java new file mode 100644 index 0000000..b770ce0 --- /dev/null +++ b/src/main/java/lingtao/net/dao/BugMapper.java @@ -0,0 +1,12 @@ +package lingtao.net.dao; + +import java.util.List; + +import lingtao.net.bean.Bug; + +public interface BugMapper { + + List getBugs(Bug bug); + + int addBug(Bug bug); +} diff --git a/src/main/java/lingtao/net/dao/CommonDao.java b/src/main/java/lingtao/net/dao/CommonDao.java new file mode 100644 index 0000000..6d06e1c --- /dev/null +++ b/src/main/java/lingtao/net/dao/CommonDao.java @@ -0,0 +1,21 @@ +package lingtao.net.dao; + +import java.io.Serializable; +import java.util.List; + +public interface CommonDao { + public List getAll(); + + public E get(PK id); + + public void add(E user); + + public void delete(PK id); + + public void batchDelete(PK[] ids); + + public void update(E user); + + public List getList(E condition); + +} diff --git a/src/main/java/lingtao/net/dao/CustomerAwardMapper.java b/src/main/java/lingtao/net/dao/CustomerAwardMapper.java new file mode 100644 index 0000000..c7f9f3c --- /dev/null +++ b/src/main/java/lingtao/net/dao/CustomerAwardMapper.java @@ -0,0 +1,23 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; + +import lingtao.net.bean.CustomerAward; + +@Mapper +public interface CustomerAwardMapper { + + void insertForeach(List list); + + List getCustomerAward(CustomerAward customerAward); + + // 批量删除 + public void deleteBatch(int[] ints); + + @Select("select distinct shopname from tbl_customer_award") + List getArardShopname(); + +} diff --git a/src/main/java/lingtao/net/dao/CustomerDataMapper.java b/src/main/java/lingtao/net/dao/CustomerDataMapper.java new file mode 100644 index 0000000..10e2696 --- /dev/null +++ b/src/main/java/lingtao/net/dao/CustomerDataMapper.java @@ -0,0 +1,28 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; + +import lingtao.net.bean.CustomerData; + +public interface CustomerDataMapper { + + List getCustomerDatas(CustomerData customerData); + + void addCustomerData(CustomerData customerData); + + void updateCustomerDataById(CustomerData customerData); + + void deleteCustomerDataById(Integer id); + + void updateCommentManager(CustomerData customerData); + + @Update("UPDATE tbl_customer_data SET isBuy = '1',completeDate = now() WHERE id = #{id} ") + void changeIsBuy(@Param("id") Integer id); + + List getProductExplain(@Param("productExplain") String productExplain, @Param("username") String username); + + +} diff --git a/src/main/java/lingtao/net/dao/CustomerTrainMapper.java b/src/main/java/lingtao/net/dao/CustomerTrainMapper.java new file mode 100644 index 0000000..cf39263 --- /dev/null +++ b/src/main/java/lingtao/net/dao/CustomerTrainMapper.java @@ -0,0 +1,43 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; + +import lingtao.net.bean.CustomerTrainContent; +import lingtao.net.bean.CustomerTrainKindLabel; +import lingtao.net.bean.CustomerTrainProType; + +@Mapper +public interface CustomerTrainMapper { + + List getCustomerTrainContents(CustomerTrainContent customerTrainContent); + + void addCustomerTrainContent(CustomerTrainContent customerTrainContent); + + void updateCustomerTrainContentById(CustomerTrainContent customerTrainContent); + + @Update("update t_customer_knowledge_content set sort = #{sort} where id = #{id}") + void updateCustomerTrainContentSort(@Param("id") int id, @Param("sort") int sort); + + void deleteCustomerTrainContentById(Integer id); + + List getCustomerTrainProTypes(CustomerTrainProType customerTrainProType); + + void addCustomerTrainProType(CustomerTrainProType customerTrainProType); + + void updateCustomerTrainProTypeById(CustomerTrainProType customerTrainProType); + + void deleteCustomerTrainProTypeById(Integer id); + + List getCustomerTrainKindLabelsByProType(CustomerTrainKindLabel customerTrainKindLabel); + + void addCustomerTrainKindLabel(CustomerTrainKindLabel customerTrainKindLabel); + + void updateCustomerTrainKindLabelById(CustomerTrainKindLabel customerTrainKindLabel); + + void deleteCustomerTrainKindLabelById(Integer id); + +} diff --git a/src/main/java/lingtao/net/dao/ExpressFeeMapper.java b/src/main/java/lingtao/net/dao/ExpressFeeMapper.java new file mode 100644 index 0000000..1c0180b --- /dev/null +++ b/src/main/java/lingtao/net/dao/ExpressFeeMapper.java @@ -0,0 +1,33 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Select; + +import lingtao.net.bean.ExpressFee; + +public interface ExpressFeeMapper { + + List getExpressFees(ExpressFee expressFee); + + void addExpressFee(ExpressFee expressFee); + + void updateExpressFeeById(ExpressFee expressFee); + + void deleteExpressFeeById(Integer id); + + List getShortAnswers(); + + @Select("select * from tbl_express_fee where pro_type_value = '999' order by id") + List getAllExpressFees(ExpressFee expressFee); + + @Select("select * from tbl_express_fee where pro_type_value = '11' order by id") + List getHandBagExpressFees(ExpressFee expressFee); + + @Select("select * from tbl_express_fee where pro_type_value = '6,7,8' order by id") + List getTaoExpressFees(ExpressFee expressFee); + + @Select("select * from tbl_express_fee where pro_type_value = '0' order by id") + List getOtherExpressFees(ExpressFee expressFee); + +} diff --git a/src/main/java/lingtao/net/dao/Finance2Mapper.java b/src/main/java/lingtao/net/dao/Finance2Mapper.java new file mode 100644 index 0000000..c3e0b1e --- /dev/null +++ b/src/main/java/lingtao/net/dao/Finance2Mapper.java @@ -0,0 +1,26 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.Finance; + +@Mapper +public interface Finance2Mapper { + + List getFinance(Finance finance); + + void insertForeach(List list); + + // 查询数据是否存在,避免重复上传 + String checkAccountNumber(@Param("orderNumber") String orderNumber); + + List getAllFilename(@Param("creator") String creator); + + @Delete("delete from tbl_sys_finance where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename(@Param("filename") String filename, @Param("realname") String realname); + +} diff --git a/src/main/java/lingtao/net/dao/Finance3Mapper.java b/src/main/java/lingtao/net/dao/Finance3Mapper.java new file mode 100644 index 0000000..173a12b --- /dev/null +++ b/src/main/java/lingtao/net/dao/Finance3Mapper.java @@ -0,0 +1,52 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.Finance; + +@Mapper +public interface Finance3Mapper { + + List getFinance(Finance finance); + List getFinance4(Finance finance); + List getFinance5(Finance finance); + + void insertForeach(List list); + void insertForeach4(List list); + void insertForeach5(List list); + + // 查询数据是否存在,避免重复上传 + String checkAccountNumber(@Param("orderNumber") String orderNumber); + String checkAccountNumber4(@Param("orderNumber") String orderNumber); + String checkAccountNumber5(@Param("orderNumber") String orderNumber); + + List getAllFilename(@Param("creator") String creator); + List getAllFilename4(@Param("creator") String creator); + List getAllFilename5(@Param("creator") String creator); + + @Delete("delete from tbl_sys_finance3 where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename(@Param("filename") String filename, @Param("realname") String realname); + @Delete("delete from tbl_sys_finance4 where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename4(@Param("filename") String filename, @Param("realname") String realname); + @Delete("delete from tbl_sys_finance5 where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename5(@Param("filename") String filename, @Param("realname") String realname); + + List getFinance6(Finance finance); + void insertForeach6(List list); + String checkAccountNumber6(@Param("orderNumber") String orderNumber); + List getAllFilename6(@Param("creator") String creator); + @Delete("delete from tbl_sys_finance6 where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename6(@Param("filename") String filename, @Param("realname") String realname); + + List getFinance7(Finance finance); + void insertForeach7(List list); + String checkAccountNumber7(@Param("orderNumber") String orderNumber); + List getAllFilename7(@Param("creator") String creator); + @Delete("delete from tbl_sys_finance7 where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename7(@Param("filename") String filename, @Param("realname") String realname); + +} diff --git a/src/main/java/lingtao/net/dao/FinanceDifferenceMapper.java b/src/main/java/lingtao/net/dao/FinanceDifferenceMapper.java new file mode 100644 index 0000000..678786f --- /dev/null +++ b/src/main/java/lingtao/net/dao/FinanceDifferenceMapper.java @@ -0,0 +1,17 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.FinanceDifference; + +public interface FinanceDifferenceMapper { + + List get(FinanceDifference difference); + + void insertForeach(List list); + + List getAllFilename(@Param("creator")String creator); + +} diff --git a/src/main/java/lingtao/net/dao/FinanceExtractMapper.java b/src/main/java/lingtao/net/dao/FinanceExtractMapper.java new file mode 100644 index 0000000..f112626 --- /dev/null +++ b/src/main/java/lingtao/net/dao/FinanceExtractMapper.java @@ -0,0 +1,26 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.FinanceExtract; + +@Mapper +public interface FinanceExtractMapper { + + List getFinanceExtract(FinanceExtract financeExtract); + + void insertForeach(List list); + + // 查询数据是否存在,避免重复上传 + String checkAccountNumber(@Param("orderNumber") String orderNumber); + + List getFilename_extract(@Param("creator") String creator); + + @Delete("delete from tbl_sys_finance_extract where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename(@Param("filename") String filename, @Param("realname") String realname); + +} diff --git a/src/main/java/lingtao/net/dao/FinanceMapper.java b/src/main/java/lingtao/net/dao/FinanceMapper.java new file mode 100644 index 0000000..64793ff --- /dev/null +++ b/src/main/java/lingtao/net/dao/FinanceMapper.java @@ -0,0 +1,26 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.Finance; + +@Mapper +public interface FinanceMapper { + + List getFinance(Finance finance); + + void insertForeach(List list); + + // 查询数据是否存在,避免重复上传 + String checkAccountNumber(@Param("orderNumber") String orderNumber); + + List getAllFilename(@Param("creator") String creator); + + @Delete("delete from tbl_sys_finance where filename = #{filename} and creator = #{realname}") + void deleteDataByFilename(@Param("filename") String filename, @Param("realname") String realname); + +} diff --git a/src/main/java/lingtao/net/dao/InformationMapper.java b/src/main/java/lingtao/net/dao/InformationMapper.java new file mode 100644 index 0000000..a7e9f47 --- /dev/null +++ b/src/main/java/lingtao/net/dao/InformationMapper.java @@ -0,0 +1,19 @@ +package lingtao.net.dao; + +import java.util.List; + +import lingtao.net.bean.Information; + +public interface InformationMapper { + + List getInformations(Information information); + + void addInformation(Information information); + + void updateInformationById(Information information); + + void deleteInformationById(Integer id); + + List getShortAnswers(); + +} diff --git a/src/main/java/lingtao/net/dao/LoginIpMapper.java b/src/main/java/lingtao/net/dao/LoginIpMapper.java new file mode 100644 index 0000000..6b22bda --- /dev/null +++ b/src/main/java/lingtao/net/dao/LoginIpMapper.java @@ -0,0 +1,27 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Select; + +import lingtao.net.bean.LoginIp; + +public interface LoginIpMapper { + + public List getLoginIpList(LoginIp loginIp); + + @Select("select agreeIp from tbl_login_ip") + public List getAllIp(); + + public void addIp(LoginIp loginIp); + public void updateIp(LoginIp loginIp); + + public int deleteIpById(Integer id); + + // 批量删除 + public void deleteBatch(int[] ints); + + @Select("select * from tbl_login_ip where agreeIp = #{agreeIp}") + public LoginIp checkIP(String agreeIp); + +} diff --git a/src/main/java/lingtao/net/dao/LoginLogMapper.java b/src/main/java/lingtao/net/dao/LoginLogMapper.java new file mode 100644 index 0000000..5b9b7f3 --- /dev/null +++ b/src/main/java/lingtao/net/dao/LoginLogMapper.java @@ -0,0 +1,16 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Insert; + +import lingtao.net.bean.LoginLog; + +public interface LoginLogMapper { + + List getLoginLogList(LoginLog loginLog); + + @Insert("insert into tbl_login_log set remark = #{remark},status = #{status}") + int addLog(LoginLog loginLog); + +} diff --git a/src/main/java/lingtao/net/dao/MyFileMapper.java b/src/main/java/lingtao/net/dao/MyFileMapper.java new file mode 100644 index 0000000..f48621c --- /dev/null +++ b/src/main/java/lingtao/net/dao/MyFileMapper.java @@ -0,0 +1,32 @@ +package lingtao.net.dao; + +import java.util.List; +import lingtao.net.bean.MyFile; +import lingtao.net.bean.MyFileExample; +import org.apache.ibatis.annotations.Param; + +public interface MyFileMapper { + long countByExample(MyFileExample example); + + int deleteByExample(MyFileExample example); + + int deleteByPrimaryKey(Integer fileId); + + int insert(MyFile record); + + int insertSelective(MyFile record); + + List selectByExample(MyFileExample example); + + MyFile selectByPrimaryKey(Integer fileId); + + int updateByExampleSelective(@Param("record") MyFile record, @Param("example") MyFileExample example); + + int updateByExample(@Param("record") MyFile record, @Param("example") MyFileExample example); + + int updateByPrimaryKeySelective(MyFile record); + + int updateByPrimaryKey(MyFile record); + + List getFileList(MyFile myFile); +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/dao/ProductImgMapper.java b/src/main/java/lingtao/net/dao/ProductImgMapper.java new file mode 100644 index 0000000..faffb71 --- /dev/null +++ b/src/main/java/lingtao/net/dao/ProductImgMapper.java @@ -0,0 +1,34 @@ +package lingtao.net.dao; + +import lingtao.net.bean.ProductImg; +import lingtao.net.bean.SysDictProduct; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface ProductImgMapper { + + List getProKindList(ProductImg productImg); + + SysDictProduct getLabel(ProductImg productImg); + + int addImgUrl(ProductImg productImg); + + int updateImgUploadRemark(ProductImg productImg); + + List findAllPro(); + + List getKindsByPro(@Param("proTypeValue") String proTypeValue); + + List getKind2sByKind(@Param("proTypeValue") String proTypeValue, + @Param("kindValue") String kindValue); + + List getImgsByProKind(@Param("proTypeValue") String proTypeValue, @Param("kindValue") String kindValue, + @Param("kind2Value") String kind2Value, @Param("craftValue") String craftValue); + + // 获取视频地址 + @Select("select img_url from product_img where pro_type_value = '999'") + List getVideos(); + +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/dao/ProductMapper.java b/src/main/java/lingtao/net/dao/ProductMapper.java new file mode 100644 index 0000000..c6c87bf --- /dev/null +++ b/src/main/java/lingtao/net/dao/ProductMapper.java @@ -0,0 +1,60 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.Product; +import lingtao.net.bean.SysDictSearchPro; + +public interface ProductMapper { + + // 价格列表 + List getProductList(Product product); + + // 更新价格 + int updatePriceById(Product product); + + // 得到所有的产品种类 + List findAllPro(); + + // 根据产品种类得到旗下的产品品种 + List getKindsByPro(@Param("proTypeValue") String proTypeValue); + + // 根据关键字搜索产品菜单 + List searchPro(@Param("likeProTypeLabel") String likeProTypeLabel); + + // 价格导入 + void insertSelective(Product vo); + + // 根据种类和品种得到单价,再根据尺寸—数量计算价格 + List getThanPrice(Product product); + + // 优惠券5位以上1万以内价格 + List couponThanPrice(Product dto); + + // 优惠券位以上1万以内价格 + List couponThanPrices(Product dto); + + // 优惠券5位以上1万以上价格 + List couponThousandThanPrice(Product dto); + + // 吊旗/宣传单5位数以上价格计算(同 couponThanPrice) + List diaoqiThanPrice(Product dto); + + // 吊旗比优惠券价格贵5/10块钱一位--1万以内 + List hangingFlagsThanPrice(Product dto); + + // 吊旗比优惠券价格贵10--1万以上的价格 + List hangingFlagsThousandThanPrice(Product dto); + + // 便签本联单/稿纸超过1千数量的价格 + List notePaperPrice(Product dto); + + // 优惠券、吊旗、腰封;便签本彩胶纸/红头文件;扇子;超过1万数量的价格 + List thanThousandPrice(Product dto); + + //慕斯垫价格计算 + List getMsdPrice(Product dto); + +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/dao/QuestionMapper.java b/src/main/java/lingtao/net/dao/QuestionMapper.java new file mode 100644 index 0000000..81b757f --- /dev/null +++ b/src/main/java/lingtao/net/dao/QuestionMapper.java @@ -0,0 +1,25 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.Question; + +public interface QuestionMapper { + + List questions(Question question); + + int addQuestion(Question question); + + int updateQuestionById(Question question); + + int deleteQuestionById(@Param("id") Integer id); + + List getSingleQuestions(); + + List getMultipleQuestions(); + + List getFillQuestions(); + +} diff --git a/src/main/java/lingtao/net/dao/QuoteDataMapper.java b/src/main/java/lingtao/net/dao/QuoteDataMapper.java new file mode 100644 index 0000000..c2e4683 --- /dev/null +++ b/src/main/java/lingtao/net/dao/QuoteDataMapper.java @@ -0,0 +1,42 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import lingtao.net.bean.QuoteData; + +public interface QuoteDataMapper { + + List quoteDatas(QuoteData quoteData); + + void updateById(QuoteData quoteData); + + void changeIsBuyToDay(@Param("id") Integer id); + + void changeIsBuy(@Param("id") Integer id); + + @Update("update tbl_quote_data set shopname = #{shopname},isSelect = 1,selectDate = now() where id = #{id}") + void updateShopnameSelect(@Param("shopname") String shopname, @Param("id") Integer id); + + @Update("update tbl_quote_data set orderNumber = #{orderNumber} where id = #{id}") + void addOrderNumber(@Param("id") Integer id, @Param("orderNumber") String orderNumber); + + void addQuoteData(QuoteData quoteData); + + List getQuoteDataByMinutes(String username); + + List getShopName(QuoteData quoteData); + + @Select("select distinct proTypeLabel from tbl_quote_data WHERE proTypeLabel IS NOT NULL") + List getProType(); + + List getRealnames(@Param("shopname") String shopname); + + QuoteData getEchartList(QuoteData quoteData); + + QuoteData getKefuEchartList(QuoteData quoteData);//客服大单流失列表 + +} diff --git a/src/main/java/lingtao/net/dao/QuoteLogMapper.java b/src/main/java/lingtao/net/dao/QuoteLogMapper.java new file mode 100644 index 0000000..0c66d2a --- /dev/null +++ b/src/main/java/lingtao/net/dao/QuoteLogMapper.java @@ -0,0 +1,12 @@ +package lingtao.net.dao; + +import java.util.List; + +import lingtao.net.bean.QuoteLog; + +public interface QuoteLogMapper { + + List quoteLogs(QuoteLog quoteLog); + + void insertSelective(QuoteLog log); +} diff --git a/src/main/java/lingtao/net/dao/SysDictSearchProMapper.java b/src/main/java/lingtao/net/dao/SysDictSearchProMapper.java new file mode 100644 index 0000000..10cc68a --- /dev/null +++ b/src/main/java/lingtao/net/dao/SysDictSearchProMapper.java @@ -0,0 +1,19 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; + +import lingtao.net.bean.SysDictSearchPro; + +public interface SysDictSearchProMapper { + + List keyWordsList(SysDictSearchPro searchPro); + + int changeKeyWordStatus(@Param("id") Integer id); + + int insertSelective(SysDictSearchPro searchPro); + + int updateKeyWordById(SysDictSearchPro searchPro); + +} diff --git a/src/main/java/lingtao/net/dao/SysPermissionMapper.java b/src/main/java/lingtao/net/dao/SysPermissionMapper.java new file mode 100644 index 0000000..140c5e2 --- /dev/null +++ b/src/main/java/lingtao/net/dao/SysPermissionMapper.java @@ -0,0 +1,15 @@ +package lingtao.net.dao; + +import java.util.List; + +import lingtao.net.bean.SysPermission; + +public interface SysPermissionMapper { + + List getAll(); + + List getParentPers(); + + List getPersByUserId(Integer integer); + +} diff --git a/src/main/java/lingtao/net/dao/SysRoleMapper.java b/src/main/java/lingtao/net/dao/SysRoleMapper.java new file mode 100644 index 0000000..39db371 --- /dev/null +++ b/src/main/java/lingtao/net/dao/SysRoleMapper.java @@ -0,0 +1,37 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import lingtao.net.bean.SysRole; + +public interface SysRoleMapper { + + int insertSelective(SysRole role); + + List getRoles(SysRole role); + + int updateByPrimaryKeySelective(SysRole role); + + int changeRoleStatus(@Param("roleId") String roleId); + + // 根据角色编号查询对应的权限编号集合 + public List getPerIdsByRoleId(@Param("roleId") Integer roleId); + + public void deleteRolePermissions(Integer roleId); + + public void addRolePermissions(@Param("roleId") Integer roleId, @Param("perIds") String[] perIds); + + List getAllRoleName(@Param("isRegist") String isRegist); + + // 查询出用户所拥有的且允许被创建的角色 + List getRolesByUserId(@Param("userId") Integer userId); + + @Select("select roleId from tbl_sys_role where isRegist = '0'") + List getRoleIdsWhenIsNotRegist(); + + @Select("select roleId from tbl_sys_role where isSelf = '0'") + List getRoleIdsWhenIsNotLingTao(); +} diff --git a/src/main/java/lingtao/net/dao/SysUserMapper.java b/src/main/java/lingtao/net/dao/SysUserMapper.java new file mode 100644 index 0000000..bdda96c --- /dev/null +++ b/src/main/java/lingtao/net/dao/SysUserMapper.java @@ -0,0 +1,73 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; + +import lingtao.net.bean.SysUser; + +public interface SysUserMapper { + int deleteByPrimaryKey(Integer userId); + + int insertSelective(SysUser record); + + int updateByPrimaryKeySelective(SysUser record); + + @Select("select * from tbl_sys_user where username = #{username}") + SysUser getUserByUsername(@Param("username") String username); + + List getUsers(SysUser user); + + int changeUserStatus(@Param("userId") Integer userId); + + public void addUserRoles(@Param("userId") Integer userId, @Param("roleIds") Integer[] roleIds); + + void deleteUserRoles(@Param("userId") Integer userId); + + int addBirthDay(SysUser user); + + int changeSysStatus(@Param("userId") Integer userId); + + int changeNeedIp(); + + @Update("update tbl_sys_user set sysStatus = 1 where sysStatus = 0 and userId = #{userId}") + int videoOverToChangeSysStatus(@Param("userId") Integer userId); + + @Update("update tbl_sys_user set sysStatus = 2 where userId = #{userId}") + int examOverToChangeSysStatus(@Param("userId") Integer userId); + + @Update("update tbl_sys_user set readLogStatus = 1 where userId = #{userId}") + int changeReadLogStatus(Integer userId); + + @Select("select * from tbl_sys_user where userId = #{userId}") + SysUser getUserInfo(Integer userId); + + /** + * 如果当天生日,更改状态 + * + * @param isBirthDay + * @param userId + * @return + */ + @Update("update tbl_sys_user set isBirthDay = #{isBirthDay} where userId = #{userId}") + int setIsBirthDay(@Param("isBirthDay") Integer isBirthDay, @Param("userId") Integer userId); + + /** + * 改变生日状态 + * + * @param userId + */ + @Update("update tbl_sys_user set isBirthDay = 0 where userId = #{userId}") + void changeIsBirthDay(Integer userId); + + /** + * 客服数据 -- 根据搜索的店铺获取人员 + * + * @param shopname + */ + @Select("select * from tbl_sys_user where role like '%${shopname}%'") + List getRealnamesByShopname(@Param("shopname") String shopname); + +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/dao/UpdateLogMapper.java b/src/main/java/lingtao/net/dao/UpdateLogMapper.java new file mode 100644 index 0000000..517506a --- /dev/null +++ b/src/main/java/lingtao/net/dao/UpdateLogMapper.java @@ -0,0 +1,22 @@ +package lingtao.net.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Update; + +import lingtao.net.bean.UpdateLog; + +public interface UpdateLogMapper { + + List getUpdateLogs(UpdateLog updateLog); + + int addLog(UpdateLog updateLog); + + int deleteLogById(Integer id); + + int updateLogById(UpdateLog updateLog); + + @Update("UPDATE tbl_sys_user SET readLogStatus = 0") + void changeReadLogStatus(); + +} diff --git a/src/main/java/lingtao/net/entity/ClothingTag.java b/src/main/java/lingtao/net/entity/ClothingTag.java new file mode 100644 index 0000000..dd6a5c1 --- /dev/null +++ b/src/main/java/lingtao/net/entity/ClothingTag.java @@ -0,0 +1,59 @@ +package lingtao.net.entity; + +import lingtao.net.enums.ClothingTagMater; +import lingtao.net.enums.ClothingTagTechEnum; +import lingtao.net.enums.ProductMembrane; +import lingtao.net.enums.ProductSlice; +import lombok.Data; + +import java.util.List; + +@Data +public class ClothingTag { + + private Long id; + + /** + * 材质 + */ + private ClothingTagMater material; + + /** + * 工艺 + */ + private ClothingTagTechEnum technique; + + /** + * 覆膜 + */ + private ProductMembrane productMembrane; + /** + * 切割 + */ + private ProductSlice productSlice; + + /** + * 是否加棉绳 + */ + private boolean isRope; + + /** + * 绳子公式 + */ + private String ropeFormula; + + /** + * 计算方法 + */ + private List compute; + + /** + * 是否多面 + */ + private boolean isMulti; + + /** + * 计算公式 + */ + private String formula; +} diff --git a/src/main/java/lingtao/net/entity/SelfAdhesiveSticker.java b/src/main/java/lingtao/net/entity/SelfAdhesiveSticker.java new file mode 100644 index 0000000..a4b511f --- /dev/null +++ b/src/main/java/lingtao/net/entity/SelfAdhesiveSticker.java @@ -0,0 +1,4 @@ +package lingtao.net.entity; + +public class SelfAdhesiveSticker { +} diff --git a/src/main/java/lingtao/net/enums/ClothingTagMater.java b/src/main/java/lingtao/net/enums/ClothingTagMater.java new file mode 100644 index 0000000..f81fecd --- /dev/null +++ b/src/main/java/lingtao/net/enums/ClothingTagMater.java @@ -0,0 +1,23 @@ +package lingtao.net.enums; + +public enum ClothingTagMater { + g350(0, "350克铜版纸"), + g600(1, "600克铜版纸"); + + ClothingTagMater(Integer code, String value) { + this.code = code; + this.value = value; + } + + private Integer code; + + private String value; + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/lingtao/net/enums/ClothingTagTechEnum.java b/src/main/java/lingtao/net/enums/ClothingTagTechEnum.java new file mode 100644 index 0000000..dd71e9f --- /dev/null +++ b/src/main/java/lingtao/net/enums/ClothingTagTechEnum.java @@ -0,0 +1,28 @@ +package lingtao.net.enums; + +public enum ClothingTagTechEnum { + + none(0, "无"), + hot_gold_on_one_side(1, "单面烫金"), + single_concave_and_convex(2, "凹凸"), + hot_gold_on_two_side(3, "双面烫金"), + hot_gold_concave_and_convex_on_one_side(4, "单面烫金+凹凸"), + ; + + ClothingTagTechEnum(Integer code, String value) { + this.code = code; + this.value = value; + } + + private Integer code; + + private String value; + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/lingtao/net/enums/ProductEnum.java b/src/main/java/lingtao/net/enums/ProductEnum.java new file mode 100644 index 0000000..4330a97 --- /dev/null +++ b/src/main/java/lingtao/net/enums/ProductEnum.java @@ -0,0 +1,25 @@ +package lingtao.net.enums; + +import lingtao.net.entity.SelfAdhesiveSticker; + +public enum ProductEnum { + clothing_Tag(0, "服装吊牌"), + self_adhesive_sticker(1, "不干胶"); + + ProductEnum(Integer code, String value) { + this.code = code; + this.value = value; + } + + private Integer code; + + private String value; + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/lingtao/net/enums/ProductMembrane.java b/src/main/java/lingtao/net/enums/ProductMembrane.java new file mode 100644 index 0000000..542ca38 --- /dev/null +++ b/src/main/java/lingtao/net/enums/ProductMembrane.java @@ -0,0 +1,24 @@ +package lingtao.net.enums; + +public enum ProductMembrane { + + none(0, "不覆膜"), + double_matte_film(1, "双面覆哑膜"); + + ProductMembrane(Integer code, String value) { + this.code = code; + this.value = value; + } + + private Integer code; + + private String value; + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/lingtao/net/enums/ProductSlice.java b/src/main/java/lingtao/net/enums/ProductSlice.java new file mode 100644 index 0000000..e679468 --- /dev/null +++ b/src/main/java/lingtao/net/enums/ProductSlice.java @@ -0,0 +1,24 @@ +package lingtao.net.enums; + +public enum ProductSlice { + none(0, "不操作"), + right_angle_punch(1, "直角打孔"), + profiled_die_cutting(2, "异形模切"); + + ProductSlice(Integer code, String value) { + this.code = code; + this.value = value; + } + + private Integer code; + + private String value; + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/lingtao/net/gui/LoginGui.java b/src/main/java/lingtao/net/gui/LoginGui.java new file mode 100644 index 0000000..16dce8e --- /dev/null +++ b/src/main/java/lingtao/net/gui/LoginGui.java @@ -0,0 +1,106 @@ +//package lingtao.net.gui; +// +//import java.awt.EventQueue; +//import java.awt.event.ActionEvent; +//import java.awt.event.ActionListener; +//import java.util.List; +// +//import javax.swing.JButton; +//import javax.swing.JFrame; +//import javax.swing.JLabel; +//import javax.swing.JPanel; +//import javax.swing.JTextField; +//import javax.swing.border.EmptyBorder; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Controller; +// +//import lingtao.net.bean.Product; +//import lingtao.net.service.ProductService; +// +// +//@Controller +//public class LoginGui extends JFrame { +// +// private JPanel contentPane; +// private JTextField username; +// private JTextField password; +// private JLabel textField__1; +// private JLabel textField__2; +// private JButton btn_submit; +// @Autowired +// private ProductService priceService; +// +// /** +// * Launch the application. +// */ +// public static void main(String[] args) { +// EventQueue.invokeLater(new Runnable() { +// public void run() { +// try { +// LoginGui frame = new LoginGui(); +// frame.setVisible(true); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// }); +// } +// +// /** +// * Create the frame. +// */ +// public LoginGui() { +// init(); +// listener(); +// } +// +// //登录监听 +// public void listener() { +// btn_submit.addActionListener(new ActionListener() { +// public void actionPerformed(ActionEvent e) { +// username.getText(); +// password.getText(); +// List allPro = priceService.findAllPro(); +// System.out.println(allPro); +// } +// }); +// +// } +// +// private void init() { +// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// setBounds(100, 100, 450, 300); +// contentPane = new JPanel(); +// contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); +// setContentPane(contentPane); +// contentPane.setLayout(null); +// +// JPanel panel = new JPanel(); +// panel.setBounds(0, 0, 434, 262); +// contentPane.add(panel); +// panel.setLayout(null); +// +// textField__1 = new JLabel("用户名:"); +// textField__1.setBounds(99, 54, 54, 15); +// panel.add(textField__1); +// +// textField__2 = new JLabel("密码:"); +// textField__2.setBounds(99, 110, 43, 15); +// panel.add(textField__2); +// +// username = new JTextField(); +// username.setBounds(152, 54, 175, 21); +// panel.add(username); +// username.setColumns(10); +// +// password = new JTextField(); +// password.setColumns(10); +// password.setBounds(152, 110, 175, 21); +// panel.add(password); +// +// btn_submit = new JButton("登录"); +// btn_submit.setBounds(158, 160, 130, 37); +// panel.add(btn_submit); +// } +//} diff --git a/src/main/java/lingtao/net/gui/PriceGui.java b/src/main/java/lingtao/net/gui/PriceGui.java new file mode 100644 index 0000000..d0d5265 --- /dev/null +++ b/src/main/java/lingtao/net/gui/PriceGui.java @@ -0,0 +1,98 @@ +//package lingtao.net.gui; +// +//import java.awt.BorderLayout; +//import java.awt.EventQueue; +// +//import javax.swing.JFrame; +//import javax.swing.JPanel; +//import javax.swing.border.EmptyBorder; +//import javax.swing.JRadioButton; +//import javax.swing.JComboBox; +//import javax.swing.DefaultComboBoxModel; +// +//public class PriceGui extends JFrame { +// +// private JPanel contentPane; +// +// /** +// * Launch the application. +// */ +// public static void main(String[] args) { +// EventQueue.invokeLater(new Runnable() { +// public void run() { +// try { +// PriceGui frame = new PriceGui(); +// frame.setVisible(true); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// }); +// } +// +// /** +// * Create the frame. +// */ +// public PriceGui() { +// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +// setBounds(100, 100, 861, 558); +// contentPane = new JPanel(); +// contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); +// setContentPane(contentPane); +// contentPane.setLayout(null); +// +// JPanel panel = new JPanel(); +// panel.setBounds(0, 0, 845, 520); +// contentPane.add(panel); +// panel.setLayout(null); +// +// JRadioButton rdbtnNewRadioButton = new JRadioButton("不干胶"); +// rdbtnNewRadioButton.setBounds(0, 26, 89, 23); +// panel.add(rdbtnNewRadioButton); +// +// JRadioButton 特殊不干胶 = new JRadioButton("特殊不干胶"); +// 特殊不干胶.setBounds(0, 67, 111, 23); +// panel.add(特殊不干胶); +// +// JComboBox comboBox = new JComboBox(); +// comboBox.setModel(new DefaultComboBoxModel(new String[] {"", "A级铜板不干胶(加胶加粘)", "哑膜A级铜版纸不干胶(加胶加粘)", "pvc透明(加胶加粘)", "复古牛皮纸贴纸(加胶加粘)"})); +// comboBox.setBounds(119, 27, 203, 21); +// panel.add(comboBox); +// +// JRadioButton rdbtnNewRadioButton_2 = new JRadioButton("卷装标签"); +// rdbtnNewRadioButton_2.setBounds(0, 104, 106, 23); +// panel.add(rdbtnNewRadioButton_2); +// +// JRadioButton rdbtnNewRadioButton_1 = new JRadioButton("插卡"); +// rdbtnNewRadioButton_1.setBounds(0, 144, 106, 34); +// panel.add(rdbtnNewRadioButton_1); +// +// JRadioButton rdbtnNewRadioButton_3 = new JRadioButton("优惠券"); +// rdbtnNewRadioButton_3.setBounds(0, 180, 111, 23); +// panel.add(rdbtnNewRadioButton_3); +// +// JRadioButton rdbtnNewRadioButton_3_1 = new JRadioButton("腰封"); +// rdbtnNewRadioButton_3_1.setBounds(0, 218, 106, 23); +// panel.add(rdbtnNewRadioButton_3_1); +// +// JComboBox comboBox_1 = new JComboBox(); +// comboBox_1.setBounds(119, 68, 203, 21); +// panel.add(comboBox_1); +// +// JComboBox comboBox_2 = new JComboBox(); +// comboBox_2.setBounds(119, 105, 203, 21); +// panel.add(comboBox_2); +// +// JComboBox comboBox_3 = new JComboBox(); +// comboBox_3.setBounds(119, 145, 203, 21); +// panel.add(comboBox_3); +// +// JComboBox comboBox_4 = new JComboBox(); +// comboBox_4.setBounds(119, 181, 203, 21); +// panel.add(comboBox_4); +// +// JComboBox comboBox_5 = new JComboBox(); +// comboBox_5.setBounds(119, 219, 203, 21); +// panel.add(comboBox_5); +// } +//} diff --git a/src/main/java/lingtao/net/handler/MapToVarcharTypeHandler.java b/src/main/java/lingtao/net/handler/MapToVarcharTypeHandler.java new file mode 100644 index 0000000..d06b170 --- /dev/null +++ b/src/main/java/lingtao/net/handler/MapToVarcharTypeHandler.java @@ -0,0 +1,46 @@ +package lingtao.net.handler; + +import com.alibaba.fastjson.JSON; +import org.apache.commons.lang.StringUtils; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Map; + +public class MapToVarcharTypeHandler implements TypeHandler> { + @Override + public void setParameter(PreparedStatement ps, int i, Map parameter, JdbcType jdbcType) throws SQLException { + ps.setString(i, JSON.toJSONString(parameter)); + } + + @Override + public Map getResult(ResultSet rs, String columnName) throws SQLException { + String resultString = rs.getString(columnName); + if (StringUtils.isEmpty(resultString)) { + return JSON.parseObject(resultString, Map.class); + } + return null; + } + + @Override + public Map getResult(ResultSet rs, int columnIndex) throws SQLException { + String resultString = rs.getString(columnIndex); + if (StringUtils.isEmpty(resultString)) { + return JSON.parseObject(resultString, Map.class); + } + return null; + } + + @Override + public Map getResult(CallableStatement cs, int columnIndex) throws SQLException { + String resultString = cs.getString(columnIndex); + if (StringUtils.isEmpty(resultString)) { + return JSON.parseObject(resultString, Map.class); + } + return null; + } +} diff --git a/src/main/java/lingtao/net/mapper/ClothingTagMapper.java b/src/main/java/lingtao/net/mapper/ClothingTagMapper.java new file mode 100644 index 0000000..0b9c9ca --- /dev/null +++ b/src/main/java/lingtao/net/mapper/ClothingTagMapper.java @@ -0,0 +1,8 @@ +package lingtao.net.mapper; + +import lingtao.net.entity.ClothingTag; + +public interface ClothingTagMapper { + + void insert(ClothingTag clothingTag); +} diff --git a/src/main/java/lingtao/net/realm/ShiroRealm.java b/src/main/java/lingtao/net/realm/ShiroRealm.java new file mode 100644 index 0000000..02d5cab --- /dev/null +++ b/src/main/java/lingtao/net/realm/ShiroRealm.java @@ -0,0 +1,187 @@ +package lingtao.net.realm; + +import com.github.pagehelper.util.StringUtil; +import lingtao.net.bean.LoginLog; +import lingtao.net.bean.SysPermission; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.LoginIpMapper; +import lingtao.net.dao.LoginLogMapper; +import lingtao.net.dao.SysPermissionMapper; +import lingtao.net.dao.SysUserMapper; +import lingtao.net.util.DateFormatUtils; +import lingtao.net.util.LunarCalendarUtil; +import org.apache.shiro.SecurityUtils; +import org.apache.shiro.authc.*; +import org.apache.shiro.authz.AuthorizationInfo; +import org.apache.shiro.realm.AuthorizingRealm; +import org.apache.shiro.session.Session; +import org.apache.shiro.session.mgt.eis.SessionDAO; +import org.apache.shiro.subject.PrincipalCollection; +import org.apache.shiro.subject.support.DefaultSubjectContext; +import org.apache.shiro.util.SimpleByteSource; +import org.springframework.beans.factory.annotation.Autowired; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Collection; +import java.util.Date; +import java.util.List; + +public class ShiroRealm extends AuthorizingRealm { + @Autowired + private SysUserMapper userMapper; + @Autowired + private SysPermissionMapper sysPermissionMapper; + @Autowired + private LoginIpMapper loginIpMapper; + @Autowired + private LoginLogMapper loginLogMapper; + @Autowired + private SessionDAO sessionDAO; + // 日期格式化 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + // 授权 + @Override + protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0) { + // TODO Auto-generated method stub + return null; + } + + private boolean ipIsInWildCardNoCheck(String ipWildCard, String ip) { + String[] s1 = ipWildCard.split("\\."); + String[] s2 = ip.split("\\."); + boolean isMatchedSeg = true; + for (int i = 0; i < s1.length && !s1[i].equals("*"); i++) { + if (!s1[i].equals(s2[i])) { + isMatchedSeg = false; + break; + } + } + return isMatchedSeg; + } + + private boolean isPassIp(String loginIp) { + // 获取所有的授权IP + List ipList = loginIpMapper.getAllIp(); + if(loginIp == "127.0.0.1"){ + return true; + } + for (String agreeIp : ipList) { + // 如果当前登录的IP在授权IP中 + if (ipIsInWildCardNoCheck(agreeIp, loginIp)) { + return true; + } + } + return false; + } + + + // 登录验证 + @Override + protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { + UsernamePasswordToken token2 = (UsernamePasswordToken) token; +// String username = token2.getUsername(); + SimpleAuthenticationInfo info = null; + + // 从token中取出用户名 + String username = (String) token.getPrincipal(); +// String username = "admin"; + SysUser user = userMapper.getUserByUsername(username); + + if (user != null) { + if ("0".contentEquals(user.getUserStatus())) { + throw new LockedAccountException("用户未激活,请联系管理员"); + } + /** 处理账号只能在授权的IP中登录 */ + // 是否允许登录标识 + boolean agreeLogin = true; + // 当前登录用户的IP地址 +// String loginIp = SecurityUtils.getSubject().getSession().getHost(); + String loginIp = token2.getHost(); + System.out.println("当前登录用户的IP地址:" + loginIp); + // 登录说明 + String loginRemark = formatter.format(new Date()) + "【" + user.getRealname() + " - " + username + "】 IP:" + loginIp; + LoginLog loginLog = new LoginLog(); + if (isPassIp(loginIp)) { + loginRemark += "--已知IP"; + loginLog.setStatus("正常"); + agreeLogin = true; + } else { + loginRemark += "--未知IP"; + loginLog.setStatus("异常"); + agreeLogin = false; + } + + loginLog.setLoginTime(new Date()); + loginLog.setRemark(loginRemark); + loginLogMapper.addLog(loginLog); + + if (!agreeLogin) { + throw new AuthenticationException("IP受限" + loginIp); + } + + /** 处理生日 */ + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Date birthDate = null; + String birthDay = ""; + // 生日日期/类型不为空 + if (StringUtil.isNotEmpty(user.getBirthDay()) && StringUtil.isNotEmpty(user.getBirthType())) { + // 如果是新历生日,直接获取生日日期 + if (user.getBirthType().equals("1")) { + birthDay = String.format("%tY", new Date()) + "-" + user.getBirthDay(); + } else if (user.getBirthType().equals("0")) {// 如果是农历生日 + // 先将农历生日转换成新历;调用工具类转换,使用String.format获取年、月、日 + int[] lunarToSolar = LunarCalendarUtil.lunarToSolar( + Integer.valueOf(String.format("%tY", new Date())), + Integer.valueOf(user.getBirthDay().split("-")[0]), + Integer.valueOf(user.getBirthDay().split("-")[1]), true); + for (int i = 0; i < 3; i++) { + birthDay += lunarToSolar[i] + "-"; + } + birthDay = birthDay.substring(0, birthDay.length() - 1); + } + try { + birthDate = sdf.parse(birthDay); + // 如果当天生日,改变状态 + if (Math.abs(DateFormatUtils.getSubtractiveDays(birthDate, new Date())) == 0) { + // 生日:1 + userMapper.setIsBirthDay(1, user.getUserId()); + } + } catch (ParseException e) { + // e.printStackTrace(); + } + } + + /** 处理session(将用户信息存入session) */ + // 将用户信息存入session + SecurityUtils.getSubject().getSession().setAttribute("USER_SESSION", user); + // 获取权限列表 + List persList = sysPermissionMapper.getPersByUserId(user.getUserId()); + // 将权限list存入session + SecurityUtils.getSubject().getSession().setAttribute("USERPERS_SESSION", persList); + info = new SimpleAuthenticationInfo(user, user.getPassword(), new SimpleByteSource("lingtao"), getName()); + // 设置session过期时间(毫秒) :正负都可以,为负数时表示永不超时。 + SecurityUtils.getSubject().getSession().setTimeout(1000 * 60 * 60 * 14); + + /** 处理session(账号只允许同时一人登录) */ + // shiro获取所有在线用户 + Collection sessionsCollections = sessionDAO.getActiveSessions(); + // 遍历所有的在线用户 + for (Session session : sessionsCollections) { + // 获得session中已经登录的单个用户对象 + String loginUsername = String + .valueOf(session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY)); + // 这里的user对象也就是当前登录的loginUsername对象,判断当前登录的用户是否已是在线用户,是的话就清除 + if (String.valueOf(user).equals(loginUsername)) { + // 这里就把session清除, + session.setTimeout(0); + break; + } + } + } + // 框架完成验证 + return info; + } + +} diff --git a/src/main/java/lingtao/net/service/ArticleService.java b/src/main/java/lingtao/net/service/ArticleService.java new file mode 100644 index 0000000..75976c2 --- /dev/null +++ b/src/main/java/lingtao/net/service/ArticleService.java @@ -0,0 +1,64 @@ +package lingtao.net.service; + +import java.util.Date; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Article; +import lingtao.net.bean.Msg; +import lingtao.net.dao.ArticleMapper; + +@Service +public class ArticleService { + + @Autowired + ArticleMapper articlesMapper; + + public List
getArticle(Article article) { + return articlesMapper.getArticle(article); + + } + + public Msg addArticle(Article article) { + try { + article.setCreateDate(new Date()); + articlesMapper.insertSelective(article); + return Msg.success(); + } catch (Exception e) { + e.printStackTrace(); + return Msg.fail("新增失败"); + } + } + + public Msg updateArticleById(Article article) { + try { + article.setUpdateDate(new Date()); + articlesMapper.updateByPrimaryKeySelective(article); + return Msg.success(); + } catch (Exception e) { + e.printStackTrace(); + return Msg.fail("修改失败"); + } + } + + public Msg delArticleById(Integer id) { + try { + articlesMapper.deleteByPrimaryKey(id); + return Msg.success(); + } catch (Exception e) { + e.printStackTrace(); + return Msg.fail("删除失败"); + } + } + + public Article articleInfo(Integer id) { + try { + return articlesMapper.selectByPrimaryKey(id); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } +} diff --git a/src/main/java/lingtao/net/service/BugService.java b/src/main/java/lingtao/net/service/BugService.java new file mode 100644 index 0000000..62121e1 --- /dev/null +++ b/src/main/java/lingtao/net/service/BugService.java @@ -0,0 +1,35 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Bug; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.BugMapper; + +@Service +public class BugService { + + @Autowired + private BugMapper bugMapper; + + public List getBugs(Bug bug) { + return bugMapper.getBugs(bug); + } + + public Msg addBug(Bug bug, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + bug.setCreateBy(user.getRealname()); + int i = bugMapper.addBug(bug); + if (i < 0) { + return Msg.fail(); + } + return Msg.success(); + } + +} diff --git a/src/main/java/lingtao/net/service/CustomerAwardService.java b/src/main/java/lingtao/net/service/CustomerAwardService.java new file mode 100644 index 0000000..e0e6090 --- /dev/null +++ b/src/main/java/lingtao/net/service/CustomerAwardService.java @@ -0,0 +1,677 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.CustomerAward; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.CustomerAwardMapper; +import lingtao.net.util.DateFormatUtils; +import lingtao.net.util.ExcelUtils; + +@Service +public class CustomerAwardService { + + @Autowired + private CustomerAwardMapper customerAwardMapper; + + public List getCustomerAward(CustomerAward customerAward) { + customerAward.setCreateTimeEnd(new DateFormatUtils().formatEndTime(customerAward.getCreateTimeBegin())); + customerAward.setCreateTimeBegin(new DateFormatUtils().formatBeginTime(customerAward.getCreateTimeBegin())); + return customerAwardMapper.getCustomerAward(customerAward); + } + + // 批量删除 + public Msg deleteBatch(int[] ints) { + try { + customerAwardMapper.deleteBatch(ints); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public List getArardShopname() { + return customerAwardMapper.getArardShopname(); + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + String awardDate = ""; + List matches = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + + String filename = file.getOriginalFilename(); + // 获取字符串中的日期正则 + Pattern p = Pattern.compile("(\\d{1,4}[-|\\/]\\d{1,2}[-|\\/]\\d{1,2})", + Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); + Matcher matcher = p.matcher(listob.get(0).toString().trim()); + + if (matcher.find() && matcher.groupCount() >= 1) { + matches = new ArrayList(); + for (int i = 1; i <= matcher.groupCount(); i++) { + String temp = matcher.group(i); + matches.add(temp); + } + } + if (matches.size() > 0) { + awardDate = ((String) matches.get(0)).trim(); + } + + filename = filename.substring(0, filename.indexOf(".")); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + CustomerAward vo = new CustomerAward(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1) { + System.out.println("++++++++++++++"); + continue; + } + String nickname = String.valueOf(lo.get(0)).trim(); + String payPercent2 = (String.valueOf(lo.get(1)).trim()); + String askNumber2 = (String.valueOf(lo.get(2)).trim()); + String customerPrice2 = (String.valueOf(lo.get(3)).trim()); + payPercent2 = payPercent2.replaceAll("%", " "); + Double payPercent = 0.0; + Double askNumber = 0.0; + Double customerPrice = 0.0; + try { + payPercent = Double.valueOf(payPercent2); + askNumber = Double.valueOf(askNumber2); + customerPrice = Double.valueOf(customerPrice2); + } catch (NumberFormatException e) { + continue; + } + if (payPercent == 1) { + payPercent = 100.0; + } + int award = 0; + switch (filename) { + case "菇凉": + award = guliang(nickname, payPercent, askNumber, customerPrice); + break; + case "榆家": + award = yujia(nickname, payPercent, askNumber, customerPrice); + break; + case "奥丽芙": + award = aolifu(nickname, payPercent, askNumber, customerPrice); + break; + case "翊喜": + award = yixi(nickname, payPercent, askNumber, customerPrice); + break; + case "航和": + award = hanghe(nickname, payPercent, askNumber, customerPrice); + break; + case "卓胜": + award = zhuosheng(nickname, payPercent, askNumber, customerPrice); + break; + case "欣克利": + award = xinkeli(nickname, payPercent, askNumber, customerPrice); + break; + case "米笛儿": + award = midier(nickname, payPercent, askNumber, customerPrice); + break; + case "阳光猫": + award = yangguangmao(nickname, payPercent, askNumber, customerPrice); + break; + default: + break; + } + + vo.setNickname(nickname); + vo.setPayPercent(payPercent); + vo.setAskNumber(askNumber); + vo.setCustomerPrice(customerPrice); + vo.setAward(award); + vo.setShopname(filename); + vo.setAwardDate(awardDate); + vo.setCreator(user.getRealname()); + list.add(vo); + } + } + if (list.size() > 0) { + customerAwardMapper.insertForeach(list); + } + in.close(); + return Msg.success(); + + } + + // 菇凉店客服日奖励 + private int guliang(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=46,"奖励档80元",IF(C4>=44,"奖励档60元",IF(C4>=43,"奖励档50元",IF(C4>=42,"奖励档40元", + // IF(C4>=41,"奖励档30元",IF(C4>=40,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 46) { + payPercentPrice = 80; + } else if (payPercent >= 44) { + payPercentPrice = 60; + } else if (payPercent >= 43) { + payPercentPrice = 50; + } else if (payPercent >= 42) { + payPercentPrice = 40; + } else if (payPercent >= 41) { + payPercentPrice = 30; + } else if (payPercent >= 40) { + payPercentPrice = 20; + } + + // IF(D4>=70,"询单人数档80元",IF(D4>=50,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 70) { + askNumberPrice = 80; + } else if (askNumber >= 50) { + askNumberPrice = 60; + } + + } + + // =IF(E4>=240,"客单档80元",IF(E4>=220,"客单档60元",IF(E4>=200,"客单档50元",IF(E4>=190,"客单档40元", + // IF(E4>=180,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 240) { + customerPricePrice = 80; + } else if (customerPrice >= 220) { + customerPricePrice = 60; + } else if (customerPrice >= 200) { + customerPricePrice = 50; + } else if (customerPrice >= 190) { + customerPricePrice = 40; + } else if (customerPrice >= 180) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 榆家店客服日奖励 + private int yujia(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=43,"奖励档80元",IF(C4>=42,"奖励档60元",IF(C4>=41,"奖励档50元",IF(C4>=40,"奖励档40元", + // IF(C4>=39,"奖励档30元",IF(C4>=38,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 43) { + payPercentPrice = 80; + } else if (payPercent >= 42) { + payPercentPrice = 60; + } else if (payPercent >= 41) { + payPercentPrice = 50; + } else if (payPercent >= 40) { + payPercentPrice = 40; + } else if (payPercent >= 39) { + payPercentPrice = 30; + } else if (payPercent >= 38) { + payPercentPrice = 20; + } + + // IF(D4>=70,"询单人数档80元",IF(D4>=50,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 70) { + askNumberPrice = 80; + } else if (askNumber >= 50) { + askNumberPrice = 60; + } + } + + // =IF(E4>=190,"客单档80元",IF(E4>=180,"客单档60元",IF(E4>=170,"客单档50元",IF(E4>=160,"客单档40元", + // IF(E4>=150,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 190) { + customerPricePrice = 80; + } else if (customerPrice >= 180) { + customerPricePrice = 60; + } else if (customerPrice >= 170) { + customerPricePrice = 50; + } else if (customerPrice >= 160) { + customerPricePrice = 40; + } else if (customerPrice >= 150) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 奥丽芙店客服日奖励 + private int aolifu(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=43,"奖励档80元",IF(C4>=42,"奖励档60元",IF(C4>=41,"奖励档50元",IF(C4>=40,"奖励档40元", + // IF(C4>=39,"奖励档30元",IF(C4>=38,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 43) { + payPercentPrice = 80; + } else if (payPercent >= 42) { + payPercentPrice = 60; + } else if (payPercent >= 41) { + payPercentPrice = 50; + } else if (payPercent >= 40) { + payPercentPrice = 40; + } else if (payPercent >= 39) { + payPercentPrice = 30; + } else if (payPercent >= 38) { + payPercentPrice = 20; + } + + // IF(D4>=70,"询单人数档80元",IF(D4>=50,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 70) { + askNumberPrice = 80; + } else if (askNumber >= 50) { + askNumberPrice = 60; + } + } + + // =IF(E4>=240,"客单档80元",IF(E4>=220,"客单档60元",IF(E4>=200,"客单档50元",IF(E4>=190,"客单档40元", + // IF(E4>=180,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 240) { + customerPricePrice = 80; + } else if (customerPrice >= 220) { + customerPricePrice = 60; + } else if (customerPrice >= 200) { + customerPricePrice = 50; + } else if (customerPrice >= 190) { + customerPricePrice = 40; + } else if (customerPrice >= 180) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 翊喜店客服日奖励 + private int yixi(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=42,"奖励档80元",IF(C4>=41,"奖励档60元",IF(C4>=40,"奖励档50元",IF(C4>=39,"奖励档40元", + // IF(C4>=38,"奖励档30元",IF(C4>=37,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 42) { + payPercentPrice = 80; + } else if (payPercent >= 41) { + payPercentPrice = 60; + } else if (payPercent >= 40) { + payPercentPrice = 50; + } else if (payPercent >= 39) { + payPercentPrice = 40; + } else if (payPercent >= 38) { + payPercentPrice = 30; + } else if (payPercent >= 37) { + payPercentPrice = 20; + } + + // IF(D4>=75,"询单人数档80元",IF(D4>=55,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 75) { + askNumberPrice = 80; + } else if (askNumber >= 55) { + askNumberPrice = 60; + } + } + + // =IF(E4>=190,"客单档80元",IF(E4>=180,"客单档60元",IF(E4>=170,"客单档50元",IF(E4>=160,"客单档40元", + // IF(E4>=150,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 190) { + customerPricePrice = 80; + } else if (customerPrice >= 180) { + customerPricePrice = 60; + } else if (customerPrice >= 170) { + customerPricePrice = 50; + } else if (customerPrice >= 160) { + customerPricePrice = 40; + } else if (customerPrice >= 150) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 航和店客服日奖励 + private int hanghe(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=40,"奖励档80元",IF(C4>=38,"奖励档60元",IF(C4>=37,"奖励档50元",IF(C4>=36,"奖励档40元", + // IF(C4>=35,"奖励档30元",IF(C4>=34,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 40) { + payPercentPrice = 80; + } else if (payPercent >= 38) { + payPercentPrice = 60; + } else if (payPercent >= 37) { + payPercentPrice = 50; + } else if (payPercent >= 36) { + payPercentPrice = 40; + } else if (payPercent >= 35) { + payPercentPrice = 30; + } else if (payPercent >= 34) { + payPercentPrice = 20; + } + + // IF(D4>=80,"询单人数档80元",IF(D4>=60,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + // 航和没有这个,写个大数字 + askNumberPrice = 100; + } else { + if (askNumber >= 80) { + askNumberPrice = 80; + } else if (askNumber >= 60) { + askNumberPrice = 60; + } + } + + // =IF(E4>=195,"客单档80元",IF(E4>=185,"客单档60元",IF(E4>=175,"客单档50元",IF(E4>=165,"客单档40元", + // IF(E4>=155,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 195) { + customerPricePrice = 80; + } else if (customerPrice >= 185) { + customerPricePrice = 60; + } else if (customerPrice >= 175) { + customerPricePrice = 50; + } else if (customerPrice >= 165) { + customerPricePrice = 40; + } else if (customerPrice >= 155) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 卓胜店客服日奖励 + private int zhuosheng(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=38,"奖励档80元",IF(C4>=37,"奖励档60元",IF(C4>=36,"奖励档50元",IF(C4>=35,"奖励档40元", + // IF(C4>=34,"奖励档30元",IF(C4>=33,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 38) { + payPercentPrice = 80; + } else if (payPercent >= 37) { + payPercentPrice = 60; + } else if (payPercent >= 36) { + payPercentPrice = 50; + } else if (payPercent >= 35) { + payPercentPrice = 40; + } else if (payPercent >= 34) { + payPercentPrice = 30; + } else if (payPercent >= 33) { + payPercentPrice = 20; + } + + // IF(D4>=65,"询单人数档80元",IF(D4>=45,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 65) { + askNumberPrice = 80; + } else if (askNumber >= 45) { + askNumberPrice = 60; + } + } + + // IF(E4>=190,"客单档80元",IF(E4>=180,"客单档60元",IF(E4>=170,"客单档50元",IF(E4>=160,"客单档40元", + // IF(E4>=150,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 190) { + customerPricePrice = 80; + } else if (customerPrice >= 180) { + customerPricePrice = 60; + } else if (customerPrice >= 170) { + customerPricePrice = 50; + } else if (customerPrice >= 160) { + customerPricePrice = 40; + } else if (customerPrice >= 150) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 欣克利店客服日奖励 + private int xinkeli(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=37,"奖励档80元",IF(C4>=36,"奖励档60元",IF(C4>=35,"奖励档50元",IF(C4>=34,"奖励档40元", + // IF(C4>=33,"奖励档30元",IF(C4>=32,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 37) { + payPercentPrice = 80; + } else if (payPercent >= 36) { + payPercentPrice = 60; + } else if (payPercent >= 35) { + payPercentPrice = 50; + } else if (payPercent >= 34) { + payPercentPrice = 40; + } else if (payPercent >= 33) { + payPercentPrice = 30; + } else if (payPercent >= 32) { + payPercentPrice = 20; + } + + // IF(D4>=50,"询单人数档80元",IF(D4>=30,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 50) { + askNumberPrice = 80; + } else if (askNumber >= 30) { + askNumberPrice = 60; + } + } + + // IF(E4>=165,"客单档80元",IF(E4>=155,"客单档60元",IF(E4>=145,"客单档50元",IF(E4>=135,"客单档40元", + // IF(E4>=125,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 165) { + customerPricePrice = 80; + } else if (customerPrice >= 155) { + customerPricePrice = 60; + } else if (customerPrice >= 145) { + customerPricePrice = 50; + } else if (customerPrice >= 135) { + customerPricePrice = 40; + } else if (customerPrice >= 125) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 米笛儿店客服日奖励 + private int midier(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=35,"奖励档80元",IF(C4>=34,"奖励档60元",IF(C4>=33,"奖励档50元",IF(C4>=32,"奖励档40元", + // IF(C4>=31,"奖励档30元",IF(C4>=30,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 35) { + payPercentPrice = 80; + } else if (payPercent >= 34) { + payPercentPrice = 60; + } else if (payPercent >= 33) { + payPercentPrice = 50; + } else if (payPercent >= 32) { + payPercentPrice = 40; + } else if (payPercent >= 31) { + payPercentPrice = 30; + } else if (payPercent >= 30) { + payPercentPrice = 20; + } + + // IF(D4>=55,"询单人数档80元",IF(D4>=35,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 55) { + askNumberPrice = 80; + } else if (askNumber >= 35) { + askNumberPrice = 60; + } + } + + // IF(E4>=210,"客单档80元",IF(E4>=195,"客单档60元",IF(E4>=185,"客单档50元",IF(E4>=175,"客单档40元", + // IF(E4>=165,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 210) { + customerPricePrice = 80; + } else if (customerPrice >= 195) { + customerPricePrice = 60; + } else if (customerPrice >= 185) { + customerPricePrice = 50; + } else if (customerPrice >= 175) { + customerPricePrice = 40; + } else if (customerPrice >= 165) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } + + // 阳光猫店客服日奖励 + private int yangguangmao(String nickname, Double payPercent, Double askNumber, Double customerPrice) { + // IF(C4>=40,"奖励档80元",IF(C4>=38,"奖励档60元",IF(C4>=37,"奖励档50元",IF(C4>=36,"奖励档40元", + // IF(C4>=35,"奖励档30元",IF(C4>=34,"奖励档20元")))))) + int payPercentPrice = 0; + if (payPercent >= 40) { + payPercentPrice = 80; + } else if (payPercent >= 38) { + payPercentPrice = 60; + } else if (payPercent >= 37) { + payPercentPrice = 50; + } else if (payPercent >= 36) { + payPercentPrice = 40; + } else if (payPercent >= 35) { + payPercentPrice = 30; + } else if (payPercent >= 34) { + payPercentPrice = 20; + } + + // IF(D4>=70,"询单人数档80元",IF(D4>=50,"询单人数档60元"))) + int askNumberPrice = 0; + if ("平均".equals(nickname)) { + // IF(D4>=50%,"询单人数档80元",IF(D4>=30%,"询单人数档60元"))) + if (askNumber >= 0.5) { + askNumberPrice = 80; + } else if (askNumber >= 0.3) { + askNumberPrice = 60; + } + } else { + if (askNumber >= 70) { + askNumberPrice = 80; + } else if (askNumber >= 50) { + askNumberPrice = 60; + } + } + + // IF(E4>=190,"客单档80元",IF(E4>=180,"客单档60元",IF(E4>=170,"客单档50元",IF(E4>=160,"客单档40元", + // IF(E4>=150,"客单档30元",IF(E4>=0,"客单档20元")))))) + int customerPricePrice = 0; + if (customerPrice >= 190) { + customerPricePrice = 80; + } else if (customerPrice >= 180) { + customerPricePrice = 60; + } else if (customerPrice >= 170) { + customerPricePrice = 50; + } else if (customerPrice >= 160) { + customerPricePrice = 40; + } else if (customerPrice >= 150) { + customerPricePrice = 30; + } else if (customerPrice >= 0) { + customerPricePrice = 20; + } + double award = Math.min(Math.min(payPercentPrice, askNumberPrice), customerPricePrice); + + return (int) award; + } +} diff --git a/src/main/java/lingtao/net/service/CustomerDataService.java b/src/main/java/lingtao/net/service/CustomerDataService.java new file mode 100644 index 0000000..742eff3 --- /dev/null +++ b/src/main/java/lingtao/net/service/CustomerDataService.java @@ -0,0 +1,132 @@ +package lingtao.net.service; + +import java.util.List; + +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.CustomerData; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.CustomerDataMapper; +import lingtao.net.util.DateFormatUtils; + +@Service +public class CustomerDataService { + + @Autowired + private CustomerDataMapper customerDatamapper; + + /** + * 根据角色身份查询数据列表 + */ + public List getCustomerDatas(CustomerData customerData) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + customerData.setCreateDateEnd(new DateFormatUtils().formatEndTime(customerData.getCreateDateBegin())); + customerData.setCreateDateBegin(new DateFormatUtils().formatBeginTime(customerData.getCreateDateBegin())); + // 用户所拥有的角色 + String[] roleArr = user.getRole().split(","); + // 判断是否拥有超管身份标识 + boolean isSuper = false; + for (int i = 0; i < roleArr.length; i++) { + // 有‘超级管理员’身份,状态改为true + if ("1".equals(roleArr[i]) || "777".equals(roleArr[i])) { + isSuper = true; + break; + } + } + + // 如果没有‘超级管理员’身份,就展示所拥有的店铺数据;如果有就不加条件,直接查询所有 + if (!isSuper) { + // 如果有多个 + if (user.getRole().contains(",")) { + customerData.setRoleArr(roleArr); + } else {// 只有一个角色 + customerData.setRoleSearch(user.getRole()); + } + } + + return customerDatamapper.getCustomerDatas(customerData); + } + + /** + * 新增数据 + * + * @param customerData + */ + public void addCustomerData(CustomerData customerData) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + // 未成交数据 + customerData.setIsBuy("0"); + customerData.setUsername(user.getUsername()); + customerData.setRealname(user.getRealname()); + customerData.setCreateBy(user.getRealname()); + customerDatamapper.addCustomerData(customerData); + } + + /** + * 修改数据 + * + * @param customerData + */ + public void updateCustomerDataById(CustomerData customerData) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + customerData.setUpdateBy(user.getRealname()); + customerDatamapper.updateCustomerDataById(customerData); + } + + /** + * 删除数据 + * + * @param id + */ + public void deleteCustomerDataById(Integer id) { + customerDatamapper.deleteCustomerDataById(id); + } + + /** + * 修改 店长评语 + * + * @param id + * @param field + * @param value + */ + public void updateRemarkById(int id, String field, String value) { + CustomerData customerData = new CustomerData(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + if ("commentManager".equals(field)) { + customerData.setId(id); + customerData.setCommentManager(value); + customerData.setUpdateBy(user.getRealname()); + } + customerDatamapper.updateCommentManager(customerData); + } + + /** + * 修改完成状态 + * + * @param id + * @return + */ + public Msg changeIsBuy(Integer id) { + try { + customerDatamapper.changeIsBuy(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + /** + * 查询产品说明报价记录 + * + * @param productExplain + * @return + */ + public List getProductExplain(String productExplain) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + return customerDatamapper.getProductExplain(productExplain, user.getUsername()); + } + +} diff --git a/src/main/java/lingtao/net/service/CustomerTrainService.java b/src/main/java/lingtao/net/service/CustomerTrainService.java new file mode 100644 index 0000000..c18b8db --- /dev/null +++ b/src/main/java/lingtao/net/service/CustomerTrainService.java @@ -0,0 +1,162 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.CustomerTrainContent; +import lingtao.net.bean.CustomerTrainKindLabel; +import lingtao.net.bean.CustomerTrainProType; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.CustomerTrainMapper; + +@Service +public class CustomerTrainService { + + @Autowired + private CustomerTrainMapper customerTrainMapper; + + // 查询列表 + public List getCustomerTrainContents(CustomerTrainContent customerTrainContent) { + return customerTrainMapper.getCustomerTrainContents(customerTrainContent); + } + + // 新增 + public Msg addCustomerTrainContent(CustomerTrainContent customerTrainContent, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + customerTrainContent.setCreateBy(user.getRealname()); + try { + customerTrainMapper.addCustomerTrainContent(customerTrainContent); + return Msg.success(); + } catch (Exception e) { + System.out.println(e); + return Msg.fail(); + } + } + + // 修改 + public Msg updateCustomerTrainContentById(CustomerTrainContent customerTrainContent, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + customerTrainContent.setUpdateBy(user.getRealname()); + try { + customerTrainMapper.updateCustomerTrainContentById(customerTrainContent); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 修改排序 + public Msg updateCustomerTrainContentSort(int id, String value) { + customerTrainMapper.updateCustomerTrainContentSort(id, Integer.valueOf(value)); + return Msg.success(); + } + + // 删除 + public Msg deleteCustomerTrainContentById(Integer id) { + try { + customerTrainMapper.deleteCustomerTrainContentById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 产品种类字典 + + /** + * + * @param customerTrainProType + * @return + */ + // 查询 + public List getCustomerTrainProTypes(CustomerTrainProType customerTrainProType) { + return customerTrainMapper.getCustomerTrainProTypes(customerTrainProType); + } + + // 新增 + public Msg addCustomerTrainProType(CustomerTrainProType customerTrainProType, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + customerTrainProType.setCreateBy(user.getRealname()); + try { + customerTrainMapper.addCustomerTrainProType(customerTrainProType); + return Msg.success(); + } catch (Exception e) { + System.out.println(e); + return Msg.fail(); + } + } + + // 修改 + public Msg updateCustomerTrainProTypeById(CustomerTrainProType customerTrainProType, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + customerTrainProType.setUpdateBy(user.getRealname()); + try { + customerTrainMapper.updateCustomerTrainProTypeById(customerTrainProType); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 删除 + public Msg deleteCustomerTrainProTypeById(Integer id) { + try { + customerTrainMapper.deleteCustomerTrainProTypeById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 类型字典 + /** + * + * @param customerTrainKindLabel + * @return + */ + // 查询 + public List getCustomerTrainKindLabelsByProType( + CustomerTrainKindLabel customerTrainKindLabel) { + return customerTrainMapper.getCustomerTrainKindLabelsByProType(customerTrainKindLabel); + } + + // 新增 + public Msg addCustomerTrainKindLabel(CustomerTrainKindLabel customerTrainKindLabel, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + customerTrainKindLabel.setCreateBy(user.getRealname()); + try { + customerTrainMapper.addCustomerTrainKindLabel(customerTrainKindLabel); + return Msg.success(); + } catch (Exception e) { + System.out.println(e); + return Msg.fail(); + } + } + + // 修改 + public Msg updateCustomerTrainKindLabelById(CustomerTrainKindLabel customerTrainKindLabel, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + customerTrainKindLabel.setUpdateBy(user.getRealname()); + try { + customerTrainMapper.updateCustomerTrainKindLabelById(customerTrainKindLabel); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 删除 + public Msg deleteCustomerTrainKindLabelById(Integer id) { + try { + customerTrainMapper.deleteCustomerTrainKindLabelById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } +} diff --git a/src/main/java/lingtao/net/service/ExpressFeeService.java b/src/main/java/lingtao/net/service/ExpressFeeService.java new file mode 100644 index 0000000..d9ee7b6 --- /dev/null +++ b/src/main/java/lingtao/net/service/ExpressFeeService.java @@ -0,0 +1,113 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.ExpressFee; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.ExpressFeeMapper; + +@Service +public class ExpressFeeService { + + @Autowired + private ExpressFeeMapper expressFeeMapper; + + public List getExpressFees(ExpressFee expressFee) { + return expressFeeMapper.getExpressFees(expressFee); + } + + public Msg addExpressFee(ExpressFee expressFee, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + expressFee.setCreateBy(user.getRealname()); + try { + expressFeeMapper.addExpressFee(expressFee); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(e.toString()); + } + } + + public Msg updateExpressFeeById(ExpressFee expressFee, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + expressFee.setUpdateBy(user.getRealname()); + try { + expressFeeMapper.updateExpressFeeById(expressFee); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + + } + + public Msg deleteExpressFeeById(Integer id) { + try { + expressFeeMapper.deleteExpressFeeById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + + } + + public List getShortAnswers() { + return expressFeeMapper.getShortAnswers(); + } + + public Msg updateExpressFeeById(HttpSession session, int id, String field, String value) { + ExpressFee expressFee = new ExpressFee(); + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + expressFee.setUpdateBy(user.getRealname()); + expressFee.setId(id); + switch (field) { + case "province": + expressFee.setProvince(value); + break; + case "firstWeightPrice": + if (StringUtils.isEmpty(value)) + return Msg.fail("更新失败"); + expressFee.setFirstWeightPrice(Double.valueOf(value)); + break; + case "continuedWeightPrice": + if (StringUtils.isEmpty(value)) + return Msg.fail("更新失败"); + expressFee.setContinuedWeightPrice(Double.valueOf(value)); + break; + case "startPrice": + if (StringUtils.isEmpty(value)) + return Msg.fail("更新失败"); + expressFee.setStartPrice(Double.valueOf(value)); + break; + } + try { + expressFeeMapper.updateExpressFeeById(expressFee); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + + } + + public List getAllExpressFees(ExpressFee expressFee) { + return expressFeeMapper.getAllExpressFees(expressFee); + } + + public List getHandBagExpressFees(ExpressFee expressFee) { + return expressFeeMapper.getHandBagExpressFees(expressFee); + } + + public List getTaoExpressFees(ExpressFee expressFee) { + return expressFeeMapper.getTaoExpressFees(expressFee); + } + + public List getOtherExpressFees(ExpressFee expressFee) { + return expressFeeMapper.getOtherExpressFees(expressFee); + } + +} diff --git a/src/main/java/lingtao/net/service/Finance2Service.java b/src/main/java/lingtao/net/service/Finance2Service.java new file mode 100644 index 0000000..ba20c3f --- /dev/null +++ b/src/main/java/lingtao/net/service/Finance2Service.java @@ -0,0 +1,401 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.Finance2Mapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class Finance2Service { + + @Autowired + private Finance2Mapper finance2Mapper; + + public List getFinance(Finance finance) { + return finance2Mapper.getFinance(finance); + } + + public List getAllFilename(String creator) { + return finance2Mapper.getAllFilename(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + finance2Mapper.deleteDataByFilename(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + String addTime = String.valueOf(lo.get(0)).trim(); + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(3)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "mm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + // 判断数据是否已经存在 + + /* + * String checkAccountNumber = finance2Mapper.checkAccountNumber(orderNumber); + * if (StringUtils.isNotEmpty(checkAccountNumber)) { continue; } + */ + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + try { + // 处理备注 + String cutSizeStr = remark; + String cutCountStr = remark; + number = cutSize(cutSizeStr); + count = cutCount(cutCountStr); + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + vo.setZhang(String.valueOf(zhang)); + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // finance2Mapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + finance2Mapper.insertForeach(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")"); + String countStr = ""; + String numberStr = ""; + Integer number; + Integer count; + int indexM = remark.indexOf("m"); + int indexZhang = remark.indexOf("张"); + int indexGe = remark.indexOf("个"); + int indexTao = remark.indexOf("套"); + int indexMei = remark.indexOf("枚"); + if (remark.indexOf("张") != -1 && indexZhang - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("张")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("张")); + } + } else if (remark.indexOf("个") != -1 && indexGe - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("个")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("个")); + } + } else if (remark.indexOf("套") != -1 && indexTao - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("套")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("套")); + } + } else if (remark.indexOf("枚") != -1 && indexMei - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("枚")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("枚")); + } + } + // 第一个“款”的位置 + int firstK = countStr.indexOf("款"); + // 第一个“各”的位置 + int firstGe = countStr.indexOf("各"); + // 第二个“款”的位置 + int countStrSecondK = countStr.indexOf("款", firstK + 1); + // 第3个“款”的位置 + int countStrThirdK = countStr.indexOf("款", countStrSecondK + 1); + if (countStrSecondK > 0 && countStrThirdK > 0) { + return "#"; + } + // “共***张” + if (countStr.contains("共")) { + String[] split = countStr.split("共"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “合计***张” + if (countStr.contains("合计")) { + String[] split = countStr.split("合计"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “总的***张” + if (countStr.contains("总")) { + String[] split = countStr.split("总"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “***款各***张” + if (firstGe > 0) { + String[] split = countStr.split("各"); + numberStr = split[0]; + countStr = split[1]; + numberStr = numberStr.replaceAll("[^(0-9)]", ""); + countStr = countStr.replaceAll("[^(0-9)]", ""); + if (StringUtils.isEmpty(numberStr)) { + return "#"; + } + number = Integer.valueOf(numberStr); + count = Integer.valueOf(countStr); + if (number == 1 || count == 1) { + return "" + number * count; + } + return number + "*" + count; + } + // **款**张 + if (firstK > 0) { + String[] split = countStr.split("款"); + numberStr = split[0]; + countStr = split[1]; + if (countStrSecondK > 0) { + countStr = split[2]; + } + numberStr = numberStr.replaceAll("[^(0-9)]", ""); + countStr = countStr.replaceAll("[^(0-9)]", ""); + if (StringUtils.isEmpty(numberStr)) { + return "#"; + } + number = Integer.valueOf(numberStr); + count = Integer.valueOf(countStr); + if (number == 1 || count == 1) { + return "" + number * count; + } + return number + "*" + count; + } + countStr = countStr.replaceAll("[^(0-9)]", ""); + return countStr; + } + + private String cutSize(String remark) { + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")") + .replace("专版打印", "").replace("下", "").replace("上", "").replace("专版", "").replace("-", "") + .replace("多拍返10元", ""); + // 第一个X的位置 + int firstX = remark.indexOf("X"); + // 第二个X的位置 + int secondX = remark.indexOf("X", firstX + 1); + int secondmm = remark.indexOf("mm", remark.indexOf("mm") + 1); + if (secondX > 0 && secondmm > 0) { + return "#"; + } + // System.out.println(remark); + String size = ""; + double length; + double width; + // 提取整数/小数的正则 + String regex = "([1-9]\\d*\\.?\\d+)|(0\\.\\d*[1-9])|(\\d+)"; + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") != -1) { + String l = remark.substring(remark.indexOf("X") - 3, remark.indexOf("X")); + String w = remark.substring(remark.indexOf("X") + 1, remark.indexOf("cm")); + // 如果l里有小数点,往前数5位 + if (l.indexOf(".") != -1) { + Pattern pattern = Pattern.compile(regex); + l = remark.substring(remark.indexOf("X") - 5, remark.indexOf("X")); + Matcher matcher = pattern.matcher(l); + while (matcher.find()) { + l = matcher.group(); + } + } else { + l = l.replaceAll("[^(0-9)]", ""); + } + size = l + "X" + w; + String[] split = size.split("X"); + length = Double.valueOf(split[0]) * 10 + 4; + if ("按比例".equals(split[1])) { + width = Double.valueOf(split[0]) * 10 + 4; + } else { + width = Double.valueOf(split[1]) * 10 + 4; + } + } else { + String l = remark.substring(remark.indexOf("X") - 3, remark.indexOf("X")); + String w = remark.substring(remark.indexOf("X") + 1, remark.indexOf("mm")); + // 如果l里有小数点,往前数5位 + if (l.indexOf(".") != -1) { + if (l.indexOf(".") != -1) { + l = remark.substring(remark.indexOf("X") - 5, remark.indexOf("X")); + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(l); + while (matcher.find()) { + l = matcher.group(); + } + } + } else { + l = l.replaceAll("[^(0-9)]", ""); + } + size = l + "X" + w; + String[] split = size.split("X"); + length = Double.valueOf(split[0]) + 4; + if ("按比例".equals(split[1])) { + width = Double.valueOf(split[0]) + 4; + } else { + width = Double.valueOf(split[1]) + 4; + } + } + + double l = 390; + double w = 272; + if (length == l + 4) { + return "1"; + } + if ((length > l || width > w) && (length > w || width > l)) + return "#"; + // 一张纸 390*272 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/Finance3Service.java b/src/main/java/lingtao/net/service/Finance3Service.java new file mode 100644 index 0000000..07157dc --- /dev/null +++ b/src/main/java/lingtao/net/service/Finance3Service.java @@ -0,0 +1,388 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.Finance3Mapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class Finance3Service { + + @Autowired + private Finance3Mapper finance3Mapper; + + public List getFinance(Finance finance) { + return finance3Mapper.getFinance(finance); + } + + public List getAllFilename(String creator) { + return finance3Mapper.getAllFilename(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + finance3Mapper.deleteDataByFilename(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + + String addTime = String.valueOf(lo.get(0)).trim(); + if(addTime.equals("日期")) { + continue; + } + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(3)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "cm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + // 判断数据是否已经存在 + + /* + * String checkAccountNumber = finance2Mapper.checkAccountNumber(orderNumber); + * if (StringUtils.isNotEmpty(checkAccountNumber)) { continue; } + */ + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + String total = ""; + try { + // 处理备注 + remark = remark.replace(",", ","); + number = cutSize(remark); + count = cutCount(remark); + if(remark.indexOf(",") > 0) { + String[] countList = count.split(","); + String[] numberList = number.split(","); + for(int j = 0;j < countList.length; j++) { + if (countList[j].equals("#") || numberList[j].equals("#")) { + zhang = 0; + }else { + zhang = Math.ceil(Double.valueOf(countList[j]) / Double.valueOf(numberList[j])); + } + total += ","+zhang; + } + total = total.substring(0); + }else { + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + if(total.length() > 0) { + vo.setZhang(total); + }else { + vo.setZhang(String.valueOf(zhang)); + } + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // finance2Mapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + finance3Mapper.insertForeach(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + int number = 0, count = 0, index = 0; + String totalCount = ""; + String counts = ""; + String[] countList = {}; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + index = lists[j].indexOf("mm"); + if(index == -1) { + index = lists[j].indexOf("cm"); + } + } + + if(counts.indexOf("各") > 0) { + countList = counts.split("款"); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + totalCount += "," + count * number; + }else { + totalCount += "," + Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + } + totalCount = totalCount.substring(1); + return totalCount; + }else {//单款尺寸 + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + index = list[m].indexOf("mm"); + if(index == -1) { + index = list[m].indexOf("cm"); + } + if(index > 0) { + counts = list[m+1]; + break; + } + } + + if(counts.indexOf("各") > 0) { + countList = counts.split("款"); + countList[1].substring(0, countList[1].length()-1); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + count = count * number; + }else { + count = Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + + return String.valueOf(count); + } + } + + private String cutSize(String remark) { + double length = 0,width = 0; + int sizeIndex = 0; + String totalSize = ""; + String size = ""; + String[] sizeList = {}; + double l = 290,w = 195; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + sizeIndex = lists[j].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = lists[j].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = lists[j].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + + //+3mm出血 + length += 3; + width += 3; + + if (length == l + 3 || width == l + 3) { + totalSize = "1"; + continue; + }else if ((length > l || width > w) && (length > w || width > l)) { + totalSize = "#"; + continue; + } + + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + totalSize += "," + String.valueOf(max); + } + + if(totalSize.indexOf("#") != 0) { + totalSize = totalSize.substring(1); + } + + return totalSize; + }else { + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + sizeIndex = list[m].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = list[m].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = list[m].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + //+3mm出血 + length += 3; + width += 3; + + if (length == l + 3 || width == l + 3) { + return "1"; + } + if ((length > l || width > w) && (length > w || width > l)) + return "#"; + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/Finance4Service.java b/src/main/java/lingtao/net/service/Finance4Service.java new file mode 100644 index 0000000..8316196 --- /dev/null +++ b/src/main/java/lingtao/net/service/Finance4Service.java @@ -0,0 +1,393 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.Finance3Mapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class Finance4Service { + + @Autowired + private Finance3Mapper finance3Mapper; + + public List getFinance(Finance finance) { + return finance3Mapper.getFinance4(finance); + } + + public List getAllFilename(String creator) { + return finance3Mapper.getAllFilename4(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + finance3Mapper.deleteDataByFilename4(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + + String addTime = String.valueOf(lo.get(0)).trim(); + if(addTime.equals("日期")) { + continue; + } + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(4)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "cm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + String total = ""; + try { + // 处理备注 + remark = remark.replace(",", ","); + number = cutSize(remark); + count = cutCount(remark); + if(remark.indexOf(",") > 0) { + String[] countList = count.split(","); + String[] numberList = number.split(","); + for(int j = 0;j < countList.length; j++) { + if (countList[j].equals("#") || numberList[j].equals("#")) { + zhang = 0; + }else { + zhang = Math.ceil(Double.valueOf(countList[j]) / Double.valueOf(numberList[j])); + } + total += ","+zhang; + } + total = total.substring(1); + }else { + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + if(total.length() > 0) { + vo.setZhang(total); + }else { + vo.setZhang(String.valueOf(zhang)); + } + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // finance2Mapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + finance3Mapper.insertForeach4(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + int number = 0, count = 0, index = 0; + String totalCount = ""; + String counts = ""; + String[] countList = {}; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + index = lists[j].indexOf("mm"); + if(index == -1) { + index = lists[j].indexOf("cm"); + } + + if(index > 0) { + counts = lists[j+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0) { + countList = counts.split("款"); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + totalCount += "," + count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex, counts.length()-1); + count = Integer.valueOf(countValue); + }else { + totalCount += "," + Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + } + totalCount = totalCount.substring(1); + return totalCount; + }else {//单款尺寸 + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + index = list[m].indexOf("mm"); + if(index == -1) { + index = list[m].indexOf("cm"); + } + if(index > 0) { + counts = list[m+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0 ) { + countList = counts.split("款"); + countList[1].substring(0, countList[1].length()-1); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + count = count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex+1, counts.length()-1); + count = Integer.valueOf(countValue); + }else { + count = Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + + return String.valueOf(count); + } + } + + private String cutSize(String remark) { + double length = 0,width = 0; + int sizeIndex = 0; + String totalSize = ""; + String size = ""; + String[] sizeList = {}; + double l = 430,w = 300; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + sizeIndex = lists[j].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = lists[j].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = lists[j].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + + //+3mm出血 + length += 6; + width += 6; + + if (length == l + 6 || width == l + 6) { + totalSize = "1"; + continue; + }else if ((length > l || width > w) && (length > w || width > l)) { + totalSize = "#"; + continue; + } + + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + totalSize += "," + String.valueOf(max); + } + + if(totalSize.indexOf("#") != 0) { + totalSize = totalSize.substring(1); + } + + return totalSize; + }else { + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + sizeIndex = list[m].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = list[m].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = list[m].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + //+3mm出血 + length += 6; + width += 6; + + if (length == l + 6 || width == 2 + 6) { + return "1"; + }else if ((length > l || width > w) && (length > w || width > l)) { + return "#"; + } + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/Finance5Service.java b/src/main/java/lingtao/net/service/Finance5Service.java new file mode 100644 index 0000000..02ee0ae --- /dev/null +++ b/src/main/java/lingtao/net/service/Finance5Service.java @@ -0,0 +1,399 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.Finance3Mapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class Finance5Service { + + @Autowired + private Finance3Mapper finance3Mapper; + + public List getFinance(Finance finance) { + return finance3Mapper.getFinance5(finance); + } + + public List getAllFilename(String creator) { + return finance3Mapper.getAllFilename5(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + finance3Mapper.deleteDataByFilename5(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + + String addTime = String.valueOf(lo.get(0)).trim(); + if(addTime.equals("日期")) { + continue; + } + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(3)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "cm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + String total = ""; + try { + // 处理备注 + remark = remark.replace(",", ","); + number = cutSize(remark); + count = cutCount(remark); + if(remark.indexOf(",") > 0) { + String[] countList = count.split(","); + String[] numberList = number.split(","); + for(int j = 0;j < countList.length; j++) { + if (countList[j].equals("#") || numberList[j].equals("#")) { + zhang = 0; + }else { + zhang = Math.ceil(Double.valueOf(countList[j]) / Double.valueOf(numberList[j])); + } + total += ","+zhang; + } + total = total.substring(1); + }else { + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + if(total.length() > 0) { + vo.setZhang(total); + }else { + vo.setZhang(String.valueOf(zhang)); + } + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // finance2Mapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + finance3Mapper.insertForeach5(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + int number = 0, count = 0, index = 0; + String totalCount = ""; + String counts = ""; + String[] countList = {}; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + index = lists[j].indexOf("mm"); + if(index == -1) { + index = lists[j].indexOf("cm"); + } + + if(index > 0) { + counts = lists[j+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0) { + countList = counts.split("款"); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + totalCount += "," + count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex, counts.length()-1); + count = Integer.valueOf(countValue); + totalCount += "," + count; + }else { + totalCount += "," + Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + } + totalCount = totalCount.substring(1); + return totalCount; + }else {//单款尺寸 + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + index = list[m].indexOf("mm"); + if(index == -1) { + index = list[m].indexOf("cm"); + } + if(index > 0) { + counts = list[m+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0 ) { + countList = counts.split("款"); + countList[1].substring(0, countList[1].length()-1); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + count = count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex+1, counts.length()-1); + count = Integer.valueOf(countValue); + }else { + count = Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + + return String.valueOf(count); + } + } + + private String cutSize(String remark) { + double length = 0,width = 0; + int sizeIndex = 0; + String totalSize = ""; + String size = ""; + String[] sizeList = {}; + double l = 440,w = 310; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + sizeIndex = lists[j].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = lists[j].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = lists[j].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + + //+3mm出血 + length += 6; + width += 6; + + if (length == l + 6 ) { + totalSize = String.valueOf(w/width); + continue; + }else if(width == w + 6) { + totalSize = String.valueOf(l/length); + continue; + }else if ((length > l || width > w) && (length > w || width > l)) { + totalSize = "#"; + continue; + } + + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + totalSize += "," + String.valueOf(max); + } + + if(totalSize.indexOf("#") != 0) { + totalSize = totalSize.substring(1); + } + + return totalSize; + }else { + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + sizeIndex = list[m].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = list[m].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = list[m].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + //+3mm出血 + length += 6; + width += 6; + + if (length == l + 6 ) { + return String.valueOf(w/width); + }else if(width == w + 6) { + return String.valueOf(l/length); + }else if ((length > l || width > w) && (length > w || width > l)) { + return "#"; + } + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/Finance6Service.java b/src/main/java/lingtao/net/service/Finance6Service.java new file mode 100644 index 0000000..e33d827 --- /dev/null +++ b/src/main/java/lingtao/net/service/Finance6Service.java @@ -0,0 +1,399 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.Finance3Mapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class Finance6Service { + + @Autowired + private Finance3Mapper finance3Mapper; + + public List getFinance(Finance finance) { + return finance3Mapper.getFinance6(finance); + } + + public List getAllFilename(String creator) { + return finance3Mapper.getAllFilename6(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + finance3Mapper.deleteDataByFilename6(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + + String addTime = String.valueOf(lo.get(0)).trim(); + if(addTime.equals("日期")) { + continue; + } + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(3)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "cm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + String total = ""; + try { + // 处理备注 + remark = remark.replace(",", ","); + number = cutSize(remark); + count = cutCount(remark); + if(remark.indexOf(",") > 0) { + String[] countList = count.split(","); + String[] numberList = number.split(","); + for(int j = 0;j < countList.length; j++) { + if (countList[j].equals("#") || numberList[j].equals("#")) { + zhang = 0; + }else { + zhang = Math.ceil(Double.valueOf(countList[j]) / Double.valueOf(numberList[j])); + } + total += ","+zhang; + } + total = total.substring(1); + }else { + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + if(total.length() > 0) { + vo.setZhang(total); + }else { + vo.setZhang(String.valueOf(zhang)); + } + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // finance2Mapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + finance3Mapper.insertForeach6(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + int number = 0, count = 0, index = 0; + String totalCount = ""; + String counts = ""; + String[] countList = {}; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + index = lists[j].indexOf("mm"); + if(index == -1) { + index = lists[j].indexOf("cm"); + } + + if(index > 0) { + counts = lists[j+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0) { + countList = counts.split("款"); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + totalCount += "," + count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex+1, counts.length()-1); + count = Integer.valueOf(countValue); + totalCount += "," + count; + }else { + totalCount += "," + Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + } + totalCount = totalCount.substring(1); + return totalCount; + }else {//单款尺寸 + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + index = list[m].indexOf("mm"); + if(index == -1) { + index = list[m].indexOf("cm"); + } + if(index > 0) { + counts = list[m+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0 ) { + countList = counts.split("款"); + countList[1].substring(0, countList[1].length()-1); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + count = count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex+1, counts.length()-1); + count = Integer.valueOf(countValue); + }else { + count = Integer.valueOf(counts.substring(0, counts.length()-1)); + } + + return String.valueOf(count); + } + } + + private String cutSize(String remark) { + double length = 0,width = 0; + int sizeIndex = 0; + String totalSize = ""; + String size = ""; + String[] sizeList = {}; + double l = 425,w = 300; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + sizeIndex = lists[j].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = lists[j].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = lists[j].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + + //+4mm出血 + length += 8; + width += 8; + + if (length == l + 8 ) { + totalSize = String.valueOf(w/width); + continue; + }else if(width == w + 8) { + totalSize = String.valueOf(l/length); + continue; + }else if ((length > l || width > w) && (length > w || width > l)) { + totalSize = "#"; + continue; + } + + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + totalSize += "," + String.valueOf(max); + } + + if(totalSize.indexOf("#") != 0) { + totalSize = totalSize.substring(1); + } + + return totalSize; + }else { + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + sizeIndex = list[m].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = list[m].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = list[m].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + //+4mm出血 + length += 8; + width += 8; + + if (length == l + 8 ) { + return String.valueOf(w/width); + }else if(width == w + 8) { + return String.valueOf(l/length); + }else if ((length > l || width > w) && (length > w || width > l)) { + return "#"; + } + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/Finance7Service.java b/src/main/java/lingtao/net/service/Finance7Service.java new file mode 100644 index 0000000..7e65d92 --- /dev/null +++ b/src/main/java/lingtao/net/service/Finance7Service.java @@ -0,0 +1,399 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.Finance3Mapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class Finance7Service { + + @Autowired + private Finance3Mapper finance3Mapper; + + public List getFinance(Finance finance) { + return finance3Mapper.getFinance7(finance); + } + + public List getAllFilename(String creator) { + return finance3Mapper.getAllFilename7(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + finance3Mapper.deleteDataByFilename7(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + + String addTime = String.valueOf(lo.get(0)).trim(); + if(addTime.equals("日期")) { + continue; + } + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(3)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "cm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + String total = ""; + try { + // 处理备注 + remark = remark.replace(",", ","); + number = cutSize(remark); + count = cutCount(remark); + if(remark.indexOf(",") > 0) { + String[] countList = count.split(","); + String[] numberList = number.split(","); + for(int j = 0;j < countList.length; j++) { + if (countList[j].equals("#") || numberList[j].equals("#")) { + zhang = 0; + }else { + zhang = Math.ceil(Double.valueOf(countList[j]) / Double.valueOf(numberList[j])); + } + total += ","+zhang; + } + total = total.substring(1); + }else { + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + if(total.length() > 0) { + vo.setZhang(total); + }else { + vo.setZhang(String.valueOf(zhang)); + } + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // finance2Mapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + finance3Mapper.insertForeach7(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + int number = 0, count = 0, index = 0; + String totalCount = ""; + String counts = ""; + String[] countList = {}; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + index = lists[j].indexOf("mm"); + if(index == -1) { + index = lists[j].indexOf("cm"); + } + + if(index > 0) { + counts = lists[j+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0) { + countList = counts.split("款"); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + totalCount += "," + count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex+1, counts.length()-1); + count = Integer.valueOf(countValue); + totalCount += "," + count; + }else { + totalCount += "," + Integer.valueOf(counts.substring(0, counts.length()-1)) * 1; + } + } + totalCount = totalCount.substring(1); + return totalCount; + }else {//单款尺寸 + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + index = list[m].indexOf("mm"); + if(index == -1) { + index = list[m].indexOf("cm"); + } + if(index > 0) { + counts = list[m+1]; + break; + } + } + + if(counts.indexOf("各") > 0 && counts.indexOf("共") < 0 ) { + countList = counts.split("款"); + countList[1].substring(0, countList[1].length()-1); + number = Integer.valueOf(countList[0].replace("各", "")); + count = Integer.valueOf(countList[1].substring(1, countList[1].length()-1)); + count = count * number; + }else if(counts.indexOf("共") > 0){ + int coutIndex = counts.indexOf("共"); + String countValue = counts.substring(coutIndex+1, counts.length()-1); + count = Integer.valueOf(countValue); + }else { + count = Integer.valueOf(counts.substring(0, counts.length()-1)); + } + + return String.valueOf(count); + } + } + + private String cutSize(String remark) { + double length = 0,width = 0; + int sizeIndex = 0; + String totalSize = ""; + String size = ""; + String[] sizeList = {}; + double l = 420,w = 280; + if( remark.indexOf(",") > 0) {//合包的拼版计算 + String[] total = remark.split(","); + for(int i = 0 ;i < total.length; i++) { + String[] lists = total[i].split("-"); + for(int j = 0; j < lists.length; j++) { + sizeIndex = lists[j].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = lists[j].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = lists[j].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + + //+2mm出血 + length += 4; + width += 4; + + if (length == l + 4 ) { + totalSize = String.valueOf(w/width); + continue; + }else if(width == w + 4) { + totalSize = String.valueOf(l/length); + continue; + }else if ((length > l || width > w) && (length > w || width > l)) { + totalSize = "#"; + continue; + } + + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + totalSize += "," + String.valueOf(max); + } + + if(totalSize.indexOf("#") != 0) { + totalSize = totalSize.substring(1); + } + + return totalSize; + }else { + String[] list = remark.split("-"); + for(int m = 0;m < list.length; m++) { + sizeIndex = list[m].indexOf("mm"); + if(sizeIndex == 0) { + sizeIndex = list[m].indexOf("cm"); + } + + if(sizeIndex > 0) { + size = list[m].replace("mm", ""); + size = size.replace("cm", ""); + break; + } + } + + if(size.indexOf("×") > 0 ) { + sizeList = size.split("×"); + }else if(size.indexOf("x") > 0){ + sizeList = size.split("x"); + } + + length = Double.valueOf(sizeList[0]); + width = Double.valueOf(sizeList[1]); + //+2mm出血 + length += 4; + width += 4; + + if (length == l + 4 ) { + return String.valueOf(w/width); + }else if(width == w + 4) { + return String.valueOf(l/length); + }else if ((length > l || width > w) && (length > w || width > l)) { + return "#"; + } + // 一张纸 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/FinanceDifferenceService.java b/src/main/java/lingtao/net/service/FinanceDifferenceService.java new file mode 100644 index 0000000..ae4f81c --- /dev/null +++ b/src/main/java/lingtao/net/service/FinanceDifferenceService.java @@ -0,0 +1,183 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.FinanceDifference; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.FinanceDifferenceMapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class FinanceDifferenceService { + + @Autowired + private FinanceDifferenceMapper differenceMapper; + + public List get(FinanceDifference difference) { + return differenceMapper.get(difference); + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String openOrderNumber = ""; + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + FinanceDifference vo = new FinanceDifference(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(4) == "") { + System.out.println("++++++++++++++"); + continue; + } + String orderNumber = String.valueOf(lo.get(0)).trim(); + String shopname = String.valueOf(lo.get(1)).trim(); + String wangwang = String.valueOf(lo.get(2)).trim(); + String payTime = String.valueOf(lo.get(3)).trim(); + String price = String.valueOf(lo.get(4)).trim(); + String remark = String.valueOf(lo.get(5)).trim(); + String taobaoStatus = String.valueOf(lo.get(6)).trim(); + SimpleDateFormat formatter = null; + if (payTime.contains("-")) { + formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + } else if (payTime.contains("/")) { + formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + } + Date pay_time = formatter.parse(payTime);// 把字符串转为日期格式 + vo.setOrderNumber(orderNumber); + vo.setShopname(shopname); + vo.setWangwang(wangwang); + vo.setPayTime(pay_time); + vo.setPrice(price); + vo.setRemark(remark); + vo.setTaobaoStatus(taobaoStatus); + try { + openOrderNumber = cutOrderNumber(remark); + } catch (Exception e) { + System.out.println(remark); + } + // openOrderNumber = remark.replaceAll("[^(0-9)]", ""); + vo.setOpenOrderNumber(openOrderNumber); + vo.setFilename(filename); + vo.setCreator(user.getRealname()); + list.add(vo); + } + } + if (list.size() > 0) { + differenceMapper.insertForeach(list); + } + in.close(); + return Msg.success(); + } + + private String cutOrderNumber(String remark) { + // 获取字符串中的数字 + // 这个15是指连续数字的最少个数 + Pattern p = Pattern.compile("\\d{15,}"); + Matcher m = p.matcher(remark); + String openOrder = ""; + while (m.find()) { + openOrder = m.group(); + } + if (remark.contains("S_")) { + if (remark.contains("C")) { + return "S_C1_" + openOrder; + } else { + return "S_" + openOrder; + } + } + return openOrder; + } + + public List getAllFilename(String creator) { + return differenceMapper.getAllFilename(creator); + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, FinanceDifference difference) throws Exception { + response.setCharacterEncoding("UTF-8"); + List differencesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + difference.setCreator(user.getRealname()); + differencesList = get(difference); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("订单号"); + titleRow.createCell(1).setCellValue("店铺"); + titleRow.createCell(2).setCellValue("旺旺"); + titleRow.createCell(3).setCellValue("付款时间"); + titleRow.createCell(4).setCellValue("金额"); + titleRow.createCell(5).setCellValue("备注"); + titleRow.createCell(6).setCellValue("淘宝状态"); + titleRow.createCell(7).setCellValue("拆分订单"); + titleRow.createCell(8).setCellValue("导入人"); + titleRow.createCell(9).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (FinanceDifference differences : differencesList) { + filename = difference.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(differences.getOrderNumber()); + dataRow.createCell(1).setCellValue(differences.getShopname()); + dataRow.createCell(3).setCellValue(""); + if (differences.getPayTime() != null) { + dataRow.createCell(3).setCellValue(formatter.format(differences.getPayTime())); + } + dataRow.createCell(2).setCellValue(differences.getWangwang()); + dataRow.createCell(4).setCellValue(differences.getPrice()); + dataRow.createCell(5).setCellValue(differences.getRemark()); + dataRow.createCell(6).setCellValue(differences.getTaobaoStatus()); + dataRow.createCell(7).setCellValue(differences.getOpenOrderNumber()); + dataRow.createCell(8).setCellValue(differences.getCreator()); + dataRow.createCell(9).setCellValue(formatter.format(differences.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/FinanceExtractService.java b/src/main/java/lingtao/net/service/FinanceExtractService.java new file mode 100644 index 0000000..d57baab --- /dev/null +++ b/src/main/java/lingtao/net/service/FinanceExtractService.java @@ -0,0 +1,368 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.FinanceExtract; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.FinanceExtractMapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class FinanceExtractService { + + @Autowired + private FinanceExtractMapper financeExtractMapper; + + public List getFinanceExtract(FinanceExtract financeExtract) { + return financeExtractMapper.getFinanceExtract(financeExtract); + } + + public List getFilename_extract(String creator) { + return financeExtractMapper.getFilename_extract(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + financeExtractMapper.deleteDataByFilename(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + FinanceExtract vo = new FinanceExtract(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.get(1) == "") { + System.out.println("++++++++++++++"); + continue; + } + String orderNumber = String.valueOf(lo.get(0)).trim(); + String remark = String.valueOf(lo.get(1)).trim(); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + // 尺寸 + String size = "#"; + // 长 + String length = "#"; + // 宽 + String width = "#"; + // 高 + String height = "#"; + // 数量 + String count = "#"; + try { + // 处理备注 + String cutSizeStr = remark; + String cutCountStr = remark; + size = cutSize(cutSizeStr); + if (size != "#" || !"#".equals(size)) { + if (size.contains("+")) { + String[] sizeSplit = size.split("\\+"); +// System.out.println(Double.valueOf(sizeSplit[0])); +// System.out.println(Double.valueOf(sizeSplit[1])); + length = sizeSplit[0]; + width = sizeSplit[1]; + } + } + count = cutCount(cutCountStr); + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } catch (Exception e) { + System.out.println(remark); + } + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setLength(length); + vo.setWidth(width); + vo.setHeight(height); + vo.setCount(count); + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + financeExtractMapper.insertForeach(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")"); + String countStr = ""; + String numberStr = ""; + Integer number; + Integer count; + int indexM = remark.indexOf("m"); + int indexZhang = remark.indexOf("张"); + int indexGe = remark.indexOf("个"); + int indexTao = remark.indexOf("套"); + int indexMei = remark.indexOf("枚"); + // 印艺,尺寸是做好的,直接提取 + if (remark.contains(".pdf")) { + String newRemarkYY = remark.substring(remark.indexOf("-切") + 2); + countStr = newRemarkYY.substring(newRemarkYY.indexOf("-") + 1, newRemarkYY.indexOf("Z-")); + return countStr; + } + if (remark.indexOf("张") != -1 && indexZhang - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("张")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("张")); + } + } else if (remark.indexOf("个") != -1 && indexGe - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("个")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("个")); + } + } else if (remark.indexOf("套") != -1 && indexTao - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("套")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("套")); + } + } else if (remark.indexOf("枚") != -1 && indexMei - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("枚")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("枚")); + } + } + // 第一个“款”的位置 + int firstK = countStr.indexOf("款"); + // 第一个“各”的位置 + int firstGe = countStr.indexOf("各"); + // 第二个“款”的位置 + int countStrSecondK = countStr.indexOf("款", firstK + 1); + // 第3个“款”的位置 + int countStrThirdK = countStr.indexOf("款", countStrSecondK + 1); + if (countStrSecondK > 0 && countStrThirdK > 0) { + return "#"; + } + // “共***张” + if (countStr.contains("共")) { + String[] split = countStr.split("共"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “合计***张” + if (countStr.contains("合计")) { + String[] split = countStr.split("合计"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “总的***张” + if (countStr.contains("总")) { + String[] split = countStr.split("总"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “***款各***张” + if (firstGe > 0) { + String[] split = countStr.split("各"); + numberStr = split[0]; + countStr = split[1]; + numberStr = numberStr.replaceAll("[^(0-9)]", ""); + countStr = countStr.replaceAll("[^(0-9)]", ""); + if (StringUtils.isEmpty(numberStr)) { + return "#"; + } + number = Integer.valueOf(numberStr); + count = Integer.valueOf(countStr); + if (number == 1 || count == 1) { + return "" + number * count; + } + return number + "*" + count; + } + // **款**张 + if (firstK > 0) { + String[] split = countStr.split("款"); + numberStr = split[0]; + countStr = split[1]; + if (countStrSecondK > 0) { + countStr = split[2]; + } + numberStr = numberStr.replaceAll("[^(0-9)]", ""); + countStr = countStr.replaceAll("[^(0-9)]", ""); + if (StringUtils.isEmpty(numberStr)) { + return "#"; + } + number = Integer.valueOf(numberStr); + count = Integer.valueOf(countStr); + if (number == 1 || count == 1) { + return "" + number * count; + } + return number + "*" + count; + } + countStr = countStr.replaceAll("[^(0-9)]", ""); + return countStr; + } + + private String cutSize(String remark) { + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")") + .replace("专版打印", "").replace("下", "").replace("上", "").replace("专版", "").replace("多拍返10元", ""); + // 第一个X的位置 + int firstX = remark.indexOf("X"); + // 第二个X的位置 + int secondX = remark.indexOf("X", firstX + 1); + int secondmm = remark.indexOf("mm", remark.indexOf("mm") + 1); + if (secondX > 0 && secondmm > 0) { + return "#"; + } + // System.out.println(remark); + String size = ""; + double length; + double width; + String regex = "([1-9]\\d*\\.?\\d+)|(0\\.\\d*[1-9])|(\\d+)"; + // 没有mm && 有cm + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") != -1) { + String l = remark.substring(remark.indexOf("X") - 3, remark.indexOf("X")); + String w = remark.substring(remark.indexOf("X") + 1, remark.indexOf("cm")); + // 如果l里有小数点,往前数5位 + if (l.indexOf(".") != -1) { + Pattern pattern = Pattern.compile(regex); + l = remark.substring(remark.indexOf("X") - 5, remark.indexOf("X")); + Matcher matcher = pattern.matcher(l); + while (matcher.find()) { + l = matcher.group(); + } + } else { + l = l.replaceAll("[^(0-9)]", ""); + } + size = l + "X" + w; + String[] split = size.split("X"); + length = Double.valueOf(split[0]) * 10; + if ("按比例".equals(split[1])) { + width = Double.valueOf(split[0]) * 10; + } else { + width = Double.valueOf(split[1]) * 10; + } + size = length + "+" + width; + } else { + // 印艺,没有毫米 + if (remark.contains(".pdf")) { + String newRemarkYY = remark.substring(remark.indexOf("-切") + 2); + System.out.println(newRemarkYY); + size = newRemarkYY.substring(0, newRemarkYY.indexOf("-")); + } else { + // 有毫米 + String l = remark.substring(remark.indexOf("X") - 3, remark.indexOf("X")); + String w = remark.substring(remark.indexOf("X") + 1, remark.indexOf("mm")); + // 如果l里有小数点,往前数5位 + if (l.indexOf(".") != -1) { + l = remark.substring(remark.indexOf("X") - 5, remark.indexOf("X")); + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(l); + while (matcher.find()) { + l = matcher.group(); + } + } else { + l = l.replaceAll("[^(0-9)]", ""); + } + size = l + "X" + w; + } + String[] split = size.split("X"); + length = Double.valueOf(split[0]); + if ("按比例".equals(split[1])) { + width = Double.valueOf(split[0]); + } else { + width = Double.valueOf(split[1]); + } + size = length + "+" + width; + } + return size; + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, FinanceExtract financeExtract) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financeExtractsList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + financeExtract.setCreator(user.getRealname()); + financeExtractsList = getFinanceExtract(financeExtract); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("订单号"); + titleRow.createCell(1).setCellValue("文件名"); + titleRow.createCell(2).setCellValue("长"); + titleRow.createCell(3).setCellValue("宽"); + titleRow.createCell(4).setCellValue("高"); + titleRow.createCell(5).setCellValue("数量"); + titleRow.createCell(6).setCellValue("导入人"); + titleRow.createCell(7).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (FinanceExtract financeExtracts : financeExtractsList) { + filename = financeExtract.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(financeExtracts.getOrderNumber()); + dataRow.createCell(1).setCellValue(financeExtracts.getRemark()); + dataRow.createCell(2).setCellValue(financeExtracts.getLength()); + dataRow.createCell(3).setCellValue(financeExtracts.getWidth()); + dataRow.createCell(4).setCellValue(financeExtracts.getHeight()); + dataRow.createCell(5).setCellValue(financeExtracts.getCount()); + dataRow.createCell(6).setCellValue(financeExtracts.getCreator()); + dataRow.createCell(7).setCellValue(formatter.format(financeExtracts.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/FinanceService.java b/src/main/java/lingtao/net/service/FinanceService.java new file mode 100644 index 0000000..a222eec --- /dev/null +++ b/src/main/java/lingtao/net/service/FinanceService.java @@ -0,0 +1,401 @@ +package lingtao.net.service; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Finance; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.FinanceMapper; +import lingtao.net.util.ExcelUtils; + +@Service +public class FinanceService { + + @Autowired + private FinanceMapper financeMapper; + + public List getFinance(Finance finance) { + return financeMapper.getFinance(finance); + } + + public List getAllFilename(String creator) { + return financeMapper.getAllFilename(creator); + } + + public Msg deleteDataByFilename(String filename, String realname) { + try { + financeMapper.deleteDataByFilename(filename, realname); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (file.isEmpty()) { + throw new Exception("文件不存在!"); + } + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + InputStream in = null; + List> listob = null; + List list = new ArrayList(1000); + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + Finance vo = new Finance(); + List lo = listob.get(i); + if (lo.size() == 0 || lo.size() == 1 || lo.get(6) == "") { + System.out.println("++++++++++++++"); + continue; + } + String addTime = String.valueOf(lo.get(0)).trim(); + String supplier = String.valueOf(lo.get(1)).trim(); + String shopname = String.valueOf(lo.get(2)).trim(); + String kind = String.valueOf(lo.get(3)).trim(); + String kind2 = String.valueOf(lo.get(4)).trim(); + String orderNumber = String.valueOf(lo.get(5)).trim(); + String remark = String.valueOf(lo.get(6)).trim(); + remark = remark.replace("MM", "mm").replace("CM", "mm"); + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") == -1) { + System.out.println(remark); + System.out.println("================="); + } + // 判断数据是否已经存在 + + /* + * String checkAccountNumber = financeMapper.checkAccountNumber(orderNumber); if + * (StringUtils.isNotEmpty(checkAccountNumber)) { continue; } + */ + + // 数量 + String count = "#"; + // 拼版数 + String number = "#"; + // 所需张数 + double zhang = 0; + try { + // 处理备注 + String cutSizeStr = remark; + String cutCountStr = remark; + number = cutSize(cutSizeStr); + count = cutCount(cutCountStr); + if (count != "#" && number != "#") { + if (count.contains("*")) { + String[] countSplit = count.split("\\*"); + System.out.println(Double.valueOf(countSplit[0])); + System.out.println(Double.valueOf(countSplit[1])); + zhang = Math.ceil(Double.valueOf(countSplit[0]) * Double.valueOf(countSplit[1]) + / Double.valueOf(number)); + } else { + zhang = Math.ceil(Double.valueOf(count) / Double.valueOf(number)); + } + } + orderNumber = remark.substring(remark.indexOf("(") + 1, remark.indexOf(")")); + } catch (Exception e) { + System.out.println(remark); +// return Msg.fail(remark); + } + if (StringUtils.isNotEmpty(addTime)) { + Date javaDate = HSSFDateUtil.getJavaDate(Double.parseDouble(addTime)); + vo.setAddTime(javaDate); + } +// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); +// Date add_date = formatter.parse(addTime);// 把字符串转为日期格式 + vo.setSupplier(supplier); + vo.setShopname(shopname); + vo.setKind(kind); + vo.setKind2(kind2); + vo.setOrderNumber(orderNumber); + vo.setFilename(filename); + vo.setCount(count); + vo.setNumber(number); + vo.setZhang(String.valueOf(zhang)); + vo.setRemark(remark); + vo.setCreator(user.getRealname()); + list.add(vo); + // financeMapper.insertSelective(vo); + } + } + if (list.size() == 0) { + return Msg.fail("上传失败,请检查文件表头是否正确"); + } else if (list.size() > 0) { + financeMapper.insertForeach(list); + } + in.close(); + return Msg.success(); + + } + + private String cutCount(String remark) { + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")"); + String countStr = ""; + String numberStr = ""; + Integer number; + Integer count; + int indexM = remark.indexOf("m"); + int indexZhang = remark.indexOf("张"); + int indexGe = remark.indexOf("个"); + int indexTao = remark.indexOf("套"); + int indexMei = remark.indexOf("枚"); + if (remark.indexOf("张") != -1 && indexZhang - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("张")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("张")); + } + } else if (remark.indexOf("个") != -1 && indexGe - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("个")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("个")); + } + } else if (remark.indexOf("套") != -1 && indexTao - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("套")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("套")); + } + } else if (remark.indexOf("枚") != -1 && indexMei - indexM < 15) { + if (remark.indexOf("m-") == -1) { + countStr = remark.substring(remark.indexOf("m") + 1, remark.indexOf("枚")); + } else { + countStr = remark.substring(remark.indexOf("m-") + 2, remark.indexOf("枚")); + } + } + // 第一个“款”的位置 + int firstK = countStr.indexOf("款"); + // 第一个“各”的位置 + int firstGe = countStr.indexOf("各"); + // 第二个“款”的位置 + int countStrSecondK = countStr.indexOf("款", firstK + 1); + // 第3个“款”的位置 + int countStrThirdK = countStr.indexOf("款", countStrSecondK + 1); + if (countStrSecondK > 0 && countStrThirdK > 0) { + return "#"; + } + // “共***张” + if (countStr.contains("共")) { + String[] split = countStr.split("共"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “合计***张” + if (countStr.contains("合计")) { + String[] split = countStr.split("合计"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “总的***张” + if (countStr.contains("总")) { + String[] split = countStr.split("总"); + countStr = split[1].replaceAll("[^(0-9)]", ""); + return "" + countStr; + } + // “***款各***张” + if (firstGe > 0) { + String[] split = countStr.split("各"); + numberStr = split[0]; + countStr = split[1]; + numberStr = numberStr.replaceAll("[^(0-9)]", ""); + countStr = countStr.replaceAll("[^(0-9)]", ""); + if (StringUtils.isEmpty(numberStr)) { + return "#"; + } + number = Integer.valueOf(numberStr); + count = Integer.valueOf(countStr); + if (number == 1 || count == 1) { + return "" + number * count; + } + return number + "*" + count; + } + // **款**张 + if (firstK > 0) { + String[] split = countStr.split("款"); + numberStr = split[0]; + countStr = split[1]; + if (countStrSecondK > 0) { + countStr = split[2]; + } + numberStr = numberStr.replaceAll("[^(0-9)]", ""); + countStr = countStr.replaceAll("[^(0-9)]", ""); + if (StringUtils.isEmpty(numberStr)) { + return "#"; + } + number = Integer.valueOf(numberStr); + count = Integer.valueOf(countStr); + if (number == 1 || count == 1) { + return "" + number * count; + } + return number + "*" + count; + } + countStr = countStr.replaceAll("[^(0-9)]", ""); + return countStr; + } + + private String cutSize(String remark) { + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")") + .replace("专版打印", "").replace("下", "").replace("上", "").replace("专版", "").replace("-", "") + .replace("多拍返10元", ""); + // 第一个X的位置 + int firstX = remark.indexOf("X"); + // 第二个X的位置 + int secondX = remark.indexOf("X", firstX + 1); + int secondmm = remark.indexOf("mm", remark.indexOf("mm") + 1); + if (secondX > 0 && secondmm > 0) { + return "#"; + } + // System.out.println(remark); + String size = ""; + double length; + double width; + // 提取整数/小数的正则 + String regex = "([1-9]\\d*\\.?\\d+)|(0\\.\\d*[1-9])|(\\d+)"; + if (remark.indexOf("mm") == -1 && remark.indexOf("cm") != -1) { + String l = remark.substring(remark.indexOf("X") - 3, remark.indexOf("X")); + String w = remark.substring(remark.indexOf("X") + 1, remark.indexOf("cm")); + // 如果l里有小数点,往前数5位 + if (l.indexOf(".") != -1) { + Pattern pattern = Pattern.compile(regex); + l = remark.substring(remark.indexOf("X") - 5, remark.indexOf("X")); + Matcher matcher = pattern.matcher(l); + while (matcher.find()) { + l = matcher.group(); + } + } else { + l = l.replaceAll("[^(0-9)]", ""); + } + size = l + "X" + w; + String[] split = size.split("X"); + length = Double.valueOf(split[0]) * 10 + 4; + if ("按比例".equals(split[1])) { + width = Double.valueOf(split[0]) * 10 + 4; + } else { + width = Double.valueOf(split[1]) * 10 + 4; + } + } else { + String l = remark.substring(remark.indexOf("X") - 3, remark.indexOf("X")); + String w = remark.substring(remark.indexOf("X") + 1, remark.indexOf("mm")); + // 如果l里有小数点,往前数5位 + if (l.indexOf(".") != -1) { + if (l.indexOf(".") != -1) { + l = remark.substring(remark.indexOf("X") - 5, remark.indexOf("X")); + Pattern pattern = Pattern.compile(regex); + Matcher matcher = pattern.matcher(l); + while (matcher.find()) { + l = matcher.group(); + } + } + } else { + l = l.replaceAll("[^(0-9)]", ""); + } + size = l + "X" + w; + String[] split = size.split("X"); + length = Double.valueOf(split[0]) + 4; + if ("按比例".equals(split[1])) { + width = Double.valueOf(split[0]) + 4; + } else { + width = Double.valueOf(split[1]) + 4; + } + } + + double l = 420; + double w = 280; + if (length == l + 4) { + return "1"; + } + if ((length > l || width > w) && (length > w || width > l)) + return "#"; + // 一张纸 420*290 能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + return String.valueOf(max); + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, Finance finance) throws Exception { + response.setCharacterEncoding("UTF-8"); + List financesList = new ArrayList(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + finance.setCreator(user.getRealname()); + financesList = getFinance(finance); + + // 创建excel文件 + HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 + HSSFSheet sheet = wb.createSheet("总表"); + String filename = ""; + // 创建标题行 + HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("日期"); + titleRow.createCell(1).setCellValue("供应商"); + titleRow.createCell(2).setCellValue("店铺"); + titleRow.createCell(3).setCellValue("大类别"); + titleRow.createCell(4).setCellValue("小类别"); + titleRow.createCell(5).setCellValue("订单号"); + titleRow.createCell(6).setCellValue("文件名"); + titleRow.createCell(7).setCellValue("数量"); + titleRow.createCell(8).setCellValue("拼版数"); + titleRow.createCell(9).setCellValue("张数"); + titleRow.createCell(10).setCellValue("导入人"); + titleRow.createCell(11).setCellValue("导入日期"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); + for (Finance finances : financesList) { + filename = finance.getFilename(); + HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(""); + if (finances.getAddTime() != null) { + dataRow.createCell(0).setCellValue(formatter.format(finances.getAddTime())); + } + dataRow.createCell(1).setCellValue(finances.getSupplier()); + dataRow.createCell(2).setCellValue(finances.getShopname()); + dataRow.createCell(3).setCellValue(finances.getKind()); + dataRow.createCell(4).setCellValue(finances.getKind2()); + dataRow.createCell(5).setCellValue(finances.getOrderNumber()); + dataRow.createCell(6).setCellValue(finances.getRemark()); + dataRow.createCell(7).setCellValue(finances.getCount()); + dataRow.createCell(8).setCellValue(finances.getNumber()); + dataRow.createCell(9).setCellValue(finances.getZhang()); + dataRow.createCell(10).setCellValue(finances.getCreator()); + dataRow.createCell(11).setCellValue(formatter.format(finances.getCreateDate())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1"));// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } + +} diff --git a/src/main/java/lingtao/net/service/InformationService.java b/src/main/java/lingtao/net/service/InformationService.java new file mode 100644 index 0000000..a96c9b3 --- /dev/null +++ b/src/main/java/lingtao/net/service/InformationService.java @@ -0,0 +1,62 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Information; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.InformationMapper; + +@Service +public class InformationService { + + @Autowired + private InformationMapper informationMapper; + + public List getInformations(Information information) { + return informationMapper.getInformations(information); + } + + public Msg addInformation(Information information, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + information.setCreateBy(user.getRealname()); + try { + informationMapper.addInformation(information); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg updateInformationById(Information information, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + information.setUpdateBy(user.getRealname()); + try { + informationMapper.updateInformationById(information); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + + } + + public Msg deleteInformationById(Integer id) { + try { + informationMapper.deleteInformationById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + + } + + public List getShortAnswers() { + return informationMapper.getShortAnswers(); + } + +} diff --git a/src/main/java/lingtao/net/service/InitComponent.java b/src/main/java/lingtao/net/service/InitComponent.java new file mode 100644 index 0000000..bc9a0e7 --- /dev/null +++ b/src/main/java/lingtao/net/service/InitComponent.java @@ -0,0 +1,5 @@ +package lingtao.net.service; + +public class InitComponent { + +} diff --git a/src/main/java/lingtao/net/service/LoginIpService.java b/src/main/java/lingtao/net/service/LoginIpService.java new file mode 100644 index 0000000..3d5681c --- /dev/null +++ b/src/main/java/lingtao/net/service/LoginIpService.java @@ -0,0 +1,62 @@ +package lingtao.net.service; + +import java.util.List; + +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.LoginIp; +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.LoginIpMapper; + +@Service +public class LoginIpService { + + @Autowired + private LoginIpMapper loginIpMapper; + + // 列表 + public List getLoginIpList(LoginIp loginIp) { + return loginIpMapper.getLoginIpList(loginIp); + } + + // 新增 + public void addIp(LoginIp loginIp) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + loginIp.setCreateBy(user.getRealname()); + loginIpMapper.addIp(loginIp); + } + + // 修改 + public void updateIp(LoginIp loginIp) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + loginIp.setUpdateBy(user.getRealname()); + loginIpMapper.updateIp(loginIp); + } + + // 删除 + public int deleteIpById(Integer id) { + return loginIpMapper.deleteIpById(id); + } + + // 批量删除 + public Msg deleteBatch(int[] ints) { + try { + loginIpMapper.deleteBatch(ints); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg checkIP(String agreeIp) { + LoginIp loginIp = loginIpMapper.checkIP(agreeIp); + if (loginIp != null) { + return Msg.fail(); + } + return Msg.success(); + } + +} diff --git a/src/main/java/lingtao/net/service/LoginLogService.java b/src/main/java/lingtao/net/service/LoginLogService.java new file mode 100644 index 0000000..58b435a --- /dev/null +++ b/src/main/java/lingtao/net/service/LoginLogService.java @@ -0,0 +1,20 @@ +package lingtao.net.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.LoginLog; +import lingtao.net.dao.LoginLogMapper; + +@Service +public class LoginLogService { + + @Autowired + private LoginLogMapper loginLogMapper; + + public List getLoginLogList(LoginLog loginLog) { + return loginLogMapper.getLoginLogList(loginLog); + } +} diff --git a/src/main/java/lingtao/net/service/MyFileService.java b/src/main/java/lingtao/net/service/MyFileService.java new file mode 100644 index 0000000..8761773 --- /dev/null +++ b/src/main/java/lingtao/net/service/MyFileService.java @@ -0,0 +1,93 @@ +package lingtao.net.service; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.MyFile; +import lingtao.net.bean.MyFileExample; +import lingtao.net.bean.MyFileExample.Criteria; +import lingtao.net.dao.MyFileMapper; + +@Service +public class MyFileService { + + @Autowired + MyFileMapper fileMapper; + + // 文件上传 + public Msg fileUpload(MultipartFile file, HttpServletRequest request) { + try { + // 获取存放路径 + String path = request.getSession().getServletContext().getRealPath("/deptFile"); + // 判断路径是否存在 + File upfile = new File(path); + if (!upfile.exists()) { + upfile.mkdirs(); + } + // 获得文件名 + String filename = file.getOriginalFilename(); + upfile = new File(path + "/" + filename); + MyFile myFile = new MyFile(); + // 将文件移动到指定路径中 + file.transferTo(upfile); + myFile.setFileName(filename); + myFile.setFilePath(path); + myFile.setCreateBy("admin"); + fileMapper.insertSelective(myFile); + return Msg.success(); + } catch (IOException e) { + return Msg.fail(); + } + } + + // 获取所有的文件信息 + public List getFileList(MyFile myFile, HttpSession session) { + return fileMapper.getFileList(myFile); + } + + // 根据ID删除文件 + public Msg deleteFile(Integer fileId) { + try { + fileMapper.deleteByPrimaryKey(fileId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail("删除失败"); + } + } + + // 批量删除文件 + public Msg deleteBatch(List del_ids) { + MyFileExample example = new MyFileExample(); + Criteria criteria = example.createCriteria(); + criteria.andFileIdIn(del_ids); + try { + fileMapper.deleteByExample(example); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 同时删除服务器中的文件 + public boolean deleteFile(String delFileName) { + boolean flag = false; + File file = new File(delFileName); + // 判断目录或文件是否存在 + if (!file.exists()) { // 不存在返回 false + return flag; + } else { + flag = true; + file.delete(); + } + return flag; + } +} diff --git a/src/main/java/lingtao/net/service/ProductImgService.java b/src/main/java/lingtao/net/service/ProductImgService.java new file mode 100644 index 0000000..4967189 --- /dev/null +++ b/src/main/java/lingtao/net/service/ProductImgService.java @@ -0,0 +1,53 @@ +package lingtao.net.service; + +import lingtao.net.bean.ProductImg; +import lingtao.net.bean.SysDictProduct; +import lingtao.net.dao.ProductImgMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ProductImgService { + + @Autowired + private ProductImgMapper productImgMapper; + + public List getProKindList(ProductImg productImg) { + return productImgMapper.getProKindList(productImg); + } + + public SysDictProduct getLabel(ProductImg productImg) { + return productImgMapper.getLabel(productImg); + } + + public int addImgUrl(ProductImg productImg) { + return productImgMapper.addImgUrl(productImg); + } + + public int updateImgUploadRemark(ProductImg productImg) { + return productImgMapper.updateImgUploadRemark(productImg); + } + + public List findAllPro() { + return productImgMapper.findAllPro(); + } + + public List getKindsByPro(String proTypeValue) { + return productImgMapper.getKindsByPro(proTypeValue); + } + + public List getKind2sByKind(String proTypeValue, String kindValue) { + return productImgMapper.getKind2sByKind(proTypeValue, kindValue); + } + + public List getImgsByProKind(String proTypeValue, String kindValue, String kind2Value, String craftValue) { + return productImgMapper.getImgsByProKind(proTypeValue, kindValue, kind2Value, craftValue); + } + + public List getVideos() { + return productImgMapper.getVideos(); + } + +} diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java new file mode 100644 index 0000000..00e455c --- /dev/null +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -0,0 +1,5056 @@ +package lingtao.net.service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.Product; +import lingtao.net.bean.SysDictSearchPro; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.ProductMapper; +import lingtao.net.dao.QuoteLogMapper; +import lingtao.net.util.*; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.text.DecimalFormat; +import java.util.*; +import java.util.regex.Pattern; + +@Service +public class ProductService { + + @Autowired + ProductMapper productMapper; + + @Autowired + QuoteLogMapper quoteLogMapper; + + // 保留俩位小数 + DecimalFormat df = new DecimalFormat("0.00"); + + public List findAllPro() { + return productMapper.findAllPro(); + } + + // 价格列表 + public List getProductList(Product product) { + return productMapper.getProductList(product); + } + + public Msg updatePriceById(int proId, String field, String value) { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String role = user.getRole(); + boolean flag = false; + if (role.contains(",")) { + String[] split = role.split(","); + for (int i = 0; i < split.length; i++) { + // [管理员/产品经理]身份才允许修改价格 + if ("2".equals(split[i]) || "3".equals(split[i])) { + flag = true; + break; + } + } + } else { + if ("2".equals(role) || "3".equals(role)) { + flag = true; + } + } + if (!flag) { + return Msg.fail(); + } + + Product product = new Product(); + + if (!StringUtils.isEmpty(value)) { + product.setProId(proId); + product.setUpdater(user.getRealname()); + if ("count".equals(field)) { + product.setCount(Integer.valueOf(value)); + } else if ("price".equals(field)) { + product.setPrice(Double.valueOf(value)); + } else if ("priceMultiple".equals(field)) { + product.setPriceMultiple(Double.valueOf(value)); + } else if ("weight".equals(field)) { + product.setWeight(value); + } + try { + productMapper.updatePriceById(product); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + return Msg.fail(); + } + + // 根据产品种类获取材质 + public List getKindsByPro(String proTypeValue) { + return productMapper.getKindsByPro(proTypeValue); + } + + // 搜索产品 + public List searchPro(String likeProTypeLabel) { + return productMapper.searchPro(likeProTypeLabel); + } + + // 获取名片位数 + public static int getNum(double length, double width) { + double l1 = Math.ceil(length / 9); + double w1 = Math.ceil(width / 5.4); + double l2 = Math.ceil(width / 9); + double w2 = Math.ceil(length / 5.4); + int min = (int) Math.min(l1 * w1, l2 * w2); + + return min; + } + + private static double getNumber(double divisor, double dividend) { + double number = divisor / dividend; + double integer = Math.floor(divisor / dividend); + double decimals = number - integer; + if (decimals > 0.1) { + return integer + 1; + } + return integer; + } + + public static int getNumAdd(double length, double width) { + double l1 = getNumber(length, 9); + + double w1 = getNumber(width, 5.4); + double l2 = getNumber(width, 9); + double w2 = getNumber(length, 5.4); + int min = (int) Math.min(Math.ceil(l1) * Math.ceil(w1), Math.ceil(l2) * Math.ceil(w2)); + + return min; + } + + public List getHekaPrice(int min, Product dto, List priceList, int count) { + if (min < 5) { + dto.setKindValue(String.valueOf(min)); + if (count <= 10000) { + priceList = productMapper.getThanPrice(dto); + } else { + priceList = productMapper.thanThousandPrice(dto); + } + // 腰封/吊旗标识,比优惠券贵10元 + if (!StringUtils.isEmpty(dto.getD())) { + for (Product product : priceList) { + product.setPrice(product.getPrice() + 10); + } + } + } else { + if (min > 5 && min < 10) { + dto.setKindValue("6"); + } else if (min > 10 && min <= 20) { + dto.setKindValue("11"); + } else if (min > 20 && min <= 30) { + dto.setKindValue("21"); + } else if (min > 30 && min <= 40) { + dto.setKindValue("31"); + } else if (min > 40 && min <= 50) { + dto.setKindValue("41"); + } else if (min > 50) { + dto.setKindValue("51"); + } else { + // 5、10位 + dto.setKindValue(String.valueOf(min)); + } + // 设置位数 + dto.setNum(min); + // 腰封/吊旗标识,比优惠券贵10元/位 + if (!StringUtils.isEmpty(dto.getD())) { + if (min <= 20) { + dto.setP(30); + } else { + dto.setP(25); + } + if (count <= 10000) + priceList = productMapper.hangingFlagsThanPrice(dto); + else + priceList = productMapper.hangingFlagsThousandThanPrice(dto); + } else { + /* + * if (min >= 6 && min <= 9) { dto.setP(30); priceList = productMapper.couponThanPrices(dto); }else + */ + if (count <= 10000) { + priceList = productMapper.couponThanPrice(dto); + } else { + priceList = productMapper.couponThousandThanPrice(dto); + } + + } + } + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 名片优惠券报价 2个位以上的每个位各涨5元 + if (min > 1) { + for (Product product : priceList) { + product.setPrice(product.getPrice() + min * 5); + } + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + + return priceList; + } + + private void f_getEathPrice(List priceList, double len, double wid, String toothpick_size) { + for (Product product : priceList) { + int numbers = product.getCount(); + if ((wid <= 5.4 && len <= 5.4) && ((len >= 5 && len < 4.5) || (wid >= 5 && wid < 4.5))) { + if (numbers == 500 || numbers == 1000) { + product.setPrice(product.getPrice() + 10); + } else if (numbers >= 2000) { + product.setPrice(product.getPrice() + 20); + } + } /* + * else if(length == 5 && width == 5) { if(numbers >= 2000 && numbers < 10000) { product.setPrice(product.getPrice() + 15); }else if(numbers >= 10000) { product.setPrice(product.getPrice() + 40); } } + */ else if ((len > 9 || wid > 5.4) && (len > 5.4 || wid > 9)) { + if (numbers == 500) { + product.setPrice(product.getPrice() + 5); + } else if (numbers == 1000) { + product.setPrice(product.getPrice() + 10); + } else if (numbers >= 2000) { + product.setPrice(product.getPrice() + 20); + } + } + } + } + + @SuppressWarnings({"static-access"}) + public List getThanPrice(Product dto, String role) { + String proType = dto.getProTypeValue(); + String kind = dto.getKindValue(); + String kind2 = dto.getKind2Value(); + String kind3 = dto.getKind3Value(); + + // 款数 + Integer number = dto.getNumber(); + String size = dto.getSize(); + Double width = null; + Double length = null; + Double height = null; + Double area = null; + String oldKind = ""; + /* + * if(proType.equals("帆布")){ String sizeList[] = size.split(","); size = sizeList[1]; }else + */ + if (proType.equals("17")) { + if (!StringUtils.isEmpty(size)) { + String sizeList[] = size.split(","); + size = sizeList[0]; + } + } else if (proType.equals("手拉旗")) { + size += "*" + dto.getWidth(); + } + int count = dto.getCount(); + count = Math.abs(count); + if (!StringUtils.isEmpty(size)) { + // 海报下的刻字,只有一个尺寸 + if ("17".equals(proType)) { + if ("5".equals(kind)) { + size = size + "*0"; + } else if ("6".equals(kind)) { + size = size + "*" + dto.getWidth(); + dto.setSize(size); + } + } + length = Double.valueOf(size.substring(0, size.indexOf("*"))); + String other_size = size; + if (size.contains(",")) { + size = size.split(",")[0]; + } + if (size.indexOf(("*"), size.indexOf("*") + 1) == -1) { + width = Double.valueOf(size.substring(size.indexOf("*") + 1)); + } else { + width = Double.valueOf(size.substring(size.indexOf("*") + 1, size.indexOf(("*"), size.indexOf("*") + 1))); + height = Double.valueOf(size.substring(size.indexOf(("*"), size.indexOf("*") + 1) + 1)); + height = Math.abs(height); + } + length = Math.abs(length); + width = Math.abs(width); + size = other_size; + } + + // 返回的价格集合 + List priceList = new ArrayList(); + switch (proType) { + // 不干胶/特殊不干胶 + case "0": + // 书写纸不干胶和牛皮纸价格一致 + if ("7".equals(kind)) { + dto.setKindValue("3"); + kind = "3"; + } + // 铜版纸不干胶 + /* + * if ("0".equals(kind)) { if ("覆哑膜".equals(dto.getCraftMo()) && new AStickersPrice().f_getRole(dto.getRole()) != 1) { // 哑膜铜版纸不干胶 dto.setKindValue("0"); kind = "4"; } } else if ("1".equals(kind) || "2".equals(kind)) { // PVC/透明哑膜不干胶 if ("覆哑膜".equals(dto.getCraftMo())) { dto.setKindValue("PVC覆哑膜"); kind = "1"; } }else + */ + if ("PP合成纸".equals(kind)) { + // PP合成纸的价格是牛皮纸价格*0.8 + oldKind = "PP合成纸"; + dto.setKindValue("3"); + kind = "3"; + } else if ("封口贴铜版纸不干胶".equals(kind)) { + priceList = new PriceUtils().getFktPrice(number, priceList); + return priceList; + } else if ("双面印刷不干胶".equals(dto.getStickerKind())) { + priceList = StickersDoublePrice.getPrice(length, width, count, number); + return priceList; + } else if ("插旗".equals(dto.getStickerKind())) { + dto.setKindValue("0"); + dto.setLength(length); + dto.setWidth(width); + area = length * width / 10000; + if (length > 20 && length < 21) { + length = Math.ceil(length); + area = length * width / 10000; + } + if (width > 20 && width < 21) { + width = Math.ceil(width); + area = length * width / 10000; + } + priceList = normalSticker(dto, "0", number, area, width, length, count, oldKind, priceList); + + if (priceList.size() >= 3) { + priceList = priceList.subList(0, 3); + } +// return priceList; + + } else if ("8".equals(kind) || "10".equals(kind) || "11".equals(kind) || "12".equals(kind)) { + priceList = new PriceUtils().getMeiWenZhiPrice(length, width, count, number, dto.getCraftQie()); + if (number > 1) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * number)); + } + } + return priceList; + } else if ("13".equals(kind)) { + oldKind = "13"; + dto.setKindValue("2"); + kind = "2"; + } else if ("15".equals(kind) || "16".equals(kind)) { + priceList = new SwzStickersPrice().getPrice(count, length, width, number, dto.getCraftTang()); + if (number > 1) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * number)); + } + } + return priceList; + } + // 查询出来的价格集合 + List stickersList = new ArrayList(); + + // 单个产品的面积 + area = length * width / 10000; + + // 选择少数量/打印不干胶按钮 + if ("少数量".contentEquals(dto.getStickerKind()) || "专版打印".contentEquals(dto.getStickerKind())) { + stickersList = lessSticker(dto, kind, number, width, length, count, stickersList); + + if (stickersList.get(0) == null) { + return null; + } + } else { + if (length > 20 && length < 21) { + length = Math.ceil(length); + area = length * width / 10000; + } + if (width > 20 && width < 21) { + width = Math.ceil(width); + area = length * width / 10000; + } + stickersList = normalSticker(dto, kind, number, area, width, length, count, oldKind, stickersList); + if (stickersList == null) { + return stickersList; + } + } + // 把查出来的集合添加到priceList中 + for (int i = 0; i < stickersList.size(); i++) { + priceList.add(stickersList.get(i)); + } + // 计算重量 + for (Product product : priceList) { + // PVC跟静电膜的×0.3,牛皮纸不干胶 *0.22,其他0.24 + if ("1".equals(kind) || "静电贴".equals(kind)) { + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3)); + } else { + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.24)); + } + } + + if ("覆哑膜".equals(dto.getCraftMo())) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + } + } + + if (priceList.size() >= 3) { + priceList = priceList.subList(0, 3); + } + + if ("1".equals(kind) && dto.getCraftMo().equals("覆哑膜")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + } + } + + if ("13".equals(oldKind)) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + } + } + if ("0".equals(kind) || "插旗".equals(dto.getStickerKind())) { + f_getEathPrice(priceList, length, width, dto.getToothpick_size()); + if ("插旗".equals(dto.getStickerKind())) { + for (Product product : priceList) { + double basePrice = 0; + if ("粘牙签".equals(dto.getCraftShua())) { + if (product.getCount() <= 500) { + basePrice = 0.108; + } else if (product.getCount() <= 1000) { + basePrice = 0.127; + } else if (product.getCount() <= 2000) { + basePrice = 0.118; + } else if (product.getCount() <= 3000) { + basePrice = 0.114; + } else if (product.getCount() <= 5000) { + basePrice = 0.106; + } else { + basePrice = 0.086; + } + } + if ("配牙签".equals(dto.getCraftShua())) { + if (product.getCount() <= 500) { + basePrice = 0.032; + } else if (product.getCount() <= 1000) { + basePrice = 0.023; + } else if (product.getCount() <= 2000) { + basePrice = 0.0185; + } else if (product.getCount() <= 3000) { + basePrice = 0.014; + } else if (product.getCount() <= 5000) { + basePrice = 0.01; + } else { + basePrice = 0.0068; + } + } + if ("10".equals(dto.getToothpick_size())) { + basePrice = basePrice + 0.01; + } + if ("12".equals(dto.getToothpick_size())) { + basePrice = basePrice + 0.02; + } + + product.setPrice(product.getPrice() + Math.ceil(product.getCount() * basePrice)); + if ("配牙签".equals(dto.getCraftShua()) && "6.5".equals(dto.getToothpick_size()) && ((width == 9 && length == 2.5) || length == 9 && width == 2.5)) { + if (product.getCount() == 500) { + double other_price = 60; + product.setPrice(other_price); + } + if (product.getCount() == 1000) { + double other_price = 80; + product.setPrice(other_price); + } + } + } + } + + if (!StringUtils.isEmpty(dto.getCraft())) { + String craftList[] = dto.getCraft(); + + if ("配刮刮膜".equals(craftList[0])) { + for (Product product : priceList) { + double gPrice = product.getCount() * 0.04 > 20 ? product.getCount() * 0.04 : 20; + product.setPrice(Math.ceil(product.getPrice() + gPrice)); + } + } else if ("粘刮刮膜".equals(craftList[0])) { + for (Product product : priceList) { + double gPrice = product.getCount() * 0.1 > 40 ? product.getCount() * 0.1 : 40; + product.setPrice(Math.ceil(product.getPrice() + gPrice)); + } + } + } + } + if ("插旗".equals(dto.getStickerKind())) { + if (number > 1 && "0".equals(dto.getKindValue())) { + for (Product product : priceList) { + product.setPrice(product.getPrice() * number); + } + } + } + if ("0".equals(dto.getKindValue()) && !"专版打印".contentEquals(dto.getStickerKind())) { + if (number > 1) { + for (Product product : stickersList) { + product.setPrice(product.getPrice() * number); + } + } + } + return priceList; + case "1": + dto.setWidth(width); + dto.setLength(length); + priceList = productMapper.getThanPrice(dto); + return priceList; + // 卷装标签 + case "2": + // 单个产品的面积 + area = (length + 0.3) * (width + 0.3) / 10000; + priceList = new PriceUtils().rollLabelPrice(kind, area, count, dto.getCraft(), dto.getYinbai()); + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25)); + } + return priceList; + // 插卡 + case "3": + // 菱形单面直角插牌 + if ("1".equals(dto.getKindValue())) { + priceList = new PriceUtils().getInsertCard(size, count); + } else { + if ("9".equals(dto.getKindValue()) || "10".equals(dto.getKindValue())) { + dto.setKindValue("4"); + } else if ("11".equals(dto.getKindValue())) { + dto.setKindValue("8"); + } + priceList = productMapper.getThanPrice(dto); + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + } + + if (!StringUtils.isEmpty(dto.getSize1())) { + String size1 = dto.getSize1(); + Double length1 = null; + Double width1 = null; + + List priceList2 = new ArrayList(); + length1 = Double.valueOf(size1.substring(0, size1.indexOf("*"))); + if (size1.indexOf(("*"), size1.indexOf("*") + 1) == -1) { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1)); + } else { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1, size1.indexOf(("*"), size1.indexOf("*") + 1))); + } + length1 = Math.abs(length1); + width1 = Math.abs(width1); + if (((length1 <= 9 && width1 <= 5.4) || (length1 <= 5.4 && width1 <= 9))) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 2)); + } + } else { + return null; + } + } + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * length * width * product.getCount() * 0.00003)); + } + return priceList; + // 优惠券 + case "4": + if ("11".equals(dto.getKind())) {// 圣诞卡 + priceList = new PriceUtils().getSdkPrice(count, number); + } else if ("9".equals(dto.getKind())) {// 售后卡 + priceList = new PriceUtils().getShkPrice(size, count, number); + } else if ("10".equals(dto.getKind())) {// 吸管套 + int min = getNum(length, width); + if (min > 1) { + String[] xgtCraft = {"模切"}; + dto.setCraft(xgtCraft); + priceList = getHekaPrice(min, dto, priceList, count); + getCraft(dto, priceList, length * 10, width * 10, min); + } else { + if ("6.5*5.4".equals(dto.getSize())) { + dto.setKindValue("0"); + dto.setKind1Value("0"); + dto.setProTypeValue("4"); + priceList = productMapper.getThanPrice(dto); + } else { + dto.setKindValue("0"); + dto.setProTypeValue("3"); + priceList = productMapper.getThanPrice(dto); + for (Product product : priceList) { + if (product.getCount() == 200) { + product.setPrice(60.0); + } + } + } + } + /* + * if (priceList.size() >= 4) { priceList = priceList.subList(0, 4); } + */ + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(0.3 * length * width * product.getCount() / 10000 * number)); + } + } else if ("13".equals(dto.getKind())) { + int min = getNum(length, width); + int tempNumber = dto.getNumber(); + List craftList = null; + if (!StringUtils.isEmpty(dto.getCraft())) { + craftList = Arrays.asList(dto.getCraft()); + } + if (craftList.contains("模切")) { + dto.setNumber(1); + } + priceList = new CouponPrice().getCouponPrice(min, dto, priceList, count); + getCraft(dto, priceList, length * 10, width * 10, min); + + if (craftList.contains("模切")) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * tempNumber)); + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86)); + } + } + } else { + int min = getNum(length, width); + priceList = getHekaPrice(min, dto, priceList, count); + getCraft(dto, priceList, length * 10, width * 10, min); + // 刮刮膜增加价格 + if (dto.getKind().equals("13")) { + if (dto.getSize1().equals("60*25")) { + for (Product product : priceList) { + product.setPrice(product.getPrice() + Math.ceil(0.08 * product.getCount() > 50 ? 0.08 * product.getCount() : 50)); + } + } else { + for (Product product : priceList) { + product.setPrice(product.getPrice() + Math.ceil(0.04 * product.getCount() > 40 ? 0.04 * product.getCount() : 40)); + } + } + } + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86)); + } + + /*优惠券、抽奖卡特殊处理*/ + if (("4".equals(dto.getKind()) || "5".equals(dto.getKind())) && !StringUtils.isEmpty(dto.getCraft()) && min == 2) { + List list = Arrays.asList(dto.getCraft()); + if (list.size() == 3 && list.contains("双面覆哑膜") && list.contains("压点线") && list.contains("打码")) { + for (Product product : priceList) { + if (product.getCount() == 200) { + product.setPrice(90.0 * number); + } else if (product.getCount() == 500) { + product.setPrice(120.0 * number); + } + } + } else if (list.size() == 2 && list.contains("压点线") && list.contains("打码")) { + for (Product product : priceList) { + if (product.getCount() == 200) { + product.setPrice(90.0 * number); + } else if (product.getCount() == 500) { + product.setPrice(120.0 * number); + } + } + } + } + } + + return priceList; + // 吊牌300/600/800克 + case "吊牌": + // 自定义尺寸 + // 单个产品的面积 + area = length * width / 10000; + + // 300克 + if ("3".equals(kind) || "40".equals(kind)) { + // 直角打孔价格 + if ("直角打孔".equals(dto.getCraftQie())) { + priceList = new PriceUtils().tags300PriceCraftZhi(dto, width, length, count, priceList); + } else {// 异形模切价格 + priceList = new PriceUtils().tags300PriceCraftMo(dto, number, width, length, area, count, priceList); + } + + if ("单面烫金".equals(dto.getCraftTang())) { + // 有2个尺寸带烫金 + if (!StringUtils.isEmpty(dto.getSize1())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 > 85 * 2 ? product.getPrice() * 0.09 * 2 : 85 * 2))); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 85 ? product.getPrice() * 0.09 : 85))); + } + } + } else if ("双面烫金".equals(dto.getCraftTang())) { + // 有2个尺寸带烫金 + if (!StringUtils.isEmpty(dto.getSize1())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 * 2 > 170 * 2 ? product.getPrice() * 0.09 * 2 * 2 : 170 * 2))); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 > 170 ? product.getPrice() * 0.09 * 2 : 170))); + } + } + } + } else if ("4".equals(kind)) {// 600克/800克 + if (length < 5.0 && width < 5.0) { + area = 5.0 * 5.0 / 10000; + } + priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count); + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + + return priceList; + // 服装吊牌 + case "服装吊牌": + // 自定义尺寸 + // 单个产品的面积 + area = length * width / 10000; + if ("常规".equals(dto.getStickerKind())) { + // 300克 + if ("3".equals(kind)) { + Product product1 = new Product(); + List craft = dto.getCraft() == null ? new ArrayList<>() : new ArrayList<>(Arrays.asList(dto.getCraft())); + craft.add("双面覆哑膜"); + if ("直角打孔".equals(dto.getCraftQie())) { + craft.add("打孔"); + } + if ("异形模切".equals(dto.getCraftQie())) { + craft.add("模切"); + } + if (!"".equals(dto.getCraftTang())) { + craft.add(dto.getCraftTang()); + } + product1.setCount(dto.getCount()); + product1.setWidthTang(dto.getWidthTang()); + product1.setLengthTang(dto.getLengthTang()); + product1.setWidth(dto.getWidth()); + product1.setNumber(dto.getNumber()); + product1.setLength(dto.getLength()); + product1.setCraft(craft.toArray(new String[craft.size()])); + product1.setProTypeValue("4"); + product1.setKindValue("3"); + product1.setKind("3"); + product1.setSize(dto.getSize()); + // 直角打孔价格 + int min = getNum(length, width); + priceList = getHekaPrice(min, product1, priceList, count); + getCraft(product1, priceList, length * 10, width * 10, min); + if ("凹凸".equals(dto.getAotu())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 153 ? product.getPrice() * 0.09 : 153))); + } + } + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + if (product.getCount() >= 10000 && min > 1) { + if (min == 2) { + product.setPrice(Math.floor(product.getPrice() * 0.9)); + } else { + product.setPrice(Math.floor(product.getPrice() * 0.8)); + } + + } + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86)); + } +// if ("直角打孔".equals(dto.getCraftQie())) { +// priceList = new PriceUtils().tags300PriceCraftZhi(dto, width, length, count, priceList); +// } else if ("异形模切".equals(dto.getCraftQie())) { +// priceList = new PriceUtils().tagClothes300PriceCraftMo(dto, number, width, length, area, count, priceList); +// } +// // +棉绳钱 1分5一条 +// if (!StringUtils.isEmpty(dto.getCraftSheng())) { +// for (Product product : priceList) { +// product.setPrice(product.getPrice() + product.getCount() * 0.015); +// } +// } +// if ("单面烫金".equals(dto.getCraftTang())) { +// // 有2个尺寸带烫金 +// if (!StringUtils.isEmpty(dto.getSize1())) { +// for (Product product : priceList) { +// product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 > 85 * 2 ? product.getPrice() * 0.09 * 2 : 85 * 2))); +// } +// } else { +// for (Product product : priceList) { +// product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 120 ? product.getPrice() * 0.09 : 120))); +// } +// } +// } else if ("双面烫金".equals(dto.getCraftTang())) { +// // 有2个尺寸带烫金 +// if (!StringUtils.isEmpty(dto.getSize1())) { +// for (Product product : priceList) { +// product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 * 2 > 170 * 2 ? product.getPrice() * 0.09 * 2 * 2 : 170 * 2))); +// } +// } else { +// for (Product product : priceList) { +// product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 > 170 ? product.getPrice() * 0.09 * 2 : 170)) * 1.1); +// } +// } +// } else + + } else {// 900克 + // 小于一个名片位的价格按照一个名片位报价 + /* + * if((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { area = 0.00486; } + */ + priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count); + + for (Product product : priceList) { + // 服装吊牌里面的600克吊牌把价格*1.3倍 + product.setPrice(Math.floor(product.getPrice() * 1.3)); + if ("4".equals(kind)) { + // 服装吊牌里面的900克吊牌把价格 + if (product.getCount() <= 2000) { + product.setPrice(Math.floor(product.getPrice() * 1.1)); + } + if (product.getCount() > 2000 && product.getCount() <= 5000) { + product.setPrice(Math.floor(product.getPrice() * 1.08)); + } + if (product.getCount() > 5000) { + product.setPrice(Math.floor(product.getPrice() * 1.06)); + } + } + } + // +棉绳钱 1分5一条 + if (!StringUtils.isEmpty(dto.getCraftSheng())) { + for (Product product : priceList) { + product.setPrice(product.getPrice() + product.getCount() * 0.015); + } + } + for (Product product : priceList) { + product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.6)); + } + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } else { + double l = 420 + 4; + double w = 285 + 4; + length = length * 10 + 4; + width = width * 10 + 4; + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + double designFee = 0; + if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { + designFee = 8; + } else if ((length - 4 <= 140 && width - 4 <= 100) || (length - 4 <= 100 && width - 4 <= 140)) { + designFee = 16; + } else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { + designFee = 25; + } else if ((length - 4 <= 285 && width - 4 - 4 <= 210) || (length - 4 <= 210 && width - 4 <= 285)) { + designFee = 35; + } else if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + designFee = 50; + } else { + designFee = 80; + } + Product products = dto; + products.setPrice(Math.floor(32 + (num - 5 > 0 ? num - 5 : 0) * 7 + designFee * number)); + priceList.add(products); + } + + // 产品重量 + double weight = 0; + if ("3".equals(kind)) { + weight = 0.3; + } else { + weight = 0.6; + } + for (Product product : priceList) { + product.setWeight(String.valueOf(weight * area * product.getCount() * number)); + } + return priceList; + // 特价名片 + case "特价名片": + // 选了【自定义尺寸】 + if (dto.isSwitchSize()) { + + } else { + dto.setKindValue("2"); + // 【覆膜/不覆膜】价格写死了 + // 不覆膜 + dto.setKind1Value("0"); + String[] craft = dto.getCraft(); + if (!StringUtils.isEmpty(craft)) { + for (int i = 0; i < craft.length; i++) { + if ("双面覆哑膜".equals(craft[i])) { + // 覆膜 + dto.setKind1Value("1"); + craft[i] = null; + break; + } + } + } + // 尺寸只有9*5.4cm以内的 + dto.setKind2Value("0"); + // if ("9*5.4".equals(size)) { + // } + priceList = productMapper.getThanPrice(dto); + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + } + // 加工艺的价格 --有覆膜,带尺寸过去(毫米) + getCraft(dto, priceList, null, null, 0); + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 名片-特种纸名片 + case "特种纸名片": + double addPrice = 5; + if ("雅柔".equals(kind) || "萱姿".equals(kind)) { + kind = "珠光"; + dto.setKindValue("珠光"); + } else if ("500克拉丝闪金".equals(kind) || "500克拉丝闪银".equals(kind)) { + dto.setKindValue("拉丝闪银"); + length = 9.0; + width = 5.4; + } + if (dto.isSwitchCardCount() && ("珠光".equals(kind) || "溪雪".equals(kind))) { + // 出血(一边2毫米) + length = length * 10 + 4; + width = width * 10 + 4; + double l = 420; + double w = 290; + double price = 0.0; + // 第一张价格 + double fixPrice = 60; + // 每张多少钱 + double zhang = 10; + + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + price = fixPrice + (num - 5 > 0 ? num - 5 : 0) * zhang; + Product dto2 = new Product(); + dto2.setCount(count); + dto2.setPrice(price + addPrice); + priceList.add(dto2); + getCraft(dto, priceList, null, null, 0); + } else if ("素芸".equals(kind)) { + int[] count_list = {100, 200, 400, 500, 1000, 2000, 3000, 5000, 10000}; + List craft_list = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); + double[] prices = {}; + if (craft_list.size() == 0 || craft_list.contains("异形模切")) { + prices = new double[]{144, 272, 528, 660, 1280, 2560, 3840, 6400, 12800}; + } + if (craft_list.contains("圆角") && !craft_list.contains("击凸") && !craft_list.contains("压凹")) { + prices = new double[]{146, 276, 536, 670, 1300, 2600, 3900, 6500, 13000}; + } + if (craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) { + prices = new double[]{216, 366, 666, 820, 1550, 3100, 4600, 7800, 15500}; + } + if (!craft_list.contains("圆角") && (craft_list.contains("击凸") || craft_list.contains("压凹"))) { + prices = new double[]{214, 362, 658, 810, 1530, 3060, 4590, 7650, 15300}; + } + + priceList = new ArrayList<>(); + Product dto2 = null; + double rate = 1.0; + for (int i = 0; i < count_list.length; i++) { + if (count_list[i] < count) { + continue; + } + if (priceList.size() > 2) { + break; + } + if (count_list[i] >= 400) { + rate = 0.8; + } + dto2 = new Product(); + dto2.setCount(count_list[i]); + dto2.setPrice(Math.ceil(prices[i] * rate)); + priceList.add(dto2); + } + int min = getNum(length, width); + for (Product product : priceList) { + if (craft_list.contains("异形模切")) { + product.setPrice(Math.floor(product.getPrice() * number * min * 2)); + } else { + product.setPrice(Math.floor(product.getPrice() * number * min)); + } + } + return priceList; + } else if ("草香".equals(kind) || "芳怡".equals(kind)) { + int[] count_list = {200, 500, 1000, 2000, 5000, 10000}; + // 出血(一边2毫米) + length = length * 10 + 4; + width = width * 10 + 4; + // -300克/200克/157克少数量价格+重量+工艺+款数价格 + double l = 0.0; + double w = 0.0; + double price = 0.0; + // 第一张价格 + double fixPrice = 0.0; + // 每张多少钱 + double zhang = 0.0; + // 设计费 *元/款 + double designFee = 0.0; + // 模切费 + double cutFee = 0.0; + + /** ======= 婚礼卡费用 ======= */ + // 5张以内价格 + if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + fixPrice = 50.0; + zhang = 10; + + if (dto.getCraft() != null) { + List craftList = Arrays.asList(dto.getCraft()); + if (craftList.contains("异形模切")) { + zhang = 18; + } + } + + l = 420 + 4; + w = 285 + 4; + + } + + // 设计费不带出血的尺寸 + if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { + designFee = 8; + } else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { + designFee = 15; + } else if ((length - 4 <= 285 && width - 4 - 4 <= 210) || (length - 4 <= 210 && width - 4 <= 285)) { + designFee = 35; + } else if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + designFee = 50; + } else { + designFee = 80; + } + + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + for (int i : count_list) { + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + if (i < count) { + continue; + } + int num = (int) Math.ceil(i * number / max); + // 婚礼卡 + price = fixPrice + (num - 1) * zhang + designFee + cutFee; + + Product dto2 = new Product(); + dto2.setCount(i); + dto2.setPrice(Math.ceil(price + addPrice)); + priceList.add(dto2); + } + + // 模切工艺 + //getCraft(dto, priceList, null, null, 0); + if ("1".equals(dto.getKindValue())) { + // 给产品加上重量 扣除出血的4毫米 + for (Product product : priceList) { + product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.2 * 0.86)); + } + } else { + // 给产品加上重量 + for (Product product : priceList) { + product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.3 * 0.86)); + } + } + + //第二款开始的设计费按照式设计内容 + if (number > 1) { + double desFee = 0; + if (dto.getP() == 1) { + desFee = 0.6; + } else if (dto.getP() == 2 || dto.getP() == 3) { + desFee = 0.8; + } else if (dto.getP() == 4) { + desFee = 1.2; + } else if (dto.getP() == 5) { + desFee = 2; + } else { + desFee = 5; + } + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + desFee * (number - 1))); + } + } + return priceList; + } else { + // 产品位数 + int min = getNum(length, width); + + priceList = productMapper.getThanPrice(dto); + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil((product.getPrice() + addPrice) * product.getPriceMultiple())); + } + if ("500克拉丝闪银".equals(kind)) { + String[] craft = dto.getCraft(); + if (!StringUtils.isEmpty(craft)) { + for (int i = 0; i < craft.length; i++) { + if ("烫金/".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 20 + 25)); + } + } else if ("凹凸".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 20 + 25)); + } + } else if ("双面".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 2)); + } + } + } + } + } else { + getCraft(dto, priceList, null, null, 0); + } + // 根据位数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * min)); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + if ("芳怡".equals(kind) || "草香".equals(kind)) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 1.5)); + } + } + } +// int tzWei = Integer.parseInt(Pattern.compile("[^0-9]").matcher(kind).replaceAll("").trim());// 获取材质中的克数 + int tzWei = 300;// 获取材质中的克数 + for (Product product : priceList) { + product.setWeight(df.format(tzWei / 1000 * length * width * product.getCount() / 10000 * number)); + } + return priceList; + // 合版封套 + case "6": + double lengthSize = dto.getLengthSize(); + double widthSize = dto.getWidthSize(); + double heightSize = dto.getHeightSize(); + double l = lengthSize + heightSize; + double w = widthSize * 2 + 2; + // 有尺寸,是自定义封套 + if (lengthSize > 0) { + // 产品位数 + double l1 = Math.ceil(l / 9.2); + double w1 = Math.ceil(w / 5.6); + double l2 = Math.ceil(w / 9.2); + double w2 = Math.ceil(l / 5.6); + // 产品位数 + int min = (int) Math.min(l1 * w1, l2 * w2); + if ("0".equals(kind)) { + int priceArr[] = {14, 20, 38, 64, 150, 290}; + priceList = new PriceUtils().getEnvelope(kind, count, min, priceArr); + } else { + int priceArr[] = {13, 19, 36, 62, 140, 280}; + priceList = new PriceUtils().getEnvelope(kind, count, min, priceArr); + } + // 根据款数计算重量 + for (Product product : priceList) { + product.setWeight(df.format(number * l * w * 0.25 * product.getCount() * 1.15 / 10000)); + } + } else { + priceList = productMapper.getThanPrice(dto); + + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数计算重量 + for (Product product : priceList) { + product.setWeight(df.format(number * 0.43 * 0.3 * 0.25 * product.getCount() * 1.15)); + } + } + // 工艺的钱 + getCraft(dto, priceList, null, null, 0); + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 房卡套 + case "7": + lengthSize = dto.getLengthSize(); + widthSize = dto.getWidthSize(); + heightSize = dto.getHeightSize(); + l = lengthSize + heightSize; + w = widthSize * 2 + 1.8; + // 有尺寸,是自定义卡套 + if (lengthSize > 0) { + // 产品位数 + double l1 = Math.ceil(l / 9.2); + double w1 = Math.ceil(w / 5.6); + double l2 = Math.ceil(w / 9.2); + double w2 = Math.ceil(l / 5.6); + // 产品位数 + int min = (int) Math.min(l1 * w1, l2 * w2); + priceList = new PriceUtils().getRoomCard(count, min); + // 根据款数重新计算重量 + for (Product product : priceList) { + product.setWeight(df.format(number * l * w * 0.25 * product.getCount() * 1.15 / 10000)); + } + } else { // 没有尺寸,常规卡套 + oldKind = kind; + dto.setKindValue("0"); + priceList = productMapper.getThanPrice(dto); + dto.setKindValue(oldKind); + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数计算重量 + for (Product product : priceList) { + product.setWeight(df.format(number * 0.13 * 0.139 * 0.25 * product.getCount() * 1.15)); + } + } + // 工艺的钱 + getCraft(dto, priceList, null, null, 0); + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 档案袋 + case "8": + priceList = productMapper.getThanPrice(dto); + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 彩色信封 + case "9": + // 120克双胶牛皮 + if ("10".equals(kind)) { + dto.setKindValue("0"); + priceList = productMapper.getThanPrice(dto); + } else if ("11".equals(kind)) {// 100克双胶牛皮 + dto.setKindValue("1"); + priceList = productMapper.getThanPrice(dto); + } else if ("3".equals(kind)) {// 200克珠光冰白彩色信封 + // 200克珠光冰白彩色信封报价:140克的基础上每个+*元 + dto.setKindValue("2");// 140克的value值 + priceList = productMapper.getThanPrice(dto); + for (Product product : priceList) { + if ("2".equals(kind2)) { + product.setPrice(product.getPrice() + product.getCount() * 0.12); + } else if ("3".equals(kind2)) { + product.setPrice(product.getPrice() + product.getCount() * 0.15); + } else if ("4".equals(kind2)) { + product.setPrice(product.getPrice() + product.getCount() * 0.16); + } else if ("5".equals(kind2)) { + product.setPrice(product.getPrice() + product.getCount() * 0.32); + } else { + product.setPrice(product.getPrice() + product.getCount() * 0.11); + } + } + } else {// 120/100克牛皮纸/ 140克珠光冰白彩色信封/高端珠光冰白烫金信封 + priceList = productMapper.getThanPrice(dto); + } + // 保留4个价格 + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数重新算重量(重量在数据库中) + /* + * if (!StringUtils.isEmpty(priceList.get(0).getWeight())) { for (Product product : priceList) { product.setWeight(df.format(Double.valueOf(product.getWeight()) * number)); } } + */ + // 根据款数重新算价格 + double wei = 0.0; + if (kind.equals("0") || kind.equals("10")) { + wei = 0.12; + } else if (kind.equals("1") || kind.equals("11")) { + wei = 0.1; + } else if (kind.equals("2")) { + wei = 0.14; + } else if (kind.equals("3")) { + wei = 0.2; + } else { + wei = 0.15; + } + + if (kind.equals("0") || kind.equals("10") || kind.equals("1") || kind.equals("11")) { + if (dto.getKind2Value().equals("0")) { + area = 0.176 * 0.125; + } else if (dto.getKind2Value().equals("1")) { + area = 0.22 * 0.11; + } else if (dto.getKind2Value().equals("2")) { + area = 0.23 * 0.12; + } else if (dto.getKind2Value().equals("3")) { + area = 0.229 * 0.162; + } else if (dto.getKind2Value().equals("4")) { + area = 0.25 * 0.162; + } else { + area = 0.324 * 0.229; + } + } else if (kind.equals("2") || kind.equals("3")) { + if (dto.getKind2Value().equals("0")) { + area = 0.165 * 0.1; + } else if (dto.getKind2Value().equals("1")) { + area = 0.175 * 0.11; + } else if (dto.getKind2Value().equals("2")) { + area = 0.176 * 0.125; + } else if (dto.getKind2Value().equals("3")) { + area = 0.22 * 0.11; + } else if (dto.getKind2Value().equals("4")) { + area = 0.23 * 0.12; + } else if (dto.getKind2Value().equals("5")) { + area = 0.229 * 0.162; + } else if (dto.getKind2Value().equals("6")) { + area = 0.25 * 0.162; + } else { + area = 0.324 * 0.229; + } + } else { + if (dto.getKind2Value().equals("0")) { + area = 0.22 * 0.11; + } else { + area = 0.094 * 0.064; + } + } + for (Product product : priceList) { + product.setWeight(df.format(area * product.getCount() * number * wei)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + + return priceList; + // 杯套 + case "10": + if ("5".equals(kind)) { + /* + * if(length == null) { length = 29.0; width = 7.0; } + */ + int min = getNum(length, width); + dto.setProTypeValue("4"); + dto.setKind("3"); + priceList = getHekaPrice(min, dto, priceList, count); + + getCraft(dto, priceList, length * 10, width * 10, min); + if ("粘成品".equals(dto.getCraftTang())) { + for (Product product : priceList) { + product.setPrice(product.getPrice() + 0.3 * product.getCount()); + } + } + for (Product product : priceList) { + product.setWeight(df.format(number * 0.3 * product.getCount() / 10000 * length * width)); + product.setPrice(Math.ceil(product.getPrice() * number)); + } + return priceList; + } else if ("6".equals(kind)) {// 盲盒杯套价格 + dto.setPrice(1800.0); + priceList.add(dto); + for (Product product : priceList) { + product.setWeight(df.format(number * 0.3 * product.getCount() * 0.29 * 0.07)); + product.setPrice(Math.ceil(product.getPrice() * number)); + } + return priceList; + } else if ("2".equals(kind)) {// 异形杯套价格计算 + priceList = new PriceUtils().getCupSetPrice(count); + } else { + priceList = productMapper.getThanPrice(dto); + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + wei = 0.3; + if ("0".equals(kind) || "2".equals(kind)) { + area = 0.262 * 0.075; + } else if ("3".equals(kind) || "4".equals(kind)) { + area = 0.29 * 0.07; + } else if ("7".equals(kind)) { + area = 0.277 * 0.07; + } else { + area = 0.261 * 0.076; + wei = 0.25; + } + + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * wei * product.getCount() * area)); + } + if ("4".equals(kind)) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + number * 50)); + } + } + return priceList; + // 牛皮纸手提袋 + case "11": + List hanbagList = new ArrayList(); + // 没有尺寸,就是常规,查询数据库 + if (StringUtils.isEmpty(size) && !dto.getK().equals("4")) { + // 各常规尺寸展开的长宽--用于计算重量 + double danjia = 0.0; + if ("0".equals(dto.getKind2Value())) { + length = 640.0; + height = 385.0; + if (count <= 10000) { + danjia = 0.88; + } else { + danjia = 0.78; + } + } else if ("1".equals(dto.getKind2Value())) { + length = 720.0; + height = 400.0; + if (count <= 10000) { + danjia = 1.064; + } else { + danjia = 0.9; + } + } else if ("2".equals(dto.getKind2Value())) { + length = 780.0; + height = 385.0; + danjia = 1.11; + } + // 第一位添加自定义数量的价格 + if (dto.isDiyCount() && count > 3000) { + Product dto2 = new Product(); + dto2.setCount(count); + dto2.setPrice(Math.ceil(danjia * count)); + priceList.add(dto2); + } + if ("2".equals(dto.getKindValue())) { + dto.setKindValue("0"); + } + hanbagList = productMapper.getThanPrice(dto); + // 把查出来的价格跟在自定义数量价格后面 + for (int i = 0; i < hanbagList.size(); i++) { + if (priceList.size() > 0) { + if (count == hanbagList.get(i).getCount()) + continue; + } + priceList.add(hanbagList.get(i)); + } + // 给产品加上重量 + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * height / 1000 * product.getCount() * 0.13 * 1.25)); + } + } else { + if ("4".equals(dto.getK())) { + String kind2Value = dto.getKind2Value(); + String kindValue = dto.getKindValue(); + int[] base_count = null; + double[] base_price = null; + length = 0.0; + height = 0.0; + if ("0".equals(kindValue) && !"11".equals(kind2Value) && !"12".equals(kind2Value)) { + base_count = new int[]{100, 500, 1000, 2000, 3000, 5000, 10000}; + } else { + base_count = new int[]{500, 1000, 2000, 3000, 5000, 10000}; + } + if ("1".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{420, 620, 1260, 2230, 3200, 5000, 9300}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{600, 1300, 2400, 3400, 5200, 9500}; + } + length = 25.0; + height = 24.0; + } + if ("2".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{480, 772, 1300, 2400, 3500, 5200, 9800}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{750, 1320, 2330, 3500, 5880, 11000}; + } + length = 25.0; + height = 27.0; + } + if ("3".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{480, 730, 1320, 2330, 3300, 5280, 9800}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{770, 1200, 2380, 3400, 5300, 9500}; + } + length = 28.0; + height = 26.5; + } + if ("4".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{420, 560, 950, 1750, 2500, 4000, 7600}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{645, 1000, 1880, 2680, 4180, 7880}; + } + length = 23.0; + height = 25.0; + } + if ("5".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{450, 733, 980, 1700, 2500, 4000, 7600}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{651, 890, 1480, 2150, 3450, 6625}; + } + length = 11.0; + height = 25.0; + } + if ("6".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{390, 658, 1030, 1800, 2600, 4200, 8350}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{593, 1000, 1720, 2500, 4000, 7800}; + } + length = 16.0; + height = 23.0; + } + if ("7".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{320, 520, 860, 1550, 2240, 3750, 6900}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{500, 890, 1530, 2130, 3430, 6280}; + } + length = 21.0; + height = 27.0; + } + if ("8".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{400, 540, 1100, 1640, 2400, 3950, 7380}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{560, 980, 1640, 2230, 3600, 6580}; + } + length = 21.0; + height = 26.5; + } + if ("9".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{500, 760, 1200, 2260, 3300, 5200, 9910}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{700, 1100, 1920, 2800, 4400, 8500}; + } + length = 25.0; + height = 27.0; + } + if ("10".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{600, 970, 1450, 2480, 3600, 5450, 9380}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{910, 1350, 2300, 3400, 5100, 8600}; + } + length = 32.0; + height = 27.0; + } + if ("11".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{1192, 1600, 2800, 4100, 6500, 11280}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{920, 1350, 2250, 3500, 6350, 10800}; + } + length = 32.0; + height = 39.0; + } + if ("12".equals(kind2Value)) { + if ("0".equals(kindValue)) { + base_price = new double[]{1000, 1500, 2500, 3500, 5300, 10000}; + } + if ("1".equals(kindValue)) { + base_price = new double[]{850, 1400, 2100, 2800, 4100, 7800}; + } + length = 25.0; + height = 32.0; + } + Product pro = null; + double color_price = 0; + double bei_price = 0; + if (dto.getShen_type() == 0) { + if (!"白色".equals(dto.getShen_color()) && !"黄牛皮本色".equals(dto.getShen_color())) { + color_price = 0.02; + } + } + if (dto.getShen_type() == 1) { + color_price = 0.06; + if ("白色".equals(dto.getShen_color()) || "黄牛皮本色".equals(dto.getShen_color())) { + color_price = 0.03; + } + } + if (dto.getZheye() != null && dto.getZheye() == 0) { + bei_price = 0.4; + } + if (dto.getZheye() != null && dto.getZheye() == 1) { + bei_price = 0.6; + } + if (dto.getZheye() != null && dto.getZheye() == 2) { + bei_price = 0.3; + } + for (int i = 0; i < base_count.length; i++) { + if (base_count[i] < count) { + continue; + } + if (priceList.size() > 2) { + break; + } + pro = new Product(); + pro.setCount(base_count[i]); + pro.setPrice(Math.ceil(base_price[i] + (base_count[i] * color_price) + (base_count[i] * bei_price))); + priceList.add(pro); + } + + for (Product product : priceList) { + product.setPrice(product.getPrice() * number); + product.setWeight(df.format(number * length / 1000 * height / 1000 * product.getCount() * 0.13 * 1.25)); + } + + return priceList; + } + // 厘米转成毫米 + length = length * 10; + width = width * 10; + height = height * 10; + length = (length + width) * 2 + 20; + height = (height + (width / 2 + 20)) + 40; + double price = 0.0; + int ikai = 0; + String kai = ""; + String kaiDa = new PriceUtils().getDa(length, height); + String kaiZheng = new PriceUtils().getZheng(length, height); + int intDa = Integer.parseInt(kaiDa); + int intZheng = Integer.parseInt(kaiZheng); + int maxDa = intDa > intZheng ? intDa : intZheng; + if (intZheng >= intDa) { + kai = "+" + maxDa; + } + if (kai.contains("+")) { + kai = kai.replaceAll("[^(0-9)]", ""); + ikai = Integer.parseInt(kai); + // 140克牛皮纸 + if ("0".equals(kind)) { + price = 1.2; + // 250克牛皮纸 + } else { + price = 2.2; + } + } else { + ikai = maxDa; + if ("0".equals(kind)) { + price = 1.4; + } else { + price = 2.8; + } + } + // !福袋/礼品袋 + if (!"2".equals(dto.getK())) { + if (length >= 1000 || height >= 700) { + ikai = 1; + priceList = new PriceUtils().getPriceHanding(count, ikai, price, 2); + } else { + // 系数 5千-1万的*1.6 5千以下的*1.7 + if (count <= 5000) { + priceList = new PriceUtils().getPriceHanding(count, ikai, price, 1.7); + } else { + priceList = new PriceUtils().getPriceHanding(count, ikai, price, 1.6); + } + } + } else { + if (length >= 1000 || height >= 700) { + ikai = 1; + } + // 数量超过1万个,系数*1.6 + if (count > 10000) { + priceList = new PriceUtils().getPriceHanding(count, ikai, price, 1.6); + } else { + priceList = new PriceUtils().getPriceHanding(count, ikai, price, 1.8); + } + } + // 给产品加上重量 + if ("0".equals(kind)) { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * height / 1000 * product.getCount() * 0.14 * 1.25)); + } + } else { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * height / 1000 * product.getCount() * 0.25 * 1.25)); + } + } + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 250克白牛皮纸 + case "12": + priceList = productMapper.getThanPrice(dto); + if ("0".equals(dto.getKindValue())) { + length = 700.0; + height = 460.0; + } else if ("1".equals(dto.getKindValue())) { + length = 680.0; + height = 440.0; + } else if ("2".equals(dto.getKindValue())) { + length = 740.0; + height = 500.0; + } else if ("3".equals(dto.getKindValue())) { + length = 820.0; + height = 510.0; + } else if ("4".equals(dto.getKindValue())) { + length = 740.0; + height = 380.0; + } else if ("5".equals(dto.getKindValue())) { + length = 800.0; + height = 390.0; + } else if ("6".equals(dto.getKindValue())) { + length = 980.0; + height = 390.0; + } else if ("7".equals(dto.getKindValue())) { + length = 1000.0; + height = 430.0; + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(length / 1000 * height / 1000 * product.getCount() * 0.25 * 1.25)); + } + return priceList; + // 吊旗 + case "13": + length = length * 10; + width = width * 10; + String value = dto.getKind1Label(); + if (length <= 285 && width <= 210 || length <= 210 && width <= 285) { + dto.setKind2Value("0"); + } else if (length <= 420 && width <= 285 || length <= 285 && width <= 420) { + dto.setKind2Value("1"); + } else if (length <= 570 && width <= 280 || length <= 280 && width <= 570) { + dto.setKind2Value("2"); + } else if (length <= 520 && width <= 370 || length <= 370 && width <= 520) { + dto.setKind2Value("3"); + } else if (length <= 570 && width <= 420 || length <= 420 && width <= 570) { + dto.setKind2Value("4"); + } else if (length <= 730 && width <= 560 || length <= 560 && width <= 730) { + dto.setKind2Value("5"); + } + priceList = productMapper.getThanPrice(dto); + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + if (product.getCount() >= 50) { + product.setPrice(Math.ceil(product.getPrice() * 1.6)); + } + //product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + if ("2".equals(value)) { + for (Product product : priceList) { + product.setPrice(product.getPrice() - 20); + } + } + // 给产品加上重量 + if ("2".equals(dto.getKindValue())) { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.3 * 0.86)); + } + } else if ("1".equals(dto.getKindValue())) { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.2 * 0.86)); + } + } else { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.157 * 0.86)); + } + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 宣传单 + case "14": + length = length * 10; + width = width * 10; + if ((length <= 140 && width <= 210) || (length <= 210 && width <= 140)) { + dto.setKind2Value("2"); + priceList = productMapper.getThanPrice(dto); + } else if ((length <= 210 && width <= 285) || (length <= 285 && width <= 210)) { + dto.setKind2Value("1"); + priceList = productMapper.getThanPrice(dto); + } else if ((length <= 420 && width <= 285) || (length <= 285 && width <= 420)) { + dto.setKind2Value("0"); + priceList = productMapper.getThanPrice(dto); + } else { + // 产品位数 + double l1 = Math.ceil(length / 210); + double w1 = Math.ceil(width / 285); + double l2 = Math.ceil(width / 210); + double w2 = Math.ceil(length / 285); + int min = (int) Math.min(l1 * w1, l2 * w2); + + // 157克铜版纸尺寸大于57厘米,多加一位 + if (length > 570 || width > 570) { + if ("3".equals(kind)) + min = min + 1; + } + // 设置位数 + dto.setNum(min); + // 位数以A4纸为标准计算 + dto.setKind2Value("1"); + priceList = productMapper.diaoqiThanPrice(dto); + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + + // 工艺----如果有覆膜(亮膜哑膜价格一致) + /** + * 宣传单复膜计算方法 157克(含157克)以下材质不能复膜,200克以上材质单面复膜:长*宽(M)*数量*0.6元/平方米,双面*2.最低收50,双面80 + */ + String[] craft = dto.getCraft(); + if (!StringUtils.isEmpty(craft)) { + if (craft.length > 1) { + if ("折页".equals(craft[0]) && ("压痕").equals(craft[1])) { + craft[0] = "折页压痕"; + craft[1] = ""; + } + } + for (int i = 0; i < craft.length; i++) { + if ("折页".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (product.getCount() * 0.03 > 70 ? product.getCount() * 0.03 : 70) + 25 * dto.getZheye())); + } + } + if ("压痕".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (product.getCount() * 0.05 > 90 ? product.getCount() * 0.05 : 90) + 25 * dto.getZheye())); + } + } + if ("折页压痕".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (product.getCount() * 0.07 > 100 ? product.getCount() * 0.07 : 100) + 25 * dto.getZheye())); + } + } + if ("模切".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 30 + 65 + 0.15 * product.getCount())); + } + } + if ("单面覆膜".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (length / 1000 * width / 1000 * product.getCount() * 0.7 > 50 ? length / 1000 * width / 1000 * product.getCount() * 0.7 : 50))); + } + } + if ("双面覆膜".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (length / 1000 * width / 1000 * product.getCount() * 0.7 * 2 > 80 ? length / 1000 * width / 1000 * product.getCount() * 0.7 * 2 : 80))); + } + } + } + } + + // 给产品加上重量 + weight = 0.0; + switch (kind) { + case "0": + weight = 0.08; + break; + case "1": + weight = 0.25; + break; + case "2": + weight = 0.2; + break; + case "3": + weight = 0.157; + break; + } + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.86 * weight)); + } + return priceList; + // 腰封200克/157克 + case "15": + // 腰封少数量走的是吊旗少数量的价格 + length = length * 10; + width = width * 10; + if ((length <= 280 && width <= 65) || length <= 65 && width <= 280) { + dto.setKind2Value("0"); + } else if (length <= 420 && width <= 80 || length <= 80 && width <= 420) { + dto.setKind2Value("1"); + } else if (length <= 420 && width <= 100 || length <= 100 && width <= 420) { + dto.setKind2Value("2"); + } else if (length <= 560 && width <= 80 || length <= 80 && width <= 560) { + dto.setKind2Value("3"); + } else if (length <= 560 && width <= 100 || length <= 100 && width <= 560) { + dto.setKind2Value("4"); + } else if (length <= 630 && width <= 100 || length <= 100 && width <= 630) { + dto.setKind2Value("5"); + } else if (length <= 750 && width <= 80 || length <= 80 && width <= 750) { + dto.setKind2Value("6"); + } else if (length <= 630 && width <= 200 || length <= 200 && width <= 630) { + dto.setKind2Value("7"); + } else if (length <= 850 && width <= 90 || length <= 90 && width <= 850) { + dto.setKind2Value("8"); + } else if (length <= 850 && width <= 210 || length <= 210 && width <= 850) { + dto.setKind2Value("9"); + } else if ((length > 850 || width > 210) && (width > 850 || length > 210)) { + dto.setKind2Value("9"); + } + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.thanThousandPrice(dto); + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + if (length > 500 || width > 500) { + // 200克铜版纸 + if ("1".equals(kind)) { + for (Product product : priceList) { + if (product.getCount() > 2000) { + product.setPrice(product.getPrice() + 50); + } + } + } + } + + craft = dto.getCraft(); + // 腰封自己的模切单独价格 + if (!StringUtils.isEmpty(craft)) { + for (int i = 0; i < craft.length; i++) { + if ("模切".equals(craft[i])) { + craft[i] = "腰封模切"; + break; + } + } + } + // 加工艺的价格 --有覆膜,带尺寸过去(毫米) + getCraft(dto, priceList, length, width, 0); + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "金属标": + if ("金属标".equals(dto.getKind())) { + priceList = new PriceUtils().getMetalPrice(priceList, width, length, count, number); + // 根据款数重新算价格 +// for (Product product : priceList) { +// product.setPrice(Math.floor(product.getPrice() * number)); +// } + for (Product product : priceList) { + if (dto.getCraftMo().equals("双色")) { + product.setPrice(Math.floor(product.getPrice() * 2)); + } else if (dto.getCraftMo().equals("彩色(三色)")) { + product.setPrice(Math.floor(product.getPrice() * 3)); + } else if (dto.getCraftMo().equals("彩色(四色)")) { + product.setPrice(Math.floor(product.getPrice() * 4)); + } + } + } else if ("UV转印贴".equals(dto.getKind())) { + if (length <= 2) { + length = 2.0; + } + if (width <= 2) { + width = 2.0; + } + + //if(role.indexOf("1000") > -1 || role.indexOf("1006") > -1) {//菇凉&卓胜uv单独报价 priceList = new PriceUtils().UVStickerLessPrice(length, width, count,number, dto.getCraft()); }else { + + // 1006 1003 1005 1037 1058 1002 1033 1045 卓盛 航和 米笛儿 竹范 领淘文具 榆家 涛莱 拼多多uv单独报价 + if (role.indexOf("1045") > -1) { + priceList = new PriceUtils().UVStickerSmallPrice(length, width, count, number, dto.getCraftMo(), dto.getCraft()); + } else { + priceList = new PriceUtils().UVStickerPrice(length, width, count, number, dto.getCraftMo(), dto.getCraft()); + } + + if (priceList.get(0).getCount() != count) { + priceList.get(0).setCount(count); + } + if (!StringUtils.isEmpty(dto.getCraft())) { + for (Product product : priceList) { + product.setPrice(product.getPrice() * number); + } + } +// double base = number < 6 && number > 1 ? 5 : 0; +// for (Product product : priceList) { +// product.setPrice(product.getPrice() + base); +// } + + /* } */ + + /* + * if(count < 10) { priceList = new PriceUtils().UVStickerLessPrice(length, width, count,number, dto.getCraft()); }else { priceList = new PriceUtils().UVStickerPrice(length, width, count,number, dto.getCraftMo(), dto.getCraft()); } + */ + + area = length * width * count / 10000; + + // 根据款数重新算价格 +// if (number > 1) { +// for (Product product : priceList) { +// if (area <= 0.005) { +// if (count <= 5) { +// product.setPrice(Math.ceil(product.getPrice()) + 5 * number); +// } else { +// product.setPrice(Math.ceil(product.getPrice() * number)); +// } +// } else { +// product.setPrice(Math.ceil(product.getPrice() * number)); +// } +// } +// } + /* + * List priceList2 = new PriceUtils().UVStickerLessPrice(length, width, count, number, dto.getCraft()); // 比较哪个便宜 if ((priceList.get(0).getPrice() > priceList2.get(0).getPrice()) && priceList2.get(0).getPrice() > 0) { // Double minPrice = Math.min(priceList.get(0).getPrice(), // priceList2.get(0).getPrice()); priceList = new ArrayList(); Product product = new Product(); product.setCount(count); product.setPrice(priceList2.get(0).getPrice()); + * product.setMsg("大张出货(2-3天发货)"); priceList.add(product); return priceList; } + */ + } + return priceList; + case "卡片少数量": + String crafts[] = dto.getCraft(); + String craftShua = dto.getCraftShua(); + if (dto.getProTypeLabel().equals("菜单")) { + priceList = new CardPrice().getMenuPrice(dto.getKind1Value(), size, count, number, dto.getCraft()); + } else if (dto.getProTypeLabel().equals("婚礼报纸")) { + length = length * 10 + 4; + width = width * 10 + 4; + double price = 50; + double designPrice = 30; + double zhang = 6; + l = 420 + 4; + w = 285 + 4; + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + price = price + designPrice * number; + if (num > 1) { + price += zhang * num; + } + Product dto2 = new Product(); + dto2.setCount(count); + dto2.setPrice(Math.ceil(price)); + priceList.add(dto2); + } else if (dto.getProTypeLabel().equals("种子纸")) { + int av_count = count; + if (!StringUtils.isEmpty(dto.getSwitchz3Size()) || "2".equals(dto.getZ3type())) { + count = Math.max(count, 300); + } + double price = Math.ceil((length * width * count * 200) / 10000);//价格计算尺寸*数量*200/10000 + + if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("编码")) {//起步价10 + price += Math.max(count * 0.5, 10); + } + if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("打孔")) { + price += Math.max(count * 0.2, 10); + } + if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("手撕线")) { + price += Math.max(count * 0.2, 10); + } + if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("压痕")) { + price += Math.max(count * 0.2, 10); + } + price = price * number;//款数翻倍 + price = Math.max(price, 80); + + if (!StringUtils.isEmpty(dto.getSwitchz3Size())) { + price += 100; + } + List craft_list = crafts != null ? Arrays.asList(crafts) : new ArrayList<>(); + if (craft_list.size() > 0 && craft_list.contains("绳子")) { + price += Math.max(5, Math.ceil(0.1 * number * count)); + } + Product dto2 = new Product(); + dto2.setCount(av_count); + dto2.setWeight(df.format(number * (length / 100) * (width / 100) * av_count * 0.3 * 0.86)); + dto2.setPrice(Math.ceil(price)); + priceList.add(dto2); + } else if (!StringUtils.isEmpty(crafts) && crafts[crafts.length - 1].indexOf("烫金") > -1) { + // 出血(一边2毫米) + length = length * 10 + 4; + width = width * 10 + 4; + double price = 0.0; + // 第一张价格 + double fixPrice = 0.0; + // 每张多少钱 + double zhang = 0.0; + // 设计费 *元/款 + double designFee = 0.0; + // 模切费 + double cutFee = 0.0; + if ("异形卡片".equals(dto.getKind()) && !StringUtils.isEmpty(dto.getCraft())) { + fixPrice = 110.0; + zhang = 8; + } else { + fixPrice = 100.0; + if ("单面印刷".equals(craftShua)) { + zhang = 5; + } else { + zhang = 6; + } + } + // 设计费不带出血的尺寸 + if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { + designFee = 8; + } else if ((length - 4 <= 140 && width - 4 <= 100) || (length - 4 <= 100 && width - 4 <= 140)) { + designFee = 16; + } else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { + designFee = 15; + } else if ((length - 4 <= 285 && width - 4 <= 210) || (length - 4 <= 210 && width - 4 <= 285)) { + designFee = 35; + } else if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + designFee = 50; + } + l = 420 + 4; + w = 285 + 4; + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count / max); + price = fixPrice + (num - 5 > 0 ? num - 5 : 0) * zhang + designFee + cutFee; + Product dtos = new Product(); + dtos.setCount(count); + dtos.setPrice(Math.ceil(price)); + priceList.add(dtos); + for (int i = 0; i < crafts.length; i++) { + if ("烫金".equals(crafts[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + num * 25)); + } + } else if ("彩色印刷+烫金".equals(crafts[i])) {// 少数量卡片带烫金工艺,每张烫金+35块(1张起收) + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + num * 35)); + } + } + } + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * number)); + } + } else { + // 出血(一边2毫米) + length = length * 10 + 4; + width = width * 10 + 4; + // -300克/200克/157克少数量价格+重量+工艺+款数价格 + l = 0.0; + w = 0.0; + double price = 0.0; + // 第一张价格 + double fixPrice = 0.0; + // 每张多少钱 + double zhang = 0.0; + // 设计费 *元/款 + double designFee = 0.0; + // 模切费 + double cutFee = 0.0; + + /** ======= 婚礼卡费用 ======= */ + // 5张以内价格 + double fixPrice9 = 0.0; + // 每增加1张多少钱 + double zhang9 = 0.0; + // 设计费 + double designFee9 = 0.0; + // 模切费 + double cutFee9 = 0.0; + // if ((length <= 285 && width <= 210) || (length <= 210 && width <= 285)) { + // fixPrice = 40.0; + // zhang = 8; + // l = 420; + // w = 285; + // fixPrice9 = 50; + // zhang9 = 8; + // } else + if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + if ("特种纸名片".equals(dto.getKind())) { + fixPrice = 50.0; + zhang = 10; + + if (crafts != null) { + List craftList = Arrays.asList(crafts); + if (craftList.contains("模切")) { + zhang = 18; + } + } + + } else if (("异形卡片".equals(dto.getKind()) && !StringUtils.isEmpty(dto.getCraft())) || (!StringUtils.isEmpty(dto.getCraft()) && Arrays.asList(dto.getCraft()).contains("异形"))) { + fixPrice = 32.0; + zhang = 8; + } else { + fixPrice = 30.0; + /*if ("单面印刷".equals(craftShua)) { + zhang = 8; + } else {*/ + zhang = 6; + /*}*/ + } + l = 420; + w = 285; + fixPrice9 = 40; + zhang9 = 6; + // 婚礼卡,直角工艺一张5元 + if (!StringUtils.isEmpty(dto.getCraft())) { + craft = dto.getCraft(); + if ("直角".equals(craft[0])) { + zhang9 = 5; + } + } + } else if ((length - 4 <= 570 && width - 4 <= 420) || (length - 4 <= 420 && width - 4 <= 570)) { + if ("特种纸名片".equals(dto.getKind())) { + return null; + } + fixPrice = 60.0; + zhang = 5; + cutFee = 150; + l = 570; + w = 420; + fixPrice9 = 90; + zhang9 = 8; + cutFee9 = 150; + } else if ((length - 4 <= 730 && width - 4 <= 530) || (length - 4 <= 530 && width - 4 <= 730)) { + fixPrice = 100.0; + if ("特种纸名片".equals(dto.getKind())) { + return null; + } + if ("单面印刷".equals(craftShua)) { + zhang = 5; + } else { + zhang = 6; + } + if (!StringUtils.isEmpty(dto.getCraft())) + cutFee = 150; + l = 730; + w = 530; + fixPrice9 = 100; + zhang9 = 10; + cutFee9 = 150; + } + /* + * if (!"特种纸名片".equals(dto.getKind()) && ("异形卡片".equals(dto.getKind()) || !StringUtils.isEmpty(dto.getCraft()))) { zhang = 7; } + */ + /* + * 婚礼卡设计费成品尺寸90X54MM以内每款收10元 140X100MM以内每款收15元 210X140MM以内30元 210X285MM以内40元 420X285MM以内60元 大于420X285MM80元 + */ + // 设计费不带出血的尺寸 + if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { + designFee = 8; + designFee9 = 10; + } /*else if ((length - 4 <= 140 && width - 4 <= 100) || (length - 4 <= 100 && width - 4 <= 140)) { + designFee = 16; + designFee9 = 15; + }*/ else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { + designFee = 15; + designFee9 = 15; + } else if ((length - 4 <= 285 && width - 4 - 4 <= 210) || (length - 4 <= 210 && width - 4 <= 285)) { + designFee = 35; + designFee9 = 40; + } else if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + designFee = 50; + designFee9 = 60; + } else { + designFee = 80; + designFee9 = 80; + } + if ("腰封".equals(dto.getKind())) { + zhang = 8; + } + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = 1; + if (length == 424 || length == 289 || width == 424 || width == 289) { + max = Math.max(Math.floor(l / (length - 4)) * Math.floor(w / (width - 4)), Math.floor(l / (width - 4)) * Math.floor(w / (length - 4))); + } else { + max = Math.max(Math.floor(l / length) * Math.floor(w / width), Math.floor(l / width) * Math.floor(w / length)); + } + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + // 婚礼卡 + if ("婚礼卡".equals(dto.getKind()) || "抽奖卡".equals(dto.getKind())) { + // 5张以内价格 + 每张费用(第6张起收)+ 设计费 * 款数 + 模切费 + 0.1 * 总数量 (排号费) + price = fixPrice9 + (num - 5 > 0 ? num - 5 : 0) * zhang9 + designFee9 + cutFee9 + 0.1 * count * number; + } else { + price = fixPrice + (num - 1) * zhang + designFee + cutFee; + } + if ("刮刮卡".equals(dto.getKind())) { + price = price + 0.2 * count * number; + } + Product dto2 = new Product(); + dto2.setCount(count); + dto2.setPrice(Math.ceil(price)); + priceList.add(dto2); + // 模切工艺 + craft = dto.getCraft(); + if (!StringUtils.isEmpty(craft)) { + for (int i = 0; i < craft.length; i++) { + if ("模切".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(product.getPrice());// + cutFee + } + } + // 少数量卡片带烫金工艺,每张烫金+25块(1张起收) + /* + * if ("烫金".equals(craft[i])) { for (Product product : priceList) { product.setPrice(product.getPrice() + num * 25); } } else if ("彩色印刷+烫金".equals(craft[i])) {// 少数量卡片带烫金工艺,每张烫金+35块(1张起收) for (Product product : priceList) { product.setPrice(product.getPrice() + num * 35); } } + */ + } + } + if ("1".equals(dto.getKindValue())) { + // 给产品加上重量 扣除出血的4毫米 + for (Product product : priceList) { + product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.2 * 0.86)); + } + } else { + // 给产品加上重量 + for (Product product : priceList) { + product.setWeight(df.format(number * (length - 4) / 1000 * (width - 4) / 1000 * product.getCount() * 0.3 * 0.86)); + } + } + } + + //第二款开始的设计费按照式设计内容 + if (!dto.getProTypeLabel().equals("婚礼报纸") && !dto.getProTypeLabel().equals("菜单") && number > 1) { + double desFee = 0; + if (dto.getP() == 1) { + desFee = 0.6; + } else if (dto.getP() == 2 || dto.getP() == 3) { + desFee = 0.8; + } else if (dto.getP() == 4) { + desFee = 1.2; + } else if (dto.getP() == 5) { + desFee = 2; + } else { + desFee = 18; + int min = getNumAdd((length - 4) / 10, (width - 4) / 10); + if (min == 1) { + desFee = 7; + } + if (min == 2) { + desFee = 10; + } + if (min == 3) { + desFee = 14; + } + if (min == 4) { + desFee = 18; + } + } + + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + desFee * (number - 1))); + } + } + + return priceList; + // 便签本/联单 + case "16": + length = length * 10; + width = width * 10; + if ("联单".equals(dto.getNotePaperKind())) { + if ((length <= 130 && width <= 95) || length <= 95 && width <= 130) { + dto.setKindValue("0"); + } else if (length <= 140 && width <= 100 || length <= 100 && width <= 140) { + dto.setKindValue("1"); + } else if (length <= 175 && width <= 95 || length <= 95 && width <= 175) { + dto.setKindValue("2"); + } else if (length <= 210 && width <= 95 || length <= 95 && width <= 210) { + dto.setKindValue("3"); + } else if (length <= 185 && width <= 130 || length <= 130 && width <= 185) { + dto.setKindValue("4"); + } else if (length <= 210 && width <= 140 || length <= 140 && width <= 210) { + dto.setKindValue("5"); + } else if (length <= 260 && width <= 185 || length <= 185 && width <= 260) { + dto.setKindValue("6"); + } else if (length <= 285 && width <= 210 || length <= 210 && width <= 285) { + dto.setKindValue("7"); + } else if (length <= 370 && width <= 260 || length <= 260 && width <= 370) { + dto.setKindValue("8"); + } else if (length <= 420 && width <= 285 || length <= 285 && width <= 420) { + dto.setKindValue("9"); + } + } else if ("稿纸/便签本/票本(每本100张)".equals(dto.getNotePaperKind())) { + if ((length <= 130 && width <= 90) || length <= 90 && width <= 130) { + dto.setKindValue("10"); + } else if (length <= 140 && width <= 100 || length <= 100 && width <= 140) { + dto.setKindValue("11"); + } else if (length <= 185 && width <= 130 || length <= 130 && width <= 185) { + dto.setKindValue("12"); + } else if (length <= 210 && width <= 140 || length <= 140 && width <= 210) { + dto.setKindValue("13"); + } else if (length <= 260 && width <= 185 || length <= 185 && width <= 260) { + dto.setKindValue("14"); + } else if (length <= 285 && width <= 210 || length <= 210 && width <= 285) { + dto.setKindValue("15"); + } + } else if ("彩胶纸".equals(dto.getNotePaperKind())) { + dto.setKindValue("16"); + if ("单面".equals(dto.getCraftMo())) { + dto.setKind2Value("6"); + } else { + dto.setKind2Value("7"); + } + priceList = productMapper.getThanPrice(dto); + } else { + dto.setKindValue("17"); + priceList = productMapper.getThanPrice(dto); + } + if ("联单".equals(dto.getNotePaperKind()) || "稿纸/便签本/票本(每本100张)".equals(dto.getNotePaperKind())) { + if (count <= 1000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.notePaperPrice(dto); + // 数据库中是单价(成本价),需要*数量*利润 + if ("联单".equals(dto.getNotePaperKind())) { + for (Product product : priceList) { + if (product.getCount() == 20) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.8)); + } else { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.5)); + } + } + } else { + if ("10".equals(dto.getKindValue()) || "11".equals(dto.getKindValue())) { + for (Product product : priceList) { + if (product.getCount() == 10 || product.getCount() == 100 || product.getCount() == 200) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.5)); + } else if (product.getCount() == 20) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.8)); + } else if (product.getCount() == 30) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 3)); + } else if (product.getCount() == 50) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.6)); + } else if (product.getCount() == 500 || product.getCount() == 1000) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2)); + } else { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 1.8)); + } + } + } else if ("12".equals(dto.getKindValue()) || "13".equals(dto.getKindValue())) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.5)); + } + } else if ("14".equals(dto.getKindValue()) || "15".equals(dto.getKindValue())) { + for (Product product : priceList) { + if (product.getCount() == 10) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.3)); + } else if (product.getCount() == 20) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2.1)); + } else if (product.getCount() == 30 || product.getCount() == 50 || product.getCount() == 100) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 2)); + } else if (product.getCount() == 200 || product.getCount() == 500 || product.getCount() == 1000) { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 1.8)); + } else { + product.setPrice(Math.ceil(product.getPrice() * product.getCount() * 1.8)); + } + } + } + + } + // 加上重量(二联单每本100份(50份),三联单每本90份(30份),四联单每本100页(25份)) + // 三联单 + if ("1".equals(kind2)) { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 1.08 * 0.05 * 90)); + } + } else { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 1.08 * 0.05 * 100)); + } + } + } else { + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.thanThousandPrice(dto); + // 数据库中是(成本价),需要*利润 + for (Product product : priceList) { + if (product.getCount() <= 1000) { + product.setPrice(Math.ceil(product.getPrice() * 2.5)); + } else { + product.setPrice(Math.ceil(product.getPrice() * 2)); + } + } + // 加上重量 + if ("红头文件".equals(dto.getNotePaperKind())) { + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.08)); + } + } else { + // 彩胶纸 + for (Product product : priceList) { + product.setWeight(df.format(number * length / 1000 * width / 1000 * product.getCount() * 0.07)); + } + } + } + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 联单,且选择了【垫板】工艺 + // 21*14cm内,+5毛钱一本,超过+8毛一本 + if ("联单".equals(dto.getNotePaperKind()) && !StringUtils.isEmpty(dto.getCraft())) { + craft = dto.getCraft(); + for (int i = 0; i < craft.length; i++) { + if ("垫板".equals(craft[i])) { + if (length <= 210 && width <= 140 || length <= 140 && width <= 210) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.5)); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.8)); + } + } + } else if ("封皮".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.5)); + } + } else if ("彩色".equals(craft[i])) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.8)); + } + } + } + } else if ("稿纸/便签本/票本(每本100张)".equals(dto.getNotePaperKind()) && !StringUtils.isEmpty(dto.getCraft())) { + craft = dto.getCraft(); + for (int i = 0; i < craft.length; i++) { + if ("封皮".equals(craft[i]) || "垫板".equals(craft[i])) { + for (Product product : priceList) { + int bs = 1; + if (product.getCount() > 100) { + if (product.getCount() % 100 > 0) { + bs = product.getCount() / 100 + 1; + } else { + bs = product.getCount() / 100; + } + } + product.setPrice(Math.ceil(product.getPrice() + bs * 20)); + } + } + } + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 海报(款数*个数=个数) + case "17": + // 贡缎布 + if ("7".equals(kind)) { + priceList = PriceUtils.satinClothPrice(kind2, length, width, count, number); + if (dto.getYaheng() != null && dto.getYaheng() > 0) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + dto.getYaheng() * 15)); + } + } + for (Product product : priceList) { + product.setWeight(df.format(0.165 * length * width * product.getCount() / 10000 * number)); + } + return priceList; + } else if ("6".equals(kind)) {// 条幅craftTiao + + priceList = PriceUtils.bannerPrice(kind2, length, width, count, number, role); + /* + * if(length == 300 && width == 50) { }else if(width <= 80){ for(Product product:priceList) { product.setPrice(Math.ceil(product.getPrice() * 1.15 * 0.8)); } }else { for(Product product:priceList) { product.setPrice(Math.ceil(product.getPrice())); } } + */ + + if ("双喷".equals(dto.getCraftTiao())) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.5)); + } + } + if (dto.getZheye() != null && dto.getZheye() > 0) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + dto.getZheye() * 15)); + } + } + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * number)); + product.setWeight(df.format(0.065 * length * width * product.getCount() / 10000 * number)); + double other_price = 0; + if (width * length <= 50 * 50) { + other_price = (count) * 5 * number + number * 5; + product.setPrice(Math.ceil(45 + other_price)); + } + + } + if ((width == 50 && length == 300 || width == 300 && length == 50) && count > 1 && number == 1 && role.indexOf("1045") == -1) { + for (Product product : priceList) { + product.setPrice(product.getPrice() - 10); + } + } + + return priceList; + } else if ("5".equals(kind)) {// 刻字 + Product pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(length * count * 0.32 > 40 ? length * count * 0.32 : 40)); + priceList.add(pro); + + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + // 7.27 海报、合版封套 *1.15 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.15)); + } + return priceList; + } else if ("11".equals(kind)) { + + } else { + // 单位‘米’计算价格 + if (!"4".equals(kind)) { + area = 0.0; + length = length / 100; + width = width / 100; + area = Double.valueOf(df.format(length * width * count)); + } + // 裱板 + if ("0".equals(kind)) { + priceList = new PosterPrice().acountPrice00(kind2, area, count, number); + } else if ("1".equals(kind)) {// 室内写真 + priceList = new PosterPrice().acountPrice01(kind2, area, count, number); + } else if ("2".equals(kind)) {// 户外写真 + if ("24".equals(kind2)) { + double base_price = 0; + double price = 0.00; + length = length * 100; + width = width * 100; + if (dto.getSize().contains(",")) {//套餐 + if ("100*30,100*45".equals(dto.getSize())) { + base_price = 200; + } + if ("120*30,120*65".equals(dto.getSize())) { + base_price = 230; + } + if ("150*30,150*65".equals(dto.getSize())) { + base_price = 270; + } + if ("180*30,180*65".equals(dto.getSize())) { + base_price = 300; + } + } else { + if ((width == 100 && length == 30) || (length == 100 && width == 30)) {//推荐尺寸 + base_price = 100; + } + if ((width == 100 && length == 45) || (length == 100 && width == 45)) { + base_price = 120; + } + if ((width == 120 && length == 30) || (length == 120 && width == 30)) { + base_price = 120; + } + if ((width == 120 && length == 65) || (length == 120 && width == 65)) { + base_price = 130; + } + if ((width == 150 && length == 30) || (length == 150 && width == 30)) { + base_price = 140; + } + if ((width == 150 && length == 65) || (length == 150 && width == 65)) { + base_price = 150; + } + if ((width == 180 && length == 30) || (length == 180 && width == 30)) { + base_price = 140; + } + if ((width == 180 && length == 65) || (length == 180 && width == 65)) { + base_price = 180; + } + } + price = base_price * dto.getCount(); + if (base_price == 0) { + area = 0.0; + area = width * length * dto.getCount() * 0.0001; + if (area <= 0.5) { + price = area * 334; + } + if (area > 0.5 && area <= 0.6) { + price = area * 280; + } + if (area > 0.6 && area <= 0.7) { + price = area * 250; + } + if (area > 0.7 && area <= 0.8) { + price = area * 220; + } + if (area > 0.8 && area <= 0.9) { + price = area * 200; + } + if (area > 0.9) { + price = area * 180; + } + price = Math.max(100, price); + } + + Product pro = new Product(); + pro.setCount(dto.getCount()); + pro.setPrice(Math.ceil(price * number)); + priceList.add(pro); + + } else { + + priceList = new PosterPrice().acountPrice02(kind2, area, count, number); + } + } else if ("3".equals(kind)) {// 布 + if (kind2.equals("11") || kind2.equals("12") || kind2.equals("13")) { + priceList = new PriceUtils().getDbPrice(kind2, width, length, count, priceList); + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * number)); + } + } else if (kind2.equals("10")) { + length *= 100; + width *= 100; + if (width > 160) { + width = 160.0; + } + priceList = new PosterPrice().acountPrice03(kind2, length, width, area, count, number, dto.getCraftBu()); + /* + * if(length == 300 && width == 50) { }else if(width <= 80){ for(Product product:priceList) { product.setPrice(Math.ceil(product.getPrice() * 1.15 * 0.8)); } }else { for(Product product:priceList) { product.setPrice(Math.ceil(product.getPrice())); } } + */ + if (dto.getZheye() != null && dto.getZheye() > 0) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + dto.getZheye() * 15)); + } + } + for (Product product : priceList) { + product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number)); + } + } else { + priceList = new PosterPrice().acountPrice03(kind2, length, width, area, count, number, dto.getCraftBu()); + } + + // 7.27 海报、合版封套 *1.15 + // 除550灯布/双喷布 + if (!"1".equals(kind2) && !"7".equals(kind2) && !"11".equals(kind2) && !"12".equals(kind2) && !"10".equals(kind2) && !"6".equals(kind2) && !"13".equals(kind2)) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.15)); + } + } + } else {// 展架 + priceList = new PosterPrice().acountPrice04(kind2, count, number); + wei = 0.00; + //美式 + if ("0".equals(kind2) || "1".equals(kind2) || "2".equals(kind2) || "3".equals(kind2) || "8".equals(kind2) || "9".equals(kind2)) { + wei = 2; + } + //门 + if ("4".equals(kind2) || "6".equals(kind2) || "7".equals(kind2) || "10".equals(kind2) || "11".equals(kind2)) { + wei = 2.5; + } + //易拉宝 + if ("12".equals(kind2) || "13".equals(kind2)) { + wei = 2; + } + for (Product product : priceList) { + product.setWeight(df.format(wei * product.getCount() * number)); + } + } + } + return priceList; + // 扇子 + case "18": + if (dto.getKindValue().equals("5")) { + dto.setKindValue("0"); + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.thanThousandPrice(dto); + + dto.setKindValue("5"); + } else if (!dto.getKindValue().equals("4")) { + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.thanThousandPrice(dto); + } else { + String[] list = dto.getCraft(); + if (list == null) { + dto.setKind1Value("1"); + } else { + dto.setKind1Value("2"); + } + + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.notePaperPrice(dto); + } + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + + // 异形工艺 + getCraft(dto, priceList, null, null, 0); + + if (dto.getKindValue().equals("5")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 0.1 * product.getCount())); + } + } + + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + // 根据款数重新算重量(重量在数据库中) + if (!StringUtils.isEmpty(priceList.get(0).getWeight())) { + for (Product product : priceList) { + product.setWeight(df.format(Double.valueOf(product.getWeight()) * number)); + } + } + return priceList; + // 画册 + case "19": + // 内页P数加上封面的4P + dto.setPcount(dto.getPcount() + 4); + if ("少数量".equals(dto.getKind())) { + priceList = new PictureAlbumPrice().getLessPrice(count, dto.getPcount()); + } else { + length = length * 10; + width = width * 10; + if (length <= 210 && width <= 140 || length <= 140 && width <= 210) { + if ("0".equals(kind2)) { + priceList = new PictureAlbumPrice().getPrice00(count, dto.getPcount()); + } else if ("1".equals(kind2)) { + priceList = new PictureAlbumPrice().getPrice01(count, dto.getPcount()); + } else { + priceList = new PictureAlbumPrice().getPrice02(count, dto.getPcount()); + } + } else if (length <= 285 && width <= 210 || length <= 210 && width <= 285) { + if ("0".equals(kind2)) { + priceList = new PictureAlbumPrice().getPrice10(count, dto.getPcount()); + } else if ("1".equals(kind2)) { + priceList = new PictureAlbumPrice().getPrice11(count, dto.getPcount()); + } else { + priceList = new PictureAlbumPrice().getPrice12(count, dto.getPcount()); + } + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 添加设计费.40元/P(封面4P也算设计费) + for (Product product : priceList) { + product.setPrice(product.getPrice() + dto.getPcount() * 40); + } + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + + String[] craftList = dto.getCraft(); + if (craftList != null) { + if ("设计".equals(craftList[0])) { + // 设计费 = 20*p数 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + dto.getPcount() * 20 * number)); + } + } + } + + return priceList; + // 包装盒 + case "20": + // 厘米转成毫米 + length = length * 10; + width = width * 10; + height = height * 10; + // 价格 + double priceArr[] = {20, 15, 13, 10, 9, 9}; + // 数量 + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + // 双插盒 + if ("0".equals(kind)) { + // 长=(长+宽)*2+20 + length = (length + width) * 2 + 20; + // 宽=(高+宽+宽+40) + width = height + width + width + 40; + + // 双插盒展开超过650*500MM的另行报价 + if (length >= 650 || width >= 500) { + return null; + } + } else {// 飞机盒 + // 长=(长+高*2*2)+10MM + length = (length + height * 2 * 2) + 10; + // 宽=(宽+高)*2+高+5MM) + width = (width + height) * 2 + height + 5; + + // 飞机盒展开超过900*600MM的另行报价 + if (length >= 900 || width >= 600) { + return null; + } + } + // 计算价格把毫米转成米 + length = length / 1000; + width = width / 1000; + Product pro = new Product(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(length * width * count * priceArr[countArr.length - 1] > 1100 ? length * width * count * priceArr[countArr.length - 1] : 1100)); + priceList.add(pro); + } else { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(length * width * countArr[i] * priceArr[i] > 1100 ? length * width * countArr[i] * priceArr[i] : 1100)); + priceList.add(pro); + } + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 透明PVC名片 + case "21": + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.thanThousandPrice(dto); + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setWeight(df.format(0.38 * 0.0855 * 1.3 * 0.054 * product.getCount() * number)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 桌贴 + case "22": + /* + * if ("0".equals(kind) || "10".equals(kind)) { priceList = new PriceUtils().getDeskSticker(priceList, width, length, count, number, dto.getCraftShua(), dto.getCraftJiao()); } else if ("1".equals(kind)) { // 产品的面积(平方米) area = length * width / 10000 * count; double price = 0.0; if (area <= 0.05) { price = 5000; } else if (area <= 0.1) { price = 1200; } else if (area <= 0.5) { price = 1000; } else if (area <= 0.8) { price = 800; } else if (area <= 1) { price = 600; } else if (area <= + * 1.5) { price = 400; } else { price = 300; } pro = new Product(); pro.setCount(count); pro.setPrice(Math.ceil(area * price > 100 ? area * price : 100)); priceList.add(pro); // 根据款数重新算价格 for (Product product : priceList) { product.setPrice(Math.floor(product.getPrice() * number)); } } + */ + /* + * if (priceList.size() >= 4) { priceList = priceList.subList(0, 4); } + */ + String[] ztCraft = {"背胶"}; + priceList = ZsPrice.getSmPrice(count, length, width, priceList, number, ztCraft, dto); + for (Product product : priceList) { + if (dto.getKindValue().equals("0") || dto.getKindValue().equals("10")) { + wei = 0.38; + } else { + wei = 0.84; + } + product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * 1.3 * number)); + } + return priceList; + // 0.38PVC亮光异型卡片 + case "PVC异型卡片": + // 印刷价格 + area = length * width / 10000; + priceList = new CardPrice().getPrice(count, area, dto.getKindValue()); + // 根据款数重新算价格 + if (dto.getKindValue().equals("3")) {// 0.76价格翻倍 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 1.8)); + } + } + + if ((length == 8 && width == 4) || (length == 4 && width == 8)) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 1.2)); + } + } + List craft_list = Arrays.asList(dto.getCraft()); + for (Product product : priceList) { + double base = 1; + if (craft_list.contains("异形")) { + base = 1.5; + } + if (dto.getKindValue().equals("3")) { + wei = 0.76; + } else { + wei = 0.38; + } + product.setPrice(Math.floor(product.getPrice() * number * base)); + + product.setWeight(df.format(wei * length * width * 1.3 * product.getCount() / 10000 * number)); + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 打印价格 + /* + * List priceList2 = new PriceUtils().getDeskSticker(new ArrayList(), width, length, count, number, dto.getCraftShua(), dto.getCraftJiao()); System.out.println(priceList.get(0).getPrice()); + */ + /* System.out.println(priceList2.get(0).getPrice()); */ + // 比较哪个便宜 + /* + * if (priceList.get(0).getPrice() > priceList2.get(0).getPrice()) { // Double minPrice = Math.min(priceList.get(0).getPrice(), // priceList2.get(0).getPrice()); priceList = new ArrayList(); Product product = new Product(); product.setCount(count); product.setPrice(priceList2.get(0).getPrice()); priceList.add(product); } + */ + return priceList; + // 滴塑 + case "23": + return priceList = PriceUtils.getDisuPrice(priceList, width, length, count, number, dto); + // 透明PVC名片---会员卡 + case "24": + if (count <= 10000) { + priceList = productMapper.getThanPrice(dto); + } else { + priceList = productMapper.thanThousandPrice(dto); + } + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + getCraft(dto, priceList, null, null, 0); + + // 根据款数重新算价格 + for (Product product : priceList) { + product.setWeight(df.format(0.76 * 1.3 * 0.0855 * 0.054 * product.getCount() * number)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 卡片-门挂牌 + case "25": + priceList = productMapper.getThanPrice(dto); + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + craft = dto.getCraft(); + if (!StringUtils.isEmpty(craft)) { + for (int i = 0; i < craft.length; i++) { + // 门挂牌双面覆哑膜 ,比没覆膜价格*1.5倍 + if ("双面覆哑膜".equals(craft[i])) { + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.5)); + } + } + } + } + + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 毕业证书 + case "26": + priceList = new PriceUtils().getDiploma(count); + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 暖心贴 + case "27": + priceList = productMapper.getThanPrice(dto); + /* + * if (priceList.size() >= 4) { priceList = priceList.subList(0, 4); } + */ + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 彩色信纸 + case "彩色信纸": + length = length * 10; + width = width * 10; + if (length <= 140 && width <= 100 || length <= 100 && width <= 140) { + dto.setKindValue("2"); + } else if (length <= 210 && width <= 140 || length <= 140 && width <= 210) { + dto.setKindValue("1"); + } else if (length <= 285 && width <= 210 || length <= 210 && width <= 285) { + dto.setKindValue("0"); + } + priceList = productMapper.getThanPrice(dto); + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + /** + * 报价10本的*2.2 20本的*1.9 50本的*1.7 100本的*1.6 200本以上*1.5 + */ + for (Product product : priceList) { + if (product.getCount() == 10) { + product.setPrice(Math.ceil(product.getPrice() * 2.1)); + } else if (product.getCount() == 20) { + product.setPrice(Math.ceil(product.getPrice() * 1.8)); + } /* + * else if (product.getCount() == 50) { product.setPrice(Math.ceil(product.getPrice())); } else if (product.getCount() == 100) { product.setPrice(Math.ceil(product.getPrice() * 1.6)); } else if (product.getCount() >= 200) { product.setPrice(Math.ceil(product.getPrice() * 1.5)); } + */ + } + + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + // 复印纸 + case "复印纸": + priceList = new PriceUtils().getCopyPaper(kind, kind2, kind3, count, size); + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "婚礼卡": + priceList = new PriceUtils().getWeddingCardPrice(length, width, count, number, dto.getCraftMo(), dto.getCraftShua()); + return priceList; + case "刮刮卡": + // 选了【自定义尺寸】 + if (dto.isSwitchSize()) { + + } else { + // 300克铜版纸 + dto.setKindValue("2"); + + // 不覆膜 + dto.setKind1Value("0"); + craft = dto.getCraft(); + if (!StringUtils.isEmpty(craft)) { + for (int i = 0; i < craft.length; i++) { + if ("双面覆哑膜".equals(craft[i])) { + // 覆膜 + dto.setKind1Value("1"); + craft[i] = null; + break; + } + } + } + // 产品位数 + int min = getNum(length, width); + // 根据位数算价格(最多4个位) + dto.setKind2Value(String.valueOf(min)); + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + else + priceList = productMapper.thanThousandPrice(dto); + // 产品价格倍数 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * product.getPriceMultiple())); + } + if (!StringUtils.isEmpty(craft)) { + int isYx = 0; + for (int n = 0; n < craft.length; n++) { + if ("模切".equals(craft[n])) { + isYx = 1; + } + } + if (isYx == 1) { + for (Product product : priceList) { + double moPrice = product.getCount() * 0.06 > 40 ? product.getCount() * 0.06 : 40; + product.setPrice(Math.ceil(product.getPrice() + moPrice)); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.02)); + } + } + } + // 刮刮膜价格。2分钱一张 + + } + // 加工艺的价格 --有覆膜,带尺寸过去(毫米) + // getCraft(dto, priceList, null, null, 0); + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + + return priceList; + case "66": + String craftTang = dto.getCraftTang().replace("双面烫银", "双面烫金"); + if (!kind.equals("500克黑卡")) { + kind = "500克带金边"; + if (craftTang.indexOf("凹凸") > -1) { + dto.setKindValue("2"); + } else { + dto.setKindValue("1"); + } + } else { + if (craftTang.indexOf("凹凸") > -1) { + dto.setKindValue("4"); + } else { + dto.setKindValue("3"); + } + } + + + if (count <= 10000) + priceList = productMapper.getThanPrice(dto); + // 加工艺的价格 --有覆膜,带尺寸过去(毫米) + /*getCraft(dto, priceList, null, null, 0);*/ + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(0.09 * 0.054 * product.getCount() * number)); + } + return priceList; + case "餐垫纸": + priceList = new PriceUtils().getPlaceMatPrice(kind, length, width, count); + // 根据款数重新算价格 + for (Product product : priceList) { + if (kind.equals("0")) { + wei = 0.08; + } else { + wei = 0.05; + } + product.setWeight(df.format(length * width * product.getCount() / 10000 * number * wei)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "节目单": + priceList = productMapper.getThanPrice(dto); + if (StringUtils.isEmpty(dto.getCraft())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() - 20)); + product.setWeight(df.format(length * width * product.getCount() / 10000 * number * 0.3)); + } + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "硫酸纸吊牌": + priceList = new PriceUtils().getAcidTagsPrice(length, width, dto.getSize1(), count); + // 根据款数重新算价格 + area = length * width / 10000; + String size1 = dto.getSize1(); + double length1 = Double.valueOf(size1.substring(0, size1.indexOf("*"))); + double width1 = 0; + if (size1.indexOf(("*"), size1.indexOf("*") + 1) == -1) { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1)); + } else { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1, size1.indexOf(("*"), size1.indexOf("*") + 1))); + } + double area1 = length1 * width1 / 10000; + for (Product product : priceList) { + product.setWeight(df.format(product.getCount() * number * (0.135 * area + area1 * 0.3))); + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "杯垫": + // 单个产品的面积 + area = length * width / 10000; + // 300克 + if ("3".equals(kind)) { + // 异形模切价格 + priceList = new PriceUtils().tagClothes300PriceCraftMo(dto, number, width, length, area, count, priceList); + if ("单面烫金".equals(dto.getCraftTang())) { + // 有2个尺寸带烫金 + if (!StringUtils.isEmpty(dto.getSize1())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 > 85 * 2 ? product.getPrice() * 0.09 * 2 : 85 * 2))); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 > 85 ? product.getPrice() * 0.09 : 85))); + } + } + } else if ("双面烫金".equals(dto.getCraftTang())) { + // 有2个尺寸带烫金 + if (!StringUtils.isEmpty(dto.getSize1())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 * 2 > 170 * 2 ? product.getPrice() * 0.09 * 2 * 2 : 170 * 2))); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + (product.getPrice() * 0.09 * 2 > 170 ? product.getPrice() * 0.09 * 2 : 170))); + } + } + } + } else if ("6".equals(kind)) { + priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count); + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 1.3)); + } + } else { + priceList = new PriceUtils().tags600Price(dto, kind, kind2, area, count); + // 服装吊牌里面的900克吊牌把价格*1.3倍 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 1.3)); + if (product.getCount() <= 2000) { + product.setPrice(Math.floor(product.getPrice() * 1.1)); + } + if (product.getCount() > 2000 && product.getCount() <= 5000) { + product.setPrice(Math.floor(product.getPrice() * 1.08)); + } + if (product.getCount() > 5000) { + product.setPrice(Math.floor(product.getPrice() * 1.06)); + } + } + } + // 根据款数重新算价格 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + if ("3".equals(kind)) { + wei = 0.3; + } else { + wei = 0.6; + } + product.setWeight(df.format(wei * area * product.getCount() * number)); + } + return priceList; + case "锦旗": + // 单价*产品数量*款数 + priceList = new PriceUtils().getJQPrice(kind3, number, width, length, count, priceList); + return priceList; + case "号码布": + // 单价*产品数量*款数 + priceList = new PriceUtils().getHmbPrice(kind3, number, width, length, count, priceList); + return priceList; + case "彩旗": + // 单价*产品数量*款数 + priceList = new PriceUtils().getCQPrice(number, width, length, count, priceList); + return priceList; + case "硫酸纸": + // 单价*产品数量*款数 + if (dto.getStickerKind().equals("常用")) { + if (dto.getKindValue().equals("2")) { +// if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { +// if ("直角".equals(dto.getCraft()[0])) { +// if ("彩色".equals(dto.getKind())) { +// dto.setKind1Value("2"); +// } else { +// dto.setKind1Value("1"); +// } +// } else { +// if ("彩色".equals(dto.getKind())) { +// dto.setKind1Value("4"); +// } else { +// dto.setKind1Value("3"); +// } +// } +// if ((length <= 5 && width <= 3) || (length <= 3 && width <= 5)) { +// dto.setKindValue("1"); +// } else if ((length <= 6.8 && width <= 3) || (length <= 3 && width <= 6.8)) { +// dto.setKindValue("2"); +// } else if ((length <= 8 && width <= 3) || (length <= 3 && width <= 8)) { +// dto.setKindValue("3"); +// } else if ((length <= 7 && width <= 3.5) || (length <= 3.5 && width <= 7)) { +// dto.setKindValue("4"); +// } else { +// dto.setKindValue("5"); +// } +// priceList = productMapper.getThanPrice(dto); +// } else { + priceList = new PriceUtils().get80LszPrice(dto, width, length, count, priceList); +// } + } else { + priceList = new PriceUtils().get80LszPrice(dto, width, length, count, priceList); + } + // 款数计算 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } else {// 打印的价格和pvc不干胶打印价格一样--23.8.17更新后取消这个 + priceList = lessSticker(dto, proType, number, width, length, count, priceList); + return priceList; + } + // 重量 + for (Product product : priceList) { + if (dto.getKindValue().equals("1")) { + wei = 0.08; + } else { + wei = 0.135; + } + product.setWeight(df.format(number * length * width * product.getCount() / 10000 * wei)); + } + return priceList; + case "亚克力": + priceList = new PriceUtils().getYklPrice(dto, number, width, length, count, priceList); + for (Product product : priceList) { + if ((dto.getKind2Value().equals("4") || dto.getKind2Value().equals("5"))) { + if (dto.getCraftShua().equals("双面印刷")) { + product.setPrice(Math.floor(product.getPrice() * 1.8 * number)); + } else { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } else { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } + return priceList; + case "帆布": + priceList = new PriceUtils().getFbPrice(dto, number, width, length, count, priceList); + for (Product product : priceList) { + if (product.getCount() != null && number != null) { + product.setWeight(df.format(0.28 * width * length * product.getCount() / 10000 * number)); + } + } + return priceList; + case "29"://慕斯垫 + priceList = productMapper.getMsdPrice(dto); + + if (priceList.size() >= 4) { + priceList = priceList.subList(0, 4); + } + + if ("烫金带凹凸".equals(dto.getCraftTang())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 2)); + } + } + + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + + if (kind.equals("0") || kind.equals("4") || kind.equals("5")) { + area = (double) (9 * 9); + } else if (kind.equals("1")) { + area = (double) (9.5 * 9.5); + } else { + area = (double) (12 * 8); + } + + for (Product product : priceList) { + product.setWeight(df.format(0.8 * area * product.getCount() / 10000 * number)); + } + + return priceList; + case "串旗": + priceList = new PriceUtils().getCqPrice(width, length, count, number, priceList); + if (dto.getCraft() != null) { + int type = 0; + for (int index = 0; index < dto.getCraft().length; index++) { + if ("木棍".equals(dto.getCraft()[index])) { + type = 1; + } + } + if (type == 1) {// 木棍多收3块 + for (Product p : priceList) { + p.setPrice(p.getPrice() + 3 * number * count); + } + } + } + return priceList; + case "桌布": + width = width / 100; + length = length / 100; + priceList = new PriceUtils().getTableClothPrice(length, width, count, number, priceList); + return priceList; + case "仿古旗": + area = length * width * count / 10000; + priceList = new FgqPrice().getPrice(count, area, priceList, dto.getCraft(), dto.getKindValue(), number); + for (Product product : priceList) { + if (dto.getCraft()[0].equals("单面")) { + product.setPrice(product.getPrice() > 40 ? product.getPrice() : 40); + } else { + product.setPrice(product.getPrice() > 45 ? product.getPrice() : 45); + } + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "手拉旗": + /* + * if(kind.equals("1")) { if(length == 70 && width == 24) { priceList = new FgqPrice().getSlqSpeicPrice(count, priceList, 1); }else if(length == 50 && width == 17) { priceList = new FgqPrice().getSlqSpeicPrice(count, priceList, 2); }else { priceList = new FgqPrice().getSlqPrice(count, priceList); } }else { + */ + priceList = new FgqPrice().getSlqPrice(count, priceList); + /* } */ + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + + product.setWeight(df.format(length * width * product.getCount() / 10000 * number * 0.075)); + } + return priceList; + case "筷子套": + priceList = new KztPrice().getPrice(count, length, priceList); + for (Product product : priceList) { + product.setWeight(df.format(length * 3 * number * 0.157)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + return priceList; + case "一次性纸杯": + priceList = new PaperCupPrice().getPrice(count, priceList); + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(6 * product.getCount() / 1000 * number)); + } + return priceList; + case "PVC证件": + // 价格按照大纸裁 + priceList = new ZsPrice().getPrice(count, length, width, priceList, number, dto.getCraftSheng()); + for (Product product : priceList) { + if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) { + wei = 0.84; + } else { + wei = 1; + } + length = length / 10; + width = width / 10; + product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3)); + } + return priceList; + case "数码PVC": + // 价格按照大纸裁 + priceList = ZsPrice.getSmPrice(count, length, width, priceList, number, dto.getCraft(), dto); + for (Product product : priceList) { + if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) { + wei = 0.38; + } else if (dto.getKindValue().equals("1") || dto.getKindValue().equals("2") || dto.getKindValue().equals("3")) { + wei = 0.84; + } else { + wei = 1; + } + product.setWeight(df.format(wei * length * width * product.getCount() / 10000 * number * 1.3)); + } + return priceList; + case "班旗": + priceList = new BqPrice().getPrice(count, length, priceList, number, dto.getCraftShua(), dto.getCraft()); + List craLists = !StringUtils.isEmpty(dto.getCraft()) ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); + wei = 0.0; + if (craLists.contains("旗杆")) { + wei = 1; + } + for (Product product : priceList) { + if (craLists.contains("手绘")) { + product.setPrice(150.00 * number); + } + product.setWeight(df.format(0.075 * length * width * product.getCount() / 10000 * number + product.getCount() * wei)); + } + return priceList; + case "卡贴": + int min = getNum(length, width); + dto.setProTypeValue("4"); + priceList = getHekaPrice(min, dto, priceList, count); + for (Product product : priceList) { + double dNum = 1; + if (product.getCount() / 1000 > 1) { + dNum = Math.floor(product.getCount() / 1000); + } + product.setPrice(Math.ceil(product.getPrice() + dNum * 3)); + } + //工艺计算 + if (!StringUtils.isEmpty(dto.getCraft())) { + List craList = Arrays.asList(dto.getCraft()); + if (craList.contains("双面覆哑膜")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() * 1.3)); + } + } + + if (craList.contains("模切")) { + if (min < 3) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 25 + 0.04 * product.getCount())); + } + } else if (min < 16) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 50 + 0.04 * product.getCount())); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 30 + 50 + 0.04 * product.getCount())); + } + } + } + } + + // 根据款数重新算价格/计算重量 + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.3 * 0.86)); + } + return priceList; + case "会员卡卡套": + priceList = new FerruleUtil().getPrice(length, count, priceList); + if (number > 1) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } + return priceList; + case "手提杯托": + area = length * width / 10000; + if ("250克白卡纸".equals(dto.getKind())) { + priceList = CupHolderUtil.getPrice(area, count, priceList); + for (Product product : priceList) { + product.setWeight(df.format(number * length / 100 * width / 100 * product.getCount() * 0.25)); + } + + } else { + priceList = CupHolderUtil.getPvcPrice(size, dto.getKind(), count, priceList); + for (Product product : priceList) { + product.setWeight(df.format(0.38 * 0.0855 * 1.3 * 0.054 * product.getCount() * number)); + } + } + if (number > 1) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } + + return priceList; + case "天幕": + area = length * width / 10000; + if (dto.getCraftShua().contains("空白") && dto.getCraftQie() != null && dto.getCraftQie().contains("模切")) { + dto.setCraftShua("定制"); + } + priceList = CanopyUtil.getPrice(area, count, priceList, dto.getKindValue(), dto.getCraftShua()); + if (number > 1) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } + if (dto.getShuliang() != null) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() + dto.getShuliang() * 50)); + product.setWeight(String.valueOf(Double.parseDouble(product.getWeight()) + dto.getShuliang() * 3.3)); + } + } + + return priceList; + case "挂布": + area = length * width / 10000; + + priceList = AngClothUtil.getPrice(area, count, priceList, dto.getCraft()); + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * number)); + double other_price = 0; + if (area <= 0.25) { + other_price = (count) * 5 * number; + product.setPrice(Math.floor(45 + other_price)); + } + product.setWeight(df.format(area * product.getCount() * number * 0.06)); + } + + return priceList; + case "定制衫": + double basePrice = 0; + double banfei = 0; + if ("YP".equals(dto.getKindValue())) { + basePrice = 19; + } + if ("XW".equals(dto.getKindValue())) { + basePrice = 31; + } + if ("EP".equals(dto.getKindValue())) { + basePrice = 31; + } + if ("ZT".equals(dto.getKindValue())) { + basePrice = 57; + } + if (!StringUtils.isEmpty(dto.getSize())) { + String[] size_list = dto.getSize().split(","); + for (int i = 0; i < size_list.length; i++) { + double sizePirce = 0; + if ("10*10".equals(size_list[i])) { + sizePirce = 4; + } + if ("15*15".equals(size_list[i])) { + sizePirce = 6; + } + if ("15*20".equals(size_list[i])) { + sizePirce = 8; + } + if ("20*20".equals(size_list[i])) { + sizePirce = 10; + } + if ("25*15".equals(size_list[i])) { + sizePirce = 10; + } + if ("25*25".equals(size_list[i])) { + sizePirce = 12; + } + if ("30*30".equals(size_list[i])) { + sizePirce = 14; + } + if ("30*40".equals(size_list[i])) { + sizePirce = 16; + } + + basePrice += sizePirce; + } + + } + if (dto.getPo_number() != null && dto.getCo_number() != null) { + if (dto.getPo_number() > 0 || dto.getCo_number() > 0) { + basePrice += dto.getPo_number() * 4 * dto.getCo_number(); + banfei = dto.getPo_number() * 40 * dto.getCo_number(); + } + } + count = dto.getCount(); + + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.max(basePrice * count * number, 30) + banfei); + priceList.add(pro); + return priceList; + case "手绘": + double price = 0; + if ("1".equals(dto.getKindValue())) { + if (number >= 1 && number <= 4) { + price = 80; + } else if (number >= 5 && number <= 10) { + price = 75; + } else if (number >= 11 && number <= 20) { + price = 70; + } else { + price = 65; + } + } else if ("2".equals(dto.getKindValue())) { + price = 70; + } else if ("3".equals(dto.getKindValue())) { + price = 200; + } else if ("4".equals(dto.getKindValue())) { + if ("1".equals(dto.getKind1Value())) { + price = 80; + } + if ("2".equals(dto.getKind1Value())) { + price = 160; + } + } else if ("5".equals(dto.getKindValue())) { + if ("1".equals(dto.getKind1Value())) { + price = 80; + } + if ("2".equals(dto.getKind1Value())) { + price = 160; + } + } else if ("6".equals(dto.getKindValue())) { + if ("1".equals(dto.getKind1Value())) { + price = 80; + } + if ("2".equals(dto.getKind1Value())) { + price = 98; + } + } else if ("7".equals(dto.getKindValue())) { + price = 150; + } else if ("8".equals(dto.getKindValue())) { + if ("1".equals(dto.getKind1Value())) { + price = 80; + } + if ("2".equals(dto.getKind1Value())) { + price = 198; + } + } else if ("9".equals(dto.getKindValue())) { + price = 150; + } + + pro = new Product(); + pro.setCount(count); + pro.setPrice(price * number); + priceList.add(pro); + return priceList; + case "奖牌": + String kindValue = dto.getKindValue(); + String name = dto.getKind1Value(); + price = 0.0; + Double zhongliang = 0.0; + + if ("水晶".equals(kindValue)) { + if ("酸洗五角星".equals(name)) { + price = Math.ceil(98 * dto.getCount()); + zhongliang = 2.9; + } + if ("炫彩刀片".equals(name)) { + price = Math.ceil(98 * dto.getCount()); + zhongliang = 2.9; + } + if ("金色刀片".equals(name)) { + price = Math.ceil(120 * dto.getCount()); + zhongliang = 2.9; + } + if ("尖角".equals(name)) { + price = Math.ceil(160 * dto.getCount()); + zhongliang = 2.3; + } + if ("斜面6角星".equals(name)) { + price = Math.ceil(90 * dto.getCount()); + zhongliang = 2.6; + } + if ("八角".equals(name)) { + price = Math.ceil(108 * dto.getCount()); + zhongliang = 3.1; + } + if ("蓝色梦想".equals(name)) { + price = Math.ceil(120 * dto.getCount()); + zhongliang = 2.9; + } + if ("蓝色三条线".equals(name)) { + price = Math.ceil(98 * dto.getCount()); + zhongliang = 2.9; + } + if ("蓝色弯弯".equals(name)) { + price = Math.ceil(98 * dto.getCount()); + zhongliang = 2.2; + } + if ("斜面5角星".equals(name)) { + price = Math.ceil(88 * dto.getCount()); + zhongliang = 2.5; + } + if ("麦穗圆型".equals(name)) { + price = Math.ceil(108 * dto.getCount()); + zhongliang = 2.9; + } + if ("酸洗凹面".equals(name)) { + price = Math.ceil(118 * dto.getCount()); + zhongliang = 2.9; + } + if ("月牙".equals(name)) { + price = Math.ceil(108 * dto.getCount()); + zhongliang = 2.9; + } + if ("大拇指".equals(name)) { + price = Math.ceil(60 * dto.getCount()); + zhongliang = 2.9; + } + if ("宝剑".equals(name)) { + price = Math.ceil(108 * dto.getCount()); + zhongliang = 2.9; + } + if ("蓝色五角星".equals(name)) { + price = Math.ceil(128 * dto.getCount()); + zhongliang = 2.9; + } + } else { + List carfts = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); + if ("20*25".equals(dto.getSize())) { + if (carfts.contains("直边")) { + price = Math.ceil(33 * dto.getCount()); + } else { + price = Math.ceil(39 * dto.getCount()); + } + zhongliang = 1.3; + } + if ("24*31".equals(dto.getSize())) { + if (carfts.contains("直边")) { + price = Math.ceil(36 * dto.getCount()); + } else { + price = Math.ceil(45 * dto.getCount()); + } + zhongliang = 1.6; + } + if ("25*35".equals(dto.getSize())) { + if (carfts.contains("直边")) { + price = Math.ceil(39 * dto.getCount()); + } else { + price = Math.ceil(54 * dto.getCount()); + } + zhongliang = 1.7; + } + if ("30*40".equals(dto.getSize())) { + if (carfts.contains("直边")) { + price = Math.ceil(42 * dto.getCount()); + } else { + price = Math.ceil(66 * dto.getCount()); + } + zhongliang = 2.7; + } + if ("35*50".equals(dto.getSize())) { + if (carfts.contains("直边")) { + price = Math.ceil(57 * dto.getCount()); + } else { + price = Math.ceil(75 * dto.getCount()); + } + zhongliang = 3.6; + } + if ("40*60".equals(dto.getSize())) { + if (carfts.contains("直边")) { + price = Math.ceil(75 * dto.getCount()); + } else { + price = Math.ceil(108 * dto.getCount()); + } + zhongliang = 4.8; + } + } + pro = new Product(); + pro.setCount(count); + pro.setPrice(price * number); + pro.setWeight(df.format(Math.ceil(zhongliang * dto.getCount() * number))); + priceList.add(pro); + return priceList; + default: + break; + } + return null; + } + + private List lessSticker(Product dto, String kind, Integer number, Double width, Double length, + int count, List stickersList) { + double price = 0.0; + // 一张大纸收费 + double addPrice = 0.0; + switch (kind) { + case "0":// A级铜版纸 + case "4":// 哑膜A级铜版纸 + price = 30; + addPrice = 6; + break; + case "1":// PVC + case "2":// 透明 + case "PVC覆哑膜": + case "3":// 复古牛皮纸贴纸 + case "7":// 书写纸 + case "PP合成纸": + price = 45; + addPrice = 9; + break; + case "5":// 哑金 + case "6":// 哑银 + case "亮金": + case "亮银": + price = 45; + addPrice = 10; + break; + case "银平光": + case "金平光": + case "拉丝金": + case "拉丝银": + case "珠光冰白纸": + case "美纹纸": + case "红洒金": + case "飘金超白不干胶": + case "白散金": + price = 50; + addPrice = 10; + break; + case "美纹纸散金": + price = 50; + addPrice = 10; + break; + case "易碎纸不干胶": + case "静电贴": + price = 50; + addPrice = 11; + break; + case "树纹纸": + case "刚古水纹超白": + case "布纹纸超白": + case "草香纸": + case "美纹散金纸": + price = 50; + addPrice = 5.5; + break; + case "硫酸纸": + price = 45; + addPrice = 5.5; + break; + } + stickersList.add(new PriceUtils().getA(kind, length, width, count, price, addPrice, number, dto.getCraftTang(), dto.getYinbai())); + if (dto.getN_mq_num() != null && dto.getN_mq_num() >= 1) { + double base_price = 6 + 4; + + for (Product product : stickersList) { + product.setPrice(product.getPrice() + ((dto.getN_mq_num()) * base_price)); + } + } + if (number > 1) { + double desFee = 0; + if (dto.getP() == 1) { + desFee = 0.6; + } else if (dto.getP() == 2 || dto.getP() == 3) { + desFee = 0.8; + } else if (dto.getP() == 4) { + desFee = 1.2; + } else if (dto.getP() == 5) { + desFee = 2; + } else { + desFee = 5; + } + for (Product product : stickersList) { + if ("0".equals(kind) && "纯烫金".equals(dto.getCraftTang())) { + product.setPrice(product.getPrice() * number); + } else { + product.setPrice(Math.floor(product.getPrice() + desFee * number)); + } + } + + //price = price + (number - 1) * 15;原来的设计费计算 + } + return stickersList; + } + + private List normalSticker(Product dto, String kind, Integer number, Double area, Double width, Double + length, int count, String oldKind, List stickersList) { + // 小于21cm的查询数据库-数量在500以上 + if (width < 21 && length < 21) { + dto.setCount(count); + // 9*5.4以内价格一致(查询数据库) + if ((length <= 9 && width > 5 && width <= 5.4) || (width <= 9 && length > 5 && length <= 5.4)) { + dto.setLength(Math.floor(length)); + dto.setWidth(Math.floor(width)); + } else { + // 小数向上取整 + dto.setLength(Math.ceil(length)); + dto.setWidth(Math.ceil(width)); + } + switch (kind) { + // 铜版纸不干胶 + case "0": + // 带1厘米的尺寸,都变成2 + if (1 < length && length < 2) { + length = Math.ceil(length); + } + if (1 < width && width < 2) { + width = Math.ceil(width); + } + // 小数部分,四舍五入 + length = (double) Math.round(length); + width = (double) Math.round(width); + // 尺寸小数部分四舍五入后的面积 + double roundArea = length * width / 10000; + // 一个名片位内做特价:75折,价格在前端写死 + if (length == 1 && width == 1) { + int priceArr[] = {30, 35, 50, 55, 100, 180, 270, 370, 470, 570}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if ((length == 2 && width == 1) || (length == 1 && width == 2)) { + int priceArr[] = {35, 40, 55, 60, 110, 190, 280, 380, 480, 580}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if ((length > 2 && length <= 5 && width == 1) || (width > 2 && width <= 5 && length == 1)) { + int priceArr[] = {35, 40, 55, 70, 120, 210, 308, 435, 555, 683}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if ((length > 1 && length <= 3 && width == 2) || (width > 1 && width <= 3 && length == 2)) { + int priceArr[] = {35, 40, 55, 70, 120, 210, 308, 435, 555, 683}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if ((length > 3 && length <= 5 && width == 2) || (width > 3 && width <= 5 && length == 2)) { + int priceArr[] = {35, 40, 55, 70, 120, 220, 348, 492, 642, 798}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if ((length >= 3 && length <= 5 && width == 3) || (length == 3 && width <= 5 && width >= 3)) { + int priceArr[] = {35, 40, 55, 70, 120, 220, 348, 492, 642, 798}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if (length == 4 && width == 4) { + int priceArr[] = {35, 40, 55, 70, 120, 220, 348, 492, 642, 798}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if ((length == 5 && width == 4) || (length == 4 && width == 5)) { + int priceArr[] = {35, 40, 55, 70, 150, 240, 420, 600, 790, 980}; + stickersList = new AStickersPrice().f_getPrice(priceArr, count, dto.getCraftMo()); + } else if (((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9))) { + stickersList = new AStickersPrice().oneCradPrice(count, dto.getRole()); + } /* + * else if ((length == 1 && width <= 20) || (width == 1 && length <= 20)) { stickersList = new AStickersPrice().getPriceLess20(count); } else if ((length == 1 && width <= 48) || (width == 1 && length <= 48)) { stickersList = new AStickersPrice().getPriceLess48(count); } else if ((length == 1 && width <= 60) || (width == 1 && length <= 60)) { stickersList = new AStickersPrice().getPriceLess60(count); } else if ((length == 1 && width <= 70) || (width == 1 && length <= 70)) { + * stickersList = new AStickersPrice().getPriceLess70(count); } else if ((length == 1 && width <= 80) || (width == 1 && length <= 80)) { stickersList = new AStickersPrice().getPriceLess80(count); } else if ((length == 1 && width <= 90) || (width == 1 && length <= 90)) { stickersList = new AStickersPrice().getPriceLess90(count); } else if ((length == 1 && width <= 100) || (width == 1 && length <= 100)) { stickersList = new AStickersPrice().getPriceLess100(count); } + */ else if (area <= 0.003) { + // 未四舍五入的面积按照固定的。 + stickersList = new AStickersPrice().getPrice(count); + } else { + stickersList = new AStickersPrice().getPrice(count, roundArea, dto.getRole()); + } + + break; + // PVC.透明不干胶 亮膜 + case "1": + case "2": + if (count <= 10000) { + // 透明和PVC的价格一致,数据库是pvc的价格,设置‘1’ + dto.setKindValue("1"); + stickersList = productMapper.getThanPrice(dto); + } else { + // 1*1,2*1 价格调整成和3*1一致 + if (area < 0.0003) { + area = 0.0003; + } + stickersList = new PVCStickersPrice().getPrice(count, area); + } + + break; + // 复古牛皮纸 + case "3": + // 10*10以内,数量小于50000个查询数据库 || 10*10 - 20*20 之间的,10000以内查询数据库 + if ((width <= 10 && length <= 10 && count <= 50000) || ((width > 10 || length > 10) && count <= 10000)) { + stickersList = productMapper.getThanPrice(dto); + } else if ((width <= 10 && length <= 10 && count > 50000) || ((width > 10 || length > 10) && count > 10000)) { + stickersList = new NiuStickersPrice().getPrice(count, area); + } + + // PP合成纸覆亮膜是牛皮纸价格的0.8倍 + if ("PP合成纸".equals(oldKind)) { + dto.setKindValue(oldKind); + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 0.8)); + } + + if (("覆哑膜".equals(dto.getCraftMo()))) { + for (Product product : stickersList) { +// if (product.getCount() <= 1000) { +// product.setPrice(Math.ceil(product.getPrice() + 10)); +// } else { +// product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.01)); +// } + } + } + } + break; + // 铜版纸不干胶覆哑膜 + case "4": + // 带1厘米的尺寸,都变成2 + if (1 < length && length < 2) { + length = Math.ceil(length); + } + if (1 < width && width < 2) { + width = Math.ceil(width); + } + // 小数部分,四舍五入 + length = (double) Math.round(length); + width = (double) Math.round(width); + // 尺寸小数部分四舍五入后的面积 + roundArea = length * width / 10000; + + // 调整成A级铜版纸覆亮膜价格*1.1 + if (((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9))) { + stickersList = productMapper.getThanPrice(dto); + } else if ((length == 1 && width <= 20) || (width == 1 && length <= 20)) { + stickersList = new AStickersPrice().getPriceLess20(count); + } else if ((length == 1 && width <= 48) || (width == 1 && length <= 48)) { + stickersList = new AStickersPrice().getPriceLess48(count); + } else if ((length == 1 && width <= 60) || (width == 1 && length <= 60)) { + stickersList = new AStickersPrice().getPriceLess60(count); + } else if ((length == 1 && width <= 70) || (width == 1 && length <= 70)) { + stickersList = new AStickersPrice().getPriceLess70(count); + } else if ((length == 1 && width <= 80) || (width == 1 && length <= 80)) { + stickersList = new AStickersPrice().getPriceLess80(count); + } else if ((length == 1 && width <= 90) || (width == 1 && length <= 90)) { + stickersList = new AStickersPrice().getPriceLess90(count); + } else if ((length == 1 && width <= 100) || (width == 1 && length <= 100)) { + stickersList = new AStickersPrice().getPriceLess100(count); + } else if (area <= 0.003) { + // 未四舍五入的面积按照固定的。 + stickersList = new AStickersPrice().getPrice(count); + } else { + stickersList = new AStickersPrice().getPrice(count, roundArea, dto.getRole()); + } + + // A级铜版纸覆亮膜价格*1.2 + for (Product product : stickersList) { + if (length == 6 && width == 6) { + product.setPrice(Math.ceil(product.getPrice() * 1.2) + 35); + } else { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + } + // 亮膜做特价,有“kindLabel”标识,哑膜把标识去掉 + product.setKindLabel(null); + } + break; + // 哑金不干胶 + case "5": + /* + * if ("印2色+凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 280, 300, 350, 460, 520, 660, 1100 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 280, 320, 450, 660, 780, 900, 1500 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 340, 500, 850, 1100, 1550, 1700, 2500 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("加凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int + * priceArr1[] = { 170, 200, 230, 310, 360, 420, 710 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 200, 240, 350, 440, 560, 670, 1000 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 240, 380, 620, 800, 940, 1050, 1960 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); }else { + */ + // stickersList = new YaJinStickersPrice().getPriceNoAoTu(length, width, count); + dto.setKindValue("1"); + stickersList = productMapper.getThanPrice(dto); + if (("加凹凸".equals(dto.getAotu())) || ("纯烫金".equals(dto.getAotu()))) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 2.3)); + } + } else if (("印2色".equals(dto.getAotu()))) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 2.1)); + } + } /* + * else if ("印2色+凹凸".equals(dto.getAotu())){ for (Product product : stickersList) { product.setPrice(Math.ceil(product.getPrice() * 2.)); } } + */ else { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 2)); + } + } + /* } */ + if (stickersList == null) + return stickersList; + break; + // 哑银不干胶-亮膜哑膜一样 + case "6": + dto.setKindValue("1"); + stickersList = productMapper.getThanPrice(dto); + if ("加凹凸".equals(dto.getAotu())) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 2.3)); + } + } + /* + * if ("印2色+凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 280, 300, 350, 460, 520, 660, 1100 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 280, 320, 450, 660, 780, 900, 1500 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 340, 500, 850, 1100, 1550, 1700, 2500 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("加凹凸".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int + * priceArr1[] = { 170, 200, 230, 310, 360, 420, 710 }; // 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 200, 240, 350, 440, 560, 670, 1000 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 240, 380, 620, 800, 940, 1050, 1960 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else if ("印2色".equals(dto.getAotu())) { // 6*5cm以下及10*3cm以下 int priceArr1[] = { 140, 170, 200, 280, 380, 420, 680 }; // + * 6*5cm-8*8cm;10-3cm - 10*6cm以内 int priceArr2[] = { 160, 200, 300, 400, 600, 640, 1000 }; // 11*11cm内;12*8cm内;20*4cm以内 int priceArr3[] = { 200, 300, 480, 700, 850, 1050, 1900 }; stickersList = new YaJinStickersPrice().accountPriceBySize(width, length, count, priceArr1, priceArr2, priceArr3); } else { if(count <= 10000) { dto.setKindValue("1"); stickersList = productMapper.getThanPrice(dto); } } + */ + if (stickersList == null) + return stickersList; + break; + case "易碎纸不干胶": + if ((length == 1.0 || width == 1.0) && length * width != 1.0) { + area = 0.0001; + stickersList = new YiSBStickersPrice().getPrice(count, area); + if (width == 1.0) { + for (Product product : stickersList) { + product.setPrice(product.getPrice() + (length > 1 ? (length - 1) : 1) * 10); + } + } else { + for (Product product : stickersList) { + product.setPrice(product.getPrice() + (width > 1 ? (width - 1) : 1) * 10); + } + } + } else { + stickersList = new YiSBStickersPrice().getPrice(count, area); + } + break; + case "拉丝金": + if (length <= 5 && width <= 5) { + stickersList = new LaSiStickersPrice().acountPrice5x5(count); + } else if ((length <= 9 && width <= 5.5) || (length <= 5.5 && width <= 9)) { + stickersList = new LaSiStickersPrice().acountPrice9x5(count, area); + } else { + stickersList = new LaSiStickersPrice().acountPrice9xup(count, area); + /* + * stickersList2 = new LaSiStickersPrice().acountPrice9x5(count, area); // 对比价格,便宜的话替换 for (int i = 0; i < stickersList.size(); i++) { for (int j = 0; j < stickersList2.size(); j++) { if (stickersList.get(j).getPrice() < stickersList2.get(j).getPrice()) { stickersList.get(j).setPrice(stickersList2.get(j).getPrice() + 10); } } } + */ + } + if ("覆哑膜".equals(dto.getCraftMo())) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10)); + } + } + break; + case "拉丝银": + if (length <= 5 && width <= 5) { + stickersList = new LaSiStickersPrice().acountPrice5x5(count); + } else if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { + stickersList = new LaSiStickersPrice().acountPrice9x5(count, area); + } else { + stickersList = new LaSiStickersPrice().acountPrice9xup(count, area); + /* + * stickersList2 = new LaSiStickersPrice().acountPrice9x5(count, area); // 对比价格,便宜的话替换 for (int i = 0; i < stickersList.size(); i++) { for (int j = 0; j < stickersList2.size(); j++) { if (stickersList.get(j).getPrice() < stickersList2.get(j).getPrice()) { stickersList.get(j).setPrice(stickersList2.get(j).getPrice() + 10); } } } + */ + } + if ("覆哑膜".equals(dto.getCraftMo())) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10)); + } + } + break; + case "格底珠光膜": + if ("覆亮膜".equals(dto.getCraftMo())) { + if (length <= 5 && width <= 5) { + stickersList = new GDZGMStickersPrice().acountPrice5x5(count); + } else if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { + stickersList = new GDZGMStickersPrice().acountPrice9x5(count, area); + } else { + stickersList = new GDZGMStickersPrice().acountPrice9xup(count, area); + } + } else { + if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { + stickersList = new GDZGMStickersPrice().acountYaMoPrice9x5(count, area); + } else { + stickersList = new GDZGMStickersPrice().acountYamoPrice9xup(count, area); + } + } + break; + case "美纹纸": + stickersList = new PriceUtils().getMeiWenZhiPrice(length, width, count, number, dto.getCraftQie()); + break; + case "银平光": + /* + * stickersList = new YinPGStickersPrice().getPrice(count, area); for (Product product : stickersList) { if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { if (product.getCount() < 2000) { product.setPrice(Math.ceil(product.getPrice() * 1.3)); } else { product.setPrice(Math.ceil(product.getPrice() * 1.2)); } } else { product.setPrice(Math.ceil(product.getPrice() * 1.1)); } } + */ + if (count <= 10000) { + // 银平光的价格与透明不干胶价格一致 + dto.setKindValue("1"); + stickersList = productMapper.getThanPrice(dto); + /* + * for(Product product : stickersList) { if(product.getCount() < 5000) { product.setPrice(Math.ceil(product.getPrice() + 30)); } } + */ + } else { + // 1*1,2*1 价格调整成和3*1一致 + if (area < 0.0003) { + area = 0.0003; + } + stickersList = new PVCStickersPrice().getPrice(count, area); + } + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 1.5)); + } + break; + } + } else { + // 大于21cm的用计算-数量在500以上 + if (!"易碎纸不干胶".equals(kind) && !"0".equals(kind)) { + if (length == 1 || width == 1) { + area = 2 * area; + } + } + switch (kind) { + case "0": + // stickersList = new AStickersPrice().getPrice(count, area); + + // 带1厘米的尺寸,都变成2 + if (1 < length && length < 2) { + length = Math.ceil(length); + } + if (1 < width && width < 2) { + width = Math.ceil(width); + } + // 小数部分,四舍五入 + length = (double) Math.round(length); + width = (double) Math.round(width); + // 尺寸小数部分四舍五入后的面积 + double roundArea = length * width / 10000; + if ((length == 1 && width <= 48) || (width == 1 && length <= 48)) { + stickersList = new AStickersPrice().getPriceLess48(count); + } else if ((length == 1 && width <= 60) || (width == 1 && length <= 60)) { + stickersList = new AStickersPrice().getPriceLess60(count); + } else if ((length == 1 && width <= 70) || (width == 1 && length <= 70)) { + stickersList = new AStickersPrice().getPriceLess70(count); + } else if ((length == 1 && width <= 80) || (width == 1 && length <= 80)) { + stickersList = new AStickersPrice().getPriceLess80(count); + } else if ((length == 1 && width <= 90) || (width == 1 && length <= 90)) { + stickersList = new AStickersPrice().getPriceLess90(count); + } else if ((length == 1 && width <= 100) || (width == 1 && length <= 100)) { + stickersList = new AStickersPrice().getPriceLess100(count); + } else { + stickersList = new AStickersPrice().getPrice(count, roundArea, dto.getRole()); + } + + // 96 - 92 折 + for (Product product : stickersList) { + product.setKindLabel("铜版纸不干胶3"); + } + // 85折 + // for (Product product : stickersList) { + // product.setKindLabel("铜版纸不干胶2"); + // } + break; + case "1": + case "2": + + stickersList = new PVCStickersPrice().getPrice(count, area); + break; + case "3": + stickersList = new NiuStickersPrice().getPrice(count, area); + // PP合成纸覆亮膜是牛皮纸价格的0.8倍 + if ("PP合成纸".equals(oldKind)) { + dto.setKindValue(oldKind); + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 0.8)); + } + // PP合成纸覆哑膜价格比亮膜贵1分钱一张 + if (("覆哑膜".equals(dto.getCraftMo()))) { + for (Product product : stickersList) { +// if (product.getCount() <= 1000) { +// product.setPrice(Math.ceil(product.getPrice() + 10)); +// } else { +// product.setPrice(Math.ceil(product.getPrice() + product.getCount() * 0.01)); +// } + } + } + } + break; + case "4": + + // 原A级铜版纸附哑膜价格 + // stickersList = new AYaMoStickersPrice().getPrice(count, area); + // 带1厘米的尺寸,都变成2 + if (1 < length && length < 2) { + length = Math.ceil(length); + } + if (1 < width && width < 2) { + width = Math.ceil(width); + } + // 小数部分,四舍五入 + length = (double) Math.round(length); + width = (double) Math.round(width); + // 尺寸小数部分四舍五入后的面积 + roundArea = length * width / 10000; + + if ((length == 1 && width <= 48) || (width == 1 && length <= 48)) { + stickersList = new AStickersPrice().getPriceLess48(count); + } else if ((length == 1 && width <= 60) || (width == 1 && length <= 60)) { + stickersList = new AStickersPrice().getPriceLess60(count); + } else if ((length == 1 && width <= 70) || (width == 1 && length <= 70)) { + stickersList = new AStickersPrice().getPriceLess70(count); + } else if ((length == 1 && width <= 80) || (width == 1 && length <= 80)) { + stickersList = new AStickersPrice().getPriceLess80(count); + } else if ((length == 1 && width <= 90) || (width == 1 && length <= 90)) { + stickersList = new AStickersPrice().getPriceLess90(count); + } else if ((length == 1 && width <= 100) || (width == 1 && length <= 100)) { + stickersList = new AStickersPrice().getPriceLess100(count); + } else { + stickersList = new AStickersPrice().getPrice(count, roundArea, dto.getRole()); + } + // A级铜版纸覆亮膜价格*1.2 + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + // 亮膜做特价,有“kindLabel”标识,哑膜把标识去掉 + product.setKindLabel(null); + } + break; + case "PVC覆哑膜": + + stickersList = new PVCYaMoStickersPrice().getPrice(count, area); + break; + case "5": + if (StringUtils.isEmpty(dto.getAotu())) { + stickersList = new YaJinStickersPrice().getPriceNoAoTu(length, width, count); + break; + } + return stickersList; + case "6": + // 8.10 + // if (StringUtils.isEmpty(dto.getAotu())) { + // stickersList = new YaYinStickersPrice().getPrice(count, area); + // break; + // } + if (StringUtils.isEmpty(dto.getAotu())) { + // 小数部分,四舍五入 + length = (double) Math.round(length); + width = (double) Math.round(width); + // 尺寸小数部分四舍五入后的面积 + roundArea = length * width / 10000; + if ((length == 1 && width <= 48) || (width == 1 && length <= 48)) { + stickersList = new AStickersPrice().getPriceLess48(count); + } else if ((length == 1 && width <= 60) || (width == 1 && length <= 60)) { + stickersList = new AStickersPrice().getPriceLess60(count); + } else if ((length == 1 && width <= 70) || (width == 1 && length <= 70)) { + stickersList = new AStickersPrice().getPriceLess70(count); + } else if ((length == 1 && width <= 80) || (width == 1 && length <= 80)) { + stickersList = new AStickersPrice().getPriceLess80(count); + } else if ((length == 1 && width <= 90) || (width == 1 && length <= 90)) { + stickersList = new AStickersPrice().getPriceLess90(count); + } else if ((length == 1 && width <= 100) || (width == 1 && length <= 100)) { + stickersList = new AStickersPrice().getPriceLess100(count); + } else { + stickersList = new AStickersPrice().getPrice(count, roundArea, dto.getRole()); + } + + // A级铜版纸覆亮膜价格 哑银的 5000张以下(不含5千张的*2.8 ) 5千张以上*2.3 + for (Product product : stickersList) { + if (product.getCount() >= 5000) { + product.setPrice(Math.ceil(product.getPrice() * 2.3)); + } else { + product.setPrice(Math.ceil(product.getPrice() * 2.8)); + } + } + + // 少数量,算一下打印的价格和印刷的对比 + if (count < 500) { + double price = 65; + double addPrice = 12; + stickersList = new PriceUtils().getYy(kind, length, width, count, price, addPrice, number, dto.getCraftTang(), dto.getYinbai()); + } + // 如果打印的价格比印刷的价格便宜,就使用Collections工具类对list进行排序(把打印的展示在第一位),否则打印的显示在最后一位,然后 + if (stickersList.get(stickersList.size() - 1).getPrice() < stickersList.get(0).getPrice()) { + Collections.sort(stickersList, new Comparator() { + + @Override + public int compare(Product o1, Product o2) { + return o1.getCount() - o2.getCount(); + } + }); + } + break; + } + return null; + case "易碎纸不干胶": + + double l = 42.0; + double w = 38.0; + // 最大印刷面积为42*38 CM + if ((length > l || width > w) && (length > w || width > l)) + return null; + if ((length == 1.0 || width == 1.0) && length * width != 1.0) { + area = 0.0001; + stickersList = new YiSBStickersPrice().getPrice(count, area); + if (width == 1.0) { + for (Product product : stickersList) { + product.setPrice(product.getPrice() + (length > 1 ? (length - 1) : 1) * 10); + } + } else { + for (Product product : stickersList) { + product.setPrice(product.getPrice() + (width > 1 ? (width - 1) : 1) * 10); + } + } + } else { + stickersList = new YiSBStickersPrice().getPrice(count, area); + } + break; + case "拉丝金": + l = 42.0; + w = 38.0; + // 最大印刷面积为42*38 CM + if ((length > l || width > w) && (length > w || width > l)) + return null; + stickersList = new LaSiStickersPrice().acountPrice9xup(count, area); + if ("覆哑膜".equals(dto.getCraftMo())) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10)); + } + } + break; + case "拉丝银": + l = 42.0; + w = 38.0; + // 最大印刷面积为42*38 CM + if ((length > l || width > w) && (length > w || width > l)) + return null; + stickersList = new LaSiStickersPrice().acountPrice9xup(count, area); + // 覆哑膜多1/10价格 + if ("覆哑膜".equals(dto.getCraftMo())) { + for (Product product : stickersList) { + product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1 / 10)); + } + } + break; + case "格底珠光膜": + l = 42.0; + w = 38.0; + // 最大印刷面积为42*38 CM + if ((length > l || width > w) && (length > w || width > l)) + return null; + if ("覆亮膜".equals(dto.getCraftMo())) { + stickersList = new GDZGMStickersPrice().acountPrice9xup(count, area); + } else { + stickersList = new GDZGMStickersPrice().acountYamoPrice9xup(count, area); + } + break; + case "美纹纸": + stickersList = new PriceUtils().getMeiWenZhiPrice(length, width, count, number, dto.getCraftQie()); + break; + case "银平光": + stickersList = new YinPGStickersPrice().getPrice(count, area); + for (Product product : stickersList) { + if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { + if (product.getCount() < 2000) { + product.setPrice(Math.ceil(product.getPrice() * 1.3)); + } else { + product.setPrice(Math.ceil(product.getPrice() * 1.2)); + } + } else { + product.setPrice(Math.ceil(product.getPrice() * 1.1)); + } + } + break; + } + } + if (dto.getCraftPai() != null && !"".equals(dto.getCraftPai())) { + for (Product product : stickersList) { + double price = product.getPrice(); + if ("半排废".equals(dto.getCraftPai())) { + price = price + product.getCount() * 0.1; + } + if ("全排废".equals(dto.getCraftPai())) { + price = price + product.getCount() * 0.13; + } + product.setPrice(Math.max(price, 80)); + product.setKindLabel(null); + } + } + if (dto.getN_mq_num() != null && dto.getN_mq_num() > 1) { + double base_price = 15; + if (dto.getN_mq_num() >= 50 && dto.getN_mq_num() < 100) { + base_price = 14; + } + if (dto.getN_mq_num() >= 100 && dto.getN_mq_num() < 150) { + base_price = 13; + } + if (dto.getN_mq_num() >= 150 && dto.getN_mq_num() < 200) { + base_price = 12; + } + if (dto.getN_mq_num() >= 200) { + base_price = 10; + } + base_price += 4; + for (Product product : stickersList) { + double price = product.getPrice(); + product.setPrice(price + ((dto.getN_mq_num() - 1) * base_price)); + } + } + if ("彩色印刷+烫金/银".equals(dto.getCraftTang()) || "纯烫金".equals(dto.getCraftTang())) { + double[] basePrice = getStickersTanBasePrice(area * 10000); + int[] bigCountArr = {500, 1000, 2000, 3000, 5000, 10000}; + if ("彩色印刷+烫金/银".equals(dto.getCraftTang())) { + for (int i = 0; i < basePrice.length; i++) { + basePrice[i] = Math.ceil(basePrice[i] * 1.5); + } + } + for (Product product : stickersList) { + double productPrice = product.getPrice(); + double price = 0; + for (int i = 0; i < bigCountArr.length; i++) { + if (product.getCount() >= bigCountArr[i]) { + price = productPrice + basePrice[i]; + } + } + product.setPrice(Math.max(price, productPrice)); + } + } + // 彩色印刷+烫金报价方式 +// if ("彩色印刷+烫金/银".equals(dto.getCraftTang())) { +// if (width <= 15 && length <= 15) { +// for (Product product : stickersList) { +// product.setPrice((product.getPrice()) + (product.getCount() * 0.16 + 200 > 240 ? product.getCount() * 0.16 + 200 : 240)); +// } +// } else if (width > 15 || length > 15) { +// for (Product product : stickersList) { +// product.setPrice((product.getPrice()) + (product.getCount() * 0.18 + 200 > 240 ? product.getCount() * 0.18 + 200 : 240)); +// } +// } +// // 彩色印刷烫金加上烫金版价格 +// // 烫金版面积(长*宽)平方CM +// double areaTang = dto.getLengthTang() * dto.getWidthTang(); +// for (Product product : stickersList) { +// product.setPrice(product.getPrice() + (areaTang * 0.2 > 50 ? areaTang * 0.2 : 50)); +// product.setKindLabel(null); +// } +// } + + if ("印白墨".equals(dto.getYinbai())) { + stickersList = new PVCStickersPrice().acountYinbaiPrice(length, width, stickersList); + } + // 价格*款数 铜版纸放到外面执行 + if (!"0".equals(dto.getKindValue())) { + if (number > 1) { + for (Product product : stickersList) { + product.setPrice(product.getPrice() * number); + } + } + } + + + return stickersList; + } + + private double[] getStickersTanBasePrice(double area) { + + double[] priceArr = new double[6]; + if (area < 25) { + return new double[]{124, 124, 236, 250, 250, 334}; + } else if (area >= 598.5) { + return new double[]{704, 786, 1000, 1160, 1610, 2804}; + } else { + double[][] areaRanges = { + {25, 48.6}, + {48.6, 70}, + {70, 81}, + {81, 100}, + {100, 144}, + {144, 225}, + {225, 300}, + {300, 400}, + {400, 441}, + {441, 525}, + {525, 598.5} + }; + double[][] priceRanges = { + {124, 124, 236, 250, 250, 334}, + {124, 124, 236, 250, 250, 334}, + {210, 210, 210, 210, 224, 334}, + {220, 220, 220, 220, 254, 418}, + {238, 238, 238, 250, 308, 504}, + {282, 282, 282, 316, 428, 708}, + {358, 358, 394, 478, 648, 1014}, + {428, 428, 518, 630, 850, 1376}, + {520, 534, 680, 826, 1064, 1808}, + {558, 586, 746, 906, 1168, 2040}, + {636, 692, 880, 1024, 1380, 2476}, + {704, 786, 1000, 1160, 1610, 2804} + }; + + for (int i = 0; i < areaRanges.length; i++) { + if (area >= areaRanges[i][0] && area < areaRanges[i][1]) { + double rangeStart = areaRanges[i][0]; + double rangeEnd = areaRanges[i][1]; + double rangeSpan = rangeEnd - rangeStart; + for (int j = 0; j < priceArr.length; j++) { + double priceStart = priceRanges[i][j]; + double priceEnd = priceRanges[i + 1][j]; + priceArr[j] = Math.ceil(priceStart + (priceEnd - priceStart) * (area - rangeStart) / rangeSpan); + } + break; + } + } + } + return priceArr; + } + + // 加上工艺的钱 + private synchronized void getCraft(Product dto, List priceList, Double length, Double width, int min) { + if (!StringUtils.isEmpty(dto.getCraft())) { + List craftList = Arrays.asList(dto.getCraft()); + if (!("13".equals(dto.getKind()) && "4".equals(dto.getProTypeValue())) && craftList.contains("双面覆哑膜")) { + for (Product product : priceList) { + if (min > 1) { + if (product.getCount() > 2000) { + product.setPrice(Math.ceil(product.getPrice() * 1.1)); + } else { + product.setPrice(Math.ceil(product.getPrice() * 1.15)); + } + } else { + product.setPrice(Math.ceil(product.getPrice() * 1.3)); + } + } + } + if (craftList.contains("压痕")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.03 * product.getCount() > 30 ? 0.03 * product.getCount() : 30))); + } + } + if (craftList.contains("压点线")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 0.02 * product.getCount())); + } + } + if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("打点线")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.03 * product.getCount() > 30 ? 0.03 * product.getCount() : 30))); + } + } + if (craftList.contains("倒圆角")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.03 * product.getCount() > 30 ? 0.03 * product.getCount() : 30))); + } + } + if (craftList.contains("打孔")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.03 * product.getCount() > 30 ? 0.03 * product.getCount() : 30))); + } + } + if (craftList.contains("单面烫金")) { + if (min < 2) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 50) + (0.1 * product.getCount() > 50 ? 0.1 * product.getCount() : 50)); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 50) + (0.11 * product.getCount() > 50 ? 0.11 * product.getCount() : 50)); + } + } + // 彩色印刷烫金加上烫金版价格 + // 烫金版面积(长*宽)平方CM + double areaTang = dto.getLengthTang() * dto.getWidthTang(); + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (areaTang * 0.2 > 10 ? areaTang * 0.2 : 10))); + } + } + if (craftList.contains("双面烫金")) { + if (min < 2) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice()) + (0.2 * product.getCount() > 220 ? 0.2 * product.getCount() : 220)); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice()) + (0.22 * product.getCount() > 220 ? 0.22 * product.getCount() : 220)); + } + } + // 彩色印刷烫金加上烫金版价格 + // 烫金版面积(长*宽)平方CM + double areaTang = dto.getLengthTang() * dto.getWidthTang(); + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (areaTang * 0.2 > 10 ? areaTang * 0.2 : 10))); + } + } + if (craftList.contains("打码")) { + double danjia = 0.0; + // 5000张以上,一张5分 + if (dto.getCount() > 5000) { + danjia = 0.04; + } else { + danjia = 0.04; + } + if ("上下编码".equals(dto.getBianma())) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (danjia * product.getCount() * 2 > 120 ? danjia * product.getCount() * 2 : 120))); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (danjia * product.getCount()))); + } + } + if (craftList.contains("模切")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + product.getPrice() * 1.6)); + } + } + } + //(!"4".equals(dto.getProTypeValue()) || !"4".equals(dto.getKind()) || !"5".equals(dto.getKind())) && + if (craftList.contains("模切") && !craftList.contains("打码")) {// 3个位以下25,3-16:50; 16 上 80 + if (min < 3) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 25 + 0.04 * product.getCount())); + } + } else if (min < 16) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 50 + 0.04 * product.getCount())); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 30 + 50 + 0.04 * product.getCount())); + } + } + } + if (craftList.contains("腰封模切")) {// 腰封200克/157克模切收费(起步价100) + if (min < 3) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (25 + 0.06 * product.getCount() > 100 ? 25 + 0.06 * product.getCount() : 100))); + } + } else if (min < 16) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (50 + 0.06 * product.getCount() > 100 ? 50 + 0.06 * product.getCount() : 100))); + } + } else { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (30 + 50 + 0.06 * product.getCount() > 100 ? 30 + 50 + 0.06 * product.getCount() : 100))); + } + } + } + if (craftList.contains("单面覆膜")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (length / 1000 * width / 1000 * product.getCount() * 0.7 > 70 ? length / 1000 * width / 1000 * product.getCount() * 0.7 : 70))); + } + } + if (craftList.contains("签名条") || craftList.contains("磁条")) { + double danjia = 0.0; + + for (Product product : priceList) { + // 1000张以内,一张5分 + if (product.getCount() <= 1000) { + danjia = 0.05; + } else if (product.getCount() == 2000) { + danjia = 0.03; + } else if (product.getCount() >= 3000) { + danjia = 0.02; + } + product.setPrice(Math.ceil(product.getPrice() + danjia * product.getCount())); + } + } + if (craftList.contains("倒圆角")) {// 特种纸名片工艺 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.03 * product.getCount() > 30 ? 0.03 * product.getCount() : 30))); + } + } + if (craftList.contains("圆角")) {// 特种纸名片工艺 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.03 * product.getCount() > 30 ? 0.03 * product.getCount() : 30) * 1.5)); + } + } else if (craftList.contains("烫金/")) { + for (Product product : priceList) { + if (product.getCount() <= 400) { + product.setPrice(product.getPrice() + 60); + } else { + product.setPrice(product.getPrice() + 100); + } + } + } + if (craftList.contains("击凸")) { + for (Product product : priceList) { + if (product.getCount() <= 400) { + product.setPrice(product.getPrice() + 60); + } else { + product.setPrice(product.getPrice() + 100); + } + } + } + if (!"特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切")) {// 300克牛皮纸工艺 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + (0.05 * product.getCount() > 50 ? 0.05 * product.getCount() : 50))); + } + } + if ("特种纸名片".equals(dto.getProTypeValue()) && craftList.contains("异形模切")) {// 200-500张按照原有的价格乘以3倍 1000-5000张按照原有的价格乘以2.4倍 5000-10000张按照原有的价格乘以2倍 + for (Product product : priceList) { + if (200 <= product.getCount() && product.getCount() <= 500) { + product.setPrice(Math.ceil(product.getPrice() * 3)); + } + if (500 < product.getCount() && product.getCount() <= 1000) { + product.setPrice(Math.ceil(product.getPrice() * 2.6)); + } + if (1000 < product.getCount() && product.getCount() <= 5000) { + product.setPrice(Math.ceil(product.getPrice() * 2.4)); + } + if (5000 < product.getCount() && product.getCount() <= 10000) { + product.setPrice(Math.ceil(product.getPrice() * 2)); + } + } + } + if (craftList.contains("异形")) {// 广告扇工艺(选了异形,每把+3毛钱 + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 0.3 * product.getCount())); + } + } + if (craftList.contains("单面局部烫金")) {// 合版封套/房卡套烫金价格 + for (Product product : priceList) { + if (product.getCount() >= 5000) { + product.setPrice(Math.ceil(product.getPrice() + (product.getCount() * 0.08 > 100 ? product.getCount() * 0.08 : 100))); + } else { + product.setPrice(Math.ceil(product.getPrice() + (product.getCount() * 0.1 > 100 ? product.getCount() * 0.1 : 100))); + } + + } + } + if (craftList.contains("糊成品")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 0.1 * product.getCount())); + } + } + if (craftList.contains("糊半成品")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 0.15 * product.getCount())); + } + } + if (craftList.contains("流苏")) { + for (Product product : priceList) { + product.setPrice(Math.ceil(product.getPrice() + 0.15 * product.getCount())); + } + } + } + } + + // 价格表上传 + public Msg ajaxUploadExcel(MultipartFile file) throws Exception { + if (!file.isEmpty()) { + InputStream in = null; + List> listob = null; + try { + in = file.getInputStream(); + listob = new ExcelUtils().getBankListByExcel(in, file.getOriginalFilename()); + } catch (IOException e) { + e.printStackTrace(); + } + String filename = file.getOriginalFilename(); + System.out.println(filename); + Product vo = new Product(); + for (int i = 0; i < listob.size(); i++) { + synchronized (this) { + List lo = listob.get(i); + for (int j = 2; j < lo.size(); j++) { + if (StringUtils.isEmpty(String.valueOf(lo.get(0)).trim()) || StringUtils.isEmpty(String.valueOf(lo.get(1)).trim())) { + continue; + } + /* + * String size = String.valueOf(lo.get(0)).trim(); int count = Integer.valueOf(String.valueOf(lo.get(1)).trim()); Double price = Double.valueOf(String.valueOf(lo.get(2)).trim()); if (size.equals("竖版260*360*80MM尼龙绳子")) { vo.setKindValue("0"); vo.setKindLabel("竖版260*360*80MM尼龙绳子"); } else if (size.equals("竖版300*400*80MM尼龙绳子")) { vo.setKindValue("1"); vo.setKindLabel("竖版300*400*80MM尼龙绳子"); } else if (size.equals("竖版360*260*100")) { vo.setKindValue("2"); + * vo.setKindLabel("竖版360*260*100"); } else if (size.equals("横版250*260*80MM尼龙绳子")) { vo.setKindValue("3"); vo.setKindLabel("横版250*260*80MM尼龙绳子"); } vo.setCount(count); vo.setPrice(price); + */ + + String other = String.valueOf(lo.get(j)).trim(); + if ("另行报价".equals(other)) { + other = "0"; + } + Integer count = Integer.valueOf(String.valueOf(lo.get(0)).trim()); + Double length = Double.valueOf(String.valueOf(lo.get(1)).trim()); + Double width = Double.valueOf(j - 1); + Double price = 0.0; + if (!StringUtils.isEmpty(other)) { + price = Double.valueOf(other); + } + vo.setCount(count); + vo.setLength(length); + vo.setWidth(width); + vo.setPrice(price); + + // 不干胶 0 ---0:A级铜版不干胶 1:pvc不干胶 = 2:透明不干胶 3:牛皮纸不干胶 4:哑膜铜版纸不干胶 + // 特殊不干胶 1---0:单色哑金哑银亮金亮银印刷 1:彩色哑金哑银亮金亮银印刷(不含白墨) 2:哑金哑银亮金亮银无印刷凹凸 + // 3:单色烫金烫银(铜版纸哑膜亮膜pvc透明材质) + vo.setProTypeValue("0"); + vo.setProTypeLabel("不干胶"); + vo.setKindValue("1"); + vo.setKindLabel("透明/PVC不干胶"); + productMapper.insertSelective(vo); + } + } + } + } + return Msg.success(); + } +} diff --git a/src/main/java/lingtao/net/service/QuestionService.java b/src/main/java/lingtao/net/service/QuestionService.java new file mode 100644 index 0000000..ebfc06a --- /dev/null +++ b/src/main/java/lingtao/net/service/QuestionService.java @@ -0,0 +1,68 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.Question; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.QuestionMapper; + +@Service +public class QuestionService { + + @Autowired + private QuestionMapper questionMapper; + + public List questions(Question question) { + return questionMapper.questions(question); + } + + public Msg addQuestion(Question question, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + question.setCreateBy(user.getRealname()); + try { + questionMapper.addQuestion(question); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 修改 + public Msg updateQuestionById(Question question, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + question.setUpdateBy(user.getRealname()); + try { + questionMapper.updateQuestionById(question); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg deleteQuestionById(Integer id) { + try { + questionMapper.deleteQuestionById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public List getSingleQuestions() { + return questionMapper.getSingleQuestions(); + } + + public List getMultipleQuestions() { + return questionMapper.getMultipleQuestions(); + } + + public List getFillQuestions() { + return questionMapper.getFillQuestions(); + } +} diff --git a/src/main/java/lingtao/net/service/QuoteDataService.java b/src/main/java/lingtao/net/service/QuoteDataService.java new file mode 100644 index 0000000..55529de --- /dev/null +++ b/src/main/java/lingtao/net/service/QuoteDataService.java @@ -0,0 +1,535 @@ +package lingtao.net.service; + +import java.io.OutputStream; +import java.lang.reflect.Field; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.QuoteData; +import lingtao.net.bean.SysRole; +import lingtao.net.bean.SysUser; +import lingtao.net.controller.CustomerDataControlle; +import lingtao.net.dao.QuoteDataMapper; +import lingtao.net.dao.SysRoleMapper; +import lingtao.net.util.DateFormatUtils; + +@Service +public class QuoteDataService { + + @Autowired + private QuoteDataMapper quoteDataMapper; + + @Autowired + private SysRoleMapper roleMapper; + + @Autowired + private SysRoleMapper sysRolemapper; + + /** + * 根据角色身份查询数据列表 + */ + public List quoteDatas(QuoteData quoteData) { + quoteData.setQuoteTimeEnd(new DateFormatUtils().formatEndTime(quoteData.getQuoteTimeBegin())); + quoteData.setQuoteTimeBegin(new DateFormatUtils().formatBeginTime(quoteData.getQuoteTimeBegin())); + // 用户所拥有的角色 + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String[] roleArr = user.getRole().split(","); + // 转成list,拿掉‘组长’身份 + List list = new ArrayList(Arrays.asList(roleArr)); + // 判断是否拥有超管身份标识 + boolean isSuper = false; + boolean isAllShop = false; + for (int i = 0; i < roleArr.length; i++) { + // 有【超级管理员】身份,状态改为true + if ("1".equals(roleArr[i])) { + isSuper = true; + break; + } + // 有【全部店铺】身份,状态改为true + if ("777".equals(roleArr[i])) { + isAllShop = true; + break; + } + // 如果有【店长/考试审核员/客服/组长/IP管理员/操作日志/不填旺旺】身份,去掉。不带去查询 + if ("666".equals(roleArr[i]) || "888".equals(roleArr[i]) || "999".equals(roleArr[i]) + || "1011".equals(roleArr[i]) || "1015".equals(roleArr[i]) || "1042".equals(roleArr[i]) + || "1049".equals(roleArr[i])) { + list.remove(roleArr[i]); + } + } + // 将list转为String[] 数组 + roleArr = list.toArray(new String[list.size()]); + // 如果没有【超级管理员/全部店铺】身份 + if (!isSuper && !isAllShop) { + // 再判断有没有查询条件且没有选择查找条件 + // 全部属性为空 true:没有查询条件 false:有查询条件 + boolean isNullFlag = true; + try { + // 前台会带用户的角色回来,上面已经获取,这里设置null不影响 + quoteData.setRole(null); + // 判断quoteData对象是否有属性(查询条件) + for (Field f : quoteData.getClass().getDeclaredFields()) { + f.setAccessible(true); + if (f.get(quoteData) != null && StringUtils.isNotBlank(f.get(quoteData).toString())) { + // 有属性 + isNullFlag = false; + break; + } + } + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + } + // 如果有多个店铺角色 + if (roleArr.length > 1) { + // 全部属性为空 即没有条件查询,默认查出所有的店铺数据 + if (isNullFlag) { + quoteData.setRoleArr(roleArr); + } else {// 不为空,根据店铺和条件查询数据 + quoteData.setRoleSearchArr(roleArr); + } + } else {// 只有一个角色 + quoteData.setRoleSearch(roleArr[0]); + } + } + // 如果有【超管】,但是没有【所有店铺】,隐藏非本部店铺 + if (isSuper && !isAllShop) { + quoteData.setIsSelfShop("0"); + } + // 有【超管、全部店铺】直接走这 + return quoteDataMapper.quoteDatas(quoteData); + } + + public Msg updateById(int id, String field, String value, String username) { + QuoteData quoteData = new QuoteData(); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + boolean flag = new CustomerDataControlle().isSuperOrManager(); + // 如果修改的是店长评语,判断有没有【组长】身份 + if ("commentManager".equals(field)) { + // 超管、组长身份才允许修改comment + if (!flag) { + return Msg.fail("只允许店长修改!"); + } + quoteData.setCommentManager(value); + } else if ("price".equals(field) || "buyPrice".equals(field)) {// 如果是价格/成交价格,组长和自己都能改 + if (!flag && !username.equals(user.getUsername())) { + return Msg.fail("除店长外,不允许修改他人的数据!"); + } + if ("price".equals(field)) { + quoteData.setPrice(Double.valueOf(value)); + } else if ("buyPrice".equals(field)) { + quoteData.setBuyPrice(Double.valueOf(value)); + } + } else { + // 只有自己的数据才能更改【客户旺旺】 + if (!username.equals(user.getUsername())) { + return Msg.fail("只允许修改自己的数据!"); + } + if ("wangwang".equals(field)) { + quoteData.setWangwang(value); + // 填写客户旺旺的时候,更改填写状态 + quoteData.setIsFillIn("1"); + } else if ("commentSelf".equals(field)) { + quoteData.setCommentSelf(value); + } + } + quoteData.setId(id); + quoteDataMapper.updateById(quoteData); + + return Msg.success(); + } + + /** + * 获取报价过的产品种类 + * + * @return + */ + public List getProType() { + return quoteDataMapper.getProType(); + } + + /** + * 修改【是否当天成交】状态 + * + * @param id + * @return + */ + + public Msg changeIsBuyToDay(Integer id) { + try { + quoteDataMapper.changeIsBuyToDay(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + /** + * 修改【是否成交】状态 + * + * @param id + * @return + */ + public Msg changeIsBuy(Integer id) { + try { + quoteDataMapper.changeIsBuy(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + /** + * 修改所属店铺以及选择状态 + * + * @param id + * @return + */ + public Msg updateShopnameSelect(String shopname, Integer id) { + try { + quoteDataMapper.updateShopnameSelect(shopname, id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + /** + * 填写成交订单号 + * + * @param orderNumber + * @return + */ + public Msg addOrderNumber(Integer id, String orderNumber) { + try { + quoteDataMapper.addOrderNumber(id, orderNumber); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + /** + * 柱状图 + * + * @param quoteData + * @return + */ + public Map echartZhuList(QuoteData quoteData,int isKefu) { + Map map = new HashMap(); + List sname = new ArrayList();// 获取数据中有的店铺名称 + List allData = new ArrayList();// 所有数据条数 + List allNotBuy = new ArrayList();// 合计未成交 + List allBuy = new ArrayList();// 合计已成交 + List todayBuy = new ArrayList();// 合计当天已成交 + List notTodaybuy = new ArrayList();// 合计跟单后已成交 + List allBuyPrice = new ArrayList();// 所有成交金额 + List todayBuyPrice = new ArrayList();// 当天成交金额 + List notTodayBuyPrice = new ArrayList();// 跟单成交金额 + List allBuyPercentage = new ArrayList();// 成交百分比 + List allDataList = new ArrayList();// 所有数据 + + // 判断是否拥有超管身份标识 + boolean isNoSuper = true; + boolean isNoAllShop = true; + long startTime, endTime = 0; + startTime = System.currentTimeMillis(); + quoteData.setQuoteTimeEnd(new DateFormatUtils().formatEndTime(quoteData.getQuoteTimeBegin())); + quoteData.setQuoteTimeBegin(new DateFormatUtils().formatBeginTime(quoteData.getQuoteTimeBegin())); + // 如果是通过‘所属店铺’查询 + // 只根据店铺查===>查出该店铺人员该店铺的报价数据 + if(isKefu != 0) {//判断是否统计客服大单信息 + List realnameList = new ArrayList(); + // 根据店铺搜索该店铺有的人员 + String roleSearch = "999"; + if(quoteData.getRoleSearch() != "") { + roleSearch = roleSearch.concat(",").concat(quoteData.getRoleSearch()); + } + realnameList = quoteDataMapper.getRealnames(roleSearch); + // 根据人员查询数据 + for (String realname : realnameList) { + quoteData.setShopname(quoteData.getRoleSearch()); + quoteData.setRealname(realname); + QuoteData echartList = quoteDataMapper.getKefuEchartList(quoteData); + // X坐标展示客服名字 + sname.add(realname); + allDataList.add(echartList); + } + }else if (StringUtils.isNotEmpty(quoteData.getRoleSearch()) && StringUtils.isEmpty(quoteData.getRealname()) + && !"1".equals(quoteData.getByProTypeLabel())) { + // 店铺人员集合 + List realnameList = new ArrayList(); + // 根据店铺搜索该店铺有的人员 + realnameList = quoteDataMapper.getRealnames(quoteData.getRoleSearch()); + // 根据人员查询数据 + for (String realname : realnameList) { + quoteData.setShopname(quoteData.getRoleSearch()); + quoteData.setRealname(realname); + QuoteData echartList = quoteDataMapper.getEchartList(quoteData); + // X坐标展示客服名字 + sname.add(realname); + allDataList.add(echartList); + } + } else if ("1".equals(quoteData.getByProTypeLabel()) && StringUtils.isEmpty(quoteData.getRoleSearch()) + && StringUtils.isEmpty(quoteData.getRealname())) { // 只根据产品查==>查出报价的所有产品 + // 产品 + List productList = new ArrayList(); + // 报价中有的产品 + productList = this.getProType(); + // 根据人员查询数据 + for (String product : productList) { + quoteData.setProTypeLabel(product); + QuoteData echartList = quoteDataMapper.getEchartList(quoteData); + // X坐标展示产品 + sname.add(product); + allDataList.add(echartList); + } + } else if (StringUtils.isNotEmpty(quoteData.getRoleSearch()) + && StringUtils.isNotEmpty(quoteData.getRealname())) { // 根据店铺及人员查==>查询人员该店铺的产品报价 + // 产品 + List productList = new ArrayList(); + // 报价中有的产品 + productList = this.getProType(); + // 根据人员查询数据 + for (String product : productList) { + quoteData.setProTypeLabel(product); + quoteData.setShopname(quoteData.getRoleSearch()); + quoteData.setRealname(quoteData.getRealname()); + QuoteData echartList = quoteDataMapper.getEchartList(quoteData); + // X坐标展示产品 + sname.add(product); + allDataList.add(echartList); + } + } else if (StringUtils.isNotEmpty(quoteData.getRoleSearch()) && "1".equals(quoteData.getByProTypeLabel()) + && StringUtils.isEmpty(quoteData.getRealname())) { // 查询店铺的产品 + // 产品 + List productList = new ArrayList(); + // 报价中有的产品 + productList = this.getProType(); + // 根据人员查询数据 + for (String product : productList) { + quoteData.setShopname(quoteData.getRoleSearch()); + quoteData.setProTypeLabel(product); + QuoteData echartList = quoteDataMapper.getEchartList(quoteData); + // X坐标展示产品 + sname.add(product); + allDataList.add(echartList); + } + } else if (StringUtils.isNotEmpty(quoteData.getRealname()) && StringUtils.isEmpty(quoteData.getRoleSearch()) + && !"1".equals(quoteData.getByProTypeLabel())) { // 只根据名字查==>查该人员所有店铺的产品报价 + // 产品 + List productList = new ArrayList(); + // 报价中有的产品 + productList = this.getProType(); + // 根据人员查询数据 + for (String product : productList) { + quoteData.setProTypeLabel(product); + quoteData.setRealname(quoteData.getRealname()); + QuoteData echartList = quoteDataMapper.getEchartList(quoteData); + sname.add(product); + allDataList.add(echartList); + } + } else { + // 用户所拥有的角色 + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String[] roleArr = user.getRole().split(","); + for (int i = 0; i < roleArr.length; i++) { + // 有【超级管理员、全部店铺】身份,状态改为false + if ("1".equals(roleArr[i])) { + isNoSuper = false; + break; + } + if ("777".equals(roleArr[i])) { + isNoAllShop = false; + break; + } + } + // 报价数据中拥有的店铺 + // List shopName = quoteDataMapper.getShopName(quoteData); + List shopName = new ArrayList(); + + // 如果没有【超管、所有店铺】,直接把自己的拥有的店铺拿去查询数据,同时排除特殊角色 + if (isNoSuper && isNoAllShop) { + // 获取【不允许被创建】的特殊角色id + List specialRoleIdList = roleMapper.getRoleIdsWhenIsNotRegist(); + // shopName.clear(); + for (String shopname : roleArr) { + // 是否拥有特殊角色标识 + boolean specialFlag = false; + for (int j = 0; j < specialRoleIdList.size(); j++) { + // 如果用户拥有的角色属于不可被创建的特殊角色,就排除,不加到图形中统计 + if (specialRoleIdList.get(j).toString().equals(shopname)) { + specialFlag = true; + break; + } + } + // 不是特殊角色,就加到列表中 + if (!specialFlag) { + shopName.add(shopname); + } + } + } else {// 有【超管】或者有【所有店铺】 + // 报价数据中拥有的店铺 + shopName = quoteDataMapper.getShopName(quoteData); + // 如果有【超管】,但是没有【所有店铺】,把非公司店铺去除掉 + if (!isNoSuper && isNoAllShop) { + // 别的公司的店铺ID + List otherRoleIdList = roleMapper.getRoleIdsWhenIsNotLingTao(); + for (int i = 0; i < shopName.size(); i++) { + // 其他公司店铺标识 + boolean otherFlag = false; + for (int j = 0; j < otherRoleIdList.size(); j++) { + // 如果报价中的店铺是别的公司的店铺,就排除,不加到图形中统计 + if (otherRoleIdList.get(j).toString().equals(shopName.get(i).toString())) { + otherFlag = true; + break; + } + } + // 是别的公司的店铺,就移除 + if (otherFlag) { + shopName.remove(i); + i--; + } + } + } + } + // 根据店铺查询数据 + for (String shopname : shopName) { + quoteData.setShopname(shopname); + QuoteData echartList = quoteDataMapper.getEchartList(quoteData); + sname.add(shopname); + allDataList.add(echartList); + } + } + + // 排序 + Collections.sort(allDataList, new Comparator() { + @Override + public int compare(QuoteData o1, QuoteData o2) { + return (int) (o2.getAllData() - o1.getAllData()); + } + }); + + for (QuoteData data : allDataList) { + allData.add(data.getAllData()); + allBuy.add(data.getAllBuy()); + allNotBuy.add(data.getAllNotBuy()); + todayBuy.add(data.getTodayBuy()); + notTodaybuy.add(data.getNotTodayBuy()); + allBuyPrice.add(data.getAllBuyPrice()); + todayBuyPrice.add(data.getTodayBuyPrice()); + notTodayBuyPrice.add(data.getNotTodayBuyPrice()); + allBuyPercentage.add(data.getAllBuyPercentage()); + } + map.put("sname", sname); + map.put("one", allData); + map.put("two", allBuy); + map.put("three", allNotBuy); + map.put("four", todayBuy); + map.put("five", notTodaybuy); + map.put("six", allBuyPrice); + map.put("seven", todayBuyPrice); + map.put("eight", notTodayBuyPrice); + map.put("nine", allBuyPercentage); + endTime = System.currentTimeMillis(); + System.out.println("getShopName使用的时间:" + (endTime - startTime)); + return map; + } + + @SuppressWarnings("resource") + public void excel(HttpServletResponse response, QuoteData quoteData) throws Exception { + response.setCharacterEncoding("UTF-8"); + List quoteDatasList = new ArrayList(); + List allRoleNameList = sysRolemapper.getAllRoleName(null); + + // 需要导出的数据 + quoteDatasList = quoteDatas(quoteData); + + // 创建excel文件 + XSSFWorkbook wb = new XSSFWorkbook(); + // 创建sheet页 + XSSFSheet sheet = wb.createSheet("总表"); + // 创建excel文件 +// HSSFWorkbook wb = new HSSFWorkbook(); + // 创建sheet页 +// HSSFSheet sheet = wb.createSheet("总表"); + String filename = "客服操作数据"; + String shopname = ""; + String isToDayBuy = "未成交"; + String isBuy = "未成交"; + + // 创建标题行 + XSSFRow titleRow = sheet.createRow(0); + // 创建标题行 +// HSSFRow titleRow = sheet.createRow(0); + titleRow.createCell(0).setCellValue("操作人"); + titleRow.createCell(1).setCellValue("数据所属店铺"); + titleRow.createCell(2).setCellValue("客户旺旺"); + titleRow.createCell(3).setCellValue("操作"); + titleRow.createCell(4).setCellValue("金额"); + titleRow.createCell(5).setCellValue("当天成交"); + titleRow.createCell(6).setCellValue("未成交原因"); + titleRow.createCell(7).setCellValue("跟单后成交"); + titleRow.createCell(8).setCellValue("成交金额"); + titleRow.createCell(9).setCellValue("店长追踪情况汇报"); + titleRow.createCell(10).setCellValue("操作时间"); + // 遍历将数据放到excel列中 + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + for (QuoteData quoteDatas : quoteDatasList) { + shopname = ""; + isToDayBuy = "未成交"; + isBuy = "未成交"; + for (SysRole sysRole : allRoleNameList) { + if (String.valueOf(sysRole.getRoleId()).equals(quoteDatas.getShopname())) { + shopname = sysRole.getRoleName(); + break; + } + } + if (quoteDatas.getIsBuyToDay().equals("1")) { + isToDayBuy = "已成交"; + } + if (quoteDatas.getIsBuy().equals("1")) { + isBuy = "已成交"; + } + XSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); +// HSSFRow dataRow = sheet.createRow(sheet.getLastRowNum() + 1); + dataRow.createCell(0).setCellValue(quoteDatas.getRealname()); + dataRow.createCell(1).setCellValue(shopname); + dataRow.createCell(2).setCellValue(quoteDatas.getWangwang()); + dataRow.createCell(3).setCellValue(quoteDatas.getRemark()); + dataRow.createCell(4).setCellValue(quoteDatas.getPrice()); + dataRow.createCell(5).setCellValue(isToDayBuy); + dataRow.createCell(6).setCellValue(quoteDatas.getCommentSelf()); + dataRow.createCell(7).setCellValue(isBuy); + dataRow.createCell(8).setCellValue(quoteDatas.getBuyPrice() != null ? quoteDatas.getBuyPrice() : 0); + dataRow.createCell(9).setCellValue(quoteDatas.getCommentManager()); + dataRow.createCell(10).setCellValue(formatter.format(quoteDatas.getQuoteTime())); + } + + // 设置下载时客户端Excel的名称 + response.setContentType("application/octet-stream;charset=utf-8"); + response.setHeader("Content-Disposition", + "attachment;filename=" + new String(filename.getBytes(), "iso-8859-1") + ".xls");// + ".xls" + + OutputStream ouputStream = response.getOutputStream(); + wb.write(ouputStream); + ouputStream.flush(); + ouputStream.close(); + } +} diff --git a/src/main/java/lingtao/net/service/QuoteLogService.java b/src/main/java/lingtao/net/service/QuoteLogService.java new file mode 100644 index 0000000..4edd691 --- /dev/null +++ b/src/main/java/lingtao/net/service/QuoteLogService.java @@ -0,0 +1,247 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import lingtao.net.bean.Product; +import lingtao.net.bean.ProductImg; +import lingtao.net.bean.QuoteData; +import lingtao.net.bean.QuoteLog; +import lingtao.net.bean.SysDictProduct; +import lingtao.net.bean.SysRole; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.ProductImgMapper; +import lingtao.net.dao.QuoteDataMapper; +import lingtao.net.dao.QuoteLogMapper; +import lingtao.net.util.DateFormatUtils; +import lingtao.net.util.IPUtils; + +@Service +public class QuoteLogService { + + @Autowired + private QuoteLogMapper quoteLogMapper; + + @Autowired + private QuoteDataMapper quoteDataMapper; + + @Autowired + ProductImgMapper productImgMapper; + + @Autowired + private SysRoleService sysRoleService; + + // 列表 + public List quoteLogs(QuoteLog quoteLog) { + quoteLog.setQuoteTimeEnd(new DateFormatUtils().formatEndTime(quoteLog.getQuoteTimeBegin())); + quoteLog.setQuoteTimeBegin(new DateFormatUtils().formatBeginTime(quoteLog.getQuoteTimeBegin())); + return quoteLogMapper.quoteLogs(quoteLog); + } + + // 操作日志 + public String log(Product product, HttpServletRequest request, List proList) { + long startTime, endTime = 0; + startTime = System.currentTimeMillis(); + SysUser user = (SysUser) request.getSession().getAttribute("USER_SESSION"); + if (user == null) { + return "登陆失效"; + } + QuoteLog log = new QuoteLog(); + ProductImg productImg = new ProductImg(); + + // product转productImg + BeanUtils.copyProperties(product, productImg); + // 根据value查询label + if ("13".equals(productImg.getProTypeValue()) || "15".equals(productImg.getProTypeValue()) + || "4".equals(productImg.getProTypeValue())) { + productImg.setKind2Value(null); + } + // 优惠券 + if ("4".equals(productImg.getProTypeValue())) { + productImg.setKindValue("0"); + productImg.setKind2Value(product.getKind()); + } + // 合版封套 + if ("6".equals(productImg.getProTypeValue())) { + if (product.getLengthSize() > 0) { + productImg.setKind2Value("0"); + } + } + // 根据value获取label + SysDictProduct label = productImgMapper.getLabel(productImg); + + if (StringUtils.isEmpty(label)) { + return null; + } + String s = ""; + String remark_judge = ""; + String proTypeLabel = ""; + if ("常用种类".equals(product.getStickerKind())) { + s += "常用种类- "; + } + if ("少数量".equals(product.getStickerKind())) { + s += "少数量- "; + } + if ("专版打印".equals(product.getStickerKind())) { + s += "专版打印- "; + } + if (!StringUtils.isEmpty(label.getProTypeLabel())) { + if ("金属标".equals(label.getProTypeLabel()) && StringUtils.isEmpty(product.getCraftMo())) { + s += "UV转印贴 - "; + proTypeLabel = "UV转印贴"; + } else { + s += label.getProTypeLabel() + " - "; + proTypeLabel = label.getProTypeLabel(); + } + } + if ("少数量".equals(product.getCouponKind())) { + s += product.getProTypeLabel() + " - "; + } + if (!StringUtils.isEmpty(label.getKindLabel())) { + s += label.getKindLabel() + " - "; + } + if (!StringUtils.isEmpty(label.getKind2Label())) { + s += label.getKind2Label() + " - "; + } + if (!StringUtils.isEmpty(product.getKind3Value())) { + if ("0".equals(product.getKind3Value())) { + s += "骑马钉 - "; + } + } + String new_s = s; + new_s += "客户旺旺:" + product.getWangwang() + " - "; + // 产品 - 种类 + remark_judge = new_s; + // 不区分专版打印或者常用,3分钟内都不要 + if (remark_judge.contains("常用种类- ") || remark_judge.contains("专版打印- ")) { + remark_judge = remark_judge.substring(6); + } + // 画册P数 + if (!StringUtils.isEmpty(product.getPcount())) { + s += product.getPcount() + "P - "; + } + if (!StringUtils.isEmpty(product.getSize())) { + s += product.getSize() + " - "; + } + if (!StringUtils.isEmpty(product.getCraftMo())) { + s += product.getCraftMo() + " - "; + } + if (!StringUtils.isEmpty(product.getCraftTang())) { + s += product.getCraftTang() + " - "; + } + if (!StringUtils.isEmpty(product.getAotu())) { + s += product.getAotu() + " - "; + } + if (!StringUtils.isEmpty(product.getYinbai())) { + s += product.getYinbai() + " - "; + } + if (!StringUtils.isEmpty(product.getCraftSheng())) { + s += product.getCraftSheng() + " - "; + } + if (!StringUtils.isEmpty(product.getCraftShua())) { + s += product.getCraftShua() + " - "; + } + if (!StringUtils.isEmpty(product.getCraftBu())) { + s += product.getCraftBu() + " - "; + } + if (!StringUtils.isEmpty(product.getCraftJiao())) { + s += product.getCraftJiao() + " - "; + } + + if (!StringUtils.isEmpty(product.getCraft())) { + String[] craft = product.getCraft(); + for (int i = 0; i < craft.length; i++) { + if (StringUtils.isEmpty(craft[i])) + continue; + s += craft[i] + " - "; + } + } + if (!StringUtils.isEmpty(product.getNumber())) { + s += product.getNumber() + "款 - "; + } + + if ("16".equals(product.getProTypeValue())) { + s += product.getCount() + "本 " + proList.get(0).getPrice() + "元 "; + } else { + s += product.getCount() + "个 " + proList.get(0).getPrice() + "元 "; + } + + log.setRemark(s); + log.setRealname(user.getRealname()); + log.setUsername(user.getUsername()); + log.setQuoteIp(IPUtils.getIpAddr(request));// 获取ip + log.setBrower(IPUtils.getBrowserName(request));// 获取浏览器名称 + log.setOs(IPUtils.getOsName(request)); // 获取操作系统名称 + log.setPrice(proList.get(0).getPrice()); + List allRoleNames = sysRoleService.getAllRoleName(null); + String roleName = ""; + String[] split = user.getRole().split(","); + for (SysRole sysRole : allRoleNames) { + for (int i = 0; i < split.length; i++) { + if (split[i].equals(String.valueOf(sysRole.getRoleId()))) { + roleName += sysRole.getRoleName() + "、"; + } + } + } + log.setShopname(roleName); + quoteLogMapper.insertSelective(log); + + endTime = System.currentTimeMillis(); + System.out.println("【insertSelective】使用的时间:" + (endTime - startTime)); + + long startTime2, endTime2 = 0; + startTime2 = System.currentTimeMillis(); + boolean flag = false; + // 查询3分钟内自己报的数据 + List remarkJudgeData = quoteDataMapper.getQuoteDataByMinutes(user.getUsername()); + endTime2 = System.currentTimeMillis(); + System.out.println("【getQuoteDataByMinutes】使用的时间:" + (endTime2 - startTime2)); + for (String remarkJudge : remarkJudgeData) { + if (remarkJudge.equals(remark_judge)) { + // 如果3分钟内报过相同数据 + flag = true; + break; + } + } + // 插入数据(给客服数据新增用的) + String role = user.getRole(); + // 客服报的且3分钟内没有同一个客户报的数据才插入 + if (role.contains("999,") && !flag) { + QuoteData quoteData = new QuoteData(); + quoteData.setUsername(user.getUsername()); + quoteData.setRealname(user.getRealname()); + quoteData.setPrice(proList.get(0).getPrice()); + quoteData.setRole(user.getRole()); + // 默认都是没选择店铺 + quoteData.setIsSelect("0"); +// role = role.replace("999,", "").replace(",1049", "").replace(",1011", ""); + // 规则:第一位客服,第二位主店铺 + String shopname = role.substring(role.indexOf(",") + 1); + if (shopname.indexOf(",") != -1) { + shopname = shopname.substring(0, shopname.indexOf(",")); + } + System.out.println(shopname); + quoteData.setShopname(shopname); + quoteData.setIsSelect("1"); + // 除去【客服】只有一个店铺,所属店铺就是剩下这个店铺 切 选择状态改为已选择 +// if (!role.contains(",")) { +// } + quoteData.setIsBuy("0"); + quoteData.setIsBuyToDay("0"); + quoteData.setRemark(s); + quoteData.setRemarkJudge(remark_judge); + // 默认都是填写旺旺号 + quoteData.setIsFillIn("1"); + quoteData.setWangwang(product.getWangwang().trim()); + quoteData.setProTypeLabel(proTypeLabel); + quoteDataMapper.addQuoteData(quoteData); + } + return null; + } +} diff --git a/src/main/java/lingtao/net/service/SysDictSearchProService.java b/src/main/java/lingtao/net/service/SysDictSearchProService.java new file mode 100644 index 0000000..dfdfaa0 --- /dev/null +++ b/src/main/java/lingtao/net/service/SysDictSearchProService.java @@ -0,0 +1,66 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysDictSearchPro; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.SysDictSearchProMapper; + +@Service +public class SysDictSearchProService { + + @Autowired + SysDictSearchProMapper searchProMapper; + + // 查询 + public List keyWordsList(SysDictSearchPro searchPro) { + return searchProMapper.keyWordsList(searchPro); + } + + // 新增 + public Msg addSearchPro(SysDictSearchPro searchPro, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + searchPro.setCreator(user.getRealname()); + try { + searchProMapper.insertSelective(searchPro); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 修改关键字 + public Msg updateKeyWordById(HttpSession session, int id, String value, String field) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + SysDictSearchPro searchPro = new SysDictSearchPro(); + searchPro.setId(id); + if ("url".equals(field)) { + searchPro.setUrl(value); + } else { + searchPro.setLikeProTypeLabel(value); + } + searchPro.setUpdater(user.getRealname()); + try { + searchProMapper.updateKeyWordById(searchPro); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 改变状态 + public Msg changeKeyWordStatus(Integer id) { + try { + searchProMapper.changeKeyWordStatus(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } +} diff --git a/src/main/java/lingtao/net/service/SysPermissionService.java b/src/main/java/lingtao/net/service/SysPermissionService.java new file mode 100644 index 0000000..658e8ed --- /dev/null +++ b/src/main/java/lingtao/net/service/SysPermissionService.java @@ -0,0 +1,29 @@ +package lingtao.net.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.SysPermission; +import lingtao.net.dao.SysPermissionMapper; + +@Service +public class SysPermissionService { + + @Autowired + SysPermissionMapper sysPermissionMapper; + + public List getAll() { + return sysPermissionMapper.getAll(); + } + + public List getParentPers() { + return sysPermissionMapper.getParentPers(); + } + + public List getPersByUserId(Integer userId) { + return sysPermissionMapper.getPersByUserId(userId); + } + +} diff --git a/src/main/java/lingtao/net/service/SysRoleService.java b/src/main/java/lingtao/net/service/SysRoleService.java new file mode 100644 index 0000000..9523690 --- /dev/null +++ b/src/main/java/lingtao/net/service/SysRoleService.java @@ -0,0 +1,85 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysRole; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.SysRoleMapper; + +@Service +public class SysRoleService { + + @Autowired + private SysRoleMapper sysRolemapper; + + // 角色列表 + public List getRoles(SysRole role) { + return sysRolemapper.getRoles(role); + } + + // 新增 + public Msg addRole(SysRole role, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + try { + role.setCreateBy(user.getRealname()); + sysRolemapper.insertSelective(role); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 修改 + public Msg updateRoleById(SysRole role) { + try { + sysRolemapper.updateByPrimaryKeySelective(role); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 改变用户状态 + public Msg changeRoleStatus(String roleId) { + try { + sysRolemapper.changeRoleStatus(roleId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 根据角色id查询角色拥有的权限 + public List getPerIdsByRoleId(Integer id) { + return sysRolemapper.getPerIdsByRoleId(id); + } + + // 删除角色已有的权限 + public void deleteRolePermissions(Integer roleId) { + sysRolemapper.deleteRolePermissions(roleId); + + } + + // 给角色授权 + public void addRolePermissions(Integer roleId, String[] split) { + sysRolemapper.addRolePermissions(roleId, split); + + } + + // 查询允许被注册的角色 + public List getAllRoleName(String isRegist) { + return sysRolemapper.getAllRoleName(isRegist); + } + + // 查询出用户所拥有的且允许被创建的角色 + public List getRolesByUserId(Integer userId) { + return sysRolemapper.getRolesByUserId(userId); + } + +} diff --git a/src/main/java/lingtao/net/service/SysUserService.java b/src/main/java/lingtao/net/service/SysUserService.java new file mode 100644 index 0000000..7844c7a --- /dev/null +++ b/src/main/java/lingtao/net/service/SysUserService.java @@ -0,0 +1,269 @@ +package lingtao.net.service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.dao.SysUserMapper; +import lingtao.net.util.MD5Util; + +@Service +public class SysUserService { + + @Autowired + private SysUserMapper userMapper; + + // 注册 + public Msg register(SysUser user) { + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + user.setCreateDate(new Date()); + // 注册的用户都是未激活状态 + user.setUserStatus("0"); + // 注册的用户都是系统功能隐藏状态 + user.setSysStatus("0"); + // 注册的用户不需要判断IP + user.setNeedIp("1"); + String roleId = user.getRole(); + if (StringUtils.isEmpty(roleId)) + return null; + // 给用户赋予角色 + user.setRole("999," + roleId); + // user.setRole("999"); + // Integer[] ids = {999}; + int count = userMapper.insertSelective(user); + // 根据角色的id把角色的权限给用户 + Integer[] ids = { 999, Integer.valueOf(roleId) }; + // 新增用户后会自动回补id + Integer userId = user.getUserId(); + userMapper.addUserRoles(userId, ids); + if (count < 0) { + return Msg.fail(); + } + return Msg.success(); + } + + public List getUsers(SysUser user) { + // 用户所拥有的角色 + String[] roleArr = user.getRole().split(","); + // 转成list,拿掉‘组长’身份 + List list = new ArrayList(Arrays.asList(roleArr)); + // 判断是否拥有超管身份标识 + boolean isSuper = false; + for (int i = 0; i < roleArr.length; i++) { + // 有‘超级管理员’身份,状态改为true + if ("1".equals(roleArr[i])) { + isSuper = true; + break; + } + + // 如果有【店长/考试审核员/客服/组长/IP管理员/操作日志/不填旺旺】身份,去掉。不带去查询 + if ("666".equals(roleArr[i]) || "888".equals(roleArr[i]) || "999".equals(roleArr[i]) + || "1011".equals(roleArr[i]) || "1015".equals(roleArr[i]) || "1042".equals(roleArr[i]) + || "1049".equals(roleArr[i])) { + list.remove(roleArr[i]); + } + } + // 将list转为String[] 数组 + roleArr = list.toArray(new String[list.size()]); + + // 如果没有‘超级管理员’身份,只能看到负责的部门的用户;如果有可以看到所有用户 + if (!isSuper) { + // 如果是通过‘用户角色’查询 + if (StringUtils.isNotEmpty(user.getRoleSearch())) { + // 清除自己拥有的角色,防止查询出所有的部门数据 + roleArr = null; + } + // 如果有多个 + if (user.getRole().contains(",")) { + user.setRoleArr(roleArr); + } else {// 只有一个角色 + user.setRoleSearch(user.getRole()); + } + } + + return userMapper.getUsers(user); + } + + // 检查用户名是否存在 + public Msg checkUsername(String username) { + SysUser user = userMapper.getUserByUsername(username); + if (user != null) { + return Msg.fail(); + } + return Msg.success(); + } + + // 新增 + public Msg addUser(SysUser user) { + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + user.setCreateDate(new Date()); + try { + userMapper.insertSelective(user); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 修改 + public Msg updateUserById(SysUser user) { + if (!"********".equals(user.getPassword())) { // 如果改过密码 + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + } else { + user.setPassword(null); + } + // 如果有【店长】身份,更改的角色前面添加【客服】 + SysUser user2 = (SysUser) SecurityUtils.getSubject().getPrincipal(); + boolean flag = false; + String[] role = user2.getRole().split(","); + for (int i = 0; i < role.length; i++) { + if ("666".equals(role[i])) { + flag = true; + break; + } + } + if (flag) { + user.setRole("999," + user.getRole()); + } + user.setUpdateDate(new Date()); + try { + userMapper.updateByPrimaryKeySelective(user); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 删除用户 + public Msg deleteUserById(Integer userId) { + try { + userMapper.deleteByPrimaryKey(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail("主外键关联,删除失败!"); + } + } + + // 改变用户状态 + public Msg changeUserStatus(Integer userId) { + try { + userMapper.changeUserStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public void addUserRoles(Integer userId, Integer[] ids) { + userMapper.addUserRoles(userId, ids); + } + + public void deleteUserRoles(Integer userId) { + userMapper.deleteUserRoles(userId); + } + + public Msg updatePassword(SysUser user) { + user.setPassword(new MD5Util().md5(user.getPassword(), "lingtao")); + int i = userMapper.updateByPrimaryKeySelective(user); + if (i > 0) { + return Msg.success(); + } + return Msg.fail(); + } + + public Msg addBirthDay(SysUser user) { + SysUser sysUser = (SysUser) SecurityUtils.getSubject().getPrincipal(); + user.setUserId(sysUser.getUserId()); + user.setIsBirthDay(0); + int i = userMapper.updateByPrimaryKeySelective(user); + if (i > 0) { + return Msg.success(); + } + return Msg.fail(); + } + + // 改变用户生日状态 + public Msg changeIsBirthDay(Integer userId) { + try { + userMapper.changeIsBirthDay(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg changeNeedIp() { + try { + userMapper.changeNeedIp(); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 改变用户系统状态(管理员调整) + public Msg changeSysStatus(Integer userId) { + try { + userMapper.changeSysStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 改变用户系统状态(看完视频) + public Msg videoOverToChangeSysStatus(Integer userId) { + try { + userMapper.videoOverToChangeSysStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 改变用户系统状态(答题通过) + public Msg examOverToChangeSysStatus(Integer userId) { + try { + userMapper.examOverToChangeSysStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + // 改变阅读更新日志状态 + public Msg changeReadLogStatus(Integer userId) { + try { + userMapper.changeReadLogStatus(userId); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public SysUser getUserInfo(Integer userId) { + try { + return userMapper.getUserInfo(userId); + } catch (Exception e) { + return null; + } + } + + /** + * 客服数据 -- 根据搜索的店铺获取人员 + * + * @return + */ + public List getRealnamesByShopname(String shopname) { + return userMapper.getRealnamesByShopname(shopname); + } + +} diff --git a/src/main/java/lingtao/net/service/UpdateLogService.java b/src/main/java/lingtao/net/service/UpdateLogService.java new file mode 100644 index 0000000..7912dc3 --- /dev/null +++ b/src/main/java/lingtao/net/service/UpdateLogService.java @@ -0,0 +1,64 @@ +package lingtao.net.service; + +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import lingtao.net.bean.Msg; +import lingtao.net.bean.SysUser; +import lingtao.net.bean.UpdateLog; +import lingtao.net.dao.UpdateLogMapper; + +@Service +public class UpdateLogService { + + @Autowired + private UpdateLogMapper updateLogMapper; + + public List getUpdateLogs(UpdateLog updateLog) { + + return updateLogMapper.getUpdateLogs(updateLog); + } + + public Msg addLog(UpdateLog updateLog, HttpSession session) { + SysUser user = (SysUser) session.getAttribute("USER_SESSION"); + updateLog.setCreateBy(user.getRealname()); + try { + updateLogMapper.addLog(updateLog); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg updateLogById(UpdateLog updateLog, HttpSession session) { + try { + updateLogMapper.updateLogById(updateLog); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg deleteLogById(Integer id) { + try { + updateLogMapper.deleteLogById(id); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + + public Msg changeReadLogStatus() { + try { + updateLogMapper.changeReadLogStatus(); + return Msg.success(); + } catch (Exception e) { + return Msg.fail(); + } + } + +} diff --git a/src/main/java/lingtao/net/service/price/ClothingTagService.java b/src/main/java/lingtao/net/service/price/ClothingTagService.java new file mode 100644 index 0000000..5edf5d5 --- /dev/null +++ b/src/main/java/lingtao/net/service/price/ClothingTagService.java @@ -0,0 +1,6 @@ +package lingtao.net.service.price; + +public interface ClothingTagService { + + void inster(); +} diff --git a/src/main/java/lingtao/net/service/price/ProductService.java b/src/main/java/lingtao/net/service/price/ProductService.java new file mode 100644 index 0000000..f2a66cd --- /dev/null +++ b/src/main/java/lingtao/net/service/price/ProductService.java @@ -0,0 +1,14 @@ +package lingtao.net.service.price; + +import lingtao.net.enums.ProductEnum; +import org.apache.poi.ss.formula.functions.T; + +public interface ProductService { + + /** + * 计算价格 + */ + void getProduct(T t); + + ProductEnum getEnum(); +} diff --git a/src/main/java/lingtao/net/service/price/SelfAdhesiveStickerService.java b/src/main/java/lingtao/net/service/price/SelfAdhesiveStickerService.java new file mode 100644 index 0000000..33792c8 --- /dev/null +++ b/src/main/java/lingtao/net/service/price/SelfAdhesiveStickerService.java @@ -0,0 +1,4 @@ +package lingtao.net.service.price; + +public interface SelfAdhesiveStickerService { +} diff --git a/src/main/java/lingtao/net/service/price/impl/ClothingTagServiceImpl.java b/src/main/java/lingtao/net/service/price/impl/ClothingTagServiceImpl.java new file mode 100644 index 0000000..2ae0036 --- /dev/null +++ b/src/main/java/lingtao/net/service/price/impl/ClothingTagServiceImpl.java @@ -0,0 +1,27 @@ +package lingtao.net.service.price.impl; + +import lingtao.net.entity.ClothingTag; +import lingtao.net.enums.ProductEnum; +import lingtao.net.service.price.ClothingTagService; +import lingtao.net.service.price.ProductService; +import org.springframework.stereotype.Service; + + +@Service +public class ClothingTagServiceImpl implements ProductService, ClothingTagService { + + @Override + public void getProduct(ClothingTag clothingTag) { + System.out.println("===========clothingTag"); + } + + @Override + public ProductEnum getEnum() { + return ProductEnum.clothing_Tag; + } + + @Override + public void inster() { + + } +} diff --git a/src/main/java/lingtao/net/service/price/impl/ProductContent.java b/src/main/java/lingtao/net/service/price/impl/ProductContent.java new file mode 100644 index 0000000..57bfab9 --- /dev/null +++ b/src/main/java/lingtao/net/service/price/impl/ProductContent.java @@ -0,0 +1,32 @@ +package lingtao.net.service.price.impl; + +import lingtao.net.enums.ProductEnum; +import lingtao.net.service.price.ProductService; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +@Service +public class ProductContent implements ApplicationContextAware { + + @Autowired(required = false) + Map productServiceMap; + + public ProductService getService(ProductEnum productEnum) { + return productServiceMap.get(productEnum); + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + Map map = applicationContext.getBeansOfType(ProductService.class); + productServiceMap = new HashMap<>(); + map.forEach((key, value) -> { + productServiceMap.put(value.getEnum(), value); + }); + } +} diff --git a/src/main/java/lingtao/net/service/price/impl/SelfAdhesiveStickerServiceImpl.java b/src/main/java/lingtao/net/service/price/impl/SelfAdhesiveStickerServiceImpl.java new file mode 100644 index 0000000..13b0cc5 --- /dev/null +++ b/src/main/java/lingtao/net/service/price/impl/SelfAdhesiveStickerServiceImpl.java @@ -0,0 +1,20 @@ +package lingtao.net.service.price.impl; + +import lingtao.net.entity.SelfAdhesiveSticker; +import lingtao.net.enums.ProductEnum; +import lingtao.net.service.price.ProductService; +import lingtao.net.service.price.SelfAdhesiveStickerService; +import org.springframework.stereotype.Service; + +@Service +public class SelfAdhesiveStickerServiceImpl implements ProductService, SelfAdhesiveStickerService { + @Override + public void getProduct(SelfAdhesiveSticker selfAdhesiveSticker) { + System.out.println("===========SelfAdhesiveSticker"); + } + + @Override + public ProductEnum getEnum() { + return ProductEnum.self_adhesive_sticker; + } +} diff --git a/src/main/java/lingtao/net/util/AStickersPrice.java b/src/main/java/lingtao/net/util/AStickersPrice.java new file mode 100644 index 0000000..23562f1 --- /dev/null +++ b/src/main/java/lingtao/net/util/AStickersPrice.java @@ -0,0 +1,432 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.ArrayList; +import java.util.List; + +/** + * A级铜版纸不干胶价格 + */ +public class AStickersPrice { + + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000}; + + double AreaArr[] = {0.004, 0.006, 0.008, 0.01, 0.012, 0.015, 0.017, 0.018, 0.02, 0.03, 0.04, 0.06, 0.1, 0.2, 0.3}; + + // 9*5.4cm(一个名片位)以内价格 + public List oneCradPrice(int count, String role) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000}; + int[] priceArr; + priceArr = new int[]{60, 70, 95, 125, 175, 270, 510, 800, 1000, 1200, 1400, 1600, 1800, 2000, 2200}; + + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count || list.size() > 5) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + // 20*1以内 + public List getPriceLess20(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {80, 90, 150, 180, 200, 240, 400, 580, 720}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 150 + 720)); + list.add(pro); + } + return list; + } + + // 48*1以内 + public List getPriceLess48(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {90, 100, 160, 190, 230, 420, 760, 1100, 1400}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 300 + 1400)); + list.add(pro); + } + return list; + } + + // 60*1以内 + public List getPriceLess60(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {100, 120, 180, 230, 300, 550, 960, 1300, 1600}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 400 + 1600)); + list.add(pro); + } + return list; + } + + // 70*1以内 + public List getPriceLess70(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {110, 130, 200, 270, 330, 580, 1100, 1500, 1900}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 400 + 1900)); + list.add(pro); + } + return list; + } + + // 80*1以内 + public List getPriceLess80(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {130, 150, 240, 300, 380, 650, 1200, 1650, 2100}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 450 + 2100)); + list.add(pro); + } + return list; + } + + // 90*1以内 + public List getPriceLess90(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {150, 170, 245, 320, 420, 750, 1300, 1750, 2200}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 450 + 2200)); + list.add(pro); + } + return list; + } + + // 100*1以内 + public List getPriceLess100(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000}; + int priceArr[] = {170, 200, 260, 350, 480, 860, 1400, 2000, 2600}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 600 + 2600)); + list.add(pro); + } + return list; + } + + // 面积在0.003内 + public List getPrice(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000}; + int priceArr[] = {56, 63, 84, 108, 150, 240, 456, 684, 912, 1125, 1350, 1575, 1800, 2025, 2250}; + if (count <= 40000) { + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count || list.size() > 5) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil((Math.ceil(count / 10000.0) - 4) * 200 + 850)); + list.add(pro); + } + return list; + } + + public List f_getPrice(int priceArr[], int count, String craftMo) { + List list = new ArrayList(); + Product p = new Product(); + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000}; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + p = new Product(); + p.setCount(countArr[i]); + if ("覆哑膜".equals(craftMo)) { + p.setPrice(Math.ceil(Double.valueOf(priceArr[i]) * 1.2)); + } else { + p.setPrice(Double.valueOf(priceArr[i])); + } + + list.add(p); + } + + return list; + } + + // 根据面积计算价格 + private List bigSizeAcountPrice(int count, Double area, List list, double[] priceArr) { + Product pro = new Product(); + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count || list.size() > 3) { + continue; + } + + double[] arrPrice = new double[16]; + if (bigCountArr[i] == 500) { + arrPrice = new double[]{37, 33, 30, 26, 25, 21, 19, 18, 17, 19, 17, 12.8, 12.5, 12, 11.5, 11}; + } else if (bigCountArr[i] == 1000) { + arrPrice = new double[]{21, 19, 17, 17, 15, 14, 14, 12, 12, 12.5, 13, 9, 9, 8, 8, 7.8}; + } else if (bigCountArr[i] == 2000) { + arrPrice = new double[]{14, 13, 13, 12, 11, 11, 10, 10, 9, 10, 11, 7.8, 7.5, 7.5, 7.2, 7}; + } else if (bigCountArr[i] == 3000) { + arrPrice = new double[]{12, 11, 11, 10, 9, 9.5, 9, 8, 8, 9, 10, 6.8, 6.5, 6.5, 6, 6.5}; + } else if (bigCountArr[i] == 5000) { + arrPrice = new double[]{10, 9.5, 8, 7.8, 8.5, 9, 8.3, 7, 8, 6.5, 8, 6, 6, 6, 5.5, 5}; + } else if (bigCountArr[i] == 10000) { + arrPrice = new double[]{8, 7.5, 6.5, 6.5, 7.6, 8, 7.3, 6, 7.5, 6, 6, 6, 6, 6, 5, 5}; + } else if (bigCountArr[i] == 20000) { + arrPrice = new double[]{7.6, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 30000) { + arrPrice = new double[]{7.6, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 40000) { + arrPrice = new double[]{7.6, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 50000) { + arrPrice = new double[]{7.5, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 60000) { + arrPrice = new double[]{7.5, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 70000) { + arrPrice = new double[]{7.5, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 80000) { + arrPrice = new double[]{7.5, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 90000) { + arrPrice = new double[]{7.5, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } else if (bigCountArr[i] == 100000) { + arrPrice = new double[]{7.5, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5, 4.5}; + } + + double pirce = getPrcieInArea(bigCountArr[i], area, arrPrice); + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(pirce)); + + list.add(pro); + } + return list; + } + + // 判断小尺寸是否大于大尺寸价格 + private double getPrcieInArea(int count, Double area, double[] priceArr) { + double lastPrice = 0, price = 0; + if (area > AreaArr[AreaArr.length - 1]) { + price = area * count * priceArr[AreaArr.length - 1]; + lastPrice = area * count * priceArr[AreaArr.length - 2]; + if (lastPrice > price) { + price = lastPrice; + } + } + for (int i = 0; i < AreaArr.length; i++) { + if (AreaArr[i] < area) { + continue; + } + double lastArea = 0; + if (i > 0) { + lastArea = AreaArr[i - 1]; + lastPrice = lastArea * count * priceArr[i - 1]; + } + price = area * count * priceArr[i]; + if (lastPrice > price) { + price = lastPrice; + } + break; + } + + return price; + } + + public List getPrice(int count, Double area, String role) { + List list = new ArrayList(); + double[] priceArrA = new double[16]; + + + if (area <= 0.004) { + priceArrA = new double[]{37.0, 21.0, 14.0, 12.0, 10.0, 8.0, 7.6, 7.6, 7.6, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5}; + } else if (area <= 0.006) { + priceArrA = new double[]{33.0, 19.0, 13.0, 11.0, 9.5, 7.5, 6.5, 6.5, 6.5, 6.5, 6.5, 6.5, 6.5, 6.5, 6.5, 6.5}; + } else if (area <= 0.008) { + priceArrA = new double[]{30.0, 17.0, 13.0, 11.0, 8, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.01) { + priceArrA = new double[]{26.0, 17.0, 12.0, 10.0, 7.8, 6.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.012) { + priceArrA = new double[]{25.0, 15.0, 11.0, 9.0, 8.5, 7.6, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.015) { + priceArrA = new double[]{21.0, 14.0, 11.0, 9.5, 9, 8, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.017) { + priceArrA = new double[]{19.0, 14.0, 10, 9, 8.3, 7.3, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.018) { + priceArrA = new double[]{18.0, 12.0, 10.0, 8.0, 7.0, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.02) { + priceArrA = new double[]{17.0, 12.0, 9.0, 8.0, 8.0, 7.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.03) { + priceArrA = new double[]{19.0, 12.5, 10.0, 9.0, 6.5, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.04) { + priceArrA = new double[]{17.0, 13.0, 11.0, 10.0, 6.0, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.06) { + priceArrA = new double[]{12.8, 9.0, 7.8, 6.8, 6.0, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.1) { + priceArrA = new double[]{12.5, 9.0, 7.5, 6.5, 6.0, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.2) { + priceArrA = new double[]{12.0, 8.0, 7.5, 6.5, 6.0, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5}; + } else if (area <= 0.3) { + priceArrA = new double[]{11.5, 8.0, 7.2, 6.0, 5.5, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0}; + } else if (area > 0.3) { + priceArrA = new double[]{11.0, 7.8, 7.0, 6.5, 5.0, 5.0, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5, 4.5}; + } + + list = bigSizeAcountPrice(count, area, list, priceArrA); + return list; + } + + public static void main(String[] args) { + String memoStr = "(1988074200376066673)-80x54mm-1000张-铜版纸不干胶覆膜模切-ZS-马晓光123maxiaoguang-河南省-红红-[C2+1]"; + memoStr = memoStr.replace("(", "("); + memoStr = memoStr.replace(")", ")"); + int sIndex = memoStr.indexOf("("); + int eIndex = memoStr.indexOf(")"); + if (sIndex == -1 || eIndex == -1) { + return; + } + String first = memoStr.substring(0, sIndex + 1); + String memoCtid = "S_C1_1988074200376066673"; + if (memoCtid.indexOf("C") != -1) { + String CIdx = midStrEx(memoStr, "[", "]"); //C1 + if (CIdx.indexOf("+") != -1) { + CIdx = "C" + CIdx.split("\\+")[1]; + } + memoCtid = memoCtid.replace(CIdx + "_", ""); //去掉C1 + } + String last = memoStr.substring(eIndex, memoStr.length()); + String newMemo = first + memoCtid + last; + System.out.println(newMemo); + } + + public static String midStrEx(String source, String startStr, String endStr) { + String result = ""; + int startIndex, endIndex; + try { + startIndex = source.indexOf(startStr); + if (startIndex == -1) { + + return result; + } + String tmpStr = source.substring(startIndex + startStr.length()); + endIndex = tmpStr.indexOf(endStr); + if (endIndex == -1) { + return result; + } + result = tmpStr.substring(0, endIndex); + } catch (Exception ex) { + System.out.println("MidStrEx Err: " + ex.getMessage()); + } + return result; + } + +} diff --git a/src/main/java/lingtao/net/util/AYaMoStickersPrice.java b/src/main/java/lingtao/net/util/AYaMoStickersPrice.java new file mode 100644 index 0000000..7246c91 --- /dev/null +++ b/src/main/java/lingtao/net/util/AYaMoStickersPrice.java @@ -0,0 +1,116 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 哑膜A级铜版纸不干胶价格 + */ +public class AYaMoStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + /** + * 不干胶大数量遍历添加价格 + */ + private List bigSizeAcountPrice(int count, Double area, List list, Double[] priceArr) { + Product pro = new Product(); + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + return list; + } + + // 小尺寸 1万以上 + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area > 0 && area <= 0.0004) { + Double priceArrA[] = { 450.0, 275.0, 225.0, 183.0, 160.0, 100.0, 72.0, 70.0, 60.0, 55.0, 49.0, 43.0, 37.0, + 35.0, 34.0, 33.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0004 && area <= 0.0006) { + Double priceArrA[] = { 300.0, 183.0, 150.0, 122.0, 106.0, 67.0, 62.0, 48.0, 42.0, 39.0, 38.0, 37.0, 36.0, + 35.0, 33.0, 33.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0006 && area <= 0.0008) { + Double priceArrA[] = { 257.0, 157.0, 128.0, 105.0, 91.0, 57.0, 48.0, 40.0, 32.0, 32.0, 31.0, 30.0, 29.0, + 28.0, 27.0, 26.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0008 && area <= 0.001) { + Double priceArrA[] = { 200.0, 122.0, 100.0, 81.0, 71.0, 45.0, 41.0, 32.0, 27.0, 26.0, 25.0, 24.0, 23.0, + 22.0, 21.0, 20.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.001 && area <= 0.0012) { + Double priceArrA[] = { 150.0, 92.0, 75.0, 61.0, 53.0, 45.0, 35.0, 28.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, + 17.0, 16.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0012 && area <= 0.0014) { + Double priceArrA[] = { 138.0, 85.0, 69.0, 62.0, 51.0, 38.0, 30.0, 25.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, + 15.0, 14.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0014 && area <= 0.0016) { + Double priceArrA[] = { 120.0, 73.0, 67.0, 53.0, 47.0, 33.0, 20.0, 19.0, 17.0, 17.0, 17.0, 16.0, 15.0, 14.0, + 13.0, 13.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0016 && area <= 0.0025) { + Double priceArrA[] = { 117.0, 71.0, 67.0, 51.0, 44.0, 29.0, 14.0, 13.0, 12.5, 12.0, 11.0, 11.0, 10.5, 10.0, + 10.0, 9.5 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0025 && area <= 0.0035) { + Double priceArrA[] = { 110.0, 65.0, 63.0, 46.0, 37.0, 27.0, 13.5, 11.5, 11.5, 11.5, 11.0, 11.0, 11.0, 10.0, + 9.5, 9.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0035 && area <= 0.0045) { + Double priceArrA[] = { 84.0, 50.0, 44.0, 33.0, 25.0, 19.0, 12.0, 11.0, 11.0, 11.0, 10.0, 10.0, 10.0, 9.5, + 9.5, 9.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0045 && area <= 0.0084) { + Double priceArrA[] = { 56.0, 35.0, 29.0, 26.0, 19.0, 16.0, 11.0, 11.0, 10.5, 10.5, 10.0, 10.0, 9.0, 9.0, + 9.0, 8.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0084 && area <= 0.012) { + Double priceArrA[] = { 42.0, 26.0, 23.0, 18.0, 14.0, 12.0, 11.0, 11.0, 9.0, 8.0, 7.5, 7.5, 7.5, 7.5, 7.5, + 7.5 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.012 && area <= 0.015) { + Double priceArrA[] = { 36.0, 25.0, 22.0, 17.0, 14.0, 12.0, 9.0, 9.0, 8.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, + 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.015 && area <= 0.02) { + Double priceArrA[] = { 35.0, 24.0, 21.0, 17.0, 14.0, 12.0, 9.0, 9.0, 8.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, + 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.02 && area <= 0.06) { + Double priceArr[] = { 32.0, 23.0, 21.0, 17.0, 14.0, 12.0, 9.0, 9.0, 8.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, + 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.06 && area <= 0.1) { + Double priceArr[] = { 17.0, 12.0, 11.0, 10.0, 9.0, 9.0, 8.2, 8.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.1 && area <= 0.2) { + Double priceArr[] = { 13.0, 10.0, 9.0, 8.0, 6.5, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.2 && area <= 0.3) { + Double priceArr[] = { 11.0, 8.0, 7.5, 7.0, 6.5, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.3) { + Double priceArr[] = { 10.0, 7.0, 6.5, 6.0, 6.0, 6.0, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5, 5.5 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/AngClothUtil.java b/src/main/java/lingtao/net/util/AngClothUtil.java new file mode 100644 index 0000000..14cf98e --- /dev/null +++ b/src/main/java/lingtao/net/util/AngClothUtil.java @@ -0,0 +1,37 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.List; + +public class AngClothUtil { + + public static List getPrice(Double area, int count, List priceList, String[] craft) { + area = area * count; + Product pro = null; + double basePrice = 0; + double price = 0; + double mince = 45; + if (area <= 1) { + basePrice = 60; + } else if (area <= 2) { + basePrice = 55; + } else if (area <= 3) { + basePrice = 50; + } else if (area <= 4) { + basePrice = 45; + } else if (area <= 5) { + basePrice = 40; + } else if (area <= 10) { + basePrice = 36; + } else { + basePrice = 33; + } + price = Math.ceil(basePrice * area); + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.max(price, mince)); + priceList.add(pro); + return priceList; + } +} diff --git a/src/main/java/lingtao/net/util/BqPrice.java b/src/main/java/lingtao/net/util/BqPrice.java new file mode 100644 index 0000000..51c684d --- /dev/null +++ b/src/main/java/lingtao/net/util/BqPrice.java @@ -0,0 +1,53 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; +import org.springframework.util.StringUtils; + +import java.util.List; + +public class BqPrice { + public List getPrice(int count, Double length, List list, Integer number, String craftShua, String[] craft) { + double dj = 0; + if (length == 96 || length == 120) { + if (craftShua.equals("单面印刷")) { + dj = 45; + } else { + dj = 60; + } + } else if (length == 192) { + if (craftShua.equals("单面印刷")) { + dj = 57; + } else { + dj = 75; + } + } else if (length == 144) { + if (craftShua.equals("单面印刷")) { + dj = 49; + } else { + dj = 70; + } + } else if (length == 240) { + if (craftShua.equals("单面印刷")) { + dj = 96; + } else { + dj = 125; + } + } else { + if (craftShua.equals("单面印刷")) { + dj = 111; + } else { + dj = 144; + } + } + + if (!StringUtils.isEmpty(craft) && craft[0].equals("旗杆")) { + dj += 15; + } + dj += 5; + Product pro = new Product(); + pro.setPrice(Math.ceil(dj * count * number * 1.2)); + pro.setCount(count); + list.add(pro); + return list; + } +} diff --git a/src/main/java/lingtao/net/util/CanopyUtil.java b/src/main/java/lingtao/net/util/CanopyUtil.java new file mode 100644 index 0000000..a73b4a8 --- /dev/null +++ b/src/main/java/lingtao/net/util/CanopyUtil.java @@ -0,0 +1,77 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class CanopyUtil { + + public static List getPrice(Double area, int count, List priceList, String kindvalue, String craft) { + Product pro = null; + double price = 0; + area = area * count;//计算总面积 + double basePrice = 0; + double[] priceArr = getBasePrice(kindvalue, craft); + if (priceArr.length == 0) { + return priceList; + } + if (area <= 4) { + basePrice = priceArr[0]; + } else if (area <= 6) { + basePrice = priceArr[1]; + } else if (area <= 9) { + basePrice = priceArr[2]; + } else { + basePrice = priceArr[3]; + } + double mince = getMinPrice(kindvalue, craft); + price = Math.ceil(basePrice * area); + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.max(price, mince)); + pro.setWeight(String.valueOf(area * 0.18)); + priceList.add(pro); + + return priceList; + } + + private static double[] getBasePrice(String kindvalue, String craft) { + List craftList = craft != null ? Collections.singletonList(craft) : new ArrayList<>(); + if ("银胶涤纶布".equals(kindvalue)) { + if (craftList.contains("定制")) { + return new double[]{27, 26, 25, 24.5}; + } else { + return new double[]{12.5, 11.5, 11, 10}; + } + } + if ("黑胶涤纶布".equals(kindvalue)) { + if (craftList.contains("定制")) { + return new double[]{29, 28, 27, 26}; + } else { + return new double[]{14.5, 13.5, 13, 12}; + } + } + return new double[]{}; + } + + private static double getMinPrice(String kindvalue, String craft) { + List craftList = craft != null ? Collections.singletonList(craft) : new ArrayList<>(); + if ("银胶涤纶布".equals(kindvalue)) { + if (craftList.contains("定制")) { + return 80; + } else { + return 60; + } + } + if ("黑胶涤纶布".equals(kindvalue)) { + if (craftList.contains("定制")) { + return 80; + } else { + return 50; + } + } + return 0; + } +} diff --git a/src/main/java/lingtao/net/util/CardPrice.java b/src/main/java/lingtao/net/util/CardPrice.java new file mode 100644 index 0000000..d704364 --- /dev/null +++ b/src/main/java/lingtao/net/util/CardPrice.java @@ -0,0 +1,187 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +public class CardPrice { + int countArr[] = { 500, 1000, 2000, 3000, 5000, 10000}; + + public List getCardPrice(int count, Double area, List list, Double[] priceArr, String kind) { + Product pro = new Product(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + if(kind.equals("1")) { + priceArr[i] += 2; + } + if(area == 0.0012) { + pro.setPrice(Math.ceil(area * countArr[i] * priceArr[i])+20); + }else { + pro.setPrice(Math.ceil(area * countArr[i] * priceArr[i])); + } + + list.add(pro); + } + + return list; + } + + //1万以上报价 + public List getMorePrice(int count, Double area) { + List list = new ArrayList(); + Product pro = new Product(); + double dj = 0; + if (area <= 0.0016) { + dj = 76.0; + } else if (area <= 0.0024) { + dj = 43.0; + } else if (area <= 0.0028) { + dj = 38.0; + } else if (area <= 0.0032) { + dj = 37.0; + } else if (area <= 0.0036) { + dj = 30.0; + } else if (area <= 0.005) { + dj = 29.0; + } else if (area <= 0.006) { + dj = 28.0; + } else if (area <= 0.009) { + dj = 27.0; + } else if (area <= 0.014) { + dj = 20.0; + } else if (area <= 0.021) { + dj = 20.0; + } else if (area <= 0.025) { + dj = 19.0; + } else if (area <= 0.12) { + dj = 17.0; + } + + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(dj * 10000 * area * 1.6)); + list.add(pro); + return list; + } + + // 1万以下报价 + public List getPrice(int count, Double area, String kind) { + List list = new ArrayList(); + if (area <= 0.0009) { + Double priceArrA[] = { 226.0, 142.0, 110.0, 86.0, 92.0, 76.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0016) { + Double priceArrA[] = { 158.0, 106.0, 82.0, 86.0, 84.0, 76.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0024) { + Double priceArrA[] = { 80.0, 56.0, 56.0, 45.0, 43.0, 43.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0028) { + Double priceArrA[] = { 76.0, 52.0, 50.0, 45.0, 43.0, 38.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0032) { + Double priceArrA[] = { 69.0, 51.0, 49.0, 44.0, 42.0, 37.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0036) { + Double priceArrA[] = { 60.0, 48.0, 45.0, 40.0, 35.0, 35.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0039) { + Double priceArrA[] = { 50.0, 45.0, 40.0, 35.0, 30.0, 30.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0044) { + Double priceArrA[] = { 75.0, 70.0, 60.0, 58.0, 56.0, 55.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.0048) { + Double priceArrA[] = { 48.0, 44.0, 34.0, 35.0, 30.0, 30.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.005) { + Double priceArrA[] = { 45.0, 40.0, 34.0, 35.0, 30.0, 30.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.006) { + Double priceArrA[] = { 40.0, 35.0, 33.0, 32.0, 28.0, 28.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.009) { + Double priceArrA[] = { 39.0, 34.0, 32.0, 31.0, 27.0, 37.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.014) { + Double priceArrA[] = { 33.0, 28.0, 25.0, 23.0, 20.0, 20.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.021) { + Double priceArrA[] = { 32.0, 28.0, 24.0, 22.0, 20.0, 20.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.025) { + Double priceArrA[] = { 30.0, 26.0, 22.0, 20.0, 19.0, 19.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } else if (area <= 0.12) { + Double priceArrA[] = { 26.0, 23.0, 20.0, 18.0, 17.0, 17.0}; + list = getCardPrice(count, area, list, priceArrA, kind); + } + return list; + } + + /*菜单报价 + * kind 材质 + * size 尺寸 + * count 数量 + * number 款数 + * craft 工艺 + * */ + public List getMenuPrice(String kind, String size, int count, int number, String[] craft) { + List list = new ArrayList(); + double price = 0; + int type = 0; + int num = count * number; + for(int i = 0;i < craft.length; i++) { + if(craft[i].equals("单面过塑")) { + type = 1; + }else if(craft[i].equals("双面过塑")) { + type = 2; + } + } + if(kind.equals("1")) {//300克铜版纸菜单 + if(size.equals("21*14")) { + if(type == 1) { + price = 110 + 15 * num; + }else { + price = 110 + 16 * num; + } + }else if(size.equals("21*28.5")) { + if(type == 1) { + price = 120 + 15 * num; + }else { + price = 120 + 16 * num; + } + }else { + if(type == 1) { + price = 130 + 20 * num; + }else { + price = 130 + 22 * num; + } + } + }else {//pvc菜单 + if(size.equals("21*14")) { + if(type == 1) { + price = 120 + 18 * num; + }else { + price = 120 + 20 * num; + } + }else { + if(type == 1) { + price = 125 + 20 * num; + }else { + price = 125 + 30 * num; + } + } + } + Product pro = new Product(); + pro.setPrice(Math.ceil(price)); + pro.setCount(count); + list.add(pro); + return list; + } +} diff --git a/src/main/java/lingtao/net/util/CouponPrice.java b/src/main/java/lingtao/net/util/CouponPrice.java new file mode 100644 index 0000000..0c4f9ff --- /dev/null +++ b/src/main/java/lingtao/net/util/CouponPrice.java @@ -0,0 +1,212 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * 优惠券/贺卡价格 + */ +public class CouponPrice { + + int countArr[] = {200, 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000}; + + int countArr2[] = {200, 500, 1000, 2000, 3000, 5000, 10000}; + + + /** + * 遍历添加价格 + */ + private List setPrice(int count, int min, List list, Double[] priceArr) { + Product pro = new Product(); + if (min <= 4) { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else if (min > 4) { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(priceArr[i] * min); + list.add(pro); + } + } + return list; + } + + public List getPrice(int count, int min) { + List list = new ArrayList(); + if (min == 1) { + Double priceArrA[] = {35.0, 40.0, 60.0, 100.0, 150.0, 180.0, 200.0, 240.0, 280.0, 320.0, 360.0, 380.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 2) { + Double priceArrA[] = {65.0, 70.0, 80.0, 130.0, 180.0, 240.0, 320.0, 380.0, 440.0, 500.0, 520.0, 540.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 3) { + Double priceArrA[] = {90.0, 100.0, 120.0, 180.0, 280.0, 380.0, 480.0, 570.0, 670.0, 780.0, 840.0, 880.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 4) { + Double priceArrA[] = {120.0, 120.0, 150.0, 240.0, 320.0, 400.0, 480.0, 600.0, 680.0, 800.0, 1040.0, 1080.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 5) { + Double priceArrA[] = {26.0, 32.0, 36.0, 52.0, 76.0, 90.0, 116.0, 136.0, 150.0, 180.0, 220.0, 225.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min > 5 && min <= 9) { + Double priceArrA[] = {24.0, 25.0, 30.0, 50.0, 70.0, 85.0, 105.0, 135.0, 150.0, 180.0, 200.0, 210.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 10) { + Double priceArrA[] = {22.0, 23.0, 30.0, 50.0, 70.0, 85.0, 105.0, 135.0, 150.0, 180.0, 200.0, 210.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min > 10 && min <= 20) { + Double priceArrA[] = {20.0, 20.0, 28.0, 48.0, 70.0, 85.0, 100.0, 135.0, 150.0, 180.0, 200.0, 200.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min > 20 && min < 30) { + Double priceArrA[] = {15.0, 18.0, 24.0, 45.0, 70.0, 85.0, 95.0, 135.0, 150.0, 180.0, 190.0, 190.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 30) { + Double priceArrA[] = {14.0, 17.0, 23.0, 44.0, 69.0, 84.0, 92.0, 132.0, 147.0, 176.0, 185.0, 185.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 40) { + Double priceArrA[] = {13.0, 16.0, 22.0, 43.0, 68.0, 83.0, 90.0, 130.0, 145.0, 174.0, 180.0, 180.0}; + list = setPrice(count, min, list, priceArrA); + } else if (min == 50) { + Double priceArrA[] = {12.0, 15.0, 21.0, 42.0, 66.0, 83.0, 88.0, 128.0, 143.0, 170.0, 175.0, 175.0}; + list = setPrice(count, min, list, priceArrA); + } + return list; + } + + private static final String compate = "basePrice + area*price"; + private static final String moCompate = "chu*number"; + + public List getCouponPrice(int min, Product dto, List priceList, int count) { + Product product = null; + List products = new ArrayList<>(); + int[] priceArr = {20, 28, 52, 100, 155, 165, 250}; + + double minPrice = 0.00; + if ("0".equals(dto.getFmType())) { + minPrice = 60.00; + } + if ("1".equals(dto.getFmType())) { + minPrice = 55.00; + } + dto.setNumber(dto.getNumber() == null || dto.getNumber() == 0 ? 1 : dto.getNumber()); + for (int i = 0; i < countArr2.length; i++) { + product = new Product(); + if (count > countArr2[i] || products.size() >= 3) { + continue; + } + Double price = this.price(min, dto, countArr2[i], Double.valueOf(priceArr[i]), minPrice); + + product.setPrice(price); + product.setCount(countArr2[i]); + products.add(product); + } + return products; + } + + private Double price(int min, Product dto, int count, double basePrice, double minPrice) { + //200张以内16元/款/单,200张以上24元/款/单 + int price = count <= 200 ? 16 * dto.getNumber() : 20 * dto.getNumber(); + if (min == 1) { + price = count <= 200 ? 19 * dto.getNumber() : 25 * dto.getNumber(); + } + double minW = min; + if (minW > 1) { + minW = minW - 0.5; + } + double v = basePrice * min * dto.getNumber() + ((dto.getAwards() - 1) * minW * price); + String[] size_list = dto.getSize1().split(","); + double chu = 0.00; + double total_chu = 0.00; + List chu_list = new ArrayList<>(); + + //0贴膜1配膜 + for (int i = 0; i < size_list.length; i++) { + if ("60*25".equals(size_list[i])) { + if ("0".equals(dto.getFmType())) { + chu = 0.12 * count; + chu = chu < 30 ? 30 : chu; + } + if ("1".equals(dto.getFmType())) { + chu = 0.08 * count; + chu = chu < 20 ? 20 : chu; + } + } else if ("8*36".equals(size_list[i]) || "18*32".equals(size_list[i]) || "15*48".equals(size_list[i])) { + if ("0".equals(dto.getFmType())) { + chu = 0.1 * count; + chu = chu < 30 ? 30 : chu; + } + if ("1".equals(dto.getFmType())) { + chu = 0.07 * count; + chu = chu < 20 ? 20 : chu; + } + } else if ("35*58".equals(size_list[i])) { + if ("0".equals(dto.getFmType())) { + chu = 0.22 * count; + chu = chu < 100 ? 100 : chu; + } + if ("1".equals(dto.getFmType())) { + chu = 0.14 * count; + chu = chu < 50 ? 50 : chu; + } + } else if ("41*72".equals(size_list[i])) { + if ("0".equals(dto.getFmType())) { + chu = 0.24 * count; + chu = chu < 100 ? 100 : chu; + } + if ("1".equals(dto.getFmType())) { + chu = 0.16 * count; + chu = chu < 50 ? 50 : chu; + } + } else if ("70*50".equals(size_list[i])) { + if ("0".equals(dto.getFmType())) { + chu = 0.26 * count; + chu = chu < 100 ? 100 : chu; + } + if ("1".equals(dto.getFmType())) { + chu = 0.18 * count; + chu = chu < 50 ? 50 : chu; + } + } else { + //正常规格 + if ("0".equals(dto.getFmType())) { + chu = count <= 10000 ? 0.05 * count : 0.03 * count; + chu = chu < 30 ? 30 : chu; + } + if ("1".equals(dto.getFmType())) { + chu = 0.04 * count; + chu = chu < 20 ? 20 : chu; + } + } + chu_list.add(chu); + } + if (dto.getAwards() == 1 && count == 500) {//只有一个奖项时500和200价格相同 500+5 + minPrice = minPrice + 5; + } + Collections.sort(chu_list); + for (Double aDouble : chu_list) { + if (total_chu > 0.00) { + total_chu = total_chu + aDouble * dto.getNumber(); + }else{ + total_chu = Math.max(v + aDouble * dto.getNumber(), minPrice); + } + } + total_chu = Math.round(total_chu); + + return total_chu; + } + +} diff --git a/src/main/java/lingtao/net/util/CupHolderUtil.java b/src/main/java/lingtao/net/util/CupHolderUtil.java new file mode 100644 index 0000000..0e84d6a --- /dev/null +++ b/src/main/java/lingtao/net/util/CupHolderUtil.java @@ -0,0 +1,62 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.List; + +public class CupHolderUtil { + static int countArr[] = {200, 500, 1000, 2000, 3000, 5000, 8000, 10000}; + static double priceArr[] = {98.8, 57, 30.4, 22.8, 16, 14.8, 14.8, 12.8}; + static double priceLess[] = {532, 570, 760, 950, 1080, 1600, 1920, 2112}; + + public static List getPrice(Double area, int count, List priceList) { + Product pro = new Product(); + double price = 0; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || priceList.size() > 3) { + continue; + } + price = Math.ceil(priceArr[i] * area * countArr[i]); + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(price > priceLess[i] ? price : priceLess[i]); + priceList.add(pro); + } + + return priceList; + } + + static int pvcCountArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + + public static List getPvcPrice(String size, String kind, int count, List priceList) { + double[] price = {}; + if ("0.18mm哑白PVC".equals(kind)) { + if ("14*44".equals(size)) { + price = new double[]{546, 910, 1594, 2318, 3148, 6022}; + } + if ("27.8*44".equals(size)) { + price = new double[]{1094, 1820, 3190, 4636, 6298, 12046}; + } + } + if ("0.32mm哑白PVC".equals(kind)) { + if ("14*44".equals(size)) { + price = new double[]{712, 1242, 2242, 3286, 4500, 8700}; + } + if ("27.8*44".equals(size)) { + price = new double[]{1422, 2484, 4482, 6570, 9000, 17400}; + } + } + Product pro = new Product(); + for (int i = 0; i < pvcCountArr.length; i++) { + if (pvcCountArr[i] < count || priceList.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(pvcCountArr[i]); + pro.setPrice(price[i]); + priceList.add(pro); + } + + return priceList; + } +} diff --git a/src/main/java/lingtao/net/util/DateFormatUtils.java b/src/main/java/lingtao/net/util/DateFormatUtils.java new file mode 100644 index 0000000..e1be4ed --- /dev/null +++ b/src/main/java/lingtao/net/util/DateFormatUtils.java @@ -0,0 +1,164 @@ +package lingtao.net.util; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.Calendar; +import java.util.Date; + +import org.apache.commons.lang.StringUtils; + +public class DateFormatUtils { + + // 开始日期 + public String formatBeginTime(String add_time_begin) { + // 按日期范围统计 + if (add_time_begin.length() > 20 && !add_time_begin.contains("~")) { + return add_time_begin.substring(0, 10); + } + // 按周统计 + if (add_time_begin.contains("~")) { + String[] dates = add_time_begin.split("~"); + return dates[0]; + } // 按月统计 + else if (add_time_begin.length() == 7) { + return add_time_begin + "-01"; + } // 按季度统计 + else if (add_time_begin.length() == 6) { + String subYear = add_time_begin.substring(0, 4); + if (add_time_begin.contains("-1")) { + return subYear + "-01-01"; + } else if (add_time_begin.contains("-2")) { + return subYear + "-04-01"; + } else if (add_time_begin.contains("-3")) { + return subYear + "-07-01"; + } else { + return subYear + "-10-01"; + } + } // 按年统计 + else if (add_time_begin.length() == 4) { + return add_time_begin + "-01-01"; + } else { // 按日统计 + return add_time_begin; + } + + } + + // 结束日期 + public String formatEndTime(String add_time_begin) { + // 按日期范围统计 + if (add_time_begin.length() > 20 && !add_time_begin.contains("~")) { + return add_time_begin.substring(13) + " 23:59:59"; + } + // 按周统计 + if (add_time_begin.contains("~")) { + String[] dates = add_time_begin.split("~"); + return dates[1]; + } + // 按月统计 + else if (add_time_begin.length() == 7) { + return add_time_begin + "-31"; + } + // 按季度统计 + else if (add_time_begin.length() == 6) { + String subYear = add_time_begin.substring(0, 4); + if (add_time_begin.contains("-1")) { + return subYear + "-03-31"; + } else if (add_time_begin.contains("-2")) { + return subYear + "-06-30"; + } else if (add_time_begin.contains("-3")) { + return subYear + "-09-30"; + } else { + return subYear + "-12-31"; + } + } + // 按年统计 + else if (add_time_begin.length() == 4) { + return add_time_begin + "-12-31"; + } else {// 按日统计 + if (StringUtils.isEmpty(add_time_begin)) + return add_time_begin; + return add_time_begin + " 23:59:59"; + } + } + + /** + * 计算俩个日期间隔的时间 + * + * @param date1 + * @param date2 + * @return + */ + public static long getSubtractiveDays(Date date1, Date date2) { + long nano = (Date + .from(LocalDateTime.ofInstant(date2.toInstant(), ZoneId.systemDefault()).atZone(ZoneId.systemDefault()) + .withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant()) + .getTime() + - Date.from(LocalDateTime.ofInstant(date1.toInstant(), ZoneId.systemDefault()) + .atZone(ZoneId.systemDefault()).withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant()) + .getTime()); + return nano / (1000 * 3600 * 24); + } + + /** + * 计算俩个日期间隔的时间 + * + * @param date1 + * @param date2 + * @return + */ + public static int getDay(Date date1, Date date2) { + Calendar cal = Calendar.getInstance(); + cal.setTime(date1); + long time1 = cal.getTimeInMillis(); + cal.setTime(date2); + long time2 = cal.getTimeInMillis(); + long between_days = (time2 - time1) / (1000 * 3600 * 24); + return Integer.parseInt(String.valueOf(between_days)); + } + + /** + * 计算俩个日期间隔的时间 + * + * @param date1 + * @param date2 + * @return + */ + public static String getDatePoor(Date endDate, Date nowDate) { + + long nd = 1000 * 24 * 60 * 60;// 每天毫秒数 + + long nh = 1000 * 60 * 60;// 每小时毫秒数 + + long nm = 1000 * 60;// 每分钟毫秒数 + + long diff = endDate.getTime() - nowDate.getTime(); // 获得两个时间的毫秒时间差异 + + long day = diff / nd; // 计算差多少天 + + long hour = diff % nd / nh; // 计算差多少小时 + + long min = diff % nd % nh / nm; // 计算差多少分钟 + + return day + "天" + hour + "小时" + min + "分钟"; + } + + /** + * 计算俩个日期间隔的时间 + * + * @param date1 字符串日期 + * @param date2 字符串日期 + * @return + * @throws ParseException + */ + public static String getDay(String date1, String date2) throws ParseException { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Date d1 = sdf.parse(date1); + Date d2 = sdf.parse(date2); + + long daysBetween = (long) ((d1.getTime() - d2.getTime()) / (60 * 60 * 24 * 1000)); + System.out.println(date1 + " 与 " + date2 + "间隔 " + daysBetween + " 天"); + return date1 + " 与 " + date2 + "间隔 " + daysBetween + " 天"; + } +} diff --git a/src/main/java/lingtao/net/util/ExcelUtils.java b/src/main/java/lingtao/net/util/ExcelUtils.java new file mode 100644 index 0000000..63ba536 --- /dev/null +++ b/src/main/java/lingtao/net/util/ExcelUtils.java @@ -0,0 +1,159 @@ +package lingtao.net.util; + +import java.io.IOException; +import java.io.InputStream; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.poi.hssf.usermodel.HSSFDateUtil; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.apache.shiro.SecurityUtils; + +import lingtao.net.bean.SysUser; + +public class ExcelUtils { + + private final static String excel2003L = ".xls"; // 2003- 版本的excel + private final static String excel2007U = ".xlsx"; // 2007+ 版本的excel + + /** + * 描述:获取IO流中的数据,组装成List>对象 + * + * @param in,fileName + * @return + * @throws IOException + */ + public List> getBankListByExcel(InputStream in, String fileName) throws Exception { + List> list = null; + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + // 创建Excel工作薄 + Workbook work = this.getWorkbook(in, fileName); + if (null == work) { + throw new Exception("创建Excel工作薄为空!"); + } + Sheet sheet = null; // 页数 + Row row = null; // 行数 + Cell cell = null; // 列数 + + list = new ArrayList>(); + // 遍历Excel中所有的sheet + for (int i = 0; i < work.getNumberOfSheets(); i++) { + sheet = work.getSheetAt(i); + if (sheet == null) { + continue; + } + + // 遍历当前sheet中的所有行 + for (int j = sheet.getFirstRowNum(); j <= sheet.getLastRowNum(); j++) { + row = sheet.getRow(j); + if (user.getRole().contains("1050")) { + if (row == null || row.getFirstCellNum() == j) { + continue; + } + } else { + if (row == null) {// ||row.getFirstCellNum()==j 第一行不要 + continue; + } + } + + // 遍历所有的列 + List li = new ArrayList(); + for (int y = row.getFirstCellNum(); y < row.getLastCellNum(); y++) { + cell = row.getCell(y); + li.add(this.getValue(cell)); + } + list.add(li); + } + } + + return list; + + } + + /** + * 描述:根据文件后缀,自适应上传文件的版本 + * + * @param inStr,fileName + * @return + * @throws Exception + */ + public Workbook getWorkbook(InputStream inStr, String fileName) throws Exception { + Workbook wb = null; + String fileType = fileName.substring(fileName.lastIndexOf(".")); + if (excel2003L.equals(fileType)) { + wb = new HSSFWorkbook(inStr); // 2003- + } else if (excel2007U.equals(fileType)) { + wb = new XSSFWorkbook(inStr); // 2007+ + } else { + throw new Exception("解析的文件格式有误!"); + } + return wb; + } + + /** + * 描述:对表格中数值进行格式化 + * + * @param cell + * @return + */ + // 解决excel类型问题,获得数值 + public String getValue(Cell cell) { + String value = ""; + if (null == cell) { + return value; + } + switch (cell.getCellType()) { + // 数值型 + case Cell.CELL_TYPE_NUMERIC: + if (HSSFDateUtil.isCellDateFormatted(cell)) { + // 如果是date类型则 ,获取该cell的date值 + Date date = HSSFDateUtil.getJavaDate(cell.getNumericCellValue()); + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); + value = format.format(date); + ; + } else {// 纯数字 + BigDecimal big = new BigDecimal(cell.getNumericCellValue()); + value = big.toString(); + // 解决1234.0 去掉后面的.0 + if (null != value && !"".equals(value.trim())) { + String[] item = value.split("[.]"); + if (1 < item.length && "0".equals(item[1])) { + value = item[0]; + } + } + } + break; + // 字符串类型 + case Cell.CELL_TYPE_STRING: + value = cell.getStringCellValue().toString(); + break; + // 公式类型 + case Cell.CELL_TYPE_FORMULA: + // 读公式计算值 + value = String.valueOf(cell.getNumericCellValue()); + if (value.equals("NaN")) {// 如果获取的数据值为非法值,则转换为获取字符串 + value = cell.getStringCellValue().toString(); + } + break; + // 布尔类型 + case Cell.CELL_TYPE_BOOLEAN: + value = " " + cell.getBooleanCellValue(); + break; + default: + value = cell.getStringCellValue().toString(); + } + if ("null".endsWith(value.trim())) { + value = ""; + } + return value; + } + +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/util/FerruleUtil.java b/src/main/java/lingtao/net/util/FerruleUtil.java new file mode 100644 index 0000000..d52bffb --- /dev/null +++ b/src/main/java/lingtao/net/util/FerruleUtil.java @@ -0,0 +1,32 @@ +package lingtao.net.util; + +import java.util.List; + +import lingtao.net.bean.Product; + +public class FerruleUtil {//会员卡卡套 + int countList[] = {100, 200, 300, 500, 1000}; + double priceList[] = new double[5]; + public List getPrice(double length, int count, List list) { + + if(length == 19.5) { + priceList = new double[]{800, 1500, 1950, 2500, 4000}; + }else if(length == 15.5) { + priceList = new double[]{600, 1100, 1500, 2000, 3000}; + }else{ + priceList = new double[]{600, 1000, 1180, 1680, 2800}; + } + + for(int i = 0;i< countList.length;i++) { + if(countList[i] < count || list.size() > 2) { + continue; + } + Product pro = new Product(); + pro.setPrice(priceList[i]); + pro.setCount(countList[i]); + list.add(pro); + } + + return list; + } +} diff --git a/src/main/java/lingtao/net/util/FgqPrice.java b/src/main/java/lingtao/net/util/FgqPrice.java new file mode 100644 index 0000000..cccdf18 --- /dev/null +++ b/src/main/java/lingtao/net/util/FgqPrice.java @@ -0,0 +1,66 @@ +package lingtao.net.util; + +import java.text.DecimalFormat; +import java.util.List; + +import lingtao.net.bean.Product; + +public class FgqPrice { + DecimalFormat df = new DecimalFormat("0.00"); + /**仿古旗报价*/ + public List getPrice(int count, Double area, List list,String[] craftList, String kind, int num) { + Product pro = new Product(); + pro = new Product(); + pro.setCount(count); + String craft = craftList[0]; + double dj = 0,wei = 0; + if(kind.equals("1")) { + if(craft.equals("单面")) { + dj = 90; + wei = 0.065; + }else { + dj = 100; + wei = 0.195; + } + }else { + if(craft.equals("单面")) { + dj = 100; + wei = 0.165; + }else { + dj = 135; + wei = 0.33; + } + } + + double price = Math.ceil(area * dj); + pro.setPrice(price); + pro.setWeight(df.format(area * wei * num)); + list.add(pro); + + return list; + } + + /**手拉旗报价*/ + public List getSlqPrice(int count, List list) { + Product pro = new Product(); + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(30 * count)); + list.add(pro); + + return list; + } + + public List getSlqSpeicPrice(int count, List list, int type) { + Product pro = new Product(); + pro = new Product(); + pro.setCount(count); + if(type == 1) { + pro.setPrice(Math.ceil(16 * count)); + }else { + pro.setPrice(Math.ceil(12 * count)); + } + list.add(pro); + return list; + } +} diff --git a/src/main/java/lingtao/net/util/GDZGMStickersPrice.java b/src/main/java/lingtao/net/util/GDZGMStickersPrice.java new file mode 100644 index 0000000..cb38ec5 --- /dev/null +++ b/src/main/java/lingtao/net/util/GDZGMStickersPrice.java @@ -0,0 +1,174 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 格底珠光膜不干胶价格 + */ +public class GDZGMStickersPrice { + + int countArr[] = { 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 40000, 50000, + 60000, 70000, 80000, 90000, 100000 }; + + /** + * 5*5cm以内(含) + * + * @param count + * @return + */ + public List acountPrice5x5(int count) { + int priceArr[] = { 180, 200, 240, 280, 320, 380, 420, 460, 500, 540, 620, 1000, 1600, 2100, 2500, 3000, 3500, + 4000, 4500, 5000 }; + Product pro = new Product(); + List list = new ArrayList(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + // 每一万张增加500元 + pro.setPrice((Math.ceil(count / 100000.0) - 1) * 450 + 5000); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + /** + * 9*5.4cm 以内 + * + * @param count + * @param area 单个产品的面积(平方米) + * @return + */ + public List acountPrice9x5(int count, Double area) { + int priceArr[] = { 200, 240, 320, 380, 440, 500, 620, 700, 800, 900, 1000, 1750, 2400, 3200, 4000, 4800, 5400, + 6000, 6600, 7200 }; + Product pro = new Product(); + List list = new ArrayList(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + // 每平方17元 + pro.setPrice(Math.ceil(area * count * 17)); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + public List acountPrice9xup(int count, Double area) { + Product pro = new Product(); + List list = new ArrayList(); + double price = 0.0; + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * 20)); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + if (area * countArr[i] <= 3) { + price = 85; + } else if (area * countArr[i] > 3 && area * countArr[i] <= 5) { + price = 70; + } else if (area * countArr[i] > 5 && area * countArr[i] <= 8) { + price = 50; + } else if (area * countArr[i] > 8 && area * countArr[i] <= 10) { + price = 37; + } else if (area * countArr[i] > 10 && area * countArr[i] <= 15) { + price = 35; + } else if (area * countArr[i] > 15 && area * countArr[i] <= 25) { + price = 30; + } else if (area * countArr[i] > 25 && area * countArr[i] <= 30) { + price = 26; + } else if (area * countArr[i] > 30 && area * countArr[i] <= 100) { + price = 25; + } else if (area * countArr[i] > 100 && area * countArr[i] <= 500) { + price = 22; + } else { + price = 20; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(countArr[i] * area * price)); + list.add(pro); + } + return list; + } + + public List acountYaMoPrice9x5(int count, Double area) { + int priceArr[] = { 520, 540, 560, 600, 640, 680, 740, 800, 860, 940, 1100, 1800, 2500, 3300, 4100, 4900, 5500, + 6100, 6700, 7400 }; + Product pro = new Product(); + List list = new ArrayList(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + // 每平方18元 + pro.setPrice(Math.ceil(area * count * 18)); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + public List acountYamoPrice9xup(int count, Double area) { + Product pro = new Product(); + List list = new ArrayList(); + double price = 0.0; + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * 20)); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + if (area * countArr[i] <= 15) { + price = 0; + } else if (area * countArr[i] > 15 && area * countArr[i] <= 25) { + price = 32; + } else if (area * countArr[i] > 25 && area * countArr[i] <= 30) { + price = 28; + } else if (area * countArr[i] > 30 && area * countArr[i] <= 100) { + price = 27; + } else if (area * countArr[i] > 100 && area * countArr[i] <= 500) { + price = 24; + } else { + price = 22; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(countArr[i] * area * price) > 600 ? Math.ceil(countArr[i] * area * price) : 600); + list.add(pro); + } + return list; + } + +} diff --git a/src/main/java/lingtao/net/util/IPUtils.java b/src/main/java/lingtao/net/util/IPUtils.java new file mode 100644 index 0000000..7fe350f --- /dev/null +++ b/src/main/java/lingtao/net/util/IPUtils.java @@ -0,0 +1,134 @@ +package lingtao.net.util; + +import eu.bitwalker.useragentutils.Browser; +import eu.bitwalker.useragentutils.OperatingSystem; +import eu.bitwalker.useragentutils.UserAgent; +import eu.bitwalker.useragentutils.Version; +import org.apache.commons.lang.StringUtils; + +import javax.servlet.http.HttpServletRequest; + +public class IPUtils { + /** + * 获取登录用户的IP地址 + * + * @param request + * @return + */ + public static String getIpAddr(HttpServletRequest request) { + if (request == null) { + return "unknown"; + } + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Forwarded-For"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("X-Real-IP"); + } + + if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + + return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : getMultistageReverseProxyIp(ip); + } + + /** + * 从多级反向代理中获得第一个非unknown IP地址 + * + * @param ip 获得的IP地址 + * @return 第一个非unknown IP地址 + */ + public static String getMultistageReverseProxyIp(String ip) { + // 多级反向代理检测 + if (ip != null && ip.indexOf(",") > 0) { + final String[] ips = ip.trim().split(","); + for (String subIp : ips) { + if (false == isUnknown(subIp)) { + ip = subIp; + break; + } + } + } + return StringUtils.substring(ip, 0, 255); + } + + /** + * 检测给定字符串是否为未知,多用于检测HTTP请求相关 + * + * @param checkString 被检测的字符串 + * @return 是否未知 + */ + public static boolean isUnknown(String checkString) { + return StringUtils.isBlank(checkString) || "unknown".equalsIgnoreCase(checkString); + } + + /** + * 获取发起请求的浏览器名称 + */ + public static String getBrowserName(HttpServletRequest request) { + String header = request.getHeader("User-Agent"); + UserAgent userAgent = UserAgent.parseUserAgentString(header); + Browser browser = userAgent.getBrowser(); + return browser.getName(); + } + + /** + * 获取发起请求的浏览器版本号 + */ + public static String getBrowserVersion(HttpServletRequest request) { + String header = request.getHeader("User-Agent"); + UserAgent userAgent = UserAgent.parseUserAgentString(header); + // 获取浏览器信息 + Browser browser = userAgent.getBrowser(); + // 获取浏览器版本号 + Version version = browser.getVersion(header); + return version.getVersion(); + } + + /** + * 获取发起请求的操作系统名称 + */ + public static String getOsName(HttpServletRequest request) { + String header = request.getHeader("User-Agent"); + UserAgent userAgent = UserAgent.parseUserAgentString(header); + OperatingSystem operatingSystem = userAgent.getOperatingSystem(); + return operatingSystem.getName(); + } + + + /** + * 通过IP获取地址(需要联网,调用淘宝的IP库) + * + * @param ip + * @return + */ + /* + * public static String getIpInfo(String ip) { if ("127.0.0.1".equals(ip)) { ip + * = "127.0.0.1"; } String info = ""; try { URL url = new + * URL("http://ip.taobao.com/service/getIpInfo.php?ip=" + ip); HttpURLConnection + * htpcon = (HttpURLConnection) url.openConnection(); + * htpcon.setRequestMethod("GET"); htpcon.setDoOutput(true); + * htpcon.setDoInput(true); htpcon.setUseCaches(false); + * + * InputStream in = htpcon.getInputStream(); BufferedReader bufferedReader = new + * BufferedReader(new InputStreamReader(in)); StringBuffer temp = new + * StringBuffer(); String line = bufferedReader.readLine(); while (line != null) + * { temp.append(line).append("\r\n"); line = bufferedReader.readLine(); } + * bufferedReader.close(); JSONObject obj = (JSONObject) + * JSON.parse(temp.toString()); if (obj.getIntValue("code") == 0) { JSONObject + * data = obj.getJSONObject("data"); info += data.getString("country") + " "; + * info += data.getString("region") + " "; info += data.getString("city") + " "; + * info += data.getString("isp"); } } catch (MalformedURLException e) { + * e.printStackTrace(); } catch (ProtocolException e) { e.printStackTrace(); } + * catch (IOException e) { e.printStackTrace(); } return info; } + */ + +} diff --git a/src/main/java/lingtao/net/util/KztPrice.java b/src/main/java/lingtao/net/util/KztPrice.java new file mode 100644 index 0000000..c329662 --- /dev/null +++ b/src/main/java/lingtao/net/util/KztPrice.java @@ -0,0 +1,33 @@ +package lingtao.net.util; + +import java.util.List; + +import lingtao.net.bean.Product; + +public class KztPrice { + public List getPrice(int count, Double length, List list) { + Product pro = new Product(); + pro = new Product(); + pro.setCount(count); + double price = 0; + + if(length < 24) { + if(count == 5000) { + price = 310; + }else { + price = 520; + } + }else { + if(count == 5000) { + price = 450; + }else { + price = 730; + } + } + pro.setPrice(price); + pro.setCount(count); + list.add(pro); + + return list; + } +} diff --git a/src/main/java/lingtao/net/util/LaSiStickersPrice.java b/src/main/java/lingtao/net/util/LaSiStickersPrice.java new file mode 100644 index 0000000..7cf61d5 --- /dev/null +++ b/src/main/java/lingtao/net/util/LaSiStickersPrice.java @@ -0,0 +1,117 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 拉丝金/银不干胶价格 + */ +public class LaSiStickersPrice { + + int countArr[] = { 500, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 40000, 50000, + 60000, 70000, 80000, 90000, 100000 }; + + /** + * 5*5cm以内(含) + * + * @param count + * @return + */ + public List acountPrice5x5(int count) { + int priceArr[] = { 190, 220, 280, 360, 420, 500, 580, 640, 700, 780, 860, 1400, 2000, 2500, 3000, 3500, 4000, + 4500, 5000, 5500 }; + Product pro = new Product(); + List list = new ArrayList(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + // 每一万张增加500元 + pro.setPrice((Math.ceil(count / 100000.0) - 1) * 500 + 5500); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + /** + * 9*5.4cm 以内 + * + * @param count + * @param area 单个产品的面积(平方米) + * @return + */ + public List acountPrice9x5(int count, Double area) { + int priceArr[] = { 200, 260, 340, 420, 520, 630, 740, 850, 960, 1020, 1150, 2100, 3000, 4100, 5000, 5600, 6200, + 7300, 8000, 9000 }; + Product pro = new Product(); + List list = new ArrayList(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + // 每平方20元 + pro.setPrice(Math.ceil(area * count * 20)); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + public List acountPrice9xup(int count, Double area) { + Product pro = new Product(); + List list = new ArrayList(); + double price = 0.0; + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * 20)); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + if (area * countArr[i] <= 3) { + price = 90; + } else if (area * countArr[i] > 3 && area * countArr[i] <= 5) { + price = 70; + } else if (area * countArr[i] > 5 && area * countArr[i] <= 8) { + price = 50; + } else if (area * countArr[i] > 8 && area * countArr[i] <= 10) { + price = 37; + } else if (area * countArr[i] > 10 && area * countArr[i] <= 15) { + price = 35; + } else if (area * countArr[i] > 15 && area * countArr[i] <= 25) { + price = 30; + } else if (area * countArr[i] > 25 && area * countArr[i] <= 30) { + price = 26; + } else if (area * countArr[i] > 30 && area * countArr[i] <= 100) { + price = 25; + } else if (area * countArr[i] > 100 && area * count <= 500) { + price = 22; + } else { + price = 20; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(countArr[i] * area * price)); + list.add(pro); + } + return list; + } + +} diff --git a/src/main/java/lingtao/net/util/LunarCalendarUtil.java b/src/main/java/lingtao/net/util/LunarCalendarUtil.java new file mode 100644 index 0000000..66c97cc --- /dev/null +++ b/src/main/java/lingtao/net/util/LunarCalendarUtil.java @@ -0,0 +1,306 @@ +package lingtao.net.util; + +import java.util.Arrays; +import java.util.Date; +import java.util.GregorianCalendar; + +/** + * 工具类,实现阴阳历互转 + */ +public class LunarCalendarUtil { + /** + * 支持转换的最小农历年份 + */ + public static final int MIN_YEAR = 1900; + + /** + * 支持转换的最大农历年份 + */ + public static final int MAX_YEAR = 2099; + + /** + * 公历每月前的天数 + */ + private static final int[] DAYS_BEFORE_MONTH = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }; + /** + * 用来表示1900年到2099年间农历年份的相关信息,共24位bit的16进制表示,其中: 1. 前4位表示该年闰哪个月; 2. + * 5-17位表示农历年份13个月的大小月分布,0表示小,1表示大; 3. 最后7位表示农历年首(正月初一)对应的公历日期。 + * 以2014年的数据0x955ABF为例说明: 1001 0101 0101 1010 1011 1111 闰九月 农历正月初一对应公历1月31号 + */ + private static final int[] LUNAR_INFO = { + /* 1900 */ + 0x84B6BF, + /* 1901-1910 */ + 0x04AE53, 0x0A5748, 0x5526BD, 0x0D2650, 0x0D9544, 0x46AAB9, 0x056A4D, 0x09AD42, 0x24AEB6, 0x04AE4A, + /* 1911-1920 */ + 0x6A4DBE, 0x0A4D52, 0x0D2546, 0x5D52BA, 0x0B544E, 0x0D6A43, 0x296D37, 0x095B4B, 0x749BC1, 0x049754, + /* 1921-1930 */ + 0x0A4B48, 0x5B25BC, 0x06A550, 0x06D445, 0x4ADAB8, 0x02B64D, 0x095742, 0x2497B7, 0x04974A, 0x664B3E, + /* 1931-1940 */ + 0x0D4A51, 0x0EA546, 0x56D4BA, 0x05AD4E, 0x02B644, 0x393738, 0x092E4B, 0x7C96BF, 0x0C9553, 0x0D4A48, + /* 1941-1950 */ + 0x6DA53B, 0x0B554F, 0x056A45, 0x4AADB9, 0x025D4D, 0x092D42, 0x2C95B6, 0x0A954A, 0x7B4ABD, 0x06CA51, + /* 1951-1960 */ + 0x0B5546, 0x555ABB, 0x04DA4E, 0x0A5B43, 0x352BB8, 0x052B4C, 0x8A953F, 0x0E9552, 0x06AA48, 0x6AD53C, + /* 1961-1970 */ + 0x0AB54F, 0x04B645, 0x4A5739, 0x0A574D, 0x052642, 0x3E9335, 0x0D9549, 0x75AABE, 0x056A51, 0x096D46, + /* 1971-1980 */ + 0x54AEBB, 0x04AD4F, 0x0A4D43, 0x4D26B7, 0x0D254B, 0x8D52BF, 0x0B5452, 0x0B6A47, 0x696D3C, 0x095B50, + /* 1981-1990 */ + 0x049B45, 0x4A4BB9, 0x0A4B4D, 0xAB25C2, 0x06A554, 0x06D449, 0x6ADA3D, 0x0AB651, 0x095746, 0x5497BB, + /* 1991-2000 */ + 0x04974F, 0x064B44, 0x36A537, 0x0EA54A, 0x86B2BF, 0x05AC53, 0x0AB647, 0x5936BC, 0x092E50, 0x0C9645, + /* 2001-2010 */ + 0x4D4AB8, 0x0D4A4C, 0x0DA541, 0x25AAB6, 0x056A49, 0x7AADBD, 0x025D52, 0x092D47, 0x5C95BA, 0x0A954E, + /* 2011-2020 */ + 0x0B4A43, 0x4B5537, 0x0AD54A, 0x955ABF, 0x04BA53, 0x0A5B48, 0x652BBC, 0x052B50, 0x0A9345, 0x474AB9, + /* 2021-2030 */ + 0x06AA4C, 0x0AD541, 0x24DAB6, 0x04B64A, 0x6a573D, 0x0A4E51, 0x0D2646, 0x5E933A, 0x0D534D, 0x05AA43, + /* 2031-2040 */ + 0x36B537, 0x096D4B, 0xB4AEBF, 0x04AD53, 0x0A4D48, 0x6D25BC, 0x0D254F, 0x0D5244, 0x5DAA38, 0x0B5A4C, + /* 2041-2050 */ + 0x056D41, 0x24ADB6, 0x049B4A, 0x7A4BBE, 0x0A4B51, 0x0AA546, 0x5B52BA, 0x06D24E, 0x0ADA42, 0x355B37, + /* 2051-2060 */ + 0x09374B, 0x8497C1, 0x049753, 0x064B48, 0x66A53C, 0x0EA54F, 0x06AA44, 0x4AB638, 0x0AAE4C, 0x092E42, + /* 2061-2070 */ + 0x3C9735, 0x0C9649, 0x7D4ABD, 0x0D4A51, 0x0DA545, 0x55AABA, 0x056A4E, 0x0A6D43, 0x452EB7, 0x052D4B, + /* 2071-2080 */ + 0x8A95BF, 0x0A9553, 0x0B4A47, 0x6B553B, 0x0AD54F, 0x055A45, 0x4A5D38, 0x0A5B4C, 0x052B42, 0x3A93B6, + /* 2081-2090 */ + 0x069349, 0x7729BD, 0x06AA51, 0x0AD546, 0x54DABA, 0x04B64E, 0x0A5743, 0x452738, 0x0D264A, 0x8E933E, + /* 2091-2099 */ + 0x0D5252, 0x0DAA47, 0x66B53B, 0x056D4F, 0x04AE45, 0x4A4EB9, 0x0A4D4C, 0x0D1541, 0x2D92B5 }; + + /** + * 将农历日期转换为公历日期 + * + * @param year 农历年份 + * @param month 农历月 + * @param monthDay 农历日 + * @param isLeapMonth 该月是否是闰月(该参数可以根据本类中leapMonth()方法,先判断一下要查询的年份是否有闰月,并且闰的几月) + * @return 返回农历日期对应的公历日期,year0, month1, day2. + */ + public static final int[] lunarToSolar(int year, int month, int monthDay, boolean isLeapMonth) { + int dayOffset; + int leapMonth; + int i; + if (year < MIN_YEAR || year > MAX_YEAR || month < 1 || month > 12 || monthDay < 1 || monthDay > 30) { + throw new IllegalArgumentException("Illegal lunar date, must be like that:\n\t" + "year : 1900~2099\n\t" + + "month : 1~12\n\t" + "day : 1~30"); + } + dayOffset = (LUNAR_INFO[year - MIN_YEAR] & 0x001F) - 1; + if (((LUNAR_INFO[year - MIN_YEAR] & 0x0060) >> 5) == 2) { + dayOffset += 31; + } + for (i = 1; i < month; i++) { + if ((LUNAR_INFO[year - MIN_YEAR] & (0x80000 >> (i - 1))) == 0) { + dayOffset += 29; + } else { + dayOffset += 30; + } + } + dayOffset += monthDay; + leapMonth = (LUNAR_INFO[year - MIN_YEAR] & 0xf00000) >> 20; + // 这一年有闰月 + if (leapMonth != 0) { + if (month > leapMonth || (month == leapMonth && isLeapMonth)) { + if ((LUNAR_INFO[year - MIN_YEAR] & (0x80000 >> (month - 1))) == 0) { + dayOffset += 29; + } else { + dayOffset += 30; + } + } + } + if (dayOffset > 366 || (year % 4 != 0 && dayOffset > 365)) { + year += 1; + if (year % 4 == 1) { + dayOffset -= 366; + } else { + dayOffset -= 365; + } + } + int[] solarInfo = new int[3]; + for (i = 1; i < 13; i++) { + int iPos = DAYS_BEFORE_MONTH[i]; + if (year % 4 == 0 && i > 2) { + iPos += 1; + } + if (year % 4 == 0 && i == 2 && iPos + 1 == dayOffset) { + solarInfo[1] = i; + solarInfo[2] = dayOffset - 31; + break; + } + if (iPos >= dayOffset) { + solarInfo[1] = i; + iPos = DAYS_BEFORE_MONTH[i - 1]; + if (year % 4 == 0 && i > 2) { + iPos += 1; + } + if (dayOffset > iPos) { + solarInfo[2] = dayOffset - iPos; + } else if (dayOffset == iPos) { + if (year % 4 == 0 && i == 2) { + solarInfo[2] = DAYS_BEFORE_MONTH[i] - DAYS_BEFORE_MONTH[i - 1] + 1; + } else { + solarInfo[2] = DAYS_BEFORE_MONTH[i] - DAYS_BEFORE_MONTH[i - 1]; + } + } else { + solarInfo[2] = dayOffset; + } + break; + } + } + solarInfo[0] = year; + return solarInfo; + } + + /** + * 将公历日期转换为农历日期,且标识是否是闰月 (如果当年有闰月,被闰的阴历月份所对应的阳历日期计算出来不对,后期自己根据本方法leap3 + * 返回值判断如果为1,给月份+1,如果为0就是正确的,不用在操作,阴历闰月对应的阳历日期计算出来的阴历闰月日期正确,leap3为0) + * + * @param year + * @param month 传入需要为单数如 08 为8 + * @param monthDay + * @return 返回公历日期对应的农历日期,year0,month1,day2,leap3(0 为计算正常 1 月份会比正确少一个月,需要月份+1) + */ + public static final int[] solarToLunar(int year, int month, int monthDay) { + int[] lunarDate = new int[4]; + Date baseDate = new GregorianCalendar(1900, 0, 31).getTime(); + Date objDate = new GregorianCalendar(year, month - 1, monthDay).getTime(); + int offset = (int) ((objDate.getTime() - baseDate.getTime()) / 86400000L); + // 用offset减去每农历年的天数计算当天是农历第几天 + // iYear最终结果是农历的年份, offset是当年的第几天 + int iYear, daysOfYear = 0; + for (iYear = MIN_YEAR; iYear <= MAX_YEAR && offset > 0; iYear++) { + daysOfYear = daysInLunarYear(iYear); + offset -= daysOfYear; + } + if (offset < 0) { + offset += daysOfYear; + iYear--; + } + // 农历年份 + lunarDate[0] = iYear; + int leapMonth = leapMonth(iYear); + // 闰哪个月,1-12 + boolean isLeap = false; + // 用当年的天数offset,逐个减去每月(农历)的天数,求出当天是本月的第几天 + int iMonth, daysOfMonth = 0; + for (iMonth = 1; iMonth <= 13 && offset > 0; iMonth++) { + daysOfMonth = daysInLunarMonth(iYear, iMonth); + offset -= daysOfMonth; + } + // 当前月超过闰月,要校正 + if (leapMonth != 0 && iMonth > leapMonth) { + --iMonth; + if (iMonth == leapMonth) { + isLeap = true; + } + } + // offset小于0时,也要校正 + if (offset < 0) { + offset += daysOfMonth; + --iMonth; + } + lunarDate[1] = iMonth; + lunarDate[2] = offset + 1; + lunarDate[3] = isLeap ? 1 : 0; + return lunarDate; + } + + /** + * 传回农历year年month月的总天数 + * + * @param year 要计算的年份 + * @param month 要计算的月 + * @return 传回天数 + */ + final public static int daysInMonth(int year, int month) { + return daysInMonth(year, month, false); + } + + /** + * 传回农历year年month月的总天数 + * + * @param year 要计算的年份 + * @param month 要计算的月 + * @param leap 当月是否是闰月 + * @return 传回天数,如果闰月是错误的,返回0. + */ + public static final int daysInMonth(int year, int month, boolean leap) { + int leapMonth = leapMonth(year); + int offset = 0; + // 如果本年有闰月且month大于闰月时,需要校正 + if (leapMonth != 0 && month > leapMonth) { + offset = 1; + } + // 不考虑闰月 + if (!leap) { + return daysInLunarMonth(year, month + offset); + } else { + // 传入的闰月是正确的月份 + if (leapMonth != 0 && leapMonth == month) { + return daysInLunarMonth(year, month + 1); + } + } + return 0; + } + + /** + * 传回农历 year年的总天数 + * + * @param year 将要计算的年份 + * @return 返回传入年份的总天数 + */ + private static int daysInLunarYear(int year) { + int i, sum = 348; + if (leapMonth(year) != 0) { + sum = 377; + } + int monthInfo = LUNAR_INFO[year - MIN_YEAR] & 0x0FFF80; + for (i = 0x80000; i > 0x7; i >>= 1) { + if ((monthInfo & i) != 0) { + sum += 1; + } + } + return sum; + } + + /** + * 传回农历 year年month月的总天数,总共有13个月包括闰月 + * + * @param year 将要计算的年份 + * @param month 将要计算的月份 + * @return 传回农历 year年month月的总天数 + */ + private static int daysInLunarMonth(int year, int month) { + if ((LUNAR_INFO[year - MIN_YEAR] & (0x100000 >> month)) == 0) { + return 29; + } else { + return 30; + } + } + + /** + * 传回农历 year年闰哪个月 1-12 , 没闰传回 0 + * + * @param year 将要计算的年份 + * @return 传回农历 year年闰哪个月1-12, 没闰传回 0 + */ + public static int leapMonth(int year) { + return ((LUNAR_INFO[year - MIN_YEAR] & 0xF00000)) >> 20; + } + + public static void main(String[] args) { + // 计算录入年份是否有闰月 + System.out.println(leapMonth(2020)); + // 传回农历 year年month月的总天数,总共有13个月包括闰月 + System.out.println(daysInLunarMonth(2017, 6)); + // 传回农历year年month月的总天数 + System.out.println(daysInMonth(2017, 6, false)); + // 阳历转阴历 9.25 10.23 有问题 + System.out.println(Arrays.toString(solarToLunar(2020, 3, 2))); + // 阴历转阳历 + System.out.println(Arrays.toString(lunarToSolar(2020, 2, 9, true))); + } +} \ No newline at end of file diff --git a/src/main/java/lingtao/net/util/MD5Util.java b/src/main/java/lingtao/net/util/MD5Util.java new file mode 100644 index 0000000..0a72676 --- /dev/null +++ b/src/main/java/lingtao/net/util/MD5Util.java @@ -0,0 +1,19 @@ +package lingtao.net.util; + +import org.apache.shiro.crypto.hash.Md5Hash; + +public class MD5Util { + + /** + * md5加密 + * @param str + * @param salt + * @return + */ + public String md5(String str,String salt) { + return new Md5Hash(str,salt).toString(); + } + public static void main(String[] args) { + System.out.println(new MD5Util().md5("123456", "lingtao")); + } +} diff --git a/src/main/java/lingtao/net/util/NiuStickersPrice.java b/src/main/java/lingtao/net/util/NiuStickersPrice.java new file mode 100644 index 0000000..083c191 --- /dev/null +++ b/src/main/java/lingtao/net/util/NiuStickersPrice.java @@ -0,0 +1,116 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * A级铜版纸不干胶价格 + */ +public class NiuStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + /** + * 不干胶大数量遍历添加价格 + */ + private List bigSizeAcountPrice(int count, Double area, List list, Double[] priceArr) { + Product pro = new Product(); + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + return list; + } + + // 小尺寸 1万以上或 5万以上 + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area > 0 && area <= 0.0004) { + Double priceArrA[] = { 300.0, 200.0, 137.5, 130.0, 125.0, 90.0, 69.0, 68.0, 58.0, 52.5, 50.0, 48.0, 46.0, + 44.0, 42.0, 40.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0004 && area <= 0.0006) { + Double priceArrA[] = { 200.0, 133.0, 92.0, 90.0, 87.0, 65.0, 60.0, 46.0, 39.0, 37.0, 40.0, 38.0, 36.0, 34.0, + 32.0, 30.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0006 && area <= 0.0008) { + Double priceArrA[] = { 150.0, 100.0, 81.0, 79.0, 70.0, 50.0, 46.0, 38.0, 30.0, 30.0, 38.0, 36.0, 34.0, 32.0, + 30.0, 29.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0008 && area <= 0.001) { + Double priceArrA[] = { 120.0, 80.0, 65.0, 63.0, 60.0, 39.0, 39.0, 30.0, 25.0, 24.0, 38.0, 36.0, 34.0, 32.0, + 30.0, 29.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.001 && area <= 0.0012) { + Double priceArrA[] = { 100.0, 67.0, 54.0, 53.0, 50.0, 43.0, 26.0, 21.0, 21.0, 20.0, 20.0, 19.0, 18.0, 18.0, + 18.0, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0012 && area <= 0.0014) { + Double priceArrA[] = { 86.0, 57.0, 46.0, 45.0, 40.0, 30.0, 26.0, 21.0, 21.0, 20.0, 18.0, 17.0, 16.0, 16.0, + 16.0, 16.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0014 && area <= 0.0016) { + Double priceArrA[] = { 75.0, 50.0, 44.0, 40.0, 36.0, 28.0, 26.0, 21.0, 21.0, 20.0, 16.0, 16.0, 15.0, 14.0, + 14.0, 14.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0016 && area <= 0.0025) { + Double priceArrA[] = { 118.0, 71.0, 68.0, 51.0, 42.0, 30.0, 20.0, 16.0, 16.0, 16.0, 16.0, 16.0, 15.0, 14.0, + 14.0, 14.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0025 && area <= 0.0035) { + Double priceArrA[] = { 62.5, 38.0, 36.0, 30.0, 22.0, 22.0, 19.0, 19.0, 19.0, 18.0, 16.0, 16.0, 15.0, 14.0, + 14.0, 14.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0035 && area <= 0.0045) { + Double priceArrA[] = { 56.0, 34.0, 32.0, 26.0, 20.0, 19.0, 18.0, 18.0, 18.0, 17.0, 15.0, 14.0, 13.0, 13.0, + 13.0, 13.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0045 && area <= 0.0084) { + Double priceArrA[] = { 46.0, 32.0, 24.0, 20.0, 18.0, 17.0, 13.0, 13.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, + 8.0, 8.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0084 && area <= 0.012) { + Double priceArrA[] = { 42.0, 26.0, 23.0, 18.0, 18.0, 17.0, 13.0, 13.0, 13.0, 12.0, 10.5, 10.0, 9.3, 7.5, + 8.0, 8.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.012 && area <= 0.015) { + Double priceArrA[] = { 40.0, 25.0, 22.0, 17.0, 17.0, 16.0, 10.0, 9.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0, + 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.015 && area <= 0.02) { + Double priceArrA[] = { 35.0, 24.0, 21.0, 17.0, 16.0, 15.0, 10.0, 9.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, 7.0, + 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.02 && area <= 0.06) { + Double priceArr[] = { 32.0, 23.0, 21.0, 16.5, 15.0, 14.0, 9.5, 9.5, 8.5, 8.5, 8.5, 8.0, 8.0, 7.5, 7.5, 7.5 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.06 && area <= 0.1) { + Double priceArr[] = { 30.0, 22.0, 19.0, 15.0, 14.0, 13.0, 8.5, 8.5, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 7.5 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.1 && area <= 0.2) { + Double priceArr[] = { 29.0, 20.0, 18.0, 14.0, 13.0, 12.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.2 && area <= 0.3) { + Double priceArr[] = { 23.0, 18.0, 16.0, 12.0, 10.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.3) { + Double priceArr[] = { 20.0, 15.0, 14.0, 11.0, 8.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } + return list; + } + +} diff --git a/src/main/java/lingtao/net/util/PVCStickersPrice.java b/src/main/java/lingtao/net/util/PVCStickersPrice.java new file mode 100644 index 0000000..67c69db --- /dev/null +++ b/src/main/java/lingtao/net/util/PVCStickersPrice.java @@ -0,0 +1,212 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * PVC/透明不干胶价格 + */ +public class PVCStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + /** + * 透明不干胶加印白墨 + */ + public List acountYinbaiPrice(Double length, Double width, List stickersList) { + double price = 0; + if (length <= 5 && width <= 5) { + for (Product product : stickersList) { + if (product.getCount() == 500 || product.getCount() == 1000) { + price = 50; + } else if (product.getCount() == 2000) { + price = 75; + } else if (product.getCount() == 3000) { + price = 90; + } else if (product.getCount() == 5000) { + price = 100; + } else if (product.getCount() == 10000 || product.getCount() == 20000) { + price = 150; + } else if (product.getCount() == 30000) { + price = 200; + } else if (product.getCount() == 40000) { + price = 260; + } else if (product.getCount() == 50000 || product.getCount() == 60000) { + price = 300; + } else if (product.getCount() == 70000) { + price = 400; + } else if (product.getCount() == 80000) { + price = 500; + } else if (product.getCount() == 90000) { + price = 600; + } else if (product.getCount() == 100000) { + price = 700; + } + product.setPrice(product.getPrice() + price); + } + } else if ((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9)) { + for (Product product : stickersList) { + if (product.getCount() == 500 || product.getCount() == 1000) { + price = 50; + } else if (product.getCount() == 2000) { + price = 90; + } else if (product.getCount() == 3000) { + price = 100; + } else if (product.getCount() == 5000) { + price = 120; + } else if (product.getCount() == 10000) { + price = 150; + } else if (product.getCount() == 20000) { + price = 220; + } else if (product.getCount() == 30000) { + price = 400; + } else if (product.getCount() == 40000) { + price = 500; + } else if (product.getCount() == 50000) { + price = 700; + } else if (product.getCount() == 60000) { + price = 900; + } else if (product.getCount() == 70000) { + price = 1000; + } else if (product.getCount() == 80000) { + price = 1200; + } else if (product.getCount() == 90000) { + price = 1300; + } else if (product.getCount() == 100000) { + price = 1500; + } + product.setPrice(product.getPrice() + price); + } + } else { + for (Product product : stickersList) { + // 产品面积(平方米) + double area = product.getCount() * length * width / 10000; + if (area <= 10) { + area = 10; + price = 11; + } else if (area <= 20) { + area = 20; + price = 6; + } else if (area <= 30) { + area = 30; + price = 4.5; + } else if (area <= 50) { + area = 50; + price = 3.5; + } else { + price = 3; + } + product.setPrice(product.getPrice() + (price * area > 50 ? price * area : 50)); + } + } + return stickersList; + } + + /** + * PVC不干胶大数量遍历添加价格 + */ + private List bigSizeAcountPrice(int count, Double area, List list, Double[] priceArr) { + Product pro = new Product(); + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + return list; + } + + // 小尺寸 1万以上 + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area <= 0.0004) { + Double priceArrA[] = { 450.0, 300.0, 238.0, 184.0, 175.0, 158.0, 87.0, 70.0, 65.0, 59.0, 52.0, 48.0, 45.0, + 42.0, 39.0, 36.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0006) { + Double priceArrA[] = { 300.0, 200.0, 158.0, 122.0, 117.0, 85.0, 60.0, 50.0, 45.0, 40.0, 38.0, 37.0, 36.0, + 35.0, 33.0, 32.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0008) { + Double priceArrA[] = { 260.0, 171.0, 135.0, 105.0, 100.0, 73.0, 51.0, 45.0, 39.0, 33.0, 32.0, 31.0, 30.0, + 29.0, 28.0, 27.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.001) { + Double priceArrA[] = { 200.0, 133.0, 105.0, 82.0, 78.0, 56.0, 42.0, 33.0, 28.0, 27.0, 26.0, 25.0, 24.0, + 23.0, 22.0, 21.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0012) { + Double priceArrA[] = { 150.0, 92.0, 75.0, 62.0, 55.0, 48.0, 35.0, 29.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, + 18.0, 17.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0014) { + Double priceArrA[] = { 138.0, 85.0, 70.0, 62.0, 54.0, 43.0, 31.0, 26.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, + 16.0, 15.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0016) { + Double priceArrA[] = { 120.0, 80.0, 67.0, 54.0, 51.0, 43.0, 29.0, 23.0, 19.0, 19.0, 19.0, 18.0, 17.0, 16.0, + 15.0, 15.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0025) { + Double priceArrA[] = { 118.0, 76.0, 68.0, 51.0, 48.0, 39.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, + 13.0, 13.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0035) { + Double priceArrA[] = { 62.5, 60.0, 63.0, 47.0, 46.0, 38.0, 18.0, 18.0, 18.0, 16.0, 16.0, 15.0, 14.0, 13.0, + 12.0, 12.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0045) { + Double priceArrA[] = { 84.0, 50.0, 44.0, 33.0, 25.0, 19.0, 15.0, 14.0, 14.0, 14.0, 13.0, 13.0, 12.0, 12.0, + 12.0, 12.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.0084) { + Double priceArrA[] = { 56.0, 35.0, 29.0, 26.0, 19.0, 16.0, 15.0, 14.0, 14.0, 13.0, 12.0, 12.0, 12.0, 12.0, + 12.0, 12.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.012) { + Double priceArrA[] = { 42.0, 26.0, 23.0, 18.0, 14.0, 12.0, 14.0, 13.0, 13.0, 12.0, 11.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.015) { + Double priceArrA[] = { 36.0, 25.0, 22.0, 17.0, 15.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.02) { + Double priceArrA[] = { 35.0, 24.0, 21.0, 17.0, 15.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area <= 0.06) { + Double priceArr[] = { 32.0, 23.0, 21.0, 17.0, 15.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area <= 0.1) { + Double priceArr[] = { 30.0, 20.0, 15.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area <= 0.2) { + Double priceArr[] = { 17.0, 14.0, 13.0, 12.0, 12.0, 12.0, 12.0, 11.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, + 10.0, 10.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } /*else if (area <= 0.3) { + Double priceArr[] = { 15.0, 13.0, 12.0, 12.0, 11.0, 11.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, + 10.0, 10.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + }*/ else{ + Double priceArr[] = { 15.0, 13.0, 12.0, 12.0, 11.0, 11.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, 10.0, + 10.0, 10.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/PVCYaMoStickersPrice.java b/src/main/java/lingtao/net/util/PVCYaMoStickersPrice.java new file mode 100644 index 0000000..5182ed6 --- /dev/null +++ b/src/main/java/lingtao/net/util/PVCYaMoStickersPrice.java @@ -0,0 +1,120 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * PVC/透明哑膜不干胶价格 + */ +public class PVCYaMoStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + /** + * PVC不干胶大数量遍历添加价格 + */ + private List bigSizeAcountPrice(int count, Double area, List list, Double[] priceArr) { + Product pro = new Product(); + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + return list; + } + + // 小尺寸 1万以上 + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area > 0 && area <= 0.0004) { + Double priceArrA[] = { 500.0, 400.0, 220.0, 180.0, 150.0, 120.0, 80.0, 72.0, 67.0, 61.0, 53.0, 49.0, 46.0, + 43.0, 40.0, 37.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0004 && area <= 0.0006) { + Double priceArrA[] = { 360.0, 243.0, 144.0, 126.0, 108.0, 81.0, 59.0, 50.0, 41.0, 37.0, 35.0, 34.0, 33.0, + 32.0, 31.0, 30.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0006 && area <= 0.0008) { + Double priceArrA[] = { 266.0, 168.0, 98.0, 84.0, 74.0, 56.0, 42.0, 35.0, 28.0, 24.0, 23.0, 22.0, 22.0, + 21.0, 20.0, 20.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0008 && area <= 0.001) { + Double priceArrA[] = { 231.0, 133.0, 84.0, 70.0, 63.0, 49.0, 35.0, 25.0, 21.0, 20.0, 19.0, 18.0, 17.0, + 17.0, 15.0, 15.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.001 && area <= 0.0012) { + Double priceArrA[] = { 130.0, 125.0, 45.0, 40.0, 35.0, 27.0, 20.0, 15.0, 12.0, 12.0, 11.0, 11.0, 10.0, 10.0, + 9.0, 9.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0012 && area <= 0.0014) { + Double priceArrA[] = { 125.0, 70.0, 42.0, 37.0, 32.0, 26.0, 19.0, 13.0, 11.0, 11.0, 10.0, 10.0, 9.0, 9.0, + 8.0, 8.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0014 && area <= 0.0016) { + Double priceArrA[] = { 110.0, 62.0, 35.0, 32.0, 30.0, 23.0, 17.0, 12.0, 10.0, 10.0, 10.0, 9.0, 9.0, 8.0, + 8.0, 8.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0016 && area <= 0.0025) { + Double priceArrA[] = { 100.0, 55.0, 34.0, 30.0, 27.0, 21.0, 13.0, 11.0, 8.0, 8.0, 7.0, 7.0, 7.0, 7.0, + 7.0, 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0025 && area <= 0.0035) { + Double priceArrA[] = { 75.0, 51.0, 30.0, 24.0, 20.0, 16.0, 12.0, 8.0, 8.0, 8.0, 8.0, 8.0, 8.0, 7.0, + 7.0, 7.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0035 && area <= 0.0045) { + Double priceArrA[] = { 75.0, 47.0, 27.0, 22.0, 19.0, 15.0, 9.0, 7.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0045 && area <= 0.0084) { + Double priceArrA[] = { 75.0, 40.0, 24.0, 18.0, 15.0, 12.0, 8.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0084 && area <= 0.012) { + Double priceArrA[] = { 55.0, 32.0, 20.0, 15.0, 12.0, 11.0, 8.0, 7.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.012 && area <= 0.015) { + Double priceArrA[] = { 17.0, 10.0, 8.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.015 && area <= 0.02) { + Double priceArrA[] = { 15.0, 9.0, 7.0, 7.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.02 && area <= 0.04) { + Double priceArr[] = { 13.0, 8.0, 7.0, 7.0, 7.0, 7.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.02 && area <= 0.06) { + Double priceArr[] = { 12.0, 8.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.06 && area <= 0.1) { + Double priceArr[] = { 12.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, + 6.0, 6.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.1 && area <= 0.2) { + Double priceArr[] = { 11.0, 7.0, 6.0, 6.0, 6.0, 6.0, 6.0, 6.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, + 5.0, 5.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else { + Double priceArr[] = { 8.0, 7.0, 6.0, 6.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, + 5.0, 5.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/PaperCupPrice.java b/src/main/java/lingtao/net/util/PaperCupPrice.java new file mode 100644 index 0000000..7b34f36 --- /dev/null +++ b/src/main/java/lingtao/net/util/PaperCupPrice.java @@ -0,0 +1,24 @@ +package lingtao.net.util; + +import java.util.List; + +import lingtao.net.bean.Product; + +public class PaperCupPrice { + public List getPrice(int count, List list) { + int[] countArr = {1000, 2000, 3000, 5000, 10000, 20000, 30000, 50000}; + for(int i = 0;i 4) { + continue; + } + Product pro = new Product(); + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(countArr[i] * 0.108); + list.add(pro); + } + + + return list; + } +} diff --git a/src/main/java/lingtao/net/util/PictureAlbumPrice.java b/src/main/java/lingtao/net/util/PictureAlbumPrice.java new file mode 100644 index 0000000..96612dd --- /dev/null +++ b/src/main/java/lingtao/net/util/PictureAlbumPrice.java @@ -0,0 +1,303 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 画册价格 + */ +public class PictureAlbumPrice { + + int countArr[] = { 500, 1000, 2000, 3000, 5000, 10000, }; + + /** + * 不干胶大数量遍历添加价格 + */ + private List acountPrice(int count, List list, double[] priceArr) { + Product pro = new Product(); + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(count * priceArr[countArr.length - 1] / countArr[countArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(priceArr[i]); + list.add(pro); + } + return list; + } + + /** + * + * @param count + * @param pcount 内页P数(含封面4P) + * @return + */ + public List getPrice00(int count, int pcount) { + List list = new ArrayList(); + if (8 == pcount) { + double priceArr[] = { 403, 551, 864, 1206, 1998, 3873 }; + list = acountPrice(count, list, priceArr); + } else if (12 == pcount) { + double priceArr[] = { 490, 673, 1082, 1523, 2505, 4827 }; + list = acountPrice(count, list, priceArr); + } else if (16 == pcount) { + double priceArr[] = { 579, 794, 1311, 1839, 3012, 5783 }; + list = acountPrice(count, list, priceArr); + } else if (20 == pcount) { + double priceArr[] = { 665, 917, 1542, 2156, 3519, 6737 }; + list = acountPrice(count, list, priceArr); + } else if (24 == pcount) { + double priceArr[] = { 752, 1053, 1772, 2472, 4026, 7691 }; + list = acountPrice(count, list, priceArr); + } else if (28 == pcount) { + double priceArr[] = { 842, 1188, 2001, 2787, 4533, 8648 }; + list = acountPrice(count, list, priceArr); + } else if (32 == pcount) { + double priceArr[] = { 929, 1323, 2232, 3104, 5040, 9602 }; + list = acountPrice(count, list, priceArr); + } else if (36 == pcount) { + double priceArr[] = { 1016, 1460, 2462, 3419, 5549, 10556 }; + list = acountPrice(count, list, priceArr); + } else if (40 == pcount) { + double priceArr[] = { 1106, 1596, 2691, 3735, 6056, 11510 }; + list = acountPrice(count, list, priceArr); + } else if (44 == pcount) { + double priceArr[] = { 1200, 1724, 2922, 4053, 6563, 12464 }; + list = acountPrice(count, list, priceArr); + } else if (48 == pcount) { + double priceArr[] = { 1295, 1866, 3152, 4368, 7070, 13419 }; + list = acountPrice(count, list, priceArr); + } else if (52 == pcount) { + double priceArr[] = { 1391, 2005, 3383, 4685, 7577, 14373 }; + list = acountPrice(count, list, priceArr); + } + return list; + } + + public List getPrice01(int count, int pcount) { + List list = new ArrayList(); + if (8 == pcount) { + double priceArr[] = { 436, 589, 927, 1296, 2135, 4146 }; + list = acountPrice(count, list, priceArr); + } else if (12 == pcount) { + double priceArr[] = { 558, 747, 1209, 1701, 2778, 5376 }; + list = acountPrice(count, list, priceArr); + } else if (16 == pcount) { + double priceArr[] = { 678, 906, 1505, 2103, 2420, 6605 }; + list = acountPrice(count, list, priceArr); + } else if (20 == pcount) { + double priceArr[] = { 802, 1066, 1799, 2508, 4064, 7832 }; + list = acountPrice(count, list, priceArr); + } else if (24 == pcount) { + double priceArr[] = { 922, 1239, 2094, 2913, 4707, 9062 }; + list = acountPrice(count, list, priceArr); + } else if (28 == pcount) { + double priceArr[] = { 1043, 1412, 2390, 3318, 5351, 10290 }; + list = acountPrice(count, list, priceArr); + } else if (32 == pcount) { + double priceArr[] = { 1165, 1586, 2684, 3722, 5994, 11517 }; + list = acountPrice(count, list, priceArr); + } else if (36 == pcount) { + double priceArr[] = { 1285, 1761, 2979, 4127, 6636, 12746 }; + list = acountPrice(count, list, priceArr); + } else if (40 == pcount) { + double priceArr[] = { 1409, 1932, 3273, 4532, 7280, 13976 }; + list = acountPrice(count, list, priceArr); + } else if (44 == pcount) { + double priceArr[] = { 1538, 2105, 3567, 4937, 7923, 15203 }; + list = acountPrice(count, list, priceArr); + } else if (48 == pcount) { + double priceArr[] = { 1665, 2279, 3861, 5340, 8567, 16431 }; + list = acountPrice(count, list, priceArr); + } else if (52 == pcount) { + double priceArr[] = { 1663, 2454, 4157, 5745, 9209, 17661 }; + list = acountPrice(count, list, priceArr); + } + return list; + } + + public List getPrice02(int count, int pcount) { + List list = new ArrayList(); + if (8 == pcount) { + double priceArr[] = { 455, 635, 975, 1382, 2274, 4409 }; + list = acountPrice(count, list, priceArr); + } else if (12 == pcount) { + double priceArr[] = { 597, 842, 1302, 1874, 3056, 5900 }; + list = acountPrice(count, list, priceArr); + } else if (16 == pcount) { + double priceArr[] = { 741, 1048, 1643, 2364, 3839, 7389 }; + list = acountPrice(count, list, priceArr); + } else if (20 == pcount) { + double priceArr[] = { 883, 1254, 1982, 2856, 4622, 8880 }; + list = acountPrice(count, list, priceArr); + } else if (24 == pcount) { + double priceArr[] = { 1026, 1473, 2324, 3348, 5403, 10371 }; + list = acountPrice(count, list, priceArr); + } else if (28 == pcount) { + double priceArr[] = { 1167, 1695, 2664, 3839, 6188, 11861 }; + list = acountPrice(count, list, priceArr); + } else if (32 == pcount) { + double priceArr[] = { 1308, 1912, 3005, 4329, 6971, 13352 }; + list = acountPrice(count, list, priceArr); + } else if (36 == pcount) { + double priceArr[] = { 1452, 2133, 3347, 4821, 7752, 14841 }; + list = acountPrice(count, list, priceArr); + } + return list; + } + + /** + * ========285*210=========== + */ + + public List getPrice10(int count, int pcount) { + List list = new ArrayList(); + if (8 == pcount) { + double priceArr[] = { 726, 1104, 1551, 2243, 3656, 7062 }; + list = acountPrice(count, list, priceArr); + } else if (12 == pcount) { + double priceArr[] = { 904, 1385, 1953, 2849, 4605, 8841 }; + list = acountPrice(count, list, priceArr); + } else if (16 == pcount) { + double priceArr[] = { 1084, 1666, 2373, 3453, 5555, 10622 }; + list = acountPrice(count, list, priceArr); + } else if (20 == pcount) { + double priceArr[] = { 1263, 1949, 2795, 4059, 6504, 12402 }; + list = acountPrice(count, list, priceArr); + } else if (24 == pcount) { + double priceArr[] = { 1443, 2252, 3215, 4664, 7454, 14181 }; + list = acountPrice(count, list, priceArr); + } else if (28 == pcount) { + double priceArr[] = { 1621, 2557, 3635, 5270, 8402, 15960 }; + list = acountPrice(count, list, priceArr); + } else if (32 == pcount) { + double priceArr[] = { 1800, 2860, 4055, 5874, 9351, 17741 }; + list = acountPrice(count, list, priceArr); + } else if (36 == pcount) { + double priceArr[] = { 2078, 2984, 4604, 6363, 10301, 19521 }; + list = acountPrice(count, list, priceArr); + } else if (40 == pcount) { + double priceArr[] = { 2271, 3301, 5037, 6956, 11250, 21299 }; + list = acountPrice(count, list, priceArr); + } else if (44 == pcount) { + double priceArr[] = { 2472, 3586, 5472, 7548, 12200, 23078 }; + list = acountPrice(count, list, priceArr); + } else if (48 == pcount) { + double priceArr[] = { 2675, 3868, 5906, 8144, 13149, 24858 }; + list = acountPrice(count, list, priceArr); + } else if (52 == pcount) { + double priceArr[] = { 2875, 4153, 5341, 8736, 14099, 26639 }; + list = acountPrice(count, list, priceArr); + } + return list; + } + + public List getPrice11(int count, int pcount) { + List list = new ArrayList(); + if (8 == pcount) { + double priceArr[] = { 723, 1076, 1665, 2372, 3929, 7610 }; + list = acountPrice(count, list, priceArr); + } else if (12 == pcount) { + double priceArr[] = { 947, 1404, 2180, 3107, 5150, 9938 }; + list = acountPrice(count, list, priceArr); + } else if (16 == pcount) { + double priceArr[] = { 1173, 1734, 2714, 3842, 6371, 12264 }; + list = acountPrice(count, list, priceArr); + } else if (20 == pcount) { + double priceArr[] = { 1398, 2063, 3248, 4575, 7592, 14592 }; + list = acountPrice(count, list, priceArr); + } else if (24 == pcount) { + double priceArr[] = { 1624, 2412, 3782, 5175, 8814, 16919 }; + list = acountPrice(count, list, priceArr); + } else if (28 == pcount) { + double priceArr[] = { 1848, 2760, 4316, 6044, 10035, 19247 }; + list = acountPrice(count, list, priceArr); + } else if (32 == pcount) { + double priceArr[] = { 2074, 3110, 4848, 6779, 11256, 21575 }; + list = acountPrice(count, list, priceArr); + } else if (36 == pcount) { + double priceArr[] = { 2429, 3345, 5639, 7778, 12479, 23901 }; + list = acountPrice(count, list, priceArr); + } else if (40 == pcount) { + double priceArr[] = { 2673, 3676, 6203, 8549, 13700, 26229 }; + list = acountPrice(count, list, priceArr); + } else if (44 == pcount) { + double priceArr[] = { 2922, 4010, 6765, 9318, 14921, 28557 }; + list = acountPrice(count, list, priceArr); + } else if (48 == pcount) { + double priceArr[] = { 3171, 4340, 7328, 10089, 16143, 30884 }; + list = acountPrice(count, list, priceArr); + } else if (52 == pcount) { + double priceArr[] = { 3422, 4673, 7892, 10859, 17364, 33212 }; + list = acountPrice(count, list, priceArr); + } + return list; + } + + public List getPrice12(int count, int pcount) { + List list = new ArrayList(); + if (8 == pcount) { + double priceArr[] = { 723, 1092, 1718, 2489, 4206, 8135 }; + list = acountPrice(count, list, priceArr); + } else if (12 == pcount) { + double priceArr[] = { 947, 1439, 2288, 3339, 5706, 10986 }; + list = acountPrice(count, list, priceArr); + } else if (16 == pcount) { + double priceArr[] = { 1173, 1785, 2874, 4191, 7206, 13838 }; + list = acountPrice(count, list, priceArr); + } else if (20 == pcount) { + double priceArr[] = { 1398, 2132, 3462, 5042, 8708, 16689 }; + list = acountPrice(count, list, priceArr); + } else if (24 == pcount) { + double priceArr[] = { 1624, 2498, 4049, 5892, 10209, 19539 }; + list = acountPrice(count, list, priceArr); + } else if (28 == pcount) { + double priceArr[] = { 1848, 2864, 4637, 6744, 11709, 22391 }; + list = acountPrice(count, list, priceArr); + } else if (32 == pcount) { + double priceArr[] = { 2074, 3231, 5223, 7595, 13209, 25242 }; + list = acountPrice(count, list, priceArr); + } else if (36 == pcount) { + double priceArr[] = { 2757, 4092, 6372, 9165, 14709, 28094 }; + list = acountPrice(count, list, priceArr); + } + return list; + } + + /* ===============少数量相册================ */ + /** + * + * @param count + * @param pcount 内页P数(含封面4P) + * @return + */ + public List getLessPrice(int count, int pcount) { + List list = new ArrayList(); + Product pro = new Product(); + double price = 0; + if (count <= 10) { + price = pcount * count * 2; + } else if (count <= 50) { + price = pcount * count * 1.5; + } else if (count <= 100) { + price = pcount * count * 1; + } else { + price = pcount * count * 0.8; + } + price += count * 4; + ; + pro.setCount(count); + pro.setPrice(Math.ceil(price = price > 120 ? price : 120)); + list.add(pro); + return list; + } + +} diff --git a/src/main/java/lingtao/net/util/PosterPrice.java b/src/main/java/lingtao/net/util/PosterPrice.java new file mode 100644 index 0000000..89cc7e7 --- /dev/null +++ b/src/main/java/lingtao/net/util/PosterPrice.java @@ -0,0 +1,754 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.List; + +/** + * 海报价格 + */ +public class PosterPrice { + + /** + * 裱板 + * + * @param kind2 + * @param area + * @param count + * @param number + * @return + */ + public List acountPrice00(String kind2, Double area, int count, Integer number) { + double danjia = 0.0; + // 最低收费 + double price = 0.0; + String weight = "0"; + DecimalFormat DecimalFormat = new DecimalFormat("#.#####"); + switch (kind2) { + // 室内写真裱冷板 + case "0": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 64; + } else if (area > 5 && area <= 10) { + danjia = 60; + } else { + danjia = 52; + } + price = area * danjia > 72 ? area * danjia : 72; + + break; + // 室内写真对裱冷板 + case "1": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 90; + } else if (area > 5 && area <= 10) { + danjia = 85; + } else { + danjia = 80; + } + price = area * danjia > 95 ? area * danjia : 95; + break; + // 室内写真裱冷板装小C边 + case "3": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 85; + } else if (area > 5 && area <= 10) { + danjia = 80; + } else { + danjia = 75; + } + price = area * danjia > 90 ? area * danjia : 90; + break; + // 户外写真裱冷板 + case "6": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 85; + } else if (area > 5 && area <= 10) { + danjia = 80; + } else { + danjia = 75; + } + price = area * danjia > 90 ? area * danjia : 90; + break; + // 户外写真对裱冷板 + case "7": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 95; + } else if (area > 5 && area <= 10) { + danjia = 90; + } else { + danjia = 85; + } + price = area * danjia > 90 ? area * danjia : 90; + break; + // 户外写真裱冷板装小C边 + case "8": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 100; + } else if (area > 5 && area <= 10) { + danjia = 95; + } else { + danjia = 90; + } + price = area * danjia > 90 ? area * danjia : 90; + break; + // 背胶单裱3mmPVC(户内高清) + case "12": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 105; + } else if (area > 5 && area <= 10) { + danjia = 100; + } else { + danjia = 95; + } + price = area * danjia > 105 ? area * danjia : 105; + break; + } + Product pro = new Product(); + List list = new ArrayList(); + weight = String.valueOf(DecimalFormat.format(area * 0.2 * number)); + pro.setWeight(weight); + pro.setCount(count); + // 价格 = 面积 * 单价 + (款数-1) * 40 + pro.setPrice(Math.ceil(price * number)); + list.add(pro); + return list; + } + + /** + * 室内写真 + * + * @param kind2 + * @param area + * @param count + * @param number + * @return + */ + public List acountPrice01(String kind2, Double area, int count, Integer number) { + // 最低收费 + double price = 0.0; + // 单价 + double danjia = 0.0; + String weight = "0"; + DecimalFormat DecimalFormat = new DecimalFormat("#.#####"); + switch (kind2) { + // 高精室内写真 + case "2": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 50; + } else if (area > 2 && area <= 5) { + danjia = 45; + } else if (area > 5 && area <= 10) { + danjia = 32; + } else if (area > 10 && area <= 20) { + danjia = 28; + } else if (area > 20 && area <= 50) { + danjia = 25; + } else { + danjia = 23; + } + price = area * danjia > 50 ? area * danjia : 50; + break; + // pp纸(室内) + case "3": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 62; + } else if (area > 2 && area <= 5) { + danjia = 45; + } else if (area > 5 && area <= 10) { + danjia = 35; + } else { + danjia = 28; + } + price = area * danjia > 70 ? area * danjia : 70; + weight = String.valueOf(DecimalFormat.format(area * 0.113 * number)); + break; + // 直喷PVC + case "5": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 70; + } else if (area > 2 && area <= 5) { + danjia = 55; + } else if (area > 5 && area <= 10) { + danjia = 45; + } else { + danjia = 40; + } + price = area * danjia > 100 ? area * danjia : 100; + weight = String.valueOf(DecimalFormat.format(area * 0.113 * number)); + break; + // 高精室内相纸 + case "6": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 70; + } else if (area > 2 && area <= 5) { + danjia = 60; + } else if (area > 5 && area <= 10) { + danjia = 45; + } else { + danjia = 40; + } + price = area * danjia > 90 ? area * danjia : 90; + break; + // 单透 + case "7": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 75; + } else if (area > 2 && area <= 5) { + danjia = 65; + } else if (area > 5 && area <= 10) { + danjia = 55; + } else { + danjia = 45; + } + price = area * danjia > 100 ? area * danjia : 100; + break; + // 静电贴 + case "8": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 80; + } else if (area > 2 && area <= 5) { + danjia = 70; + } else if (area > 5 && area <= 10) { + danjia = 60; + } else { + danjia = 45; + } + price = area * danjia > 105 ? area * danjia : 105; + break; + // 软膜 + case "14": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 70; + } else if (area > 5 && area <= 10) { + danjia = 65; + } else { + danjia = 60; + } + price = area * danjia > 100 ? area * danjia : 100; + weight = String.valueOf(DecimalFormat.format(area * 0.113 * number)); + break; + // 地贴(复防滑膜) + case "15": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 75; + } else if (area > 5 && area <= 10) { + danjia = 65; + } else { + danjia = 55; + } + price = area * danjia > 100 ? area * danjia : 100; + weight = String.valueOf(DecimalFormat.format(area * 0.113 * number)); + break; + // UV高透车贴(含白墨) + case "16": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 160; + } else if (area > 5 && area <= 10) { + danjia = 150; + } else { + danjia = 140; + } + price = area * danjia > 160 ? area * danjia : 160; + break; + // UV高透车贴(不含白墨) + case "17": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 150; + } else if (area > 5 && area <= 10) { + danjia = 140; + } else { + danjia = 130; + } + price = area * danjia > 160 ? area * danjia : 160; + break; + // 高透贴 + case "18": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 110; + } else if (area > 5 && area <= 10) { + danjia = 100; + } else { + danjia = 90; + } + price = area * danjia > 130 ? area * danjia : 130; + break; + // 防撞条腰线UV透明喷膜(含白墨) + case "19": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 130; + } else if (area > 5 && area <= 10) { + danjia = 130; + } else { + danjia = 110; + } + price = area * danjia > 80 ? area * danjia : 80; + break; + // 防撞条腰线UV磨砂贴(含白墨) + case "20": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 140; + } else if (area > 5 && area <= 10) { + danjia = 130; + } else { + danjia = 120; + } + price = area * danjia > 80 ? area * danjia : 80; + break; + // 防撞条腰线粗哑膜磨砂贴(不含白墨) + case "21": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 115; + } else if (area > 5 && area <= 10) { + danjia = 105; + } else { + danjia = 100; + } + price = area * danjia > 80 ? area * danjia : 80; + break; + // 防撞条腰线磨砂镂空(粗哑膜刻字) + case "22": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 150; + } else if (area > 5 && area <= 10) { + danjia = 140; + } else { + danjia = 130; + } + price = area * danjia > 100 ? area * danjia : 100; + break; + // 防撞条腰线即时贴刻字 + case "23": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 120; + } else if (area > 5 && area <= 10) { + danjia = 110; + } else { + danjia = 100; + } + price = area * danjia > 70 ? area * danjia : 70; + break; + case "24": + price = area * 380 > 380 ? area * 380 : 380; + break; + } + + Product pro = new Product(); + List list = new ArrayList(); + pro.setCount(count); + // 价格 = 面积 * 单价 + (款数-1) * 40 + if (number > 1) { + pro.setPrice(Math.ceil(price * number)); + } else { + pro.setPrice(Math.ceil(price)); + } + pro.setWeight(weight); + list.add(pro); + return list; + } + + /** + * 户外写真 + * + * @param kind2 + * @param area + * @param count + * @param number + * @return + */ + public List acountPrice02(String kind2, Double area, int count, Integer number) { + double price = 0.0; + double danjia = 0.0; + String weight = "0"; + DecimalFormat DecimalFormat = new DecimalFormat("#.#####"); + switch (kind2) { + // 户外写真白胶(国产) + case "0": + // 根据面积得到单价 + if (area <= 2) { + danjia = 55; + } else if (area <= 5) { + danjia = 45; + } else if (area <= 7) { + danjia = 40; + } else if (area <= 8) { + danjia = 37; + } else if (area <= 10) { + danjia = 31; + } else if (area <= 20) { + danjia = 29; + } else if (area <= 50) { + danjia = 27; + } else { + danjia = 26; + } + price = area * danjia > 50 ? area * danjia : 50; + weight = String.valueOf(DecimalFormat.format(area * 0.24 * number)); + break; + // 户外写真黑胶(国产) + case "1": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 56; + } else if (area > 2 && area <= 5) { + danjia = 45; + } else if (area > 5 && area <= 10) { + danjia = 36; + } else { + danjia = 30; + } + price = area * danjia > 50 ? area * danjia : 50; + weight = String.valueOf(DecimalFormat.format(area * 0.25 * number)); + break; + // 户外写真可移白胶、黑胶 + case "2": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 60; + } else if (area > 2 && area <= 5) { + danjia = 55; + } else if (area > 5 && area <= 10) { + danjia = 50; + } else { + danjia = 35; + } + price = area * danjia > 85 ? area * danjia : 85; + weight = String.valueOf(DecimalFormat.format(area * 0.14 * number)); + break; + // 户外写真喷膜 + case "3": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 65; + } else if (area > 2 && area <= 5) { + danjia = 50; + } else if (area > 5 && area <= 10) { + danjia = 45; + } else { + danjia = 35; + } + price = area * danjia > 80 ? area * danjia : 80; + break; + // 户外写真灯片 + case "5": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 68; + } else if (area > 2 && area <= 5) { + danjia = 50; + } else if (area > 5 && area <= 10) { + danjia = 40; + } else { + danjia = 30; + } + price = area * danjia > 90 ? area * danjia : 90; + break; + // 车贴(白胶) + case "6": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 50; + } else if (area > 2 && area <= 5) { + danjia = 40; + } else if (area > 5 && area <= 10) { + danjia = 30; + } else { + danjia = 25; + } + price = area * danjia > 80 ? area * danjia : 80; + weight = String.valueOf(DecimalFormat.format(area * 0.24 * number)); + break; + } + + Product pro = new Product(); + List list = new ArrayList(); + pro.setCount(count); + // 价格 = 面积 * 单价 + (款数-1) * 40 + pro.setPrice(Math.ceil(price * number)); + pro.setWeight(weight); + list.add(pro); + return list; + } + + /** + * 布 + * + * @param kind2 + * @param area + * @param length + * @param width + * @param count + * @param number + * @param craftBu + * @return + */ + public List acountPrice03(String kind2, Double length, Double width, Double area, int count, + Integer number, String craftBu) { + double price = 0.0; + double danjia = 0.0; + switch (kind2) { + // 550灯布 + case "1": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 30; + } else if (area > 5 && area <= 10) { + danjia = 28; + } else { + danjia = 25; + } + price = area * danjia > 60 ? area * danjia : 60; + break; + // 黑底布 + case "2": + // 根据面积得到单价 + if (area > 0 && area <= 5) { + danjia = 40; + } else if (area > 5 && area <= 10) { + danjia = 34; + } else { + danjia = 30; + } + price = area * danjia > 70 ? area * danjia : 70; + break; + + // 写真布 + case "6": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 30; + } else if (area > 2 && area <= 5) { + danjia = 28; + } else if (area > 5 && area <= 10) { + danjia = 25; + } else { + danjia = 23; + } + price = area * danjia > 50 ? area * danjia : 50; + break; + // 双喷布 + case "7": + Product pro = new Product(); + List list = new ArrayList(); + double minSize = Math.min(length, width); + double maxSize = Math.max(length, width); + area = length * width * count * number; + /*if (count == 1) { + if (minSize < 1.52) { + minSize = 1.52; + area = maxSize * minSize * count * number; + } + }*/ + + // 根据宽得到单价 + if (minSize <= 1.52) { + danjia = 50; + } else { + danjia = 65; + } + price = area * danjia > 50 ? area * danjia : 50; + + // 挂轴 每米12元 + if ("挂轴".equals(craftBu)) { + price = price + (maxSize * 12 > 12 ? maxSize * 12 : 12); + } + + pro.setCount(count); + // 价格 = 面积 * 单价 + 款数 * 20 + pro.setPrice(Math.ceil(price + number * 20)); + list.add(pro); + return list; + // 油画布 + case "8": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 80; + } else if (area > 2 && area <= 5) { + danjia = 75; + } else if (area > 5 && area <= 10) { + danjia = 60; + } else { + danjia = 35; + } + price = area * danjia > 130 ? area * danjia : 130; + break; + // 墙纸 + case "9": + // 根据面积得到单价 + if (area > 0 && area <= 2) { + danjia = 70; + } else if (area > 2 && area <= 5) { + danjia = 60; + } else if (area > 5 && area <= 10) { + danjia = 50; + } else { + danjia = 35; + } + price = area * danjia > 105 ? area * danjia : 105; + break; + // 旗帜布 + case "10": + // 根据面积得到单价 + if ("双喷".equals(craftBu)) { + if ((width == 50 && length == 300 || length == 50 && width == 300) && count == 1) { + price = 53; + } else if (area <= 1) { + price = 53; + } else if (area <= 2) { + price = 43 * area; + } else if (area <= 3) { + price = 38 * area; + } else if (area <= 4) { + price = 33 * area; + } else if (area <= 5) { + price = 31 * area; + } else if (area <= 10) { + price = 28 * area; + } else { + price = 25 * area; + } + } else { + if ((width == 50 && length == 300) && (length == 50 && width == 300) && count == 1) { + price = 50; + } else if (area <= 1) { + price = 50; + } else if (area <= 2) { + price = 40 * area; + } else if (area <= 3) { + price = 35 * area; + } else if (area <= 4) { + price = 33 * area; + } else if (area <= 5) { + price = 28 * area; + } else if (area <= 10) { + price = 25 * area; + } else { + price = 23 * area; + } + } + + /*if (area > 0 && area <= 3) { + danjia = 20; + } else if (area > 3 && area <= 5) { + danjia = 19; + } else if (area > 5 && area <= 10) { + danjia = 18; + } else { + danjia = 17; + } + if(area < 1.5) { + price = area * danjia + (count * 10) > 35 ? area * danjia + (count * 10) : 35; + }else { + price = area * danjia * count > 35 ? area * danjia * count : 35; + }*/ + + break; + } + Product pro = new Product(); + List list = new ArrayList(); + pro.setCount(count); + pro.setPrice(Math.ceil(price * number)); + list.add(pro); + return list; + } + + /** + * 展架 + * + * @param kind2 + * @param count + * @param number + * @return + */ + public List acountPrice04(String kind2, int count, Integer number) { + double price = 0.0; + String weight = "0"; + DecimalFormat DecimalFormat = new DecimalFormat("#.#####"); + switch (kind2) { + // 直喷PVC装美式展架180*80 + case "0": + price = 120; + break; + // 直喷PVC装美式展架160*60 + case "1": + price = 115; + break; + // PP纸装美式展架180*80 + case "2": + price = 115; + break; + // PP纸装美式展架160*60 + case "3": + price = 110; + break; + // 直喷PVC装门型展架180*80 + case "4": + price = 158; + break; + // PP纸装门型展架180*80 + case "6": + price = 140; + break; + // PP纸装门型展架160*60 + case "7": + price = 135; + break; + // X展架180*80(不含画面) + case "8": + price = 55; + break; + // X展架160*60(不含画面) + case "9": + price = 50; + break; + // 门型展架180*80(不含画面) + case "10": + price = 75; + break; + // 门型展架160*60(不含画面) + case "11": + price = 70; + break; + // 直喷pvc铝合金易拉宝 + case "12": + price = 108; + break; + // 直喷pvc塑钢易拉宝 + case "13": + price = 118; + break; + } + Product pro = new Product(); + List list = new ArrayList(); + pro.setCount(count); + // 价格 = 个数 * 款数 * 单价 ===================+ (款数-1) * 40 + pro.setPrice(Math.ceil(count * number * price));// + (number - 1) * 40 + list.add(pro); + return list; + } +} diff --git a/src/main/java/lingtao/net/util/PriceUtils.java b/src/main/java/lingtao/net/util/PriceUtils.java new file mode 100644 index 0000000..3470cf1 --- /dev/null +++ b/src/main/java/lingtao/net/util/PriceUtils.java @@ -0,0 +1,3324 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; +import org.springframework.util.StringUtils; + +import java.text.DecimalFormat; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class PriceUtils { + + DecimalFormat df = new DecimalFormat("0.00"); + + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000}; + + /** + * 卷标标签价格 + * + * @param kind + * @param area + * @param count + * @param craft + * @param yinbai + * @return + */ + public List rollLabelPrice(String kind, Double area, int count, String[] craft, String yinbai) { + List list = new ArrayList(); + Product pro = new Product(); + // 最低收费 + double lowerPrice = 0.0; + // 印工价格 + double yinrPrice = 0.0; + // 平方单价 + double danjia = 0.0; + // 总价 + double price = 0.0; + // 根据报的尺寸、数量算面积(保留2位小数) + area = Double.valueOf(df.format(area * count)); + if (area <= 20) { + yinrPrice = 260; + lowerPrice = 550; + } else if (area <= 150) { + yinrPrice = 300; + lowerPrice = 600; + } + + switch (kind) { + /** + * 0:格底铜版纸卷标 1:格底PP合成纸 2:8丝光白PVC 3:5丝格底透明 4:格底哑金/哑银 5:格底银平光 6:单防热敏纸(底纸白色) + * 7:三防热敏纸(底纸蓝色) + */ + case "0": + // 根据面积得到单价 + if (area <= 20) { + danjia = 8; + } else if (area <= 150) { + danjia = 8; + } else if (area <= 200) { + danjia = 10.5; + } else { + danjia = 10.3; + } + break; + case "1": + // 根据面积得到单价 + if (area <= 20) { + danjia = 10; + } else if (area <= 150) { + danjia = 10; + } else if (area <= 200) { + danjia = 12.5; + } else { + danjia = 12.3; + } + break; + case "2": + // 根据面积得到单价 + if (area <= 20) { + danjia = 10; + } else if (area <= 150) { + danjia = 10; + } else if (area <= 200) { + danjia = 12.5; + } else { + danjia = 12.3; + } + break; + case "3": + // 根据面积得到单价 + if (area <= 20) { + danjia = 10; + } else if (area <= 150) { + danjia = 10; + } else if (area <= 200) { + danjia = 12.5; + } else { + danjia = 12.3; + } + break; + case "4": + // 根据面积得到单价 + if (area <= 20) { + danjia = 12; + } else if (area <= 150) { + danjia = 12; + } else if (area <= 200) { + danjia = 15; + } else { + danjia = 14.8; + } + break; + case "5": + // 根据面积得到单价 + if (area <= 20) { + danjia = 12; + } else if (area <= 150) { + danjia = 12; + } else if (area <= 200) { + danjia = 15; + } else { + danjia = 14.8; + } + break; + case "6": + // 根据面积得到单价 + if (area <= 20) { + danjia = 9; + } else if (area <= 150) { + danjia = 9; + } else if (area <= 200) { + danjia = 11; + } else { + danjia = 10.8; + } + break; + case "7": + // 根据面积得到单价 + if (area <= 20) { + danjia = 9.5; + } else if (area <= 150) { + danjia = 9.5; + } else if (area <= 200) { + danjia = 11.5; + } else { + danjia = 11.3; + } + break; + } + // 加上覆膜的价格 (覆哑膜/亮膜 0.6元/平方, 镭射膜1元/平方) + if (!StringUtils.isEmpty(craft)) { + if ("大雪花镭射膜".equals(craft[0])) { + danjia = danjia + 1; + } else { + danjia = danjia + 0.6; + } + } + price = Math + .ceil(area * danjia + yinrPrice + count * 0.01 > lowerPrice ? area * danjia + yinrPrice + count * 0.01 + : lowerPrice); + // 如果有印白工艺:2元一平方,最低收费200元 + if (!StringUtils.isEmpty(yinbai)) { + price = price + (area * 2 > 200 ? area * 2 : 200); + } + pro.setCount(count); + pro.setPrice(price); + list.add(pro); + + /* + * for (int i = 0; i < countArr.length; i++) { if (countArr[i] < count) { + * continue; } if (countArr[i] * area <= 150) { danjia = 15; } else if + * (countArr[i] * area <= 200) { danjia = 14.5; } else { danjia = 14; } if + * (!StringUtils.isEmpty(craft)) { if (!"大雪花镭射膜".equals(craft[0])) { danjia = + * danjia + 1; } else { danjia = danjia + 0.6; } } pro = new Product(); + * pro.setCount(countArr[i]); pro.setPrice(Math.ceil(countArr[i] * area * danjia + * > 550 ? countArr[i] * area * danjia : 550)); list.add(pro); } + */ + + return list; + } + + /** + * 合版封套自定义尺寸 + * + * @param kind + * @param count + * @param min + * @param priceArr + * @return + */ + public List getEnvelope(String kind, int count, int min, int[] priceArr) { + int countArr[] = {200, 500, 1000, 2000, 5000, 10000}; + List list = new ArrayList(); + Product pro = new Product(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(min * priceArr[i] + 80 + 0.05 * countArr[i] + 30 + 0.06 * countArr[i])); + + list.add(pro); + } + return list; + } + + /** + * 房卡套特殊尺寸 + * + * @param count + * @param min + * @return + */ + public List getRoomCard(int count, int min) { + int countArr[] = {200, 500, 1000, 2000, 5000, 10000}; + int priceArr[] = {40, 50, 70, 90, 160, 300}; + List list = new ArrayList(); + Product pro = new Product(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + + pro = new Product(); + pro.setCount(countArr[i]); + + pro.setPrice(Math.ceil(min * priceArr[i] + 0.05 * countArr[i] + 60 + 30 + 0.06 * countArr[i])); + list.add(pro); + } + return list; + } + + /** + * 打印不干胶带纯烫金价格 + * + * @param kind + * @param addPrice + * @param yinbai + */ + public Product getA(String kind, Double width, Double length, int count, double price, double addPrice, + Integer number, String craftTang, String yinbai) { + //List list = new ArrayList(); + + if ("印白墨".equals(yinbai)) { + price = 50; + addPrice = 30; + } else if ("黑白".equals(yinbai)) { + price = 40; + } + + double l = 425; + double w = 285; + if ("0".equals(kind) || "4".equals(kind)) { + l = 430; + w = 290; + } + // 哑金不干胶 + if ("5".equals(kind)) { + l = 390; + w = 270; + } + Product pro = new Product(); + // 数量*款数就是张数 + count = count * number; + // 换成毫米每边+2 + length = length * 10 + 4; + width = width * 10 + 4; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸能做多少个此类尺寸的不干胶 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + price = price + (num - 1) * addPrice; + + if ("纯烫金".equals(craftTang) || "彩色印刷+烫金/银".equals(craftTang)) { + // 一张纸张价格+大纸张数*addPrice + 每张烫金+20块(1张起收)(5*5cm内30元一张) + if (width < 54 && length < 54) { + price += num * 60; + } else { + price += num * 40; + } + } + + if ("彩色印刷+烫金/银".equals(craftTang)) { + price = price > 80 ? price : 80; + } +// if ("印白墨".equals(yinbai)) { +// // 透明不干胶,印白墨工艺,每张大纸+20(1张起收) +// price = price + num * 20; +// } + +// if(number > 1) { +// price = price + (number - 1) * 15; +// } + pro.setCount(count / number); + pro.setPrice(Math.ceil(price)); + + return pro; + } + + /** + * 哑银不干胶价格 + * + * @param kind + * @param addPrice + * @param yinbai + */ + public List getYy(String kind, Double width, Double length, int count, double price, double addPrice, + Integer number, String craftTang, String yinbai) { + List list = new ArrayList(); + double l = 420; + double w = 285; + // 换成毫米每边+2 + length = length * 10 + 4; + width = width * 10 + 4; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸能做多少个此类尺寸的不干胶 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + + if ("印白墨".equals(yinbai)) { + price = 50; + addPrice = 30; + } + + Product pro = new Product(); + // 数量*款数就是张数 + count = countArr[i] * number; + + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + if ("纯烫金".equals(craftTang)) { + // 一张纸张价格+大纸张数*addPrice + 每张烫金+20块(1张起收)(5*5cm内30元一张) + if (width < 54 && length < 54) { + price = price + (num - 1) * addPrice + num * 30; + } else { + price = price + (num - 1) * addPrice + num * 20; + } + } else if ("彩色印刷+烫金/银".equals(craftTang)) { + if (width <= 154 && length <= 154) { + price = price + (count * 0.15 + 200 > 200 ? count * 0.15 + 200 : 200); + } else if (width > 154 || length > 154) { + price = price + (count * 0.13 + 180 > 210 ? count * 0.13 + 180 : 210); + } + } else { + price = price + (num - 1) * addPrice; + } + if (number > 1) { + price = price + (number - 1) * 5; + } +// if ("印白墨".equals(yinbai)) { +// // 透明不干胶,印白墨工艺,每张大纸+20(1张起收) +// price = price + num * 20; +// } + pro.setCount(count / number); + /*if (length == 14.0 && width == 14.0) { + price = price * 2; + }*/ + pro.setPrice(Math.ceil(price)); + list.add(pro); + } + + return list; + } + + // 不干胶常规数量美纹纸价格计算 + public List getMeiWenZhiPrice(Double length, Double width, int count, Integer number, String craftMo) { + double l = 420; + double w = 285; + Product pro = new Product(); + List list = new ArrayList(); + // 成本价 元/张 + double danjia = 1.8; + if ("模切".equals(craftMo)) { + danjia = 2.2; + } + // 换成毫米每边+2 + length = length * 10 + 4; + width = width * 10 + 4; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸能做多少个此类尺寸的不干胶 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(countArr[i] / max); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(num * danjia * 2.5 > 83 ? num * danjia * 2.5 : 83)); + list.add(pro); + } + + /*if(number > 1) { + for (Product product : list) { + product.setPrice(Math.ceil(product.getPrice() * number)); + } + }*/ + + return list; + } + + /** + * 插卡遍历添加价格 + */ + private List acountInsertCardPrice(int count, List list, Double[] priceArr) { + int countArr[] = {200, 500, 1000, 2000, 3000, 5000, 10000}; + Product pro; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(priceArr[i]); + list.add(pro); + } + return list; + } + + /** + * 菱形单面直角插排 + */ + public List getInsertCard(String size, int count) { + List list = new ArrayList<>(); + + if ("4.5*4.5".equals(size)) { + Double priceArr[] = {40.0, 50.0, 80.0, 120.0, 160.0, 270.0, 480.0}; + list = acountInsertCardPrice(count, list, priceArr); + } else if ("5*5".equals(size)) { + Double priceArr[] = {50.0, 60.0, 80.0, 130.0, 140.0, 300.0, 520.0}; + list = acountInsertCardPrice(count, list, priceArr); + } else { + Double priceArr[] = {40.0, 50.0, 70.0, 110.0, 160.0, 260.0, 480.0}; + list = acountInsertCardPrice(count, list, priceArr); + } + return list; + } + + // 9*5.4cm(一个名片位)以内价格 + public List oneCradPrice(int count) { + List list = new ArrayList(); + Product pro = new Product(); + int countArr[] = {1000, 2000, 5000, 10000, 20000}; + int priceArr[] = {70, 110, 250, 500, 900}; + if (count <= 20000) { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(count * 0.045)); + list.add(pro); + } + return list; + } + + /** + * 普通吊牌/服装吊牌 300/350克直角打孔吊牌价格 + * + * @param dto + * @param width + * @param length + * @param count + * @param priceList + * @return + */ + public List tags300PriceCraftZhi(Product dto, Double width, Double length, int count, + List priceList) { + double l1; + double w1; + double l2; + double w2; + int min; + l1 = Math.ceil(length / 9); + w1 = Math.ceil(width / 5.4); + l2 = Math.ceil(width / 9); + w2 = Math.ceil(length / 5.4); + // 产品位数 + min = (int) Math.min(l1 * w1, l2 * w2); + + if (min == 1) { + double priceArr[] = {43, 52, 70, 110, 186, 242, 250, 500}; + priceList = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } else if (min == 2) { + double priceArr[] = {48, 70, 75, 110, 180, 230, 270, 520}; + priceList = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } else if (min == 3) { + double priceArr[] = {68, 93, 155, 276, 369, 484, 578, 1111}; + priceList = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } else if (min == 4) { + double priceArr[] = {80, 100, 186, 333, 496, 617, 736, 1417}; + priceList = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } + if (min > 1) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + if ("不覆膜".equals(dto.getCraftMo())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + + // 300克的模切材质才有第二尺寸 + // 第二尺寸不为空 + if (!StringUtils.isEmpty(dto.getSize1())) { + String size1 = dto.getSize1(); + Double length1 = null; + Double width1 = null; + List priceListSecond = new ArrayList(); + length1 = Double.valueOf(size1.substring(0, size1.indexOf("*"))); + if (size1.indexOf(("*"), size1.indexOf("*") + 1) == -1) { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1)); + } else { + width1 = Double + .valueOf(size1.substring(size1.indexOf("*") + 1, size1.indexOf(("*"), size1.indexOf("*") + 1))); + } + length1 = Math.abs(length1); + width1 = Math.abs(width1); + + l1 = Math.ceil(length1 / 9); + w1 = Math.ceil(width1 / 5.4); + l2 = Math.ceil(width1 / 9); + w2 = Math.ceil(length1 / 5.4); + // 产品位数 + min = (int) Math.min(l1 * w1, l2 * w2); + + if (min == 1) { + double priceArr[] = {43, 52, 72, 128, 186, 242, 276, 526}; + priceListSecond = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } else if (min == 2) { + double priceArr[] = {48, 78, 110, 202, 283, 351, 419, 805}; + priceListSecond = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } else if (min == 3) { + double priceArr[] = {68, 93, 155, 276, 369, 484, 578, 1111}; + priceListSecond = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } else if (min == 4) { + double priceArr[] = {80, 100, 186, 333, 496, 617, 736, 1417}; + priceListSecond = new PriceUtils().acountTags300PriceCraftZhi(count, priceArr); + } + + if (min > 1) { + for (Product product : priceListSecond) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + + if ("不覆膜".equals(dto.getCraftMo())) { + for (Product product : priceListSecond) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + + // 如果俩个价格一样,后一位价格+10 + for (int i = 0; i < priceListSecond.size() - 1; i++) { + if (priceListSecond.get(i).getPrice().equals(priceListSecond.get(i + 1).getPrice())) { + priceListSecond.get(i + 1).setPrice(priceListSecond.get(i + 1).getPrice() + 10); + } + } + + // 俩个尺寸的价格相加 再*0.96 + for (int i = 0; i < priceList.size(); i++) { + priceList.get(i).setPrice((priceList.get(i).getPrice() + priceListSecond.get(i).getPrice()) * 0.95); + } + } + return priceList; + } + + /** + * 吊牌300克直角打孔价格计算 + */ + public List acountTags300PriceCraftZhi(int count, double[] priceArr) { + int countArr[] = {200, 500, 1000, 2000, 3000, 4000, 5000, 10000}; + List list = new ArrayList<>(); + Product pro = new Product(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(priceArr[i]); + list.add(pro); + } + return list; + } + + /** + * 其他吊牌300克 异形模切价格 + * + * @param dto + * @param number + * @param width + * @param length + * @param area + * @param count + * @param priceList + * @return + */ + public List tags300PriceCraftMo(Product dto, Integer number, Double width, Double length, Double area, + int count, List priceList) { + if (((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9))) { + length = 9.0; + width = 5.4; + area = length * width / 10000; + } + + List priceList2 = new ArrayList(); + // 有工艺(覆膜) + if ("双面覆哑膜".equals(dto.getCraftMo())) { + double priceArr[] = {27, 18, 15, 14, 14, 14}; + priceList = new PriceUtils().acountTags300PriceCraftMo(area, count, number, priceArr); + priceList2 = new PriceUtils().acountTags300PriceCraftMo(0.00486, count, number, priceArr); + } else if ("不覆膜".equals(dto.getCraftMo())) { + double priceArr[] = {26, 17, 14, 13, 13, 13}; + priceList = new PriceUtils().acountTags300PriceCraftMo(area, count, number, priceArr); + priceList2 = new PriceUtils().acountTags300PriceCraftMo(0.00486, count, number, priceArr); + } + // 自定义尺寸和固定尺寸对比价格。 + for (int i = 0; i < priceList.size(); i++) { + for (int j = 0; j < priceList2.size(); j++) { + if (priceList.get(j).getPrice() < priceList2.get(j).getPrice()) { + priceList.get(j).setPrice(priceList2.get(j).getPrice() + 5); + } + } + } + + // 第二尺寸不为空 + if (!StringUtils.isEmpty(dto.getSize1())) { + String size1 = dto.getSize1(); + Double length1 = null; + Double width1 = null; + Double area1 = null; + List priceListSecond = new ArrayList(); + length1 = Double.valueOf(size1.substring(0, size1.indexOf("*"))); + if (size1.indexOf(("*"), size1.indexOf("*") + 1) == -1) { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1)); + } else { + width1 = Double + .valueOf(size1.substring(size1.indexOf("*") + 1, size1.indexOf(("*"), size1.indexOf("*") + 1))); + } + length1 = Math.abs(length1); + width1 = Math.abs(width1); + if (((length1 <= 9 && width1 <= 5.4) || (length1 <= 5.4 && width1 <= 9))) { + length1 = 9.0; + width1 = 5.4; + area1 = length1 * width1 / 10000; + } + List priceList3 = new ArrayList(); + // 有工艺(覆膜) + if ("双面覆哑膜".equals(dto.getCraftMo())) { + double priceArr[] = {27, 18, 15, 14, 14, 14}; + priceListSecond = new PriceUtils().acountTags300PriceCraftMo(area1, count, number, priceArr); + priceList3 = new PriceUtils().acountTags300PriceCraftMo(0.00486, count, number, priceArr); + } else if ("不覆膜".equals(dto.getCraftMo())) { + double priceArr[] = {26, 17, 14, 13, 13, 13}; + priceListSecond = new PriceUtils().acountTags300PriceCraftMo(area1, count, number, priceArr); + priceList3 = new PriceUtils().acountTags300PriceCraftMo(0.00486, count, number, priceArr); + } + // 自定义尺寸和固定尺寸对比价格。 + for (int i = 0; i < priceListSecond.size(); i++) { + for (int j = 0; j < priceList3.size(); j++) { + if (priceListSecond.get(j).getPrice() < priceList3.get(j).getPrice()) { + priceListSecond.get(j).setPrice(priceList3.get(j).getPrice() + 5); + } + } + } + + // 俩个尺寸的价格相加 再*0.96 + for (int i = 0; i < priceList.size(); i++) { + priceList.get(i).setPrice((priceList.get(i).getPrice() + priceListSecond.get(i).getPrice()) * 0.95); + } + } + return priceList; + } + + /** + * 其他吊牌300克异形模切价格计算===》 不复膜的 计算方法:长*宽*数量500张*22+每款设计费7元+绳子10元 + * + * @param area + * @param count + * @param number + * @param priceArr + * @return + */ + public List acountTags300PriceCraftMo(Double area, int count, Integer number, double[] priceArr) { + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + // 数量大于1万,单独报价; + List list = new ArrayList<>(); + Product pro = new Product(); + // 设计费 7元/款 + double designFee = 7; + // 绳子 1分5一条 + double shengzi = 0.015; + if (count > 10000) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[priceArr.length - 1] + designFee + count * shengzi)); + list.add(pro); + } else { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(area * countArr[i] * priceArr[i] + designFee + countArr[i] * shengzi)); + list.add(pro); + } + } + return list; + } + + /** + * 服装吊牌 300克异形模切价格 + * + * @param dto + * @param number + * @param width + * @param length + * @param area + * @param count + * @param priceList + * @return + */ + public List tagClothes300PriceCraftMo(Product dto, Integer number, Double width, Double length, Double area, int count, List priceList) { + if (((length <= 9 && width <= 5.4) || (length <= 5.4 && width <= 9))) { + priceList = new PriceUtils().oneCradPrice(count); + if ("不覆膜".equals(dto.getCraftMo())) { + for (Product product : priceList) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + } else { + // 有工艺(覆膜) + if ("双面覆哑膜".equals(dto.getCraftMo())) { + double priceArr[] = {18, 15, 14, 14}; + // double priceArr[] = { 13, 12, 11.5, 10 }; + priceList = new PriceUtils().acountTagClothes300PriceCraftMo(area, count, number, priceArr); + } else if ("不覆膜".equals(dto.getCraftMo())) { + double priceArr[] = {17, 14, 13, 13}; + // double priceArr[] = { 12, 11, 10.5, 9 }; + priceList = new PriceUtils().acountTagClothes300PriceCraftMo(area, count, number, priceArr); + } + + // 对比固定价格 + /*List priceList2 = new PriceUtils().oneCradPrice(count); + if ("不覆膜".equals(dto.getCraftMo())) { + for (Product product : priceList2) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + }*/ + /*for (int i = 0; i < priceList.size(); i++) { + for (int j = 0; j < priceList2.size(); j++) { + if (priceList.get(j).getPrice() < priceList2.get(j).getPrice()) { + priceList.get(j).setPrice(priceList2.get(j).getPrice() + 10); + } + } + }*/ + // 末尾变成0 + /*for (Product product : priceList) { + product.setPrice(product.getPrice() - product.getPrice() % 10); + }*/ + // 如果俩个价格一样,后一位价格+10 + for (int i = 0; i < priceList.size() - 1; i++) { + if (priceList.get(i).getPrice().equals(priceList.get(i + 1).getPrice())) { + priceList.get(i + 1).setPrice(priceList.get(i + 1).getPrice() + 10); + } + if (width == 6 && length == 6 && priceList.get(i).getCount() == 1000) { + priceList.get(i).setPrice(priceList.get(i).getPrice() + 8); + } + } + } + + // 300克的材质才有第二尺寸 + // 第二尺寸不为空 + if (!StringUtils.isEmpty(dto.getSize1())) { + String size1 = dto.getSize1(); + Double length1 = null; + Double width1 = null; + List priceListSecond = new ArrayList(); + length1 = Double.valueOf(size1.substring(0, size1.indexOf("*"))); + if (size1.indexOf(("*"), size1.indexOf("*") + 1) == -1) { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1)); + } else { + width1 = Double + .valueOf(size1.substring(size1.indexOf("*") + 1, size1.indexOf(("*"), size1.indexOf("*") + 1))); + } + length1 = Math.abs(length1); + width1 = Math.abs(width1); + double area1 = length1 * width1 / 10000; + if (((length1 <= 10.5 && width1 <= 5.5) || (length1 <= 5.5 && width1 <= 10.5))) { + priceListSecond = new PriceUtils().oneCradPrice(count); + if ("不覆膜".equals(dto.getCraftMo())) { + for (Product product : priceListSecond) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + } else { + // 有工艺(覆膜) + if ("双面覆哑膜".equals(dto.getCraftMo())) { + double priceArr[] = {18, 15, 14, 14}; + // double priceArr[] = { 13, 12, 11.5, 10 }; + priceListSecond = new PriceUtils().acountTagClothes300PriceCraftMo(area1, count, number, priceArr); + } else if ("不覆膜".equals(dto.getCraftMo())) { + double priceArr[] = {17, 14, 13, 13}; + priceListSecond = new PriceUtils().acountTagClothes300PriceCraftMo(area, count, number, priceArr); + } + + // 对比固定价格 + List priceList2 = new PriceUtils().oneCradPrice(count); + if ("不覆膜".equals(dto.getCraftMo())) { + for (Product product : priceList2) { + product.setPrice(Math.floor(product.getPrice() * 0.98)); + } + } + for (int i = 0; i < priceListSecond.size(); i++) { + for (int j = 0; j < priceList2.size(); j++) { + if (priceListSecond.get(j).getPrice() < priceList2.get(j).getPrice()) { + priceListSecond.get(j).setPrice(priceList2.get(j).getPrice() + 10); + } + } + } + // 末尾变成0 + for (Product product : priceListSecond) { + product.setPrice(product.getPrice() - product.getPrice() % 10); + } + // 如果俩个价格一样,后一位价格+10 + for (int i = 0; i < priceListSecond.size() - 1; i++) { + if (priceListSecond.get(i).getPrice().equals(priceListSecond.get(i + 1).getPrice())) { + priceListSecond.get(i + 1).setPrice(priceListSecond.get(i + 1).getPrice() + 10); + } + } + } + // 俩个尺寸的价格相加 再*0.96 + for (int i = 0; i < priceList.size(); i++) { + priceList.get(i).setPrice((priceList.get(i).getPrice() + priceListSecond.get(i).getPrice()) * 0.95); + } + } + return priceList; + } + + /** + * 服装吊牌300克异形模切价格计算===》 不复膜的 计算方法:长*宽*数量500张*22+每款设计费7元+绳子10元 + * + * @param area + * @param count + * @param number + * @param priceArr + * @return + */ + public List acountTagClothes300PriceCraftMo(Double area, int count, Integer number, double[] priceArr) { + int countArr[] = {1000, 2000, 5000, 10000}; + // 数量大于1万,单独报价; + List list = new ArrayList<>(); + Product pro = new Product(); + // 设计费 7元/款 + double designFee = 7; + // 绳子 1分5一条 + double shengzi = 0.015; + if (count > 10000) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[priceArr.length - 1] + number * designFee)); + list.add(pro); + } else { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + /* pro.setPrice(Math.ceil(area * countArr[i] * priceArr[i] + number * designFee + + countArr[i] * shengzi));*/ + pro.setPrice(Math.ceil(area * countArr[i] * priceArr[i] + designFee)); + list.add(pro); + } + } + return list; + } + + /** + * 600克 吊牌 + * + * @param dto + * @param kind + * @param kind2 + * @param area + * @param count + * @return + */ + public List tags600Price(Product dto, String kind, String kind2, Double area, int count) { + List priceList; + priceList = new PriceUtils().getTag600PriceFirst(kind, kind2, area, count, true); + + // 600克的材质才有第二尺寸 + // 第二尺寸不为空 + if (!StringUtils.isEmpty(dto.getSize1())) { + String size1 = dto.getSize1(); + Double length1 = null; + Double width1 = null; + List priceList2 = new ArrayList(); + length1 = Double.valueOf(size1.substring(0, size1.indexOf("*"))); + if (size1.indexOf(("*"), size1.indexOf("*") + 1) == -1) { + width1 = Double.valueOf(size1.substring(size1.indexOf("*") + 1)); + } else { + width1 = Double + .valueOf(size1.substring(size1.indexOf("*") + 1, size1.indexOf(("*"), size1.indexOf("*") + 1))); + } + length1 = Math.abs(length1); + width1 = Math.abs(width1); + double area1 = length1 * width1 / 10000; + priceList2 = new PriceUtils().getTag600PriceFirst(kind, kind2, area1, count, false); + // 俩个尺寸的价格相加 + for (int i = 0; i < priceList.size(); i++) { + priceList.get(i).setPrice((priceList.get(i).getPrice() + priceList2.get(i).getPrice()) * 0.95); + } + } + return priceList; + } + + /** + * 吊牌600/800克自定义尺寸价格 + * + * @param kind 600克/800克 + * @param kind2 种类 + * @param area 单个产品的面积 + * @param count 报的数量 + * @param flag 是否要加绳子费用 + * @return + */ + public List getTag600PriceFirst(String kind, String kind2, double area, int count, boolean flag) { + // 数量大于1万,单独报价; + if (count > 10000) { + return null; + } + List list = new ArrayList<>(); + double shengzi = 0; + if ("4".equals(kind)) { + if ("无".equals(kind2)) { + double priceArr[] = {50, 34, 27, 27, 26, 25}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } else if ("单面烫黄金".equals(kind2)) { + double priceArr[] = {68, 48, 37, 36, 35, 34}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } else if ("单面凹凸".equals(kind2)) { + double priceArr[] = {75, 50, 40, 40, 39, 38}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } else if ("单面烫黄金+凹凸".equals(kind2)) { + double priceArr[] = {93, 63, 48, 48, 47, 46}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } + } + if ("6".equals(kind)) { + if ("无".equals(kind2)) { + double priceArr[] = {50, 34, 27, 27, 26, 25}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } else if ("单面烫黄金".equals(kind2)) { + double priceArr[] = {68, 48, 37, 36, 35, 34}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } else if ("单面凹凸".equals(kind2)) { + double priceArr[] = {75, 50, 40, 40, 39, 38}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } else if ("单面烫黄金+凹凸".equals(kind2)) { + double priceArr[] = {93, 63, 48, 48, 47, 46}; + list = acountTag600Price(area, count, priceArr, shengzi, flag, list); + } + } + return list; + } + + /** + * 吊牌600/800克价格计算 + * + * @param area + * @param count + * @param priceArr + * @param shengzi + * @param flag + * @return + */ + private List acountTag600Price(double area, int count, double[] priceArr, double shengzi, boolean flag, + List list) { + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + Product pro = new Product(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + if (countArr[i] == 500) { + continue; + } + pro = new Product(); + if (countArr[i] == 500) { + shengzi = 20; + } else if (countArr[i] == 1000) { + shengzi = 30; + } else if (countArr[i] == 2000) { + shengzi = 50; + } else { + shengzi = 0.03; + } + pro.setCount(countArr[i]); + if (flag) { + pro.setPrice( + Math.ceil(area * countArr[i] * priceArr[i] + (shengzi > 1 ? shengzi : shengzi * countArr[i]))); + } else { + pro.setPrice(Math.ceil(area * countArr[i] * priceArr[i])); + } + list.add(pro); + } + return list; + } + + /** + * 异形杯套价格计算 + * + * @param count + * @return + */ + public List getCupSetPrice(int count) { + List list = new ArrayList<>(); + Product pro = new Product(); + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + double priceArr[] = {700, 780, 820, 900, 1300, 1800}; + if (count <= 10000) { + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(priceArr[i]); + list.add(pro); + } + } else { + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(count * 0.25)); + list.add(pro); + } + + return list; + } + + /** + * 手提袋价格计算 + * + * @param + * @param kai 产品开数 + * @return 报价:〔数量除以开数+*纸张《正度或者大度》+印工〔1千印X内150元,每超出1千印另加50元计算》+固定刀版收费200元+粘成品工钱.3*数量(小于200元按2⑾0元算〉〉*.5备注:以上报价展开尺寸最大为1000*700KM超出这个尺寸按以上报价*2倍计算 + */ + public List getPriceHanding(int count, int kai, double price, double m) { + List list = new ArrayList<>(); + int countArr[] = {500, 1000, 2000, 4000, 10000, 20000, 30000}; + Product pro = new Product(); + if (count >= 100) { + if (count < 670) { + pro.setCount(count); + pro.setPrice(Math.ceil((count / kai * price + 150 + 200 + 200) * m)); + list.add(pro); + } else { + pro.setCount(count); + pro.setPrice(Math.ceil( + (count / kai * price + (150 + Math.ceil((count - 1000) / 1000) * 50) + 200 + count * 0.3) * m)); + list.add(pro); + } + } + + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || countArr[i] == list.get(0).getCount()) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + if (countArr[i] == 500) { + pro.setPrice(Math.ceil( + (countArr[i] / kai * price + (150 + Math.ceil((countArr[i] - 1000) / 1000) * 50) + 200 + 200) + * m)); + } else { + pro.setPrice(Math.ceil((countArr[i] / kai * price + (150 + Math.ceil((countArr[i] - 1000) / 1000) * 50) + + 200 + countArr[i] * 0.3) * m)); + } + list.add(pro); + } + return list; + } + + /** + * 计算手提袋大度开数 + * + * @param length + * @param width + * @return + */ + public static String getDa(double length, double width) { + double l1 = Math.floor(1194 / length); + double w1 = Math.floor(889 / width); + double l2 = Math.floor(1194 / width); + double w2 = Math.floor(889 / length); + int maxDa = (int) Math.max(l1 * w1, l2 * w2); + if (w1 != 2) { + return "" + maxDa; + } else { + double ll1 = Math.floor(length / length); + double ww1 = Math.floor(889 / width); + double ll2 = Math.floor(length / width); + double ww2 = Math.floor(889 / length); + int maxxa = (int) Math.max(ll1 * ww1, ll2 * ww2); + + double lll1 = Math.floor((1194 - length) / length); + double www1 = Math.floor(889 / width); + double lll2 = Math.floor(length / width); + double www2 = Math.floor(889 / length); + int maxxb = (int) Math.max(lll1 * www1, lll2 * www2); + maxDa = maxxb + maxxa; + return "" + maxDa; + } + } + + /** + * 正度开数 + * + * @param length + * @param width + * @return + */ + public static String getZheng(double length, double width) { + double l1 = Math.floor(1092 / length); + double w1 = Math.floor(787 / width); + double l2 = Math.floor(1092 / width); + double w2 = Math.floor(787 / length); + int maxZheng = (int) Math.max(l1 * w1, l2 * w2); + if (w1 != 2) { + return "+" + maxZheng; + } else { + double ll1 = Math.floor(length / length); + double ww1 = Math.floor(787 / width); + double ll2 = Math.floor(length / width); + double ww2 = Math.floor(787 / length); + int maxxa = (int) Math.max(ll1 * ww1, ll2 * ww2); + + double lll1 = Math.floor((1092 - length) / length); + double www1 = Math.floor(787 / width); + double lll2 = Math.floor(length / width); + double www2 = Math.floor(787 / length); + int maxxb = (int) Math.max(lll1 * www1, lll2 * www2); + maxZheng = maxxb + maxxa; + return "" + maxZheng; + } + } + + /** + * 金属标价格计算 ===>最大印刷面积290*190MM 成品尺寸一边加1.5MM 算大张要几张 起步价90元 + * 10张以内不含10张100+25*(数量-2) 20张以内 数量*24 30张以内 数量*22 超过30张*20 + * + * @param list + * @param width + * @param length + * @param count + * @param number + * @return + */ + public List getMetalPrice(List list, Double width, Double length, int count, Integer number) { + /*if (length == 1) { + length = 2.0; + } + if (width == 1) { + width = 2.0; + }*/ + // 最大尺寸29*19cm ,加出血一边5mm + double l = 295; + double w = 195; + Product pro = new Product(); + // 第一张大纸价格 + double price = 0; + // 换成毫米每边+3 + length = length * 10 + 2 * 1.5; + width = width * 10 + 2 * 1.5; + // 数量*款数就是张数 + // count = count * number; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸29*19cm 能做多少个此类尺寸的金属标 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + int num = (int) Math.ceil((count * number) / max); + int numUnit = (int) Math.ceil((count) / max); + boolean isNumnber = false; + if (numUnit == 1) { + isNumnber = true; + } + double mulit = 1; + /* + * if (num > 2) { price = price + 25 * (num - 2); } + */ + double design = 0; + + if (!isNumnber) { + if (numUnit <= 2) { + price = 80; + } else if (numUnit < 6) { + price = 80 + 24 * (numUnit - 2); + } else if (numUnit < 10) { + price = 80 + 23 * (numUnit - 2); + } else if (numUnit < 16) { + price = 80 + 21 * (numUnit - 2); + } else if (numUnit < 30) { + price = 200 + 12 * (numUnit - 2); + } else if (numUnit < 51) { + price = 280 + 9 * (numUnit - 2); + } else if (numUnit < 100) { + price = Math.ceil((numUnit * 9) / 0.64); + } else if (numUnit < 300) { + price = Math.ceil((numUnit * 9) / 0.645); + } else { + price = Math.ceil((numUnit * 9) / 0.646); + } + mulit = number; + } else { + price = 80; + mulit = Math.ceil(num / numUnit); + } + + price = Math.ceil(price * mulit); + + + pro.setCount(count); + pro.setPrice(Math.ceil(price + design)); + float d = (float) num / (float) 30; + if (number > 1) { + d = d * number; + } + pro.setWeight(String.valueOf(df.format(d))); + list.add(pro); + return list; + } + + /** + * UV转印贴 + * + * @param area + * @param type + * @return + */ + private double f_getUvPrice(double area, int type) {//根据面积获取价格 + double price = 0, lastPrice = 0; + double areaArr[] = {0.1, 0.12, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 3, 5, 7, 9, 10, 20, 50, 100, 200, 500, 1000, 5000}; + double priceArr[] = {450, 420, 400, 380, 360, 340, 300, 225, 200, 175, 170, 150, 145, 125, 120, 110, 100, 90, 80, 70}; + double lessPriceArr[] = {215, 215, 215, 215, 215, 215, 215, 200, 170, 160, 150, 140, 135, 115, 110, 100, 90, 80, 70, 60}; + double areaArrSmall[] = {0.03, 0.1}; + double priceArrSmall[] = {30, 50}; + for (int i = 0; i < areaArr.length; i++) { + if (areaArr[i] < area) { + continue; + } + if (i > 0) { + if (type == 2) { + lastPrice = Math.ceil(lessPriceArr[i - 1] * areaArr[i - 1]); + } else { + lastPrice = Math.ceil(priceArr[i - 1] * areaArr[i - 1]); + } + } + if (type == 2) { + price = Math.ceil(lessPriceArr[i] * area); + } else { + price = Math.ceil(priceArr[i] * area); + } + if (lastPrice > price) { + price = lastPrice; + } + break; + } + if (type == 3) { + for (int i = 0; i < areaArrSmall.length; i++) { + if (areaArrSmall[i] < area) { + continue; + } + if (i > 0) { + lastPrice = Math.ceil(priceArrSmall[i - 1]); + } + price = Math.ceil(priceArrSmall[i]); + if (lastPrice > price) { + price = lastPrice; + } + break; + } + } + //最低价65 + if (price == 0) { + price = 65 * area; + } + return price; + } + + public List UVStickerPrice(double length, double width, int count, int number, String yinse, String[] zhuan) { + List list = new ArrayList(); + int countArr[] = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000}; + Product pro; + int oldCount = count; + int isInArr = 0; + double price = 0, mqPrice = 0, lastPrice; + if (!StringUtils.isEmpty(zhuan) && ("专金".equals(zhuan[0]) || "专银".equals(zhuan[0]) || "印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0])) + && count < 100) { +// if (!StringUtils.isEmpty(zhuan) && ("专金".equals(zhuan[0]) || "专银".equals(zhuan[0])) && count < 100) { + // 烫金100个起 + count = 100; + } + + double area = (length + 0.3 * 2) * (width + 0.3 * 2) * count / 10000 * number; + if (!StringUtils.isEmpty(zhuan)) { + //工艺价格另算 + area = (length + 0.3 * 2) * (width + 0.3 * 2) * count / 10000; + } + double lastArea = 0; + int index = Arrays.binarySearch(countArr, oldCount); + if (index >= 0) { + isInArr = 1; + } + + if (isInArr != 1) { + price = f_getUvPrice(area, 1); + price = price > 45 ? price : 45; + + if (area <= 0.2) { + mqPrice = count * 0.05; + mqPrice = mqPrice > 5 ? mqPrice : 5; + Math.ceil(price += mqPrice); + } + + if (!StringUtils.isEmpty(zhuan)) { + if ("烫金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0])) { + // 起步价+58元 + price = price + (40 * area); + price = price > 80 ? price : 80; + } else if ("印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0])) { + // 起步价+58元 + price = price + (45 * area); + price = price > 103 ? price : 103; + } else if ("双面贴".equals(zhuan[0])) { + price = price + (40 * area); + price = price > 80 ? price : 80; + } + } + + pro = new Product(); + pro.setPrice(Math.ceil(price)); + pro.setWeight(String.valueOf(df.format(area))); + pro.setCount(oldCount); + list.add(pro); + } + + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + if (list.size() > 2) { + break; + } else { + area = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i] / 10000 * number; + if (i > 0) { + lastArea = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i - 1] / 10000 * number; + } + if (!StringUtils.isEmpty(zhuan)) { + //工艺价格另算 + area = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i] / 10000; + if (i > 0) { + lastArea = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i - 1] / 10000; + } + } + // 报价面积,平方米(加一边3mm出血) + price = f_getUvPrice(area, 1); + price = price > 45 ? price : 45; + lastPrice = f_getUvPrice(lastArea, 1); + + + if (area <= 0.2) { + mqPrice = countArr[i] * 0.05; + mqPrice = mqPrice > 5 ? mqPrice : 5; + Math.ceil(price += mqPrice); + } + if (lastArea <= 0.2 && i > 0) { + mqPrice = countArr[i - 1] * 0.05; + mqPrice = mqPrice > 5 ? mqPrice : 5; + Math.ceil(lastPrice += mqPrice); + } + if (area > 0.1) { + if (lastPrice >= price) {//判断上一个尺寸 + price = Math.ceil(lastPrice * 1.1); + } + } + + if (!StringUtils.isEmpty(zhuan)) { + if ("烫金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0])) { + // 起步价+58元 + price = price + (40 * area); + price = price > 80 ? price : 80; +// lastPrice = lastPrice + (45 * area); +// lastPrice = lastPrice > 103 ? lastPrice : 103; + } else if ("印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0])) { + // 起步价+58元 + price = price + (45 * area); + price = price > 103 ? price : 103; +// lastPrice = lastPrice + (45 * area); +// lastPrice = lastPrice > 103 ? lastPrice : 103; + } else if ("双面贴".equals(zhuan[0])) { + price = price + (40 * area); + price = price > 80 ? price : 80; + } + } + + + pro = new Product(); + pro.setPrice(Math.ceil(price)); + pro.setWeight(String.valueOf(df.format(area))); + pro.setCount(countArr[i]); + list.add(pro); + } + } + +// if (!StringUtils.isEmpty(zhuan) && ("烫金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0]))) { +// for (Product product : list) { +// product.setPrice(Math.ceil(product.getPrice() + 60)); +// } +// } + if (!StringUtils.isEmpty(zhuan) && ("专金".equals(zhuan[0]) || "专银".equals(zhuan[0]))) { + for (Product product : list) { + product.setPrice(Math.ceil(product.getPrice() + 80)); + } + } + + if (length >= 44 || width >= 44) { + if (width > length) { + length = width; + } + for (Product product : list) { + product.setPrice(Math.ceil(product.getPrice() + length * 0.6)); + } + } + + return list; + } + + /** + * 小面积UV转印贴报价: + * + * @param length + * @param width + * @param count + * @param zhuan + * @param yinse 印色 + * @return + */ + public List UVStickerSmallPrice(double length, double width, int count, int number, String yinse, String[] zhuan) { + List list = new ArrayList(); + int countArr[] = {10, 20, 30, 50, 100, 200, 300, 400, 500, 800, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000}; + Product pro; + int isInArr = 0; + int oldCount = count; + double price = 0, mqPrice = 0, lastPrice, list_lastPrice = 0; + if (!StringUtils.isEmpty(zhuan) && ("专金".equals(zhuan[0]) || "专银".equals(zhuan[0]) || "印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0])) + && count < 100) { +// if (!StringUtils.isEmpty(zhuan) && ("专金".equals(zhuan[0]) || "专银".equals(zhuan[0])) && count < 100) { + // 烫金100个起 + count = 100; + } + double area = (length + 0.3 * 2) * (width + 0.3 * 2) * count / 10000 * number; + if (!StringUtils.isEmpty(zhuan)) { + //工艺价格另算 + area = (length + 0.3 * 2) * (width + 0.3 * 2) * count / 10000; + } + double lastArea = 0; + int index = Arrays.binarySearch(countArr, oldCount); + if (index >= 0) { + isInArr = 1; + } + + if (isInArr != 1) { + price = f_getUvPrice(area, 1); + price = price > 45 ? price : 45; + if (area < 0.1 && area > 0) { + price = f_getUvPrice(area, 3); + } + + if (area <= 0.2 && area >= 0.1) { + mqPrice = count * 0.05; + mqPrice = mqPrice > 5 ? mqPrice : 5; + Math.ceil(price += mqPrice); + } + + if (!StringUtils.isEmpty(zhuan)) { + if ("烫金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0])) { + // 起步价+58元 + price = price + (40 * area); + price = price > 80 ? price : 80; + } else if ("印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0])) { + // 起步价+58元 + price = price + (45 * area); + price = price > 103 ? price : 103; + } else if ("双面贴".equals(zhuan[0])) { + price = price + (40 * area); + price = price > 80 ? price : 80; + } + } + + pro = new Product(); + list_lastPrice = Math.max(Math.ceil(price), list_lastPrice); + pro.setPrice(list_lastPrice); + pro.setWeight(String.valueOf(df.format(area))); + pro.setCount(oldCount); + list.add(pro); + } + + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + if (list.size() > 2) { + break; + } else { + area = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i] / 10000 * number; + if (i > 0) { + lastArea = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i - 1] / 10000 * number; + } + if (!StringUtils.isEmpty(zhuan)) { + //工艺价格另算 + area = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i] / 10000; + if (i > 0) { + lastArea = (length + 0.3 * 2) * (width + 0.3 * 2) * countArr[i - 1] / 10000; + } + } + // 报价面积,平方米(加一边3mm出血) + price = f_getUvPrice(area, 1); + price = price > 45 ? price : 45; + lastPrice = f_getUvPrice(lastArea, 1); + if (area < 0.1 && area > 0) { + price = f_getUvPrice(area, 3); + lastPrice = f_getUvPrice(lastArea, 3); + } + + + if (area <= 0.2 && area >= 0.1) { + mqPrice = countArr[i] * 0.05; + mqPrice = mqPrice > 5 ? mqPrice : 5; + Math.ceil(price += mqPrice); + } + if (lastArea <= 0.2 && area >= 0.1 && i > 0) { + mqPrice = countArr[i - 1] * 0.05; + mqPrice = mqPrice > 5 ? mqPrice : 5; + Math.ceil(lastPrice += mqPrice); + } + if (area > 0.1) { + if (lastPrice >= price) {//判断上一个尺寸 + price = Math.ceil(lastPrice * 1.1); + } + } + + if (!StringUtils.isEmpty(zhuan)) { + if ("烫金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "烫蓝".equals(zhuan[0]) || "烫红".equals(zhuan[0]) || "烫黑".equals(zhuan[0]) || "镭射银".equals(zhuan[0]) || "镭射金".equals(zhuan[0]) || "玫瑰金".equals(zhuan[0])) { + // 起步价+58元 + price = price + (40 * area); + price = price > 80 ? price : 80; +// lastPrice = lastPrice + (45 * area); +// lastPrice = lastPrice > 103 ? lastPrice : 103; + } else if ("印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0])) { + // 起步价+58元 + price = price + (45 * area); + price = price > 103 ? price : 103; +// lastPrice = lastPrice + (45 * area); +// lastPrice = lastPrice > 103 ? lastPrice : 103; + } else if ("双面贴".equals(zhuan[0])) { + price = price + (40 * area); + price = price > 80 ? price : 80; + } + } + + pro = new Product(); + list_lastPrice = Math.max(Math.ceil(price), list_lastPrice); + pro.setPrice(list_lastPrice); + pro.setWeight(String.valueOf(df.format(area))); + pro.setCount(countArr[i]); + list.add(pro); + } + } + +// if (!StringUtils.isEmpty(zhuan) && ("烫金".equals(zhuan[0]) || "烫银".equals(zhuan[0]) || "印刷+烫金".equals(zhuan[0]) || "印刷+烫银".equals(zhuan[0]))) { +// for (Product product : list) { +// product.setPrice(Math.ceil(product.getPrice() + 60)); +// } +// } + if (!StringUtils.isEmpty(zhuan) && ("专金".equals(zhuan[0]) || "专银".equals(zhuan[0]))) { + for (Product product : list) { + product.setPrice(Math.ceil(product.getPrice() + 60)); + } + } + + if (length >= 44 || width >= 44) { + if (width > length) { + length = width; + } + for (Product product : list) { + product.setPrice(Math.ceil(product.getPrice() + length * 0.6)); + } + } + + return list; + } + + /** + * 少数量(小于10)UV转印贴报价: + * + * @param length + * @param width + * @param count + * @param zhuan + * @param number 印色 + * @return + */ + public List UVStickerLessPrice(double length, double width, int count, int number, String[] zhuan) { + List list = new ArrayList(); + Product pro = new Product(); + double area = (length + 0.3 * 2) * (width + 0.3 * 2) * count / 10000; + if (!StringUtils.isEmpty(zhuan) && count < 25) { + return list; + } + double price = f_getUvPrice(area, 2); + pro.setPrice(price > 80 ? price : 80); + pro.setCount(count); + list.add(pro); + + if (!StringUtils.isEmpty(zhuan)) { + for (Product product : list) { + product.setPrice(Math.floor(product.getPrice() + 60 + (30 * area > 15 ? 30 * area : 15))); + } + } + + return list; + } + + /** + * 条幅 + * + * @param kind2 + * @param number + */ + public static List bannerPrice(String kind2, double length, double width, int count, Integer number, String role) { + List list = new ArrayList(); + Product pro = new Product(); + // 一条条幅的长度 + length = length / 100.0; + width = width / 100.0; + double area = length * width * count; + double price = 0; + if ("彩色条幅".equals(kind2)) { + //拼多多价格 + if (role.indexOf("1045") > -1) { + if (width == 0.5 || length == 0.5) { + double widthArr[] = {3, 4, 5, 6, 7, 8}; + double unitArr[] = {19, 17.5, 17, 17, 17, 17}; + double baseArr[] = {40, 50, 60, 75, 85, 96}; + for (int i = 0; i < widthArr.length; i++) { + if (widthArr[i] < width || widthArr[i] < length) { + continue; + } + price = unitArr[i] * area; + price = price > baseArr[i] ? price : baseArr[i]; + break; + } + } else { + if (area <= 1) { + price = 45; + } else if (area <= 2) { + price = 35 * area; + } else if (area <= 3) { + price = 33 * area; + } else if (area <= 4) { + price = 32 * area; + } else if (area <= 5) { + price = 30 * area; + } else if (area <= 10) { + price = 28 * area; + } else { + price = 25 * area; + } + } + price = price > 40 ? price : 40; + } else { + if (width == 0.5 && length == 3 || width == 3 && length == 0.5) { + price = 30 * area; + } else if (width == 0.5 && length == 5 || width == 5 && length == 0.5) { + price = 24 * area; + } else if (area <= 1) { + price = 45; + } else if (area <= 2) { + price = 35 * area; + } else if (area <= 3) { + price = 33 * area; + } else if (area <= 4) { + price = 32 * area; + } else if (area <= 5) { + price = 30 * area; + } else if (area <= 10) { + price = 28 * area; + } else { + price = 25 * area; + } + + price = price > 45 ? price : 45; + } + + } else { + if ((width == 0.5 && length == 3 && count == 1) || (width == 3 && length == 0.5 && count == 1)) { + price = 24 * area; + } else if (area <= 1) { + price = 35; + } else if (area <= 2) { + price = 30 * area; + } else if (area <= 3) { + price = 24 * area; + } else if (area <= 4) { + price = 21 * area; + } else if (area <= 5) { + price = 18 * area; + } else if (area <= 10) { + price = 16 * area; + } else { + price = 13 * area; + } + price = price > 40 ? price : 40; + } + pro.setCount(count); + pro.setPrice(Math.ceil(price)); + list.add(pro); + + return list; + } + + /** + * 桌贴0.38磨砂背胶价格计算 ======》 最大印刷尺寸40*45CM 最低起步价100元 每增加一张加30元 设计费每款加8元 + *

+ * 0.38桌贴(磨砂、哑光、亮光) 最大打印面积 395*445MM 成品最小做到1CM 每边加上1.5MM出血 起步价90元 + * 单面印刷不带胶每增加一张单面加30元 双面打印不带胶每增加一张加36元, 带胶加40元一张 10张以上不分单双面带不带胶 均20元/张 + * 款数不同的每款加上1元的设计费 + * + * @param list + * @param width + * @param length + * @param count + * @param number + * @return + */ + public List getDeskSticker(List list, Double width, Double length, int count, Integer number, + String craftShua, String craftJiao) { + // 最大尺寸435*385mm ,加出血一边3mm + double l = 435; + double w = 385; + Product pro = new Product(); + // 价格 + double price = 0; + // 换成毫米每边+1.5 + length = length * 10 + 2 * 1.5; + width = width * 10 + 2 * 1.5; + // 数量*款数就是张数 + count = count * number; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸45*40cm 能做多少个此类尺寸的桌贴 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + + if ("单面".equals(craftShua)) { + if (num > 10) { + price = 70 + num * 28 + (number - 1); + } else { + price = 80 + num * 30 + (number - 1); + } + } else if ("双面".equals(craftShua)) { + if ("背胶".equals(craftJiao)) { + price = 100 + num * 40 + (number - 1); + } else { + price = 100 + num * 36 + (number - 1); + } + } + + pro.setCount(count / number); + pro.setPrice(price > 90 ? price : 90); + list.add(pro); + return list; + } + + /** + * 桌贴0.38PVC亮光异型卡片 印刷价格 + * + * @param list + * @param width + * @param length + * @param count + * @return + */ + public List getDeskSticker(List list, Double width, Double length, int count) { + double danjia; + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + // 面积平方米 + double area = width * length * countArr[i] / 10000; + Product pro = new Product(); + if (area <= 0.45) { + danjia = 110; + } else if (area <= 0.9) { + danjia = 150; + } else if (area <= 5) { + danjia = 100; + } else if (area <= 10) { + danjia = 70; + } else if (area <= 15) { + danjia = 55; + } else if (area <= 20) { + danjia = 50; + } else if (area <= 30) { + danjia = 40; + } else { + danjia = 30; + } + + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(area * danjia > 120 ? area * danjia : 120); + list.add(pro); + } + for (int i = 0; i < list.size() - 1; i++) { + if (list.get(i + 1).getPrice() - list.get(i).getPrice() < 100) { + list.get(i + 1).setPrice(list.get(i + 1).getPrice() + 100); + } + } + return list; + } + + /** + * 桌贴0.38PVC亮光异型卡片 打印价格 + * + * @param number + * @param width + * @param length + * @param count + * @param craftJiao + * @return 不同款内容的报价:成本核算 有效打印面积 380*420MM 起步价120元 每增加一张单面加30元 + * 双面打印在每增加一张加36元,带胶加每增加一张加40元 10张以上单双面均加22元/张 + */ + public List getDeskStickerPrint(Double width, Double length, int count, int number, String craftJiao) { + List list = new ArrayList(); + // 有效打印面积 420*380MM,加出血一边3mm + double l = 426; + double w = 386; + Product pro = new Product(); + // 第一张大纸价格 + double price = 120; + // 换成毫米每边+3 + length = length * 10 + 2 * 3; + width = width * 10 + 2 * 3; + // 数量 * 款数就是张数 + count = count * number; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸420*380mm 能做多少个此类尺寸的桌贴 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + // 价格计算 + if ("背胶".equals(craftJiao)) { + price = price + (num - 1) * 40; + } else { + if (num > 10) { + price = price + (num - 1) * 22; + } else { + // 单面 + if ("单面".equals(craftJiao)) { + price = price + (num - 1) * 30; + } else if ("双面".equals(craftJiao)) {// 双面 + price = price + (num - 1) * 36; + } + } + } + + pro.setCount(count / number); + pro.setPrice(price); + list.add(pro); + return list; + } + + /** + * 滴塑价格计算======> 滴塑 出血位每边加1.5MM 滴塑最大印刷面积43*30CM 起步价80元 2张100元 3张120元 4张150元 + * 5张180元 10张260元 11张以上*25元 + * + * @param list + * @param width + * @param length + * @param count + * @param number + * @param dto + * @return + */ + public static List getDisuPrice(List list, Double width, Double length, int count, Integer number, Product dto) { + List craft = dto.getCraft() != null ? Arrays.asList(dto.getCraft()) : new ArrayList<>(); + // 最大尺寸43*30cm + double l = 430; + double w = 300; + Product pro = new Product(); + // 第一张大纸价格 + double price = 80; + if (craft.size() > 0) {//工艺起步价120 + price = 120; + } + // 换成毫米每边+3 + length = length * 10 + 2 * 1.5; + width = width * 10 + 2 * 1.5; + // 数量*款数就是张数 + count = count * number; + if ((length > l || width > w) && (length > w || width > l)) { + return null; + } + // 一张大纸43*30 能做多少个此类尺寸的 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + if (num <= 10) { + price = price + (num - 1) * 20; + } else if (num > 10) { + price = num * 25; + } + price += 10 * craft.size() * num; + + if (number > 1) { + price *= 1.3; + } + pro.setCount(count / number); + pro.setPrice(price); + list.add(pro); + return list; + } + + /** + * 毕业证书价格计算 + * + * @param count + */ + public List getDiploma(int count) { + List list = new ArrayList(); + // 数量 + int countArr[] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 500, 1000}; + // 价格 + double priceArray[] = {90, 110, 120, 140, 160, 190, 210, 230, 240, 270, 480, 740, 920, 1200}; + Product pro = new Product(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + if (list.size() == 4) { + return list; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(priceArray[i]); + list.add(pro); + } + return list; + } + + /** + * 复印纸价格计算 + * + * @param count + * @param kind3 + * @param kind2 + * @param kind + * @param size + * @return + */ + public List getCopyPaper(String kind, String kind2, String kind3, int count, String size) { + List list = new ArrayList(); + double price = 0; + if ("彩色".equals(kind)) { + if ("80克双胶纸".equals(kind2)) { + if ("19*13".equals(size)) { + if (count == 10) { + price = 70; + } else if (count == 20) { + price = 90; + } else if (count == 50) { + price = 150; + } + } else if ("28.5*21".equals(size)) { + if (count == 10) { + price = 160; + } else if (count == 20) { + price = 320; + } else if (count == 50) { + price = 900; + } + } + } + } else { + if ("60克双胶纸".equals(kind2)) { + if ("19*13".equals(size)) { + if (count == 10) { + if ("单面".equals(kind3)) { + price = 50; + } else { + price = 70; + } + } else if (count == 20) { + if ("单面".equals(kind3)) { + price = 60; + } else { + price = 90; + } + } else if (count == 50) { + if ("单面".equals(kind3)) { + price = 110; + } else { + price = 150; + } + } + } else if ("28.5*21".equals(size)) { + if (count == 10) { + if ("单面".equals(kind3)) { + price = 110; + } else { + price = 150; + } + } else if (count == 20) { + if ("单面".equals(kind3)) { + price = 160; + } else { + price = 220; + } + } else if (count == 50) { + if ("单面".equals(kind3)) { + price = 380; + } else { + price = 520; + } + } + } + } else if ("80克双胶纸".equals(kind2)) { + if ("19*13".equals(size)) { + if (count == 10) { + if ("单面".equals(kind3)) { + price = 60; + } else { + price = 90; + } + } else if (count == 20) { + if ("单面".equals(kind3)) { + price = 80; + } else { + price = 120; + } + } else if (count == 50) { + if ("单面".equals(kind3)) { + price = 180; + } else { + price = 220; + } + } + } else if ("28.5*21".equals(size)) { + if (count == 10) { + if ("单面".equals(kind3)) { + price = 130; + } else { + price = 180; + } + } else if (count == 20) { + if ("单面".equals(kind3)) { + price = 220; + } else { + price = 260; + } + } else if (count == 50) { + if ("单面".equals(kind3)) { + price = 520; + } else { + price = 780; + } + } + } + } + } + Product pro = new Product(); + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(price)); + list.add(pro); + + return list; + } + + /** + * 婚礼卡价格计算 + * + * @param length + * @param width + * @param count + * @param number + * @param craftMo + * @param craftShua + * @return + */ + public List getWeddingCardPrice(Double length, Double width, int count, Integer number, String craftMo, + String craftShua) { + List list = new ArrayList(); + Product pro = new Product(); + double weight = 0; + if ("直角".equals(craftMo) && count <= 300 && ((length == 13 && width == 5.4) || (length == 5.4 && width == 13))) { + if ("单面印刷".equals(craftShua)) { + // 数量 + int countArr[] = {100, 200, 300}; + // 价格 + double priceArray[] = {70, 126, 183}; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + + pro.setPrice(priceArray[i]); + list.add(pro); + } + // 根据款数重新算价格 + for (Product product : list) { + product.setWeight(df.format(length * width * product.getCount() / 10000 * 0.3 * number)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + } else if ("双面印刷".equals(craftShua)) { + // 数量 + int countArr[] = {100, 200, 300}; + // 价格 + double priceArray[] = {108, 189, 275}; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + + pro.setPrice(priceArray[i]); + list.add(pro); + } + // 根据款数重新算价格 + for (Product product : list) { + product.setPrice(Math.floor(product.getPrice() * number)); + } + } + } else { + // 转成毫米 + weight = length * width * count / 10000 * 0.3 * number; + length = length * 10; + width = width * 10; + if (count <= 300) { + double l = 420; + double w = 285; + // 打印的加上出血(一边2毫米) + length = length + 4; + width = width + 4; + double price = 0.0; + + // 5张以内价格 + double fixPrice = 50; + // 每增加1张多少钱 + double zhang = 6; + // 设计费 + double designFee = 0.0; + + // 婚礼卡,直角工艺每增加一张5元 + if ("直角".equals(craftMo)) { + zhang = 5; + } + + /* + * 婚礼卡设计费成品尺寸90X54MM以内每款收10元 140X100MM以内每款收15元 210X140MM以内30元 210X285MM以内40元 + * 420X285MM以内60元 大于420X285MM80元 + */ + // 设计费不带出血的尺寸 + if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { + designFee = 10; + } else if ((length - 4 <= 140 && width - 4 <= 100) || (length - 4 <= 140 && width - 4 <= 100)) { + designFee = 15; + } else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { + designFee = 30; + } else if ((length - 4 <= 285 && width - 4 - 4 <= 210) || (length - 4 <= 210 && width - 4 <= 285)) { + designFee = 40; + } else if ((length - 4 <= 420 && width - 4 <= 285) || (length - 4 <= 285 && width - 4 <= 420)) { + designFee = 60; + } else { + designFee = 80; + } + + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + // 5张以内价格 + 每张费用(第6张起收)+ 设计费 * 款数 + 0.1 * 总数量 (排号费) + price = fixPrice + (num - 5 > 0 ? num - 5 : 0) * zhang + designFee * number + 0.1 * count * number; + Product dto = new Product(); + dto.setCount(count); + dto.setPrice(price); + list.add(dto); + } else { + // 数量 + int countArr[] = {500, 1000, 2000}; + // 价格 + double priceArray[] = {230, 400, 760}; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + + pro.setPrice(priceArray[i]); + list.add(pro); + } + // 根据款数重新算价格 + for (Product product : list) { + product.setWeight(df.format(weight)); + product.setPrice(Math.floor(product.getPrice() * number)); + } + } + } + return list; + } + + /** + * 贡缎布产品价格 + */ + public static List satinClothPrice(String kind2, Double length, Double width, int count, Integer number) { + List list = new ArrayList(); + Product pro = new Product(); + double area = length * width / 10000; + double price = 0, dj = 0; + if (area < 0.25) { + dj = 50; + } else { + dj = 40; + } + + area *= count; + if ("6".equals(kind2)) { + price = price + 30; + } + price = Math.ceil(area * dj > 58 ? area * dj : 58); + pro.setCount(count); + pro.setPrice(price * number); + list.add(pro); + + return list; + } + + /** + * 餐垫纸 + * + * @param kind + * @param length + * @param width + * @param count + * @return + */ + public List getPlaceMatPrice(String kind, Double length, Double width, int count) { + List list = new ArrayList<>(); + length = length * 10; + width = width * 10; + // Double priceArr[] = { 40.0, 50.0, 80.0, 120.0, 160.0, 270.0, 480.0 }; + // list = acountInsertCardPrice(count, list, priceArr); + if ((length <= 285 && width <= 210) || length <= 210 && width <= 285) { + Double priceArr[] = {46.0, 68.0, 117.0, 157.0, 236.0, 457.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 436 && width <= 285 || length <= 285 && width <= 436) { + Double priceArr[] = {88.0, 122.0, 191.0, 269.0, 457.0, 896.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 638 && width <= 285 || length <= 285 && width <= 638) { + Double priceArr[] = {137.0, 204.0, 350.0, 489.0, 810.0, 1482.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 852 && width <= 285 || length <= 285 && width <= 852) { + Double priceArr[] = {183.0, 272.0, 466.0, 652.0, 975.0, 1681.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 1050 && width <= 285 || length <= 285 && width <= 2050) { + Double priceArr[] = {229.0, 340.0, 582.0, 815.0, 1279.0, 2470.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 587 && width <= 428 || length <= 428 && width <= 587) { + Double priceArr[] = {195.0, 262.0, 408.0, 554.0, 869.0, 1659.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 638 && width <= 428 || length <= 428 && width <= 638) { + Double priceArr[] = {252.0, 352.0, 570.0, 755.0, 1191.0, 2263.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 779 && width <= 428 || length <= 428 && width <= 778) { + Double priceArr[] = {321.0, 430.0, 691.0, 951.0, 1434.0, 2765.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 880 && width <= 428 || length <= 428 && width <= 880) { + Double priceArr[] = {349.0, 484.0, 796.0, 1051.0, 1681.0, 3258.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 1050 && width <= 428 || length <= 428 && width <= 1050) { + Double priceArr[] = {419.0, 587.0, 900.0, 1191.0, 1985.0, 3748.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 638 && width <= 574 || length <= 574 && width <= 638) { + Double priceArr[] = {274.0, 408.0, 699.0, 927.0, 1535.0, 2964.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 779 && width <= 529 || length <= 529 && width <= 779) { + Double priceArr[] = {321.0, 430.0, 691.0, 951.0, 1434.0, 2765.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 880 && width <= 580 || length <= 580 && width <= 880) { + Double priceArr[] = {349.0, 484.0, 796.0, 1051.0, 1681.0, 3258.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } else if (length <= 863 && width <= 638 || length <= 638 && width <= 863) { + Double priceArr[] = {411.0, 612.0, 993.0, 1390.0, 2303.0, 4446.0}; + list = acountPlaceMatPrice(kind, count, list, priceArr); + } + return list; + } + + /** + * 餐垫纸遍历添加价格 + */ + private List acountPlaceMatPrice(String kind, int count, List list, Double[] priceArr) { + int countArr[] = {500, 1000, 2000, 3000, 5000, 10000}; + Product pro; + double beishu = 1; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + if (countArr[i] <= 500) { + beishu = 2.2; + } else if (countArr[i] <= 3000) { + beishu = 1.8; + } else { + beishu = 1.5; + } + // 55克 比80克便宜2分钱一张 + if ("1".equals(kind)) { + pro.setPrice(Math.ceil(priceArr[i] * beishu - countArr[i] * 0.02)); + } else if ("0".equals(kind)) {// 80克 + pro.setPrice(Math.ceil(priceArr[i] * beishu)); + } + list.add(pro); + } + return list; + } + + /** + * 硫酸纸吊牌价格 + * + * @param count + */ + public List getAcidTagsPrice(Double length, Double width, String size1, int count) { + List list = new ArrayList<>(); + int countArr[] = {1000, 2000, 5000, 10000}; + if ((length > 6.8 || width > 3) && (length > 3 || width > 6.8)) { + int priceArr[] = {200, 360, 720, 1300}; + list = acountAcidTagsPrice(count, list, countArr, priceArr); + } else { + int priceArr[] = {180, 320, 620, 1100}; + list = acountAcidTagsPrice(count, list, countArr, priceArr); + } + return list; + } + + /** + * 硫酸纸吊牌价格计算 + * + * @param count + * @param list + * @param countArr + * @param priceArr + */ + private List acountAcidTagsPrice(int count, List list, int[] countArr, int[] priceArr) { + Product pro; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + /** + * 号码布价格计算 + * + * @param kind + * @param num + * @param width + * @param length + * @param list + * @param count + * @return + */ + public List getHmbPrice(String kind, int num, Double length, Double width, int count, List list) { + Product pro; + double price = 0; + if (length == 240 && width == 200 || length == 200 && width == 240) { + if (kind.equals("春亚布")) { + price = num * count * 1.8; + } else { + price = num * count * 2.5; + } + } else if (length == 200 && width == 140 || length == 140 && width == 200) { + if (kind.equals("春亚布")) { + price = num * count * 1.5; + } else { + price = num * count * 1.3; + } + } else { + if (kind.equals("春亚布")) { + price = num * count * 1.5; + } else { + price = num * count * 1.8; + } + } + + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(price) > 50 ? price : 50); + list.add(pro); + return list; + } + + /** + * 锦旗价格计算 + * + * @param kind + * @param num + * @param width + * @param length + * @param list + * @param count + * @return + */ + public List getJQPrice(String kind, int num, Double length, Double width, int count, List list) { + Product pro; + double price = 0; + if (length == 60 && width == 90 || length == 90 && width == 60) { + if (kind.equals("小龙须黄字")) { + price = num * count * 45; + } else if (kind.equals("小龙须3d镀金")) { + price = num * count * 86; + } else if (kind.equals("大龙须黄字")) { + price = num * count * 66; + } else if (kind.equals("大龙须3d镀金")) { + price = num * count * 88; + } else { + price = num * count * 130; + } + } else if (length == 70 && width == 110 || length == 110 && width == 70) { + if (kind.equals("小龙须黄字")) { + price = num * count * 47; + } else if (kind.equals("小龙须3d镀金")) { + price = num * count * 88; + } else if (kind.equals("大龙须黄字")) { + price = num * count * 80; + } else { + price = num * count * 98; + } + } else if (length == 80 && width == 120 || length == 120 && width == 80) { + if (kind.equals("小龙须黄字")) { + price = num * count * 85; + } else if (kind.equals("小龙须3d镀金")) { + price = num * count * 125; + } else if (kind.equals("大龙须黄字")) { + price = num * count * 90; + } else { + price = num * count * 140; + } + } else if (length == 70 && width == 120 || length == 120 && width == 70) { + price = num * count * 158; + } else { + price = num * count * 220; + } + + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(price)); + list.add(pro); + return list; + } + + /** + * 彩旗价格计算 + * + * @param num + * @param width + * @param length + * @param list + * @param count + * @return + */ + public List getCQPrice(int num, Double length, Double width, int count, List list) { + Product pro; + double price = 0; + if (length == 40 && width == 80 || length == 80 && width == 40) { + price = num * count * 80; + } else if (length == 60 && width == 90 || length == 90 && width == 60) { + price = num * count * 130; + } else if (length == 70 && width == 120 || length == 120 && width == 70) { + price = num * count * 158; + } else { + price = num * count * 220; + } + + pro = new Product(); + pro.setCount(count); + pro.setPrice(Math.ceil(price)); + list.add(pro); + return list; + } + + /** + * 封口贴铜板不干胶价格计算 + * + * @param num + * @param list + * @return + */ + public List getFktPrice(int num, List list) { + Product pro; + double price = 0; + for (int i = 1; i < countArr.length; i++) { + if (countArr[i] == 1000) { + price = 50.0 * num; + } else if (countArr[i] == 2000) { + price = 80.0 * num; + } else if (countArr[i] == 3000) { + price = 150.0 * num; + } else if (countArr[i] == 5000) { + price = 175.0 * num; + } else if (countArr[i] == 10000) { + price = 240.0 * num; + } else { + price = 450.0 * num; + } + + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(price)); + list.add(pro); + } + return list; + } + + /** + * PVC亮光异型卡片价格计算 + * + * @param dto + * @param number + * @param width + * @param length + * @param area + * @param count + * @param priceList + * @return + */ + /*public List getPVCPrice(String kindValue,int count,double width, double length, List list) { + Product pro; + double price = 0,dj = 0, bz = 1; + double area = (width*length)/10000; + int countArr[] = { 500, 1000, 2000, 5000, 10000 }; + + if(area <= 0.0016) { + bz = 2.7; + }else if(area <= 0.0025) { + bz = 1.8; + }else if(area <= 0.0036) { + bz = 1.3; + }else if(area <= 0.0042) { + bz = 1.05; + } + + for(int i = 0; i< countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + if(kindValue.equals("2")) { + if(countArr[i] == 500) { + dj = 45; + }else if(countArr[i] == 1000) { + dj = 34; + }else if(countArr[i] == 2000) { + dj = 31; + }else if(countArr[i] == 5000) { + dj = 29; + }else if(countArr[i] == 10000) { + dj = 28; + } + }else { + if(countArr[i] == 500) { + dj = 63; + }else if(countArr[i] == 1000) { + dj = 54; + }else if(countArr[i] == 2000) { + dj = 50; + }else if(countArr[i] == 5000) { + dj = 48; + }else if(countArr[i] == 10000) { + dj = 47; + } + } + + price = bz*dj*countArr[i]*area; + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(price); + list.add(pro); + } + return list; + }*/ + + /** + * 硫酸纸价格计算 + * + * @param dto + * @param width + * @param length + * @param count + * @param list + * @return + */ + public List getLszPrice(Product dto, double width, double length, int count, List list) { + double price = 0, dj = 0, area = 0; + String craft[] = dto.getCraft(); + int lszCountArr[] = new int[]{500, 1000, 2000, 3000, 5000, 10000, 20000}; + for (int i = 0; i < lszCountArr.length; i++) { + Product pro = new Product(); + if (lszCountArr[i] < count || list.size() > 3) { + continue; + } + if ((width <= 6.8 && length <= 3) || (width <= 6.8 && length <= 3)) { + if ("直角".equals(craft[0])) { + dj = 14.5; + } else { + dj = 36.5; + } + } else if ((width <= 9 && length <= 5) || (width <= 9 && length <= 5)) { + if ("直角".equals(craft[0])) { + dj = 14.5; + } else { + dj = 36.5; + } + } else if ((width <= 10 && length <= 14) || (width <= 14 && length <= 10)) { + if ("直角".equals(craft[0])) { + dj = 11.5; + } else { + dj = 17.5; + } + } else if ((width <= 21 && length <= 14) || (width <= 14 && length <= 21)) { + if ("直角".equals(craft[0])) { + dj = 9.6; + } else { + dj = 12.1; + } + } else if ((width <= 21 && length <= 28.5) || (width <= 28.5 && length <= 21)) { + if ("直角".equals(craft[0])) { + dj = 7.6; + } else { + dj = 11.1; + } + } else { + if ("直角".equals(craft[0])) { + dj = 7.2; + } else { + dj = 10.7; + } + } + + dj *= 2;//按照供应商成本价2倍计算 + if (lszCountArr[i] == 500) { + area = width * length * 800 / 10000; + } else { + area = width * length * lszCountArr[i] / 10000; + if ((width >= 21 && length >= 28.5) || (width >= 28.5 && length >= 21)) { + area *= 0.85; + } + } + + price = Math.ceil(dj * area); + pro.setPrice(price > 80 ? price : 80); + + //烫金工艺 + if ("烫金".equals(dto.getCraftTang())) { + area = length * width / 10000; + double tangPrice = 0; + double tangPriceArr[] = new double[4]; + if (area <= 0.005) { + tangPriceArr = new double[]{90.0, 135.0, 205.0, 255.0, 425, 850, 1700}; + } else if (area <= 0.01) { + tangPriceArr = new double[]{95.0, 140.0, 225.0, 300.0, 500, 1000, 2000}; + } else if (area <= 0.015) { + tangPriceArr = new double[]{100.0, 145.0, 245.0, 325.0, 545, 1090, 2180}; + } else if (area <= 0.025) { + tangPriceArr = new double[]{115.0, 165.0, 280.0, 380.0, 635, 1270, 2540}; + } else if (area <= 0.035) { + tangPriceArr = new double[]{135.0, 205.0, 335.0, 468.0, 780, 1560, 3120}; + } else { + tangPriceArr = new double[]{145.0, 225.0, 380.0, 535.0, 895, 1790, 3580}; + } + + tangPrice = tangPriceArr[i] * 1.4 > 135 ? tangPriceArr[i] * 1.4 : 135; + pro.setPrice(Math.ceil(pro.getPrice() + tangPrice)); + } + pro.setCount(lszCountArr[i]); + list.add(pro); + } + + return list; + } + + /** + * 80克硫酸纸价格计算 + * + * @param dto + * @param width + * @param length + * @param count + * @param list + * @return + */ + public List get80LszPrice(Product dto, double width, double length, int count, List list) { + double dj = 0; + double l = 420; + double w = 285; + length *= 10; + width *= 10; + Product pro = new Product(); + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); +// if (count <= 1000) { +// dj = 150; +// } else { +// dj = 150 + Math.ceil(count / 1000) * 20; +// } + if (dto.getKindValue().equals("2")) { + dj = 0.86; + } else { + dj = 0.5; + } + pro.setPrice(130 + Math.ceil((num + 100) * dj)); + double area = 0; + if ("烫金".equals(dto.getCraftTang())) { + int lszCountArr[] = new int[]{500, 1000, 2000, 3000, 5000, 10000, 20000}; + int i = 0; + for (int j = 0; j < lszCountArr.length; j++) { + if (lszCountArr[i] > count) { + break; + } + i = j; + } + area = length * width / 10000; + double tangPrice = 0; + double tangPriceArr[] = new double[4]; + if (area <= 0.005) { + tangPriceArr = new double[]{135, 189, 287, 357, 595, 1190, 2380}; + } else if (area <= 0.01) { + tangPriceArr = new double[]{135, 196, 315, 420, 700, 1400, 2800}; + } else if (area <= 0.015) { + tangPriceArr = new double[]{140, 203, 343, 455, 763, 1526, 3052}; + } else if (area <= 0.025) { + tangPriceArr = new double[]{161, 231, 392, 532, 889, 1778, 3556}; + } else if (area <= 0.035) { + tangPriceArr = new double[]{189, 287, 469, 655.2, 1092, 2184, 4368}; + } else { + tangPriceArr = new double[]{203, 315, 532, 749, 1253, 2506, 5012}; + } + + tangPrice = tangPriceArr[i] * 1.4 > 135 ? tangPriceArr[i] * 1.4 : 135; + pro.setPrice(Math.ceil(pro.getPrice() + tangPrice)); + } + pro.setCount(count); + list.add(pro); + return list; + } + + /** + * 常规刚古水纹超白不干胶计算 + * + * @param number + * @param width + * @param length + * @param count + * @return + */ + public List getGgSwPrice(double length, double width, int count, int number) { + double price = 0, area = 0; + List list = new ArrayList(); + Product pro = null; + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + area = (length * width * countArr[i]) / 10000; + price = 70 * area * number; + pro.setPrice(Math.ceil(price > 80 ? price : 80)); + pro.setCount(countArr[i]); + list.add(pro); + } + return list; + } + + /** + * 帆布计算 + * + * @param dto + * @param number + * @param width + * @param length + * @param count + * @param list + * @return + */ + public List getFbPrice(Product dto, Integer number, Double width, Double length, int count, List list) { + Product pro = new Product(); + double price = 0, dj = 0; + String[] craft = dto.getCraft(); + if (dto.getStickerKind().equals("套餐")) { + pro.setCount(count); + pro.setPrice(198.0); + list.add(pro); + } else { + + double area = length * width * count / 10000; + double d = length * width * count / 10000; + if (length == 100 && width == 45) { + price = 40 * number * count; + if (craft != null) { + for (int i = 0; i < craft.length; i++) { + if (craft[i].equals("缝兜")) { + price += number * 10; + } else { + continue; + } + } + } + pro.setCount(count); + pro.setPrice(price); + list.add(pro); + }/*else if(length == 45 && width == 45){ + price = 30 * number * count; + if(craft != null) { + for(int i = 0; i< craft.length; i++) { + if(craft[i].equals("缝兜")) { + price += number * 10; + }else { + continue; + } + } + } + + pro.setPrice(price); + }*/ else { + if (d <= 0.2) { + area *= number; + } + + if (area <= 0.2) { + price = 45; + } else if (area <= 0.5) { + dj = 80; + } else if (area <= 0.7) { + dj = 75; + } else if (area <= 0.9) { + dj = 70; + } else if (area <= 1) { + dj = 68; + } else if (area <= 1.9) { + dj = 65; + } else if (area <= 3) { + dj = 60; + } else { + dj = 55; + } + + if (d > 0.2) { + price = area * dj * number; + } else { + if (area <= 0.2) { + price = 45; + } else { + price = area * dj; + } + } + + if (craft != null) { + for (int i = 0; i < craft.length; i++) { + if (craft[i].equals("缝兜")) { + price += number * 10; + } else { + continue; + } + } + } + + /*if(d > 3 && number > 1) { + price += (number-1) * 20; + }*/ + + price = Math.ceil(price > 45 ? price : 45); + + double other_price = 0; + if (length * width < 40 * 50) { + int total = count * number; + for (int i = 1; i <= total; i++) { + other_price = getFBPirce(width, length, i, 1); + if (other_price > 45) { + price = 45 + (total - i + 1) * 6; + break; + } + } + + } + pro.setPrice(price); + pro.setCount(count); + pro.setWeight(df.format(area * 0.28 * number)); + list.add(pro); + } + + } + return list; + } + + public double getFBPirce(double length, double width, int count, int number) { + double area = length * width * count / 10000; + double d = length * width * count / 10000; + double price = 0, dj = 0; + if (length == 100 && width == 45) { + price = 40 * number * count; + } else { + if (d <= 0.2) { + area *= number; + } + + if (area <= 0.2) { + price = 45; + } else if (area <= 0.5) { + dj = 80; + } else if (area <= 0.7) { + dj = 75; + } else if (area <= 0.9) { + dj = 70; + } else if (area <= 1) { + dj = 68; + } else if (area <= 1.9) { + dj = 65; + } else if (area <= 3) { + dj = 60; + } else { + dj = 55; + } + + if (d > 0.2) { + price = area * dj * number; + } else { + if (area <= 0.2) { + price = 45; + } else { + price = area * dj; + } + } + + price = Math.ceil(price > 45 ? price : 45); + } + return price; + } + + /** + * 亚克力计算 + * + * @param dto + * @param number + * @param width + * @param length + * @param count + * @param list + * @return + */ + public List getYklPrice(Product dto, Integer number, Double width, Double length, int count, List< + Product> list) { + Product pro = new Product(); + double price = 0, dj = 0; + double l = 1200; + double w = 2400; + double area = length * width * count / 10000; + String kind = dto.getKind2Value(); + length = length * 10; + width = width * 10; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张大纸能做多少个此类尺寸的不干胶 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + if (num > 1) { + if (kind.equals("1")) { + dj = 317; + } else if (kind.equals("2")) { + dj = 357; + } else if (kind.equals("3")) { + dj = 477; + } else if (kind.equals("4")) { + dj = 375; + } else { + dj = 415; + } + + price = dj * 1.8 + dj * 1.5 * (num - 1); + pro.setPrice(Math.ceil(price)); + } else { + if (area <= 0.02) { + dj = 1800; + } else if (area <= 0.03) { + dj = 1300; + } else if (area <= 0.05) { + dj = 1000; + } else if (area <= 0.06) { + dj = 900; + } else if (area <= 0.07) { + dj = 800; + } else if (area <= 0.08) { + dj = 700; + } else if (area <= 0.16) { + dj = 650; + } else if (area <= 0.25) { + dj = 550; + } else if (area <= 0.4) { + dj = 500; + } else if (area <= 0.5) { + dj = 400; + } else if (area <= 0.6) { + dj = 350; + } else if (area <= 0.8) { + dj = 300; + } else if (area <= 1) { + dj = 280; + } else if (area <= 2) { + dj = 250; + } else if (area <= 3) { + dj = 240; + } else if (area <= 4) { + dj = 230; + } else if (area <= 5) { + dj = 225; + } + + price = area * dj * 2.5; + if (kind.equals("5")) { + price = price * 1.2; + } else { + if (kind.equals("2")) { + price = price * 1.1; + } else if (kind.equals("3")) { + price = price * 1.3; + } + } + } + double weight = 0; + if (kind.equals("1") || kind.equals("4")) { + weight = area * number * 2.26; + } else if (kind.equals("2") || kind.equals("5")) { + weight = area * number * 3.06; + } else if (kind.equals("3")) { + weight = area * number * 5.11; + } + pro.setPrice(Math.ceil(price > 50 ? price : 50)); + pro.setCount(count); + pro.setWeight(String.valueOf(df.format(weight))); + list.add(pro); + return list; + } + + /** + * 灯布计算 + * + * @param width + * @param length + * @param count + * @param list + * @return + */ + public List getDbPrice(String kind, Double width, Double length, int count, List list) { + //11-550灯布 12-520灯布 13-550黑底灯布 + Product pro = new Product(); + double price = 0, dj = 0; + double area = length * width * count; + if (kind.equals("11")) { + if (area <= 5) { + dj = 20; + } else if (area <= 10) { + dj = 18; + } else if (area > 10) { + dj = 17; + } + } else if (kind.equals("12")) { + if (area <= 5) { + dj = 16; + } else if (area <= 10) { + dj = 12; + } else if (area > 10) { + dj = 10; + } + } else { + if (area <= 5) { + dj = 24; + } else if (area <= 10) { + dj = 20; + } else if (area > 10) { + dj = 18; + } + } + + + price = area * dj; + if (area >= 7 && area <= 10) { + price = price * 0.9; + } + if (kind.equals("11")) { + price = Math.ceil(price > 55 ? price : 55); + } else if (kind.equals("12")) { + price = Math.ceil(price > 50 ? price : 50); + } else { + price = Math.ceil(price > 60 ? price : 60); + } + pro.setPrice(price); + pro.setCount(count); + list.add(pro); + + return list; + } + + /** + * 串旗计算 + * + * @param width + * @param length + * @param count + * @param num + * @param list + * @return + */ + public List getCqPrice(Double width, Double length, int count, int num, List list) { + Product pro = new Product(); + double price = 0, dj = 0; + double area = (width * length) / 10000; + if (area <= 0.042) { + price = 50 + 5 * count * num; + } else if (area <= 0.1125) { + dj = 120; + } else if (area <= 0.2) { + dj = 110; + } else if (area <= 0.5) { + dj = 100; + } else if (area <= 0.7) { + dj = 95; + } else if (area <= 0.9) { + dj = 90; + } else if (area <= 1) { + dj = 85; + } else { + dj = 80; + } + + if (area > 0.042) { + price = dj * area * count * num; + } + + price = Math.ceil(price > 50 ? price : 50); + double wei = area * 0.29 * count * num; + pro.setPrice(price); + pro.setCount(count); + pro.setWeight(df.format(wei)); + list.add(pro); + return list; + } + + /** + * 桌布 + * + * @param length + * @param width + * @param count + * @param number + * @return + */ + public List getTableClothPrice(Double length, Double width, int count, Integer + number, List priceList) { + double price = 0, dj = 0; + if (length <= 0.8 && width <= 0.8) { + dj = 77; + } else if ((length <= 0.8 && width <= 1.6) || (length <= 1.6 && width <= 0.8)) { + dj = 43; + } else if ((length <= 1.2 && width <= 1.6) || (length <= 1.6 && width <= 1.2)) { + dj = 29; + } else if ((length <= 1.4 && width <= 1.6) || (length <= 1.6 && width <= 1.4)) { + dj = 28; + } else if ((length <= 1.6 && width <= 2.0) || (length <= 2.0 && width <= 1.6)) { + dj = 27; + }/*else if((length <= 1.8 && width <= 2.0) || (length <= 2.0 && width <= 1.8)) { + dj = 26; + }else if((length <= 1.6 && width <= 2.5) || (length <= 2.5 && width <= 1.6)) { + dj = 26; + }*/ else { + dj = 26; + } + Product pro = new Product(); + List list = new ArrayList(); + price = length * width * count * number * dj; + pro.setCount(count); + pro.setPrice(Math.ceil(price > 50 ? price : 50)); + pro.setWeight(df.format(0.3 * length * width * count * number)); + list.add(pro); + return list; + } + + public List getShkPrice(String size, int count, Integer number) { + int[] countArr = {200, 500, 1000, 2000, 5000, 10000}; + double[] priceArr = {}; + List list = new ArrayList(); + Product pro = new Product(); + if (size.equals("9*5.4")) { + priceArr = new double[]{25.0, 26.0, 27.0, 50.0, 110.0, 200.0}; + } else if (size.equals("9*11")) { + priceArr = new double[]{27.0, 37.0, 45.0, 80.0, 210.0, 400.0}; + } else if (size.equals("8*11")) { + priceArr = new double[]{27.0, 37.0, 45.0, 80.0, 210.0, 400.0}; + } else if (size.equals("7*14")) { + priceArr = new double[]{27.0, 37.0, 45.0, 80.0, 210.0, 400.0}; + } else if (size.equals("8*14")) { + priceArr = new double[]{44.0, 46.0, 72.0, 120.0, 260.0, 500.0}; + } else if (size.equals("10*15")) { + priceArr = new double[]{44.0, 66.0, 88.0, 150.0, 350.0, 600.0}; + } else if (size.equals("11*18")) { + priceArr = new double[]{61.0, 83.0, 94.0, 160.0, 400.0, 650.0}; + } else if (size.equals("9*9")) { + priceArr = new double[]{30.0, 41.0, 44.0, 75.0, 200.0, 400.0}; + } else { + priceArr = new double[]{44.0, 66.0, 88.0, 120.0, 260.0, 500.0}; + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + + if (list.size() > 3) { + break; + } + + pro = new Product(); + pro.setCount(countArr[i]); + + pro.setPrice(Math.ceil(number * priceArr[i])); + list.add(pro); + } + return list; + } + + public List getSdkPrice(int count, Integer number) { + int[] countArr = {50, 100, 500, 1000, 2000, 5000, 10000}; + double[] priceArr = new double[]{339, 599, 1800.0, 3000.0, 4800.0, 8000.0, 15000.0}; + Product pro = new Product(); + List list = new ArrayList(); + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + + if (list.size() > 3) { + break; + } + pro = new Product(); + pro.setCount(countArr[i]); + + pro.setPrice(Math.ceil(number * priceArr[i])); + list.add(pro); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/PublicMethods.java b/src/main/java/lingtao/net/util/PublicMethods.java new file mode 100644 index 0000000..ca9813e --- /dev/null +++ b/src/main/java/lingtao/net/util/PublicMethods.java @@ -0,0 +1,51 @@ +package lingtao.net.util; + +import org.apache.shiro.SecurityUtils; + +import lingtao.net.bean.SysUser; + +public class PublicMethods { + + // 是否有【超管】或者【组长】身份 + public boolean isSuperOrManager() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String role = user.getRole(); + boolean flag = false; + if (role.contains(",")) { + String[] split = role.split(","); + for (int i = 0; i < split.length; i++) { + if ("1011".equals(split[i]) || "1".equals(split[i])) { + flag = true; + break; + } + } + } else { + if ("1011".equals(role) || "1".equals(role)) { + flag = true; + } + } + return flag; + } + + // 是否有【超管】身份 + public boolean isSuper() { + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + String role = user.getRole(); + boolean flag = false; + if (role.contains(",")) { + String[] split = role.split(","); + for (int i = 0; i < split.length; i++) { + if ("1".equals(split[i]) || "2".equals(split[i])) { + flag = true; + break; + } + } + } else { + if ("1".equals(role) || "2".equals(role)) { + flag = true; + } + } + return flag; + } + +} diff --git a/src/main/java/lingtao/net/util/StickersDoublePrice.java b/src/main/java/lingtao/net/util/StickersDoublePrice.java new file mode 100644 index 0000000..781531c --- /dev/null +++ b/src/main/java/lingtao/net/util/StickersDoublePrice.java @@ -0,0 +1,108 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.ArrayList; +import java.util.List; + +/** + * A级铜版纸不干胶价格 + */ +public class StickersDoublePrice { + + static int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000}; + + // 双面印刷不干胶报价 + public static List getPrice(double length, double width, int count, int number) { + List list = new ArrayList(); + Product pro = new Product(); + double area = length * width; + double[] priceArr = getBasePrice(area); + + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(priceArr[i]);//不够140元按照140元算 + list.add(pro); + } + + //多款计算 + if (number > 1) { + for (Product product : list) { + product.setPrice(product.getPrice() * number); + } + } + + return list; + } + + private static double[] getBasePrice(double area) { + double[] startPriceArr = null; + double[] endPriceArr = null; + double avgArea = 0; + if (area < 25) { + return new double[]{70, 92, 164, 236, 370, 740, 1480}; + } else if (area >= 25 && area < 48.6) { + if (area == 25) { + return new double[]{70, 92, 164, 236, 370, 740, 1480}; + } + avgArea = 25 + 48.6; + startPriceArr = new double[]{70, 92, 164, 236, 370, 740, 1480}; + endPriceArr = new double[]{130, 180, 320, 440, 700, 1400, 2700}; + } else if (area >= 48.6 && area < 81) { + if (area == 48.6) { + return new double[]{130, 180, 320, 440, 700, 1400, 2700}; + } + avgArea = 81 + 48.6; + startPriceArr = new double[]{130, 180, 320, 440, 700, 1400, 2700}; + endPriceArr = new double[]{220, 310, 572, 824, 1230, 2400, 4710}; + } else if (area >= 81 && area < 126) { + if (area == 81) { + return new double[]{220, 310, 572, 824, 1230, 2400, 4710}; + } + avgArea = 81 + 126; + startPriceArr = new double[]{220, 310, 572, 824, 1230, 2400, 4710}; + endPriceArr = new double[]{370, 436, 760, 1086, 1740, 3460, 6920}; + } else if (area >= 126 && area < 170) { + if (area == 126) { + return new double[]{370, 436, 760, 1086, 1740, 3460, 6920}; + } + avgArea = 126 + 170; + startPriceArr = new double[]{370, 436, 760, 1086, 1740, 3460, 6920}; + endPriceArr = new double[]{516, 594, 1050, 1500, 2400, 4800, 9600}; + } else if (area >= 170 && area < 210) { + if (area == 170) { + return new double[]{516, 594, 1050, 1500, 2400, 4800, 9600}; + } + avgArea = 170 + 210; + startPriceArr = new double[]{516, 594, 1050, 1500, 2400, 4800, 9600}; + endPriceArr = new double[]{630, 772, 1360, 1948, 3124, 6248, 12496}; + } else if (area >= 210 && area < 230) { + if (area == 210) { + return new double[]{630, 772, 1360, 1948, 3124, 6248, 12496}; + } + avgArea = 210 + 230; + startPriceArr = new double[]{630, 772, 1360, 1948, 3124, 6248, 12496}; + endPriceArr = new double[]{770, 860, 1512, 2170, 3470, 4940, 11880}; + } else if (area >= 230 && area < 294) { + if (area == 230) { + return new double[]{770, 860, 1512, 2170, 3470, 4940, 11880}; + } + avgArea = 230 + 294; + startPriceArr = new double[]{770, 860, 1512, 2170, 3470, 4940, 11880}; + endPriceArr = new double[]{840, 970, 1700, 2434, 3904, 7800, 15600}; + } else { + return new double[]{840, 970, 1700, 2434, 3904, 7800, 15600}; + } + double[] priceArr = new double[bigCountArr.length]; + for (int i = 0; i < bigCountArr.length; i++) { + priceArr[i] = Math.ceil((startPriceArr[i] + endPriceArr[i]) / avgArea * area); + } + + return priceArr; + } + +} diff --git a/src/main/java/lingtao/net/util/SwzStickersPrice.java b/src/main/java/lingtao/net/util/SwzStickersPrice.java new file mode 100644 index 0000000..4532dfb --- /dev/null +++ b/src/main/java/lingtao/net/util/SwzStickersPrice.java @@ -0,0 +1,72 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; + +import java.util.ArrayList; +import java.util.List; + +/* + * 常规-树纹纸报价*/ +public class SwzStickersPrice { + int bigCountArr[] = {500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000}; + + /* + * 根据供应商报价,按照利润算出报价*/ + public double setPrice(int count, double length, double width, int number, String kind) { + double price = 0; + if (kind.equals("浮雕烫金")) { + double max = Math.max(length, width); + double min = Math.min(length, width); + if (max <= 6) { + //长=length+0.3cm(间隔)+length+1cm(出血) + price = (max * 2 + 1.3) * (min + 1) * 1.8; + } else { + //长=length+1cm(间隔)+length+1cm(出血) + price = (max * 2 + 2) * (min + 1) * 1.8; + } + //20刀模费,5mm出血,9元/平方 + price += 20 + (length + 0.5) * (width + 0.5) * count / 10000 * 9; + price = Math.ceil(2 * price * 2);//50%利润 + price = price < 480 ? 480 : price; + } else if (kind.equals("彩色印刷")) { + double l = 425; + double w = 285; + // 换成毫米每边+2 + length = length * 10 + 4; + width = width * 10 + 4; + if ((length > l || width > w) && (length > w || width > l)) + return 0; + // 一张大纸能做多少个此类尺寸的不干胶 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + price = 50 + (num - 1) * 5.5; + } else {//激凸、烫金工艺一样价格 + //20刀模费,20版费,5mm出血,7.5元/平方 + price = (length + 0.5) * (width + 0.5) * count / 10000 * 7.5 + 40; + price = Math.ceil(2 * price); + price /= 0.4;//60%利润 + } + + + return price; + } + + public List getPrice(int count, double length, double width, int number, String craft) { + List list = new ArrayList(); + Product pro = new Product(); + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count || list.size() > 3) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(setPrice(bigCountArr[i], length, width, number, craft))); + list.add(pro); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/YaJinStickersPrice.java b/src/main/java/lingtao/net/util/YaJinStickersPrice.java new file mode 100644 index 0000000..b5a9711 --- /dev/null +++ b/src/main/java/lingtao/net/util/YaJinStickersPrice.java @@ -0,0 +1,116 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 哑金/哑银不干胶价格 + */ +public class YaJinStickersPrice { + + int countArr[] = { 500, 1000, 2000, 3000, 4000, 5000, 10000 }; + + // 根据尺寸计算价格 + public List accountPriceBySize(Double width, Double length, int count, int[] priceArr1, int[] priceArr2, + int[] priceArr3) { + List list = new ArrayList(); + if ((length <= 6 && width <= 5) || (length <= 5 && width <= 6) || (length <= 10 && width <= 3) + || (length <= 3 && width <= 10)) { + list = getPrice(count, priceArr1); + } else if ((length <= 8 && width <= 8) || (length <= 10 && width <= 6) || (length <= 6 && width <= 10)) { + list = getPrice(count, priceArr2); + } else if ((length <= 11 && width <= 11) || (length <= 12 && width <= 8) || (length <= 8 && width <= 12) + || (length <= 20) && (width <= 4) || (width <= 20) && (length <= 4)) { + list = getPrice(count, priceArr3); + } else { + return null; + } + return list; + } + + // 6*5cm以下及10*3cm以下 + // 6*5cm-8*8cm;10-3cm-10*6cm以内 + // 8*8cm-11*11cm;10*6-12*8CM;20*4以内 + private List getPrice(int count, int[] priceArr) { + Product pro = new Product(); + List list = new ArrayList(); + // 数量大于10000 + if (count > countArr[countArr.length - 1]) { + pro.setCount(count); + // 10000个的单价*数量 + pro.setPrice(Math.ceil(count * priceArr[countArr.length - 1] / countArr[countArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < countArr.length; i++) { + if (countArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(countArr[i]); + pro.setPrice(Math.ceil(priceArr[i])); + list.add(pro); + } + return list; + } + + // 哑金不干胶不带凹凸 + public List getPriceNoAoTu(Double length, Double width, int count) { + double l = 404; + double w = 289; + double price = 0.0; + List list = new ArrayList(); + Product pro = new Product(); + // 换成毫米每边+2 + length = length * 10 + 4; + width = width * 10 + 4; + if ((length > l || width > w) && (length > w || width > l)) + return null; + // 一张A4纸 大的400*285 能做多少个此类尺寸的不干胶 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + int num = (int) Math.ceil(count / max); + if (max <= 20) { + price = 65; + } else if (max <= 50) { + price = 75; + } else if (max <= 100) { + price = 85; + } else if (max <= 200) { + price = 100; + } else if (max <= 300) { + price = 110; + } else { + price = 150; + } + if (max <= 200) { + /*price = price + (num - 1) * 12; +// if (num > 10) { +// price = price + (num - 1) * 10; +// } else { +// price = price + (num - 1) * 20; +// }*/ + if(num < 50) { + price = price + (num - 1 ) * 12; + }else if(num <= 100) { + price = price + (num - 1 ) * 10; + }else { + price = price + (num - 1 ) * 6; + } + } else { + if (num > 10) { + price = price + (num - 1) * 10; + } else { + price = price + (num - 1) * 30; + } + } + + pro.setCount(count); + pro.setPrice(price); + list.add(pro); + return list; + } + +} diff --git a/src/main/java/lingtao/net/util/YaYinStickersPrice.java b/src/main/java/lingtao/net/util/YaYinStickersPrice.java new file mode 100644 index 0000000..fcdbb3d --- /dev/null +++ b/src/main/java/lingtao/net/util/YaYinStickersPrice.java @@ -0,0 +1,173 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 哑银不干胶价格 + */ +public class YaYinStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + public List bigSizeAcountPrice(int count, Double area, Double[] priceArr) { + Product pro = new Product(); + List list = new ArrayList(); + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + return list; + } + + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area <= 0.0004) { + Double priceArrA[] = { 800.0, 525.0, 363.0, 300.0, 275.0, 255.0, 180.0, 100.0, 75.0, 70.0, 65.0, 60.0, 60.0, + 55.0, 50.0, 50.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0006) { + Double priceArrA[] = { 535.0, 350.0, 242.0, 200.0, 184.0, 170.0, 100.0, 80.0, 70.0, 65.0, 60.0, 57.0, 55.0, + 52.0, 50.0, 49.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0008) { + Double priceArrA[] = { 460.0, 300.0, 207.0, 172.0, 157.0, 146.0, 90.0, 70.0, 60.0, 54.0, 53.0, 52.0, 51.0, + 50.0, 49.0, 48.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.001) { + Double priceArrA[] = { 355.0, 233.0, 161.0, 134.0, 122.0, 113.0, 80.0, 40.0, 30.0, 29.0, 27.0, 26.0, 25.0, + 24.0, 22.0, 22.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0012) { + Double priceArrA[] = { 267.0, 175.0, 121.0, 100.0, 92.0, 85.0, 70.0, 40.0, 30.0, 25.0, 24.0, 23.0, 22.0, + 21.0, 20.0, 19.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0014) { + Double priceArrA[] = { 246.0, 162.0, 116.0, 92.0, 85.0, 78.0, 60.0, 40.0, 30.0, 25.0, 24.0, 23.0, 22.0, + 21.0, 20.0, 19.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0016) { + Double priceArrA[] = { 220.0, 140.0, 97.0, 80.0, 74.0, 68.0, 50.0, 38.0, 30.0, 25.0, 24.0, 22.0, 21.0, 20.0, + 19.0, 18.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0025) { + Double priceArrA[] = { 190.0, 124.0, 86.0, 71.0, 65.0, 60.0, 50.0, 38.0, 30.0, 26.0, 23.0, 21.0, 20.0, 19.0, + 18.0, 17.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0035) { + Double priceArrA[] = { 150.0, 100.0, 70.0, 55.5, 45.0, 42.0, 40.0, 33.0, 28.0, 23.0, 19.0, 18.0, 17.0, 16.0, + 14.0, 14.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0045) { + Double priceArrA[] = { 90.0, 59.0, 40.0, 34.0, 31.0, 28.0, 22.0, 19.0, 16.0, 15.0, 14.0, 14.0, 14.0, 14.0, + 14.0, 14.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.0084) { + Double priceArrA[] = { 66.0, 43.0, 30.0, 26.0, 23.0, 17.0, 15.0, 14.5, 14.0, 14.0, 14.0, 14.0, 14.0, 14.0, + 14.0, 14.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.012) { + Double priceArrA[] = { 50.0, 40.0, 30.0, 26.0, 20.0, 16.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, + 13.0, 13.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.015) { + Double priceArrA[] = { 48.0, 38.0, 29.0, 25.0, 18.0, 15.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, + 12.0, 12.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.02) { + Double priceArrA[] = { 40.0, 30.0, 25.0, 22.0, 18.0, 13.0, 12.0, 12.0, 12.0, 12.0, 12.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.04) { + Double priceArrA[] = { 38.0, 26.0, 23.0, 20.0, 15.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, priceArrA); + } else if (area <= 0.06) { + Double priceArr[] = { 35.0, 24.0, 21.0, 19.0, 14.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, priceArr); + } else if (area <= 0.1) { + Double priceArr[] = { 34.0, 22.0, 19.0, 18.0, 14.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, priceArr); + } else if (area <= 0.2) { + Double priceArr[] = { 34.0, 21.0, 18.0, 17.0, 14.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, priceArr); + } else if (area > 0.2) { + Double priceArr[] = { 34.0, 20.0, 17.0, 16.0, 14.0, 12.0, 12.0, 12.0, 12.0, 11.5, 11.5, 11.0, 11.0, 11.0, + 11.0, 11.0 }; + list = bigSizeAcountPrice(count, area, priceArr); + } + return list; + } + + + /* + * public List getPrice(int count, Double area, int areaArrIndex) { + * List list = new ArrayList(); if (areaArrIndex == 1) { + * Double priceArrA[] = { 800.0, 460.0, 363.0, 300.0, 275.0, 255.0, 145.0, + * 110.0, 85.0, 70.0, 65.0, 60.0, 55.0, 53.0, 51.0, 50.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 2) { + * Double priceArrA[] = { 555.0, 350.0, 272.0, 220.0, 200.0, 185.0, 110.0, 80.0, + * 62.0, 55.0, 55.0, 55.0, 55.0, 52.0, 50.0, 49.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 3) { + * Double priceArrA[] = { 460.0, 300.0, 207.0, 172.0, 157.0, 146.0, 90.0, 63.0, + * 50.0, 45.0, 45.0, 45.0, 43.0, 43.0, 41.0, 40.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 4) { + * Double priceArrA[] = { 375.0, 250.0, 170.0, 140.0, 130.0, 120.0, 80.0, 55.0, + * 45.0, 40.0, 40.0, 40.0, 39.0, 38.0, 36.0, 35.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 5) { + * Double priceArrA[] = { 320.0, 230.0, 150.0, 130.0, 115.0, 110.0, 73.0, 50.0, + * 40.0, 35.0, 35.0, 35.0, 34.0, 33.0, 32.0, 31.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 6) { + * Double priceArrA[] = { 276.0, 200.0, 136.0, 120.0, 100.0, 100.0, 65.0, 48.0, + * 38.0, 33.0, 32.0, 32.0, 31.0, 30.0, 29.0, 28.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 7) { + * Double priceArrA[] = { 250.0, 180.0, 125.0, 110.0, 90.0, 90.0, 60.0, 45.0, + * 36.0, 32.0, 29.0, 29.0, 28.0, 27.0, 26.0, 26.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 8) { + * Double priceArrA[] = { 225.0, 163.0, 113.0, 100.0, 81.0, 80.0, 55.0, 40.0, + * 33.0, 30.0, 26.0, 26.0, 26.0, 25.0, 25.0, 24.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 9) { + * Double priceArrA[] = { 210.0, 150.0, 105.0, 92.5, 75.0, 73.7, 50.7, 38.0, + * 30.5, 28.0, 24.5, 24.2, 24.2, 23.3, 23.2, 22.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 10) { + * Double priceArrA[] = { 200.0, 145.0, 100.0, 88.0, 70.0, 70.0, 48.5, 36.0, + * 28.0, 26.0, 22.0, 22.0, 22.0, 21.0, 20.0, 20.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 11) { + * Double priceArrA[] = { 190.0, 133.0, 90.0, 76.0, 65.0, 65.0, 45.0, 34.5, + * 24.0, 23.0, 22.0, 21.0, 20.0, 20.0, 19.0, 18.5 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 12) { + * Double priceArrA[] = { 170.0, 40.0, 30.0, 26.0, 20.0, 16.0, 13.0, 13.0, 13.0, + * 13.0, 13.0, 13.0, 13.0, 13.0, 13.0, 13.0 }; list = bigSizeAcountPrice(count, + * area, priceArrA); } else if (areaArrIndex == 13) { Double priceArrA[] = { + * 160.0, 38.0, 29.0, 25.0, 18.0, 15.0, 12.0, 12.0, 12.0, 12.0, 12.0, 12.0, + * 12.0, 12.0, 12.0, 12.0 }; list = bigSizeAcountPrice(count, area, priceArrA); + * } else if (areaArrIndex == 14) { Double priceArrA[] = { 150.0, 30.0, 25.0, + * 22.0, 18.0, 13.0, 12.0, 12.0, 12.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0 + * }; list = bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex + * == 15) { Double priceArrA[] = { 138.0, 26.0, 23.0, 20.0, 15.0, 13.0, 13.0, + * 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0 }; list = + * bigSizeAcountPrice(count, area, priceArrA); } else if (areaArrIndex == 16) { + * Double priceArr[] = { 135.0, 24.0, 21.0, 19.0, 14.0, 13.0, 13.0, 13.0, 13.0, + * 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0 }; list = bigSizeAcountPrice(count, + * area, priceArr); } else if (areaArrIndex == 17) { Double priceArr[] = { + * 124.0, 22.0, 19.0, 18.0, 14.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, + * 11.0, 11.0, 11.0, 11.0 }; list = bigSizeAcountPrice(count, area, priceArr); } + * else if (areaArrIndex == 18) { Double priceArr[] = { 120.0, 21.0, 18.0, 17.0, + * 14.0, 13.0, 13.0, 13.0, 13.0, 12.0, 12.0, 11.0, 11.0, 11.0, 11.0, 11.0 }; + * list = bigSizeAcountPrice(count, area, priceArr); } else { Double priceArr[] + * = { 110.0, 20.0, 17.0, 16.0, 14.0, 12.0, 12.0, 12.0, 12.0, 11.5, 11.5, 11.0, + * 11.0, 11.0, 11.0, 11.0 }; list = bigSizeAcountPrice(count, area, priceArr); } + * return list; } + */ +} diff --git a/src/main/java/lingtao/net/util/YiSBStickersPrice.java b/src/main/java/lingtao/net/util/YiSBStickersPrice.java new file mode 100644 index 0000000..08be26b --- /dev/null +++ b/src/main/java/lingtao/net/util/YiSBStickersPrice.java @@ -0,0 +1,136 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 易碎标价格 + */ +public class YiSBStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + /** + * 易碎标遍历添加价格 + */ + private List bigSizeAcountPrice(int count, Double area, List list, Double[] priceArr) { + Product pro = new Product(); + if (area > 0.0001) { + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + } else { + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(priceArr[bigCountArr.length - 1]); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(priceArr[i]); + list.add(pro); + } + } + return list; + } + + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area > 0 && area <= 0.0001) { + Double priceArrA[] = { 150.0, 160.0, 170.0, 180.0, 200.0, 260.0, 320.0, 360.0, 400.0, 480.0, 550.0, 620.0, + 680.0, 740.0, 820.0, 880.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0001 && area <= 0.0004) { + Double priceArrA[] = { 650.0, 400.0, 260.0, 200.0, 150.0, 110.0, 80.0, 70.0, 65.0, 62.0, 60.0, 58.0, 56.0, + 54.0, 52.0, 50.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0004 && area <= 0.0006) { + Double priceArrA[] = { 440.0, 280.0, 175.0, 135.0, 103.0, 75.0, 56.0, 49.5, 46.0, 44.0, 42.5, 41.5, 40.5, + 39.5, 38.5, 38.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0006 && area <= 0.0008) { + Double priceArrA[] = { 372.0, 230.0, 159.0, 130.0, 105.0, 87.0, 65.0, 57.5, 53.5, 51.0, 49.0, 47.0, 46.0, + 45.0, 44.0, 43.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0008 && area <= 0.001) { + Double priceArrA[] = { 320.0, 200.0, 135.0, 111.0, 92.6, 77.0, 61.5, 56.0, 53.0, 51.0, 49.5, 49.0, 48.0, + 47.0, 46.0, 46.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.001 && area <= 0.0012) { + Double priceArrA[] = { 277.0, 171.0, 115.0, 95.0, 80.0, 65.8, 52.5, 48.0, 45.8, 44.3, 43.4, 42.7, 42.2, 41.8, + 41.5, 41.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0012 && area <= 0.0014) { + Double priceArrA[] = { 243.0, 150.0, 101.0, 83.3, 75.0, 61.8, 48.8, 44.4, 42.1, 40.6, 39.7, 39.0, 38.5, 38.0, + 37.6, 37.5 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0014 && area <= 0.0016) { + Double priceArrA[] = { 220.0, 135.0, 91.0, 75.0, 64.0, 56.2, 45.3, 41.6, 39.8, 38.8, 37.9, 37.4, 37.0, 36.6, + 36.4, 36.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0016 && area <= 0.0025) { + Double priceArrA[] = { 210.0, 130.0, 86.0, 70.0, 58.6, 51.5, 41.8, 38.1, 36.3, 35.2, 34.5, 33.9, 33.5, 33.1, + 33.0, 33.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0025 && area <= 0.0035) { + Double priceArrA[] = { 200.0, 123.0, 81.0, 65.3, 55.0, 50.0, 39.2, 35.5, 33.7, 32.5, 31.8, 31.2, 30.8, 30.5, + 30.4, 30.3 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0035 && area <= 0.0045) { + Double priceArrA[] = { 195.0, 121.0, 79.0, 63.9, 53.4, 48.7, 37.5, 33.75, 31.9, 30.75, 30.0, 29.4, 29.0, 28.7, + 28.5, 28.5 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0045 && area <= 0.0084) { + Double priceArrA[] = { 195.0, 119.6, 79.0, 63.0, 53.0, 48.5, 37.0, 33.0, 31.4, 30.0, 30.0, 29.0, 28.6, 28.2, + 28.3, 28.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0084 && area <= 0.012) { + Double priceArrA[] = { 90.0, 60.0, 50.0, 45.0, 38.0, 38.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, 35.0, + 35.0, 35.0, }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.012 && area <= 0.015) { + Double priceArrA[] = { 80.0, 55.0, 45.0, 40.0, 35.0, 35.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, 34.0, + 34.0, 34.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.015 && area <= 0.02) { + Double priceArrA[] = { 65.0, 50.0, 40.0, 36.0, 33.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, + 30.0, 30.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.02 && area <= 0.04) { + Double priceArr[] = { 55.0, 45.0, 35.0, 35.0, 32.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, + 30.0, 30.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.04 && area <= 0.06) { + Double priceArr[] = { 50.0, 40.0, 35.0, 35.0, 30.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, + 26.0, 26.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.06 && area <= 0.1) { + Double priceArr[] = { 45.0, 37.0, 35.0, 35.0, 30.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, + 26.0, 26.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.1 && area <= 0.2) { + Double priceArr[] = { 40.0, 35.0, 30.0, 30.0, 27.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, 26.0, + 26.0, 26.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/YinPGStickersPrice.java b/src/main/java/lingtao/net/util/YinPGStickersPrice.java new file mode 100644 index 0000000..79cef05 --- /dev/null +++ b/src/main/java/lingtao/net/util/YinPGStickersPrice.java @@ -0,0 +1,136 @@ +package lingtao.net.util; + +import java.util.ArrayList; +import java.util.List; + +import lingtao.net.bean.Product; + +/** + * 易碎标价格 + */ +public class YinPGStickersPrice { + + int bigCountArr[] = { 500, 1000, 2000, 3000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, + 100000 }; + + /** + * 易碎标遍历添加价格 + */ + private List bigSizeAcountPrice(int count, Double area, List list, Double[] priceArr) { + Product pro = new Product(); + if (area > 0.0001) { + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(Math.ceil(area * count * priceArr[bigCountArr.length - 1])); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(Math.ceil(area * bigCountArr[i] * priceArr[i])); + list.add(pro); + } + } else { + if (count > bigCountArr[bigCountArr.length - 1]) { + pro.setCount(count); + pro.setPrice(priceArr[bigCountArr.length - 1]); + list.add(pro); + } + for (int i = 0; i < bigCountArr.length; i++) { + if (bigCountArr[i] < count) { + continue; + } + pro = new Product(); + pro.setCount(bigCountArr[i]); + pro.setPrice(priceArr[i]); + list.add(pro); + } + } + return list; + } + + public List getPrice(int count, Double area) { + List list = new ArrayList(); + if (area > 0 && area <= 0.0001) { + Double priceArrA[] = { 150.0, 160.0, 170.0, 180.0, 200.0, 260.0, 320.0, 360.0, 400.0, 480.0, 550.0, 620.0, + 680.0, 740.0, 820.0, 880.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0001 && area <= 0.0004) { + Double priceArrA[] = { 550.0, 285.0, 158.0, 110.0, 73.0, 46.0, 32.0, 28.0, 25.0, 24.0, 23.0, 22.0, 21.0, + 21.0, 20.0, 20.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0004 && area <= 0.0006) { + Double priceArrA[] = { 393.0, 205.0, 111.0, 80.0, 55.0, 37.0, 28.0, 25.0, 23.0, 22.0, 22.5, 21.5, 20.5, + 20.5, 20.0, 19.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0006 && area <= 0.0008) { + Double priceArrA[] = { 303.0, 160.0, 90.0, 66.0, 46.0, 33.0, 26.0, 24.5, 22.5, 21.0, 21.0, 20.5, 20.5, 20.0, + 20.0, 19.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0008 && area <= 0.001) { + Double priceArrA[] = { 248.0, 133.0, 77.0, 56.0, 41.6, 30.0, 24.5, 22.5, 21.5, 21.0, 20.5, 20.0, 19.5, 19.5, + 19.0, 19.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.001 && area <= 0.0012) { + Double priceArrA[] = { 212.0, 115.0, 68.0, 51.0, 37.0, 28.0, 23.5, 22.0, 21.8, 21.0, 20.4, 20.0, 19.5, 19.3, + 19.0, 19.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0012 && area <= 0.0014) { + Double priceArrA[] = { 186.0, 102.0, 61.0, 46.3, 34.0, 27.0, 23.3, 22.0, 21.1, 21.0, 20.0, 19.8, 19.5, 19.0, + 18.6, 18.5 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0014 && area <= 0.0016) { + Double priceArrA[] = { 167.0, 92.0, 56.0, 43.0, 33.0, 26.2, 22.3, 21.6, 21.0, 20.8, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0016 && area <= 0.0025) { + Double priceArrA[] = { 118.0, 68.0, 44.0, 35.0, 28.6, 23.5, 21.8, 21.1, 21.0, 20.8, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0025 && area <= 0.0035) { + Double priceArrA[] = { 93.0, 56.0, 38.0, 31.3, 25.0, 22.0, 21.2, 21.1, 21.0, 20.8, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0035 && area <= 0.0045) { + Double priceArrA[] = { 78.0, 48.0, 34.0, 28.5, 34.4, 21.7, 21.2, 21.1, 21.0, 20.8, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0045 && area <= 0.0084) { + Double priceArrA[] = { 56.0, 37.6, 29.0, 25.0, 22.0, 21.5, 21.0, 20.5, 20.4, 20.0, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.0084 && area <= 0.012) { + Double priceArrA[] = { 48.0, 34.0, 27.0, 23.0, 22.0, 21.3, 21.0, 20.5, 20.4, 20.0, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.012 && area <= 0.015) { + Double priceArrA[] = { 45.0, 35.0, 26.0, 23.0, 22.0, 21.0, 21.0, 20.5, 20.4, 20.0, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.015 && area <= 0.02) { + Double priceArrA[] = { 41.0, 30.0, 25.0, 23.0, 22.0, 21.0, 21.0, 20.5, 20.4, 20.0, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArrA); + } else if (area > 0.02 && area <= 0.04) { + Double priceArr[] = { 36.0, 27.0, 25.0, 22.0, 21.0, 21.0, 21.0, 20.5, 20.4, 20.0, 19.9, 19.4, 19.0, 18.6, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.04 && area <= 0.06) { + Double priceArr[] = { 34.0, 27.0, 24.0, 22.0, 20.0, 20.0, 19.5, 19.5, 19.4, 19.0, 19.0, 18.6, 18.6, 18.4, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.06 && area <= 0.1) { + Double priceArr[] = { 32.0, 26.0, 24.0, 22.0, 20.0, 20.0, 19.5, 19.5, 19.4, 19.0, 19.0, 18.6, 18.6, 18.4, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } else if (area > 0.1 && area <= 0.2) { + Double priceArr[] = { 30.0, 25.0, 23.0, 21.0, 20.0, 20.0, 19.5, 19.5, 19.4, 19.0, 19.0, 18.6, 18.6, 18.4, + 18.4, 18.0 }; + list = bigSizeAcountPrice(count, area, list, priceArr); + } + return list; + } +} diff --git a/src/main/java/lingtao/net/util/ZsPrice.java b/src/main/java/lingtao/net/util/ZsPrice.java new file mode 100644 index 0000000..fbf7323 --- /dev/null +++ b/src/main/java/lingtao/net/util/ZsPrice.java @@ -0,0 +1,95 @@ +package lingtao.net.util; + +import lingtao.net.bean.Product; +import org.springframework.util.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +public class ZsPrice { + public List getPrice(int count, double length, double width, List list, int number, String shenzi) { + double price = 50; + double l = 438.0; + double w = 304.0; + length += 3; + width += 3; + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + price += (num - 1) * 15; + if ("绳子".equals(shenzi)) { + price += 1 * count * number; + } + + if (number > 1) {//多款算设计费 + price += 10 * number; + } + + Product pro = new Product(); + pro.setPrice(Math.ceil(price)); + pro.setCount(count); + list.add(pro); + + return list; + } + + public static List getSmPrice(int count, Double length, Double width, List list, Integer number, String[] craft, Product dto) { + double price = 60; + double l = 438.0; + double w = 304.0; + if ((length < 8.55 && width < 5.4) || (width < 8.55 && length < 5.4)) { + length = 8.55; + width = 5.4; + } + length = length * 10 + 3; + width = width * 10 + 3; + // 一张l/w 大的纸张能做多少个此类尺寸的产品 + double max = Math.max(Math.floor(l / length) * Math.floor(w / width), + Math.floor(l / width) * Math.floor(w / length)); + // 报的数量需要多少张大纸 + // 需要多少张大纸 = 数量 * 款数 /每张做多少个 ===总数量/每张多少个 + int num = (int) Math.ceil(count * number / max); + if ("10".equals(dto.getKindValue())) { + price += (num - 1) * 25; + } else { + price += (num - 1) * 15; + } + + if (!StringUtils.isEmpty(craft) && craft[0].equals("背胶")) { + price += num * 10; + } + + if (number > 1) { + price += 10 * number; + } + + Product pro = new Product(); + pro.setPrice(Math.ceil(price)); + pro.setCount(count); + list.add(pro); + + return list; + } + + public static void main(String[] args) { + + } + + public int[] twoSum(int[] nums, int target) { + + List list = new ArrayList<>(); + + for (int i = 0; i < nums.length; i++) { + if (list.get(target - nums[i]) != null) { + return new int[]{list.get(target - nums[i]), i}; + } + + list.add(target - nums[i], nums[i]); + } + return null; + } + +} diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml new file mode 100644 index 0000000..08f4b4c --- /dev/null +++ b/src/main/resources/applicationContext.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /login = anon + /logout = logout + /SysUser/**=anon + /static/** = anon + /img/** = anon + /abc/** = anon + /views/** = authc + /js/** = authc + /**= authc + + + + diff --git a/src/main/resources/dbconfig.properties b/src/main/resources/dbconfig.properties new file mode 100644 index 0000000..76a50ee --- /dev/null +++ b/src/main/resources/dbconfig.properties @@ -0,0 +1,9 @@ +#jdbc.jdbcUrl=jdbc:mysql://47.122.33.193:3306/quote_price +#jdbc.driverClass=com.mysql.jdbc.Driver +#jdbc.user=admin_666888 +#jdbc.password=Admin_666888 + +jdbc.jdbcUrl=jdbc:mysql://127.0.0.1:3306/quote_price +jdbc.driverClass=com.mysql.jdbc.Driver +jdbc.user=root +jdbc.password=RdCcZOL1QxdYqEot \ No newline at end of file diff --git a/src/main/resources/lib/jep-java-3.5-trial.jar b/src/main/resources/lib/jep-java-3.5-trial.jar new file mode 100644 index 0000000..295ed77 Binary files /dev/null and b/src/main/resources/lib/jep-java-3.5-trial.jar differ diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties new file mode 100644 index 0000000..b44e690 --- /dev/null +++ b/src/main/resources/log4j.properties @@ -0,0 +1,23 @@ +#\u5B9A\u4E49LOG\u8F93\u51FA\u7EA7\u522B +log4j.rootLogger=INFO,Console +#\u5B9A\u4E49\u65E5\u5FD7\u8F93\u51FA\u76EE\u7684\u5730\u4E3A\u63A7\u5236\u53F0 +log4j.appender.Console=org.apache.log4j.ConsoleAppender +#\u53EF\u4EE5\u7075\u6D3B\u7684\u6307\u5B9A\u65E5\u5FD7\u8F93\u51FA\u683C\u5F0F\uFF0C\u4E0B\u9762\u4E00\u884C\u662F\u6307\u5B9A\u5177\u4F53\u7684\u683C\u5F0F +log4j.appender.Console.layout=org.apache.log4j.PatternLayout +log4j.appender.Console.layout.ConversionPattern=%d [%t] [%p] [%c] - %m%n + +#mybatis\u663E\u793ASQL\u8BED\u53E5\u65E5\u5FD7\u914D\u7F6E +log4j.logger.lingtao.net.dao=DEBUG +#log4j.logger.java.sql.ResultSet=INFO +#log4j.logger.org.apche=INFO +#log4j.logger.java.sql.Statement=DEBUG +#log4j.logger.java.sql.PreparedStatement=DEBUG +log4j.logger.com.springframework=ERROR +log4j.logger.com.ibatis=DEBUG +log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG +log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG +log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG +log4j.logger.java.sql.Connection=DEBUG +log4j.logger.java.sql.Statement=DEBUG +log4j.logger.java.sql.PreparedStatement=DEBUG +log4j.logger.java.sql.ResultSet=DEBUG \ No newline at end of file diff --git a/src/main/resources/mapper/ArticleMapper.xml b/src/main/resources/mapper/ArticleMapper.xml new file mode 100644 index 0000000..cf6ca7a --- /dev/null +++ b/src/main/resources/mapper/ArticleMapper.xml @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, title, type, status, imagesUrl, hit, remark, createBy, createDate, updateBy, + updateDate + + + content + + + + + + delete from tbl_article + where id = #{id,jdbcType=INTEGER} + + + delete from tbl_article + + + + + + insert into tbl_article (id, title, type, + status, imagesUrl, hit, + remark, createBy, createDate, + updateBy, updateDate, content + ) + values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, + #{status,jdbcType=VARCHAR}, #{imagesUrl,jdbcType=VARCHAR}, #{hit,jdbcType=INTEGER}, + #{remark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR} + ) + + + insert into tbl_article + + + id, + + + title, + + + type, + + + status, + + + imagesUrl, + + + hit, + + + remark, + + + createBy, + + + createDate, + + + updateBy, + + + updateDate, + + + content, + + + + + #{id,jdbcType=INTEGER}, + + + #{title,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{imagesUrl,jdbcType=VARCHAR}, + + + #{hit,jdbcType=INTEGER}, + + + #{remark,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createDate,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateDate,jdbcType=TIMESTAMP}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update tbl_article + + + id = #{record.id,jdbcType=INTEGER}, + + + title = #{record.title,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + imagesUrl = #{record.imagesUrl,jdbcType=VARCHAR}, + + + hit = #{record.hit,jdbcType=INTEGER}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + createBy = #{record.createBy,jdbcType=VARCHAR}, + + + createDate = #{record.createDate,jdbcType=TIMESTAMP}, + + + updateBy = #{record.updateBy,jdbcType=VARCHAR}, + + + updateDate = #{record.updateDate,jdbcType=TIMESTAMP}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update tbl_article + set id = #{record.id,jdbcType=INTEGER}, + title = #{record.title,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + imagesUrl = #{record.imagesUrl,jdbcType=VARCHAR}, + hit = #{record.hit,jdbcType=INTEGER}, + remark = #{record.remark,jdbcType=VARCHAR}, + createBy = #{record.createBy,jdbcType=VARCHAR}, + createDate = #{record.createDate,jdbcType=TIMESTAMP}, + updateBy = #{record.updateBy,jdbcType=VARCHAR}, + updateDate = #{record.updateDate,jdbcType=TIMESTAMP}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update tbl_article + set id = #{record.id,jdbcType=INTEGER}, + title = #{record.title,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + imagesUrl = #{record.imagesUrl,jdbcType=VARCHAR}, + hit = #{record.hit,jdbcType=INTEGER}, + remark = #{record.remark,jdbcType=VARCHAR}, + createBy = #{record.createBy,jdbcType=VARCHAR}, + createDate = #{record.createDate,jdbcType=TIMESTAMP}, + updateBy = #{record.updateBy,jdbcType=VARCHAR}, + updateDate = #{record.updateDate,jdbcType=TIMESTAMP} + + + + + + update tbl_article + + + title = #{title,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + imagesUrl = #{imagesUrl,jdbcType=VARCHAR}, + + + hit = #{hit,jdbcType=INTEGER}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + createBy = #{createBy,jdbcType=VARCHAR}, + + + createDate = #{createDate,jdbcType=TIMESTAMP}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + + updateDate = #{updateDate,jdbcType=TIMESTAMP}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + update tbl_article + set title = #{title,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + imagesUrl = #{imagesUrl,jdbcType=VARCHAR}, + hit = #{hit,jdbcType=INTEGER}, + remark = #{remark,jdbcType=VARCHAR}, + createBy = #{createBy,jdbcType=VARCHAR}, + createDate = #{createDate,jdbcType=TIMESTAMP}, + updateBy = #{updateBy,jdbcType=VARCHAR}, + updateDate = #{updateDate,jdbcType=TIMESTAMP}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=INTEGER} + + + update tbl_article + set title = #{title,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + imagesUrl = #{imagesUrl,jdbcType=VARCHAR}, + hit = #{hit,jdbcType=INTEGER}, + remark = #{remark,jdbcType=VARCHAR}, + createBy = #{createBy,jdbcType=VARCHAR}, + createDate = #{createDate,jdbcType=TIMESTAMP}, + updateBy = #{updateBy,jdbcType=VARCHAR}, + updateDate = #{updateDate,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/BugMapper.xml b/src/main/resources/mapper/BugMapper.xml new file mode 100644 index 0000000..1e78fb6 --- /dev/null +++ b/src/main/resources/mapper/BugMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + INSERT INTO bug + ( + id, + product, + bugRemark, + createBy, + createDate + ) + VALUES + ( + NULL, + #{product}, + #{bugRemark}, + #{createBy}, + now() + ) + + \ No newline at end of file diff --git a/src/main/resources/mapper/ClothingTagMapper.xml b/src/main/resources/mapper/ClothingTagMapper.xml new file mode 100644 index 0000000..f5a44fb --- /dev/null +++ b/src/main/resources/mapper/ClothingTagMapper.xml @@ -0,0 +1,26 @@ + + + + + + INSERT INTO product_clothing_tag + (material, + technique, + product_membrane, + product_slice, + is_rope, + compute, + formula, + rope_formula, + is_multi) + VALUES (#{material}, + #{technique}, + #{productMembrane}, + #{productSlice}, + #{isRope}, + #{compute,typeHandler=lingtao.net.handler.MapToVarcharTypeHandler}, + #{formula}, + #{ropeFormula}, + #{isMulti}) + + \ No newline at end of file diff --git a/src/main/resources/mapper/CustomerAwardMapper.xml b/src/main/resources/mapper/CustomerAwardMapper.xml new file mode 100644 index 0000000..3c6141f --- /dev/null +++ b/src/main/resources/mapper/CustomerAwardMapper.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + delete from tbl_customer_award where id in + + #{id} + + + + + + insert into tbl_customer_award ( + id, nickname, payPercent, askNumber, customerPrice,award,shopname,awardDate,creator,createDate) + values + + ( + null,#{item.nickname},#{item.payPercent},#{item.askNumber},#{item.customerPrice},#{item.award},#{item.shopname},#{item.awardDate},#{item.creator},now()) + + + \ No newline at end of file diff --git a/src/main/resources/mapper/CustomerDataMapper.xml b/src/main/resources/mapper/CustomerDataMapper.xml new file mode 100644 index 0000000..c2e52ce --- /dev/null +++ b/src/main/resources/mapper/CustomerDataMapper.xml @@ -0,0 +1,155 @@ + + + + + + + + insert into tbl_customer_data + + + username, + + + realname, + + + role, + + + price, + + + productExplain, + + + wangwang, + + + isBuy, + + + commentSelf, + + + createBy, + + createDate, + + + + #{username,jdbcType=VARCHAR}, + + + #{realname,jdbcType=VARCHAR}, + + + #{role,jdbcType=VARCHAR}, + + + #{price,jdbcType=DOUBLE}, + + + #{productExplain,jdbcType=VARCHAR}, + + + #{wangwang,jdbcType=VARCHAR}, + + + #{isBuy,jdbcType=VARCHAR}, + + + #{commentSelf,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + now(), + + + + + update tbl_customer_data + + + role = #{role,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=DOUBLE}, + + + productExplain = #{productExplain,jdbcType=VARCHAR}, + + + wangwang = #{wangwang,jdbcType=VARCHAR}, + + + commentSelf = #{commentSelf,jdbcType=VARCHAR}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + updateDate = now(), + + where id = #{id,jdbcType=INTEGER} + + + + + UPDATE + tbl_customer_data + SET + commentManager = #{commentManager}, commentDate = now() + WHERE + id = #{id} + + + + delete from tbl_customer_data + where id = #{id,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/CustomerTrainMapper.xml b/src/main/resources/mapper/CustomerTrainMapper.xml new file mode 100644 index 0000000..9af1908 --- /dev/null +++ b/src/main/resources/mapper/CustomerTrainMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + insert into t_customer_train_content + (pro_type,kind,sort,content,type,create_by,create_date) + values + (#{proType},#{kind},#{sort},#{content},#{type},#{createBy},now()) + + + + update t_customer_train_content + + + pro_type = #{proType}, + + + kind = #{kind}, + + + content = #{content,jdbcType=VARCHAR}, + + type = #{type}, + update_by = #{updateBy}, + update_date = now(), + + where id = #{id,jdbcType=INTEGER} + + + + delete from t_customer_train_content + where id = #{id,jdbcType=INTEGER} + + + + + + + insert into t_customer_train_pro_type + (pro_type,remark,sort,type,create_by,create_date) + values + (#{proType},#{remark},#{sort},#{type},#{createBy},now()) + + + + update t_customer_train_pro_type + set + pro_type = #{proType}, + remark = #{remark}, + sort = #{sort}, + type = #{type}, + update_by = #{updateBy}, + update_date = now() + where id = #{id,jdbcType=INTEGER} + + + + delete from t_customer_train_pro_type + where id = #{id,jdbcType=INTEGER} + + + + + + + insert into t_customer_train_kind_label + (pro_type,kind_label,remark,sort,type,create_by,create_date) + values + (#{proType},#{kindLabel},#{remark},#{sort},#{type},#{createBy},now()) + + + + update t_customer_train_kind_label + set + kind_label = #{kindLabel}, + remark = #{remark}, + sort = #{sort}, + type = #{type}, + update_by = #{updateBy}, + update_date = now() + where id = #{id,jdbcType=INTEGER} + + + + delete from t_customer_train_kind_label + where id = #{id,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ExpressFeeMapper.xml b/src/main/resources/mapper/ExpressFeeMapper.xml new file mode 100644 index 0000000..7d6465e --- /dev/null +++ b/src/main/resources/mapper/ExpressFeeMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + insert into + tbl_express_fee + (province,pro_type_label,first_weight_price,continued_weight_price,start_price,createBy,createDate) + values + (#{province},#{proTypeLabel},#{firstWeight},#{continuedWeightPrice},#{startPrice},#{createBy},now()) + + + + update tbl_express_fee + + + province = #{province,jdbcType=VARCHAR}, + + + first_weight_price = #{firstWeightPrice}, + + + continued_weight_price = #{continuedWeightPrice}, + + + start_price = #{startPrice}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + updateDate = now() + + where id = #{id,jdbcType=INTEGER} + + + + delete from tbl_express_fee where id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/mapper/Finance2Mapper.xml b/src/main/resources/mapper/Finance2Mapper.xml new file mode 100644 index 0000000..2c68fc9 --- /dev/null +++ b/src/main/resources/mapper/Finance2Mapper.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + insert into tbl_sys_finance2 ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/Finance3Mapper.xml b/src/main/resources/mapper/Finance3Mapper.xml new file mode 100644 index 0000000..82397c1 --- /dev/null +++ b/src/main/resources/mapper/Finance3Mapper.xml @@ -0,0 +1,252 @@ + + + + + + + + + + + + insert into tbl_sys_finance3 ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + + + + + + + + insert into tbl_sys_finance4 ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + + + + + + + insert into tbl_sys_finance5 ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + + + + + + + insert into tbl_sys_finance6 ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + + + + + + + insert into tbl_sys_finance7 ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/FinanceDifferenceMapper.xml b/src/main/resources/mapper/FinanceDifferenceMapper.xml new file mode 100644 index 0000000..ff96dfd --- /dev/null +++ b/src/main/resources/mapper/FinanceDifferenceMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + insert into tbl_sys_finance_difference ( + id, order_number, shopname, + wangwang, pay_time, price, + remark, taobao_status, open_order_number, + filename, creator) + values + + ( + null,#{item.orderNumber},#{item.shopname},#{item.wangwang},#{item.payTime}, + #{item.price},#{item.remark},#{item.taobaoStatus},#{item.openOrderNumber}, + #{item.filename},#{item.creator}) + + + \ No newline at end of file diff --git a/src/main/resources/mapper/FinanceExtractMapper.xml b/src/main/resources/mapper/FinanceExtractMapper.xml new file mode 100644 index 0000000..ae56b27 --- /dev/null +++ b/src/main/resources/mapper/FinanceExtractMapper.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + insert into tbl_sys_finance_extract ( + id, order_number, remark, length, width, + height, count, filename, creator,create_date) + values + + ( + null,#{item.orderNumber},#{item.remark},#{item.length},#{item.width}, + #{item.height},#{item.count},#{item.filename},#{item.creator},now()) + + + \ No newline at end of file diff --git a/src/main/resources/mapper/FinanceMapper.xml b/src/main/resources/mapper/FinanceMapper.xml new file mode 100644 index 0000000..cc5c0e9 --- /dev/null +++ b/src/main/resources/mapper/FinanceMapper.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + insert into tbl_sys_finance ( + id, add_time, supplier, + shopname, kind, kind2, + order_number, filename, count, + number, zhang,remark, creator) + values + + ( + null,#{item.addTime},#{item.supplier},#{item.shopname},#{item.kind}, + #{item.kind2},#{item.orderNumber},#{item.filename},#{item.count},#{item.number}, + #{item.zhang},#{item.remark},#{item.creator}) + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/InformationMapper.xml b/src/main/resources/mapper/InformationMapper.xml new file mode 100644 index 0000000..b81f737 --- /dev/null +++ b/src/main/resources/mapper/InformationMapper.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + insert into + tbl_information + (content,type,createBy,createDate) + values + (#{content},#{type},#{createBy},now()) + + + + update tbl_information + + + content = #{content,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + + updateDate = now(), + + + where id = #{id,jdbcType=INTEGER} + + + + delete from tbl_information where id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/mapper/LoginIpMapper.xml b/src/main/resources/mapper/LoginIpMapper.xml new file mode 100644 index 0000000..01e2a92 --- /dev/null +++ b/src/main/resources/mapper/LoginIpMapper.xml @@ -0,0 +1,59 @@ + + + + + + + + + insert into tbl_login_ip + (agreeIp,remark,createBy,createDate,updateBy,updateTime) + values + (#{agreeIp},#{remark},#{createBy},now(),#{createBy},now()) + + + + + update tbl_login_ip + + + agreeIp = #{agreeIp,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + updateTime = now() + + where id = #{id,jdbcType=INTEGER} + + + + + delete from tbl_login_ip where id = #{id} + + + + + + + delete from tbl_login_ip where id in + + #{id} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/LoginLogMapper.xml b/src/main/resources/mapper/LoginLogMapper.xml new file mode 100644 index 0000000..ee1458b --- /dev/null +++ b/src/main/resources/mapper/LoginLogMapper.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/MyFileMapper.xml b/src/main/resources/mapper/MyFileMapper.xml new file mode 100644 index 0000000..89818e0 --- /dev/null +++ b/src/main/resources/mapper/MyFileMapper.xml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + fileId, fileName, filePath, remark, createBy, createDate, updateBy, updateDate + + + + + delete from tbl_file + where fileId = #{fileId,jdbcType=INTEGER} + + + delete from tbl_file + + + + + + insert into tbl_file (fileId, fileName, filePath, + remark, createBy, createDate, + updateBy, updateDate) + values (#{fileId,jdbcType=INTEGER}, #{fileName,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, + #{remark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP}) + + + insert into tbl_file + + + fileId, + + + fileName, + + + filePath, + + + remark, + + + createBy, + + + createDate, + + + updateBy, + + + updateDate, + + + + + #{fileId,jdbcType=INTEGER}, + + + #{fileName,jdbcType=VARCHAR}, + + + #{filePath,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createDate,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateDate,jdbcType=TIMESTAMP}, + + + + + + update tbl_file + + + fileId = #{record.fileId,jdbcType=INTEGER}, + + + fileName = #{record.fileName,jdbcType=VARCHAR}, + + + filePath = #{record.filePath,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + createBy = #{record.createBy,jdbcType=VARCHAR}, + + + createDate = #{record.createDate,jdbcType=TIMESTAMP}, + + + updateBy = #{record.updateBy,jdbcType=VARCHAR}, + + + updateDate = #{record.updateDate,jdbcType=TIMESTAMP}, + + + + + + + + update tbl_file + set fileId = #{record.fileId,jdbcType=INTEGER}, + fileName = #{record.fileName,jdbcType=VARCHAR}, + filePath = #{record.filePath,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + createBy = #{record.createBy,jdbcType=VARCHAR}, + createDate = #{record.createDate,jdbcType=TIMESTAMP}, + updateBy = #{record.updateBy,jdbcType=VARCHAR}, + updateDate = #{record.updateDate,jdbcType=TIMESTAMP} + + + + + + update tbl_file + + + fileName = #{fileName,jdbcType=VARCHAR}, + + + filePath = #{filePath,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + createBy = #{createBy,jdbcType=VARCHAR}, + + + createDate = #{createDate,jdbcType=TIMESTAMP}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + + updateDate = #{updateDate,jdbcType=TIMESTAMP}, + + + where fileId = #{fileId,jdbcType=INTEGER} + + + update tbl_file + set fileName = #{fileName,jdbcType=VARCHAR}, + filePath = #{filePath,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + createBy = #{createBy,jdbcType=VARCHAR}, + createDate = #{createDate,jdbcType=TIMESTAMP}, + updateBy = #{updateBy,jdbcType=VARCHAR}, + updateDate = #{updateDate,jdbcType=TIMESTAMP} + where fileId = #{fileId,jdbcType=INTEGER} + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ProductImgMapper.xml b/src/main/resources/mapper/ProductImgMapper.xml new file mode 100644 index 0000000..3f4214f --- /dev/null +++ b/src/main/resources/mapper/ProductImgMapper.xml @@ -0,0 +1,147 @@ + + + + + + + + update product_img + set remark = #{remark} + where id = #{id} + + + + + + + + + insert into product_img + ( + pro_type_value,pro_type_label, + + kind_value, + + + kind_label, + + + kind2_value, + + + kind2_label, + + img_url, + remark, + filename + ) + values + ( + #{proTypeValue},#{proTypeLabel}, + + #{kindValue}, + + + #{kindLabel}, + + + #{kind2Value}, + + + #{kind2Label}, + + #{imgUrl}, + #{remark}, + #{filename} + ) + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ProductMapper.xml b/src/main/resources/mapper/ProductMapper.xml new file mode 100644 index 0000000..f566106 --- /dev/null +++ b/src/main/resources/mapper/ProductMapper.xml @@ -0,0 +1,328 @@ + + + + + + + + UPDATE + product + + updater = #{updater}, + update_date = now(), + + count = #{count,jdbcType=INTEGER}, + + + price = #{price,jdbcType=DOUBLE}, + + + price_multiple = #{priceMultiple}, + + + weight = #{weight}, + + + WHERE + pro_id = #{proId} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into product (length,width,count,price,kind_value,kind_label,pro_type_value,pro_type_label) + values (#{length},#{width},#{count},#{price},#{kindValue},#{kindLabel},#{proTypeValue},#{proTypeLabel}) + + \ No newline at end of file diff --git a/src/main/resources/mapper/QuestionMapper.xml b/src/main/resources/mapper/QuestionMapper.xml new file mode 100644 index 0000000..c8e240f --- /dev/null +++ b/src/main/resources/mapper/QuestionMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + insert into tbl_question + (question,answer1,answer2,answer3,answer4,answer,type,ansCount,createBy,createDate) + values + (#{question},#{answer1},#{answer2},#{answer3},#{answer4},#{answer},#{type},#{ansCount},#{createBy},now()) + + + + update tbl_question + + + question = #{question,jdbcType=VARCHAR}, + + + answer1 = #{answer1,jdbcType=VARCHAR}, + + + answer2 = #{answer2,jdbcType=VARCHAR}, + + + answer3 = #{answer3,jdbcType=VARCHAR}, + + + answer4 = #{answer4,jdbcType=VARCHAR}, + + + answer = #{answer,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + ansCount = #{ansCount,jdbcType=INTEGER}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + + updateDate = now(), + + + where id = #{id,jdbcType=INTEGER} + + + + delete from tbl_question where id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/mapper/QuoteDataMapper.xml b/src/main/resources/mapper/QuoteDataMapper.xml new file mode 100644 index 0000000..68015e7 --- /dev/null +++ b/src/main/resources/mapper/QuoteDataMapper.xml @@ -0,0 +1,414 @@ + + + + + + + + INSERT INTO tbl_quote_data + (id,username,realname,role,shopname,price,isBuy,isBuyToDay,remark,remarkJudge,quoteTime,isSelect,isFillIn,wangwang,proTypeLabel) + VALUES + (NULL,#{username},#{realname},#{role},#{shopname},#{price},#{isBuy},#{isBuyToDay},#{remark},#{remarkJudge},now(),#{isSelect},#{isFillIn},#{wangwang},#{proTypeLabel}) + + + + UPDATE + tbl_quote_data + + + commentManager = #{commentManager}, + commentManagerDate = now(), + + + price = #{price}, + + + buyPrice = #{buyPrice}, + + + wangwang = #{wangwang}, + isFillIn = #{isFillIn}, + fillInDate = now(), + + + commentSelf = #{commentSelf}, + commentSelfDate = now(), + + + WHERE + id = #{id} + + + + + UPDATE + tbl_quote_data + SET + isBuyToDay = + CASE + WHEN + isBuyToDay = '1' + THEN + '0' + ELSE + '1' + END, + isBuyToDayDate = now() + WHERE id = #{id} + + + + + UPDATE + tbl_quote_data + SET + isBuy = + CASE + WHEN + isBuy = '1' + THEN + '0' + ELSE + '1' + END, + buyDate = now() + WHERE id = #{id} + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/QuoteLogMapper.xml b/src/main/resources/mapper/QuoteLogMapper.xml new file mode 100644 index 0000000..a30a8a9 --- /dev/null +++ b/src/main/resources/mapper/QuoteLogMapper.xml @@ -0,0 +1,67 @@ + + + + + + + + + INSERT INTO tbl_quote_log + ( + quoteId, + quoteIp, + os, + realname, + username, + brower, + remark, + shopname, + price + ) + VALUES + ( + NULL, + #{quoteIp}, + #{os}, + #{realname}, + #{username}, + #{brower}, + #{remark}, + #{shopname}, + #{price} + ) + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysDictSearchProMapper.xml b/src/main/resources/mapper/SysDictSearchProMapper.xml new file mode 100644 index 0000000..7892d9c --- /dev/null +++ b/src/main/resources/mapper/SysDictSearchProMapper.xml @@ -0,0 +1,72 @@ + + + + + + + + INSERT INTO sys_dict_search_pro + ( + id, + pro_type_label, + like_pro_type_label, + url, + status, + creator, + createDate + ) + VALUES + ( + NULL, + #{proTypeLabel}, + #{likeProTypeLabel}, + #{url}, + #{status}, + #{creator}, + now() + ) + + + + UPDATE + sys_dict_search_pro + SET + + like_pro_type_label = #{likeProTypeLabel}, + + + url = #{url}, + + updateDate = now(), + updater = #{updater} + WHERE + id = #{id} + + + + + UPDATE + sys_dict_search_pro + SET + status = + CASE + WHEN + status = '1' + THEN + '0' + ELSE + '1' + END + WHERE id = #{id} + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysPermissionMapper.xml b/src/main/resources/mapper/SysPermissionMapper.xml new file mode 100644 index 0000000..b61b65a --- /dev/null +++ b/src/main/resources/mapper/SysPermissionMapper.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysRoleMapper.xml b/src/main/resources/mapper/SysRoleMapper.xml new file mode 100644 index 0000000..146988d --- /dev/null +++ b/src/main/resources/mapper/SysRoleMapper.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + delete from tbl_sys_role_permission where roleId = #{roleId} + + + + + insert into tbl_sys_role_permission(roleId,perId) + values + + (#{roleId},#{item}) + + + + + + + + + UPDATE + tbl_sys_role + SET + isRegist = + CASE + WHEN + isRegist = '1' + THEN + '0' + ELSE + '1' + END + WHERE roleId = #{roleId} + + + + INSERT INTO tbl_sys_role + ( + roleId, + roleName, + isRegist, + remark, + createBy, + createDate + ) + VALUES + ( + NULL, + #{roleName}, + #{isRegist}, + #{remark}, + #{createBy}, + now() + ) + + + + update + tbl_sys_role + set + roleName = #{roleName,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + updateDate = now() + where + roleId = #{roleId,jdbcType=INTEGER} + + + + + delete from tbl_sys_role + where roleId = #{roleId,jdbcType=INTEGER} + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/SysUserMapper.xml b/src/main/resources/mapper/SysUserMapper.xml new file mode 100644 index 0000000..a8a6606 --- /dev/null +++ b/src/main/resources/mapper/SysUserMapper.xml @@ -0,0 +1,246 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE + tbl_sys_user + SET + userStatus = + CASE + WHEN + userStatus = '1' + THEN + '0' + ELSE + '1' + END, + sysStatus = CASE WHEN sysStatus = '2' THEN '0' ElSE '2' END + WHERE userId = #{userId} + + + + + UPDATE + tbl_sys_user + SET + sysStatus = + CASE + WHEN + sysStatus = '2' + THEN + '1' + ELSE + '2' + END + WHERE userId = #{userId} + + + + + UPDATE + tbl_sys_user + SET + needIp = + CASE + WHEN needIp = '1' + THEN '0' + WHEN needIp = '0' + THEN '1' + ELSE '2' + END + + + + insert into tbl_sys_user + + + realname, + + + username, + + + password, + + + userStatus, + + + role, + + + sysStatus, + + + needIp, + + + createBy, + + + createDate, + + + updateBy, + + + updateDate, + + + + + #{realname,jdbcType=VARCHAR}, + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{userStatus,jdbcType=VARCHAR}, + + + #{role,jdbcType=VARCHAR}, + + + #{sysStatus,jdbcType=VARCHAR}, + + + #{needIp,jdbcType=VARCHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createDate,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateDate,jdbcType=TIMESTAMP}, + + + + + + update tbl_sys_user + + + realname = #{realname,jdbcType=VARCHAR}, + + + username = #{username,jdbcType=VARCHAR}, + + + password = #{password,jdbcType=VARCHAR}, + + + userStatus = #{userStatus,jdbcType=VARCHAR}, + + + role = #{role,jdbcType=VARCHAR}, + + + sysStatus = #{sysStatus,jdbcType=VARCHAR}, + + + needIp = #{needIp,jdbcType=VARCHAR}, + + + birthDay = #{birthDay,jdbcType=VARCHAR}, + + + birthType = #{birthType,jdbcType=VARCHAR}, + + + isBirthDay = #{isBirthDay,jdbcType=INTEGER}, + + + entryDate = #{entryDate,jdbcType=VARCHAR}, + + + createBy = #{createBy,jdbcType=VARCHAR}, + + + createDate = #{createDate,jdbcType=TIMESTAMP}, + + + updateBy = #{updateBy,jdbcType=VARCHAR}, + + + updateDate = #{updateDate,jdbcType=TIMESTAMP}, + + + where userId = #{userId,jdbcType=INTEGER} + + + + delete from tbl_sys_user + where userId = #{userId,jdbcType=INTEGER} + + + + + insert into tbl_sys_user_role(userId, roleId) + values + + (#{userId},#{item}) + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/UpdateLogMapper.xml b/src/main/resources/mapper/UpdateLogMapper.xml new file mode 100644 index 0000000..d666bde --- /dev/null +++ b/src/main/resources/mapper/UpdateLogMapper.xml @@ -0,0 +1,46 @@ + + + + + + + + insert into tbl_update_log + (content,addTime,createBy,createDate) + values + (#{content},#{addTime},#{createBy},now()) + + + + update tbl_update_log + + + content = #{content,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + delete from tbl_update_log + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/src/main/resources/mybatis-config.xml b/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..c21c99e --- /dev/null +++ b/src/main/resources/mybatis-config.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/quote_price.sql b/src/main/resources/quote_price.sql new file mode 100644 index 0000000..0115544 --- /dev/null +++ b/src/main/resources/quote_price.sql @@ -0,0 +1,587 @@ +/* +SQLyog Ultimate v12.09 (64 bit) +MySQL - 5.7.20-log : Database - quote_price +********************************************************************* +*/ + +/*!40101 SET NAMES utf8 */; + +/*!40101 SET SQL_MODE=''*/; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +CREATE DATABASE /*!32312 IF NOT EXISTS*/`quote_price` /*!40100 DEFAULT CHARACTER SET utf8 */; + +USE `quote_price`; + +/*Table structure for table `bug` */ + +DROP TABLE IF EXISTS `bug`; + +CREATE TABLE `bug` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `product` varchar(150) DEFAULT NULL COMMENT '产品', + `bugRemark` varchar(1665) DEFAULT NULL COMMENT '问题界面', + `createBy` varchar(60) DEFAULT NULL COMMENT '提交人', + `createDate` datetime DEFAULT NULL COMMENT '提交时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='bug表'; + +/*Table structure for table `product` */ + +DROP TABLE IF EXISTS `product`; + +CREATE TABLE `product` ( + `pro_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `length` double DEFAULT NULL COMMENT '长度', + `width` double DEFAULT NULL COMMENT '宽度', + `count` double DEFAULT NULL COMMENT '数量', + `area` double DEFAULT NULL COMMENT '面积', + `price` double DEFAULT NULL COMMENT '价格', + `price_multiple` double DEFAULT NULL COMMENT '价格倍数', + `discount_price` double DEFAULT NULL COMMENT '折扣价', + `floor_price` double DEFAULT NULL COMMENT '跳楼价', + `weight` double DEFAULT NULL COMMENT '重量', + `kind_value` varchar(135) DEFAULT NULL COMMENT '产品种类1', + `kind_label` varchar(810) DEFAULT NULL COMMENT '种类1说明', + `kind1_value` varchar(100) DEFAULT NULL COMMENT '产品种类', + `kind1_label` varchar(100) DEFAULT NULL COMMENT '产品说明', + `kind2_value` varchar(135) DEFAULT NULL COMMENT '产品种类2', + `kind2_label` varchar(810) DEFAULT NULL COMMENT '种类2说明', + `pro_type_value` varchar(135) DEFAULT NULL COMMENT '产品分类', + `pro_type_label` varchar(1350) DEFAULT NULL COMMENT '产品分类说明', + `creator` bigint(20) DEFAULT NULL COMMENT '创建人', + `create_date` datetime DEFAULT NULL COMMENT '创建时间', + `updater` varchar(20) DEFAULT NULL COMMENT '更新人', + `update_date` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`pro_id`) +) ENGINE=InnoDB AUTO_INCREMENT=15349 DEFAULT CHARSET=utf8 COMMENT='价格表'; + +/*Table structure for table `product_img` */ + +DROP TABLE IF EXISTS `product_img`; + +CREATE TABLE `product_img` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `pro_type_value` varchar(810) DEFAULT NULL COMMENT '产品类型', + `pro_type_label` varchar(4050) DEFAULT NULL COMMENT '产品类型说明', + `kind_value` varchar(450) DEFAULT NULL COMMENT '产品种类1', + `kind_label` varchar(450) DEFAULT NULL COMMENT '产品种类1说明', + `kind2_value` varchar(450) DEFAULT NULL COMMENT '产品种类2', + `kind2_label` varchar(450) DEFAULT NULL COMMENT '产品种类2说明', + `remark` varchar(350) DEFAULT NULL COMMENT '备注', + `img_url` varchar(520) DEFAULT NULL COMMENT '图片地址', + `filename` varchar(150) DEFAULT NULL COMMENT '文件名称', + `creator` bigint(20) DEFAULT NULL, + `create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `updater` bigint(20) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `img_width` varchar(540) DEFAULT NULL COMMENT '图片宽度', + `img_height` varchar(540) DEFAULT NULL COMMENT '图片高度', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8; + +/*Table structure for table `sys_dict_product` */ + +DROP TABLE IF EXISTS `sys_dict_product`; + +CREATE TABLE `sys_dict_product` ( + `pro_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `kind_value` varchar(2295) DEFAULT NULL COMMENT '产品种类1', + `kind_label` varchar(2295) DEFAULT NULL COMMENT '种类1说明', + `kind2_value` varchar(450) DEFAULT NULL COMMENT '产品种类2', + `kind2_label` varchar(450) DEFAULT NULL COMMENT '种类2说明', + `kind_price` double DEFAULT NULL, + `discount_price` double DEFAULT NULL, + `floor_price` double DEFAULT NULL, + `weight` double DEFAULT NULL, + `pro_type_value` varchar(2295) DEFAULT NULL COMMENT '产品分类', + `pro_type_label` varchar(2295) DEFAULT NULL COMMENT '分类说明', + `remark` varchar(2295) DEFAULT NULL, + `create_by` varchar(270) DEFAULT NULL, + `create_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `update_by` varchar(270) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + PRIMARY KEY (`pro_id`) +) ENGINE=InnoDB AUTO_INCREMENT=391 DEFAULT CHARSET=utf8; + +/*Table structure for table `sys_dict_search_pro` */ + +DROP TABLE IF EXISTS `sys_dict_search_pro`; + +CREATE TABLE `sys_dict_search_pro` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `like_pro_type_label` varchar(100) DEFAULT NULL COMMENT '关键字搜索内容', + `pro_type_label` varchar(50) DEFAULT NULL COMMENT '产品分类', + `url` varchar(100) DEFAULT NULL COMMENT '地址', + `status` varchar(5) DEFAULT NULL COMMENT '开启状态 0:关闭 1:开启', + `createDate` datetime DEFAULT NULL, + `creator` varchar(50) DEFAULT NULL, + `updateDate` datetime DEFAULT NULL, + `updater` varchar(50) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8 COMMENT='关键字搜索'; + +/*Table structure for table `t_customer_train_content` */ + +DROP TABLE IF EXISTS `t_customer_train_content`; + +CREATE TABLE `t_customer_train_content` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pro_type` varchar(60) DEFAULT NULL, + `kind` varchar(60) DEFAULT NULL, + `sort` int(20) DEFAULT NULL, + `content` varchar(15000) DEFAULT NULL, + `create_by` varchar(60) DEFAULT NULL, + `create_date` datetime DEFAULT NULL, + `update_by` varchar(60) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `type` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; + +/*Table structure for table `t_customer_train_kind_label` */ + +DROP TABLE IF EXISTS `t_customer_train_kind_label`; + +CREATE TABLE `t_customer_train_kind_label` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pro_type` varchar(300) DEFAULT NULL, + `kind_label` varchar(300) DEFAULT NULL, + `remark` varchar(765) DEFAULT NULL, + `sort` int(11) DEFAULT NULL, + `create_by` varchar(60) DEFAULT NULL, + `create_date` datetime DEFAULT NULL, + `update_by` varchar(60) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `type` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `pro_type` (`pro_type`), + CONSTRAINT `t_customer_train_kind_label_ibfk_1` FOREIGN KEY (`pro_type`) REFERENCES `t_customer_train_pro_type` (`pro_type`) +) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8; + +/*Table structure for table `t_customer_train_pro_type` */ + +DROP TABLE IF EXISTS `t_customer_train_pro_type`; + +CREATE TABLE `t_customer_train_pro_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pro_type` varchar(300) NOT NULL, + `remark` varchar(1500) DEFAULT NULL, + `sort` int(11) DEFAULT NULL, + `create_by` varchar(60) DEFAULT NULL, + `create_date` datetime DEFAULT NULL, + `update_by` varchar(60) DEFAULT NULL, + `update_date` datetime DEFAULT NULL, + `type` varchar(20) DEFAULT NULL, + PRIMARY KEY (`pro_type`), + KEY `id` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_article` */ + +DROP TABLE IF EXISTS `tbl_article`; + +CREATE TABLE `tbl_article` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL COMMENT '标题', + `content` varchar(5000) NOT NULL COMMENT '主题内容', + `type` varchar(5) DEFAULT NULL COMMENT '文章类型', + `status` varchar(5) DEFAULT NULL COMMENT '文章发表状态', + `imagesUrl` varchar(100) DEFAULT NULL COMMENT '图片地址', + `hit` int(11) DEFAULT NULL COMMENT '点击数', + `remark` varchar(50) DEFAULT NULL COMMENT '标识', + `createBy` varchar(50) DEFAULT NULL COMMENT '添加人', + `createDate` datetime DEFAULT NULL COMMENT '创建日期', + `updateBy` varchar(50) DEFAULT NULL COMMENT '更新人', + `updateDate` datetime DEFAULT NULL COMMENT '更新日期', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_customer_award` */ + +DROP TABLE IF EXISTS `tbl_customer_award`; + +CREATE TABLE `tbl_customer_award` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `nickname` varchar(150) DEFAULT NULL COMMENT '客服昵称', + `payPercent` double DEFAULT NULL COMMENT '付款百分比', + `askNumber` double DEFAULT NULL COMMENT '询单人数', + `customerPrice` double DEFAULT NULL COMMENT '客单价', + `award` int(11) DEFAULT NULL COMMENT '奖励金额', + `shopname` varchar(150) DEFAULT NULL COMMENT '店铺', + `creator` varchar(150) DEFAULT NULL COMMENT '导入人', + `createDate` datetime DEFAULT NULL COMMENT '导入时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COMMENT='客服奖励表'; + +/*Table structure for table `tbl_customer_data` */ + +DROP TABLE IF EXISTS `tbl_customer_data`; + +CREATE TABLE `tbl_customer_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(60) DEFAULT NULL COMMENT '用户名,用户删除数据', + `realname` varchar(60) DEFAULT NULL COMMENT '真实姓名', + `role` varchar(300) DEFAULT NULL COMMENT '所属角色', + `price` double DEFAULT NULL COMMENT '报价金额', + `productExplain` varchar(1500) DEFAULT NULL COMMENT '产品说明', + `wangwang` varchar(300) DEFAULT NULL COMMENT '客户旺旺', + `isBuy` varchar(3) DEFAULT NULL COMMENT '是否购买 0:否 1:是', + `commentSelf` varchar(3000) DEFAULT NULL, + `commentManager` varchar(3000) DEFAULT NULL COMMENT '说明', + `commentDate` datetime DEFAULT NULL COMMENT '店长评语日期', + `isDelete` varchar(3) DEFAULT NULL COMMENT '是否删除 0:否 1:是', + `completeDate` datetime DEFAULT NULL COMMENT '成交时间', + `createBy` varchar(60) DEFAULT NULL COMMENT '创建人', + `createDate` datetime DEFAULT NULL COMMENT '创建时间', + `updateBy` varchar(60) DEFAULT NULL COMMENT '更新人', + `updateDate` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5068 DEFAULT CHARSET=utf8 COMMENT='客服操作数据记录'; + +/*Table structure for table `tbl_express_fee` */ + +DROP TABLE IF EXISTS `tbl_express_fee`; + +CREATE TABLE `tbl_express_fee` ( + `id` int(11) DEFAULT NULL, + `pro_type_value` varchar(60) DEFAULT NULL COMMENT '产品类型', + `pro_type_label` varchar(60) DEFAULT NULL COMMENT '产品类型说明', + `province` varchar(60) DEFAULT NULL COMMENT '省份', + `first_weight_price` double DEFAULT NULL COMMENT '首重价格', + `continued_weight_price` double DEFAULT NULL COMMENT '续重价格', + `start_price` double DEFAULT NULL COMMENT '起步价', + `createBy` varchar(60) DEFAULT NULL, + `createDate` datetime DEFAULT NULL, + `updateBy` varchar(60) DEFAULT NULL, + `updateDate` datetime DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='快递费'; + +/*Table structure for table `tbl_file` */ + +DROP TABLE IF EXISTS `tbl_file`; + +CREATE TABLE `tbl_file` ( + `fileId` int(11) NOT NULL AUTO_INCREMENT, + `fileName` varchar(50) DEFAULT NULL, + `filePath` varchar(255) DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `createBy` varchar(50) DEFAULT NULL, + `createDate` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + `updateBy` varchar(50) DEFAULT NULL, + `updateDate` datetime DEFAULT NULL, + PRIMARY KEY (`fileId`) +) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_information` */ + +DROP TABLE IF EXISTS `tbl_information`; + +CREATE TABLE `tbl_information` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content` varchar(1500) DEFAULT NULL COMMENT '知识点内容', + `type` varchar(30) DEFAULT NULL COMMENT '知识点类型', + `createBy` varchar(30) DEFAULT NULL COMMENT '创建者', + `createDate` datetime DEFAULT NULL COMMENT '创建时间', + `updateBy` varchar(30) DEFAULT NULL COMMENT '更新者', + `updateDate` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COMMENT='产品知识点;客服须知'; + +/*Table structure for table `tbl_login_ip` */ + +DROP TABLE IF EXISTS `tbl_login_ip`; + +CREATE TABLE `tbl_login_ip` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `agreeIp` varchar(120) DEFAULT NULL COMMENT '允许登录的IP', + `remark` varchar(50) DEFAULT NULL COMMENT '说明', + `createBy` varchar(20) DEFAULT NULL COMMENT '创建人', + `createDate` datetime DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`), + UNIQUE KEY `ip` (`agreeIp`) +) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='授权登录IP'; + +/*Table structure for table `tbl_login_log` */ + +DROP TABLE IF EXISTS `tbl_login_log`; + +CREATE TABLE `tbl_login_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `remark` varchar(200) DEFAULT NULL COMMENT '登录说明', + `status` varchar(4) DEFAULT NULL COMMENT '登录状态', + `loginTime` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '登录时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=55726 DEFAULT CHARSET=utf8 COMMENT='登录日志'; + +/*Table structure for table `tbl_product_price` */ + +DROP TABLE IF EXISTS `tbl_product_price`; + +CREATE TABLE `tbl_product_price` ( + `id` int(11) DEFAULT NULL, + `sticker_kind` varchar(30) DEFAULT NULL, + `craft_tang` varchar(30) DEFAULT NULL, + `aotu` varchar(30) DEFAULT NULL, + `pro_type_value` varchar(30) DEFAULT NULL, + `kind_value` varchar(30) DEFAULT NULL, + `kind2_value` varchar(30) DEFAULT NULL, + `price500` int(11) DEFAULT NULL, + `price1000` int(11) DEFAULT NULL, + `price2000` int(11) DEFAULT NULL, + `price3000` int(11) DEFAULT NULL, + `price4000` int(11) DEFAULT NULL, + `price5000` int(11) DEFAULT NULL, + `price10000` int(11) DEFAULT NULL, + `size_type` varchar(12) DEFAULT NULL, + `remark` varchar(150) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_question` */ + +DROP TABLE IF EXISTS `tbl_question`; + +CREATE TABLE `tbl_question` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `question` varchar(1500) DEFAULT NULL COMMENT '问题', + `type` varchar(3) DEFAULT NULL COMMENT '问题类型', + `answer1` varchar(150) DEFAULT NULL COMMENT '选项A', + `answer2` varchar(150) DEFAULT NULL COMMENT '选项B', + `answer3` varchar(150) DEFAULT NULL COMMENT '选项C', + `answer4` varchar(150) DEFAULT NULL COMMENT '选项D', + `answer` varchar(150) DEFAULT NULL COMMENT '正确答案', + `ansCount` int(11) DEFAULT NULL COMMENT '填空题空数', + `createBy` varchar(150) DEFAULT NULL COMMENT '创建者', + `createDate` datetime DEFAULT NULL COMMENT '创建时间', + `updateBy` varchar(150) DEFAULT NULL COMMENT '更新者', + `updateDate` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COMMENT='产品知识测试表'; + +/*Table structure for table `tbl_quote_data` */ + +DROP TABLE IF EXISTS `tbl_quote_data`; + +CREATE TABLE `tbl_quote_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(180) DEFAULT NULL COMMENT '用户名', + `realname` varchar(150) DEFAULT NULL COMMENT '姓名', + `role` varchar(600) DEFAULT NULL COMMENT '角色', + `shopname` varchar(60) DEFAULT NULL COMMENT '数据所属店铺', + `price` double DEFAULT NULL COMMENT '报价价格', + `buyPrice` double DEFAULT NULL COMMENT '实际成交金额', + `wangwang` varchar(300) DEFAULT NULL COMMENT '客户旺旺', + `isBuy` varchar(9) NOT NULL COMMENT '是否成交', + `buyDate` datetime DEFAULT NULL COMMENT '成交时间', + `isBuyToDay` varchar(3) NOT NULL COMMENT '是否当天购买', + `isBuyToDayDate` datetime DEFAULT NULL COMMENT '购买时间', + `remark` varchar(1800) DEFAULT NULL COMMENT '报价记录', + `remarkJudge` varchar(500) DEFAULT NULL COMMENT '报价记录对比', + `quoteTime` datetime NOT NULL COMMENT '报价时间', + `commentSelf` varchar(1500) DEFAULT NULL COMMENT '未成交说明', + `commentSelfDate` datetime DEFAULT NULL COMMENT '日期', + `commentManager` varchar(1500) DEFAULT NULL COMMENT '店长跟单', + `commentManagerDate` datetime DEFAULT NULL COMMENT '店长跟单日期', + `isSelect` varchar(3) DEFAULT NULL COMMENT '是否选择所属店铺', + `selectDate` datetime DEFAULT NULL COMMENT '选择时间', + `isFillIn` varchar(3) DEFAULT NULL COMMENT '是否填写旺旺号', + `fillInDate` datetime DEFAULT NULL COMMENT '填写旺旺时间', + `proTypeLabel` varchar(50) NOT NULL COMMENT '产品类型', + `orderNumber` varchar(25) DEFAULT NULL COMMENT '成交的订单号', + PRIMARY KEY (`id`,`proTypeLabel`), + KEY `index_where` (`shopname`,`quoteTime`,`wangwang`,`realname`,`isBuy`,`isBuyToDay`,`proTypeLabel`,`price`,`buyPrice`,`isFillIn`), + KEY `index_realname` (`realname`,`quoteTime`,`price`,`buyPrice`,`wangwang`,`isBuy`,`isBuyToDay`,`isFillIn`,`proTypeLabel`,`shopname`), + KEY `index_proTypeLabel` (`proTypeLabel`,`quoteTime`,`isFillIn`,`wangwang`,`price`,`isBuy`,`isBuyToDay`), + KEY `index_username` (`quoteTime`,`username`,`realname`), + KEY `index_quoteTime` (`quoteTime`) +) ENGINE=InnoDB AUTO_INCREMENT=320661 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_quote_log` */ + +DROP TABLE IF EXISTS `tbl_quote_log`; + +CREATE TABLE `tbl_quote_log` ( + `quoteId` int(8) NOT NULL AUTO_INCREMENT, + `quoteTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '操作时间', + `quoteIp` varchar(120) DEFAULT NULL COMMENT '操作IP', + `os` varchar(60) DEFAULT NULL COMMENT '操作系统', + `realname` varchar(150) DEFAULT NULL COMMENT '姓名', + `username` varchar(150) DEFAULT NULL COMMENT '用户名', + `brower` varchar(150) DEFAULT NULL COMMENT '浏览器', + `remark` varchar(300) DEFAULT NULL COMMENT '备注:操作说明', + `shopname` varchar(200) DEFAULT NULL COMMENT '店铺', + `price` double DEFAULT NULL, + PRIMARY KEY (`quoteId`) +) ENGINE=InnoDB AUTO_INCREMENT=1970236 DEFAULT CHARSET=utf8 COMMENT='用户操作表'; + +/*Table structure for table `tbl_sys_finance` */ + +DROP TABLE IF EXISTS `tbl_sys_finance`; + +CREATE TABLE `tbl_sys_finance` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `add_time` date DEFAULT NULL COMMENT '添加时间', + `supplier` varchar(150) DEFAULT NULL COMMENT '供应商', + `shopname` varchar(150) DEFAULT NULL COMMENT '店铺', + `kind` varchar(150) DEFAULT NULL COMMENT '种类1', + `kind2` varchar(150) DEFAULT NULL COMMENT '种类2', + `order_number` varchar(300) DEFAULT NULL COMMENT '订单号', + `filename` varchar(1500) DEFAULT NULL COMMENT '文件名', + `count` varchar(30) DEFAULT NULL COMMENT '数量', + `number` varchar(30) DEFAULT NULL COMMENT '款数', + `zhang` varchar(30) DEFAULT NULL COMMENT '拼版张数', + `remark` varchar(1500) DEFAULT NULL COMMENT '备注', + `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '导入时间', + `creator` varchar(300) DEFAULT NULL COMMENT '导入人', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=11620 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_sys_finance_difference` */ + +DROP TABLE IF EXISTS `tbl_sys_finance_difference`; + +CREATE TABLE `tbl_sys_finance_difference` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_number` varchar(1800) DEFAULT NULL COMMENT '订单号', + `shopname` varchar(450) DEFAULT NULL COMMENT '店铺', + `wangwang` varchar(450) DEFAULT NULL COMMENT '旺旺号', + `pay_time` datetime DEFAULT NULL COMMENT '付款时间', + `price` varchar(90) DEFAULT NULL COMMENT '金额', + `remark` varchar(4500) DEFAULT NULL COMMENT '备注', + `taobao_status` varchar(450) DEFAULT NULL COMMENT '状态', + `open_order_number` varchar(1800) DEFAULT NULL COMMENT '拆分订单号', + `filename` varchar(450) DEFAULT NULL COMMENT '文件名', + `creator` varchar(450) DEFAULT NULL COMMENT '导入人', + `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '导入时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=59552 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_sys_finance_extract` */ + +DROP TABLE IF EXISTS `tbl_sys_finance_extract`; + +CREATE TABLE `tbl_sys_finance_extract` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `order_number` varchar(500) DEFAULT NULL COMMENT '订单号', + `remark` varchar(5000) DEFAULT NULL COMMENT '备注', + `length` varchar(30) DEFAULT NULL COMMENT '长', + `width` varchar(30) DEFAULT NULL COMMENT '宽', + `height` varchar(30) DEFAULT NULL COMMENT '高', + `count` varchar(30) DEFAULT NULL COMMENT '数量', + `filename` varchar(150) DEFAULT NULL COMMENT '文件名', + `creator` varchar(30) DEFAULT NULL COMMENT '导入人', + `create_date` datetime DEFAULT NULL COMMENT '导入时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=196143 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_sys_permission` */ + +DROP TABLE IF EXISTS `tbl_sys_permission`; + +CREATE TABLE `tbl_sys_permission` ( + `perId` int(11) NOT NULL AUTO_INCREMENT, + `perName` varchar(50) DEFAULT NULL COMMENT '权限名称', + `type` varchar(100) DEFAULT NULL, + `perCode` varchar(100) DEFAULT NULL, + `url` varchar(100) DEFAULT NULL COMMENT '权限路劲', + `perIcon` varchar(100) DEFAULT NULL COMMENT '图标', + `parentId` int(11) DEFAULT NULL COMMENT '父ID', + `orderNo` varchar(10) DEFAULT NULL COMMENT '排序', + `thirdOrderName` varchar(20) DEFAULT NULL COMMENT '三级菜单名称', + `thirdParentId` int(11) DEFAULT NULL COMMENT '三级菜单父ID', + `createBy` varchar(50) DEFAULT NULL COMMENT '创建人', + `createDate` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', + PRIMARY KEY (`perId`) +) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8 COMMENT='权限表'; + +/*Table structure for table `tbl_sys_role` */ + +DROP TABLE IF EXISTS `tbl_sys_role`; + +CREATE TABLE `tbl_sys_role` ( + `roleId` int(11) NOT NULL AUTO_INCREMENT, + `roleName` varchar(50) DEFAULT NULL COMMENT '角色名称', + `remark` varchar(200) DEFAULT NULL COMMENT '角色说明', + `isRegist` varchar(1) DEFAULT NULL COMMENT '注册标识', + `createBy` varchar(50) DEFAULT NULL COMMENT '创建人', + `createDate` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间', + `updateBy` varchar(50) DEFAULT NULL COMMENT '更新人', + `updateDate` datetime DEFAULT NULL COMMENT '更新时间', + `isSelf` varchar(3) DEFAULT NULL COMMENT '本公司店铺', + PRIMARY KEY (`roleId`) +) ENGINE=InnoDB AUTO_INCREMENT=1052 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_sys_role_permission` */ + +DROP TABLE IF EXISTS `tbl_sys_role_permission`; + +CREATE TABLE `tbl_sys_role_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `roleId` int(11) NOT NULL COMMENT '角色ID', + `perId` int(11) NOT NULL COMMENT '权限ID', + `createDate` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=16856 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_sys_user` */ + +DROP TABLE IF EXISTS `tbl_sys_user`; + +CREATE TABLE `tbl_sys_user` ( + `userId` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `realname` varchar(50) DEFAULT NULL COMMENT '真实名字', + `username` varchar(50) DEFAULT NULL COMMENT '账号', + `password` varchar(50) DEFAULT NULL COMMENT '密码', + `userStatus` varchar(1) DEFAULT NULL COMMENT '状态', + `role` varchar(200) DEFAULT NULL COMMENT '角色', + `sysStatus` varchar(1) DEFAULT NULL COMMENT '系统状态。0:隐藏,1:显示', + `readLogStatus` varchar(1) DEFAULT NULL COMMENT '阅读更新日志状态 0:未读 1:已读', + `createBy` varchar(50) DEFAULT NULL COMMENT '创建人', + `createDate` datetime DEFAULT NULL COMMENT '创建时间', + `updateBy` varchar(50) DEFAULT NULL COMMENT '更新人', + `updateDate` datetime DEFAULT NULL COMMENT '更新时间', + `birthDay` varchar(20) DEFAULT NULL COMMENT '生日', + `birthType` varchar(1) DEFAULT NULL COMMENT '生日类型 0:农历 1:新历', + `isBirthDay` tinyint(1) DEFAULT NULL COMMENT '是否是生日', + `entryDate` varchar(20) DEFAULT NULL COMMENT '入职时间', + `needIp` varchar(1) DEFAULT NULL COMMENT '是否需要判断IP 0:否 1:是', + PRIMARY KEY (`userId`), + UNIQUE KEY `username` (`username`) +) ENGINE=InnoDB AUTO_INCREMENT=1349 DEFAULT CHARSET=utf8; + +/*Table structure for table `tbl_sys_user_role` */ + +DROP TABLE IF EXISTS `tbl_sys_user_role`; + +CREATE TABLE `tbl_sys_user_role` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户角色id', + `userId` int(11) NOT NULL, + `roleId` int(11) NOT NULL, + `createDate` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + KEY `userId` (`userId`), + KEY `roleId` (`roleId`), + CONSTRAINT `tbl_sys_user_role_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `tbl_sys_user` (`userId`), + CONSTRAINT `tbl_sys_user_role_ibfk_2` FOREIGN KEY (`roleId`) REFERENCES `tbl_sys_role` (`roleId`) +) ENGINE=InnoDB AUTO_INCREMENT=2775 DEFAULT CHARSET=utf8 COMMENT='用户角色表'; + +/*Table structure for table `tbl_update_log` */ + +DROP TABLE IF EXISTS `tbl_update_log`; + +CREATE TABLE `tbl_update_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `content` varchar(15000) DEFAULT NULL, + `addTime` datetime DEFAULT NULL, + `createBy` varchar(150) DEFAULT NULL, + `createDate` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/webapp/WEB-INF/c-1_0-rt.tld b/src/main/webapp/WEB-INF/c-1_0-rt.tld new file mode 100644 index 0000000..2203657 --- /dev/null +++ b/src/main/webapp/WEB-INF/c-1_0-rt.tld @@ -0,0 +1,393 @@ + + + + 1.0 + 1.2 + c_rt + http://java.sun.com/jstl/core_rt + JSTL core RT + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + Provides core validation features for JSTL tags. + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + true + boolean + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + true + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + true + + + charEncoding + false + true + + + + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + true + java.lang.Object + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + true + java.lang.String + + + delims + true + true + java.lang.String + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + true + + + default + false + true + + + escapeXml + false + true + + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + true + + + value + false + true + + + + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + false + true + + + context + false + true + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + true + + + target + false + true + + + property + false + true + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + Creates a URL with optional query parameters. + + + var + false + false + + + scope + false + false + + + value + false + true + + + context + false + true + + + + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + true + boolean + + + + diff --git a/src/main/webapp/WEB-INF/c-1_0.tld b/src/main/webapp/WEB-INF/c-1_0.tld new file mode 100644 index 0000000..ce80e8d --- /dev/null +++ b/src/main/webapp/WEB-INF/c-1_0.tld @@ -0,0 +1,416 @@ + + + + 1.0 + 1.2 + c + http://java.sun.com/jstl/core + JSTL core + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + expressionAttributes + + out:value + out:default + out:escapeXml + if:test + import:url + import:context + import:charEncoding + forEach:items + forEach:begin + forEach:end + forEach:step + forTokens:items + forTokens:begin + forTokens:end + forTokens:step + param:encode + param:name + param:value + redirect:context + redirect:url + set:property + set:target + set:value + url:context + url:value + when:test + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + false + + + default + false + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.el.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + false + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.el.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + false + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + false + + + charEncoding + false + false + + + + + forEach + org.apache.taglibs.standard.tag.el.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.el.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + false + + + delims + true + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + false + + + value + false + false + + + + + redirect + org.apache.taglibs.standard.tag.el.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + true + false + + + context + false + false + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.el.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + false + + + target + false + false + + + property + false + false + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.el.core.UrlTag + JSP + + Prints or exposes a URL with optional query parameters + (via the c:param tag). + + + var + false + false + + + scope + false + false + + + value + true + false + + + context + false + false + + + + + when + org.apache.taglibs.standard.tag.el.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + false + + + + diff --git a/src/main/webapp/WEB-INF/c.tld b/src/main/webapp/WEB-INF/c.tld new file mode 100644 index 0000000..22698c9 --- /dev/null +++ b/src/main/webapp/WEB-INF/c.tld @@ -0,0 +1,563 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the resource to import. + + url + true + true + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL resource that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +resource. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the resource to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + diff --git a/src/main/webapp/WEB-INF/dispatcherServlet-servlet.xml b/src/main/webapp/WEB-INF/dispatcherServlet-servlet.xml new file mode 100644 index 0000000..a554979 --- /dev/null +++ b/src/main/webapp/WEB-INF/dispatcherServlet-servlet.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/fmt-1_0-rt.tld b/src/main/webapp/WEB-INF/fmt-1_0-rt.tld new file mode 100644 index 0000000..45d1545 --- /dev/null +++ b/src/main/webapp/WEB-INF/fmt-1_0-rt.tld @@ -0,0 +1,403 @@ + + + + 1.0 + 1.2 + fmt_rt + http://java.sun.com/jstl/fmt_rt + JSTL fmt RT + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + Provides core validation features for JSTL tags. + + + + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + true + + + + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + true + + + variant + false + true + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + true + + + + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + true + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + true + + + prefix + false + true + + + + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + true + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + true + + + bundle + false + true + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + true + + + + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + currencyCode + false + true + + + currencySymbol + false + true + + + groupingUsed + false + true + + + maxIntegerDigits + false + true + + + minIntegerDigits + false + true + + + maxFractionDigits + false + true + + + minFractionDigits + false + true + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + parseLocale + false + true + + + integerOnly + false + true + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + parseLocale + false + true + + + var + false + false + + + scope + false + false + + + + diff --git a/src/main/webapp/WEB-INF/fmt-1_0.tld b/src/main/webapp/WEB-INF/fmt-1_0.tld new file mode 100644 index 0000000..20523ee --- /dev/null +++ b/src/main/webapp/WEB-INF/fmt-1_0.tld @@ -0,0 +1,442 @@ + + + + 1.0 + 1.2 + fmt + http://java.sun.com/jstl/fmt + JSTL fmt + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + expressionAttributes + + requestEncoding:value + setLocale:value + setLocale:variant + timeZone:value + setTimeZone:value + bundle:basename + bundle:prefix + setBundle:basename + message:key + message:bundle + param:value + formatNumber:value + formatNumber:pattern + formatNumber:currencyCode + formatNumber:currencySymbol + formatNumber:groupingUsed + formatNumber:maxIntegerDigits + formatNumber:minIntegerDigits + formatNumber:maxFractionDigits + formatNumber:minFractionDigits + parseNumber:value + parseNumber:pattern + parseNumber:parseLocale + parseNumber:integerOnly + formatDate:value + formatDate:pattern + formatDate:timeZone + parseDate:value + parseDate:pattern + parseDate:timeZone + parseDate:parseLocale + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + requestEncoding + org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + false + + + + + setLocale + org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + false + + + variant + false + false + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + false + + + + + setTimeZone + org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + false + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.el.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + false + + + prefix + false + false + + + + + setBundle + org.apache.taglibs.standard.tag.el.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + false + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.el.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + false + + + bundle + false + false + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.el.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + false + + + + + formatNumber + org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + currencyCode + false + false + + + currencySymbol + false + false + + + groupingUsed + false + false + + + maxIntegerDigits + false + false + + + minIntegerDigits + false + false + + + maxFractionDigits + false + false + + + minFractionDigits + false + false + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + parseLocale + false + false + + + integerOnly + false + false + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.el.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.el.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + parseLocale + false + false + + + var + false + false + + + scope + false + false + + + + diff --git a/src/main/webapp/WEB-INF/fmt.tld b/src/main/webapp/WEB-INF/fmt.tld new file mode 100644 index 0000000..3b9a54a --- /dev/null +++ b/src/main/webapp/WEB-INF/fmt.tld @@ -0,0 +1,671 @@ + + + + + JSTL 1.1 i18n-capable formatting library + JSTL fmt + 1.1 + fmt + http://java.sun.com/jsp/jstl/fmt + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + + + + Sets the request character encoding + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + +Name of character encoding to be applied when +decoding request parameters. + + value + false + true + + + + + + Stores the given locale in the locale configuration variable + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + +A String value is interpreted as the +printable representation of a locale, which +must contain a two-letter (lower-case) +language code (as defined by ISO-639), +and may contain a two-letter (upper-case) +country code (as defined by ISO-3166). +Language and country codes must be +separated by hyphen (-) or underscore +(_). + + value + true + true + + + +Vendor- or browser-specific variant. +See the java.util.Locale javadocs for +more information on variants. + + variant + false + true + + + +Scope of the locale configuration variable. + + scope + false + false + + + + + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See +java.util.TimeZone for more information on +supported time zone formats. + + value + true + true + + + + + + Stores the given time zone in the time zone configuration variable + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See java.util.TimeZone for +more information on supported time zone +formats. + + value + true + true + + + +Name of the exported scoped variable which +stores the time zone of type +java.util.TimeZone. + + var + false + false + + + +Scope of var or the time zone configuration +variable. + + scope + false + false + + + + + + Loads a resource bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Prefix to be prepended to the value of the message +key of any nested <fmt:message> action. + + prefix + false + true + + + + + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Name of the exported scoped variable which stores +the i18n localization context of type +javax.servlet.jsp.jstl.fmt.LocalizationC +ontext. + + var + false + false + + + +Scope of var or the localization context +configuration variable. + + scope + false + false + + + + + + Maps key to localized message and performs parametric replacement + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + +Message key to be looked up. + + key + false + true + + + +Localization context in whose resource +bundle the message key is looked up. + + bundle + false + true + + + +Name of the exported scoped variable +which stores the localized message. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Supplies an argument for parametric replacement to a containing + <message> tag + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + +Argument used for parametric replacement. + + value + false + true + + + + + + Formats a numeric value as a number, currency, or percentage + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + +Numeric value to be formatted. + + value + false + true + + + +Specifies whether the value is to be +formatted as number, currency, or +percentage. + + type + false + true + + + +Custom formatting pattern. + + pattern + false + true + + + +ISO 4217 currency code. Applied only +when formatting currencies (i.e. if type is +equal to "currency"); ignored otherwise. + + currencyCode + false + true + + + +Currency symbol. Applied only when +formatting currencies (i.e. if type is equal +to "currency"); ignored otherwise. + + currencySymbol + false + true + + + +Specifies whether the formatted output +will contain any grouping separators. + + groupingUsed + false + true + + + +Maximum number of digits in the integer +portion of the formatted output. + + maxIntegerDigits + false + true + + + +Minimum number of digits in the integer +portion of the formatted output. + + minIntegerDigits + false + true + + + +Maximum number of digits in the +fractional portion of the formatted output. + + maxFractionDigits + false + true + + + +Minimum number of digits in the +fractional portion of the formatted output. + + minFractionDigits + false + true + + + +Name of the exported scoped variable +which stores the formatted result as a +String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a number, currency, or percentage + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + +String to be parsed. + + value + false + true + + + +Specifies whether the string in the value +attribute should be parsed as a number, +currency, or percentage. + + type + false + true + + + +Custom formatting pattern that determines +how the string in the value attribute is to be +parsed. + + pattern + false + true + + + +Locale whose default formatting pattern (for +numbers, currencies, or percentages, +respectively) is to be used during the parse +operation, or to which the pattern specified +via the pattern attribute (if present) is +applied. + + parseLocale + false + true + + + +Specifies whether just the integer portion of +the given value should be parsed. + + integerOnly + false + true + + + +Name of the exported scoped variable which +stores the parsed result (of type +java.lang.Number). + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Formats a date and/or time using the supplied styles and pattern + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + +Date and/or time to be formatted. + + value + true + true + + + +Specifies whether the time, the date, or both +the time and date components of the given +date are to be formatted. + + type + false + true + + + +Predefined formatting style for dates. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a date or both a date and +time (i.e. if type is missing or is equal to +"date" or "both"); ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting style for times. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a time or both a date and +time (i.e. if type is equal to "time" or "both"); +ignored otherwise. + + timeStyle + false + true + + + +Custom formatting style for dates and times. + + pattern + false + true + + + +Time zone in which to represent the formatted +time. + + timeZone + false + true + + + +Name of the exported scoped variable which +stores the formatted result as a String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a date and/or time + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + +Date string to be parsed. + + value + false + true + + + +Specifies whether the date string in the +value attribute is supposed to contain a +time, a date, or both. + + type + false + true + + + +Predefined formatting style for days +which determines how the date +component of the date string is to be +parsed. Applied only when formatting a +date or both a date and time (i.e. if type +is missing or is equal to "date" or "both"); +ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting styles for times +which determines how the time +component in the date string is to be +parsed. Applied only when formatting a +time or both a date and time (i.e. if type +is equal to "time" or "both"); ignored +otherwise. + + timeStyle + false + true + + + +Custom formatting pattern which +determines how the date string is to be +parsed. + + pattern + false + true + + + +Time zone in which to interpret any time +information in the date string. + + timeZone + false + true + + + +Locale whose predefined formatting styles +for dates and times are to be used during +the parse operation, or to which the +pattern specified via the pattern +attribute (if present) is applied. + + parseLocale + false + true + + + +Name of the exported scoped variable in +which the parsing result (of type +java.util.Date) is stored. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + diff --git a/src/main/webapp/WEB-INF/fn.tld b/src/main/webapp/WEB-INF/fn.tld new file mode 100644 index 0000000..12d4ca8 --- /dev/null +++ b/src/main/webapp/WEB-INF/fn.tld @@ -0,0 +1,207 @@ + + + + + JSTL 1.1 functions library + JSTL functions + 1.1 + fn + http://java.sun.com/jsp/jstl/functions + + + + Tests if an input string contains the specified substring. + + contains + org.apache.taglibs.standard.functions.Functions + boolean contains(java.lang.String, java.lang.String) + + <c:if test="${fn:contains(name, searchString)}"> + + + + + + Tests if an input string contains the specified substring in a case insensitive way. + + containsIgnoreCase + org.apache.taglibs.standard.functions.Functions + boolean containsIgnoreCase(java.lang.String, java.lang.String) + + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> + + + + + + Tests if an input string ends with the specified suffix. + + endsWith + org.apache.taglibs.standard.functions.Functions + boolean endsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:endsWith(filename, ".txt")}"> + + + + + + Escapes characters that could be interpreted as XML markup. + + escapeXml + org.apache.taglibs.standard.functions.Functions + java.lang.String escapeXml(java.lang.String) + + ${fn:escapeXml(param:info)} + + + + + + Returns the index withing a string of the first occurrence of a specified substring. + + indexOf + org.apache.taglibs.standard.functions.Functions + int indexOf(java.lang.String, java.lang.String) + + ${fn:indexOf(name, "-")} + + + + + + Joins all elements of an array into a string. + + join + org.apache.taglibs.standard.functions.Functions + java.lang.String join(java.lang.String[], java.lang.String) + + ${fn:join(array, ";")} + + + + + + Returns the number of items in a collection, or the number of characters in a string. + + length + org.apache.taglibs.standard.functions.Functions + int length(java.lang.Object) + + You have ${fn:length(shoppingCart.products)} in your shopping cart. + + + + + + Returns a string resulting from replacing in an input string all occurrences + of a "before" string into an "after" substring. + + replace + org.apache.taglibs.standard.functions.Functions + java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) + + ${fn:replace(text, "-", "•")} + + + + + + Splits a string into an array of substrings. + + split + org.apache.taglibs.standard.functions.Functions + java.lang.String[] split(java.lang.String, java.lang.String) + + ${fn:split(customerNames, ";")} + + + + + + Tests if an input string starts with the specified prefix. + + startsWith + org.apache.taglibs.standard.functions.Functions + boolean startsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:startsWith(product.id, "100-")}"> + + + + + + Returns a subset of a string. + + substring + org.apache.taglibs.standard.functions.Functions + java.lang.String substring(java.lang.String, int, int) + + P.O. Box: ${fn:substring(zip, 6, -1)} + + + + + + Returns a subset of a string following a specific substring. + + substringAfter + org.apache.taglibs.standard.functions.Functions + java.lang.String substringAfter(java.lang.String, java.lang.String) + + P.O. Box: ${fn:substringAfter(zip, "-")} + + + + + + Returns a subset of a string before a specific substring. + + substringBefore + org.apache.taglibs.standard.functions.Functions + java.lang.String substringBefore(java.lang.String, java.lang.String) + + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} + + + + + + Converts all of the characters of a string to lower case. + + toLowerCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toLowerCase(java.lang.String) + + Product name: ${fn.toLowerCase(product.name)} + + + + + + Converts all of the characters of a string to upper case. + + toUpperCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toUpperCase(java.lang.String) + + Product name: ${fn.UpperCase(product.name)} + + + + + + Removes white spaces from both ends of a string. + + trim + org.apache.taglibs.standard.functions.Functions + java.lang.String trim(java.lang.String) + + Name: ${fn.trim(name)} + + + + diff --git a/src/main/webapp/WEB-INF/permittedTaglibs.tld b/src/main/webapp/WEB-INF/permittedTaglibs.tld new file mode 100644 index 0000000..8c0c404 --- /dev/null +++ b/src/main/webapp/WEB-INF/permittedTaglibs.tld @@ -0,0 +1,34 @@ + + + + + Restricts JSP pages to the JSTL tag libraries + + permittedTaglibs + 1.1 + permittedTaglibs + http://jakarta.apache.org/taglibs/standard/permittedTaglibs + + + + javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV + + + + Whitespace-separated list of taglib URIs to permit. This example + TLD for the Standard Taglib allows only JSTL 'el' taglibs to be + imported. + + permittedTaglibs + + http://java.sun.com/jsp/jstl/core + http://java.sun.com/jsp/jstl/fmt + http://java.sun.com/jsp/jstl/sql + http://java.sun.com/jsp/jstl/xml + + + + diff --git a/src/main/webapp/WEB-INF/scriptfree.tld b/src/main/webapp/WEB-INF/scriptfree.tld new file mode 100644 index 0000000..62ceb43 --- /dev/null +++ b/src/main/webapp/WEB-INF/scriptfree.tld @@ -0,0 +1,51 @@ + + + + + Validates JSP pages to prohibit use of scripting elements. + + 1.1 + scriptfree + http://jakarta.apache.org/taglibs/standard/scriptfree + + + + Validates prohibitions against scripting elements. + + + javax.servlet.jsp.jstl.tlv.ScriptFreeTLV + + + + Controls whether or not declarations are considered valid. + + allowDeclarations + false + + + + Controls whether or not scriptlets are considered valid. + + allowScriptlets + false + + + + Controls whether or not top-level expressions are considered valid. + + allowExpressions + false + + + + Controls whether or not expressions used to supply request-time + attribute values are considered valid. + + allowRTExpressions + false + + + diff --git a/src/main/webapp/WEB-INF/sql-1_0-rt.tld b/src/main/webapp/WEB-INF/sql-1_0-rt.tld new file mode 100644 index 0000000..c2fe525 --- /dev/null +++ b/src/main/webapp/WEB-INF/sql-1_0-rt.tld @@ -0,0 +1,188 @@ + + + + 1.0 + 1.2 + sql_rt + http://java.sun.com/jstl/sql_rt + JSTL sql RT + JSTL 1.0 sql library + + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + Provides core validation features for JSTL tags. + + + + + transaction + org.apache.taglibs.standard.tag.rt.sql.TransactionTag + JSP + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + + dataSource + false + true + + + isolation + false + true + + + + + query + org.apache.taglibs.standard.tag.rt.sql.QueryTag + JSP + + Executes the SQL query defined in its body or through the + sql attribute. + + + var + true + false + + + scope + false + false + + + sql + false + true + + + dataSource + false + true + + + startRow + false + true + + + maxRows + false + true + + + + + update + org.apache.taglibs.standard.tag.rt.sql.UpdateTag + JSP + + Executes the SQL update defined in its body or through the + sql attribute. + + + var + false + false + + + scope + false + false + + + sql + false + true + + + dataSource + false + true + + + + + param + org.apache.taglibs.standard.tag.rt.sql.ParamTag + JSP + + Sets a parameter in an SQL statement to the specified value. + + + value + false + true + + + + + dateParam + org.apache.taglibs.standard.tag.rt.sql.DateParamTag + empty + + Sets a parameter in an SQL statement to the specified java.util.Date value. + + + value + true + true + + + type + false + true + + + + + setDataSource + org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag + empty + + Creates a simple DataSource suitable only for prototyping. + + + var + false + false + + + scope + false + false + + + dataSource + false + true + + + driver + false + true + + + url + false + true + + + user + false + true + + + password + false + true + + + diff --git a/src/main/webapp/WEB-INF/sql-1_0.tld b/src/main/webapp/WEB-INF/sql-1_0.tld new file mode 100644 index 0000000..2f8a328 --- /dev/null +++ b/src/main/webapp/WEB-INF/sql-1_0.tld @@ -0,0 +1,213 @@ + + + + 1.0 + 1.2 + sql + http://java.sun.com/jstl/sql + JSTL sql + JSTL 1.0 sql library + + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + expressionAttributes + + transaction:dataSource + transaction:isolation + query:sql + query:dataSource + query:startRow + query:maxRows + update:sql + update:dataSource + param:value + dateParam:value + dateParam:type + setDataSource:dataSource + setDataSource:driver + setDataSource:url + setDataSource:user + setDataSource:password + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + transaction + org.apache.taglibs.standard.tag.el.sql.TransactionTag + JSP + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + + dataSource + false + false + + + isolation + false + false + + + + + query + org.apache.taglibs.standard.tag.el.sql.QueryTag + JSP + + Executes the SQL query defined in its body or through the + sql attribute. + + + var + true + false + + + scope + false + false + + + sql + false + false + + + dataSource + false + false + + + startRow + false + false + + + maxRows + false + false + + + + + update + org.apache.taglibs.standard.tag.el.sql.UpdateTag + JSP + + Executes the SQL update defined in its body or through the + sql attribute. + + + var + false + false + + + scope + false + false + + + sql + false + false + + + dataSource + false + false + + + + + param + org.apache.taglibs.standard.tag.el.sql.ParamTag + JSP + + Sets a parameter in an SQL statement to the specified value. + + + value + false + false + + + + + dateParam + org.apache.taglibs.standard.tag.el.sql.DateParamTag + empty + + Sets a parameter in an SQL statement to the specified java.util.Date val +ue. + + + value + true + true + + + type + false + true + + + + + setDataSource + org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag + empty + + Creates a simple DataSource suitable only for prototyping. + + + var + false + false + + + scope + false + false + + + dataSource + false + false + + + driver + false + false + + + url + false + false + + + user + false + false + + + password + false + false + + + diff --git a/src/main/webapp/WEB-INF/sql.tld b/src/main/webapp/WEB-INF/sql.tld new file mode 100644 index 0000000..e53445b --- /dev/null +++ b/src/main/webapp/WEB-INF/sql.tld @@ -0,0 +1,289 @@ + + + + + JSTL 1.1 sql library + JSTL sql + 1.1 + sql + http://java.sun.com/jsp/jstl/sql + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + + + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + transaction + org.apache.taglibs.standard.tag.rt.sql.TransactionTag + JSP + + +DataSource associated with the database to access. A +String value represents a relative path to a JNDI +resource or the parameters for the JDBC +DriverManager facility. + + dataSource + false + true + + + +Transaction isolation level. If not specified, it is the +isolation level the DataSource has been configured +with. + + isolation + false + true + + + + + + Executes the SQL query defined in its body or through the + sql attribute. + + query + org.apache.taglibs.standard.tag.rt.sql.QueryTag + JSP + + +Name of the exported scoped variable for the +query result. The type of the scoped variable is +javax.servlet.jsp.jstl.sql. +Result (see Chapter 16 "Java APIs"). + + var + true + false + + + +Scope of var. + + scope + false + false + + + +SQL query statement. + + sql + false + true + + + +Data source associated with the database to +query. A String value represents a relative path +to a JNDI resource or the parameters for the +DriverManager class. + + dataSource + false + true + + + +The returned Result object includes the rows +starting at the specified index. The first row of +the original query result set is at index 0. If not +specified, rows are included starting from the +first row at index 0. + + startRow + false + true + + + +The maximum number of rows to be included in +the query result. If not specified, or set to -1, no +limit on the maximum number of rows is +enforced. + + maxRows + false + true + + + + + + Executes the SQL update defined in its body or through the + sql attribute. + + update + org.apache.taglibs.standard.tag.rt.sql.UpdateTag + JSP + + +Name of the exported scoped variable for the result +of the database update. The type of the scoped +variable is java.lang.Integer. + + var + false + false + + + +Scope of var. + + scope + false + false + + + +SQL update statement. + + sql + false + true + + + +Data source associated with the database to update. +A String value represents a relative path to a JNDI +resource or the parameters for the JDBC +DriverManager class. + + dataSource + false + true + + + + + + Sets a parameter in an SQL statement to the specified value. + + param + org.apache.taglibs.standard.tag.rt.sql.ParamTag + JSP + + +Parameter value. + + value + false + true + + + + + + Sets a parameter in an SQL statement to the specified java.util.Date value. + + dateParam + org.apache.taglibs.standard.tag.rt.sql.DateParamTag + empty + + +Parameter value for DATE, TIME, or +TIMESTAMP column in a database table. + + value + true + true + + + +One of "date", "time" or "timestamp". + + type + false + true + + + + + + Creates a simple DataSource suitable only for prototyping. + + setDataSource + org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag + empty + + +Name of the exported scoped variable +for the data source specified. Type can +be String or DataSource. + + var + false + false + + + +If var is specified, scope of the +exported variable. Otherwise, scope of +the data source configuration variable. + + scope + false + false + + + +Data source. If specified as a string, it +can either be a relative path to a JNDI +resource, or a JDBC parameters string +as defined in Section 10.1.1. + + dataSource + false + true + + + +JDBC parameter: driver class name. + + driver + false + true + + + +JDBC parameter: URL associated with +the database. + + url + false + true + + + +JDBC parameter: database user on +whose behalf the connection to the +database is being made. + + user + false + true + + + +JDBC parameter: user password + + password + false + true + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..4d2c437 --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,99 @@ + + + + login.jsp + + + + webAppRootKey + quote_price + + + + + contextConfigLocation + classpath:applicationContext.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + + + + + + + dispatcherServlet + org.springframework.web.servlet.DispatcherServlet + + 1 + + + + + dispatcherServlet + / + + + + + CharacterEncodingFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + utf-8 + + + forceRequestEncoding + true + + + forceResponseEncoding + true + + + + + CharacterEncodingFilter + /* + + + + + log4jConfigLocation + classpath:log4j.properties + + + + org.springframework.web.util.Log4jConfigListener + + + + shiroFilter + org.springframework.web.filter.DelegatingFilterProxy + + + + targetFilterLifecycle + true + + + + shiroFilter + /* + + + + 600 + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/x-1_0-rt.tld b/src/main/webapp/WEB-INF/x-1_0-rt.tld new file mode 100644 index 0000000..e7062b7 --- /dev/null +++ b/src/main/webapp/WEB-INF/x-1_0-rt.tld @@ -0,0 +1,256 @@ + + + + 1.0 + 1.2 + x_rt + http://java.sun.com/jstl/xml_rt + JSTL XML RT + JSTL 1.0 XML library + + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + Provides validation features for JSTL XML tags. + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + Like <%= ... >, but for XPath expressions. + + + select + true + false + + + escapeXml + false + true + + + + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + + select + true + false + + + var + false + false + + + scope + false + false + + + + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + XML iteration tag. + + + var + false + false + + + select + true + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + Adds a parameter to a containing 'transform' tag's Transformer + + + name + true + true + + + value + false + true + + + + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + Parses XML content from 'source' attribute or 'body' + + + var + false + false + + + varDom + false + false + + + scope + false + false + + + scopeDom + false + false + + + xml + false + true + + + systemId + false + true + + + filter + false + true + + + + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + Saves the result of an XPath expression evaluation in a 'scope' + + + var + true + false + + + select + false + false + + + scope + false + false + + + + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + + var + false + false + + + scope + false + false + + + result + false + true + + + xml + false + true + + + xmlSystemId + false + true + + + xslt + false + true + + + xsltSystemId + false + true + + + + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + + select + true + false + + + + diff --git a/src/main/webapp/WEB-INF/x-1_0.tld b/src/main/webapp/WEB-INF/x-1_0.tld new file mode 100644 index 0000000..2237ccb --- /dev/null +++ b/src/main/webapp/WEB-INF/x-1_0.tld @@ -0,0 +1,273 @@ + + + + 1.0 + 1.2 + x + http://java.sun.com/jstl/xml + JSTL XML + JSTL 1.0 XML library + + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + expressionAttributes + + out:escapeXml + parse:xml + parse:systemId + parse:filter + transform:xml + transform:xmlSystemId + transform:xslt + transform:xsltSystemId + transform:result + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.xml.ExprTag + empty + + Like <%= ... >, but for XPath expressions. + + + select + true + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + + select + true + false + + + var + false + false + + + scope + false + false + + + + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + XML iteration tag. + + + var + false + false + + + select + true + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.xml.ParamTag + JSP + + Adds a parameter to a containing 'transform' tag's Transformer + + + name + true + false + + + value + false + false + + + + + parse + org.apache.taglibs.standard.tag.el.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + Parses XML content from 'source' attribute or 'body' + + + var + false + false + + + varDom + false + false + + + scope + false + false + + + scopeDom + false + false + + + xml + false + false + + + systemId + false + false + + + filter + false + false + + + + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + Saves the result of an XPath expression evaluation in a 'scope' + + + var + true + false + + + select + false + false + + + scope + false + false + + + + + transform + org.apache.taglibs.standard.tag.el.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + + var + false + false + + + scope + false + false + + + result + false + false + + + xml + false + false + + + xmlSystemId + false + false + + + xslt + false + false + + + xsltSystemId + false + false + + + + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + + select + true + false + + + + diff --git a/src/main/webapp/WEB-INF/x.tld b/src/main/webapp/WEB-INF/x.tld new file mode 100644 index 0000000..e52ffe8 --- /dev/null +++ b/src/main/webapp/WEB-INF/x.tld @@ -0,0 +1,448 @@ + + + + + JSTL 1.1 XML library + JSTL XML + 1.1 + x + http://java.sun.com/jsp/jstl/xml + + + + Provides validation features for JSTL XML tags. + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Like <%= ... >, but for XPath expressions. + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + +XPath expression to be evaluated. + + select + true + false + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default +value is true. + + escapeXml + false + true + + + + + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + +The test condition that tells whether or not the +body content should be processed. + + select + true + false + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + XML iteration tag. + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + +Name of the exported scoped variable for the +current item of the iteration. This scoped variable +has nested visibility. Its type depends on the +result of the XPath expression in the select +attribute. + + var + false + false + + + +XPath expression to be evaluated. + + select + true + false + + + +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. + + begin + false + true + int + + + +Iteration ends at the item located at the specified +index (inclusive). + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility. + + varStatus + false + false + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'transform' tag's Transformer + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + +Name of the transformation parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Parses XML content from 'source' attribute or 'body' + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is implementation +dependent. + + var + false + false + + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is +org.w3c.dom.Document. + + varDom + false + false + + + +Scope for var. + + scope + false + false + + + +Scope for varDom. + + scopeDom + false + false + + + +Deprecated. Use attribute 'doc' instead. + + xml + false + true + + + +Source XML document to be parsed. + + doc + false + true + + + +The system identifier (URI) for parsing the +XML document. + + systemId + false + true + + + +Filter to be applied to the source +document. + + filter + false + true + + + + + + Saves the result of an XPath expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + +Name of the exported scoped variable to hold +the value specified in the action. The type of the +scoped variable is whatever type the select +expression evaluates to. + + var + true + false + + + +XPath expression to be evaluated. + + select + false + false + + + +Scope for var. + + scope + false + false + + + + + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + +Name of the exported +scoped variable for the +transformed XML +document. The type of the +scoped variable is +org.w3c.dom.Document. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Result +Object that captures or +processes the transformation +result. + + result + false + true + + + +Deprecated. Use attribute +'doc' instead. + + xml + false + true + + + +Source XML document to be +transformed. (If exported by +<x:set>, it must correspond +to a well-formed XML +document, not a partial +document.) + + doc + false + true + + + +Deprecated. Use attribute +'docSystemId' instead. + + xmlSystemId + false + true + + + +The system identifier (URI) +for parsing the XML +document. + + docSystemId + false + true + + + +javax.xml.transform.Source +Transformation stylesheet as +a String, Reader, or +Source object. + + xslt + false + true + + + +The system identifier (URI) +for parsing the XSLT +stylesheet. + + xsltSystemId + false + true + + + + + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + +The test condition that tells whether or +not the body content should be +processed + + select + true + false + + + + diff --git a/src/main/webapp/favicon.ico b/src/main/webapp/favicon.ico new file mode 100644 index 0000000..9d4d086 Binary files /dev/null and b/src/main/webapp/favicon.ico differ diff --git a/src/main/webapp/file/领淘报价系统操作手册.docx b/src/main/webapp/file/领淘报价系统操作手册.docx new file mode 100644 index 0000000..9c0cb79 Binary files /dev/null and b/src/main/webapp/file/领淘报价系统操作手册.docx differ diff --git a/src/main/webapp/images/bg3.jpg b/src/main/webapp/images/bg3.jpg new file mode 100644 index 0000000..854ab1a Binary files /dev/null and b/src/main/webapp/images/bg3.jpg differ diff --git a/src/main/webapp/images/bg4.jpg b/src/main/webapp/images/bg4.jpg new file mode 100644 index 0000000..8c42648 Binary files /dev/null and b/src/main/webapp/images/bg4.jpg differ diff --git a/src/main/webapp/images/bg401.jpg b/src/main/webapp/images/bg401.jpg new file mode 100644 index 0000000..339c66c Binary files /dev/null and b/src/main/webapp/images/bg401.jpg differ diff --git a/src/main/webapp/images/birthDay.png b/src/main/webapp/images/birthDay.png new file mode 100644 index 0000000..79c4c72 Binary files /dev/null and b/src/main/webapp/images/birthDay.png differ diff --git a/src/main/webapp/images/emoji/aru/1.png b/src/main/webapp/images/emoji/aru/1.png new file mode 100644 index 0000000..98e65d7 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/1.png differ diff --git a/src/main/webapp/images/emoji/aru/10.png b/src/main/webapp/images/emoji/aru/10.png new file mode 100644 index 0000000..82f3648 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/10.png differ diff --git a/src/main/webapp/images/emoji/aru/100.png b/src/main/webapp/images/emoji/aru/100.png new file mode 100644 index 0000000..164268a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/100.png differ diff --git a/src/main/webapp/images/emoji/aru/101.png b/src/main/webapp/images/emoji/aru/101.png new file mode 100644 index 0000000..3774357 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/101.png differ diff --git a/src/main/webapp/images/emoji/aru/102.png b/src/main/webapp/images/emoji/aru/102.png new file mode 100644 index 0000000..ccce9c1 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/102.png differ diff --git a/src/main/webapp/images/emoji/aru/103.png b/src/main/webapp/images/emoji/aru/103.png new file mode 100644 index 0000000..4c081af Binary files /dev/null and b/src/main/webapp/images/emoji/aru/103.png differ diff --git a/src/main/webapp/images/emoji/aru/104.png b/src/main/webapp/images/emoji/aru/104.png new file mode 100644 index 0000000..c4674fb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/104.png differ diff --git a/src/main/webapp/images/emoji/aru/105.png b/src/main/webapp/images/emoji/aru/105.png new file mode 100644 index 0000000..1cbd5bf Binary files /dev/null and b/src/main/webapp/images/emoji/aru/105.png differ diff --git a/src/main/webapp/images/emoji/aru/106.png b/src/main/webapp/images/emoji/aru/106.png new file mode 100644 index 0000000..c31a4b7 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/106.png differ diff --git a/src/main/webapp/images/emoji/aru/107.png b/src/main/webapp/images/emoji/aru/107.png new file mode 100644 index 0000000..d894e96 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/107.png differ diff --git a/src/main/webapp/images/emoji/aru/108.png b/src/main/webapp/images/emoji/aru/108.png new file mode 100644 index 0000000..0de109e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/108.png differ diff --git a/src/main/webapp/images/emoji/aru/109.png b/src/main/webapp/images/emoji/aru/109.png new file mode 100644 index 0000000..96966ca Binary files /dev/null and b/src/main/webapp/images/emoji/aru/109.png differ diff --git a/src/main/webapp/images/emoji/aru/11.png b/src/main/webapp/images/emoji/aru/11.png new file mode 100644 index 0000000..006b8f9 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/11.png differ diff --git a/src/main/webapp/images/emoji/aru/110.png b/src/main/webapp/images/emoji/aru/110.png new file mode 100644 index 0000000..e4bbced Binary files /dev/null and b/src/main/webapp/images/emoji/aru/110.png differ diff --git a/src/main/webapp/images/emoji/aru/111.png b/src/main/webapp/images/emoji/aru/111.png new file mode 100644 index 0000000..01560ec Binary files /dev/null and b/src/main/webapp/images/emoji/aru/111.png differ diff --git a/src/main/webapp/images/emoji/aru/112.png b/src/main/webapp/images/emoji/aru/112.png new file mode 100644 index 0000000..7c8d0de Binary files /dev/null and b/src/main/webapp/images/emoji/aru/112.png differ diff --git a/src/main/webapp/images/emoji/aru/113.png b/src/main/webapp/images/emoji/aru/113.png new file mode 100644 index 0000000..d91ac33 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/113.png differ diff --git a/src/main/webapp/images/emoji/aru/114.png b/src/main/webapp/images/emoji/aru/114.png new file mode 100644 index 0000000..2c230b0 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/114.png differ diff --git a/src/main/webapp/images/emoji/aru/115.png b/src/main/webapp/images/emoji/aru/115.png new file mode 100644 index 0000000..c827bfe Binary files /dev/null and b/src/main/webapp/images/emoji/aru/115.png differ diff --git a/src/main/webapp/images/emoji/aru/116.png b/src/main/webapp/images/emoji/aru/116.png new file mode 100644 index 0000000..06e4d87 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/116.png differ diff --git a/src/main/webapp/images/emoji/aru/117.png b/src/main/webapp/images/emoji/aru/117.png new file mode 100644 index 0000000..657658f Binary files /dev/null and b/src/main/webapp/images/emoji/aru/117.png differ diff --git a/src/main/webapp/images/emoji/aru/118.png b/src/main/webapp/images/emoji/aru/118.png new file mode 100644 index 0000000..e2ad39f Binary files /dev/null and b/src/main/webapp/images/emoji/aru/118.png differ diff --git a/src/main/webapp/images/emoji/aru/119.png b/src/main/webapp/images/emoji/aru/119.png new file mode 100644 index 0000000..6cf8821 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/119.png differ diff --git a/src/main/webapp/images/emoji/aru/12.png b/src/main/webapp/images/emoji/aru/12.png new file mode 100644 index 0000000..230a29d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/12.png differ diff --git a/src/main/webapp/images/emoji/aru/120.png b/src/main/webapp/images/emoji/aru/120.png new file mode 100644 index 0000000..88ee1f1 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/120.png differ diff --git a/src/main/webapp/images/emoji/aru/121.png b/src/main/webapp/images/emoji/aru/121.png new file mode 100644 index 0000000..9d240f4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/121.png differ diff --git a/src/main/webapp/images/emoji/aru/122.png b/src/main/webapp/images/emoji/aru/122.png new file mode 100644 index 0000000..3b165c6 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/122.png differ diff --git a/src/main/webapp/images/emoji/aru/123.png b/src/main/webapp/images/emoji/aru/123.png new file mode 100644 index 0000000..6bbd307 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/123.png differ diff --git a/src/main/webapp/images/emoji/aru/124.png b/src/main/webapp/images/emoji/aru/124.png new file mode 100644 index 0000000..0c84db0 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/124.png differ diff --git a/src/main/webapp/images/emoji/aru/125.png b/src/main/webapp/images/emoji/aru/125.png new file mode 100644 index 0000000..d78cf26 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/125.png differ diff --git a/src/main/webapp/images/emoji/aru/126.png b/src/main/webapp/images/emoji/aru/126.png new file mode 100644 index 0000000..60f89e4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/126.png differ diff --git a/src/main/webapp/images/emoji/aru/127.png b/src/main/webapp/images/emoji/aru/127.png new file mode 100644 index 0000000..d616e8d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/127.png differ diff --git a/src/main/webapp/images/emoji/aru/128.png b/src/main/webapp/images/emoji/aru/128.png new file mode 100644 index 0000000..ac94fa1 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/128.png differ diff --git a/src/main/webapp/images/emoji/aru/129.png b/src/main/webapp/images/emoji/aru/129.png new file mode 100644 index 0000000..2127b8b Binary files /dev/null and b/src/main/webapp/images/emoji/aru/129.png differ diff --git a/src/main/webapp/images/emoji/aru/13.png b/src/main/webapp/images/emoji/aru/13.png new file mode 100644 index 0000000..d7bd9d5 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/13.png differ diff --git a/src/main/webapp/images/emoji/aru/130.png b/src/main/webapp/images/emoji/aru/130.png new file mode 100644 index 0000000..2c6dfa3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/130.png differ diff --git a/src/main/webapp/images/emoji/aru/131.png b/src/main/webapp/images/emoji/aru/131.png new file mode 100644 index 0000000..2780114 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/131.png differ diff --git a/src/main/webapp/images/emoji/aru/132.png b/src/main/webapp/images/emoji/aru/132.png new file mode 100644 index 0000000..d4115c2 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/132.png differ diff --git a/src/main/webapp/images/emoji/aru/133.png b/src/main/webapp/images/emoji/aru/133.png new file mode 100644 index 0000000..8fb832d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/133.png differ diff --git a/src/main/webapp/images/emoji/aru/134.png b/src/main/webapp/images/emoji/aru/134.png new file mode 100644 index 0000000..d09e06b Binary files /dev/null and b/src/main/webapp/images/emoji/aru/134.png differ diff --git a/src/main/webapp/images/emoji/aru/135.png b/src/main/webapp/images/emoji/aru/135.png new file mode 100644 index 0000000..9f2ebb9 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/135.png differ diff --git a/src/main/webapp/images/emoji/aru/136.png b/src/main/webapp/images/emoji/aru/136.png new file mode 100644 index 0000000..e2fbc52 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/136.png differ diff --git a/src/main/webapp/images/emoji/aru/137.png b/src/main/webapp/images/emoji/aru/137.png new file mode 100644 index 0000000..141085d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/137.png differ diff --git a/src/main/webapp/images/emoji/aru/138.png b/src/main/webapp/images/emoji/aru/138.png new file mode 100644 index 0000000..083bdbb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/138.png differ diff --git a/src/main/webapp/images/emoji/aru/139.png b/src/main/webapp/images/emoji/aru/139.png new file mode 100644 index 0000000..d2f9f4e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/139.png differ diff --git a/src/main/webapp/images/emoji/aru/14.png b/src/main/webapp/images/emoji/aru/14.png new file mode 100644 index 0000000..db3b1e6 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/14.png differ diff --git a/src/main/webapp/images/emoji/aru/140.png b/src/main/webapp/images/emoji/aru/140.png new file mode 100644 index 0000000..f63ae0d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/140.png differ diff --git a/src/main/webapp/images/emoji/aru/141.png b/src/main/webapp/images/emoji/aru/141.png new file mode 100644 index 0000000..b792063 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/141.png differ diff --git a/src/main/webapp/images/emoji/aru/142.png b/src/main/webapp/images/emoji/aru/142.png new file mode 100644 index 0000000..2ad9caa Binary files /dev/null and b/src/main/webapp/images/emoji/aru/142.png differ diff --git a/src/main/webapp/images/emoji/aru/143.png b/src/main/webapp/images/emoji/aru/143.png new file mode 100644 index 0000000..44bf3d1 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/143.png differ diff --git a/src/main/webapp/images/emoji/aru/144.png b/src/main/webapp/images/emoji/aru/144.png new file mode 100644 index 0000000..f5fe580 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/144.png differ diff --git a/src/main/webapp/images/emoji/aru/145.png b/src/main/webapp/images/emoji/aru/145.png new file mode 100644 index 0000000..cc59d2c Binary files /dev/null and b/src/main/webapp/images/emoji/aru/145.png differ diff --git a/src/main/webapp/images/emoji/aru/146.png b/src/main/webapp/images/emoji/aru/146.png new file mode 100644 index 0000000..20340c4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/146.png differ diff --git a/src/main/webapp/images/emoji/aru/147.png b/src/main/webapp/images/emoji/aru/147.png new file mode 100644 index 0000000..f3f63b4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/147.png differ diff --git a/src/main/webapp/images/emoji/aru/148.png b/src/main/webapp/images/emoji/aru/148.png new file mode 100644 index 0000000..126f91f Binary files /dev/null and b/src/main/webapp/images/emoji/aru/148.png differ diff --git a/src/main/webapp/images/emoji/aru/149.png b/src/main/webapp/images/emoji/aru/149.png new file mode 100644 index 0000000..2a6fab1 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/149.png differ diff --git a/src/main/webapp/images/emoji/aru/15.png b/src/main/webapp/images/emoji/aru/15.png new file mode 100644 index 0000000..fb4e4dd Binary files /dev/null and b/src/main/webapp/images/emoji/aru/15.png differ diff --git a/src/main/webapp/images/emoji/aru/150.png b/src/main/webapp/images/emoji/aru/150.png new file mode 100644 index 0000000..24584c3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/150.png differ diff --git a/src/main/webapp/images/emoji/aru/151.png b/src/main/webapp/images/emoji/aru/151.png new file mode 100644 index 0000000..bf56d08 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/151.png differ diff --git a/src/main/webapp/images/emoji/aru/152.png b/src/main/webapp/images/emoji/aru/152.png new file mode 100644 index 0000000..6e3dbb2 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/152.png differ diff --git a/src/main/webapp/images/emoji/aru/153.png b/src/main/webapp/images/emoji/aru/153.png new file mode 100644 index 0000000..1d04f5a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/153.png differ diff --git a/src/main/webapp/images/emoji/aru/154.png b/src/main/webapp/images/emoji/aru/154.png new file mode 100644 index 0000000..077599d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/154.png differ diff --git a/src/main/webapp/images/emoji/aru/155.png b/src/main/webapp/images/emoji/aru/155.png new file mode 100644 index 0000000..c30b823 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/155.png differ diff --git a/src/main/webapp/images/emoji/aru/156.png b/src/main/webapp/images/emoji/aru/156.png new file mode 100644 index 0000000..b58689b Binary files /dev/null and b/src/main/webapp/images/emoji/aru/156.png differ diff --git a/src/main/webapp/images/emoji/aru/157.png b/src/main/webapp/images/emoji/aru/157.png new file mode 100644 index 0000000..bcd096c Binary files /dev/null and b/src/main/webapp/images/emoji/aru/157.png differ diff --git a/src/main/webapp/images/emoji/aru/158.png b/src/main/webapp/images/emoji/aru/158.png new file mode 100644 index 0000000..3111a86 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/158.png differ diff --git a/src/main/webapp/images/emoji/aru/159.png b/src/main/webapp/images/emoji/aru/159.png new file mode 100644 index 0000000..14363ee Binary files /dev/null and b/src/main/webapp/images/emoji/aru/159.png differ diff --git a/src/main/webapp/images/emoji/aru/16.png b/src/main/webapp/images/emoji/aru/16.png new file mode 100644 index 0000000..ff91809 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/16.png differ diff --git a/src/main/webapp/images/emoji/aru/160.png b/src/main/webapp/images/emoji/aru/160.png new file mode 100644 index 0000000..7981e9b Binary files /dev/null and b/src/main/webapp/images/emoji/aru/160.png differ diff --git a/src/main/webapp/images/emoji/aru/161.png b/src/main/webapp/images/emoji/aru/161.png new file mode 100644 index 0000000..702c9bb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/161.png differ diff --git a/src/main/webapp/images/emoji/aru/162.png b/src/main/webapp/images/emoji/aru/162.png new file mode 100644 index 0000000..47f3c47 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/162.png differ diff --git a/src/main/webapp/images/emoji/aru/163.png b/src/main/webapp/images/emoji/aru/163.png new file mode 100644 index 0000000..b177a46 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/163.png differ diff --git a/src/main/webapp/images/emoji/aru/164.png b/src/main/webapp/images/emoji/aru/164.png new file mode 100644 index 0000000..abd621a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/164.png differ diff --git a/src/main/webapp/images/emoji/aru/17.png b/src/main/webapp/images/emoji/aru/17.png new file mode 100644 index 0000000..de6bbf0 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/17.png differ diff --git a/src/main/webapp/images/emoji/aru/18.png b/src/main/webapp/images/emoji/aru/18.png new file mode 100644 index 0000000..956dbd2 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/18.png differ diff --git a/src/main/webapp/images/emoji/aru/19.png b/src/main/webapp/images/emoji/aru/19.png new file mode 100644 index 0000000..2b55367 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/19.png differ diff --git a/src/main/webapp/images/emoji/aru/2.png b/src/main/webapp/images/emoji/aru/2.png new file mode 100644 index 0000000..d4b565e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/2.png differ diff --git a/src/main/webapp/images/emoji/aru/20.png b/src/main/webapp/images/emoji/aru/20.png new file mode 100644 index 0000000..8762ffb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/20.png differ diff --git a/src/main/webapp/images/emoji/aru/21.png b/src/main/webapp/images/emoji/aru/21.png new file mode 100644 index 0000000..2233296 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/21.png differ diff --git a/src/main/webapp/images/emoji/aru/22.png b/src/main/webapp/images/emoji/aru/22.png new file mode 100644 index 0000000..03fbf46 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/22.png differ diff --git a/src/main/webapp/images/emoji/aru/23.png b/src/main/webapp/images/emoji/aru/23.png new file mode 100644 index 0000000..959f637 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/23.png differ diff --git a/src/main/webapp/images/emoji/aru/24.png b/src/main/webapp/images/emoji/aru/24.png new file mode 100644 index 0000000..3b558e3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/24.png differ diff --git a/src/main/webapp/images/emoji/aru/25.png b/src/main/webapp/images/emoji/aru/25.png new file mode 100644 index 0000000..6ac1ff7 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/25.png differ diff --git a/src/main/webapp/images/emoji/aru/26.png b/src/main/webapp/images/emoji/aru/26.png new file mode 100644 index 0000000..2978f4a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/26.png differ diff --git a/src/main/webapp/images/emoji/aru/27.png b/src/main/webapp/images/emoji/aru/27.png new file mode 100644 index 0000000..95760dc Binary files /dev/null and b/src/main/webapp/images/emoji/aru/27.png differ diff --git a/src/main/webapp/images/emoji/aru/28.png b/src/main/webapp/images/emoji/aru/28.png new file mode 100644 index 0000000..1b6ab7d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/28.png differ diff --git a/src/main/webapp/images/emoji/aru/29.png b/src/main/webapp/images/emoji/aru/29.png new file mode 100644 index 0000000..19522e4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/29.png differ diff --git a/src/main/webapp/images/emoji/aru/3.png b/src/main/webapp/images/emoji/aru/3.png new file mode 100644 index 0000000..d65fd31 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/3.png differ diff --git a/src/main/webapp/images/emoji/aru/30.png b/src/main/webapp/images/emoji/aru/30.png new file mode 100644 index 0000000..e01b33a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/30.png differ diff --git a/src/main/webapp/images/emoji/aru/31.png b/src/main/webapp/images/emoji/aru/31.png new file mode 100644 index 0000000..00bb6b8 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/31.png differ diff --git a/src/main/webapp/images/emoji/aru/32.png b/src/main/webapp/images/emoji/aru/32.png new file mode 100644 index 0000000..f31b52c Binary files /dev/null and b/src/main/webapp/images/emoji/aru/32.png differ diff --git a/src/main/webapp/images/emoji/aru/33.png b/src/main/webapp/images/emoji/aru/33.png new file mode 100644 index 0000000..512cddb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/33.png differ diff --git a/src/main/webapp/images/emoji/aru/34.png b/src/main/webapp/images/emoji/aru/34.png new file mode 100644 index 0000000..3d51a29 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/34.png differ diff --git a/src/main/webapp/images/emoji/aru/35.png b/src/main/webapp/images/emoji/aru/35.png new file mode 100644 index 0000000..18f81b9 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/35.png differ diff --git a/src/main/webapp/images/emoji/aru/36.png b/src/main/webapp/images/emoji/aru/36.png new file mode 100644 index 0000000..8c40a3a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/36.png differ diff --git a/src/main/webapp/images/emoji/aru/37.png b/src/main/webapp/images/emoji/aru/37.png new file mode 100644 index 0000000..bf35a4a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/37.png differ diff --git a/src/main/webapp/images/emoji/aru/38.png b/src/main/webapp/images/emoji/aru/38.png new file mode 100644 index 0000000..325cd9a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/38.png differ diff --git a/src/main/webapp/images/emoji/aru/39.png b/src/main/webapp/images/emoji/aru/39.png new file mode 100644 index 0000000..582f0cf Binary files /dev/null and b/src/main/webapp/images/emoji/aru/39.png differ diff --git a/src/main/webapp/images/emoji/aru/4.png b/src/main/webapp/images/emoji/aru/4.png new file mode 100644 index 0000000..7f424c3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/4.png differ diff --git a/src/main/webapp/images/emoji/aru/40.png b/src/main/webapp/images/emoji/aru/40.png new file mode 100644 index 0000000..e2a68e3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/40.png differ diff --git a/src/main/webapp/images/emoji/aru/41.png b/src/main/webapp/images/emoji/aru/41.png new file mode 100644 index 0000000..aa18a47 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/41.png differ diff --git a/src/main/webapp/images/emoji/aru/42.png b/src/main/webapp/images/emoji/aru/42.png new file mode 100644 index 0000000..cff0848 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/42.png differ diff --git a/src/main/webapp/images/emoji/aru/43.png b/src/main/webapp/images/emoji/aru/43.png new file mode 100644 index 0000000..e60b3f3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/43.png differ diff --git a/src/main/webapp/images/emoji/aru/44.png b/src/main/webapp/images/emoji/aru/44.png new file mode 100644 index 0000000..5b2b6a8 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/44.png differ diff --git a/src/main/webapp/images/emoji/aru/45.png b/src/main/webapp/images/emoji/aru/45.png new file mode 100644 index 0000000..b77f2c5 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/45.png differ diff --git a/src/main/webapp/images/emoji/aru/46.png b/src/main/webapp/images/emoji/aru/46.png new file mode 100644 index 0000000..bdf229c Binary files /dev/null and b/src/main/webapp/images/emoji/aru/46.png differ diff --git a/src/main/webapp/images/emoji/aru/47.png b/src/main/webapp/images/emoji/aru/47.png new file mode 100644 index 0000000..0e17eaa Binary files /dev/null and b/src/main/webapp/images/emoji/aru/47.png differ diff --git a/src/main/webapp/images/emoji/aru/48.png b/src/main/webapp/images/emoji/aru/48.png new file mode 100644 index 0000000..6ea71f5 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/48.png differ diff --git a/src/main/webapp/images/emoji/aru/49.png b/src/main/webapp/images/emoji/aru/49.png new file mode 100644 index 0000000..f6911f3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/49.png differ diff --git a/src/main/webapp/images/emoji/aru/5.png b/src/main/webapp/images/emoji/aru/5.png new file mode 100644 index 0000000..3cd2447 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/5.png differ diff --git a/src/main/webapp/images/emoji/aru/50.png b/src/main/webapp/images/emoji/aru/50.png new file mode 100644 index 0000000..8629b39 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/50.png differ diff --git a/src/main/webapp/images/emoji/aru/51.png b/src/main/webapp/images/emoji/aru/51.png new file mode 100644 index 0000000..b52153d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/51.png differ diff --git a/src/main/webapp/images/emoji/aru/52.png b/src/main/webapp/images/emoji/aru/52.png new file mode 100644 index 0000000..1c79956 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/52.png differ diff --git a/src/main/webapp/images/emoji/aru/53.png b/src/main/webapp/images/emoji/aru/53.png new file mode 100644 index 0000000..c692d05 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/53.png differ diff --git a/src/main/webapp/images/emoji/aru/54.png b/src/main/webapp/images/emoji/aru/54.png new file mode 100644 index 0000000..f621501 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/54.png differ diff --git a/src/main/webapp/images/emoji/aru/55.png b/src/main/webapp/images/emoji/aru/55.png new file mode 100644 index 0000000..e3f812e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/55.png differ diff --git a/src/main/webapp/images/emoji/aru/56.png b/src/main/webapp/images/emoji/aru/56.png new file mode 100644 index 0000000..7efc9e4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/56.png differ diff --git a/src/main/webapp/images/emoji/aru/57.png b/src/main/webapp/images/emoji/aru/57.png new file mode 100644 index 0000000..1667e0b Binary files /dev/null and b/src/main/webapp/images/emoji/aru/57.png differ diff --git a/src/main/webapp/images/emoji/aru/58.png b/src/main/webapp/images/emoji/aru/58.png new file mode 100644 index 0000000..e934f2e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/58.png differ diff --git a/src/main/webapp/images/emoji/aru/59.png b/src/main/webapp/images/emoji/aru/59.png new file mode 100644 index 0000000..0e57843 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/59.png differ diff --git a/src/main/webapp/images/emoji/aru/6.png b/src/main/webapp/images/emoji/aru/6.png new file mode 100644 index 0000000..74d2289 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/6.png differ diff --git a/src/main/webapp/images/emoji/aru/60.png b/src/main/webapp/images/emoji/aru/60.png new file mode 100644 index 0000000..90d7907 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/60.png differ diff --git a/src/main/webapp/images/emoji/aru/61.png b/src/main/webapp/images/emoji/aru/61.png new file mode 100644 index 0000000..0fb22ec Binary files /dev/null and b/src/main/webapp/images/emoji/aru/61.png differ diff --git a/src/main/webapp/images/emoji/aru/62.png b/src/main/webapp/images/emoji/aru/62.png new file mode 100644 index 0000000..6802c3d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/62.png differ diff --git a/src/main/webapp/images/emoji/aru/63.png b/src/main/webapp/images/emoji/aru/63.png new file mode 100644 index 0000000..383096c Binary files /dev/null and b/src/main/webapp/images/emoji/aru/63.png differ diff --git a/src/main/webapp/images/emoji/aru/64.png b/src/main/webapp/images/emoji/aru/64.png new file mode 100644 index 0000000..ca5ee4f Binary files /dev/null and b/src/main/webapp/images/emoji/aru/64.png differ diff --git a/src/main/webapp/images/emoji/aru/65.png b/src/main/webapp/images/emoji/aru/65.png new file mode 100644 index 0000000..35dd7b0 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/65.png differ diff --git a/src/main/webapp/images/emoji/aru/66.png b/src/main/webapp/images/emoji/aru/66.png new file mode 100644 index 0000000..a27c37e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/66.png differ diff --git a/src/main/webapp/images/emoji/aru/67.png b/src/main/webapp/images/emoji/aru/67.png new file mode 100644 index 0000000..d33f301 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/67.png differ diff --git a/src/main/webapp/images/emoji/aru/68.png b/src/main/webapp/images/emoji/aru/68.png new file mode 100644 index 0000000..05f82d4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/68.png differ diff --git a/src/main/webapp/images/emoji/aru/69.png b/src/main/webapp/images/emoji/aru/69.png new file mode 100644 index 0000000..710db63 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/69.png differ diff --git a/src/main/webapp/images/emoji/aru/7.png b/src/main/webapp/images/emoji/aru/7.png new file mode 100644 index 0000000..1b86cde Binary files /dev/null and b/src/main/webapp/images/emoji/aru/7.png differ diff --git a/src/main/webapp/images/emoji/aru/70.png b/src/main/webapp/images/emoji/aru/70.png new file mode 100644 index 0000000..a46a171 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/70.png differ diff --git a/src/main/webapp/images/emoji/aru/71.png b/src/main/webapp/images/emoji/aru/71.png new file mode 100644 index 0000000..4258d56 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/71.png differ diff --git a/src/main/webapp/images/emoji/aru/72.png b/src/main/webapp/images/emoji/aru/72.png new file mode 100644 index 0000000..c0a3b3b Binary files /dev/null and b/src/main/webapp/images/emoji/aru/72.png differ diff --git a/src/main/webapp/images/emoji/aru/73.png b/src/main/webapp/images/emoji/aru/73.png new file mode 100644 index 0000000..61ca7b9 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/73.png differ diff --git a/src/main/webapp/images/emoji/aru/74.png b/src/main/webapp/images/emoji/aru/74.png new file mode 100644 index 0000000..bffe0f5 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/74.png differ diff --git a/src/main/webapp/images/emoji/aru/75.png b/src/main/webapp/images/emoji/aru/75.png new file mode 100644 index 0000000..de8caf4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/75.png differ diff --git a/src/main/webapp/images/emoji/aru/76.png b/src/main/webapp/images/emoji/aru/76.png new file mode 100644 index 0000000..a5dc366 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/76.png differ diff --git a/src/main/webapp/images/emoji/aru/77.png b/src/main/webapp/images/emoji/aru/77.png new file mode 100644 index 0000000..94cf2df Binary files /dev/null and b/src/main/webapp/images/emoji/aru/77.png differ diff --git a/src/main/webapp/images/emoji/aru/78.png b/src/main/webapp/images/emoji/aru/78.png new file mode 100644 index 0000000..536cff5 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/78.png differ diff --git a/src/main/webapp/images/emoji/aru/79.png b/src/main/webapp/images/emoji/aru/79.png new file mode 100644 index 0000000..4c2a4f8 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/79.png differ diff --git a/src/main/webapp/images/emoji/aru/8.png b/src/main/webapp/images/emoji/aru/8.png new file mode 100644 index 0000000..3ac08c0 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/8.png differ diff --git a/src/main/webapp/images/emoji/aru/80.png b/src/main/webapp/images/emoji/aru/80.png new file mode 100644 index 0000000..975336d Binary files /dev/null and b/src/main/webapp/images/emoji/aru/80.png differ diff --git a/src/main/webapp/images/emoji/aru/81.png b/src/main/webapp/images/emoji/aru/81.png new file mode 100644 index 0000000..2cb9fb8 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/81.png differ diff --git a/src/main/webapp/images/emoji/aru/82.png b/src/main/webapp/images/emoji/aru/82.png new file mode 100644 index 0000000..2b407d8 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/82.png differ diff --git a/src/main/webapp/images/emoji/aru/83.png b/src/main/webapp/images/emoji/aru/83.png new file mode 100644 index 0000000..0469aed Binary files /dev/null and b/src/main/webapp/images/emoji/aru/83.png differ diff --git a/src/main/webapp/images/emoji/aru/84.png b/src/main/webapp/images/emoji/aru/84.png new file mode 100644 index 0000000..743cffa Binary files /dev/null and b/src/main/webapp/images/emoji/aru/84.png differ diff --git a/src/main/webapp/images/emoji/aru/85.png b/src/main/webapp/images/emoji/aru/85.png new file mode 100644 index 0000000..9c001b3 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/85.png differ diff --git a/src/main/webapp/images/emoji/aru/86.png b/src/main/webapp/images/emoji/aru/86.png new file mode 100644 index 0000000..e1bba2a Binary files /dev/null and b/src/main/webapp/images/emoji/aru/86.png differ diff --git a/src/main/webapp/images/emoji/aru/87.png b/src/main/webapp/images/emoji/aru/87.png new file mode 100644 index 0000000..93fabbb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/87.png differ diff --git a/src/main/webapp/images/emoji/aru/88.png b/src/main/webapp/images/emoji/aru/88.png new file mode 100644 index 0000000..bb683eb Binary files /dev/null and b/src/main/webapp/images/emoji/aru/88.png differ diff --git a/src/main/webapp/images/emoji/aru/89.png b/src/main/webapp/images/emoji/aru/89.png new file mode 100644 index 0000000..83712ed Binary files /dev/null and b/src/main/webapp/images/emoji/aru/89.png differ diff --git a/src/main/webapp/images/emoji/aru/9.png b/src/main/webapp/images/emoji/aru/9.png new file mode 100644 index 0000000..6b9e2be Binary files /dev/null and b/src/main/webapp/images/emoji/aru/9.png differ diff --git a/src/main/webapp/images/emoji/aru/90.png b/src/main/webapp/images/emoji/aru/90.png new file mode 100644 index 0000000..c1b9877 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/90.png differ diff --git a/src/main/webapp/images/emoji/aru/91.png b/src/main/webapp/images/emoji/aru/91.png new file mode 100644 index 0000000..ee4f0f6 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/91.png differ diff --git a/src/main/webapp/images/emoji/aru/92.png b/src/main/webapp/images/emoji/aru/92.png new file mode 100644 index 0000000..6ce61d4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/92.png differ diff --git a/src/main/webapp/images/emoji/aru/93.png b/src/main/webapp/images/emoji/aru/93.png new file mode 100644 index 0000000..5e9ac82 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/93.png differ diff --git a/src/main/webapp/images/emoji/aru/94.png b/src/main/webapp/images/emoji/aru/94.png new file mode 100644 index 0000000..69990f4 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/94.png differ diff --git a/src/main/webapp/images/emoji/aru/95.png b/src/main/webapp/images/emoji/aru/95.png new file mode 100644 index 0000000..b33dfde Binary files /dev/null and b/src/main/webapp/images/emoji/aru/95.png differ diff --git a/src/main/webapp/images/emoji/aru/96.png b/src/main/webapp/images/emoji/aru/96.png new file mode 100644 index 0000000..f25292e Binary files /dev/null and b/src/main/webapp/images/emoji/aru/96.png differ diff --git a/src/main/webapp/images/emoji/aru/97.png b/src/main/webapp/images/emoji/aru/97.png new file mode 100644 index 0000000..89582d1 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/97.png differ diff --git a/src/main/webapp/images/emoji/aru/98.png b/src/main/webapp/images/emoji/aru/98.png new file mode 100644 index 0000000..211b1ce Binary files /dev/null and b/src/main/webapp/images/emoji/aru/98.png differ diff --git a/src/main/webapp/images/emoji/aru/99.png b/src/main/webapp/images/emoji/aru/99.png new file mode 100644 index 0000000..a0ee604 Binary files /dev/null and b/src/main/webapp/images/emoji/aru/99.png differ diff --git a/src/main/webapp/images/emoji/newtieba/OK.png b/src/main/webapp/images/emoji/newtieba/OK.png new file mode 100644 index 0000000..39b4b5f Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/OK.png differ diff --git a/src/main/webapp/images/emoji/newtieba/haha.png b/src/main/webapp/images/emoji/newtieba/haha.png new file mode 100644 index 0000000..83ad054 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/haha.png differ diff --git a/src/main/webapp/images/emoji/newtieba/what.png b/src/main/webapp/images/emoji/newtieba/what.png new file mode 100644 index 0000000..23f9351 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/what.png differ diff --git a/src/main/webapp/images/emoji/newtieba/不高兴.png b/src/main/webapp/images/emoji/newtieba/不高兴.png new file mode 100644 index 0000000..e890e26 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/不高兴.png differ diff --git a/src/main/webapp/images/emoji/newtieba/乖.png b/src/main/webapp/images/emoji/newtieba/乖.png new file mode 100644 index 0000000..07c0440 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/乖.png differ diff --git a/src/main/webapp/images/emoji/newtieba/你懂的.png b/src/main/webapp/images/emoji/newtieba/你懂的.png new file mode 100644 index 0000000..87b6eb0 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/你懂的.png differ diff --git a/src/main/webapp/images/emoji/newtieba/便便.png b/src/main/webapp/images/emoji/newtieba/便便.png new file mode 100644 index 0000000..d0662f9 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/便便.png differ diff --git a/src/main/webapp/images/emoji/newtieba/勉强.png b/src/main/webapp/images/emoji/newtieba/勉强.png new file mode 100644 index 0000000..a64d5d3 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/勉强.png differ diff --git a/src/main/webapp/images/emoji/newtieba/吐.png b/src/main/webapp/images/emoji/newtieba/吐.png new file mode 100644 index 0000000..bd6a8f5 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/吐.png differ diff --git a/src/main/webapp/images/emoji/newtieba/吐舌.png b/src/main/webapp/images/emoji/newtieba/吐舌.png new file mode 100644 index 0000000..49f922c Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/吐舌.png differ diff --git a/src/main/webapp/images/emoji/newtieba/呀咩爹.png b/src/main/webapp/images/emoji/newtieba/呀咩爹.png new file mode 100644 index 0000000..c34dbbf Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/呀咩爹.png differ diff --git a/src/main/webapp/images/emoji/newtieba/呵呵.png b/src/main/webapp/images/emoji/newtieba/呵呵.png new file mode 100644 index 0000000..1a8b0be Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/呵呵.png differ diff --git a/src/main/webapp/images/emoji/newtieba/哈哈.png b/src/main/webapp/images/emoji/newtieba/哈哈.png new file mode 100644 index 0000000..a35b1c5 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/哈哈.png differ diff --git a/src/main/webapp/images/emoji/newtieba/啊.png b/src/main/webapp/images/emoji/newtieba/啊.png new file mode 100644 index 0000000..225a0d0 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/啊.png differ diff --git a/src/main/webapp/images/emoji/newtieba/喷.png b/src/main/webapp/images/emoji/newtieba/喷.png new file mode 100644 index 0000000..d10539d Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/喷.png differ diff --git a/src/main/webapp/images/emoji/newtieba/大拇指.png b/src/main/webapp/images/emoji/newtieba/大拇指.png new file mode 100644 index 0000000..1ed113d Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/大拇指.png differ diff --git a/src/main/webapp/images/emoji/newtieba/太开心.png b/src/main/webapp/images/emoji/newtieba/太开心.png new file mode 100644 index 0000000..888ca7b Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/太开心.png differ diff --git a/src/main/webapp/images/emoji/newtieba/太阳.png b/src/main/webapp/images/emoji/newtieba/太阳.png new file mode 100644 index 0000000..bbc48fa Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/太阳.png differ diff --git a/src/main/webapp/images/emoji/newtieba/委屈.png b/src/main/webapp/images/emoji/newtieba/委屈.png new file mode 100644 index 0000000..42a5edf Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/委屈.png differ diff --git a/src/main/webapp/images/emoji/newtieba/小乖.png b/src/main/webapp/images/emoji/newtieba/小乖.png new file mode 100644 index 0000000..cc35909 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/小乖.png differ diff --git a/src/main/webapp/images/emoji/newtieba/小红脸.png b/src/main/webapp/images/emoji/newtieba/小红脸.png new file mode 100644 index 0000000..fc8c710 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/小红脸.png differ diff --git a/src/main/webapp/images/emoji/newtieba/彩虹.png b/src/main/webapp/images/emoji/newtieba/彩虹.png new file mode 100644 index 0000000..a212a1b Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/彩虹.png differ diff --git a/src/main/webapp/images/emoji/newtieba/心碎.png b/src/main/webapp/images/emoji/newtieba/心碎.png new file mode 100644 index 0000000..315c076 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/心碎.png differ diff --git a/src/main/webapp/images/emoji/newtieba/怒.png b/src/main/webapp/images/emoji/newtieba/怒.png new file mode 100644 index 0000000..5810056 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/怒.png differ diff --git a/src/main/webapp/images/emoji/newtieba/惊哭.png b/src/main/webapp/images/emoji/newtieba/惊哭.png new file mode 100644 index 0000000..c76bfd3 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/惊哭.png differ diff --git a/src/main/webapp/images/emoji/newtieba/惊讶.png b/src/main/webapp/images/emoji/newtieba/惊讶.png new file mode 100644 index 0000000..3ba05ae Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/惊讶.png differ diff --git a/src/main/webapp/images/emoji/newtieba/懒得理.png b/src/main/webapp/images/emoji/newtieba/懒得理.png new file mode 100644 index 0000000..3c6e3a3 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/懒得理.png differ diff --git a/src/main/webapp/images/emoji/newtieba/手纸.png b/src/main/webapp/images/emoji/newtieba/手纸.png new file mode 100644 index 0000000..66c48c1 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/手纸.png differ diff --git a/src/main/webapp/images/emoji/newtieba/挖鼻.png b/src/main/webapp/images/emoji/newtieba/挖鼻.png new file mode 100644 index 0000000..c9ea998 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/挖鼻.png differ diff --git a/src/main/webapp/images/emoji/newtieba/捂嘴笑.png b/src/main/webapp/images/emoji/newtieba/捂嘴笑.png new file mode 100644 index 0000000..6b56da7 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/捂嘴笑.png differ diff --git a/src/main/webapp/images/emoji/newtieba/星星月亮.png b/src/main/webapp/images/emoji/newtieba/星星月亮.png new file mode 100644 index 0000000..e8d2c3e Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/星星月亮.png differ diff --git a/src/main/webapp/images/emoji/newtieba/汗.png b/src/main/webapp/images/emoji/newtieba/汗.png new file mode 100644 index 0000000..679a50c Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/汗.png differ diff --git a/src/main/webapp/images/emoji/newtieba/沙发.png b/src/main/webapp/images/emoji/newtieba/沙发.png new file mode 100644 index 0000000..c89d2de Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/沙发.png differ diff --git a/src/main/webapp/images/emoji/newtieba/泪.png b/src/main/webapp/images/emoji/newtieba/泪.png new file mode 100644 index 0000000..413b634 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/泪.png differ diff --git a/src/main/webapp/images/emoji/newtieba/滑稽.png b/src/main/webapp/images/emoji/newtieba/滑稽.png new file mode 100644 index 0000000..5100b91 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/滑稽.png differ diff --git a/src/main/webapp/images/emoji/newtieba/灯泡.png b/src/main/webapp/images/emoji/newtieba/灯泡.png new file mode 100644 index 0000000..51d7dff Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/灯泡.png differ diff --git a/src/main/webapp/images/emoji/newtieba/爱心.png b/src/main/webapp/images/emoji/newtieba/爱心.png new file mode 100644 index 0000000..adfc365 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/爱心.png differ diff --git a/src/main/webapp/images/emoji/newtieba/犀利.png b/src/main/webapp/images/emoji/newtieba/犀利.png new file mode 100644 index 0000000..d46f945 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/犀利.png differ diff --git a/src/main/webapp/images/emoji/newtieba/狂汗.png b/src/main/webapp/images/emoji/newtieba/狂汗.png new file mode 100644 index 0000000..e421a1b Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/狂汗.png differ diff --git a/src/main/webapp/images/emoji/newtieba/玫瑰.png b/src/main/webapp/images/emoji/newtieba/玫瑰.png new file mode 100644 index 0000000..e25b1b4 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/玫瑰.png differ diff --git a/src/main/webapp/images/emoji/newtieba/疑问.png b/src/main/webapp/images/emoji/newtieba/疑问.png new file mode 100644 index 0000000..abeecf7 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/疑问.png differ diff --git a/src/main/webapp/images/emoji/newtieba/真棒.png b/src/main/webapp/images/emoji/newtieba/真棒.png new file mode 100644 index 0000000..ade4ed4 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/真棒.png differ diff --git a/src/main/webapp/images/emoji/newtieba/睡觉.png b/src/main/webapp/images/emoji/newtieba/睡觉.png new file mode 100644 index 0000000..085fbcb Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/睡觉.png differ diff --git a/src/main/webapp/images/emoji/newtieba/礼物.png b/src/main/webapp/images/emoji/newtieba/礼物.png new file mode 100644 index 0000000..a4c4753 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/礼物.png differ diff --git a/src/main/webapp/images/emoji/newtieba/笑尿.png b/src/main/webapp/images/emoji/newtieba/笑尿.png new file mode 100644 index 0000000..0f267c1 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/笑尿.png differ diff --git a/src/main/webapp/images/emoji/newtieba/笑眼.png b/src/main/webapp/images/emoji/newtieba/笑眼.png new file mode 100644 index 0000000..03f6f60 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/笑眼.png differ diff --git a/src/main/webapp/images/emoji/newtieba/红领巾.png b/src/main/webapp/images/emoji/newtieba/红领巾.png new file mode 100644 index 0000000..f5f01bd Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/红领巾.png differ diff --git a/src/main/webapp/images/emoji/newtieba/胜利.png b/src/main/webapp/images/emoji/newtieba/胜利.png new file mode 100644 index 0000000..b3702af Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/胜利.png differ diff --git a/src/main/webapp/images/emoji/newtieba/花心.png b/src/main/webapp/images/emoji/newtieba/花心.png new file mode 100644 index 0000000..b6e880e Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/花心.png differ diff --git a/src/main/webapp/images/emoji/newtieba/茶杯.png b/src/main/webapp/images/emoji/newtieba/茶杯.png new file mode 100644 index 0000000..2039eeb Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/茶杯.png differ diff --git a/src/main/webapp/images/emoji/newtieba/药丸.png b/src/main/webapp/images/emoji/newtieba/药丸.png new file mode 100644 index 0000000..c95884b Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/药丸.png differ diff --git a/src/main/webapp/images/emoji/newtieba/蛋糕.png b/src/main/webapp/images/emoji/newtieba/蛋糕.png new file mode 100644 index 0000000..7ddf8f1 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/蛋糕.png differ diff --git a/src/main/webapp/images/emoji/newtieba/蜡烛.png b/src/main/webapp/images/emoji/newtieba/蜡烛.png new file mode 100644 index 0000000..be9752a Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/蜡烛.png differ diff --git a/src/main/webapp/images/emoji/newtieba/鄙视.png b/src/main/webapp/images/emoji/newtieba/鄙视.png new file mode 100644 index 0000000..dbf4b61 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/鄙视.png differ diff --git a/src/main/webapp/images/emoji/newtieba/酷.png b/src/main/webapp/images/emoji/newtieba/酷.png new file mode 100644 index 0000000..7f4332a Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/酷.png differ diff --git a/src/main/webapp/images/emoji/newtieba/酸爽.png b/src/main/webapp/images/emoji/newtieba/酸爽.png new file mode 100644 index 0000000..55f158c Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/酸爽.png differ diff --git a/src/main/webapp/images/emoji/newtieba/钱币.png b/src/main/webapp/images/emoji/newtieba/钱币.png new file mode 100644 index 0000000..264c315 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/钱币.png differ diff --git a/src/main/webapp/images/emoji/newtieba/阴险.png b/src/main/webapp/images/emoji/newtieba/阴险.png new file mode 100644 index 0000000..06362c8 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/阴险.png differ diff --git a/src/main/webapp/images/emoji/newtieba/音乐.png b/src/main/webapp/images/emoji/newtieba/音乐.png new file mode 100644 index 0000000..b4166b7 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/音乐.png differ diff --git a/src/main/webapp/images/emoji/newtieba/香蕉.png b/src/main/webapp/images/emoji/newtieba/香蕉.png new file mode 100644 index 0000000..f0ed924 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/香蕉.png differ diff --git a/src/main/webapp/images/emoji/newtieba/黑线.png b/src/main/webapp/images/emoji/newtieba/黑线.png new file mode 100644 index 0000000..28ee369 Binary files /dev/null and b/src/main/webapp/images/emoji/newtieba/黑线.png differ diff --git a/src/main/webapp/images/emoji/qq/K歌.gif b/src/main/webapp/images/emoji/qq/K歌.gif new file mode 100644 index 0000000..d78828e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/K歌.gif differ diff --git a/src/main/webapp/images/emoji/qq/NO.gif b/src/main/webapp/images/emoji/qq/NO.gif new file mode 100644 index 0000000..98ad6a8 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/NO.gif differ diff --git a/src/main/webapp/images/emoji/qq/OK.gif b/src/main/webapp/images/emoji/qq/OK.gif new file mode 100644 index 0000000..89eac0e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/OK.gif differ diff --git a/src/main/webapp/images/emoji/qq/下雨.gif b/src/main/webapp/images/emoji/qq/下雨.gif new file mode 100644 index 0000000..1d0438e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/下雨.gif differ diff --git a/src/main/webapp/images/emoji/qq/乒乓.gif b/src/main/webapp/images/emoji/qq/乒乓.gif new file mode 100644 index 0000000..4af099f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/乒乓.gif differ diff --git a/src/main/webapp/images/emoji/qq/亲亲.gif b/src/main/webapp/images/emoji/qq/亲亲.gif new file mode 100644 index 0000000..5ee1c51 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/亲亲.gif differ diff --git a/src/main/webapp/images/emoji/qq/便便.gif b/src/main/webapp/images/emoji/qq/便便.gif new file mode 100644 index 0000000..7ed4197 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/便便.gif differ diff --git a/src/main/webapp/images/emoji/qq/偷笑.gif b/src/main/webapp/images/emoji/qq/偷笑.gif new file mode 100644 index 0000000..1729780 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/偷笑.gif differ diff --git a/src/main/webapp/images/emoji/qq/傲慢.gif b/src/main/webapp/images/emoji/qq/傲慢.gif new file mode 100644 index 0000000..0088ed6 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/傲慢.gif differ diff --git a/src/main/webapp/images/emoji/qq/再见.gif b/src/main/webapp/images/emoji/qq/再见.gif new file mode 100644 index 0000000..7daa1e4 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/再见.gif differ diff --git a/src/main/webapp/images/emoji/qq/冷汗.gif b/src/main/webapp/images/emoji/qq/冷汗.gif new file mode 100644 index 0000000..f4b7aba Binary files /dev/null and b/src/main/webapp/images/emoji/qq/冷汗.gif differ diff --git a/src/main/webapp/images/emoji/qq/凋谢.gif b/src/main/webapp/images/emoji/qq/凋谢.gif new file mode 100644 index 0000000..69e1aae Binary files /dev/null and b/src/main/webapp/images/emoji/qq/凋谢.gif differ diff --git a/src/main/webapp/images/emoji/qq/刀.gif b/src/main/webapp/images/emoji/qq/刀.gif new file mode 100644 index 0000000..37215f4 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/刀.gif differ diff --git a/src/main/webapp/images/emoji/qq/勾引.gif b/src/main/webapp/images/emoji/qq/勾引.gif new file mode 100644 index 0000000..5beb098 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/勾引.gif differ diff --git a/src/main/webapp/images/emoji/qq/发呆.gif b/src/main/webapp/images/emoji/qq/发呆.gif new file mode 100644 index 0000000..8fe5a4f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/发呆.gif differ diff --git a/src/main/webapp/images/emoji/qq/发怒.gif b/src/main/webapp/images/emoji/qq/发怒.gif new file mode 100644 index 0000000..fc20d67 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/发怒.gif differ diff --git a/src/main/webapp/images/emoji/qq/发抖.gif b/src/main/webapp/images/emoji/qq/发抖.gif new file mode 100644 index 0000000..1a9fffe Binary files /dev/null and b/src/main/webapp/images/emoji/qq/发抖.gif differ diff --git a/src/main/webapp/images/emoji/qq/发财.gif b/src/main/webapp/images/emoji/qq/发财.gif new file mode 100644 index 0000000..ec94587 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/发财.gif differ diff --git a/src/main/webapp/images/emoji/qq/可怜.gif b/src/main/webapp/images/emoji/qq/可怜.gif new file mode 100644 index 0000000..107647a Binary files /dev/null and b/src/main/webapp/images/emoji/qq/可怜.gif differ diff --git a/src/main/webapp/images/emoji/qq/可爱.gif b/src/main/webapp/images/emoji/qq/可爱.gif new file mode 100644 index 0000000..44441d0 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/可爱.gif differ diff --git a/src/main/webapp/images/emoji/qq/右哼哼.gif b/src/main/webapp/images/emoji/qq/右哼哼.gif new file mode 100644 index 0000000..59d0814 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/右哼哼.gif differ diff --git a/src/main/webapp/images/emoji/qq/右太极.gif b/src/main/webapp/images/emoji/qq/右太极.gif new file mode 100644 index 0000000..d91efc6 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/右太极.gif differ diff --git a/src/main/webapp/images/emoji/qq/吐.gif b/src/main/webapp/images/emoji/qq/吐.gif new file mode 100644 index 0000000..c7f9315 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/吐.gif differ diff --git a/src/main/webapp/images/emoji/qq/吓.gif b/src/main/webapp/images/emoji/qq/吓.gif new file mode 100644 index 0000000..5ececcd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/吓.gif differ diff --git a/src/main/webapp/images/emoji/qq/吻.gif b/src/main/webapp/images/emoji/qq/吻.gif new file mode 100644 index 0000000..d498bb0 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/吻.gif differ diff --git a/src/main/webapp/images/emoji/qq/呲牙.gif b/src/main/webapp/images/emoji/qq/呲牙.gif new file mode 100644 index 0000000..f84ea24 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/呲牙.gif differ diff --git a/src/main/webapp/images/emoji/qq/咒骂.gif b/src/main/webapp/images/emoji/qq/咒骂.gif new file mode 100644 index 0000000..47d225b Binary files /dev/null and b/src/main/webapp/images/emoji/qq/咒骂.gif differ diff --git a/src/main/webapp/images/emoji/qq/咖啡.gif b/src/main/webapp/images/emoji/qq/咖啡.gif new file mode 100644 index 0000000..b793271 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/咖啡.gif differ diff --git a/src/main/webapp/images/emoji/qq/哈欠.gif b/src/main/webapp/images/emoji/qq/哈欠.gif new file mode 100644 index 0000000..5ee910d Binary files /dev/null and b/src/main/webapp/images/emoji/qq/哈欠.gif differ diff --git a/src/main/webapp/images/emoji/qq/啤酒.gif b/src/main/webapp/images/emoji/qq/啤酒.gif new file mode 100644 index 0000000..f8e5a2a Binary files /dev/null and b/src/main/webapp/images/emoji/qq/啤酒.gif differ diff --git a/src/main/webapp/images/emoji/qq/喝彩.gif b/src/main/webapp/images/emoji/qq/喝彩.gif new file mode 100644 index 0000000..6e84245 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/喝彩.gif differ diff --git a/src/main/webapp/images/emoji/qq/嗅大了.gif b/src/main/webapp/images/emoji/qq/嗅大了.gif new file mode 100644 index 0000000..d809261 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/嗅大了.gif differ diff --git a/src/main/webapp/images/emoji/qq/嘘.gif b/src/main/webapp/images/emoji/qq/嘘.gif new file mode 100644 index 0000000..ff5f916 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/嘘.gif differ diff --git a/src/main/webapp/images/emoji/qq/囍.gif b/src/main/webapp/images/emoji/qq/囍.gif new file mode 100644 index 0000000..d94f960 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/囍.gif differ diff --git a/src/main/webapp/images/emoji/qq/回头.gif b/src/main/webapp/images/emoji/qq/回头.gif new file mode 100644 index 0000000..d7f52e4 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/回头.gif differ diff --git a/src/main/webapp/images/emoji/qq/困.gif b/src/main/webapp/images/emoji/qq/困.gif new file mode 100644 index 0000000..68c70df Binary files /dev/null and b/src/main/webapp/images/emoji/qq/困.gif differ diff --git a/src/main/webapp/images/emoji/qq/坏笑.gif b/src/main/webapp/images/emoji/qq/坏笑.gif new file mode 100644 index 0000000..63e37b7 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/坏笑.gif differ diff --git a/src/main/webapp/images/emoji/qq/多云.gif b/src/main/webapp/images/emoji/qq/多云.gif new file mode 100644 index 0000000..660f0a5 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/多云.gif differ diff --git a/src/main/webapp/images/emoji/qq/夜晚.gif b/src/main/webapp/images/emoji/qq/夜晚.gif new file mode 100644 index 0000000..7573b7f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/夜晚.gif differ diff --git a/src/main/webapp/images/emoji/qq/大兵.gif b/src/main/webapp/images/emoji/qq/大兵.gif new file mode 100644 index 0000000..e2f1710 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/大兵.gif differ diff --git a/src/main/webapp/images/emoji/qq/大哭.gif b/src/main/webapp/images/emoji/qq/大哭.gif new file mode 100644 index 0000000..56427e2 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/大哭.gif differ diff --git a/src/main/webapp/images/emoji/qq/太阳.gif b/src/main/webapp/images/emoji/qq/太阳.gif new file mode 100644 index 0000000..f9874d8 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/太阳.gif differ diff --git a/src/main/webapp/images/emoji/qq/奋斗.gif b/src/main/webapp/images/emoji/qq/奋斗.gif new file mode 100644 index 0000000..453c2d2 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/奋斗.gif differ diff --git a/src/main/webapp/images/emoji/qq/奶瓶.gif b/src/main/webapp/images/emoji/qq/奶瓶.gif new file mode 100644 index 0000000..3547d27 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/奶瓶.gif differ diff --git a/src/main/webapp/images/emoji/qq/委屈.gif b/src/main/webapp/images/emoji/qq/委屈.gif new file mode 100644 index 0000000..c73c5c1 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/委屈.gif differ diff --git a/src/main/webapp/images/emoji/qq/害羞.gif b/src/main/webapp/images/emoji/qq/害羞.gif new file mode 100644 index 0000000..18025fc Binary files /dev/null and b/src/main/webapp/images/emoji/qq/害羞.gif differ diff --git a/src/main/webapp/images/emoji/qq/尴尬.gif b/src/main/webapp/images/emoji/qq/尴尬.gif new file mode 100644 index 0000000..ed2dac2 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/尴尬.gif differ diff --git a/src/main/webapp/images/emoji/qq/左哼哼.gif b/src/main/webapp/images/emoji/qq/左哼哼.gif new file mode 100644 index 0000000..f65ad8a Binary files /dev/null and b/src/main/webapp/images/emoji/qq/左哼哼.gif differ diff --git a/src/main/webapp/images/emoji/qq/左太极.gif b/src/main/webapp/images/emoji/qq/左太极.gif new file mode 100644 index 0000000..f6280ec Binary files /dev/null and b/src/main/webapp/images/emoji/qq/左太极.gif differ diff --git a/src/main/webapp/images/emoji/qq/差劲.gif b/src/main/webapp/images/emoji/qq/差劲.gif new file mode 100644 index 0000000..dceba27 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/差劲.gif differ diff --git a/src/main/webapp/images/emoji/qq/帅.gif b/src/main/webapp/images/emoji/qq/帅.gif new file mode 100644 index 0000000..65459bd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/帅.gif differ diff --git a/src/main/webapp/images/emoji/qq/弱.gif b/src/main/webapp/images/emoji/qq/弱.gif new file mode 100644 index 0000000..b588e18 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/弱.gif differ diff --git a/src/main/webapp/images/emoji/qq/强.gif b/src/main/webapp/images/emoji/qq/强.gif new file mode 100644 index 0000000..1147107 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/强.gif differ diff --git a/src/main/webapp/images/emoji/qq/得意.gif b/src/main/webapp/images/emoji/qq/得意.gif new file mode 100644 index 0000000..05b2d29 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/得意.gif differ diff --git a/src/main/webapp/images/emoji/qq/微笑.gif b/src/main/webapp/images/emoji/qq/微笑.gif new file mode 100644 index 0000000..771e091 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/微笑.gif differ diff --git a/src/main/webapp/images/emoji/qq/心.gif b/src/main/webapp/images/emoji/qq/心.gif new file mode 100644 index 0000000..13600b9 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/心.gif differ diff --git a/src/main/webapp/images/emoji/qq/心碎.gif b/src/main/webapp/images/emoji/qq/心碎.gif new file mode 100644 index 0000000..e9ac6cc Binary files /dev/null and b/src/main/webapp/images/emoji/qq/心碎.gif differ diff --git a/src/main/webapp/images/emoji/qq/快哭了.gif b/src/main/webapp/images/emoji/qq/快哭了.gif new file mode 100644 index 0000000..627ce21 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/快哭了.gif differ diff --git a/src/main/webapp/images/emoji/qq/怄火.gif b/src/main/webapp/images/emoji/qq/怄火.gif new file mode 100644 index 0000000..747c000 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/怄火.gif differ diff --git a/src/main/webapp/images/emoji/qq/惊恐.gif b/src/main/webapp/images/emoji/qq/惊恐.gif new file mode 100644 index 0000000..25a0e2e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/惊恐.gif differ diff --git a/src/main/webapp/images/emoji/qq/惊讶.gif b/src/main/webapp/images/emoji/qq/惊讶.gif new file mode 100644 index 0000000..280d848 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/惊讶.gif differ diff --git a/src/main/webapp/images/emoji/qq/憨笑.gif b/src/main/webapp/images/emoji/qq/憨笑.gif new file mode 100644 index 0000000..3cce229 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/憨笑.gif differ diff --git a/src/main/webapp/images/emoji/qq/戒指.gif b/src/main/webapp/images/emoji/qq/戒指.gif new file mode 100644 index 0000000..aa62536 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/戒指.gif differ diff --git a/src/main/webapp/images/emoji/qq/抓狂.gif b/src/main/webapp/images/emoji/qq/抓狂.gif new file mode 100644 index 0000000..c4d0bf1 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/抓狂.gif differ diff --git a/src/main/webapp/images/emoji/qq/折磨.gif b/src/main/webapp/images/emoji/qq/折磨.gif new file mode 100644 index 0000000..4553061 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/折磨.gif differ diff --git a/src/main/webapp/images/emoji/qq/抠鼻.gif b/src/main/webapp/images/emoji/qq/抠鼻.gif new file mode 100644 index 0000000..e3b4eda Binary files /dev/null and b/src/main/webapp/images/emoji/qq/抠鼻.gif differ diff --git a/src/main/webapp/images/emoji/qq/抱拳.gif b/src/main/webapp/images/emoji/qq/抱拳.gif new file mode 100644 index 0000000..a4aa25f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/抱拳.gif differ diff --git a/src/main/webapp/images/emoji/qq/拥抱.gif b/src/main/webapp/images/emoji/qq/拥抱.gif new file mode 100644 index 0000000..473229f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/拥抱.gif differ diff --git a/src/main/webapp/images/emoji/qq/拳头.gif b/src/main/webapp/images/emoji/qq/拳头.gif new file mode 100644 index 0000000..a5ffd4a Binary files /dev/null and b/src/main/webapp/images/emoji/qq/拳头.gif differ diff --git a/src/main/webapp/images/emoji/qq/挥动.gif b/src/main/webapp/images/emoji/qq/挥动.gif new file mode 100644 index 0000000..0317eed Binary files /dev/null and b/src/main/webapp/images/emoji/qq/挥动.gif differ diff --git a/src/main/webapp/images/emoji/qq/握手.gif b/src/main/webapp/images/emoji/qq/握手.gif new file mode 100644 index 0000000..88b8dc9 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/握手.gif differ diff --git a/src/main/webapp/images/emoji/qq/撇嘴.gif b/src/main/webapp/images/emoji/qq/撇嘴.gif new file mode 100644 index 0000000..fed1397 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/撇嘴.gif differ diff --git a/src/main/webapp/images/emoji/qq/擦汗.gif b/src/main/webapp/images/emoji/qq/擦汗.gif new file mode 100644 index 0000000..06450cd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/擦汗.gif differ diff --git a/src/main/webapp/images/emoji/qq/敲打.gif b/src/main/webapp/images/emoji/qq/敲打.gif new file mode 100644 index 0000000..3f52e3c Binary files /dev/null and b/src/main/webapp/images/emoji/qq/敲打.gif differ diff --git a/src/main/webapp/images/emoji/qq/晕.gif b/src/main/webapp/images/emoji/qq/晕.gif new file mode 100644 index 0000000..eb3cb99 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/晕.gif differ diff --git a/src/main/webapp/images/emoji/qq/枪.gif b/src/main/webapp/images/emoji/qq/枪.gif new file mode 100644 index 0000000..db0495c Binary files /dev/null and b/src/main/webapp/images/emoji/qq/枪.gif differ diff --git a/src/main/webapp/images/emoji/qq/棒棒糖.gif b/src/main/webapp/images/emoji/qq/棒棒糖.gif new file mode 100644 index 0000000..c236e5f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/棒棒糖.gif differ diff --git a/src/main/webapp/images/emoji/qq/气球.gif b/src/main/webapp/images/emoji/qq/气球.gif new file mode 100644 index 0000000..9ff3969 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/气球.gif differ diff --git a/src/main/webapp/images/emoji/qq/沙发.gif b/src/main/webapp/images/emoji/qq/沙发.gif new file mode 100644 index 0000000..fc613d5 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/沙发.gif differ diff --git a/src/main/webapp/images/emoji/qq/流汗.gif b/src/main/webapp/images/emoji/qq/流汗.gif new file mode 100644 index 0000000..da474f1 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/流汗.gif differ diff --git a/src/main/webapp/images/emoji/qq/流泪.gif b/src/main/webapp/images/emoji/qq/流泪.gif new file mode 100644 index 0000000..b50865b Binary files /dev/null and b/src/main/webapp/images/emoji/qq/流泪.gif differ diff --git a/src/main/webapp/images/emoji/qq/激动.gif b/src/main/webapp/images/emoji/qq/激动.gif new file mode 100644 index 0000000..25f1ca4 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/激动.gif differ diff --git a/src/main/webapp/images/emoji/qq/灯.gif b/src/main/webapp/images/emoji/qq/灯.gif new file mode 100644 index 0000000..f15b858 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/灯.gif differ diff --git a/src/main/webapp/images/emoji/qq/灯笼.gif b/src/main/webapp/images/emoji/qq/灯笼.gif new file mode 100644 index 0000000..6d5e50c Binary files /dev/null and b/src/main/webapp/images/emoji/qq/灯笼.gif differ diff --git a/src/main/webapp/images/emoji/qq/炸弹.gif b/src/main/webapp/images/emoji/qq/炸弹.gif new file mode 100644 index 0000000..5574b72 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/炸弹.gif differ diff --git a/src/main/webapp/images/emoji/qq/熊猫.gif b/src/main/webapp/images/emoji/qq/熊猫.gif new file mode 100644 index 0000000..75e7d49 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/熊猫.gif differ diff --git a/src/main/webapp/images/emoji/qq/爆筋.gif b/src/main/webapp/images/emoji/qq/爆筋.gif new file mode 100644 index 0000000..3203d38 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/爆筋.gif differ diff --git a/src/main/webapp/images/emoji/qq/爱你.gif b/src/main/webapp/images/emoji/qq/爱你.gif new file mode 100644 index 0000000..67dd43d Binary files /dev/null and b/src/main/webapp/images/emoji/qq/爱你.gif differ diff --git a/src/main/webapp/images/emoji/qq/爱情.gif b/src/main/webapp/images/emoji/qq/爱情.gif new file mode 100644 index 0000000..c44276e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/爱情.gif differ diff --git a/src/main/webapp/images/emoji/qq/猪头.gif b/src/main/webapp/images/emoji/qq/猪头.gif new file mode 100644 index 0000000..99bb848 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/猪头.gif differ diff --git a/src/main/webapp/images/emoji/qq/献吻.gif b/src/main/webapp/images/emoji/qq/献吻.gif new file mode 100644 index 0000000..3e275a6 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/献吻.gif differ diff --git a/src/main/webapp/images/emoji/qq/玫瑰.gif b/src/main/webapp/images/emoji/qq/玫瑰.gif new file mode 100644 index 0000000..90bbb1e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/玫瑰.gif differ diff --git a/src/main/webapp/images/emoji/qq/瓢虫.gif b/src/main/webapp/images/emoji/qq/瓢虫.gif new file mode 100644 index 0000000..ba69f9e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/瓢虫.gif differ diff --git a/src/main/webapp/images/emoji/qq/疑问.gif b/src/main/webapp/images/emoji/qq/疑问.gif new file mode 100644 index 0000000..6b08420 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/疑问.gif differ diff --git a/src/main/webapp/images/emoji/qq/白眼.gif b/src/main/webapp/images/emoji/qq/白眼.gif new file mode 100644 index 0000000..3aba83f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/白眼.gif differ diff --git a/src/main/webapp/images/emoji/qq/睡.gif b/src/main/webapp/images/emoji/qq/睡.gif new file mode 100644 index 0000000..452d39a Binary files /dev/null and b/src/main/webapp/images/emoji/qq/睡.gif differ diff --git a/src/main/webapp/images/emoji/qq/磕头.gif b/src/main/webapp/images/emoji/qq/磕头.gif new file mode 100644 index 0000000..f1510cd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/磕头.gif differ diff --git a/src/main/webapp/images/emoji/qq/礼物.gif b/src/main/webapp/images/emoji/qq/礼物.gif new file mode 100644 index 0000000..a41a029 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/礼物.gif differ diff --git a/src/main/webapp/images/emoji/qq/篮球.gif b/src/main/webapp/images/emoji/qq/篮球.gif new file mode 100644 index 0000000..63268ee Binary files /dev/null and b/src/main/webapp/images/emoji/qq/篮球.gif differ diff --git a/src/main/webapp/images/emoji/qq/纸巾.gif b/src/main/webapp/images/emoji/qq/纸巾.gif new file mode 100644 index 0000000..78273e8 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/纸巾.gif differ diff --git a/src/main/webapp/images/emoji/qq/胜利.gif b/src/main/webapp/images/emoji/qq/胜利.gif new file mode 100644 index 0000000..5c9c26e Binary files /dev/null and b/src/main/webapp/images/emoji/qq/胜利.gif differ diff --git a/src/main/webapp/images/emoji/qq/色.gif b/src/main/webapp/images/emoji/qq/色.gif new file mode 100644 index 0000000..74567e8 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/色.gif differ diff --git a/src/main/webapp/images/emoji/qq/药丸.gif b/src/main/webapp/images/emoji/qq/药丸.gif new file mode 100644 index 0000000..7baca14 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/药丸.gif differ diff --git a/src/main/webapp/images/emoji/qq/菜刀.gif b/src/main/webapp/images/emoji/qq/菜刀.gif new file mode 100644 index 0000000..3f94a15 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/菜刀.gif differ diff --git a/src/main/webapp/images/emoji/qq/蛋糕.gif b/src/main/webapp/images/emoji/qq/蛋糕.gif new file mode 100644 index 0000000..2536450 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/蛋糕.gif differ diff --git a/src/main/webapp/images/emoji/qq/蜡烛.gif b/src/main/webapp/images/emoji/qq/蜡烛.gif new file mode 100644 index 0000000..cabc787 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/蜡烛.gif differ diff --git a/src/main/webapp/images/emoji/qq/街舞.gif b/src/main/webapp/images/emoji/qq/街舞.gif new file mode 100644 index 0000000..c53fc34 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/街舞.gif differ diff --git a/src/main/webapp/images/emoji/qq/衰.gif b/src/main/webapp/images/emoji/qq/衰.gif new file mode 100644 index 0000000..541575d Binary files /dev/null and b/src/main/webapp/images/emoji/qq/衰.gif differ diff --git a/src/main/webapp/images/emoji/qq/西瓜.gif b/src/main/webapp/images/emoji/qq/西瓜.gif new file mode 100644 index 0000000..f7a2426 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/西瓜.gif differ diff --git a/src/main/webapp/images/emoji/qq/调皮.gif b/src/main/webapp/images/emoji/qq/调皮.gif new file mode 100644 index 0000000..f57d3f0 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/调皮.gif differ diff --git a/src/main/webapp/images/emoji/qq/购物.gif b/src/main/webapp/images/emoji/qq/购物.gif new file mode 100644 index 0000000..d461ccd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/购物.gif differ diff --git a/src/main/webapp/images/emoji/qq/足球.gif b/src/main/webapp/images/emoji/qq/足球.gif new file mode 100644 index 0000000..a3f69ed Binary files /dev/null and b/src/main/webapp/images/emoji/qq/足球.gif differ diff --git a/src/main/webapp/images/emoji/qq/跳绳.gif b/src/main/webapp/images/emoji/qq/跳绳.gif new file mode 100644 index 0000000..398674b Binary files /dev/null and b/src/main/webapp/images/emoji/qq/跳绳.gif differ diff --git a/src/main/webapp/images/emoji/qq/跳跳.gif b/src/main/webapp/images/emoji/qq/跳跳.gif new file mode 100644 index 0000000..c84a223 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/跳跳.gif differ diff --git a/src/main/webapp/images/emoji/qq/车.gif b/src/main/webapp/images/emoji/qq/车.gif new file mode 100644 index 0000000..ec27f60 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/车.gif differ diff --git a/src/main/webapp/images/emoji/qq/车厢.gif b/src/main/webapp/images/emoji/qq/车厢.gif new file mode 100644 index 0000000..132789c Binary files /dev/null and b/src/main/webapp/images/emoji/qq/车厢.gif differ diff --git a/src/main/webapp/images/emoji/qq/转圈.gif b/src/main/webapp/images/emoji/qq/转圈.gif new file mode 100644 index 0000000..bb5b30b Binary files /dev/null and b/src/main/webapp/images/emoji/qq/转圈.gif differ diff --git a/src/main/webapp/images/emoji/qq/邮件.gif b/src/main/webapp/images/emoji/qq/邮件.gif new file mode 100644 index 0000000..2d6dbad Binary files /dev/null and b/src/main/webapp/images/emoji/qq/邮件.gif differ diff --git a/src/main/webapp/images/emoji/qq/鄙视.gif b/src/main/webapp/images/emoji/qq/鄙视.gif new file mode 100644 index 0000000..493cae9 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/鄙视.gif differ diff --git a/src/main/webapp/images/emoji/qq/酷.gif b/src/main/webapp/images/emoji/qq/酷.gif new file mode 100644 index 0000000..e9b4998 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/酷.gif differ diff --git a/src/main/webapp/images/emoji/qq/钱.gif b/src/main/webapp/images/emoji/qq/钱.gif new file mode 100644 index 0000000..ee60e41 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/钱.gif differ diff --git a/src/main/webapp/images/emoji/qq/闪电.gif b/src/main/webapp/images/emoji/qq/闪电.gif new file mode 100644 index 0000000..36bd07d Binary files /dev/null and b/src/main/webapp/images/emoji/qq/闪电.gif differ diff --git a/src/main/webapp/images/emoji/qq/闭嘴.gif b/src/main/webapp/images/emoji/qq/闭嘴.gif new file mode 100644 index 0000000..f3dc4da Binary files /dev/null and b/src/main/webapp/images/emoji/qq/闭嘴.gif differ diff --git a/src/main/webapp/images/emoji/qq/闹钟.gif b/src/main/webapp/images/emoji/qq/闹钟.gif new file mode 100644 index 0000000..7a16979 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/闹钟.gif differ diff --git a/src/main/webapp/images/emoji/qq/阴险.gif b/src/main/webapp/images/emoji/qq/阴险.gif new file mode 100644 index 0000000..4a94f63 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/阴险.gif differ diff --git a/src/main/webapp/images/emoji/qq/难过.gif b/src/main/webapp/images/emoji/qq/难过.gif new file mode 100644 index 0000000..79e8983 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/难过.gif differ diff --git a/src/main/webapp/images/emoji/qq/雨伞.gif b/src/main/webapp/images/emoji/qq/雨伞.gif new file mode 100644 index 0000000..68640f6 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/雨伞.gif differ diff --git a/src/main/webapp/images/emoji/qq/青蛙.gif b/src/main/webapp/images/emoji/qq/青蛙.gif new file mode 100644 index 0000000..b24cadd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/青蛙.gif differ diff --git a/src/main/webapp/images/emoji/qq/面条.gif b/src/main/webapp/images/emoji/qq/面条.gif new file mode 100644 index 0000000..1678284 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/面条.gif differ diff --git a/src/main/webapp/images/emoji/qq/鞭炮.gif b/src/main/webapp/images/emoji/qq/鞭炮.gif new file mode 100644 index 0000000..edcf9da Binary files /dev/null and b/src/main/webapp/images/emoji/qq/鞭炮.gif differ diff --git a/src/main/webapp/images/emoji/qq/风车.gif b/src/main/webapp/images/emoji/qq/风车.gif new file mode 100644 index 0000000..7f0d8b4 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/风车.gif differ diff --git a/src/main/webapp/images/emoji/qq/飞吻.gif b/src/main/webapp/images/emoji/qq/飞吻.gif new file mode 100644 index 0000000..b259c8f Binary files /dev/null and b/src/main/webapp/images/emoji/qq/飞吻.gif differ diff --git a/src/main/webapp/images/emoji/qq/飞机.gif b/src/main/webapp/images/emoji/qq/飞机.gif new file mode 100644 index 0000000..61f65dd Binary files /dev/null and b/src/main/webapp/images/emoji/qq/飞机.gif differ diff --git a/src/main/webapp/images/emoji/qq/饥饿.gif b/src/main/webapp/images/emoji/qq/饥饿.gif new file mode 100644 index 0000000..8177e33 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/饥饿.gif differ diff --git a/src/main/webapp/images/emoji/qq/饭.gif b/src/main/webapp/images/emoji/qq/饭.gif new file mode 100644 index 0000000..1992bd3 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/饭.gif differ diff --git a/src/main/webapp/images/emoji/qq/香蕉.gif b/src/main/webapp/images/emoji/qq/香蕉.gif new file mode 100644 index 0000000..8e6710b Binary files /dev/null and b/src/main/webapp/images/emoji/qq/香蕉.gif differ diff --git a/src/main/webapp/images/emoji/qq/骷髅.gif b/src/main/webapp/images/emoji/qq/骷髅.gif new file mode 100644 index 0000000..842e8a7 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/骷髅.gif differ diff --git a/src/main/webapp/images/emoji/qq/高铁右车头.gif b/src/main/webapp/images/emoji/qq/高铁右车头.gif new file mode 100644 index 0000000..eed6e40 Binary files /dev/null and b/src/main/webapp/images/emoji/qq/高铁右车头.gif differ diff --git a/src/main/webapp/images/emoji/qq/高铁左车头.gif b/src/main/webapp/images/emoji/qq/高铁左车头.gif new file mode 100644 index 0000000..23de08b Binary files /dev/null and b/src/main/webapp/images/emoji/qq/高铁左车头.gif differ diff --git a/src/main/webapp/images/emoji/qq/鼓掌.gif b/src/main/webapp/images/emoji/qq/鼓掌.gif new file mode 100644 index 0000000..b955b1c Binary files /dev/null and b/src/main/webapp/images/emoji/qq/鼓掌.gif differ diff --git a/src/main/webapp/images/emoji/tieba/haha.png b/src/main/webapp/images/emoji/tieba/haha.png new file mode 100644 index 0000000..38a9761 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/haha.png differ diff --git a/src/main/webapp/images/emoji/tieba/不高兴.png b/src/main/webapp/images/emoji/tieba/不高兴.png new file mode 100644 index 0000000..4d02d8c Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/不高兴.png differ diff --git a/src/main/webapp/images/emoji/tieba/乖.png b/src/main/webapp/images/emoji/tieba/乖.png new file mode 100644 index 0000000..9d01507 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/乖.png differ diff --git a/src/main/webapp/images/emoji/tieba/冷.png b/src/main/webapp/images/emoji/tieba/冷.png new file mode 100644 index 0000000..a9c36aa Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/冷.png differ diff --git a/src/main/webapp/images/emoji/tieba/勉强.png b/src/main/webapp/images/emoji/tieba/勉强.png new file mode 100644 index 0000000..d344145 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/勉强.png differ diff --git a/src/main/webapp/images/emoji/tieba/吐.png b/src/main/webapp/images/emoji/tieba/吐.png new file mode 100644 index 0000000..e5d423f Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/吐.png differ diff --git a/src/main/webapp/images/emoji/tieba/吐舌.png b/src/main/webapp/images/emoji/tieba/吐舌.png new file mode 100644 index 0000000..5384fff Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/吐舌.png differ diff --git a/src/main/webapp/images/emoji/tieba/呵呵.png b/src/main/webapp/images/emoji/tieba/呵呵.png new file mode 100644 index 0000000..7ae2945 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/呵呵.png differ diff --git a/src/main/webapp/images/emoji/tieba/呼.png b/src/main/webapp/images/emoji/tieba/呼.png new file mode 100644 index 0000000..e0efa4c Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/呼.png differ diff --git a/src/main/webapp/images/emoji/tieba/咦.png b/src/main/webapp/images/emoji/tieba/咦.png new file mode 100644 index 0000000..897d093 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/咦.png differ diff --git a/src/main/webapp/images/emoji/tieba/哈哈.png b/src/main/webapp/images/emoji/tieba/哈哈.png new file mode 100644 index 0000000..4efc70e Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/哈哈.png differ diff --git a/src/main/webapp/images/emoji/tieba/啊.png b/src/main/webapp/images/emoji/tieba/啊.png new file mode 100644 index 0000000..f2e4758 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/啊.png differ diff --git a/src/main/webapp/images/emoji/tieba/喷.png b/src/main/webapp/images/emoji/tieba/喷.png new file mode 100644 index 0000000..db58ab6 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/喷.png differ diff --git a/src/main/webapp/images/emoji/tieba/大拇指.png b/src/main/webapp/images/emoji/tieba/大拇指.png new file mode 100644 index 0000000..330b993 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/大拇指.png differ diff --git a/src/main/webapp/images/emoji/tieba/太开心.png b/src/main/webapp/images/emoji/tieba/太开心.png new file mode 100644 index 0000000..e20bf5a Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/太开心.png differ diff --git a/src/main/webapp/images/emoji/tieba/委屈.png b/src/main/webapp/images/emoji/tieba/委屈.png new file mode 100644 index 0000000..60078fb Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/委屈.png differ diff --git a/src/main/webapp/images/emoji/tieba/开心.png b/src/main/webapp/images/emoji/tieba/开心.png new file mode 100644 index 0000000..8b71226 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/开心.png differ diff --git a/src/main/webapp/images/emoji/tieba/弱.png b/src/main/webapp/images/emoji/tieba/弱.png new file mode 100644 index 0000000..39c3c4c Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/弱.png differ diff --git a/src/main/webapp/images/emoji/tieba/彩虹.png b/src/main/webapp/images/emoji/tieba/彩虹.png new file mode 100644 index 0000000..17cd953 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/彩虹.png differ diff --git a/src/main/webapp/images/emoji/tieba/怒.png b/src/main/webapp/images/emoji/tieba/怒.png new file mode 100644 index 0000000..01a001f Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/怒.png differ diff --git a/src/main/webapp/images/emoji/tieba/惊哭.png b/src/main/webapp/images/emoji/tieba/惊哭.png new file mode 100644 index 0000000..8873fc2 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/惊哭.png differ diff --git a/src/main/webapp/images/emoji/tieba/惊讶.png b/src/main/webapp/images/emoji/tieba/惊讶.png new file mode 100644 index 0000000..17e5394 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/惊讶.png differ diff --git a/src/main/webapp/images/emoji/tieba/汗.png b/src/main/webapp/images/emoji/tieba/汗.png new file mode 100644 index 0000000..40e5525 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/汗.png differ diff --git a/src/main/webapp/images/emoji/tieba/泪.png b/src/main/webapp/images/emoji/tieba/泪.png new file mode 100644 index 0000000..81059fd Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/泪.png differ diff --git a/src/main/webapp/images/emoji/tieba/滑稽.png b/src/main/webapp/images/emoji/tieba/滑稽.png new file mode 100644 index 0000000..ec1e883 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/滑稽.png differ diff --git a/src/main/webapp/images/emoji/tieba/灯泡.png b/src/main/webapp/images/emoji/tieba/灯泡.png new file mode 100644 index 0000000..a61038e Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/灯泡.png differ diff --git a/src/main/webapp/images/emoji/tieba/狂汗.png b/src/main/webapp/images/emoji/tieba/狂汗.png new file mode 100644 index 0000000..13c904f Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/狂汗.png differ diff --git a/src/main/webapp/images/emoji/tieba/玫瑰.png b/src/main/webapp/images/emoji/tieba/玫瑰.png new file mode 100644 index 0000000..4e9487d Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/玫瑰.png differ diff --git a/src/main/webapp/images/emoji/tieba/生气.png b/src/main/webapp/images/emoji/tieba/生气.png new file mode 100644 index 0000000..49bb3a6 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/生气.png differ diff --git a/src/main/webapp/images/emoji/tieba/疑问.png b/src/main/webapp/images/emoji/tieba/疑问.png new file mode 100644 index 0000000..066b1a8 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/疑问.png differ diff --git a/src/main/webapp/images/emoji/tieba/真棒.png b/src/main/webapp/images/emoji/tieba/真棒.png new file mode 100644 index 0000000..11f27da Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/真棒.png differ diff --git a/src/main/webapp/images/emoji/tieba/睡觉.png b/src/main/webapp/images/emoji/tieba/睡觉.png new file mode 100644 index 0000000..6aee686 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/睡觉.png differ diff --git a/src/main/webapp/images/emoji/tieba/礼物.png b/src/main/webapp/images/emoji/tieba/礼物.png new file mode 100644 index 0000000..47b50c2 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/礼物.png differ diff --git a/src/main/webapp/images/emoji/tieba/笑眼.png b/src/main/webapp/images/emoji/tieba/笑眼.png new file mode 100644 index 0000000..3d6d24b Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/笑眼.png differ diff --git a/src/main/webapp/images/emoji/tieba/胜利.png b/src/main/webapp/images/emoji/tieba/胜利.png new file mode 100644 index 0000000..4962ee2 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/胜利.png differ diff --git a/src/main/webapp/images/emoji/tieba/花心.png b/src/main/webapp/images/emoji/tieba/花心.png new file mode 100644 index 0000000..77a8d90 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/花心.png differ diff --git a/src/main/webapp/images/emoji/tieba/茶杯.png b/src/main/webapp/images/emoji/tieba/茶杯.png new file mode 100644 index 0000000..f3e49da Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/茶杯.png differ diff --git a/src/main/webapp/images/emoji/tieba/鄙视.png b/src/main/webapp/images/emoji/tieba/鄙视.png new file mode 100644 index 0000000..9b8c57d Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/鄙视.png differ diff --git a/src/main/webapp/images/emoji/tieba/酷.png b/src/main/webapp/images/emoji/tieba/酷.png new file mode 100644 index 0000000..f49d825 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/酷.png differ diff --git a/src/main/webapp/images/emoji/tieba/钱.png b/src/main/webapp/images/emoji/tieba/钱.png new file mode 100644 index 0000000..3fd0151 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/钱.png differ diff --git a/src/main/webapp/images/emoji/tieba/钱币.png b/src/main/webapp/images/emoji/tieba/钱币.png new file mode 100644 index 0000000..ceba562 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/钱币.png differ diff --git a/src/main/webapp/images/emoji/tieba/阴险.png b/src/main/webapp/images/emoji/tieba/阴险.png new file mode 100644 index 0000000..0b75730 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/阴险.png differ diff --git a/src/main/webapp/images/emoji/tieba/音乐.png b/src/main/webapp/images/emoji/tieba/音乐.png new file mode 100644 index 0000000..b918ca9 Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/音乐.png differ diff --git a/src/main/webapp/images/emoji/tieba/黑线.png b/src/main/webapp/images/emoji/tieba/黑线.png new file mode 100644 index 0000000..cfc1e8e Binary files /dev/null and b/src/main/webapp/images/emoji/tieba/黑线.png differ diff --git a/src/main/webapp/images/emoji/weibo/aini.png b/src/main/webapp/images/emoji/weibo/aini.png new file mode 100644 index 0000000..d0fdeb6 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/aini.png differ diff --git a/src/main/webapp/images/emoji/weibo/aoteman.png b/src/main/webapp/images/emoji/weibo/aoteman.png new file mode 100644 index 0000000..6feaa60 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/aoteman.png differ diff --git a/src/main/webapp/images/emoji/weibo/baibai.png b/src/main/webapp/images/emoji/weibo/baibai.png new file mode 100644 index 0000000..e16215f Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/baibai.png differ diff --git a/src/main/webapp/images/emoji/weibo/beishang.png b/src/main/webapp/images/emoji/weibo/beishang.png new file mode 100644 index 0000000..f2b03c7 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/beishang.png differ diff --git a/src/main/webapp/images/emoji/weibo/bishi.png b/src/main/webapp/images/emoji/weibo/bishi.png new file mode 100644 index 0000000..a94330f Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/bishi.png differ diff --git a/src/main/webapp/images/emoji/weibo/bizui.png b/src/main/webapp/images/emoji/weibo/bizui.png new file mode 100644 index 0000000..2ae08f9 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/bizui.png differ diff --git a/src/main/webapp/images/emoji/weibo/chanzui.png b/src/main/webapp/images/emoji/weibo/chanzui.png new file mode 100644 index 0000000..b3fda40 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/chanzui.png differ diff --git a/src/main/webapp/images/emoji/weibo/chijing.png b/src/main/webapp/images/emoji/weibo/chijing.png new file mode 100644 index 0000000..4c30500 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/chijing.png differ diff --git a/src/main/webapp/images/emoji/weibo/dahaqi.png b/src/main/webapp/images/emoji/weibo/dahaqi.png new file mode 100644 index 0000000..a73f634 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dahaqi.png differ diff --git a/src/main/webapp/images/emoji/weibo/dalian.png b/src/main/webapp/images/emoji/weibo/dalian.png new file mode 100644 index 0000000..797950b Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dalian.png differ diff --git a/src/main/webapp/images/emoji/weibo/ding.png b/src/main/webapp/images/emoji/weibo/ding.png new file mode 100644 index 0000000..ed42024 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/ding.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog1.png b/src/main/webapp/images/emoji/weibo/dog1.png new file mode 100644 index 0000000..b91162f Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog1.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog10.png b/src/main/webapp/images/emoji/weibo/dog10.png new file mode 100644 index 0000000..6da50ae Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog10.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog11.png b/src/main/webapp/images/emoji/weibo/dog11.png new file mode 100644 index 0000000..e4b8edb Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog11.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog12.png b/src/main/webapp/images/emoji/weibo/dog12.png new file mode 100644 index 0000000..6777867 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog12.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog13.png b/src/main/webapp/images/emoji/weibo/dog13.png new file mode 100644 index 0000000..d5f8215 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog13.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog14.png b/src/main/webapp/images/emoji/weibo/dog14.png new file mode 100644 index 0000000..811a96d Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog14.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog15.png b/src/main/webapp/images/emoji/weibo/dog15.png new file mode 100644 index 0000000..82ceafd Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog15.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog2.png b/src/main/webapp/images/emoji/weibo/dog2.png new file mode 100644 index 0000000..f10cb37 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog2.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog3.png b/src/main/webapp/images/emoji/weibo/dog3.png new file mode 100644 index 0000000..33c3053 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog3.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog4.png b/src/main/webapp/images/emoji/weibo/dog4.png new file mode 100644 index 0000000..19780ae Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog4.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog5.png b/src/main/webapp/images/emoji/weibo/dog5.png new file mode 100644 index 0000000..6cda8f5 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog5.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog6.png b/src/main/webapp/images/emoji/weibo/dog6.png new file mode 100644 index 0000000..19f8a92 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog6.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog7.png b/src/main/webapp/images/emoji/weibo/dog7.png new file mode 100644 index 0000000..3a66611 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog7.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog8.png b/src/main/webapp/images/emoji/weibo/dog8.png new file mode 100644 index 0000000..e0b0c7c Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog8.png differ diff --git a/src/main/webapp/images/emoji/weibo/dog9.png b/src/main/webapp/images/emoji/weibo/dog9.png new file mode 100644 index 0000000..ad26e88 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/dog9.png differ diff --git a/src/main/webapp/images/emoji/weibo/doge.png b/src/main/webapp/images/emoji/weibo/doge.png new file mode 100644 index 0000000..43a4599 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/doge.png differ diff --git a/src/main/webapp/images/emoji/weibo/erha.png b/src/main/webapp/images/emoji/weibo/erha.png new file mode 100644 index 0000000..c3fd9fe Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/erha.png differ diff --git a/src/main/webapp/images/emoji/weibo/feizao.png b/src/main/webapp/images/emoji/weibo/feizao.png new file mode 100644 index 0000000..d6860e4 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/feizao.png differ diff --git a/src/main/webapp/images/emoji/weibo/ganmao.png b/src/main/webapp/images/emoji/weibo/ganmao.png new file mode 100644 index 0000000..e52b4e3 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/ganmao.png differ diff --git a/src/main/webapp/images/emoji/weibo/geili.png b/src/main/webapp/images/emoji/weibo/geili.png new file mode 100644 index 0000000..167f1e2 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/geili.png differ diff --git a/src/main/webapp/images/emoji/weibo/guzhang.png b/src/main/webapp/images/emoji/weibo/guzhang.png new file mode 100644 index 0000000..c0ffa94 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/guzhang.png differ diff --git a/src/main/webapp/images/emoji/weibo/haha.png b/src/main/webapp/images/emoji/weibo/haha.png new file mode 100644 index 0000000..1b63c14 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/haha.png differ diff --git a/src/main/webapp/images/emoji/weibo/haixiu.png b/src/main/webapp/images/emoji/weibo/haixiu.png new file mode 100644 index 0000000..945d073 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/haixiu.png differ diff --git a/src/main/webapp/images/emoji/weibo/hehe.png b/src/main/webapp/images/emoji/weibo/hehe.png new file mode 100644 index 0000000..1c712e1 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/hehe.png differ diff --git a/src/main/webapp/images/emoji/weibo/heixian.png b/src/main/webapp/images/emoji/weibo/heixian.png new file mode 100644 index 0000000..ef3fc8e Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/heixian.png differ diff --git a/src/main/webapp/images/emoji/weibo/heng.png b/src/main/webapp/images/emoji/weibo/heng.png new file mode 100644 index 0000000..6f96b89 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/heng.png differ diff --git a/src/main/webapp/images/emoji/weibo/huaxin.png b/src/main/webapp/images/emoji/weibo/huaxin.png new file mode 100644 index 0000000..bbb00ac Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/huaxin.png differ diff --git a/src/main/webapp/images/emoji/weibo/hufen.png b/src/main/webapp/images/emoji/weibo/hufen.png new file mode 100644 index 0000000..60f1920 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/hufen.png differ diff --git a/src/main/webapp/images/emoji/weibo/jiong.png b/src/main/webapp/images/emoji/weibo/jiong.png new file mode 100644 index 0000000..a1e4d46 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/jiong.png differ diff --git a/src/main/webapp/images/emoji/weibo/jiyan.png b/src/main/webapp/images/emoji/weibo/jiyan.png new file mode 100644 index 0000000..88fdda4 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/jiyan.png differ diff --git a/src/main/webapp/images/emoji/weibo/keai.png b/src/main/webapp/images/emoji/weibo/keai.png new file mode 100644 index 0000000..31ca74e Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/keai.png differ diff --git a/src/main/webapp/images/emoji/weibo/kelian.png b/src/main/webapp/images/emoji/weibo/kelian.png new file mode 100644 index 0000000..f8de4cc Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/kelian.png differ diff --git a/src/main/webapp/images/emoji/weibo/ku.png b/src/main/webapp/images/emoji/weibo/ku.png new file mode 100644 index 0000000..c7a0edf Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/ku.png differ diff --git a/src/main/webapp/images/emoji/weibo/kun.png b/src/main/webapp/images/emoji/weibo/kun.png new file mode 100644 index 0000000..3f3a18e Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/kun.png differ diff --git a/src/main/webapp/images/emoji/weibo/landelini.png b/src/main/webapp/images/emoji/weibo/landelini.png new file mode 100644 index 0000000..63c7ecd Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/landelini.png differ diff --git a/src/main/webapp/images/emoji/weibo/lei.png b/src/main/webapp/images/emoji/weibo/lei.png new file mode 100644 index 0000000..b4cff37 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/lei.png differ diff --git a/src/main/webapp/images/emoji/weibo/meng.png b/src/main/webapp/images/emoji/weibo/meng.png new file mode 100644 index 0000000..d8abb58 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/meng.png differ diff --git a/src/main/webapp/images/emoji/weibo/miao.png b/src/main/webapp/images/emoji/weibo/miao.png new file mode 100644 index 0000000..f54342f Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/miao.png differ diff --git a/src/main/webapp/images/emoji/weibo/nanhaier.png b/src/main/webapp/images/emoji/weibo/nanhaier.png new file mode 100644 index 0000000..259dc76 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/nanhaier.png differ diff --git a/src/main/webapp/images/emoji/weibo/nu.png b/src/main/webapp/images/emoji/weibo/nu.png new file mode 100644 index 0000000..82cd95f Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/nu.png differ diff --git a/src/main/webapp/images/emoji/weibo/numa.png b/src/main/webapp/images/emoji/weibo/numa.png new file mode 100644 index 0000000..7b09e6b Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/numa.png differ diff --git a/src/main/webapp/images/emoji/weibo/nvhaier.png b/src/main/webapp/images/emoji/weibo/nvhaier.png new file mode 100644 index 0000000..995039c Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/nvhaier.png differ diff --git a/src/main/webapp/images/emoji/weibo/qian.png b/src/main/webapp/images/emoji/weibo/qian.png new file mode 100644 index 0000000..2e4c331 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/qian.png differ diff --git a/src/main/webapp/images/emoji/weibo/qinqin.png b/src/main/webapp/images/emoji/weibo/qinqin.png new file mode 100644 index 0000000..54e449b Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/qinqin.png differ diff --git a/src/main/webapp/images/emoji/weibo/shayan.png b/src/main/webapp/images/emoji/weibo/shayan.png new file mode 100644 index 0000000..e74b21c Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shayan.png differ diff --git a/src/main/webapp/images/emoji/weibo/shengbing.png b/src/main/webapp/images/emoji/weibo/shengbing.png new file mode 100644 index 0000000..8a01e6a Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shengbing.png differ diff --git a/src/main/webapp/images/emoji/weibo/shenma.png b/src/main/webapp/images/emoji/weibo/shenma.png new file mode 100644 index 0000000..2ac395a Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shenma.png differ diff --git a/src/main/webapp/images/emoji/weibo/shenshou.png b/src/main/webapp/images/emoji/weibo/shenshou.png new file mode 100644 index 0000000..2729319 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shenshou.png differ diff --git a/src/main/webapp/images/emoji/weibo/shiwang.png b/src/main/webapp/images/emoji/weibo/shiwang.png new file mode 100644 index 0000000..7cf4bc5 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shiwang.png differ diff --git a/src/main/webapp/images/emoji/weibo/shuai.png b/src/main/webapp/images/emoji/weibo/shuai.png new file mode 100644 index 0000000..86fa676 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shuai.png differ diff --git a/src/main/webapp/images/emoji/weibo/shuijiao.png b/src/main/webapp/images/emoji/weibo/shuijiao.png new file mode 100644 index 0000000..2e56d43 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/shuijiao.png differ diff --git a/src/main/webapp/images/emoji/weibo/sikao.png b/src/main/webapp/images/emoji/weibo/sikao.png new file mode 100644 index 0000000..5936f9d Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/sikao.png differ diff --git a/src/main/webapp/images/emoji/weibo/taikaixin.png b/src/main/webapp/images/emoji/weibo/taikaixin.png new file mode 100644 index 0000000..9af674c Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/taikaixin.png differ diff --git a/src/main/webapp/images/emoji/weibo/touxiao.png b/src/main/webapp/images/emoji/weibo/touxiao.png new file mode 100644 index 0000000..a7e9f05 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/touxiao.png differ diff --git a/src/main/webapp/images/emoji/weibo/tu.png b/src/main/webapp/images/emoji/weibo/tu.png new file mode 100644 index 0000000..5344f28 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/tu.png differ diff --git a/src/main/webapp/images/emoji/weibo/tuzi.png b/src/main/webapp/images/emoji/weibo/tuzi.png new file mode 100644 index 0000000..457861b Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/tuzi.png differ diff --git a/src/main/webapp/images/emoji/weibo/v5.png b/src/main/webapp/images/emoji/weibo/v5.png new file mode 100644 index 0000000..574eb45 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/v5.png differ diff --git a/src/main/webapp/images/emoji/weibo/wabishi.png b/src/main/webapp/images/emoji/weibo/wabishi.png new file mode 100644 index 0000000..dad573f Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/wabishi.png differ diff --git a/src/main/webapp/images/emoji/weibo/weiqu.png b/src/main/webapp/images/emoji/weibo/weiqu.png new file mode 100644 index 0000000..8679441 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/weiqu.png differ diff --git a/src/main/webapp/images/emoji/weibo/xi.png b/src/main/webapp/images/emoji/weibo/xi.png new file mode 100644 index 0000000..86d579d Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/xi.png differ diff --git a/src/main/webapp/images/emoji/weibo/xiaoku.png b/src/main/webapp/images/emoji/weibo/xiaoku.png new file mode 100644 index 0000000..065a283 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/xiaoku.png differ diff --git a/src/main/webapp/images/emoji/weibo/xiongmao.png b/src/main/webapp/images/emoji/weibo/xiongmao.png new file mode 100644 index 0000000..6c6e24e Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/xiongmao.png differ diff --git a/src/main/webapp/images/emoji/weibo/xixi.png b/src/main/webapp/images/emoji/weibo/xixi.png new file mode 100644 index 0000000..69731fc Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/xixi.png differ diff --git a/src/main/webapp/images/emoji/weibo/xu.png b/src/main/webapp/images/emoji/weibo/xu.png new file mode 100644 index 0000000..ac54ead Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/xu.png differ diff --git a/src/main/webapp/images/emoji/weibo/yinxian.png b/src/main/webapp/images/emoji/weibo/yinxian.png new file mode 100644 index 0000000..a3df87d Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/yinxian.png differ diff --git a/src/main/webapp/images/emoji/weibo/yiwen.png b/src/main/webapp/images/emoji/weibo/yiwen.png new file mode 100644 index 0000000..21a464c Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/yiwen.png differ diff --git a/src/main/webapp/images/emoji/weibo/youhengheng.png b/src/main/webapp/images/emoji/weibo/youhengheng.png new file mode 100644 index 0000000..eb111bd Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/youhengheng.png differ diff --git a/src/main/webapp/images/emoji/weibo/yun.png b/src/main/webapp/images/emoji/weibo/yun.png new file mode 100644 index 0000000..420d3c5 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/yun.png differ diff --git a/src/main/webapp/images/emoji/weibo/zhi.png b/src/main/webapp/images/emoji/weibo/zhi.png new file mode 100644 index 0000000..2a36406 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/zhi.png differ diff --git a/src/main/webapp/images/emoji/weibo/zhuakuang.png b/src/main/webapp/images/emoji/weibo/zhuakuang.png new file mode 100644 index 0000000..a5a2d32 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/zhuakuang.png differ diff --git a/src/main/webapp/images/emoji/weibo/zhutou.png b/src/main/webapp/images/emoji/weibo/zhutou.png new file mode 100644 index 0000000..4e32c91 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/zhutou.png differ diff --git a/src/main/webapp/images/emoji/weibo/zuiyou.png b/src/main/webapp/images/emoji/weibo/zuiyou.png new file mode 100644 index 0000000..8b247b8 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/zuiyou.png differ diff --git a/src/main/webapp/images/emoji/weibo/zuohengheng.png b/src/main/webapp/images/emoji/weibo/zuohengheng.png new file mode 100644 index 0000000..f0a6a24 Binary files /dev/null and b/src/main/webapp/images/emoji/weibo/zuohengheng.png differ diff --git a/src/main/webapp/images/lingtao.jpg b/src/main/webapp/images/lingtao.jpg new file mode 100644 index 0000000..ecc3482 Binary files /dev/null and b/src/main/webapp/images/lingtao.jpg differ diff --git a/src/main/webapp/images/login.jpg b/src/main/webapp/images/login.jpg new file mode 100644 index 0000000..58ad536 Binary files /dev/null and b/src/main/webapp/images/login.jpg differ diff --git a/src/main/webapp/images/timg.jpg b/src/main/webapp/images/timg.jpg new file mode 100644 index 0000000..b42ac50 Binary files /dev/null and b/src/main/webapp/images/timg.jpg differ diff --git a/src/main/webapp/images/ui-bg_flat_75_ffffff_40x100.png b/src/main/webapp/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..ac8b229 Binary files /dev/null and b/src/main/webapp/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/src/main/webapp/images/ui-bg_glass_65_ffffff_1x400.png b/src/main/webapp/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..42ccba2 Binary files /dev/null and b/src/main/webapp/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/src/main/webapp/images/ui-bg_glass_75_dadada_1x400.png b/src/main/webapp/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..5a46b47 Binary files /dev/null and b/src/main/webapp/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/src/main/webapp/img/bg3.jpg b/src/main/webapp/img/bg3.jpg new file mode 100644 index 0000000..854ab1a Binary files /dev/null and b/src/main/webapp/img/bg3.jpg differ diff --git a/src/main/webapp/img/bg401.jpg b/src/main/webapp/img/bg401.jpg new file mode 100644 index 0000000..339c66c Binary files /dev/null and b/src/main/webapp/img/bg401.jpg differ diff --git a/src/main/webapp/img/handle.jpg b/src/main/webapp/img/handle.jpg new file mode 100644 index 0000000..396373e Binary files /dev/null and b/src/main/webapp/img/handle.jpg differ diff --git a/src/main/webapp/img/logo.jpg b/src/main/webapp/img/logo.jpg new file mode 100644 index 0000000..68d99e1 Binary files /dev/null and b/src/main/webapp/img/logo.jpg differ diff --git a/src/main/webapp/js/acountExpressFee.js b/src/main/webapp/js/acountExpressFee.js new file mode 100644 index 0000000..a230d6b --- /dev/null +++ b/src/main/webapp/js/acountExpressFee.js @@ -0,0 +1,66 @@ +layui.use(['element','table','form','carousel'], function(){ + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 选择的快递方式 + var changeExpress; + // 首重 + var firstPrice = 0; + // 续重 + var continuedPrice = 0; + // 价格 + var expressPrice = 0; + + // 监听选择的快递 + form.on('select(changeExpress)', function (data) { + changeExpress = data.value + console.log(changeExpress) + // 清空省份下拉框 + $('#expressFee').empty() + // 下拉框第一列添加空的option + $('#expressFee').append(new Option("","")); + + // 获取省份下拉框列表 + $.ajax({ + url:"../../getExpressFees", + type : 'GET', + success:function (data) { + if(changeExpress == '普通快递'){ + var datas = data.data.other + }else{ + var datas = data.data.allProvinces + } + $.each(datas, function(index, item) { + $('#expressFee').append( + new Option(item.province, item.firstWeightPrice+','+item.continuedWeightPrice+','+item.province));// 下拉菜单里添加元素 + }); + form.render("select"); + } + }) + }) + + // 监听重量输入框 + $(function(){ + // 输入框的值改变时触发 + $("#weight").on("input",function(e){ + // 保留一位小数 + // $("#price").val((e.delegateTarget.value * provincePrice).toFixed(1)) + expressPrice = (firstPrice + continuedPrice * ($("#weight").val() - 1 > 0 ? Math.ceil($("#weight").val()) - 1 : 0)).toFixed(1) + $("#price").val(expressPrice) + }); + form.on("select(expressFee)",function(selectedData){ + // 获取选中下拉框的价格(格式:首重,续重) + price = selectedData.value + // 首重价格 + firstPrice = parseFloat(price.split(",")[0]) + // 续重价格 + continuedPrice = price.split(",")[1] + // 价格 + expressPrice = (firstPrice + continuedPrice * ($("#weight").val() - 1 > 0 ? Math.ceil($("#weight").val()) - 1 : 0)).toFixed(1) + $("#price").val(expressPrice) + }) + }); +}); diff --git a/src/main/webapp/js/acountExpressFeeTooWeight.js b/src/main/webapp/js/acountExpressFeeTooWeight.js new file mode 100644 index 0000000..68acc7e --- /dev/null +++ b/src/main/webapp/js/acountExpressFeeTooWeight.js @@ -0,0 +1,66 @@ +layui.use(['element','table','form','carousel'], function(){ + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 选择的快递方式 + var changeExpress; + // 首重 + var firstPrice = 0; + // 续重 + var continuedPrice = 0; + // 价格 + var expressPrice = 0; + + // 监听选择的快递 + form.on('select(changeExpress)', function (data) { + changeExpress = data.value + console.log(changeExpress) + // 清空省份下拉框 + $('#expressFee').empty() + // 下拉框第一列添加空的option + $('#expressFee').append(new Option("","")); + + // 获取省份下拉框列表 + $.ajax({ + url:"../../getExpressFees", + type : 'GET', + success:function (data) { + if(changeExpress == '普通快递'){ + var datas = data.data.tao + }else{ + var datas = data.data.allProvinces + } + $.each(datas, function(index, item) { + $('#expressFee').append( + new Option(item.province, item.firstWeightPrice+','+item.continuedWeightPrice+','+item.province));// 下拉菜单里添加元素 + }); + form.render("select"); + } + }) + }) + + // 监听重量输入框 + $(function(){ + // 输入框的值改变时触发 + $("#weight").on("input",function(e){ + // 保留一位小数 + // $("#price").val((e.delegateTarget.value * provincePrice).toFixed(1)) + expressPrice = (firstPrice + continuedPrice * ($("#weight").val() - 1 > 0 ? Math.ceil($("#weight").val()) - 1 : 0)).toFixed(1) + $("#price").val(expressPrice) + }); + form.on("select(expressFee)",function(selectedData){ + // 获取选中下拉框的价格(格式:首重,续重) + price = selectedData.value + // 首重价格 + firstPrice = parseFloat(price.split(",")[0]) + // 续重价格 + continuedPrice = price.split(",")[1] + // 价格 + expressPrice = (firstPrice + continuedPrice * ($("#weight").val() - 1 > 0 ? Math.ceil($("#weight").val()) - 1 : 0)).toFixed(1) + $("#price").val(expressPrice) + }) + }); +}); diff --git a/src/main/webapp/js/article.js b/src/main/webapp/js/article.js new file mode 100644 index 0000000..259abb0 --- /dev/null +++ b/src/main/webapp/js/article.js @@ -0,0 +1,178 @@ +layui.use([ 'table', 'form', 'element', 'upload' ], function() { + var $ = layui.jquery + table = layui.table, + form = layui.form, + element = layui.element, + upload = layui.upload; + + // 生成表格 + table.render({ + elem : '#articleTable', + url : '../../getArticle', + toolbar : '#toolbarDemoArticle', + title : "文章",// 导出名 + id : 'articleAll', + // skin : 'row', + // size :'lg', + border : true, + page : true, + limits : [ 10, 30, 50, 80, 100, 999 ], + where : { + title : '', + type : '' + }, + cols : [ [ + /* + * { type: 'checkbox' }, + */ + { + type : 'numbers', + title : '序号', + unresize : true + }, { + field : 'title', + align : "center", + title : '文章标题' + }, { + field : 'content', + align : "center", + title : '摘要' + }, { + field : 'createBy', + align : "center", + width : 120, + title : '添加人' + }, { + fixed : 'right', + title : '操作', + align : "center", + toolbar : '#barDemoArticle' + } ] ], + parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, // 解析接口状态 + "msg" : "", // 解析提示文本 + "count" : res.data.articles.total,// 解析数据长度 + "data" : res.data.articles.list + // 解析数据列表 + }; + } + }); + //点击查询按钮,重载文章表格 + $('#searchArticle').on('click', function() { + table.reload('articleAll', { + method : 'post', + where : { + title : $("#title").val(), + type : $("#type").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + + //监听头工具栏事件--新增文章按钮 + table.on('toolbar(articleTable)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id), + data = checkStatus.data; //获取选中的数据 + switch (obj.event) { + case 'add': + layer.open({ + type: 2, + title: "添加文章", + area: ['900px','600px'], + skin: "layui-layer-molv", + content: './addArticle.jsp', + }); + break; + }; + }); + + //监听表格操作按钮--文章编辑 + table.on('tool(articleTable)',function(obj){ + if(obj.event === 'edit'){ + layer.open({ + type: 2, + title: "修改信息", + area: ['900px','600px'], + skin: "layui-layer-molv", + fix: false, //不固定 + //btn: ['取消'],//弹出层按钮 + maxmin: true, + content: './updateArticle.jsp', + success: function(layero, index){ + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象 + body.find('#id').val(obj.data.id); + body.find('#titleUp').val(obj.data.title); + body.find('#typeUp').val(obj.data.type); + body.find('#CONTENT').val(obj.data.content); + body.find('#contentUp').val(obj.data.content); + } + }); + /* $.get("<%=basePath%>/updateArticle",function (str) { + layer.open({ + type: 2, + title : '修改文章', + content : 'updateArticle.jsp', + area: ['900px','600px'], + skin:'layui-layer-molv', + btn:['确定','取消'], + success:function(){ + $.get('<%=basePath%>/articleInfo',{id:obj.data.id},function (data) { + //显示数据 + console.log(data.data.article.title) + layui.form.val('articleForm',{ + 'title' : data.data.article.title, + 'type' :data.data.article.type + }); + }); + }, + yes : function () { + + } + }); + });*/ + }else if(obj.event === 'info'){ + layer.open({ + type: 2, + title: "", + area: ['100%','100%'], + skin: "layui-layer-molv", + fix: false, //不固定 + //btn: ['取消'],//弹出层按钮 + maxmin: true, + content: './infoArticle.jsp', + success: function(layero, index){ + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象 + body.find('#id').val(obj.data.id); + body.find('#titleUp').val(obj.data.title); + body.find('#typeUp').val(obj.data.type); + body.find('#contentUp').val(obj.data.content); + } + }); + }else if(obj.event === 'del'){ + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../deleteArticle", + data:{'id': obj.data.id}, + type:"post", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 1100); + } + }); + }); + } + }); +}); \ No newline at end of file diff --git a/src/main/webapp/js/bug.js b/src/main/webapp/js/bug.js new file mode 100644 index 0000000..7988d38 --- /dev/null +++ b/src/main/webapp/js/bug.js @@ -0,0 +1,87 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#bugTable', + url : '../../../getBugs', + toolbar : '#toolbarDemo', + title : '系统问题表',// 导出文件名 + id : 'bugTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + username :'', + realname :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'createBy', + width : 150, + title : '提交者' + },{ + field : 'bugRemark', + title : '状态' + },{ + field : 'createDate', + title : '创建时间', + width : 180, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.list.length,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('bugTableAll', { + method : 'post', + where : { + realname : $("#realname").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(bugTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "提交问题", + fix: false, //不固定 + maxmin: true, + area : [ '45%', '70%' ], + content : './addBug.jsp', + }); + break; + } + ; + }); +}); diff --git a/src/main/webapp/js/carousel.js b/src/main/webapp/js/carousel.js new file mode 100644 index 0000000..62a8d0a --- /dev/null +++ b/src/main/webapp/js/carousel.js @@ -0,0 +1,43 @@ +layui.use(['table','form','carousel'], function(){ + var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功 + var carousel = layui.carousel; + //建造实例 + ins = carousel.render({ }); + + var html = " "; + var remark = " "; + // 清空轮播图 + $("#carousel").empty(); + $("#remark").empty(); + $.ajax({ + url:"../../getImgs", + type:"GET", + data:{ + proTypeValue : $("#proTypeValue").val(), + }, + success : function(result) { + for (let i = 0; i < result.length; i++) { + // 只留一个remark + remark = ""; + html += '

'; + remark += '
' +result[i].remark+ '
'; + } + $("#carousel").append(html); + // 如果没有说明,就不显示null + if(remark.indexOf("null") < 0){ + $("#remark").append(remark); + } + // 如果没有轮播图就隐藏 + if(result.length == 0){ + document.getElementById("test1").style.display = "none"; //隐藏 + }else{ + document.getElementById("test1").style.display = "block"; //显示 + ins.reload({ + elem: '#test1', + width: result[0].imgWidth, //设置容器宽度 + height: result[0].imgHeight + }); + } + } + }); +}); \ No newline at end of file diff --git a/src/main/webapp/js/customerAward.js b/src/main/webapp/js/customerAward.js new file mode 100644 index 0000000..5a44026 --- /dev/null +++ b/src/main/webapp/js/customerAward.js @@ -0,0 +1,274 @@ +layui.use([ 'element', 'table', 'laydate','util', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var util = layui.util; + var form = layui.form; + var upload = layui.upload; + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getArardShopname', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#shopname').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + + // 生成表格 + table.render({ + elem : '#bugTable', + url : '../../../getCustomerAward', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'awardTableAll', + totalRow: true, + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + nickname : '', + shopname : '', + creator : '', + createTimeBegin: '' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ + { + type: 'checkbox' + }, + { + type : 'numbers', + title : '序号', + width : 50, + totalRowText: '合计' + },{ + field : 'nickname', + title : '客服昵称', + width : 150, + align : "center" + },{ + field : 'shopname', + title : '店铺', + width : 150, + align : "center" + },{ + field : 'payPercent', + width : 150, + align : "center", + title : '询单-转化百分比' + },{ + field : 'askNumber', + width : 100, + align : "center", + title : '询单人数' + },{ + field : 'customerPrice', + width : 100, + align : "center", + title : '客单价' + },{ + field : 'award', + width : 100, + align : "center", + title : '奖励金额', + totalRow: true + },{ + field : 'awardDate', + width : 120, + align : "center", + title : '奖励日期', + },{ + field : 'creator', + width : 100, + align : "center", + title : '导入人' + },{ + field : 'createrDate', + width : 180, + align : "center", + title : '导入时间', + templet:function(d){ + return util.toDateString(d.createrDate, "yyyy-MM-dd HH:mm:ss"); + } + }] + ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('awardTableAll', { + method : 'post', + where : { + nickname : $("#nickname").val(), + shopname : $("#shopname").val(), + creator : $("#creator").val(), + createTimeBegin : $("#worldId").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + //激活批量删除 + function activeDelFunction(){ + $('.demoTable .layui-btn').on('click', function(){ + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + } + activeDelFunction(); + //执行批量删除 + var $ = layui.$,active = { + getCheckData: function(){ //获取选中数据 + var checkStatus = table.checkStatus('awardTableAll'), + checkData = checkStatus.data, + ids="", + creator=""; + + if(checkData.length == 0){ + layer.msg("请选择要删除的数据",function(){}); + return; + } + for (var i = 0; i < checkData.length; i++) { + ids+=checkData[i].id+","; + creator+=checkData[i].creator+","; + } + //var ids = JSON.stringify(delList); + layer.confirm('确定要删除这['+checkData.length+'条]数据么?',{icon:5,title:'友情提示'}, function(index){ + $.ajax({ + url:"../../../deleteDatas", + dataType:'json', + data:{ + ids:ids, + creators:creator + }, + type:'post', + success:function(data){ + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面表格 + }, 1000); + } + }); + return false; + }); + } + }; + + // 监听头部工作栏的 新增用户 + table.on('toolbar(bugTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_customerAward', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#shopname").empty(); + // 下拉框第一列添加空的option + $('#shopname').append(new Option("","")); + activeFunction(); + table.reload("awardTableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/customerData.js b/src/main/webapp/js/customerData.js new file mode 100644 index 0000000..44c328e --- /dev/null +++ b/src/main/webapp/js/customerData.js @@ -0,0 +1,277 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + var isBuyData = { + 0:'未成交', + 1:'已成交' + }; + // 生成表格 + table.render({ + elem : '#dataTable', + url : '../../../getCustomerDatas', + toolbar : '#toolbarDemo', + title : '客服数据表',// 导出文件名 + id : 'dataTableAll', + // 开启分页 + // page : true, + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,30,50,80,100,999], + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + realname : '', + wangwang : '', + isBuy : '', + roleSearch :'', + createDateBegin: '', + role : $("#role").val() + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'realname', + align : 'center', + width : 90, + title : '姓名' + },{ + field : 'role', + title : '所属店铺', + width : 135, + align : 'center', + templet:function(d){ + if(d.role != null && d.role != ""){ + var load = d.role.split(","); + var roleStr = ""; + for (var i = 0; i < load.length; i++) { + roleStr += roleData[load[i]] + " "; + } + return roleStr + } + return "" + } + },{ + field : 'wangwang', + align : 'center', + width : 180, + title : '客户旺旺' + },{ + field : 'productExplain', + width : 280, + title : '产品说明' + },{ + field : 'price', + align : 'center', + width : 80, + sort : 'true', + title : '金额' + },{ + field : 'isBuy', + title : '是否成交', + align : 'center', + width : 130, + templet : '#isBuyTpl' + },{ + field : 'commentSelf', + title : '未成交原因', + width : 280 + },{ + field : 'commentManager', + title : '店长跟踪情况汇报', + width : 300, + edit : 'text', + },{ + field : 'createDate', + title : '创建时间', + align : 'center', + width : 180, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + },{ + field : 'completeDate', + title : '成交时间', + align : 'center', + width : 180, + templet : function(d) { + return d.completeDate != null ?layui.util.toDateString(d.completeDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + },{ + // fixed : 'right', + title : '操作', + width : 180, + align : 'center', + //toolbar : '#barDemo' + templet : function(d) { + // 此处username是从jsp中带过来的 + // 登录的用户名和创建的用户名相同 + if(d.username == username){ + return "编辑" + + + "删除" + }else{ + return "" + } + } + + } ] ], + // 数据渲染完的回调 + done: function (res, curr, count) { + // 解决操作栏因为内容过多换行问题 + $(".layui-table-main tr").each(function (index, val) { + $($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height()); + $($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height()); + }); + }, + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "data" : res.data.list.list, //解析数据列表 + "count" : res.data.list.total //解析数据长度 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('dataTableAll', { + method : 'get', + where : { + realname : $("#realname").val(), + wangwang : $("#wangwang").val(), + isBuy : $("#isBuy").val(), + createDateBegin: $("#worldId").val(), + roleSearch : $("#roleSearch").val(), + role : $("#role").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + //监听【是否成交】状态按钮 + form.on('switch(isBuyDemo)', function(obj){ + // jsp传过来的数据是 id+用户名+状态 拼接的 + var rowData = obj.value.split("+"); + if(rowData[2] == "0"){ + $.ajax({ + url : "../../../changeIsBuy", + dataType : 'json', + data : { + 'id':rowData[0], + 'username':rowData[1] + }, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('状态修改成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('只允许店长修改!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }else{ + layer.msg('【已成交】的订单,禁止再次修改!',{icon:5,offset:"auto",time:500});//提示框 + } + }) + + // 监听头部工作栏的 新增 + table.on('toolbar(dataTable)', function(obj) { + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加数据", + fix: false, //不固定 + maxmin: true, + skin:'layui-layer-molv', + area : [ '100%', '100%' ], + content : './addCustomerData.jsp', + }); + break; + }; + }); + + // 监听 表内后的修改 + table.on('tool(dataTable)', function(obj) { + var data1 = obj.data; + if (obj.event === 'edit') { + layer.open({ + type : 2, + title : "修改数据", + area : [ '100%', '100%' ], + skin:'layui-layer-molv', + content : './updateCustomerData.jsp', + success : function(layero, index) { + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; // 得到iframe页的窗口对象 + body.find('#id').val(data1.id); + body.find('#wangwang').val(data1.wangwang); + body.find('#role').val(data1.role); + body.find('#ROLE').val(data1.role);//给不了下拉框,给input再赋值 + body.find('#price').val(data1.price); + body.find('#productExplain').val(data1.productExplain); + body.find('#commentSelf').val(data1.commentSelf); + } + }); + }else if (obj.event === 'del') {// 监听删除 + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../../../deleteCustomerData", + data:{'id': data1.id}, + type:"post", + //dataType:"json", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 1100); + } + }); + return false; + }); + } + }); + + //监听单元格编辑 + table.on('edit(dataTable)', function(obj){ + var value = obj.value, //得到修改后的值 + data = obj.data, //得到所在行所有键值 + field = obj.field; //得到字段 + console.log(data) + $.ajax({ + url:"../../../updateRemarkById", + data:{ + id: data.id, + value: value, + field: field, + userId:data.username + }, + type:"post", + success:function (data) { + if (data.code == 200) { + layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + } + }); + }); +}); diff --git a/src/main/webapp/js/difference.js b/src/main/webapp/js/difference.js new file mode 100644 index 0000000..afdcf3a --- /dev/null +++ b/src/main/webapp/js/difference.js @@ -0,0 +1,228 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getFilename', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#differenceTable', + url : '../../../getDifference', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'differenceTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 200, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'shopname', + width : 150, + align : "center", + title : '店铺' + },{ + field : 'wangwang', + width : 150, + align : "center", + title : '客户旺旺' + },{ + field : 'payTime', + title : '时间', + width : 120, + align : "center", + templet : function(d) { + return d.payTime != null ?layui.util.toDateString(d.payTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'price', + width : 100, + align : "center", + title : '金额' + },{ + field : 'remark', + title : '备注', + align : "center", + width : 300, + },{ + field : 'taobaoStatus', + width : 150, + align : "center", + title : '淘宝状态' + },{ + field : 'filename', + title : '表格名称', + align : "center", + width : 150, + },{ + field : 'openOrderNumber', + title : '拆分订单号', + align : "center", + width : 200, + },{ + field : 'createDate', + title : '导入时间', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('differenceTableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(differenceTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_difference" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("differenceTableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/draggabilly.pkgd.min.js b/src/main/webapp/js/draggabilly.pkgd.min.js new file mode 100644 index 0000000..c314634 --- /dev/null +++ b/src/main/webapp/js/draggabilly.pkgd.min.js @@ -0,0 +1,26 @@ +/*! + * Draggabilly PACKAGED v3.0.0 + * Make that shiz draggable + * https://draggabilly.desandro.com + * MIT license + */ +!function(t,i){"function"==typeof define&&define.amd?define(["jquery"],(function(e){return i(t,e)})):"object"==typeof module&&module.exports?module.exports=i(t,require("jquery")):t.jQueryBridget=i(t,t.jQuery)}(window,(function(t,i){"use strict";var e=Array.prototype.slice,n=t.console,o=void 0===n?function(){}:function(t){n.error(t)};function s(n,s,h){function a(t,i,e){var s,r="$()."+n+'("'+i+'")';return t.each((function(t,a){var d=h.data(a,n);if(d){var u=d[i];if(u&&"_"!=i.charAt(0)){var l=u.apply(d,e);s=void 0===s?l:s}else o(r+" is not a valid method")}else o(n+" not initialized. Cannot call methods, i.e. "+r)})),void 0!==s?s:t}function d(t,i){t.each((function(t,e){var o=h.data(e,n);o?(o.option(i),o._init()):(o=new s(e,i),h.data(e,n,o))}))}(h=h||i||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){h.isPlainObject(t)&&(this.options=h.extend(!0,this.options,t))}),h.fn[n]=function(t){if("string"==typeof t){var i=e.call(arguments,1);return a(this,t,i)}return d(this,t),this},r(h))}function r(t){!t||t&&t.bridget||(t.bridget=s)}return r(i||t.jQuery),s})), + /*! + * Infinite Scroll v2.0.4 + * measure size of elements + * MIT license + */ + function(t,i){"object"==typeof module&&module.exports?module.exports=i():t.getSize=i()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];i.length;return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!(e&&"object"==typeof e&&e.nodeType))return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,u=o.borderLeftWidth+o.borderRightWidth,l=o.borderTopWidth+o.borderBottomWidth,c=t(n.width);!1!==c&&(o.width=c+(s?0:r+u));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+l)),o.innerWidth=o.width-(r+u),o.innerHeight=o.height-(h+l),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}})),function(t,i){"object"==typeof module&&module.exports?module.exports=i():t.EvEmitter=i()}("undefined"!=typeof window?window:this,(function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e){n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i)}return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t})), + /*! + * Unidragger v3.0.0 + * Draggable base class + * MIT license + */ + function(t,i){"object"==typeof module&&module.exports?module.exports=i(t,require("ev-emitter")):t.Unidragger=i(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,i){function e(){}let n,o,s=e.prototype=Object.create(i.prototype);s.handleEvent=function(t){let i="on"+t.type;this[i]&&this[i](t)},"ontouchstart"in t?(n="touchstart",o=["touchmove","touchend","touchcancel"]):t.PointerEvent?(n="pointerdown",o=["pointermove","pointerup","pointercancel"]):(n="mousedown",o=["mousemove","mouseup"]),s.touchActionValue="none",s.bindHandles=function(){this._bindHandles("addEventListener",this.touchActionValue)},s.unbindHandles=function(){this._bindHandles("removeEventListener","")},s._bindHandles=function(i,e){this.handles.forEach((o=>{o[i](n,this),o[i]("click",this),t.PointerEvent&&(o.style.touchAction=e)}))},s.bindActivePointerEvents=function(){o.forEach((i=>{t.addEventListener(i,this)}))},s.unbindActivePointerEvents=function(){o.forEach((i=>{t.removeEventListener(i,this)}))},s.withPointer=function(t,i){i.pointerId==this.pointerIdentifier&&this[t](i,i)},s.withTouch=function(t,i){let e;for(let t of i.changedTouches)t.identifier==this.pointerIdentifier&&(e=t);e&&this[t](i,e)},s.onmousedown=function(t){this.pointerDown(t,t)},s.ontouchstart=function(t){this.pointerDown(t,t.changedTouches[0])},s.onpointerdown=function(t){this.pointerDown(t,t)};const r=["TEXTAREA","INPUT","SELECT","OPTION"],h=["radio","checkbox","button","submit","image","file"];return s.pointerDown=function(t,i){let e=r.includes(t.target.nodeName),n=h.includes(t.target.type),o=!e||n;!this.isPointerDown&&!t.button&&o&&(this.isPointerDown=!0,this.pointerIdentifier=void 0!==i.pointerId?i.pointerId:i.identifier,this.pointerDown(t,i),this.bindActivePointerEvents(),this.emitEvent("pointerDown",[t,i]))},s.onmousemove=function(t){this.pointerMove(t,t)},s.onpointermove=function(t){this.withPointer("pointerMove",t)},s.ontouchmove=function(t){this.withTouch("pointerMove",t)},s.pointerMove=function(t,i){let e={x:i.pageX-this.pointerDownPointer.pageX,y:i.pageY-this.pointerDownPointer.pageY};this.emitEvent("pointerMove",[t,i,e]),!this.isDragging&&this.hasDragStarted(e)&&this.dragStart(t,i),this.isDragging&&this.dragMove(t,i,e)},s.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},s.dragStart=function(t,i){this.isDragging=!0,this.isPreventingClicks=!0,this.emitEvent("dragStart",[t,i])},s.dragMove=function(t,i,e){this.emitEvent("dragMove",[t,i,e])},s.onmouseup=function(t){this.pointerUp(t,t)},s.onpointerup=function(t){this.withPointer("pointerUp",t)},s.ontouchend=function(t){this.withTouch("pointerUp",t)},s.pointerUp=function(t,i){this.pointerDone(),this.emitEvent("pointerUp",[t,i]),this.isDragging?this.dragEnd(t,i):this.staticClick(t,i)},s.dragEnd=function(t,i){this.isDragging=!1,setTimeout((()=>delete this.isPreventingClicks)),this.emitEvent("dragEnd",[t,i])},s.pointerDone=function(){this.isPointerDown=!1,delete this.pointerIdentifier,this.unbindActivePointerEvents(),this.emitEvent("pointerDone")},s.onpointercancel=function(t){this.withPointer("pointerCancel",t)},s.ontouchcancel=function(t){this.withTouch("pointerCancel",t)},s.pointerCancel=function(t,i){this.pointerDone(),this.emitEvent("pointerCancel",[t,i])},s.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},s.staticClick=function(t,i){let e="mouseup"==t.type;e&&this.isIgnoringMouseUp||(this.emitEvent("staticClick",[t,i]),e&&(this.isIgnoringMouseUp=!0,setTimeout((()=>{delete this.isIgnoringMouseUp}),400)))},e})), + /*! + * Draggabilly v3.0.0 + * Make that shiz draggable + * https://draggabilly.desandro.com + * MIT license + */ + function(t,i){"object"==typeof module&&module.exports?module.exports=i(t,require("get-size"),require("unidragger")):t.Draggabilly=i(t,t.getSize,t.Unidragger)}("undefined"!=typeof window?window:this,(function(t,i,e){let n=t.jQuery;function o(t,i){this.element="string"==typeof t?document.querySelector(t):t,n&&(this.$element=n(this.element)),this.options={},this.option(i),this._create()}let s=o.prototype=Object.create(e.prototype);s.option=function(t){this.options={...this.options,...t}};const r=["relative","absolute","fixed"];s._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition={...this.position};let t=getComputedStyle(this.element);r.includes(t.position)||(this.element.style.position="relative"),this.on("pointerDown",this.handlePointerDown),this.on("pointerUp",this.handlePointerUp),this.on("dragStart",this.handleDragStart),this.on("dragMove",this.handleDragMove),this.on("dragEnd",this.handleDragEnd),this.setHandles(),this.enable()},s.setHandles=function(){let{handle:t}=this.options;"string"==typeof t?this.handles=this.element.querySelectorAll(t):"object"==typeof t&&t.length?this.handles=t:t instanceof HTMLElement?this.handles=[t]:this.handles=[this.element]};const h=["dragStart","dragMove","dragEnd"];let a=s.emitEvent;function d(t,i,e){return i?(e=e||"round",Math[e](t/i)*i):t}s.emitEvent=function(i,e){if(!this.isEnabled&&h.includes(i))return;a.call(this,i,e);let n,o=t.jQuery;if(!o||!this.$element)return;let s=e;e&&e[0]instanceof Event&&([n,...s]=e);let r=o.Event(n);r.type=i,this.$element.trigger(r,s)},s._getPosition=function(){let t=getComputedStyle(this.element),i=this._getPositionCoord(t.left,"width"),e=this._getPositionCoord(t.top,"height");this.position.x=isNaN(i)?0:i,this.position.y=isNaN(e)?0:e,this._addTransformPosition(t)},s._getPositionCoord=function(t,e){if(t.includes("%")){let n=i(this.element.parentNode);return n?parseFloat(t)/100*n[e]:0}return parseInt(t,10)},s._addTransformPosition=function(t){let i=t.transform;if(!i.startsWith("matrix"))return;let e=i.split(","),n=i.startsWith("matrix3d")?12:4,o=parseInt(e[n],10),s=parseInt(e[n+1],10);this.position.x+=o,this.position.y+=s},s.handlePointerDown=function(t,i){this.isEnabled&&(this.pointerDownPointer={pageX:i.pageX,pageY:i.pageY},t.preventDefault(),document.activeElement.blur(),this.bindActivePointerEvents(t),this.element.classList.add("is-pointer-down"))},s.handleDragStart=function(){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.animate())},s.measureContainment=function(){let t=this.getContainer();if(!t)return;let e=i(this.element),n=i(t),{borderLeftWidth:o,borderRightWidth:s,borderTopWidth:r,borderBottomWidth:h}=n,a=this.element.getBoundingClientRect(),d=t.getBoundingClientRect(),u=o+s,l=r+h,c=this.relativeStartPosition={x:a.left-(d.left+o),y:a.top-(d.top+r)};this.containSize={width:n.width-u-c.x-e.width,height:n.height-l-c.y-e.height}},s.getContainer=function(){let t=this.options.containment;if(t)return t instanceof HTMLElement?t:"string"==typeof t?document.querySelector(t):this.element.parentNode},s.handleDragMove=function(t,i,e){if(!this.isEnabled)return;let n=e.x,o=e.y,s=this.options.grid,r=s&&s[0],h=s&&s[1];n=d(n,r),o=d(o,h),n=this.containDrag("x",n,r),o=this.containDrag("y",o,h),n="y"==this.options.axis?0:n,o="x"==this.options.axis?0:o,this.position.x=this.startPosition.x+n,this.position.y=this.startPosition.y+o,this.dragPoint.x=n,this.dragPoint.y=o},s.containDrag=function(t,i,e){if(!this.options.containment)return i;let n="x"==t?"width":"height",o=d(-this.relativeStartPosition[t],e,"ceil"),s=this.containSize[n];return s=d(s,e,"floor"),Math.max(o,Math.min(s,i))},s.handlePointerUp=function(){this.element.classList.remove("is-pointer-down")},s.handleDragEnd=function(){this.isEnabled&&(this.element.style.transform="",this.setLeftTop(),this.element.classList.remove("is-dragging"))},s.animate=function(){this.isDragging&&(this.positionDrag(),requestAnimationFrame((()=>this.animate())))},s.setLeftTop=function(){let{x:t,y:i}=this.position;this.element.style.left=`${t}px`,this.element.style.top=`${i}px`},s.positionDrag=function(){let{x:t,y:i}=this.dragPoint;this.element.style.transform=`translate3d(${t}px, ${i}px, 0)`},s.setPosition=function(t,i){this.position.x=t,this.position.y=i,this.setLeftTop()},s.enable=function(){this.isEnabled||(this.isEnabled=!0,this.bindHandles())},s.disable=function(){this.isEnabled&&(this.isEnabled=!1,this.isDragging&&this.dragEnd(),this.unbindHandles())};const u=["transform","left","top","position"];return s.destroy=function(){this.disable(),u.forEach((t=>{this.element.style[t]=""})),this.unbindHandles(),this.$element&&this.$element.removeData("draggabilly")},s._init=function(){},n&&n.bridget&&n.bridget("draggabilly",o),o})); \ No newline at end of file diff --git a/src/main/webapp/js/echartBar_kefu.js b/src/main/webapp/js/echartBar_kefu.js new file mode 100644 index 0000000..4af0937 --- /dev/null +++ b/src/main/webapp/js/echartBar_kefu.js @@ -0,0 +1,185 @@ +$.ajaxSetup({ + async : false +}); + +layui.use([ 'laydate', 'form' ,'layer'], function() { + var laydate = layui.laydate, form = layui.form, $ = layui.$,layer = layui.layer; + + //店铺字典转换 + var shopnameData = {}; + $.ajax({ + url : '../../../changeRoleName', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + shopnameData = data; + } + }); + /*function refresh() { + location.reload(); + }*/ + // 点击查询按钮,重载echarts + $('#searchBtn1').on('click', function() { + var param = { + quoteTimeBegin : $("#worldId").val(), + roleSearch : $("#roleSearch").val(), + realname : $("#realname").val(), + byProTypeLabel : $("#byProTypeLabel").val(), + proTypeLabel : $("#proTypeLabel").val() + }; + getEchart(MyEChart,param); + return false; + }); + /*------------------------------------------------------------------------------------------*/ + function getEchart(MyEChart,param2) { + var kefuTotal = []; + var shopName = []; + var myDate = new Date(); + var year = myDate.getFullYear(); + var month = myDate.getMonth() + 1; + var day = myDate.getDate(); + var today = year + "-" + month + "-" + day; + // 进页面默认查今天的数据 + var param = { + quoteTimeBegin: today + }; + if(param2){ + param = param2 ; + } + $.getJSON("../../../echartKefuSummary", param,function(data) { + var sname = data.sname + var datas1 = data.kefuTotal + for (var i = 0; i < sname.length; i++) { + if(sname[i] > 0){ + shopName[i] = shopnameData[sname[i]]; + }else{ + shopName[i] = sname[i]; + } + kefuTotal[i] = datas1[i]; + } + }); + MyEChart.setOption({ + title : { + // text : '各专业参赛获奖比较', + // color: '#a9334c', + // algin: 'center' + }, + tooltip : { + trigger : 'axis' + }, + legend : { + x: 'right', + padding: [20,130], + data : [ '200元以上客户流失量'], + }, + toolbox : { + show : true,//是否显示工具栏组件 + feature : { + /*mark : { + show : false + },*/ + dataView : { //数据视图工具,可以展现当前图表所用的数据,编辑后可以动态更新 + show : true,//是否显示该工具。 + textColor:"#000", //文本颜色。 + //readOnly : true, + lang: ['数据视图', '关闭', '导出Excel'], + contentToOption: function (opts) { + $("#tableExcel").table2excel({ + exclude: ".noExl", //过滤位置的 css 类名 + filename:'客服数据汇总统计' + ".xls", //文件名称 + name: "客服数据汇总统计.xls", + exclude_img: true, + exclude_links: true, + exclude_inputs: true + }); + }, + optionToContent: function (opt) { //改变数据表格样式 + // 店铺 + let axisData = opt.xAxis[0].data; //X坐标数据 + // 柱状图数据 + let series = opt.series; + let tdHeads = '店铺/人员'; //表头 + let tdBodys = ''; //数据 + series.forEach(function (item) { + //组装表头 + tdHeads += `${item.name}`; + }); + let table = `${tdHeads} `; + for (let i = 0, l = axisData.length; i < l; i++) { + for (let j = 0; j < series.length; j++) { + if(!series[j].data[i]) + series[j].data[i] = 0 + //组装表数据 + tdBodys += ``; + } + table += `${tdBodys}`; + tdBodys = ''; + } + table += '
${ series[j].data[i] }
${axisData[i]}
'; + return table; + } + }, + magicType : { //动态类型切换 + show : true, + type : ['bar','line']//启用的动态类型,包括'line'(切换为折线图), 'bar'(切换为柱状图), 'stack'(切换为堆叠模式), 'tiled'(切换为平铺模式) + }, + restore : { + show : true + }, + saveAsImage : { + show : true + } + } + }, + xAxis : [ { + type : 'category', + data : shopName, + /*axisLabel: { //重点在这一块,其余可以忽略 + interval: 0, //这个一定要有,别忘记了 + rotate: 15, + textStyle: { + color: '#000', + fontSize: 10 + } + },*/ + axisLabel: { + interval:0, + textStyle: { + color: '#7c8893', + fontSize: 12 + }, + formatter: function(value) { + return value.split("").join("\n"); + } + }, + } ], + yAxis : [ { + type : 'value' + } ], + series : [ { + name : '200元以上客户流失量', + type : 'bar', + data: kefuTotal, + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + }] + }); + + } + + var MyEChart = echarts.init(document.getElementById('echartAcount')); + + getEchart(MyEChart); +}); diff --git a/src/main/webapp/js/echartBar_summary.js b/src/main/webapp/js/echartBar_summary.js new file mode 100644 index 0000000..311adf2 --- /dev/null +++ b/src/main/webapp/js/echartBar_summary.js @@ -0,0 +1,343 @@ +$.ajaxSetup({ + async : false +}); + +layui.use([ 'laydate', 'form' ,'layer'], function() { + var laydate = layui.laydate, form = layui.form, $ = layui.$,layer = layui.layer; + + //店铺字典转换 + var shopnameData = {}; + $.ajax({ + url : '../../../changeRoleName', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + shopnameData = data; + } + }); + /*function refresh() { + location.reload(); + }*/ + // 点击查询按钮,重载echarts + $('#searchBtn1').on('click', function() { + var param = { + quoteTimeBegin : $("#worldId").val(), + roleSearch : $("#roleSearch").val(), + realname : $("#realname").val(), + byProTypeLabel : $("#byProTypeLabel").val(), + proTypeLabel : $("#proTypeLabel").val() + }; + getEchart(MyEChart,param); + return false; + }); + /*------------------------------------------------------------------------------------------*/ + function getEchart(MyEChart,param2) { + var numdataOne = [],numdataTwo = [],numdataThree =[],numdataFour=[],numdataFive=[],numdataSix=[],numdataSeven=[], + numdataEight=[],numdataNine=[]; + var shopName = []; + var myDate = new Date(); + var year = myDate.getFullYear(); + var month = myDate.getMonth() + 1; + var day = myDate.getDate(); + var today = year + "-" + month + "-" + day; + // 进页面默认查今天的数据 + var param = { + quoteTimeBegin: today + }; + if(param2){ + param = param2 ; + } + $.getJSON("../../../echartZhuSummary", param,function(data) { + var sname = data.sname + var datas1 = data.one + var datas2 = data.two + var datas3 = data.three + var datas4 = data.four + var datas5 = data.five + var datas6 = data.six + var datas7 = data.seven + var datas8 = data.eight + var datas9 = data.nine + for (var i = 0; i < sname.length; i++) { + if(sname[i] > 0){ + shopName[i] = shopnameData[sname[i]]; + }else{ + shopName[i] = sname[i]; + } + numdataOne[i] = datas1[i]; + numdataTwo[i] = datas2[i]; + numdataThree[i] = datas3[i]; + numdataFour[i] = datas4[i]; + numdataFive[i] = datas5[i]; + numdataSix[i] = datas6[i]; + numdataSeven[i] = datas7[i]; + numdataEight[i] = datas8[i]; + numdataNine[i] = (datas9[i] * 100).toFixed(2) + "%"; + } + // 用冒泡进行排序 + /*var a = 0 + for(var i = 0; i < numdataOne.length; i++){ + for(var j = 0;j < numdataOne.length;j++){ + if(numdataOne[j] > numdataOne[j+1]){ + a = numdataOne[j] + numdataOne[j] = numdataOne[j+1] + numdataOne[j+1] = a + } + } + } + console.log(numdataOne)*/ + }); + MyEChart.setOption({ + title : { + // text : '各专业参赛获奖比较', + // color: '#a9334c', + // algin: 'center' + }, + tooltip : { + trigger : 'axis' + }, + legend : { + x: 'right', + padding: [20,130], + data : [ '所有数据','所有已成交','所有未成交', '当天成交' ,'跟单后成交','成交金额','当天成交金额','跟单后成交金额','成交比例'], + }, + toolbox : { + show : true,//是否显示工具栏组件 + feature : { + /*mark : { + show : false + },*/ + dataView : { //数据视图工具,可以展现当前图表所用的数据,编辑后可以动态更新 + show : true,//是否显示该工具。 + textColor:"#000", //文本颜色。 + //readOnly : true, + lang: ['数据视图', '关闭', '导出Excel'], + contentToOption: function (opts) { + $("#tableExcel").table2excel({ + exclude: ".noExl", //过滤位置的 css 类名 + filename:'客服数据汇总统计' + ".xls", //文件名称 + name: "客服数据汇总统计.xls", + exclude_img: true, + exclude_links: true, + exclude_inputs: true + }); + }, + optionToContent: function (opt) { //改变数据表格样式 + // 店铺 + let axisData = opt.xAxis[0].data; //X坐标数据 + // 柱状图数据 + let series = opt.series; + let tdHeads = '店铺/人员'; //表头 + let tdBodys = ''; //数据 + series.forEach(function (item) { + //组装表头 + tdHeads += `${item.name}`; + }); + let table = `${tdHeads} `; + for (let i = 0, l = axisData.length; i < l; i++) { + for (let j = 0; j < series.length; j++) { + if(!series[j].data[i]) + series[j].data[i] = 0 + //组装表数据 + tdBodys += ``; + } + table += `${tdBodys}`; + tdBodys = ''; + } + table += '
${ series[j].data[i] }
${axisData[i]}
'; + return table; + } + }, + magicType : { //动态类型切换 + show : true, + type : ['bar','line']//启用的动态类型,包括'line'(切换为折线图), 'bar'(切换为柱状图), 'stack'(切换为堆叠模式), 'tiled'(切换为平铺模式) + }, + restore : { + show : true + }, + saveAsImage : { + show : true + } + } + }, + xAxis : [ { + type : 'category', + data : shopName, + /*axisLabel: { //重点在这一块,其余可以忽略 + interval: 0, //这个一定要有,别忘记了 + rotate: 15, + textStyle: { + color: '#000', + fontSize: 10 + } + },*/ + axisLabel: { + interval:0, + textStyle: { + color: '#7c8893', + fontSize: 12 + }, + formatter: function(value) { + return value.split("").join("\n"); + } + }, + } ], + yAxis : [ { + type : 'value' + } ], + series : [ { + name : '所有数据', + type : 'bar', + data: numdataOne, + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + }, { + name: '所有已成交', + type : 'bar', //柱状 + data: numdataTwo, + color : '#01AADE',//柱子颜色 + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + }, { + name : '所有未成交', + type : 'bar', + data: numdataThree, + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + }, { + name : '当天成交', + type : 'bar', + data: numdataFour, + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + }, { + name : '跟单后成交', + type : 'bar', + data: numdataFive, + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + },{ + name : '成交金额', + type : 'bar', + data: numdataSix, + itemStyle: { + normal: { + label: { + show: true, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + },{ + name : '当天成交金额', + type : 'bar', + data: numdataSeven, + itemStyle: { + normal: { + label: { + show: false, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + },{ + name : '跟单后成交金额', + type : 'bar', + data: numdataEight, + itemStyle: { + normal: { + label: { + show: false, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + },{ + name : '成交比例', + type : 'bar', + data: numdataNine, + itemStyle: { + normal: { + label: { + show: false, //开启显示 + position: 'top', //在上方显示 + textStyle: { //数值样式 + color: 'black', + fontSize: 16 + } + } + } + } + }] + }); + + } + + var MyEChart = echarts.init(document.getElementById('echartAcount')); + + getEchart(MyEChart); +}); diff --git a/src/main/webapp/js/expressFee.js b/src/main/webapp/js/expressFee.js new file mode 100644 index 0000000..f3d9d34 --- /dev/null +++ b/src/main/webapp/js/expressFee.js @@ -0,0 +1,167 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#expressFeeTable', + url : '../../../getExpressFees', + toolbar : '#toolbarDemo', + title : '用户表',// 导出文件名 + id : 'expressFeeTableAll', + // 开启分页 + // page : true, + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,30,50,80,100,999], + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + content:'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'proTypeLabel', + title : '产品', + width : 200 + },{ + field : 'province', + title : '省份', + width : 250 + },{ + field : 'firstWeightPrice', + title : '首重(元/kg)', + edit : 'text', + width : 150 + },{ + field : 'continuedWeightPrice', + title : '续重(元/kg)', + edit : 'text', + width : 150 + },{ + field : 'startPrice', + align : 'center', + width : 100, + title : '起步价', + edit : 'text' + },{ + field : 'createBy', + align : 'center', + width : 150, + title : '创建人' + },{ + field : 'createDate', + title : '创建时间', + width : 220, + align : 'center', + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + },{ + fixed : 'right', + title : '操作', + align : 'center', + width : 150, + toolbar : '#barDemo' + } ] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + console.log(res) + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.list.total,//解析数据长度 + "data" : res.data.list.list //解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('expressFeeTableAll', { + method : 'get', + where : { + province : $("#province").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + // 监听头部工作栏的 新增 + table.on('toolbar(expressFeeTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加省份快递费", + fix: false, //不固定 + maxmin: true, + skin:'layui-layer-molv', + area : [ '45%', '70%' ], + content : './addExpressFee.jsp', + }); + break; + } + ; + }); + //监听单元格编辑 + table.on('edit(expressFeeTable)', function(obj){ + var value = obj.value, //得到修改后的值 + data = obj.data, //得到所在行所有键值 + field = obj.field; //得到字段 + $.ajax({ + url:"../../../updateExpressFee", + data:{ + id: data.id, + value: value, + field: field + }, + type:"post", + success:function (data) { + if (data.code == 200) { + layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + } + }); + }); + // 监听 删除 + table.on('tool(expressFeeTable)', function(obj) { + var data1 = obj.data; + if(obj.event === 'del'){ + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../../../deleteExpressFee", + data:{'id': data1.id}, + type:"post", + //dataType:"json", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 1100); + } + }); + return false; + }); + } + }) +}); diff --git a/src/main/webapp/js/extract.js b/src/main/webapp/js/extract.js new file mode 100644 index 0000000..4d65eb7 --- /dev/null +++ b/src/main/webapp/js/extract.js @@ -0,0 +1,267 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../../getFilename_extract', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#extractTable', + url : '../../../../getFinance_extract', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'extractTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'length', + title : '长', + align : "center", + width : 80, + templet : function(d) { + if(d.length == "#"){ + return ''+d.length+''; + }else{ + return d.length; + } + } + },{ + field : 'width', + title : '宽', + align : "center", + width : 80, + templet : function(d) { + if(d.width == "0.0"){ + return ''+d.width+''; + }else{ + return d.width; + } + } + },{ + field : 'height', + title : '高', + align : "center", + width : 80, + templet : function(d) { + if(d.height == "0.0"){ + return ''+d.height+''; + }else{ + return d.height; + } + } + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'createDate', + title : '导入时间', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + console.log(res) + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('extractTableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(extractTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../../excel_extract" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../../deleteDataByFilename2", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("extractTableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../../ajaxUpload_2', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("extractTableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/file.js b/src/main/webapp/js/file.js new file mode 100644 index 0000000..922fb75 --- /dev/null +++ b/src/main/webapp/js/file.js @@ -0,0 +1,252 @@ +layui.use(['table', 'form','element','upload'], function() { + var $ = layui.jquery + table = layui.table, + form = layui.form, + element = layui.element, + upload = layui.upload; + + // 生成表格 + table.render({ + elem : '#fileTable', + url : '../../getAllFiles', + toolbar : '#toolbarDemo', + title : "文件明细",// 导出名 + id : 'fileAll', + // skin : 'row', + // size :'lg', + border : true, + page : true, + limits : [10,30,50,80,100,999], + where : { + fileName : '', + add_time_begin : '', + add_time_end : '' + }, + cols : [ [ + { + type: 'checkbox' + }, + { type: 'numbers', + title: '序号', + unresize: true + },{ + field : 'fileName', + align : "center", + title : '文件名称' + },{ + fixed : 'right', + title : '操作', + align : "center", + toolbar : '#barDemo' + } + ] ], + parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, // 解析接口状态 + "msg" : "", // 解析提示文本 + "count" : res.data.fileList.total,// 解析数据长度 + "data" : res.data.fileList.list// 解析数据列表 + }; + } + }); + + + // 点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('fileAll', { + method : 'post', + where : { + fileName : $("#fileName").val() + }, + page : { + curr : 1 + } + }); + activeDelFunction(); + return false; + }); + + // 监听头工具栏事件--文件上传按钮 + table.on('toolbar(fileTable)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id), + data = checkStatus.data; // 获取选中的数据 + switch (obj.event) { + case 'mulAdd':// 导入 + layer.open({ + // layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "上传图片", + area: ['720px', '430px'], + content: $("#popmulAddTest")// 引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'add': + layer.open({ + type: 2, + title: "添加文章", + area: ['900px','600px'], + skin: "layui-layer-molv", + content: './addFileImport.jsp', + }); + break; + }; + }); + // 多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});// 提示框 + $('#testListAction').html('正在上传...'); + $('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../priceUpload', // 价格上传接口 + //url: '../fileUpload', // 文件上传接口 + //url: '../../imgUpload', // 产品图片上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ // 选完文件调用 + var files = this.files = obj.pushFile(); // 将每次选择的文件追加到文件队列 + // 读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + (file.size/1024/1024) > 1 ? ''+ (file.size/1024/1024).toFixed(1) +'m':''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + // 单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + // 删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; // 删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; // 清空 + // input + // file + // 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ // 上传成功后调用 + if(res.code == 200){ // 上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); // 清空操作 + $('#testListAction').html('开始上传'); + $('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + return delete this.files[index]; // 删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ // 上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + $('#testListAction').html('开始上传'); + $('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); // 显示重传 + } + }); + + // 监听表格操作按钮 + table.on('tool(fileTable)',function(obj){ + switch (obj.event) { + // 下载 + case 'downLoad': + var url = "<%=basePath%>"+"deptFile/"+obj.data.fileName + var request = new XMLHttpRequest(); + request.responseType = "blob"; + request.open("GET", url); + request.onload = function() { + var url = window.URL.createObjectURL(this.response); + var a = document.createElement("a"); + document.body.appendChild(a); + a.href = url; + a.download = obj.data.fileName; + a.click(); + } + request.send(); + break; + // 删除 + case 'del': + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../deleteFile", + data:{'fileId': obj.data.fileId}, + type:"post", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});// 提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});// 提示框 + } + setTimeout(function(){ + location.reload();// 重新加载页面 + }, 1100); + } + }); + }); + }; + }); + + // 激活批量删除 + function activeDelFunction(){ + $('.demoTable .layui-btn').on('click', function(){ + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + } + activeDelFunction(); + // 执行批量删除 + var $ = layui.$,active = { + getCheckData: function(){ // 获取选中数据 + var checkStatus = table.checkStatus('fileAll'), + checkData = checkStatus.data, + ids=""; + fileNames=""; + if(checkData.length == 0){ + layer.msg("请选择要删除的数据",function(){}); + return; + } + for (var i = 0; i < checkData.length; i++) { + ids+=checkData[i].fileId+","; + fileNames+=checkData[i].fileName+";"; + } + // var ids = JSON.stringify(delList); + layer.confirm('确定要删除这['+checkData.length+'条]数据么?',{icon:5,title:'友情提示'}, function(index){ + $.ajax({ + url:"../deleteFiles", + dataType:'json', + data:{ + ids:ids, + fileNames:fileNames + }, + type:'post', + success:function(data){ + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});// 提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});// 提示框 + } + setTimeout(function(){ + location.reload();// 重新加载页面表格 + }, 1000); + } + }); + return false; + }); + } + }; +}); \ No newline at end of file diff --git a/src/main/webapp/js/finance.js b/src/main/webapp/js/finance.js new file mode 100644 index 0000000..03e175f --- /dev/null +++ b/src/main/webapp/js/finance.js @@ -0,0 +1,282 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#financeTable', + url : '../../../getFinance', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'financeTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '时间', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入时间', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('financeTableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(financeTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("financeTableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_1', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("financeTableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/finance2.js b/src/main/webapp/js/finance2.js new file mode 100644 index 0000000..42b8abe --- /dev/null +++ b/src/main/webapp/js/finance2.js @@ -0,0 +1,282 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename_2', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#finance2Table', + url : '../../../getFinance_2', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'finance2TableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '时间', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入时间', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('finance2TableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(finance2Table)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_2" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename_2", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("finance2TableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_f2', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("finance2TableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/finance3.js b/src/main/webapp/js/finance3.js new file mode 100644 index 0000000..de8b149 --- /dev/null +++ b/src/main/webapp/js/finance3.js @@ -0,0 +1,281 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename_3', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#finance3Table', + url : '../../../getFinance_3', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'finance3TableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '日期', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入日期', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('finance3TableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(finance3Table)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_3" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename_3", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("finance3TableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_f3', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("finance3TableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/finance4.js b/src/main/webapp/js/finance4.js new file mode 100644 index 0000000..f74798c --- /dev/null +++ b/src/main/webapp/js/finance4.js @@ -0,0 +1,281 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename_4', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#finance4Table', + url : '../../../getFinance_4', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'finance4TableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '日期', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入日期', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('finance4TableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(finance4Table)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_4" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename_4", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("finance4TableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_f4', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("finance4TableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/finance5.js b/src/main/webapp/js/finance5.js new file mode 100644 index 0000000..a9a32ca --- /dev/null +++ b/src/main/webapp/js/finance5.js @@ -0,0 +1,281 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename_5', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#finance5Table', + url : '../../../getFinance_5', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'finance5TableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '日期', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入日期', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('finance5TableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(finance5Table)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_5" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename_5", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("finance5TableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_f5', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("finance5TableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/finance6.js b/src/main/webapp/js/finance6.js new file mode 100644 index 0000000..e6a31f6 --- /dev/null +++ b/src/main/webapp/js/finance6.js @@ -0,0 +1,281 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename_6', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#finance6Table', + url : '../../../getFinance_6', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'finance6TableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '日期', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入日期', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('finance6TableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(finance6Table)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_6" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename_6", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("finance6TableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_f6', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("finance6TableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/finance7.js b/src/main/webapp/js/finance7.js new file mode 100644 index 0000000..25944c5 --- /dev/null +++ b/src/main/webapp/js/finance7.js @@ -0,0 +1,281 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + var upload = layui.upload; + + activeFunction(); + //获取所有表格名称 + function activeFunction(){ + $.ajax({ + url : '../../../getAllFilename_7', + dataType : 'json', + data : { + }, + type : 'get', + success : function(data) { + $.each(data, function(index, item) { + $('#filename').append( + new Option(item, item));// 下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + } + // 生成表格 + table.render({ + elem : '#finance7Table', + url : '../../../getFinance_7', + toolbar : '#toolbarDemo', + defaultToolbar: ['filter', 'exports', { //自定义头部工具栏右侧图标。如无需自定义,去除该参数即可 + title: '提示' + ,layEvent: 'LAYTABLE_TIPS' + ,icon: 'layui-icon-tips' + }], + title : '表',// 导出文件名 + id : 'finance7TableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,50,100,500,999,9999], + where:{ + filename :'', + orderNumber :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'addTime', + title : '日期', + width : 120, + align : "center", + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd") : ""; + } + },{ + field : 'supplier', + width : 100, + align : "center", + title : '供应商' + },{ + field : 'shopname', + width : 100, + align : "center", + title : '店铺' + },{ + field : 'kind', + width : 100, + align : "center", + title : '种类' + },{ + field : 'kind2', + width : 100, + align : "center", + title : '种类2' + },{ + field : 'orderNumber', + title : '订单编号', + align : "center", + width : 230, + templet : function(d) { + return d.orderNumber + '\t'; + } + },{ + field : 'remark', + title : '文件名称' + },{ + field : 'filename', + title : '表格名称', + width : 120, + },{ + field : 'count', + title : '数量', + align : "center", + width : 80, + templet : function(d) { + if(d.count == "#"){ + return ''+d.count+''; + }else{ + return d.count; + } + } + },{ + field : 'number', + title : '拼版数', + align : "center", + width : 80, + templet : function(d) { + if(d.number == "#"){ + return ''+d.number+''; + }else{ + return d.number; + } + } + },{ + field : 'zhang', + title : '张数', + align : "center", + width : 80, + templet : function(d) { + if(d.zhang == "0.0"){ + return ''+d.zhang+''; + }else{ + return d.zhang; + } + } + },{ + field : 'createDate', + title : '导入日期', + align : "center", + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('finance7TableAll', { + method : 'post', + where : { + filename : $("#filename").val(), + orderNumber : $("#orderNumber").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 监听头部工作栏的 新增用户 + table.on('toolbar(finance7Table)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'export': + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要导出的文件!',function(){}); + return false; + } + window.location.href="../../../excel_7" + "?filename=" + filename; + break; + case 'mulAdd'://导入 + layer.open({ + //layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 1, + title: "导入数据", + area: ['720px', '430px'], + content: $("#popmulAddTest")//引用的弹出层的页面层的方式加载添加界面表单 + }); + break; + case 'del':// 删除 + var filename = $("#filename").val(); + if(filename == ""){ + layer.msg('请选择要删除的文件!',function(){}); + return false; + } + layer.confirm('确定要删除【' + filename + '】的数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url : "../../../deleteDataByFilename_7", + dataType : 'json', + data:{'filename': filename}, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + //删除完清空下拉框再重新查询 + $("#filename").empty(); + activeFunction(); + table.reload("finance7TableAll"); //重新加载页面表格 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + break; + }; + }); + //多文件上传 + form.on('submit(upLoad)',function(obj){ + layer.msg('开始上传,请稍后~~',{icon:6,offset:"auto",time:2000});//提示框 + //$('#testListAction').addClass("layui-btn-disabled").attr("disabled",true); + //$('#testListAction').html('正在上传...'); + }) + var demoListView = $('#demoList'), + uploadListIns = upload.render({ + elem: '#testList', + url: '../../../ajaxUpload_f7', //上传接口 + accept: 'file', + multiple: true, + auto: false, + bindAction: '#testListAction', + choose: function(obj){ //选完文件调用 + var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列 + //读取本地文件 + var count = 1; + obj.preview(function(index, file, result){ + var tr = $(['', + ''+ count++ +'', + ''+ file.name +'', + ''+ (file.size/1024).toFixed(1) +'kb', + '等待上传', + '', + '', + '', + '', + ''].join('')); + //单个重传 + tr.find('.demo-reload').on('click', function(){ + obj.upload(index, file); + }); + //删除 + tr.find('.demo-delete').on('click', function(){ + delete files[index]; //删除对应的文件 + tr.remove(); + uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选 + }); + demoListView.append(tr); + }); + }, + done: function(res, index, upload){ //上传成功后调用 + layer.msg(res.msg,function(){}); + if(res.code == 200){ //上传成功 + var tr = demoListView.find('tr#upload-'+ index), + tds = tr.children(); + tds.eq(3).html('上传成功'); + tds.eq(4).html(''); //清空操作 + $('#testListAction').html('开始上传'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + $("#filename").empty(); + activeFunction(); + table.reload("finance7TableAll"); //重新加载页面表格 + return delete this.files[index]; //删除文件队列已经上传成功的文件 + } + this.error(index, upload); + }, + error: function(index, upload){ //上传失败后调用 + var tr = demoListView.find('tr#upload-'+ index) + ,tds = tr.children(); + tds.eq(3).html('上传失败'); + //$('#testListAction').removeClass("layui-btn-disabled").attr("disabled",false); + tds.eq(4).find('.demo-reload').removeClass('layui-hide'); //显示重传 + } + }); +}); diff --git a/src/main/webapp/js/getTrainData.js b/src/main/webapp/js/getTrainData.js new file mode 100644 index 0000000..b1a4563 --- /dev/null +++ b/src/main/webapp/js/getTrainData.js @@ -0,0 +1,44 @@ +layui.use(['element','form'], function(){ + var $ = layui.jquery; + var element = layui.element; + var form = layui.form; + + //一访问页面就调用 + $.ajax({ + url:"/quote_price/getCustomerTrainProTypes", + type : "GET", + dataType : "json", + data:{ + type:$("#type").val() + }, + success : function(result) { + var data = result.list + $.each(data,function(index,item){ + $('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + form.on('select(proType)', function(data) { + $('.kind').empty(); + $('.kind').append(new Option("","")); + form.render("select"); + $.ajax({ + url:"/quote_price/getCustomerTrainKindLabelsByProType", + type : "GET", + dataType : "json", + data:{ + proType :data.value, + type :$("#type").val(), + needPage:"0" + }, + success : function(result) { + var data = result.list + $.each(data,function(index,item){ + $('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素 + }); + layui.form.render("select"); + } + }); + }); +}); diff --git a/src/main/webapp/js/imgUpload.js b/src/main/webapp/js/imgUpload.js new file mode 100644 index 0000000..809d44f --- /dev/null +++ b/src/main/webapp/js/imgUpload.js @@ -0,0 +1,132 @@ +layui.use([ 'element', 'table', 'laydate', 'form','upload' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form, + upload = layui.upload; + + // 生成表格 + table.render({ + elem : '#imgTable', + url : '../../getImgList', + toolbar : '#toolbarDemo', + title : '图片表',// 导出文件名 + id : 'imgTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + proTypeLabel :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'proTypeLabel', + title : '产品种类', + align : "center", + width : 180 + },{ + field : 'kindLabel', + title : '材料1', + align : "center", + width : 380 + },{ + field : 'kind2Label', + title : '材料2', + width : 280, + },{ + field : 'remark', + title : '产品说明', + width : 280 + },{ + field : 'createDate', + title : '创建时间', + align : "center", + width : 200, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + }, { + fixed : 'right', + title : '操作', + align : "center", + width : 150, + toolbar : '#barDemo' + } ] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + console.log(res) + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.list.total,//解析数据长度 + "data" : res.data.list.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('imgTableAll', { + method : 'post', + where : { + proTypeLabel : $("#proTypeLabel").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + + // 监听头部工作栏的 新增用户 + table.on('toolbar(imgTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'mulAdd': + layer.open({ + // layer提供了5种层类型。可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层) + type: 2, + title: "产品图片上传", + area: ['720px', '430px'], + //content: $("#popmulAddTest")// 引用的弹出层的页面层的方式加载添加界面表单 + content : './addImgUpload.jsp', + }); + break; + } + ; + }); + + // 监听 修改 + table.on('tool(imgTable)', function(obj) { + var data1 = obj.data; + if (obj.event === 'edit') { + layer.open({ + type : 2, + title : "修改产品信息", + area : [ '45%', '70%' ], + skin:'layui-layer-molv', + content : './updateImgUpload.jsp', + success : function(layero, index) { + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; // 得到iframe页的窗口对象 + body.find('#id').val(data1.id); + body.find('#proTypeLabel').val(data1.proTypeLabel); + body.find('#kindLabel').val(data1.kindLabel); + body.find('#kind2Label').val(data1.kind2Label); + body.find('#remark').val(data1.remark); + layui.form.render(); + } + }); + } + }) +}); diff --git a/src/main/webapp/js/information.js b/src/main/webapp/js/information.js new file mode 100644 index 0000000..07e733c --- /dev/null +++ b/src/main/webapp/js/information.js @@ -0,0 +1,145 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#informationTable', + url : '../../../getInformations', + toolbar : '#toolbarDemo', + title : '用户表',// 导出文件名 + id : 'informationTableAll', + // 开启分页 + // page : true, + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,30,50,80,100,999], + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + content:'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'content', + title : '内容', + },{ + field : 'type', + align : 'center', + width : 150, + title : '类型' + },{ + field : 'createBy', + align : 'center', + width : 150, + title : '创建人' + },{ + field : 'createDate', + title : '创建时间', + width : 220, + align : 'center', + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + },{ + fixed : 'right', + title : '操作', + align : 'center', + width : 150, + toolbar : '#barDemo' + } ] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.list.total,//解析数据长度 + "data" : res.data.list.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('informationTableAll', { + method : 'get', + where : { + content : $("#content").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + // 监听头部工作栏的 新增 + table.on('toolbar(informationTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加问题", + fix: false, //不固定 + maxmin: true, + skin:'layui-layer-molv', + area : [ '45%', '70%' ], + content : './addInformation.jsp', + }); + break; + } + ; + }); + + // 监听 修改 + table.on('tool(informationTable)', function(obj) { + var data1 = obj.data; + if (obj.event === 'edit') { + layer.open({ + type : 2, + title : "修改问题", + area : [ '45%', '70%' ], + skin:'layui-layer-molv', + content : './updateInformation.jsp', + success : function(layero, index) { + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; // 得到iframe页的窗口对象 + body.find('#id').val(data1.id); + body.find('#contentUpdate').val(data1.content); + body.find('#type').val(data1.type); + layui.form.render(); + } + }); + }else if(obj.event === 'del'){ + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../../../deleteInformation", + data:{'id': data1.id}, + type:"post", + //dataType:"json", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 1100); + } + }); + return false; + }); + } + }) +}); diff --git a/src/main/webapp/js/kefu.js b/src/main/webapp/js/kefu.js new file mode 100644 index 0000000..531e970 --- /dev/null +++ b/src/main/webapp/js/kefu.js @@ -0,0 +1,71 @@ +/* + * 客服大单流失统计列表 + */ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#kefuTable', + url : '../../../getKefuList', + toolbar : '#toolbarDemo', + title : '客服大单流失统计',// 导出文件名 + id : 'kefuTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,30,50,100,999], + where:{ + proTypeLabel : '' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 80, + fixed : "left" + },{ + field : 'realLabel', + width : 150, + align : 'center', + title : '真实姓名', + },{ + field : 'shopNameLabel', + width : 240, + align : 'center', + title : '所在店铺', + },{ + field : 'totalLabel', + width : 240, + align : 'center', + title : '累计单量', + }] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.list.total,//解析数据长度 + "data" : res.data.list.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('kefuTableAll', { + method : 'get', + where : { + realLabel : $("#realLabel").val() + }, + page : { + curr : 1 + } + }); + return false; + }); +}); diff --git a/src/main/webapp/js/loginIp.js b/src/main/webapp/js/loginIp.js new file mode 100644 index 0000000..0576aa5 --- /dev/null +++ b/src/main/webapp/js/loginIp.js @@ -0,0 +1,210 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#loginIpTable', + url : '../../../getLoginIpList', + toolbar : '#toolbarDemo', + title : '用户表',// 导出文件名 + id : 'loginIpTableAll', + // 开启分页 + // page : true, + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,30,50,80,100,999], + where:{ + agreeIp:'', + remark :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ + { + type: 'checkbox' + }, + { + type : 'numbers', + title : '序号', + width : 50 + },{ + field : 'agreeIp', + align : 'center', + width : 180, + title : '授权IP' + },{ + field : 'remark', + align : 'center', + width : 380, + title : '说明' + },{ + field : 'createBy', + align : 'center', + width : 230, + title : '创建人', + templet : function(d) { + var text = ""; + if(d.createBy != null){ + text += d.createBy; + } + if(d.createDate != null){ + text += " " + layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss"); + } + return text; + } + },{ + field : 'updateBy', + align : 'center', + width : 230, + title : '更新人', + templet : function(d) { + var text = ""; + if(d.updateBy != null){ + text += d.updateBy; + } + if(d.updateTime != null){ + text += " " + layui.util.toDateString(d.updateTime, "yyyy-MM-dd HH:mm:ss"); + } + return text; + } + }, { + fixed : 'right', + title : '操作', + width : 200, + align : 'center', + toolbar : '#barDemo' + } ] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.ipList.total,//解析数据长度 + "data" : res.data.ipList.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('loginIpTableAll', { + method : 'get', + where : { + agreeIp: $("#agreeIp").val(), + remark : $("#remark").val() + }, + page : { + curr : 1 + } + }); + activeDelFunction(); + return false; + }); + + //激活批量删除 + function activeDelFunction(){ + $('.demoTable .layui-btn').on('click', function(){ + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + } + activeDelFunction(); + //执行批量删除 + var $ = layui.$,active = { + getCheckData: function(){ //获取选中数据 + var checkStatus = table.checkStatus('loginIpTableAll'), + checkData = checkStatus.data, + ids=""; + if(checkData.length == 0){ + layer.msg("请选择要删除的数据",function(){}); + return; + } + for (var i = 0; i < checkData.length; i++) { + ids+=checkData[i].id+","; + } + //var ids = JSON.stringify(delList); + layer.confirm('确定要删除这['+checkData.length+'条]数据么?',{icon:5,title:'友情提示'}, function(index){ + $.ajax({ + url:"../../../deleteIps", + dataType:'json', + data:{ + ids:ids + }, + type:'post', + success:function(data){ + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面表格 + }, 1000); + } + }); + return false; + }); + } + }; + + // 监听头部工作栏的 新增 + table.on('toolbar(loginIpTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加IP", + fix: false, //不固定 + maxmin: true, + area : [ '45%', '70%' ], + content : './addLoginIp.jsp', + }); + break; + }; + }); + // 监听 删除 + table.on('tool(loginIpTable)', function(obj) { + var data1 = obj.data; + if (obj.event === 'edit') { + layer.open({ + type : 2, + title : "修改ip", + area : [ '45%', '70%' ], + skin:'layui-layer-molv', + content : './updateLoginIp.jsp', + success : function(layero, index) { + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; // 得到iframe页的窗口对象 + body.find('#id').val(data1.id); + body.find('#agreeIp').val(data1.agreeIp); + body.find('#remark').val(data1.remark); + layui.form.render(); + } + }); + }else if(obj.event === 'del'){ + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../../../deleteIp", + data:{'id': data1.id}, + type:"post", + //dataType:"json", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 1100); + } + }); + return false; + }); + } + }) +}); diff --git a/src/main/webapp/js/packery.pkgd.min.js b/src/main/webapp/js/packery.pkgd.min.js new file mode 100644 index 0000000..2c67940 --- /dev/null +++ b/src/main/webapp/js/packery.pkgd.min.js @@ -0,0 +1,13 @@ +/*! + * Packery PACKAGED v2.1.2 + * Gapless, draggable grid layouts + * + * Licensed GPLv3 for open source use + * or Packery Commercial License for commercial use + * + * http://packery.metafizzy.co + * Copyright 2013-2018 Metafizzy + */ + +!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function h(t,e,n){var o,s="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var c=u[e];if(!c||"_"==e.charAt(0))return void r(s+" is not a valid method");var d=c.apply(u,n);o=void 0===o?d:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!c){c=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r=200==Math.round(t(o.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=n(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var c=a.isBorderBox="border-box"==s.boxSizing,d=0;u>d;d++){var l=h[d],f=s[l],p=parseFloat(f);a[l]=isNaN(p)?0:p}var g=a.paddingLeft+a.paddingRight,m=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,x=a.borderTopWidth+a.borderBottomWidth,b=c&&r,E=t(s.width);E!==!1&&(a.width=E+(b?0:g+_));var w=t(s.height);return w!==!1&&(a.height=w+(b?0:m+x)),a.innerWidth=a.width-(g+_),a.innerHeight=a.height-(m+x),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,c=!1;return s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o=t.x+e&&this.y+this.height>=t.y+i},e.overlaps=function(t){var e=this.x+this.width,i=this.y+this.height,n=t.x+t.width,o=t.y+t.height;return this.xt.x&&this.yt.y},e.getMaximalFreeRects=function(e){if(!this.overlaps(e))return!1;var i,n=[],o=this.x+this.width,s=this.y+this.height,r=e.x+e.width,a=e.y+e.height;return this.yr&&(i=new t({x:r,y:this.y,width:o-r,height:this.height}),n.push(i)),s>a&&(i=new t({x:this.x,y:a,width:this.width,height:s-a}),n.push(i)),this.x=t.width&&this.height>=t.height},t}),function(t,e){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],e);else if("object"==typeof module&&module.exports)module.exports=e(require("./rect"));else{var i=t.Packery=t.Packery||{};i.Packer=e(i.Rect)}}(window,function(t){"use strict";function e(t,e,i){this.width=t||0,this.height=e||0,this.sortDirection=i||"downwardLeftToRight",this.reset()}var i=e.prototype;i.reset=function(){this.spaces=[];var e=new t({x:0,y:0,width:this.width,height:this.height});this.spaces.push(e),this.sorter=n[this.sortDirection]||n.downwardLeftToRight},i.pack=function(t){for(var e=0;e=t.x+t.width&&i.height>=t.height-.01;if(n){t.y=i.y,this.placed(t);break}}},i.rowPack=function(t){for(var e=0;e=t.y+t.height&&i.width>=t.width-.01;if(n){t.x=i.x,this.placed(t);break}}},i.placeInSpace=function(t,e){t.x=e.x,t.y=e.y,this.placed(t)},i.placed=function(t){for(var e=[],i=0;ii&&1>n;return o?void this.goTo(t,e):void a.apply(this,arguments)},s.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&n&&(this.element.style[n]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},s.disablePlacing=function(){this.isPlacing=!1},s.removeElem=function(){var t=this.element.parentNode;t&&t.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},s.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||(t=this.dropPlaceholder=document.createElement("div"),t.className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},s.positionDropPlaceholder=function(){this.dropPlaceholder.style[n]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},s.hideDropPlaceholder=function(){var t=this.dropPlaceholder.parentNode;t&&t.removeChild(this.dropPlaceholder)},o}),function(t,e){"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer","packery/js/rect","packery/js/packer","packery/js/item"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):t.Packery=e(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(t,e,i,n,o){"use strict";function s(t,e){return t.position.y-e.position.y||t.position.x-e.position.x}function r(t,e){return t.position.x-e.position.x||t.position.y-e.position.y}function a(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)}i.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var h=e.create("packery");h.Item=o;var u=h.prototype;u._create=function(){e.prototype._create.call(this),this.packer=new n,this.shiftPacker=new n,this.isEnabled=!0,this.dragItemCount=0;var t=this;this.handleDraggabilly={dragStart:function(){t.itemDragStart(this.element)},dragMove:function(){t.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){t.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(e,i){i&&t.itemDragStart(e.currentTarget)},drag:function(e,i){i&&t.itemDragMove(e.currentTarget,i.position.left,i.position.top)},stop:function(e,i){i&&t.itemDragEnd(e.currentTarget)}}},u._resetLayout=function(){this.getSize(),this._getMeasurements();var t,e,i;this._getOption("horizontal")?(t=1/0,e=this.size.innerHeight+this.gutter,i="rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,e=1/0,i="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=e,this.packer.sortDirection=this.shiftPacker.sortDirection=i,this.packer.reset(),this.maxY=0,this.maxX=0},u._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},u._getItemLayoutPosition=function(t){if(this._setRectSize(t.element,t.rect),this.isShifting||this.dragItemCount>0){var e=this._getPackMethod();this.packer[e](t.rect)}else this.packer.pack(t.rect);return this._setMaxXY(t.rect),t.rect},u.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},u._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},u._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},u._setRectSize=function(e,i){var n=t(e),o=n.outerWidth,s=n.outerHeight;(o||s)&&(o=this._applyGridGutter(o,this.columnWidth),s=this._applyGridGutter(s,this.rowHeight)),i.width=Math.min(o,this.packer.width),i.height=Math.min(s,this.packer.height)},u._applyGridGutter=function(t,e){if(!e)return t+this.gutter;e+=this.gutter;var i=t%e,n=i&&1>i?"round":"ceil";return t=Math[n](t/e)*e},u._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},u._manageStamp=function(t){var e,n=this.getItem(t);if(n&&n.isPlacing)e=n.rect;else{var o=this._getElementOffset(t);e=new i({x:this._getOption("originLeft")?o.left:o.right,y:this._getOption("originTop")?o.top:o.bottom})}this._setRectSize(t,e),this.packer.placed(e),this._setMaxXY(e)},u.sortItemsByPosition=function(){var t=this._getOption("horizontal")?r:s;this.items.sort(t)},u.fit=function(t,e,i){var n=this.getItem(t);n&&(this.stamp(n.element),n.enablePlacing(),this.updateShiftTargets(n),e=void 0===e?n.rect.x:e,i=void 0===i?n.rect.y:i,this.shift(n,e,i),this._bindFitEvents(n),n.moveTo(n.rect.x,n.rect.y),this.shiftLayout(),this.unstamp(n.element),this.sortItemsByPosition(),n.disablePlacing())},u._bindFitEvents=function(t){function e(){n++,2==n&&i.dispatchEvent("fitComplete",null,[t])}var i=this,n=0;t.once("layout",e),this.once("layoutComplete",e)},u.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},u.needsResizeLayout=function(){var e=t(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return e[i]!=this.size[i]},u.resizeShiftPercentLayout=function(){var e=this._getItemsForLayout(this.items),i=this._getOption("horizontal"),n=i?"y":"x",o=i?"height":"width",s=i?"rowHeight":"columnWidth",r=i?"innerHeight":"innerWidth",a=this[s];if(a=a&&a+this.gutter){this._getMeasurements();var h=this[s]+this.gutter;e.forEach(function(t){var e=Math.round(t.rect[n]/a);t.rect[n]=e*h})}else{var u=t(this.element)[r]+this.gutter,c=this.packer[o];e.forEach(function(t){t.rect[n]=t.rect[n]/c*u})}this.shiftLayout()},u.itemDragStart=function(t){if(this.isEnabled){this.stamp(t);var e=this.getItem(t);e&&(e.enablePlacing(),e.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(e))}},u.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),n=this._getOption("originTop");this.stamps.forEach(function(t){var o=this.getItem(t);if(!o||!o.isPlacing){var s=this._getElementOffset(t),r=new i({x:e?s.left:s.right,y:n?s.top:s.bottom});this._setRectSize(t,r),this.shiftPacker.placed(r)}},this);var o=this._getOption("horizontal"),s=o?"rowHeight":"columnWidth",r=o?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var a,h=this[s];if(h=h&&h+this.gutter){var u=Math.ceil(t.rect[r]/h),c=Math.floor((this.shiftPacker[r]+this.gutter)/h);a=(c-u)*h;for(var d=0;c>d;d++){var l=o?0:d*h,f=o?d*h:0;this._addShiftTarget(l,f,a)}}else a=this.shiftPacker[r]+this.gutter-t.rect[r],this._addShiftTarget(0,0,a);var p=this._getItemsForLayout(this.items),g=this._getPackMethod();p.forEach(function(t){var e=t.rect;this._setRectSize(t.element,e),this.shiftPacker[g](e),this._addShiftTarget(e.x,e.y,a);var i=o?e.x+e.width:e.x,n=o?e.y:e.y+e.height;if(this._addShiftTarget(i,n,a),h)for(var s=Math.round(e[r]/h),u=1;s>u;u++){var c=o?i:e.x+h*u,d=o?e.y+h*u:n;this._addShiftTarget(c,d,a)}},this)},u._addShiftTarget=function(t,e,i){var n=this._getOption("horizontal")?e:t;if(!(0!==n&&n>i)){var o=t+","+e,s=-1!=this.shiftTargetKeys.indexOf(o);s||(this.shiftTargetKeys.push(o),this.shiftTargets.push({x:t,y:e}))}},u.shift=function(t,e,i){var n,o=1/0,s={x:e,y:i};this.shiftTargets.forEach(function(t){ + var e=a(t,s);o>e&&(n=t,o=e)}),t.rect.x=n.x,t.rect.y=n.y};var c=120;u.itemDragMove=function(t,e,i){function n(){s.shift(o,e,i),o.positionDropPlaceholder(),s.layout()}var o=this.isEnabled&&this.getItem(t);if(o){e-=this.size.paddingLeft,i-=this.size.paddingTop;var s=this,r=new Date,a=this._itemDragTime&&r-this._itemDragTime 2){//获取高度 + height = sizes[2]; + if(size.indexOf("mm") < 0){ + height = height * 10; + } + } + + width = width?.replace("mm",""); + if(pValue == 17 || pValue == "锦旗" || pValue == "亚克力"){ + }else{ + if(size.indexOf("mm") < 0){//单位转换 + length = length * 10; + width = width * 10; + } + } + + var sizeList = ""; + if(width == 0){ + sizeList = length; + }else if(height != ""){ + sizeList = length + "×" + width + "×" + height; + }else{ + sizeList = length + "×" + width; + } + + if(pValue == 17 || pValue == "锦旗" || pValue == "亚克力"){ + sizeList += "cm"; + }else{ + sizeList += "mm"; + } + + if(number == 1){ + bz_result = sizeList + '-' + count; + }else{ + bz_result = sizeList + '-' + number + '款各' + count; + } + + if(proTypeValue == "不干胶"){//不干胶备注方式 + bz_result += "-" + kindValue + "-" + proTypeValue; + }else{ + bz_result += "-" +proTypeValue; + if(kindValue != ""){ + bz_result += "-" + kindValue; + } + } + + if(craftList != ""){ + bz_result += '-' + craftList; + } + + if(wangwang != ""){ + bz_result += '-' + wangwang; + } + + if(other != ""){ + bz_result += "-" + other; + } + + $("#bz_result").val(bz_result); +} \ No newline at end of file diff --git a/src/main/webapp/js/role.js b/src/main/webapp/js/role.js new file mode 100644 index 0000000..0e9a7e4 --- /dev/null +++ b/src/main/webapp/js/role.js @@ -0,0 +1,188 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#roleTable', + url : '../../../getRoleList', + toolbar : '#toolbarDemo', + title : '角色表',// 导出文件名 + id : 'roleTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + roleName :'' + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + }, { + field : 'roleName', + align : 'center', + width : 200, + title : '角色名称' + },{ + field : 'remark', + title : '说明', + align : 'center', + width : 500 + },{ + field : 'isRegist', + title : '是否可注册', + align : 'center', + width : 120, + templet : '#statusTpl', + }, { + field : 'createDate', + title : '创建时间', + align : 'center', + width : 180, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + }, { + fixed : 'right', + title : '操作', + align : 'center', + width : 180, + toolbar : '#barDemo' + } ] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.roleList.total,//解析数据长度 + "data" : res.data.roleList.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('roleTableAll', { + method : 'post', + where : { + roleName : $("#roleName").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + //监听状态按钮 + form.on('switch(statusDemo)', function(obj){ + //layer.tips(this.value + ' ' + this.name + ':'+ obj.elem.checked, obj.othis); + $.ajax({ + url : "../../../changeRoleStatus", + dataType : 'json', + data : { + 'roleId':obj.value + }, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('状态修改成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('状态修改失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 2100); + } + }) + }) + + // 监听头部工作栏的 新增用户 + table.on('toolbar(roleTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加角色", + fix: false, //不固定 + maxmin: true, + area : [ '45%', '70%' ], + content : './addRole.jsp', + }); + break; + } + ; + }); + + // 监听 修改 + table.on('tool(roleTable)', function(obj) { + var data1 = obj.data; + if (obj.event === 'edit') { + layer.open({ + type : 2, + title : "修改角色信息", + area : [ '600px', '400px' ], + skin:'layui-layer-molv', + content : './updateRole.jsp', + success : function(layero, index) { + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; // 得到iframe页的窗口对象 + body.find('#roleId').val(data1.roleId); + body.find('#roleName').val(data1.roleName); + body.find('#remark').val(data1.remark); + /*body.find('input[name=isRegist][value=1]').attr("checked",data1.isRegist==1 ? true : false); + body.find('input[name=isRegist][value=0]').attr("checked",data1.isRegist==0 ? true : false);*/ + layui.form.render(); + } + }); + }else if (obj.event === 'editPer') { + roleId = data1.roleId; + //发送一个异步请求,查询选中的角色/用户对应的权限,只需要编号 + $.post('../../../rolePers',{roleId:roleId},function (data) { + //先获取所有的根节点 + var nodes = zTreeObj.getNodes(); + $.each(nodes,function () { + //判断当前节点编号是否在 角色对应的权限编号数组中,说明该选中,否则不选中 + if($.inArray(this.perId,data) != -1){ + zTreeObj.checkNode(this,true,true); + }else{ + zTreeObj.checkNode(this,false,true); + } + //判断二级节点 + $.each(this.children,function () { + if($.inArray(this.perId,data) != -1){ + zTreeObj.checkNode(this,true,true); + }else{ + zTreeObj.checkNode(this,false,true); + } + //判断三级节点 + $.each(this.children,function () { + if ($.inArray(this.perId, data) != -1) { + zTreeObj.checkNode(this, true, true); + } else { + zTreeObj.checkNode(this, false, true); + } + }); + }); + }); + }); + layer.open({ + type: 1, + title: "修改《"+data1.roleName+"》的权限", + area: ['720px', '630px'], + skin: 'layui-layer-molv', + content: $("#editPers")//引用的弹出层的页面层的方式加载添加界面表单 + }); + } + }) +}); diff --git a/src/main/webapp/js/searchPro.js b/src/main/webapp/js/searchPro.js new file mode 100644 index 0000000..45d031b --- /dev/null +++ b/src/main/webapp/js/searchPro.js @@ -0,0 +1,154 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + // 生成表格 + table.render({ + elem : '#searchTable', + url : '../../../getKeyWordsList', + toolbar : '#toolbarDemo', + title : '关键字表',// 导出文件名 + id : 'searchTableAll', + // 开启分页 + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + proTypeLabel :'', + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 50, + fixed : "left" + },{ + field : 'proTypeLabel', + width : 150, + algin : 'center', + title : '产品名称' + },{ + field : 'likeProTypeLabel', + title : '关键字', + edit : 'text' + },{ + field : 'url', + title : '菜单URL', + width : 250, + edit : 'text' + },{ + field : 'userStatus', + title : '状态', + width : 120, + templet : '#statusTpl', + },{ + field : 'createDate', + title : '创建时间', + width : 120, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd") : ""; + } + }, { + field : 'updateDate', + title : '更新时间', + width : 120, + templet : function(d) { + return d.updateDate != null ?layui.util.toDateString(d.updateDate, "yyyy-MM-dd") : ""; + } + } ] ], + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.total,//解析数据长度 + "data" : res.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('searchTableAll', { + method : 'post', + where : { + proTypeLabel : $("#proTypeLabel").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + //监听状态按钮 + form.on('switch(statusDemo)', function(obj){ + layer.tips(this.value + ' ' + this.name + ':'+ obj.elem.checked, obj.othis); + $.ajax({ + url : "../../../changeKeyWordsStatus", + dataType : 'json', + data : { + 'id':obj.value + }, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('状态修改成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('状态修改失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 2100); + } + }) + }) + + // 监听头部工作栏的 新增 + table.on('toolbar(searchTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加产品关键字", + fix: false, //不固定 + maxmin: true, + area : [ '45%', '70%' ], + content : './addSearchPro.jsp', + }); + break; + } + ; + }); + + // 监听编辑关键字 + table.on('edit(searchTable)', function(obj){ + var value = obj.value, //得到修改后的值 + field = obj.field; //得到字段 + var data = obj.data,//得到所在行所有键值 + id = data.id; + $.ajax({ + url:"../../../updateKeyWord", + data:{ + id : id, + value : value, + field : field, + }, + type:"post", + //dataType:"json", + success:function (data) { + if (data.code == 200) { + layer.msg('成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + } + }); + }) +}); diff --git a/src/main/webapp/js/updateLog.js b/src/main/webapp/js/updateLog.js new file mode 100644 index 0000000..d9afa71 --- /dev/null +++ b/src/main/webapp/js/updateLog.js @@ -0,0 +1,164 @@ +layui.use([ 'table', 'form', 'element', 'laydate','upload','util' ], function() { + var $ = layui.jquery + table = layui.table, + form = layui.form, + element = layui.element, + laydate = layui.laydate, + upload = layui.upload, + util = layui.util; + + // 生成表格 + table.render({ + elem : '#logTable', + url : '../../../getUpdateLogs', + toolbar : '#toolbarDemo', + title : "更新日志",// 导出名 + id : 'logAll', + // skin : 'row', + // size :'lg', + border : true, + page : true, + limits : [ 10, 30, 50, 80, 100, 999 ], + where : { + content : '', + }, + cols : [ [ + { type: 'checkbox' }, + { + type : 'numbers', + title : '序号', + unresize : true + }, { + field : 'content', + align : "center", + width : 520, + title : '更新内容' + }, { + field : 'addTime', + align : "center", + width : 260, + title : '更新时间', + templet : function(d) { + return d.addTime != null ?layui.util.toDateString(d.addTime, "yyyy-MM-dd HH:mm:ss") : ""; + } + }, { + field : 'createBy', + align : "center", + width : 120, + title : '添加人' + }, { + fixed : 'right', + title : '操作', + align : "center", + width : 180, + toolbar : '#barDemo' + } ] ], + parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, // 解析接口状态 + "msg" : "", // 解析提示文本 + "count" : res.data.list.length,// 解析数据长度 + "data" : res.data.list + // 解析数据列表 + }; + } + }); + //点击查询按钮,重载文章表格 + $('#search').on('click', function() { + table.reload('logAll', { + method : 'post', + where : { + content : $("#content").val(), + add_time_begin : $("#addTimeBegin").val(), + add_time_end : $("#addTimeEnd").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + // 时间选择器初始化 开始时间 + laydate.render({ + elem: '#addTimeBegin', + format: 'yyyy-MM-dd', + done: function (value, date, endDate) { + var startDate = new Date(value).getTime(); + var endTime = new Date($('#addTimeEnd').val()).getTime(); + if (endTime < startDate) { + layer.msg('结束时间不能小于开始时间'); + $('#addTimeBegin').val($('#addTimeEnd').val()); + } + } + }) + laydate.render({ //结束时间 + elem: '#addTimeEnd', + format: 'yyyy-MM-dd', + done: function (value, date, endDate) { + var startDate = new Date($('#addTimeBegin').val()).getTime(); + var endTime = new Date(value).getTime(); + if (endTime < startDate) { + layer.msg('结束时间不能小于开始时间'); + $('#addTimeEnd').val($('#addTimeBegin').val()); + } + } + }); + + //监听头工具栏事件--新增文章按钮 + table.on('toolbar(logTable)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id), + data = checkStatus.data; //获取选中的数据 + switch (obj.event) { + case 'add': + layer.open({ + type: 2, + title: "添加更新日志", + area: ['900px','600px'], + skin: "layui-layer-molv", + content: './addLog.jsp', + }); + break; + }; + }); + + //监听表格操作按钮--文章编辑 + table.on('tool(logTable)',function(obj){ + if(obj.event === 'edit'){ + layer.open({ + type: 2, + title: "修改信息", + area: ['900px','600px'], + skin: "layui-layer-molv", + fix: false, //不固定 + //btn: ['取消'],//弹出层按钮 + maxmin: true, + content: './updateLog.jsp', + success: function(layero, index){ + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象 + body.find('#id').val(obj.data.id); + body.find('#addTime').val(layui.util.toDateString(obj.data.addTime,"yyyy-MM-dd")); + body.find('#content').val(obj.data.content); + } + }); + }else if(obj.event === 'del'){ + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../../../deleteLog", + data:{'id': obj.data.id}, + type:"post", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + location.reload();//重新加载页面 + }, 1100); + } + }); + }); + } + }); +}); \ No newline at end of file diff --git a/src/main/webapp/js/user.js b/src/main/webapp/js/user.js new file mode 100644 index 0000000..d9e6b0d --- /dev/null +++ b/src/main/webapp/js/user.js @@ -0,0 +1,286 @@ +layui.use([ 'element', 'table', 'laydate', 'form' ], function() { + var $ = layui.jquery; + var table = layui.table; + var laydate = layui.laydate; + var element = layui.element; + var form = layui.form; + + + var sysStatusData = { + 0:'新用户', + 1:'第一阶段', + 2:'测试通过' + }; + // 生成表格 + table.render({ + elem : '#userTable', + url : '../../../getUserList', + toolbar : '#toolbarDemo', + title : '用户表',// 导出文件名 + id : 'userTableAll', + // 开启分页 + // page : true, + page : { + layout : [ 'count', 'prev', 'page', 'next', 'skip', 'limit' ] + }, + limits : [10,30,50,80,100,999], + /*request : { + 'limitName' : 'pageSize' // 分页每页条数默认字段改为pageSize + },*/ + where:{ + username :'', + realname :'', + userStatus :'', + roleSearch :'', + role : $("#role").val() + }, + cellMinWidth : 80, // 全局定义常规单元格的最小宽度,layui 2.2.1 新增 + cols : [ [ { + type : 'numbers', + title : '序号', + width : 60, + fixed : "left" + },{ + field : 'username', + align : 'center', + width : 200, + title : '用户名称' + },{ + field : 'realname', + align : 'center', + width : 120, + title : '真实姓名' + },{ + field : 'role', + title : '角色', + sort : 'true', + templet:function(d){ + if(d.role != null && d.role != ""){ + var load = d.role.split(","); + var roleStr = ""; + for (var i = 0; i < load.length; i++) { + roleStr += roleData[load[i]] + " "; + } + //roleStr = roleStr.substring(0,roleStr.length-1) + return roleStr + } + return "" + } + },{ + field : 'birthDay', + title : '生日时间', + align : 'center', + width : 120, + templet : function(d) { + return d.birthDay != null ?layui.util.toDateString(d.birthDay, "MM-dd") : ""; + } + },{ + field : 'birthType', + title : '农历/新历', + align : 'center', + width : 100, + templet : function(d) { + if(d.birthType == "0"){ + return "农历" + }else{ + return "新历" + } + } + },{ + field : 'sysStatus', + title : '系统状态', + align : 'center', + width : 120, + templet : function(d) { + if(d.sysStatus == '0'){ + return ''+ sysStatusData[d.sysStatus] +''; + }else if (d.sysStatus == '1'){ + return ''+ sysStatusData[d.sysStatus] +''; + }else{ + return ''+ sysStatusData[d.sysStatus] +''; + } + } + },{ + field : 'userStatus', + title : '启用状态', + align : 'center', + width : 150, + templet : '#userStatusTpl', + },{ + field : 'needIp', + title : '判断Ip', + align : 'center', + width : 100, + templet : function(d) { + if(d.needIp == "0"){ + return "否" + }else if(d.needIp == "1"){ + return "是" + }else{ + return "不需要" + } + } + },{ + field : 'createDate', + title : '创建时间', + align : 'center', + width : 180, + templet : function(d) { + return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : ""; + } + },{ + fixed : 'right', + title : '操作', + width : 150, + align : 'center', + toolbar : '#barDemo' + } ] ], + //数据渲染完的回调。 + done: function (res, curr, count) { + // 由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 + // $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible'); + }, + parseData : function(res) { //将原始数据解析成 table 组件所规定的数据 + return { + "code" : 0, //解析接口状态 + "msg" : "", //解析提示文本 + "count" : res.data.userList.total,//解析数据长度 + "data" : res.data.userList.list//解析数据列表 + }; + } + }); + + //点击查询按钮,重载表格 + $('#searchBtn').on('click', function() { + table.reload('userTableAll', { + method : 'get', + where : { + username : $("#username").val(), + realname : $("#realname").val(), + userStatus : $("#userStatus").val(), + roleSearch : $("#roleSearch").val(), + role : $("#role").val() + }, + page : { + curr : 1 + } + }); + return false; + }); + + //监听状态按钮 + form.on('switch(userStatusDemo)', function(obj){ + console.log(obj) + //layer.tips(this.value + ' ' + this.name + ':'+ obj.elem.checked, obj.othis); + $.ajax({ + url : "../../../changeUserStatus", + dataType : 'json', + data : { + 'userId':obj.value + }, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('状态修改成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('状态修改失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + form.on('switch(sysStatusDemo)', function(obj){ + $.ajax({ + url : "../../../changeSysStatus", + dataType : 'json', + data : { + 'userId':obj.value + }, + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('状态修改成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('状态修改失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + }) + + // 监听头部工作栏的 新增用户 + table.on('toolbar(userTable)', function(obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'add': + layer.open({ + type : 2, + title : "添加用户", + fix: false, //不固定 + maxmin: true, + area : [ '45%', '70%' ], + content : './addUser.jsp', + }); + break; + case 'editAllIp': + $.ajax({ + url : "../../../changeNeedIp", + dataType : 'json', + type : 'post', + success : function(data) { + if (data.code == 200) { + layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框 + }else{ + layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框 + } + } + }) + break; + }; + + + }); + + // 监听 修改 + table.on('tool(userTable)', function(obj) { + var data1 = obj.data; + if (obj.event === 'edit') { + layer.open({ + type : 2, + title : "修改用户信息", + area : [ '45%', '70%' ], + skin:'layui-layer-molv', + content : './updateUser.jsp', + success : function(layero, index) { + var body = layer.getChildFrame('body', index); + var iframeWin = window[layero.find('iframe')[0]['name']]; // 得到iframe页的窗口对象 + body.find('#userId').val(data1.userId); + body.find('#username').val(data1.username); + body.find('#password').val("********"); + body.find('#realnameUpdate').val(data1.realname); + body.find('#needIp').val(data1.needIp); + body.find('#ROLE').val(data1.role); + body.find('#sysStatusUpdate').val(data1.sysStatus); + } + }); + }else if (obj.event === 'del') {// 监听删除 + layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){ + $.ajax({ + url:"../../../deleteUserById", + data:{'id': data1.userId}, + type:"post", + //dataType:"json", + success:function (data) { + if (data.code == 200) { + layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框 + }else{ + layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框 + } + setTimeout(function(){ + // location.reload();//重新加载页面 + }, 1100); + } + }); + return false; + }); + } + }) +}); diff --git a/src/main/webapp/login.jsp b/src/main/webapp/login.jsp new file mode 100644 index 0000000..a21fd34 --- /dev/null +++ b/src/main/webapp/login.jsp @@ -0,0 +1,392 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> + + + + + + 登录 + + + + + + + +
+ +
+
+
+

领淘产品报价系统

+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+ + ${errorInfo} +
+
+ +
+
+ +
+
+
您的ip是:
+
+
+
+ + +
+
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+ +
+
+ + +
+
+
+
+
+ \ No newline at end of file diff --git a/src/main/webapp/static/css/adminLogin.css b/src/main/webapp/static/css/adminLogin.css new file mode 100644 index 0000000..91cbe96 --- /dev/null +++ b/src/main/webapp/static/css/adminLogin.css @@ -0,0 +1,149 @@ +/*登陆表单样式 start*/ +.wrap{ + width: 100%; + height: 100%; + background: url("../../img/handle.jpg") no-repeat; + background-size: cover; +} +.loginForm{ + margin-left: 35%; + margin-top: 10%; + /*background-color: #cccccc;*/ + background-color: #e7e7e7; + width: 400px; + height: 400px; + float: left; + z-index: 9999; + position: fixed; + opacity: 0.75; +} +.usernameDiv{ + width: 300px; + height: 40px; + padding-left: 130px; + padding-top: 30px; + +} +.adminInput{ + width: 200px; + height: 40px; + font-size: 15px; + border-radius: 0.5em; + /*margin-left: auto;*/ + /*border: 1px solid #cccccc;*/ +} +.passwordDiv{ + width: 300px; + height: 40px; + padding-left: 130px; + padding-top: 28px; +} +.cardDiv{ + width: 120px; + height: 40px; + padding-top: 28px; + padding-left: 14px; + float: left; +} +.cardInput{ + width: 124px; + height: 40px; + font-size: 15px; + border-radius: 0.5em 0em 0em 0.5em; +} +.codeDiv{ + width: 100px; + height: 40px; + padding-top: 28px; + padding-right: 20px; + float: left; +} +.codeInput{ + width: 80px; + height: 40px; + font-size: 15px; + border-radius: 0em 0.5em 0.5em 0em; + /*验证码样式*/ + font-family: Arial; + font-style: italic; + font-weight: bold; + /*border: 0;*/ + letter-spacing: 2px; + cursor: pointer; +} +i{ + position: absolute; +} +.adminIcon{ + font-size: 22px; + margin-top: 8px; + margin-left: 165px; +} +.logoHead{ + width: 250px; + height: 60px; + padding-left: 90px; + padding-top: 25px; +} +.usernameLabel{ + width: 70px; + height: 30px; + font-size: 16px; + float: left; + margin-left: 55px; + margin-top: 40px; +} +.submitLabel{ + width: 160px; + height: 30px; + font-size: 13px; + float: left; + margin-left: 55px; + margin-top: 40px; + cursor: pointer; +} +.usernameWrapDiv{ + width: 400px; + height: 70px; +} +.submitDiv{ + width: 150px; + height: 40px; + padding-left: 10px; + padding-top: 28px; + float: left; +} +.submit{ + width: 100px; + height: 40px; + border-radius: 0.5em; +} +img{ + position: absolute; +} +.imgStyle{ + width: 100%; + height: 100%; +} +/*登陆表单样式 end*/ + +/*注册页面样式 start*/ +.registerPage{ + width: 100%; + height: 100%; + /*background-color: #cccccc;*/ + display: none; + opacity: 0.75; +} +.registerDiv{ + width: 100%; + height: 100%; + z-index: 9999; + opacity: 0.75; +} +.layui-form select{ + display:block; + width:200px +} +/*注册页面样式 end*/ + diff --git a/src/main/webapp/static/css/formSelects-v4.css b/src/main/webapp/static/css/formSelects-v4.css new file mode 100644 index 0000000..d7d6981 --- /dev/null +++ b/src/main/webapp/static/css/formSelects-v4.css @@ -0,0 +1,174 @@ +/* formSelects多选css */ +select[xm-select]{display: none !important;} +.xm-select-parent * {margin: 0;padding: 0;font-family: "Helvetica Neue", Helvetica, "PingFang SC", 微软雅黑, Tahoma, Arial, sans-serif; box-sizing: initial;} +.xm-select-parent {text-align: left;} +.xm-select-parent select {display: none;} +.xm-select-parent .xm-select-title {position: relative;min-height: 36px;} +.xm-select-parent .xm-input {cursor: pointer;border-radius: 2px;border-width: 1px;border-style: solid;border-color: #E6E6E6;display: block;width: 100%;box-sizing: border-box;background-color: #FFF;height: 36px;line-height: 1.3;padding-left: 10px;outline: 0} +.xm-select-parent .xm-select-sj {display: inline-block;width: 0;height: 0;border-style: dashed;border-color: transparent;overflow: hidden;position: absolute;right: 10px;top: 50%;margin-top: -3px;cursor: pointer;border-width: 6px;border-top-color: #C2C2C2;border-top-style: solid;transition: all .3s;-webkit-transition: all .3s} +.xm-select-parent .xm-form-selected .xm-select-sj {margin-top: -9px;transform: rotate(180deg)} +.xm-select-parent .xm-form-select dl {display: none;position: absolute;left: 0;top: 42px;padding: 5px 0;z-index: 999;min-width: 100%;border: 1px solid #d2d2d2;max-height: 300px;overflow-y: auto;background-color: #fff;border-radius: 2px;box-shadow: 0 2px 4px rgba(0, 0, 0, .12);box-sizing: border-box;animation-fill-mode: both;-webkit-animation-name: layui-upbit;animation-name: layui-upbit;-webkit-animation-duration: .3s;animation-duration: .3s;-webkit-animation-fill-mode: both;animation-fill-mode: both} +@-webkit-keyframes layui-upbit { + from {-webkit-transform: translate3d(0, 30px, 0);opacity: .3} + to {-webkit-transform: translate3d(0, 0, 0);opacity: 1} +} +@keyframes layui-upbit { + from {transform: translate3d(0, 30px, 0);opacity: .3} + to {transform: translate3d(0, 0, 0);opacity: 1} +} +.xm-select-parent .xm-form-selected dl {display: block} +.xm-select-parent .xm-form-select dl dd,.xm-select-parent .xm-form-select dl dt {padding: 0 10px;line-height: 36px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis} +.xm-select-parent .xm-form-select dl dd {cursor: pointer;height: 36px;} +.xm-select-parent .xm-form-select dl dd:hover {background-color: #f2f2f2} +.xm-select-parent .xm-form-select dl dt {font-size: 12px;color: #999} +.layui-select-disabled .xm-dis-disabled {border-color: #eee!important} +.xm-select-parent .xm-form-select dl .xm-select-tips {padding-left: 10px!important;color: #999;font-size: 14px} +.xm-unselect {-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none} + +.xm-form-checkbox {position: relative;display: block;vertical-align: middle;cursor: pointer;font-size: 0;-webkit-transition: .1s linear;transition: .1s linear;box-sizing: border-box;height: auto!important;line-height: normal!important;border: none!important;margin-right: 0;padding-right: 0;background: 0 0;} +.xm-form-checkbox > i {color: #FFF; font-size: 16px; width: 16px; height: 16px; position: absolute; top: 9px; border: 1px solid #5FB878; border-radius: 3px; z-index: 2;} +.xm-form-checkbox:hover > i {border-color: #5FB878;} +.xm-form-checkbox > span{display: block;position: relative;padding: 0 15px 0 30px;height: 100%;font-size: 14px;border-radius: 2px 0 0 2px;background-color: #d2d2d2;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;background: 0 0;color: #666;line-height: 36px;} + +.xm-select-parent dl{width: 100%;} +.xm-select-parent dl dd{position: relative;} +.xm-select-parent dl dd > i:not(.icon-sousuo){position: absolute; right: 10px; top: 0; color: #AAAAAA;} +.xm-select-parent dl dd.xm-select-this div i {border: none; color: #009688; font-size: 18px;} +.xm-select-parent dl dd.xm-select-this div i:after{content: '\e613';} +.xm-select-parent dl dd.xm-dis-disabled div i {border-color: #C2C2C2;} +.xm-select-parent dl dd.xm-dis-disabled.xm-select-this div i {color: #C2C2C2;} +.xm-select-radio div.xm-form-checkbox > i {border-radius: 20px;} +.xm-select-parent dl.xm-select-radio dd.xm-select-this div i:after{content: '\e62b';} + +.xm-dis-disabled,.xm-dis-disabled:hover {cursor: not-allowed!important} +.xm-form-select dl dd.xm-dis-disabled {background-color: #fff!important} +.xm-form-select dl dd.xm-dis-disabled span {color: #C2C2C2} +.xm-form-select dl dd.xm-dis-disabled .xm-icon-yes {border-color: #C2C2C2} +.xm-select-parent {position: relative;-moz-user-select: none;-ms-user-select: none;-webkit-user-select: none} +.xm-select-parent .xm-select {line-height: normal;height: auto;padding: 4px 10px 1px 10px;overflow: hidden;min-height: 36px;left: 0;z-index: 99;position: absolute;background: 0 0;padding-right: 20px} +.xm-select-parent .xm-select:hover {border-color: #C0C4CC} +.xm-select-parent .xm-select .xm-select-label {display: inline-block;margin: 0;vertical-align: middle} +.xm-select-parent .xm-select-title div.xm-select-label>span {position: relative;padding: 2px 5px;background-color: #009688;border-radius: 2px;color: #FFF;display: inline-block;line-height: 18px;height: 18px;margin: 2px 5px 2px 0;cursor: initial;user-select: none;font-size: 14px;padding-right: 25px;-webkit-user-select: none;} +.xm-select-parent .xm-select-title div.xm-select-label>span i {position: absolute; margin-left: 8px; font-size: 12px; cursor: pointer; line-height: 20px;} +.xm-select-parent .xm-select .xm-select-input {border: none;height: 28px;background-color: transparent;padding: 0;vertical-align: middle;display: inline-block;width: 50px} +.xm-select-parent .xm-select--suffix input {border: none} +.xm-form-selected .xm-select,.xm-form-selected .xm-select:hover {border-color: #009688!important} +.xm-select--suffix+div {position: absolute;top: 0;left: 0;bottom: 0;right: 0} +.xm-select-dis .xm-select--suffix+div {z-index: 100;cursor: no-drop!important;opacity: .2;background-color: #FFF;} +.xm-select-disabled,.xm-select-disabled:hover {color: #d2d2d2!important;cursor: not-allowed!important;background-color: #fff} +.xm-select-none {display: none;margin: 5px 0;text-align: center;} +.xm-select-none:hover {background-color: #FFF!important} +.xm-select-empty {display: block} +.xm-span-hide {display: none!important;} +.layui-form-pane .xm-select,.layui-form-pane .xm-select:hover {border: none!important;top: 0px} +.layui-form-pane .xm-select-title {border: 1px solid #e6e6e6!important} +.xm-select-hide {display: none !important;} +div[xm-hg] .xm-select-label{white-space: nowrap; overflow: hidden; position: absolute; right: 30px; left: 0; padding-left: 10px;} + +/* 颜色相关 */ +div[xm-select-skin] .xm-select-title div.xm-select-label>span {border: 1px solid #009688} +div[xm-select-skin] .xm-select-title div.xm-select-label>span i:hover {opacity: .8;filter: alpha(opacity=80);cursor: pointer} +div[xm-select-skin=default] .xm-select-title div.xm-select-label>span {background-color: #F0F2F5;color: #909399;border: 1px solid #F0F2F5} +div[xm-select-skin=default] .xm-select-title div.xm-select-label>span i {color: #C0C4CC} +div[xm-select-skin=default] .xm-select-title div.xm-select-label>span i:before {content: '\e60b'; font-size: 16px; margin-left: -3px;} +div[xm-select-skin=default] dl dd:not(.xm-dis-disabled) i {border-color: #5FB878} +div[xm-select-skin=default] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #5FB878} +div[xm-select-skin=default].xm-form-selected .xm-select,div[xm-select-skin=default].xm-form-selected .xm-select:hover {border-color: #C0C4CC!important} +div[xm-select-skin=primary] .xm-select-title div.xm-select-label>span {background-color: #009688;color: #FFF;border: 1px solid #009688} +div[xm-select-skin=primary] .xm-select-title div.xm-select-label>span i {background-color: #009688; color: #FFF} +div[xm-select-skin=primary] dl dd:not(.xm-dis-disabled) i {border-color: #009688} +div[xm-select-skin=primary] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #009688} +div[xm-select-skin=primary].xm-form-selected .xm-select,div[xm-select-skin=primary].xm-form-selected .xm-select:hover {border-color: #009688!important} +div[xm-select-skin=normal] .xm-select-title div.xm-select-label>span {background-color: #1E9FFF;color: #FFF;border: 1px solid #1E9FFF} +div[xm-select-skin=normal] .xm-select-title div.xm-select-label>span i {background-color: #1E9FFF;color: #FFF} +div[xm-select-skin=normal] dl dd:not(.xm-dis-disabled) i {border-color: #1E9FFF} +div[xm-select-skin=normal] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #1E9FFF} +div[xm-select-skin=normal].xm-form-selected .xm-select,div[xm-select-skin=normal].xm-form-selected .xm-select:hover {border-color: #1E9FFF!important} +div[xm-select-skin=warm] .xm-select-title div.xm-select-label>span {background-color: #FFB800;color: #FFF;border: 1px solid #FFB800} +div[xm-select-skin=warm] .xm-select-title div.xm-select-label>span i {background-color: #FFB800;color: #FFF} +div[xm-select-skin=warm] dl dd:not(.xm-dis-disabled) i {border-color: #FFB800} +div[xm-select-skin=warm] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #FFB800} +div[xm-select-skin=warm].xm-form-selected .xm-select,div[xm-select-skin=warm].xm-form-selected .xm-select:hover {border-color: #FFB800!important} +div[xm-select-skin=danger] .xm-select-title div.xm-select-label>span {background-color: #FF5722;color: #FFF;border: 1px solid #FF5722} +div[xm-select-skin=danger] .xm-select-title div.xm-select-label>span i {background-color: #FF5722;color: #FFF} +div[xm-select-skin=danger] dl dd:not(.xm-dis-disabled) i {border-color: #FF5722} +div[xm-select-skin=danger] dl dd.xm-select-this:not(.xm-dis-disabled) i {color: #FF5722} +div[xm-select-skin=danger].xm-form-selected .xm-select,div[xm-select-skin=danger].xm-form-selected .xm-select:hover {border-color: #FF5722!important} + + +/* 多选联动 */ +.xm-select-parent .layui-form-danger+.xm-select-title .xm-select {border-color: #FF5722 !important;} +.xm-select-linkage li {padding: 10px 0px;cursor: pointer;} +.xm-select-linkage li span {padding-left: 20px;padding-right: 30px;display: inline-block;height: 20px;overflow: hidden;text-overflow: ellipsis;} +.xm-select-linkage li.xm-select-this span {border-left: 5px solid #009688;color: #009688;padding-left: 15px;} +.xm-select-linkage-group {position: absolute;left: 0;top: 0;right: 0;bottom: 0;overflow-x: hidden;overflow-y: auto;} +.xm-select-linkage-group li:hover {border-left: 1px solid #009688;} +.xm-select-linkage-group li:hover span {padding-left: 19px;} +.xm-select-linkage-group li.xm-select-this:hover span {padding-left: 15px;border-left-width: 4px;} +.xm-select-linkage-group:nth-child(4n+1){background-color: #EFEFEF; left: 0;} +.xm-select-linkage-group:nth-child(4n+1) li.xm-select-active{background-color: #F5F5F5;} +.xm-select-linkage-group:nth-child(4n+2){background-color: #F5F5F5; left: 100px;} +.xm-select-linkage-group:nth-child(4n+3) li.xm-select-active{background-color: #FAFAFA;} +.xm-select-linkage-group:nth-child(4n+3){background-color: #FAFAFA; left: 200px;} +.xm-select-linkage-group:nth-child(4n+3) li.xm-select-active{background-color: #FFFFFF;} +.xm-select-linkage-group:nth-child(4n+4){background-color: #FFFFFF; left: 300px;} +.xm-select-linkage-group:nth-child(4n+4) li.xm-select-active{background-color: #EFEFEF;} +.xm-select-linkage li{list-style: none;} +.xm-select-linkage-hide {display: none;} +.xm-select-linkage-show {display: block;} + +div[xm-select-skin='default'] .xm-select-linkage li.xm-select-this span {border-left-color: #5FB878;color: #5FB878;} +div[xm-select-skin='default'] .xm-select-linkage-group li:hover {border-left-color: #5FB878;} +div[xm-select-skin='primary'] .xm-select-linkage li.xm-select-this span {border-left-color: #1E9FFF;color: #1E9FFF;} +div[xm-select-skin='primary'] .xm-select-linkage-group li:hover {border-left-color: #1E9FFF;} +div[xm-select-skin='normal'] .xm-select-linkage li.xm-select-this span {border-left-color: #1E9FFF;color: #1E9FFF;} +div[xm-select-skin='normal'] .xm-select-linkage-group li:hover {border-left-color: #1E9FFF;} +div[xm-select-skin='warm'] .xm-select-linkage li.xm-select-this span {border-left-color: #FFB800;color: #FFB800;} +div[xm-select-skin='warm'] .xm-select-linkage-group li:hover {border-left-color: #FFB800;} +div[xm-select-skin='danger'] .xm-select-linkage li.xm-select-this span {border-left-color: #FF5722;color: #FF5722;} +div[xm-select-skin='danger'] .xm-select-linkage-group li:hover {border-left-color: #FF5722;} + + +/* 快捷操作 */ +.xm-select-tips[style]:hover{background-color: #FFF!important;} +.xm-select-parent dd > .xm-cz{position: absolute; top: 0px; right: 10px;} +.xm-select-parent dd > .xm-cz-group{margin-right: 30px; border-right: 2px solid #ddd; height: 16px; margin-top: 10px; line-height: 16px; overflow: hidden;} +.xm-select-parent dd > .xm-cz-group .xm-cz{display: inline-block; margin-right: 30px;} +.xm-select-parent dd > .xm-cz-group .xm-cz i{margin-right: 10px;} +.xm-select-parent dd > .xm-cz-group[show='name'] .xm-cz i{display: none;} +.xm-select-parent dd > .xm-cz-group[show='icon'] .xm-cz span{display: none;} +.xm-select-parent dd .xm-cz:hover{color: #009688;} +div[xm-select-skin='default'] dd .xm-cz:hover{color: #C0C4CC;} +div[xm-select-skin='primary'] dd .xm-cz:hover{color: #009688;} +div[xm-select-skin='normal'] dd .xm-cz:hover{color: #1E9FFF;} +div[xm-select-skin='warm'] dd .xm-cz:hover{color: #FFB800;} +div[xm-select-skin='danger'] dd .xm-cz:hover{color: #FF5722;} + + +/* 下拉里面的搜索 */ +.xm-select-tips .xm-input{border: none; border-bottom: 1px solid #E6E6E6; padding-left: 27px;} +.xm-select-tips .icon-sousuo{position: absolute;} +.xm-select-tips.xm-dl-input{display: none;} +div[xm-select-search-type="1"] .xm-select-tips.xm-dl-input{display: block;} +div[xm-select-search-type="1"] .xm-select .xm-select-input{display: none !important;} + +/* 阿里巴巴矢量图标库 */ +@font-face {font-family: "xm-iconfont"; + src: url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831'); /* IE9*/ + src: url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.eot?t=1534240067831#iefix') format('embedded-opentype'), /* IE6-IE8 */ + url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAsYAAsAAAAAEQwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8ukovY21hcAAAAYAAAACrAAACPBtV6wxnbHlmAAACLAAABnEAAAmMovtEvWhlYWQAAAigAAAAMQAAADYSctBCaGhlYQAACNQAAAAgAAAAJAgBA69obXR4AAAI9AAAABsAAAAwMCX//WxvY2EAAAkQAAAAGgAAABoN8gwubWF4cAAACSwAAAAeAAAAIAEiAM9uYW1lAAAJTAAAAUUAAAJtPlT+fXBvc3QAAAqUAAAAhAAAALJ1LunfeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWacwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMbwwZ27438AQw9zMcAQozAiSAwDk4AxmeJzlks0JwzAMhZ8bN/1xD4GU0h2Se26BbJMJOkkn6KmTPbJF8mT5UGg3qMRn0EPIRs8A9gAq0YsIhDcCLF5SQ9YrnLMe8VB9RSMlMjCxYcueIyfOy7CuAFHU7lP9iqApt5L3ksBJbzlgZ9PVkXDUvbWa6x8T/i0u+XyWKtmmHW0NDI55yeRok2DjaKdg65jX7Bzzm71jXnN08vzJkQvg7Ng/WAYH9Qb3wzM/AHicjVVvbFzFEd/Zfbv7/vn9uXf33vl8Pt/dO99BHOzEZ9/DKTImRS0KjUoLDUFCjtpCMGkT1D9qldQmhkiUSv2G1BBB1VYqilGREOIDViWEGzttqkpI/cAXqyL5gFRALVIF+VCJe9fZd+fEpR/o6d3s7G9mZ2dmZ3aJIKR3h0ZYmVgkIjGZJV8mDxECtenOTDOu1UU+hJoD+TCqzcNMk2V8O5OCbDVRPgZhEt4JCNTZ/4HA3+DfuWIxl8pcFFErG3K7oD7fvev8UaMUmEu259lrRjBsfs6cLhYbRfzSbSjGRVAkfQYihUXsyPkHTVyyZDNmXzSHg3Tl+aPKxpJFqbWGdtLl8w8iYDxuDTQIx7yc1YCdIx7Jk3HSwbwQwGBcyMKZVtG0ZCuJxjFJBb+foMSfhJaPOSr4FYgwSwqIx2MHJALtAdBi/7xcSMJL+fxmmBS2guD61tZm96X02mgcj0J1NAaIR9UMmhXIV24FuLUC71+r1AEmK1AYrQHUK/Tly/m8MrOZz2+FSf7jzc3NK9XR9F2lVq+gmRp0r+HK9B+VJmR263Rgd7ALwR/FOFfx/FeJS0YxQh9drakgMJhaBVizkwgqWxLD6eQ0Qo8f7p44fJziSH9x+PjLZUO+/jZ9+K35X37ljn/Rv+yW4Ziuf2nl4PfS5/LrP47OHTsFJULYjf369UZAEBmSqEOSJmG4Me6LeznA0BFkcDoJlGynVzmH2vY21DhPr25v9DjvbfTp2TXG1s5mlK0q4S7lT++6obbRox/s6CHF2LMEsHvoFfSFQIKnKQMZJVFCD6WH0p0PVvvcRx8uph8eUks0jOFNtskOkpDsJ18k9+NqVRg3qqMCSSerjyRuYUi1/vFH7YIqikGVcD+ehFl/pqPSPKZ6DG6mHisljFhBFvU/PoRkSNd/JHO6Ja5JOXcfwIGJbm/igBq/hn8Kfb57YbYUxyX4cwkLKH1u4gD9GVSL6USxCjjCO2p8VdcvH9XRYIQWqUblu3pR/v2BvXMAc3tTmJiDAQ895B9NL0C9BFdKqqRKczDX/Whg7O1irVbcqZ8/sbfYBOZwihC+6wSDzszUf+dF7rRO1O+fKaDO+nXOr6+vf8L5J44Qe4UvnlyRntwrxMoKzpFdeRJBNb9dGyiur1+nE59R+uwi9M1G395jb9KP0bcK2YM9nJB5cojcS75OFskxclzdc+pW699z8iYbtf14BGKf77ruZNyXKC0e50OEBI+V/Aug5Dex/9WjJfipuqnS00gfybjXbNe1f762tXmRPp3Bdl/l6g5JXyqXR0bK8J3PR+jvwYs8/GBnTM+kr8FX4ZknwC16XtG9iH9QfNn1vDHPe2GAj3ieV3XdF2+IPdeteh62Ra+HfQrsKWKSBtlHSOBgM7KkKQBLWnZoq1mVwotCLRGhOtSkMzMuqq2ml3SqUehdnZtynbtPLB88/Dy9dDrYVzoy/MTT6Svnlpd/AHueon5wpnGsEae/PZm+d3Jp6SSUTy7R3xw4f9/B5RN3O+5t3VNncjm6Cnt+uLx8DpedGj4yvD84HceNxTcG6ku4VPmZ9n6nNdj95BHyB3IJKxBPsKm6rpn4QopmqzlFm1MwqdxO5rPGnIc7aSfCGg1Vqyo6nUlQhnh7WiFhXzgGhVC4qjPRki9xdGCc4zXeSWb9BG1ktlqz2Q5Y7S2sIJfivkpVKCCDpyCWdbQzECj76qMVqvyJ/LxyI2rTv1bTC25lSM9xAUJ4Lc+U0wXTsKXDmaA8tHX+hvDt4Wa9IHLcMUBz9VwpL4xi2aGasAPPKNUbbmD/2jAtk0uXY4eJx8zRgj9iAnVNt5X+BL5vlHTOaiOmG7g6+7ZBNUOaefNXuJF3u25RjVvBLeW8E4wV7ZJBpbAXXGnqrwgupWVTAKqZjq5HbW44fMguNJhgwmw8oOk8GCqE8F3GhLB0uS/UDVt4lgjtqGxK/rpwuaDAqKHZNuWmJjVKuWUxbpg2B9DtoRdN3TKF9B0hw4p41C5i3CI9w4civP3aQLlmLMK3wpJpaI7BvmlhPtH3nPWCKQAdE2hK9zyuUeAm921qCA2kvqY8N1yDMq4beJlG+4XQqHDCQnqPlJIyyN579S4tIGcRv/82BbFfK9SgnVHkZzMeaSQjqR5/fP5XF2Chh+sW0g0gn27snqXv3/bsszsfJbCAIiTdjRTVCBL6jV0K5D8H/8xVAAAAeJxjYGRgYADi16c/vIvnt/nKwM3CAALXZxxzhtH///23YVFhbgZyORiYQKIAm34OJQAAAHicY2BkYGBu+N/AEMOi/P/f//8sKgxAERTAAwCmuAa3eJxjYWBgYAFhRiiNFf//z6L8/x+IDQAkCQRQAAAAAAAAjAEAATgBfgGaAiACbgMMA2AEhATGAAB4nGNgZGBg4GE4DMQgwATEXEDIwPAfzGcAAB2tAfIAAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nG2L3QqCQBCFZ9RWU7sOfAeh8IFi3N10EHYUG1p8+gSjqz44F+cPEjgo4T81Jphihic0mGOBZyyxwhovUCxKIe4ylthRuDqV+I22UcLQ6+QH4ubWdZZkU3m4o/0tUqtSvT33TPLits12fzc+zhRcvoquo0o281OLhcMw7Q+AD8sULE0=') format('woff'), + url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.ttf?t=1534240067831') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ + url('//at.alicdn.com/t/font_792691_qxv28s6g1l9.svg?t=1534240067831#iconfont') format('svg'); /* iOS 4.1- */ +} +.xm-iconfont {font-family:"xm-iconfont" !important; font-size:16px; font-style:normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;} +.icon-quanxuan:before { content: "\e62c"; } +.icon-caidan:before { content: "\e610"; } +.icon-fanxuan:before { content: "\e837"; } +.icon-pifu:before { content: "\e668"; } +.icon-qingkong:before { content: "\e63e"; } +.icon-sousuo:before { content: "\e600"; } +.icon-danx:before { content: "\e62b"; } +.icon-duox:before { content: "\e613"; } +.icon-close:before { content: "\e601"; } +.icon-expand:before { content: "\e641"; } + diff --git a/src/main/webapp/static/css/jquery-ui.min.css b/src/main/webapp/static/css/jquery-ui.min.css new file mode 100644 index 0000000..209a855 --- /dev/null +++ b/src/main/webapp/static/css/jquery-ui.min.css @@ -0,0 +1,4 @@ +/*! jQuery UI - v1.10.4 - 2014-01-17 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin-top:2px;padding:.5em .5em .5em .7em;min-height:0}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-noicons{padding-left:.7em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:2px;margin:0;display:block;outline:0}.ui-menu .ui-menu{margin-top:-3px;position:absolute}.ui-menu .ui-menu-item{margin:0;padding:0;width:100%;list-style-image:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}.ui-menu .ui-menu-divider{margin:5px -2px 5px -2px;height:0;font-size:0;line-height:0;border-width:1px 0 0}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:2px .4em;line-height:1.5;min-height:0;font-weight:400}.ui-menu .ui-menu-item a.ui-state-focus,.ui-menu .ui-menu-item a.ui-state-active{font-weight:400;margin:-1px}.ui-menu .ui-state-disabled{font-weight:400;margin:.4em 0 .2em;line-height:1.5}.ui-menu .ui-state-disabled a{cursor:default}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item a{position:relative;padding-left:2em}.ui-menu .ui-icon{position:absolute;top:.2em;left:.2em}.ui-menu .ui-menu-icon{position:static;float:right}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url(images/animated-overlay.gif);height:100%;filter:alpha(opacity=25);opacity:.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:0;background:0;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:0;border-bottom:0;border-right:0}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(../../images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:400;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(../../images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:400;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/src/main/webapp/static/css/metroStyle/img/line_conn.png b/src/main/webapp/static/css/metroStyle/img/line_conn.png new file mode 100644 index 0000000..b211da2 Binary files /dev/null and b/src/main/webapp/static/css/metroStyle/img/line_conn.png differ diff --git a/src/main/webapp/static/css/metroStyle/img/loading.gif b/src/main/webapp/static/css/metroStyle/img/loading.gif new file mode 100644 index 0000000..e8c2892 Binary files /dev/null and b/src/main/webapp/static/css/metroStyle/img/loading.gif differ diff --git a/src/main/webapp/static/css/metroStyle/img/metro.gif b/src/main/webapp/static/css/metroStyle/img/metro.gif new file mode 100644 index 0000000..664b969 Binary files /dev/null and b/src/main/webapp/static/css/metroStyle/img/metro.gif differ diff --git a/src/main/webapp/static/css/metroStyle/img/metro.png b/src/main/webapp/static/css/metroStyle/img/metro.png new file mode 100644 index 0000000..e9e58a3 Binary files /dev/null and b/src/main/webapp/static/css/metroStyle/img/metro.png differ diff --git a/src/main/webapp/static/css/metroStyle/metroStyle.css b/src/main/webapp/static/css/metroStyle/metroStyle.css new file mode 100644 index 0000000..af81f42 --- /dev/null +++ b/src/main/webapp/static/css/metroStyle/metroStyle.css @@ -0,0 +1,96 @@ +/*------------------------------------- +zTree Style + +version: 3.4 +author: Hunter.z +email: hunter.z@263.net +website: http://code.google.com/p/jquerytree/ + +-------------------------------------*/ + +.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} +.ztree {margin:0; padding:5px; color:#333} +.ztree li{padding:0; margin:0; list-style:none; line-height:17px; text-align:left; white-space:nowrap; outline:0} +.ztree li ul{ margin:0; padding:0 0 0 18px} +.ztree li ul.line{ background:url(./img/line_conn.png) 0 0 repeat-y;} + +.ztree li a {padding-right:3px; margin:0; cursor:pointer; height:21px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block} +.ztree li a:hover {text-decoration:underline} +.ztree li a.curSelectedNode {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; opacity:0.8;} +.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#e5e5e5; color:black; height:21px; border:1px #666 solid; opacity:0.8;} +.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#aaa; color:white; height:21px; border:1px #666 solid; + opacity:0.8; filter:alpha(opacity=80)} +.ztree li a.tmpTargetNode_prev {} +.ztree li a.tmpTargetNode_next {} +.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; + font-size:12px; border:1px #585956 solid; *border:0px} +.ztree li span {line-height:21px; margin-right:2px} +.ztree li span.button {line-height:0; margin:0; padding: 0; width:21px; height:21px; display: inline-block; vertical-align:middle; + border:0 none; cursor: pointer;outline:none; + background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; + background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} + +.ztree li span.button.chk {width:13px; height:13px; margin:0 2px; cursor: auto} +.ztree li span.button.chk.checkbox_false_full {background-position: -5px -5px;} +.ztree li span.button.chk.checkbox_false_full_focus {background-position: -5px -26px;} +.ztree li span.button.chk.checkbox_false_part {background-position: -5px -48px;} +.ztree li span.button.chk.checkbox_false_part_focus {background-position: -5px -68px;} +.ztree li span.button.chk.checkbox_false_disable {background-position: -5px -89px;} +.ztree li span.button.chk.checkbox_true_full {background-position: -26px -5px;} +.ztree li span.button.chk.checkbox_true_full_focus {background-position: -26px -26px;} +.ztree li span.button.chk.checkbox_true_part {background-position: -26px -48px;} +.ztree li span.button.chk.checkbox_true_part_focus {background-position: -26px -68px;} +.ztree li span.button.chk.checkbox_true_disable {background-position: -26px -89px;} +.ztree li span.button.chk.radio_false_full {background-position: -47px -5px;} +.ztree li span.button.chk.radio_false_full_focus {background-position: -47px -26px;} +.ztree li span.button.chk.radio_false_part {background-position: -47px -47px;} +.ztree li span.button.chk.radio_false_part_focus {background-position: -47px -68px;} +.ztree li span.button.chk.radio_false_disable {background-position: -47px -89px;} +.ztree li span.button.chk.radio_true_full {background-position: -68px -5px;} +.ztree li span.button.chk.radio_true_full_focus {background-position: -68px -26px;} +.ztree li span.button.chk.radio_true_part {background-position: -68px -47px;} +.ztree li span.button.chk.radio_true_part_focus {background-position: -68px -68px;} +.ztree li span.button.chk.radio_true_disable {background-position: -68px -89px;} + +.ztree li span.button.switch {width:21px; height:21px} +.ztree li span.button.root_open{background-position:-105px -63px} +.ztree li span.button.root_close{background-position:-126px -63px} +.ztree li span.button.roots_open{background-position: -105px 0;} +.ztree li span.button.roots_close{background-position: -126px 0;} +.ztree li span.button.center_open{background-position: -105px -21px;} +.ztree li span.button.center_close{background-position: -126px -21px;} +.ztree li span.button.bottom_open{background-position: -105px -42px;} +.ztree li span.button.bottom_close{background-position: -126px -42px;} +.ztree li span.button.noline_open{background-position: -105px -84px;} +.ztree li span.button.noline_close{background-position: -126px -84px;} +.ztree li span.button.root_docu{ background:none;} +.ztree li span.button.roots_docu{background-position: -84px 0;} +.ztree li span.button.center_docu{background-position: -84px -21px;} +.ztree li span.button.bottom_docu{background-position: -84px -42px;} +.ztree li span.button.noline_docu{ background:none;} + +.ztree li span.button.ico_open{margin-right:2px; background-position: -147px -21px; vertical-align:top; *vertical-align:middle} +.ztree li span.button.ico_close{margin-right:2px; margin-right:2px; background-position: -147px 0; vertical-align:top; *vertical-align:middle} +.ztree li span.button.ico_docu{margin-right:2px; background-position: -147px -42px; vertical-align:top; *vertical-align:middle} +.ztree li span.button.edit {margin-left:2px; margin-right: -1px; background-position: -189px -21px; vertical-align:top; *vertical-align:middle} +.ztree li span.button.edit:hover { + background-position: -168px -21px; +} +.ztree li span.button.remove {margin-left:2px; margin-right: -1px; background-position: -189px -42px; vertical-align:top; *vertical-align:middle} +.ztree li span.button.remove:hover { + background-position: -168px -42px; +} +.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position: -189px 0; vertical-align:top; *vertical-align:middle} +.ztree li span.button.add:hover { + background-position: -168px 0; +} +.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} + +ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} + +span.tmpzTreeMove_arrow {width:16px; height:21px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; + background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; + background-position:-168px -84px; background-image:url("./img/metro.png"); *background-image:url("./img/metro.gif")} + +ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} +.ztreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} diff --git a/src/main/webapp/static/css/style.css b/src/main/webapp/static/css/style.css new file mode 100644 index 0000000..1be4ed7 --- /dev/null +++ b/src/main/webapp/static/css/style.css @@ -0,0 +1,54 @@ +* { + margin: 0; + padding: 0 +} +.big_box{ + margin-top:20px; + border-top:2px #3c8dbc solid; +} +.left_div { + width: 45%; + margin-left:10px; + display:inline-block; +} +.right_div{ + position:absolute; + top:45px; + left:800px; +} +.big_box p{ + font-weight:bold; + font-size:16px; +} +.big_box .check{/* ��ѡ */ + margin-left:15px; +} +.big_box .layui-input-block{/* input�����߾� */ + margin: 0px; +} +.big_box .h2{ + display:inline-block; +} +.big_box .layui-form-item{ + margin-bottom:0px +} +.layui-input{ + width:85%; +} +.layui-form-select .layui-edge{ + right:130px; +} +.layui-form-select dl{ + min-width:85%; +} +/* #weight_result{ + position: absolute; + left:10px; +} */ +.layui-form-checkbox span{ + color:black +} +.right_div p { + font-weight:normal; + font-size:20px; +} diff --git a/src/main/webapp/static/js/bootstrap.min.js b/src/main/webapp/static/js/bootstrap.min.js new file mode 100644 index 0000000..9bcd2fc --- /dev/null +++ b/src/main/webapp/static/js/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/src/main/webapp/static/js/dateUtil.js b/src/main/webapp/static/js/dateUtil.js new file mode 100644 index 0000000..c0d4575 --- /dev/null +++ b/src/main/webapp/static/js/dateUtil.js @@ -0,0 +1,409 @@ +layui.use(['form', 'upload', 'layer', 'laydate', 'jquery'], function () { + var $ = layui.jquery; + let form = layui.form; + let layer = layui.layer; + let laydate = layui.laydate; + laydate.render({ + elem: '#worldId', + max: genTime('day'), + value: genTime('day'), + type: 'date' + }); + form.on('select(college)', function (data) { + let opt = $("#selectedOption").val(); + let ele = $("#selectedOption"); + $("#worldId").remove(); + $("#worldlable").html(''); + // 月 + if (opt == "month") { + laydate.render({ + elem: '#worldId', + type: 'month', + max: genTime('month'), + value: genTime('month'), + btns: ['clear', 'confirm'] + }); + // 日 + } else if (opt == "day") { + laydate.render({ + elem: '#worldId', + type: 'date', + max: genTime('day'), + value: genTime('day'), + btns: ['clear', 'confirm'] + }); + //按日期范围 + } else if (opt == "dayRound"){ + laydate.render({ + elem: '#worldId', + range: true + }); + // 周 + }else if (opt == "week") { + renderWeekDate('#worldId', ''); + // 季度 + } else if (opt == "quarter") { + renderSeasonDate('#worldId', ''); + // 年 + } else if (opt == "year") { + laydate.render({ + elem: '#worldId', + type: 'year', + max: genTime('day'), + value: genTime('year'), + btns: ['clear', 'confirm'] + }); + } + }); + // 周 + function renderWeekDate(ohd, sgl) { + let ele = $(ohd); + laydate.render({ + elem: ohd, + type: 'date', + max: genTime('day'), + format: "yyyy-MM-dd~yyyy-MM-dd", + btns: ['clear', 'confirm'], + done: function (value, date, endDate) { + if (value != "" && value.length > 0) { + let today = new Date(value.substring(0, 10)); + let weekday = today.getDay(); + let monday; + let sunday; + if (weekday == 0) { + monday = new Date(1000 * 60 * 60 * 24 * (weekday - 6) + today.getTime()); + } else { + monday = new Date(1000 * 60 * 60 * 24 * (1 - weekday) + today.getTime()); + } + if (weekday == 0) { + sunday = today; + } else { + sunday = new Date(1000 * 60 * 60 * 24 * (7 - weekday) + today.getTime()); + } + let month = monday.getMonth() + 1; + if (month < 10) { + month = "0" + month; + } + let day1 = monday.getDate(); + if (day1 < 10) { + day1 = "0" + day1; + } + let start = "" + monday.getFullYear() + "-" + month + "-" + day1; + let month2 = sunday.getMonth() + 1; + if (month2 < 10) { + month2 = "0" + month2; + } + let day2 = sunday.getDate(); + if (day2 < 10) { + day2 = "0" + day2; + } + let end = "" + sunday.getFullYear() + "-" + month2 + "-" + day2; + ele.val(start + "~" + end); + } else { + ele.val(''); + } + } + }); + } + // 季度 + function renderSeasonDate(ohd, sgl) { + let ele = $(ohd); + laydate.render({ + elem: ohd, + type: 'month', + format: 'yyyy-M', + btns: ['clear', 'confirm'], + ready: function (value, date, endDate) { + let hd = $("#layui-laydate" + ele.attr("lay-key")); + if (hd.length > 0) { + hd.click(function () { + quarter($(this)); + }); + } + quarter(hd); + }, + done: function (value, date, endDate) { + if (!isNull(date) && date.month > 0 && date.month < 5) { + ele.attr("startDate", date.year + "-" + date.month); + } else { + ele.attr("startDate", ""); + } + if (!isNull(endDate) && endDate.month > 0 && endDate.month < 5) { + ele.attr("endDate", endDate.year + "-" + endDate.month) + } else { + ele.attr("endDate", ""); + } + } + }); + } + function genTime(opt) { + let now = new Date(); + let year = now.getFullYear(); + let mth = now.getMonth(); + let day = now.getDate(); + let month = mth + 1; + if (month < 10) { + month = '0' + month + } + if (day < 10) { + day = '0' + day + } + let str; + if (opt == 'day') { + str = year + '-' + month + '-' + day; + } else if (opt == 'month') { + str = year + '-' + month; + } + return str; + } + function quarter(thiz) { + let mls = thiz.find(".laydate-month-list"); + mls.each(function (i, e) { + $(this).find("li").each(function (inx, ele) { + let cx = ele.innerHTML; + if (inx < 4) { + ele.innerHTML = cx.replace(/月/g, "季度"); + } else { + ele.style.display = "none"; + } + }); + }); + } + function isNull(quarter) { + if (quarter == null || typeof (quarter) == "undefined" || quarter == "") return true; + return false; + } + /** + * 日期转为周 格式2020-07-14 + * @param {String} dateString 日期 + */ + function getYearWeek(dateString) { + let da = dateString;//日期格式2015-12-30 + //当前日期 + let date1 = new Date(da.substring(0, 4), parseInt(da.substring(5, 7)) - 1, da.substring(8, 10)); + //1月1号 + let date2 = new Date(da.substring(0, 4), 0, 1); + //获取1月1号星期(以周一为第一天,0周一~6周日) + let dateWeekNum = date2.getDay() - 1; + if (dateWeekNum < 0) { dateWeekNum = 6; } + if (dateWeekNum < 4) { + //前移日期 + date2.setDate(date2.getDate() - dateWeekNum); + } else { + //后移日期 + date2.setDate(date2.getDate() + 7 - dateWeekNum); + } + let d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000); + if (d < 0) { + let date3 = (date1.getFullYear() - 1) + "-12-31"; + return getYearWeek(date3); + } else { + //得到年数周数 + let year = date1.getFullYear(); + let week = Math.ceil((d + 1) / 7); + return year + "-" + week; + } + } + +// laydate.render({ +// elem: '#vestingTimeId', +// max: genTime('day'), +// value: genTime('day'), +// type: 'date' +// }); +// form.on('select(college)', function (data) { +// let opt = $("#vestingTime").val(); +// let ele = $("#vestingTime"); +// $("#vestingTimeId").remove(); +// $("#vestingTimeLable").html(''); +// // 月 +// if (opt == "month") { +// laydate.render({ +// elem: '#vestingTimeId', +// type: 'month', +// max: genTime('month'), +// value: genTime('month'), +// btns: ['clear', 'confirm'] +// }); +// // 日 +// } else if (opt == "day") { +// laydate.render({ +// elem: '#vestingTimeId', +// type: 'date', +// max: genTime('day'), +// value: genTime('day'), +// btns: ['clear', 'confirm'] +// }); +// //按日期范围 +// } else if (opt == "dayRound"){ +// laydate.render({ +// elem: '#vestingTimeId', +// range: true +// }); +// // 周 +// }else if (opt == "week") { +// renderWeekDate('#vestingTimeId', ''); +// // 季度 +// } else if (opt == "quarter") { +// renderSeasonDate('#vestingTimeId', ''); +// // 年 +// } else if (opt == "year") { +// laydate.render({ +// elem: '#vestingTimeId', +// type: 'year', +// max: genTime('day'), +// value: genTime('year'), +// btns: ['clear', 'confirm'] +// }); +// } +// }); +// // 周 +// function renderWeekDate(ohd, sgl) { +// let ele = $(ohd); +// laydate.render({ +// elem: ohd, +// type: 'date', +// max: genTime('day'), +// format: "yyyy-MM-dd~yyyy-MM-dd", +// btns: ['clear', 'confirm'], +// done: function (value, date, endDate) { +// if (value != "" && value.length > 0) { +// let today = new Date(value.substring(0, 10)); +// let weekday = today.getDay(); +// let monday; +// let sunday; +// if (weekday == 0) { +// monday = new Date(1000 * 60 * 60 * 24 * (weekday - 6) + today.getTime()); +// } else { +// monday = new Date(1000 * 60 * 60 * 24 * (1 - weekday) + today.getTime()); +// } +// if (weekday == 0) { +// sunday = today; +// } else { +// sunday = new Date(1000 * 60 * 60 * 24 * (7 - weekday) + today.getTime()); +// } +// let month = monday.getMonth() + 1; +// if (month < 10) { +// month = "0" + month; +// } +// let day1 = monday.getDate(); +// if (day1 < 10) { +// day1 = "0" + day1; +// } +// let start = "" + monday.getFullYear() + "-" + month + "-" + day1; +// let month2 = sunday.getMonth() + 1; +// if (month2 < 10) { +// month2 = "0" + month2; +// } +// let day2 = sunday.getDate(); +// if (day2 < 10) { +// day2 = "0" + day2; +// } +// let end = "" + sunday.getFullYear() + "-" + month2 + "-" + day2; +// ele.val(start + "~" + end); +// } else { +// ele.val(''); +// } +// } +// }); +// } +// // 季度 +// function renderSeasonDate(ohd, sgl) { +// let ele = $(ohd); +// laydate.render({ +// elem: ohd, +// type: 'month', +// format: 'yyyy-M', +// btns: ['clear', 'confirm'], +// ready: function (value, date, endDate) { +// let hd = $("#layui-laydate" + ele.attr("lay-key")); +// if (hd.length > 0) { +// hd.click(function () { +// quarter($(this)); +// }); +// } +// quarter(hd); +// }, +// done: function (value, date, endDate) { +// if (!isNull(date) && date.month > 0 && date.month < 5) { +// ele.attr("startDate", date.year + "-" + date.month); +// } else { +// ele.attr("startDate", ""); +// } +// if (!isNull(endDate) && endDate.month > 0 && endDate.month < 5) { +// ele.attr("endDate", endDate.year + "-" + endDate.month) +// } else { +// ele.attr("endDate", ""); +// } +// } +// }); +// } +// function genTime(opt) { +// let now = new Date(); +// let year = now.getFullYear(); +// let mth = now.getMonth(); +// let day = now.getDate(); +// let month = mth + 1; +// if (month < 10) { +// month = '0' + month +// } +// if (day < 10) { +// day = '0' + day +// } +// let str; +// if (opt == 'day') { +// str = year + '-' + month + '-' + day; +// } else if (opt == 'month') { +// str = year + '-' + month; +// } +// return str; +// } +// function quarter(thiz) { +// let mls = thiz.find(".laydate-month-list"); +// mls.each(function (i, e) { +// $(this).find("li").each(function (inx, ele) { +// let cx = ele.innerHTML; +// if (inx < 4) { +// ele.innerHTML = cx.replace(/月/g, "季度"); +// } else { +// ele.style.display = "none"; +// } +// }); +// }); +// } +// function isNull(quarter) { +// if (quarter == null || typeof (quarter) == "undefined" || quarter == "") return true; +// return false; +// } +// /** +// * 日期转为周 格式2020-07-14 +// * @param {String} dateString 日期 +// */ +// function getYearWeek(dateString) { +// let da = dateString;//日期格式2015-12-30 +// //当前日期 +// let date1 = new Date(da.substring(0, 4), parseInt(da.substring(5, 7)) - 1, da.substring(8, 10)); +// //1月1号 +// let date2 = new Date(da.substring(0, 4), 0, 1); +// //获取1月1号星期(以周一为第一天,0周一~6周日) +// let dateWeekNum = date2.getDay() - 1; +// if (dateWeekNum < 0) { dateWeekNum = 6; } +// if (dateWeekNum < 4) { +// //前移日期 +// date2.setDate(date2.getDate() - dateWeekNum); +// } else { +// //后移日期 +// date2.setDate(date2.getDate() + 7 - dateWeekNum); +// } +// let d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000); +// if (d < 0) { +// let date3 = (date1.getFullYear() - 1) + "-12-31"; +// return getYearWeek(date3); +// } else { +// //得到年数周数 +// let year = date1.getFullYear(); +// let week = Math.ceil((d + 1) / 7); +// return year + "-" + week; +// } +// } + }); \ No newline at end of file diff --git a/src/main/webapp/static/js/echarts.min.js b/src/main/webapp/static/js/echarts.min.js new file mode 100644 index 0000000..fb628e9 --- /dev/null +++ b/src/main/webapp/static/js/echarts.min.js @@ -0,0 +1,22 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createCanvas"===t&&(nw=null),ew[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=Y_.call(t);if("[object Array]"===n){if(!O(t)){e=[];for(var o=0,a=t.length;o=0){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&st(t,o,e,i)}else st(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&gw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ht(t,e,i){pw?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function ct(t,e,i){pw?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function dt(t){return 2===t.which||3===t.which}function ft(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function pt(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function gt(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:mt}}function mt(t){mw(this.event)}function vt(){}function yt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||xw}return!1}function xt(){var t=new bw(6);return _t(t),t}function _t(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function wt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function bt(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function St(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Mt(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function It(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function Tt(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function At(t){var e=xt();return wt(e,t),e}function Dt(t){return t>Iw||t<-Iw}function Ct(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}function Lt(t){return(t=Math.round(t))<0?0:t>255?255:t}function kt(t){return(t=Math.round(t))<0?0:t>360?360:t}function Pt(t){return t<0?0:t>1?1:t}function Nt(t){return Lt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function Ot(t){return Pt(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function Et(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Rt(t,e,i){return t+(e-t)*i}function zt(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function Vt(t,e){Vw&&Bt(Vw,e),Vw=Bw.put(t,Vw||e.slice())}function Gt(t,e){if(t){e=e||[];var i=Bw.get(t);if(i)return Bt(e,i);var n=(t+="").replace(/ /g,"").toLowerCase();if(n in zw)return Bt(e,zw[n]),Vt(t,e),e;if("#"!==n.charAt(0)){var o=n.indexOf("("),a=n.indexOf(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void zt(e,0,0,0,1);l=Ot(s.pop());case"rgb":return 3!==s.length?void zt(e,0,0,0,1):(zt(e,Nt(s[0]),Nt(s[1]),Nt(s[2]),l),Vt(t,e),e);case"hsla":return 4!==s.length?void zt(e,0,0,0,1):(s[3]=Ot(s[3]),Ft(s,e),Vt(t,e),e);case"hsl":return 3!==s.length?void zt(e,0,0,0,1):(Ft(s,e),Vt(t,e),e);default:return}}zt(e,0,0,0,1)}else{if(4===n.length)return(u=parseInt(n.substr(1),16))>=0&&u<=4095?(zt(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),Vt(t,e),e):void zt(e,0,0,0,1);if(7===n.length){var u=parseInt(n.substr(1),16);return u>=0&&u<=16777215?(zt(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),Vt(t,e),e):void zt(e,0,0,0,1)}}}}function Ft(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ot(t[1]),o=Ot(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],zt(e,Lt(255*Et(r,a,i+1/3)),Lt(255*Et(r,a,i)),Lt(255*Et(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Wt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function Ht(t,e){var i=Gt(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return qt(i,4===i.length?"rgba":"rgb")}}function Zt(t){var e=Gt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ut(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Lt(Rt(r[0],s[0],l)),i[1]=Lt(Rt(r[1],s[1],l)),i[2]=Lt(Rt(r[2],s[2],l)),i[3]=Pt(Rt(r[3],s[3],l)),i}}function Xt(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Gt(e[o]),s=Gt(e[a]),l=n-o,u=qt([Lt(Rt(r[0],s[0],l)),Lt(Rt(r[1],s[1],l)),Lt(Rt(r[2],s[2],l)),Pt(Rt(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}function jt(t,e,i,n){if(t=Gt(t))return t=Wt(t),null!=e&&(t[0]=kt(e)),null!=i&&(t[1]=Ot(i)),null!=n&&(t[2]=Ot(n)),qt(Ft(t),"rgba")}function Yt(t,e){if((t=Gt(t))&&null!=e)return t[3]=Pt(e),qt(t,"rgba")}function qt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function Kt(t,e){return t[e]}function $t(t,e,i){t[e]=i}function Jt(t,e,i){return(e-t)*i+t}function Qt(t,e,i){return i>.5?e:t}function te(t,e,i,n,o){var a=t.length;if(1===o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;ie);i++);i=Math.min(i-1,u-2)}L=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(I=(e-m[i])/n,l)if(A=v[i],T=v[0===i?i:i-1],D=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)ne(T,A,D,C,I,I*I,I*I*I,r(t,o),g);else{if(f)a=ne(T,A,D,C,I,I*I,I*I*I,P,1),a=re(P);else{if(p)return Qt(A,D,I);a=oe(T,A,D,C,I,I*I,I*I*I)}s(t,o,a)}else if(d)te(v[i],v[i+1],I,r(t,o),g);else{var a;if(f)te(v[i],v[i+1],I,P,1),a=re(P);else{if(p)return Qt(v[i],v[i+1],I);a=Jt(v[i],v[i+1],I)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(N.easing=e),N}}}function ue(t,e,i,n,o,a,r,s){_(n)?(a=o,o=n,n=0):x(o)?(a=o,o="linear",n=0):x(n)?(a=n,n=0):x(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),he(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;u||a&&a();for(var h=0;h0&&t.animate(e,!1).when(null==o?500:o,s).delay(a||0)}function ce(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}function de(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function fe(t){for(var e=0;t>=eb;)e|=1&t,t>>=1;return t+e}function pe(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function ge(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ve(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ye(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function xe(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ye(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ve(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r=ib||f>=ib);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-ve(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r=ib||m>=ib);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new Error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),me(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}function we(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function be(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Se(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}function Me(){return!1}function Ie(t,e,i){var n=iw(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function Te(t){if("string"==typeof t){var e=mb.get(t);return e&&e.image}return t}function Ae(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=mb.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?!Ce(e=a.image)&&a.pending.push(r):((e=new Image).onload=e.onerror=De,mb.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e}function De(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;exb&&(yb=0,vb={}),yb++,vb[i]=o,o}function ke(t,e,i,n,o,a,r,s){return r?Ne(t,e,i,n,o,a,r,s):Pe(t,e,i,n,o,a,s)}function Pe(t,e,i,n,o,a,r){var s=He(t,e,o,a,r),l=Le(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=new de(Oe(0,l,i),Ee(0,u,n),l,u);return h.lineHeight=s.lineHeight,h}function Ne(t,e,i,n,o,a,r,s){var l=Ze(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight;return new de(Oe(0,u,i),Ee(0,h,n),u,h)}function Oe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Ee(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Re(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideLeft":n+=i,o+=s,u="middle";break;case"insideRight":n+=r-i,o+=s,l="right",u="middle";break;case"insideTop":n+=r/2,o+=i,l="center";break;case"insideBottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insideTopLeft":n+=i,o+=i;break;case"insideTopRight":n+=r-i,o+=i,l="right";break;case"insideBottomLeft":n+=i,o+=a-i,u="bottom";break;case"insideBottomRight":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textAlign:l,textVerticalAlign:u}}function ze(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=Be(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var u=Le(i,e);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=t,n}function Ve(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=Le(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?Ge(t,o,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*o/a):0;a=Le(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function Ge(t,e,i,n){for(var o=0,a=0,r=t.length;au)t="",r=[];else if(null!=h)for(var c=Be(h-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),d=0,f=r.length;do&&Ue(i,t.substring(o,a)),Ue(i,n[2],n[1]),o=_b.lastIndex}of)return{lines:[],width:0,height:0};k.textWidth=Le(k.text,_);var b=y.textWidth,S=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charAt(b.length-1))k.percentWidth=b,u.push(k),b=0;else{if(S){b=k.textWidth;var M=y.textBackgroundColor,I=M&&M.image;I&&Ce(I=Te(I))&&(b=Math.max(b,I.width*w/I.height))}var T=x?x[1]+x[3]:0;b+=T;var C=null!=d?d-m:null;null!=C&&Cl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveTo(r+i,s),t.lineTo(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-Math.PI/2,0),t.lineTo(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,Math.PI/2),t.lineTo(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,Math.PI/2,Math.PI),t.lineTo(r,s+i),0!==i&&t.arc(r+i,s+i,i,Math.PI,1.5*Math.PI)}function Ye(t){return qe(t),d(t.rich,qe),t}function qe(t){if(t){t.font=Xe(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Mb[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Ib[i]?i:"top",t.textPadding&&(t.textPadding=L(t.textPadding))}}function Ke(t,e,i,n,o,a){n.rich?Je(t,e,i,n,o,a):$e(t,e,i,n,o,a)}function $e(t,e,i,n,o,a){var r,s=ii(n),l=!1,u=e.__attrCachedBy===rb.PLAIN_TEXT;a!==sb?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?rb.NONE:rb.PLAIN_TEXT):u&&(e.__attrCachedBy=rb.NONE);var h=n.font||Sb;l&&h===(r.font||Sb)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=He(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=ai(g,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ti(e,n,o,x,_);var S=Ee(_,g,b),M=x,I=S;if(s||d){var T=Le(i,c);d&&(T+=d[1]+d[3]);var A=Oe(x,T,w);s&&ni(t,e,n,A,S,T,g),d&&(M=hi(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(B=0;B=0&&"right"===(_=b[C]).textAlign;)ei(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)ei(t,e,_=b[T],n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}function ti(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function ei(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&ii(l)&&ni(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=hi(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),ri(e,"shadowBlur",D(l.textShadowBlur,n.textShadowBlur,0)),ri(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),ri(e,"shadowOffsetX",D(l.textShadowOffsetX,n.textShadowOffsetX,0)),ri(e,"shadowOffsetY",D(l.textShadowOffsetY,n.textShadowOffsetY,0)),ri(e,"textAlign",s),ri(e,"textBaseline","middle"),ri(e,"font",i.font||Sb);var d=si(l.textStroke||n.textStroke,p),f=li(l.textFill||n.textFill),p=A(l.textStrokeWidth,n.textStrokeWidth);d&&(ri(e,"lineWidth",p),ri(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(ri(e,"fillStyle",f),e.fillText(i.text,r,h))}function ii(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function ni(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=_(s);if(ri(e,"shadowBlur",i.textBoxShadowBlur||0),ri(e,"shadowColor",i.textBoxShadowColor||"transparent"),ri(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),ri(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?je(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(ri(e,"fillStyle",s),null!=i.fillOpacity){f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(w(s)){var d=s.image;(d=Ae(d,null,t,oi,s))&&Ce(d)&&e.drawImage(d,n,o,a,r)}if(l&&u)if(ri(e,"lineWidth",l),ri(e,"strokeStyle",u),null!=i.strokeOpacity){var f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function oi(t,e){e.image=t}function ai(t,e,i){var n=e.x||0,o=e.y||0,a=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+ui(s[0],i.width),o=i.y+ui(s[1],i.height);else{var l=Re(s,i,e.textDistance);n=l.x,o=l.y,a=a||l.textAlign,r=r||l.textVerticalAlign}var u=e.textOffset;u&&(n+=u[0],o+=u[1])}return{baseX:n,baseY:o,textAlign:a,textVerticalAlign:r}}function ri(t,e,i){return t[e]=ab(t,e,i),t[e]}function si(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function li(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function ui(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function hi(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function ci(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function di(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new ub(t.style,this),this._rect=null,this.__clipPaths=[]}function fi(t){di.call(this,t)}function pi(t){return parseInt(t,10)}function gi(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function mi(t,e,i){return Cb.copy(t.getBoundingRect()),t.transform&&Cb.applyTransform(t.transform),Lb.width=e,Lb.height=i,!Cb.intersect(Lb)}function vi(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=i.length&&i.push({option:t})}}),i}function Ni(t){var e=R();Zb(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),Zb(t,function(t,i){var n=t.option;k(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),Zb(t,function(t,i){var n=t.exist,o=t.option,a=t.keyInfo;if(Ub(o)){if(a.name=null!=o.name?o.name+"":n?n.name:jb+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function Oi(t){var e=t.name;return!(!e||!e.indexOf(jb))}function Ei(t){return Ub(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ri(t,e){function i(t,e,i){for(var n=0,o=t.length;n-rS&&trS||t<-rS}function tn(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function en(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function nn(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ji(h)&&Ji(c))Ji(s)?a[0]=0:(M=-l/s)>=0&&M<=1&&(a[f++]=M);else{var p=c*c-4*h*d;if(Ji(p)){var g=c/h,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=aS(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-oS(-y,uS):oS(y,uS))+(x=x<0?-oS(-x,uS):oS(x,uS))))/(3*r))>=0&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*aS(h*h*h)),w=Math.acos(_)/3,b=aS(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),m=(-s+b*(S+lS*Math.sin(w)))/(3*r),I=(-s+b*(S-lS*Math.sin(w)))/(3*r);M>=0&&M<=1&&(a[f++]=M),m>=0&&m<=1&&(a[f++]=m),I>=0&&I<=1&&(a[f++]=I)}}return f}function on(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ji(r))Qi(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*r*s;if(Ji(u))o[0]=-a/(2*r);else if(u>0){var h=aS(u),c=(-a+h)/(2*r),d=(-a-h)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function an(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function rn(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;hS[0]=l,hS[1]=u;for(var y=0;y<1;y+=.05)cS[0]=tn(t,i,o,r,y),cS[1]=tn(e,n,a,s,y),(p=hw(hS,cS))=0&&p=0&&c<=1&&(o[l++]=c);else{var u=r*r-4*a*s;if(Ji(u))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(u>0){var h=aS(u),c=(-r+h)/(2*a),d=(-r-h)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function hn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function cn(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function dn(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;hS[0]=r,hS[1]=s;for(var d=0;d<1;d+=.05)cS[0]=sn(t,i,o,d),cS[1]=sn(e,n,a,d),(m=hw(hS,cS))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(yS[0]=mS(o)*i+t,yS[1]=gS(o)*n+e,xS[0]=mS(a)*i+t,xS[1]=gS(a)*n+e,u(s,yS,xS),h(l,yS,xS),(o%=vS)<0&&(o+=vS),(a%=vS)<0&&(a+=vS),o>a&&!r?a+=vS:oo&&(_S[0]=mS(f)*i+t,_S[1]=gS(f)*n+e,u(s,_S,s),h(l,_S,l))}function yn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,u=t;if(r>e+s&&r>n+s||rt+s&&a>i+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>i+c&&u>o+c&&u>r+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>i+u&&s>o+u||si||h+uo&&(o+=zS);var d=Math.atan2(l,s);return d<0&&(d+=zS),d>=n&&d<=o||d+zS>=n&&d+zS<=o}function Sn(t,e,i,n,o,a){if(a>e&&a>n||ao?r:0}function Mn(t,e){return Math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&In(),c=tn(e,n,a,s,WS[0]),p>1&&(d=tn(e,n,a,s,WS[1]))),2===p?me&&s>n&&s>a||s=0&&u<=1){for(var h=0,c=sn(e,n,a,u),d=0;di||s<-i)return 0;u=Math.sqrt(i*i-s*s);FS[0]=-u,FS[1]=u;var l=Math.abs(n-o);if(l<1e-4)return 0;if(l%VS<1e-4){n=0,o=VS;p=a?1:-1;return r>=FS[0]+t&&r<=FS[1]+t?p:0}if(a){var u=n;n=wn(o),o=wn(u)}else n=wn(n),o=wn(o);n>o&&(o+=VS);for(var h=0,c=0;c<2;c++){var d=FS[c];if(d+t>r){var f=Math.atan2(s,d),p=a?1:-1;f<0&&(f=VS+f),(f>=n&&f<=o||f+VS>=n&&f+VS<=o)&&(f>Math.PI/2&&f<1.5*Math.PI&&(p=-p),h+=p)}}return h}function Cn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(a+=Sn(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case BS.M:r=l=t[h++],s=u=t[h++];break;case BS.L:if(i){if(yn(r,s,t[h],t[h+1],e,n,o))return!0}else a+=Sn(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.C:if(i){if(xn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=Tn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.Q:if(i){if(_n(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=An(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case BS.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;h>1?a+=Sn(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(bn(d,f,g,m,m+v,y,e,w,o))return!0}else a+=Dn(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case BS.R:l=r=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(i){if(yn(l,u,x,u,e,n,o)||yn(x,u,x,_,e,n,o)||yn(x,_,l,_,e,n,o)||yn(l,_,l,u,e,n,o))return!0}else a+=Sn(x,u,x,_,n,o),a+=Sn(l,_,l,u,n,o);break;case BS.Z:if(i){if(yn(r,s,l,u,e,n,o))return!0}else a+=Sn(r,s,l,u,n,o);r=l,s=u}}return i||Mn(s,u)||(a+=Sn(r,s,l,u,n,o)||0),0!==a}function Ln(t,e,i){return Cn(t,0,!1,e,i)}function kn(t,e,i,n){return Cn(t,e,!0,i,n)}function Pn(t){di.call(this,t),this.path=null}function Nn(t,e,i,n,o,a,r,s,l,u,h){var c=l*(tM/180),d=QS(c)*(t-i)/2+JS(c)*(e-n)/2,f=-1*JS(c)*(t-i)/2+QS(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=$S(p),s*=$S(p));var g=(o===a?-1:1)*$S((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+QS(c)*m-JS(c)*v,x=(e+n)/2+JS(c)*m+QS(c)*v,_=nM([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=nM(w,b);iM(w,b)<=-1&&(S=tM),iM(w,b)>=1&&(S=0),0===a&&S>0&&(S-=2*tM),1===a&&S<0&&(S+=2*tM),h.addData(u,y,x,r,s,_,S,c,a)}function On(t){if(!t)return new ES;for(var e,i=0,n=0,o=i,a=n,r=new ES,s=ES.CMD,l=t.match(oM),u=0;u=2){if(o&&"spline"!==o){var a=fM(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=dM(n,i)),t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s=0)?(i={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=a,null==t.textStrokeWidth&&(t.textStrokeWidth=2))):null!=a&&(i={textFill:null},t.textFill=a),i&&(t.insideRollback=i)}}function bo(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function So(t,e){var i=e||e.getModel("textStyle");return P([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function Mo(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function Io(t,e,i,n,o){Mo(!0,t,e,i,n,o)}function To(t,e,i,n,o){Mo(!1,t,e,i,n,o)}function Ao(t,e){for(var i=_t([]);t&&t!==e;)bt(i,t.getLocalTransform(),i),t=t.parent;return i}function Do(t,e,i){return e&&!c(e)&&(e=Tw.getLocalTransform(e)),i&&(e=Tt([],e)),Q([],t,e)}function Co(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=Do(a,e,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function Lo(t,e,i,n){function o(t){var e={position:F(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Io(t,n,i,t.dataIndex)}}})}}function ko(t,e){return f(t,function(t){var i=t[0];i=LM(i,e.x),i=kM(i,e.x+e.width);var n=t[1];return n=LM(n,e.y),n=kM(n,e.y+e.height),[i,n]})}function Po(t,e,i){var n=(e=a({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),r(n,i),new fi(e)):Xn(t.replace("path://",""),e,i,"center")}function No(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Oo(t,e,i){for(var n=0;n0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Vo(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?zo(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function Go(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Fo(t){return t.sort(function(t,e){return t-e}),t}function Wo(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Ho(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Zo(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Uo(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=f(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return Math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(a,function(t,e){return t-s[e]});lh&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function Xo(t){var e=2*Math.PI;return(t%e+e)%e}function jo(t){return t>-UM&&t=-20?+t.toFixed(n<0?-n:0):t}function Jo(t){function e(t,i,n){return t.interval[n]=0}function ta(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ea(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}function ia(t){return null==t?"":(t+"").replace(KM,function(t,e){return $M[e]})}function na(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function ra(t,e){return t+="","0000".substr(0,e-t.length)+t}function sa(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yo(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",ra(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",ra(s,2)).replace("d",s).replace("hh",ra(l,2)).replace("h",l).replace("mm",ra(u,2)).replace("m",u).replace("ss",ra(h,2)).replace("s",h).replace("SSS",ra(c,3))}function la(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function ua(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachChild(function(l,u){var h,c,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,r+=s+i,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)})}function ha(t,e,i){var n=e.width,o=e.height,a=Vo(t.x,n),r=Vo(t.y,o),s=Vo(t.x2,n),l=Vo(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=qM(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}function ca(t,e,i){i=qM(i||0);var n=e.width,o=e.height,a=Vo(t.left,n),r=Vo(t.top,o),s=Vo(t.right,n),l=Vo(t.bottom,o),u=Vo(t.width,n),h=Vo(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(f>n/o?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new de(a+i[3],r+i[0],u,h);return p.margin=i,p}function da(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";if(a||s){var u;if("raw"===l)u="group"===t.type?new de(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(u=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(u=u.clone()).applyTransform(h)}e=ca(r({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function fa(t,e){return null!=t[oI[e][0]]||null!=t[oI[e][1]]&&null!=t[oI[e][2]]}function pa(t,e,i){function n(i,n){var r={},l=0,u={},h=0;if(iI(i,function(e){u[e]=t[e]}),iI(i,function(t){o(e,t)&&(r[t]=u[t]=e[t]),a(r,t)&&l++,a(u,t)&&h++}),s[n])return a(e,i[1])?u[i[2]]=null:a(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&l){if(l>=2)return r;for(var c=0;ce)return t[n];return t[i-1]}function ya(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:R(),categoryAxisMap:R()},n=fI[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}function xa(t){return"category"===t.get("type")}function _a(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===vI?{}:[]),this.sourceFormat=t.sourceFormat||yI,this.seriesLayoutBy=t.seriesLayoutBy||_I,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&R(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}function wa(t){var e=t.option.source,i=yI;if(S(e))i=xI;else if(y(e)){0===e.length&&(i=gI);for(var n=0,o=e.length;n=e:"max"===i?t<=e:t===e}function Xa(t,e){return t.join(",")===e.join(",")}function ja(t,e){AI(e=e||{},function(e,i){if(null!=e){var n=t[i];if(lI.hasClass(i)){e=Di(e);var o=Pi(n=Di(n),e);t[i]=CI(o,function(t){return t.option&&t.exist?LI(t.exist,t.option,!0):t.exist||t.option})}else t[i]=LI(n,e,!0)}})}function Ya(t){var e=t&&t.itemStyle;if(e)for(var i=0,o=OI.length;i=0;p--){var g=t[p];if(s||(d=g.data.rawIndexOf(g.stackedByDimension,c)),d>=0){var m=g.data.getByRawIndex(g.stackResultDimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostModel.setData(l),e.data=l})}function rr(t,e){_a.isInstance(t)||(t=_a.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===xI&&(this._offset=0,this._dimSize=e,this._data=i),a(this,GI[n===gI?n+"_"+t.seriesLayoutBy:n])}function sr(){return this._data.length}function lr(t){return this._data[t]}function ur(t){for(var e=0;ee.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Mr(t,e){d(t.CHANGABLE_METHODS,function(i){t.wrapMethod(i,v(Ir,e))})}function Ir(t){var e=Tr(t);e&&e.setOutputEnd(this.count())}function Tr(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}function Ar(){this.group=new tb,this.uid=Ro("viewChart"),this.renderTask=gr({plan:Lr,reset:kr}),this.renderTask.context={view:this}}function Dr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?n():c=setTimeout(n,-a),u=o};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(t){l=t},d}function Nr(t,e,i,n){var o=t[e];if(o){var a=o[iT]||o,r=o[oT];if(o[nT]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Pr(a,i,"debounce"===n))[iT]=a,o[oT]=n,o[nT]=i}return o}}function Or(t,e){var i=t[e];i&&i[iT]&&(t[e]=i[iT])}function Er(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;var i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=R()}function Rr(t,e,i,n,o){function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}o=o||{};var r;d(e,function(e,s){if(!o.visualType||o.visualType===e.visualType){var l=t._stageTaskMap.get(e.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,d=h.agentStubMap;d.each(function(t){a(o,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),hT(h,n);var f=t.getPerformArgs(h,o.block);d.each(function(t){t.perform(f)}),r|=h.perform(f)}else u&&u.each(function(s,l){a(o,s)&&s.dirty();var u=t.getPerformArgs(s,o.block);u.skip=!e.performRawSeries&&i.isSeriesFiltered(s.context.model),hT(s,n),r|=s.perform(u)})}}),t.unfinished|=r}function zr(t,e,i,n,o){function a(i){var a=i.uid,s=r.get(a)||r.set(a,gr({plan:Hr,reset:Zr,count:Xr}));s.context={model:i,ecModel:n,api:o,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:t},jr(t,i,s)}var r=i.seriesTaskMap||(i.seriesTaskMap=R()),s=e.seriesType,l=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(a):s?n.eachRawSeriesByType(s,a):l&&l(n,o).each(a);var u=t._pipelineMap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removeKey(e))})}function Br(t,e,i,n,o){function a(e){var i=e.uid,n=s.get(i);n||(n=s.set(i,gr({reset:Gr,onDirty:Wr})),r.dirty()),n.context={model:e,overallProgress:h,modifyOutputEnd:c},n.agent=r,n.__block=h,jr(t,e,n)}var r=i.overallTask=i.overallTask||gr({reset:Vr});r.context={ecModel:n,api:o,overallReset:e.overallReset,scheduler:t};var s=r.agentStubMap=r.agentStubMap||R(),l=e.seriesType,u=e.getTargetSeries,h=!0,c=e.modifyOutputEnd;l?n.eachRawSeriesByType(l,a):u?u(n,o).each(a):(h=!1,d(n.getSeries(),a));var f=t._pipelineMap;s.each(function(t,e){f.get(e)||(t.dispose(),r.dirty(),s.removeKey(e))})}function Vr(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gr(t,e){return t.overallProgress&&Fr}function Fr(){this.agent.dirty(),this.getDownstream().dirty()}function Wr(){this.agent&&this.agent.dirty()}function Hr(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Zr(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Di(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?f(e,function(t,e){return Ur(e)}):cT}function Ur(t){return function(e,i){var n=i.data,o=i.resetDefines[t];if(o&&o.dataEach)for(var a=e.start;a0?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}function Qr(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),r(e.__inheritedStyle,t.__inheritedStyle))}function ts(t){for(var e=P(t).split(_T),i=[],n=0;n0;a-=2){var r=o[a],s=o[a-1];switch(n=n||xt(),s){case"translate":r=P(r).split(_T),St(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=P(r).split(_T),It(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=P(r).split(_T),Mt(n,n,parseFloat(r[0]));break;case"skew":r=P(r).split(_T),console.warn("Skew transform is not supported yet");break;case"matrix":r=P(r).split(_T);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}function os(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n={};TT.lastIndex=0;for(var o;null!=(o=TT.exec(e));)n[o[1]]=o[2];for(var a in ST)ST.hasOwnProperty(a)&&null!=n[a]&&(i[ST[a]]=n[a]);return i}function as(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}function rs(t,e){return(new $r).parse(t,e)}function ss(t){return function(e,i,n){e=e&&e.toLowerCase(),fw.prototype[t].call(this,e,i,n)}}function ls(){fw.call(this)}function us(t,e,n){function o(t,e){return t.__prio-e.__prio}n=n||{},"string"==typeof e&&(e=JT[e]),this.id,this.group,this._dom=t;var a=this._zr=Ii(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=Pr(m(a.flush,a),17),(e=i(e))&&BI(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Fa;var r=this._api=As(this);_e($T,o),_e(YT,o),this._scheduler=new Er(this,r,YT,$T),fw.call(this,this._ecEventProcessor=new Ds),this._messageCenter=new ls,this._initEvents(),this.resize=m(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),vs(a,this),N(this)}function hs(t,e,i){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Vi(o,e);for(var r=0;re.get("hoverLayerThreshold")&&!U_.node&&i.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)})}function Is(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}function Ts(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function As(t){var e=t._coordSysMgr;return a(new Ga(t),{getCoordinateSystems:m(e.getCoordinateSystems,e),getComponentByElement:function(e){for(;e;){var i=e.__ecComponentInfo;if(null!=i)return t._model.getComponent(i.mainType,i.index);e=e.parent}}})}function Ds(){this.eventInfo}function Cs(t){function e(t,e){for(var n=0;n65535?dA:pA}function Js(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function Qs(t,e){d(gA.concat(e.__wrappedMethods||[]),function(i){e.hasOwnProperty(i)&&(t[i]=e[i])}),t.__wrappedMethods=e.__wrappedMethods,d(mA,function(n){t[n]=i(e[n])}),t._calculationInfo=a(e._calculationInfo)}function tl(t,e,i,n,o){var a=cA[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length=0?this._indices[t]:-1}function al(t,e){var i=t._idList[e];return null==i&&(i=il(t,t._idDimIdx,e)),null==i&&(i=hA+e),i}function rl(t){return y(t)||(t=[t]),t}function sl(t,e){var i=t.dimensions,n=new vA(f(i,t.getDimensionInfo,t),t.hostModel);Qs(n,t);for(var o=n._storage={},a=t._storage,r=0;r=0?(o[s]=ll(a[s]),n._rawExtent[s]=ul(),n._extent[s]=null):o[s]=a[s])}return n}function ll(t){for(var e=new Array(t.length),i=0;in&&(r=o.interval=n);var s=o.intervalPrecision=Ml(r);return Tl(o.niceTickExtent=[MA(Math.ceil(t[0]/r)*r,s),MA(Math.floor(t[1]/r)*r,s)],t),o}function Ml(t){return Ho(t)+2}function Il(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tl(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Il(t,0,e),Il(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function Al(t,e,i,n){var o=[];if(!t)return o;e[0]1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function Dl(t){return t.get("stack")||AA+t.seriesIndex}function Cl(t){return t.dim+t.index}function Ll(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o=0?"p":"n",b=m;p&&(o[r][_]||(o[r][_]={p:m,n:m}),b=o[r][_][w]);var S,M,I,T;if(g)S=b,M=(A=i.dataToPoint([x,_]))[1]+l,I=A[0]-m,T=u,Math.abs(I)a[1]?(n=a[1],o=a[0]):(n=a[0],o=a[1]);var r=e.toGlobalCoord(e.dataToCoord(0));return ro&&(r=o),r}function Vl(t,e){return VA(t,BA(e))}function Gl(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(y(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Vo(n[0],1),n[1]=Vo(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(I(r)||I(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var f,p=kl("bar",c);if(d(p,function(t){f|=t.getBaseAxis()===e.axis}),f){var g=Pl(p),m=Fl(r,s,e,g);r=m.min,s=m.max}}return[r,s]}function Fl(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Ol(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;d(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;d(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function Wl(t,e){var i=Gl(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function Hl(t,e){if(e=e||t.get("type"))switch(e){case"category":return new SA(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new TA;default:return(xl.getClass(e)||TA).create(t)}}function Zl(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)}function Ul(t){var e=t.getLabelModel().get("formatter"),i="category"===t.type?t.scale.getExtent()[0]:null;return"string"==typeof e?e=function(e){return function(i){return i=t.scale.getLabel(i),e.replace("{value}",null!=i?i:"")}}(e):"function"==typeof e?function(n,o){return null!=i&&(o=n-i),e(Xl(t,n),o)}:function(e){return t.scale.getLabel(e)}}function Xl(t,e){return"category"===t.type?t.scale.getLabel(e):e}function jl(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l=t.getLabelModel(),u=Ul(t),h=1;o>40&&(h=Math.ceil(o/40));for(var c=0;c>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function ou(t){return"category"===t.type?ru(t):uu(t)}function au(t,e){return"category"===t.type?lu(t,e):{ticks:t.scale.getTicks()}}function ru(t){var e=t.getLabelModel(),i=su(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}function su(t,e){var i=hu(t,"labels"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;return a=x(n)?vu(t,n):mu(t,r="auto"===n?fu(t):n),du(i,n,{labels:a,labelCategoryInterval:r})}function lu(t,e){var i=hu(t,"ticks"),n=ql(e),o=cu(i,n);if(o)return o;var a,r;if(e.get("show")&&!t.scale.isBlank()||(a=[]),x(n))a=vu(t,n,!0);else if("auto"===n){var s=su(t,t.getLabelModel());r=s.labelCategoryInterval,a=f(s.labels,function(t){return t.tickValue})}else a=mu(t,r=n,!0);return du(i,n,{ticks:a,tickCategoryInterval:r})}function uu(t){var e=t.scale.getTicks(),i=Ul(t);return{labels:f(e,function(e,n){return{formattedLabel:i(e,n),rawLabel:t.scale.getLabel(e),tickValue:e}})}}function hu(t,e){return nD(t)[e]||(nD(t)[e]=[])}function cu(t,e){for(var i=0;i40&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p=0,g=0,m=ke(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=nD(t.model),w=_.lastAutoInterval,b=_.lastTickCount;return null!=w&&null!=b&&Math.abs(w-x)<=1&&Math.abs(b-r)<=1&&w>x?x=w:(_.lastTickCount=r,_.lastAutoInterval=x),x}function gu(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function mu(t,e,i){function n(t){l.push(i?t:{formattedLabel:o(t),rawLabel:a.getLabel(t),tickValue:t})}var o=Ul(t),a=t.scale,r=a.getExtent(),s=t.getLabelModel(),l=[],u=Math.max((e||0)+1,1),h=r[0],c=a.count();0!==h&&u>1&&c/u>2&&(h=Math.round(Math.ceil(h/u)*u));var d=Kl(t),f=s.get("showMinLabel")||d,p=s.get("showMaxLabel")||d;f&&h!==r[0]&&n(r[0]);for(var g=h;g<=r[1];g+=u)n(g);return p&&g!==r[1]&&n(r[1]),l}function vu(t,e,i){var n=t.scale,o=Ul(t),a=[];return d(n.getTicks(),function(t){var r=n.getLabel(t);e(t,r)&&a.push(i?t:{formattedLabel:o(t),rawLabel:r,tickValue:t})}),a}function yu(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function xu(t,e,i,n,o){function a(t,e){return h?t>e:t0&&(t.coord-=u/(2*(e+1)))}),s={coord:e[r-1].coord+u},e.push(s)}var h=l[0]>l[1];a(e[0].coord,l[0])&&(o?e[0].coord=l[0]:e.shift()),o&&a(l[0],e[0].coord)&&e.unshift({coord:l[0]}),a(l[1],s.coord)&&(o?s.coord=l[1]:e.pop()),o&&a(s.coord,l[1])&&e.push({coord:l[1]})}}function _u(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return fr(t,e,i[0]);if(n){for(var o=[],a=0;a0?i=n[0]:n[1]<0&&(i=n[1]),i}function Ou(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}function Eu(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function Ru(t){return isNaN(t[0])||isNaN(t[1])}function zu(t,e,i,n,o,a,r,s,l,u,h){return"none"!==u&&u?Bu.apply(this,arguments):Vu.apply(this,arguments)}function Bu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;_D(bD,g),bD[m]=g[m]+v,_D(SD,p),SD[m]=p[m]-v,t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Vu(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(Ru(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveTo":"lineTo"](p[0],p[1]),_D(bD,p);else if(l>0){var g=d+a,m=e[g];if(h)for(;m&&Ru(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||Ru(m))_D(SD,p);else{Ru(m)&&!h&&(m=p),U(wD,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=uw(p,y),_=uw(p,m);xD(SD,p,wD,-l*(1-(v=_/(_+x))))}vD(bD,bD,s),yD(bD,bD,r),vD(SD,SD,s),yD(SD,SD,r),t.bezierCurveTo(bD[0],bD[1],SD[0],SD[1],p[0],p[1]),xD(bD,p,wD,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}function Gu(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function Fu(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Zu(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();oa[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;i&&(a[0]-=.5,a[1]+=.5);var l=new hM({shape:{cx:Go(t.cx,1),cy:Go(t.cy,1),r0:Go(a[0],1),r:Go(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,To(l,{shape:{endAngle:-r[1]*s}},n)),l}function ju(t,e,i,n){return"polar"===t.type?Xu(t,e,i,n):Uu(t,e,i,n)}function Yu(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r=0;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=f(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,p=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new TM(0,0,0,0,h,!0);return y[n]=g,y[n+"2"]=m,y}}}function Ku(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!$u(a,e))){var r=e.mapDimension(a.dim),s={};return d(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function $u(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;rn)return!1;return!0}function Ju(t){return this._axes[t]}function Qu(t){LD.call(this,t)}function th(t,e){return e.type||(e.data?"category":"value")}function eh(t,e,i){return t.getCoordSysModel()===e}function ih(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}function nh(t,e,i,n){function o(t){return t.dim+"_"+t.index}i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=t[e],s=i.model,l=s.get("axisLine.onZero"),u=s.get("axisLine.onZeroAxisIndex");if(l){if(null!=u)oh(r[u])&&(a=r[u]);else for(var h in r)if(r.hasOwnProperty(h)&&oh(r[h])&&!n[o(r[h])]){a=r[h];break}a&&(n[o(a)]=!0)}}function oh(t){return t&&"category"!==t.type&&"time"!==t.type&&Zl(t)}function ah(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}function rh(t,e){return f(VD,function(e){return t.getReferringComponents(e)[0]})}function sh(t){return"cartesian2d"===t.get("coordinateSystem")}function lh(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e}function uh(t,e,i,n){var o,a,r=Xo(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;return jo(r-GD/2)?(a=l?"bottom":"top",o="center"):jo(r-1.5*GD)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*GD&&r>GD/2?l?"left":"right":l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:a}}function hh(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function ch(t,e,i){if(!Kl(t.axis)){var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(dh(a),dh(u)):fh(a,r)&&(n?(dh(r),dh(h)):(dh(a),dh(u))),!1===o?(dh(s),dh(c)):fh(l,s)&&(o?(dh(l),dh(d)):(dh(s),dh(c)))}}function dh(t){t&&(t.ignore=!0)}function fh(t,e,i){var n=t&&t.getBoundingRect().clone(),o=e&&e.getBoundingRect().clone();if(n&&o){var a=_t([]);return Mt(a,a,-t.rotation),n.applyTransform(bt([],a,t.getLocalTransform())),o.applyTransform(bt([],a,e.getLocalTransform())),n.intersect(o)}}function ph(t){return"middle"===t||"center"===t}function gh(t,e,i){var n=e.axis;if(e.get("axisTick.show")&&!n.scale.isBlank()){for(var o=e.getModel("axisTick"),a=o.getModel("lineStyle"),s=o.get("length"),l=n.getTicksCoords(),u=[],h=[],c=t._transform,d=[],f=0;f=0||t===e}function Sh(t){var e=Mh(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=Th(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?"bottom":"top":o.width>0?"left":"right";l||kh(t.style,d,n,u,a,i,p),fo(t,d)}function Rh(t,e){var i=t.get(tC)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}function zh(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=new nC({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__valueIdx:a});e.add(r),Bh(r,t,n)}function Bh(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}function Vh(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Gh(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Gh(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=Math.cos(a),s=Math.sin(a),l=i?n:0,u=[r*l,s*l];o?t.animate().when(200,{position:u}).start("bounceOut"):t.attr("position",u)}function Fh(t,e){function i(){a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore}function n(){a.ignore=a.normalIgnore,r.ignore=r.normalIgnore}tb.call(this);var o=new hM({z2:2}),a=new gM,r=new rM;this.add(o),this.add(a),this.add(r),this.updateData(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function Wh(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;pe&&a+1t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(p,c,-u),h=t[p].y+t[p].height;r-h<0&&s(c-1,h-r);for(p=0;p=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function Hh(t,e,i,n,o,a){for(var r=[],s=[],l=0;l3?1.4:o>1?1.2:1.1;hc(this,"zoom","zoomOnMouseWheel",t,{scale:n>0?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);hc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:r})}}}function uc(t){ic(this._zr,"globalPan")||hc(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function hc(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(mw(n.event),cc(t,e,i,n,o))}function cc(t,e,i,n,o){o.isAvailableBehavior=m(dc,null,i,n),t.trigger(e,o)}function dc(t,e,i){var n=i[t];return!t||n&&(!_(n)||e.event[n+"Key"])}function fc(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function pc(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function gc(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!RC[n.mainType]&&o&&o.model!==i}function mc(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function vc(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",function(){t._mouseDownFlag=!0}),i.on("click",function(a){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),yc(e,i)}}}))}function yc(t,e){e.eachChild(function(e){d(e.__regions,function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")})})}function xc(t,e){var i=new tb;this.uid=Ro("ec_map_draw"),this._controller=new oc(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new tb),i.add(this._backgroundGroup=new tb)}function _c(t){var e=this[zC];e&&e.recordVersion===this[BC]&&wc(e,t)}function wc(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(mo({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=NM):(mo(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function bc(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}function Sc(){Tw.call(this)}function Mc(t){this.name=t,this.zoomLimit,Tw.call(this),this._roamTransformable=new Sc,this._rawTransformable=new Sc,this._center,this._zoom}function Ic(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function Tc(t,e,i,n){Mc.call(this,t),this.map=e;var o=OC.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function Ac(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function Dc(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;s&&l&&(s=[Vo(s[0],u),Vo(s[1],h)],l=Vo(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0));if(d){var f={};c>1?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=ca(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Cc(t,e){d(e.get("geoCoord"),function(e,i){t.addGeoCoord(i,e)})}function Lc(t,e){var i={};return d(t,function(t){t.each(t.mapDimension("value"),function(e,n){var o="ec-"+t.getName(n);i[o]=i[o]||[],isNaN(e)||i[o].push(e)})}),t[0].map(t[0].mapDimension("value"),function(n,o){for(var a="ec-"+t[0].getName(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function Wc(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){jc(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=Yc(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Hc(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Zc(t){return arguments.length?t:Qc}function Uc(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Xc(t,e){return ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function jc(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}function Yc(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=qc(s),a=Kc(a),s&&a;){o=qc(o),r=Kc(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);d>0&&(Jc($c(s,t,i),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!qc(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Kc(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}return i}function qc(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Kc(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function $c(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function Jc(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Qc(t,e){return t.parentNode===e.parentNode?1:2}function td(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function ed(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function id(t,e,i,n,o,a){var s=!i,l=t.tree.getNodeByDataIndex(e),a=ed(l,l.getModel(),a),u=t.tree.root,h=l.parentNode===u?l:l.parentNode||l,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=l.getLayout();s?(i=new wu(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),Io(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===l.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.xx.x)||(m-=Math.PI);var b=v?"left":"right";g.setStyle({textPosition:b,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(l.parentNode&&l.parentNode!==u){var S=i.__edge;S||(S=i.__edge=new bM({shape:od(a,f,f),style:r({opacity:0,strokeNoScale:!0},a.lineStyle)})),Io(S,{shape:od(a,d,p),style:{opacity:1}},o),n.add(S)}}function nd(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,a=ed(s,s.getModel(),a),u=s.parentNode===l?s:s.parentNode||s;null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;Io(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var h=i.__edge;h&&Io(h,{shape:od(a,r,r),style:{opacity:0}},o,function(){n.remove(h)})}function od(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"===t.layout){s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Uc(s,u),f=Uc(s,u+(h-u)*t.curvature),p=Uc(l,h+(u-h)*t.curvature),g=Uc(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function ad(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s=0;a--)n.push(o[a])}}function sd(t,e){var i=Xc(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,r=Zc(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,r=Zc());var s=t.getData().tree.root,l=s.children[0];if(l){Fc(s),ad(l,Wc,r),s.hierNode.modifier=-l.hierNode.prelim,rd(l,Hc);var u=l,h=l,c=l;rd(l,function(t){var e=t.getLayout().x;eh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Uc(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),rd(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),rd(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}function ld(t,e,i){if(t&&l(e,t.type)>=0){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function ud(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function hd(t,e){return l(ud(t),e)>=0}function cd(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}function dd(t){var e=0;d(t.children,function(t){dd(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function fd(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new No(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function pd(t){this.group=new tb,t.add(this.group)}function gd(t,e,i,n,o,a){var r=[[o?t:t-UC,e],[t+i,e],[t+i,e+n],[o?t:t-UC,e+n]];return!a&&r.splice(2,0,[t+i+UC,e+n/2]),!o&&r.push([t,e+n/2]),r}function md(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&cd(i,e)}}function vd(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function bd(t,e){var i=t.visual,n=[];w(i)?sL(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasOwnProperty(t.type)||(n[1]=n[0]),Ld(t,n)}function Sd(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:Dd([0,1])}}function Md(t){var e=this.option.visual;return e[Math.round(Bo(t,[0,1],[0,e.length-1],!0))]||{}}function Id(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function Td(t){var e=this.option.visual;return e[this.option.loop&&t!==uL?t%e.length:t]}function Ad(){return this.option.visual[0]}function Dd(t){return{linear:function(e){return Bo(e,t,this.option.visual,!0)},category:Td,piecewise:function(e,i){var n=Cd.call(this,i);return null==n&&(n=Bo(e,t,this.option.visual,!0)),n},fixed:Ad}}function Cd(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[hL.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function Ld(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=f(e,function(t){return Gt(t)})),e}function kd(t,e,i){return t?e<=i:e=o.length||t===o[t.depth])&&Pd(t,Vd(r,h,t,e,g,a),i,n,o,a)})}else l=Od(h),t.setVisual("color",l)}}function Nd(t,e,i,n){var o=a({},e);return d(["color","colorAlpha","colorSaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function Od(t){var e=Rd(t,"color");if(e){var i=Rd(t,"colorAlpha"),n=Rd(t,"colorSaturation");return n&&(e=jt(e,null,null,n)),i&&(e=Yt(e,i)),e}}function Ed(t,e){return null!=e?jt(e,null,null,t):null}function Rd(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function zd(t,e,i,n,o,a){if(a&&a.length){var r=Bd(e,"color")||null!=o.color&&"none"!==o.color&&(Bd(e,"colorAlpha")||Bd(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new hL(c);return d.__drColorMappingBy=h,d}}}function Bd(t,e){var i=t.get(e);return fL(i)&&i.length?{name:e,range:i}:null}function Vd(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,u="color"===l&&o.__drColorMappingBy,h="index"===u?n:"id"===u?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));s[l]=o.mapValueToVisual(h)}return s}function Gd(t,e,i,n){var o,a;if(!t.isRemoved()){var r=t.getLayout();o=r.width,a=r.height;var s=(f=t.getModel()).get(_L),l=f.get(wL)/2,u=Kd(f),h=Math.max(s,u),c=s-l,d=h-l,f=t.getModel();t.setLayout({borderWidth:s,upperHeight:h,upperLabelHeight:u},!0);var p=(o=mL(o-2*c,0))*(a=mL(a-c-d,0)),g=Fd(t,f,p,e,i,n);if(g.length){var m={x:c,y:d,width:o,height:a},v=vL(o,a),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_=0;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*es[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}function Ud(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;ro&&(o=n));var l=t.area*t.area,u=e*e*i;return l?mL(u*o/l,l/(u*a)):1/0}function Xd(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;cXM&&(u=XM),a=s}u=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function pf(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function gf(t,e,i){var n=t.getGraphicEl(),o=pf(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if("group"!==t.type){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function mf(t,e){var i=pf(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)})}function vf(t){return t instanceof Array||(t=[t,t]),t}function yf(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),xf(i)}}function xf(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=F(t.node1.getLayout()),n=F(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}function _f(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),o=n.graph,a=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,u=i.height/2+i.y,h=Math.min(i.width,i.height)/2;o.eachNode(function(t){var e=t.getValue("value");a+=s*(r?e:1)/2,t.setLayout([h*Math.cos(a)+l,h*Math.sin(a)+u]),a+=s*(r?e:1)/2}),n.setLayout({cx:l,cy:u}),o.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=F(t.node1.getLayout()),o=F(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),u*i+r*(1-i)]),t.setLayout([n,o,e])})}}function wf(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l0?-1:i<0?1:e?-1:1}}function Pf(t,e){return Math.min(e[1],Math.max(e[0],t))}function Nf(t,e,i){this._axesMap=R(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function Of(t,e){return ek(ik(t,e[0]),e[1])}function Ef(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function Rf(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return tmk}function $f(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Jf(t,e,i,n){var o=new tb;return o.add(new yM({name:"main",style:ip(i),silent:!0,draggable:!0,cursor:"move",drift:uk(t,e,o,"nswe"),ondragend:uk(qf,e,{isEnd:!0})})),hk(n,function(i){o.add(new yM({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:uk(t,e,o,i),ondragend:uk(qf,e,{isEnd:!0})}))}),o}function Qf(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=fk(o,vk),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;ep(t,e,"main",r,s,p,g),n.transformable&&(ep(t,e,"w",l,u,a,v),ep(t,e,"e",d,u,a,v),ep(t,e,"n",l,u,m,a),ep(t,e,"s",l,f,m,a),ep(t,e,"nw",l,u,a,a),ep(t,e,"ne",d,u,a,a),ep(t,e,"sw",l,f,a,a),ep(t,e,"se",d,f,a,a))}function tp(t,e){var i=e.__brushOption,n=i.transformable,o=e.childAt(0);o.useStyle(ip(i)),o.attr({silent:!n,cursor:n?"move":"default"}),hk(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childOfName(i),a=ap(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?_k[a]+"-resize":null})})}function ep(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(hp(up(t,e,[[n,o],[n+a,o+r]])))}function ip(t){return r({strokeNoScale:!0},t.brushStyle)}function np(t,e,i,n){var o=[dk(t,i),dk(e,n)],a=[fk(t,i),fk(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function op(t){return Ao(t.group)}function ap(t,e){if(e.length>1)return("e"===(n=[ap(t,(e=e.split(""))[0]),ap(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=Co({w:"left",e:"right",n:"top",s:"bottom"}[e],op(t));return i[n]}function rp(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=lp(i,a,r);hk(o.split(""),function(t){var e=xk[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(np(u[0][0],u[1][0],u[0][1],u[1][1])),Zf(i,n),qf(i,{isEnd:!1})}function sp(t,e,i,n,o){var a=e.__brushOption.range,r=lp(t,i,n);hk(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Zf(t,e),qf(t,{isEnd:!1})}function lp(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function up(t,e,n){var o=jf(t,e);return o&&!0!==o?o.clipPath(n,t._transform):i(n)}function hp(t){var e=dk(t[0][0],t[1][0]),i=dk(t[0][1],t[1][1]);return{x:e,y:i,width:fk(t[0][0],t[1][0])-e,height:fk(t[0][1],t[1][1])-i}}function cp(t,e,i){if(t._brushType){var n=t._zr,o=t._covers,a=Xf(t,e,i);if(!t._dragging)for(var r=0;r0;a--)Yp(s,l*=.99,r),jp(s,o,i,n,r),tg(s,l,r),jp(s,o,i,n,r)}function Up(t,e){var i=[],n="vertical"===e?"y":"x",o=Zi(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),d(o.keys,function(t){i.push(o.buckets.get(t))}),i}function Xp(t,e,i,n,o,a,r){var s=[];d(e,function(t){var e=t.length,i=0,l=0;d(t,function(t){i+=t.getLayout().value}),l="vertical"===r?(o-(e-1)*a)/i:(n-(e-1)*a)/i,s.push(l)}),s.sort(function(t,e){return t-e});var l=s[0];d(e,function(t){d(t,function(t,e){var i=t.getLayout().value*l;"vertical"===r?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),d(i,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})}function jp(t,e,i,n,o){d(t,function(t){var a,r,s,l=0,u=t.length;if("vertical"===o){var h;for(t.sort(function(t,e){return t.getLayout().x-e.getLayout().x}),s=0;s0&&(h=a.getLayout().x+r,a.setLayout({x:h},!0)),l=a.getLayout().x+a.getLayout().dx+e;if((r=l-e-n)>0)for(h=a.getLayout().x-r,a.setLayout({x:h},!0),l=h,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().x+a.getLayout().dx+e-l)>0&&(h=a.getLayout().x-r,a.setLayout({x:h},!0)),l=a.getLayout().x}else{var c;for(t.sort(function(t,e){return t.getLayout().y-e.getLayout().y}),s=0;s0&&(c=a.getLayout().y+r,a.setLayout({y:c},!0)),l=a.getLayout().y+a.getLayout().dy+e;if((r=l-e-i)>0)for(c=a.getLayout().y-r,a.setLayout({y:c},!0),l=c,s=u-2;s>=0;--s)(r=(a=t[s]).getLayout().y+a.getLayout().dy+e-l)>0&&(c=a.getLayout().y-r,a.setLayout({y:c},!0)),l=a.getLayout().y}})}function Yp(t,e,i){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outEdges.length){var n=Qp(t.outEdges,qp,i)/Qp(t.outEdges,Jp,i);if("vertical"===i){var o=t.getLayout().x+(n-$p(t,i))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(n-$p(t,i))*e;t.setLayout({y:a},!0)}}})})}function qp(t,e){return $p(t.node2,e)*t.getValue()}function Kp(t,e){return $p(t.node1,e)*t.getValue()}function $p(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function Jp(t){return t.getValue()}function Qp(t,e,i){for(var n=0,o=t.length,a=-1;++a0?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(Gk).getItemStyle(Wk);e.useStyle(r),e.style.fill=null,e.style.stroke=a}function fg(t,e,i,n,o){return i>n?-1:i0?t.get(o,e-1)<=n?1:-1:1}function pg(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Vo(A(t.get("barMaxWidth"),o),o),r=Vo(A(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Vo(s,o):Math.max(Math.min(o/2,a),r)}function gg(t){return y(t)||(t=[+t,+t]),t}function mg(t,e){t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})})}function vg(t,e){tb.call(this);var i=new wu(t,e),n=new tb;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}function yg(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),o([e,t[0],t[1]])}))}function xg(t,e,i){tb.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}function _g(t,e,i){tb.call(this),this._createPolyline(t,e,i)}function wg(t,e,i){xg.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}function bg(){this.group=new tb}function Sg(t){return t instanceof Array||(t=[t,t]),t}function Mg(){var t=iw();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}function Ig(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n=e[0]&&t<=e[1]}}function Ag(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function Dg(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};Cg(i,a,o,n,c),kg(t,e,o,a,r,c.boundingLength,c.pxSign,u,n,c),Pg(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return y(f)&&(f=[Vo(f[0],d[0]),Vo(f[1],d[1])]),Ng(i,d,o,a,r,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function Cg(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(y(s)){var c=[Lg(l,s[0])-u,Lg(l,s[1])-u];c[1]0?1:a<0?-1:0}function Lg(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function kg(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Vo(f[c.index],d),f[h.index]=Vo(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}function Pg(t,e,i,n,o){var a=t.get(cP)||0;a&&(fP.attr({scale:e.slice(),rotation:i}),fP.updateTransform(),a/=fP.getLineScale(),a*=e[n.valueDim.index]),o.valueLineWidth=a}function Ng(t,e,i,n,o,r,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=T(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Vo(x,e[p.index]);var w=Math.max(m+2*x,0),b=_?0:2*x,S=Qo(n),M=S?n:Kg((y+b)/w);w=m+2*(x=(y-M*m)/2/(_?M:M-1)),b=_?0:2*x,S||"fixed"===n||(M=h?Kg((Math.abs(h)+b)/w):0),v=M*w-b,d.repeatTimes=M,d.symbolMargin=x}var I=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?I:"end"===s?u-I:u/2,r&&(A[0]+=r[0],A[1]+=r[1]);var D=d.bundlePosition=[];D[f.index]=i[f.xy],D[p.index]=i[p.xy];var C=d.barRectShape=a({},i);C[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+I)),C[f.wh]=i[f.wh];var L=d.clipShape={};L[f.xy]=-i[f.xy],L[f.wh]=c.ecSize[f.wh],L[p.xy]=0,L[p.wh]=i[p.wh]}function Og(t){var e=t.symbolPatternSize,i=Jl(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function Eg(t,e,i,n){function o(t){var e=l.slice(),n=i.pxSign,o=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(o=h-1-t),e[u.index]=d*(o-h/2+.5)+l[u.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}var a=t.__pictorialBundle,r=i.symbolSize,s=i.valueLineWidth,l=i.pathPosition,u=e.valueDim,h=i.repeatTimes||0,c=0,d=r[e.valueDim.index]+s+2*i.symbolMargin;for(jg(t,function(t){t.__pictorialAnimationIndex=c,t.__pictorialRepeatTimes=h,c0)],d=t.__pictorialBarRect;kh(d.style,h,a,n,e.seriesModel,o,c),fo(d,h)}function Kg(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function $g(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function Jg(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};o.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};o.labelDirection=o.tickDirection=o.nameDirection=c[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),T(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-d:d,o.z2=1,o}function Qg(t,e,i,n,o){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var s=tm(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==o.seriesIndex&&a(o,l[0]),!n&&t.snap&&r.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,o),i.showTooltip(t,s,u)}else i.showPointer(t,e)}function tm(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=Number.MAX_VALUE,s=-1;return _P(e.seriesModels,function(e,l){var u,h,c=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);h=d.dataIndices,u=d.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var f=t-u,p=Math.abs(f);p<=r&&((p=0&&s<0)&&(r=p,s=f,o=u,a.length=0),_P(h,function(t){a.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:a,snapToValue:o}}function em(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function im(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=Ah(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function nm(t,e,i){var n=i.axesInfo=[];_P(e,function(e,i){var o=e.axisPointerModel.option,a=t[i];a?(!e.useHandle&&(o.status="show"),o.value=a.value,o.seriesDataIndices=(a.payloadBatch||[]).slice()):!e.useHandle&&(o.status="hide"),"show"===o.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:o.value})})}function om(t,e,i,n){if(!lm(e)&&t.list.length){var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}else n({type:"hideTip"})}function am(t,e,i){var n=i.getZr(),o=bP(n).axisPointerLastHighlights||{},a=bP(n).axisPointerLastHighlights={};_P(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&_P(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}function rm(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function sm(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function lm(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function um(t,e,i){if(!U_.node){var n=e.getZr();SP(n).records||(SP(n).records={}),hm(n,e),(SP(n).records[t]||(SP(n).records[t]={})).handler=i}}function hm(t,e){function i(i,n){t.on(i,function(i){var o=pm(e);MP(SP(t).records,function(t){t&&n(t,i,o.dispatchAction)}),cm(o.pendings,e)})}SP(t).initialized||(SP(t).initialized=!0,i("click",v(fm,"click")),i("mousemove",v(fm,"mousemove")),i("globalout",dm))}function cm(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function dm(t,e,i){t.handler("leave",null,i)}function fm(t,e,i,n){e.handler(t,i,n)}function pm(t){var e={showTip:[],hideTip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function gm(t,e){if(!U_.node){var i=e.getZr();(SP(i).records||{})[t]&&(SP(i).records[t]=null)}}function mm(){}function vm(t,e,i,n){ym(TP(i).lastProp,n)||(TP(i).lastProp=n,e?Io(i,n,t):(i.stopAnimation(),i.attr(n)))}function ym(t,e){if(w(t)&&w(e)){var i=!0;return d(e,function(e,n){i=i&&ym(t[n],e)}),!!i}return t===e}function xm(t,e){t[e.get("label.show")?"show":"hide"]()}function _m(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wm(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function bm(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function Sm(t,e,i,n,o){var a=Im(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=qM(r.get("padding")||0),l=r.getFont(),u=ke(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),Mm(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function Mm(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Im(t,e,i,n,o){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:Xl(e,t),seriesData:[]};d(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,o=e&&e.getDataParams(n);o&&s.seriesData.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function Tm(t,e,i){var n=xt();return Mt(n,n,i.rotation),St(n,n,i.position),Do([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Am(t,e,i,n,o,a){var r=FD.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),Sm(e,n,o,a,{position:Tm(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function Dm(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Cm(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Lm(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}function km(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function Pm(t){return"x"===t.dim?0:1}function Nm(t){return t.isHorizontal()?0:1}function Om(t,e){var i=t.getRect();return[i[kP[e]],i[kP[e]]+i[PP[e]]]}function Em(t,e,i){var n=new yM({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return To(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function Rm(t,e,i){if(t.count())for(var n,o=e.coordinateSystem,a=e.getLayerSeries(),r=t.mapDimension("single"),s=t.mapDimension("value"),l=f(a,function(e){return f(e.indices,function(e){var i=o.dataToPoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=zm(l),h=u.y0,c=i/u.max,d=a.length,p=a[0].indices.length,g=0;ga&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return r.y0=o,r.max=a,r}function Bm(t){var e=0;d(t.children,function(t){Bm(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function Vm(t,e,i){function n(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}tb.call(this);var a=new hM({z2:zP});a.seriesIndex=e.seriesIndex;var r=new rM({z2:BP,silent:t.getModel("label").get("silent")});this.add(a),this.add(r),this.updateData(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function Gm(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[Fm(t)%r]}function Fm(t){for(var e=t;e.depth>1;)e=e.parentNode;return l(t.getAncestors()[0].children,e)}function Wm(t,e,i){return i!==RP.NONE&&(i===RP.SELF?t===e:i===RP.ANCESTOR?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}function Hm(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}function Zm(t,e){var i=t.children||[];t.children=Um(i,e),i.length&&d(t.children,function(t){Zm(t,e)})}function Um(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0===n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function Xm(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getAxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(a-r)-o.dataToCoord(a+r))},this)}function jm(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(r)[i])},this)}function Ym(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function qm(t,e){return f(["Radius","Angle"],function(i,n){var o=this["get"+i+"Axis"](),a=e[n],r=t[n]/2,s="dataTo"+i,l="category"===o.type?o.getBandWidth():Math.abs(o[s](a-r)-o[s](a+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Km(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=lv(n);(e=Xn(a,null,o,n.layout||"center")).__customPathData=a}else"image"===i?(e=new fi({})).__customImagePath=t.style.image:"text"===i?(e=new rM({})).__customText=t.style.text:e=new(0,zM[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}function $m(t,e,n,o,a,r,s){var l={},u=n.style||{};if(n.shape&&(l.shape=i(n.shape)),n.position&&(l.position=n.position.slice()),n.scale&&(l.scale=n.scale.slice()),n.origin&&(l.origin=n.origin.slice()),n.rotation&&(l.rotation=n.rotation),"image"===t.type&&n.style){h=l.style={};d(["x","y","width","height"],function(e){Jm(e,h,u,t.style,r)})}if("text"===t.type&&n.style){var h=l.style={};d(["x","y"],function(e){Jm(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),To(t,{style:{opacity:c}},o,e)}r?t.attr(l):Io(t,l,o,e),n.hasOwnProperty("z2")&&t.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&t.attr("silent",n.silent),n.hasOwnProperty("invisible")&&t.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&t.attr("ignore",n.ignore),n.hasOwnProperty("info")&&t.attr("info",n.info);var f=n.styleEmphasis,p=!1===f;t.__cusHasEmphStl&&null==f||!t.__cusHasEmphStl&&p||(ro(t,f),t.__cusHasEmphStl=!p),s&&po(t,!p)}function Jm(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function Qm(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getItemModel(t),d=c.getModel(UP),f=c.getModel(XP),p=e.getItemVisual(t,"color"),v=!1)}var s=t.get("renderItem"),l=t.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms():YP[l.type](l));var h,c,d,f,p,g=r({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(t,i){return null==i&&(i=h),e.get(e.getDimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(HP).getItemStyle();null!=p&&(r.fill=p);var s=e.getItemVisual(n,"opacity");return null!=s&&(r.opacity=s),mo(r,d,null,{autoColor:p,isRectText:!0}),r.text=d.getShallow("show")?A(t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},styleEmphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getModel(ZP).getItemStyle();return mo(r,f,null,{isRectText:!0},!0),r.text=f.getShallow("show")?D(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),_u(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getItemVisual(i,t)},barLayout:function(t){if(l.getBaseAxis)return Ll(r({axis:l.getBaseAxis()},t),n)},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(t){return So(t,i)}},u.api||{}),m={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:u.coordSys,dataInsideLength:e.count(),encode:tv(t.getData())},v=!0;return function(t,i){return h=t,v=!0,s&&s(r({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},m),g)}}function tv(t){var e={};return d(t.dimensions,function(i,n){var o=t.getDimensionInfo(i);if(!o.isExtraCoord){var a=o.coordDim;(e[a]=e[a]||[])[o.coordDimIndex]=n}}),e}function ev(t,e,i,n,o,a){return(t=iv(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function iv(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&uv(u)&&lv(u)!==t.__customPathData||"image"===l&&hv(h,"image")&&h.image!==t.__customImagePath||"text"===l&&hv(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return!t&&(t=Km(i)),$m(t,e,i,n,a,c,r),"group"===l&&nv(t,e,i,n,a),o.add(t),t}}function nv(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(r||l||u)if(l)ov({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});else{u&&t.removeAll();for(var h=0;hn?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function Ov(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Ev(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function Rv(t){return"center"===t||"middle"===t}function zv(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function Bv(t){return t.dim}function Vv(t,e){var i={};d(t,function(t,e){var n=t.getData(),o=t.coordinateSystem.getBaseAxis(),a=o.getExtent(),r="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),s=i[Bv(o)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[Bv(o)]=s;var u=zv(t);l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var h=Vo(t.get("barWidth"),r),c=Vo(t.get("barMaxWidth"),r),d=t.get("barGap"),f=t.get("barCategoryGap");h&&!l[u].width&&(h=Math.min(s.remainedWidth,h),l[u].width=h,s.remainedWidth-=h),c&&(l[u].maxWidth=c),null!=d&&(s.gap=d),null!=f&&(s.categoryGap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandWidth,a=Vo(t.categoryGap,o),r=Vo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-a)/(l+(l-1)*r);u=Math.max(u,0),d(i,function(t,e){var i=t.maxWidth;i&&ie[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function jv(t){return t.getRadiusAxis().inverse?0:1}function Yv(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function qv(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function Kv(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=xt();Mt(d,d,s),St(d,d,[n.cx,n.cy]),l=Do([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=FD.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function $v(t,e){e.update="updateView",Es(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name),d(i.coordinateSystem.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function Jv(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function Qv(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function ty(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return MN(e,function(e){var r=a[e]=o();MN(t[e],function(t,o){if(hL.isValidType(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new hL(a),"opacity"===o&&((a=i(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new hL(a))}})}),a}function ey(t,e,n){var o;d(n,function(t){e.hasOwnProperty(t)&&Qv(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasOwnProperty(n)&&Qv(e[n])?t[n]=i(e[n]):delete t[n]})}function iy(t,e,i,n,o,a){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getRawDataItem(h);if(!c||!1!==c.visualMap)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;g1)return!1;var h=uy(i-t,o-t,n-e,a-e)/l;return!(h<0||h>1)}function ly(t){return t<=1e-6&&t>=-1e-6}function uy(t,e,i,n){return t*n-e*i}function hy(t,e,i){var n=this._targetInfoList=[],o={},a=dy(e,t);TN(PN,function(t,e){(!i||!i.include||AN(i.include,e)>=0)&&t(a,n,o)})}function cy(t){return t[0]>t[1]&&t.reverse(),t}function dy(t,e){return Vi(t,e,{includeMainTypes:LN})}function fy(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=cy(f([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}function py(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function gy(t,e){var i=my(t),n=my(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}function my(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}function vy(t,e,i,n,o){if(o){var a=t.getZr();a[VN]||(a[BN]||(a[BN]=yy),Nr(a,BN,i,e)(t,n))}}function yy(t,e){if(!t.isDisposed()){var i=t.getZr();i[VN]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[VN]=!1}}function xy(t,e,i,n){for(var o=0,a=e.length;o=0}function Ny(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function Oy(t,e,i){var n=[1/0,-1/0];return $N(i,function(t){var i=t.getData();i&&$N(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:NaN);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:NaN),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function Ry(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Zo(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}function zy(t){var e=t._minMaxSpan={},i=t._dataZoomModel;$N(["min","max"],function(n){e[n+"Span"]=i.get(n+"Span");var o=i.get(n+"ValueSpan");if(null!=o&&(e[n+"ValueSpan"]=o,null!=(o=t.getAxisModel().axis.scale.parse(o)))){var a=t._dataExtent;e[n+"Span"]=Bo(a[0]+o,a,[0,100],!0)}})}function By(t){var e={};return tO(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function Vy(t,e){var i=t._rangePropMode,n=t.get("rangeMode");tO([["start","startValue"],["end","endValue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function Gy(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function Fy(t){return"vertical"===t?"ns-resize":"ew-resize"}function Wy(t,e){var i=Uy(t),n=e.dataZoomId,o=e.coordId;d(i,function(t,i){var a=t.dataZoomInfos;a[n]&&l(e.allCoordIds,o)<0&&(delete a[n],t.count--)}),jy(i);var a=i[o];a||((a=i[o]={coordId:o,dataZoomInfos:{},count:0}).controller=Xy(t,a),a.dispatchAction=v(Yy,t)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=e;var r=qy(a.dataZoomInfos);a.controller.enable(r.controlType,r.opt),a.controller.setPointerChecker(e.containsPoint),Nr(a,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function Hy(t,e){var i=Uy(t);d(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),jy(i)}function Zy(t){return t.type+"\0_"+t.id}function Uy(t){var e=t.getZr();return e[fO]||(e[fO]={})}function Xy(t,e){var i=new oc(t.getZr());return d(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];d(e.dataZoomInfos,function(o){if(i.isAvailableBehavior(o.dataZoomModel.option)){var a=(o.getRange||{})[t],r=a&&a(e.controller,i);!o.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:o.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function jy(t){d(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Yy(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function qy(t){var e,i={type_true:2,type_move:1,type_false:0,type_undefined:-1},n=!0;return d(t,function(t){var o=t.dataZoomModel,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i["type_"+a]>i["type_"+e]&&(e=a),n&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function Ky(t){return function(e,i,n,o){var a=this._range,r=a.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,o);return QL(l,r,[0,100],"all"),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}}}function $y(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function Jy(t,e,i,n){for(var o=e.targetVisuals[n],a=hL.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s=0&&(r[a]=+r[a].toFixed(h)),r}function fx(t,e){var n=t.getData(),o=t.coordinateSystem;if(e&&!cx(e)&&!y(e.coord)&&o){var a=o.dimensions,r=px(e,n,o,t);if((e=i(e)).type&&YO[e.type]&&r.baseAxis&&r.valueAxis){var s=XO(a,r.baseAxis.dim),l=XO(a,r.valueAxis.dim);e.coord=YO[e.type](n,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)YO[u[h]]&&(u[h]=yx(n,n.mapDimension(a[h]),u[h]));e.coord=u}}return e}function px(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(gx(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function gx(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o=0)return!0}function Yx(t){for(var e=t.split(/\n+/g),i=[],n=f(Xx(e.shift()).split(pE),function(t){return{name:t,data:[]}}),o=0;o=0&&!i[o][n];o--);if(o<0){var a=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var r=a.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}}),i.push(e)}function t_(t){var e=n_(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return gE(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function e_(t){t[mE]=null}function i_(t){return n_(t).length}function n_(t){var e=t[mE];return e||(e=t[mE]=[{}]),e}function o_(t,e,i){(this._brushController=new zf(i.getZr())).on("brush",m(this._onBrush,this)).mount(),this._isZoomActive}function a_(t){var e={};return d(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function r_(t,e){t.setIconStatus("back",i_(e)>1?"emphasis":"normal")}function s_(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive),i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new hy(a_(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}function l_(t){this.model=t}function u_(t){return SE(t)}function h_(){if(!TE&&AE){TE=!0;var t=AE.styleSheets;t.length<31?AE.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}function c_(t){return parseInt(t,10)}function d_(t,e){h_(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}function f_(t){return function(){Yw('In IE8.0 VML mode painter not support method "'+t+'"')}}function p_(t){return document.createElementNS(sR,t)}function g_(t){return cR(1e4*t)/1e4}function m_(t){return t-vR}function v_(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==hR}function y_(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==hR}function x_(t,e){e&&__(t,"transform","matrix("+uR.call(e,",")+")")}function __(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function w_(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function b_(t,e,i,n){if(v_(e,i)){var o=i?e.textFill:e.fill;o="transparent"===o?hR:o,"none"!==t.getAttribute("clip-path")&&o===hR&&(o="rgba(0, 0, 0, 0.002)"),__(t,"fill",o),__(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else __(t,"fill",hR);if(y_(e,i)){var a=i?e.textStroke:e.stroke;__(t,"stroke",a="transparent"===a?hR:a),__(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),__(t,"paint-order",i?"stroke":"fill"),__(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(__(t,"stroke-dasharray",e.lineDash.join(",")),__(t,"stroke-dashoffset",cR(e.lineDashOffset||0))):__(t,"stroke-dasharray",""),e.lineCap&&__(t,"stroke-linecap",e.lineCap),e.lineJoin&&__(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&__(t,"stroke-miterlimit",e.miterLimit)}else __(t,"stroke",hR)}function S_(t){for(var e=[],i=t.data,n=t.len(),o=0;o=gR||!m_(g)&&(d>-pR&&d<0||d>pR)==!!p;var y=g_(s+u*fR(c)),x=g_(l+h*dR(c));m&&(d=p?gR-1e-4:1e-4-gR,v=!0,9===o&&e.push("M",y,x));var _=g_(s+u*fR(c+d)),w=g_(l+h*dR(c+d));e.push("A",g_(u),g_(h),cR(f*mR),+v,+p,_,w);break;case lR.Z:a="Z";break;case lR.R:var _=g_(i[o++]),w=g_(i[o++]),b=g_(i[o++]),S=g_(i[o++]);e.push("M",_,w,"L",_+b,w,"L",_+b,w+S,"L",_,w+S,"L",_,w)}a&&e.push(a);for(var M=0;M=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),X_={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},j_={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Y_=Object.prototype.toString,q_=Array.prototype,K_=q_.forEach,$_=q_.filter,J_=q_.slice,Q_=q_.map,tw=q_.reduce,ew={},iw=function(){return ew.createCanvas()};ew.createCanvas=function(){return document.createElement("canvas")};var nw,ow="__ec_primitive__";E.prototype={constructor:E,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var aw=(Object.freeze||Object)({$override:e,clone:i,merge:n,mergeAll:o,extend:a,defaults:r,createCanvas:iw,getContext:s,indexOf:l,inherits:u,mixin:h,isArrayLike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n3&&(n=dw.call(n,1));for(var a=e.length,r=0;r4&&(n=dw.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s1&&n&&n.length>1){var a=ft(n)/ft(o);!isFinite(a)&&(a=1),e.pinchScale=a;var r=pt(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},xw="silent";vt.prototype.dispose=function(){};var _w=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ww=function(t,e,i,n){fw.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new vt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,it.call(this),this.setHandlerProxy(i)};ww.prototype={constructor:ww,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(d(_w,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=this.findHover(e,i),r=a.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),o&&r!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),r&&r!==o&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!==i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=gt(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;a>=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=yt(n[a],t,e))&&(!o.topTarget&&(o.topTarget=n[a]),r!==xw)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new vw);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){ww.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||uw(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(ww,fw),h(ww,it);var bw="undefined"==typeof Float32Array?Array:Float32Array,Sw=(Object.freeze||Object)({create:xt,identity:_t,copy:wt,mul:bt,translate:St,rotate:Mt,scale:It,invert:Tt,clone:At}),Mw=_t,Iw=5e-5,Tw=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Aw=Tw.prototype;Aw.transform=null,Aw.needLocalTransform=function(){return Dt(this.rotation)||Dt(this.position[0])||Dt(this.position[1])||Dt(this.scale[0]-1)||Dt(this.scale[1]-1)};var Dw=[];Aw.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||xt(),i?this.getLocalTransform(n):Mw(n),e&&(i?bt(n,t.transform,n):wt(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(Dw);var a=Dw[0]<0?-1:1,r=Dw[1]<0?-1:1,s=((Dw[0]-a)*o+a)/Dw[0]||0,l=((Dw[1]-r)*o+r)/Dw[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||xt(),Tt(this.invTransform,n)}else n&&Mw(n)},Aw.getLocalTransform=function(t){return Tw.getLocalTransform(this,t)},Aw.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Aw.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Cw=[],Lw=xt();Aw.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;Dt(e-1)&&(e=Math.sqrt(e)),Dt(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},Aw.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(bt(Cw,t.invTransform,e),e=Cw);var i=this.origin;i&&(i[0]||i[1])&&(Lw[4]=i[0],Lw[5]=i[1],bt(Cw,e,Lw),Cw[4]-=i[0],Cw[5]-=i[1],e=Cw),this.setLocalTransform(e)}},Aw.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},Aw.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&Q(i,i,n),i},Aw.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&Q(i,i,n),i},Tw.getLocalTransform=function(t,e){Mw(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),It(e,e,n),o&&Mt(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var kw={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-kw.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*kw.bounceIn(2*t):.5*kw.bounceOut(2*t-1)+.5}};Ct.prototype={constructor:Ct,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?kw[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Pw=function(){this.head=null,this.tail=null,this._len=0},Nw=Pw.prototype;Nw.insert=function(t){var e=new Ow(t);return this.insertEntry(e),e},Nw.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Nw.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Nw.len=function(){return this._len},Nw.clear=function(){this.head=this.tail=null,this._len=0};var Ow=function(t){this.value=t,this.next,this.prev},Ew=function(t){this._list=new Pw,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rw=Ew.prototype;Rw.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ow(e),r.key=t,i.insertEntry(r),n[t]=r}return o},Rw.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rw.clear=function(){this._list.clear(),this._map={}};var zw={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},Bw=new Ew(20),Vw=null,Gw=Ut,Fw=Xt,Ww=(Object.freeze||Object)({parse:Gt,lift:Ht,toHex:Zt,fastLerp:Ut,fastMapToColor:Gw,lerp:Xt,mapToColor:Fw,modifyHSL:jt,modifyAlpha:Yt,stringify:qt}),Hw=Array.prototype.slice,Zw=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Kt,this._setter=n||$t,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Zw.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ae(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new de(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},de.create=function(t){return new de(t.x,t.y,t.width,t.height)};var tb=function(t){t=t||{},Kw.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};tb.prototype={constructor:tb,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof tb&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof tb&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof tb&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:we};var ob={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ab=function(t,e,i){return ob.hasOwnProperty(e)?i*=t.dpr:i},rb={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},sb=9,lb=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ub=function(t){this.extendFrom(t,!1)};ub.prototype={constructor:ub,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==rb.STYLE_BIND;t.__attrCachedBy=rb.STYLE_BIND;for(var r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Se:be)(t,e,i),o=e.colorStops,a=0;a=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}s.__drawIndex=m,s.__drawIndex0&&t>n[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Yw("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n0?.01:0),this._needsManuallyCompositing),a.__builtin__||Yw("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==o&&(a.__dirty=!0),a.__startIndex=o,a.incremental?a.__drawIndex=-1:a.__drawIndex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?n(i[t],e,!0):i[t]=e;for(var o=0;o=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i=0||n&&l(n,r)<0)){var s=e.getShallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},tS=Qb([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),eS={getLineStyle:function(t){var e=tS(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},iS=Qb([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),nS={getAreaStyle:function(t,e){return iS(this,t,e)}},oS=Math.pow,aS=Math.sqrt,rS=1e-8,sS=1e-4,lS=aS(3),uS=1/3,hS=V(),cS=V(),dS=V(),fS=Math.min,pS=Math.max,gS=Math.sin,mS=Math.cos,vS=2*Math.PI,yS=V(),xS=V(),_S=V(),wS=[],bS=[],SS={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},MS=[],IS=[],TS=[],AS=[],DS=Math.min,CS=Math.max,LS=Math.cos,kS=Math.sin,PS=Math.sqrt,NS=Math.abs,OS="undefined"!=typeof Float32Array,ES=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ES.prototype={constructor:ES,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=NS(1/Xw/t)||0,this._uy=NS(1/Xw/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(SS.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=NS(t-this._xi)>this._ux||NS(e-this._yi)>this._uy||this._len<5;return this.addData(SS.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(SS.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(SS.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(SS.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=LS(o)*i+t,this._yi=kS(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(SS.R,t,e,i,n),this},closePath:function(){this.addData(SS.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&f<=t||h<0&&f>=t||0===h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,h>0&&fl||c>0&&pu||s[n%2?"moveTo":"lineTo"](h>=0?DS(f,t):CS(f,t),c>=0?DS(p,e):CS(p,e));h=f-t,c=p-e,this._dashOffset=-PS(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=tn,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=PS(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-PS(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,OS&&(this.data=new Float32Array(t)))},getBoundingRect:function(){MS[0]=MS[1]=TS[0]=TS[1]=Number.MAX_VALUE,IS[0]=IS[1]=AS[0]=AS[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;al||NS(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case SS.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case SS.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=LS(v)*g+f,i=kS(v)*m+p),n=LS(M)*g+f,o=kS(M)*m+p;break;case SS.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case SS.Z:t.closePath(),n=e,o=i}}}},ES.CMD=SS;var RS=2*Math.PI,zS=2*Math.PI,BS=ES.CMD,VS=2*Math.PI,GS=1e-4,FS=[-1,-1,-1],WS=[-1,-1],HS=fb.prototype.getCanvasPattern,ZS=Math.abs,US=new ES(!0);Pn.prototype={constructor:Pn,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||US,o=i.hasStroke(),a=i.hasFill(),r=i.fill,s=i.stroke,l=a&&!!r.colorStops,u=o&&!!s.colorStops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=HS.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=HS.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1]),this.__dirtyPath||f&&!g&&o?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),o)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new ES},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new ES),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),kn(a,r/s,t,e)))return!0}if(o.hasFill())return Ln(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):di.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&ZS(t[0]-1)>1e-10&&ZS(t[3]-1)>1e-10?Math.sqrt(ZS(t[0]*t[3]-t[2]*t[1])):1}},Pn.extend=function(t){var e=function(e){Pn.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasOwnProperty(o)&&i.hasOwnProperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,Pn);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(Pn,di);var XS=ES.CMD,jS=[[],[],[]],YS=Math.sqrt,qS=Math.atan2,KS=function(t,e){var i,n,o,a,r,s,l=t.data,u=XS.M,h=XS.C,c=XS.L,d=XS.R,f=XS.A,p=XS.Q;for(o=0,a=0;o=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var o=0;oi-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([Bn(s[0],f[0],l[0],u[0],d,p,g),Bn(s[1],f[1],l[1],u[1],d,p,g)])}return n},fM=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createIcon:Po,Group:tb,Image:fi,Text:rM,Circle:sM,Sector:hM,Ring:cM,Polygon:pM,Polyline:gM,Rect:yM,Line:_M,BezierCurve:bM,Arc:SM,IncrementalDisplayable:Zn,CompoundPath:MM,LinearGradient:TM,RadialGradient:AM,BoundingRect:de}),BM=["textStyle","color"],VM={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(BM):null)},getFont:function(){return So({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return ke(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},GM=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),FM={getItemStyle:function(t,e){var i=GM(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},WM=h,HM=Bi();No.prototype={constructor:No,init:null,mergeOption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:Oo(this.option,this.parsePath(t),!e&&Eo(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&Eo(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i,n=null==t?this.option:Oo(this.option,t=this.parsePath(t));return e=e||(i=Eo(this,t))&&i.getModel(t),new No(n,e,this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){HM(this).getParent=t},isAnimationEnabled:function(){if(!U_.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},ji(No),Yi(No),WM(No,eS),WM(No,nS),WM(No,VM),WM(No,FM);var ZM=0,UM=1e-4,XM=9007199254740991,jM=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,YM=(Object.freeze||Object)({linearMap:Bo,parsePercent:Vo,round:Go,asc:Fo,getPrecision:Wo,getPrecisionSafe:Ho,getPixelPrecision:Zo,getPercentWithPrecision:Uo,MAX_SAFE_INTEGER:XM,remRadian:Xo,isRadianAroundZero:jo,parseDate:Yo,quantity:qo,nice:$o,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:Jo,isNumeric:Qo}),qM=L,KM=/([&<>"'])/g,$M={"&":"&","<":"<",">":">",'"':""","'":"'"},JM=["a","b","c","d","e","f","g"],QM=function(t,e){return"{"+t+(null==e?"":e)+"}"},tI=ze,eI=(Object.freeze||Object)({addCommas:ta,toCamelCase:ea,normalizeCssArray:qM,encodeHTML:ia,formatTpl:na,formatTplSimple:oa,getTooltipMarker:aa,formatTime:sa,capitalFirst:la,truncateText:tI,getTextBoundingRect:function(t){return ke(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return ke(t,e,i,n,o,s,a,r)}}),iI=d,nI=["left","right","top","bottom","width","height"],oI=[["width","left","right"],["height","top","bottom"]],aI=ua,rI=(v(ua,"vertical"),v(ua,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),sI=Bi(),lI=No.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){No.call(this,t,e,i,n),this.uid=Ro("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,o=i?ga(t):{};n(t,e.getTheme().get(this.mainType)),n(t,this.getDefaultOption()),i&&pa(t,o,i)},mergeOption:function(t,e){n(this.option,t,!0);var i=this.layoutMode;i&&pa(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=sI(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var o=i.prototype.defaultOption;o&&e.push(o),i=i.superClass}for(var a={},r=e.length-1;r>=0;r--)a=n(a,e[r],!0);t.defaultOption=a}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});$i(lI,{registerWhenExtend:!0}),function(t){var e={};t.registerSubTypeDefaulter=function(t,i){t=Ui(t),e[t.main]=i},t.determineSubType=function(i,n){var o=n.type;if(!o){var a=Ui(i).main;t.hasSubTypes(i)&&e[a]&&(o=e[a](n))}return o}}(lI),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),u=o(s.originalDeps=e(r),t);s.entryCount=u.length,0===s.entryCount&&a.push(r),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noEntryList:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicalTravel=function(t,e,n,o){function a(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noEntryList,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(n.call(o,h,c.originalDeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,a(t)}:a)}d(u,function(){throw new Error("Circle dependency may exists")})}}}(lI,function(t){var e=[];return d(lI.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return Ui(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(lI,rI);var uI="";"undefined"!=typeof navigator&&(uI=navigator.platform||"");var hI={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:uI.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},cI=Bi(),dI={clearColorPalette:function(){cI(this).colorIdx=0,cI(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=cI(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Di(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?va(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},fI={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),xa(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),xa(a)&&(n.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),xa(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),xa(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),xa(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecModel,a=o.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=a.dimensions.slice();d(a.parallelAxisIndex,function(t,a){var s=o.getComponent("parallelAxis",t),l=r[a];i.set(l,s),xa(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=a)})}},pI="original",gI="arrayRows",mI="objectRows",vI="keyedColumns",yI="unknown",xI="typedArray",_I="column",wI="row";_a.seriesDataToSource=function(t){return new _a({data:t,sourceFormat:S(t)?xI:pI,fromDataset:!1})},Yi(_a);var bI=Bi(),SI="\0_ec_inner",MI=No.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new No(i),this._optionManager=n},setOption:function(t,e){k(!(SI in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Ea.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&d(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){var e=this.option,o=this._componentsMap,r=[];Sa(this),d(t,function(t,o){null!=t&&(lI.hasClass(o)?o&&r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),lI.topologicalTravel(r,lI.getAllClassMainTypes(),function(i,n){var r=Di(t[i]),s=Pi(o.get(i),r);Ni(s),d(s,function(t,e){var n=t.option;w(n)&&(t.keyInfo.mainType=i,t.keyInfo.subType=za(i,n,t.exist))});var l=Ra(o,n);e[i]=[],o.set(i,[]),d(s,function(t,n){var r=t.exist,s=t.option;if(k(w(s)||r,"Empty component definition"),s){var u=lI.getClass(i,t.keyInfo.subType,!0);if(r&&r instanceof u)r.name=t.keyInfo.name,r.mergeOption(s,this),r.optionUpdated(s,!1);else{var h=a({dependentModels:l,componentIndex:n},t.keyInfo);a(r=new u(s,this,this,h),h),r.init(s,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&Ba(this,o.get("series"))},this),this._seriesIndicesMap=R(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=i(this.option);return d(t,function(e,i){if(lI.hasClass(i)){for(var n=(e=Di(e)).length-1;n>=0;n--)Ei(e[n])&&e.splice(n,1);t[i]=e}}),delete t[SI],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsMap.get(e);if(!a||!a.length)return[];var r;if(null!=i)y(i)||(i=[i]),r=g(f(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=y(n);r=g(a,function(t){return s&&l(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var u=y(o);r=g(a,function(t){return u&&l(o,t.name)>=0||!u&&t.name===o})}else r=a.slice();return Va(r,t)},findComponents:function(t){var e=t.query,i=t.mainType,n=function(t){var e=i+"Index",n=i+"Id",o=i+"Name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{mainType:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?g(e,t.filter):e}(Va(n?this.queryComponents(n):this._componentsMap.get(i),t))},eachComponent:function(t,e,i){var n=this._componentsMap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,o){e.call(i,n,t,o)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findComponents(t),e,i)},getSeriesByName:function(t){return g(this._componentsMap.get("series"),function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){return g(this._componentsMap.get("series"),function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){d(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){d(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){d(this._seriesIndices,function(n){var o=this._componentsMap.get("series")[n];o.subType===t&&e.call(i,o,n)},this)},eachRawSeriesByType:function(t,e,i){return d(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){Ba(this,g(this._componentsMap.get("series"),t,e))},restoreData:function(t){var e=this._componentsMap;Ba(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),lI.topologicalTravel(i,lI.getAllClassMainTypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!Na(e,t))&&e.restoreData()})})}});h(MI,dI);var II=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],TI={};Fa.prototype={constructor:Fa,create:function(t,e){var i=[];d(TI,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){d(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Fa.register=function(t,e){TI[t]=e},Fa.get=function(t){return TI[t]};var AI=d,DI=i,CI=f,LI=n,kI=/^(min|max)?(.+)$/;Wa.prototype={constructor:Wa,setOption:function(t,e){t&&d(Di(t.series),function(t){t&&t.data&&S(t.data)&&N(t.data)}),t=DI(t,!0);var i=this._optionBackup,n=Ha.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(ja(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=CI(e.timelineOptions,DI),this._mediaList=CI(e.mediaList,DI),this._mediaDefault=DI(e.mediaDefault),this._currentMediaIndices=[],DI(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=DI(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;r===l&&s===u||(a="reset");var h;(this._dirty||"reset"===a)&&(this._dirty=!1,h=yr(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||d=i?null:t1&&a>0?e:t}};return s}();UI.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},UI.unfinished=function(){return this._progress&&this._dueIndex":"\n",s="richText"===n,l={},u=0,h=this.getData(),c=h.mapDimension("defaultedTooltip",!0),f=c.length,g=this.getRawValue(t),m=y(g),v=h.getItemVisual(t,"color");w(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var x=(f>1||m&&!f?function(i){function o(t,i){var o=h.getDimensionInfo(i);if(o&&!1!==o.otherDims.tooltip){var c=o.type,d="sub"+a.seriesIndex+"at"+u,p=aa({color:v,type:"subItem",renderMode:n,markerId:d}),g="string"==typeof p?p:p.content,m=(r?g+ia(o.displayName||"-")+": ":"")+ia("ordinal"===c?t+"":"time"===c?e?"":sa("yyyy/MM/dd hh:mm:ss",t):ta(t));m&&f.push(m),s&&(l[d]=v,++u)}}var r=p(i,function(t,e,i){var n=h.getDimensionInfo(i);return t|=n&&!1!==n.tooltip&&null!=n.displayName},0),f=[];c.length?d(c,function(e){o(fr(h,t,e),e)}):d(i,o);var g=r?s?"\n":"
":"",m=g+f.join(g||", ");return{renderMode:n,content:m,style:l}}(g):o(f?fr(h,t,c[0]):m?g[0]:g)).content,_=a.seriesIndex+"at"+u,b=aa({color:v,type:"item",renderMode:n,markerId:_});l[_]=v,++u;var S=h.getName(t),M=this.name;Oi(this)||(M=""),M=M?ia(M)+(e?": ":r):"";var I="string"==typeof b?b:b.content;return{html:e?I+M+x:M+I+(S?ia(S)+": "+x:x),markers:l}},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=dI.getColorFromPalette.call(this,t,e,i);return o||(o=n.getColorFromPalette(t,e,i)),o},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});h(YI,ZI),h(YI,dI);var qI=function(){this.group=new tb,this.uid=Ro("viewComponent")};qI.prototype={constructor:qI,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var KI=qI.prototype;KI.updateView=KI.updateLayout=KI.updateVisual=function(t,e,i,n){},ji(qI),$i(qI,{registerWhenExtend:!0});var $I=function(){var t=Bi();return function(e){var i=t(e),n=e.pipelineContext,o=i.large,a=i.progressiveRender,r=i.large=n.large,s=i.progressiveRender=n.progressiveRender;return!!(o^r||a^s)&&"reset"}},JI=Bi(),QI=$I();Ar.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Cr(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Cr(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var tT=Ar.prototype;tT.updateView=tT.updateLayout=tT.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},ji(Ar),$i(Ar,{registerWhenExtend:!0}),Ar.markUpdateMethod=function(t,e){JI(t).updateMethod=e};var eT={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},iT="\0__throttleOriginMethod",nT="\0__throttleRate",oT="\0__throttleType",aT={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),o=t.get(n)||t.getColorFromPalette(t.name,null,e.getSeriesCount());if(i.setVisual("color",o),!e.isSeriesFiltered(t)){"function"!=typeof o||o instanceof IM||i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e).get(n,!0);null!=i&&t.setItemVisual(e,"color",i)}:null}}}},rT={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},sT=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=rT.aria,o=0;o1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:r}),e.eachSeries(function(t,e){if(e1?"multiple":"single")+".";a=i(a=n(s?u+"withName":u+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var c=t.getData();window.data=c,c.count()>l?a+=i(n("data.partialData"),{displayCnt:l}):a+=n("data.allData");for(var d=[],p=0;pi.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},uT.getPipeline=function(t){return this._pipelineMap.get(t)},uT.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},uT.restorePipelines=function(t){var e=this,i=e._pipelineMap=R();t.eachSeries(function(t){var n=t.getProgressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),jr(e,t,t.dataTask)})},uT.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;d(this._allHandlers,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&zr(this,n,o,e,i),n.overallReset&&Br(this,n,o,e,i)},this)},uT.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,jr(this,e,o)},uT.performDataProcessorTasks=function(t,e){Rr(this,this._dataProcessorHandlers,t,e,{block:!0})},uT.performVisualTasks=function(t,e,i){Rr(this,this._visualHandlers,t,e,i)},uT.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},uT.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var hT=uT.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},cT=Ur(0);Er.wrapStageHandler=function(t,e){return x(t)&&(t={overallReset:t,seriesType:Yr(t)}),t.uid=Ro("stageHandler"),e&&(t.visualType=e),t};var dT,fT={},pT={};qr(fT,MI),qr(pT,Ga),fT.eachSeriesByType=fT.eachRawSeriesByType=function(t){dT=t},fT.eachComponent=function(t){"series"===t.mainType&&t.subType&&(dT=t.subType)};var gT=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],mT={color:gT,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],gT]},vT=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],yT={color:vT,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:vT[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:vT},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};yT.categoryAxis.splitLine.show=!1,lI.extend({type:"dataset",defaultOption:{seriesLayoutBy:_I,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){wa(this)}}),qI.extend({type:"dataset"});var xT=Pn.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,o=e.cy,a=e.rx,r=e.ry,s=a*i,l=r*i;t.moveTo(n-a,o),t.bezierCurveTo(n-a,o-l,n-s,o-r,n,o-r),t.bezierCurveTo(n+s,o-r,n+a,o-l,n+a,o),t.bezierCurveTo(n+a,o+l,n+s,o+r,n,o+r),t.bezierCurveTo(n-s,o+r,n-a,o+l,n-a,o),t.closePath()}}),_T=/[\s,]+/;$r.prototype.parse=function(t,e){e=e||{};var i=Kr(t);if(!i)throw new Error("Illegal svg");var n=new tb;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),es(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(o){var h=P(o).split(_T);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=a&&null!=r&&(u=as(l,a,r),!e.ignoreViewBox)){var c=n;(n=new tb).add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new yM({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:l,viewBoxTransform:u}},$r.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){if(r=bT[i]){var o=r.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else{var r=wT[i];r&&(n=r.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},$r.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new rM({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Qr(e,o),es(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var wT={g:function(t,e){var i=new tb;return Qr(e,i),es(t,i,this._defs),i},rect:function(t,e){var i=new yM;return Qr(e,i),es(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new sM;return Qr(e,i),es(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new _M;return Qr(e,i),es(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new xT;return Qr(e,i),es(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=ts(i));var n=new pM({shape:{points:i||[]}});return Qr(e,n),es(t,n,this._defs),n},polyline:function(t,e){var i=new Pn;Qr(e,i),es(t,i,this._defs);var n=t.getAttribute("points");return n&&(n=ts(n)),new gM({shape:{points:n||[]}})},image:function(t,e){var i=new fi;return Qr(e,i),es(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new tb;return Qr(e,r),es(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new tb;return Qr(e,r),es(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Rn(t.getAttribute("d")||"");return Qr(e,i),es(t,i,this._defs),i}},bT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new TM(e,i,n,o);return Jr(t,a),a},radialgradient:function(t){}},ST={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},MT=/url\(\s*#(.*?)\)/,IT=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,TT=/([^\s:;]+)\s*:\s*([^:;]+)/g,AT=R(),DT={registerMap:function(t,e,i){var n;return y(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),d(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,CT[e])(t)}),AT.set(t,n)},retrieveMap:function(t){return AT.get(t)}},CT={geoJSON:function(t){var e=t.source;t.geoJSON=_(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Kr(t.source)}},LT=k,kT=d,PT=x,NT=w,OT=lI.parseClassType,ET={zrender:"4.0.6"},RT=1e3,zT=1e3,BT=3e3,VT={PROCESSOR:{FILTER:RT,STATISTIC:5e3},VISUAL:{LAYOUT:zT,GLOBAL:2e3,CHART:BT,COMPONENT:4e3,BRUSH:5e3}},GT="__flagInMainProcess",FT="__optionUpdated",WT=/^[a-zA-Z0-9_]+$/;ls.prototype.on=ss("on"),ls.prototype.off=ss("off"),ls.prototype.one=ss("one"),h(ls,fw);var HT=us.prototype;HT._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[FT]){var e=this[FT].silent;this[GT]=!0,cs(this),ZT.update.call(this),this[GT]=!1,this[FT]=!1,gs.call(this,e),ms.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),fs(this,n),t.performVisualTasks(n),bs(this,this._model,0,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},HT.getDom=function(){return this._dom},HT.getZr=function(){return this._zr},HT.setOption=function(t,e,i){var n;if(NT(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[GT]=!0,!this._model||e){var o=new Wa(this._api),a=this._theme,r=this._model=new MI(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,qT),i?(this[FT]={silent:n},this[GT]=!1):(cs(this),ZT.update.call(this),this._zr.flush(),this[FT]=!1,this[GT]=!1,gs.call(this,n),ms.call(this,n))},HT.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},HT.getModel=function(){return this._model},HT.getOption=function(){return this._model&&this._model.getOption()},HT.getWidth=function(){return this._zr.getWidth()},HT.getHeight=function(){return this._zr.getHeight()},HT.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},HT.getRenderedCanvas=function(t){if(U_.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},HT.getSvgDataUrl=function(){if(U_.svgSupported){var t=this._zr;return d(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},HT.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;kT(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return kT(n,function(t){t.group.ignore=!1}),a},HT.getConnectedDataURL=function(t){if(U_.canvasSupported){var e=this.group,n=Math.min,o=Math.max;if(eA[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelRatio||1;d(tA,function(h,c){if(h.group===e){var d=h.getRenderedCanvas(i(t)),f=h.getDom().getBoundingClientRect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(a*=h),f=(l*=h)-(r*=h),p=iw();p.width=c,p.height=f;var g=Ii(p);return kT(u,function(t){var e=new fi({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});g.add(e)}),g.refreshImmediately(),p.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},HT.convertToPixel=v(hs,"convertToPixel"),HT.convertFromPixel=v(hs,"convertFromPixel"),HT.containPixel=function(t,e){var i;return t=Vi(this._model,t),d(t,function(t,n){n.indexOf("Models")>=0&&d(t,function(t){var o=t.coordinateSystem;if(o&&o.containPoint)i|=!!o.containPoint(e);else if("seriesModels"===n){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(i|=a.containPoint(e,t))}},this)},this),!!i},HT.getVisual=function(t,e){var i=(t=Vi(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},HT.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},HT.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var ZT={prepareAndUpdate:function(t){cs(this),ZT.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),fs(this,e),o.update(e,i),xs(e),a.performVisualTasks(e,t),_s(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(U_.canvasSupported)n.setBackgroundColor(r);else{var s=Gt(r);r=qt(s,"rgb"),0===s[3]&&(r="transparent")}Ss(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachComponent(function(a,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=R();e.eachSeries(function(o){var r=i._chartsMap[o.__viewId];if(r.updateTransform){var s=r.updateTransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:a}),bs(i,e,0,t,a),Ss(e,this._api)}},updateView:function(t){var e=this._model;e&&(Ar.markUpdateMethod(t,"updateView"),xs(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),_s(this,this._model,this._api,t),Ss(e,this._api))},updateVisual:function(t){ZT.update.call(this,t)},updateLayout:function(t){ZT.update.call(this,t)}};HT.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[GT]=!0,i&&cs(this),ZT.update.call(this),this[GT]=!1,gs.call(this,n),ms.call(this,n)}},HT.showLoading=function(t,e){if(NT(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),QT[t]){var i=QT[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},HT.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},HT.makeActionFromEvent=function(t){var e=a({},t);return e.type=jT[t.type],e},HT.dispatchAction=function(t,e){NT(e)||(e={silent:!!e}),XT[t.type]&&this._model&&(this[GT]?this._pendingActions.push(t):(ps.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&U_.browser.weChat&&this._throttledZrFlush(),gs.call(this,e.silent),ms.call(this,e.silent)))},HT.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},HT.on=ss("on"),HT.off=ss("off"),HT.one=ss("one");var UT=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];HT._initEvents=function(){kT(UT,function(t){var e=function(e){var i,n=this.getModel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataIndex){var r=o.dataModel||n.getSeriesByIndex(o.seriesIndex);i=r&&r.getDataParams(o.dataIndex,o.dataType,o)||{}}else o&&o.eventData&&(i=a({},o.eventData));if(i){var s=i.componentType,l=i.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=i.seriesIndex);var u=s&&null!=l&&n.getComponent(s,l),h=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:o,packedEvent:i,model:u,view:h},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),kT(jT,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},HT.isDisposed=function(){return this._disposed},HT.clear=function(){this.setOption({series:[]},!0)},HT.dispose=function(){if(!this._disposed){this._disposed=!0,Fi(this.getDom(),oA,"");var t=this._api,e=this._model;kT(this._componentsViews,function(i){i.dispose(e,t)}),kT(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete tA[this.id]}},h(us,fw),Ds.prototype={constructor:Ds,normalizeQuery:function(t){var e={},i={},n={};if(_(t)){var o=OT(t);e.mainType=o.main||null,e.subType=o.sub||null}else{var a=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};d(t,function(t,o){for(var s=!1,l=0;l0&&h===o.length-u.length){var c=o.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(o)&&(i[o]=t,s=!0),s||(n[o]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e,i){function n(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var o=this.eventInfo;if(!o)return!0;var a=o.targetEl,r=o.packedEvent,s=o.model,l=o.view;if(!s||!l)return!0;var u=e.cptQuery,h=e.dataQuery;return n(u,s,"mainType")&&n(u,s,"subType")&&n(u,s,"index","componentIndex")&&n(u,s,"name")&&n(u,s,"id")&&n(h,r,"name")&&n(h,r,"dataIndex")&&n(h,r,"dataType")&&(!l.filterForExposedEvent||l.filterForExposedEvent(t,e.otherQuery,a,r))},afterTrigger:function(){this.eventInfo=null}};var XT={},jT={},YT=[],qT=[],KT=[],$T=[],JT={},QT={},tA={},eA={},iA=new Date-0,nA=new Date-0,oA="_echarts_instance_",aA=Ls;Bs(2e3,aT),Ns(BI),Os(5e3,function(t){var e=R();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:t};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&o.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}}),e.each(ar)}),Gs("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new yM({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new SM({shape:{startAngle:-lT/2,endAngle:-lT/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),o=new yM({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*lT/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*lT/2}).delay(300).start("circularInOut");var a=new tb;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getWidth()/2,a=t.getHeight()/2;n.setShape({cx:e,cy:a});var r=n.shape.r;o.setShape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},a.resize(),a}),Es({type:"highlight",event:"highlight",update:"highlight"},B),Es({type:"downplay",event:"downplay",update:"downplay"},B),Ps("light",mT),Ps("dark",yT);var rA={};Xs.prototype={constructor:Xs,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(js(t,{},n,"_oldKeyGetter",this),js(e,i,o,"_newKeyGetter",this),a=0;ax[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},el(this)},yA._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},el(this)}},yA.count=function(){return this._count},yA.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){n=new e(i);for(o=0;o=0&&e=0&&ea&&(a=s)}return i=[o,a],this._extent[t]=i,i},yA.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},yA.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},yA.getCalculationInfo=function(t){return this._calculationInfo[t]},yA.setCalculationInfo=function(t,e){lA(t)?a(this._calculationInfo,t):this._calculationInfo[t]=e},yA.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},yA.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();r=0&&a<0)&&(o=u,a=l,n.length=0),n.push(r))}return n},yA.getRawIndex=nl,yA.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i=l&&w<=u||isNaN(w))&&(a[r++]=c),c++;h=!0}else if(2===n){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f=l&&w<=u||isNaN(w))&&(b>=y&&b<=x||isNaN(b))&&(a[r++]=c),c++}h=!0}}if(!h)if(1===n)for(m=0;m=l&&w<=u||isNaN(w))&&(a[r++]=M)}else for(m=0;mt[I][1])&&(S=!1)}S&&(a[r++]=this.getRawIndex(m))}return rb[1]&&(b[1]=w)}}}return o},yA.downSample=function(t,e,i,n){for(var o=sl(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new($s(this))(u),f=0,p=0;pu-p&&(s=u-p,r.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=ol,o},yA.getItemModel=function(t){var e=this.hostModel;return new No(this.getRawDataItem(t),e,e&&e.ecModel)},yA.diff=function(t){var e=this;return new Xs(t?t.getIndices():[],this.getIndices(),function(e){return al(t,e)},function(t){return al(e,t)})},yA.getVisual=function(t){var e=this._visual;return e&&e[t]},yA.setVisual=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},yA.setLayout=function(t,e){if(lA(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},yA.getLayout=function(t){return this._layout[t]},yA.getItemLayout=function(t){return this._itemLayouts[t]},yA.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?a(this._itemLayouts[t]||{},e):e},yA.clearItemLayouts=function(){this._itemLayouts.length=0},yA.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},yA.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,lA(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},yA.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var xA=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};yA.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(xA,e)),this._graphicEls[t]=e},yA.getItemGraphicEl=function(t){return this._graphicEls[t]},yA.eachItemGraphicEl=function(t,e){d(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},yA.cloneShallow=function(t){if(!t){var e=f(this.dimensions,this.getDimensionInfo,this);t=new vA(e,this.hostModel)}if(t._storage=this._storage,Qs(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ol:nl,t},yA.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(C(arguments)))})},yA.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],yA.CHANGABLE_METHODS=["filterSelf","selectRange"];var _A=function(t,e){return e=e||{},hl(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};xl.prototype.parse=function(t){return t},xl.prototype.getSetting=function(t){return this._setting[t]},xl.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},xl.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},xl.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},xl.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},xl.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},xl.prototype.getExtent=function(){return this._extent.slice()},xl.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},xl.prototype.isBlank=function(){return this._isBlank},xl.prototype.setBlank=function(t){this._isBlank=t},xl.prototype.getLabel=null,ji(xl),$i(xl,{registerWhenExtend:!0}),_l.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&f(i,bl);return new _l({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var wA=_l.prototype;wA.getOrdinal=function(t){return wl(this).get(t)},wA.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=wl(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var bA=xl.prototype,SA=xl.extend({type:"ordinal",init:function(t,e){t&&!y(t)||(t=new _l({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),bA.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return bA.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(bA.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:B,niceExtent:B});SA.create=function(){return new SA};var MA=Go,IA=Go,TA=xl.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),TA.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ml(t)},getTicks:function(){return Al(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Ho(t)||0:"auto"===i&&(i=this._intervalPrecision),t=IA(t,i,!0),ta(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=Sl(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=IA(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=IA(Math.ceil(e[1]/o)*o))}});TA.create=function(){return new TA};var AA="__ec_stack_",DA="undefined"!=typeof Float32Array?Float32Array:Array,CA={seriesType:"bar",plan:$I(),reset:function(t){if(Rl(t)&&zl(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=i.getOtherAxis(n),a=e.mapDimension(o.dim),r=e.mapDimension(n.dim),s=o.isHorizontal(),l=s?0:1,u=Ol(Pl([t]),n,t).width;return u>.5||(u=.5),{progress:function(t,e){for(var n,h=new DA(2*t.count),c=[],d=[],f=0;null!=(n=t.next());)d[l]=e.get(a,n),d[1-l]=e.get(r,n),c=i.dataToPoint(d,null,c),h[f++]=c[0],h[f++]=c[1];e.setLayout({largePoints:h,barWidth:u,valueAxisStart:Bl(0,o),valueAxisHorizontal:s})}}}}},LA=TA.prototype,kA=Math.ceil,PA=Math.floor,NA=function(t,e,i,n){for(;i>>1;t[o][1]i&&(a=i);var r=EA.length,s=NA(EA,a,0,r),l=EA[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=$o(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(kA((n[0]-h)/u)*u+h),Math.round(PA((n[1]-h)/u)*u+h)];Tl(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yo(t)}});d(["contain","normalize"],function(t){OA.prototype[t]=function(e){return LA[t].call(this,this.parse(e))}});var EA=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",864e5],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];OA.create=function(t){return new OA({useUTC:t.ecModel.get("useUTC")})};var RA=xl.prototype,zA=TA.prototype,BA=Ho,VA=Go,GA=Math.floor,FA=Math.ceil,WA=Math.pow,HA=Math.log,ZA=xl.extend({type:"log",base:10,$constructor:function(){xl.apply(this,arguments),this._originalScale=new TA},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return f(zA.getTicks.call(this),function(n){var o=Go(WA(this.base,n));return o=n===e[0]&&t.__fixMin?Vl(o,i[0]):o,o=n===e[1]&&t.__fixMax?Vl(o,i[1]):o},this)},getLabel:zA.getLabel,scale:function(t){return t=RA.scale.call(this,t),WA(this.base,t)},setExtent:function(t,e){var i=this.base;t=HA(t)/HA(i),e=HA(e)/HA(i),zA.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=RA.getExtent.call(this);e[0]=WA(t,e[0]),e[1]=WA(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Vl(e[0],n[0])),i.__fixMax&&(e[1]=Vl(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=HA(t[0])/HA(e),t[1]=HA(t[1])/HA(e),RA.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=qo(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Go(FA(e[0]/n)*n),Go(GA(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){zA.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});d(["contain","normalize"],function(t){ZA.prototype[t]=function(e){return e=HA(e)/HA(this.base),RA[t].call(this,e)}}),ZA.create=function(){return new ZA};var UA={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!I(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:B,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},XA=Un({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),jA=Un({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),YA=Un({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),qA=Un({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),KA={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},$A={};d({line:_M,rect:yM,roundRect:yM,square:yM,circle:sM,diamond:jA,pin:YA,arrow:qA,triangle:XA},function(t,e){$A[e]=new t});var JA=Un({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,o=$A[n];"none"!==e.symbolType&&(o||(o=$A[n="rect"]),KA[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i))}}),QA={isDimensionStacked:pl,enableDataStack:fl,getStackedDimension:gl},tD=(Object.freeze||Object)({createList:function(t){return ml(t.getSource(),t)},getLayoutRect:ca,dataStack:QA,createScale:function(t,e){var i=e;No.isInstance(e)||h(i=new No(e),UA);var n=Hl(i);return n.setExtent(t[0],t[1]),Wl(n,i),n},mixinAxisModelCommonMethods:function(t){h(t,UA)},completeDimensions:hl,createDimensions:_A,createSymbol:Jl}),eD=1e-8;eu.prototype={constructor:eu,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new eu(e.name,o,e.cp);return a.properties=e,a})},nD=Bi(),oD=[0,1],aD=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};aD.prototype={constructor:aD,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Zo(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count()),Bo(t,oD,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&yu(i=i.slice(),n.count());var o=Bo(t,i,oD,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=au(this,e),n=f(i.ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return xu(this,n,i.tickCategoryInterval,o,t.clamp),n},getViewLabels:function(){return ou(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return pu(this)}};var rD=iD,sD={};d(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){sD[t]=aw[t]});var lD={};d(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){lD[t]=zM[t]}),YI.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var uD=wu.prototype,hD=wu.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};uD._createSymbol=function(t,e,i,n,o){this.removeAll();var a=Jl(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:bu(n)}),a.drift=Su,this._symbolType=t,this.add(a)},uD.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},uD.getSymbolPath=function(){return this.childAt(0)},uD.getScale=function(){return this.childAt(0).scale},uD.highlight=function(){this.childAt(0).trigger("emphasis")},uD.downplay=function(){this.childAt(0).trigger("normal")},uD.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},uD.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},uD.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=hD(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else(l=this.childAt(0)).silent=!1,Io(l,{scale:bu(a)},o,e);if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),To(l,h,o,e)}this._seriesModel=o};var cD=["itemStyle"],dD=["emphasis","itemStyle"],fD=["label"],pD=["emphasis","label"];uD._updateCommon=function(t,e,i,n){var o=this.childAt(0),r=t.hostModel,s=t.getItemVisual(e,"color");"image"!==o.type&&o.useStyle({strokeNoScale:!0});var l=n&&n.itemStyle,u=n&&n.hoverItemStyle,h=n&&n.symbolRotate,c=n&&n.symbolOffset,d=n&&n.labelModel,f=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,g=n&&n.cursorStyle;if(!n||t.hasItemOption){var m=n&&n.itemModel?n.itemModel:t.getItemModel(e);l=m.getModel(cD).getItemStyle(["color"]),u=m.getModel(dD).getItemStyle(),h=m.getShallow("symbolRotate"),c=m.getShallow("symbolOffset"),d=m.getModel(fD),f=m.getModel(pD),p=m.getShallow("hoverAnimation"),g=m.getShallow("cursor")}else u=a({},u);var v=o.style;o.attr("rotation",(h||0)*Math.PI/180||0),c&&o.attr("position",[Vo(c[0],i[0]),Vo(c[1],i[1])]),g&&o.attr("cursor",g),o.setColor(s,n&&n.symbolInnerColor),o.setStyle(l);var y=t.getItemVisual(e,"opacity");null!=y&&(v.opacity=y);var x=t.getItemVisual(e,"liftZ"),_=o.__z2Origin;null!=x?null==_&&(o.__z2Origin=o.z2,o.z2+=x):null!=_&&(o.z2=_,o.__z2Origin=null);var w=n&&n.useNameLabel;go(v,u,d,f,{labelFetcher:r,labelDataIndex:e,defaultText:function(e,i){return w?t.getName(e):_u(t,e)},isRectText:!0,autoColor:s}),o.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.hoverStyle=u,fo(o),o.__symbolOriginalScale=bu(i),p&&r.isAnimationEnabled()&&o.on("mouseover",Mu).on("mouseout",Iu).on("emphasis",Tu).on("normal",Au)},uD.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,!(e&&e.keepLabel)&&(i.style.text=null),Io(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},u(wu,tb);var gD=Du.prototype;gD.updateData=function(t,e){e=Lu(e);var i=this.group,n=t.hostModel,o=this._data,a=this._symbolCtor,r=ku(t);o||i.removeAll(),t.diff(o).add(function(n){var o=t.getItemLayout(n);if(Cu(t,o,n,e)){var s=new a(t,n,r);s.attr("position",o),t.setItemGraphicEl(n,s),i.add(s)}}).update(function(s,l){var u=o.getItemGraphicEl(l),h=t.getItemLayout(s);Cu(t,h,s,e)?(u?(u.updateData(t,s,r),Io(u,{position:h},n)):(u=new a(t,s)).attr("position",h),i.add(u),t.setItemGraphicEl(s,u)):i.remove(u)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&e.fadeOut(function(){i.remove(e)})}).execute(),this._data=t},gD.isPersistent=function(){return!0},gD.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl(function(e,i){var n=t.getItemLayout(i);e.attr("position",n)})},gD.incrementalPrepareUpdate=function(t){this._seriesScope=ku(t),this._data=null,this.group.removeAll()},gD.incrementalUpdate=function(t,e,i){i=Lu(i);for(var n=t.start;n0&&Ru(i[o-1]);o--);for(;n0&&Ru(i[a-1]);a--);for(;o=0){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new wu(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Ar.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=zi(o,n);if(null!=a&&a>=0){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else Ar.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new MD({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new ID({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=mD(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Yu(u.current,i,o),c=Yu(u.stackedOnCurrent,i,o),d=Yu(u.next,i,o),f=Yu(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,Io(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),Io(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},u(kD,aD);var PD={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},ND={};ND.categoryAxis=n({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},PD),ND.valueAxis=n({boundaryGap:[0,0],splitNumber:5},PD),ND.timeAxis=r({scale:!0,min:"dataMin",max:"dataMax"},ND.valueAxis),ND.logAxis=r({scale:!0,logBase:10},ND.valueAxis);var OD=["value","category","time","log"],ED=function(t,e,i,a){d(OD,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,o){var a=this.layoutMode,s=a?ga(e):{};n(e,o.getTheme().get(r+"Axis")),n(e,this.getDefaultOption()),e.type=i(t,e),a&&pa(e,s,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=_l.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},ND[r+"Axis"],a],!0)})}),lI.registerSubTypeDefaulter(t+"Axis",v(i,t))},RD=lI.extend({type:"cartesian2dAxis",axis:null,init:function(){RD.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){RD.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){RD.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});n(RD.prototype,UA);var zD={offset:0};ED("x",RD,th,zD),ED("y",RD,th,zD),lI.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var BD=ih.prototype;BD.type="grid",BD.axisPointerEnabled=!0,BD.getRect=function(){return this._rect},BD.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),d(i.x,function(t){Wl(t.scale,t.model)}),d(i.y,function(t){Wl(t.scale,t.model)});var n={};d(i.x,function(t){nh(i,"y",t,n)}),d(i.y,function(t){nh(i,"x",t,n)}),this.resize(this.model,e)},BD.resize=function(t,e,i){function n(){d(a,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),ah(t,e?o.x:o.y)})}var o=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;n(),!i&&t.get("containLabel")&&(d(a,function(t){if(!t.model.get("axisLabel.inside")){var e=jl(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},BD.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},BD.getAxes=function(){return this._axesList.slice()},BD.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}w(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;nu[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,ph(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*GD/180);var f;ph(o)?n=HD(t.rotation,null!=d?d:t.rotation,r):(n=uh(t,o,d||0,u),null!=(f=t.axisNameAvailableWidth)&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=T(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?tI(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,w={componentType:_,name:i,$vars:["name"]};w[_+"Index"]=e.componentIndex;var b=new rM({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:hh(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterParams:w},x):null});mo(b.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=lh(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},HD=FD.innerTextLayout=function(t,e,i){var n,o,a=Xo(e-t);return jo(a)?(o=i>0?"top":"bottom",n="center"):jo(a-GD)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:o}},ZD=d,UD=v,XD=Ws({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Sh(t),XD.superApply(this,"render",arguments),Dh(this,t,0,i,0,!0)},updateAxisPointer:function(t,e,i,n,o){Dh(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),XD.superApply(this,"remove",arguments)},dispose:function(t,e){Ch(this,e),XD.superApply(this,"dispose",arguments)}}),jD=[];XD.registerAxisPointerClass=function(t,e){jD[t]=e},XD.getAxisPointerClass=function(t){return t&&jD[t]};var YD=["axisLine","axisTickLabel","axisName"],qD=["splitArea","splitLine"],KD=XD.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new tb,this.group.add(this._axisGroup),t.get("show")){var a=t.getCoordSysModel(),r=Lh(a,t),s=new FD(t,r);d(YD,s.add,s),this._axisGroup.add(s.getGroup()),d(qD,function(e){t.get(e+".show")&&this["_"+e](t,a)},this),Lo(o,this._axisGroup,t),KD.superCall(this,"render",t,e,i,n)}},remove:function(){this._splitAreaColors=null},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=y(a)?a:[a];for(var s=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=o.getLineStyle(),p=0;p1){var c;"string"==typeof o?c=DD[o]:"function"==typeof o&&(c=o),c&&t.setData(n.downSample(n.mapDimension(s.dim),1/h,c,CD))}}}}}("line"));var $D=YI.extend({type:"series.__base_bar__",getInitialData:function(t,e){return ml(this.getSource(),this)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});$D.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t}});var JD=Qb([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),QD={getBarItemStyle:function(t){var e=JD(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},tC=["itemStyle","barBorderWidth"];a(No.prototype,QD),Zs({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t,e,i){var n,o=this.group,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isAnimationEnabled()?t:null;a.diff(r).add(function(e){if(a.hasValue(e)){var i=a.getItemModel(e),r=iC[s.type](a,e,i),l=eC[s.type](a,e,i,r,n,u);a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,i,r,t,n,"polar"===s.type)}}).update(function(e,i){var l=r.getItemGraphicEl(i);if(a.hasValue(e)){var h=a.getItemModel(e),c=iC[s.type](a,e,h);l?Io(l,{shape:c},u,e):l=eC[s.type](a,e,h,c,n,u,!0),a.setItemGraphicEl(e,l),o.add(l),Eh(l,a,e,h,c,t,n,"polar"===s.type)}else o.remove(l)}).remove(function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&Nh(t,u,e):e&&Oh(t,u,e)}).execute(),this._data=a},_renderLarge:function(t,e,i){this._clear(),zh(t,this.group)},_incrementalRenderLarge:function(t,e){zh(e,this.group,!0)},dispose:B,remove:function(t){this._clear(t)},_clear:function(t){var e=this.group,i=this._data;t&&t.get("animation")&&i&&!this._isLargeDraw?i.eachItemGraphicEl(function(e){"sector"===e.type?Oh(e.dataIndex,t,e):Nh(e.dataIndex,t,e)}):e.removeAll(),this._data=null}});var eC={cartesian2d:function(t,e,i,n,o,r,s){var l=new yM({shape:a({},n)});if(r){var u=l.shape,h=o?"height":"width",c={};u[h]=0,c[h]=n[h],zM[s?"updateProps":"initProps"](l,{shape:c},r,e)}return l},polar:function(t,e,i,n,o,a,s){var l=n.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}},nC=Pn.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__valueIdx,a=0;a0&&"scale"!==u){var d=o.getItemLayout(0),f=Math.max(i.getWidth(),i.getHeight())/2,p=m(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,f,d.startAngle,d.clockwise,p,t))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r){var s=new hM({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return To(s,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var lC=function(t,e){d(e,function(e){e.update="updateView",Es(e,function(i,n){var o={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);o[i]=t.isSelected(i)||!1})}),{name:i.name,selected:o}})})},uC=function(t){return{getTargetSeries:function(e){var i={},n=R();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t,e){var i=t.getRawData(),n={},o=t.getData();o.each(function(t){var e=o.getRawIndex(t);n[e]=t}),i.each(function(e){var a=n[e],r=null!=a&&o.getItemVisual(a,"color",!0);if(r)i.setItemVisual(e,"color",r);else{var s=i.getItemModel(e).get("itemStyle.color")||t.getColorFromPalette(i.getName(e)||e+"",t.__paletteScope,i.count());i.setItemVisual(e,"color",s),null!=a&&o.setItemVisual(a,"color",s)}})}}},hC=function(t,e,i,n){var o,a,r=t.getData(),s=[],l=!1;r.each(function(i){var n,u,h,c,d=r.getItemLayout(i),f=r.getItemModel(i),p=f.getModel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getModel("labelLine"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),w=Math.sin(x);o=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,u=d.cy,c="center";else{var S=(b?(d.r+d.r0)/2*_:d.r*_)+o,M=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(n=S+3*_,u=M+3*w,!b){var I=S+_*(v+e-d.r),T=M+w*(v+e-d.r),A=I+(_<0?-1:1)*y,D=T;n=A+(_<0?-5:5),u=D,h=[[S,M],[I,T],[A,D]]}c=b?"center":_>0?"left":"right"}var C=p.getFont(),L=p.get("rotate")?_<0?-x+Math.PI:-x:0,k=ke(t.getFormattedLabel(i,"normal")||r.getName(i),C,c,"top");l=!!L,d.label={x:n,y:u,position:g,height:k.height,len:v,len2:y,linePoints:h,textAlign:c,verticalAlign:"middle",rotation:L,inside:b},b||s.push(d.label)}),!l&&t.get("avoidLabelOverlap")&&Hh(s,o,a,e,i,n)},cC=2*Math.PI,dC=Math.PI/180,fC=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+r)return s}return-1}}),gC=Uh.prototype;gC.isPersistent=function(){return!this._incremental},gC.updateData=function(t){this.group.removeAll();var e=new pC({rectHover:!0,cursor:"default"});e.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},gC.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},gC.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},gC.incrementalUpdate=function(t,e){var i;this._incremental?(i=new pC,this._incremental.addDisplayable(i,!0)):((i=new pC({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!!this._incremental)},gC._setCommon=function(t,e,i){var n=e.hostModel,o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.symbolProxy=Jl(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(n.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var r=e.getVisual("color");r&&t.setColor(r),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>=0&&(t.dataIndex=i+(t.startIndex||0))}))},gC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},gC._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Zs({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var o=AD().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new Uh:new Du,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Bs(TD("scatter","circle")),zs(AD("scatter")),u(Xh,aD),jh.prototype.getIndicatorAxes=function(){return this._indicatorAxes},jh.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},jh.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},jh.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;ln[0]&&isFinite(c)&&isFinite(n[0]))}else{r.getTicks().length-1>a&&(u=i(u));var d=Math.round((n[0]+n[1])/2/u)*u,f=Math.round(a/2);r.setExtent(Go(d-f*u),Go(d+(a-f)*u)),r.setInterval(u)}})},jh.dimensions=[],jh.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var o=new jh(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Fa.register("radar",jh);var mC=ND.valueAxis,vC=(Fs({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),o=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisLabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=h;if(null!=f.color&&(m=r({color:f.color},h)),f=n(i(f),{boundaryGap:t,splitNumber:e,scale:o,axisLine:s,axisTick:l,axisLabel:u,name:f.text,nameLocation:"end",nameGap:p,nameTextStyle:m,triggerEvent:g},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new No(f,null,this.ecModel),UA);return y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this.getIndicatorModels=function(){return m}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:n({lineStyle:{color:"#bbb"}},mC.axisLine),axisLabel:Yh(mC.axisLabel,!1),axisTick:Yh(mC.axisTick,!1),splitLine:Yh(mC.splitLine,!0),splitArea:Yh(mC.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Ws({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;d(f(e.getIndicatorAxes(),function(t){return new FD(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){d(vC,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var o=t.get("shape"),a=t.getModel("splitLine"),s=t.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),h=a.get("show"),c=s.get("show"),p=l.get("color"),g=u.get("color");p=y(p)?p:[p],g=y(g)?g:[g];var m=[],v=[];if("circle"===o)for(var x=n[0].getTicksCoords(),_=i.cx,w=i.cy,b=0;b"+f(i,function(i,n){var o=e.get(e.mapDimension(i.dim),t);return ia(i.name+" : "+o)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Zs({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=qh(t.getItemVisual(e,"symbolSize")),a=Jl(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeAll();for(var l=0;l"+ia(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),aC);var EC="\0_ec_interaction_mutex";Es({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),h(oc,fw);var RC={axisPointer:1,tooltip:1,brush:1};xc.prototype={constructor:xc,draw:function(t,e,i,n,o){var a="geo"===t.mainType,r=t.getData&&t.getData();a&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l=this._regionsGroup,u=this.group,h=s.scale,c={position:s.position,scale:h};!l.childAt(0)||o?u.attr(c):Io(u,c,t),l.removeAll();var f=["itemStyle"],p=["emphasis","itemStyle"],g=["label"],m=["emphasis","label"],v=R();d(s.regions,function(e){var i=v.get(e.name)||v.set(e.name,new tb),n=new MM({shape:{paths:[]}});i.add(n);var o,s=(C=t.getRegionModel(e.name)||t).getModel(f),u=C.getModel(p),c=mc(s),y=mc(u),x=C.getModel(g),_=C.getModel(m);if(r){o=r.indexOfName(e.name);var w=r.getItemVisual(o,"color",!0);w&&(c.fill=w)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new pM({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new pM({shape:{points:t.interiors[e]}}))}}),n.setStyle(c),n.style.strokeNoScale=!0,n.culling=!0;var b=x.get("show"),S=_.get("show"),M=r&&isNaN(r.get(r.mapDimension("value"),o)),I=r&&r.getItemLayout(o);if(a||M&&(b||S)||I&&I.showLabel){var T,A=a?e.name:o;(!r||o>=0)&&(T=t);var D=new rM({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});go(D.style,D.hoverStyle={},x,_,{labelFetcher:T,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(D)}if(r)r.setItemGraphicEl(o,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),fo(i,y,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)}),this._updateController(t,e,i),vc(this,t,l,i,n),yc(t,l)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&OC.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&d(OC.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var o=t.coordinateSystem,r=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=o.getZoom(),r.enable(t.get("roam")||!1);var l=t.mainType;r.off("pan").on("pan",function(t){this._mouseDownFlag=!1,fc(s,t.dx,t.dy),i.dispatchAction(a(n(),{dx:t.dx,dy:t.dy}))},this),r.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,pc(s,t.scale,t.originX,t.originY),i.dispatchAction(a(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),r.setPointerChecker(function(e,n,a){return o.getViewRectAfterRoam().contain(n,a)&&!gc(e,i,t)})}};var zC="__seriesMapHighDown",BC="__seriesMapCallKey";Zs({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new xc(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,o=this.group;n.each(n.mapDimension("value"),function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var s=r.point,l=r.offset,u=new sM({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:NM+1)});if(!l){var h=t.mainSeries.getData(),c=n.getName(i),d=h.indexOfName(c),f=n.getItemModel(i),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),y=A(t.getFormattedLabel(d,"normal"),c),x=A(t.getFormattedLabel(d,"emphasis"),y),_=m[zC],w=Math.random();if(!_){_=m[zC]={};var b=v(_c,!0),S=v(_c,!1);m.on("mouseover",b).on("mouseout",S).on("emphasis",b).on("normal",S)}m[BC]=w,a(_,{recordVersion:w,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:x,normalText:y}),wc(_,!1)}o.add(u)}}})}}),Es({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var o=bc(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(o.center),e.setZoom&&e.setZoom(o.zoom),"series"===i&&d(e.seriesGroup,function(t){t.setCenter(o.center),t.setZoom(o.zoom)})}})});var VC=Q;h(Sc,Tw),Mc.prototype={constructor:Mc,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new de(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new de(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new de(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=Q([],n,t),i=Q([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),wt(this.transform||(this.transform=[]),e.transform||xt()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Tt(this.invTransform,this.transform),this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?VC(i,t,n):G(i,t)},pointToData:function(t){var e=this.invTransform;return e?VC([],t,e):[t[0],t[1]]},convertToPixel:v(Ic,"dataToPoint"),convertFromPixel:v(Ic,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},h(Mc,Tw),Tc.prototype={constructor:Tc,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;ie&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Vc.prototype={constructor:Vc,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;ia&&(a=t.depth)});var r=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return ia(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Zs({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new tb,this._controller=new oc(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i,n){var o=t.getData(),a=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(t),this._updateController(t,e,i);var l=this._data,u={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(e){td(o,e)&&id(o,e,null,r,t,u)}).update(function(e,i){var n=l.getItemGraphicEl(i);td(o,e)?id(o,e,n,r,t,u):n&&nd(l,i,n,r,t,u)}).remove(function(e){var i=l.getItemGraphicEl(e);i&&nd(l,e,i,r,t,u)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=o},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],o=[];fn(i,n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=t.coordinateSystem=new Mc;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(t,e,i){var n=this._controller,o=this._controllerHost,a=this.group;n.setPointerChecker(function(e,n,o){var r=a.getBoundingRect();return r.applyTransform(a.transform),r.contain(n,o)&&!gc(e,i,t)}),n.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){fc(o,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){pc(o,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Es({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand})}),Es({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=bc(e.coordinateSystem,t);e.setCenter&&e.setCenter(i.center),e.setZoom&&e.setZoom(i.zoom)})});Bs(TD("tree","circle")),zs(function(t,e){t.eachSeriesByType("tree",function(t){sd(t,e)})}),YI.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};dd(i);var n=t.levels||[];n=t.levels=fd(n,e);var o={};return o.levels=n,Vc.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=ta(y(i)?i[0]:i);return ia(e.getName(t)+": "+n)},getDataParams:function(t){var e=YI.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=cd(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},a(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=R(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var UC=5;pd.prototype={constructor:pd,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),da(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a=0,s=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=ha(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-s,g=s,m=null);var y=new pM({shape:{points:gd(a,0,g,l,d===c.length-1,0===d)},style:r(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:v(o,p)});this.group.add(y),md(y,t,p),a+=g+8}},remove:function(){this.group.removeAll()}};var XC=m,jC=tb,YC=yM,qC=d,KC=["label"],$C=["emphasis","label"],JC=["upperLabel"],QC=["emphasis","upperLabel"],tL=10,eL=1,iL=2,nL=Qb([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),oL=function(t){var e=nL(t);return e.stroke=e.fill=e.lineWidth=null,e};Zs({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=ld(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,u=this._storage,h="treemapRootToNode"===a&&o&&u?{rootNodeGroup:u.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(r),d=this._doRender(c,t,h);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?d.renderFinally():this._doAnimation(c,d,t,h),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new jC,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,c=h(l,u,i,a);c&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],c,o,a+1)}o?(e=t,qC(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Xs(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},s={nodeGroup:[],background:[],content:[]},l=this._storage,u=[],h=v(yd,e,s,l,i,r,u);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodeGroup:[],background:[],content:[]};return t&&qC(t,function(t,i){var n=e[i];qC(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}(l);return this._oldTree=o,this._storage=s,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){qC(c,function(t){qC(t,function(t){t.parent&&t.parent.remove(t)})}),qC(u,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationDurationUpdate"),r=i.get("animationEasing"),s=vd();qC(e.willDeleteEls,function(t,e){qC(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drillDown"===n.direction)a=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,h=l.__tmNodeHeight/2),a="nodeGroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),qC(this._storage,function(t,i){qC(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,r))})},this),this._state="animating",s.done(XC(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new oc(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",XC(this._onPan,this)),e.on("zoom",XC(this._onZoom,this)));var i=new de(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new de(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=xt();St(s,s,[-e,-i]),It(s,s,[t.scale,t.scale]),St(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new pd(this.group))).render(t,e,i.node,XC(function(e){"animating"!==this._state&&(hd(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(n){var o=this._storage.background[n.getRawIndex()];if(o){var a=o.transformCoordToLocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}},this),i}});for(var aL=["treemapZoomToNode","treemapRender","treemapMove"],rL=0;rL=0&&t.call(e,i[o],o)},TL.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataIndex>=0&&i[o].node2.dataIndex>=0&&t.call(e,i[o],o)},TL.breadthFirstTraverse=function(t,e,i,n){if(Jd.isInstance(e)||(e=this._nodesMap[$d(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a=0&&i.node2.dataIndex>=0});for(var o=0,a=n.length;o=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};h(Jd,AL("hostGraph","data")),h(Qd,AL("hostGraph","edgeData")),IL.Node=Jd,IL.Edge=Qd,Yi(Jd),Yi(Qd);var DL=function(t,e,i,n,o){for(var a=new IL(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=ml(t,i);else{var m=Fa.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];l(v,"value")<0&&v.concat(["value"]);var y=_A(t,{coordDimensions:v});(p=new vA(y,i)).initData(t)}var x=new vA(["value"],i);return x.initData(u,s),o&&o(p,x),kc({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},CL=Hs({type:"series.graph",init:function(t){CL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){CL.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){CL.superApply(this,"mergeDefaultAndTheme",arguments),Ci(t,["edgeLabel"],["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return DL(n,i,this,!0,function(t,i){function n(t){return(t=this.parsePath(t))&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var a=o.getModel("edgeLabel"),r=new No({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new No({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=ia(l.join(" > ")),o.value&&(l+=" : "+ia(o.value)),l}return CL.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new vA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return CL.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),LL=_M.prototype,kL=bM.prototype,PL=Un({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(tf(e)?LL:kL).buildPath(t,e)},pointAt:function(t){return tf(this.shape)?LL.pointAt.call(this,t):kL.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=tf(e)?[e.x2-e.x1,e.y2-e.y1]:kL.tangentAt.call(this,t);return q(i,i)}}),NL=["fromSymbol","toSymbol"],OL=rf.prototype;OL.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),h=U([],u,l);if(q(h,h),e&&(e.attr("position",l),c=r.tangentAt(0),e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",u);var c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*o;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-Math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||p,textAlign:n.__textAlign||f},position:d,scale:[o,o]})}}}},OL._createLine=function(t,e,i){var n=t.hostModel,o=of(t.getItemLayout(e));o.shape.percent=0,To(o,{shape:{percent:1}},n,e),this.add(o);var a=new rM({name:"label",lineLabelOriginalOpacity:1});this.add(a),d(NL,function(i){var n=nf(i,t,e);this.add(n),this[ef(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},OL.updateData=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=t.getItemLayout(e),r={shape:{}};af(r.shape,a),Io(o,r,n,e),d(NL,function(i){var n=t.getItemVisual(e,i),o=ef(i);if(this[o]!==n){this.remove(this.childOfName(i));var a=nf(i,t,e);this.add(a)}this[o]=n},this),this._updateCommonStl(t,e,i)},OL._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,s=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);a=h.getModel("lineStyle").getLineStyle(),s=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),f=D(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(r({strokeNoScale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverStyle=s,d(NL,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:f}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",null==(g=n.getFormattedLabel(e,"normal",t.dataType)))){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Go(x):x}var _=m?g:null,w=v?A(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,b=y.style;null==_&&null==w||(mo(y.style,l,{text:_},{autoColor:p}),y.__textAlign=b.textAlign,y.__verticalAlign=b.textVerticalAlign,y.__position=l.get("position")||"middle"),y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,fo(this)},OL.highlight=function(){this.trigger("emphasis")},OL.downplay=function(){this.trigger("normal")},OL.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},OL.setLinePoints=function(t){var e=this.childOfName("line");af(e.shape,t),e.dirty()},u(rf,tb);var EL=sf.prototype;EL.isPersistent=function(){return!0},EL.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var o=hf(t);t.diff(n).add(function(i){lf(e,t,i,o)}).update(function(i,a){uf(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},EL.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},EL.incrementalPrepareUpdate=function(t){this._seriesScope=hf(t),this._lineData=null,this.group.removeAll()},EL.incrementalUpdate=function(t,e){for(var i=t.start;i=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}}),YL=2*Math.PI,qL=(Ar.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=Sf(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,u=-t.get("endAngle")/180*Math.PI,h=(u-l)%YL,c=l,d=r.get("width"),f=0;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){var A=Math.cos(w),D=Math.sin(w),O=new _M({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getData(),f=d.mapDimension("value");d.diff(u).add(function(e){var i=new jL({shape:{angle:a}});To(i,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)}).update(function(e,i){var n=u.getItemGraphicEl(i);Io(n,{shape:{angle:Bo(d.get(f,e),h,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),a=i.getModel("pointer");t.setShape({x:o.cx,y:o.cy,width:Vo(a.get("width"),o.r),r:Vo(a.get("length"),o.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Bo(d.get(f,e),h,[0,1],!0))),fo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(Bo(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Vo(l[0],o.r),h=o.cy+Vo(l[1],o.r),c=Vo(a.get("width"),o.r),d=Vo(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Bo(p,[r,s],[0,1],!0));this.group.add(new rM({silent:!0,style:mo({},a,{x:u,y:h,text:Mf(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Hs({type:"series.funnel",init:function(t){qL.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){return oC(this,["value"])},_defaultLabelLine:function(t){Ci(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=qL.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),KL=If.prototype,$L=["itemStyle","opacity"];KL.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e),l=t.getItemModel(e).get($L);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:s.points}),n.setStyle({opacity:0}),To(n,{style:{opacity:l}},o,e)):Io(n,{style:{opacity:l},shape:{points:s.points}},o,e);var u=a.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(r({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),fo(this)},KL._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Io(i,{shape:{points:r.linePoints||r.linePoints}},o,e),Io(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine"),s=t.getItemVisual(e,"color");go(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},u(If,tb);Ar.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new If(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Bs(uC("funnel")),zs(function(t,e,i){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),o=t.get("sort"),a=Tf(t,e),r=Af(i,o),s=[Vo(t.get("minSize"),a.width),Vo(t.get("maxSize"),a.width)],l=i.getDataExtent(n),u=t.get("min"),h=t.get("max");null==u&&(u=Math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelAlign"),d=t.get("gap"),f=(a.height-d*(i.count()-1))/i.count(),p=a.y,g=function(t,e){var o,r=Bo(i.get(n,t)||0,[u,h],s,!0);switch(c){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]};"ascending"===o&&(f=-f,d=-d,p+=a.height,r=r.reverse());for(var m=0;ma&&(e[1-n]=e[n]+h.sign*a),e},tk=d,ek=Math.min,ik=Math.max,nk=Math.floor,ok=Math.ceil,ak=Go,rk=Math.PI;Nf.prototype={type:"parallel",constructor:Nf,_init:function(t,e,i){var n=t.dimensions,o=t.parallelAxisIndex;tk(n,function(t,i){var n=o[i],a=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new JL(t,Hl(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onBand=s&&a.get("boundaryGap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinateSystem=a.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();tk(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Wl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ca(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=Of(e.get("axisExpandWidth"),l),c=Of(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");f?(t=Of(f[1]-f[0],l),f[1]=f[0]+t):(t=Of(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||nk(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[nk(ak(f[0]/h,1))+1,ok(ak(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),o=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),tk(i,function(e,i){var a=(n.axisExpandable?Rf:Ef)(i,n),r={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:rk/2,vertical:0},l=[r[o].x+t.x,r[o].y+t.y],u=s[o],h=xt();Mt(h,h,u),St(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];d(a,function(e){r.push(t.mapDimension(e)),s.push(o.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;uo*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?QL(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[ik(0,a[1]*s/o-o/2)])[1]=ek(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},Fa.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",function(n,o){var a=new Nf(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinateSystem=a,a.model=n,i.push(a)}),t.eachSeries(function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}});var sk=lI.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Qb([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)Fo(e[n])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Ip(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};Ns(function(t){Cf(t),Lf(t)}),YI.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return Tp(i,this),ml(i,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,o){t===e&&n.push(i.getRawIndex(o))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var Dk=.3,Ck=(Ar.extend({type:"parallel",init:function(){this._dataGroup=new tb,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){var o=this._dataGroup,a=t.getData(),r=this._data,s=t.coordinateSystem,l=s.dimensions,u=kp(t);if(a.diff(r).add(function(t){Pp(Lp(a,o,t,l,s),a,t,u)}).update(function(e,i){var o=r.getItemGraphicEl(i),h=Cp(a,e,l,s);a.setItemGraphicEl(e,o),Io(o,{shape:{points:h}},n&&!1===n.animation?null:t,e),Pp(o,a,e,u)}).remove(function(t){var e=r.getItemGraphicEl(t);o.remove(e)}).execute(),!this._initialized){this._initialized=!0;var h=Dp(s,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(h)}this._data=a},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=kp(e),s=t.start;sn&&(n=e)}),d(e,function(e){var o=new hL({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",o);var a=e.getModel().get("itemStyle.color");null!=a&&e.setVisual("color",a)})}})});var Ok={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],f=[o,a],p=f[u].get("type"),g=f[1-u].get("type"),m=t.data;if(m&&n){var v=[];d(m,function(t,e){var i;t.value&&y(t.value)?(i=t.value.slice(),t.value.unshift(e)):y(t)?(i=t.slice(),t.unshift(e)):i=t,v.push(i)}),t.data=v}var x=this.defaultValueDimensions;return oC(this,{coordDimensions:[{name:h,type:qs(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:qs(g),dimsDef:x.slice()}],dimensionsCount:x.length+1})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};h(YI.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),Ok,!0);var Ek=["itemStyle"],Rk=["emphasis","itemStyle"],zk=(Ar.extend({type:"boxplot",render:function(t,e,i){var n=t.getData(),o=this.group,a=this._data;this._data||o.removeAll();var r="horizontal"===t.get("layout")?1:0;n.diff(a).add(function(t){if(n.hasValue(t)){var e=ig(n.getItemLayout(t),n,t,r,!0);n.setItemGraphicEl(t,e),o.add(e)}}).update(function(t,e){var i=a.getItemGraphicEl(e);if(n.hasValue(t)){var s=n.getItemLayout(t);i?ng(s,i,n,t):i=ig(s,n,t,r),o.add(i),n.setItemGraphicEl(t,i)}else o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&o.remove(e)}).execute(),this._data=n},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:B}),Pn.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n0?jk:Yk)}function n(t,e){return e.get(t>0?Uk:Xk)}var o=t.getData(),a=t.pipelineContext.large;if(o.setVisual({legendSymbol:"roundRect",colorP:i(1,t),colorN:i(-1,t),borderColorP:n(1,t),borderColorN:n(-1,t)}),!e.isSeriesFiltered(t))return!a&&{progress:function(t,e){for(var o;null!=(o=t.next());){var a=e.getItemModel(o),r=e.getItemLayout(o).sign;e.setItemVisual(o,{color:i(r,a),borderColor:n(r,a)})}}}}},Kk="undefined"!=typeof Float32Array?Float32Array:Array,$k={seriesType:"candlestick",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.getData(),n=pg(t,i),o=0,a=1,r=["x","y"],s=i.mapDimension(r[o]),l=i.mapDimension(r[a],!0),u=l[0],h=l[1],c=l[2],d=l[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==s||l.length<4))return{progress:t.pipelineContext.large?function(t,i){for(var n,r,l=new Kk(5*t.count),f=0,p=[],g=[];null!=(r=t.next());){var m=i.get(s,r),v=i.get(u,r),y=i.get(h,r),x=i.get(c,r),_=i.get(d,r);isNaN(m)||isNaN(x)||isNaN(_)?(l[f++]=NaN,f+=4):(l[f++]=fg(i,r,v,y,h),p[o]=m,p[a]=x,n=e.dataToPoint(p,null,g),l[f++]=n?n[0]:NaN,l[f++]=n?n[1]:NaN,p[a]=_,n=e.dataToPoint(p,null,g),l[f++]=n?n[1]:NaN)}i.setLayout("largePoints",l)}:function(t,i){function r(t,i){var n=[];return n[o]=i,n[a]=t,isNaN(i)||isNaN(t)?[NaN,NaN]:e.dataToPoint(n)}function l(t,e,i){var a=e.slice(),r=e.slice();a[o]=Jn(a[o]+n/2,1,!1),r[o]=Jn(r[o]-n/2,1,!0),i?t.push(a,r):t.push(r,a)}function f(t){return t[o]=Jn(t[o],1),t}for(var p;null!=(p=t.next());){var g=i.get(s,p),m=i.get(u,p),v=i.get(h,p),y=i.get(c,p),x=i.get(d,p),_=Math.min(m,v),w=Math.max(m,v),b=r(_,g),S=r(w,g),M=r(y,g),I=r(x,g),T=[];l(T,S,0),l(T,b,1),T.push(f(I),f(S),f(M),f(b)),i.setItemLayout(p,{sign:fg(i,p,m,v,h),initBaseline:m>v?S[a]:b[a],ends:T,brushRect:function(t,e,i){var s=r(t,i),l=r(e,i);return s[o]-=n/2,l[o]-=n/2,{x:s[0],y:s[1],width:a?n:l[0]-s[0],height:a?l[1]-s[1]:n}}(y,x,g)})}}}}};Ns(function(t){t&&y(t.series)&&d(t.series,function(t){w(t)&&"k"===t.type&&(t.type="candlestick")})}),Bs(qk),zs($k),YI.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return ml(this.getSource(),this)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var Jk=vg.prototype;Jk.stopEffectAnimation=function(){this.childAt(1).removeAll()},Jk.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=Jl(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}mg(n,t)},Jk.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),iP=xg.prototype;iP.createLine=function(t,e,i){return new rf(t,e,i)},iP._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Jl(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._updateEffectAnimation(t,i,e))},iP._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var o=this,a=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),u=T(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},iP.getLineLength=function(t){return uw(t.__p1,t.__cp1)+uw(t.__cp1,t.__p2)},iP.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},iP.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},iP.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=sn,s=ln;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-Math.atan2(u,l)-Math.PI/2,t.ignore=!1},iP.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},u(xg,tb);var nP=_g.prototype;nP._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new gM({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},nP.updateData=function(t,e,i){var n=t.hostModel;Io(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},nP._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),s=i&&i.lineStyle,l=i&&i.hoverLineStyle;i&&!t.hasItemOption||(s=o.getModel("lineStyle").getLineStyle(),l=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(r({strokeNoScale:!0,fill:"none",stroke:a},s)),n.hoverStyle=l,fo(this)},nP.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},u(_g,tb);var oP=wg.prototype;oP.createLine=function(t,e,i){return new _g(t,e,i)},oP.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;re);r++);r=Math.min(r-1,o-2)}J(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},u(wg,xg);var aP=Un({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r0){t.moveTo(i[r++],i[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r0)for(var l=n[r++],u=n[r++],h=1;h0){if(_n(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(yn(l,u,c,d))return a;a++}return-1}}),rP=bg.prototype;rP.isPersistent=function(){return!this._incremental},rP.updateData=function(t){this.group.removeAll();var e=new aP({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},rP.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new Zn({silent:!0})),this.group.add(this._incremental)):this._incremental=null},rP.incrementalUpdate=function(t,e){var i=new aP;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},rP.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},rP._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var o=e.getVisual("color");o&&t.setStyle("stroke",o),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},rP._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var sP={seriesType:"lines",plan:$I(),reset:function(t){var e=t.coordinateSystem,i=t.get("polyline"),n=t.pipelineContext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h0){var I=a(v)?s:l;v>0&&(v=v*S+b),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=iw()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Zs({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Ag(o)&&this._renderOnGeo(o,t,n,i)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var r,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");r=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f=t.getModel("itemStyle").getItemStyle(["color"]),p=t.getModel("emphasis.itemStyle").getItemStyle(),g=t.getModel("label"),m=t.getModel("emphasis.label"),v=l.type,y="cartesian2d"===v?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],x=i;x=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},Fa.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",function(n,o){var a=new $g(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinateSystem=a,i.push(a)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i},dimensions:$g.prototype.dimensions});var gP=["axisLine","axisTickLabel","axisName"],mP=XD.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var o=this.group;o.removeAll();var a=Jg(t),r=new FD(t,a);d(gP,r.add,r),o.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t),mP.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){gm(e.getZr(),"axisPointer"),IP.superApply(this._model,"remove",arguments)},dispose:function(t,e){gm("axisPointer",e),IP.superApply(this._model,"dispose",arguments)}}),TP=Bi(),AP=i,DP=m;(mm.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=v(vm,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new tb,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);wm(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=Mh(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=TP(t).pointerEl=new zM[o.type](AP(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=TP(t).labelEl=new yM(AP(e.label));t.add(o),xm(o,n)}},updatePointerEl:function(t,e,i){var n=TP(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=TP(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),xm(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,o=e.getModel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=Po(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){mw(t.event)},onmousedown:DP(this._onHandleDragMove,this,0,0),drift:DP(this._onHandleDragMove,this),ondragend:DP(this._onHandleDragEnd,this)}),i.add(n)),wm(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(o.getItemStyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),Nr(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){vm(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_m(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(_m(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(_m(n)),TP(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=mm,ji(mm);var CP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=km(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=bm(n),c=LP[s](a,u,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Lh(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=Lh(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=km(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalAlign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:d[l]}}}),LP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Pm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Pm(t))}}};XD.registerAxisPointerClass("CartesianAxisPointer",CP),Ns(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!y(e)&&(t.axisPointer.link=[e])}}),Os(VT.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=vh(t,e)}),Es({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,o=[t.x,t.y],a=t,r=t.dispatchAction||m(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){lm(o)&&(o=xP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=lm(o),u=a.axesInfo,h=s.axesInfo,c="leave"===n||lm(o),d={},f={},p={list:[],map:{}},g={showPointer:wP(em,f),showTooltip:wP(im,p)};_P(s.coordSysMap,function(t,e){var i=l||t.containPoint(o);_P(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,a=rm(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointToData(o)),null!=r&&Qg(t,r,g,!1,d)}})});var v={};return _P(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&_P(i.axesInfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,sm(e),sm(t)))),v[t.key]=a}})}),_P(v,function(t,e){Qg(h[e],t,g,!0,d)}),nm(f,h,d),om(p,o,t,r),am(h,0,i),d}});var kP=["x","y"],PP=["width","height"],NP=mm.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=Om(r,1-Nm(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=bm(n),c=OP[u](a,l,s,h);c.style=h,t.graphicKey=c.type,t.pointer=c}Am(e,t,Jg(i),i,n,o)},getHandleTransform:function(t,e,i){var n=Jg(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:Tm(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=Nm(o),s=Om(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=Om(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),OP={line:function(t,e,i,n){var o=Dm([e,i[0]],[e,i[1]],Nm(t));return Kn({shape:o,style:n}),{type:"Line",shape:o}},shadow:function(t,e,i,n){var o=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:Cm([e-o/2,i[0]],[o,a],Nm(t))}}};XD.registerAxisPointerClass("SingleAxisPointer",NP),Ws({type:"single"});var EP=YI.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){EP.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=[];Zi(t,function(t){return t[2]}).buckets.each(function(t,e){i.push({name:e,dataList:t})});for(var n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;lMath.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>Math.PI/2&&(x="right")):"right"===x&&(f=u.r-y,p>Math.PI/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),S=0;"radial"===b?(S=-p)<-Math.PI/2&&(S+=Math.PI):"tangential"===b?(S=Math.PI/2-p)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof b&&(S=b*Math.PI/180),d.attr("rotation",S)},VP._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onEmphasis(n)},r=function(){o.onNormal()};i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.onDownplay()}).on("highlight",function(){o.onHighlight()})},u(Vm,tb);Ar.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(i,n){if(c||!i||i.getValue()||(i=null),i!==l&&n!==l)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),s.setItemGraphicEl(i.dataIndex,n.piece)):a(n);else if(i){var o=new Vm(i,t,e);h.add(o),s.setItemGraphicEl(i.dataIndex,o)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}var r=this;this.seriesModel=t,this.api=i,this.ecModel=e;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),h=this.group,c=t.get("renderLabelForZeroData"),d=[];u.eachNode(function(t){d.push(t)});var f=this._oldChildren||[];if(function(t,e){function i(t){return t.getId()}function n(i,n){o(null==i?null:t[i],null==n?null:e[n])}0===t.length&&0===e.length||new Xs(e,t,i,i).add(n).update(n).remove(v(n,null)).execute()}(d,f),function(i,n){if(n.depth>0){r.virtualPiece?r.virtualPiece.updateData(!1,i,"normal",t,e):(r.virtualPiece=new Vm(i,t,e),h.add(r.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var o=function(t){r._rootToNode(n.parentNode)};n.piece._onclickEvent=o,r.virtualPiece.on("click",o)}else r.virtualPiece&&(h.remove(r.virtualPiece),r.virtualPiece=null)}(l,u),n&&n.highlight&&n.highlight.piece){var p=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(p)}else if(n&&n.unhighlight){var g=this.virtualPiece;!g&&l.children.length&&(g=l.children[0].piece),g&&g.onNormal()}this._initEvents(),this._oldChildren=d},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1;t.seriesModel.getViewRoot().eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var o=n.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(n);else if("link"===o){var a=n.getModel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var GP="sunburstRootToNode";Es({type:GP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[GP],e);if(n){var o=e.getViewRoot();o&&(t.direction=hd(o,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}})});var FP="sunburstHighlight";Es({type:FP,update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){var n=ld(t,[FP],e);n&&(t.highlight=n.node)})});Es({type:"sunburstUnhighlight",update:"updateView"},function(t,e){e.eachComponent({mainType:"series",subType:"sunburst",query:t},function(e,i){t.unhighlight=!0})});var WP=Math.PI/180;Bs(v(uC,"sunburst")),zs(v(function(t,e,i,n){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");y(n)||(n=[0,n]),y(e)||(e=[e,e]);var o=i.getWidth(),a=i.getHeight(),r=Math.min(o,a),s=Vo(e[0],o),l=Vo(e[1],a),u=Vo(n[0],r/2),h=Vo(n[1],r/2),c=-t.get("startAngle")*WP,f=t.get("minAngle")*WP,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&Zm(g,v);var x=0;d(g.children,function(t){!isNaN(t.getValue())&&x++});var _=g.getValue(),w=Math.PI/(_||x)*2,b=g.depth>0,S=g.height-(b?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;if(t!==p){var n=t.getValue(),o=0===_&&T?w:n*w;on[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.dataToRadius(n[0]),a=i.dataToAngle(n[1]),r=t.coordToPoint([o,a]);return r.push(o,a*Math.PI/180),r}),size:m(qm,t)}}},calendar:function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}}};YI.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0},getInitialData:function(t,e){return ml(this.getSource(),this)},getDataParams:function(t,e,i){var n=YI.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),Ar.extend({type:"custom",_data:null,render:function(t,e,i,n){var o=this._data,a=t.getData(),r=this.group,s=Qm(t,a,e,i);a.diff(o).add(function(e){ev(null,e,s(e,n),t,r,a)}).update(function(e,i){ev(o.getItemGraphicEl(i),e,s(e,n),t,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){for(var a=e.getData(),r=Qm(e,a,i,n),s=t.start;s=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Ws({type:"graphic",init:function(t,e){this._elMap=R(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;d(e,function(e){var o=e.$action,a=e.id,r=i.get(a),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=fv(e);o&&"merge"!==o?"replace"===o?(dv(r,i),cv(a,l,h,i)):"remove"===o&&dv(r,i):r?r.attr(h):cv(a,l,h,i);var c=i.get(a);c&&(c.__ecGraphicWidth=e.width,c.__ecGraphicHeight=e.height,yv(c,t))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;da(s,r,l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0},null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){dv(e,t)}),this._elMap=R()},dispose:function(){this._clear()}});var KP=Fs({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){KP.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}});Es("legendToggleSelect","legendselectchanged",v(xv,"toggleSelected")),Es("legendSelect","legendselected",v(xv,"select")),Es("legendUnSelect","legendunselected",v(xv,"unSelect"));var $P=v,JP=d,QP=tb,tN=Ws({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new QP),this._backgroundEl,this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(o,t,e,i);var a=t.getBoxLayoutParams(),s={width:i.getWidth(),height:i.getHeight()},l=t.get("padding"),u=ca(a,s,l),h=this.layoutInner(t,o,u,n),c=ca(r({width:h.width,height:h.height},a),s,l);this.group.attr("position",[c.x-h.x,c.y-h.y]),this.group.add(this._backgroundEl=wv(h,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var o=this.getContentGroup(),a=R(),r=e.get("selectedMode"),s=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&s.push(t.id)}),JP(e.getData(),function(l,u){var h=l.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var c=i.getSeriesByName(h)[0];if(!a.get(h))if(c){var d=c.getData(),f=d.getVisual("color");"function"==typeof f&&(f=f(c.getDataParams(0)));var p=d.getVisual("legendSymbol")||"roundRect",g=d.getVisual("symbol");this._createItem(h,u,l,e,p,g,t,f,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,c.name,null,n,s)).on("mouseout",$P(Mv,c.name,null,n,s)),a.set(h,!0)}else i.eachRawSeries(function(i){if(!a.get(h)&&i.legendDataProvider){var o=i.legendDataProvider(),c=o.indexOfName(h);if(c<0)return;var d=o.getItemVisual(c,"color");this._createItem(h,u,l,e,"roundRect",null,t,d,r).on("click",$P(bv,h,n)).on("mouseover",$P(Sv,null,h,n,s)).on("mouseout",$P(Mv,null,h,n,s)),a.set(h,!0)}},this)}else o.add(new QP({newline:!0}))},this)},_createItem:function(t,e,i,n,o,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("symbolKeepAspect"),p=n.isSelected(t),g=new QP,m=i.getModel("textStyle"),v=i.get("icon"),y=i.getModel("tooltip"),x=y.parentModel;if(o=v||o,g.add(Jl(o,0,0,h,c,p?l:d,null==f||f)),!v&&r&&(r!==o||"none"===r)){var _=.8*c;"none"===r&&(r="circle"),g.add(Jl(r,(h-_)/2,(c-_)/2,_,_,p?l:d,null==f||f))}var w="left"===s?h+5:-5,b=s,S=n.get("formatter"),M=t;"string"==typeof S&&S?M=S.replace("{name}",null!=t?t:""):"function"==typeof S&&(M=S(t)),g.add(new rM({style:mo({},m,{text:M,x:w,y:c/2,textFill:p?m.getTextColor():d,textAlign:b,textVerticalAlign:"middle"})}));var I=new yM({shape:g.getBoundingRect(),invisible:!0,tooltip:y.get("show")?a({content:t,formatter:x.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},y.option):null});return g.add(I),g.eachChild(function(t){t.silent=!0}),I.silent=!u,this.getContentGroup().add(g),fo(g),g.__legendDataIndex=e,g},layoutInner:function(t,e,i){var n=this.getContentGroup();aI(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var o=n.getBoundingRect();return n.attr("position",[-o.x,-o.y]),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});Os(function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[l],p=[-c.x,-c.y];n||(p[s]=o.position[s]);var g=[0,0],m=[-d.x,-d.y],v=A(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[s]+=i[l]-d[l]:g[s]+=d[l]+v),m[1-s]+=c[u]/2-d[u]/2,o.attr("position",p),a.attr("position",g),r.attr("position",m);var y=this.group.getBoundingRect();if((y={x:0,y:0})[l]=f?i[l]:c[l],y[u]=Math.max(c[u],d[u]),y[h]=Math.min(0,d[h]+m[1-s]),a.__rectSize=i[l],f){var x={x:0,y:0};x[l]=Math.max(i[l]-d[l]-v,0),x[u]=y[u],a.setClipPath(new yM({shape:x})),a.__rectSize=x[l]}else r.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Io(o,{position:_.contentPosition},!!f&&t),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;d(["pagePrev","pageNext"],function(n){var o=null!=e[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),a.cursor=o?"pointer":"default")});var n=i.childOfName("pageText"),o=t.get("pageFormatter"),a=e.pageIndex,r=null!=a?a+1:0,s=e.pageCount;n&&o&&n.setStyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+a}var n=t.get("scrollDataIndex",!0),o=this.getContentGroup(),a=this._containerGroup.__rectSize,r=t.getOrient().index,s=nN[r],l=oN[r],u=this._findTargetItemIndex(n),h=o.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:o.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;m<=d;++m)(!(x=e(h[m]))&&y.e>v.s+a||x&&!i(x,v.s))&&(v=y.i>v.i?y:x)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)(x=e(h[m]))&&i(y,x.s)||!(v.i=0;){var r=o.indexOf("|}"),s=o.substr(a+"{marker".length,r-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[s]},a=(o=o.substr(r+1)).indexOf("{marker")}this.el=new rM({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(m(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){return this.getSize()}};var uN=m,hN=d,cN=Vo,dN=new yM({shape:{x:-1,y:-1,width:2,height:2}});Ws({type:"tooltip",init:function(t,e){if(!U_.node){var i=t.getComponent("tooltip").get("renderMode");this._renderMode=Hi(i);var n;"html"===this._renderMode?(n=new Cv(e.getDom(),e),this._newLine="
"):(n=new Lv(e),this._newLine="\n"),this._tooltipContent=n}},render:function(t,e,i){if(!U_.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");um("itemTooltip",this._api,uN(function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!U_.node){var o=Pv(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=dN;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=xP(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(Pv(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s&&"axis"===(t=kv([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=m(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,o=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],s=[],l=kv([e.tooltipOption,o]),u=this._renderMode,h=this._newLine,c={};hN(t,function(t){hN(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value,a=[];if(e&&null!=o){var l=Im(o,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);d(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=Xl(e.axis,o),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(w(g)){p=g.html;var m=g.markers;n(c,m)}else p=g;a.push(p)}});var f=l;"html"!==u?r.push(a.join(h)):r.push((f?ia(f)+h:"")+a.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var f=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),a[0],a[1],f,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(),h=kv([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);w(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new No(n,this._tooltipModel,this._ecModel),r=a.get("content"),s=Math.random();this._showOrMove(a,function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,o,a,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=na(h,i,!0);else if("function"==typeof h){var d=uN(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,o,a,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,o,a,u,i,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),y(e))i=cN(e[0],s),n=cN(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=ca(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else"string"==typeof e&&r?(i=(p=Ev(e,d,u))[0],n=p[1]):(i=(p=Nv(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]);if(h&&(i-=Rv(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=Rv(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=Ov(i,n,o,s,l);i=p[0],n=p[1]}o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&hN(e,function(e,n){var o=e.dataByAxis||{},a=(t[n]||{}).dataByAxis||[];(i&=o.length===a.length)&&hN(o,function(t,e){var n=a[e]||{},o=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&o.length===r.length)&&hN(o,function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){U_.node||(this._tooltipContent.hide(),gm("itemTooltip",e))}}),Es({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Es({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){}),Gv.prototype={constructor:Gv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:aD.prototype.dataToCoord,radiusToData:aD.prototype.coordToData},u(Gv,aD);var fN=Bi();Fv.prototype={constructor:Fv,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:aD.prototype.dataToCoord,angleToData:aD.prototype.coordToData,calculateCategoryInterval:function(){var t=this,e=t.getLabelModel(),i=t.scale,n=i.getExtent(),o=i.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=t.dataToCoord(a+1)-t.dataToCoord(a),s=Math.abs(r),l=ke(a,e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=fN(t.model),d=c.lastAutoInterval,f=c.lastTickCount;return null!=d&&null!=f&&Math.abs(d-h)<=1&&Math.abs(f-o)<=1&&d>h?h=d:(c.lastTickCount=o,c.lastAutoInterval=h),h}},u(Fv,aD);var pN=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new Gv,this._angleAxis=new Fv,this._radiusAxis.polar=this._angleAxis.polar=this};pN.prototype={type:"polar",axisPointerEnabled:!0,constructor:pN,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=lr;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var gN=lI.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});n(gN.prototype,UA);var mN={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};ED("angle",gN,Wv,mN.angle),ED("radius",gN,Wv,mN.radius),Fs({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var vN={dimensions:pN.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var o=new pN(n);o.update=Zv;var a=o.getRadiusAxis(),r=o.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");Uv(a,s),Uv(r,l),Hv(o,t,e),i.push(o),t.coordinateSystem=o,o.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Fa.register("polar",vN);var yN=["axisLine","axisLabel","axisTick","splitLine","splitArea"];XD.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,o=n.polar,a=o.getRadiusAxis().getExtent(),r=n.getTicksCoords(),s=f(n.getViewLabels(),function(t){return(t=i(t)).coord=n.dataToCoord(t.tickValue),t});Yv(s),Yv(r),d(yN,function(e){!t.get(e+".show")||n.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,o,r,a,s)},this)}},_axisLine:function(t,e,i,n){var o=t.getModel("axisLine.lineStyle"),a=new sM({shape:{cx:e.cx,cy:e.cy,r:n[jv(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[jv(e)],l=f(i,function(t){return new _M({shape:Xv(e,[s,s+a],t.coord)})});this.group.add(OM(l,{style:r(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n,o){var a=t.getCategories(!0),r=t.getModel("axisLabel"),s=r.get("margin");d(o,function(i,o){var l=r,u=i.tickValue,h=n[jv(e)],c=e.coordToPoint([h+s,i.coord]),d=e.cx,f=e.cy,p=Math.abs(c[0]-d)/h<.3?"center":c[0]>d?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";a&&a[u]&&a[u].textStyle&&(l=new No(a[u].textStyle,r,r.ecModel));var m=new rM({silent:!0});this.group.add(m),mo(m.style,l,{x:c[0],y:c[1],textFill:l.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g})},this)},_splitLine:function(t,e,i,n){var o=t.getModel("splitLine").getModel("lineStyle"),a=o.get("color"),s=0;a=a instanceof Array?a:[a];for(var l=[],u=0;u=0?"p":"n",M=y;v&&(n[r][b]||(n[r][b]={p:y,n:y}),M=n[r][b][S]);var I,T,A,D;if("radius"===h.dim){var C=h.dataToRadius(w)-y,L=a.dataToAngle(b);Math.abs(C)=0},kN.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=dy(e,t),o=0;o=0||AN(n,t.getAxis("y").model)>=0)&&a.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:a[0],coordSyses:a,getPanelRect:ON.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){TN(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:ON.geo})})}},NN=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],ON={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Ao(t)),e}},EN={lineX:DN(fy,0),lineY:DN(fy,1),rect:function(t,e,i){var n=e[CN[t]]([i[0][0],i[1][0]]),o=e[CN[t]]([i[0][1],i[1][1]]),a=[cy([n[0],o[0]]),cy([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[CN[t]](i);return n[0][0]=Math.min(n[0][0],o[0]),n[1][0]=Math.min(n[1][0],o[1]),n[0][1]=Math.max(n[0][1],o[0]),n[1][1]=Math.max(n[1][1],o[1]),o}),xyMinMax:n}}},RN={lineX:DN(py,0),lineY:DN(py,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},zN=["inBrush","outOfBrush"],BN="__ecBrushSelect",VN="__ecInBrushSelectEvent",GN=VT.VISUAL.BRUSH;zs(GN,function(t,e,i){t.eachComponent({mainType:"brush"},function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new hy(e.option,t)).setInputRanges(e.areas,t)})}),Bs(GN,function(t,e,n){var o,a,s=[];t.eachComponent({mainType:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;w|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=_y(i);if(a&&!wy(e,n)&&(d(b,function(n){a[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getData();r.each(function(t){xy(a,o,r,t)&&(x[t]=1)})}}var p={brushId:e.id,brushIndex:n,brushName:e.name,areas:i(e.areas),selected:[]};s.push(p);var g=e.option,m=g.brushLink,v=[],x=[],_=[],w=0;n||(o=g.throttleType,a=g.throttleDelay);var b=f(e.areas,function(t){return by(r({boundingRect:FN[t.brushType](t)},t))}),S=ty(e.option,zN,function(t){t.mappingMethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=_[e]=[];"parallel"===t.subType?h(t,e):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};p.selected.push(i);var n=_y(t),o=_[e],a=t.getData(),r=l(e)?function(t){return x[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return xy(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?w:u(o))&&iy(zN,S,a,r)})}),vy(e,o,a,s,n)});var FN={lineX:B,lineY:B,rect:function(t){return Sy(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&Sy(e)}},WN=["#ddd"];Fs({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&ey(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=f(t,function(t){return My(this.option,t)},this))},setBrushOption:function(t){this.brushOption=My(this.option,t),this.brushType=this.brushOption.brushType}});Ws({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new zf(e.getZr())).on("brush",m(this._onBrush,this)).mount()},render:function(t){return this.model=t,Iy.apply(this,arguments)},updateTransform:Iy,updateView:Iy,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:i(t),$from:n})}}),Es({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Es({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var HN={},ZN=rT.toolbox.brush;Dy.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:i(ZN.title)};var UN=Dy.prototype;UN.render=UN.updateView=function(t,e,i){var n,o,a;e.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,d(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},UN.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},UN.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},Ty("brush",Dy),Ns(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Jv(s),e&&!s.length&&s.push.apply(s,SN)}});Cy.prototype={constructor:Cy,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Yo(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:o,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)?this.getDateInfo(t):((t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,o=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ca(r,l);d([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timea.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=n.getTime()-t[1].time>0?1:-1;n.getDate()!==a&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},Cy.dimensions=Cy.prototype.dimensions,Cy.getDimensionsInfo=Cy.prototype.getDimensionsInfo,Cy.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var o=new Cy(n,t,e);i.push(o),n.coordinateSystem=o}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},Fa.register("calendar",Cy);var XN=lI.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=ga(t);XN.superApply(this,"init",arguments),ky(t,o)},mergeOption:function(t,e){XN.superApply(this,"mergeOption",arguments),ky(this.option,t)}}),jN={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},YN={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Ws({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new yM({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(t,e,i,n){function o(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var o=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawSplitline(o,s,n)}var a=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}o(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,u,i),s,n),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new gM({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?oa(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new rM({z2:30});mo(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];_(o)&&(o=jN[o.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=r[0]&&t<=r[1]}if(t===this._dataZoomModel){var n=this._dimName,o=this.getTargetSeriesModels(),a=t.get("filterMode"),r=this._valueWindow;"none"!==a&&$N(o,function(t){var e=t.getData(),o=e.mapDimension(n,!0);o.length&&("weakFilter"===a?e.filterSelf(function(t){for(var i,n,a,s=0;sr[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(i=!0),c&&(n=!0)}return a&&i&&n}):$N(o,function(n){if("empty"===a)t.setData(e.map(n,function(t){return i(t)?t:NaN}));else{var o={};o[n]=r,e.selectRange(o)}}),$N(o,function(t){e.setApproximateExtent(r,t)}))})}}};var tO=d,eO=KN,iO=Fs({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=By(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=By(t);n(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;U_.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),Vy(this,t),tO([["start","startValue"],["end","endValue"]],function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,o){var a=this.dependentModels[e.axis][i],r=a.__dzAxisProxy||(a.__dzAxisProxy=new QN(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();eO(function(e){var i=e.axisIndex;t[i]=Di(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;eO(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var o="vertical"===e?"y":"x";n[o+"Axis"].length?(i[o+"AxisIndex"]=[0],t=!1):tO(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&eO(function(e){if(t){var n=[],o=this.dependentModels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getFirstTargetAxisModel:function(){var t;return eO(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;eO(function(n){tO(this.get(n.axisIndex),function(o){t.call(e,n,o,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;tO([["start","startValue"],["end","endValue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&Vy(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),nO=qI.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%g)p+=f;else{var i=null==t||isNaN(t)||""===t,n=i?0:aO(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.dataZoomModel;this._displayables.barGroup.add(new pM({shape:{points:c},style:r({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new gM({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis(function(o,a){d(t.getAxisProxy(o.name,a).getTargetSeriesModels(),function(t){if(!(i||!0!==e&&l(cO,t.get("type"))<0)){var r,s=n.getComponent(o.axis,a).axis,u=Gy(o.name),h=t.coordinateSystem;null!=u&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),u=t.getData().mapDimension(u),i={thisAxis:s,series:t,thisDim:o.name,otherDim:u,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,o=this._size,a=this.dataZoomModel;n.add(t.filler=new oO({draggable:!0,cursor:Fy(this._orient),drift:sO(this._onDragMove,this,"all"),onmousemove:function(t){mw(t.event)},ondragstart:sO(this._showDataInfo,this,!0),ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new oO($n({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),lO([0,1],function(t){var o=Po(a.get("handleIcon"),{cursor:Fy(this._orient),draggable:!0,drift:sO(this._onDragMove,this,t),onmousemove:function(t){mw(t.event)},ondragend:sO(this._onDragEnd,this),onmouseover:sO(this._showDataInfo,this,!0),onmouseout:sO(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getBoundingRect();this._handleHeight=Vo(a.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,o.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textStyleModel;this.group.add(i[t]=new rM({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[aO(t[0],[0,100],e,!0),aO(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];QL(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?aO(a.minSpan,r,o,!0):null,null!=a.maxSpan?aO(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=rO([aO(n[0],o,r,!0),aO(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=rO(i.slice()),o=this._size;lO([0,1],function(t){var n=e.handles[t],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=Ao(n.handles[t].parent,this.group),i=Co(0===t?"right":"left",e),s=this._handleWidth/2+hO,l=Do([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setStyle({x:l[0],y:l[1],textVerticalAlign:a===uO?"middle":i,textAlign:a===uO?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,o=n.handleLabels,a=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=rO(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=Do([e,i],this._displayables.barGroup.getLocalTransform(),!0),o=this._updateInterval(t,n[0]),a=this.dataZoomModel.get("realtime");this._updateView(!a),o&&a&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(lO(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});iO.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var fO="\0_ec_dataZoom_roams",pO=m,gO=nO.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){gO.superApply(this,"render",arguments),this._range=t.getPercentRange(),d(this.getTargetCoordInfo(),function(e,n){var o=f(e,function(t){return Zy(t.model)});d(e,function(e){var a=e.model,r={};d(["pan","zoom","scrollMove"],function(t){r[t]=pO(mO[t],this,e,n)},this),Wy(i,{coordId:Zy(a),allCoordIds:o,containsPoint:function(t,e,i){return a.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){Hy(this.api,this.dataZoomModel.id),gO.superApply(this,"dispose",arguments),this._range=null}}),mO={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=vO[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return QL(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:Ky(function(t,e,i,n,o,a){var r=vO[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Ky(function(t,e,i,n,o,a){return vO[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})},vO={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}};Os({getTargetSeries:function(t){var e=R();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){d(n.getAxisProxy(t.name,i).getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)})}}),Es("dataZoom",function(t,e){var i=Ny(m(e.eachComponent,e,"dataZoom"),KN,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})});var yO=d,xO=function(t){var e=t&&t.visualMap;y(e)||(e=e?[e]:[]),yO(e,function(t){if(t){$y(t,"splitList")&&!$y(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&y(e)&&yO(e,function(t){w(t)&&($y(t,"start")&&!$y(t,"min")&&(t.min=t.start),$y(t,"end")&&!$y(t,"max")&&(t.max=t.end))})}})};lI.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var _O=VT.VISUAL.COMPONENT;Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(ny(e.stateList,e.targetVisuals,m(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Bs(_O,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var o=e.getVisualMeta(m(Jy,null,t,e))||{stops:[],outerColors:[]},a=e.getDataDimension(i),r=i.getDimensionInfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getData().setVisual("visualMeta",n)}});var wO={get:function(t,e,n){var o=i((bO[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},bO={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},SO=hL.mapVisual,MO=hL.eachVisual,IO=y,TO=d,AO=Fo,DO=Bo,CO=B,LO=Fs({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;U_.canvasSupported||(i.realtime=!1),!e&&ey(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=m(t,this),this.controllerVisuals=ty(this.option.controller,e,t),this.targetVisuals=ty(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=Di(t),e},eachTargetSeries:function(t,e){d(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetExtent:function(){var t=this.option,e=AO([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){IO(o.color)&&!t.inRange&&(t.inRange={color:o.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")},TO(this.stateList,function(e){var i=t[e];if(_(i)){var n=wO.get(i,"active",l);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.ecModel,o=this.option,a={inRange:o.inRange,outOfRange:o.outOfRange},r=o.target||(o.target={}),s=o.controller||(o.controller={});n(r,a),n(s,a);var l=this.isCategory();t.call(this,r),t.call(this,s),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},TO(n,function(t,e){if(hL.isValidType(e)){var i=wO.get(e,"inactive",l);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,o=this.get("inactiveColor");TO(this.stateList,function(a){var r=this.itemSize,s=t[a];s||(s=t[a]={color:l?o:[o]}),null==s.symbol&&(s.symbol=e&&i(e)||(l?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&i(n)||(l?r[0]:[r[0],r[0]])),s.symbol=SO(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var u=s.symbolSize;if(null!=u){var h=-1/0;MO(u,function(t){t>h&&(h=t)}),s.symbolSize=SO(u,function(t){return DO(t,[0,h],[0,r[0]],!0)})}},this)}.call(this,s)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:CO,getValueState:CO,getVisualMeta:CO}),kO=[20,140],PO=LO.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){PO.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){PO.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=kO[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=kO[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){LO.prototype.completeVisualOption.apply(this,arguments),d(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Fo((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=Qy(0,0,this.getExtent()),n=Qy(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new tb("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,o=i.handleThumbs,a=i.handleLabels;EO([0,1],function(r){var s=o[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=Do(i.handleLabelPoints[r],Ao(s,this.group));a[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=OO(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",ox(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=Do(u.indicatorLabelPoint,Ao(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=RO(zO(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=RO(zO(o[0],t),o[1]);var r=ax(i,a,o),s=[t-r,t+r],l=OO(t,o,a,!0),u=[OO(s[0],o,a,!0),OO(s[1],o,a,!0)];s[0]o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||rx(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=Ri(h,c);this._dispatchHighDown("downplay",ex(d[0])),this._dispatchHighDown("highlight",ex(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",ex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=Ao(e,n?null:this.group);return zM[y(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});Es({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Ns(xO);var FO=LO.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FO.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();WO[this._mode].call(this),this._resetSelected(t,e);var o=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=i(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=f(this._pieceList,function(t){var t=i(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(w(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=hL.listVisualTypes(),o=this.isCategory();d(e.pieces,function(t){d(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.stateList,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.stateList,function(t){(e[t]||(e[t]={}))[n]=wO.get(n,"inRange"===t?"active":"inactive",o)})},this),LO.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;d(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=i(t)},getValueState:function(t){var e=hL.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],o=i.getData();o.each(this.getDataDimension(o),function(e,i){hL.findPieceIndex(e,this._pieceList)===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,a){var r=o.getRepresentValue({interval:e});a||(a=o.getValueState(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],o=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),WO={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};NO.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,o=n.getFont(),a=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=T(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,r),d(l.viewPieceList,function(n){var l=n.piece,u=new tb;u.onclick=m(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualMapModel.getValueState(c);u.add(new rM({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:o,textFill:a,opacity:"outOfRange"===d?.5:1}}))}t.add(u)},this),u&&this._renderEndsText(t,u[1],s,h,r),aI(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:ex(i.findTargetDataIndices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return tx(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new tb,r=this.visualMapModel.textStyleModel;a.add(new rM({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=f(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(Jl(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,o=i(n.selected),a=e.getSelectedMapKey(t);"single"===n.selectedMode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}});Ns(xO);var HO=ta,ZO=ia,UO=Fs({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(U_.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var o=this.constructor,r=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[r];i&&i.data?(s?s.mergeOption(i,e,!0):(n&&ux(i),d(i.data,function(t){t instanceof Array?(ux(t[0]),ux(t[1])):ux(t)}),a(s=new o(i,this,e),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),t[r]=s):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=y(i)?f(i,HO).join(", "):HO(i),o=e.getName(t),a=ZO(this.name);return(null!=i||o)&&(a+="
"),o&&(a+=ZO(o),null!=i&&(a+=" : ")),null!=i&&(a+=ZO(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});h(UO,ZI),UO.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var XO=l,jO=v,YO={min:jO(dx,"min"),max:jO(dx,"max"),average:jO(dx,"average")},qO=Ws({type:"marker",init:function(){this.markerGroupMap=R()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var o=this.type+"Model";e.eachSeries(function(t){var n=t[o];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});qO.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(xx(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new Du),u=_x(o,t,e);e.setData(u),xx(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),u.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markPoint=t.markPoint||{}}),UO.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var KO=function(t,e,o,r){var s=t.getData(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=r.xAxis||null!=r.yAxis)){var u,h;if(null!=r.yAxis||null!=r.xAxis)u=null!=r.yAxis?"y":"x",e.getAxis(u),h=T(r.yAxis,r.xAxis);else{var c=px(r,s,e,t);u=c.valueDataDim,c.valueAxis,h=yx(s,u,l)}var d="x"===u?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(m,20))),p.coord[d]=g.coord[d]=h,r=[p,g,{type:l,valueIndex:r.valueIndex,value:h}]}return r=[fx(t,r[0]),fx(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};qO.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),o=e.__from,a=e.__to;o.each(function(e){Ix(o,e,!0,t,i),Ix(a,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[o.getItemLayout(t),a.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function o(e,i,o){var a=e.getItemModel(i);Ix(e,i,o,t,n),e.setItemVisual(i,{symbolSize:a.get("symbolSize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemStyle.color")||s.getVisual("color")})}var a=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new sf);this.group.add(u.group);var h=Tx(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t,i){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markLine=t.markLine||{}}),UO.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var $O=function(t,e,i,n){var a=fx(t,n[0]),r=fx(t,n[1]),s=T,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},JO=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];qO.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var o=f(JO,function(o){return Lx(n,e,o,t,i)});n.setItemLayout(e,o),n.getItemGraphicEl(e).setShape("points",o)})}},this)},renderSeries:function(t,e,i,n){var o=t.coordinateSystem,a=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(a)||l.set(a,{group:new tb});this.group.add(u.group),u.__keep=!0;var h=kx(o,t,e);e.setData(h),h.each(function(e){h.setItemLayout(e,f(JO,function(i){return Lx(h,e,i,t,n)})),h.setItemVisual(e,{color:s.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=new pM({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getItemGraphicEl(i);Io(n,{shape:{points:h.getItemLayout(t)}},e,t),u.group.add(n),h.setItemGraphicEl(t,n)}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),o=n.getModel("label"),a=n.getModel("emphasis.label"),s=h.getItemVisual(i,"color");t.useStyle(r(n.getModel("itemStyle").getItemStyle(),{fill:Yt(s,.4),stroke:s})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),go(t.style,t.hoverStyle,o,a,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:s}),fo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Ns(function(t){t.markArea=t.markArea||{}});lI.registerSubTypeDefaulter("timeline",function(){return"slider"}),Es({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),r({currentIndex:i.option.currentIndex},t)}),Es({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var QO=lI.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){QO.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],n=t.axisType,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=Li(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isNaN(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new vA([{name:"value",type:r}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});h(QO.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),ZI);var tE=qI.extend({type:"timeline"}),eE=function(t,e,i,n){aD.call(this,t,e,i),this.type=n||"value",this.model=null};eE.prototype={constructor:eE,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},u(eE,aD);var iE=m,nE=d,oE=Math.PI;tE.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var o=this._layout(t,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,t);t.formatTooltip=function(t){return ia(s.scale.getLabel(t))},nE(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderAxisLabel(o,r,s,t),this._position(o,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=Ex(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:oE/2},l="vertical"===n?o.height:o.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*oE/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),w=h&&u.get("showPrevBtn",!0),b=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),w&&(m=[S,0],S+=f),b&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),w&&(m=[0,0],S+=f),b&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:o,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||a[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._mainGroup,r=this._labelGroup,s=t.viewRect;if("vertical"===t.orient){var l=xt(),u=s.x,h=s.y+s.height;St(l,l,[-u,-h]),Mt(l,l,-oE/2),St(l,l,[u,h]),(s=s.clone()).applyTransform(l)}var c=n(s),d=n(a.getBoundingRect()),f=n(r.getBoundingRect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelPosOpt;if(isNaN(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=m>=0?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=Hl(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new eE("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new tb;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new _M({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var o=n.getData(),a=i.scale.getTicks();nE(a,function(t){var a=i.dataToCoord(t),r=o.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:iE(this._changeTimeline,this,t)},h=zx(r,s,e,u);fo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){if(i.getLabelModel().get("show")){var o=n.getData(),a=i.getViewLabels();nE(a,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new rM({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:iE(this._changeTimeline,this,a),silent:!1});mo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),fo(h,mo({},l))},this)}},_renderControl:function(t,e,i,n){function o(t,i,o,h){if(t){var c=Rx(n,i,u,{position:t,origin:[a/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:o});e.add(c),fo(c,l)}}var a=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-a/2,a,a],h=n.getPlayState(),c=n.get("inverse",!0);o(t.nextBtnPosition,"controlStyle.nextIcon",iE(this._changeTimeline,this,c?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",iE(this._changeTimeline,this,c?"+":"-")),o(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),iE(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=iE(s._handlePointerDrag,s),t.ondragend=iE(s._handlePointerDragend,s),Bx(t,a,i,n,!0)},onUpdate:function(t){Bx(t,a,i,n)}};this._currentPointer=zx(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Fo(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:s+8;a+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):a-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}})}},updateView:function(t,e,i,n){d(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var rE=rT.toolbox.saveAsImage;Gx.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:rE.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:rE.lang.slice()},Gx.prototype.unusable=!U_.canvasSupported,Gx.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||U_.browser.ie||U_.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(f)}},Ty("saveAsImage",Gx);var sE=rT.toolbox.magicType;Fx.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:i(sE.title),option:{},seriesIndex:{}};var lE=Fx.prototype;lE.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var uE={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magicType_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},hE=[["line","bar"],["stack","tiled"]];lE.onclick=function(t,e,i){var n=this.model,o=n.get("seriesIndex."+i);if(uE[i]){var a={series:[]};d(hE,function(t){l(t,i)>=0&&d(t,function(t){n.setIconStatus(t,"normal")})}),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},function(e){var o=e.subType,s=e.id,l=uE[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim+"Axis",d=t.queryComponents({mainType:c,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundaryGap="bar"===i}}}),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:a})}},Es({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),Ty("magicType",Fx);var cE=rT.toolbox.dataView,dE=new Array(60).join("-"),fE="\t",pE=new RegExp("["+fE+"]+","g");$x.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:i(cE.title),lang:i(cE.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},$x.prototype.onclick=function(t,e){function i(){n.removeChild(a),x._dom=null}var n=e.getDom(),o=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=o.get("lang")||[];r.innerHTML=s[0]||o.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=o.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=o.get("optionToContent"),c=o.get("contentToOption"),d=Ux(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:M(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=o.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textColor"),u.style.borderColor=o.get("textareaBorderColor"),u.style.backgroundColor=o.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+o.get("buttonColor"),m+=";color:"+o.get("buttonTextColor");var x=this;ht(v,"click",i),ht(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Kx(u.value,p)}catch(t){throw i(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!o.get("readOnly")&&g.appendChild(y),g.appendChild(v),ht(u,"keydown",function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+fE+e.substring(n),this.selectionStart=this.selectionEnd=i+1,mw(t)}}),a.appendChild(r),a.appendChild(l),a.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},$x.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},$x.prototype.dispose=function(t,e){this.remove(t,e)},Ty("dataView",$x),Es({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];d(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:Jx(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeOption(r({series:i},t.newOption))});var gE=d,mE="\0_ec_hist_store";iO.extend({type:"dataZoom.select"}),nO.extend({type:"dataZoom.select"});var vE=rT.toolbox.dataZoom,yE=d,xE="\0_ec_\0toolbox-dataZoom_";o_.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:i(vE.title)};var _E=o_.prototype;_E.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,s_(t,e,this,n,i),r_(t,e)},_E.onclick=function(t,e,i){wE[i].call(this)},_E.remove=function(t,e){this._brushController.unmount()},_E.dispose=function(t,e){this._brushController.dispose()};var wE={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(t_(this.ecModel))}};_E._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,a),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();null==u.minValueSpan&&null==u.maxValueSpan||(i=QL(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(o[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)}),n}if(e.isEnd&&t.length){var o={},a=this.ecModel;this._brushController.updateCovers([]),new hy(a_(this.model.option),a,{include:["grid"]}).matchOutputRanges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushType;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[o],n,e)}}),Qx(a,o),this._dispatchZoomAction(o)}},_E._dispatchZoomAction=function(t){var e=[];yE(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Ty("dataZoom",o_),Ns(function(t){function e(t,e){if(e){var o=t+"Index",a=e[o];null==a||"all"===a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"===a||-1!==l(a,i)){var r={type:"select",$fromToolbox:!0,id:xE+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),yE(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);y(n)||(t.dataZoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.dataZoom;e("xAxis",a),e("yAxis",a)}}});var bE=rT.toolbox.restore;l_.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:bE.title},l_.prototype.onclick=function(t,e,i){e_(t),e.dispatchAction({type:"restore",from:this.uid})},Ty("restore",l_),Es({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var SE,ME="urn:schemas-microsoft-com:vml",IE="undefined"==typeof window?null:window,TE=!1,AE=IE&&IE.document;if(AE&&!U_.canvasSupported)try{!AE.namespaces.zrvml&&AE.namespaces.add("zrvml",ME),SE=function(t){return AE.createElement("')}}catch(t){SE=function(t){return AE.createElement("<"+t+' xmlns="'+ME+'" class="zrvml">')}}var DE=ES.CMD,CE=Math.round,LE=Math.sqrt,kE=Math.abs,PE=Math.cos,NE=Math.sin,OE=Math.max;if(!U_.canvasSupported){var EE=21600,RE=EE/2,zE=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=EE+","+EE,t.coordorigin="0,0"},BE=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},VE=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},GE=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},FE=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},WE=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},HE=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},ZE=function(t,e,i){var n=Gt(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=VE(n[0],n[1],n[2]),t.opacity=i*n[3])},UE=function(t){var e=Gt(t);return[VE(e[0],e[1],e[2]),e[3]]},XE=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof IM){var o,a=0,r=[0,0],s=0,l=1,u=i.getBoundingRect(),h=u.width,c=u.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(Q(f,f,d),Q(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(a=180*Math.atan2(g,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&Q(f,f,d),y/=v[0]*EE,x/=v[1]*EE;var _=OE(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,S=[],M=[],I=0;I=2){var D=S[0][0],C=S[1][0],L=S[0][1]*e.opacity,k=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=D,t.color2=C,t.colors=M.join(","),t.opacity=k,t.opacity2=L}"radial"===o&&(t.focusposition=r.join(","))}else ZE(t,n,e.opacity)},jE=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof IM||ZE(t,e.stroke,e.opacity)},YE=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof IM&&FE(t,a),a||(a=u_(e)),o?XE(a,i,n):jE(a,i),GE(t,a)):(t[o?"filled":"stroked"]="false",FE(t,a))},qE=[[],[],[]],KE=function(t,e){var i,n,o,a,r,s,l=DE.M,u=DE.C,h=DE.L,c=DE.A,d=DE.Q,f=[],p=t.data,g=t.len();for(a=0;a.01?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&OA?x-=.0125:x+=.0125:N&&ED?y+=.0125:y-=.0125),f.push(R,CE(((A-C)*M+b)*EE-RE),",",CE(((D-L)*I+S)*EE-RE),",",CE(((A+C)*M+b)*EE-RE),",",CE(((D+L)*I+S)*EE-RE),",",CE((O*M+b)*EE-RE),",",CE((E*I+S)*EE-RE),",",CE((y*M+b)*EE-RE),",",CE((x*I+S)*EE-RE)),r=y,s=x;break;case DE.R:var z=qE[0],B=qE[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(Q(z,z,e),Q(B,B,e)),z[0]=CE(z[0]*EE-RE),B[0]=CE(B[0]*EE-RE),z[1]=CE(z[1]*EE-RE),B[1]=CE(B[1]*EE-RE),f.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case DE.Z:f.push(" x ")}if(i>0){f.push(n);for(var V=0;V100&&(tR=0,QE={});var i,n=eR.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},QE[t]=e,tR++}return e};!function(t,e){bb[t]=e}("measureText",function(t,e){var i=AE;JE||((JE=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",AE.body.appendChild(JE));try{JE.style.font=e}catch(t){}return JE.innerHTML="",JE.appendChild(i.createTextNode(t)),{width:JE.offsetWidth}});for(var nR=new de,oR=[Db,di,fi,Pn,rM],aR=0;aR=o&&u+1>=a){for(var h=[],c=0;c=o&&c+1>=a)return T_(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},D_.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},D_.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},D_.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},D_.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return d(this._tagNames,function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))}),e},D_.prototype.markAllUnused=function(){var t=this;d(this.getDoms(),function(e){e[t._markLabel]="0"})},D_.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},D_.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;d(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},D_.prototype.getSvgProxy=function(t){return t instanceof Pn?yR:t instanceof fi?xR:t instanceof rM?_R:yR},D_.prototype.getTextSvgElement=function(t){return t.__textSvgEl},D_.prototype.getSvgElement=function(t){return t.__svgEl},u(C_,D_),C_.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getDefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.addDom(o)):o=i.add(a),i.markUsed(e);var s=o.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}})}},C_.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Yw("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},C_.prototype.update=function(t){var e=this;D_.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},C_.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Yw("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n0){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);bt(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},L_.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&d(t.__clipPaths,function(t){t._dom&&D_.prototype.markUsed.call(e,t._dom),t._textDom&&D_.prototype.markUsed.call(e,t._textDom)})},u(k_,D_),k_.prototype.addWithoutUpdate=function(t,e){if(e&&P_(e.style)){var i,n=e.style;n._shadowDom?(i=n._shadowDom,this.getDefs(!0).contains(n._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var o=i.getAttribute("id");t.style.filter="url(#"+o+")"}},k_.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},k_.prototype.update=function(t,e){var i=e.style;if(P_(i)){var n=this;D_.prototype.update.call(this,e,function(t){n.updateDom(e,t._shadowDom)})}else this.remove(t,i)},k_.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},k_.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},k_.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&D_.prototype.markUsed.call(this,e._shadowDom)};var IR=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var o=p_("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new C_(n,o),this.clipPathManager=new L_(n,o),this.shadowManager=new k_(n,o);var r=document.createElement("div");r.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=r,t.appendChild(r),r.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]};IR.prototype={constructor:IR,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,n=this._visibleList,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||N_(s[i])||N_(r.style[i]))-(N_(s[o])||0)-(N_(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},d(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){IR.prototype[t]=F_(t)}),Ti("svg",IR),t.version="4.2.1",t.dependencies=ET,t.PRIORITY=VT,t.init=function(t,e,i){var n=ks(t);if(n)return n;var o=new us(t,e,i);return o.id="ec_"+iA++,tA[o.id]=o,Fi(t,oA,o.id),Cs(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,kT(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+nA++,kT(e,function(e){e.group=t})}return eA[t]=!0,t},t.disConnect=Ls,t.disconnect=aA,t.dispose=function(t){"string"==typeof t?t=tA[t]:t instanceof us||(t=ks(t)),t instanceof us&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=ks,t.getInstanceById=function(t){return tA[t]},t.registerTheme=Ps,t.registerPreprocessor=Ns,t.registerProcessor=Os,t.registerPostUpdate=function(t){KT.push(t)},t.registerAction=Es,t.registerCoordinateSystem=Rs,t.getCoordinateSystemDimensions=function(t){var e=Fa.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=zs,t.registerVisual=Bs,t.registerLoading=Gs,t.extendComponentModel=Fs,t.extendComponentView=Ws,t.extendSeriesModel=Hs,t.extendChartView=Zs,t.setCanvasCreator=function(t){e("createCanvas",t)},t.registerMap=function(t,e,i){DT.registerMap(t,e,i)},t.getMap=function(t){var e=DT.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool=rA,t.zrender=Hb,t.number=YM,t.format=eI,t.throttle=Pr,t.helper=tD,t.matrix=Sw,t.vector=cw,t.color=Ww,t.parseGeoJSON=iD,t.parseGeoJson=rD,t.util=sD,t.graphic=lD,t.List=vA,t.Model=No,t.Axis=aD,t.env=U_}); diff --git a/src/main/webapp/static/js/formSelects-v4.js b/src/main/webapp/static/js/formSelects-v4.js new file mode 100644 index 0000000..8792ca9 --- /dev/null +++ b/src/main/webapp/static/js/formSelects-v4.js @@ -0,0 +1,1791 @@ +'use strict'; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +/** + * name: formSelects + * 基于Layui Select多选 + * version: 4.0.0.0910 + * http://sun.faysunshine.com/layui/formSelects-v4/dist/formSelects-v4.js + */ +(function (layui, window, factory) { + if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') { + // 支持 CommonJS + module.exports = factory(); + } else if (typeof define === 'function' && define.amd) { + // 支持 AMD + define(factory); + } else if (window.layui && layui.define) { + //layui加载 + layui.define(['jquery'], function (exports) { + exports('formSelects', factory()); + }); + } else { + window.formSelects = factory(); + } +})(typeof layui == 'undefined' ? null : layui, window, function () { + var v = '4.0.0.0910', + NAME = 'xm-select', + PNAME = 'xm-select-parent', + INPUT = 'xm-select-input', + TDIV = 'xm-select--suffix', + THIS = 'xm-select-this', + LABEL = 'xm-select-label', + SEARCH = 'xm-select-search', + SEARCH_TYPE = 'xm-select-search-type', + SHOW_COUNT = 'xm-select-show-count', + CREATE = 'xm-select-create', + CREATE_LONG = 'xm-select-create-long', + MAX = 'xm-select-max', + SKIN = 'xm-select-skin', + DIRECTION = "xm-select-direction", + HEIGHT = 'xm-select-height', + DISABLED = 'xm-dis-disabled', + DIS = 'xm-select-dis', + TEMP = 'xm-select-temp', + RADIO = 'xm-select-radio', + LINKAGE = 'xm-select-linkage', + DL = 'xm-select-dl', + DD_HIDE = 'xm-select-hide', + HIDE_INPUT = 'xm-hide-input', + SANJIAO = 'xm-select-sj', + ICON_CLOSE = 'xm-icon-close', + FORM_TITLE = 'xm-select-title', + FORM_SELECT = 'xm-form-select', + FORM_SELECTED = 'xm-form-selected', + FORM_NONE = 'xm-select-none', + FORM_EMPTY = 'xm-select-empty', + FORM_INPUT = 'xm-input', + FORM_DL_INPUT = 'xm-dl-input', + FORM_SELECT_TIPS = 'xm-select-tips', + CHECKBOX_YES = 'xm-iconfont', + FORM_TEAM_PID = 'XM_PID_VALUE', + CZ = 'xm-cz', + CZ_GROUP = 'xm-cz-group', + TIPS = '请选择', + data = {}, + events = { + on: {}, + endOn: {}, + filter: {}, + maxTips: {}, + opened: {}, + closed: {} + }, + ajax = { + type: 'get', + header: {}, + first: true, + data: {}, + searchUrl: '', + searchName: 'keyword', + searchVal: null, + keyName: 'name', + keyVal: 'value', + keySel: 'selected', + keyDis: 'disabled', + keyChildren: 'children', + dataType: '', + delay: 500, + beforeSuccess: null, + success: null, + error: null, + beforeSearch: null, + response: { + statusCode: 0, + statusName: 'code', + msgName: 'msg', + dataName: 'data' + }, + tree: { + nextClick: function nextClick(id, item, callback) { + callback([]); + }, + folderChoose: true, + lazy: true + } + }, + quickBtns = [{ icon: 'xm-iconfont icon-quanxuan', name: '全选', click: function click(id, cm) { + cm.selectAll(id, true, true); + } }, { icon: 'xm-iconfont icon-qingkong', name: '清空', click: function click(id, cm) { + cm.removeAll(id, true, true); + } }, { icon: 'xm-iconfont icon-fanxuan', name: '反选', click: function click(id, cm) { + cm.reverse(id, true, true); + } }, { icon: 'xm-iconfont icon-pifu', name: '换肤', click: function click(id, cm) { + cm.skin(id); + } }], + $ = window.$ || window.layui && window.layui.jquery, + $win = $(window), + ajaxs = {}, + fsConfig = {}, + fsConfigs = {}, + FormSelects = function FormSelects(options) { + var _this = this; + + this.config = { + name: null, //xm-select="xxx" + max: null, + maxTips: function maxTips(id, vals, val, max) { + var ipt = $('[xid="' + _this.config.name + '"]').prev().find('.' + NAME); + if (ipt.parents('.layui-form-item[pane]').length) { + ipt = ipt.parents('.layui-form-item[pane]'); + } + ipt.attr('style', 'border-color: red !important'); + setTimeout(function () { + ipt.removeAttr('style'); + }, 300); + }, + init: null, //初始化的选择值, + on: null, //select值发生变化 + opened: null, + closed: null, + filter: function filter(id, inputVal, val, isDisabled) { + return val.name.indexOf(inputVal) == -1; + }, + clearid: -1, + direction: 'auto', + height: null, + isEmpty: false, + btns: [quickBtns[0], quickBtns[1], quickBtns[2]], + searchType: 0, + create: function create(id, name) { + return Date.now(); + }, + template: function template(id, item) { + return item.name; + }, + showCount: 0, + isCreate: false, + placeholder: TIPS, + clearInput: false + }; + this.select = null; + this.values = []; + $.extend(this.config, options, { + searchUrl: options.isSearch ? options.searchUrl : null, + placeholder: options.optionsFirst ? options.optionsFirst.value ? TIPS : options.optionsFirst.innerHTML || TIPS : TIPS, + btns: options.radio ? [quickBtns[1]] : [quickBtns[0], quickBtns[1], quickBtns[2]] + }, fsConfigs[options.name] || fsConfig); + if (isNaN(this.config.showCount) || this.config.showCount <= 0) { + this.config.showCount = 19921012; + } + }; + + //一些简单的处理方法 + var Common = function Common() { + this.appender(); + this.on(); + this.onreset(); + }; + + Common.prototype.appender = function () { + //针对IE做的一些拓展 + //拓展Array map方法 + if (!Array.prototype.map) { + Array.prototype.map = function (i, h) { + var b, + a, + c, + e = Object(this), + f = e.length >>> 0;if (h) { + b = h; + }a = new Array(f);c = 0;while (c < f) { + var d, g;if (c in e) { + d = e[c];g = i.call(b, d, c, e);a[c] = g; + }c++; + }return a; + }; + }; + + //拓展Array foreach方法 + if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(g, b) { + var d, c;if (this == null) { + throw new TypeError("this is null or not defined"); + }var f = Object(this);var a = f.length >>> 0;if (typeof g !== "function") { + throw new TypeError(g + " is not a function"); + }if (arguments.length > 1) { + d = b; + }c = 0;while (c < a) { + var e;if (c in f) { + e = f[c];g.call(d, e, c, f); + }c++; + } + }; + }; + + //拓展Array filter方法 + if (!Array.prototype.filter) { + Array.prototype.filter = function (b) { + if (this === void 0 || this === null) { + throw new TypeError(); + }var f = Object(this);var a = f.length >>> 0;if (typeof b !== "function") { + throw new TypeError(); + }var e = [];var d = arguments[1];for (var c = 0; c < a; c++) { + if (c in f) { + var g = f[c];if (b.call(d, g, c, f)) { + e.push(g); + } + } + }return e; + }; + }; + }; + + Common.prototype.init = function (target) { + var _this2 = this; + + //初始化页面上已有的select + $(target ? target : 'select[' + NAME + ']').each(function (index, select) { + var othis = $(select), + id = othis.attr(NAME), + hasLayuiRender = othis.next('.layui-form-select'), + hasRender = othis.next('.' + PNAME), + options = { + name: id, + disabled: select.disabled, + max: othis.attr(MAX) - 0, + isSearch: othis.attr(SEARCH) != undefined, + searchUrl: othis.attr(SEARCH), + isCreate: othis.attr(CREATE) != undefined, + radio: othis.attr(RADIO) != undefined, + skin: othis.attr(SKIN), + direction: othis.attr(DIRECTION), + optionsFirst: select.options[0], + height: othis.attr(HEIGHT), + formname: othis.attr('name') || othis.attr('_name'), + layverify: othis.attr('lay-verify') || othis.attr('_lay-verify'), + layverType: othis.attr('lay-verType'), + searchType: othis.attr(SEARCH_TYPE) == 'dl' ? 1 : 0, + showCount: othis.attr(SHOW_COUNT) - 0 + }, + value = othis.find('option[selected]').toArray().map(function (option) { + //获取已选中的数据 + return { + name: option.innerHTML, + value: option.value + }; + }), + fs = new FormSelects(options); + + fs.values = value; + + if (fs.config.init) { + fs.values = fs.config.init.map(function (item) { + if ((typeof item === 'undefined' ? 'undefined' : _typeof(item)) == 'object') { + return item; + } + return { + name: othis.find('option[value="' + item + '"]').text(), + value: item + }; + }).filter(function (item) { + return item.name; + }); + fs.config.init = fs.values.concat([]); + } else { + fs.config.init = value.concat([]); + } + + !fs.values && (fs.values = []); + + data[id] = fs; + + //先取消layui对select的渲染 + hasLayuiRender[0] && hasLayuiRender.remove(); + hasRender[0] && hasRender.remove(); + + //构造渲染div + var dinfo = _this2.renderSelect(id, fs.config.placeholder, select); + var heightStyle = !fs.config.height || fs.config.height == 'auto' ? '' : 'xm-hg style="height: 34px;"'; + var inputHtml = ['
', '', '
']; + var reElem = $('
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t' + inputHtml.join('') + '\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
' + dinfo + '
\n\t\t\t\t
'); + + var $parent = $('
'); + $parent.append(reElem); + othis.after($parent); + othis.attr('lay-ignore', ''); + othis.removeAttr('name') && othis.attr('_name', fs.config.formname); + othis.removeAttr('lay-verify') && othis.attr('_lay-verify', fs.config.layverify); + + //如果可搜索, 加上事件 + if (fs.config.isSearch) { + ajaxs[id] = $.extend({}, ajax, { searchUrl: fs.config.searchUrl }, ajaxs[id]); + $(document).on('input', 'div.' + PNAME + '[FS_ID="' + id + '"] .' + INPUT, function (e) { + _this2.search(id, e, fs.config.searchUrl); + }); + if (fs.config.searchUrl) { + //触发第一次请求事件 + _this2.triggerSearch(reElem, true); + } + } else { + //隐藏第二个dl + reElem.find('dl dd.' + FORM_DL_INPUT).css('display', 'none'); + } + }); + }; + + Common.prototype.search = function (id, e, searchUrl, call) { + var _this3 = this; + + var input = void 0; + if (call) { + input = call; + } else { + input = e.target; + var keyCode = e.keyCode; + if (keyCode === 9 || keyCode === 13 || keyCode === 37 || keyCode === 38 || keyCode === 39 || keyCode === 40) { + return false; + } + } + var inputValue = $.trim(input.value); + //过滤一下tips + this.changePlaceHolder($(input)); + + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + searchUrl = ajaxConfig.searchUrl || searchUrl; + var fs = data[id], + isCreate = fs.config.isCreate, + reElem = $('dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + //如果开启了远程搜索 + if (searchUrl) { + if (ajaxConfig.searchVal) { + inputValue = ajaxConfig.searchVal; + ajaxConfig.searchVal = ''; + } + if (!ajaxConfig.beforeSearch || ajaxConfig.beforeSearch && ajaxConfig.beforeSearch instanceof Function && ajaxConfig.beforeSearch(id, searchUrl, inputValue)) { + var delay = ajaxConfig.delay; + if (ajaxConfig.first) { + ajaxConfig.first = false; + delay = 10; + } + clearTimeout(fs.clearid); + fs.clearid = setTimeout(function () { + reElem.find('dl > *:not(.' + FORM_SELECT_TIPS + ')').remove(); + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text('请求中'); + _this3.ajax(id, searchUrl, inputValue, false, null, true); + }, delay); + } + } else { + reElem.find('dl .' + DD_HIDE).removeClass(DD_HIDE); + //遍历选项, 选择可以显示的值 + reElem.find('dl dd:not(.' + FORM_SELECT_TIPS + ')').each(function (idx, item) { + var _item = $(item); + var searchFun = events.filter[id] || data[id].config.filter; + if (searchFun && searchFun(id, inputValue, _this3.getItem(id, _item), _item.hasClass(DISABLED)) == true) { + _item.addClass(DD_HIDE); + } + }); + //控制分组名称 + reElem.find('dl dt').each(function (index, item) { + if (!$(item).nextUntil('dt', ':not(.' + DD_HIDE + ')').length) { + $(item).addClass(DD_HIDE); + } + }); + //动态创建 + this.create(id, isCreate, inputValue); + var shows = reElem.find('dl dd:not(.' + FORM_SELECT_TIPS + '):not(.' + DD_HIDE + ')'); + if (!shows.length) { + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text('无匹配项'); + } else { + reElem.find('dd.' + FORM_NONE).removeClass(FORM_EMPTY); + } + } + }; + + Common.prototype.isArray = function (obj) { + return Object.prototype.toString.call(obj) == "[object Array]"; + }; + + Common.prototype.triggerSearch = function (div, isCall) { + var _this4 = this; + + (div ? [div] : $('.' + FORM_SELECT).toArray()).forEach(function (reElem, index) { + reElem = $(reElem); + var id = reElem.find('dl').attr('xid'); + if (id && data[id] && data[id].config.isEmpty || isCall) { + _this4.search(id, null, null, data[id].config.searchType == 0 ? reElem.find('.' + LABEL + ' .' + INPUT) : reElem.find('dl .' + FORM_DL_INPUT + ' .' + INPUT)); + } + }); + }; + + Common.prototype.clearInput = function (id) { + var div = $('.' + PNAME + '[fs_id="' + id + '"]'); + var input = data[id].config.searchType == 0 ? div.find('.' + LABEL + ' .' + INPUT) : div.find('dl .' + FORM_DL_INPUT + ' .' + INPUT); + input.val(''); + }; + + Common.prototype.ajax = function (id, searchUrl, inputValue, isLinkage, linkageWidth, isSearch, successCallback, isReplace) { + var _this5 = this; + + var reElem = $('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + if (!reElem[0] || !searchUrl) { + return; + } + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var ajaxData = $.extend(true, {}, ajaxConfig.data); + ajaxData[ajaxConfig.searchName] = inputValue; + //是否需要对ajax添加随机时间 + //ajaxData['_'] = Date.now(); + $.ajax({ + type: ajaxConfig.type, + headers: ajaxConfig.header, + url: searchUrl, + data: ajaxConfig.dataType == 'json' ? JSON.stringify(ajaxData) : ajaxData, + success: function success(res) { + if (typeof res == 'string') { + res = JSON.parse(res); + } + ajaxConfig.beforeSuccess && ajaxConfig.beforeSuccess instanceof Function && (res = ajaxConfig.beforeSuccess(id, searchUrl, inputValue, res)); + if (_this5.isArray(res)) { + var newRes = {}; + newRes[ajaxConfig.response.statusName] = ajaxConfig.response.statusCode; + newRes[ajaxConfig.response.msgName] = ""; + newRes[ajaxConfig.response.dataName] = res; + res = newRes; + } + if (res[ajaxConfig.response.statusName] != ajaxConfig.response.statusCode) { + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text(res[ajaxConfig.response.msgName]); + } else { + reElem.find('dd.' + FORM_NONE).removeClass(FORM_EMPTY); + _this5.renderData(id, res[ajaxConfig.response.dataName], isLinkage, linkageWidth, isSearch, isReplace); + data[id].config.isEmpty = res[ajaxConfig.response.dataName].length == 0; + } + successCallback && successCallback(id); + ajaxConfig.success && ajaxConfig.success instanceof Function && ajaxConfig.success(id, searchUrl, inputValue, res); + }, + error: function error(err) { + reElem.find('dd[lay-value]:not(.' + FORM_SELECT_TIPS + ')').remove(); + reElem.find('dd.' + FORM_NONE).addClass(FORM_EMPTY).text('服务异常'); + ajaxConfig.error && ajaxConfig.error instanceof Function && ajaxConfig.error(id, searchUrl, inputValue, err); + } + }); + }; + + Common.prototype.renderData = function (id, dataArr, linkage, linkageWidth, isSearch, isReplace) { + var _this6 = this; + + if (linkage) { + //渲染多级联动 + this.renderLinkage(id, dataArr, linkageWidth); + return; + } + if (isReplace) { + this.renderReplace(id, dataArr); + return; + } + + var reElem = $('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var pcInput = reElem.find('.' + TDIV + ' input'); + + dataArr = this.exchangeData(id, dataArr); + var values = []; + reElem.find('dl').html(this.renderSelect(id, pcInput.attr('placeholder') || pcInput.attr('back'), dataArr.map(function (item) { + var itemVal = $.extend({}, item, { + innerHTML: item[ajaxConfig.keyName], + value: item[ajaxConfig.keyVal], + sel: item[ajaxConfig.keySel], + disabled: item[ajaxConfig.keyDis], + type: item.type, + name: item[ajaxConfig.keyName] + }); + if (itemVal.sel) { + values.push(itemVal); + } + return itemVal; + }))); + + var label = reElem.find('.' + LABEL); + var dl = reElem.find('dl[xid]'); + if (isSearch) { + //如果是远程搜索, 这里需要判重 + var oldVal = data[id].values; + oldVal.forEach(function (item, index) { + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + }); + values.forEach(function (item, index) { + if (_this6.indexOf(oldVal, item) == -1) { + _this6.addLabel(id, label, item); + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + oldVal.push(item); + } + }); + } else { + values.forEach(function (item, index) { + _this6.addLabel(id, label, item); + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + }); + data[id].values = values; + } + this.commonHandler(id, label); + }; + + Common.prototype.renderLinkage = function (id, dataArr, linkageWidth) { + var result = [], + index = 0, + temp = { "0": dataArr }, + ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + db[id] = {}; + + var _loop = function _loop() { + var group = result[index++] = [], + _temp = temp; + temp = {}; + $.each(_temp, function (pid, arr) { + $.each(arr, function (idx, item) { + var val = { + pid: pid, + name: item[ajaxConfig.keyName], + value: item[ajaxConfig.keyVal] + }; + db[id][val.value] = $.extend(item, val); + group.push(val); + var children = item[ajaxConfig.keyChildren]; + if (children && children.length) { + temp[val.value] = children; + } + }); + }); + }; + + do { + _loop(); + } while (Object.getOwnPropertyNames(temp).length); + + var reElem = $('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT); + var html = ['
']; + + $.each(result, function (idx, arr) { + var groupDiv = ['
']; + $.each(arr, function (idx2, item) { + var span = '
  • ' + item.name + '
  • '; + groupDiv.push(span); + }); + groupDiv.push('
    '); + html = html.concat(groupDiv); + }); + html.push('
    '); + html.push('
    '); + reElem.find('dl').html(html.join('')); + reElem.find('.' + INPUT).css('display', 'none'); //联动暂时不支持搜索 + }; + + Common.prototype.renderReplace = function (id, dataArr) { + var _this7 = this; + + var dl = $('.' + PNAME + ' dl[xid="' + id + '"]'); + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + + dataArr = this.exchangeData(id, dataArr); + db[id] = dataArr; + + var html = dataArr.map(function (item) { + var itemVal = $.extend({}, item, { + innerHTML: item[ajaxConfig.keyName], + value: item[ajaxConfig.keyVal], + sel: item[ajaxConfig.keySel], + disabled: item[ajaxConfig.keyDis], + type: item.type, + name: item[ajaxConfig.keyName] + }); + return _this7.createDD(id, itemVal); + }).join(''); + + dl.find('dd:not(.' + FORM_SELECT_TIPS + '),dt:not([style])').remove(); + dl.find('dt[style]').after($(html)); + }; + + Common.prototype.exchangeData = function (id, arr) { + //这里处理树形结构 + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var childrenName = ajaxConfig['keyChildren']; + var disabledName = ajaxConfig['keyDis']; + db[id] = {}; + var result = this.getChildrenList(arr, childrenName, disabledName, [], false); + return result; + }; + + Common.prototype.getChildrenList = function (arr, childrenName, disabledName, pid, disabled) { + var result = [], + offset = 0; + for (var a = 0; a < arr.length; a++) { + var item = arr[a]; + if (item.type && item.type == 'optgroup') { + result.push(item); + continue; + } else { + offset++; + } + var parentIds = pid.concat([]); + parentIds.push(offset - 1 + '_E'); + item[FORM_TEAM_PID] = JSON.stringify(parentIds); + item[disabledName] = item[disabledName] || disabled; + result.push(item); + var child = item[childrenName]; + if (child && common.isArray(child) && child.length) { + item['XM_TREE_FOLDER'] = true; + var pidArr = parentIds.concat([]); + var childResult = this.getChildrenList(child, childrenName, disabledName, pidArr, item[disabledName]); + result = result.concat(childResult); + } + } + return result; + }; + + Common.prototype.create = function (id, isCreate, inputValue) { + if (isCreate && inputValue) { + var fs = data[id], + dl = $('[xid="' + id + '"]'), + tips = dl.find('dd.' + FORM_SELECT_TIPS + '.' + FORM_DL_INPUT), + tdd = null, + temp = dl.find('dd.' + TEMP); + dl.find('dd:not(.' + FORM_SELECT_TIPS + '):not(.' + TEMP + ')').each(function (index, item) { + if (inputValue == $(item).find('span').attr('name')) { + tdd = item; + } + }); + if (!tdd) { + //如果不存在, 则创建 + var val = fs.config.create(id, inputValue); + if (temp[0]) { + temp.attr('lay-value', val); + temp.find('span').text(inputValue); + temp.find('span').attr("name", inputValue); + temp.removeClass(DD_HIDE); + } else { + tips.after($(this.createDD(id, { + name: inputValue, + innerHTML: inputValue, + value: val + }, TEMP + ' ' + CREATE_LONG))); + } + } + } else { + $('[xid=' + id + '] dd.' + TEMP).remove(); + } + }; + + Common.prototype.createDD = function (id, item, clz) { + var ajaxConfig = ajaxs[id] ? ajaxs[id] : ajax; + var name = $.trim(item.innerHTML); + db[id][item.value] = $(item).is('option') ? item = function () { + var resultItem = {}; + resultItem[ajaxConfig.keyName] = name; + resultItem[ajaxConfig.keyVal] = item.value; + resultItem[ajaxConfig.keyDis] = item.disabled; + return resultItem; + }() : item; + var template = data[id].config.template(id, item); + var pid = item[FORM_TEAM_PID]; + pid ? pid = JSON.parse(pid) : pid = [-1]; + var attr = pid[0] == -1 ? '' : 'tree-id="' + pid.join('-') + '" tree-folder="' + !!item['XM_TREE_FOLDER'] + '"'; + return '
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t\n\t\t\t\t\t\t' + template + '\n\t\t\t\t\t
    \n\t\t\t\t
    '; + }; + + Common.prototype.createQuickBtn = function (obj, right) { + return '
    ' + obj.name + '
    '; + }; + + Common.prototype.renderBtns = function (id, show, right) { + var _this8 = this; + + var quickBtn = []; + var dl = $('dl[xid="' + id + '"]'); + quickBtn.push('
    '); + $.each(data[id].config.btns, function (index, item) { + quickBtn.push(_this8.createQuickBtn(item, right)); + }); + quickBtn.push('
    '); + quickBtn.push(this.createQuickBtn({ icon: 'xm-iconfont icon-caidan', name: '' })); + return quickBtn.join(''); + }; + + Common.prototype.renderSelect = function (id, tips, select) { + var _this9 = this; + + db[id] = {}; + var arr = []; + if (data[id].config.btns.length) { + setTimeout(function () { + var dl = $('dl[xid="' + id + '"]'); + dl.parents('.' + FORM_SELECT).attr(SEARCH_TYPE, data[id].config.searchType); + dl.find('.' + CZ_GROUP).css('max-width', dl.prev().width() - 54 + 'px'); + }, 10); + arr.push(['
    ', this.renderBtns(id, null, '30px'), '
    ', '
    ', '', '', '
    '].join('')); + } else { + arr.push('
    ' + tips + '
    '); + } + if (this.isArray(select)) { + $(select).each(function (index, item) { + if (item) { + if (item.type && item.type === 'optgroup') { + arr.push('
    ' + item.name + '
    '); + } else { + arr.push(_this9.createDD(id, item)); + } + } + }); + } else { + $(select).find('*').each(function (index, item) { + if (item.tagName.toLowerCase() == 'option' && index == 0 && !item.value) { + return; + } + if (item.tagName.toLowerCase() === 'optgroup') { + arr.push('
    ' + item.label + '
    '); + } else { + arr.push(_this9.createDD(id, item)); + } + }); + } + arr.push('
    '); + arr.push('
    \u6CA1\u6709\u9009\u9879
    '); + return arr.join(''); + }; + + Common.prototype.on = function () { + var _this10 = this; + + //事件绑定 + this.one(); + + $(document).on('click', function (e) { + if (!$(e.target).parents('.' + FORM_TITLE)[0]) { + //清空input中的值 + $('.' + PNAME + ' dl .' + DD_HIDE).removeClass(DD_HIDE); + $('.' + PNAME + ' dl dd.' + FORM_EMPTY).removeClass(FORM_EMPTY); + $('.' + PNAME + ' dl dd.' + TEMP).remove(); + $.each(data, function (key, fs) { + _this10.clearInput(key); + if (!fs.values.length) { + _this10.changePlaceHolder($('div[FS_ID="' + key + '"] .' + LABEL)); + } + }); + } + $('.' + PNAME + ' .' + FORM_SELECTED).each(function (index, item) { + _this10.changeShow($(item).find('.' + FORM_TITLE), false); + }); + }); + }; + + Common.prototype.calcLabelLeft = function (label, w, call) { + var pos = this.getPosition(label[0]); + pos.y = pos.x + label[0].clientWidth; + var left = label[0].offsetLeft; + if (!label.find('span').length) { + left = 0; + } else if (call) { + //校正归位 + var span = label.find('span:last'); + span.css('display') == 'none' ? span = span.prev()[0] : span = span[0]; + var spos = this.getPosition(span); + spos.y = spos.x + span.clientWidth; + + if (spos.y > pos.y) { + left = left - (spos.y - pos.y) - 5; + } else { + left = 0; + } + } else { + if (w < 0) { + var _span = label.find(':last'); + _span.css('display') == 'none' ? _span = _span.prev()[0] : _span = _span[0]; + var _spos = this.getPosition(_span); + _spos.y = _spos.x + _span.clientWidth; + if (_spos.y > pos.y) { + left -= 10; + } + } else { + if (left < 0) { + left += 10; + } + if (left > 0) { + left = 0; + } + } + } + label.css('left', left + 'px'); + }; + + Common.prototype.one = function (target) { + var _this11 = this; + + //一次性事件绑定 + $(target ? target : document).off('click', '.' + FORM_TITLE).on('click', '.' + FORM_TITLE, function (e) { + var othis = $(e.target), + title = othis.is(FORM_TITLE) ? othis : othis.parents('.' + FORM_TITLE), + dl = title.next(), + id = dl.attr('xid'); + + //清空非本select的input val + $('dl[xid]').not(dl).each(function (index, item) { + _this11.clearInput($(item).attr('xid')); + }); + $('dl[xid]').not(dl).find('dd.' + DD_HIDE).removeClass(DD_HIDE); + + //如果是disabled select + if (title.hasClass(DIS)) { + return false; + } + //如果点击的是右边的三角或者只读的input + if (othis.is('.' + SANJIAO) || othis.is('.' + INPUT + '[readonly]')) { + _this11.changeShow(title, !title.parents('.' + FORM_SELECT).hasClass(FORM_SELECTED)); + return false; + } + //如果点击的是input的右边, focus一下 + if (title.find('.' + INPUT + ':not(readonly)')[0]) { + var input = title.find('.' + INPUT), + epos = { x: e.pageX, y: e.pageY }, + pos = _this11.getPosition(title[0]), + width = title.width(); + while (epos.x > pos.x) { + if ($(document.elementFromPoint(epos.x, epos.y)).is(input)) { + input.focus(); + _this11.changeShow(title, true); + return false; + } + epos.x -= 50; + } + } + + //如果点击的是可搜索的input + if (othis.is('.' + INPUT)) { + _this11.changeShow(title, true); + return false; + } + //如果点击的是x按钮 + if (othis.is('i[fsw="' + NAME + '"]')) { + var val = _this11.getItem(id, othis), + dd = dl.find('dd[lay-value=\'' + val.value + '\']'); + if (dd.hasClass(DISABLED)) { + //如果是disabled状态, 不可选, 不可删 + return false; + } + _this11.handlerLabel(id, dd, false, val); + return false; + } + + _this11.changeShow(title, !title.parents('.' + FORM_SELECT).hasClass(FORM_SELECTED)); + return false; + }); + $(target ? target : document).off('click', 'dl.' + DL).on('click', 'dl.' + DL, function (e) { + var othis = $(e.target); + if (othis.is('.' + LINKAGE) || othis.parents('.' + LINKAGE)[0]) { + //linkage的处理 + othis = othis.is('li') ? othis : othis.parents('li[xm-value]'); + var _group = othis.parents('.xm-select-linkage-group'), + _id = othis.parents('dl').attr('xid'); + if (!_id) { + return false; + } + //激活li + _group.find('.xm-select-active').removeClass('xm-select-active'); + othis.addClass('xm-select-active'); + //激活下一个group, 激活前显示对应数据 + _group.nextAll('.xm-select-linkage-group').addClass('xm-select-linkage-hide'); + var nextGroup = _group.next('.xm-select-linkage-group'); + nextGroup.find('li').addClass('xm-select-linkage-hide'); + nextGroup.find('li[pid="' + othis.attr('xm-value') + '"]').removeClass('xm-select-linkage-hide'); + //如果没有下一个group, 或没有对应的值 + if (!nextGroup[0] || nextGroup.find('li:not(.xm-select-linkage-hide)').length == 0) { + var vals = [], + index = 0, + isAdd = !othis.hasClass('xm-select-this'); + if (data[_id].config.radio) { + othis.parents('.xm-select-linkage').find('.xm-select-this').removeClass('xm-select-this'); + } + do { + vals[index++] = { + name: othis.find('span').text(), + value: othis.attr('xm-value') + }; + othis = othis.parents('.xm-select-linkage-group').prev().find('li[xm-value="' + othis.attr('pid') + '"]'); + } while (othis.length); + vals.reverse(); + var val = { + name: vals.map(function (item) { + return item.name; + }).join('/'), + value: vals.map(function (item) { + return item.value; + }).join('/') + }; + _this11.handlerLabel(_id, null, isAdd, val); + } else { + nextGroup.removeClass('xm-select-linkage-hide'); + } + return false; + } + + if (othis.is('dl')) { + return false; + } + + if (othis.is('dt')) { + othis.nextUntil('dt').each(function (index, item) { + item = $(item); + if (item.hasClass(DISABLED) || item.hasClass(THIS)) {} else { + item.find('i:not(.icon-expand)').click(); + } + }); + return false; + } + var dd = othis.is('dd') ? othis : othis.parents('dd'); + var id = dd.parent('dl').attr('xid'); + + if (dd.hasClass(DISABLED)) { + //被禁用选项的处理 + return false; + } + + //菜单功效 + if (othis.is('i.icon-caidan')) { + var opens = [], + closes = []; + othis.parents('dl').find('dd[tree-folder="true"]').each(function (index, item) { + $(item).attr('xm-tree-hidn') == undefined ? opens.push(item) : closes.push(item); + }); + var arr = closes.length ? closes : opens; + arr.forEach(function (item) { + return item.click(); + }); + return false; + } + //树状结构的选择 + var treeId = dd.attr('tree-id'); + if (treeId) { + //忽略右边的图标 + if (othis.is('i:not(.icon-expand)')) { + _this11.handlerLabel(id, dd, !dd.hasClass(THIS)); + return false; + } + var ajaxConfig = ajaxs[id] || ajax; + var treeConfig = ajaxConfig.tree; + var childrens = dd.nextAll('dd[tree-id^="' + treeId + '"]'); + if (childrens && childrens.length) { + var len = childrens[0].clientHeight; + len ? (_this11.addTreeHeight(dd, len), len = 0) : (len = dd.attr('xm-tree-hidn') || 36, dd.removeAttr('xm-tree-hidn'), dd.find('>i').remove(), childrens = childrens.filter(function (index, item) { + return $(item).attr('tree-id').split('-').length - 1 == treeId.split('-').length; + })); + childrens.animate({ + height: len + }, 150); + return false; + } else { + if (treeConfig.nextClick && treeConfig.nextClick instanceof Function) { + treeConfig.nextClick(id, _this11.getItem(id, dd), function (res) { + if (!res || !res.length) { + _this11.handlerLabel(id, dd, !dd.hasClass(THIS)); + } else { + dd.attr('tree-folder', 'true'); + var ddChilds = []; + res.forEach(function (item, idx) { + item.innerHTML = item[ajaxConfig.keyName]; + item[FORM_TEAM_PID] = JSON.stringify(treeId.split('-').concat([idx])); + ddChilds.push(_this11.createDD(id, item)); + db[id][item[ajaxConfig.keyVal]] = item; + }); + dd.after(ddChilds.join('')); + } + }); + return false; + } + } + } + + if (dd.hasClass(FORM_SELECT_TIPS)) { + //tips的处理 + var btn = othis.is('.' + CZ) ? othis : othis.parents('.' + CZ); + if (!btn[0]) { + return false; + } + var method = btn.attr('method'); + var obj = data[id].config.btns.filter(function (bean) { + return bean.name == method; + })[0]; + obj && obj.click && obj.click instanceof Function && obj.click(id, _this11); + return false; + } + _this11.handlerLabel(id, dd, !dd.hasClass(THIS)); + return false; + }); + }; + + Common.prototype.addTreeHeight = function (dd, len) { + var _this12 = this; + + var treeId = dd.attr('tree-id'); + var childrens = dd.nextAll('dd[tree-id^="' + treeId + '"]'); + if (childrens.length) { + dd.append(''); + dd.attr('xm-tree-hidn', len); + childrens.each(function (index, item) { + var that = $(item); + _this12.addTreeHeight(that, len); + }); + } + }; + + var db = {}; + Common.prototype.getItem = function (id, value) { + if (value instanceof $) { + if (value.is('i[fsw="' + NAME + '"]')) { + var span = value.parent(); + return db[id][value] || { + name: span.find('font').text(), + value: span.attr('value') + }; + } + var val = value.attr('lay-value'); + return !db[id][val] ? db[id][val] = { + name: value.find('span[name]').attr('name'), + value: val + } : db[id][val]; + } else if (typeof value == 'string' && value.indexOf('/') != -1) { + return db[id][value] || { + name: this.valToName(id, value), + value: value + }; + } + return db[id][value]; + }; + + Common.prototype.linkageAdd = function (id, val) { + var dl = $('dl[xid="' + id + '"]'); + dl.find('.xm-select-active').removeClass('xm-select-active'); + var vs = val.value.split('/'); + var pid = void 0, + li = void 0, + index = 0; + var lis = []; + do { + pid = vs[index]; + li = dl.find('.xm-select-linkage-group' + (index + 1) + ' li[xm-value="' + pid + '"]'); + li[0] && lis.push(li); + index++; + } while (li.length && pid != undefined); + if (lis.length == vs.length) { + $.each(lis, function (idx, item) { + item.addClass('xm-select-this'); + }); + } + }; + + Common.prototype.linkageDel = function (id, val) { + var dl = $('dl[xid="' + id + '"]'); + var vs = val.value.split('/'); + var pid = void 0, + li = void 0, + index = vs.length - 1; + do { + pid = vs[index]; + li = dl.find('.xm-select-linkage-group' + (index + 1) + ' li[xm-value="' + pid + '"]'); + if (!li.parent().next().find('li[pid=' + pid + '].xm-select-this').length) { + li.removeClass('xm-select-this'); + } + index--; + } while (li.length && pid != undefined); + }; + + Common.prototype.valToName = function (id, val) { + var dl = $('dl[xid="' + id + '"]'); + var vs = (val + "").split('/'); + if (!vs.length) { + return null; + } + var names = []; + $.each(vs, function (idx, item) { + var name = dl.find('.xm-select-linkage-group' + (idx + 1) + ' li[xm-value="' + item + '"] span').text(); + names.push(name); + }); + return names.length == vs.length ? names.join('/') : null; + }; + + Common.prototype.commonHandler = function (key, label) { + if (!label || !label[0]) { + return; + } + this.checkHideSpan(key, label); + //计算input的提示语 + this.changePlaceHolder(label); + //计算高度 + this.retop(label.parents('.' + FORM_SELECT)); + this.calcLabelLeft(label, 0, true); + //表单默认值 + this.setHidnVal(key, label); + //title值 + label.parents('.' + FORM_TITLE + ' .' + NAME).attr('title', data[key].values.map(function (val) { + return val.name; + }).join(',')); + }; + + Common.prototype.initVal = function (id) { + var _this13 = this; + + var target = {}; + if (id) { + target[id] = data[id]; + } else { + target = data; + } + $.each(target, function (key, val) { + var values = val.values, + div = $('dl[xid="' + key + '"]').parent(), + label = div.find('.' + LABEL), + dl = div.find('dl'); + dl.find('dd.' + THIS).removeClass(THIS); + + var _vals = values.concat([]); + _vals.concat([]).forEach(function (item, index) { + _this13.addLabel(key, label, item); + dl.find('dd[lay-value="' + item.value + '"]').addClass(THIS); + }); + if (val.config.radio) { + _vals.length && values.push(_vals[_vals.length - 1]); + } + _this13.commonHandler(key, label); + }); + }; + + Common.prototype.setHidnVal = function (key, label) { + if (!label || !label[0]) { + return; + } + label.parents('.' + PNAME).find('.' + HIDE_INPUT).val(data[key].values.map(function (val) { + return val.value; + }).join(',')); + }; + + Common.prototype.handlerLabel = function (id, dd, isAdd, oval, notOn) { + var div = $('[xid="' + id + '"]').prev().find('.' + LABEL), + val = dd && this.getItem(id, dd), + vals = data[id].values, + on = data[id].config.on || events.on[id], + endOn = data[id].config.endOn || events.endOn[id]; + if (oval) { + val = oval; + } + var fs = data[id]; + if (isAdd && fs.config.max && fs.values.length >= fs.config.max) { + var maxTipsFun = events.maxTips[id] || data[id].config.maxTips; + maxTipsFun && maxTipsFun(id, vals.concat([]), val, fs.config.max); + return; + } + if (!notOn) { + if (on && on instanceof Function && on(id, vals.concat([]), val, isAdd, dd && dd.hasClass(DISABLED)) == false) { + return; + } + } + var dl = $('dl[xid="' + id + '"]'); + isAdd ? (dd && dd[0] ? (dd.addClass(THIS), dd.removeClass(TEMP)) : dl.find('.xm-select-linkage')[0] && this.linkageAdd(id, val), this.addLabel(id, div, val), vals.push(val)) : (dd && dd[0] ? dd.removeClass(THIS) : dl.find('.xm-select-linkage')[0] && this.linkageDel(id, val), this.delLabel(id, div, val), this.remove(vals, val)); + if (!div[0]) return; + //单选选完后直接关闭选择域 + if (fs.config.radio) { + this.changeShow(div, false); + } + //移除表单验证的红色边框 + div.parents('.' + FORM_TITLE).prev().removeClass('layui-form-danger'); + + //清空搜索值 + fs.config.clearInput && this.clearInput(id); + + this.commonHandler(id, div); + + !notOn && endOn && endOn instanceof Function && endOn(id, vals.concat([]), val, isAdd, dd && dd.hasClass(DISABLED)); + }; + + Common.prototype.addLabel = function (id, div, val) { + if (!val) return; + var tips = 'fsw="' + NAME + '"'; + var _ref = [$('' + val.name + ''), $('')], + $label = _ref[0], + $close = _ref[1]; + + $label.append($close); + //如果是radio模式 + var fs = data[id]; + if (fs.config.radio) { + fs.values.length = 0; + $('dl[xid="' + id + '"]').find('dd.' + THIS + ':not([lay-value="' + val.value + '"])').removeClass(THIS); + div.find('span').remove(); + } + //如果是固定高度 + div.find('input').css('width', '50px'); + div.find('input').before($label); + }; + + Common.prototype.delLabel = function (id, div, val) { + if (!val) return; + div.find('span[value="' + val.value + '"]:first').remove(); + }; + + Common.prototype.checkHideSpan = function (id, div) { + var parentHeight = div.parents('.' + NAME)[0].offsetHeight + 5; + div.find('span.xm-span-hide').removeClass('xm-span-hide'); + div.find('span[style]').remove(); + + var count = data[id].config.showCount; + div.find('span').each(function (index, item) { + if (index >= count) { + $(item).addClass('xm-span-hide'); + } + }); + + var prefix = div.find('span:eq(' + count + ')'); + prefix[0] && prefix.before($(' + ' + (div.find('span').length - count) + '')); + }; + + Common.prototype.retop = function (div) { + //计算dl显示的位置 + var dl = div.find('dl'), + top = div.offset().top + div.outerHeight() + 5 - $win.scrollTop(), + dlHeight = dl.outerHeight(); + var up = div.hasClass('layui-form-selectup') || dl.css('top').indexOf('-') != -1 || top + dlHeight > $win.height() && top >= dlHeight; + div = div.find('.' + NAME); + + var fs = data[dl.attr('xid')]; + var base = dl.parents('.layui-form-pane')[0] && dl.prev()[0].clientHeight > 38 ? 14 : 10; + if (fs && fs.config.direction == 'up' || up) { + up = true; + if (fs && fs.config.direction == 'down') { + up = false; + } + } + var reHeight = div[0].offsetTop + div.height() + base; + if (up) { + dl.css({ + top: 'auto', + bottom: reHeight + 3 + 'px' + }); + } else { + dl.css({ + top: reHeight + 'px', + bottom: 'auto' + }); + } + }; + + Common.prototype.changeShow = function (children, isShow) { + //显示于隐藏 + $('.layui-form-selected').removeClass('layui-form-selected'); + var top = children.parents('.' + FORM_SELECT), + realShow = top.hasClass(FORM_SELECTED), + id = top.find('dl').attr('xid'); + $('.' + PNAME + ' .' + FORM_SELECT).not(top).removeClass(FORM_SELECTED); + if (isShow) { + this.retop(top); + top.addClass(FORM_SELECTED); + top.find('.' + INPUT).focus(); + if (!top.find('dl dd[lay-value]:not(.' + FORM_SELECT_TIPS + ')').length) { + top.find('dl .' + FORM_NONE).addClass(FORM_EMPTY); + } + } else { + top.removeClass(FORM_SELECTED); + this.clearInput(id); + top.find('dl .' + FORM_EMPTY).removeClass(FORM_EMPTY); + top.find('dl dd.' + DD_HIDE).removeClass(DD_HIDE); + top.find('dl dd.' + TEMP).remove(); + //计算ajax数据是否为空, 然后重新请求数据 + if (id && data[id] && data[id].config.isEmpty) { + this.triggerSearch(top); + } + this.changePlaceHolder(top.find('.' + LABEL)); + } + if (isShow != realShow) { + var openFun = data[id].config.opened || events.opened[id]; + isShow && openFun && openFun instanceof Function && openFun(id); + var closeFun = data[id].config.closed || events.closed[id]; + !isShow && closeFun && closeFun instanceof Function && closeFun(id); + } + }; + + Common.prototype.changePlaceHolder = function (div) { + //显示于隐藏提示语 + //调整pane模式下的高度 + var title = div.parents('.' + FORM_TITLE); + title[0] || (title = div.parents('dl').prev()); + if (!title[0]) { + return; + } + + var id = div.parents('.' + PNAME).find('dl[xid]').attr('xid'); + if (data[id] && data[id].config.height) {//既然固定高度了, 那就看着办吧 + + } else { + var height = title.find('.' + NAME)[0].clientHeight; + title.css('height', (height > 36 ? height + 4 : height) + 'px'); + //如果是layui pane模式, 处理label的高度 + var label = title.parents('.' + PNAME).parent().prev(); + if (label.is('.layui-form-label') && title.parents('.layui-form-pane')[0]) { + height = height > 36 ? height + 4 : height; + title.css('height', height + 'px'); + label.css({ + height: height + 2 + 'px', + lineHeight: height - 18 + 'px' + }); + } + } + + var input = title.find('.' + TDIV + ' input'), + isShow = !div.find('span:last')[0] && !title.find('.' + INPUT).val(); + if (isShow) { + var ph = input.attr('back'); + input.removeAttr('back'); + input.attr('placeholder', ph); + } else { + var _ph = input.attr('placeholder'); + input.removeAttr('placeholder'); + input.attr('back', _ph); + } + }; + + Common.prototype.indexOf = function (arr, val) { + for (var i = 0; i < arr.length; i++) { + if (arr[i].value == val || arr[i].value == (val ? val.value : val) || arr[i] == val || JSON.stringify(arr[i]) == JSON.stringify(val)) { + return i; + } + } + return -1; + }; + + Common.prototype.remove = function (arr, val) { + var idx = this.indexOf(arr, val ? val.value : val); + if (idx > -1) { + arr.splice(idx, 1); + return true; + } + return false; + }; + + Common.prototype.selectAll = function (id, isOn, skipDis) { + var _this14 = this; + + var dl = $('[xid="' + id + '"]'); + if (!dl[0]) { + return; + } + if (dl.find('.xm-select-linkage')[0]) { + return; + } + dl.find('dd[lay-value]:not(.' + FORM_SELECT_TIPS + '):not(.' + THIS + ')' + (skipDis ? ':not(.' + DISABLED + ')' : '')).each(function (index, item) { + item = $(item); + var val = _this14.getItem(id, item); + _this14.handlerLabel(id, dl.find('dd[lay-value="' + val.value + '"]'), true, val, !isOn); + }); + }; + + Common.prototype.removeAll = function (id, isOn, skipDis) { + var _this15 = this; + + var dl = $('[xid="' + id + '"]'); + if (!dl[0]) { + return; + } + if (dl.find('.xm-select-linkage')[0]) { + //针对多级联动的处理 + data[id].values.concat([]).forEach(function (item, idx) { + var vs = item.value.split('/'); + var pid = void 0, + li = void 0, + index = 0; + do { + pid = vs[index++]; + li = dl.find('.xm-select-linkage-group' + index + ':not(.xm-select-linkage-hide) li[xm-value="' + pid + '"]'); + li.click(); + } while (li.length && pid != undefined); + }); + return; + } + data[id].values.concat([]).forEach(function (item, index) { + if (skipDis && dl.find('dd[lay-value="' + item.value + '"]').hasClass(DISABLED)) {} else { + _this15.handlerLabel(id, dl.find('dd[lay-value="' + item.value + '"]'), false, item, !isOn); + } + }); + }; + + Common.prototype.reverse = function (id, isOn, skipDis) { + var _this16 = this; + + var dl = $('[xid="' + id + '"]'); + if (!dl[0]) { + return; + } + if (dl.find('.xm-select-linkage')[0]) { + return; + } + dl.find('dd[lay-value]:not(.' + FORM_SELECT_TIPS + ')' + (skipDis ? ':not(.' + DISABLED + ')' : '')).each(function (index, item) { + item = $(item); + var val = _this16.getItem(id, item); + _this16.handlerLabel(id, dl.find('dd[lay-value="' + val.value + '"]'), !item.hasClass(THIS), val, !isOn); + }); + }; + + Common.prototype.skin = function (id) { + var skins = ['default', 'primary', 'normal', 'warm', 'danger']; + var skin = skins[Math.floor(Math.random() * skins.length)]; + $('dl[xid="' + id + '"]').parents('.' + PNAME).find('.' + FORM_SELECT).attr('xm-select-skin', skin); + this.check(id) && this.commonHandler(id, $('dl[xid="' + id + '"]').parents('.' + PNAME).find('.' + LABEL)); + }; + + Common.prototype.getPosition = function (e) { + var x = 0, + y = 0; + while (e != null) { + x += e.offsetLeft; + y += e.offsetTop; + e = e.offsetParent; + } + return { x: x, y: y }; + }; + + Common.prototype.onreset = function () { + //监听reset按钮, 然后重置多选 + $(document).on('click', '[type=reset]', function (e) { + $(e.target).parents('form').find('.' + PNAME + ' dl[xid]').each(function (index, item) { + var id = item.getAttribute('xid'), + dl = $(item), + dd = void 0, + temp = {}; + common.removeAll(id); + data[id].config.init.forEach(function (val, idx) { + if (val && (!temp[val] || data[id].config.repeat) && (dd = dl.find('dd[lay-value="' + val.value + '"]'))[0]) { + common.handlerLabel(id, dd, true); + temp[val] = 1; + } + }); + }); + }); + }; + + Common.prototype.bindEvent = function (name, id, fun) { + if (id && id instanceof Function) { + fun = id; + id = null; + } + if (fun && fun instanceof Function) { + if (!id) { + $.each(data, function (id, val) { + data[id] ? data[id].config[name] = fun : events[name][id] = fun; + }); + } else { + data[id] ? (data[id].config[name] = fun, delete events[name][id]) : events[name][id] = fun; + } + } + }; + + Common.prototype.check = function (id, notAutoRender) { + if ($('dl[xid="' + id + '"]').length) { + return true; + } else if ($('select[xm-select="' + id + '"]').length) { + if (!notAutoRender) { + this.render(id, $('select[xm-select="' + id + '"]')); + return true; + } + } else { + delete data[id]; + return false; + } + }; + + Common.prototype.render = function (id, select) { + common.init(select); + common.one($('dl[xid="' + id + '"]').parents('.' + PNAME)); + common.initVal(id); + }; + + Common.prototype.log = function (obj) { + console.log(obj); + }; + + var Select4 = function Select4() { + this.v = v; + this.render(); + }; + var common = new Common(); + + Select4.prototype.value = function (id, type, isAppend) { + if (typeof id != 'string') { + return []; + } + var fs = data[id]; + if (!common.check(id)) { + return []; + } + if (typeof type == 'string' || type == undefined) { + var arr = fs.values.concat([]) || []; + if (type == 'val') { + return arr.map(function (val) { + return val.value; + }); + } + if (type == 'valStr') { + return arr.map(function (val) { + return val.value; + }).join(','); + } + if (type == 'name') { + return arr.map(function (val) { + return val.name; + }); + } + if (type == 'nameStr') { + return arr.map(function (val) { + return val.name; + }).join(','); + } + return arr; + } + if (common.isArray(type)) { + var dl = $('[xid="' + id + '"]'), + temp = {}, + dd = void 0, + isAdd = true; + if (isAppend == false) { + //删除传入的数组 + isAdd = false; + } else if (isAppend == true) { + //追加模式 + isAdd = true; + } else { + //删除原有的数据 + common.removeAll(id); + } + if (isAdd) { + fs.values.forEach(function (val, index) { + temp[val.value] = 1; + }); + } + type.forEach(function (val, index) { + if (val && (!temp[val] || fs.config.repeat)) { + if ((dd = dl.find('dd[lay-value="' + val + '"]'))[0]) { + common.handlerLabel(id, dd, isAdd, null, true); + temp[val] = 1; + } else { + var name = common.valToName(id, val); + if (name) { + common.handlerLabel(id, dd, isAdd, common.getItem(id, val), true); + temp[val] = 1; + } + } + } + }); + } + }; + + Select4.prototype.on = function (id, fun, isEnd) { + common.bindEvent(isEnd ? 'endOn' : 'on', id, fun); + return this; + }; + + Select4.prototype.filter = function (id, fun) { + common.bindEvent('filter', id, fun); + return this; + }; + + Select4.prototype.maxTips = function (id, fun) { + common.bindEvent('maxTips', id, fun); + return this; + }; + + Select4.prototype.opened = function (id, fun) { + common.bindEvent('opened', id, fun); + return this; + }; + + Select4.prototype.closed = function (id, fun) { + common.bindEvent('closed', id, fun); + return this; + }; + + Select4.prototype.config = function (id, config, isJson) { + if (id && (typeof id === 'undefined' ? 'undefined' : _typeof(id)) == 'object') { + isJson = config == true; + config = id; + id = null; + } + if (config && (typeof config === 'undefined' ? 'undefined' : _typeof(config)) == 'object') { + if (isJson) { + config.header || (config.header = {}); + config.header['Content-Type'] = 'application/json; charset=UTF-8'; + config.dataType = 'json'; + } + id ? (ajaxs[id] = $.extend(true, {}, ajaxs[id] || ajax, config), !common.check(id) && this.render(id), data[id] && config.direction && (data[id].config.direction = config.direction), data[id] && config.clearInput && (data[id].config.clearInput = true), config.searchUrl && data[id] && common.triggerSearch($('.' + PNAME + ' dl[xid="' + id + '"]').parents('.' + FORM_SELECT), true)) : ($.extend(true, ajax, config), $.each(ajaxs, function (key, item) { + $.extend(true, item, config); + })); + } + return this; + }; + + Select4.prototype.render = function (id, options) { + var _ref2; + + if (id && (typeof id === 'undefined' ? 'undefined' : _typeof(id)) == 'object') { + options = id; + id = null; + } + var config = options ? (_ref2 = { + init: options.init, + disabled: options.disabled, + max: options.max, + isSearch: options.isSearch, + searchUrl: options.searchUrl, + isCreate: options.isCreate, + radio: options.radio, + skin: options.skin, + direction: options.direction, + height: options.height, + formname: options.formname, + layverify: options.layverify, + layverType: options.layverType, + showCount: options.showCount, + placeholder: options.placeholder, + create: options.create, + filter: options.filter, + maxTips: options.maxTips, + on: options.on + }, _defineProperty(_ref2, 'on', options.on), _defineProperty(_ref2, 'opened', options.opened), _defineProperty(_ref2, 'closed', options.closed), _defineProperty(_ref2, 'template', options.template), _defineProperty(_ref2, 'clearInput', options.clearInput), _ref2) : {}; + + options && options.searchType != undefined && (config.searchType = options.searchType == 'dl' ? 1 : 0); + + if (id) { + fsConfigs[id] = {}; + $.extend(fsConfigs[id], data[id] ? data[id].config : {}, config); + } else { + $.extend(fsConfig, config); + } + + ($('select[' + NAME + '="' + id + '"]')[0] ? $('select[' + NAME + '="' + id + '"]') : $('select[' + NAME + ']')).each(function (index, select) { + var sid = select.getAttribute(NAME); + common.render(sid, select); + setTimeout(function () { + return common.setHidnVal(sid, $('select[xm-select="' + sid + '"] + div.' + PNAME + ' .' + LABEL)); + }, 10); + }); + return this; + }; + + Select4.prototype.disabled = function (id) { + var target = {}; + id ? common.check(id) && (target[id] = data[id]) : target = data; + + $.each(target, function (key, val) { + $('dl[xid="' + key + '"]').prev().addClass(DIS); + }); + return this; + }; + + Select4.prototype.undisabled = function (id) { + var target = {}; + id ? common.check(id) && (target[id] = data[id]) : target = data; + + $.each(target, function (key, val) { + $('dl[xid="' + key + '"]').prev().removeClass(DIS); + }); + return this; + }; + + Select4.prototype.data = function (id, type, config) { + if (!id || !type || !config) { + common.log('id: ' + id + ' param error !!!'); + return this; + } + if (!common.check(id)) { + common.log('id: ' + id + ' not render !!!'); + return this; + } + this.value(id, []); + this.config(id, config); + if (type == 'local') { + common.renderData(id, config.arr, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100'); + } else if (type == 'server') { + common.ajax(id, config.url, config.keyword, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100'); + } + return this; + }; + + Select4.prototype.btns = function (id, btns, config) { + if (id && common.isArray(id)) { + btns = id; + id = null; + } + if (!btns || !common.isArray(btns)) { + return this; + }; + var target = {}; + id ? common.check(id) && (target[id] = data[id]) : target = data; + + btns = btns.map(function (obj) { + if (typeof obj == 'string') { + if (obj == 'select') { + return quickBtns[0]; + } + if (obj == 'remove') { + return quickBtns[1]; + } + if (obj == 'reverse') { + return quickBtns[2]; + } + if (obj == 'skin') { + return quickBtns[3]; + } + } + return obj; + }); + + $.each(target, function (key, val) { + val.config.btns = btns; + var dd = $('dl[xid="' + key + '"]').find('.' + FORM_SELECT_TIPS + ':first'); + if (btns.length) { + var show = config && config.show && (config.show == 'name' || config.show == 'icon') ? config.show : ''; + var html = common.renderBtns(key, show, config && config.space ? config.space : '30px'); + dd.html(html); + } else { + var pcInput = dd.parents('.' + FORM_SELECT).find('.' + TDIV + ' input'); + var _html = pcInput.attr('placeholder') || pcInput.attr('back'); + dd.html(_html); + dd.removeAttr('style'); + } + }); + + return this; + }; + + Select4.prototype.search = function (id, val) { + if (id && common.check(id)) { + ajaxs[id] = $.extend(true, {}, ajaxs[id] || ajax, { + first: true, + searchVal: val + }); + common.triggerSearch($('dl[xid="' + id + '"]').parents('.' + FORM_SELECT), true); + } + return this; + }; + + Select4.prototype.replace = function (id, type, config) { + var _this17 = this; + + if (!id || !type || !config) { + common.log('id: ' + id + ' param error !!!'); + return this; + } + if (!common.check(id, true)) { + common.log('id: ' + id + ' not render !!!'); + return this; + } + var oldVals = this.value(id, 'val'); + this.value(id, []); + this.config(id, config); + if (type == 'local') { + common.renderData(id, config.arr, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100', false, true); + this.value(id, oldVals, true); + } else if (type == 'server') { + common.ajax(id, config.url, config.keyword, config.linkage == true, config.linkageWidth ? config.linkageWidth : '100', false, function (id) { + _this17.value(id, oldVals, true); + }, true); + } + }; + + return new Select4(); +}); \ No newline at end of file diff --git a/src/main/webapp/static/js/jquery-ui.min.js b/src/main/webapp/static/js/jquery-ui.min.js new file mode 100644 index 0000000..25398a1 --- /dev/null +++ b/src/main/webapp/static/js/jquery-ui.min.js @@ -0,0 +1,13 @@ +/*! jQuery UI - v1.12.1 - 2016-09-14 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("
    "))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>o;o++)for(i in n[o])s=n[o][i],n[o].hasOwnProperty(i)&&void 0!==s&&(e[i]=t.isPlainObject(s)?t.isPlainObject(e[i])?t.widget.extend({},e[i],s):t.widget.extend({},s):s);return e},t.widget.bridge=function(e,i){var s=i.prototype.widgetFullName||e;t.fn[e]=function(n){var o="string"==typeof n,a=l.call(arguments,1),r=this;return o?this.length||"instance"!==n?this.each(function(){var i,o=t.data(this,s);return"instance"===n?(r=o,!1):o?t.isFunction(o[n])&&"_"!==n.charAt(0)?(i=o[n].apply(o,a),i!==o&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+n+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+n+"'")}):r=void 0:(a.length&&(n=t.widget.extend.apply(null,[n].concat(a))),this.each(function(){var e=t.data(this,s);e?(e.option(n||{}),e._init&&e._init()):t.data(this,s,new i(n,this))})),r}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
    ",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=h++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
    "),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}});var c="ui-effects-",u="ui-effects-style",d="ui-effects-animated",p=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("

    ")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(p),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(p.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+"Class"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return"boolean"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,o=n.exec(t)||["",0,i,s,0];return{top:parseFloat(o[1])||0,right:"auto"===o[2]?i:parseFloat(o[2]),bottom:"auto"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(d)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(c+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(c+e[s]),t.css(e[s],i))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("

    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,s){return s||(s=i,i="effect"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s="horizontal"!==i?(e||100)/100:1,n="vertical"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(u,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(u)||"",t.removeData(u)},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css("position"),n=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),"float":e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=c+"placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(d),t.effects.cleanUp(r),"hide"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?"none"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(":hidden")?"hide"===l:"show"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||"fx",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(d,!0),c.push(s),o&&("show"===s||s===o&&"hide"===s)&&i.show(),o&&"none"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="show",this.effect.call(this,n) +}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("
    ").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("
    ").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define("fade","toggle",function(e,i){var s="show"===e.mode;t(this).css("opacity",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?["right","bottom"]:["bottom","right"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define("highlight","show",function(e,i){var s=t(this),n={backgroundColor:s.css("backgroundColor")};"hide"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var s,n,o,a=t(this),r=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.mode,u="effect"!==c,d=e.scale||"both",p=e.origin||["middle","center"],f=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},("box"===d||"both"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),("content"===d||"both"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),("content"===d||"both"===d)&&(h=h.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css("opacity",_.opacity),u||(a.css("position","static"===f?"relative":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define("pulsate","show",function(e,i){var s=t(this),n=e.mode,o="show"===n,a="hide"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(":visible"))&&(s.css("opacity",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define("shake",function(e,i){var s=1,n=t(this),o=e.direction||"left",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c="up"===o||"down"===o?"top":"left",u="up"===o||"left"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?"-=":"+=")+a,p[c]=(u?"+=":"-=")+2*a,f[c]=(u?"-=":"+=")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define("slide","show",function(e,i){var s,n,o=t(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},r=e.mode,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u=e.distance||o["top"===l?"outerHeight":"outerWidth"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],"show"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var f;t.uiBackCompat!==!1&&(f=t.effects.define("transfer",function(e,i){t(this).transfer(e,i)})),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t()}},_createIcons:function(){var e,i,s=this.options.icons;s&&(e=t(""),this._addClass(e,"ui-accordion-header-icon","ui-icon "+s.header),e.prependTo(this.headers),i=this.active.children(".ui-accordion-header-icon"),this._removeClass(i,s.header)._addClass(i,null,s.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void 0)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!t)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),t(o).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var t=this.headers,e=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),e&&(this._off(t.not(this.headers)),this._off(e.not(this.panels)))},_refresh:function(){var e,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=t(this),i=e.uniqueId().attr("id"),s=e.next(),n=s.uniqueId().attr("id");e.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(e=n.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===s&&(e=0,this.headers.next().each(function(){var i=t(this).is(":visible");i||t(this).show(),e=Math.max(e,t(this).css("height","").height()),i||t(this).hide()}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i,s,n=this.options,o=this.active,a=t(e.currentTarget),r=a[0]===o[0],h=r&&n.collapsible,l=h?t():a.next(),c=o.next(),u={oldHeader:o,oldPanel:c,newHeader:h?t():a,newPanel:l};e.preventDefault(),r&&!n.collapsible||this._trigger("beforeActivate",e,u)===!1||(n.active=h?!1:this.headers.index(a),this.active=r?t():a,this._toggle(u),this._removeClass(o,"ui-accordion-header-active","ui-state-active"),n.icons&&(i=o.children(".ui-accordion-header-icon"),this._removeClass(i,null,n.icons.activeHeader)._addClass(i,null,n.icons.header)),r||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),n.icons&&(s=a.children(".ui-accordion-header-icon"),this._removeClass(s,null,n.icons.header)._addClass(s,null,n.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(t(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(t,e,i){var s,n,o,a=this,r=0,h=t.css("box-sizing"),l=t.length&&(!e.length||t.index()",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,h=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=h.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=h.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n; +this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete;var g=/ui-corner-([a-z]){2,6}/g;t.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"
      ",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var e=this,i=[];t.each(this.options.items,function(s,n){var o,a={};return n?"controlgroupLabel"===s?(o=e.element.find(n),o.each(function(){var e=t(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("")}),e._addClass(o,null,"ui-widget ui-widget-content ui-state-default"),i=i.concat(o.get()),void 0):(t.fn[s]&&(a=e["_"+s+"Options"]?e["_"+s+"Options"]("middle"):{classes:{}},e.element.find(n).each(function(){var n=t(this),o=n[s]("instance"),r=t.widget.extend({},a);if("button"!==s||!n.parent(".ui-spinner").length){o||(o=n[s]()[s]("instance")),o&&(r.classes=e._resolveClassesValues(r.classes,o)),n[s](r);var h=n[s]("widget");t.data(h[0],"ui-controlgroup-data",o?o:n[s]("instance")),i.push(h[0])}})),void 0):void 0}),this.childWidgets=t(t.unique(i)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var i=t(this),s=i.data("ui-controlgroup-data");s&&s[e]&&s[e]()})},_updateCornerClass:function(t,e){var i="ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all",s=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,i),this._addClass(t,null,s)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:e?"auto":!1,classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(e,i){var s={};return t.each(e,function(n){var o=i.options.classes[n]||"";o=t.trim(o.replace(g,"")),s[n]=(o+" "+e[n]).replace(/\s+/g," ")}),s},_setOption:function(t,e){return"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"===t?(this._callChildMethod(e?"disable":"enable"),void 0):(this.refresh(),void 0)},refresh:function(){var e,i=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),e=this.childWidgets,this.options.onlyVisible&&(e=e.filter(":visible")),e.length&&(t.each(["first","last"],function(t,s){var n=e[s]().data("ui-controlgroup-data");if(n&&i["_"+n.widgetName+"Options"]){var o=i["_"+n.widgetName+"Options"](1===e.length?"only":s);o.classes=i._resolveClassesValues(o.classes,n),n.element[n.widgetName](o)}else i._updateCornerClass(e[s](),s)}),this._callChildMethod("refresh"))}}),t.widget("ui.checkboxradio",[t.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,i,s=this,n=this._super()||{};return this._readType(),i=this.element.labels(),this.label=t(i[i.length-1]),this.label.length||t.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){s.originalLabel+=3===this.nodeType?t(this).text():this.outerHTML}),this.originalLabel&&(n.label=this.originalLabel),e=this.element[0].disabled,null!=e&&(n.disabled=e),n},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||t.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e,i=this.element[0].name,s="input[name='"+t.ui.escapeSelector(i)+"']";return i?(e=this.form.length?t(this.form[0].elements).filter(s):t(s).filter(function(){return 0===t(this).form().length}),e.not(this.element)):t([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=t(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){return"label"!==t||e?(this._super(t,e),"disabled"===t?(this._toggleClass(this.label,null,"ui-state-disabled",e),this.element[0].disabled=e,void 0):(this.refresh(),void 0)):void 0},_updateIcon:function(e){var i="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=t(""),this.iconSpace=t(" "),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(i+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):i+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",i),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),t.ui.checkboxradio,t.widget("ui.button",{version:"1.12.1",defaultElement:"").addClass(this._triggerClass).html(o?t("").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.on("click",function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,n,o){var r,h,l,c,u,d=this._dialogInst;return d||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=t(""),this._dialogInput.on("keydown",this._doKeyDown),t("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},t.data(this._dialogInput[0],"datepicker",d)),a(d.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(d,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+c,l/2-150+u]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,"datepicker");s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),m===n&&(m=null))},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,"datepicker");n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,i,s){var n,o,r,h,l=this._getInst(e);return 2===arguments.length&&"string"==typeof i?"defaults"===i?t.extend({},t.datepicker._defaults):l?"all"===i?t.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),a(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),l),this._autoSize(l),this._setDate(l,o),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);return t.datepicker._get(n,"constrainInput")?(i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var s,n,o,r,h,l,c;s=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==s&&(t.datepicker._curInst.dpDiv.stop(!0,!0),s&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),n=t.datepicker._get(s,"beforeShow"),o=n?n.apply(e,[e,s]):{},o!==!1&&(a(s.settings,o),s.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(s),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),h={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,s.dpDiv.empty(),s.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(s),h=t.datepicker._checkOffset(s,h,r),s.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),s.inline||(l=t.datepicker._get(s,"showAnim"),c=t.datepicker._get(s,"duration"),s.dpDiv.css("z-index",i(t(e))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[l]?s.dpDiv.show(l,t.datepicker._get(s,"showOptions"),c):s.dpDiv[l||"show"](l?c:null),t.datepicker._shouldFocusInput(s)&&s.input.trigger("focus"),t.datepicker._curInst=s)) +}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,_=-1,v=-1,b=!1,y=function(t){var i=e.length>n+1&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n="y"===t?s:1,o=RegExp("^\\d{"+n+","+s+"}"),a=i.substring(h).match(o);if(!a)throw"Missing number at position "+h;return h+=a[0].length,parseInt(a[0],10)},k=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(o=e[0],h+=s.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+h},x=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;e.length>n;n++)if(b)"'"!==e.charAt(n)||y("'")?x():b=!1;else switch(e.charAt(n)){case"d":_=w("d");break;case"D":k("D",u,d);break;case"o":v=w("o");break;case"m":m=w("m");break;case"M":m=k("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,_=r.getDate();break;case"'":y("'")?x():b=!0;break;default:x()}if(i.length>h&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),v>-1)for(m=1,_=v;;){if(o=this._getDaysInMonth(g,m-1),o>=_)break;m++,_-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,_)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==_)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(10>e.getFullYear()%100?"0":"")+e.getFullYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(r){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"==""+a?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,_,v,b,y,w,k,x,C,D,I,T,P,M,S,H,z,O,A,N,W,E,F,L,R=new Date,B=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),q=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==U[0]||1!==U[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=Q&&Q>e?Q:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?""+i+"":q?"":""+i+"",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?""+n+"":q?"":""+n+"",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:B,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"",l=j?"
      "+(Y?h:"")+(this._isInRange(t,r)?"":"")+(Y?"":h)+"
      ":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,C=0;U[1]>C;C++){if(D=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="
      "}for(T+="
      "+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,Q,J,k>0||C>0,f,g)+"
      "+"",P=u?"":"",w=0;7>w;w++)M=(w+c)%7,P+="";for(T+=P+"",S=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),H=(this._getFirstDayOfMonth(te,Z)-c+7)%7,z=Math.ceil((H+S)/7),O=X?this.maxRows>z?this.maxRows:z:z,this.maxRows=O,A=this._daylightSavingAdjust(new Date(te,Z,1-H)),N=0;O>N;N++){for(T+="",W=u?"":"",w=0;7>w;w++)E=m?m.apply(t.input?t.input[0]:null,[A]):[!0,""],F=A.getMonth()!==Z,L=F&&!v||!E[0]||Q&&Q>A||J&&A>J,W+="",A.setDate(A.getDate()+1),A=this._daylightSavingAdjust(A);T+=W+""}Z++,Z>11&&(Z=0,te++),T+="
      "+this._get(t,"weekHeader")+"=5?" class='ui-datepicker-week-end'":"")+">"+""+p[M]+"
      "+this._get(t,"calculateWeek")(A)+""+(F&&!_?" ":L?""+A.getDate()+"":""+A.getDate()+"")+"
      "+(X?"
      "+(U[0]>0&&C===U[1]-1?"
      ":""):""),x+=T}y+=x}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b="
      ",y="";if(o||!m)y+=""+a[e]+"";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+=""}if(v||(b+=y+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)b+=""+i+"";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),v&&(b+=(!o&&m&&_?"":" ")+y),b+="
      "},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||r>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).on("mousedown",t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new s,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.12.1",t.datepicker,t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var _=!1;t(document).on("mouseup",function(){_=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!_){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,n="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),_=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,_=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")},t.widget("ui.draggable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(this._blurActiveElement(e),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=t(this);return t("
      ").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var i=t.ui.safeActiveElement(this.document[0]),s=t(e.target);s.closest(i).length||t.ui.safeBlur(i)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===t(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper),n=s?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())} +},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,t.each(s.sortables,function(){var t=this;t.isOver?(t.isOver=0,s.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,n))})},drag:function(e,i,s){t.each(s.sortables,function(){var n=!1,o=this;o.positionAbs=s.positionAbs,o.helperProportions=s.helperProportions,o.offset.click=s.offset.click,o._intersectsWith(o.containerCache)&&(n=!0,t.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==o&&this._intersectsWith(this.containerCache)&&t.contains(o.element[0],this.element[0])&&(n=!1),n})),n?(o.isOver||(o.isOver=1,s._parent=i.helper.parent(),o.currentItem=i.helper.appendTo(o.element).data("ui-sortable-item",!0),o.options._helper=o.options.helper,o.options.helper=function(){return i.helper[0]},e.target=o.currentItem[0],o._mouseCapture(e,!0),o._mouseStart(e,!0,!0),o.offset.click.top=s.offset.click.top,o.offset.click.left=s.offset.click.left,o.offset.parent.left-=s.offset.parent.left-o.offset.parent.left,o.offset.parent.top-=s.offset.parent.top-o.offset.parent.top,s._trigger("toSortable",e),s.dropped=o.element,t.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,o.fromOutside=s),o.currentItem&&(o._mouseDrag(e),i.position=o.position)):o.isOver&&(o.isOver=0,o.cancelHelperRemoval=!0,o.options._revert=o.options.revert,o.options.revert=!1,o._trigger("out",e,o._uiHash(o)),o._mouseStop(e,!0),o.options.revert=o.options._revert,o.options.helper=o.options._helper,o.placeholder&&o.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(e),i.position=s._generatePosition(e,!0),s._trigger("fromSortable",e),s.dropped=!1,t.each(s.sortables,function(){this.refreshPositions()}))})}}),t.ui.plugin.add("draggable","cursor",{start:function(e,i,s){var n=t("body"),o=s.options;n.css("cursor")&&(o._cursor=n.css("cursor")),n.css("cursor",o.cursor)},stop:function(e,i,s){var n=s.options;n._cursor&&t("body").css("cursor",n._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("opacity")&&(o._opacity=n.css("opacity")),n.css("opacity",o.opacity)},stop:function(e,i,s){var n=s.options;n._opacity&&t(i.helper).css("opacity",n._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(e,i,s){var n=s.options,o=!1,a=s.scrollParentNotHidden[0],r=s.document[0];a!==r&&"HTML"!==a.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+a.offsetHeight-e.pageY=0;d--)h=s.snapElements[d].left-s.margins.left,l=h+s.snapElements[d].width,c=s.snapElements[d].top-s.margins.top,u=c+s.snapElements[d].height,h-g>_||m>l+g||c-g>b||v>u+g||!t.contains(s.snapElements[d].item.ownerDocument,s.snapElements[d].item)?(s.snapElements[d].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=!1):("inner"!==f.snapMode&&(n=g>=Math.abs(c-b),o=g>=Math.abs(u-v),a=g>=Math.abs(h-_),r=g>=Math.abs(l-m),n&&(i.position.top=s._convertPositionTo("relative",{top:c-s.helperProportions.height,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||o||a||r,"outer"!==f.snapMode&&(n=g>=Math.abs(c-v),o=g>=Math.abs(u-b),a=g>=Math.abs(h-m),r=g>=Math.abs(l-_),n&&(i.position.top=s._convertPositionTo("relative",{top:c,left:0}).top),o&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[d].snapping&&(n||o||a||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,e,t.extend(s._uiHash(),{snapItem:s.snapElements[d].item})),s.snapElements[d].snapping=n||o||a||r||p)}}),t.ui.plugin.add("draggable","stack",{start:function(e,i,s){var n,o=s.options,a=t.makeArray(t(o.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});a.length&&(n=parseInt(t(a[0]).css("zIndex"),10)||0,t(a).each(function(e){t(this).css("zIndex",n+e)}),this.css("zIndex",n+a.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i,s){var n=t(i.helper),o=s.options;n.css("zIndex")&&(o._zIndex=n.css("zIndex")),n.css("zIndex",o.zIndex)},stop:function(e,i,s){var n=s.options;n._zIndex&&t(i.helper).css("zIndex",n._zIndex)}}),t.ui.draggable,t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
      ").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
      "),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
      "),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,g=s.maxWidth&&p>s.maxWidth,m=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),g&&(p-=l),m&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable,t.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog +},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("
      ").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("
      "),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("").button({label:t("").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("
      "),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("
      ").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){i._addClass(t(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){var a=o.offset.left-i.document.scrollLeft(),r=o.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(a>=0?"+":"")+a+" "+"top"+(r>=0?"+":"")+r,of:i.window},i._removeClass(t(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){i._addClass(t(this),"ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){var a=i.uiDialog.offset(),r=a.left-i.document.scrollLeft(),h=a.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},i._removeClass(t(this),"ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=t(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),i=t.inArray(this,e);-1!==i&&e.splice(i,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var i=this,s=!1,n={};t.each(e,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,i){var s,n,o=this.uiDialog;"disabled"!==e&&(this._super(e,i),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:t("").text(""+this.options.closeText).html()}),"draggable"===e&&(s=o.is(":data(ui-draggable)"),s&&!i&&o.draggable("destroy"),!s&&i&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(n=o.is(":data(ui-resizable)"),n&&!i&&o.resizable("destroy"),n&&"string"==typeof i&&o.resizable("option","handles",i),n||i===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("
      ").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=!0;this._delay(function(){e=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(t){e||this._allowInteraction(t)||(t.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=t("
      ").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),t.ui.dialog,t.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],void 0):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){t.ui.ddmanager.droppables[e]=t.ui.ddmanager.droppables[e]||[],t.ui.ddmanager.droppables[e].push(this)},_splice:function(t){for(var e=0;t.length>e;e++)t[e]===this&&t.splice(e,1)},_destroy:function(){var e=t.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,i){if("accept"===e)this.accept=t.isFunction(i)?i:function(t){return t.is(i)};else if("scope"===e){var s=t.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(e,i)},_activate:function(e){var i=t.ui.ddmanager.current;this._addActiveClass(),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this._removeActiveClass(),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=t(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&v(s,t.extend(i,{offset:i.element.offset()}),i.options.tolerance,e)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=t.ui.intersect=function(){function t(t,e,i){return t>=e&&e+i>t}return function(e,i,s,n){if(!i.offset)return!1;var o=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,r=o+e.helperProportions.width,h=a+e.helperProportions.height,l=i.offset.left,c=i.offset.top,u=l+i.proportions().width,d=c+i.proportions().height;switch(s){case"fit":return o>=l&&u>=r&&a>=c&&d>=h;case"intersect":return o+e.helperProportions.width/2>l&&u>r-e.helperProportions.width/2&&a+e.helperProportions.height/2>c&&d>h-e.helperProportions.height/2;case"pointer":return t(n.pageY,c,i.proportions().height)&&t(n.pageX,l,i.proportions().width);case"touch":return(a>=c&&d>=a||h>=c&&d>=h||c>a&&h>d)&&(o>=l&&u>=o||r>=l&&u>=r||l>o&&r>u);default:return!1}}}();t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===o[s].element[0]){o[s].proportions().height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions({width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=v(e,this,this.options.tolerance,i),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t(this).droppable("instance").options.scope===n}),o.length&&(s=t(o[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}},t.uiBackCompat!==!1&&t.widget("ui.droppable",t.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}}),t.ui.droppable,t.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=t("
      ").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(t){return void 0===t?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),void 0)},_constrainedValue:function(t){return void 0===t&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t),this._toggleClass(null,"ui-state-disabled",!!t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(i.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("
      ").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),t.widget("ui.selectable",t.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e.elementPos=t(e.element[0]).offset(),e.selectees=t(e.options.filter,e.element[0]),e._addClass(e.selectees,"ui-selectee"),e.selectees.each(function(){var i=t(this),s=i.offset(),n={left:s.left-e.elementPos.left,top:s.top-e.elementPos.top};t.data(this,"selectable-item",{element:this,$element:i,left:n.left,top:n.top,right:n.left+i.outerWidth(),bottom:n.top+i.outerHeight(),startselected:!1,selected:i.hasClass("ui-selected"),selecting:i.hasClass("ui-selecting"),unselecting:i.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=t("
      "),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.elementPos=t(this.element[0]).offset(),this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(i._removeClass(s.$element,"ui-selected"),s.selected=!1,i._addClass(s.$element,"ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),i._removeClass(n.$element,s?"ui-unselecting":"ui-selected")._addClass(n.$element,s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1,c={};i&&i.element!==s.element[0]&&(c.left=i.left+s.elementPos.left,c.right=i.right+s.elementPos.left,c.top=i.top+s.elementPos.top,c.bottom=i.bottom+s.elementPos.top,"touch"===n.tolerance?l=!(c.left>r||o>c.right||c.top>h||a>c.bottom):"fit"===n.tolerance&&(l=c.left>o&&r>c.right&&c.top>a&&h>c.bottom),l?(i.selected&&(s._removeClass(i.$element,"ui-selected"),i.selected=!1),i.unselecting&&(s._removeClass(i.$element,"ui-unselecting"),i.unselecting=!1),i.selecting||(s._addClass(i.$element,"ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,s._addClass(i.$element,"ui-selected"),i.selected=!0):(s._removeClass(i.$element,"ui-selecting"),i.selecting=!1,i.startselected&&(s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(s._removeClass(i.$element,"ui-selected"),i.selected=!1,s._addClass(i.$element,"ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");i._removeClass(s.$element,"ui-selecting")._addClass(s.$element,"ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}}),t.widget("ui.selectmenu",[t.ui.formResetMixin,{version:"1.12.1",defaultElement:"",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("").parent().append("")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&this.uiSpinner.height()>0&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){var i,s,n;return"culture"===t||"numberFormat"===t?(i=this._parse(this.element.val()),this.options[t]=e,this.element.val(this._format(i)),void 0):(("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(s=this.buttons.first().find(".ui-icon"),this._removeClass(s,null,this.options.icons.up),this._addClass(s,null,e.up),n=this.buttons.last().find(".ui-icon"),this._removeClass(n,null,this.options.icons.down),this._addClass(n,null,e.down)),this._super(t,e),void 0)},_setOptionDisabled:function(t){this._super(t),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable")},_setOptions:r(function(t){this._super(t)}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var t=this.value();return null===t?!1:t===this._adjustValue(t)},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:r(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:r(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:r(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:r(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(r(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),t.uiBackCompat!==!1&&t.widget("ui.spinner",t.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return""},_buttonHtml:function(){return""}}),t.ui.spinner,t.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var t=/#.*$/;return function(e){var i,s;i=e.href.replace(t,""),s=location.href.replace(t,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return e.hash.length>1&&i===s}}(),_create:function(){var e=this,i=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,i.collapsible),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){return t(n).attr("aria-controls")===s?(e=i,!1):void 0}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===e||-1===e)&&(e=this.tabs.length?0:!1)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),-1===e&&(e=i?!1:0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(t.ui.safeActiveElement(this.document[0])).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||e.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).trigger("focus"),t},_setOption:function(t,e){return"active"===t?(this._activate(e),void 0):(this._super(t,e),"collapsible"===t&&(this._toggleClass("ui-tabs-collapsible",null,e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),"heightStyle"===t&&this._setupHeightStyle(e),void 0)},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=t(),this.anchors.each(function(i,s){var n,o,a,r=t(s).uniqueId().attr("id"),h=t(s).closest("li"),l=h.attr("aria-controls");e._isLocal(s)?(n=s.hash,a=n.substring(1),o=e.element.find(e._sanitizeSelector(n))):(a=h.attr("aria-controls")||t({}).uniqueId()[0].id,n="#"+a,o=e.element.find(n),o.length||(o=e._createPanel(a),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":a,"aria-labelledby":r}),o.attr("aria-labelledby",r)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return t("
      ").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var i,s,n;for(t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),n=0;s=this.tabs[n];n++)i=t(s),e===!0||-1!==t.inArray(n,e)?(i.attr("aria-disabled","true"),this._addClass(i,null,"ui-state-disabled")):(i.removeAttr("aria-disabled"),this._removeClass(i,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,e===!0)},_setupEvents:function(e){var i={};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(t){t.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){o._addClass(i.newTab.closest("li"),"ui-tabs-active","ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){o._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),n()}):(this._removeClass(i.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+t.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(e){var i=this.options.disabled;i!==!1&&(void 0===e?i=!1:(e=this._getIndex(e),i=t.isArray(i)?t.map(i,function(t){return t!==e?t:null}):t.map(this.tabs,function(t,i){return i!==e?i:null})),this._setOptionDisabled(i))},disable:function(e){var i=this.options.disabled;if(i!==!0){if(void 0===e)i=!0;else{if(e=this._getIndex(e),-1!==t.inArray(e,i))return;i=t.isArray(i)?t.merge([e],i).sort():[e]}this._setOptionDisabled(i)}},load:function(e,i){e=this._getIndex(e);var s=this,n=this.tabs.eq(e),o=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),r={tab:n,panel:a},h=function(t,e){"abort"===e&&s.panels.stop(!1,!0),s._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr};this._isLocal(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(t,e,n){setTimeout(function(){a.html(t),s._trigger("load",i,r),h(n,e)},1)}).fail(function(t,e){setTimeout(function(){h(t,e)},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),t.uiBackCompat!==!1&&t.widget("ui.tabs",t.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}}),t.ui.tabs,t.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=t(this).attr("title")||"";return t("").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))},_removeDescribedBy:function(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=t("
      ").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var s=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s.element[0],e.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);return e.is("[title]")?e.data("ui-tooltip-title",e.attr("title")).removeAttr("title"):void 0}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(e,s),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s||s.nodeType||s.jquery?this._open(e,t,s):(i=s.call(t[0],function(i){n._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}),i&&this._open(e,t,i),void 0)},_open:function(e,i,s){function n(t){l.of=t,a.is(":hidden")||a.position(l)}var o,a,r,h,l=t.extend({},this.options.position);if(s){if(o=this._find(i))return o.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),o=this._tooltip(i),a=o.tooltip,this._addDescribedBy(i,a.attr("id")),a.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),h=t("
      ").html(a.find(".ui-tooltip-content").html()),h.removeAttr("name").find("[name]").removeAttr("name"),h.removeAttr("id").find("[id]").removeAttr("id"),h.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:n}),n(e)):a.position(t.extend({of:i},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){a.is(":visible")&&(n(l.of),clearInterval(r))},t.fx.interval)),this._trigger("open",e,{tooltip:a})}},_registerCloseHandlers:function(e,i){var s={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var s=t.Event(e);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(s.mouseleave="close"),e&&"focusin"!==e.type||(s.focusout="close"),this._on(!0,i,s)},close:function(e){var i,s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);return o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(e){var i=t("
      ").attr("role","tooltip"),s=t("
      ").appendTo(i),n=i.uniqueId().attr("id");return this._addClass(s,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip}); \ No newline at end of file diff --git a/src/main/webapp/static/js/jquery.min.js b/src/main/webapp/static/js/jquery.min.js new file mode 100644 index 0000000..644d35e --- /dev/null +++ b/src/main/webapp/static/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext;function B(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}var C=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,D=/^.[^:#\[\.,]*$/;function E(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):D.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(E(this,a||[],!1))},not:function(a){return this.pushStack(E(this,a||[],!0))},is:function(a){return!!E(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var F,G=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,H=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||F,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:G.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),C.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};H.prototype=r.fn,F=r(d);var I=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function K(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return K(a,"nextSibling")},prev:function(a){return K(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return B(a,"iframe")?a.contentDocument:(B(a,"template")&&(a=a.content||a),r.merge([],a.childNodes))}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(J[a]||r.uniqueSort(e),I.test(a)&&e.reverse()),this.pushStack(e)}});var L=/[^\x20\t\r\n\f]+/g;function M(a){var b={};return r.each(a.match(L)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?M(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=e||a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function N(a){return a}function O(a){throw a}function P(a,b,c,d){var e;try{a&&r.isFunction(e=a.promise)?e.call(a).done(b).fail(c):a&&r.isFunction(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==O&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:N,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:N)),c[2][3].add(g(0,a,r.isFunction(d)?d:O))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(P(a,g.done(h(c)).resolve,g.reject,!b),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)P(e[c],h(c),g.reject);return g.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&Q.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var R=r.Deferred();r.fn.ready=function(a){return R.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||R.resolveWith(d,[r]))}}),r.ready.then=R.then;function S(){d.removeEventListener("DOMContentLoaded",S), +a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,la=/^$|\/(?:java|ecma)script/i,ma={option:[1,""],thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};ma.optgroup=ma.option,ma.tbody=ma.tfoot=ma.colgroup=ma.caption=ma.thead,ma.th=ma.td;function na(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&B(a,b)?r.merge([a],c):c}function oa(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=na(l.appendChild(f),"script"),j&&oa(g),c){k=0;while(f=g[k++])la.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var ra=d.documentElement,sa=/^key/,ta=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ua=/^([^.]*)(?:\.(.+)|)/;function va(){return!0}function wa(){return!1}function xa(){try{return d.activeElement}catch(a){}}function ya(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ya(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=wa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(ra,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(L)||[""],j=b.length;while(j--)h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=W.hasData(a)&&W.get(a);if(q&&(i=q.events)){b=(b||"").match(L)||[""],j=b.length;while(j--)if(h=ua.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&W.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(W.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,Aa=/\s*$/g;function Ea(a,b){return B(a,"table")&&B(11!==b.nodeType?b:b.firstChild,"tr")?r(">tbody",a)[0]||a:a}function Fa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ga(a){var b=Ca.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ha(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(W.hasData(a)&&(f=W.access(a),g=W.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Ba.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ja(f,b,c,d)});if(m&&(e=qa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(na(e,"script"),Fa),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=na(h),f=na(a),d=0,e=f.length;d0&&oa(g,!i&&na(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(U(c)){if(b=c[W.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[W.expando]=void 0}c[X.expando]&&(c[X.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ka(this,a,!0)},remove:function(a){return Ka(this,a)},text:function(a){return T(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.appendChild(a)}})},prepend:function(){return Ja(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ea(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ja(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(na(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return T(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Aa.test(a)&&!ma[(ka.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function _a(a,b,c,d,e){return new _a.prototype.init(a,b,c,d,e)}r.Tween=_a,_a.prototype={constructor:_a,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=_a.propHooks[this.prop];return a&&a.get?a.get(this):_a.propHooks._default.get(this)},run:function(a){var b,c=_a.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):_a.propHooks._default.set(this),this}},_a.prototype.init.prototype=_a.prototype,_a.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},_a.propHooks.scrollTop=_a.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=_a.prototype.init,r.fx.step={};var ab,bb,cb=/^(?:toggle|show|hide)$/,db=/queueHooks$/;function eb(){bb&&(d.hidden===!1&&a.requestAnimationFrame?a.requestAnimationFrame(eb):a.setTimeout(eb,r.fx.interval),r.fx.tick())}function fb(){return a.setTimeout(function(){ab=void 0}),ab=r.now()}function gb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ca[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function hb(a,b,c){for(var d,e=(kb.tweeners[b]||[]).concat(kb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?lb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b), +null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,sb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(W.get(h,"events")||{})[b.type]&&W.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&U(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!U(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=W.access(d,b);e||d.addEventListener(a,c,!0),W.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=W.access(d,b)-1;e?W.access(d,b,e):(d.removeEventListener(a,c,!0),W.remove(d,b))}}});var tb=a.location,ub=r.now(),vb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var wb=/\[\]$/,xb=/\r?\n/g,yb=/^(?:submit|button|image|reset|file)$/i,zb=/^(?:input|select|textarea|keygen)/i;function Ab(a,b,c,d){var e;if(Array.isArray(b))r.each(b,function(b,e){c||wb.test(a)?d(a,e):Ab(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)Ab(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(Array.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)Ab(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&zb.test(this.nodeName)&&!yb.test(a)&&(this.checked||!ja.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:Array.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(xb,"\r\n")}}):{name:b.name,value:c.replace(xb,"\r\n")}}).get()}});var Bb=/%20/g,Cb=/#.*$/,Db=/([?&])_=[^&]*/,Eb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Fb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Gb=/^(?:GET|HEAD)$/,Hb=/^\/\//,Ib={},Jb={},Kb="*/".concat("*"),Lb=d.createElement("a");Lb.href=tb.href;function Mb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(L)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Nb(a,b,c,d){var e={},f=a===Jb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Ob(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Pb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Qb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:tb.href,type:"GET",isLocal:Fb.test(tb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Ob(Ob(a,r.ajaxSettings),b):Ob(r.ajaxSettings,a)},ajaxPrefilter:Mb(Ib),ajaxTransport:Mb(Jb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Eb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||tb.href)+"").replace(Hb,tb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(L)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Lb.protocol+"//"+Lb.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Nb(Ib,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Gb.test(o.type),f=o.url.replace(Cb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(Bb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(vb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Db,"$1"),n=(vb.test(f)?"&":"?")+"_="+ub++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Kb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Nb(Jb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Pb(o,y,d)),v=Qb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Rb={0:200,1223:204},Sb=r.ajaxSettings.xhr();o.cors=!!Sb&&"withCredentials"in Sb,o.ajax=Sb=!!Sb,r.ajaxTransport(function(b){var c,d;if(o.cors||Sb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Rb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" \ No newline at end of file diff --git a/src/main/webapp/views/acountExpressFeeTooWeight.jsp b/src/main/webapp/views/acountExpressFeeTooWeight.jsp new file mode 100644 index 0000000..1f7d3e1 --- /dev/null +++ b/src/main/webapp/views/acountExpressFeeTooWeight.jsp @@ -0,0 +1,33 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +
      +
      +

      快递费计算

      +
      + 快递公司: + + 收货地: + + 重量(kg): + 价格(元): +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/addBirthDay.jsp b/src/main/webapp/views/addBirthDay.jsp new file mode 100644 index 0000000..2125128 --- /dev/null +++ b/src/main/webapp/views/addBirthDay.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加用户 +<%@include file="/views/common.jsp"%> + + + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      新历
      +
      + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/article/addArticle.jsp b/src/main/webapp/views/article/addArticle.jsp new file mode 100644 index 0000000..74f294f --- /dev/null +++ b/src/main/webapp/views/article/addArticle.jsp @@ -0,0 +1,123 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +领淘报表系统 + + + + + + + +
      +
      +
      + +
      + + +
      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/article/fileImport.jsp b/src/main/webapp/views/article/fileImport.jsp new file mode 100644 index 0000000..567e358 --- /dev/null +++ b/src/main/webapp/views/article/fileImport.jsp @@ -0,0 +1,527 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + +Insert title here + + + + + + + +
      +
        +
      • 系统公告
      • +
      +
      +
      +
      +

      公告列表

      +
      +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      +
      + + + + + <%-- --%> + + + + \ No newline at end of file diff --git a/src/main/webapp/views/article/infoArticle.jsp b/src/main/webapp/views/article/infoArticle.jsp new file mode 100644 index 0000000..8f8fe0c --- /dev/null +++ b/src/main/webapp/views/article/infoArticle.jsp @@ -0,0 +1,85 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +领淘报表系统 + + + + + + + +
      +
      +
      + + +
      + +
      +
      +
      + + +
      + +
      +
      +
      + +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/article/updateArticle.jsp b/src/main/webapp/views/article/updateArticle.jsp new file mode 100644 index 0000000..69f7013 --- /dev/null +++ b/src/main/webapp/views/article/updateArticle.jsp @@ -0,0 +1,113 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +领淘报表系统 + + + + + + + +
      +
      +
      + + +
      + +
      +
      + +
      + +
      + +
      +
      + +
      + + +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/common.jsp b/src/main/webapp/views/common.jsp new file mode 100644 index 0000000..989a412 --- /dev/null +++ b/src/main/webapp/views/common.jsp @@ -0,0 +1,7 @@ +<%@ page contentType="text/html; charset=UTF-8" language="java" %> + + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/copyResult.jsp b/src/main/webapp/views/copyResult.jsp new file mode 100644 index 0000000..57d2bdf --- /dev/null +++ b/src/main/webapp/views/copyResult.jsp @@ -0,0 +1,27 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/errorQuestion.jsp b/src/main/webapp/views/errorQuestion.jsp new file mode 100644 index 0000000..c4e315a --- /dev/null +++ b/src/main/webapp/views/errorQuestion.jsp @@ -0,0 +1,62 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + +
      + + + +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/information.jsp b/src/main/webapp/views/information.jsp new file mode 100644 index 0000000..0a78598 --- /dev/null +++ b/src/main/webapp/views/information.jsp @@ -0,0 +1,163 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +客服须知 + + + + + + + +
      + +
      + +
      +
      + + + +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/main.jsp b/src/main/webapp/views/main.jsp new file mode 100644 index 0000000..f9958d6 --- /dev/null +++ b/src/main/webapp/views/main.jsp @@ -0,0 +1,946 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报价网 + + + + + + + + + + + +
      +
      + + <%-- --%> + + + + <%-- --%> +
      + + + + + + + +
      + +
      +
      +
      + + +
      + +
      + +
      +
        + +
      + +
      +
      + +
      +
      +
      +
      + + +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/product/acidTags.jsp b/src/main/webapp/views/product/acidTags.jsp new file mode 100644 index 0000000..db9395f --- /dev/null +++ b/src/main/webapp/views/product/acidTags.jsp @@ -0,0 +1,208 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + + +Insert title here +<%@include file="/views/common.jsp"%> + + + + +
      +
      +

      硫酸纸吊牌

      + +
      +
      + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + 135克硫酸纸尺寸 + + 350克铜版纸尺寸 + +
      +

      + 数量(套) +

      +
      + +
      +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/angingCloth.jsp b/src/main/webapp/views/product/angingCloth.jsp new file mode 100644 index 0000000..415bfdb --- /dev/null +++ b/src/main/webapp/views/product/angingCloth.jsp @@ -0,0 +1,277 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      挂布

      +
      +
      +

      + 材质 +

      +
      + +
      + + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 配件: +

      +
      + +
      +

      + 工艺 +

      +
      + + + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/banqi.jsp b/src/main/webapp/views/product/banqi.jsp new file mode 100644 index 0000000..3b6b4fd --- /dev/null +++ b/src/main/webapp/views/product/banqi.jsp @@ -0,0 +1,271 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + +
      +
      +

      班旗

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) +

      +
      + +
      + +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 旗杆长度是2.5米 +

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

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/blackCard.jsp b/src/main/webapp/views/product/blackCard.jsp new file mode 100644 index 0000000..2645f43 --- /dev/null +++ b/src/main/webapp/views/product/blackCard.jsp @@ -0,0 +1,311 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      黑卡

      +
      +
      +

      + 材质 +

      +
      + +
      + + +

      + 规格(CM/厘米) +

      +
      + +
      + +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/canopy.jsp b/src/main/webapp/views/product/canopy.jsp new file mode 100644 index 0000000..4bc4980 --- /dev/null +++ b/src/main/webapp/views/product/canopy.jsp @@ -0,0 +1,332 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      天幕

      +
      +
      +

      + 材质 +

      +
      + +
      + + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 推荐尺寸:2.9m*3.9m、4.2m*3.9m、4.2m*4.9m +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 配件(五件套)伸缩杆:直径2.5厘米2根 (2.4米/根)、防风绳: 4米固定8条、地钉: 8颗、D扣:(车间车在各个吊耳上面)、安装包 +

      +
      + + + +
      +

      + 印刷印刷内容空白 工艺是模切的话 文件名要备注定制 +

      +
      + + +
      +

      + 工艺 +

      +
      + + + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/canvas.jsp b/src/main/webapp/views/product/canvas.jsp new file mode 100644 index 0000000..9fe6b17 --- /dev/null +++ b/src/main/webapp/views/product/canvas.jsp @@ -0,0 +1,330 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + +
      +
      +

      帆布

      +
      +
      + +
      + + +
      +

      + 材质 +

      +
      + +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

      +
      + +
      + +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺木棍长度50cm +

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

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/card.jsp b/src/main/webapp/views/product/card.jsp new file mode 100644 index 0000000..c8c668f --- /dev/null +++ b/src/main/webapp/views/product/card.jsp @@ -0,0 +1,445 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      PVC名片

      +
      +
      + +

      种类

      +
      + + +
      +

      + 材质 +

      +
      + +
      +

      + 尺寸 +

      +
      + +
      +

      + 数量(张) +

      +
      +
      + +
      +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      印刷

      + + + +
      +

      工艺

      + 形状 : +
      +           + + + + +
      +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/chuanqi.jsp b/src/main/webapp/views/product/chuanqi.jsp new file mode 100644 index 0000000..41ac677 --- /dev/null +++ b/src/main/webapp/views/product/chuanqi.jsp @@ -0,0 +1,192 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + +
      +
      +

      串旗

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

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

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +

      下单备注-

      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/clothes.jsp b/src/main/webapp/views/product/clothes.jsp new file mode 100644 index 0000000..d83f3f9 --- /dev/null +++ b/src/main/webapp/views/product/clothes.jsp @@ -0,0 +1,603 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      定制衫

      +
      +
      + + +

      + 型号 +

      +
      + + + + +
      +

      + 材质 +

      +
      + +
      +

      + 款式 +

      +
      + + +
      +

      + 尺码 +

      +
      + +
      +

      + 颜色 +

      +
      + +
      +

      + 数量(件) +

      +
      + +
      +

      + 款数 +

      +
      + +
      + +

      + 工艺印花最大尺寸32*40CM +

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/coaster.jsp b/src/main/webapp/views/product/coaster.jsp new file mode 100644 index 0000000..de7a8c8 --- /dev/null +++ b/src/main/webapp/views/product/coaster.jsp @@ -0,0 +1,314 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      杯垫

      + +
      +
      + +

      材质

      +
      + + + +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(张) +

      +
      + +
      +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + + |    + + + + + + + |    + + + + + +
      +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/colorEnvelope.jsp b/src/main/webapp/views/product/colorEnvelope.jsp new file mode 100644 index 0000000..eeccb44 --- /dev/null +++ b/src/main/webapp/views/product/colorEnvelope.jsp @@ -0,0 +1,466 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      彩色信封

      +
      +
      + +

      + 材质 +

      + + +
      +
      + +
      +
      +

      + 规格 +

      +
      + +
      + + + +

      + 数量(个) +

      + +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/copyPaper.jsp b/src/main/webapp/views/product/copyPaper.jsp new file mode 100644 index 0000000..6382daa --- /dev/null +++ b/src/main/webapp/views/product/copyPaper.jsp @@ -0,0 +1,279 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      复印纸 -自来稿件

      +
      +
      + +

      + 印色 +

      +
      +
      + + +
      +
      +

      + 材料 +

      +
      + +
      + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + +

      + 数量(本) +

      +
      + + +
      +

      + 印面 +

      +
      +
      + + +
      +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFeeTooWeight.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp new file mode 100644 index 0000000..dce1e72 --- /dev/null +++ b/src/main/webapp/views/product/coupon.jsp @@ -0,0 +1,3089 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
      +
      +

      卡片

      +
      +
      +
      + + +
      +
      +
      +

      品种

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

      材质

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

      类型

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

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +  200克、300克腰封模切最大尺寸100cm,200克腰封裁切最大尺寸118cm + 压1痕最小尺寸10.8*5.4cm,压2痕最小尺寸13.5*5.4CM,低于最小尺寸按异形模切报价 + +

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

      + 刮刮卡最小尺寸75*50mm,最大尺寸170*170mm +

      +

      + 刮刮膜尺寸(MM/毫米) +

      + +
      +

      + 组合价:卡片内容尺寸一样 奖项 数量可以不一样 +

      +
      +
      + +
      + +
      + +
      + +

      + 输入奖项个数 +

      +
      + +
      +

      + 奖项最高30个,最低1个 +

      +
      + +

      + 尺寸超过4个名片位请单独报价 +

      +

      + 刮刮膜尺寸(MM/毫米) +

      + +

      + 同个客户下单多款,其中一款数量在200张以上请全部按照印刷报价
      200张以上车间贴,200张以下客户自己贴
      +

      +
      +

      + 数量(张) +

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

      款数

      +
      + +
      + +

      + 客户旺旺 +

      +
      + +
      +
      +
      +
      +
      +
      +

      + 工艺 优惠券异形模切+打码限于简单刀版(无法做圆形 椭圆机)最小9*5.4 +

      +
      + +
      + +
      + + + +
      + +
      x +
      + +
      +
      +
      +
      + + + + + + + + + + + +
      + + + +
      + +
      +
      + + <%-- + <%-- title="单面覆膜">--%> + + + + +
      +
      + +
      +
      +
      +
      + + + + + +
      +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/coupon1.jsp b/src/main/webapp/views/product/coupon1.jsp new file mode 100644 index 0000000..e21a226 --- /dev/null +++ b/src/main/webapp/views/product/coupon1.jsp @@ -0,0 +1,1559 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + +
      +
      +

      卡片

      +
      +
      +
      + + (少数量卡片类17点前上传系统的隔天发货) +
      +
      +
      +

      品种

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

      材质

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

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      +
      + +
      +
      +

      + 数量(张) +

      +
      +
      + +
      +
      + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      +
      +
      +
      +

      + 工艺 +

      +
      + + + + + + + + + + + +
      +
      + + + +
      + +
      x +
      + +
      +
      +
      +
      + + + +
      + +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      + +
      +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/coupon22.jsp b/src/main/webapp/views/product/coupon22.jsp new file mode 100644 index 0000000..3a71e97 --- /dev/null +++ b/src/main/webapp/views/product/coupon22.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + \ No newline at end of file diff --git a/src/main/webapp/views/product/credentials.jsp b/src/main/webapp/views/product/credentials.jsp new file mode 100644 index 0000000..c89ba44 --- /dev/null +++ b/src/main/webapp/views/product/credentials.jsp @@ -0,0 +1,334 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      PVC证件

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸 +

      +
      + +
      +

      + 数量(张) +

      +
      +
      + +
      +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +

      工艺

      +
      + + + + + 打孔尺寸15*3mm +
      +
      + + +
      +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/cupHolder.jsp b/src/main/webapp/views/product/cupHolder.jsp new file mode 100644 index 0000000..145c5eb --- /dev/null +++ b/src/main/webapp/views/product/cupHolder.jsp @@ -0,0 +1,313 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
      +
      +
      +
      + + +
      +
      +
      + +

      + 材质 +

      +
      + + + +
      +

      + 尺寸(CM/厘米)尺寸推荐:异形款30*60cm/常规款 单杯:14.4*38.6cm双杯:24*38.6cm +

      + + +

      + 数量(张) +

      +
      + +
      +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

      +
      + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/cupSet.jsp b/src/main/webapp/views/product/cupSet.jsp new file mode 100644 index 0000000..d8d794f --- /dev/null +++ b/src/main/webapp/views/product/cupSet.jsp @@ -0,0 +1,569 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      杯套

      +
      +
      + +

      + 材质 +

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

      + 尺寸(mm) +

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

      + 数量(个) +

      +
      + +
      +
      +
      +

      + 数量(个) +

      +
      + +
      +
      +
      +

      + 尺寸(cm) +

      + +

      + 数量(个) +

      +
      + +
      +
      +
      +

      + 尺寸(cm)输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 工艺 +

      +
      + + + +
      +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + + +
      +

      + 数量(个) +

      +
      + +
      +
      +
      +

      + 尺寸 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +
      +
      +

      + 尺寸 +

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

      + 数量(个) +

      +
      + +
      +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/deskSticker.jsp b/src/main/webapp/views/product/deskSticker.jsp new file mode 100644 index 0000000..28f262f --- /dev/null +++ b/src/main/webapp/views/product/deskSticker.jsp @@ -0,0 +1,311 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      桌贴

      +
      +
      + +

      + 材质 +

      +
      +
      + + + + +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + +

      + 数量(张) +

      +
      + +
      + + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

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

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/diploma.jsp b/src/main/webapp/views/product/diploma.jsp new file mode 100644 index 0000000..5d8bab2 --- /dev/null +++ b/src/main/webapp/views/product/diploma.jsp @@ -0,0 +1,178 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      证书

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 规格 +

      +
      + +
      +

      数量

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/disu.jsp b/src/main/webapp/views/product/disu.jsp new file mode 100644 index 0000000..343d350 --- /dev/null +++ b/src/main/webapp/views/product/disu.jsp @@ -0,0 +1,261 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      滴塑

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/doorList.jsp b/src/main/webapp/views/product/doorList.jsp new file mode 100644 index 0000000..5e42ef9 --- /dev/null +++ b/src/main/webapp/views/product/doorList.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      规格

      +
      + +
      +

      数量(个)

      +
      + +
      +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/envelope.jsp b/src/main/webapp/views/product/envelope.jsp new file mode 100644 index 0000000..7c8a9c4 --- /dev/null +++ b/src/main/webapp/views/product/envelope.jsp @@ -0,0 +1,314 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +

      合版封套

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

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      + +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFeeTooWeight.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/envelopeCG.jsp b/src/main/webapp/views/product/envelopeCG.jsp new file mode 100644 index 0000000..a91daf0 --- /dev/null +++ b/src/main/webapp/views/product/envelopeCG.jsp @@ -0,0 +1,36 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +

      材质

      + +

      + 工艺 +

      +
      +
      + + +
      +
      +

      + 规格 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      diff --git a/src/main/webapp/views/product/envelopeZDY.jsp b/src/main/webapp/views/product/envelopeZDY.jsp new file mode 100644 index 0000000..e4fd1ed --- /dev/null +++ b/src/main/webapp/views/product/envelopeZDY.jsp @@ -0,0 +1,34 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + +

      材质

      + +

      + 工艺 +

      +
      +
      + + +
      +
      +

      尺寸 输入格式: 长 * 宽 * 舌头

      + + + x + + x + + +

      数量(个)

      +
      + +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/fan.jsp b/src/main/webapp/views/product/fan.jsp new file mode 100644 index 0000000..29157ed --- /dev/null +++ b/src/main/webapp/views/product/fan.jsp @@ -0,0 +1,379 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      扇子

      +
      +
      + +

      + 款式 +

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

      + 规格 +

      +
      + +
      + + +

      + 数量(个) +

      +
      + +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

      +
      +
      + +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/fgq.jsp b/src/main/webapp/views/product/fgq.jsp new file mode 100644 index 0000000..cee735f --- /dev/null +++ b/src/main/webapp/views/product/fgq.jsp @@ -0,0 +1,231 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + +
      +
      +

      仿古旗

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

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

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/fileCover.jsp b/src/main/webapp/views/product/fileCover.jsp new file mode 100644 index 0000000..5f92e07 --- /dev/null +++ b/src/main/webapp/views/product/fileCover.jsp @@ -0,0 +1,271 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      档案袋

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 规格 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/flags.jsp b/src/main/webapp/views/product/flags.jsp new file mode 100644 index 0000000..329d21e --- /dev/null +++ b/src/main/webapp/views/product/flags.jsp @@ -0,0 +1,333 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      吊旗

      +
      +
      + +

      材质

      +
      + + + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

      +
      + +
      +
      + + + +
      +

      + 数量(个) +

      +
      + +
      +
      + +
      +

      提示:数量超过500个请以 [ 宣传单 - 商务200克铜版纸 - 异形模切 ] 报价

      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 形状 (吊旗 - 数量50个以内不限形状;50个及以上默认[ U型 ]) +

      +
      + +
      +

      + 工艺 +

      +
      + + + 米 + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFeeTooWeight.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/flyer.jsp b/src/main/webapp/views/product/flyer.jsp new file mode 100644 index 0000000..492ca53 --- /dev/null +++ b/src/main/webapp/views/product/flyer.jsp @@ -0,0 +1,382 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      宣传单

      +
      +
      +

      + 材质 +

      +
      + +
      +
      +
      + + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/freehand.jsp b/src/main/webapp/views/product/freehand.jsp new file mode 100644 index 0000000..cd6a6fc --- /dev/null +++ b/src/main/webapp/views/product/freehand.jsp @@ -0,0 +1,268 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      手绘

      +
      +
      + +

      + 类型 +

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

      + 难度 +

      +
      + +
      +

      + 数量(个) 默认一个无法修改 +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/girdle.jsp b/src/main/webapp/views/product/girdle.jsp new file mode 100644 index 0000000..17178bb --- /dev/null +++ b/src/main/webapp/views/product/girdle.jsp @@ -0,0 +1,58 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + +

      材质

      +
      + + + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(张) +

      +
      + +
      +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + +
      +
      + +
      +
      + +
      +
      + +
      +
      + +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/greetCard.jsp b/src/main/webapp/views/product/greetCard.jsp new file mode 100644 index 0000000..5909677 --- /dev/null +++ b/src/main/webapp/views/product/greetCard.jsp @@ -0,0 +1,115 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + + +
      +

      + 规格 +

      + + + + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + + \ No newline at end of file diff --git a/src/main/webapp/views/product/handBag.jsp b/src/main/webapp/views/product/handBag.jsp new file mode 100644 index 0000000..48fec0f --- /dev/null +++ b/src/main/webapp/views/product/handBag.jsp @@ -0,0 +1,754 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      手提袋

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

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + +
      + + <%-- <%@include file="../acountExpressFeeTooWeight.jsp"%> --%> +
      +
      +

      快递费计算

      +
      + 快递公司: + + 收货地: + + 重量(kg): + 价格(元): +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/handBagCG.jsp b/src/main/webapp/views/product/handBagCG.jsp new file mode 100644 index 0000000..8f438d2 --- /dev/null +++ b/src/main/webapp/views/product/handBagCG.jsp @@ -0,0 +1,53 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +

      材质

      +
      + +
      +

      规格(CM/厘米) 格式: 长 * 宽 * 高

      +
      + +
      +

      + 数量(个) + 自定义数量 + +

      +
      + +
      + + diff --git a/src/main/webapp/views/product/handBagTJ.jsp b/src/main/webapp/views/product/handBagTJ.jsp new file mode 100644 index 0000000..4a9eb09 --- /dev/null +++ b/src/main/webapp/views/product/handBagTJ.jsp @@ -0,0 +1,38 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +

      材质

      +
      + +
      + +

      规格(CM/厘米) 格式: 长 * 宽 * 高

      +
      + +
      +

      数量(个)

      +
      + +
      diff --git a/src/main/webapp/views/product/handBagZDY.jsp b/src/main/webapp/views/product/handBagZDY.jsp new file mode 100644 index 0000000..82ecbba --- /dev/null +++ b/src/main/webapp/views/product/handBagZDY.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +

      材质

      + +
      + +
      +

      规格(CM/厘米) 输入格式: 长 * 宽 * 高(请按格式输入)

      +
      + +
      +

      +

      数量(个)

      +
      + +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/hykkt.jsp b/src/main/webapp/views/product/hykkt.jsp new file mode 100644 index 0000000..ec34a8b --- /dev/null +++ b/src/main/webapp/views/product/hykkt.jsp @@ -0,0 +1,291 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + +
      +
      +

      会员卡卡套

      +
      +
      + +
      + + +
      +

      + 尺寸 +

      +
      +
      + +
      + + +
      +

      + 数量(张) +

      +
      + +
      +

      + 款数 +

      +
      + +
      + +

      + 客户旺旺 +

      +
      + +
      +

      工艺

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/insertCard.jsp b/src/main/webapp/views/product/insertCard.jsp new file mode 100644 index 0000000..d03a586 --- /dev/null +++ b/src/main/webapp/views/product/insertCard.jsp @@ -0,0 +1,360 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      插卡

      +
      +
      + +

      + 品种 +

      +
      + +
      +

      + 尺寸(厘米)输入格式: 长 * 宽 +

      + +
      + +
      + + + +

      + 数量(个) +

      +
      + +
      + +

      + 款数 +

      +
      + +
      +

      工艺

      +
      + +
      + +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/katie.jsp b/src/main/webapp/views/product/katie.jsp new file mode 100644 index 0000000..5f7575a --- /dev/null +++ b/src/main/webapp/views/product/katie.jsp @@ -0,0 +1,290 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
      +
      +

      卡贴

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) +

      + +

      + 数量(张) +

      +
      +
      + +
      +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

      +
      + + + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +

      下单备注- + +

      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/kzt.jsp b/src/main/webapp/views/product/kzt.jsp new file mode 100644 index 0000000..e286cc8 --- /dev/null +++ b/src/main/webapp/views/product/kzt.jsp @@ -0,0 +1,200 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      筷子套

      +
      +
      +

      + 材质 +

      +
      + +
      + +

      + 规格 +

      +
      + +
      +

      + 数量(张) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +

      下单备注-

      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/lotteryCard.jsp b/src/main/webapp/views/product/lotteryCard.jsp new file mode 100644 index 0000000..5b764e8 --- /dev/null +++ b/src/main/webapp/views/product/lotteryCard.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + + \ No newline at end of file diff --git a/src/main/webapp/views/product/lsz.jsp b/src/main/webapp/views/product/lsz.jsp new file mode 100644 index 0000000..193372e --- /dev/null +++ b/src/main/webapp/views/product/lsz.jsp @@ -0,0 +1,381 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + +
      +
      +

      硫酸纸

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

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(张) +

      +
      + +
      +
      + +
      +

      + 款数 +

      +
      + +
      + +

      + 客户旺旺 +

      +
      + +
      +

      工艺 专版打印不能模切

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/medal.jsp b/src/main/webapp/views/product/medal.jsp new file mode 100644 index 0000000..57449d3 --- /dev/null +++ b/src/main/webapp/views/product/medal.jsp @@ -0,0 +1,591 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + +
      +
      +

      奖牌

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 名称 +

      +
      + +
      +

      + 尺寸(CM/厘米) +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +

      + 颜色 +

      +
      + + +
      +
      +

      + 工艺 +

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/metal - 副本.jsp b/src/main/webapp/views/product/metal - 副本.jsp new file mode 100644 index 0000000..8a15451 --- /dev/null +++ b/src/main/webapp/views/product/metal - 副本.jsp @@ -0,0 +1,405 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      金属标

      +
      +
      + +

      + 产品种类 +

      +
      + + +
      +
      +

      + 颜色 +

      +
      + +
      +

      + 印色 +

      +
      + + + + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + 金属标尺寸不能超过29*19 cm +

      + 数量(个) +

      +
      + +
      +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/metal.jsp b/src/main/webapp/views/product/metal.jsp new file mode 100644 index 0000000..9393607 --- /dev/null +++ b/src/main/webapp/views/product/metal.jsp @@ -0,0 +1,461 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      金属标

      +
      +
      + +

      + 产品种类 +

      +
      + + +
      +
      +

      + 颜色 +

      +
      + +
      +

      + 印色 +

      +
      + + + + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + 金属标尺寸不能超过29*19 cm +

      + 数量(个) +

      +
      + +
      +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/msd.jsp b/src/main/webapp/views/product/msd.jsp new file mode 100644 index 0000000..335f134 --- /dev/null +++ b/src/main/webapp/views/product/msd.jsp @@ -0,0 +1,260 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
      +
      +

      慕斯垫

      +
      +
      + +

      + 品种 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      工艺

      +
      + + + + | + + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/notePaper.jsp b/src/main/webapp/views/product/notePaper.jsp new file mode 100644 index 0000000..ca203bb --- /dev/null +++ b/src/main/webapp/views/product/notePaper.jsp @@ -0,0 +1,533 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      便签本/联单

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

      材质

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

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +
      +

      数量(本)

      +
      +
      + +
      +
      +

      款数

      +
      +
      + +
      +
      +

      + 客户旺旺 +

      +
      + +
      +
      +

      + 工艺 +

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

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/otherCard.jsp b/src/main/webapp/views/product/otherCard.jsp new file mode 100644 index 0000000..0ab4f4b --- /dev/null +++ b/src/main/webapp/views/product/otherCard.jsp @@ -0,0 +1,37 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      规格

      +
      +
      + +
      +
      +

      数量(个)

      +
      + +
      +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/packingBox.jsp b/src/main/webapp/views/product/packingBox.jsp new file mode 100644 index 0000000..274497d --- /dev/null +++ b/src/main/webapp/views/product/packingBox.jsp @@ -0,0 +1,244 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      包装盒

      (500个起做) +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 种类 +

      +
      +
      + + +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 * 高 (请按格式输入)

      +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/paperCup.jsp b/src/main/webapp/views/product/paperCup.jsp new file mode 100644 index 0000000..f19116d --- /dev/null +++ b/src/main/webapp/views/product/paperCup.jsp @@ -0,0 +1,205 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      一次性纸杯

      +
      +
      +

      + 材质 +

      +
      + +
      +

      + 规格 +

      +
      + +
      + +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +

      下单备注-

      +
      + +
      +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/parkingCard.jsp b/src/main/webapp/views/product/parkingCard.jsp new file mode 100644 index 0000000..b851440 --- /dev/null +++ b/src/main/webapp/views/product/parkingCard.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + + \ No newline at end of file diff --git a/src/main/webapp/views/product/pictureAlbum.jsp b/src/main/webapp/views/product/pictureAlbum.jsp new file mode 100644 index 0000000..118cca6 --- /dev/null +++ b/src/main/webapp/views/product/pictureAlbum.jsp @@ -0,0 +1,412 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      画册

      +
      +
      + +
      + + +
      +
      +

      + 封面 +

      +
      + +
      +

      + 内页 +

      +
      +
      + + + +
      +
      +

      + 装订 +

      +
      + + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

      +
      + +
      +

      + 封面P数 (固定P数) +

      +
      + +
      +

      + 内页P数 请输入4的整数倍 +

      +
      + +
      +

      + 数量(本) +

      +
      + +
      +
      + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/placeMat.jsp b/src/main/webapp/views/product/placeMat.jsp new file mode 100644 index 0000000..2869f68 --- /dev/null +++ b/src/main/webapp/views/product/placeMat.jsp @@ -0,0 +1,220 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      餐垫纸

      +
      +
      + +

      + 材质 +

      +
      + +
      + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/pointCard.jsp b/src/main/webapp/views/product/pointCard.jsp new file mode 100644 index 0000000..0aaf9fb --- /dev/null +++ b/src/main/webapp/views/product/pointCard.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + \ No newline at end of file diff --git a/src/main/webapp/views/product/poster.jsp b/src/main/webapp/views/product/poster.jsp new file mode 100644 index 0000000..5853cb7 --- /dev/null +++ b/src/main/webapp/views/product/poster.jsp @@ -0,0 +1,1745 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      海报

      +
      +
      + +

      + 类目 +

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

      + 产品名称 +

      +
      + +
      +
      + + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

      + +
      + +
      +
      +
      +

      + 数量(个)一张起做 +

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

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

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

      + 工艺 +

      +
      + +
      +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/praiseCard.jsp b/src/main/webapp/views/product/praiseCard.jsp new file mode 100644 index 0000000..4053bdf --- /dev/null +++ b/src/main/webapp/views/product/praiseCard.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + \ No newline at end of file diff --git a/src/main/webapp/views/product/programCard.jsp b/src/main/webapp/views/product/programCard.jsp new file mode 100644 index 0000000..56c8b8b --- /dev/null +++ b/src/main/webapp/views/product/programCard.jsp @@ -0,0 +1,235 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      节目单

      +
      +
      +

      + 材质 +

      +
      + +
      + +

      + 规格 +

      +
      + +
      +

      + 规格 +

      +
      + +
      +

      + 数量(张) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/pvcCard.jsp b/src/main/webapp/views/product/pvcCard.jsp new file mode 100644 index 0000000..7cfd8cc --- /dev/null +++ b/src/main/webapp/views/product/pvcCard.jsp @@ -0,0 +1,375 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      PVC异型卡片

      +
      +
      + +

      + 材质 +

      +
      +
      + + + +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + +

      +
      + +
      + + +

      + 数量(张) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/pvcfigure.jsp b/src/main/webapp/views/product/pvcfigure.jsp new file mode 100644 index 0000000..052091f --- /dev/null +++ b/src/main/webapp/views/product/pvcfigure.jsp @@ -0,0 +1,335 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + +
      +
      +

      数码PVC

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(张) +

      +
      +
      + +
      +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +

      工艺

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/rollLabel.jsp b/src/main/webapp/views/product/rollLabel.jsp new file mode 100644 index 0000000..41c365c --- /dev/null +++ b/src/main/webapp/views/product/rollLabel.jsp @@ -0,0 +1,320 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      卷装标签

      一卷起做(每卷最少500张) +
      +
      + +

      + 材料 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      数量(个)

      +
      +
      + +
      +
      +

      款数

      +
      +
      + +
      +
      +

      + 客户旺旺 +

      +
      + +
      + +

      工艺

      +
      +
      + 覆膜 : + + + +
      +
      +
      + 白墨 : + +
      +
      + 卷芯 : + + + +
      +
      + 出标方向 : + + + + +
      +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/roomCard.jsp b/src/main/webapp/views/product/roomCard.jsp new file mode 100644 index 0000000..87ab189 --- /dev/null +++ b/src/main/webapp/views/product/roomCard.jsp @@ -0,0 +1,294 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +

      房卡套

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

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      + +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFeeTooWeight.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/roomCardCG.jsp b/src/main/webapp/views/product/roomCardCG.jsp new file mode 100644 index 0000000..4f635d4 --- /dev/null +++ b/src/main/webapp/views/product/roomCardCG.jsp @@ -0,0 +1,30 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +

      材质

      + +

      工艺

      +
      +
      + +
      +
      +

      规格

      +
      + +
      +

      数量(个)

      +
      + +
      diff --git a/src/main/webapp/views/product/roomCardZDY.jsp b/src/main/webapp/views/product/roomCardZDY.jsp new file mode 100644 index 0000000..7bbb852 --- /dev/null +++ b/src/main/webapp/views/product/roomCardZDY.jsp @@ -0,0 +1,25 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + +

      材质

      + +

      工艺

      +
      +
      + +
      +
      +

      尺寸 输入格式: 长 * 宽 * 舌头

      + + + x + + x + + +

      数量(个)

      +
      + +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/scratchCard.jsp b/src/main/webapp/views/product/scratchCard.jsp new file mode 100644 index 0000000..d6dc90b --- /dev/null +++ b/src/main/webapp/views/product/scratchCard.jsp @@ -0,0 +1,116 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      + 规格 +

      + + + + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + + \ No newline at end of file diff --git a/src/main/webapp/views/product/slq.jsp b/src/main/webapp/views/product/slq.jsp new file mode 100644 index 0000000..61cdcef --- /dev/null +++ b/src/main/webapp/views/product/slq.jsp @@ -0,0 +1,234 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + +
      +
      +

      手拉旗

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 宽度 +

      +
      + +
      +

      + 长度(CM/厘米) +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/specialCard.jsp b/src/main/webapp/views/product/specialCard.jsp new file mode 100644 index 0000000..0ea6b90 --- /dev/null +++ b/src/main/webapp/views/product/specialCard.jsp @@ -0,0 +1,90 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +

      材料

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +
      +

      数量(张) + +

      + +
      +
      + +
      +
      +
      +
      +

      数量(张)

      +
      + +
      +
      +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

      + + + + diff --git a/src/main/webapp/views/product/specialCard2.jsp b/src/main/webapp/views/product/specialCard2.jsp new file mode 100644 index 0000000..4d6ece4 --- /dev/null +++ b/src/main/webapp/views/product/specialCard2.jsp @@ -0,0 +1,704 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      特种纸名片

      +
      +
      + +

      材料

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + +

      数量(张) + +

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

      款数

      +
      + +
      + +

      + 客户旺旺 +

      +
      + +
      +

      工艺

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

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/stickers - 副本.jsp b/src/main/webapp/views/product/stickers - 副本.jsp new file mode 100644 index 0000000..c235f56 --- /dev/null +++ b/src/main/webapp/views/product/stickers - 副本.jsp @@ -0,0 +1,1347 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      不干胶

      +

      + + 使用方法:选择对应的产品种类。输入正确的尺寸、数量后点击“计算”出价格(自动复制); + +
      +
      + + + + + + +
      +
      +
      +
      +

      + 品种 +

      + +
      + + + +
      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + +

      + 数量(个) +

      +
      + +
      + + + +
      + + + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      +
      +

      + 工艺 +

      +
      + + + + + |     + + + + + |     + + + + + |     + + + +
      +
      + 烫金 : + + + + +
      + +
      x +
      + +
      +
      +
      +
      + 凹凸 : + + + + +
      +
      +
      + + + +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/stickers.jsp b/src/main/webapp/views/product/stickers.jsp new file mode 100644 index 0000000..58366ea --- /dev/null +++ b/src/main/webapp/views/product/stickers.jsp @@ -0,0 +1,1741 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      不干胶

      +

      + + 使用方法:选择对应的产品种类。输入正确的尺寸、数量后点击“计算”出价格(自动复制); + +
      +
      + + + + <%-- --%> + + <%-- --%> +
      +
      +
      +
      +

      + 品种 +

      + +
      + + + +
      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      + +

      + 数量(个) +

      +
      + +
      + + + +
      + + + +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      +
      +

      + 工艺 +

      +
      + + + + |     + + + + + |     + + + + + |     + + + +
      +
      + 排废 : + + +
      +
      + + +
      +
      + 烫金 : + + +
      +
      + 凹凸 : + + + + + +
      +
      +
      + + + +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/stickersdouble.jsp b/src/main/webapp/views/product/stickersdouble.jsp new file mode 100644 index 0000000..d0784d7 --- /dev/null +++ b/src/main/webapp/views/product/stickersdouble.jsp @@ -0,0 +1,35 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(张) +

      +
      +
      + +
      +
      \ No newline at end of file diff --git a/src/main/webapp/views/product/tablecolth.jsp b/src/main/webapp/views/product/tablecolth.jsp new file mode 100644 index 0000000..1044b8e --- /dev/null +++ b/src/main/webapp/views/product/tablecolth.jsp @@ -0,0 +1,250 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + +
      +
      +

      桌布

      +
      +
      + +

      + 材质 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + + + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/tag.jsp b/src/main/webapp/views/product/tag.jsp new file mode 100644 index 0000000..becd4e8 --- /dev/null +++ b/src/main/webapp/views/product/tag.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + + + + +

      +
      +
      + +
      +
      +

      数量

      +
      + +
      + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      工艺

      +
      + + + + +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/product/tagClothes.jsp b/src/main/webapp/views/product/tagClothes.jsp new file mode 100644 index 0000000..43fb82c --- /dev/null +++ b/src/main/webapp/views/product/tagClothes.jsp @@ -0,0 +1,845 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      服装吊牌

      + +
      +
      +
      + + +
      +
      +
      + +

      材质

      +
      + + + +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + +<%-- --%> + + +

      +
      +
      + +
      +
      + +

      + 数量(张) + +

      +
      +
      + +
      +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +

      + 工艺 +

      +
      + + + |    + + + |    + + |    +
      + + + +
      + +
      x +
      + +
      +
      +
      +
      + + + + +
      +
      +
      + +
      + + +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/tags.jsp b/src/main/webapp/views/product/tags.jsp new file mode 100644 index 0000000..e84c1d2 --- /dev/null +++ b/src/main/webapp/views/product/tags.jsp @@ -0,0 +1,444 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + + +Insert title here +<%@include file="/views/common.jsp"%> + + + + +
      +
      +

      吊牌

      + +
      +
      + +

      材质

      +
      + + + +
      +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 + + + + +

      +
      +
      + +
      +
      +

      + 数量(张) + +

      +
      +
      + +
      +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + + + |    + + + |    + + +
      +
      + + +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/timeCard.jsp b/src/main/webapp/views/product/timeCard.jsp new file mode 100644 index 0000000..971df0d --- /dev/null +++ b/src/main/webapp/views/product/timeCard.jsp @@ -0,0 +1,113 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + \ No newline at end of file diff --git a/src/main/webapp/views/product/warmSticker.jsp b/src/main/webapp/views/product/warmSticker.jsp new file mode 100644 index 0000000..59746a3 --- /dev/null +++ b/src/main/webapp/views/product/warmSticker.jsp @@ -0,0 +1,232 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + + +
      +
      +

      暖心贴

      +
      +
      +
      + + +
      +
      +
      + +

      + 规格(CM/厘米) +

      +
      + +
      +
      + +
      +

      + 材质 +

      +
      + +
      +

      + 数量(本)(每本50张) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/weddingCard.jsp b/src/main/webapp/views/product/weddingCard.jsp new file mode 100644 index 0000000..376b127 --- /dev/null +++ b/src/main/webapp/views/product/weddingCard.jsp @@ -0,0 +1,302 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + Insert title here + <%@include file="/views/common.jsp" %> + + + + +
      +
      +

      婚礼卡

      +
      +
      + +

      + 材质 +

      + +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(张) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + + + |     + + +
      +
      +
      + + +
      +

      计算结果- + +

      +
      + + <%@include file="../acountExpressFee.jsp" %> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + + +<%@include file="/views/copyResult.jsp" %> + + \ No newline at end of file diff --git a/src/main/webapp/views/product/wineCard.jsp b/src/main/webapp/views/product/wineCard.jsp new file mode 100644 index 0000000..f2e4683 --- /dev/null +++ b/src/main/webapp/views/product/wineCard.jsp @@ -0,0 +1,110 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + +

      材质

      +
      + +
      +

      + 规格 +

      +
      + +
      + + +输入格式: 长 * 宽 +

      + 数量(张) +

      +
      + +
      + + +

      款数

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      + \ No newline at end of file diff --git a/src/main/webapp/views/product/ykl.jsp b/src/main/webapp/views/product/ykl.jsp new file mode 100644 index 0000000..13be3f7 --- /dev/null +++ b/src/main/webapp/views/product/ykl.jsp @@ -0,0 +1,261 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + +
      +
      +

      亚克力

      +
      +
      + +

      + 产品名称 +

      +
      + +
      +

      + 尺寸(CM/厘米) 输入格式: 长 * 宽 +

      +
      + +
      +

      + 数量(个) +

      +
      + +
      +

      + 款数 +

      +
      + +
      +

      + 客户旺旺 +

      +
      + +
      +

      + 工艺 +

      +
      + + +
      +
      +
      + + +
      +

      计算结果-

      +
      + + <%@include file="../acountExpressFee.jsp"%> +
      + +
      +
      +
      +
      +
      +
      + +
      +
      + +<%@include file="/views/copyResult.jsp"%> + + \ No newline at end of file diff --git a/src/main/webapp/views/productImg/addImgUpload.jsp b/src/main/webapp/views/productImg/addImgUpload.jsp new file mode 100644 index 0000000..a70cfcc --- /dev/null +++ b/src/main/webapp/views/productImg/addImgUpload.jsp @@ -0,0 +1,176 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      + +
      + 预览图: +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/productImg/imgUpload.jsp b/src/main/webapp/views/productImg/imgUpload.jsp new file mode 100644 index 0000000..0b92ead --- /dev/null +++ b/src/main/webapp/views/productImg/imgUpload.jsp @@ -0,0 +1,73 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +用户列表 + <%@include file="/views/common.jsp"%> + + + + + + +
      +
        +
      • 首页
      • +
      • 产品图片上传
      • +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + +
      +
      +
      + +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/productImg/updateImgUpload.jsp b/src/main/webapp/views/productImg/updateImgUpload.jsp new file mode 100644 index 0000000..0fc898c --- /dev/null +++ b/src/main/webapp/views/productImg/updateImgUpload.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + + +Insert title here +<%@include file="/views/common.jsp"%> + + + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      + + + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/readme.jsp b/src/main/webapp/views/readme.jsp new file mode 100644 index 0000000..abf8e79 --- /dev/null +++ b/src/main/webapp/views/readme.jsp @@ -0,0 +1,228 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp" %> + + + + + + +
      +
      +
      +

      报价需知:

      + +
      +
      + 含有以下需求的产品不接 +

      1、含有反对宪法确定的基本原则内容的;

      +

      2、含有危害国家统一、主权和领土完整内容的(如:台独,港独,疆独等);

      +

      3、含有泄露国家秘密、危害国家安全或者损害国家荣誉和利益内容的;

      +

      4、含有煽动民族仇恨、民族歧视,破坏民族团结或者侵害民族风俗、习惯内容的;

      +

      5、含有宣扬邪教内容的;

      +

      6、含有扰乱、破坏社会稳定和秩序内容的(如:代开发票等);

      +

      7、含有宣扬赌博、暴力或者教唆犯罪内容的;

      +

      8、含有侮辱、诋毁或者诽谤他人,侵害他人合法权益的;

      +

      9、含有涉黄的名片或不干胶、彩页不接内容的(如:有明显诱惑、酒店上门服务、找美女帅哥、会所休闲喝茶、养生SPA、高端养生、私人订制暗示等);

      + + +
      + + +
      + + 推荐使用谷歌浏览器;其他浏览器请先切换成 “极速模式” +
      +
      +
      +
      +
      +
      +
      +
      +
      + + +
      +
      +
      +
      +
      +

      更新日志:

      +
      + +
      +
      +
      + + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/bug/addBug.jsp b/src/main/webapp/views/system/bug/addBug.jsp new file mode 100644 index 0000000..c591bc3 --- /dev/null +++ b/src/main/webapp/views/system/bug/addBug.jsp @@ -0,0 +1,126 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加问题 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      + 预览图: +
      +
      +
      +
      + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/bug/bug.jsp b/src/main/webapp/views/system/bug/bug.jsp new file mode 100644 index 0000000..5a8a4d6 --- /dev/null +++ b/src/main/webapp/views/system/bug/bug.jsp @@ -0,0 +1,51 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +bug列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerAward/customerAward.jsp b/src/main/webapp/views/system/customerAward/customerAward.jsp new file mode 100644 index 0000000..1640e89 --- /dev/null +++ b/src/main/webapp/views/system/customerAward/customerAward.jsp @@ -0,0 +1,109 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +财务列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerData/addCustomerData.jsp b/src/main/webapp/views/system/customerData/addCustomerData.jsp new file mode 100644 index 0000000..92f79a1 --- /dev/null +++ b/src/main/webapp/views/system/customerData/addCustomerData.jsp @@ -0,0 +1,159 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加用户 +<%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      + +
      + +
      +
      + +
      + +
      +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerData/customerData.jsp b/src/main/webapp/views/system/customerData/customerData.jsp new file mode 100644 index 0000000..d405ddc --- /dev/null +++ b/src/main/webapp/views/system/customerData/customerData.jsp @@ -0,0 +1,176 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +数据列表 + <%@include file="/views/common.jsp"%> + + + + + + + +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      + + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerData/updateCustomerData.jsp b/src/main/webapp/views/system/customerData/updateCustomerData.jsp new file mode 100644 index 0000000..247c8fd --- /dev/null +++ b/src/main/webapp/views/system/customerData/updateCustomerData.jsp @@ -0,0 +1,131 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加用户 +<%@include file="/views/common.jsp"%> + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/content/addCustomerAttitudeContent.jsp b/src/main/webapp/views/system/customerTrain/attitude/content/addCustomerAttitudeContent.jsp new file mode 100644 index 0000000..aee4bf3 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/content/addCustomerAttitudeContent.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/content/customerAttitudeContent.jsp b/src/main/webapp/views/system/customerTrain/attitude/content/customerAttitudeContent.jsp new file mode 100644 index 0000000..26785ee --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/content/customerAttitudeContent.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/content/updateCustomerAttitudeContent.jsp b/src/main/webapp/views/system/customerTrain/attitude/content/updateCustomerAttitudeContent.jsp new file mode 100644 index 0000000..80ff2b1 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/content/updateCustomerAttitudeContent.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + <%-- --%> + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/kindLabel/addCustomerAttitudeKindLabel.jsp b/src/main/webapp/views/system/customerTrain/attitude/kindLabel/addCustomerAttitudeKindLabel.jsp new file mode 100644 index 0000000..e5400a0 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/kindLabel/addCustomerAttitudeKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/kindLabel/customerAttitudeKindLabel.jsp b/src/main/webapp/views/system/customerTrain/attitude/kindLabel/customerAttitudeKindLabel.jsp new file mode 100644 index 0000000..42fb44c --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/kindLabel/customerAttitudeKindLabel.jsp @@ -0,0 +1,213 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/kindLabel/updateCustomerAttitudeKindLabel.jsp b/src/main/webapp/views/system/customerTrain/attitude/kindLabel/updateCustomerAttitudeKindLabel.jsp new file mode 100644 index 0000000..734c35b --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/kindLabel/updateCustomerAttitudeKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/proType/addCustomerAttitudeProType.jsp b/src/main/webapp/views/system/customerTrain/attitude/proType/addCustomerAttitudeProType.jsp new file mode 100644 index 0000000..fb2d978 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/proType/addCustomerAttitudeProType.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/proType/customerAttitudeProType.jsp b/src/main/webapp/views/system/customerTrain/attitude/proType/customerAttitudeProType.jsp new file mode 100644 index 0000000..10fc99a --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/proType/customerAttitudeProType.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/proType/updateCustomerAttitudeProType.jsp b/src/main/webapp/views/system/customerTrain/attitude/proType/updateCustomerAttitudeProType.jsp new file mode 100644 index 0000000..0fa14e7 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/proType/updateCustomerAttitudeProType.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/attitude/showCustomerAttitudeContent.jsp b/src/main/webapp/views/system/customerTrain/attitude/showCustomerAttitudeContent.jsp new file mode 100644 index 0000000..9321fee --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/attitude/showCustomerAttitudeContent.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      + + +
      +
      +
      +
      +
      +

      服务态度:

      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/content/addCustomerBottomLineContent.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/content/addCustomerBottomLineContent.jsp new file mode 100644 index 0000000..cda316c --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/content/addCustomerBottomLineContent.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/content/customerBottomLineContent.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/content/customerBottomLineContent.jsp new file mode 100644 index 0000000..163ce6a --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/content/customerBottomLineContent.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/content/updateCustomerBottomLineContent.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/content/updateCustomerBottomLineContent.jsp new file mode 100644 index 0000000..2734606 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/content/updateCustomerBottomLineContent.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + <%-- --%> + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/addCustomerBottomLineKindLabel.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/addCustomerBottomLineKindLabel.jsp new file mode 100644 index 0000000..eb3ad0e --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/addCustomerBottomLineKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/customerBottomLineKindLabel.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/customerBottomLineKindLabel.jsp new file mode 100644 index 0000000..6c21473 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/customerBottomLineKindLabel.jsp @@ -0,0 +1,213 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/updateCustomerBottomLineKindLabel.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/updateCustomerBottomLineKindLabel.jsp new file mode 100644 index 0000000..2cd591b --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/kindLabel/updateCustomerBottomLineKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/proType/addCustomerBottomLineProType.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/proType/addCustomerBottomLineProType.jsp new file mode 100644 index 0000000..a70ce7c --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/proType/addCustomerBottomLineProType.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/proType/customerBottomLineProType.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/proType/customerBottomLineProType.jsp new file mode 100644 index 0000000..2d157bd --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/proType/customerBottomLineProType.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/proType/updateCustomerBottomLineProType.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/proType/updateCustomerBottomLineProType.jsp new file mode 100644 index 0000000..376c905 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/proType/updateCustomerBottomLineProType.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/bottomLine/showCustomerBottomLineContent.jsp b/src/main/webapp/views/system/customerTrain/bottomLine/showCustomerBottomLineContent.jsp new file mode 100644 index 0000000..1db3b6b --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/bottomLine/showCustomerBottomLineContent.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      + + +
      +
      +
      +
      +
      +

      客服底线:

      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/content/addCustomerIntroduceContent.jsp b/src/main/webapp/views/system/customerTrain/introduce/content/addCustomerIntroduceContent.jsp new file mode 100644 index 0000000..65eecc9 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/content/addCustomerIntroduceContent.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/content/customerIntroduceContent.jsp b/src/main/webapp/views/system/customerTrain/introduce/content/customerIntroduceContent.jsp new file mode 100644 index 0000000..e058b47 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/content/customerIntroduceContent.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/content/updateCustomerIntroduceContent.jsp b/src/main/webapp/views/system/customerTrain/introduce/content/updateCustomerIntroduceContent.jsp new file mode 100644 index 0000000..f19cf17 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/content/updateCustomerIntroduceContent.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + <%-- --%> + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/kindLabel/addCustomerIntroduceKindLabel.jsp b/src/main/webapp/views/system/customerTrain/introduce/kindLabel/addCustomerIntroduceKindLabel.jsp new file mode 100644 index 0000000..c68daf5 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/kindLabel/addCustomerIntroduceKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/kindLabel/customerIntroduceKindLabel.jsp b/src/main/webapp/views/system/customerTrain/introduce/kindLabel/customerIntroduceKindLabel.jsp new file mode 100644 index 0000000..58f0476 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/kindLabel/customerIntroduceKindLabel.jsp @@ -0,0 +1,213 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/kindLabel/updateCustomerIntroduceKindLabel.jsp b/src/main/webapp/views/system/customerTrain/introduce/kindLabel/updateCustomerIntroduceKindLabel.jsp new file mode 100644 index 0000000..7499472 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/kindLabel/updateCustomerIntroduceKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/proType/addCustomerIntroduceProType.jsp b/src/main/webapp/views/system/customerTrain/introduce/proType/addCustomerIntroduceProType.jsp new file mode 100644 index 0000000..aa4df10 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/proType/addCustomerIntroduceProType.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/proType/customerIntroduceProType.jsp b/src/main/webapp/views/system/customerTrain/introduce/proType/customerIntroduceProType.jsp new file mode 100644 index 0000000..573d9e4 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/proType/customerIntroduceProType.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/proType/updateCustomerIntroduceProType.jsp b/src/main/webapp/views/system/customerTrain/introduce/proType/updateCustomerIntroduceProType.jsp new file mode 100644 index 0000000..0e3bd38 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/proType/updateCustomerIntroduceProType.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/introduce/showCustomerIntroduceContent.jsp b/src/main/webapp/views/system/customerTrain/introduce/showCustomerIntroduceContent.jsp new file mode 100644 index 0000000..f9a5f16 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/introduce/showCustomerIntroduceContent.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      + + +
      +
      +
      +
      +
      +

      企业介绍:

      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/content/addCustomerKnowledgeContent.jsp b/src/main/webapp/views/system/customerTrain/knowledge/content/addCustomerKnowledgeContent.jsp new file mode 100644 index 0000000..24c513b --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/content/addCustomerKnowledgeContent.jsp @@ -0,0 +1,124 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/content/customerKnowledgeContent.jsp b/src/main/webapp/views/system/customerTrain/knowledge/content/customerKnowledgeContent.jsp new file mode 100644 index 0000000..271d004 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/content/customerKnowledgeContent.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/content/updateCustomerKnowledgeContent.jsp b/src/main/webapp/views/system/customerTrain/knowledge/content/updateCustomerKnowledgeContent.jsp new file mode 100644 index 0000000..a92fd3d --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/content/updateCustomerKnowledgeContent.jsp @@ -0,0 +1,185 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/addCustomerKnowledgeKindLabel.jsp b/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/addCustomerKnowledgeKindLabel.jsp new file mode 100644 index 0000000..7fb5f3f --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/addCustomerKnowledgeKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/customerKnowledgeKindLabel.jsp b/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/customerKnowledgeKindLabel.jsp new file mode 100644 index 0000000..b97cb2b --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/customerKnowledgeKindLabel.jsp @@ -0,0 +1,213 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/updateCustomerKnowledgeKindLabel.jsp b/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/updateCustomerKnowledgeKindLabel.jsp new file mode 100644 index 0000000..abbc222 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/kindLabel/updateCustomerKnowledgeKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/proType/addCustomerKnowledgeProType.jsp b/src/main/webapp/views/system/customerTrain/knowledge/proType/addCustomerKnowledgeProType.jsp new file mode 100644 index 0000000..d3fb47a --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/proType/addCustomerKnowledgeProType.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/proType/customerKnowledgeProType.jsp b/src/main/webapp/views/system/customerTrain/knowledge/proType/customerKnowledgeProType.jsp new file mode 100644 index 0000000..7a73ec6 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/proType/customerKnowledgeProType.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/proType/updateCustomerKnowledgeProType.jsp b/src/main/webapp/views/system/customerTrain/knowledge/proType/updateCustomerKnowledgeProType.jsp new file mode 100644 index 0000000..51220b9 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/proType/updateCustomerKnowledgeProType.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/knowledge/showCustomerKnowledgeContent.jsp b/src/main/webapp/views/system/customerTrain/knowledge/showCustomerKnowledgeContent.jsp new file mode 100644 index 0000000..a1fb13d --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/knowledge/showCustomerKnowledgeContent.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      + + +
      +
      +
      +
      +
      +

      产品知识:

      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/content/addCustomerSaleSkillContent.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/content/addCustomerSaleSkillContent.jsp new file mode 100644 index 0000000..6e18ef9 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/content/addCustomerSaleSkillContent.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/content/customerSaleSkillContent.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/content/customerSaleSkillContent.jsp new file mode 100644 index 0000000..c43e3fd --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/content/customerSaleSkillContent.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/content/updateCustomerSaleSkillContent.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/content/updateCustomerSaleSkillContent.jsp new file mode 100644 index 0000000..3d42425 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/content/updateCustomerSaleSkillContent.jsp @@ -0,0 +1,172 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/addCustomerSaleSkillKindLabel.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/addCustomerSaleSkillKindLabel.jsp new file mode 100644 index 0000000..f37e46d --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/addCustomerSaleSkillKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/customerSaleSkillKindLabel.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/customerSaleSkillKindLabel.jsp new file mode 100644 index 0000000..9e1c528 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/customerSaleSkillKindLabel.jsp @@ -0,0 +1,213 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/updateCustomerSaleSkillKindLabel.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/updateCustomerSaleSkillKindLabel.jsp new file mode 100644 index 0000000..d650a30 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/kindLabel/updateCustomerSaleSkillKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/proType/addCustomerSaleSkillProType.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/proType/addCustomerSaleSkillProType.jsp new file mode 100644 index 0000000..1f56fd5 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/proType/addCustomerSaleSkillProType.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/proType/customerSaleSkillProType.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/proType/customerSaleSkillProType.jsp new file mode 100644 index 0000000..ac87de5 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/proType/customerSaleSkillProType.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/proType/updateCustomerSaleSkillProType.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/proType/updateCustomerSaleSkillProType.jsp new file mode 100644 index 0000000..40b9b03 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/proType/updateCustomerSaleSkillProType.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/saleSkill/showCustomerSaleSkillContent.jsp b/src/main/webapp/views/system/customerTrain/saleSkill/showCustomerSaleSkillContent.jsp new file mode 100644 index 0000000..0241130 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/saleSkill/showCustomerSaleSkillContent.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      + + +
      +
      +
      +
      +
      +

      销售技巧:

      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/content/addCustomerSkillContent.jsp b/src/main/webapp/views/system/customerTrain/skill/content/addCustomerSkillContent.jsp new file mode 100644 index 0000000..61dc579 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/content/addCustomerSkillContent.jsp @@ -0,0 +1,111 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + +
      + +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/content/customerSkillContent.jsp b/src/main/webapp/views/system/customerTrain/skill/content/customerSkillContent.jsp new file mode 100644 index 0000000..f512932 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/content/customerSkillContent.jsp @@ -0,0 +1,253 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + +
      +
      + +
      + +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/content/updateCustomerSkillContent.jsp b/src/main/webapp/views/system/customerTrain/skill/content/updateCustomerSkillContent.jsp new file mode 100644 index 0000000..9db95af --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/content/updateCustomerSkillContent.jsp @@ -0,0 +1,173 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + <%-- --%> + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/kindLabel/addCustomerSkillKindLabel.jsp b/src/main/webapp/views/system/customerTrain/skill/kindLabel/addCustomerSkillKindLabel.jsp new file mode 100644 index 0000000..40b084b --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/kindLabel/addCustomerSkillKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/kindLabel/customerSkillKindLabel.jsp b/src/main/webapp/views/system/customerTrain/skill/kindLabel/customerSkillKindLabel.jsp new file mode 100644 index 0000000..9e1ac6e --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/kindLabel/customerSkillKindLabel.jsp @@ -0,0 +1,213 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/kindLabel/updateCustomerSkillKindLabel.jsp b/src/main/webapp/views/system/customerTrain/skill/kindLabel/updateCustomerSkillKindLabel.jsp new file mode 100644 index 0000000..cd25e50 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/kindLabel/updateCustomerSkillKindLabel.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/proType/addCustomerSkillProType.jsp b/src/main/webapp/views/system/customerTrain/skill/proType/addCustomerSkillProType.jsp new file mode 100644 index 0000000..e1870d5 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/proType/addCustomerSkillProType.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/proType/customerSkillProType.jsp b/src/main/webapp/views/system/customerTrain/skill/proType/customerSkillProType.jsp new file mode 100644 index 0000000..88c5ed3 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/proType/customerSkillProType.jsp @@ -0,0 +1,243 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      + +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/proType/updateCustomerSkillProType.jsp b/src/main/webapp/views/system/customerTrain/skill/proType/updateCustomerSkillProType.jsp new file mode 100644 index 0000000..0fcc3d4 --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/proType/updateCustomerSkillProType.jsp @@ -0,0 +1,88 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/customerTrain/skill/showCustomerSkillContent.jsp b/src/main/webapp/views/system/customerTrain/skill/showCustomerSkillContent.jsp new file mode 100644 index 0000000..c83106a --- /dev/null +++ b/src/main/webapp/views/system/customerTrain/skill/showCustomerSkillContent.jsp @@ -0,0 +1,129 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + +
      + + +
      +
      +
      +
      +
      +

      售前客服必备技能:

      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/expressFee/addExpressFee.jsp b/src/main/webapp/views/system/expressFee/addExpressFee.jsp new file mode 100644 index 0000000..f650d10 --- /dev/null +++ b/src/main/webapp/views/system/expressFee/addExpressFee.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加省份快递费 +<%@include file="/views/common.jsp"%> + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/expressFee/expressFee.jsp b/src/main/webapp/views/system/expressFee/expressFee.jsp new file mode 100644 index 0000000..59de03c --- /dev/null +++ b/src/main/webapp/views/system/expressFee/expressFee.jsp @@ -0,0 +1,69 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +快递费列表 + <%@include file="/views/common.jsp"%> + + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/expressFee/updateExpressFee.jsp b/src/main/webapp/views/system/expressFee/updateExpressFee.jsp new file mode 100644 index 0000000..40f92db --- /dev/null +++ b/src/main/webapp/views/system/expressFee/updateExpressFee.jsp @@ -0,0 +1,75 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +修改省份快递费 +<%@include file="/views/common.jsp"%> + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/extract/extract.jsp b/src/main/webapp/views/system/finance/extract/extract.jsp new file mode 100644 index 0000000..9f0f63b --- /dev/null +++ b/src/main/webapp/views/system/finance/extract/extract.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +财务拆分尺寸列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      +
      + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance.jsp b/src/main/webapp/views/system/finance/finance.jsp new file mode 100644 index 0000000..20f6c66 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +财务列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      +
      + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance2.jsp b/src/main/webapp/views/system/finance/finance2.jsp new file mode 100644 index 0000000..1ac7d72 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance2.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +财务列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      +
      + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance3.jsp b/src/main/webapp/views/system/finance/finance3.jsp new file mode 100644 index 0000000..7526db7 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance3.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +财务列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      + + +
      +
      +
      + + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance4.jsp b/src/main/webapp/views/system/finance/finance4.jsp new file mode 100644 index 0000000..63741d4 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance4.jsp @@ -0,0 +1,85 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +财务列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      大纸尺寸430*300mm,出血3mm
      +
      +
      + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance5.jsp b/src/main/webapp/views/system/finance/finance5.jsp new file mode 100644 index 0000000..2b7a765 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance5.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +拼版计算5 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      大纸尺寸440*310mm,出血3mm
      +
      +
      + + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance6.jsp b/src/main/webapp/views/system/finance/finance6.jsp new file mode 100644 index 0000000..1036347 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance6.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +拼版计算6 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      大纸尺寸425*300mm,出血4mm
      +
      +
      + + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/finance/finance7.jsp b/src/main/webapp/views/system/finance/finance7.jsp new file mode 100644 index 0000000..700a4f2 --- /dev/null +++ b/src/main/webapp/views/system/finance/finance7.jsp @@ -0,0 +1,86 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +拼版计算7 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      大纸尺寸420*280mm,出血2mm
      +
      +
      + + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/financeDifference/difference.jsp b/src/main/webapp/views/system/financeDifference/difference.jsp new file mode 100644 index 0000000..8ed4fa2 --- /dev/null +++ b/src/main/webapp/views/system/financeDifference/difference.jsp @@ -0,0 +1,83 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +补差价订单处理 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      +
      + +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/information/addInformation.jsp b/src/main/webapp/views/system/information/addInformation.jsp new file mode 100644 index 0000000..1c4d0f7 --- /dev/null +++ b/src/main/webapp/views/system/information/addInformation.jsp @@ -0,0 +1,81 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加产品须知 +<%@include file="/views/common.jsp"%> + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/information/information.jsp b/src/main/webapp/views/system/information/information.jsp new file mode 100644 index 0000000..f6bf6b5 --- /dev/null +++ b/src/main/webapp/views/system/information/information.jsp @@ -0,0 +1,70 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +产品知识列表 + <%@include file="/views/common.jsp"%> + + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/information/updateInformation.jsp b/src/main/webapp/views/system/information/updateInformation.jsp new file mode 100644 index 0000000..17c0f22 --- /dev/null +++ b/src/main/webapp/views/system/information/updateInformation.jsp @@ -0,0 +1,75 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +修改产品须知 +<%@include file="/views/common.jsp"%> + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      + + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/loginIp/addLoginIp.jsp b/src/main/webapp/views/system/loginIp/addLoginIp.jsp new file mode 100644 index 0000000..7ece759 --- /dev/null +++ b/src/main/webapp/views/system/loginIp/addLoginIp.jsp @@ -0,0 +1,101 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加用户 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/loginIp/loginIp.jsp b/src/main/webapp/views/system/loginIp/loginIp.jsp new file mode 100644 index 0000000..b9dc0f5 --- /dev/null +++ b/src/main/webapp/views/system/loginIp/loginIp.jsp @@ -0,0 +1,71 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +允许登录IP列表 + <%@include file="/views/common.jsp"%> + + + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/loginIp/updateLoginIp.jsp b/src/main/webapp/views/system/loginIp/updateLoginIp.jsp new file mode 100644 index 0000000..f48ff3a --- /dev/null +++ b/src/main/webapp/views/system/loginIp/updateLoginIp.jsp @@ -0,0 +1,93 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +修改ip +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/loginLog/loginLog.jsp b/src/main/webapp/views/system/loginLog/loginLog.jsp new file mode 100644 index 0000000..4409e15 --- /dev/null +++ b/src/main/webapp/views/system/loginLog/loginLog.jsp @@ -0,0 +1,122 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/permission/index.jsp b/src/main/webapp/views/system/permission/index.jsp new file mode 100644 index 0000000..1ecf751 --- /dev/null +++ b/src/main/webapp/views/system/permission/index.jsp @@ -0,0 +1,56 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here + <%@include file="/views/common.jsp"%> + + + +

      权限列表

      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/product/product.jsp b/src/main/webapp/views/system/product/product.jsp new file mode 100644 index 0000000..c2ec243 --- /dev/null +++ b/src/main/webapp/views/system/product/product.jsp @@ -0,0 +1,65 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +价格列表 + <%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/question/addQuestion.jsp b/src/main/webapp/views/system/question/addQuestion.jsp new file mode 100644 index 0000000..2adaa77 --- /dev/null +++ b/src/main/webapp/views/system/question/addQuestion.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加问题 +<%@include file="/views/common.jsp"%> + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      + +
      + +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/question/question.jsp b/src/main/webapp/views/system/question/question.jsp new file mode 100644 index 0000000..065990b --- /dev/null +++ b/src/main/webapp/views/system/question/question.jsp @@ -0,0 +1,77 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +问题列表 + <%@include file="/views/common.jsp"%> + + + + + + +
      +
      +
      + +
      + +
      +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/question/updateQuestion.jsp b/src/main/webapp/views/system/question/updateQuestion.jsp new file mode 100644 index 0000000..b09b423 --- /dev/null +++ b/src/main/webapp/views/system/question/updateQuestion.jsp @@ -0,0 +1,107 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +修改问题 +<%@include file="/views/common.jsp"%> + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + + +
      +
      +
      + +
      + +
      +
      + + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/quoteData/addOrderNumber.jsp b/src/main/webapp/views/system/quoteData/addOrderNumber.jsp new file mode 100644 index 0000000..d6c57e2 --- /dev/null +++ b/src/main/webapp/views/system/quoteData/addOrderNumber.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +填写成交订单号 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + + + + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/quoteData/kefuTotal.jsp b/src/main/webapp/views/system/quoteData/kefuTotal.jsp new file mode 100644 index 0000000..582563f --- /dev/null +++ b/src/main/webapp/views/system/quoteData/kefuTotal.jsp @@ -0,0 +1,138 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      客服大单数据统计
      +
      +
      + +
      + +
      +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/quoteData/quoteData.jsp b/src/main/webapp/views/system/quoteData/quoteData.jsp new file mode 100644 index 0000000..c838a63 --- /dev/null +++ b/src/main/webapp/views/system/quoteData/quoteData.jsp @@ -0,0 +1,628 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      + +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/quoteData/summary.jsp b/src/main/webapp/views/system/quoteData/summary.jsp new file mode 100644 index 0000000..1a885f2 --- /dev/null +++ b/src/main/webapp/views/system/quoteData/summary.jsp @@ -0,0 +1,141 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      +
      +
      +
      +
      数据统计
      +
      +
      + +
      + +
      +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/quoteLog/quoteLog.jsp b/src/main/webapp/views/system/quoteLog/quoteLog.jsp new file mode 100644 index 0000000..1e0ceb7 --- /dev/null +++ b/src/main/webapp/views/system/quoteLog/quoteLog.jsp @@ -0,0 +1,212 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + + + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      + + +
      +
      + +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/role/addRole.jsp b/src/main/webapp/views/system/role/addRole.jsp new file mode 100644 index 0000000..6060e98 --- /dev/null +++ b/src/main/webapp/views/system/role/addRole.jsp @@ -0,0 +1,98 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加角色 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + + +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/role/role.jsp b/src/main/webapp/views/system/role/role.jsp new file mode 100644 index 0000000..c5bb9d4 --- /dev/null +++ b/src/main/webapp/views/system/role/role.jsp @@ -0,0 +1,99 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + + <%@include file="/views/common.jsp"%> + + + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + +
      +
      +
      + +
      +
      + + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/role/updateRole.jsp b/src/main/webapp/views/system/role/updateRole.jsp new file mode 100644 index 0000000..3707856 --- /dev/null +++ b/src/main/webapp/views/system/role/updateRole.jsp @@ -0,0 +1,79 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> +修改用户 + + +
      +
      + +
      + +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + + + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/searchPro/addSearchPro.jsp b/src/main/webapp/views/system/searchPro/addSearchPro.jsp new file mode 100644 index 0000000..76853e3 --- /dev/null +++ b/src/main/webapp/views/system/searchPro/addSearchPro.jsp @@ -0,0 +1,105 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加关键字 +<%@include file="/views/common.jsp"%> + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      + +
      + + +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/searchPro/searchPro.jsp b/src/main/webapp/views/system/searchPro/searchPro.jsp new file mode 100644 index 0000000..53b2762 --- /dev/null +++ b/src/main/webapp/views/system/searchPro/searchPro.jsp @@ -0,0 +1,59 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/updateLog/addLog.jsp b/src/main/webapp/views/system/updateLog/addLog.jsp new file mode 100644 index 0000000..f1241b1 --- /dev/null +++ b/src/main/webapp/views/system/updateLog/addLog.jsp @@ -0,0 +1,109 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      + + +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/updateLog/log.jsp b/src/main/webapp/views/system/updateLog/log.jsp new file mode 100644 index 0000000..6e9340f --- /dev/null +++ b/src/main/webapp/views/system/updateLog/log.jsp @@ -0,0 +1,67 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +<%@include file="/views/common.jsp"%> + + + + + +
      + +
      +
      +
      +
      + +
      + +
      + +
      + +
      +
      -
      +
      + +
      +
      +
      + + +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/updateLog/updateLog.jsp b/src/main/webapp/views/system/updateLog/updateLog.jsp new file mode 100644 index 0000000..17dc3d4 --- /dev/null +++ b/src/main/webapp/views/system/updateLog/updateLog.jsp @@ -0,0 +1,98 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +领淘报表系统 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + + +
      + +
      + +
      +
      +
      +
      + + +
      +
      +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/user/addUser.jsp b/src/main/webapp/views/system/user/addUser.jsp new file mode 100644 index 0000000..46bb57e --- /dev/null +++ b/src/main/webapp/views/system/user/addUser.jsp @@ -0,0 +1,214 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8" %> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + 添加用户 + <%@include file="/views/common.jsp" %> + + + + +
      +
      + +
      + +
      + +
      +
      +
      + +
      + +
      + +
      + +
      +
      + +
      + +
      +
      +
      + +
      +
      +
      +
      + +
      + + +
      +
      + +
      +
      + + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/user/updatePassword.jsp b/src/main/webapp/views/system/user/updatePassword.jsp new file mode 100644 index 0000000..07e87d8 --- /dev/null +++ b/src/main/webapp/views/system/user/updatePassword.jsp @@ -0,0 +1,134 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +Insert title here +<%@include file="/views/common.jsp"%> + + +
      +
      +
      +
      +
      +
      +
      +
      +
      + +
      + +
      + +
      +
      不可修改
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/user/updateUser.jsp b/src/main/webapp/views/system/user/updateUser.jsp new file mode 100644 index 0000000..a6b5cc8 --- /dev/null +++ b/src/main/webapp/views/system/user/updateUser.jsp @@ -0,0 +1,198 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +添加用户 +<%@include file="/views/common.jsp"%> + + + + +
      +
      + +
      + +
      + +
      +
      不可修改
      +
      +
      + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      + +
      + +
      +
      +
      +
      + +
      + +
      + +
      +
      + +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/src/main/webapp/views/system/user/user.jsp b/src/main/webapp/views/system/user/user.jsp new file mode 100644 index 0000000..deebda5 --- /dev/null +++ b/src/main/webapp/views/system/user/user.jsp @@ -0,0 +1,194 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + +用户列表 + <%@include file="/views/common.jsp"%> + + + + + + + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      + + +
      +
      +
      + + +
      +
      +
      + +
      +
      +
      + +
      +
      + + + + + \ No newline at end of file diff --git a/src/main/webapp/views/testPaper.jsp b/src/main/webapp/views/testPaper.jsp new file mode 100644 index 0000000..47c0927 --- /dev/null +++ b/src/main/webapp/views/testPaper.jsp @@ -0,0 +1,434 @@ +<%@ 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/views/videoPaper.jsp b/src/main/webapp/views/videoPaper.jsp new file mode 100644 index 0000000..13456f9 --- /dev/null +++ b/src/main/webapp/views/videoPaper.jsp @@ -0,0 +1,155 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + + + + + <%@include file="/views/common.jsp"%> + + + +
      + + + + + \ No newline at end of file diff --git a/src/test/java/quote_price/LunarToSolarTest.java b/src/test/java/quote_price/LunarToSolarTest.java new file mode 100644 index 0000000..2f1227c --- /dev/null +++ b/src/test/java/quote_price/LunarToSolarTest.java @@ -0,0 +1,39 @@ +package quote_price; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +import org.apache.shiro.SecurityUtils; + +import lingtao.net.bean.SysUser; +import lingtao.net.util.LunarCalendarUtil; + +public class LunarToSolarTest { + + public static void main(String[] args) throws ParseException { + // 将公历日期转换为农历日期 + int[] solarToLunar = LunarCalendarUtil.solarToLunar(2021, 7, 8); + String LunarDate = ""; + for (int i = 0; i < 3; i++) { + LunarDate += solarToLunar[i] + "-"; + } + // 将农历日期转换为公历日期 + int[] lunarToSolar = LunarCalendarUtil.lunarToSolar(2021, 5, 29, true); + String SolarDate = ""; + for (int i = 0; i < 3; i++) { + SolarDate += lunarToSolar[i] + "-"; + } + LunarDate = LunarDate.substring(0, LunarDate.length() - 1); + SolarDate = SolarDate.substring(0, SolarDate.length() - 1); + + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); + Date d1 = sdf.parse(SolarDate); + Date d2 = sdf.parse(LunarDate); + + long daysBetween = (long) ((new Date().getTime() - d1.getTime()) / (60 * 60 * 24 * 1000)); + System.out.println(LunarDate + " 与 " + SolarDate + "间隔 " + daysBetween + " 天"); + SysUser user = (SysUser) SecurityUtils.getSubject().getPrincipal(); + System.out.println(user.getRealname()); + } +} diff --git a/src/test/java/quote_price/StringSubTest.java b/src/test/java/quote_price/StringSubTest.java new file mode 100644 index 0000000..8762627 --- /dev/null +++ b/src/test/java/quote_price/StringSubTest.java @@ -0,0 +1,20 @@ +package quote_price; + +public class StringSubTest { + + public static void main(String[] args) { + String remark = "(2048017321392264809)-21x28.5cm-50张-吊旗300克铜板纸双面不覆膜-YX-qq19578773-河北省-小钰.cdr"; + // 处理备注 + remark = remark.replaceAll(" ", "").replace("x", "X").replace("×", "X").replace("(", "(").replace(")", ")"); + System.out.println(remark); + System.out.println(remark.indexOf(")-") + 2); + System.out.println(remark.indexOf("mm")); + String size = remark.substring(remark.indexOf(")-") + 2, remark.indexOf("mm")); + System.out.println(size); + + String[] split = size.split("X"); + System.out.println(split[0]); + + } + +} diff --git a/src/test/java/quote_price/Test.java b/src/test/java/quote_price/Test.java new file mode 100644 index 0000000..b2b192c --- /dev/null +++ b/src/test/java/quote_price/Test.java @@ -0,0 +1,60 @@ +package quote_price; + +public class Test { + public static void main(String[] args) { + double length = 380; + double width = 250; + + Integer[] lntarray = { 880, 880, 580, 420, 285 }; + Integer[] wntarray = { 590, 380, 430, 285, 210 }; + System.out.println(getNumberThree(lntarray, 760));// 560*320 + System.out.println(getNumberThree(wntarray, 260));// 560*320 + + if (length > 285 && length <= 420 && width <= 285) { + if (length <= 390 && width <= 260) { + System.out.println("正度8"); + } else { + System.out.println(8); + } + } else if (length > 420 && length <= 580 && width <= 430) { + if (length <= 540 && width <= 390) { + System.out.println("正度4"); + } else { + System.out.println(4); + } + } else if (length > 580 && length <= 880 && width <= 380) { + if (length <= 780 && width <= 350) { + System.out.println("正度3"); + } else { + System.out.println(3); + } + } else if (length > 580 && length <= 880 && width > 380 && width <= 590) { + if (length <= 780 && width <= 540) { + System.out.println("正度2"); + } else { + System.out.println(2); + } + ; + } else if (length <= 285 && width <= 210) { + if (length <= 260 && width <= 190) { + System.out.println("正度16"); + } else { + System.out.println(16); + } + } + } + + public static Integer getNumberThree(Integer[] lntarray, Integer number) { + int index = Math.abs(number - lntarray[0]); + int result = lntarray[0]; + for (int i : lntarray) { + int abs = Math.abs(number - i); + if (abs <= index && i > number) { + index = abs; + result = i; + } + } + return result; + } + +} diff --git a/src/test/java/quote_price/TestMaxMin.java b/src/test/java/quote_price/TestMaxMin.java new file mode 100644 index 0000000..47047ef --- /dev/null +++ b/src/test/java/quote_price/TestMaxMin.java @@ -0,0 +1,91 @@ +package quote_price; + +public class TestMaxMin { + public static void main(String[] args) { + System.out.println(Math.abs(8.92) % 100); +// System.out.println(getNum()); + } + + public static int getNum() { + + double length = 620; + double width = 320; + + /* + * double l1 = Math.ceil(length/90); double w1 = Math.ceil(width/54); double l2 + * = Math.ceil(width/90); double w2 = Math.ceil(length/54); int min = (int) + * Math.min(l1*w1, l2*w2); System.out.println(min); + */ +// length = (1194 - length); + int ikai = 0; + double price = 0.0; + String kaiDa = getDa(length, width); + String kaiZheng = getZheng(length, width); + int intDa = Integer.parseInt(kaiDa); + int intZheng = Integer.parseInt(kaiZheng); + int maxDa = intDa > intZheng ? intDa : intZheng; +// int maxDa = (int) Math.max(Integer.parseInt(kaiDa), Integer.parseInt(kaiZheng)); + String kai = ""; + if (intZheng >= intDa) { + kai = "+" + maxDa; + } + if (kai.contains("+")) { + kai = kai.replaceAll("[^(0-9)]", ""); + ikai = Integer.parseInt(kai); + price = 1.1; + } else { + ikai = maxDa; + price = 1.35; + } + return ikai; + } + + private static String getDa(double length, double width) { + double l1 = Math.floor(1194 / length); + double w1 = Math.floor(889 / width); + double l2 = Math.floor(1194 / width); + double w2 = Math.floor(889 / length); + int maxDa = (int) Math.max(l1 * w1, l2 * w2); + if (w1 != 2) { + return "" + maxDa; + } else { + double ll1 = Math.floor(length / length); + double ww1 = Math.floor(889 / width); + double ll2 = Math.floor(length / width); + double ww2 = Math.floor(889 / length); + int maxxa = (int) Math.max(ll1 * ww1, ll2 * ww2); + + double lll1 = Math.floor((1194 - length) / length); + double www1 = Math.floor(889 / width); + double lll2 = Math.floor(length / width); + double www2 = Math.floor(889 / length); + int maxxb = (int) Math.max(lll1 * www1, lll2 * www2); + maxDa = maxxb + maxxa; + return "" + maxDa; + } + } + + private static String getZheng(double length, double width) { + double l1 = Math.floor(1092 / length); + double w1 = Math.floor(787 / width); + double l2 = Math.floor(1092 / width); + double w2 = Math.floor(787 / length); + int maxZheng = (int) Math.max(l1 * w1, l2 * w2); + if (w1 != 2) { + return "+" + maxZheng; + } else { + double ll1 = Math.floor(length / length); + double ww1 = Math.floor(787 / width); + double ll2 = Math.floor(length / width); + double ww2 = Math.floor(787 / length); + int maxxa = (int) Math.max(ll1 * ww1, ll2 * ww2); + + double lll1 = Math.floor((1092 - length) / length); + double www1 = Math.floor(787 / width); + double lll2 = Math.floor(length / width); + double www2 = Math.floor(787 / length); + int maxxb = (int) Math.max(lll1 * www1, lll2 * www2); + return "+" + maxxb + maxxa; + } + } +} diff --git a/src/test/java/quote_price/TestStickers.java b/src/test/java/quote_price/TestStickers.java new file mode 100644 index 0000000..22022e3 --- /dev/null +++ b/src/test/java/quote_price/TestStickers.java @@ -0,0 +1,22 @@ +package quote_price; + +public class TestStickers { + public static void main(String[] args) { + double a = 400; + double b = 285; + int count = 500; + + //10*5 + + double c = Math.floor(a / 104) * Math.floor(b / 54); + double d = Math.floor(a / 54) * Math.floor(b / 104); + double max = Math.max(c, d); + System.out.println(Math.floor(c)); + System.out.println(Math.floor(d)); + System.out.println(max); + + count = (int) (Math.ceil(count/max)); + System.out.println(count); + + } +}