提交代码
parent
5457761b77
commit
a2e1638296
|
@ -314,17 +314,13 @@ export default {
|
|||
rules: {
|
||||
title: [
|
||||
{ required: true, message: "请输入新闻标题", trigger: "blur" },
|
||||
{ max: 20, message: "新闻标题最多30个字符", trigger: "blur" },
|
||||
{ max: 30, message: "新闻标题最多30个字符", trigger: "blur" },
|
||||
],
|
||||
mainImage: [{ required: true, message: "请上传新闻主图", trigger: "blur" }],
|
||||
intro: [
|
||||
{ required: false, message: "请输入新闻简介", trigger: "blur" },
|
||||
{ max: 200, message: "新闻简介最多200个字符", trigger: "blur" },
|
||||
],
|
||||
trainTitle: [
|
||||
{ required: true, message: "请输入培训标题", trigger: "blur" },
|
||||
{ max: 20, message: "培训标题最多20个字符", trigger: "blur" },
|
||||
],
|
||||
content: [{ required: true, message: "请输入新闻内容", trigger: "blur" }],
|
||||
files: [{ required: false, message: "请上传相关附件", trigger: "blur" }],
|
||||
},
|
||||
|
|
|
@ -18,32 +18,12 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot集成thymeleaf模板 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger3-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
|
@ -56,16 +36,17 @@
|
|||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
<groupId>com.yanzhu.jh</groupId>
|
||||
<artifactId>yanzhu-jh</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
@ -9,7 +10,8 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@SpringBootApplication(scanBasePackages = "com.ruoyi,com.yanzhu.jh",exclude = { DataSourceAutoConfiguration.class })
|
||||
@MapperScan(value = {"com.ruoyi.*.mapper","com.yanzhu.jh.*.mapper"})
|
||||
public class WeChatApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
package com.ruoyi.web.common;
|
||||
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通用请求处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/weixin/common")
|
||||
public class CommonController
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
|
||||
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
|
||||
private static final String FILE_DELIMETER = ",";
|
||||
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("url", url);
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("fileSize", file.getSize());
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
HashMap map=new HashMap();
|
||||
map.put("url",url);
|
||||
map.put("fielName",file.getOriginalFilename());
|
||||
map.put("size",file.getSize());
|
||||
map.put("ext",FileUtils.getFileExt(fileName));
|
||||
ajax.put("file",map);
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用上传请求(多个)
|
||||
*/
|
||||
@PostMapping("/uploads")
|
||||
public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
List<String> urls = new ArrayList<String>();
|
||||
List<String> fileNames = new ArrayList<String>();
|
||||
List<String> newFileNames = new ArrayList<String>();
|
||||
List<String> originalFilenames = new ArrayList<String>();
|
||||
List<Long> fileSize=new ArrayList<>();
|
||||
List list=new ArrayList();
|
||||
for (MultipartFile file : files)
|
||||
{
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
urls.add(url);
|
||||
fileNames.add(fileName);
|
||||
fileSize.add(file.getSize());
|
||||
newFileNames.add(FileUtils.getName(fileName));
|
||||
originalFilenames.add(file.getOriginalFilename());
|
||||
HashMap map=new HashMap();
|
||||
map.put("url",url);
|
||||
map.put("fielName",file.getOriginalFilename());
|
||||
map.put("size",file.getSize());
|
||||
map.put("ext",FileUtils.getFileExt(fileName));
|
||||
list.add(map);
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
|
||||
ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
|
||||
ajax.put("fileSizes", StringUtils.join(fileSize, FILE_DELIMETER));
|
||||
ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
|
||||
ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
|
||||
ajax.put("files",list);
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,125 +0,0 @@
|
|||
package com.ruoyi.web.core.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.models.auth.In;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.ApiKey;
|
||||
import springfox.documentation.service.AuthorizationScope;
|
||||
import springfox.documentation.service.Contact;
|
||||
import springfox.documentation.service.SecurityReference;
|
||||
import springfox.documentation.service.SecurityScheme;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
|
||||
/**
|
||||
* Swagger2的接口配置
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
public class SwaggerConfig
|
||||
{
|
||||
/** 系统基础配置 */
|
||||
@Autowired
|
||||
private RuoYiConfig ruoyiConfig;
|
||||
|
||||
/** 是否开启swagger */
|
||||
@Value("${swagger.enabled}")
|
||||
private boolean enabled;
|
||||
|
||||
/** 设置请求的统一前缀 */
|
||||
@Value("${swagger.pathMapping}")
|
||||
private String pathMapping;
|
||||
|
||||
/**
|
||||
* 创建API
|
||||
*/
|
||||
@Bean
|
||||
public Docket createRestApi()
|
||||
{
|
||||
return new Docket(DocumentationType.OAS_30)
|
||||
// 是否启用Swagger
|
||||
.enable(enabled)
|
||||
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
||||
.apiInfo(apiInfo())
|
||||
// 设置哪些接口暴露给Swagger展示
|
||||
.select()
|
||||
// 扫描所有有注解的api,用这种方式更灵活
|
||||
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
||||
// 扫描指定包中的swagger注解
|
||||
// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
|
||||
// 扫描所有 .apis(RequestHandlerSelectors.any())
|
||||
.paths(PathSelectors.any())
|
||||
.build()
|
||||
/* 设置安全模式,swagger可以设置访问token */
|
||||
.securitySchemes(securitySchemes())
|
||||
.securityContexts(securityContexts())
|
||||
.pathMapping(pathMapping);
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全模式,这里指定token通过Authorization头请求头传递
|
||||
*/
|
||||
private List<SecurityScheme> securitySchemes()
|
||||
{
|
||||
List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
|
||||
apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
|
||||
return apiKeyList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全上下文
|
||||
*/
|
||||
private List<SecurityContext> securityContexts()
|
||||
{
|
||||
List<SecurityContext> securityContexts = new ArrayList<>();
|
||||
securityContexts.add(
|
||||
SecurityContext.builder()
|
||||
.securityReferences(defaultAuth())
|
||||
.operationSelector(o -> o.requestMappingPattern().matches("/.*"))
|
||||
.build());
|
||||
return securityContexts;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认的安全上引用
|
||||
*/
|
||||
private List<SecurityReference> defaultAuth()
|
||||
{
|
||||
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
|
||||
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
|
||||
authorizationScopes[0] = authorizationScope;
|
||||
List<SecurityReference> securityReferences = new ArrayList<>();
|
||||
securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
|
||||
return securityReferences;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加摘要信息
|
||||
*/
|
||||
private ApiInfo apiInfo()
|
||||
{
|
||||
// 用ApiInfoBuilder进行定制
|
||||
return new ApiInfoBuilder()
|
||||
// 设置标题
|
||||
.title("标题:北跨泾河-产发工程数字管理平台_接口文档")
|
||||
// 描述
|
||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
||||
// 作者信息
|
||||
.contact(new Contact(ruoyiConfig.getName(), null, null))
|
||||
// 版本
|
||||
.version("版本号:" + ruoyiConfig.getVersion())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package com.ruoyi.web.project;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.yanzhu.jh.project.domain.SurProjectChecking;
|
||||
import com.yanzhu.jh.project.service.ISurProjectCheckingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: ProjectCheckingController
|
||||
* @Description: 项目举牌验收
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/weixin/projectchecking")
|
||||
public class ProjectCheckingController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
ISurProjectCheckingService surProjectCheckingService;
|
||||
|
||||
/**
|
||||
* 查询当前用户举牌验收项目列表
|
||||
* @param surProjectChecking
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SurProjectChecking surProjectChecking){
|
||||
return success(surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前用户举牌验收项目列表
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/info")
|
||||
public AjaxResult info(Long id){
|
||||
return success(surProjectCheckingService.selectSurProjectCheckingById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增举牌验收
|
||||
* @param surProjectChecking
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody SurProjectChecking surProjectChecking){
|
||||
return success(surProjectCheckingService.insertSurProjectChecking(surProjectChecking));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.web.project;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUserinfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: ProjectUserinfoController
|
||||
* @Description: 项目人员信息
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/weixin/projectuserinfo")
|
||||
public class ProjectUserinfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
ISurProjectUserinfoService surProjectUserinfoService;
|
||||
|
||||
/**
|
||||
* 根据项目查询项目人员信息
|
||||
* @param surProjectUserinfo
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(SurProjectUserinfo surProjectUserinfo){
|
||||
return success(surProjectUserinfoService.selectProjectUnitUser(surProjectUserinfo));
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ ruoyi:
|
|||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: /data/uploadPath
|
||||
profile: D:/data/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
|
@ -38,6 +38,7 @@ server:
|
|||
logging:
|
||||
level:
|
||||
com.ruoyi: debug
|
||||
com.yanzhu.jh: debug
|
||||
org.springframework: warn
|
||||
|
||||
# 用户配置
|
||||
|
@ -103,7 +104,7 @@ token:
|
|||
# MyBatis配置
|
||||
mybatis:
|
||||
# 搜索指定包别名
|
||||
typeAliasesPackage: com.ruoyi.**.domain
|
||||
typeAliasesPackage: com.ruoyi.**.domain,com.yanzhu.**.domain
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.ruoyi" level="info" />
|
||||
<logger name="com.yanzhu.jh" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM
|
||||
`sur_menu_config`
|
||||
WHERE
|
||||
del_flag =0
|
||||
del_flag !=1
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -56,6 +57,7 @@ public class SurProjectCheckingController extends BaseController
|
|||
surProjectChecking.setNowDept(Convert.toStr(getDeptId()));
|
||||
}
|
||||
surProjectChecking.setNowUser(Convert.toStr(getUserId()));
|
||||
surProjectChecking.setNowUserName(Convert.toStr(getUserId()));
|
||||
List<SurProjectChecking> list = surProjectCheckingService.selectSurProjectCheckingList(surProjectChecking);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
@ -91,6 +93,7 @@ public class SurProjectCheckingController extends BaseController
|
|||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SurProjectChecking surProjectChecking)
|
||||
{
|
||||
surProjectChecking.setCreateBy(getUsername());
|
||||
return toAjax(surProjectCheckingService.insertSurProjectChecking(surProjectChecking));
|
||||
}
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@ public class SurProjectUserinfo extends BaseEntity
|
|||
@Excel(name = "数据状态")
|
||||
private Long isDel;
|
||||
|
||||
private boolean state;
|
||||
private Long[] projectIds;
|
||||
private Long[] userIds;
|
||||
private String jobTypeName;
|
||||
|
@ -183,6 +184,14 @@ public class SurProjectUserinfo extends BaseEntity
|
|||
this.jobTypeName = jobTypeName;
|
||||
}
|
||||
|
||||
public boolean isState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState() {
|
||||
this.state = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -81,7 +81,7 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
|
|||
}
|
||||
}
|
||||
dataMap.put("sum",sum);//验收数
|
||||
dataMap.put("okSum",Math.floor(okSum/sum));//合格率
|
||||
dataMap.put("okSum",okSum*100/sum);//合格率
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
|
@ -97,14 +97,9 @@ public class SurProjectCheckingServiceImpl implements ISurProjectCheckingService
|
|||
|
||||
surProjectChecking.setCheckType(PublicStateEnum.PROJECT_CHECK_TYPE_JPYS.getCode());
|
||||
surProjectChecking.setWorkingPositionType(PublicStateEnum.PROJECT_CHECK_POSITION_TYPE.getCode());
|
||||
if(surProjectChecking.getCheckingDate()==null){
|
||||
//添加默认时间
|
||||
surProjectChecking.setCheckingDate(new Date());
|
||||
}
|
||||
//默认第一张图是主图
|
||||
surProjectChecking.setMainImage(surProjectChecking.getImageUrls().split(",")[0]);
|
||||
surProjectChecking.setIsDel(Convert.toLong(PublicStateEnum.OK.getCode()));
|
||||
surProjectChecking.setCreateBy(SecurityUtils.getUsername());
|
||||
surProjectChecking.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectCheckingMapper.insertSurProjectChecking(surProjectChecking);
|
||||
}
|
||||
|
|
|
@ -51,7 +51,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and spc.is_del=0
|
||||
<if test="projectId != null "> and spc.project_id = #{projectId}</if>
|
||||
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
|
||||
<if test="deptId != null "> and spc.dept_id = #{deptId}</if>
|
||||
<if test="deptId != null ">
|
||||
<if test="nowUserName == null or nowUserName == ''">and spc.dept_id = #{deptId}</if>
|
||||
<if test="nowUserName != null and nowUserName != ''">and (spc.dept_id = #{deptId} or spc.quality_user=#{nowUserName} or spc.supervise_user=#{nowUserName})</if>
|
||||
</if>
|
||||
<if test="deptName != null and deptName != ''"> and sd.dept_name like concat('%', #{deptName}, '%')</if>
|
||||
<if test="groupDeptId != null "> and spc.group_dept_id = #{groupDeptId}</if>
|
||||
<if test="checkType != null and checkType != ''"> and spc.check_type = #{checkType}</if>
|
||||
|
@ -130,8 +133,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectSurProjectCheckingById" parameterType="Long" resultMap="SurProjectCheckingResult">
|
||||
<include refid="selectSurProjectCheckingVo"/>
|
||||
where id = #{id}
|
||||
select spc.id, spc.project_id, spc.dept_id, spc.group_dept_id, spc.check_type, spc.main_image, spc.image_urls, spc.working_position_type, spc.check_working_position, spc.checking_num, spc.check_result, spc.intro, spc.quality_user, spc.quality_user_name, spc.supervise_user, spc.supervise_user_name, spc.group_dept_user, spc.group_dept_user_name, spc.checking_date, spc.checking_files, spc.is_del, spc.create_by, spc.create_time, spc.update_by, spc.update_time, spc.remark, sp.projectName, sd.dept_name from sur_project_checking spc
|
||||
left join sur_project sp on spc.project_id = sp.id
|
||||
left join sys_dept sd on sd.dept_id = spc.dept_id
|
||||
where spc.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSurProjectChecking" parameterType="SurProjectChecking" useGeneratedKeys="true" keyProperty="id">
|
||||
|
|
Loading…
Reference in New Issue