提交diamagnetic
parent
e087575672
commit
a1fadd65a4
|
@ -16,7 +16,7 @@ yanZhu:
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8080
|
port: 8087
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
|
|
|
@ -0,0 +1,117 @@
|
||||||
|
# 项目相关配置
|
||||||
|
yanZhu:
|
||||||
|
# 名称
|
||||||
|
name: ProjectName
|
||||||
|
# 版本
|
||||||
|
version: 3.8.7
|
||||||
|
# 版权年份
|
||||||
|
copyrightYear: 2023
|
||||||
|
# 文件路径 示例( Windows配置D:/yanZhu/uploadPath,Linux配置 /home/yanZhu/uploadPath)
|
||||||
|
profile: /data/yanzhu
|
||||||
|
# 获取ip地址开关
|
||||||
|
addressEnabled: false
|
||||||
|
# 验证码类型 math 数字计算 char 字符验证
|
||||||
|
captchaType: math
|
||||||
|
|
||||||
|
# 开发环境配置
|
||||||
|
server:
|
||||||
|
# 服务器的HTTP端口,默认为8080
|
||||||
|
port: 8087
|
||||||
|
servlet:
|
||||||
|
# 应用的访问路径
|
||||||
|
context-path: /yanZhuProject
|
||||||
|
tomcat:
|
||||||
|
# tomcat的URI编码
|
||||||
|
uri-encoding: UTF-8
|
||||||
|
# 连接数满后的排队数,默认为100
|
||||||
|
accept-count: 1000
|
||||||
|
threads:
|
||||||
|
# tomcat最大线程数,默认为200
|
||||||
|
max: 800
|
||||||
|
# Tomcat启动初始化的线程数,默认值10
|
||||||
|
min-spare: 100
|
||||||
|
|
||||||
|
# 数据源配置
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
druid:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://62.234.3.186:3306/yanzhu_project?useSSL=false&characterEncoding=UTF-8&serverTimezone=GMT%2B8
|
||||||
|
username: root
|
||||||
|
password: Sxyanzhu@cf123
|
||||||
|
# 从库数据源
|
||||||
|
slave:
|
||||||
|
# 从数据源开关/默认关闭
|
||||||
|
enabled: false
|
||||||
|
url:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
# 初始连接数
|
||||||
|
initialSize: 5
|
||||||
|
# 最小连接池数量
|
||||||
|
minIdle: 10
|
||||||
|
# 最大连接池数量
|
||||||
|
maxActive: 20
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置连接超时时间
|
||||||
|
connectTimeout: 30000
|
||||||
|
# 配置网络超时时间
|
||||||
|
socketTimeout: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
|
maxEvictableIdleTimeMillis: 900000
|
||||||
|
# 配置检测连接是否有效
|
||||||
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
webStatFilter:
|
||||||
|
enabled: true
|
||||||
|
statViewServlet:
|
||||||
|
enabled: true
|
||||||
|
# 设置白名单,不填则允许所有访问
|
||||||
|
allow:
|
||||||
|
url-pattern: /druid/*
|
||||||
|
# 控制台管理用户名和密码
|
||||||
|
login-username: yanzhu
|
||||||
|
login-password: Sxyanzhu@yanzhu+mz
|
||||||
|
filter:
|
||||||
|
stat:
|
||||||
|
enabled: true
|
||||||
|
# 慢SQL记录
|
||||||
|
log-slow-sql: true
|
||||||
|
slow-sql-millis: 1000
|
||||||
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
||||||
|
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: 127.0.0.1
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码
|
||||||
|
password: 123456
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
|
@ -19,7 +19,7 @@ spring:
|
||||||
# 国际化资源文件路径
|
# 国际化资源文件路径
|
||||||
basename: i18n/messages
|
basename: i18n/messages
|
||||||
profiles:
|
profiles:
|
||||||
active: druid
|
active: test
|
||||||
# 文件上传
|
# 文件上传
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.yanzhu.common.enums;
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请状态
|
||||||
|
*/
|
||||||
|
public enum ApplyStatusEnums {
|
||||||
|
|
||||||
|
SQZ("1", "申请中"),
|
||||||
|
DYS("10", "待验收"),
|
||||||
|
YYS("100", "已验收");
|
||||||
|
|
||||||
|
private final String code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
ApplyStatusEnums(String code, String info)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode()
|
||||||
|
{
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo()
|
||||||
|
{
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getLongCode()
|
||||||
|
{
|
||||||
|
return Convert.toLong(code);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.yanzhu.flowable.config;
|
||||||
|
|
||||||
|
import com.yanzhu.flowable.listener.GlobalEventListener;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
|
||||||
|
import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher;
|
||||||
|
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||||
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.event.ContextRefreshedEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flowable添加全局监听器
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class FlowableGlobalListenerConfig implements ApplicationListener<ContextRefreshedEvent> {
|
||||||
|
|
||||||
|
private final SpringProcessEngineConfiguration configuration;
|
||||||
|
|
||||||
|
private final GlobalEventListener globalEventListener;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||||
|
FlowableEventDispatcher dispatcher = configuration.getEventDispatcher();
|
||||||
|
/**
|
||||||
|
* 任务创建全局监听-待办消息发送
|
||||||
|
* PROCESS_CREATED 流程创建
|
||||||
|
* TASK_CREATED 任务创建
|
||||||
|
* TASK_COMPLETED 任务完成
|
||||||
|
* PROCESS_COMPLETED 流程完成
|
||||||
|
* 流程创建、任务创建、任务完成、流程完成
|
||||||
|
*/
|
||||||
|
dispatcher.addEventListener(globalEventListener,FlowableEngineEventType.PROCESS_COMPLETED);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,95 +1,95 @@
|
||||||
//package com.yanzhu.flowable.config;
|
package com.yanzhu.flowable.config;
|
||||||
//
|
|
||||||
//import com.sun.prism.paint.Color;
|
import org.flowable.bpmn.model.AssociationDirection;
|
||||||
//import org.flowable.bpmn.model.AssociationDirection;
|
import org.flowable.image.impl.DefaultProcessDiagramCanvas;
|
||||||
//import org.flowable.image.impl.DefaultProcessDiagramCanvas;
|
|
||||||
//
|
import java.awt.*;
|
||||||
//import java.awt.*;
|
import java.awt.geom.Line2D;
|
||||||
//import java.awt.geom.Line2D;
|
import java.awt.geom.RoundRectangle2D;
|
||||||
//import java.awt.geom.RoundRectangle2D;
|
|
||||||
//
|
/**
|
||||||
///**
|
* @author Tony
|
||||||
// * @author Tony
|
* @date 2021-04-03
|
||||||
// * @date 2021-04-03
|
*/
|
||||||
// */
|
public class MyDefaultProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
|
||||||
//public class MyDefaultProcessDiagramCanvas extends DefaultProcessDiagramCanvas {
|
//设置高亮线的颜色 这里我设置成绿色
|
||||||
// //设置高亮线的颜色 这里我设置成绿色
|
protected static Color HIGHLIGHT_SEQUENCEFLOW_COLOR = Color.GREEN;
|
||||||
// protected static Color HIGHLIGHT_SEQUENCEFLOW_COLOR = Color.GREEN;
|
|
||||||
//
|
public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
|
||||||
// public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) {
|
super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
|
||||||
// super(width, height, minX, minY, imageType, activityFontName, labelFontName, annotationFontName, customClassLoader);
|
}
|
||||||
// }
|
|
||||||
//
|
public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType) {
|
||||||
// public MyDefaultProcessDiagramCanvas(int width, int height, int minX, int minY, String imageType) {
|
super(width, height, minX, minY, imageType);
|
||||||
// super(width, height, minX, minY, imageType);
|
}
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
/**
|
||||||
// /**
|
* 画线颜色设置
|
||||||
// * 画线颜色设置
|
*/
|
||||||
// */
|
@Override
|
||||||
// @Override
|
public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType,
|
||||||
// public void drawConnection(int[] xPoints, int[] yPoints, boolean conditional, boolean isDefault, String connectionType,
|
AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
|
||||||
// AssociationDirection associationDirection, boolean highLighted, double scaleFactor) {
|
|
||||||
//
|
Paint originalPaint = g.getPaint();
|
||||||
// Paint originalPaint = g.getPaint();
|
Stroke originalStroke = g.getStroke();
|
||||||
// Stroke originalStroke = g.getStroke();
|
|
||||||
//
|
g.setPaint(CONNECTION_COLOR);
|
||||||
// g.setPaint(CONNECTION_COLOR);
|
if (connectionType.equals("association")) {
|
||||||
// if (connectionType.equals("association")) {
|
g.setStroke(ASSOCIATION_STROKE);
|
||||||
// g.setStroke(ASSOCIATION_STROKE);
|
} else if (highLighted) {
|
||||||
// } else if (highLighted) {
|
//设置线的颜色
|
||||||
// //设置线的颜色
|
g.setPaint(originalPaint);
|
||||||
// g.setPaint(originalPaint);
|
g.setStroke(HIGHLIGHT_FLOW_STROKE);
|
||||||
// g.setStroke(HIGHLIGHT_FLOW_STROKE);
|
}
|
||||||
// }
|
|
||||||
//
|
for (int i = 1; i < xPoints.length; i++) {
|
||||||
// for (int i = 1; i < xPoints.length; i++) {
|
Integer sourceX = xPoints[i - 1];
|
||||||
// Integer sourceX = xPoints[i - 1];
|
Integer sourceY = yPoints[i - 1];
|
||||||
// Integer sourceY = yPoints[i - 1];
|
Integer targetX = xPoints[i];
|
||||||
// Integer targetX = xPoints[i];
|
Integer targetY = yPoints[i];
|
||||||
// Integer targetY = yPoints[i];
|
Line2D.Double line = new Line2D.Double(sourceX, sourceY, targetX, targetY);
|
||||||
// Line2D.Double line = new Line2D.Double(sourceX, sourceY, targetX, targetY);
|
g.draw(line);
|
||||||
// g.draw(line);
|
}
|
||||||
// }
|
|
||||||
//
|
if (isDefault) {
|
||||||
// if (isDefault) {
|
Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
|
||||||
// Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
|
drawDefaultSequenceFlowIndicator(line, scaleFactor);
|
||||||
// drawDefaultSequenceFlowIndicator(line, scaleFactor);
|
}
|
||||||
// }
|
|
||||||
//
|
if (conditional) {
|
||||||
// if (conditional) {
|
Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
|
||||||
// Line2D.Double line = new Line2D.Double(xPoints[0], yPoints[0], xPoints[1], yPoints[1]);
|
drawConditionalSequenceFlowIndicator(line, scaleFactor);
|
||||||
// drawConditionalSequenceFlowIndicator(line, scaleFactor);
|
}
|
||||||
// }
|
|
||||||
//
|
if (associationDirection == AssociationDirection.ONE || associationDirection == AssociationDirection.BOTH) {
|
||||||
// if (associationDirection == AssociationDirection.ONE || associationDirection == AssociationDirection.BOTH) {
|
Line2D.Double line = new Line2D.Double(xPoints[xPoints.length - 2], yPoints[xPoints.length - 2], xPoints[xPoints.length - 1], yPoints[xPoints.length - 1]);
|
||||||
// Line2D.Double line = new Line2D.Double(xPoints[xPoints.length - 2], yPoints[xPoints.length - 2], xPoints[xPoints.length - 1], yPoints[xPoints.length - 1]);
|
drawArrowHead(line, scaleFactor);
|
||||||
// drawArrowHead(line, scaleFactor);
|
}
|
||||||
// }
|
if (associationDirection == AssociationDirection.BOTH) {
|
||||||
// if (associationDirection == AssociationDirection.BOTH) {
|
Line2D.Double line = new Line2D.Double(xPoints[1], yPoints[1], xPoints[0], yPoints[0]);
|
||||||
// Line2D.Double line = new Line2D.Double(xPoints[1], yPoints[1], xPoints[0], yPoints[0]);
|
drawArrowHead(line, scaleFactor);
|
||||||
// drawArrowHead(line, scaleFactor);
|
}
|
||||||
// }
|
g.setPaint(originalPaint);
|
||||||
// g.setPaint(originalPaint);
|
g.setStroke(originalStroke);
|
||||||
// g.setStroke(originalStroke);
|
}
|
||||||
// }
|
|
||||||
//
|
/**
|
||||||
// /**
|
* 高亮节点设置
|
||||||
// * 高亮节点设置
|
*/
|
||||||
// */
|
@Override
|
||||||
// @Override
|
public void drawHighLight(int x, int y, int width, int height) {
|
||||||
// public void drawHighLight(int x, int y, int width, int height) {
|
Paint originalPaint = g.getPaint();
|
||||||
// Paint originalPaint = g.getPaint();
|
Stroke originalStroke = g.getStroke();
|
||||||
// Stroke originalStroke = g.getStroke();
|
//设置高亮节点的颜色
|
||||||
// //设置高亮节点的颜色
|
g.setPaint(HIGHLIGHT_COLOR);
|
||||||
// g.setPaint(HIGHLIGHT_COLOR);
|
g.setStroke(THICK_TASK_BORDER_STROKE);
|
||||||
// g.setStroke(THICK_TASK_BORDER_STROKE);
|
|
||||||
//
|
RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
|
||||||
// RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
|
g.draw(rect);
|
||||||
// g.draw(rect);
|
|
||||||
//
|
g.setPaint(originalPaint);
|
||||||
// g.setPaint(originalPaint);
|
g.setStroke(originalStroke);
|
||||||
// g.setStroke(originalStroke);
|
}
|
||||||
// }
|
|
||||||
//}
|
}
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.yanzhu.flowable.listener;
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.text.Convert;
|
||||||
|
import com.yanzhu.common.enums.ApplyStatusEnums;
|
||||||
|
import com.yanzhu.project.domain.ProProjectApply;
|
||||||
|
import com.yanzhu.project.service.IProProjectApplyService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent;
|
||||||
|
import org.flowable.engine.RepositoryService;
|
||||||
|
import org.flowable.engine.RuntimeService;
|
||||||
|
import org.flowable.engine.TaskService;
|
||||||
|
import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener;
|
||||||
|
import org.flowable.engine.runtime.ProcessInstance;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flowable全局监听器
|
||||||
|
*
|
||||||
|
* @author JiangYuQi
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class GlobalEventListener extends AbstractFlowableEngineEventListener {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TaskService taskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RuntimeService runtimeService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RepositoryService repositoryService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProProjectApplyService proProjectApplyService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processCompleted(FlowableEngineEntityEvent event) {
|
||||||
|
log.info("任务流程审批完成...{}",event.getProcessInstanceId());
|
||||||
|
super.processCompleted(event);
|
||||||
|
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(event.getProcessInstanceId()).singleResult();
|
||||||
|
try {
|
||||||
|
ProProjectApply entity = proProjectApplyService.selectProProjectApplyById(Convert.toLong(processInstance.getBusinessKey()));
|
||||||
|
entity.setApplyStatus(ApplyStatusEnums.DYS.getCode());
|
||||||
|
proProjectApplyService.updateProProjectApplyEntity(entity);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,12 @@ public interface IFlowTaskService {
|
||||||
*/
|
*/
|
||||||
void taskReject(FlowTaskVo flowTaskVo);
|
void taskReject(FlowTaskVo flowTaskVo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驳回申请人
|
||||||
|
*
|
||||||
|
* @param flowTaskVo
|
||||||
|
*/
|
||||||
|
void defaultReturn(FlowTaskVo flowTaskVo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退回任务
|
* 退回任务
|
||||||
|
|
|
@ -319,6 +319,16 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 驳回申请人
|
||||||
|
*
|
||||||
|
* @param flowTaskVo 请求实体参数
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@Override
|
||||||
|
public void defaultReturn(FlowTaskVo flowTaskVo){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有可回退的节点
|
* 获取所有可回退的节点
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.yanzhu.framework.web.service;
|
package com.yanzhu.framework.web.service;
|
||||||
|
|
||||||
import com.yanzhu.common.core.domain.entity.SysDept;
|
import com.yanzhu.common.core.domain.entity.SysDept;
|
||||||
|
import com.yanzhu.common.core.domain.entity.SysRole;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
import com.yanzhu.system.service.ISysDeptService;
|
import com.yanzhu.system.service.ISysDeptService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -62,8 +63,9 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
||||||
|
|
||||||
//设置项目单位信息
|
//设置项目单位信息
|
||||||
if(!user.isAdmin()){
|
if(!user.isAdmin()){
|
||||||
String[] tmps=user.getDept().getAncestors().split(",");
|
//判断是否是段队管理员
|
||||||
Long deptId = Convert.toLong(tmps[tmps.length-1]);
|
String[] ancestors = user.getDept().getAncestors().split(",");
|
||||||
|
Long deptId = Convert.toLong(ancestors[ancestors.length-1]);
|
||||||
if(deptId != null){
|
if(deptId != null){
|
||||||
SysDept sysDept = sysDeptService.selectDeptById(deptId);
|
SysDept sysDept = sysDeptService.selectDeptById(deptId);
|
||||||
user.setParDeptId(sysDept.getDeptId());
|
user.setParDeptId(sysDept.getDeptId());
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
package com.yanzhu.web;
|
package com.yanzhu.web;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.yanzhu.common.constant.Constants;
|
||||||
import com.yanzhu.common.core.domain.entity.SysUser;
|
import com.yanzhu.common.core.domain.entity.SysUser;
|
||||||
|
import com.yanzhu.common.core.redis.RedisCache;
|
||||||
import com.yanzhu.common.core.text.Convert;
|
import com.yanzhu.common.core.text.Convert;
|
||||||
import com.yanzhu.common.enums.ShiFouEnum;
|
import com.yanzhu.common.enums.ShiFouEnum;
|
||||||
|
import com.yanzhu.common.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.utils.StringUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
@ -35,6 +40,10 @@ import com.yanzhu.common.core.page.TableDataInfo;
|
||||||
@RequestMapping("/project/projectInfo")
|
@RequestMapping("/project/projectInfo")
|
||||||
public class ProProjectInfoController extends BaseController
|
public class ProProjectInfoController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProProjectInfoService proProjectInfoService;
|
private IProProjectInfoService proProjectInfoService;
|
||||||
|
|
||||||
|
@ -81,7 +90,12 @@ public class ProProjectInfoController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody ProProjectInfo proProjectInfo)
|
public AjaxResult add(@RequestBody ProProjectInfo proProjectInfo)
|
||||||
{
|
{
|
||||||
return toAjax(proProjectInfoService.insertProProjectInfo(proProjectInfo));
|
int res = proProjectInfoService.insertProProjectInfo(proProjectInfo);
|
||||||
|
if(res>0){
|
||||||
|
String key = "YANZHU.PROJ.V1.findMyProjectList."+proProjectInfo.getDeptId();
|
||||||
|
redisCache.deleteObject(key);
|
||||||
|
}
|
||||||
|
return toAjax(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,7 +106,12 @@ public class ProProjectInfoController extends BaseController
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ProProjectInfo proProjectInfo)
|
public AjaxResult edit(@RequestBody ProProjectInfo proProjectInfo)
|
||||||
{
|
{
|
||||||
return toAjax(proProjectInfoService.updateProProjectInfo(proProjectInfo));
|
int res = proProjectInfoService.updateProProjectInfo(proProjectInfo);
|
||||||
|
if(res>0){
|
||||||
|
String key = "YANZHU.PROJ.V1.findMyProjectList."+proProjectInfo.getDeptId();
|
||||||
|
redisCache.deleteObject(key);
|
||||||
|
}
|
||||||
|
return toAjax(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +122,35 @@ public class ProProjectInfoController extends BaseController
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
return toAjax(proProjectInfoService.deleteProProjectInfoByIds(ids));
|
int res = proProjectInfoService.deleteProProjectInfoByIds(ids);
|
||||||
|
if(res>0){
|
||||||
|
for(Long id:ids){
|
||||||
|
ProProjectInfo proProjectInfo = proProjectInfoService.selectProProjectInfoById(id);
|
||||||
|
String key = "YANZHU.PROJ.V1.findMyProjectList."+proProjectInfo.getDeptId();
|
||||||
|
redisCache.deleteObject(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return toAjax(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取临建项目编号
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/findMyDeptProjectNo")
|
||||||
|
public AjaxResult findMyDeptProjectNo()
|
||||||
|
{
|
||||||
|
Long parDeptId = super.getLoginUser().getUser().getParDeptId();
|
||||||
|
ProProjectInfo proProjectInfo = new ProProjectInfo();
|
||||||
|
proProjectInfo.setDeptId(parDeptId);
|
||||||
|
int count=1;
|
||||||
|
List<ProProjectInfo> list = proProjectInfoService.selectProProjectInfoList(proProjectInfo);
|
||||||
|
if(StringUtils.isNotEmpty(list)){
|
||||||
|
count = count+list.size();
|
||||||
|
}
|
||||||
|
String proNo = parDeptId+DateUtils.parseDateToStr(DateUtils.YYYY,new Date())+String.format("%03d", count);
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
ajax.put("data", proNo);
|
||||||
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class WxFlowableController extends BaseController {
|
||||||
String key = "YANZHU.FLOW.readNotes:" + deployId;
|
String key = "YANZHU.FLOW.readNotes:" + deployId;
|
||||||
Object object = redisCache.getCacheObject(key);
|
Object object = redisCache.getCacheObject(key);
|
||||||
if (object != null) {
|
if (object != null) {
|
||||||
//return success(object);
|
return success(object);
|
||||||
}
|
}
|
||||||
List<FlowElement> list = flowDefinitionService.readNodes(deployId);
|
List<FlowElement> list = flowDefinitionService.readNodes(deployId);
|
||||||
redisCache.setCacheObject(key, list, Constants.DATA_EXPIRATION, TimeUnit.MINUTES);
|
redisCache.setCacheObject(key, list, Constants.DATA_EXPIRATION, TimeUnit.MINUTES);
|
||||||
|
@ -179,6 +179,19 @@ public class WxFlowableController extends BaseController {
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 默认驳回到申请人
|
||||||
|
* @param flowTaskVo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "驳回申请人")
|
||||||
|
@Log(title = "驳回申请人", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE)
|
||||||
|
@PostMapping(value = "/defaultReturn")
|
||||||
|
public AjaxResult taskDefaultReturn(@RequestBody FlowTaskVo flowTaskVo) {
|
||||||
|
flowTaskService.defaultReturn(flowTaskVo);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除流程实例
|
* 删除流程实例
|
||||||
* @param instanceId 流程实例ID
|
* @param instanceId 流程实例ID
|
||||||
|
@ -257,20 +270,15 @@ public class WxFlowableController extends BaseController {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping(value = "/myAwaitFlowTaskList")
|
@PostMapping(value = "/myAwaitFlowTaskList")
|
||||||
public TableDataInfo myAwaitFlowTaskList(@RequestBody FlowTaskEntity flowTaskEntity) {
|
public AjaxResult myAwaitFlowTaskList(@RequestBody FlowTaskEntity flowTaskEntity) {
|
||||||
startPage();
|
|
||||||
//超管查询所有数据
|
//超管查询所有数据
|
||||||
if(!SysUser.isAdmin(super.getUserId())){
|
if(!SysUser.isAdmin(super.getUserId())){
|
||||||
SysUser sysUser = super.getLoginUser().getUser();
|
SysUser sysUser = super.getLoginUser().getUser();
|
||||||
if(SysRole.roleIsDeptAdmin(sysUser.getRoles())){
|
flowTaskEntity.setAssigneeId(sysUser.getUserId());
|
||||||
flowTaskEntity.setDeptAncestors(sysUser.getDept().getAncestors()+","+sysUser.getDeptId());
|
flowTaskEntity.setDeptAncestors(sysUser.getDept().getAncestors()+","+sysUser.getDeptId());
|
||||||
}else{
|
flowTaskEntity.setRoleIds(sysUser.getRoles().stream().map(role -> role.getRoleId()).collect(Collectors.toList()));
|
||||||
flowTaskEntity.setAssigneeId(sysUser.getUserId());
|
|
||||||
flowTaskEntity.setDeptAncestors(sysUser.getDept().getAncestors()+","+sysUser.getDeptId());
|
|
||||||
flowTaskEntity.setRoleIds(sysUser.getRoles().stream().map(role -> role.getRoleId()).collect(Collectors.toList()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return getDataTable(flowBusinessKeyService.selectMyAwaitFlowTask(flowTaskEntity));
|
return success(flowBusinessKeyService.selectMyAwaitFlowTask(flowTaskEntity));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -306,6 +314,8 @@ public class WxFlowableController extends BaseController {
|
||||||
@GetMapping(value = "/myFinishedFlowTaskList")
|
@GetMapping(value = "/myFinishedFlowTaskList")
|
||||||
public TableDataInfo myFinishedFlowTaskList(FlowTaskEntity flowTaskEntity) {
|
public TableDataInfo myFinishedFlowTaskList(FlowTaskEntity flowTaskEntity) {
|
||||||
startPage();
|
startPage();
|
||||||
|
SysUser sysUser = super.getLoginUser().getUser();
|
||||||
|
flowTaskEntity.setAssigneeId(sysUser.getUserId());
|
||||||
return getDataTable(flowBusinessKeyService.selectMyFinishedFlowTask(flowTaskEntity));
|
return getDataTable(flowBusinessKeyService.selectMyFinishedFlowTask(flowTaskEntity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class WxLoginController extends BaseController {
|
||||||
@ApiOperation(value = "退出登录")
|
@ApiOperation(value = "退出登录")
|
||||||
@RateLimiter(count = 10, limitType = LimitType.IP)
|
@RateLimiter(count = 10, limitType = LimitType.IP)
|
||||||
@Log(title = "用户退出登录", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE)
|
@Log(title = "用户退出登录", businessType = BusinessType.UPDATE, operatorType = OperatorType.MOBILE)
|
||||||
@PostMapping("/loginOut")
|
@GetMapping("/loginOut")
|
||||||
public AjaxResult loginOut(HttpServletRequest request)
|
public AjaxResult loginOut(HttpServletRequest request)
|
||||||
{
|
{
|
||||||
tokenService.delLoginUser(request);
|
tokenService.delLoginUser(request);
|
||||||
|
|
|
@ -18,6 +18,10 @@ public class ProProjectInfo extends BaseEntity
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 项目编号 */
|
||||||
|
@Excel(name = "项目编号")
|
||||||
|
private String no;
|
||||||
|
|
||||||
/** 项目名称 */
|
/** 项目名称 */
|
||||||
@Excel(name = "项目名称")
|
@Excel(name = "项目名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
@ -58,11 +62,7 @@ public class ProProjectInfo extends BaseEntity
|
||||||
@Excel(name = "是否删除")
|
@Excel(name = "是否删除")
|
||||||
private String isDel;
|
private String isDel;
|
||||||
|
|
||||||
/** 项目级单位 */
|
public void setId(Long id)
|
||||||
@Excel(name = "项目级单位")
|
|
||||||
private String unit;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,16 @@ public class ProProjectInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setName(String name)
|
|
||||||
|
public String getNo() {
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNo(String no) {
|
||||||
|
this.no = no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
@ -157,24 +166,16 @@ public class ProProjectInfo extends BaseEntity
|
||||||
this.isDel = isDel;
|
this.isDel = isDel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIsDel()
|
public String getIsDel()
|
||||||
{
|
{
|
||||||
return isDel;
|
return isDel;
|
||||||
}
|
}
|
||||||
public void setUnit(String unit)
|
|
||||||
{
|
|
||||||
this.unit = unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUnit()
|
|
||||||
{
|
|
||||||
return unit;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
|
.append("no", getNo())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("deptId", getDeptId())
|
.append("deptId", getDeptId())
|
||||||
.append("address", getAddress())
|
.append("address", getAddress())
|
||||||
|
@ -190,7 +191,6 @@ public class ProProjectInfo extends BaseEntity
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("unit", getUnit())
|
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,14 @@ public interface IProProjectApplyService
|
||||||
*/
|
*/
|
||||||
public int updateProProjectApply(ProProjectApply proProjectApply);
|
public int updateProProjectApply(ProProjectApply proProjectApply);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目申请
|
||||||
|
*
|
||||||
|
* @param proProjectApply 项目申请
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProProjectApplyEntity(ProProjectApply proProjectApply);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除项目申请
|
* 批量删除项目申请
|
||||||
*
|
*
|
||||||
|
|
|
@ -93,7 +93,6 @@ public class ProProjectApplyServiceImpl implements IProProjectApplyService
|
||||||
public int updateProProjectApply(ProProjectApply proProjectApply)
|
public int updateProProjectApply(ProProjectApply proProjectApply)
|
||||||
{
|
{
|
||||||
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
|
SysUser sysUser = SecurityUtils.getLoginUser().getUser();
|
||||||
proProjectApply.setCreateTime(DateUtils.getNowDate());
|
|
||||||
proProjectApply.setUpdateBy(sysUser.getNickName());
|
proProjectApply.setUpdateBy(sysUser.getNickName());
|
||||||
proProjectApply.setUpdateTime(DateUtils.getNowDate());
|
proProjectApply.setUpdateTime(DateUtils.getNowDate());
|
||||||
proProjectApplyMapper.deleteProProjectApplyDetailByApplyId(proProjectApply.getId());
|
proProjectApplyMapper.deleteProProjectApplyDetailByApplyId(proProjectApply.getId());
|
||||||
|
@ -101,6 +100,20 @@ public class ProProjectApplyServiceImpl implements IProProjectApplyService
|
||||||
return proProjectApplyMapper.updateProProjectApply(proProjectApply);
|
return proProjectApplyMapper.updateProProjectApply(proProjectApply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目申请
|
||||||
|
*
|
||||||
|
* @param proProjectApply 项目申请
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public int updateProProjectApplyEntity(ProProjectApply proProjectApply)
|
||||||
|
{
|
||||||
|
proProjectApply.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return proProjectApplyMapper.updateProProjectApply(proProjectApply);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除项目申请
|
* 批量删除项目申请
|
||||||
*
|
*
|
||||||
|
|
|
@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<resultMap type="ProProjectInfo" id="ProProjectInfoResult">
|
<resultMap type="ProProjectInfo" id="ProProjectInfoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="no" column="no" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="deptId" column="dept_id" />
|
<result property="deptId" column="dept_id" />
|
||||||
<result property="address" column="address" />
|
<result property="address" column="address" />
|
||||||
|
@ -21,24 +22,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="unit" column="unit" />
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectProProjectInfoVo">
|
<sql id="selectProProjectInfoVo">
|
||||||
select id, name, dept_id, address, infos, person_name, person_phone, main_image, images, proj_status, is_del, create_by, create_time, update_by, update_time, remark, unit
|
select id, no, name, dept_id, address, infos, person_name, person_phone, main_image, images, proj_status, is_del, create_by, create_time, update_by, update_time, remark
|
||||||
from pro_project_info
|
from pro_project_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult">
|
<select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult">
|
||||||
<include refid="selectProProjectInfoVo"/>
|
<include refid="selectProProjectInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="no != null and no != ''"> and no = #{no}</if>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||||
<if test="personName != null and personName != ''"> and person_name like concat('%', #{personName}, '%')</if>
|
<if test="personName != null and personName != ''"> and person_name like concat('%', #{personName}, '%')</if>
|
||||||
<if test="personPhone != null and personPhone != ''"> and person_phone = #{personPhone}</if>
|
<if test="personPhone != null and personPhone != ''"> and person_phone = #{personPhone}</if>
|
||||||
<if test="projStatus != null and projStatus != ''"> and proj_status = #{projStatus}</if>
|
<if test="projStatus != null and projStatus != ''"> and proj_status = #{projStatus}</if>
|
||||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
@ -51,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertProProjectInfo" parameterType="ProProjectInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertProProjectInfo" parameterType="ProProjectInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into pro_project_info
|
insert into pro_project_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="no != null">no,</if>
|
||||||
<if test="name != null">name,</if>
|
<if test="name != null">name,</if>
|
||||||
<if test="deptId != null">dept_id,</if>
|
<if test="deptId != null">dept_id,</if>
|
||||||
<if test="address != null">address,</if>
|
<if test="address != null">address,</if>
|
||||||
|
@ -66,9 +67,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="unit != null">unit,</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="no != null">#{no},</if>
|
||||||
<if test="name != null">#{name},</if>
|
<if test="name != null">#{name},</if>
|
||||||
<if test="deptId != null">#{deptId},</if>
|
<if test="deptId != null">#{deptId},</if>
|
||||||
<if test="address != null">#{address},</if>
|
<if test="address != null">#{address},</if>
|
||||||
|
@ -84,13 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="unit != null">#{unit},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateProProjectInfo" parameterType="ProProjectInfo">
|
<update id="updateProProjectInfo" parameterType="ProProjectInfo">
|
||||||
update pro_project_info
|
update pro_project_info
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="no != null">no = #{no},</if>
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||||
<if test="address != null">address = #{address},</if>
|
<if test="address != null">address = #{address},</if>
|
||||||
|
@ -106,19 +107,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="unit != null">unit = #{unit},</if>
|
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteProProjectInfoById" parameterType="Long">
|
<update id="deleteProProjectInfoById" parameterType="Long">
|
||||||
delete from pro_project_info where id = #{id}
|
update pro_project_info set is_del=1 where id = #{id}
|
||||||
</delete>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteProProjectInfoByIds" parameterType="String">
|
<update id="deleteProProjectInfoByIds" parameterType="String">
|
||||||
delete from pro_project_info where id in
|
update pro_project_info set is_del=1 where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue