diff --git a/pom.xml b/pom.xml
index 23ddb6d36f08de62f2571ba74b1658f671cb2cac..9646d4272745028599c492aa87f95079b22aa038 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
mysql
mysql-connector-java
- runtime
+ 5.1.34
org.springframework.boot
@@ -189,6 +189,11 @@
swagger-bootstrap-ui
1.8.7
+
+ ognl
+ ognl
+ 3.1.12
+
@@ -225,7 +230,7 @@
org.mybatis.generator
mybatis-generator-maven-plugin
- 1.3.7
+ 1.3.2
src/main/resources/generator.xml
@@ -241,7 +246,7 @@
org.mybatis.generator
mybatis-generator-core
- 1.3.7
+ 1.3.2
diff --git a/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java b/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java
index 89f523781c021e6a2a42728d620c096e1ca646f4..f12e2946d0cb473bf4f65a8df4d206a68167dacc 100644
--- a/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java
+++ b/src/main/java/com/cetc32/dh/common/shiro/CenterAuthShiroConfig.java
@@ -18,10 +18,19 @@ import org.apache.shiro.spring.LifecycleBeanPostProcessor;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.jasig.cas.client.session.SingleSignOutFilter;
+import org.jasig.cas.client.session.SingleSignOutHttpSessionListener;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.DependsOn;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.web.filter.DelegatingFilterProxy;
import javax.servlet.Filter;
import java.util.HashMap;
@@ -37,6 +46,40 @@ import java.util.Map;
@Configuration
public class CenterAuthShiroConfig {
+// //cas server地址
+// public static final String casServerUrlPrefix="http://www.cetc.daohang.com:9100/cas";
+//
+// //cas登录页面地址
+// public static final String casLoginUrl = casServerUrlPrefix + "/login";
+//
+// //cas登出页面地址
+// public static final String casLogoutUrl = casServerUrlPrefix + "/logout";
+//
+// //当前工程对外提供的服务地址
+// public static final String shiroServerUrlPrefix = "http://localhost:9100";
+//
+// //casFilter UrlPattern
+// public static final String casFilterUrlPattern = "/cas";
+//
+// //登录地址
+// public static final String loginUrl = casLoginUrl + "?service=" + shiroServerUrlPrefix + casFilterUrlPattern;
+//
+// // 登出地址(casserver启用service跳转功能,需在webapps\cas\WEB-INF\cas.properties文件中启用cas.logout.followServiceRedirects=true)
+// public static final String logoutUrl = casLogoutUrl + "?service=" + shiroServerUrlPrefix;
+//
+// //登录成功地址
+// public static final String loginSuccessUrl = "/user";
+//
+// //限认证失败跳转地址
+// public static final String unauthorizedUrl = "/403.html";
+//
+// @Value("${jedis.pool.host}")
+// private String host;
+//
+// @Value("${jedis.pool.port}")
+// private int port;
+
+
/**
* 指定缓存失效时间
* @param key 键
@@ -59,6 +102,69 @@ public class CenterAuthShiroConfig {
return securityManager;
}
+// /**
+// * 注册单点登出listener
+// *
+// * @return
+// */
+// @Bean
+// @Order(Ordered.HIGHEST_PRECEDENCE)
+// public ServletListenerRegistrationBean singleSignOutHttpSessionListener() {
+// ServletListenerRegistrationBean bean = new ServletListenerRegistrationBean();
+// bean.setListener(new SingleSignOutHttpSessionListener());
+// bean.setEnabled(true);
+// return bean;
+// }
+//
+// /**
+// * 注册单点登出filter
+// *
+// * @return
+// */
+// @Bean
+// public FilterRegistrationBean singleSignOutFilter() {
+// FilterRegistrationBean bean = new FilterRegistrationBean();
+// bean.setName("singleSignOutFilter");
+// bean.setFilter(new SingleSignOutFilter());
+// bean.addUrlPatterns("/*");
+// bean.setEnabled(true);
+// return bean;
+// }
+//
+// /**
+// * 注册DelegatingFilterProxy(Shiro)
+// *
+// * @return
+// */
+// @Bean
+// public FilterRegistrationBean delegatingFilterProxy() {
+// FilterRegistrationBean filterRegistration = new FilterRegistrationBean();
+// filterRegistration.setFilter(new DelegatingFilterProxy("shiroFilter"));
+// // 该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理
+// filterRegistration.addInitParameter("targetFilterLifecycle", "true");
+// filterRegistration.setEnabled(true);
+// filterRegistration.addUrlPatterns("/*");
+// return filterRegistration;
+// }
+
+// /**
+// * CAS过滤器
+// *
+// * @return
+// */
+// @Bean(name = "casFilter")
+// public CasFilter getCasFilter() {
+// CasFilter casFilter = new CasFilter();
+// casFilter.setName("casFilter");
+// casFilter.setEnabled(true);
+// // 登录失败后跳转的URL,也就是 Shiro 执行 CasRealm 的 doGetAuthenticationInfo 方法向CasServer验证tiket
+// casFilter.setFailureUrl(loginUrl);// 我们选择认证失败后再打开登录页面
+// casFilter.setSuccessUrl(loginSuccessUrl);
+// return casFilter;
+// }
+
+
+
/**
* 先走 filter ,然后 filter 如果检测到请求头存在 token,则用 token 去 login,走 Realm 去验证
*/
@@ -92,6 +198,21 @@ public class CenterAuthShiroConfig {
return factoryBean;
}
+
+ /**
+ * 指定缓存失效时间
+ * @param key 键
+ * @param time 时间(秒)
+ * @return
+ * 修改信息:
+ */
+ @Bean
+ public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
+ return new LifecycleBeanPostProcessor();
+ }
+
+
+
/**
* 添加注解支持,如果不加的话很有可能注解失效
*/
@@ -103,6 +224,7 @@ public class CenterAuthShiroConfig {
* 修改信息:
*/
@Bean
+ // @DependsOn({"lifecycleBeanPostProcessor"})
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator(){
DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator=new DefaultAdvisorAutoProxyCreator();
@@ -125,17 +247,6 @@ public class CenterAuthShiroConfig {
return advisor;
}
- /**
- * 指定缓存失效时间
- * @param key 键
- * @param time 时间(秒)
- * @return
- * 修改信息:
- */
- @Bean
- public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
- return new LifecycleBeanPostProcessor();
- }
}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java b/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java
index e181a62938615aac912b1b7aac24222de808d829..808e6b390fafc7dcf6d7213ec8d64f0ce01d7970 100644
--- a/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java
+++ b/src/main/java/com/cetc32/dh/common/shiro/CustomRealm.java
@@ -23,6 +23,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
+import org.apache.shiro.cas.CasRealm;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.util.ByteSource;
@@ -38,7 +39,7 @@ import java.util.*;
* @version: 1.0
* @date: 2020/9/11 10:55
*/
-public class CustomRealm extends AuthorizingRealm {
+public class CustomRealm extends CasRealm {
private Logger log = LoggerFactory.getLogger(this.getClass());
diff --git a/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java b/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java
index 4331a34da30f4ed084b7496e6b1c1291e7b84a8b..aa18b456d9564085990a11d5848887e39fbeb462 100644
--- a/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java
+++ b/src/main/java/com/cetc32/dh/controller/rest/FileSubmitController.java
@@ -23,11 +23,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-
-@Component
import java.util.ArrayList;
import java.util.List;
+@Component
@RestController
@RequestMapping("/rest/import/")
public class FileSubmitController {
diff --git a/src/main/java/com/cetc32/dh/entity/DemandSubmit.java b/src/main/java/com/cetc32/dh/entity/DemandSubmit.java
new file mode 100644
index 0000000000000000000000000000000000000000..8d7cf5458ddff23fb8617d82189e3ab8ac4d2f2f
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/entity/DemandSubmit.java
@@ -0,0 +1,125 @@
+package com.cetc32.dh.entity;
+
+import java.util.Date;
+
+public class DemandSubmit extends NumberS{
+ private Integer id;
+
+ private String projectName;
+
+ private String demandName;
+
+ private String demandDes;
+
+ private String status;
+
+ private String reporter;
+
+ private Integer departmentid;
+
+ private String approver;
+
+ private Date approceTime;
+
+ private Date endtime;
+
+ private String demandClassify;
+
+ private String demandAttachment;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getProjectName() {
+ return projectName;
+ }
+
+ public void setProjectName(String projectName) {
+ this.projectName = projectName;
+ }
+
+ public String getDemandName() {
+ return demandName;
+ }
+
+ public void setDemandName(String demandName) {
+ this.demandName = demandName;
+ }
+
+ public String getDemandDes() {
+ return demandDes;
+ }
+
+ public void setDemandDes(String demandDes) {
+ this.demandDes = demandDes;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getReporter() {
+ return reporter;
+ }
+
+ public void setReporter(String reporter) {
+ this.reporter = reporter;
+ }
+
+ public Integer getDepartmentid() {
+ return departmentid;
+ }
+
+ public void setDepartmentid(Integer departmentid) {
+ this.departmentid = departmentid;
+ }
+
+ public String getApprover() {
+ return approver;
+ }
+
+ public void setApprover(String approver) {
+ this.approver = approver;
+ }
+
+ public Date getApproceTime() {
+ return approceTime;
+ }
+
+ public void setApproceTime(Date approceTime) {
+ this.approceTime = approceTime;
+ }
+
+ public Date getEndtime() {
+ return endtime;
+ }
+
+ public void setEndtime(Date endtime) {
+ this.endtime = endtime;
+ }
+
+ public String getDemandClassify() {
+ return demandClassify;
+ }
+
+ public void setDemandClassify(String demandClassify) {
+ this.demandClassify = demandClassify;
+ }
+
+ public String getDemandAttachment() {
+ return demandAttachment;
+ }
+
+ public void setDemandAttachment(String demandAttachment) {
+ this.demandAttachment = demandAttachment;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/entity/EstimateTask.java b/src/main/java/com/cetc32/dh/entity/EstimateTask.java
new file mode 100644
index 0000000000000000000000000000000000000000..6599eed07249ce4400d73c04394abb561b63fd34
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/entity/EstimateTask.java
@@ -0,0 +1,105 @@
+package com.cetc32.dh.entity;
+
+import java.util.Date;
+
+public class EstimateTask extends NumberS{
+ private Integer id;
+
+ private String name;
+
+ private String taskClassify;
+
+ private String taskType;
+
+ private String taskPath;
+
+ private Date starttime;
+
+ private Date endtime;
+
+ private String creator;
+
+ private Date creattime;
+
+ private String status;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getTaskClassify() {
+ return taskClassify;
+ }
+
+ public void setTaskClassify(String taskClassify) {
+ this.taskClassify = taskClassify;
+ }
+
+ public String getTaskType() {
+ return taskType;
+ }
+
+ public void setTaskType(String taskType) {
+ this.taskType = taskType;
+ }
+
+ public String getTaskPath() {
+ return taskPath;
+ }
+
+ public void setTaskPath(String taskPath) {
+ this.taskPath = taskPath;
+ }
+
+ public Date getStarttime() {
+ return starttime;
+ }
+
+ public void setStarttime(Date starttime) {
+ this.starttime = starttime;
+ }
+
+ public Date getEndtime() {
+ return endtime;
+ }
+
+ public void setEndtime(Date endtime) {
+ this.endtime = endtime;
+ }
+
+ public String getCreator() {
+ return creator;
+ }
+
+ public void setCreator(String creator) {
+ this.creator = creator;
+ }
+
+ public Date getCreattime() {
+ return creattime;
+ }
+
+ public void setCreattime(Date creattime) {
+ this.creattime = creattime;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/entity/Organization.java b/src/main/java/com/cetc32/dh/entity/Organization.java
new file mode 100644
index 0000000000000000000000000000000000000000..0edf636dc6690c108e2056c8a6d2a48f6534d5c8
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/entity/Organization.java
@@ -0,0 +1,33 @@
+package com.cetc32.dh.entity;
+
+public class Organization extends NumberS{
+ private Integer id;
+
+ private String name;
+
+ private String description;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/entity/Productdemand.java b/src/main/java/com/cetc32/dh/entity/Productdemand.java
new file mode 100644
index 0000000000000000000000000000000000000000..847af14d376c6f9735ee9b179abefd10c3cc6e8c
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/entity/Productdemand.java
@@ -0,0 +1,85 @@
+package com.cetc32.dh.entity;
+
+import java.util.Date;
+
+public class Productdemand extends NumberS{
+ private Integer id;
+
+ private String name;
+
+ private String demandClassify;
+
+ private Date demandyear;
+
+ private String taskdocument;
+
+ private Date starttime;
+
+ private Date endtime;
+
+ private String status;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDemandClassify() {
+ return demandClassify;
+ }
+
+ public void setDemandClassify(String demandClassify) {
+ this.demandClassify = demandClassify;
+ }
+
+ public Date getDemandyear() {
+ return demandyear;
+ }
+
+ public void setDemandyear(Date demandyear) {
+ this.demandyear = demandyear;
+ }
+
+ public String getTaskdocument() {
+ return taskdocument;
+ }
+
+ public void setTaskdocument(String taskdocument) {
+ this.taskdocument = taskdocument;
+ }
+
+ public Date getStarttime() {
+ return starttime;
+ }
+
+ public void setStarttime(Date starttime) {
+ this.starttime = starttime;
+ }
+
+ public Date getEndtime() {
+ return endtime;
+ }
+
+ public void setEndtime(Date endtime) {
+ this.endtime = endtime;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java b/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..8bee2803b2c6873ae6ea801838d6a900054b331b
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/mybatis/DemandSubmitMapper.java
@@ -0,0 +1,32 @@
+package com.cetc32.dh.mybatis;
+
+import com.cetc32.dh.entity.DemandSubmit;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface DemandSubmitMapper {
+
+ List findAll();
+
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(DemandSubmit record);
+
+ int insertSelective(DemandSubmit record);
+
+ DemandSubmit selectByPrimaryKey(Integer id);
+
+ List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit);
+
+ int countDemand();
+
+ int updateByPrimaryKeySelective(DemandSubmit record);
+
+ int updateByPrimaryKey(DemandSubmit record);
+
+ List findByKeyWord(String keyword);
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java b/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..28befea73964485e08995f9a6f44765791551788
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/mybatis/EstimateTaskMapper.java
@@ -0,0 +1,33 @@
+package com.cetc32.dh.mybatis;
+
+import com.cetc32.dh.entity.EstimateTask;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface EstimateTaskMapper {
+
+ List findAll();
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(EstimateTask record);
+
+ int insertSelective(EstimateTask record);
+
+
+
+ EstimateTask selectByPrimaryKey(Integer id);
+
+ List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit);
+
+ int countEstimate();
+
+
+ int updateByPrimaryKeySelective(EstimateTask record);
+
+ int updateByPrimaryKey(EstimateTask record);
+
+ List findByKeyWord(String keyword);
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java b/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..21e249a43a5b290a19a68386bd8a9b5d544fee6c
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/mybatis/OrganizationMapper.java
@@ -0,0 +1,30 @@
+package com.cetc32.dh.mybatis;
+
+import com.cetc32.dh.entity.Organization;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface OrganizationMapper {
+
+ List findall();
+
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(Organization record);
+
+ int insertSelective(Organization record);
+
+ List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit);
+
+ Organization selectByPrimaryKey(Integer id);
+
+ int countOrganization();
+
+ int updateByPrimaryKeySelective(Organization record);
+
+ int updateByPrimaryKey(Organization record);
+ List findByKeyWord(String keyword);
+}
\ No newline at end of file
diff --git a/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java b/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..1dd26f34c676abbc836a02f91d8a03722eb5a613
--- /dev/null
+++ b/src/main/java/com/cetc32/dh/mybatis/ProductdemandMapper.java
@@ -0,0 +1,31 @@
+package com.cetc32.dh.mybatis;
+
+import com.cetc32.dh.entity.Productdemand;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface ProductdemandMapper {
+
+ List findAll();
+
+ int deleteByPrimaryKey(Integer id);
+
+ int insert(Productdemand record);
+
+ int insertSelective(Productdemand record);
+
+ Productdemand selectByPrimaryKey(Integer id);
+
+ List selectByLimit(@Param("offset") Integer offset,@Param("limit") Integer limit);
+
+ int countProduct();
+
+ int updateByPrimaryKeySelective(Productdemand record);
+
+ int updateByPrimaryKey(Productdemand record);
+
+ List findByKeyWord(String keyword);
+}
\ No newline at end of file
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index e8029e895cab6953f2e0cbc49797f8b812b250ba..f483fe4ce2052108a8153bed38508cda18d8c517 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -1,11 +1,29 @@
server:
port: 8081
+
+## redis setting
+# jedis.pool.host=localhost
+# jedis.pool.port=6379
+# jedis.pool.timeout=3000000
+# jedis.pool.config.maxTotal=100
+# jedis.pool.config.maxIdle=10
+# jedis.pool.config.maxWaitMillis=10000
+#
+#
+# #thymeleaf
+# spring.thymeleaf.prefix=classpath:/templates/
+# spring.thymeleaf.suffix=.html
+# spring.thymeleaf.mode=LEGACYHTML5
+# spring.thymeleaf.encoding=UTF-8
+# spring.thymeleaf.cache=false
+
+
spring:
application:
name: dhManager
datasource:
- url: jdbc:mysql://192.168.1.211:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
+ url: jdbc:mysql://localhost:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
username: root
password: 123456
# initial-size: 1
@@ -36,4 +54,7 @@ generator:
javaClient-targetPackage: com.cetc32.dh.mybatis
logging:
level:
- com.cetc32.dh.mybatis: debug
\ No newline at end of file
+ com.cetc32.dh.mybatis: debug
+
+storePath: /root/
+upLoadPath: ${storePath}upLoad
\ No newline at end of file
diff --git a/src/main/resources/application-xwy.yml b/src/main/resources/application-xwy.yml
index f3a65e9c4475f3c352cb9dc76053d8d59bd0959c..52c1821cd86a53b4231e4982c175f35757e74614 100644
--- a/src/main/resources/application-xwy.yml
+++ b/src/main/resources/application-xwy.yml
@@ -5,7 +5,7 @@ spring:
application:
name: dhManager
datasource:
- url: jdbc:mysql://192.168.1.211:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
+ url: jdbc:mysql://127.0.0.1:3306/dhmanage?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8
username: root
password: 123456
# initial-size: 1
diff --git a/src/main/resources/generator.xml b/src/main/resources/generator.xml
index 11876e3c293a1de17e66c371617980f1fb4b5eb9..6dd12cd6216fa91064914e0993c13c8deae21349 100644
--- a/src/main/resources/generator.xml
+++ b/src/main/resources/generator.xml
@@ -28,7 +28,7 @@
-
@@ -54,7 +54,11 @@
type="XMLMAPPER"/>
-
+
\ No newline at end of file
diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties
index 63cfbc14ce2403ba6eac4a4555bcdf4a23c674b3..59539a0117abb74701595da7faa0b1239ce4d39d 100644
--- a/src/main/resources/jdbc.properties
+++ b/src/main/resources/jdbc.properties
@@ -1,4 +1,4 @@
-spring.datasource.url=jdbc:mysql://192.168.1.211:3306/dhmanage?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dhmanage?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&useSSL=false
#spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
diff --git a/src/main/resources/mapper/DemandSubmitMapper.xml b/src/main/resources/mapper/DemandSubmitMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..94ad99fb36ce2033d5ecb6762aaaf5f7dbe91896
--- /dev/null
+++ b/src/main/resources/mapper/DemandSubmitMapper.xml
@@ -0,0 +1,197 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, project_name, demand_name, demand_des, status, reporter, departmentId, approver,
+ approce_time, endtime, demand_classify, demand_attachment
+
+
+
+
+
+
+
+
+ delete from demand_submit
+ where id = #{id,jdbcType=INTEGER}
+
+
+ insert into demand_submit (id, project_name, demand_name,
+ demand_des, status, reporter,
+ departmentId, approver, approce_time,
+ endtime, demand_classify, demand_attachment
+ )
+ values (#{id,jdbcType=INTEGER}, #{projectName,jdbcType=VARCHAR}, #{demandName,jdbcType=VARCHAR},
+ #{demandDes,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{reporter,jdbcType=VARCHAR},
+ #{departmentid,jdbcType=INTEGER}, #{approver,jdbcType=VARCHAR}, #{approceTime,jdbcType=TIMESTAMP},
+ #{endtime,jdbcType=TIMESTAMP}, #{demandClassify,jdbcType=VARCHAR}, #{demandAttachment,jdbcType=VARCHAR}
+ )
+
+
+ insert into demand_submit
+
+
+ id,
+
+
+ project_name,
+
+
+ demand_name,
+
+
+ demand_des,
+
+
+ status,
+
+
+ reporter,
+
+
+ departmentId,
+
+
+ approver,
+
+
+ approce_time,
+
+
+ endtime,
+
+
+ demand_classify,
+
+
+ demand_attachment,
+
+
+
+
+ #{id,jdbcType=INTEGER},
+
+
+ #{projectName,jdbcType=VARCHAR},
+
+
+ #{demandName,jdbcType=VARCHAR},
+
+
+ #{demandDes,jdbcType=VARCHAR},
+
+
+ #{status,jdbcType=VARCHAR},
+
+
+ #{reporter,jdbcType=VARCHAR},
+
+
+ #{departmentid,jdbcType=INTEGER},
+
+
+ #{approver,jdbcType=VARCHAR},
+
+
+ #{approceTime,jdbcType=TIMESTAMP},
+
+
+ #{endtime,jdbcType=TIMESTAMP},
+
+
+ #{demandClassify,jdbcType=VARCHAR},
+
+
+ #{demandAttachment,jdbcType=VARCHAR},
+
+
+
+
+ update demand_submit
+
+
+ project_name = #{projectName,jdbcType=VARCHAR},
+
+
+ demand_name = #{demandName,jdbcType=VARCHAR},
+
+
+ demand_des = #{demandDes,jdbcType=VARCHAR},
+
+
+ status = #{status,jdbcType=VARCHAR},
+
+
+ reporter = #{reporter,jdbcType=VARCHAR},
+
+
+ departmentId = #{departmentid,jdbcType=INTEGER},
+
+
+ approver = #{approver,jdbcType=VARCHAR},
+
+
+ approce_time = #{approceTime,jdbcType=TIMESTAMP},
+
+
+ endtime = #{endtime,jdbcType=TIMESTAMP},
+
+
+ demand_classify = #{demandClassify,jdbcType=VARCHAR},
+
+
+ demand_attachment = #{demandAttachment,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update demand_submit
+ set project_name = #{projectName,jdbcType=VARCHAR},
+ demand_name = #{demandName,jdbcType=VARCHAR},
+ demand_des = #{demandDes,jdbcType=VARCHAR},
+ status = #{status,jdbcType=VARCHAR},
+ reporter = #{reporter,jdbcType=VARCHAR},
+ departmentId = #{departmentid,jdbcType=INTEGER},
+ approver = #{approver,jdbcType=VARCHAR},
+ approce_time = #{approceTime,jdbcType=TIMESTAMP},
+ endtime = #{endtime,jdbcType=TIMESTAMP},
+ demand_classify = #{demandClassify,jdbcType=VARCHAR},
+ demand_attachment = #{demandAttachment,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file
diff --git a/src/main/resources/mapper/EstimateTaskMapper.xml b/src/main/resources/mapper/EstimateTaskMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e301b222361b1c6286438a545c4818c6cff50ef8
--- /dev/null
+++ b/src/main/resources/mapper/EstimateTaskMapper.xml
@@ -0,0 +1,172 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, name, task_classify, task_type, task_path, starttime, endtime, creator, creattime,
+ status
+
+
+
+
+
+
+
+
+
+ delete from estimate_task
+ where id = #{id,jdbcType=INTEGER}
+
+
+ insert into estimate_task (id, name, task_classify,
+ task_type, task_path, starttime,
+ endtime, creator, creattime,
+ status)
+ values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{taskClassify,jdbcType=VARCHAR},
+ #{taskType,jdbcType=VARCHAR}, #{taskPath,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP},
+ #{endtime,jdbcType=TIMESTAMP}, #{creator,jdbcType=VARCHAR}, #{creattime,jdbcType=TIMESTAMP},
+ #{status,jdbcType=VARCHAR})
+
+
+ insert into estimate_task
+
+
+ id,
+
+
+ name,
+
+
+ task_classify,
+
+
+ task_type,
+
+
+ task_path,
+
+
+ starttime,
+
+
+ endtime,
+
+
+ creator,
+
+
+ creattime,
+
+
+ status,
+
+
+
+
+ #{id,jdbcType=INTEGER},
+
+
+ #{name,jdbcType=VARCHAR},
+
+
+ #{taskClassify,jdbcType=VARCHAR},
+
+
+ #{taskType,jdbcType=VARCHAR},
+
+
+ #{taskPath,jdbcType=VARCHAR},
+
+
+ #{starttime,jdbcType=TIMESTAMP},
+
+
+ #{endtime,jdbcType=TIMESTAMP},
+
+
+ #{creator,jdbcType=VARCHAR},
+
+
+ #{creattime,jdbcType=TIMESTAMP},
+
+
+ #{status,jdbcType=VARCHAR},
+
+
+
+
+ update estimate_task
+
+
+ name = #{name,jdbcType=VARCHAR},
+
+
+ task_classify = #{taskClassify,jdbcType=VARCHAR},
+
+
+ task_type = #{taskType,jdbcType=VARCHAR},
+
+
+ task_path = #{taskPath,jdbcType=VARCHAR},
+
+
+ starttime = #{starttime,jdbcType=TIMESTAMP},
+
+
+ endtime = #{endtime,jdbcType=TIMESTAMP},
+
+
+ creator = #{creator,jdbcType=VARCHAR},
+
+
+ creattime = #{creattime,jdbcType=TIMESTAMP},
+
+
+ status = #{status,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update estimate_task
+ set name = #{name,jdbcType=VARCHAR},
+ task_classify = #{taskClassify,jdbcType=VARCHAR},
+ task_type = #{taskType,jdbcType=VARCHAR},
+ task_path = #{taskPath,jdbcType=VARCHAR},
+ starttime = #{starttime,jdbcType=TIMESTAMP},
+ endtime = #{endtime,jdbcType=TIMESTAMP},
+ creator = #{creator,jdbcType=VARCHAR},
+ creattime = #{creattime,jdbcType=TIMESTAMP},
+ status = #{status,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file
diff --git a/src/main/resources/mapper/OrganizationMapper.xml b/src/main/resources/mapper/OrganizationMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f7be181114bb83d66f779fa71c85b1465be83ac2
--- /dev/null
+++ b/src/main/resources/mapper/OrganizationMapper.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+ id, name,description
+
+
+
+
+
+
+
+
+
+
+
+
+ delete from organization
+ where id = #{id,jdbcType=INTEGER}
+
+
+ insert into organization (id, name, description
+ )
+ values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}
+ )
+
+
+ insert into organization
+
+
+ id,
+
+
+ name,
+
+
+ description,
+
+
+
+
+ #{id,jdbcType=INTEGER},
+
+
+ #{name,jdbcType=VARCHAR},
+
+
+ #{description,jdbcType=VARCHAR},
+
+
+
+
+ update organization
+
+
+ name = #{name,jdbcType=VARCHAR},
+
+
+ description = #{description,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update organization
+ set name = #{name,jdbcType=VARCHAR},
+ description = #{description,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file
diff --git a/src/main/resources/mapper/ProductdemandMapper.xml b/src/main/resources/mapper/ProductdemandMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e1eade3d77e3d3ceeb0aefa08fd2ee71b004bc16
--- /dev/null
+++ b/src/main/resources/mapper/ProductdemandMapper.xml
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, name, demand_classify, demandyear, taskdocument, starttime, endtime, status
+
+
+
+
+
+
+
+ delete from productdemand
+ where id = #{id,jdbcType=INTEGER}
+
+
+ insert into productdemand (id, name, demand_classify,
+ demandyear, taskdocument, starttime,
+ endtime, status)
+ values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{demandClassify,jdbcType=VARCHAR},
+ #{demandyear,jdbcType=TIMESTAMP}, #{taskdocument,jdbcType=VARCHAR}, #{starttime,jdbcType=TIMESTAMP},
+ #{endtime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR})
+
+
+ insert into productdemand
+
+
+ id,
+
+
+ name,
+
+
+ demand_classify,
+
+
+ demandyear,
+
+
+ taskdocument,
+
+
+ starttime,
+
+
+ endtime,
+
+
+ status,
+
+
+
+
+ #{id,jdbcType=INTEGER},
+
+
+ #{name,jdbcType=VARCHAR},
+
+
+ #{demandClassify,jdbcType=VARCHAR},
+
+
+ #{demandyear,jdbcType=TIMESTAMP},
+
+
+ #{taskdocument,jdbcType=VARCHAR},
+
+
+ #{starttime,jdbcType=TIMESTAMP},
+
+
+ #{endtime,jdbcType=TIMESTAMP},
+
+
+ #{status,jdbcType=VARCHAR},
+
+
+
+
+ update productdemand
+
+
+ name = #{name,jdbcType=VARCHAR},
+
+
+ demand_classify = #{demandClassify,jdbcType=VARCHAR},
+
+
+ demandyear = #{demandyear,jdbcType=TIMESTAMP},
+
+
+ taskdocument = #{taskdocument,jdbcType=VARCHAR},
+
+
+ starttime = #{starttime,jdbcType=TIMESTAMP},
+
+
+ endtime = #{endtime,jdbcType=TIMESTAMP},
+
+
+ status = #{status,jdbcType=VARCHAR},
+
+
+ where id = #{id,jdbcType=INTEGER}
+
+
+ update productdemand
+ set name = #{name,jdbcType=VARCHAR},
+ demand_classify = #{demandClassify,jdbcType=VARCHAR},
+ demandyear = #{demandyear,jdbcType=TIMESTAMP},
+ taskdocument = #{taskdocument,jdbcType=VARCHAR},
+ starttime = #{starttime,jdbcType=TIMESTAMP},
+ endtime = #{endtime,jdbcType=TIMESTAMP},
+ status = #{status,jdbcType=VARCHAR}
+ where id = #{id,jdbcType=INTEGER}
+
+
\ No newline at end of file