小程序代码简化
|
|
@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||
// 过滤请求
|
||||
.authorizeRequests()
|
||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||
.antMatchers("/login","/wechat/**", "/common/**", "/register", "/captchaImage", "/weixin/**","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
|
||||
.antMatchers("/login","/wechat/**", "/common/**", "/register", "/captchaImage","/bgscreen/**","/publics/**","/system/dict/data/**").permitAll()
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/img/**", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringBoot集成thymeleaf模板 -->
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
|
|
@ -30,12 +30,6 @@
|
|||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yanzhu.jh</groupId>
|
||||
<artifactId>yanzhu-jh</artifactId>
|
||||
|
|
@ -43,11 +37,6 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.web.project;
|
||||
package com.ruoyi.web.project.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
|
|
@ -63,4 +63,5 @@ public class ProjectCheckingController extends BaseController {
|
|||
{
|
||||
return toAjax(surProjectCheckingService.deleteSurProjectCheckingById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.ruoyi.web.project.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.web.project.service.WxIProjectInfoService;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: ProjectProblemmodifyController
|
||||
* @Description: 项目问题修改
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wechat/project")
|
||||
public class ProjectController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
WxIProjectInfoService IProjectInfoService;
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的基本信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/8 9:16
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:
|
||||
* @throws Exception 异常:
|
||||
*/
|
||||
@RequestMapping("/getProjectFoundation")
|
||||
public Map<String, Object> getProjectFoundation(@RequestParam String id) {
|
||||
return IProjectInfoService.getProjectBasicInfo(id);
|
||||
}
|
||||
|
||||
/***
|
||||
* 查询下一级组织架构信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/selectDeptSubordinate")
|
||||
public Object selectDeptSubordinate(@RequestParam Map<String,Object> param){
|
||||
return IProjectInfoService.selectDeptSubordinate(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe 根据公司获取项目的列表
|
||||
*/
|
||||
@RequestMapping("/selectProjectByCompanyId")
|
||||
public Object selectProjectByCompanyId(@RequestParam Map<String,Object> map) {
|
||||
return IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getProjectUnitList")
|
||||
public Object getProjectUnitList(String projectId){
|
||||
return IProjectInfoService.getProjectUnitList(projectId);
|
||||
}
|
||||
|
||||
/***
|
||||
* 模糊查询出项目信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectProjectInfoByName")
|
||||
public AjaxResult selectProjectInfoByName(@RequestParam Map<String,Object> map){
|
||||
return success(IProjectInfoService.getProjectByDeptIdAndCompanyId(map));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.web.project;
|
||||
package com.ruoyi.web.project.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
|
|
@ -24,8 +24,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/wechat/projectProblemmodify")
|
||||
|
||||
|
||||
public class ProjectProblemmodifyController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.web.project;
|
||||
package com.ruoyi.web.project.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.web.projectInfo.domain;
|
||||
package com.ruoyi.web.project.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
package com.ruoyi.web.project.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public interface WxProjectInfoMapper {
|
||||
|
||||
//查询组织架构下一层级
|
||||
List<Map<String, Object>> getDeptSubordinate(Map<String,Object> map);
|
||||
//查询区级层级
|
||||
List<Map<String, Object>> getQUDeptSubordinate(Map<String,Object> map);
|
||||
//根据所选层级或者公司查询登录用户的项目
|
||||
List<Map<String,Object>> getProjectByDeptIdAndCompanyId(Map<String,Object> map);
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的概况信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 16:21
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:map
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public Map<String, Object> selectProjectOverview(String id);
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectUnitList(String projectId);
|
||||
|
||||
/**
|
||||
* 查询子公司信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getZGSDeptInfoByMap(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据项目查询单位信息
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectDeptByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 根据登录用户查询单位信息
|
||||
* @param userName
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectDeptByUserName(String userName);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.ruoyi.web.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface WxIProjectInfoService {
|
||||
|
||||
|
||||
/**
|
||||
* 查询组织下一层级
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectDeptSubordinate(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据所选层级查询登录用户的项目
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectByDeptIdAndCompanyId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:获取项目的基本信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 17:59
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:map
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public Map<String, Object> getProjectBasicInfo(String id);
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectUnitList(String projectId);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package com.ruoyi.web.project.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.web.project.mapper.WxProjectInfoMapper;
|
||||
import com.ruoyi.web.project.service.WxIProjectInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wxw
|
||||
* @version : V1.0
|
||||
* @ClassName: ProjectInfoServiceImpl
|
||||
* @Description: TODO
|
||||
* @Auther: Makalu
|
||||
* @Date: 2020/7/7 16:45
|
||||
*/
|
||||
@Service
|
||||
public class WxProjectInfoServiceImpl implements WxIProjectInfoService {
|
||||
|
||||
@Autowired
|
||||
private WxProjectInfoMapper ProjectInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SysDeptMapper sysDeptMapper;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectDeptSubordinate(Map<String,Object> param) {
|
||||
List<Map<String,Object>> deptList = ProjectInfoMapper.getDeptSubordinate(param);
|
||||
Map<String,Object> dataMap = new HashMap<>(16);
|
||||
for(Map<String,Object> map:deptList){
|
||||
map.put("userId",param.get("userId"));
|
||||
dataMap.put(map.get("text").toString(),ProjectInfoMapper.getQUDeptSubordinate(map));
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getProjectByDeptIdAndCompanyId(Map<String, Object> map) {
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
String nowRole = null;
|
||||
if(map.get("minRoleId")!=null && !"undefined".equals(map.get("minRoleId"))){
|
||||
nowRole = map.get("minRoleId").toString();
|
||||
}else{
|
||||
nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(map.get("userId"))));
|
||||
}
|
||||
if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
Long deptId = this.getZgsDept(Convert.toLong(map.get("deptId"))).getDeptId();
|
||||
map.put("nowDeptId",Convert.toStr(deptId));
|
||||
}else{
|
||||
map.put("nowDeptId",Convert.toStr(map.get("deptId")));
|
||||
}
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
if(Convert.toInt(SysRoleEnum.JTGS.getCode())>Convert.toInt(nowRole)){
|
||||
nowRole = SysRoleEnum.JTGS.getCode();
|
||||
}
|
||||
map.put("nowRole",nowRole);
|
||||
List<Map<String, Object>> getProjec = ProjectInfoMapper.getProjectByDeptIdAndCompanyId(map);
|
||||
for(int i=0;i<getProjec.size();i++){
|
||||
//视频接入数
|
||||
String videoNum = "0";
|
||||
//结构体监测点位数
|
||||
Integer monitoringCount = 0;
|
||||
//结构体监测预警个数
|
||||
Integer monitoringErrorCount = 0;
|
||||
getProjec.get(i).put("id",i);
|
||||
getProjec.get(i).put("videoNum",StringUtils.isNotBlank(videoNum)?videoNum:"0");
|
||||
getProjec.get(i).put("monitoringCount",monitoringCount);
|
||||
getProjec.get(i).put("projectCount",Integer.valueOf(getProjec.get(i).get("projectCount").toString())+monitoringErrorCount);
|
||||
list.add(getProjec.get(i));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectBasicInfo(String id) {
|
||||
//根据项目的id查基本信息
|
||||
return ProjectInfoMapper.selectProjectOverview(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getProjectUnitList(String projectId) {
|
||||
return ProjectInfoMapper.getProjectUnitList(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子公司部门ID
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
private SysDept getZgsDept(Long deptId){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(deptId);
|
||||
if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
//comFlag标识为1是子公司
|
||||
if(DeptTypeEnum.COMFLAG.getCode().equals(sysDept.getComFlag())){
|
||||
return sysDept;
|
||||
}else{
|
||||
return getZgsDept(sysDept.getParentId());
|
||||
}
|
||||
}else{
|
||||
return sysDept;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,164 +0,0 @@
|
|||
package com.ruoyi.web.projectInfo.controller;
|
||||
|
||||
import com.ruoyi.web.projectInfo.service.WxIProjectInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: ProjectInfoController
|
||||
* @Description: TODO
|
||||
* @Auther: Makalu
|
||||
* @Date: 2020/7/7 18:03
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/weixin/projectInfo")
|
||||
public class WxProjectInfoController {
|
||||
|
||||
@Autowired
|
||||
private WxIProjectInfoService IProjectInfoService;
|
||||
|
||||
/**
|
||||
* 查询登录用户的组织架构
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/selectDeptAll")
|
||||
@ResponseBody
|
||||
public Object selectDeptAll(@RequestParam Map<String,Object> map){
|
||||
return IProjectInfoService.getDeptAll(map);
|
||||
}
|
||||
|
||||
/***
|
||||
* 查询下一级组织架构信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/selectDeptSubordinate")
|
||||
@ResponseBody
|
||||
public Object selectDeptSubordinate(@RequestParam Map<String,Object> param){
|
||||
return IProjectInfoService.selectDeptSubordinate(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe 根据层级获取项目的列表
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getCompanyInfo")
|
||||
public Object getCompanyInfo(@RequestParam Map<String,Object> map) {
|
||||
return IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe 根据公司获取项目的列表
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/selectProjectByCompanyId")
|
||||
public Object selectProjectByCompanyId(@RequestParam Map<String,Object> map) {
|
||||
return IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据组织架构查询出公司列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/selectCompanyJG")
|
||||
public Object selectCompanyJG(@RequestParam Map<String,Object> map) {
|
||||
return IProjectInfoService.getDeptIdNext(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的经纬度
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 20:07
|
||||
* @version 版本: V1.0
|
||||
* @param map:map
|
||||
* @return 返回值:
|
||||
* @throws Exception 异常:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getProjectPoint")
|
||||
public Map<String, Object> getProjectPoint(@RequestParam Map<String, Object> map) {
|
||||
return IProjectInfoService.getProjectPointCount(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的列表信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/8 9:25
|
||||
* @version 版本: V1.0
|
||||
* @param map:map
|
||||
* @return 返回值:
|
||||
* @throws Exception 异常:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getProjectList")
|
||||
public List<Map<String, Object>> getProjectList(@RequestParam Map<String,Object> map) {
|
||||
return IProjectInfoService.getProjectList(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的基本信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/8 9:16
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:
|
||||
* @throws Exception 异常:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getProjectFoundation")
|
||||
public Map<String, Object> getProjectFoundation(@RequestParam String id) {
|
||||
return IProjectInfoService.getProjectBasicInfo(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的管理公司信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/8 9:19
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:
|
||||
* @throws Exception 异常:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getProjectManage")
|
||||
public Map<String, Object> getProjectManage(@RequestParam String id) {
|
||||
return IProjectInfoService.getProjectManageInfo(id);
|
||||
}
|
||||
|
||||
/***
|
||||
* 模糊查询出项目信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectProjectInfoByName")
|
||||
@ResponseBody
|
||||
public Object selectProjectInfoByName(@RequestParam Map<String,Object> map){
|
||||
return IProjectInfoService.getProjectInfoByName(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getProjectUnitList")
|
||||
@ResponseBody
|
||||
public Object getProjectUnitList(String projectId){
|
||||
return IProjectInfoService.getProjectUnitList(projectId);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,181 +0,0 @@
|
|||
package com.ruoyi.web.projectInfo.mapper;
|
||||
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Repository
|
||||
public interface WxProjectInfoMapper {
|
||||
|
||||
//查询出人员类型信息
|
||||
List<String> getPostIdByUserId(String userId);
|
||||
//查询组织架构下一层级
|
||||
List<Map<String, Object>> getDeptSubordinate(Map<String,Object> map);
|
||||
//查询区级层级
|
||||
List<Map<String, Object>> getQUDeptSubordinate(Map<String,Object> map);
|
||||
///根据组织架构id查询数据
|
||||
Map<String,Object> getDeptData(String deptId);
|
||||
//查询出项目用户公司项目信息
|
||||
Map<String,Object> getCompanyAndProjectByUserId(String userId);
|
||||
//查询所有省级
|
||||
List<Map<String,Object>> getShengList(Map<String,Object> map);
|
||||
//根据所选层级或者公司查询登录用户的项目
|
||||
List<Map<String,Object>> getProjectByDeptIdAndCompanyId(Map<String,Object> map);
|
||||
//根据登录账号查询出企业信息
|
||||
Map<String,Object> getCompanyByUserId(Map<String,Object> map);
|
||||
//企业人员根据组织架构查询出公司列表
|
||||
List<Map<String,Object>> getCompanyQY(Map<String,Object> map);
|
||||
//根据公司id查询出公司名称
|
||||
Map<String,Object> getCompanyInfo(String superiorCompany);
|
||||
//监管人员根据组织架构查询出公司列表
|
||||
List<Map<String,Object>> getCompanyJG(Map<String,Object> map);
|
||||
//根据总公司层级查询出集团公司列表
|
||||
List<Map<String,Object>> getCompanySonData(Map<String,Object> map);
|
||||
//查询上一级公司
|
||||
Map<String,Object> getNextLevelCompany(Map<String,Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的经度纬度列表
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 15:48
|
||||
* @version 版本: V1.0
|
||||
* @param deptId:String
|
||||
* @return 返回值:list
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public List<Map<String, Object>> selectProjectPoint(String deptId);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询建设单位下的项目个数
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 15:44
|
||||
* @version 版本: V1.0
|
||||
* @param deptId:map
|
||||
* @return 返回值:int
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public int selectProjectSize(String deptId);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的基本信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 10:57
|
||||
* @version 版本: V1.0
|
||||
* @param map:map
|
||||
* @return 返回值:list
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public List<Map<String, Object>> selectProjectInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的概况信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 16:21
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:map
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public Map<String, Object> selectProjectOverview(String id);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:查询项目的管理概况
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 16:37
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:map
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public Map<String, Object> selectProjectManage(String id);
|
||||
|
||||
/**
|
||||
* 模糊查询项目信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectInfoByName(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 模糊查询出预警项目
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectInfoEnviron(Map<String,Object> map);
|
||||
|
||||
List<Map<String,Object>> getChinaProvince();
|
||||
|
||||
int addChinaCity(List<Map<String,Object>> list);
|
||||
|
||||
/*********************************小程序首页新逻辑**************************************/
|
||||
|
||||
/**
|
||||
* 查询项目相关信息
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getProjectAndChinaData(String projectId);
|
||||
|
||||
/**
|
||||
* 查询公司信息
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getDeptInfo();
|
||||
|
||||
/**
|
||||
* 查询公司信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getDeptInfoByMap(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询出省份信息
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getChinaProvinceList(Map<String,Object> deptId);
|
||||
|
||||
/**
|
||||
* 获取公司下一层级
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getDeptIdNext(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectUnitList(String projectId);
|
||||
|
||||
/**
|
||||
* 查询子公司信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getZGSDeptInfoByMap(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectDeptByProjectId(Long projectId);
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param userName
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectDeptByUserName(String userName);
|
||||
|
||||
}
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
package com.ruoyi.web.projectInfo.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface WxIProjectInfoService {
|
||||
|
||||
/**
|
||||
* 查询用户的组织架构
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getDeptAll(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询组织下一层级
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectDeptSubordinate(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据所选层级查询登录用户的项目
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectByDeptIdAndCompanyId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 企业人员根据组织架构查询出公司列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Object getDeptIdNext(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 监管人员根据组织架构查询公司信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Object getCompanyJG(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询出工程列表数据
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getYCData(Map<String,Object> map);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:获取项目的经纬度
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 17:04
|
||||
* @version 版本: V1.0
|
||||
* @param map:map
|
||||
* @return 返回值:
|
||||
* @throws Exception 异常:
|
||||
*/
|
||||
public Map<String, Object> getProjectPointCount(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:获取公司下的所有项目列表
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 17:49
|
||||
* @version 版本: V1.0
|
||||
* @param map:map
|
||||
* @return 返回值:list
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public List<Map<String, Object>> getProjectList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:获取项目的基本信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 17:59
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:map
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public Map<String, Object> getProjectBasicInfo(String id);
|
||||
|
||||
/**
|
||||
* Methods
|
||||
* @describe 描述:获取项目的管理单位信息
|
||||
* @author 作者:Makalu
|
||||
* @date 时间:2020/7/7 18:00
|
||||
* @version 版本: V1.0
|
||||
* @param id:String
|
||||
* @return 返回值:map
|
||||
* @throws Exception 异常:none
|
||||
*/
|
||||
public Map<String, Object> getProjectManageInfo(String id);
|
||||
|
||||
/**
|
||||
* 模糊查询项目信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectInfoByName(Map<String,Object> map);
|
||||
|
||||
|
||||
void add();
|
||||
|
||||
|
||||
/**
|
||||
* 获取建设单位
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getProjectUnitList(String projectId);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,339 +0,0 @@
|
|||
package com.ruoyi.web.projectInfo.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.web.projectInfo.mapper.WxProjectInfoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author wxw
|
||||
* @version : V1.0
|
||||
* @ClassName: ProjectInfoServiceImpl
|
||||
* @Description: TODO
|
||||
* @Auther: Makalu
|
||||
* @Date: 2020/7/7 16:45
|
||||
*/
|
||||
@Service
|
||||
public class WxProjectInfoServiceImpl implements WxIProjectInfoService {
|
||||
|
||||
@Autowired
|
||||
private WxProjectInfoMapper ProjectInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SysDeptMapper sysDeptMapper;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDeptAll(Map<String,Object> map) {
|
||||
//当前登录账号角色信息
|
||||
String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(map.get("userId"))));
|
||||
Map<String,Object> dataMap = new HashMap<>(16);
|
||||
//组装数据
|
||||
dataMap.put("shengName","西安市");
|
||||
dataMap.put("shiName","西咸新区");
|
||||
dataMap.put("quName","泾河新城");
|
||||
//公司信息
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
Map<String,Object> totalMap = new HashMap<>(16);
|
||||
//查询出公司信息
|
||||
if(SysRoleEnum.ADMIN.getCode().equals(nowRole) || SysRoleEnum.SUPR.getCode().equals(nowRole) || SysRoleEnum.JTGS.getCode().equals(nowRole) ){
|
||||
List<Map<String,Object>> companyList = ProjectInfoMapper.getZGSDeptInfoByMap(map);
|
||||
totalMap.put("id","0");
|
||||
totalMap.put("text","泾河产业发展集团");
|
||||
list.add(totalMap);
|
||||
for(Map<String,Object> companyMap:companyList){
|
||||
totalMap = new HashMap<>(16);
|
||||
totalMap.put("id",companyMap.get("dept_id"));
|
||||
totalMap.put("text",companyMap.get("dept_name"));
|
||||
list.add(totalMap);
|
||||
}
|
||||
}else if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
SysDept sysDept = this.getZgsDept(Convert.toLong(map.get("deptId")));
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}else if(SysRoleEnum.COMMON.getCode().equals(nowRole)){
|
||||
//普通角色,获取真实部门
|
||||
SysDept sysDept = this.getZgsDept(Convert.toLong(map.get("deptId")));
|
||||
//判断当前部门是否是产业发展集团
|
||||
if(DeptTypeEnum.JTGS.getCode().equals(sysDept.getTypeFlag()) || DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
sysDept = this.getZgsDept(Convert.toLong(sysDept.getDeptId()));
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}else{
|
||||
//普通角色
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}
|
||||
}else{
|
||||
//监理单位/总包单位/分包单位
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(Convert.toLong(map.get("deptId")));
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}
|
||||
dataMap.put("province_list",list);
|
||||
dataMap.put("deptId",map.get("deptId"));
|
||||
dataMap.put("logCompanyName",list.get(0).get("text"));
|
||||
dataMap.put("companyId",list.get(0).get("text"));
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectDeptSubordinate(Map<String,Object> param) {
|
||||
List<Map<String,Object>> deptList = ProjectInfoMapper.getDeptSubordinate(param);
|
||||
Map<String,Object> dataMap = new HashMap<>(16);
|
||||
for(Map<String,Object> map:deptList){
|
||||
map.put("userId",param.get("userId"));
|
||||
dataMap.put(map.get("text").toString(),ProjectInfoMapper.getQUDeptSubordinate(map));
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getProjectByDeptIdAndCompanyId(Map<String, Object> map) {
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(map.get("userId"))));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
Long deptId = this.getZgsDept(Convert.toLong(map.get("deptId"))).getDeptId();
|
||||
map.put("nowDeptId",Convert.toStr(deptId));
|
||||
}else{
|
||||
map.put("nowDeptId",Convert.toStr(map.get("deptId")));
|
||||
}
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
if(Convert.toInt(SysRoleEnum.JTGS.getCode())>Convert.toInt(nowRole)){
|
||||
nowRole = SysRoleEnum.JTGS.getCode();
|
||||
}
|
||||
map.put("nowRole",nowRole);
|
||||
List<Map<String, Object>> getProjec = ProjectInfoMapper.getProjectByDeptIdAndCompanyId(map);
|
||||
for(int i=0;i<getProjec.size();i++){
|
||||
//视频接入数
|
||||
String videoNum = "0";
|
||||
//结构体监测点位数
|
||||
Integer monitoringCount = 0;
|
||||
//结构体监测预警个数
|
||||
Integer monitoringErrorCount = 0;
|
||||
getProjec.get(i).put("id",i);
|
||||
getProjec.get(i).put("videoNum",StringUtils.isNotBlank(videoNum)?videoNum:"0");
|
||||
getProjec.get(i).put("monitoringCount",monitoringCount);
|
||||
getProjec.get(i).put("projectCount",Integer.valueOf(getProjec.get(i).get("projectCount").toString())+monitoringErrorCount);
|
||||
list.add(getProjec.get(i));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getDeptIdNext(Map<String, Object> map) {
|
||||
return ProjectInfoMapper.getDeptIdNext(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getCompanyJG(Map<String, Object> map) {
|
||||
Map<String,Object> twoMap =new HashMap<>();
|
||||
// if("2".equals(map.get("type"))){
|
||||
// twoMap.put("startTime", DateUtil.getStartTimes());
|
||||
// twoMap.put("endTime", DateUtil.getNowEndTime());
|
||||
// }
|
||||
// twoMap.put("deptId",map.get("deptId"));
|
||||
// twoMap.put("num",map.get("superiorCompanyId").toString().length()+4);
|
||||
// twoMap.put("num1",map.get("superiorCompanyId").toString().length());
|
||||
// twoMap.put("companyId",map.get("superiorCompanyId"));
|
||||
return ProjectInfoMapper.getCompanyQY(twoMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getYCData(Map<String, Object> map) {
|
||||
// List<Map<String,Object>> list = new ArrayList<>();
|
||||
// JSONArray jsonArray = JSONArray.parseArray(map.get("projectData").toString());
|
||||
// for(int i = 0;i<jsonArray.size();i++){
|
||||
// if(jsonArray.getJSONObject(i).size()>3) {
|
||||
// Map<String, Object> ycMap = new HashMap<>();
|
||||
// ycMap.put("projectId", jsonArray.getJSONObject(i).getString("projectId"));
|
||||
// ycMap.put("startTime", DateUtil.getStartTimes());
|
||||
// ycMap.put("endTime", DateUtil.getNowEndTime());
|
||||
// //根据项目id查询扬尘数据
|
||||
// Integer YNnum = mapper.getYangchenCount(ycMap);
|
||||
// Map<String, Object> spMap = new HashMap<>();
|
||||
// spMap.put("projectName", jsonArray.getJSONObject(i).getString("projectName"));
|
||||
// spMap.put("startTime", DateUtil.getStartTimes());
|
||||
// spMap.put("endTime", DateUtil.getNowEndTime());
|
||||
// List<Map<String,Object>> shnum = projectVideoMapper.selectVideoOutline(spMap);
|
||||
// Integer dayCount = 0;
|
||||
// for(Map<String,Object> dayMap1:shnum){
|
||||
// dayCount+= Integer.valueOf(dayMap1.get("value").toString());
|
||||
// }
|
||||
// //组装数据
|
||||
// Map<String, Object> zzMap = new HashMap<>();
|
||||
// zzMap.put("projectCount", YNnum);
|
||||
// zzMap.put("videoNum", dayCount);
|
||||
// zzMap.put("projectId", jsonArray.getJSONObject(i).getString("projectId"));
|
||||
// zzMap.put("projectName", jsonArray.getJSONObject(i).getString("projectName"));
|
||||
// zzMap.put("companyName", jsonArray.getJSONObject(i).getString("companyName"));
|
||||
// zzMap.put("projectAddress", jsonArray.getJSONObject(i).getString("projectAddress"));
|
||||
// list.add(zzMap);
|
||||
// }
|
||||
// }
|
||||
return null;//list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectPointCount(Map<String, Object> map) {
|
||||
//返回的Map
|
||||
// Map<String, Object> resultMap = new HashMap<>(16);
|
||||
// //根据选中的公司deptId查询所有的项目经纬度,和项目的总数
|
||||
// List<Map<String,Object>> list = new ArrayList<>();
|
||||
// List<Map<String, Object>> getProjectPoint = ProjectInfoMapper.selectProjectPoint(map.get("deptId").toString());
|
||||
// for(int i=0;i<getProjectPoint.size();i++){
|
||||
// getProjectPoint.get(i).put("id",i);
|
||||
// list.add(getProjectPoint.get(i));
|
||||
// }
|
||||
// //查询项目数量
|
||||
// int projectNum = ProjectInfoMapper.selectProjectSize(map.get("deptId").toString());
|
||||
// resultMap.put("projectPoint", list);
|
||||
// resultMap.put("projectNum", projectNum);
|
||||
return null;//resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getProjectList(Map<String,Object> map) {
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
// //根据参数查询所有的项目列表
|
||||
// List<Map<String, Object>> proList = ProjectInfoMapper.selectProjectInfo(map);
|
||||
// proList.forEach(proMap->{
|
||||
// //查询出预警信息预警
|
||||
// Map<String,Object> PM25Map = new HashMap<>();
|
||||
// PM25Map.put("projectId",proMap.get("streamNumber"));
|
||||
// PM25Map.put("startTime", DateUtil.getStartTimes());
|
||||
// PM25Map.put("endTime", DateUtil.getNowEndTime());
|
||||
// int envirCount = mapper.getEarlyWarning(PM25Map);
|
||||
//
|
||||
// //查询实时接入数据
|
||||
// String videoNum = mapper.selectVideoByProjectName(proMap.get("name").toString());
|
||||
//
|
||||
// //组装数据
|
||||
// Map<String,Object> dataMap = new HashMap<>();
|
||||
// dataMap.put("id",proMap.get("id"));
|
||||
// dataMap.put("engineeringName",proMap.get("engineeringName"));
|
||||
// dataMap.put("name",proMap.get("name"));
|
||||
// dataMap.put("projectAddress",proMap.get("projectAddress"));
|
||||
// dataMap.put("streamNumber",proMap.get("streamNumber"));
|
||||
// dataMap.put("envirCount",envirCount);
|
||||
// dataMap.put("videoNum",(videoNum == null)?'0':videoNum);
|
||||
// list.add(dataMap);
|
||||
// });
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectBasicInfo(String id) {
|
||||
//根据项目的id查基本信息
|
||||
return ProjectInfoMapper.selectProjectOverview(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getProjectManageInfo(String id) {
|
||||
//根据项目的id查询管理信息
|
||||
return ProjectInfoMapper.selectProjectManage(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getProjectInfoByName(Map<String, Object> map) {
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
//1所有项目 2 预警项目
|
||||
// List<Map<String, Object>> getProjec = ProjectInfoMapper.getProjectInfoByName(map);
|
||||
// for(int i=0;i<getProjec.size();i++){
|
||||
// //结构体监测预警个数
|
||||
// Integer monitoringErrorCount = appletsEnvironService.getMonitoringErrorCount(map);
|
||||
// if("1".equals(map.get("state").toString())){
|
||||
// //视频接入数
|
||||
// String videoNum = wxVideoMapper.getAccessVideoNum(getProjec.get(i).get("projectId").toString());
|
||||
// //结构体监测点位数
|
||||
// Integer monitoringCount = appletsEnvironService.getMonitoringList(getProjec.get(i));
|
||||
// getProjec.get(i).put("videoNum",StringUtils.isNotBlank(videoNum)?videoNum:"0");
|
||||
// getProjec.get(i).put("monitoringCount",monitoringCount);
|
||||
// }else {
|
||||
// getProjec.get(i).put("monitoringCount",monitoringErrorCount);
|
||||
// }
|
||||
// getProjec.get(i).put("id",i);
|
||||
// getProjec.get(i).put("projectCount",Integer.valueOf(getProjec.get(i).get("projectCount").toString())+monitoringErrorCount);
|
||||
// }
|
||||
return null;//getProjec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add() {
|
||||
List<Map<String,Object>> list = ProjectInfoMapper.getChinaProvince();
|
||||
// for(Map<String,Object> map:list){
|
||||
// try {
|
||||
// OkHttpClient client = new OkHttpClient().newBuilder()
|
||||
// .build();
|
||||
// Request request = new Request.Builder()
|
||||
// .url("http://datavmap-public.oss-cn-hangzhou.aliyuncs.com/areas/csv/"+map.get("adcode").toString()+"_district.json")
|
||||
// .method("GET", null)
|
||||
// .build();
|
||||
// Response response = client.newCall(request).execute();
|
||||
// String json = response.body().string();
|
||||
// System.out.println(json);
|
||||
// System.out.println("id=="+map.get("id"));
|
||||
// JSONArray object = JSON.parseObject(json).getJSONArray("rows");
|
||||
// List<Map<String,Object>> list1 = new ArrayList<>();
|
||||
// for(int i = 0;i<object.size();i++){
|
||||
// Map<String,Object> data = new HashMap<>(16);
|
||||
// data.put("areaName",object.getJSONObject(i).getString("name"));
|
||||
// data.put("provinceId",map.get("provinceId"));
|
||||
// data.put("provinceName",map.get("provinceName"));
|
||||
// data.put("cityId",map.get("id"));
|
||||
// data.put("cityName",object.getJSONObject(i).getString("parent"));
|
||||
// data.put("adcode",object.getJSONObject(i).getString("adcode"));
|
||||
// data.put("lat",object.getJSONObject(i).getString("lat"));
|
||||
// data.put("lng",object.getJSONObject(i).getString("lng"));
|
||||
// list1.add(data);
|
||||
// }
|
||||
// ProjectInfoMapper.addChinaCity(list1);
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getProjectUnitList(String projectId) {
|
||||
return ProjectInfoMapper.getProjectUnitList(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子公司部门ID
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
private SysDept getZgsDept(Long deptId){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(deptId);
|
||||
if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
//comFlag标识为1是子公司
|
||||
if(DeptTypeEnum.COMFLAG.getCode().equals(sysDept.getComFlag())){
|
||||
return sysDept;
|
||||
}else{
|
||||
return getZgsDept(sysDept.getParentId());
|
||||
}
|
||||
}else{
|
||||
return sysDept;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,582 +0,0 @@
|
|||
package com.ruoyi.web.pshManage.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.QiniuUploadUtil;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.web.pshManage.service.IPshService;
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
import com.ruoyi.web.sspMarks.service.ISspMarksService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName:SspController
|
||||
* @Description:随手拍的控制层
|
||||
* @Author:
|
||||
* @Date:2021/3/31 9:08
|
||||
* @version:V1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/weixin/pshManage")
|
||||
@CrossOrigin(origins = "*",maxAge = 3600)
|
||||
public class PshController {
|
||||
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
|
||||
@Autowired
|
||||
private IPshService pshService;
|
||||
|
||||
@Autowired
|
||||
private ISspMarksService sspMarksService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
private String prefix = "pshManage";
|
||||
|
||||
/**********************************************************页面跳转*************************************************/
|
||||
/**
|
||||
* @describe:跳转到列表初始化页
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPage")
|
||||
public String goListPage(@RequestParam Map<String, Object> map, HttpSession HttpSession, Model Model) {
|
||||
HttpSession.setAttribute("loginName", map.get("loginName").toString());
|
||||
HttpSession.setAttribute("projectId", map.get("projectId").toString());
|
||||
HttpSession.setAttribute("projectName", map.get("projectName").toString());
|
||||
|
||||
Model.addAttribute("projectId", map.get("projectId").toString());
|
||||
Model.addAttribute("projectName", map.get("projectName").toString());
|
||||
return prefix + "/sspListPage";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到列表页发布记录
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPageBack")
|
||||
public String goListPageBack(@RequestParam Map<String, Object> map , HttpSession HttpSession , Model Model) {
|
||||
Model.addAttribute("searchText", map.containsKey("searchText")?map.get("searchText").toString():"");
|
||||
Model.addAttribute("typeChangeText", map.containsKey("typeChangeText")?map.get("typeChangeText").toString():"");
|
||||
Model.addAttribute("flowText", map.containsKey("flowText")?map.get("flowText").toString():"");
|
||||
Model.addAttribute("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
Model.addAttribute("projectName", map.containsKey("projectName")?map.get("projectName").toString():HttpSession.getAttribute("projectName"));
|
||||
return prefix + "/sspListPage";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到列表页我发布
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPageMy")
|
||||
public String goListPageMy(@RequestParam Map<String, Object> map , HttpSession HttpSession , Model Model) {
|
||||
Model.addAttribute("searchText", map.containsKey("searchText")?map.get("searchText").toString():"");
|
||||
Model.addAttribute("typeChangeText", map.containsKey("typeChangeText")?map.get("typeChangeText").toString():"");
|
||||
Model.addAttribute("flowText", map.containsKey("flowText")?map.get("flowText").toString():"");
|
||||
Model.addAttribute("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
Model.addAttribute("projectName", map.containsKey("projectName")?map.get("projectName").toString():HttpSession.getAttribute("projectName"));
|
||||
return prefix + "/sspListPageMy";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到列表页我发布2
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPageMy2")
|
||||
public String goListPageMy2(@RequestParam Map<String, Object> map , HttpSession HttpSession , Model Model) {
|
||||
Model.addAttribute("searchText", map.containsKey("searchText")?map.get("searchText").toString():"");
|
||||
Model.addAttribute("flowText", map.containsKey("flowText")?map.get("flowText").toString():"");
|
||||
Model.addAttribute("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
Model.addAttribute("projectName", map.containsKey("projectName")?map.get("projectName").toString():HttpSession.getAttribute("projectName"));
|
||||
return prefix + "/sspListPageMy2";
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转至质量留痕上报页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/goNickedSave")
|
||||
public String goNickedSave(String projectName, Model model, HttpSession session) {
|
||||
//项目id
|
||||
model.addAttribute("projectId",session.getAttribute("projectId"));
|
||||
//项目名称
|
||||
model.addAttribute("projectName", projectName);
|
||||
return prefix + "/reportWithmarks";
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转至质量留痕上报页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/goNickedSave2")
|
||||
public String goNickedSave2(HttpSession session, Model model, String projectName, String projectId) {
|
||||
String ZJUser = "";
|
||||
String ZJUserId = "";
|
||||
String ZJUserName = "";
|
||||
String ZJUserPhone = "";
|
||||
if(session.getAttribute("loginName") != null && !"".equals(session.getAttribute("loginName"))){
|
||||
String loginName = session.getAttribute("loginName").toString();
|
||||
Map<String,Object> user = pshService.queryUserInfo(loginName);
|
||||
if(user != null && user.size() > 0){
|
||||
ZJUser = user.get("user_name").toString() + "-" + user.get("login_name").toString();
|
||||
ZJUserId = user.get("user_id").toString();
|
||||
ZJUserName = user.get("user_name").toString();
|
||||
ZJUserPhone = user.get("login_name").toString();
|
||||
}
|
||||
}
|
||||
model.addAttribute("ZJUser",ZJUser);
|
||||
model.addAttribute("ZJUserId",ZJUserId);
|
||||
model.addAttribute("ZJUserName",ZJUserName);
|
||||
model.addAttribute("ZJUserPhone",ZJUserPhone);
|
||||
model.addAttribute("projectId",projectId != null && !"".equals(projectId)?projectId:session.getAttribute("projectId"));
|
||||
model.addAttribute("projectName", projectName);
|
||||
return prefix + "/reportWithmarks2";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到问题整改的页面
|
||||
* @author:
|
||||
* @date:2021/4/1&10:41
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goChangeSave")
|
||||
public String goChangeSave(String projectName, Model Model,HttpSession HttpSession) {
|
||||
//项目名称
|
||||
Model.addAttribute("projectName", projectName);
|
||||
SysUser sysUser = sysUserService.selectUserByUserName(Convert.toStr(HttpSession.getAttribute("loginName")));
|
||||
Model.addAttribute("recheckSend", sysUser.getNickName());
|
||||
Model.addAttribute("recheckSendUser", sysUser.getPhonenumber());
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
//当前时间基础上加3天默认为整改截至时间
|
||||
calendar.add(Calendar.DATE, 3);
|
||||
Model.addAttribute("nickedTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,calendar.getTime()));
|
||||
return prefix + "/sspChange";
|
||||
}
|
||||
|
||||
/********************************************************数据页面跳转************************************************/
|
||||
/**
|
||||
* @describe:跳转到待整改的页面
|
||||
* @author:
|
||||
* @date:2021/4/1&11:04
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goStayCheckPageMy")
|
||||
public Object goStayCheckPageMy(@RequestParam Map<String, Object> map, Model Model, HttpSession HttpSession) {
|
||||
map.put("loginUser", HttpSession.getAttribute("loginName"));
|
||||
Model.addAttribute("queryChangeNicked", pshService.queryChangeNicked(map));
|
||||
return prefix + "/myChanges";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到待审核的页面
|
||||
* @author:
|
||||
* @date:2021/4/1&11:04
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goStayCheckPage")
|
||||
public Object goStayCheckPage(@RequestParam Map<String, Object> map, Model Model, HttpSession HttpSession) {
|
||||
map.put("loginUser", HttpSession.getAttribute("loginName"));
|
||||
Model.addAttribute("queryChangeNicked", pshService.queryChangeNicked(map));
|
||||
return prefix + "/sspStayCheck";
|
||||
}
|
||||
|
||||
/**
|
||||
* 质量留痕记录审批详情页面
|
||||
* @param map
|
||||
* @param Model
|
||||
* @param HttpSession
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/sspQualityMarkDetail")
|
||||
public Object sspQualityMarkDetail(@RequestParam Map<String, Object> map, Model Model, HttpSession HttpSession) {
|
||||
map.put("loginUser", HttpSession.getAttribute("loginName"));
|
||||
Model.addAttribute("data", pshService.querySspQualityMarkInfo(map));
|
||||
return prefix + "/sspQualityMarkDetail";
|
||||
}
|
||||
|
||||
/**********************************************************数据接口*************************************************/
|
||||
/**
|
||||
* @describe:问题整改的列表接口
|
||||
* @author:
|
||||
* @date:2021/3/31&9:10
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/listSspInfoChanges")
|
||||
public Object listSspInfoChanges(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", HttpSession.getAttribute("projectId"));
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return pshService.listSspInfoChanges(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取质量留痕数据发布记录
|
||||
* @param map
|
||||
* @param HttpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getSspQualityMark")
|
||||
public Object getSspQualityMark(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return pshService.querySspQualityMarkList(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户提交的质量留痕数据发布记录
|
||||
* @param map
|
||||
* @param HttpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/getSspQualityMarkMy",method = RequestMethod.POST)
|
||||
public Object getSspQualityMarkMy(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return pshService.querySspQualityMarkMyList(map);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改,留痕上报)
|
||||
* @author:
|
||||
* @date:2021/3/31&9:12
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping(value = "/listSspInfoMyNicked")
|
||||
public Object listSspInfoMyNicked(@RequestParam Map<String, Object> map, HttpSession HttpSession, SspMarks sspMarks) {
|
||||
map.put("projectId", HttpSession.getAttribute("projectId"));
|
||||
map.put("createUser", HttpSession.getAttribute("loginName"));
|
||||
return pshService.listSspInfoNicked(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:新增整改的信息
|
||||
* @author:
|
||||
* @date:2021/4/1&17:19
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/saveChangeMy")
|
||||
public Object saveChangeMy(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("createUser", HttpSession.getAttribute("loginName"));
|
||||
return pshService.saveSspInfoChanges(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增留痕数据上报
|
||||
*
|
||||
* @param sspMarks
|
||||
* @param httpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/saveMarksMy", method = RequestMethod.POST)
|
||||
public Object saveMarksMy(@RequestBody SspMarks sspMarks, HttpSession httpSession) {
|
||||
sspMarks.setProjectId(Integer.parseInt(httpSession.getAttribute("projectId").toString()));
|
||||
sspMarks.setCreateUser(httpSession.getAttribute("loginName").toString());
|
||||
return sspMarksService.saveMarksAndMore(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 质量留痕数据提交
|
||||
*
|
||||
* @param jsonObject
|
||||
* @param httpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/saveQualityMark", method = RequestMethod.POST)
|
||||
public Map<String,Object> saveQualityMark(@RequestBody JSONObject jsonObject, HttpSession httpSession) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
jsonObject.put("create_user",httpSession.getAttribute("loginName")==null?"":httpSession.getAttribute("loginName").toString());
|
||||
if(sspMarksService.saveQualityMark(jsonObject) == 1){
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","提交成功");
|
||||
}else{
|
||||
resultMap.put("code","201");
|
||||
resultMap.put("msg","提交失败");
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @describe:七牛文件上传token
|
||||
* @author:
|
||||
* @date:2021/4/6&14:29
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getToken")
|
||||
public String getToken() { return QiniuUploadUtil.getToken();};
|
||||
|
||||
/**
|
||||
* @describe:查询用户列表
|
||||
* @author:
|
||||
* @date:2021/4/6&18:02
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/queryUserInfo")
|
||||
@ResponseBody
|
||||
public Object queryUserInfo(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
map.put("projectId", HttpSession.getAttribute("projectId"));
|
||||
return pshService.queryUserInfo(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目用户列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/queryUserList")
|
||||
@ResponseBody
|
||||
public Object queryUserList(@RequestBody Map<String, Object> map){
|
||||
return pshService.queryUserList(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/updateChange")
|
||||
public Object updateChange(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("createUser", HttpSession.getAttribute("loginName"));
|
||||
return pshService.updateState(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询留痕上报页面
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/listMarks")
|
||||
public Object listMarks(SspMarks sspMarks, HttpSession session) {
|
||||
sspMarks.setProjectId(Integer.parseInt(session.getAttribute("projectId").toString()));
|
||||
return sspMarksService.queryMarksList(sspMarks);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 回显质量留痕页面
|
||||
*
|
||||
* @param map
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/goMarksView")
|
||||
public Object goMarksView(@RequestParam Map<String, Object> map, Model model) {
|
||||
Map<String, Object> pictureMap = new HashMap<>();
|
||||
Map<String, Object> videoMap = new HashMap<>();
|
||||
SspMarks sspMarks = new SspMarks();
|
||||
sspMarks.setId(map.get("id").toString());
|
||||
sspMarks.setCheckState(map.get("numState").toString());
|
||||
SspMarks dbSSpMark = sspMarksService.selectSspMarksList(sspMarks).get(0);
|
||||
String marksPicture = dbSSpMark.getMarksPicture();
|
||||
if(StringUtils.isNotBlank(marksPicture)) {
|
||||
List<SspMarks> fileListPicture = sspMarksService.queryPicture(dbSSpMark);
|
||||
if(fileListPicture != null && fileListPicture.size() > 0) {
|
||||
pictureMap.put("fileListPictureState", "OK");
|
||||
pictureMap.put("fileListPicture", fileListPicture);
|
||||
} else {
|
||||
pictureMap.put("fileListPictureState", "NO");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(dbSSpMark.getMarksVideo())) {
|
||||
List<SspMarks> fileListVideo = sspMarksService.queryVideo(dbSSpMark);
|
||||
if(fileListVideo != null && fileListVideo.size() > 0) {
|
||||
videoMap.put("fileListVideoState", "OK");
|
||||
videoMap.put("fileListVideo", fileListVideo);
|
||||
} else {
|
||||
videoMap.put("fileListVideoState", "NO");
|
||||
}
|
||||
}
|
||||
model.addAttribute("dbSSpMark",dbSSpMark);
|
||||
model.addAttribute("pictureMap",pictureMap);
|
||||
model.addAttribute("videoMap",videoMap);
|
||||
return prefix + "/sspMarkView";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/sspQualityMarkApprove")
|
||||
public Object sspQualityMarkApprove(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return pshService.updateSspQualityMarkApprove(map);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取工程类型
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getProjectType")
|
||||
@ResponseBody
|
||||
public Object selectProjectTypeList(@RequestParam Map<String,Object> param){
|
||||
return pshService.selectProjectTypeList(param);
|
||||
}
|
||||
|
||||
@RequestMapping("/treesList")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getFatherNode(ProcessName processName) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 查询所有部门信息
|
||||
List<ProcessName> treesList = pshService.selectProcessName("0");
|
||||
List newTrees = new ArrayList();
|
||||
for (ProcessName department : treesList) {
|
||||
// 如果pId为0,则该节点为父节点
|
||||
if ((department.getParentCode().equals("0"))) {
|
||||
// 递归获取父节点下的子节点
|
||||
department.setList(getChildrenNode(department.getId(), treesList));
|
||||
newTrees.add(department);
|
||||
}
|
||||
}
|
||||
resultMap.put("children", newTrees);
|
||||
System.out.println(resultMap);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归获取子节点下的子节点
|
||||
* @param integer 父节点的ID
|
||||
* @param treesList 所有菜单树集合
|
||||
* @return
|
||||
*/
|
||||
private List<ProcessName> getChildrenNode(String integer, List<ProcessName> treesList) {
|
||||
List<ProcessName> newTrees = new ArrayList<ProcessName>();
|
||||
for (ProcessName department : treesList) {
|
||||
if ((department.getParentCode().equals("0"))) {
|
||||
continue;
|
||||
}
|
||||
if (department.getParentCode().equals(integer)) {
|
||||
// 递归获取子节点下的子节点,即设置树控件中的children
|
||||
department.setList(getChildrenNode(department.getId(), treesList));
|
||||
newTrees.add(department);
|
||||
}
|
||||
}
|
||||
return newTrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工程编码、名称
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectCodeFromSmark")
|
||||
@ResponseBody
|
||||
public Object selectCodeFromSmark(String projectId) {
|
||||
return pshService.querySmarkCode(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
@ResponseBody
|
||||
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("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,370 +0,0 @@
|
|||
package com.ruoyi.web.pshManage.mapper;
|
||||
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarkfileinfo;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarksflow;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName:sspMapper
|
||||
* @Description:随手拍的数据层
|
||||
* @Author:
|
||||
* @Date:2021/3/30 15:23
|
||||
* @version:V1.0
|
||||
*/
|
||||
@Repository
|
||||
public interface PshMapper {
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改,留痕上报)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listSspInfoMyNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:根据id查询相关基本信息
|
||||
* @author:
|
||||
* @date:2021/4/1&11:15
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryChangeNickedInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:根据id查询相关的文件
|
||||
* @author:
|
||||
* @date:2021/4/1&11:19
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listChangeNickedFile(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增问题整改主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增留痕上报主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspInfoNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改留痕上报主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int updateSmzSspProblemmodify(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增流程信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:27
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspAuditInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增文件信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:36
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspFileInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改状态
|
||||
* @author:
|
||||
* @date:2021/4/2&11:28
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int updateState(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改状态
|
||||
* @author:
|
||||
* @date:2021/4/2&11:28
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int updateStateOk(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询已整改的基本信息
|
||||
* @author:
|
||||
* @date:2021/4/6&9:57
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryOpinion(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询已整改的基本信息
|
||||
* @author:
|
||||
* @date:2021/4/6&9:57
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryOpinionChange(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询已整改的文件信息
|
||||
* @author:
|
||||
* @date:2021/4/6&9:59
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listOpinionFile(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询人员的信息
|
||||
* @author:
|
||||
* @date:2021/4/6&17:18
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listUserInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 根据用户账号查询用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> queryUserInfo(String loginName);
|
||||
|
||||
/**
|
||||
* 获取项目用户列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> queryUserList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询负责人的项目归属
|
||||
* @author:
|
||||
* @date:2021/4/6&17:24
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryUserProjectInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:添加驳回的审核意见
|
||||
* @author:
|
||||
* @date:2021/4/7&15:35
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspAuditInfoReject(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:添加通过的审核意见
|
||||
* @author:
|
||||
* @date:2021/4/7&15:35
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspAuditInfoPass(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询当前审核流程的信息
|
||||
* @author:
|
||||
* @date:2021/4/7&16:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryAuditInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询驳回信息
|
||||
* @author:
|
||||
* @date:2021/4/7&16:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public String queryRejectInfo(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询N次提交的图片信息
|
||||
* @author:
|
||||
* @date:2021/4/7&17:18
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listRejectFile(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* 新增留痕上报流程
|
||||
*
|
||||
* @param sspMarksflow
|
||||
* @return
|
||||
*/
|
||||
int saveSspMarkFlow(SspMarksflow sspMarksflow);
|
||||
|
||||
/**
|
||||
* 新增留痕审批文件
|
||||
*
|
||||
* @param sspMarkfileinfo
|
||||
* @return
|
||||
*/
|
||||
int saveMarkFileInfo(SspMarkfileinfo sspMarkfileinfo);
|
||||
|
||||
|
||||
/**
|
||||
* 根据type获取url
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> queryFileInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕数据发布记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> querySspQualityMarkList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取当前用户提交的质量留痕数据发布记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> querySspQualityMarkMyList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕记录详情
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> querySspQualityMarkInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕审批流下一个待审批账号
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
String querySspQualityMarkApproveNextLoginName(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕审批流待审批数量
|
||||
*/
|
||||
int querySspQualityMarkToBeApprovedNum(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新隐蔽工程留痕记录审批流审批状态
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updateSspQualityMarkApproveState(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新隐蔽工程留痕记录审批状态
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updateSspQualityMarkState(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询工程类型列表
|
||||
*
|
||||
* @param projectType 工程类型信息
|
||||
* @return 工程类型集合
|
||||
*/
|
||||
public List<Map<String,Object>> selectProjectTypeList(Map<String,Object> projectType);
|
||||
|
||||
/**
|
||||
* 查询关键工序名称列表
|
||||
*
|
||||
* @param isDel
|
||||
* @return
|
||||
*/
|
||||
List<ProcessName> selectProcessName(String isDel);
|
||||
|
||||
/**
|
||||
* 根据入工区编码, 查询工程编码
|
||||
*
|
||||
* @param proId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> selectCodeFromSmark(String proId);
|
||||
|
||||
/**
|
||||
* 查询项目用户信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> queryProjectUserinfo(Map<String,Object> map);
|
||||
}
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
package com.ruoyi.web.pshManage.service;
|
||||
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName:SspService
|
||||
* @Description:随手拍服务层
|
||||
* @Author:
|
||||
* @Date:2021/3/30 17:03
|
||||
* @version:V1.0
|
||||
*/
|
||||
public interface IPshService {
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> listSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(留痕上报)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Object listSspInfoNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询审批流的信息
|
||||
* @author:
|
||||
* @date:2021/4/1&11:49
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryChangeNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增问题整改主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public String saveSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询人员的信息
|
||||
* @author:
|
||||
* @date:2021/4/6&17:26
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> queryUserInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 根据用户账号查询用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> queryUserInfo(String loginName);
|
||||
|
||||
/**
|
||||
* 获取项目用户列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> queryUserList(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Object updateState(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕数据发布记录
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> querySspQualityMarkList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取当前用户提交的质量留痕数据发布记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> querySspQualityMarkMyList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕记录详情
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> querySspQualityMarkInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 隐蔽工程留痕记录审批
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> updateSspQualityMarkApprove(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询工程类型列表
|
||||
*
|
||||
* @param projectType 工程类型信息
|
||||
* @return 工程类型集合
|
||||
*/
|
||||
public List<Map<String,Object>> selectProjectTypeList(Map<String,Object> projectType);
|
||||
|
||||
/**
|
||||
* 查询关键工序名称列表
|
||||
*
|
||||
* @param isDel
|
||||
* @return
|
||||
*/
|
||||
List<ProcessName> selectProcessName(String isDel);
|
||||
|
||||
/**
|
||||
* 根据入参查询智能公司工区名称、工区编号
|
||||
*
|
||||
* @param proId
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> querySmarkCode(String proId);
|
||||
}
|
||||
|
|
@ -1,565 +0,0 @@
|
|||
package com.ruoyi.web.pshManage.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.QiniuBase64UploadUtil;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.web.projectInfo.mapper.WxProjectInfoMapper;
|
||||
import com.ruoyi.web.pshManage.mapper.PshMapper;
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
import com.ruoyi.web.userLogin.mapper.WxUserLoginMapper;
|
||||
import com.ruoyi.web.utils.MultipartFileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName:ISspServiceImpl
|
||||
* @Description:TODO
|
||||
* @Author:
|
||||
* @Date:2021/3/30 17:04
|
||||
* @version:V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PshServiceImpl implements IPshService {
|
||||
|
||||
@Autowired
|
||||
private PshMapper pshMapper;
|
||||
|
||||
@Autowired
|
||||
private WxUserLoginMapper wxUserLoginMapper;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Autowired
|
||||
private WxProjectInfoMapper wxProjectInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Map<String, Object> listSspInfoChanges(Map<String, Object> map) {
|
||||
//返回
|
||||
Map<String, Object> resultMap = new HashMap<>(16);
|
||||
/**
|
||||
* 根据获取的用户信息和项目id进行判断是抄送还是主送
|
||||
* showState
|
||||
* 主送状态0
|
||||
* 抄送状态1
|
||||
* */
|
||||
|
||||
String thisUser = map.get("loginName").toString();
|
||||
String projectName = "";
|
||||
//查询问题整改数据(发布记录)
|
||||
List<Map<String, Object>> allChangesInfo = pshMapper.listSspInfoChanges(map);
|
||||
if(allChangesInfo != null && allChangesInfo.size() > 0) {
|
||||
//循环数据,判断加主送抄送状态
|
||||
for (int i = 0; i < allChangesInfo.size(); i++) {
|
||||
Map<String, Object> infoMap = allChangesInfo.get(i);
|
||||
//主送人
|
||||
String lordSendUser = infoMap.get("lordSentUser").toString();
|
||||
if(thisUser.equals(lordSendUser)) {
|
||||
//待办的
|
||||
infoMap.put("showState","0");
|
||||
} else {
|
||||
//抄送的
|
||||
infoMap.put("showState","1");
|
||||
}
|
||||
projectName = infoMap.get("projectName").toString();
|
||||
}
|
||||
}
|
||||
//查询问题整改数据(我的发布)
|
||||
//(0问题整改, 1质量留痕)
|
||||
|
||||
/**
|
||||
* 如果没有选择默认是问题整改
|
||||
*/
|
||||
if(StringUtils.isBlank(map.get("infoType").toString())) {
|
||||
map.put("infoType", "0");
|
||||
}
|
||||
List<Map<String, Object>> allNickedInfo = pshMapper.listSspInfoMyNicked(map);
|
||||
if(allNickedInfo != null && allNickedInfo.size() > 0) {
|
||||
//循环数据,判断加主送抄送状态
|
||||
for (int i = 0; i < allNickedInfo.size(); i++) {
|
||||
Map<String, Object> infoMap = allNickedInfo.get(i);
|
||||
String lordSendUser = infoMap.get("lordSentUser").toString();
|
||||
if(thisUser.equals(lordSendUser)) {
|
||||
//待办理
|
||||
infoMap.put("showState","0");
|
||||
} else {
|
||||
//抄送的
|
||||
infoMap.put("showState","1");
|
||||
}
|
||||
}
|
||||
}
|
||||
//工程名称
|
||||
resultMap.put("projectName", projectName);
|
||||
//发布记录
|
||||
resultMap.put("allChangesInfo", allChangesInfo);
|
||||
//我的发布
|
||||
resultMap.put("allNickedInfo", allNickedInfo);
|
||||
//发布记录数量
|
||||
resultMap.put("allChangesInfoSize", allChangesInfo != null?allChangesInfo.size():0);
|
||||
//我的发布数量
|
||||
resultMap.put("allNickedInfoSize", allNickedInfo != null?allNickedInfo.size():0);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(留痕上报[问题整改我发起的])
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public Object listSspInfoNicked(Map<String, Object> map) {
|
||||
String result = "NO";
|
||||
//根据infoTy判断是问题整改或者是留痕上报
|
||||
//String infoType = map.get("infoType").toString();
|
||||
if(true) {
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
dataMap.put("loginName",map.get("createUser"));
|
||||
//问题整改
|
||||
Map<String,Object> deptMap = wxProjectInfoMapper.selectDeptByUserName(Convert.toStr(map.get("createUser")));
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
String roleType = "";
|
||||
if(DeptTypeEnum.JTGS.getCode().equals(deptMap.get("type_flag"))){
|
||||
List<Map<String,Object>> datalist = pshMapper.queryProjectUserinfo(map);
|
||||
if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && PublicStateEnum.USERTYPE_JFJL.getCode().equals(datalist.get(0).get("job_type"))){
|
||||
//说明是甲方经理
|
||||
roleType = DeptTypeEnum.JFDBTYPE.getCode();
|
||||
}else{
|
||||
roleType = DeptTypeEnum.JTGSTYPE.getCode();
|
||||
}
|
||||
}else if(DeptTypeEnum.ZGS.getCode().equals(deptMap.get("type_flag"))){
|
||||
List<Map<String,Object>> datalist = pshMapper.queryProjectUserinfo(map);
|
||||
if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && PublicStateEnum.USERTYPE_JFJL.getCode().equals(datalist.get(0).get("job_type"))){
|
||||
//说明是甲方经理
|
||||
roleType = DeptTypeEnum.JFDBTYPE.getCode();
|
||||
}else{
|
||||
roleType = DeptTypeEnum.ZGSTYPE.getCode();
|
||||
}
|
||||
}else if(DeptTypeEnum.JLDW.getCode().equals(deptMap.get("type_flag"))){
|
||||
roleType = DeptTypeEnum.JLDWTYPE.getCode();
|
||||
}else if(DeptTypeEnum.ZBDW.getCode().equals(deptMap.get("type_flag"))){
|
||||
roleType = DeptTypeEnum.ZBDWTYPE.getCode();
|
||||
}else if(DeptTypeEnum.FBDW.getCode().equals(deptMap.get("type_flag"))){
|
||||
roleType = DeptTypeEnum.FBDWTYPE.getCode();
|
||||
}
|
||||
map.put("roleType",roleType);
|
||||
/**
|
||||
* 基本信息入库
|
||||
* 图片 视频入库
|
||||
* 添加对应的审批流
|
||||
* */
|
||||
//基本信息
|
||||
map.put("nickedTime", DateUtils.parseDate(map.get("nickedTime")));
|
||||
int a = pshMapper.saveSspInfoChanges(map);
|
||||
//审批流创建
|
||||
map.put("mainId", map.get("id"));
|
||||
map.put("processState", "1");
|
||||
updateMap.put("id",map.get("id"));
|
||||
int b = pshMapper.saveSspAuditInfo(map);
|
||||
//图片
|
||||
int c = 0;
|
||||
JSONArray JSONArray = com.alibaba.fastjson.JSONArray.parseArray(map.get("imgSrc").toString());
|
||||
String smarkUrl="";
|
||||
for (int i = 0; i < JSONArray.size(); i++) {
|
||||
//String name = "sspImg-"+ UUID.randomUUID()+".jpg";
|
||||
String objImg64 = JSONArray.get(i).toString();
|
||||
String imgBase64One = objImg64.substring(0, objImg64.indexOf(","));
|
||||
//String imgBase64 = objImg64.substring(imgBase64One.length()+1, objImg64.length());
|
||||
Map<String, Object> imgMap = new HashMap<>();
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
//imgMap.put("fileUrl",fileName);
|
||||
//imgMap = new QiniuBase64UploadUtil().put64image(imgBase64, name);
|
||||
smarkUrl+=","+fileName;
|
||||
imgMap.put("fileUrl", fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
imgMap.put("auditId", map.get("auditId"));
|
||||
imgMap.put("fileType", "0");
|
||||
//imgMap.put("fileUrl", imgMap.get("url"));
|
||||
imgMap.put("createUser", map.get("createUser"));
|
||||
c = pshMapper.saveSspFileInfo(imgMap);
|
||||
}
|
||||
//视频
|
||||
if(!"".equals(map.get("videoUrl").toString())) {
|
||||
Map<String, Object> fileArgsMap = new HashMap<>(16);
|
||||
fileArgsMap.put("auditId", map.get("auditId"));
|
||||
fileArgsMap.put("createUser", map.get("createUser"));
|
||||
fileArgsMap.put("fileType", "1");
|
||||
fileArgsMap.put("fileUrl", map.get("videoUrl"));
|
||||
updateMap.put("marksVideo",map.get("videoUrl"));
|
||||
pshMapper.saveSspFileInfo(fileArgsMap);
|
||||
}
|
||||
smarkUrl = smarkUrl.substring(1);
|
||||
updateMap.put("marksPicture",smarkUrl.split(",")[0]);
|
||||
updateMap.put("smarkUrl",smarkUrl);
|
||||
pshMapper.updateSmzSspProblemmodify(updateMap);
|
||||
if(a > 0 && b > 0 && c > 0) {
|
||||
result = "OK";
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryChangeNicked(Map<String, Object> map) {
|
||||
//基本信息
|
||||
Map<String, Object> ChangeNickedInfo = pshMapper.queryChangeNickedInfo(map);
|
||||
//获取流程的id,请求相关的文件信息
|
||||
map.put("auditId",ChangeNickedInfo.get("checkId"));
|
||||
map.put("fileType","0");
|
||||
//图片
|
||||
List<Map<String, Object>> fileListImg = pshMapper.listChangeNickedFile(map);
|
||||
if(fileListImg != null && fileListImg.size() > 0) {
|
||||
ChangeNickedInfo.put("fileListImgState", "OK");
|
||||
ChangeNickedInfo.put("fileListImg", fileListImg);
|
||||
} else {
|
||||
ChangeNickedInfo.put("fileListImgState", "NO");
|
||||
ChangeNickedInfo.put("fileListImg", new ArrayList<>());
|
||||
}
|
||||
//视频
|
||||
//map.put("fileType","1");
|
||||
//List<Map<String, Object>> fileListVideo = pshMapper.listChangeNickedFile(map);
|
||||
//if(fileListVideo != null && fileListVideo.size() > 0) {
|
||||
// ChangeNickedInfo.put("fileListVideoState", "OK");
|
||||
// ChangeNickedInfo.put("fileListVideo", fileListVideo);
|
||||
//} else {
|
||||
ChangeNickedInfo.put("fileListVideoState", "NO");
|
||||
//}
|
||||
//审核流程的信息 查询状态为0的信息 基本信息和文件信息 当前审批流是否存在驳回
|
||||
Map<String, Object> opinionMap;
|
||||
if("2".equals(map.get("numState").toString()) || "3".equals(map.get("numState").toString())) {
|
||||
opinionMap = pshMapper.queryOpinionChange(map);
|
||||
} else {
|
||||
opinionMap = pshMapper.queryOpinion(map);
|
||||
}
|
||||
ChangeNickedInfo.put("opinion", opinionMap.get("opinion")==null?"":opinionMap.get("opinion"));
|
||||
ChangeNickedInfo.put("opinionCreateTime", opinionMap.get("opinionCreateTime"));
|
||||
|
||||
/*****************************************************驳回判断**************************************************/
|
||||
//当前审核信息状态
|
||||
Map<String, Object> auditInfoMap = pshMapper.queryAuditInfo(map);
|
||||
//是否有驳回
|
||||
String rejectInfo = pshMapper.queryRejectInfo(map);
|
||||
if(("0".equals(auditInfoMap.get("processState")) || !auditInfoMap.containsKey("processState")) && rejectInfo == null) {
|
||||
//初始审核状态
|
||||
List<Map<String, Object>> opinionFileUrl = pshMapper.listOpinionFile(map);
|
||||
if(opinionFileUrl != null && opinionFileUrl.size() > 0) {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "OK");
|
||||
ChangeNickedInfo.put("opinionFileUrl", opinionFileUrl);
|
||||
ChangeNickedInfo.put("rejectState", "NO");
|
||||
} else {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
ChangeNickedInfo.put("rejectState", "NO");
|
||||
}
|
||||
} else if("0".equals(auditInfoMap.get("processState")) && rejectInfo != null) {
|
||||
//被驳回的状态 以N次提交
|
||||
map.put("id", auditInfoMap.get("id"));
|
||||
List<Map<String, Object>> opinionFileUrl = pshMapper.listRejectFile(map);
|
||||
if(opinionFileUrl != null && opinionFileUrl.size() > 0) {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "OK");
|
||||
ChangeNickedInfo.put("opinionFileUrl", opinionFileUrl);
|
||||
ChangeNickedInfo.put("rejectState", "OK");
|
||||
ChangeNickedInfo.put("rejectInfo", rejectInfo);
|
||||
} else {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
ChangeNickedInfo.put("rejectState", "OK");
|
||||
ChangeNickedInfo.put("rejectInfo", rejectInfo);
|
||||
}
|
||||
} else if("2".equals(auditInfoMap.get("processState")) && rejectInfo != null) {
|
||||
//被驳回且没有再次上传
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
ChangeNickedInfo.put("rejectState", "OK");
|
||||
ChangeNickedInfo.put("rejectInfo", rejectInfo);
|
||||
}else{
|
||||
ChangeNickedInfo.put("rejectState", "NO");
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
}
|
||||
|
||||
/**************************************************************************************************************/
|
||||
if(map.get("loginUser").equals(ChangeNickedInfo.get("recheckSendUser"))) {
|
||||
ChangeNickedInfo.put("checkUserState", "OK");
|
||||
} else {
|
||||
ChangeNickedInfo.put("checkUserState", "NO");
|
||||
}
|
||||
ChangeNickedInfo.put("numState", map.get("numState"));
|
||||
return ChangeNickedInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:新增问题整改主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public String saveSspInfoChanges(Map<String, Object> map) {
|
||||
//修改信息表的状态
|
||||
map.put("tableName", "smz_ssp_problemmodify");
|
||||
map.put("fieldName", "checkState");
|
||||
map.put("checkState", "1");
|
||||
map.put("keySet", "id");
|
||||
int a = pshMapper.updateState(map);
|
||||
//审批信息入库
|
||||
map.put("mainId", map.get("id"));
|
||||
map.put("opinion", map.get("opinion"));
|
||||
map.put("processState", "0");
|
||||
int b = pshMapper.saveSspAuditInfo(map);
|
||||
int c = 0;
|
||||
//图片入库
|
||||
JSONArray JSONArray = com.alibaba.fastjson.JSONArray.parseArray(map.get("imgSrc").toString());
|
||||
for (int i = 0; i < JSONArray.size(); i++) {
|
||||
//String name = "sspImg-"+ UUID.randomUUID()+".jpg";
|
||||
String objImg64 = JSONArray.get(i).toString();
|
||||
String imgBase64One = objImg64.substring(0, objImg64.indexOf(","));
|
||||
//String imgBase64 = objImg64.substring(imgBase64One.length()+1, objImg64.length());
|
||||
Map<String, Object> imgMap = new HashMap<>();
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
//imgMap = new QiniuBase64UploadUtil().put64image(imgBase64, name);
|
||||
imgMap.put("fileUrl", fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
imgMap.put("auditId", map.get("auditId"));
|
||||
imgMap.put("fileType", "0");
|
||||
//imgMap.put("fileUrl", imgMap.get("url"));
|
||||
imgMap.put("createUser", map.get("createUser"));
|
||||
c = pshMapper.saveSspFileInfo(imgMap);
|
||||
}
|
||||
if(a > 0 && b > 0 && c > 0) {
|
||||
return "OK";
|
||||
}
|
||||
return "NO";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:查询人员的信息
|
||||
* @author:
|
||||
* @date:2021/4/6&17:26
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryUserInfo(Map<String, Object> map) {
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
//查询所属项目
|
||||
Map<String, Object> userMap = pshMapper.queryUserProjectInfo(map);
|
||||
//查询相关人员
|
||||
List<Map<String, Object>> userInfoList = pshMapper.listUserInfo(map);
|
||||
if(userInfoList != null && userInfoList.size() > 0) {
|
||||
userMap.put("people", userInfoList);
|
||||
}
|
||||
resultList.add(userMap);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryUserInfo(String loginName) {
|
||||
return pshMapper.queryUserInfo(loginName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryUserList(Map<String, Object> map) {
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
Map<String,Object> user = new HashMap<>();
|
||||
List<Map<String, Object>> userList = pshMapper.queryUserList(map);
|
||||
if(userList != null && userList.size() > 0){
|
||||
user.put("people",userList);
|
||||
}
|
||||
resultList.add(user);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public Object updateState(Map<String, Object> map) {
|
||||
/**
|
||||
* 根据状态修改
|
||||
* 4通过
|
||||
* 3为驳回
|
||||
* */
|
||||
int code = 0;
|
||||
int codeA = 0;
|
||||
if("4".equals(map.get("checkState").toString())) {
|
||||
//通过 修改主表状态 为通过
|
||||
map.put("tableName", "smz_ssp_problemmodify");
|
||||
map.put("fieldName", "checkState");
|
||||
map.put("checkState", map.get("checkState"));
|
||||
map.put("keySet", "id");
|
||||
code = pshMapper.updateStateOk(map);
|
||||
//添加通过意见
|
||||
Map<String, Object> rejectMap = new HashMap<>(16);
|
||||
rejectMap.put("mainId", map.get("id"));
|
||||
rejectMap.put("opinion", map.get("opinion"));
|
||||
rejectMap.put("createUser", map.get("createUser"));
|
||||
codeA = pshMapper.saveSspAuditInfoPass(rejectMap);
|
||||
} else {
|
||||
//驳回 修改主表状态 待整改 添加审核流程驳回意见
|
||||
map.put("tableName", "smz_ssp_problemmodify");
|
||||
map.put("fieldName", "checkState");
|
||||
map.put("checkState", "0");
|
||||
map.put("keySet", "id");
|
||||
code = pshMapper.updateState(map);
|
||||
//添加驳回意见
|
||||
Map<String, Object> rejectMap = new HashMap<>(16);
|
||||
rejectMap.put("mainId", map.get("id"));
|
||||
rejectMap.put("opinion", map.get("opinion"));
|
||||
rejectMap.put("createUser", map.get("createUser"));
|
||||
codeA = pshMapper.saveSspAuditInfoReject(rejectMap);
|
||||
}
|
||||
return code + codeA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySspQualityMarkList(Map<String, Object> map) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<Map<String,Object>> list = pshMapper.querySspQualityMarkList(map);
|
||||
List<Map<String,Object>> list_my = pshMapper.querySspQualityMarkMyList(map);
|
||||
resultMap.put("list",list);
|
||||
resultMap.put("list_num",list != null?list.size():0);
|
||||
resultMap.put("list_my_num",list_my != null?list_my.size():0);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySspQualityMarkMyList(Map<String, Object> map) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<Map<String,Object>> list = pshMapper.querySspQualityMarkList(map);
|
||||
List<Map<String,Object>> list_my = pshMapper.querySspQualityMarkMyList(map);
|
||||
resultMap.put("list",list_my);
|
||||
resultMap.put("list_num",list != null?list.size():0);
|
||||
resultMap.put("list_my_num",list_my != null?list_my.size():0);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySspQualityMarkInfo(Map<String, Object> map) {
|
||||
Map<String,Object> data = pshMapper.querySspQualityMarkInfo(map);
|
||||
String[] arr;
|
||||
if(data.containsKey("before_imgs") && !"".equals(data.get("before_imgs"))){
|
||||
arr = data.get("before_imgs").toString().split(",");
|
||||
data.put("before_imgs",arr);
|
||||
}
|
||||
if(data.containsKey("after_imgs") && !"".equals(data.get("after_imgs"))){
|
||||
arr = data.get("after_imgs").toString().split(",");
|
||||
data.put("after_imgs",arr);
|
||||
}
|
||||
int approve_state = 0;//(0:不可审批;1:可审批)
|
||||
if(Integer.parseInt(data.get("state").toString()) == 0){//待审批
|
||||
String next_approve_login_name = pshMapper.querySspQualityMarkApproveNextLoginName(map);
|
||||
String loginUser = map.containsKey("loginUser")?map.get("loginUser").toString():"";
|
||||
if(next_approve_login_name != null && next_approve_login_name.equals(loginUser)){
|
||||
approve_state = 1;
|
||||
}
|
||||
}
|
||||
data.put("approve_state",approve_state);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateSspQualityMarkApprove(Map<String, Object> map) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
if("2".equals(map.get("state").toString())){//驳回
|
||||
if(pshMapper.updateSspQualityMarkApproveState(map) == 1){
|
||||
if(pshMapper.updateSspQualityMarkState(map) == 1){
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","审批成功!");
|
||||
}
|
||||
}
|
||||
}else if("1".equals(map.get("state").toString())){//通过
|
||||
if(pshMapper.updateSspQualityMarkApproveState(map) == 1){
|
||||
if(pshMapper.querySspQualityMarkToBeApprovedNum(map) == 0){
|
||||
if(pshMapper.updateSspQualityMarkState(map) == 1){
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","审批成功!");
|
||||
}else{
|
||||
resultMap.put("code","201");
|
||||
resultMap.put("msg","审批失败!");
|
||||
}
|
||||
}else{
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","审批成功!");
|
||||
}
|
||||
}else {
|
||||
resultMap.put("code","201");
|
||||
resultMap.put("msg","审批失败!");
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectProjectTypeList(Map<String, Object> projectType) {
|
||||
return pshMapper.selectProjectTypeList(projectType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProcessName> selectProcessName(String isDel) {
|
||||
return pshMapper.selectProcessName(isDel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySmarkCode(String proId) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
List<Map<String, Object>> ponitCode = pshMapper.selectCodeFromSmark(proId);
|
||||
if(ponitCode.size() > 0 || ponitCode != null) {
|
||||
returnMap.put("code", "200");
|
||||
returnMap.put("msg", "查询成功");
|
||||
returnMap.put("ponitCode", ponitCode);
|
||||
} else {
|
||||
returnMap.put("code", "100");
|
||||
returnMap.put("msg", "请检查参数");
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
package com.ruoyi.web.pshMarks.mapper;
|
||||
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarkfileinfo;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报 数据层
|
||||
*
|
||||
* @author gwb
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
@Repository
|
||||
public interface PshMarksMapper
|
||||
{
|
||||
/**
|
||||
* 查询随手拍留痕上报信息
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 随手拍留痕上报信息
|
||||
*/
|
||||
public SspMarks selectSspMarksById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报列表
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 随手拍留痕上报集合
|
||||
*/
|
||||
public List<SspMarks> selectSspMarksList(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 新增随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 修改随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 删除随手拍留痕上报
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSspMarksById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除随手拍留痕上报
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSspMarksByIds(String[] ids);
|
||||
|
||||
|
||||
int addSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryPicture(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryVideo(SspMarks sspMarks);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarkfileinfo> queryPictureUrl(SspMarkfileinfo sspMarkfileinfo);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 视频
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarkfileinfo> queryVideoUrl(SspMarkfileinfo sspMarkfileinfo);
|
||||
|
||||
/**
|
||||
* 更新图片
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updatePicture(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新视频
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updateVideo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新智能公司数据
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updateSmarkUrl(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据审核状态查询
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryByCheckState(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据id查询留痕信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SspMarks queryById(String id);
|
||||
|
||||
/**
|
||||
* 新增质量留痕提交记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int insertSspQualityMark(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 新增质量留痕审批流
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int insertSspQualityMarkApprove(Map<String,Object> map);
|
||||
}
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
package com.ruoyi.web.pshMarks.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报 服务层
|
||||
*
|
||||
* @author mkl
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
public interface IPshMarksService
|
||||
{
|
||||
/**
|
||||
* 查询随手拍留痕上报信息
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 随手拍留痕上报信息
|
||||
*/
|
||||
public SspMarks selectSspMarksById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报列表
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 随手拍留痕上报集合
|
||||
*/
|
||||
public List<SspMarks> selectSspMarksList(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 新增随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 修改随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 保存随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int saveSspMarks(SspMarks sspMarks);
|
||||
|
||||
|
||||
/**
|
||||
* 删除随手拍留痕上报信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSspMarksByIds(String ids);
|
||||
|
||||
|
||||
/**
|
||||
* 新增留痕数据上报
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
Object saveMarksAndMore(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 提交质量留痕记录
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
int saveQualityMark(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryPicture(SspMarks sspMarks);
|
||||
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryVideo(SspMarks sspMarks);
|
||||
|
||||
|
||||
/**
|
||||
* 查询留痕数据列表
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> queryMarksList(SspMarks sspMarks);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,403 +0,0 @@
|
|||
package com.ruoyi.web.pshMarks.service;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.web.pshMarks.mapper.PshMarksMapper;
|
||||
import com.ruoyi.web.sspManage.mapper.SspMapper;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarkfileinfo;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarksflow;
|
||||
import com.ruoyi.web.utils.MultipartFileUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报 服务层实现
|
||||
*
|
||||
* @author gwb
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
@Service
|
||||
public class PshMarksServiceImpl implements IPshMarksService
|
||||
{
|
||||
@Autowired
|
||||
private PshMarksMapper pshMarksMapper;
|
||||
|
||||
@Autowired
|
||||
private SspMapper sspMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报信息
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 随手拍留痕上报信息
|
||||
*/
|
||||
@Override
|
||||
public SspMarks selectSspMarksById(Integer id)
|
||||
{
|
||||
return pshMarksMapper.selectSspMarksById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报列表
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 随手拍留痕上报集合
|
||||
*/
|
||||
@Override
|
||||
public List<SspMarks> selectSspMarksList(SspMarks sspMarks)
|
||||
{
|
||||
return pshMarksMapper.selectSspMarksList(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSspMarks(SspMarks sspMarks)
|
||||
{
|
||||
return pshMarksMapper.insertSspMarks(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSspMarks(SspMarks sspMarks)
|
||||
{
|
||||
return pshMarksMapper.updateSspMarks(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int saveSspMarks(SspMarks sspMarks)
|
||||
{
|
||||
String id = sspMarks.getId();
|
||||
int rows = 0;
|
||||
if (StringUtils.isNotNull(id))
|
||||
{
|
||||
rows = pshMarksMapper.updateSspMarks(sspMarks);
|
||||
}
|
||||
else
|
||||
{
|
||||
rows = pshMarksMapper.insertSspMarks(sspMarks);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除随手拍留痕上报对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSspMarksByIds(String ids)
|
||||
{
|
||||
return pshMarksMapper.deleteSspMarksByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增留痕数据上报
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object saveMarksAndMore(SspMarks sspMarks) {
|
||||
String result = "NO";
|
||||
sspMarks.setMarksTime(sspMarks.getMarksTime() + ":00");
|
||||
String simpleUUID = IdUtil.simpleUUID();
|
||||
sspMarks.setId(simpleUUID);
|
||||
//基本信息
|
||||
int m = pshMarksMapper.addSspMarks(sspMarks);
|
||||
|
||||
//审批流创建, mainId取基本信息的id
|
||||
SspMarksflow sspMarksflow = new SspMarksflow();
|
||||
sspMarksflow.setMainId(sspMarks.getId());
|
||||
sspMarksflow.setCheckState(sspMarks.getCheckState());
|
||||
sspMarksflow.setMarksRemark(sspMarks.getMarksRemark());
|
||||
sspMarksflow.setCreateTime(sspMarks.getCreateDate());
|
||||
sspMarksflow.setCreateUser(sspMarks.getCreateUser());
|
||||
|
||||
int b = sspMapper.saveSspMarkFlow(sspMarksflow);
|
||||
//图片
|
||||
int c = 0;
|
||||
JSONArray JSONArray = com.alibaba.fastjson.JSONArray.parseArray(sspMarks.getMarksPicture());
|
||||
|
||||
for (int i = 0; i < JSONArray.size(); i++) {
|
||||
String name = "sspImg-"+ UUID.randomUUID()+".jpg";
|
||||
String objImg64 = JSONArray.get(i).toString();
|
||||
String imgBase64One = objImg64.substring(0, objImg64.indexOf(","));
|
||||
String imgBase64 = objImg64.substring(imgBase64One.length()+1, objImg64.length());
|
||||
SspMarkfileinfo sspMarkfileinfo = new SspMarkfileinfo();
|
||||
Map<String, Object> imgMap = null;
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
sspMarkfileinfo.setFileUrl(fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
sspMarkfileinfo.setFileType(0);
|
||||
sspMarkfileinfo.setCreateUser(sspMarks.getCreateUser());
|
||||
sspMarkfileinfo.setExternalId(sspMarksflow.getId());
|
||||
c = sspMapper.saveMarkFileInfo(sspMarkfileinfo);
|
||||
}
|
||||
//视频
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(sspMarks.getMarksVideo())) {
|
||||
SspMarkfileinfo sspMarkfileinfo = new SspMarkfileinfo();
|
||||
sspMarkfileinfo.setFileUrl(sspMarks.getMarksVideo());
|
||||
sspMarkfileinfo.setFileType(1);
|
||||
sspMarkfileinfo.setCreateUser(sspMarks.getCreateUser());
|
||||
sspMarkfileinfo.setExternalId(sspMarksflow.getId());
|
||||
sspMapper.saveMarkFileInfo(sspMarkfileinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图片、视频url
|
||||
*/
|
||||
SspMarkfileinfo sspMarkfileinfo = new SspMarkfileinfo();
|
||||
sspMarkfileinfo.setExternalId(sspMarksflow.getId());
|
||||
String picture = "";
|
||||
List<SspMarkfileinfo> sspMarkfileinfoList = pshMarksMapper.queryPictureUrl(sspMarkfileinfo);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < sspMarkfileinfoList.size(); i++) {
|
||||
sb.append(sspMarkfileinfoList.get(i).getFileUrl()).append(",");
|
||||
}
|
||||
picture = sb.toString().substring(0,sb.toString().length()-1);
|
||||
Map<String, Object> parmsMap = new HashMap<>();
|
||||
parmsMap.put("smarkUrl", picture);
|
||||
parmsMap.put("id", sspMarks.getId());
|
||||
pshMarksMapper.updateSmarkUrl(parmsMap);
|
||||
|
||||
parmsMap.put("picture", sspMarkfileinfoList.get(0).getFileUrl());
|
||||
//展示一张图片
|
||||
pshMarksMapper.updatePicture(parmsMap);
|
||||
|
||||
|
||||
List<SspMarkfileinfo> vidceoSspMark = pshMarksMapper.queryVideoUrl(sspMarkfileinfo);
|
||||
parmsMap.put("video", vidceoSspMark == null || vidceoSspMark.size() == 0?"":vidceoSspMark.get(0).getFileUrl());
|
||||
pshMarksMapper.updateVideo(parmsMap);
|
||||
if( m > 0 && b> 0 && c > 0) {
|
||||
result = "OK";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int saveQualityMark(JSONObject jsonObject) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("projectId",jsonObject.containsKey("projectId")?jsonObject.getString("projectId"):"");
|
||||
map.put("workTime",jsonObject.containsKey("workTime")?jsonObject.getString("workTime"):"");
|
||||
map.put("positionId",jsonObject.containsKey("projectGhId")?jsonObject.getString("projectGhId"):"");
|
||||
map.put("paragrapId",jsonObject.containsKey("projectPlaceId")?jsonObject.getString("projectPlaceId"):"");
|
||||
map.put("locationId",jsonObject.containsKey("projectLocationId")?jsonObject.getString("projectLocationId"):"");
|
||||
map.put("conclusion",jsonObject.containsKey("conclusion")?jsonObject.getString("conclusion"):"");
|
||||
map.put("szUser",jsonObject.containsKey("SZUser")?jsonObject.getString("SZUser"):"");
|
||||
map.put("zjUserId",jsonObject.containsKey("ZJUserId")?jsonObject.getString("ZJUserId"):"");
|
||||
map.put("zbUserId",jsonObject.containsKey("ZBUserId")?jsonObject.getString("ZBUserId"):"");
|
||||
map.put("jlUserId",jsonObject.containsKey("JLUserId")?jsonObject.getString("JLUserId"):"");
|
||||
map.put("createUser",jsonObject.containsKey("create_user")?jsonObject.getString("create_user"):"");
|
||||
String beforeImgs = "";
|
||||
String afterImgs = "";
|
||||
if(jsonObject.containsKey("beforeImgSrcList")){
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("beforeImgSrcList");
|
||||
if(jsonArray.size() > 0){
|
||||
for(int i = 0;i<jsonArray.size();i++){
|
||||
if(i==0){
|
||||
beforeImgs = jsonArray.getString(i);
|
||||
}else{
|
||||
beforeImgs += (","+jsonArray.getString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(jsonObject.containsKey("afterImgSrcList")){
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("afterImgSrcList");
|
||||
if(jsonArray.size() > 0){
|
||||
for(int i = 0;i<jsonArray.size();i++){
|
||||
if(i==0){
|
||||
afterImgs = jsonArray.getString(i);
|
||||
}else{
|
||||
afterImgs += (","+jsonArray.getString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("beforeImgs",beforeImgs);
|
||||
map.put("afterImgs",afterImgs);
|
||||
int i = pshMarksMapper.insertSspQualityMark(map);
|
||||
if(i == 1){
|
||||
int mark_id = Integer.parseInt(map.get("markId").toString());
|
||||
Map<String,Object> sp = new HashMap<>();
|
||||
sp.put("markId",mark_id);
|
||||
//总包审核人
|
||||
if(jsonObject.containsKey("ZBUserId")){
|
||||
sp.put("userId",jsonObject.getString("ZBUserId"));
|
||||
sp.put("userName",jsonObject.getString("ZBUserName"));
|
||||
sp.put("loginName",jsonObject.getString("ZBUserPhone"));
|
||||
sp.put("sort",1);
|
||||
pshMarksMapper.insertSspQualityMarkApprove(sp);
|
||||
}
|
||||
if(jsonObject.containsKey("JLUserId")){
|
||||
sp.put("userId",jsonObject.getString("JLUserId"));
|
||||
sp.put("userName",jsonObject.getString("JLUserName"));
|
||||
sp.put("loginName",jsonObject.getString("JLUserPhone"));
|
||||
sp.put("sort",2);
|
||||
pshMarksMapper.insertSspQualityMarkApprove(sp);
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流程表id 和文件类型查询图片
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SspMarks> queryPicture(SspMarks sspMarks) {
|
||||
|
||||
return pshMarksMapper.queryPicture(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 视频
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SspMarks> queryVideo(SspMarks sspMarks) {
|
||||
return pshMarksMapper.queryVideo(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询留痕上报列表
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> queryMarksList(SspMarks sspMarks) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String projectName = "";
|
||||
List<SspMarks> publishMarks = new ArrayList<>();
|
||||
List<SspMarks> publishMarksMy = new ArrayList<>();
|
||||
//审核通过
|
||||
if("4".equals(sspMarks.getCheckState())) {
|
||||
publishMarks = pshMarksMapper.selectSspMarksList(sspMarks);
|
||||
for(SspMarks dbSspMarks:publishMarks){
|
||||
projectName = dbSspMarks.getMarksLocation();
|
||||
}
|
||||
} else if("".equals(sspMarks.getCheckState()) ) {
|
||||
|
||||
/***
|
||||
* 初始化页面
|
||||
*/
|
||||
sspMarks.setCheckState("4");
|
||||
publishMarks = pshMarksMapper.selectSspMarksList(sspMarks);
|
||||
for(SspMarks dbSspMarks:publishMarks){
|
||||
projectName = dbSspMarks.getMarksLocation();
|
||||
}
|
||||
|
||||
Map<String, Object> noPassMap = new HashMap<>();
|
||||
noPassMap.put("checkState", "1");
|
||||
noPassMap.put("projectId", sspMarks.getProjectId());
|
||||
|
||||
Map<String, Object> daiPassMap = new HashMap<>();
|
||||
daiPassMap.put("checkState", "0");
|
||||
daiPassMap.put("projectId", sspMarks.getProjectId());
|
||||
//没通过
|
||||
List<SspMarks> noPass = pshMarksMapper.queryByCheckState(noPassMap);
|
||||
for(SspMarks npSspMarks:noPass) {
|
||||
publishMarksMy.add(npSspMarks);
|
||||
}
|
||||
//待通过
|
||||
List<SspMarks> daiPass = pshMarksMapper.queryByCheckState(daiPassMap);
|
||||
for(SspMarks daiPassSmark:daiPass) {
|
||||
publishMarksMy.add(daiPassSmark);
|
||||
}
|
||||
|
||||
} else if("-1".equals(sspMarks.getCheckState())) {
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
*/
|
||||
//未通过
|
||||
Map<String, Object> noPassMap = new HashMap<>();
|
||||
noPassMap.put("checkState", "1");
|
||||
noPassMap.put("positionPart", sspMarks.getPositionPart());
|
||||
noPassMap.put("projectId", sspMarks.getProjectId());
|
||||
|
||||
|
||||
Map<String, Object> daiPassMap = new HashMap<>();
|
||||
daiPassMap.put("checkState", "0");
|
||||
daiPassMap.put("positionPart", sspMarks.getPositionPart());
|
||||
daiPassMap.put("projectId", sspMarks.getProjectId());
|
||||
|
||||
//没通过
|
||||
List<SspMarks> noPass = pshMarksMapper.queryByCheckState(noPassMap);
|
||||
for(SspMarks npSspMarks:noPass) {
|
||||
publishMarksMy.add(npSspMarks);
|
||||
}
|
||||
//待通过
|
||||
List<SspMarks> daiPass = pshMarksMapper.queryByCheckState(daiPassMap);
|
||||
for(SspMarks daiPassSmark:daiPass) {
|
||||
publishMarksMy.add(daiPassSmark);
|
||||
}
|
||||
//获取项目名称
|
||||
for(SspMarks dbSspMarks:publishMarksMy){
|
||||
projectName = dbSspMarks.getMarksLocation();
|
||||
}
|
||||
} else {
|
||||
if("0".equals(sspMarks.getCheckState()) || "1".equals(sspMarks.getCheckState())) {
|
||||
//待审核,审核通过
|
||||
publishMarksMy = pshMarksMapper.selectSspMarksList(sspMarks);
|
||||
for(SspMarks dbPublishMarksMy:publishMarksMy){
|
||||
projectName = dbPublishMarksMy.getMarksLocation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//项目地点
|
||||
returnMap.put("projectName", projectName);
|
||||
//发布列表
|
||||
returnMap.put("publishMarks", publishMarks);
|
||||
//发布列表数量
|
||||
returnMap.put("publishMarksSize", publishMarks.size());
|
||||
|
||||
//我的发布列表
|
||||
returnMap.put("publishMarksMy", publishMarksMy);
|
||||
//我的发布列表数量
|
||||
returnMap.put("publishMarksMySize", publishMarksMy.size());
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,582 +0,0 @@
|
|||
package com.ruoyi.web.sspManage.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.QiniuUploadUtil;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.web.sspManage.service.ISspService;
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
import com.ruoyi.web.sspMarks.service.ISspMarksService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName:SspController
|
||||
* @Description:随手拍的控制层
|
||||
* @Author:
|
||||
* @Date:2021/3/31 9:08
|
||||
* @version:V1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/weixin/sspManage")
|
||||
@CrossOrigin(origins = "*",maxAge = 3600)
|
||||
public class SspController {
|
||||
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
|
||||
@Autowired
|
||||
private ISspService ISspService;
|
||||
|
||||
@Autowired
|
||||
private ISspMarksService sspMarksService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
private String prefix = "sspManage";
|
||||
|
||||
/**********************************************************页面跳转*************************************************/
|
||||
/**
|
||||
* @describe:跳转到列表初始化页
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPage")
|
||||
public String goListPage(@RequestParam Map<String, Object> map, HttpSession HttpSession, Model Model) {
|
||||
HttpSession.setAttribute("loginName", map.get("loginName").toString());
|
||||
HttpSession.setAttribute("projectId", map.get("projectId").toString());
|
||||
HttpSession.setAttribute("projectName", map.get("projectName").toString());
|
||||
|
||||
Model.addAttribute("projectId", map.get("projectId").toString());
|
||||
Model.addAttribute("projectName", map.get("projectName").toString());
|
||||
return prefix + "/sspListPage";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到列表页发布记录
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPageBack")
|
||||
public String goListPageBack(@RequestParam Map<String, Object> map , HttpSession HttpSession , Model Model) {
|
||||
Model.addAttribute("searchText", map.containsKey("searchText")?map.get("searchText").toString():"");
|
||||
Model.addAttribute("typeChangeText", map.containsKey("typeChangeText")?map.get("typeChangeText").toString():"");
|
||||
Model.addAttribute("flowText", map.containsKey("flowText")?map.get("flowText").toString():"");
|
||||
Model.addAttribute("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
Model.addAttribute("projectName", map.containsKey("projectName")?map.get("projectName").toString():HttpSession.getAttribute("projectName"));
|
||||
return prefix + "/sspListPage";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到列表页我发布
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPageMy")
|
||||
public String goListPageMy(@RequestParam Map<String, Object> map , HttpSession HttpSession , Model Model) {
|
||||
Model.addAttribute("searchText", map.containsKey("searchText")?map.get("searchText").toString():"");
|
||||
Model.addAttribute("typeChangeText", map.containsKey("typeChangeText")?map.get("typeChangeText").toString():"");
|
||||
Model.addAttribute("flowText", map.containsKey("flowText")?map.get("flowText").toString():"");
|
||||
Model.addAttribute("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
Model.addAttribute("projectName", map.containsKey("projectName")?map.get("projectName").toString():HttpSession.getAttribute("projectName"));
|
||||
return prefix + "/sspListPageMy";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到列表页我发布2
|
||||
* @author:
|
||||
* @date:2021/3/31&11:07
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goListPageMy2")
|
||||
public String goListPageMy2(@RequestParam Map<String, Object> map , HttpSession HttpSession , Model Model) {
|
||||
Model.addAttribute("searchText", map.containsKey("searchText")?map.get("searchText").toString():"");
|
||||
Model.addAttribute("flowText", map.containsKey("flowText")?map.get("flowText").toString():"");
|
||||
Model.addAttribute("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
Model.addAttribute("projectName", map.containsKey("projectName")?map.get("projectName").toString():HttpSession.getAttribute("projectName"));
|
||||
return prefix + "/sspListPageMy2";
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转至质量留痕上报页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/goNickedSave")
|
||||
public String goNickedSave(String projectName, Model model, HttpSession session) {
|
||||
//项目id
|
||||
model.addAttribute("projectId",session.getAttribute("projectId"));
|
||||
//项目名称
|
||||
model.addAttribute("projectName", projectName);
|
||||
return prefix + "/reportWithmarks";
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转至质量留痕上报页面
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/goNickedSave2")
|
||||
public String goNickedSave2(HttpSession session, Model model, String projectName, String projectId) {
|
||||
String ZJUser = "";
|
||||
String ZJUserId = "";
|
||||
String ZJUserName = "";
|
||||
String ZJUserPhone = "";
|
||||
if(session.getAttribute("loginName") != null && !"".equals(session.getAttribute("loginName"))){
|
||||
String loginName = session.getAttribute("loginName").toString();
|
||||
Map<String,Object> user = ISspService.queryUserInfo(loginName);
|
||||
if(user != null && user.size() > 0){
|
||||
ZJUser = user.get("user_name").toString() + "-" + user.get("login_name").toString();
|
||||
ZJUserId = user.get("user_id").toString();
|
||||
ZJUserName = user.get("user_name").toString();
|
||||
ZJUserPhone = user.get("login_name").toString();
|
||||
}
|
||||
}
|
||||
model.addAttribute("ZJUser",ZJUser);
|
||||
model.addAttribute("ZJUserId",ZJUserId);
|
||||
model.addAttribute("ZJUserName",ZJUserName);
|
||||
model.addAttribute("ZJUserPhone",ZJUserPhone);
|
||||
model.addAttribute("projectId",projectId != null && !"".equals(projectId)?projectId:session.getAttribute("projectId"));
|
||||
model.addAttribute("projectName", projectName);
|
||||
return prefix + "/reportWithmarks2";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到问题整改的页面
|
||||
* @author:
|
||||
* @date:2021/4/1&10:41
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goChangeSave")
|
||||
public String goChangeSave(String projectName, Model Model, HttpSession HttpSession) {
|
||||
//项目名称
|
||||
Model.addAttribute("projectName", projectName);
|
||||
SysUser sysUser = sysUserService.selectUserByUserName(Convert.toStr(HttpSession.getAttribute("loginName")));
|
||||
Model.addAttribute("recheckSend", sysUser.getNickName());
|
||||
Model.addAttribute("recheckSendUser", sysUser.getPhonenumber());
|
||||
Date date = new Date();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(date);
|
||||
//当前时间基础上加3天默认为整改截至时间
|
||||
calendar.add(Calendar.DATE, 3);
|
||||
Model.addAttribute("nickedTime", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,calendar.getTime()));
|
||||
return prefix + "/sspChange";
|
||||
}
|
||||
|
||||
/********************************************************数据页面跳转************************************************/
|
||||
/**
|
||||
* @describe:跳转到待整改的页面
|
||||
* @author:
|
||||
* @date:2021/4/1&11:04
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goStayCheckPageMy")
|
||||
public Object goStayCheckPageMy(@RequestParam Map<String, Object> map, Model Model, HttpSession HttpSession) {
|
||||
map.put("loginUser", HttpSession.getAttribute("loginName"));
|
||||
Model.addAttribute("queryChangeNicked", ISspService.queryChangeNicked(map));
|
||||
return prefix + "/myChanges";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:跳转到待审核的页面
|
||||
* @author:
|
||||
* @date:2021/4/1&11:04
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/goStayCheckPage")
|
||||
public Object goStayCheckPage(@RequestParam Map<String, Object> map, Model Model, HttpSession HttpSession) {
|
||||
map.put("loginUser", HttpSession.getAttribute("loginName"));
|
||||
Model.addAttribute("queryChangeNicked", ISspService.queryChangeNicked(map));
|
||||
return prefix + "/sspStayCheck";
|
||||
}
|
||||
|
||||
/**
|
||||
* 质量留痕记录审批详情页面
|
||||
* @param map
|
||||
* @param Model
|
||||
* @param HttpSession
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/sspQualityMarkDetail")
|
||||
public Object sspQualityMarkDetail(@RequestParam Map<String, Object> map, Model Model, HttpSession HttpSession) {
|
||||
map.put("loginUser", HttpSession.getAttribute("loginName"));
|
||||
Model.addAttribute("data", ISspService.querySspQualityMarkInfo(map));
|
||||
return prefix + "/sspQualityMarkDetail";
|
||||
}
|
||||
|
||||
/**********************************************************数据接口*************************************************/
|
||||
/**
|
||||
* @describe:问题整改的列表接口
|
||||
* @author:
|
||||
* @date:2021/3/31&9:10
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/listSspInfoChanges")
|
||||
public Object listSspInfoChanges(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", HttpSession.getAttribute("projectId"));
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.listSspInfoChanges(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取质量留痕数据发布记录
|
||||
* @param map
|
||||
* @param HttpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getSspQualityMark")
|
||||
public Object getSspQualityMark(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.querySspQualityMarkList(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户提交的质量留痕数据发布记录
|
||||
* @param map
|
||||
* @param HttpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getSspQualityMarkMy")
|
||||
public Object getSspQualityMarkMy(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", map.containsKey("projectId")?map.get("projectId").toString():HttpSession.getAttribute("projectId"));
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.querySspQualityMarkMyList(map);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改,留痕上报)
|
||||
* @author:
|
||||
* @date:2021/3/31&9:12
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping(value = "/listSspInfoMyNicked")
|
||||
public Object listSspInfoMyNicked(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("projectId", HttpSession.getAttribute("projectId"));
|
||||
map.put("createUser", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.listSspInfoNicked(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:新增整改的信息
|
||||
* @author:
|
||||
* @date:2021/4/1&17:19
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/saveChangeMy")
|
||||
public Object saveChangeMy(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("createUser", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.saveSspInfoChanges(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增留痕数据上报
|
||||
*
|
||||
* @param sspMarks
|
||||
* @param httpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/saveMarksMy", method = RequestMethod.POST)
|
||||
public Object saveMarksMy(@RequestBody SspMarks sspMarks, HttpSession httpSession) {
|
||||
sspMarks.setProjectId(Integer.parseInt(httpSession.getAttribute("projectId").toString()));
|
||||
sspMarks.setCreateUser(httpSession.getAttribute("loginName").toString());
|
||||
return sspMarksService.saveMarksAndMore(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 质量留痕数据提交
|
||||
*
|
||||
* @param jsonObject
|
||||
* @param httpSession
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "/saveQualityMark", method = RequestMethod.POST)
|
||||
public Map<String,Object> saveQualityMark(@RequestBody JSONObject jsonObject, HttpSession httpSession) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
jsonObject.put("create_user",httpSession.getAttribute("loginName")==null?"":httpSession.getAttribute("loginName").toString());
|
||||
if(sspMarksService.saveQualityMark(jsonObject) == 1){
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","提交成功");
|
||||
}else{
|
||||
resultMap.put("code","201");
|
||||
resultMap.put("msg","提交失败");
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @describe:七牛文件上传token
|
||||
* @author:
|
||||
* @date:2021/4/6&14:29
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/getToken")
|
||||
public String getToken() { return QiniuUploadUtil.getToken();};
|
||||
|
||||
/**
|
||||
* @describe:查询用户列表
|
||||
* @author:
|
||||
* @date:2021/4/6&18:02
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@RequestMapping("/queryUserInfo")
|
||||
@ResponseBody
|
||||
public Object queryUserInfo(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
map.put("projectId", HttpSession.getAttribute("projectId"));
|
||||
return ISspService.queryUserInfo(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目用户列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/queryUserList")
|
||||
@ResponseBody
|
||||
public Object queryUserList(@RequestBody Map<String, Object> map){
|
||||
return ISspService.queryUserList(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/updateChange")
|
||||
public Object updateChange(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("createUser", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.updateState(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询留痕上报页面
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/listMarks")
|
||||
public Object listMarks(SspMarks sspMarks, HttpSession session) {
|
||||
sspMarks.setProjectId(Integer.parseInt(session.getAttribute("projectId").toString()));
|
||||
return sspMarksService.queryMarksList(sspMarks);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 回显质量留痕页面
|
||||
*
|
||||
* @param map
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/goMarksView")
|
||||
public Object goMarksView(@RequestParam Map<String, Object> map, Model model) {
|
||||
Map<String, Object> pictureMap = new HashMap<>();
|
||||
Map<String, Object> videoMap = new HashMap<>();
|
||||
SspMarks sspMarks = new SspMarks();
|
||||
sspMarks.setId(map.get("id").toString());
|
||||
sspMarks.setCheckState(map.get("numState").toString());
|
||||
SspMarks dbSSpMark = sspMarksService.selectSspMarksList(sspMarks).get(0);
|
||||
String marksPicture = dbSSpMark.getMarksPicture();
|
||||
if(StringUtils.isNotBlank(marksPicture)) {
|
||||
List<SspMarks> fileListPicture = sspMarksService.queryPicture(dbSSpMark);
|
||||
if(fileListPicture != null && fileListPicture.size() > 0) {
|
||||
pictureMap.put("fileListPictureState", "OK");
|
||||
pictureMap.put("fileListPicture", fileListPicture);
|
||||
} else {
|
||||
pictureMap.put("fileListPictureState", "NO");
|
||||
}
|
||||
}
|
||||
if(StringUtils.isNotBlank(dbSSpMark.getMarksVideo())) {
|
||||
List<SspMarks> fileListVideo = sspMarksService.queryVideo(dbSSpMark);
|
||||
if(fileListVideo != null && fileListVideo.size() > 0) {
|
||||
videoMap.put("fileListVideoState", "OK");
|
||||
videoMap.put("fileListVideo", fileListVideo);
|
||||
} else {
|
||||
videoMap.put("fileListVideoState", "NO");
|
||||
}
|
||||
}
|
||||
model.addAttribute("dbSSpMark",dbSSpMark);
|
||||
model.addAttribute("pictureMap",pictureMap);
|
||||
model.addAttribute("videoMap",videoMap);
|
||||
return prefix + "/sspMarkView";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping("/sspQualityMarkApprove")
|
||||
public Object sspQualityMarkApprove(@RequestParam Map<String, Object> map, HttpSession HttpSession) {
|
||||
map.put("loginName", HttpSession.getAttribute("loginName"));
|
||||
return ISspService.updateSspQualityMarkApprove(map);
|
||||
}
|
||||
|
||||
/**
|
||||
*获取工程类型
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getProjectType")
|
||||
@ResponseBody
|
||||
public Object selectProjectTypeList(@RequestParam Map<String,Object> param){
|
||||
return ISspService.selectProjectTypeList(param);
|
||||
}
|
||||
|
||||
@RequestMapping("/treesList")
|
||||
@ResponseBody
|
||||
public Map<String, Object> getFatherNode(ProcessName processName) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 查询所有部门信息
|
||||
List<ProcessName> treesList = ISspService.selectProcessName("0");
|
||||
List newTrees = new ArrayList();
|
||||
for (ProcessName department : treesList) {
|
||||
// 如果pId为0,则该节点为父节点
|
||||
if ((department.getParentCode().equals("0"))) {
|
||||
// 递归获取父节点下的子节点
|
||||
department.setList(getChildrenNode(department.getId(), treesList));
|
||||
newTrees.add(department);
|
||||
}
|
||||
}
|
||||
resultMap.put("children", newTrees);
|
||||
System.out.println(resultMap);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归获取子节点下的子节点
|
||||
* @param integer 父节点的ID
|
||||
* @param treesList 所有菜单树集合
|
||||
* @return
|
||||
*/
|
||||
private List<ProcessName> getChildrenNode(String integer, List<ProcessName> treesList) {
|
||||
List<ProcessName> newTrees = new ArrayList<ProcessName>();
|
||||
for (ProcessName department : treesList) {
|
||||
if ((department.getParentCode().equals("0"))) {
|
||||
continue;
|
||||
}
|
||||
if (department.getParentCode().equals(integer)) {
|
||||
// 递归获取子节点下的子节点,即设置树控件中的children
|
||||
department.setList(getChildrenNode(department.getId(), treesList));
|
||||
newTrees.add(department);
|
||||
}
|
||||
}
|
||||
return newTrees;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工程编码、名称
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectCodeFromSmark")
|
||||
@ResponseBody
|
||||
public Object selectCodeFromSmark(String projectId) {
|
||||
return ISspService.querySmarkCode(projectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
@ResponseBody
|
||||
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("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,396 +0,0 @@
|
|||
package com.ruoyi.web.sspManage.mapper;
|
||||
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarkfileinfo;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarksflow;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName:sspMapper
|
||||
* @Description:随手拍的数据层
|
||||
* @Author:
|
||||
* @Date:2021/3/30 15:23
|
||||
* @version:V1.0
|
||||
*/
|
||||
@Repository
|
||||
public interface SspMapper {
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改,留痕上报)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listSspInfoMyNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:根据id查询相关基本信息
|
||||
* @author:
|
||||
* @date:2021/4/1&11:15
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryChangeNickedInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:根据id查询相关的文件
|
||||
* @author:
|
||||
* @date:2021/4/1&11:19
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listChangeNickedFile(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增问题整改主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增留痕上报主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspInfoNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改留痕上报主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int updateSmzSspProblemmodify(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增流程信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:27
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspAuditInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增文件信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:36
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspFileInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改状态
|
||||
* @author:
|
||||
* @date:2021/4/2&11:28
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int updateState(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改状态
|
||||
* @author:
|
||||
* @date:2021/4/2&11:28
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int updateStateOk(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询已整改的基本信息
|
||||
* @author:
|
||||
* @date:2021/4/6&9:57
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryOpinion(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询已整改的基本信息
|
||||
* @author:
|
||||
* @date:2021/4/6&9:57
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryOpinionChange(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询已整改的文件信息
|
||||
* @author:
|
||||
* @date:2021/4/6&9:59
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listOpinionFile(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询人员的信息
|
||||
* @author:
|
||||
* @date:2021/4/6&17:18
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listUserInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 根据用户账号查询用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> queryUserInfo(String loginName);
|
||||
|
||||
/**
|
||||
* 获取项目用户列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> queryUserList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询负责人的项目归属
|
||||
* @author:
|
||||
* @date:2021/4/6&17:24
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryUserProjectInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:添加驳回的审核意见
|
||||
* @author:
|
||||
* @date:2021/4/7&15:35
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspAuditInfoReject(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:添加通过的审核意见
|
||||
* @author:
|
||||
* @date:2021/4/7&15:35
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public int saveSspAuditInfoPass(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询当前审核流程的信息
|
||||
* @author:
|
||||
* @date:2021/4/7&16:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryAuditInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询驳回信息
|
||||
* @author:
|
||||
* @date:2021/4/7&16:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public String queryRejectInfo(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询N次提交的图片信息
|
||||
* @author:
|
||||
* @date:2021/4/7&17:18
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> listRejectFile(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* 新增留痕上报流程
|
||||
*
|
||||
* @param sspMarksflow
|
||||
* @return
|
||||
*/
|
||||
int saveSspMarkFlow(SspMarksflow sspMarksflow);
|
||||
|
||||
/**
|
||||
* 新增留痕审批文件
|
||||
*
|
||||
* @param sspMarkfileinfo
|
||||
* @return
|
||||
*/
|
||||
int saveMarkFileInfo(SspMarkfileinfo sspMarkfileinfo);
|
||||
|
||||
|
||||
/**
|
||||
* 根据type获取url
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> queryFileInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕数据发布记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> querySspQualityMarkList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取当前用户提交的质量留痕数据发布记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> querySspQualityMarkMyList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询项目用户信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> queryProjectUserinfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕记录详情
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> querySspQualityMarkInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕审批流下一个待审批账号
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
String querySspQualityMarkApproveNextLoginName(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕审批流待审批数量
|
||||
*/
|
||||
int querySspQualityMarkToBeApprovedNum(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新隐蔽工程留痕记录审批流审批状态
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updateSspQualityMarkApproveState(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新隐蔽工程留痕记录审批状态
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updateSspQualityMarkState(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询工程类型列表
|
||||
*
|
||||
* @param projectType 工程类型信息
|
||||
* @return 工程类型集合
|
||||
*/
|
||||
public List<Map<String,Object>> selectProjectTypeList(Map<String,Object> projectType);
|
||||
|
||||
/**
|
||||
* 查询关键工序名称列表
|
||||
*
|
||||
* @param isDel
|
||||
* @return
|
||||
*/
|
||||
List<ProcessName> selectProcessName(String isDel);
|
||||
|
||||
/**
|
||||
* 根据入工区编码, 查询工程编码
|
||||
*
|
||||
* @param proId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> selectCodeFromSmark(String proId);
|
||||
|
||||
/**
|
||||
* 查询项目单位
|
||||
*
|
||||
* @param projectId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> selectComByProjectId(String projectId);
|
||||
|
||||
/**
|
||||
* 查询所有项目人员
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> selectAllProjectUser(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 查询所有项目人员
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> selectProjectUser(Map<String, Object> map);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
package com.ruoyi.web.sspManage.service;
|
||||
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName:SspService
|
||||
* @Description:随手拍服务层
|
||||
* @Author:
|
||||
* @Date:2021/3/30 17:03
|
||||
* @version:V1.0
|
||||
*/
|
||||
public interface ISspService {
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> listSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(留痕上报)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Object listSspInfoNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询审批流的信息
|
||||
* @author:
|
||||
* @date:2021/4/1&11:49
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Map<String, Object> queryChangeNicked(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:新增问题整改主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public String saveSspInfoChanges(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:查询人员的信息
|
||||
* @author:
|
||||
* @date:2021/4/6&17:26
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public List<Map<String, Object>> queryUserInfo(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 根据用户账号查询用户信息
|
||||
* @param loginName
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> queryUserInfo(String loginName);
|
||||
|
||||
/**
|
||||
* 获取项目用户列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> queryUserList(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
public Object updateState(Map<String, Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕数据发布记录
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> querySspQualityMarkList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取当前用户提交的质量留痕数据发布记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> querySspQualityMarkMyList(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取质量留痕记录详情
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> querySspQualityMarkInfo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 隐蔽工程留痕记录审批
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> updateSspQualityMarkApprove(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 查询工程类型列表
|
||||
*
|
||||
* @param projectType 工程类型信息
|
||||
* @return 工程类型集合
|
||||
*/
|
||||
public List<Map<String,Object>> selectProjectTypeList(Map<String,Object> projectType);
|
||||
|
||||
/**
|
||||
* 查询关键工序名称列表
|
||||
*
|
||||
* @param isDel
|
||||
* @return
|
||||
*/
|
||||
List<ProcessName> selectProcessName(String isDel);
|
||||
|
||||
/**
|
||||
* 根据入参查询智能公司工区名称、工区编号
|
||||
*
|
||||
* @param proId
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> querySmarkCode(String proId);
|
||||
}
|
||||
|
|
@ -1,610 +0,0 @@
|
|||
package com.ruoyi.web.sspManage.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.PublicStateEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.QiniuBase64UploadUtil;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.web.projectInfo.mapper.WxProjectInfoMapper;
|
||||
import com.ruoyi.web.sspManage.mapper.SspMapper;
|
||||
import com.ruoyi.web.sspMarks.domain.ProcessName;
|
||||
import com.ruoyi.web.userLogin.mapper.WxUserLoginMapper;
|
||||
import com.ruoyi.web.utils.MultipartFileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName:ISspServiceImpl
|
||||
* @Description:TODO
|
||||
* @Author:
|
||||
* @Date:2021/3/30 17:04
|
||||
* @version:V1.0
|
||||
*/
|
||||
@Service
|
||||
public class SspServiceImpl implements ISspService {
|
||||
|
||||
@Autowired
|
||||
private SspMapper sspMapper;
|
||||
|
||||
@Autowired
|
||||
private WxUserLoginMapper wxUserLoginMapper;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Autowired
|
||||
private SysDeptMapper sysDeptMapper;
|
||||
|
||||
@Autowired
|
||||
private WxProjectInfoMapper wxProjectInfoMapper;
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(问题整改)
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> listSspInfoChanges(Map<String, Object> map) {
|
||||
//返回
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
/**
|
||||
* 根据获取的用户信息和项目id进行判断是抄送还是主送
|
||||
* showState
|
||||
* 主送状态0
|
||||
* 抄送状态1
|
||||
* */
|
||||
String thisUser = map.get("loginName").toString();
|
||||
String projectName = "";
|
||||
//查询问题整改数据(发布记录)
|
||||
List<Map<String, Object>> allChangesInfo = sspMapper.listSspInfoChanges(map);
|
||||
if(allChangesInfo != null && allChangesInfo.size() > 0) {
|
||||
//循环数据,判断加主送抄送状态
|
||||
for (int i = 0; i < allChangesInfo.size(); i++) {
|
||||
Map<String, Object> infoMap = allChangesInfo.get(i);
|
||||
//主送人
|
||||
String lordSendUser = infoMap.get("lordSentUser").toString();
|
||||
if(thisUser.equals(lordSendUser)) {
|
||||
//待办的
|
||||
infoMap.put("showState","0");
|
||||
} else {
|
||||
//抄送的
|
||||
infoMap.put("showState","1");
|
||||
}
|
||||
projectName = infoMap.get("projectName").toString();
|
||||
}
|
||||
}
|
||||
//查询问题整改数据(我的发布)
|
||||
//(0问题整改, 1质量留痕)
|
||||
|
||||
/**
|
||||
* 如果没有选择默认是问题整改
|
||||
*/
|
||||
if(StringUtils.isBlank(map.get("infoType").toString())) {
|
||||
map.put("infoType", "0");
|
||||
}
|
||||
List<Map<String, Object>> allNickedInfo = sspMapper.listSspInfoMyNicked(map);
|
||||
if(allNickedInfo != null && allNickedInfo.size() > 0) {
|
||||
//循环数据,判断加主送抄送状态
|
||||
for (int i = 0; i < allNickedInfo.size(); i++) {
|
||||
Map<String, Object> infoMap = allNickedInfo.get(i);
|
||||
String lordSendUser = infoMap.get("lordSentUser").toString();
|
||||
if(thisUser.equals(lordSendUser)) {
|
||||
//待办理
|
||||
infoMap.put("showState","0");
|
||||
} else {
|
||||
//抄送的
|
||||
infoMap.put("showState","1");
|
||||
}
|
||||
}
|
||||
}
|
||||
//工程名称
|
||||
resultMap.put("projectName", projectName);
|
||||
//发布记录
|
||||
resultMap.put("allChangesInfo", allChangesInfo);
|
||||
//我的发布
|
||||
resultMap.put("allNickedInfo", allNickedInfo);
|
||||
//发布记录数量
|
||||
resultMap.put("allChangesInfoSize", allChangesInfo != null?allChangesInfo.size():0);
|
||||
//我的发布数量
|
||||
resultMap.put("allNickedInfoSize", allNickedInfo != null?allNickedInfo.size():0);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:查询随手拍信息的列表(留痕上报[问题整改我发起的])
|
||||
* @author:
|
||||
* @date:2021/3/30&15:25
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Object listSspInfoNicked(Map<String, Object> map) {
|
||||
String result = "NO";
|
||||
//根据infoTy判断是问题整改或者是留痕上报
|
||||
//String infoType = map.get("infoType").toString();
|
||||
if(true) {
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
//问题整改
|
||||
Map<String, Object> dataMap = new HashMap<>();
|
||||
dataMap.put("loginName",map.get("createUser"));
|
||||
Map<String,Object> deptMap = wxProjectInfoMapper.selectDeptByUserName(Convert.toStr(map.get("createUser")));
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
String roleType = "";
|
||||
if(DeptTypeEnum.JTGS.getCode().equals(deptMap.get("type_flag"))){
|
||||
List<Map<String,Object>> datalist = sspMapper.queryProjectUserinfo(map);
|
||||
if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && PublicStateEnum.USERTYPE_JFJL.getCode().equals(datalist.get(0).get("job_type"))){
|
||||
//说明是甲方经理
|
||||
roleType = DeptTypeEnum.JFDBTYPE.getCode();
|
||||
}else{
|
||||
roleType = DeptTypeEnum.JTGSTYPE.getCode();
|
||||
}
|
||||
}else if(DeptTypeEnum.ZGS.getCode().equals(deptMap.get("type_flag"))){
|
||||
List<Map<String,Object>> datalist = sspMapper.queryProjectUserinfo(map);
|
||||
if(datalist!=null && datalist.size()>0 && datalist.get(0)!=null && PublicStateEnum.USERTYPE_JFJL.getCode().equals(datalist.get(0).get("job_type"))){
|
||||
//说明是甲方经理
|
||||
roleType = DeptTypeEnum.JFDBTYPE.getCode();
|
||||
}else{
|
||||
roleType = DeptTypeEnum.ZGSTYPE.getCode();
|
||||
}
|
||||
}else if(DeptTypeEnum.JLDW.getCode().equals(deptMap.get("type_flag"))){
|
||||
roleType = DeptTypeEnum.JLDWTYPE.getCode();
|
||||
}else if(DeptTypeEnum.ZBDW.getCode().equals(deptMap.get("type_flag"))){
|
||||
roleType = DeptTypeEnum.ZBDWTYPE.getCode();
|
||||
}else if(DeptTypeEnum.FBDW.getCode().equals(deptMap.get("type_flag"))){
|
||||
roleType = DeptTypeEnum.FBDWTYPE.getCode();
|
||||
}
|
||||
map.put("roleType",roleType);
|
||||
/**
|
||||
* 基本信息入库
|
||||
* 图片 视频入库
|
||||
* 添加对应的审批流
|
||||
* */
|
||||
//基本信息
|
||||
map.put("nickedTime", DateUtils.parseDate(map.get("nickedTime")));
|
||||
int a = sspMapper.saveSspInfoChanges(map);
|
||||
//审批流创建
|
||||
map.put("mainId", map.get("id"));
|
||||
map.put("processState", "1");
|
||||
updateMap.put("id",map.get("id"));
|
||||
int b = sspMapper.saveSspAuditInfo(map);
|
||||
//图片
|
||||
int c = 0;
|
||||
JSONArray JSONArray = com.alibaba.fastjson.JSONArray.parseArray(map.get("imgSrc").toString());
|
||||
String smarkUrl="";
|
||||
for (int i = 0; i < JSONArray.size(); i++) {
|
||||
//String name = "sspImg-"+ UUID.randomUUID()+".jpg";
|
||||
String objImg64 = JSONArray.get(i).toString();
|
||||
//String imgBase64One = objImg64.substring(0, objImg64.indexOf(","));
|
||||
//String imgBase64 = objImg64.substring(imgBase64One.length()+1, objImg64.length());
|
||||
Map<String, Object> imgMap = new HashMap<>();
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
//imgMap = new QiniuBase64UploadUtil().put64image(imgBase64, name);
|
||||
smarkUrl+=","+fileName;
|
||||
imgMap.put("fileUrl", fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
imgMap.put("auditId", map.get("auditId"));
|
||||
imgMap.put("fileType", "0");
|
||||
//imgMap.put("fileUrl", imgMap.get("url"));
|
||||
imgMap.put("createUser", map.get("createUser"));
|
||||
c = sspMapper.saveSspFileInfo(imgMap);
|
||||
}
|
||||
//视频
|
||||
if(!"".equals(map.get("videoUrl").toString())) {
|
||||
Map<String, Object> fileArgsMap = new HashMap<>(16);
|
||||
fileArgsMap.put("auditId", map.get("auditId"));
|
||||
fileArgsMap.put("createUser", map.get("createUser"));
|
||||
fileArgsMap.put("fileType", "1");
|
||||
fileArgsMap.put("fileUrl", map.get("videoUrl"));
|
||||
sspMapper.saveSspFileInfo(fileArgsMap);
|
||||
}
|
||||
smarkUrl = smarkUrl.substring(1);
|
||||
updateMap.put("marksPicture",smarkUrl.split(",")[0]);
|
||||
updateMap.put("smarkUrl",smarkUrl);
|
||||
sspMapper.updateSmzSspProblemmodify(updateMap);
|
||||
if(a > 0 && b > 0 && c > 0) {
|
||||
result = "OK";
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryChangeNicked(Map<String, Object> map) {
|
||||
//基本信息
|
||||
Map<String, Object> ChangeNickedInfo = sspMapper.queryChangeNickedInfo(map);
|
||||
//获取流程的id,请求相关的文件信息
|
||||
map.put("auditId",ChangeNickedInfo.get("checkId"));
|
||||
map.put("fileType","0");
|
||||
//图片
|
||||
List<Map<String, Object>> fileListImg = sspMapper.listChangeNickedFile(map);
|
||||
if(fileListImg != null && fileListImg.size() > 0) {
|
||||
ChangeNickedInfo.put("fileListImgState", "OK");
|
||||
ChangeNickedInfo.put("fileListImg", fileListImg);
|
||||
} else {
|
||||
ChangeNickedInfo.put("fileListImgState", "NO");
|
||||
ChangeNickedInfo.put("fileListImg", new ArrayList<>());
|
||||
}
|
||||
//视频
|
||||
//map.put("fileType","1");
|
||||
//List<Map<String, Object>> fileListVideo = sspMapper.listChangeNickedFile(map);
|
||||
//if(fileListVideo != null && fileListVideo.size() > 0) {
|
||||
// ChangeNickedInfo.put("fileListVideoState", "OK");
|
||||
// ChangeNickedInfo.put("fileListVideo", fileListVideo);
|
||||
//} else {
|
||||
ChangeNickedInfo.put("fileListVideoState", "NO");
|
||||
//}
|
||||
//审核流程的信息 查询状态为0的信息 基本信息和文件信息 当前审批流是否存在驳回
|
||||
Map<String, Object> opinionMap;
|
||||
if("2".equals(map.get("numState").toString()) || "3".equals(map.get("numState").toString())) {
|
||||
opinionMap = sspMapper.queryOpinionChange(map);
|
||||
} else {
|
||||
opinionMap = sspMapper.queryOpinion(map);
|
||||
}
|
||||
ChangeNickedInfo.put("opinion", opinionMap.get("opinion")==null?"":opinionMap.get("opinion"));
|
||||
ChangeNickedInfo.put("opinionCreateTime", opinionMap.get("opinionCreateTime"));
|
||||
|
||||
/*****************************************************驳回判断**************************************************/
|
||||
//当前审核信息状态
|
||||
Map<String, Object> auditInfoMap = sspMapper.queryAuditInfo(map);
|
||||
//是否有驳回
|
||||
String rejectInfo = sspMapper.queryRejectInfo(map);
|
||||
if(("0".equals(auditInfoMap.get("processState")) || !auditInfoMap.containsKey("processState")) && rejectInfo == null) {
|
||||
//初始审核状态
|
||||
List<Map<String, Object>> opinionFileUrl = sspMapper.listOpinionFile(map);
|
||||
if(opinionFileUrl != null && opinionFileUrl.size() > 0) {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "OK");
|
||||
ChangeNickedInfo.put("opinionFileUrl", opinionFileUrl);
|
||||
ChangeNickedInfo.put("rejectState", "NO");
|
||||
} else {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
ChangeNickedInfo.put("rejectState", "NO");
|
||||
}
|
||||
} else if("0".equals(auditInfoMap.get("processState")) && rejectInfo != null) {
|
||||
//被驳回的状态 以N次提交
|
||||
map.put("id", auditInfoMap.get("id"));
|
||||
List<Map<String, Object>> opinionFileUrl = sspMapper.listRejectFile(map);
|
||||
if(opinionFileUrl != null && opinionFileUrl.size() > 0) {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "OK");
|
||||
ChangeNickedInfo.put("opinionFileUrl", opinionFileUrl);
|
||||
ChangeNickedInfo.put("rejectState", "OK");
|
||||
ChangeNickedInfo.put("rejectInfo", rejectInfo);
|
||||
} else {
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
ChangeNickedInfo.put("rejectState", "OK");
|
||||
ChangeNickedInfo.put("rejectInfo", rejectInfo);
|
||||
}
|
||||
} else if("2".equals(auditInfoMap.get("processState")) && rejectInfo != null) {
|
||||
//被驳回且没有再次上传
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
ChangeNickedInfo.put("rejectState", "OK");
|
||||
ChangeNickedInfo.put("rejectInfo", rejectInfo);
|
||||
}else{
|
||||
ChangeNickedInfo.put("rejectState", "NO");
|
||||
ChangeNickedInfo.put("opinionFileUrlState", "NO");
|
||||
}
|
||||
|
||||
/**************************************************************************************************************/
|
||||
if(map.get("loginUser").equals(ChangeNickedInfo.get("recheckSendUser"))) {
|
||||
ChangeNickedInfo.put("checkUserState", "OK");
|
||||
} else {
|
||||
ChangeNickedInfo.put("checkUserState", "NO");
|
||||
}
|
||||
ChangeNickedInfo.put("numState", map.get("numState"));
|
||||
return ChangeNickedInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:新增问题整改主表信息
|
||||
* @author:
|
||||
* @date:2021/3/31&9:22
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public String saveSspInfoChanges(Map<String, Object> map) {
|
||||
//修改信息表的状态
|
||||
map.put("tableName", "smz_ssp_problemmodify");
|
||||
map.put("fieldName", "checkState");
|
||||
map.put("checkState", "1");
|
||||
map.put("keySet", "id");
|
||||
int a = sspMapper.updateState(map);
|
||||
//审批信息入库
|
||||
map.put("mainId", map.get("id"));
|
||||
map.put("opinion", map.get("opinion"));
|
||||
map.put("processState", "0");
|
||||
int b = sspMapper.saveSspAuditInfo(map);
|
||||
int c = 0;
|
||||
//图片入库
|
||||
JSONArray JSONArray = com.alibaba.fastjson.JSONArray.parseArray(map.get("imgSrc").toString());
|
||||
for (int i = 0; i < JSONArray.size(); i++) {
|
||||
String name = "sspImg-"+ UUID.randomUUID()+".jpg";
|
||||
String objImg64 = JSONArray.get(i).toString();
|
||||
String imgBase64One = objImg64.substring(0, objImg64.indexOf(","));
|
||||
String imgBase64 = objImg64.substring(imgBase64One.length()+1, objImg64.length());
|
||||
Map<String, Object> imgMap = new HashMap<>();
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
//imgMap = new QiniuBase64UploadUtil().put64image(imgBase64, name);
|
||||
imgMap.put("fileUrl", fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
imgMap.put("auditId", map.get("auditId"));
|
||||
imgMap.put("fileType", "0");
|
||||
//imgMap.put("fileUrl",imgMap.get("url"));
|
||||
imgMap.put("createUser", map.get("createUser"));
|
||||
c = sspMapper.saveSspFileInfo(imgMap);
|
||||
}
|
||||
if(a > 0 && b > 0 && c > 0) {
|
||||
return "OK";
|
||||
}
|
||||
return "NO";
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:查询人员的信息
|
||||
* @author:
|
||||
* @date:2021/4/6&17:26
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryUserInfo(Map<String, Object> map) {
|
||||
String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleIdByLoginName(Convert.toStr(map.get("loginName"))));
|
||||
//查询出公司信息
|
||||
List<Map<String, Object>> comList = sspMapper.selectComByProjectId(Convert.toStr(map.get("projectId")));
|
||||
Map<String, Object> userdata = new HashMap<>();
|
||||
userdata.put("projectId",Convert.toLong(map.get("projectId")));
|
||||
userdata.put("name",map.get("name"));
|
||||
userdata.put("loginName",map.get("loginName"));
|
||||
if(SysRoleEnum.ADMIN.getCode().equals(nowRole) || SysRoleEnum.SUPR.getCode().equals(nowRole) || SysRoleEnum.JTGS.getCode().equals(nowRole) || SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
userdata.put("roleId",SysRoleEnum.ZGS.getCode());
|
||||
//查询所属项目部门信息
|
||||
Map<String, Object> sysDept = wxProjectInfoMapper.selectDeptByProjectId(Convert.toLong(map.get("projectId")));
|
||||
userdata.put("deptId",Convert.toStr(sysDept.get("id")));
|
||||
}else if(SysRoleEnum.JLDW.getCode().equals(nowRole)){
|
||||
//监理单位只能选择监理单位
|
||||
userdata.put("roleId",SysRoleEnum.JLDW.getCode());
|
||||
//查询部门信息
|
||||
Map<String, Object> sysDept = wxProjectInfoMapper.selectDeptByUserName(Convert.toStr(map.get("loginName")));
|
||||
userdata.put("deptId",Convert.toStr(sysDept.get("id")));
|
||||
}else if(SysRoleEnum.ZBDW.getCode().equals(nowRole)){
|
||||
//总包单位只能选择总包单位
|
||||
userdata.put("roleId",SysRoleEnum.ZBDW.getCode());
|
||||
//查询部门信息
|
||||
Map<String, Object> sysDept = wxProjectInfoMapper.selectDeptByUserName(Convert.toStr(map.get("loginName")));
|
||||
userdata.put("deptId",Convert.toStr(sysDept.get("id")));
|
||||
}else if(SysRoleEnum.FBDW.getCode().equals(nowRole)){
|
||||
//分包单位只能选择分包单位
|
||||
userdata.put("roleId",SysRoleEnum.FBDW.getCode());
|
||||
//查询部门信息
|
||||
Map<String, Object> sysDept = wxProjectInfoMapper.selectDeptByUserName(Convert.toStr(map.get("loginName")));
|
||||
userdata.put("deptId",Convert.toStr(sysDept.get("id")));
|
||||
}
|
||||
//查询相关人员
|
||||
List<Map<String, Object>> userList = null;
|
||||
if(SysRoleEnum.COMMON.getCode().equals(nowRole)){
|
||||
userList = sspMapper.selectProjectUser(userdata);
|
||||
}else{
|
||||
userList = sspMapper.selectAllProjectUser(userdata);
|
||||
}
|
||||
for(Map<String, Object> comMap:comList){
|
||||
List<Map<String, Object>> userInfoList = new ArrayList<>();
|
||||
for(Map<String, Object> userMap:userList){
|
||||
//同一部门组装数据
|
||||
if(comMap.get("id").toString().equals(userMap.get("deptId").toString())){
|
||||
userInfoList.add(userMap);
|
||||
}else if(DeptTypeEnum.ZGS.getCode().equals(comMap.get("unitType").toString()) && DeptTypeEnum.ZGS.getCode().equals(userMap.get("role_id").toString())){
|
||||
userInfoList.add(userMap);
|
||||
}else if(DeptTypeEnum.ZGS.getCode().equals(comMap.get("unitType").toString()) && DeptTypeEnum.ZGS.getCode().equals(userMap.get("dept_type_flag").toString())){
|
||||
userInfoList.add(userMap);
|
||||
}
|
||||
}
|
||||
comMap.put("people",userInfoList);
|
||||
}
|
||||
return comList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryUserInfo(String loginName) {
|
||||
return sspMapper.queryUserInfo(loginName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryUserList(Map<String, Object> map) {
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
Map<String,Object> user = new HashMap<>();
|
||||
List<Map<String, Object>> userList = sspMapper.queryUserList(map);
|
||||
if(userList != null && userList.size() > 0){
|
||||
user.put("people",userList);
|
||||
}
|
||||
resultList.add(user);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @describe:修改审核流程的状态
|
||||
* @author:
|
||||
* @date:2021/4/7&11:39
|
||||
* @version:V1.0
|
||||
* @param:
|
||||
* @return:
|
||||
* @Exception:
|
||||
*/
|
||||
@Override
|
||||
public Object updateState(Map<String, Object> map) {
|
||||
/**
|
||||
* 根据状态修改
|
||||
* 4通过
|
||||
* 3为驳回
|
||||
* */
|
||||
int code = 0;
|
||||
int codeA = 0;
|
||||
if("4".equals(map.get("checkState").toString())) {
|
||||
//通过 修改主表状态 为通过
|
||||
map.put("tableName", "smz_ssp_problemmodify");
|
||||
map.put("fieldName", "checkState");
|
||||
map.put("checkState", map.get("checkState"));
|
||||
map.put("keySet", "id");
|
||||
code = sspMapper.updateStateOk(map);
|
||||
//添加通过意见
|
||||
Map<String, Object> rejectMap = new HashMap<>(16);
|
||||
rejectMap.put("mainId", map.get("id"));
|
||||
rejectMap.put("opinion", map.get("opinion"));
|
||||
rejectMap.put("createUser", map.get("createUser"));
|
||||
codeA = sspMapper.saveSspAuditInfoPass(rejectMap);
|
||||
} else {
|
||||
//驳回 修改主表状态 待整改 添加审核流程驳回意见
|
||||
map.put("tableName", "smz_ssp_problemmodify");
|
||||
map.put("fieldName", "checkState");
|
||||
map.put("checkState", "0");
|
||||
map.put("keySet", "id");
|
||||
code = sspMapper.updateState(map);
|
||||
//添加驳回意见
|
||||
Map<String, Object> rejectMap = new HashMap<>(16);
|
||||
rejectMap.put("mainId", map.get("id"));
|
||||
rejectMap.put("opinion", map.get("opinion"));
|
||||
rejectMap.put("createUser", map.get("createUser"));
|
||||
codeA = sspMapper.saveSspAuditInfoReject(rejectMap);
|
||||
}
|
||||
return code + codeA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySspQualityMarkList(Map<String, Object> map) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<Map<String,Object>> list = sspMapper.querySspQualityMarkList(map);
|
||||
List<Map<String,Object>> list_my = sspMapper.querySspQualityMarkMyList(map);
|
||||
resultMap.put("list",list);
|
||||
resultMap.put("list_num",list != null?list.size():0);
|
||||
resultMap.put("list_my_num",list_my != null?list_my.size():0);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySspQualityMarkMyList(Map<String, Object> map) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<Map<String,Object>> list = sspMapper.querySspQualityMarkList(map);
|
||||
List<Map<String,Object>> list_my = sspMapper.querySspQualityMarkMyList(map);
|
||||
resultMap.put("list",list_my);
|
||||
resultMap.put("list_num",list != null?list.size():0);
|
||||
resultMap.put("list_my_num",list_my != null?list_my.size():0);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySspQualityMarkInfo(Map<String, Object> map) {
|
||||
Map<String,Object> data = sspMapper.querySspQualityMarkInfo(map);
|
||||
String[] arr;
|
||||
if(data.containsKey("before_imgs") && !"".equals(data.get("before_imgs"))){
|
||||
arr = data.get("before_imgs").toString().split(",");
|
||||
data.put("before_imgs",arr);
|
||||
}
|
||||
if(data.containsKey("after_imgs") && !"".equals(data.get("after_imgs"))){
|
||||
arr = data.get("after_imgs").toString().split(",");
|
||||
data.put("after_imgs",arr);
|
||||
}
|
||||
int approve_state = 0;//(0:不可审批;1:可审批)
|
||||
if(Integer.parseInt(data.get("state").toString()) == 0){//待审批
|
||||
String next_approve_login_name = sspMapper.querySspQualityMarkApproveNextLoginName(map);
|
||||
String loginUser = map.containsKey("loginUser")?map.get("loginUser").toString():"";
|
||||
if(next_approve_login_name != null && next_approve_login_name.equals(loginUser)){
|
||||
approve_state = 1;
|
||||
}
|
||||
}
|
||||
data.put("approve_state",approve_state);
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateSspQualityMarkApprove(Map<String, Object> map) {
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
if("2".equals(map.get("state").toString())){//驳回
|
||||
if(sspMapper.updateSspQualityMarkApproveState(map) == 1){
|
||||
if(sspMapper.updateSspQualityMarkState(map) == 1){
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","审批成功!");
|
||||
}
|
||||
}
|
||||
}else if("1".equals(map.get("state").toString())){//通过
|
||||
if(sspMapper.updateSspQualityMarkApproveState(map) == 1){
|
||||
if(sspMapper.querySspQualityMarkToBeApprovedNum(map) == 0){
|
||||
if(sspMapper.updateSspQualityMarkState(map) == 1){
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","审批成功!");
|
||||
}else{
|
||||
resultMap.put("code","201");
|
||||
resultMap.put("msg","审批失败!");
|
||||
}
|
||||
}else{
|
||||
resultMap.put("code","200");
|
||||
resultMap.put("msg","审批成功!");
|
||||
}
|
||||
}else {
|
||||
resultMap.put("code","201");
|
||||
resultMap.put("msg","审批失败!");
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectProjectTypeList(Map<String, Object> projectType) {
|
||||
return sspMapper.selectProjectTypeList(projectType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProcessName> selectProcessName(String isDel) {
|
||||
return sspMapper.selectProcessName(isDel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querySmarkCode(String proId) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
List<Map<String, Object>> ponitCode = sspMapper.selectCodeFromSmark(proId);
|
||||
if(ponitCode.size() > 0 || ponitCode != null) {
|
||||
returnMap.put("code", "200");
|
||||
returnMap.put("msg", "查询成功");
|
||||
returnMap.put("ponitCode", ponitCode);
|
||||
} else {
|
||||
returnMap.put("code", "100");
|
||||
returnMap.put("msg", "请检查参数");
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,138 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 关键工序名称
|
||||
*
|
||||
*/
|
||||
public class ProcessName {
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 关键工序名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private String parentCode;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*
|
||||
*/
|
||||
private int projectId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 是否可删除
|
||||
*/
|
||||
private int isDel;
|
||||
|
||||
/**
|
||||
* 节点级别
|
||||
*
|
||||
*/
|
||||
private int processLevel;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private int checkState;
|
||||
|
||||
/**
|
||||
* 类别
|
||||
*/
|
||||
private String type;
|
||||
|
||||
private List<ProcessName> list = new ArrayList<>();
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public int getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(int projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public int getIsDel() {
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public void setIsDel(int isDel) {
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public int getProcessLevel() {
|
||||
return processLevel;
|
||||
}
|
||||
|
||||
public void setProcessLevel(int processLevel) {
|
||||
this.processLevel = processLevel;
|
||||
}
|
||||
|
||||
public int getCheckState() {
|
||||
return checkState;
|
||||
}
|
||||
|
||||
public void setCheckState(int checkState) {
|
||||
this.checkState = checkState;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<ProcessName> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<ProcessName> list) {
|
||||
this.list = list;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.domain;
|
||||
|
||||
/**
|
||||
* 留痕上报上传的文件
|
||||
*/
|
||||
public class SspMarkfileinfo {
|
||||
/** id */
|
||||
private Integer id;
|
||||
/**
|
||||
* 关联id
|
||||
*/
|
||||
private int externalId;
|
||||
|
||||
/**
|
||||
* 文件类型(0图片,1视频)
|
||||
*/
|
||||
private int fileType;
|
||||
|
||||
/**
|
||||
* 文件url
|
||||
*/
|
||||
private String fileUrl;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 是否可删除
|
||||
*/
|
||||
private int isDel;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateUser;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String updateTime;
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getExternalId() {
|
||||
return externalId;
|
||||
}
|
||||
|
||||
public void setExternalId(int externalId) {
|
||||
this.externalId = externalId;
|
||||
}
|
||||
|
||||
public int getFileType() {
|
||||
return fileType;
|
||||
}
|
||||
|
||||
public void setFileType(int fileType) {
|
||||
this.fileType = fileType;
|
||||
}
|
||||
|
||||
|
||||
public int getIsDel() {
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public void setIsDel(int isDel) {
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
|
||||
public String getUpdateUser() {
|
||||
return updateUser;
|
||||
}
|
||||
|
||||
public void setUpdateUser(String updateUser) {
|
||||
this.updateUser = updateUser;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getFileUrl() {
|
||||
return fileUrl;
|
||||
}
|
||||
|
||||
public void setFileUrl(String fileUrl) {
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,536 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报表 smz_ssp_marks
|
||||
*
|
||||
* @author gwb
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
public class SspMarks
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private String id;
|
||||
/** 留痕上报地点 */
|
||||
@Excel(name = "留痕上报地点")
|
||||
private String marksLocation;
|
||||
/** 留痕时间 */
|
||||
@Excel(name = "留痕时间")
|
||||
private String marksTime;
|
||||
/** 留痕图片 */
|
||||
private String marksPicture;
|
||||
/** 留痕视频 */
|
||||
private String marksVideo;
|
||||
/** 工程类型 */
|
||||
private String projectType;
|
||||
/** 工序名称 */
|
||||
private String processName;
|
||||
/** 问题描述 */
|
||||
@Excel(name = "问题描述")
|
||||
private String positionPart;
|
||||
/** 留痕说明 */
|
||||
@Excel(name = "留痕说明")
|
||||
private String marksRemark;
|
||||
/** 审核人 */
|
||||
@Excel(name = "施工人员姓名")
|
||||
private String auditorPerson;
|
||||
/** 审核人手机 */
|
||||
private String auditorPhone;
|
||||
/** 审批状态 */
|
||||
private String checkState;
|
||||
|
||||
/** 创建时间 */
|
||||
private String createDate;
|
||||
/** 创建人 */
|
||||
private String createUser;
|
||||
/** 项目id */
|
||||
private Integer projectId;
|
||||
/** 工程名称 */
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 施工人员身份证号码
|
||||
*/
|
||||
@Excel(name = "施工人员身份证号码")
|
||||
private String idcardnum;
|
||||
|
||||
/**
|
||||
* 给智能公司传递的url
|
||||
*/
|
||||
private String smarkUrl;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 监理人员
|
||||
*/
|
||||
private String surveyorName;
|
||||
|
||||
/**
|
||||
* 监理身份证号码
|
||||
*/
|
||||
private String surveyorId;
|
||||
|
||||
/**
|
||||
* 监理留痕时间
|
||||
*/
|
||||
private String surveyorTime;
|
||||
|
||||
/**
|
||||
* 监理留痕说明
|
||||
*/
|
||||
private String surveyorContent;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private String updateDate;
|
||||
|
||||
|
||||
/**
|
||||
* 工程类型
|
||||
*/
|
||||
@Excel(name = "工程类型")
|
||||
private String typeOfProject;
|
||||
|
||||
/**
|
||||
* 工序
|
||||
*/
|
||||
@Excel(name = "工序名称")
|
||||
private String procedure;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@Excel(name = "工程名称")
|
||||
private String engineeringName;
|
||||
|
||||
/**
|
||||
* 留痕上报的id为1
|
||||
*/
|
||||
private int infoType;
|
||||
|
||||
/**
|
||||
* 开始时间结束时间
|
||||
*/
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 开始时间,结束时间
|
||||
*/
|
||||
private String beginDate;
|
||||
private String endDate;
|
||||
|
||||
/**
|
||||
* 同步状态 (0是已同步)
|
||||
*/
|
||||
private int synchronization;
|
||||
|
||||
/**
|
||||
* 查询参数
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Integer nowPage;
|
||||
private Integer size;
|
||||
|
||||
//工程关联字段
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 流程表的id
|
||||
*/
|
||||
private int mainId;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:留痕上报地点
|
||||
*/
|
||||
public void setMarksLocation(String marksLocation)
|
||||
{
|
||||
this.marksLocation = marksLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕上报地点
|
||||
*/
|
||||
public String getMarksLocation()
|
||||
{
|
||||
return marksLocation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设置:留痕图片
|
||||
*/
|
||||
public void setMarksPicture(String marksPicture)
|
||||
{
|
||||
this.marksPicture = marksPicture;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕图片
|
||||
*/
|
||||
public String getMarksPicture()
|
||||
{
|
||||
return marksPicture;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:留痕视频
|
||||
*/
|
||||
public void setMarksVideo(String marksVideo)
|
||||
{
|
||||
this.marksVideo = marksVideo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕视频
|
||||
*/
|
||||
public String getMarksVideo()
|
||||
{
|
||||
return marksVideo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:工程类型
|
||||
*/
|
||||
public void setProjectType(String projectType)
|
||||
{
|
||||
this.projectType = projectType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:工程类型
|
||||
*/
|
||||
public String getProjectType()
|
||||
{
|
||||
return projectType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:工序名称
|
||||
*/
|
||||
public void setProcessName(String processName)
|
||||
{
|
||||
this.processName = processName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:工序名称
|
||||
*/
|
||||
public String getProcessName()
|
||||
{
|
||||
return processName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:问题描述
|
||||
*/
|
||||
public void setPositionPart(String positionPart)
|
||||
{
|
||||
this.positionPart = positionPart;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:问题描述
|
||||
*/
|
||||
public String getPositionPart()
|
||||
{
|
||||
return positionPart;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:留痕说明
|
||||
*/
|
||||
public void setMarksRemark(String marksRemark)
|
||||
{
|
||||
this.marksRemark = marksRemark;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕说明
|
||||
*/
|
||||
public String getMarksRemark()
|
||||
{
|
||||
return marksRemark;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:审核人
|
||||
*/
|
||||
public void setAuditorPerson(String auditorPerson)
|
||||
{
|
||||
this.auditorPerson = auditorPerson;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:审核人
|
||||
*/
|
||||
public String getAuditorPerson()
|
||||
{
|
||||
return auditorPerson;
|
||||
}
|
||||
|
||||
public String getMarksTime() {
|
||||
return marksTime;
|
||||
}
|
||||
|
||||
public void setMarksTime(String marksTime) {
|
||||
this.marksTime = marksTime;
|
||||
}
|
||||
|
||||
public String getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:创建人
|
||||
*/
|
||||
public void setCreateUser(String createUser)
|
||||
{
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:创建人
|
||||
*/
|
||||
public String getCreateUser()
|
||||
{
|
||||
return createUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:项目id
|
||||
*/
|
||||
public void setProjectId(Integer projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:项目id
|
||||
*/
|
||||
public Integer getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getAuditorPhone() {
|
||||
return auditorPhone;
|
||||
}
|
||||
|
||||
public void setAuditorPhone(String auditorPhone) {
|
||||
this.auditorPhone = auditorPhone;
|
||||
}
|
||||
|
||||
public String getCheckState() {
|
||||
return checkState;
|
||||
}
|
||||
|
||||
public void setCheckState(String checkState) {
|
||||
this.checkState = checkState;
|
||||
}
|
||||
|
||||
public String getTypeOfProject() {
|
||||
return typeOfProject;
|
||||
}
|
||||
|
||||
public void setTypeOfProject(String typeOfProject) {
|
||||
this.typeOfProject = typeOfProject;
|
||||
}
|
||||
|
||||
public String getProcedure() {
|
||||
return procedure;
|
||||
}
|
||||
|
||||
public void setProcedure(String procedure) {
|
||||
this.procedure = procedure;
|
||||
}
|
||||
|
||||
public String getEngineeringName() {
|
||||
return engineeringName;
|
||||
}
|
||||
|
||||
public void setEngineeringName(String engineeringName) {
|
||||
this.engineeringName = engineeringName;
|
||||
}
|
||||
|
||||
public String getIdcardnum() {
|
||||
return idcardnum;
|
||||
}
|
||||
|
||||
public void setIdcardnum(String idcardnum) {
|
||||
this.idcardnum = idcardnum;
|
||||
}
|
||||
|
||||
public int getInfoType() {
|
||||
return infoType;
|
||||
}
|
||||
|
||||
public void setInfoType(int infoType) {
|
||||
this.infoType = infoType;
|
||||
}
|
||||
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public int getMainId() {
|
||||
return mainId;
|
||||
}
|
||||
|
||||
public void setMainId(int mainId) {
|
||||
this.mainId = mainId;
|
||||
}
|
||||
|
||||
public String getSmarkUrl() {
|
||||
return smarkUrl;
|
||||
}
|
||||
|
||||
public void setSmarkUrl(String smarkUrl) {
|
||||
this.smarkUrl = smarkUrl;
|
||||
}
|
||||
|
||||
public Integer getNowPage() {
|
||||
return nowPage;
|
||||
}
|
||||
|
||||
public void setNowPage(Integer nowPage) {
|
||||
this.nowPage = nowPage;
|
||||
}
|
||||
|
||||
public Integer getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(Integer size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public int getSynchronization() {
|
||||
return synchronization;
|
||||
}
|
||||
|
||||
public void setSynchronization(int synchronization) {
|
||||
this.synchronization = synchronization;
|
||||
}
|
||||
|
||||
public String getBeginDate() {
|
||||
return beginDate;
|
||||
}
|
||||
|
||||
public void setBeginDate(String beginDate) {
|
||||
this.beginDate = beginDate;
|
||||
}
|
||||
|
||||
public String getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(String endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public String getPointName() {
|
||||
return pointName;
|
||||
}
|
||||
|
||||
public void setPointName(String pointName) {
|
||||
this.pointName = pointName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
||||
public String getSurveyorName() {
|
||||
return surveyorName;
|
||||
}
|
||||
|
||||
public void setSurveyorName(String surveyorName) {
|
||||
this.surveyorName = surveyorName;
|
||||
}
|
||||
|
||||
public String getSurveyorId() {
|
||||
return surveyorId;
|
||||
}
|
||||
|
||||
public void setSurveyorId(String surveyorId) {
|
||||
this.surveyorId = surveyorId;
|
||||
}
|
||||
|
||||
public String getSurveyorTime() {
|
||||
return surveyorTime;
|
||||
}
|
||||
|
||||
public void setSurveyorTime(String surveyorTime) {
|
||||
this.surveyorTime = surveyorTime;
|
||||
}
|
||||
|
||||
public String getSurveyorContent() {
|
||||
return surveyorContent;
|
||||
}
|
||||
|
||||
public void setSurveyorContent(String surveyorContent) {
|
||||
this.surveyorContent = surveyorContent;
|
||||
}
|
||||
|
||||
public String getUpdateDate() {
|
||||
return updateDate;
|
||||
}
|
||||
|
||||
public void setUpdateDate(String updateDate) {
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,303 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.domain;
|
||||
|
||||
/**
|
||||
* 智能公司,随手拍留痕上报表 smz_ssp_marks
|
||||
*
|
||||
* @author gwb
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
public class SspMarksDto
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Integer id;
|
||||
/** 留痕上报地点 */
|
||||
private String marksLocation;
|
||||
/** 留痕时间 */
|
||||
private String marksTime;
|
||||
/** 留痕图片 */
|
||||
private String marksPicture;
|
||||
/** 留痕视频 */
|
||||
private String marksVideo;
|
||||
/** 工程类型 */
|
||||
private String pointType;
|
||||
/** 工序名称 */
|
||||
private String processName;
|
||||
/** 问题描述 */
|
||||
private String positionPart;
|
||||
/** 留痕说明 */
|
||||
private String marksRemark;
|
||||
/** 审核人 */
|
||||
private String workname;
|
||||
/** 审核人手机 */
|
||||
private String auditorPhone;
|
||||
/** 审批状态 */
|
||||
private int checkState;
|
||||
|
||||
/** 创建时间 */
|
||||
private String createDate;
|
||||
/** 创建人 */
|
||||
private String createUser;
|
||||
/** 所属分部门 */
|
||||
private Integer projectId;
|
||||
/** 工程名称 */
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 施工人员身份证号码
|
||||
*/
|
||||
private String idcardnum;
|
||||
|
||||
|
||||
/**
|
||||
* 工程类型
|
||||
*/
|
||||
private String typeOfProject;
|
||||
|
||||
/**
|
||||
* 工序
|
||||
*/
|
||||
private String procedure;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
private String engineeringName;
|
||||
|
||||
/**
|
||||
* 设置:id
|
||||
*/
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:id
|
||||
*/
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:留痕上报地点
|
||||
*/
|
||||
public void setMarksLocation(String marksLocation)
|
||||
{
|
||||
this.marksLocation = marksLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕上报地点
|
||||
*/
|
||||
public String getMarksLocation()
|
||||
{
|
||||
return marksLocation;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设置:留痕图片
|
||||
*/
|
||||
public void setMarksPicture(String marksPicture)
|
||||
{
|
||||
this.marksPicture = marksPicture;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕图片
|
||||
*/
|
||||
public String getMarksPicture()
|
||||
{
|
||||
return marksPicture;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:留痕视频
|
||||
*/
|
||||
public void setMarksVideo(String marksVideo)
|
||||
{
|
||||
this.marksVideo = marksVideo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕视频
|
||||
*/
|
||||
public String getMarksVideo()
|
||||
{
|
||||
return marksVideo;
|
||||
}
|
||||
|
||||
public String getPointType() {
|
||||
return pointType;
|
||||
}
|
||||
|
||||
public void setPointType(String pointType) {
|
||||
this.pointType = pointType;
|
||||
}
|
||||
|
||||
public String getWorkname() {
|
||||
return workname;
|
||||
}
|
||||
|
||||
public void setWorkname(String workname) {
|
||||
this.workname = workname;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:工序名称
|
||||
*/
|
||||
public void setProcessName(String processName)
|
||||
{
|
||||
this.processName = processName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:工序名称
|
||||
*/
|
||||
public String getProcessName()
|
||||
{
|
||||
return processName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:问题描述
|
||||
*/
|
||||
public void setPositionPart(String positionPart)
|
||||
{
|
||||
this.positionPart = positionPart;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:问题描述
|
||||
*/
|
||||
public String getPositionPart()
|
||||
{
|
||||
return positionPart;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:留痕说明
|
||||
*/
|
||||
public void setMarksRemark(String marksRemark)
|
||||
{
|
||||
this.marksRemark = marksRemark;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:留痕说明
|
||||
*/
|
||||
public String getMarksRemark()
|
||||
{
|
||||
return marksRemark;
|
||||
}
|
||||
|
||||
|
||||
public String getMarksTime() {
|
||||
return marksTime;
|
||||
}
|
||||
|
||||
public void setMarksTime(String marksTime) {
|
||||
this.marksTime = marksTime;
|
||||
}
|
||||
|
||||
public String getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:创建人
|
||||
*/
|
||||
public void setCreateUser(String createUser)
|
||||
{
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:创建人
|
||||
*/
|
||||
public String getCreateUser()
|
||||
{
|
||||
return createUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:项目id
|
||||
*/
|
||||
public void setProjectId(Integer projectId)
|
||||
{
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:项目id
|
||||
*/
|
||||
public Integer getProjectId()
|
||||
{
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getAuditorPhone() {
|
||||
return auditorPhone;
|
||||
}
|
||||
|
||||
public void setAuditorPhone(String auditorPhone) {
|
||||
this.auditorPhone = auditorPhone;
|
||||
}
|
||||
|
||||
public int getCheckState() {
|
||||
return checkState;
|
||||
}
|
||||
|
||||
public void setCheckState(int checkState) {
|
||||
this.checkState = checkState;
|
||||
}
|
||||
|
||||
public String getTypeOfProject() {
|
||||
return typeOfProject;
|
||||
}
|
||||
|
||||
public void setTypeOfProject(String typeOfProject) {
|
||||
this.typeOfProject = typeOfProject;
|
||||
}
|
||||
|
||||
public String getProcedure() {
|
||||
return procedure;
|
||||
}
|
||||
|
||||
public void setProcedure(String procedure) {
|
||||
this.procedure = procedure;
|
||||
}
|
||||
|
||||
public String getEngineeringName() {
|
||||
return engineeringName;
|
||||
}
|
||||
|
||||
public void setEngineeringName(String engineeringName) {
|
||||
this.engineeringName = engineeringName;
|
||||
}
|
||||
|
||||
public String getIdcardnum() {
|
||||
return idcardnum;
|
||||
}
|
||||
|
||||
public void setIdcardnum(String idcardnum) {
|
||||
this.idcardnum = idcardnum;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.domain;
|
||||
|
||||
/**
|
||||
* 留痕上报流程实体
|
||||
*/
|
||||
public class SspMarksflow {
|
||||
|
||||
/** id */
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
*流程状态(0待审,1未通过,4通过)
|
||||
*/
|
||||
private String checkState;
|
||||
|
||||
/**
|
||||
* 留痕上报id
|
||||
*/
|
||||
private String mainId;
|
||||
|
||||
/**
|
||||
* 意见
|
||||
*/
|
||||
private String marksRemark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createUser;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 是否可删除
|
||||
*/
|
||||
private int isDel;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCheckState() {
|
||||
return checkState;
|
||||
}
|
||||
|
||||
public void setCheckState(String checkState) {
|
||||
this.checkState = checkState;
|
||||
}
|
||||
|
||||
public String getMainId() {
|
||||
return mainId;
|
||||
}
|
||||
|
||||
public void setMainId(String mainId) {
|
||||
this.mainId = mainId;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
|
||||
public int getIsDel() {
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public void setIsDel(int isDel) {
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getMarksRemark() {
|
||||
return marksRemark;
|
||||
}
|
||||
|
||||
public void setMarksRemark(String marksRemark) {
|
||||
this.marksRemark = marksRemark;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.mapper;
|
||||
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarkfileinfo;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报 数据层
|
||||
*
|
||||
* @author gwb
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
@Repository
|
||||
public interface SspMarksMapper
|
||||
{
|
||||
/**
|
||||
* 查询随手拍留痕上报信息
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 随手拍留痕上报信息
|
||||
*/
|
||||
public SspMarks selectSspMarksById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报列表
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 随手拍留痕上报集合
|
||||
*/
|
||||
public List<SspMarks> selectSspMarksList(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 新增随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 修改随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 删除随手拍留痕上报
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSspMarksById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除随手拍留痕上报
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSspMarksByIds(String[] ids);
|
||||
|
||||
|
||||
int addSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryPicture(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryVideo(SspMarks sspMarks);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarkfileinfo> queryPictureUrl(SspMarkfileinfo sspMarkfileinfo);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 视频
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarkfileinfo> queryVideoUrl(SspMarkfileinfo sspMarkfileinfo);
|
||||
|
||||
/**
|
||||
* 更新图片
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updatePicture(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新视频
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updateVideo(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新智能公司数据
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public int updateSmarkUrl(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据审核状态查询
|
||||
*
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryByCheckState(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据id查询留痕信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
SspMarks queryById(String id);
|
||||
|
||||
/**
|
||||
* 新增质量留痕提交记录
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int insertSspQualityMark(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 新增质量留痕审批流
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int insertSspQualityMarkApprove(Map<String,Object> map);
|
||||
}
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报 服务层
|
||||
*
|
||||
* @author mkl
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
public interface ISspMarksService
|
||||
{
|
||||
/**
|
||||
* 查询随手拍留痕上报信息
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 随手拍留痕上报信息
|
||||
*/
|
||||
public SspMarks selectSspMarksById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报列表
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 随手拍留痕上报集合
|
||||
*/
|
||||
public List<SspMarks> selectSspMarksList(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 新增随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 修改随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSspMarks(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 保存随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int saveSspMarks(SspMarks sspMarks);
|
||||
|
||||
|
||||
/**
|
||||
* 删除随手拍留痕上报信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSspMarksByIds(String ids);
|
||||
|
||||
|
||||
/**
|
||||
* 新增留痕数据上报
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
Object saveMarksAndMore(SspMarks sspMarks);
|
||||
|
||||
/**
|
||||
* 提交质量留痕记录
|
||||
* @param jsonObject
|
||||
* @return
|
||||
*/
|
||||
int saveQualityMark(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryPicture(SspMarks sspMarks);
|
||||
|
||||
|
||||
/**
|
||||
* 根据id和文件类型查询 图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<SspMarks> queryVideo(SspMarks sspMarks);
|
||||
|
||||
|
||||
/**
|
||||
* 查询留痕数据列表
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> queryMarksList(SspMarks sspMarks);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,403 +0,0 @@
|
|||
package com.ruoyi.web.sspMarks.service;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.web.sspManage.mapper.SspMapper;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarkfileinfo;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarks;
|
||||
import com.ruoyi.web.sspMarks.domain.SspMarksflow;
|
||||
import com.ruoyi.web.sspMarks.mapper.SspMarksMapper;
|
||||
import com.ruoyi.web.utils.MultipartFileUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* 随手拍留痕上报 服务层实现
|
||||
*
|
||||
* @author gwb
|
||||
* @date 2021-04-06
|
||||
*/
|
||||
@Service
|
||||
public class SspMarksServiceImpl implements ISspMarksService
|
||||
{
|
||||
@Autowired
|
||||
private SspMarksMapper sspMarksMapper;
|
||||
|
||||
@Autowired
|
||||
private SspMapper sspMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报信息
|
||||
*
|
||||
* @param id 随手拍留痕上报ID
|
||||
* @return 随手拍留痕上报信息
|
||||
*/
|
||||
@Override
|
||||
public SspMarks selectSspMarksById(Integer id)
|
||||
{
|
||||
return sspMarksMapper.selectSspMarksById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询随手拍留痕上报列表
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 随手拍留痕上报集合
|
||||
*/
|
||||
@Override
|
||||
public List<SspMarks> selectSspMarksList(SspMarks sspMarks)
|
||||
{
|
||||
return sspMarksMapper.selectSspMarksList(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSspMarks(SspMarks sspMarks)
|
||||
{
|
||||
return sspMarksMapper.insertSspMarks(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSspMarks(SspMarks sspMarks)
|
||||
{
|
||||
return sspMarksMapper.updateSspMarks(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存随手拍留痕上报
|
||||
*
|
||||
* @param sspMarks 随手拍留痕上报信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int saveSspMarks(SspMarks sspMarks)
|
||||
{
|
||||
String id = sspMarks.getId();
|
||||
int rows = 0;
|
||||
if (StringUtils.isNotNull(id))
|
||||
{
|
||||
rows = sspMarksMapper.updateSspMarks(sspMarks);
|
||||
}
|
||||
else
|
||||
{
|
||||
rows = sspMarksMapper.insertSspMarks(sspMarks);
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除随手拍留痕上报对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSspMarksByIds(String ids)
|
||||
{
|
||||
return sspMarksMapper.deleteSspMarksByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增留痕数据上报
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Object saveMarksAndMore(SspMarks sspMarks) {
|
||||
String result = "NO";
|
||||
sspMarks.setMarksTime(sspMarks.getMarksTime() + ":00");
|
||||
String simpleUUID = IdUtil.simpleUUID();
|
||||
sspMarks.setId(simpleUUID);
|
||||
//基本信息
|
||||
int m = sspMarksMapper.addSspMarks(sspMarks);
|
||||
|
||||
//审批流创建, mainId取基本信息的id
|
||||
SspMarksflow sspMarksflow = new SspMarksflow();
|
||||
sspMarksflow.setMainId(sspMarks.getId());
|
||||
sspMarksflow.setCheckState(sspMarks.getCheckState());
|
||||
sspMarksflow.setMarksRemark(sspMarks.getMarksRemark());
|
||||
sspMarksflow.setCreateTime(sspMarks.getCreateDate());
|
||||
sspMarksflow.setCreateUser(sspMarks.getCreateUser());
|
||||
|
||||
int b = sspMapper.saveSspMarkFlow(sspMarksflow);
|
||||
//图片
|
||||
int c = 0;
|
||||
JSONArray JSONArray = com.alibaba.fastjson.JSONArray.parseArray(sspMarks.getMarksPicture());
|
||||
|
||||
for (int i = 0; i < JSONArray.size(); i++) {
|
||||
String name = "sspImg-"+ UUID.randomUUID()+".jpg";
|
||||
String objImg64 = JSONArray.get(i).toString();
|
||||
String imgBase64One = objImg64.substring(0, objImg64.indexOf(","));
|
||||
String imgBase64 = objImg64.substring(imgBase64One.length()+1, objImg64.length());
|
||||
SspMarkfileinfo sspMarkfileinfo = new SspMarkfileinfo();
|
||||
Map<String, Object> imgMap = null;
|
||||
try {
|
||||
MultipartFile file = MultipartFileUtils.base64ToMultipartFile(objImg64);
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
sspMarkfileinfo.setFileUrl(fileName);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
sspMarkfileinfo.setFileType(0);
|
||||
sspMarkfileinfo.setCreateUser(sspMarks.getCreateUser());
|
||||
sspMarkfileinfo.setExternalId(sspMarksflow.getId());
|
||||
c = sspMapper.saveMarkFileInfo(sspMarkfileinfo);
|
||||
}
|
||||
//视频
|
||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(sspMarks.getMarksVideo())) {
|
||||
SspMarkfileinfo sspMarkfileinfo = new SspMarkfileinfo();
|
||||
sspMarkfileinfo.setFileUrl(sspMarks.getMarksVideo());
|
||||
sspMarkfileinfo.setFileType(1);
|
||||
sspMarkfileinfo.setCreateUser(sspMarks.getCreateUser());
|
||||
sspMarkfileinfo.setExternalId(sspMarksflow.getId());
|
||||
sspMapper.saveMarkFileInfo(sspMarkfileinfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新图片、视频url
|
||||
*/
|
||||
SspMarkfileinfo sspMarkfileinfo = new SspMarkfileinfo();
|
||||
sspMarkfileinfo.setExternalId(sspMarksflow.getId());
|
||||
String picture = "";
|
||||
List<SspMarkfileinfo> sspMarkfileinfoList = sspMarksMapper.queryPictureUrl(sspMarkfileinfo);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < sspMarkfileinfoList.size(); i++) {
|
||||
sb.append(sspMarkfileinfoList.get(i).getFileUrl()).append(",");
|
||||
}
|
||||
picture = sb.toString().substring(0,sb.toString().length()-1);
|
||||
Map<String, Object> parmsMap = new HashMap<>();
|
||||
parmsMap.put("smarkUrl", picture);
|
||||
parmsMap.put("id", sspMarks.getId());
|
||||
sspMarksMapper.updateSmarkUrl(parmsMap);
|
||||
|
||||
parmsMap.put("picture", sspMarkfileinfoList.get(0).getFileUrl());
|
||||
//展示一张图片
|
||||
sspMarksMapper.updatePicture(parmsMap);
|
||||
|
||||
|
||||
List<SspMarkfileinfo> vidceoSspMark = sspMarksMapper.queryVideoUrl(sspMarkfileinfo);
|
||||
parmsMap.put("video", vidceoSspMark == null || vidceoSspMark.size() == 0?"":vidceoSspMark.get(0).getFileUrl());
|
||||
sspMarksMapper.updateVideo(parmsMap);
|
||||
if( m > 0 && b> 0 && c > 0) {
|
||||
result = "OK";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int saveQualityMark(JSONObject jsonObject) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("projectId",jsonObject.containsKey("projectId")?jsonObject.getString("projectId"):"");
|
||||
map.put("workTime",jsonObject.containsKey("workTime")?jsonObject.getString("workTime"):"");
|
||||
map.put("positionId",jsonObject.containsKey("projectGhId")?jsonObject.getString("projectGhId"):"");
|
||||
map.put("paragrapId",jsonObject.containsKey("projectPlaceId")?jsonObject.getString("projectPlaceId"):"");
|
||||
map.put("locationId",jsonObject.containsKey("projectLocationId")?jsonObject.getString("projectLocationId"):"");
|
||||
map.put("conclusion",jsonObject.containsKey("conclusion")?jsonObject.getString("conclusion"):"");
|
||||
map.put("szUser",jsonObject.containsKey("SZUser")?jsonObject.getString("SZUser"):"");
|
||||
map.put("zjUserId",jsonObject.containsKey("ZJUserId")?jsonObject.getString("ZJUserId"):"");
|
||||
map.put("zbUserId",jsonObject.containsKey("ZBUserId")?jsonObject.getString("ZBUserId"):"");
|
||||
map.put("jlUserId",jsonObject.containsKey("JLUserId")?jsonObject.getString("JLUserId"):"");
|
||||
map.put("createUser",jsonObject.containsKey("create_user")?jsonObject.getString("create_user"):"");
|
||||
String beforeImgs = "";
|
||||
String afterImgs = "";
|
||||
if(jsonObject.containsKey("beforeImgSrcList")){
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("beforeImgSrcList");
|
||||
if(jsonArray.size() > 0){
|
||||
for(int i = 0;i<jsonArray.size();i++){
|
||||
if(i==0){
|
||||
beforeImgs = jsonArray.getString(i);
|
||||
}else{
|
||||
beforeImgs += (","+jsonArray.getString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(jsonObject.containsKey("afterImgSrcList")){
|
||||
JSONArray jsonArray = jsonObject.getJSONArray("afterImgSrcList");
|
||||
if(jsonArray.size() > 0){
|
||||
for(int i = 0;i<jsonArray.size();i++){
|
||||
if(i==0){
|
||||
afterImgs = jsonArray.getString(i);
|
||||
}else{
|
||||
afterImgs += (","+jsonArray.getString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
map.put("beforeImgs",beforeImgs);
|
||||
map.put("afterImgs",afterImgs);
|
||||
int i = sspMarksMapper.insertSspQualityMark(map);
|
||||
if(i == 1){
|
||||
int mark_id = Integer.parseInt(map.get("markId").toString());
|
||||
Map<String,Object> sp = new HashMap<>();
|
||||
sp.put("markId",mark_id);
|
||||
//总包审核人
|
||||
if(jsonObject.containsKey("ZBUserId")){
|
||||
sp.put("userId",jsonObject.getString("ZBUserId"));
|
||||
sp.put("userName",jsonObject.getString("ZBUserName"));
|
||||
sp.put("loginName",jsonObject.getString("ZBUserPhone"));
|
||||
sp.put("sort",1);
|
||||
sspMarksMapper.insertSspQualityMarkApprove(sp);
|
||||
}
|
||||
if(jsonObject.containsKey("JLUserId")){
|
||||
sp.put("userId",jsonObject.getString("JLUserId"));
|
||||
sp.put("userName",jsonObject.getString("JLUserName"));
|
||||
sp.put("loginName",jsonObject.getString("JLUserPhone"));
|
||||
sp.put("sort",2);
|
||||
sspMarksMapper.insertSspQualityMarkApprove(sp);
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据流程表id 和文件类型查询图片
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SspMarks> queryPicture(SspMarks sspMarks) {
|
||||
|
||||
return sspMarksMapper.queryPicture(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 视频
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SspMarks> queryVideo(SspMarks sspMarks) {
|
||||
return sspMarksMapper.queryVideo(sspMarks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询留痕上报列表
|
||||
*
|
||||
* @param sspMarks
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> queryMarksList(SspMarks sspMarks) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String projectName = "";
|
||||
List<SspMarks> publishMarks = new ArrayList<>();
|
||||
List<SspMarks> publishMarksMy = new ArrayList<>();
|
||||
//审核通过
|
||||
if("4".equals(sspMarks.getCheckState())) {
|
||||
publishMarks = sspMarksMapper.selectSspMarksList(sspMarks);
|
||||
for(SspMarks dbSspMarks:publishMarks){
|
||||
projectName = dbSspMarks.getMarksLocation();
|
||||
}
|
||||
} else if("".equals(sspMarks.getCheckState()) ) {
|
||||
|
||||
/***
|
||||
* 初始化页面
|
||||
*/
|
||||
sspMarks.setCheckState("4");
|
||||
publishMarks = sspMarksMapper.selectSspMarksList(sspMarks);
|
||||
for(SspMarks dbSspMarks:publishMarks){
|
||||
projectName = dbSspMarks.getMarksLocation();
|
||||
}
|
||||
|
||||
Map<String, Object> noPassMap = new HashMap<>();
|
||||
noPassMap.put("checkState", "1");
|
||||
noPassMap.put("projectId", sspMarks.getProjectId());
|
||||
|
||||
Map<String, Object> daiPassMap = new HashMap<>();
|
||||
daiPassMap.put("checkState", "0");
|
||||
daiPassMap.put("projectId", sspMarks.getProjectId());
|
||||
//没通过
|
||||
List<SspMarks> noPass = sspMarksMapper.queryByCheckState(noPassMap);
|
||||
for(SspMarks npSspMarks:noPass) {
|
||||
publishMarksMy.add(npSspMarks);
|
||||
}
|
||||
//待通过
|
||||
List<SspMarks> daiPass = sspMarksMapper.queryByCheckState(daiPassMap);
|
||||
for(SspMarks daiPassSmark:daiPass) {
|
||||
publishMarksMy.add(daiPassSmark);
|
||||
}
|
||||
|
||||
} else if("-1".equals(sspMarks.getCheckState())) {
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
*/
|
||||
//未通过
|
||||
Map<String, Object> noPassMap = new HashMap<>();
|
||||
noPassMap.put("checkState", "1");
|
||||
noPassMap.put("positionPart", sspMarks.getPositionPart());
|
||||
noPassMap.put("projectId", sspMarks.getProjectId());
|
||||
|
||||
|
||||
Map<String, Object> daiPassMap = new HashMap<>();
|
||||
daiPassMap.put("checkState", "0");
|
||||
daiPassMap.put("positionPart", sspMarks.getPositionPart());
|
||||
daiPassMap.put("projectId", sspMarks.getProjectId());
|
||||
|
||||
//没通过
|
||||
List<SspMarks> noPass = sspMarksMapper.queryByCheckState(noPassMap);
|
||||
for(SspMarks npSspMarks:noPass) {
|
||||
publishMarksMy.add(npSspMarks);
|
||||
}
|
||||
//待通过
|
||||
List<SspMarks> daiPass = sspMarksMapper.queryByCheckState(daiPassMap);
|
||||
for(SspMarks daiPassSmark:daiPass) {
|
||||
publishMarksMy.add(daiPassSmark);
|
||||
}
|
||||
//获取项目名称
|
||||
for(SspMarks dbSspMarks:publishMarksMy){
|
||||
projectName = dbSspMarks.getMarksLocation();
|
||||
}
|
||||
} else {
|
||||
if("0".equals(sspMarks.getCheckState()) || "1".equals(sspMarks.getCheckState())) {
|
||||
//待审核,审核通过
|
||||
publishMarksMy = sspMarksMapper.selectSspMarksList(sspMarks);
|
||||
for(SspMarks dbPublishMarksMy:publishMarksMy){
|
||||
projectName = dbPublishMarksMy.getMarksLocation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//项目地点
|
||||
returnMap.put("projectName", projectName);
|
||||
//发布列表
|
||||
returnMap.put("publishMarks", publishMarks);
|
||||
//发布列表数量
|
||||
returnMap.put("publishMarksSize", publishMarks.size());
|
||||
|
||||
//我的发布列表
|
||||
returnMap.put("publishMarksMy", publishMarksMy);
|
||||
//我的发布列表数量
|
||||
returnMap.put("publishMarksMySize", publishMarksMy.size());
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +1,17 @@
|
|||
package com.ruoyi.web.system.controller;
|
||||
package com.ruoyi.web.userLogin.controller;
|
||||
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.web.system.service.IWechatUserLoginService;
|
||||
import com.ruoyi.web.userLogin.service.IWechatUserLoginService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: LoginController
|
||||
|
|
@ -60,16 +61,14 @@ public class WechatUserLoginController extends BaseController {
|
|||
public AjaxResult openIdLogin(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
LoginUser loginUser = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
||||
if(loginUser!=null){
|
||||
// 生成令牌
|
||||
String token = tokenService.createToken(loginUser);
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
ajax.put("data",wechatUserLoginService.findUserInfo(loginUser.getUsername(),loginBody.getOpenId()));
|
||||
}else{
|
||||
ajax.put(Constants.TOKEN, "");
|
||||
Map<String,Object> data = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
||||
if(data!=null){
|
||||
ajax.put("data",data);
|
||||
return ajax;
|
||||
}else {
|
||||
return error();
|
||||
}
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -79,8 +78,8 @@ public class WechatUserLoginController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("/getOpenId")
|
||||
public Object getOpenId(String code,String appId){
|
||||
return wechatUserLoginService.getOpenId(code,appId);
|
||||
public AjaxResult getOpenId(String code,String appId){
|
||||
return success(wechatUserLoginService.getOpenId(code,appId));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -89,8 +88,30 @@ public class WechatUserLoginController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@GetMapping("/selectRoleMenuList")
|
||||
public Object selectRoleMenuList(String username){
|
||||
return wechatUserLoginService.selectRoleMenuList(username);
|
||||
public AjaxResult selectRoleMenuList(String username){
|
||||
return success(wechatUserLoginService.selectRoleMenuList(username));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询登录用户的组织架构
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/selectDeptAll")
|
||||
public AjaxResult selectDeptAll(@RequestParam Map<String,Object> map){
|
||||
return success(wechatUserLoginService.getDeptAll(map));
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 修改密码
|
||||
* @Param: [map]
|
||||
* @return: java.lang.Object
|
||||
* @Author: wxw
|
||||
* @Date: 2020/7/7 19:15
|
||||
*/
|
||||
@RequestMapping(value = "updatePassword",method = RequestMethod.POST)
|
||||
public Object updatePassword(@RequestParam Map<String,Object> map){
|
||||
return wechatUserLoginService.updataUser(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
package com.ruoyi.web.userLogin.controller;
|
||||
|
||||
import com.ruoyi.web.userLogin.service.WxUserLoginService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 微信小程序登录
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/weixin/userLogin/")
|
||||
public class WxUserLoginController {
|
||||
@Autowired
|
||||
private WxUserLoginService service;
|
||||
|
||||
/**
|
||||
* @Description: 验证登录密码账号
|
||||
* @Param: [map]
|
||||
* @return: java.lang.Object
|
||||
* @Author: wxw
|
||||
*/
|
||||
@RequestMapping(value = "checkPassWord",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object checkPassWord(String username, String password,String openId, HttpSession session){
|
||||
return service.checkLogoin(username,password,openId,session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 修改密码
|
||||
* @Param: [map]
|
||||
* @return: java.lang.Object
|
||||
* @Author: wxw
|
||||
* @Date: 2020/7/7 19:15
|
||||
*/
|
||||
@RequestMapping(value = "updatePassword",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updatePassword(@RequestParam Map<String,Object> map){
|
||||
return service.updataUser(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加用户openid
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "saveUserOpenId",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object saveUserOpenId(@RequestParam Map<String,Object> map){
|
||||
return service.addUserOpenId(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据openid查询数据
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "selectUserInfoByOpenId",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object selectUserInfoByOpenId(String openId, HttpSession session){
|
||||
return service.getUserInfoByOpenId(openId,session);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证手机号码是否已经绑定
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "checkBindByPhone",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object checkBindByPhone(String phone){
|
||||
return service.checkBindByPhone(phone);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出更多功能菜单信息
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("selectMenuList")
|
||||
@ResponseBody
|
||||
public Object selectMenuList(){
|
||||
return service.selectMenuList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询出openid
|
||||
* @param code
|
||||
* @param appId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getOpenId")
|
||||
@ResponseBody
|
||||
public Object getOpenId(String code,String appId){
|
||||
return service.getOpenId(code,appId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.web.system.mapper;
|
||||
package com.ruoyi.web.userLogin.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -19,6 +19,13 @@ public interface WechatUserLoginMapper {
|
|||
*/
|
||||
public Map<String,Object> findUserInfo(String loginName);
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updataUser(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 添加用户openid信息
|
||||
* @param map
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
package com.ruoyi.web.userLogin.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface WxUserLoginMapper {
|
||||
/**
|
||||
* 验证登录用户信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> checkLoginNameAndPsw(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updataUser(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 添加用户openid信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int addUserOpenId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 更新用户openid
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
int updateUserOpenId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据电话查询用户id
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
String getUserIdByPhone(String phone);
|
||||
|
||||
/**
|
||||
* 根据用户openid查询用户信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getUserInfoByOpenId(String openId);
|
||||
|
||||
/**
|
||||
* 验证手机号码是否已经绑定
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
int checkBindByPhone(String phone);
|
||||
|
||||
/**
|
||||
* 验证手机号码是否已经绑定
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
int checkBindByOpenId(String openId);
|
||||
|
||||
/**
|
||||
* 查询出系统菜单
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> selectMenuList();
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
package com.ruoyi.web.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
package com.ruoyi.web.userLogin.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -21,6 +19,13 @@ public interface IWechatUserLoginService {
|
|||
*/
|
||||
public Map<String,Object> findUserInfo(String loginName,String openId);
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
public Map<String,Object> updataUser(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 获取openId
|
||||
* @param code
|
||||
|
|
@ -34,7 +39,7 @@ public interface IWechatUserLoginService {
|
|||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
public LoginUser getLoginUserByOpenId(String openId);
|
||||
public Map<String,Object> getLoginUserByOpenId(String openId);
|
||||
|
||||
/**
|
||||
* 根据用户查询菜单信息
|
||||
|
|
@ -42,4 +47,11 @@ public interface IWechatUserLoginService {
|
|||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> selectRoleMenuList(String username);
|
||||
|
||||
/**
|
||||
* 查询用户的组织架构
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getDeptAll(Map<String,Object> map);
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
package com.ruoyi.web.userLogin.service;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.Map;
|
||||
|
||||
public interface WxUserLoginService {
|
||||
|
||||
/**
|
||||
* 验证用户登录
|
||||
* @param loginName
|
||||
* @param password
|
||||
* @param session
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> checkLogoin(String loginName,String password,String openId, HttpSession session);
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> updataUser(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 添加用户openid信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> addUserOpenId(Map<String,Object> map);
|
||||
|
||||
/**
|
||||
* 根据用户openid查询用户信息
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getUserInfoByOpenId(String openId, HttpSession session);
|
||||
|
||||
/**
|
||||
* 验证手机号码是否已经绑定
|
||||
* @param phone
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> checkBindByPhone(String phone);
|
||||
|
||||
/**
|
||||
* 查询出系统菜单
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> selectMenuList();
|
||||
|
||||
/**
|
||||
* 获取openId
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
Map<String,Object> getOpenId(String code,String appId);
|
||||
}
|
||||
|
|
@ -1,303 +0,0 @@
|
|||
package com.ruoyi.web.userLogin.service;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.ip.IpUtils;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.web.projectInfo.mapper.WxProjectInfoMapper;
|
||||
import com.ruoyi.web.userLogin.mapper.WxUserLoginMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class WxUserLoginServiceImpl implements WxUserLoginService{
|
||||
private static Map<String,String>appInfo = new HashMap<>();
|
||||
static {
|
||||
//智慧工地优管
|
||||
appInfo.put("wx23d12da8a7e50906","8438a009f433fb7fc8e8d4681d24d718");
|
||||
//产发数字系统
|
||||
appInfo.put("wxc44b5d588f599758","b4da7402397f559395db7c1b0534c369");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
@Autowired
|
||||
private WxUserLoginMapper mapper;
|
||||
|
||||
@Autowired
|
||||
private SysDeptMapper sysDeptMapper;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Autowired
|
||||
private WxProjectInfoMapper ProjectInfoMapper;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> checkLogoin(String loginName, String password,String openId, HttpSession session) {
|
||||
Map<String,Object> stateMap = new HashMap<>();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("loginName",loginName);
|
||||
// 用户名不在指定范围内 错误
|
||||
if (loginName.length() != UserConstants.PHONE_LENGTH)
|
||||
{
|
||||
stateMap.put("data","300");
|
||||
stateMap.put("info","账号错误,请您重新输入");
|
||||
}
|
||||
// 密码如果不在指定范围内 错误
|
||||
if (password.length() < UserConstants.PASSWORD_MIN_LENGTH
|
||||
|| password.length() > UserConstants.PASSWORD_MAX_LENGTH)
|
||||
{
|
||||
stateMap.put("data","300");
|
||||
stateMap.put("info","密码错误,请您重新输入");
|
||||
}
|
||||
// IP黑名单校验
|
||||
String blackStr = configService.selectConfigByKey("sys.login.blackIPList");
|
||||
if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr()))
|
||||
{
|
||||
stateMap.put("data","300");
|
||||
stateMap.put("info","当前登录IP未在白名单,请您联系系统供应商");
|
||||
}
|
||||
Map<String,Object> userMap = mapper.checkLoginNameAndPsw(map);
|
||||
if(userMap == null){
|
||||
stateMap.put("data","300");
|
||||
stateMap.put("info","账号不存在,请您重新输入");
|
||||
}else {
|
||||
if(!SecurityUtils.matchesPassword(password,userMap.get("password").toString())){
|
||||
stateMap.put("data","300");
|
||||
stateMap.put("info","密码错误,请您重新输入");
|
||||
}else {
|
||||
Map<String,Object> userInfo = new HashMap<>();
|
||||
userInfo.put("loginName",loginName);
|
||||
userInfo.put("userName",userMap.get("user_name"));
|
||||
userInfo.put("nickName",userMap.get("nick_name"));
|
||||
userInfo.put("deptName",userMap.get("dept_name"));
|
||||
userInfo.put("deptId",userMap.get("dept_id"));
|
||||
userInfo.put("userId",userMap.get("user_id"));
|
||||
userInfo.put("remark",userMap.containsKey("remark")?userMap.get("remark"):"");
|
||||
userInfo.put("roleId",userMap.get("roleId"));
|
||||
userInfo.put("roleName",userMap.get("roleName"));
|
||||
//存数据到session
|
||||
session.setAttribute("userInfo",userInfo);
|
||||
//设置缓存时间为一天
|
||||
session.setMaxInactiveInterval(60*60*24);
|
||||
/** 查询当前用户项目信息 **/
|
||||
//当前登录账号角色信息
|
||||
String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(userMap.get("user_id"))));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
Long deptId = this.getZgsDept(Convert.toLong(userMap.get("dept_id"))).getDeptId();
|
||||
map.put("nowDeptId",Convert.toStr(deptId));
|
||||
}else{
|
||||
map.put("nowDeptId",Convert.toStr(userMap.get("dept_id")));
|
||||
}
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
if(Convert.toInt(SysRoleEnum.JTGS.getCode())>Convert.toInt(nowRole)){
|
||||
nowRole = SysRoleEnum.JTGS.getCode();
|
||||
}
|
||||
map.put("nowRole",nowRole);
|
||||
List<Map<String, Object>> projectList = ProjectInfoMapper.getProjectByDeptIdAndCompanyId(map);
|
||||
stateMap.put("data","200");
|
||||
stateMap.put("info","登录成功");
|
||||
stateMap.put("userinfo",userInfo);
|
||||
//只有一个项目时直接保存项目信息
|
||||
if(projectList!=null && projectList.size()==1){
|
||||
Map<String,Object> projectInfo = new HashMap<>();
|
||||
projectInfo.put("projectId",projectList.get(0).get("projectId"));
|
||||
projectInfo.put("projectName",projectList.get(0).get("projectName"));
|
||||
projectInfo.put("projectInfoList",projectList);
|
||||
projectInfo.put("shengName","西安市");
|
||||
projectInfo.put("shiName","西咸新区");
|
||||
projectInfo.put("quName","泾河新城");
|
||||
projectInfo.put("logCompanyName",userMap.get("dept_name"));
|
||||
stateMap.put("projectInfo",projectInfo);
|
||||
}
|
||||
//存储用户openid
|
||||
map.put("userId", Convert.toStr(userMap.get("user_id")));
|
||||
map.put("nickname",userMap.get("nick_name"));
|
||||
map.put("openId",openId);
|
||||
//验证手机号码是否绑定
|
||||
int count = mapper.checkBindByOpenId(openId);
|
||||
if(count > 0){
|
||||
mapper.updateUserOpenId(map);
|
||||
}else {
|
||||
mapper.addUserOpenId(map);
|
||||
}
|
||||
}
|
||||
}
|
||||
return stateMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Object> updataUser(Map<String, Object> map) {
|
||||
Map<String,Object> infoMap = new HashMap<>();
|
||||
String oldPws = Convert.toStr(map.get("oldPsw"));
|
||||
SysUser sysUser = sysUserMapper.selectUserByUserName(Convert.toStr(map.get("loginName")));
|
||||
if(!SecurityUtils.matchesPassword(oldPws,sysUser.getPassword())) {
|
||||
infoMap.put("data","-1");
|
||||
infoMap.put("info","旧密码错误,请重新输入!");
|
||||
return infoMap;
|
||||
}
|
||||
if(!Convert.toStr(map.get("newPsw")).equals(Convert.toStr(map.get("password")))){
|
||||
infoMap.put("data","-2");
|
||||
infoMap.put("info","两次密码不一致,请重新输入!");
|
||||
return infoMap;
|
||||
}
|
||||
map.put("password",SecurityUtils.encryptPassword(Convert.toStr(map.get("password"))));
|
||||
if(mapper.updataUser(map) > 0){
|
||||
infoMap.put("data","200");
|
||||
infoMap.put("info","操作成功");
|
||||
}else {
|
||||
infoMap.put("data","-3");
|
||||
infoMap.put("info","操作失败!");
|
||||
}
|
||||
return infoMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Object> addUserOpenId(Map<String, Object> map) {
|
||||
Map<String,Object> dataMap = new HashMap<>(16);
|
||||
String userId =mapper.getUserIdByPhone(map.get("loginName").toString());
|
||||
if(StringUtils.isNotBlank(userId)){
|
||||
map.put("userId",userId);
|
||||
if(mapper.addUserOpenId(map)>0){
|
||||
dataMap.put("code","200");
|
||||
dataMap.put("msg","添加成功");
|
||||
}else {
|
||||
dataMap.put("code","300");
|
||||
dataMap.put("msg","添加失败");
|
||||
}
|
||||
}else {
|
||||
dataMap.put("code","300");
|
||||
dataMap.put("msg","添加失败,userId为空");
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getUserInfoByOpenId(String openId, HttpSession session) {
|
||||
Map<String,Object> map = new HashMap<>(16);
|
||||
Map<String,Object> dataMap = mapper.getUserInfoByOpenId(openId);
|
||||
if(dataMap != null){
|
||||
map.put("code","200");
|
||||
map.put("userinfo",dataMap);
|
||||
map.put("info","登录成功");
|
||||
//存数据到session
|
||||
session.setAttribute("userInfo",dataMap);
|
||||
//设置缓存时间为一天
|
||||
session.setMaxInactiveInterval(60*60*24);
|
||||
|
||||
/** 查询当前用户项目信息 **/
|
||||
Map<String,Object> searchMap = new HashMap<>(16);
|
||||
//当前登录账号角色信息
|
||||
String nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(dataMap.get("userId"))));
|
||||
if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
Long deptId = this.getZgsDept(Convert.toLong(dataMap.get("deptId"))).getDeptId();
|
||||
searchMap.put("nowDeptId",Convert.toStr(deptId));
|
||||
}else{
|
||||
searchMap.put("nowDeptId",Convert.toStr(dataMap.get("deptId")));
|
||||
}
|
||||
//当前角色时管理员时,修改角色为集团公司
|
||||
if(Convert.toInt(SysRoleEnum.JTGS.getCode())>Convert.toInt(nowRole)){
|
||||
nowRole = SysRoleEnum.JTGS.getCode();
|
||||
}
|
||||
searchMap.put("nowRole",nowRole);
|
||||
searchMap.put("userId",dataMap.get("userId"));
|
||||
List<Map<String, Object>> projectList = ProjectInfoMapper.getProjectByDeptIdAndCompanyId(searchMap);
|
||||
//只有一个项目时直接保存项目信息
|
||||
if(projectList!=null && projectList.size()==1){
|
||||
Map<String,Object> projectInfo = new HashMap<>();
|
||||
projectInfo.put("projectId",projectList.get(0).get("projectId"));
|
||||
projectInfo.put("projectName",projectList.get(0).get("projectName"));
|
||||
projectInfo.put("projectInfoList",projectList);
|
||||
projectInfo.put("shengName","西安市");
|
||||
projectInfo.put("shiName","西咸新区");
|
||||
projectInfo.put("quName","泾河新城");
|
||||
projectInfo.put("logCompanyName",dataMap.get("deptName"));
|
||||
map.put("projectInfo",projectInfo);
|
||||
}
|
||||
}else {
|
||||
map.put("code","300");
|
||||
map.put("msg","暂无数据");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> checkBindByPhone(String phone) {
|
||||
Map<String,Object> map = new HashMap<>(16);
|
||||
int count = mapper.checkBindByPhone(phone);
|
||||
if(count >0){
|
||||
map.put("code","300");
|
||||
map.put("msg","该号码已绑定,请重新输入!");
|
||||
}else {
|
||||
map.put("code","200");
|
||||
map.put("msg","验证成功");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectMenuList() {
|
||||
Map<String,Object> map = new HashMap<>(16);
|
||||
List<Map<String,Object>> list = mapper.selectMenuList();
|
||||
if(list != null && list.size() > 0){
|
||||
map.put("code","200");
|
||||
map.put("data",list);
|
||||
map.put("msg","查询成功");
|
||||
}else {
|
||||
map.put("code","300");
|
||||
map.put("msg","查询失败");
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子公司部门ID
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @return 结果
|
||||
*/
|
||||
private SysDept getZgsDept(Long deptId){
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(deptId);
|
||||
if(DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
//comFlag标识为1是子公司
|
||||
if(DeptTypeEnum.COMFLAG.getCode().equals(sysDept.getComFlag())){
|
||||
return sysDept;
|
||||
}else{
|
||||
return getZgsDept(sysDept.getParentId());
|
||||
}
|
||||
}else{
|
||||
return sysDept;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getOpenId(String code, String appId) {
|
||||
String url = "https://api.weixin.qq.com/sns/jscode2session?appid="+appId+"&secret="+appInfo.get(appId)+"&js_code="+code+"&grant_type=authorization_code";
|
||||
String resultStr = HttpUtil.get(url);
|
||||
JSONObject json = JSONObject.parseObject(resultStr);
|
||||
//删除参数session_key,否则小程序检测关键参数暴露,提示整改
|
||||
json.remove("session_key");
|
||||
return json;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,23 +1,27 @@
|
|||
package com.ruoyi.web.system.service.impl;
|
||||
package com.ruoyi.web.userLogin.service.impl;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.DeptTypeEnum;
|
||||
import com.ruoyi.common.enums.SysRoleEnum;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.system.mapper.SysDeptMapper;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.web.system.mapper.WechatUserLoginMapper;
|
||||
import com.ruoyi.web.system.service.IWechatUserLoginService;
|
||||
import com.ruoyi.web.project.mapper.WxProjectInfoMapper;
|
||||
import com.ruoyi.web.userLogin.mapper.WechatUserLoginMapper;
|
||||
import com.ruoyi.web.userLogin.service.IWechatUserLoginService;
|
||||
import com.yanzhu.jh.project.domain.SurProject;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -54,6 +58,15 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
|
|||
@Autowired
|
||||
private WechatUserLoginMapper wechatUserLoginMapper;
|
||||
|
||||
@Autowired
|
||||
private WxProjectInfoMapper ProjectInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
* @param loginName
|
||||
|
|
@ -73,6 +86,7 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
|
|||
userInfo.put("remark",userData.containsKey("remark")?userData.get("remark"):"");
|
||||
userInfo.put("roleId",userData.get("roleId"));
|
||||
userInfo.put("roleName",userData.get("roleName"));
|
||||
userInfo.put("minRoleId",userData.get("minRoleId"));
|
||||
/** 查询当前用户项目信息 **/
|
||||
|
||||
SurProject surProject = new SurProject();
|
||||
|
|
@ -124,13 +138,14 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
|
|||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
public LoginUser getLoginUserByOpenId(String openId) {
|
||||
public Map<String, Object> getLoginUserByOpenId(String openId) {
|
||||
Map<String,Object> userMap = wechatUserLoginMapper.getUserNameByOpenId(openId);
|
||||
if(userMap!=null){
|
||||
SysUser user = userService.selectUserByUserName(Convert.toStr(userMap.get("loginName")));
|
||||
return new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user));
|
||||
return this.findUserInfo(userMap.get("loginName").toString(),openId);
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -173,4 +188,93 @@ public class WechatUserLoginServiceImpl implements IWechatUserLoginService {
|
|||
return wechatUserLoginMapper.selectRoleMenuList(username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDeptAll(Map<String,Object> map) {
|
||||
//当前登录账号角色信息
|
||||
String nowRole = null;
|
||||
if(map.get("minRoleId")!=null && !"undefined".equals(map.get("minRoleId"))){
|
||||
nowRole = map.get("minRoleId").toString();
|
||||
}else{
|
||||
nowRole = Convert.toStr(sysRoleMapper.getUserMinRoleId(Convert.toLong(map.get("userId"))));
|
||||
}
|
||||
|
||||
Map<String,Object> dataMap = new HashMap<>(16);
|
||||
//组装数据
|
||||
dataMap.put("shengName","西安市");
|
||||
dataMap.put("shiName","西咸新区");
|
||||
dataMap.put("quName","泾河新城");
|
||||
//公司信息
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
Map<String,Object> totalMap = new HashMap<>(16);
|
||||
//查询出公司信息
|
||||
if(SysRoleEnum.ADMIN.getCode().equals(nowRole) || SysRoleEnum.SUPR.getCode().equals(nowRole) || SysRoleEnum.JTGS.getCode().equals(nowRole) ){
|
||||
List<Map<String,Object>> companyList = ProjectInfoMapper.getZGSDeptInfoByMap(map);
|
||||
totalMap.put("id","0");
|
||||
totalMap.put("text","泾河产业发展集团");
|
||||
list.add(totalMap);
|
||||
for(Map<String,Object> companyMap:companyList){
|
||||
totalMap = new HashMap<>(16);
|
||||
totalMap.put("id",companyMap.get("dept_id"));
|
||||
totalMap.put("text",companyMap.get("dept_name"));
|
||||
list.add(totalMap);
|
||||
}
|
||||
}else if(SysRoleEnum.ZGS.getCode().equals(nowRole)){
|
||||
SysDept sysDept = this.getZgsDept(Convert.toLong(map.get("deptId")));
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}else if(SysRoleEnum.COMMON.getCode().equals(nowRole)){
|
||||
//普通角色,获取真实部门
|
||||
SysDept sysDept = this.getZgsDept(Convert.toLong(map.get("deptId")));
|
||||
//判断当前部门是否是产业发展集团
|
||||
if(DeptTypeEnum.JTGS.getCode().equals(sysDept.getTypeFlag()) || DeptTypeEnum.ZGS.getCode().equals(sysDept.getTypeFlag())){
|
||||
sysDept = this.getZgsDept(Convert.toLong(sysDept.getDeptId()));
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}else{
|
||||
//普通角色
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}
|
||||
}else{
|
||||
//监理单位/总包单位/分包单位
|
||||
SysDept sysDept = sysDeptMapper.selectDeptById(Convert.toLong(map.get("deptId")));
|
||||
totalMap.put("id",sysDept.getDeptId());
|
||||
totalMap.put("text",sysDept.getDeptName());
|
||||
list.add(totalMap);
|
||||
}
|
||||
dataMap.put("province_list",list);
|
||||
dataMap.put("deptId",map.get("deptId"));
|
||||
dataMap.put("logCompanyName",list.get(0).get("text"));
|
||||
dataMap.put("companyId",list.get(0).get("text"));
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,Object> updataUser(Map<String, Object> map) {
|
||||
Map<String,Object> infoMap = new HashMap<>();
|
||||
String oldPws = Convert.toStr(map.get("oldPsw"));
|
||||
SysUser sysUser = sysUserMapper.selectUserByUserName(Convert.toStr(map.get("loginName")));
|
||||
if(!SecurityUtils.matchesPassword(oldPws,sysUser.getPassword())) {
|
||||
infoMap.put("data","-1");
|
||||
infoMap.put("info","旧密码错误,请重新输入!");
|
||||
return infoMap;
|
||||
}
|
||||
if(!Convert.toStr(map.get("newPsw")).equals(Convert.toStr(map.get("password")))){
|
||||
infoMap.put("data","-2");
|
||||
infoMap.put("info","两次密码不一致,请重新输入!");
|
||||
return infoMap;
|
||||
}
|
||||
map.put("password",SecurityUtils.encryptPassword(Convert.toStr(map.get("password"))));
|
||||
if(wechatUserLoginMapper.updataUser(map) > 0){
|
||||
infoMap.put("data","200");
|
||||
infoMap.put("info","操作成功");
|
||||
}else {
|
||||
infoMap.put("data","-3");
|
||||
infoMap.put("info","操作失败!");
|
||||
}
|
||||
return infoMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
package com.ruoyi.web.utils;
|
||||
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
||||
/**
|
||||
* JiangYuQi
|
||||
*/
|
||||
public class MultipartFileUtils {
|
||||
|
||||
public static MultipartFile base64ToMultipartFile(String base64) throws IOException {
|
||||
String[] parts = base64.split(",");
|
||||
String contentType = parts[0].split(";")[0].split(":")[1];
|
||||
byte[] bytes = Base64.getDecoder().decode(parts[1]);
|
||||
return new MockMultipartFile("file", "file", contentType, bytes);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,19 +2,7 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.projectInfo.mapper.WxProjectInfoMapper">
|
||||
|
||||
<!--查询出人员类型信息-->
|
||||
<select id="getPostIdByUserId" parameterType="String" resultType="String">
|
||||
SELECT
|
||||
spu.project_id as projectId
|
||||
FROM
|
||||
`sur_project_userinfo` spu
|
||||
LEFT JOIN sys_user su ON spu.user_id = su.user_id
|
||||
WHERE
|
||||
su.user_id =#{userId}
|
||||
AND su.del_flag = 0
|
||||
</select>
|
||||
<mapper namespace="com.ruoyi.web.project.mapper.WxProjectInfoMapper">
|
||||
|
||||
<!-- 查询组织架构下一层级 -->
|
||||
<select id="getDeptSubordinate" parameterType="map" resultType="map">
|
||||
|
|
@ -54,59 +42,6 @@
|
|||
GROUP BY ca.id,ca.areaName
|
||||
</select>
|
||||
|
||||
<!--根据组织架构id查询数据-->
|
||||
<select id="getDeptData" parameterType="String" resultType="map">
|
||||
select
|
||||
dept_id id,
|
||||
dept_name text
|
||||
from
|
||||
sys_dept
|
||||
where
|
||||
1 = 1
|
||||
AND del_flag = 0
|
||||
and dept_id=#{deptId}
|
||||
</select>
|
||||
|
||||
<!--查询出项目用户公司项目信息-->
|
||||
<select id="getCompanyAndProjectByUserId" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
IFNULL(spi.projectCode,'') streamNumber,
|
||||
spi.longitude,
|
||||
spi.latitude,
|
||||
spi.id,
|
||||
spi.projectName AS projectName,
|
||||
spi.projectAddress,
|
||||
sd.dept_name AS companyName,
|
||||
count(sew.id ) AS projectCount
|
||||
FROM
|
||||
sur_project_userinfo spu
|
||||
LEFT JOIN sur_project spi ON spu.project_id = spi.id
|
||||
LEFT JOIN sys_dept sd ON spi.deptId = sd.dept_id
|
||||
LEFT JOIN sur_early_warning sew ON sew.projectId = spi.id
|
||||
AND sew.createTime BETWEEN str_to_date( DATE_FORMAT( NOW( ), '%Y-%m-%d' ), '%Y-%m-%d %H:%i:%s' )
|
||||
AND str_to_date( now( ), '%Y-%m-%d %H:%i:%s' )
|
||||
WHERE
|
||||
1 = 1
|
||||
AND spu.user_id =#{userId}
|
||||
AND spi.isDel = 0
|
||||
</select>
|
||||
|
||||
|
||||
<!--查询所有省级-->
|
||||
<select id="getShengList" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
LEFT ( deptId, 12 ) id,
|
||||
( SELECT dept_name FROM sys_dept WHERE 1 = 1 AND dept_id = LEFT ( deptId, 12 ) ) text
|
||||
FROM
|
||||
`sur_project_info`
|
||||
WHERE
|
||||
1 = 1
|
||||
AND isDel = 0
|
||||
AND companyId IN ( SELECT id FROM sur_company_info WHERE 1 = 1 AND LEFT ( superiorCompany, length(#{superiorCompanyId}) ) =#{superiorCompanyId} )
|
||||
GROUP BY
|
||||
LEFT ( deptId, 12 )
|
||||
</select>
|
||||
|
||||
<!--根据所选层级或者公司查询登录用户的项目-->
|
||||
<select id="getProjectByDeptIdAndCompanyId" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
|
|
@ -129,6 +64,8 @@
|
|||
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = spi.id</if>
|
||||
WHERE
|
||||
spi.isDel = 0
|
||||
<!--检索条件-->
|
||||
<if test="projectName != null and projectName != ''"> and spi.projectName like concat('%', #{projectName}, '%')</if>
|
||||
<!--子部门数据-->
|
||||
<if test='nowRole == "4"'> and spi.deptId = #{nowDeptId}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
|
|
@ -143,145 +80,6 @@
|
|||
order by spi.projectSort
|
||||
</select>
|
||||
|
||||
<!--根据登录账号查询出企业信息-->
|
||||
<select id="getCompanyByUserId" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
sci.id,
|
||||
sci.companyName,
|
||||
IFNULL(sci.superiorCompany,'') superiorCompanyId
|
||||
FROM
|
||||
sur_company_user scu
|
||||
LEFT JOIN sur_company_info sci ON scu.manager_id = sci.id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND scu.user_Id =#{userId}
|
||||
and sci.isDel=0
|
||||
</select>
|
||||
|
||||
<!--企业人员根据组织架构查询出公司列表-->
|
||||
<select id="getCompanyQY" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
case when sci.superiorCompany=#{companyId} THEN '全部' ELSE (SELECT companyName FROM sur_company_info WHERE superiorCompany=SUBSTRING( sci.superiorCompany, 1, #{num} )) END text,
|
||||
SUBSTRING( sci.superiorCompany, 1, #{num} ) id
|
||||
FROM
|
||||
sur_project_info spi
|
||||
LEFT JOIN sur_company_info sci ON spi.companyId = sci.id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND sci.isDel = 0
|
||||
AND spi.deptId IN ( SELECT dept_id FROM sys_dept WHERE 1 = 1 AND LEFT ( dept_id, length( #{deptId} ) ) =#{deptId} )
|
||||
AND LEFT ( superiorCompany, length( #{companyId}) ) =#{companyId}
|
||||
<if test="num != null and num != '' and num1 !=null and num1 !=''">
|
||||
AND (LENGTH(SUBSTRING( sci.superiorCompany, 1, #{num} )) = #{num} OR LENGTH(sci.superiorCompany) = #{num1} )
|
||||
</if>
|
||||
GROUP BY
|
||||
SUBSTRING( sci.superiorCompany, 1, #{num})
|
||||
ORDER BY
|
||||
sci.id
|
||||
</select>
|
||||
|
||||
<!--根据公司id查询出公司名称-->
|
||||
<select id="getCompanyInfo" parameterType="map" resultType="map">
|
||||
select * from sur_company_info where 1=1 and superiorCompany=#{superiorCompany} and isDel=0
|
||||
</select>
|
||||
|
||||
<!--监管人员根据组织架构查询出公司列表-->
|
||||
<select id="getCompanyJG" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
SUBSTRING( sci.superiorCompany, 1, 4 ) id,
|
||||
(SELECT companyName FROM sur_company_info WHERE superiorCompany= SUBSTRING( sci.superiorCompany, 1, 4 )) text
|
||||
FROM
|
||||
sur_project_info spi
|
||||
LEFT JOIN sur_company_info sci ON spi.companyId = sci.id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND sci.isDel = 0
|
||||
AND spi.deptId IN ( SELECT dept_id FROM sys_dept WHERE 1 = 1 AND LEFT ( dept_id, length( #{deptId} ) ) =#{deptId} )
|
||||
GROUP BY
|
||||
SUBSTRING( sci.superiorCompany, 1, 4 )
|
||||
ORDER BY
|
||||
id
|
||||
</select>
|
||||
|
||||
<!--根据总公司层级查询出集团公司列表-->
|
||||
<select id="getCompanySonData" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
superiorCompany id,
|
||||
'全部' text
|
||||
FROM
|
||||
sur_company_info
|
||||
WHERE
|
||||
1 = 1
|
||||
AND isDel = 0
|
||||
AND superiorCompany =#{superiorCompanyId}
|
||||
UNION
|
||||
SELECT
|
||||
superiorCompany id,
|
||||
companyName text
|
||||
FROM
|
||||
`sur_company_info`
|
||||
WHERE
|
||||
1 = 1
|
||||
AND isDel = 0
|
||||
AND LEFT ( superiorCompany, length( #{superiorCompanyId} ) ) = #{superiorCompanyId}
|
||||
AND LENGTH( superiorCompany ) = length( #{superiorCompanyId} ) + 4
|
||||
</select>
|
||||
|
||||
<!--查询上一级公司-->
|
||||
<select id="getNextLevelCompany" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
superiorCompany superiorCompanyId,
|
||||
companyName text
|
||||
FROM
|
||||
sur_company_info
|
||||
WHERE
|
||||
1 = 1
|
||||
AND isDel = 0
|
||||
AND superiorCompany = LEFT (#{superiorCompanyId}, length( #{superiorCompanyId}) - 4 )
|
||||
</select>
|
||||
|
||||
<!-- 查询项目的经度纬度列表 -->
|
||||
<select id="selectProjectPoint" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
id projectId,
|
||||
longitude,
|
||||
latitude,
|
||||
projectName
|
||||
FROM
|
||||
sur_project
|
||||
WHERE
|
||||
deptId = #{deptId}
|
||||
AND isDel = '0'
|
||||
</select>
|
||||
|
||||
<!-- 查询建设单位下的项目个数 -->
|
||||
<select id="selectProjectSize" parameterType="String" resultType="Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
sur_project
|
||||
WHERE
|
||||
deptId = #{deptId}
|
||||
AND isDel = '0'
|
||||
</select>
|
||||
|
||||
<!-- 查询项目的基本信息 -->
|
||||
<select id="selectProjectInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
pro.id,
|
||||
man.companyName engineeringName,
|
||||
pro.projectName name,
|
||||
IFNULL(pro.projectAddress,'') projectAddress,
|
||||
IFNULL(pro.streamNumber,'') streamNumber
|
||||
FROM
|
||||
sur_project_info pro
|
||||
LEFT JOIN sur_company_info man ON pro.companyId = man.id
|
||||
WHERE
|
||||
pro.isDel = '0'
|
||||
<if test="deptId != null and deptId !=''">AND companyId = #{deptId}</if>
|
||||
<if test="id != null and id !=''">AND pro.id = #{id}</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询项目的概况信息 -->
|
||||
<select id="selectProjectOverview" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
|
|
@ -339,162 +137,6 @@
|
|||
AND spi.isDel = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询项目的管理概况 -->
|
||||
<select id="selectProjectManage" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
companyName engineeringName
|
||||
FROM
|
||||
sur_company_info man
|
||||
LEFT JOIN sur_project pro ON man.id = pro.companyId
|
||||
WHERE
|
||||
pro.id = #{id}
|
||||
AND pro.isDel = '0'
|
||||
</select>
|
||||
|
||||
<!--模糊查询项目信息-->
|
||||
<select id="getProjectInfoByName" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
spi.id projectId,
|
||||
spi.projectName,
|
||||
spi.longitude,
|
||||
spi.latitude,
|
||||
spi.projectAddress,
|
||||
IFNULL( spi.projectCode, '' ) streamNumber,
|
||||
sd.dept_id AS deptId,
|
||||
sd.dept_name AS companyName,
|
||||
SUM(CASE WHEN sew.type = 5 THEN 1 ELSE 0 END) AS videoNum,
|
||||
COUNT( DISTINCT sew.id ) projectCount
|
||||
FROM
|
||||
sur_project spi
|
||||
LEFT JOIN china_area ca ON spi.projectRegional = ca.id
|
||||
LEFT JOIN sys_dept sd ON spi.deptId = sd.dept_id
|
||||
LEFT JOIN sur_early_warning sew ON spi.id = sew.projectId
|
||||
AND DATE( sew.createTime ) = DATE_FORMAT( NOW( ), '%Y-%m-%d' )
|
||||
WHERE
|
||||
spi.isDel = 0
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and deptId IN ( SELECT dept_id FROM sys_dept WHERE 1 = 1 AND LEFT ( dept_id, length( #{deptId}) ) =#{deptId} )
|
||||
</if>
|
||||
<if test="projectId != null and projectId != ''">and spi.id=#{projectId}</if>
|
||||
AND spi.projectName LIKE CONCAT( '%', #{projectName}, '%')
|
||||
AND spi.isDel = 0
|
||||
GROUP BY spi.id
|
||||
</select>
|
||||
|
||||
<!--模糊查询出预警项目-->
|
||||
<select id="getProjectInfoEnviron" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
spi.id projectId,
|
||||
spi.projectName,
|
||||
spi.projectAddress,
|
||||
IFNULL(spi.streamNumber,'') streamNumber,
|
||||
( SELECT companyName FROM sur_company_info WHERE 1 = 1 AND id = spi.companyId ) companyName,
|
||||
sum( 1 ) projectCount,
|
||||
sum( CASE WHEN sew.type = 5 THEN 1 ELSE 0 END ) videoNum,
|
||||
sum( CASE WHEN sew.type = 6 THEN 1 ELSE 0 END ) progressNum
|
||||
FROM
|
||||
sur_project_info spi
|
||||
LEFT JOIN sur_company_info sci ON spi.companyId = sci.id
|
||||
LEFT JOIN `sur_early_warning` sew ON sew.projectId = spi.id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND spi.isDel = 0
|
||||
AND sci.isDel = 0
|
||||
AND sew.createTime BETWEEN str_to_date( #{startTime}, '%Y-%m-%d %H:%i:%s' )
|
||||
AND str_to_date( #{endTime}, '%Y-%m-%d %H:%i:%s' )
|
||||
<if test="projectId != null and projectId !=''">and spi.id=#{projectId}</if>
|
||||
<if test="companyId != null and companyId != '' and ifSonCompany ==1">
|
||||
AND spi.companyId in( SELECT id FROM sur_company_info WHERE 1 = 1 AND LEFT ( superiorCompany, length( #{companyId}) ) =#{companyId})
|
||||
</if>
|
||||
<if test="companyId != null and companyId != '' and ifSonCompany ==2">
|
||||
AND spi.companyId in( SELECT id FROM sur_company_info WHERE 1 = 1 AND LEFT ( superiorCompany, length( #{companyId}) ) =#{companyId})
|
||||
</if>
|
||||
<if test="companyId != null and companyId != '' and ifSonCompany == 3">
|
||||
AND spi.companyId =(SELECT id FROM sur_company_info WHERE 1 = 1 and superiorCompany=#{companyId})
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''"> AND deptId IN ( SELECT dept_id FROM sys_dept WHERE 1 = 1 AND LEFT ( dept_id, length( #{deptId} ) ) =#{deptId} ) </if>
|
||||
<if test="projectId != null and projectId != ''">and spi.id=#{projectId}</if>
|
||||
AND spi.projectName LIKE CONCAT( '%', #{projectName}, '%')
|
||||
GROUP BY
|
||||
spi.projectName
|
||||
</select>
|
||||
|
||||
<select id="getChinaProvince" resultType="map">
|
||||
select * from china_city
|
||||
</select>
|
||||
|
||||
<insert id="addChinaCity" parameterType="map">
|
||||
insert into china_area
|
||||
(
|
||||
areaName,
|
||||
provinceId,
|
||||
provinceName,
|
||||
cityId,
|
||||
cityName,
|
||||
adcode,
|
||||
lat,
|
||||
lng
|
||||
)values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{item.areaName},
|
||||
#{item.provinceId},
|
||||
#{item.provinceName},
|
||||
#{item.cityId},
|
||||
#{item.cityName},
|
||||
#{item.adcode},
|
||||
#{item.lat},
|
||||
#{item.lng}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
<!--查询项目相关信息-->
|
||||
<select id="getProjectAndChinaData" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
ca.provinceId,
|
||||
ca.provinceName,
|
||||
ca.cityId,
|
||||
ca.cityName,
|
||||
ca.id AS areaId,
|
||||
ca.areaName,
|
||||
spi.id AS projectId,
|
||||
spi.projectName AS projectName,
|
||||
spi.deptId
|
||||
FROM
|
||||
`china_area` ca
|
||||
LEFT JOIN sur_project spi ON ca.id = spi.projectRegional
|
||||
WHERE
|
||||
spi.isDel = 0
|
||||
AND spi.id =#{projectId}
|
||||
</select>
|
||||
|
||||
<!--查询公司信息-->
|
||||
<select id="getDeptInfo" resultType="map">
|
||||
SELECT
|
||||
sd.dept_id,
|
||||
sd.dept_name
|
||||
FROM
|
||||
sys_dept sd
|
||||
WHERE
|
||||
sd.dept_id = 101
|
||||
</select>
|
||||
|
||||
<!--查询公司信息-->
|
||||
<select id="getDeptInfoByMap" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
sd.dept_id,
|
||||
sd.dept_name,
|
||||
sd.type_flag
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id
|
||||
WHERE
|
||||
su.del_flag = 0
|
||||
AND su.user_id =#{userId}
|
||||
</select>
|
||||
|
||||
<!--查询公司信息-->
|
||||
<select id="getZGSDeptInfoByMap" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
|
|
@ -507,38 +149,6 @@
|
|||
AND sd.com_flag = '1'
|
||||
</select>
|
||||
|
||||
<!--查询出省份信息-->
|
||||
<select id="getChinaProvinceList" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ca.provinceId AS id,
|
||||
ca.provinceName AS text
|
||||
FROM
|
||||
sur_project spi
|
||||
LEFT JOIN china_area ca ON spi.projectRegional = ca.id
|
||||
left join sur_project_userinfo spu on spu.project_id = spi.id
|
||||
WHERE
|
||||
spi.isDel = 0
|
||||
and spu.is_del=0
|
||||
and spu.user_id = #{userId}
|
||||
GROUP BY ca.provinceId,ca.provinceName
|
||||
</select>
|
||||
|
||||
<!--获取公司下一层级-->
|
||||
<select id="getDeptIdNext" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
#{deptId} AS id,
|
||||
'全部' AS text
|
||||
UNION ALL
|
||||
SELECT
|
||||
dept_id AS id,
|
||||
dept_name AS text
|
||||
FROM
|
||||
sys_dept
|
||||
WHERE
|
||||
del_flag = 0
|
||||
AND LENGTH( dept_id ) = length( #{deptId}) + 4
|
||||
</select>
|
||||
|
||||
<!--获取建设单位-->
|
||||
<select id="getProjectUnitList" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -1,637 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.pshManage.mapper.PshMapper">
|
||||
|
||||
<!-- 查询随手拍信息的列表(问题整改) -->
|
||||
<select id="listSspInfoChanges" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssp.id,
|
||||
ssp.projectId,
|
||||
spi.projectName,
|
||||
ssp.problemArea,
|
||||
ssp.workParts,
|
||||
ssp.changeInfo,
|
||||
ssp.checkState,
|
||||
date_format(ssp.createTime,'%Y-%m-%d %H:%i') AS createTime,
|
||||
ssf.fileUrl,
|
||||
ssp.lordSent,
|
||||
ssp.lordSentUser,
|
||||
ssp.copySend,
|
||||
ssp.copySendUser,
|
||||
ssp.marks_picture as marksPicture,
|
||||
ssp.marks_video as marksVideo,
|
||||
ssp.smark_url as smarkUrl,
|
||||
(case when ssp.lordSentUser = #{loginName} then 1 else 0 end) sort,
|
||||
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp
|
||||
LEFT JOIN smz_ssp_auditinfo ssa ON ssp.id = ssa.mainId and (ssa.processState='0' or ssa.processState ='1')
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||
left join sys_dept sd on sd.dept_id = spi.deptId
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
AND ssp.infoType = 0
|
||||
and ssp.isDel=0
|
||||
<if test="searchText != null and searchText != ''"> AND ssp.workParts LIKE CONCAT('%',#{searchText},'%')</if>
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(ssp.createTime) </if>
|
||||
<if test="infoType != null and infoType != ''"> AND ssp.infoType = #{infoType}</if>
|
||||
<if test="checkState != null and checkState != ''"> AND ssp.checkState = #{checkState} </if>
|
||||
AND (FIND_IN_SET(#{loginName}, ssp.copySendUser) OR FIND_IN_SET(#{loginName}, ssp.lordSentUser) OR FIND_IN_SET(#{loginName}, ssp.recheckSendUser))
|
||||
GROUP BY ssp.id
|
||||
ORDER BY sort DESC,createTime DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询随手拍信息的列表(问题整改,留痕上报) -->
|
||||
<select id="listSspInfoMyNicked" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssp.id,
|
||||
ssp.projectId,
|
||||
spi.projectName,
|
||||
ssp.workParts,
|
||||
ssp.checkState,
|
||||
ssp.nickedArea,
|
||||
ssp.nickedTime,
|
||||
ssp.projectType,
|
||||
ssp.processName,
|
||||
ssp.projectName,
|
||||
ssp.nickedInfo,
|
||||
ssp.checkUser,
|
||||
ssp.checkUserPhone,
|
||||
date_format(ssp.createTime,'%Y-%m-%d %H:%i') AS createTime,
|
||||
ssf.fileUrl,
|
||||
ssp.changeInfo,
|
||||
ssp.lordSent,
|
||||
ssp.lordSentUser,
|
||||
ssp.copySend,
|
||||
ssp.marks_picture as marksPicture,
|
||||
ssp.marks_video as marksVideo,
|
||||
ssp.smark_url as smarkUrl,
|
||||
ssp.copySendUser,
|
||||
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp
|
||||
LEFT JOIN smz_ssp_auditinfo ssa ON ssp.id = ssa.mainId and (ssa.processState='0' or ssa.processState ='1')
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||
left join sys_dept sd on sd.dept_id = spi.deptId
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
and ssp.isDel=0
|
||||
AND ssp.infoType = 0
|
||||
AND ssp.createUser = #{loginName}
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(ssp.createTime) </if>
|
||||
<if test="checkState != null and checkState != ''"> AND ssp.checkState = #{checkState} </if>
|
||||
<if test="searchText != null and searchText != ''"> AND ssp.workParts LIKE CONCAT('%',#{searchText},'%')</if>
|
||||
GROUP BY ssp.id
|
||||
</select>
|
||||
|
||||
<!-- 根据id查询相关的基本信息 -->
|
||||
<select id="queryChangeNickedInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssp.*,
|
||||
case when ud.type_flag in (1,11) then CONCAT(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd.dict_label ,']') end as projectUnit,
|
||||
su.`nick_name` `name`,
|
||||
sd2.dict_label as danger_typeName,
|
||||
ssa.id checkId
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp
|
||||
LEFT JOIN smz_ssp_auditinfo ssa ON ssp.id = ssa.mainId
|
||||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||
left join sys_dept sd on sd.dept_id = spi.deptId
|
||||
left join sur_project_unit_info spui on spui.projectId = spi.id and spui.unitId = su.dept_id
|
||||
left join sys_dict_data sdd on sdd.dict_type = 'sys_dept_type' and sdd.dict_value = spui.unitType
|
||||
left join sys_dict_data sd2 on sd2.dict_type = 'ssp_aqyhlx' and sd2.dict_value = ssp.danger_type
|
||||
WHERE
|
||||
ssp.id = #{id}
|
||||
GROUP BY ssp.id
|
||||
</select>
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="listChangeNickedFile" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_fileinfo
|
||||
WHERE
|
||||
auditId = #{auditId}
|
||||
AND fileType = #{fileType}
|
||||
</select>
|
||||
|
||||
<!-- 新增问题整改主表信息 -->
|
||||
<insert id="saveSspInfoChanges" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO
|
||||
smz_ssp_problemmodify
|
||||
( projectId,
|
||||
infoType,
|
||||
problemArea,
|
||||
workParts,
|
||||
changeInfo,
|
||||
lordSent,
|
||||
lordSentUser,
|
||||
copySend,
|
||||
copySendUser,
|
||||
checkState,
|
||||
nickedTime,
|
||||
danger_type,
|
||||
recheckSend,
|
||||
recheckSendUser,
|
||||
roleType,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime )
|
||||
VALUES
|
||||
(
|
||||
#{projectId},
|
||||
0,
|
||||
#{problemArea},
|
||||
#{workParts},
|
||||
#{changeInfo},
|
||||
#{lordSent},
|
||||
#{lordSentUser},
|
||||
#{copySend},
|
||||
#{copySendUser},
|
||||
0,
|
||||
#{nickedTime},
|
||||
#{dangerType},
|
||||
#{recheckSend},
|
||||
#{recheckSendUser},
|
||||
#{roleType},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
);
|
||||
</insert>
|
||||
|
||||
<insert id="saveSspInfoNicked" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO
|
||||
smz_ssp_problemmodify
|
||||
( projectId,
|
||||
infoType,
|
||||
workParts,
|
||||
nickedArea,
|
||||
nickedTime,
|
||||
projectType,
|
||||
processName,
|
||||
projectName,
|
||||
nickedInfo,
|
||||
checkUser,
|
||||
checkUserPhone,
|
||||
checkState,
|
||||
danger_type,
|
||||
recheckSend,
|
||||
recheckSendUser,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime )
|
||||
VALUES
|
||||
(
|
||||
#{projectId},
|
||||
0,
|
||||
#{workParts},
|
||||
#{nickedArea},
|
||||
#{nickedTime},
|
||||
#{projectType},
|
||||
#{processName},
|
||||
#{projectName},
|
||||
#{nickedInfo},
|
||||
#{checkUser},
|
||||
#{checkUserPhone},
|
||||
0,
|
||||
#{dangerType},
|
||||
#{recheckSend},
|
||||
#{recheckSendUser},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="updateSmzSspProblemmodify" parameterType="map" keyProperty="id" keyColumn="id">
|
||||
update smz_ssp_problemmodify
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="marksPicture != null">marks_picture = #{marksPicture},</if>
|
||||
<if test="marksVideo != null">marks_video = #{marksVideo},</if>
|
||||
<if test="smarkUrl != null">smark_url = #{smarkUrl},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 新增流程信息 -->
|
||||
<insert id="saveSspAuditInfo" parameterType="map" useGeneratedKeys="true" keyProperty="auditId" keyColumn="auditId">
|
||||
INSERT INTO
|
||||
smz_ssp_auditinfo
|
||||
( mainId,
|
||||
<if test="processState != null and processState != '' ">processState, </if>
|
||||
opinion,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{mainId},
|
||||
<if test="processState != null and processState != '' ">#{processState}, </if>
|
||||
#{opinion},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 新增留痕流程信息 -->
|
||||
<insert id="saveSspMarkFlow" parameterType="com.ruoyi.web.sspMarks.domain.SspMarksflow" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO
|
||||
smz_ssp_marksflow
|
||||
(
|
||||
<if test="id != null and id != '' ">id, </if>
|
||||
mainId,
|
||||
checkState,
|
||||
marksRemark,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
<if test="id != null and id != '' ">#{id}, </if>
|
||||
#{mainId},
|
||||
#{checkState},
|
||||
#{marksRemark},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 新增文件信息 -->
|
||||
<insert id="saveSspFileInfo" parameterType="map">
|
||||
INSERT INTO
|
||||
smz_ssp_fileinfo
|
||||
( auditId,
|
||||
fileType,
|
||||
fileUrl,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{auditId},
|
||||
#{fileType},
|
||||
#{fileUrl},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 新增留痕上报文件 -->
|
||||
<insert id="saveMarkFileInfo" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
INSERT INTO
|
||||
smz_ssp_markfileinfo
|
||||
(
|
||||
externalId,
|
||||
fileType,
|
||||
fileUrl,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{externalId},
|
||||
#{fileType},
|
||||
#{fileUrl},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 修改状态 -->
|
||||
<update id="updateState" parameterType="map">
|
||||
UPDATE ${tableName} SET ${fieldName} = #{checkState} WHERE ${keySet} = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateStateOk" parameterType="map">
|
||||
UPDATE ${tableName} SET ${fieldName} = #{checkState},updateTime = NOW() WHERE ${keySet} = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 查询已整改的基本信息 -->
|
||||
<select id="queryOpinion" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
mainId,
|
||||
opinion,
|
||||
createTime
|
||||
FROM
|
||||
smz_ssp_auditinfo
|
||||
WHERE
|
||||
mainId = #{id}
|
||||
AND isDel = 0
|
||||
AND processState = 1
|
||||
</select>
|
||||
|
||||
<!-- 查询已整改的基本信息 -->
|
||||
<select id="queryOpinionChange" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
mainId,
|
||||
opinion,
|
||||
createTime
|
||||
FROM
|
||||
smz_ssp_auditinfo ssa
|
||||
WHERE
|
||||
ssa.mainId = #{id}
|
||||
AND ssa.isDel = 0
|
||||
AND processState = 0
|
||||
ORDER BY createTime DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询已整改的文件信息 -->
|
||||
<select id="listOpinionFile" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssf.fileType,
|
||||
ssf.fileUrl
|
||||
FROM
|
||||
smz_ssp_auditinfo ssa
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
WHERE
|
||||
ssa.mainId = #{id}
|
||||
AND ssa.isDel = 0
|
||||
AND ssa.processState = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询人员的信息 -->
|
||||
<select id="listUserInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
nick_name `name`,
|
||||
phonenumber `phone`
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sur_project_userinfo spu ON su.user_id = spu.user_id
|
||||
WHERE
|
||||
spu.project_id = #{projectId}
|
||||
AND su.phonenumber != #{loginName}
|
||||
<if test="name != null and name != ''"> AND `nick_name` LIKE concat('%',#{name},'%')</if>
|
||||
AND su.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="queryUserInfo" parameterType="java.lang.String" resultType="java.util.Map">
|
||||
SELECT user_id,IFNULL(phonenumber,'') login_name,IFNULL(nick_name,'') user_name
|
||||
FROM `sys_user` WHERE phonenumber = #{loginName}
|
||||
</select>
|
||||
|
||||
<select id="queryUserList" parameterType="map" resultType="map">
|
||||
SELECT u.`user_id` id,u.`phonenumber` `phone`,u.`nick_name` `name`
|
||||
FROM `sur_project_userinfo` pu
|
||||
LEFT JOIN `sys_user` u ON u.`user_id` = pu.`user_id`
|
||||
LEFT JOIN `sys_user_role` ur ON ur.`user_id` = u.`user_id`
|
||||
WHERE u.`del_flag` = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND pu.`project_id` = #{projectId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND CONCAT(u.`phonenumber`,u.`nick_name`) LIKE CONCAT('%',#{name},'%')
|
||||
</if>
|
||||
<if test="roleId != null and roleId != ''">
|
||||
AND ur.`role_id` = #{roleId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询负责人的项目归属 -->
|
||||
<select id="queryUserProjectInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
projectName `dep`
|
||||
FROM
|
||||
sur_project
|
||||
WHERE
|
||||
id = #{projectId}
|
||||
AND isDel = '0'
|
||||
</select>
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryFileInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
m.fileUrl,
|
||||
m.fileType
|
||||
FROM
|
||||
smz_ssp_markfileinfo m
|
||||
LEFT JOIN smz_ssp_marksflow f ON m.externalId = f.id
|
||||
WHERE
|
||||
fileType = #{fileType}
|
||||
AND m.externalId = #{externalId}
|
||||
</select>
|
||||
|
||||
<!-- 查询当前审核流程的信息 -->
|
||||
<select id="queryAuditInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
id,
|
||||
opinion,
|
||||
processState
|
||||
FROM
|
||||
smz_ssp_auditinfo
|
||||
WHERE
|
||||
mainId = #{id}
|
||||
AND isDel = 0
|
||||
ORDER BY createTime DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询驳回信息 -->
|
||||
<select id="queryRejectInfo" parameterType="map" resultType="String">
|
||||
SELECT
|
||||
opinion
|
||||
FROM
|
||||
smz_ssp_auditinfo
|
||||
WHERE
|
||||
mainId = #{id}
|
||||
AND isDel = 0
|
||||
AND processState = '2'
|
||||
ORDER BY createTime DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询N次提交的图片信息 -->
|
||||
<select id="listRejectFile" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssf.fileType,
|
||||
ssf.fileUrl
|
||||
FROM
|
||||
smz_ssp_auditinfo ssa
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
WHERE
|
||||
ssf.auditId = #{id}
|
||||
AND ssa.isDel = 0
|
||||
AND ssa.processState = 0
|
||||
</select>
|
||||
|
||||
<!-- 添加驳回的审核意见 -->
|
||||
<insert id="saveSspAuditInfoReject" parameterType="map">
|
||||
INSERT INTO
|
||||
smz_ssp_auditinfo
|
||||
( mainId,
|
||||
processState,
|
||||
opinion,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{mainId},
|
||||
2,
|
||||
#{opinion},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 添加通过的审核意见 -->
|
||||
<insert id="saveSspAuditInfoPass" parameterType="map">
|
||||
INSERT INTO
|
||||
smz_ssp_auditinfo
|
||||
( mainId,
|
||||
processState,
|
||||
opinion,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{mainId},
|
||||
4,
|
||||
#{opinion},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="querySspQualityMarkList" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT m.mark_id, m.`work_time`, m.`before_imgs`, m.`after_imgs`, g.`position_name`, p.`paragrap_name`,l.`location_name`,
|
||||
m.sz_user sz_user_name,u2.`nick_name` zj_user_name,u3.`nick_name` zb_user_name,u4.`nick_name` jl_user_name,
|
||||
m.state,m.create_time
|
||||
FROM `smz_ssp_quality_mark` m
|
||||
LEFT JOIN `sur_project_work_position` g ON g.`position_id` = m.`position_id`
|
||||
LEFT JOIN `sur_project_work_paragrap` p ON p.`paragrap_id` = m.`paragrap_id`
|
||||
LEFT JOIN `sur_project_work_location` l ON l.`location_id` = m.`location_id`
|
||||
LEFT JOIN `sys_user` u2 ON u2.`user_id` = m.`zj_user_id`
|
||||
LEFT JOIN `sys_user` u3 ON u3.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `sys_user` u4 ON u4.`user_id` = m.`jl_user_id`
|
||||
WHERE m.`del_flag` = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND m.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND m.create_time between CONCAT(#{startTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
<if test="state != null and state != ''">
|
||||
AND m.state = #{state}
|
||||
</if>
|
||||
<if test="searchText != null and searchText != ''">
|
||||
AND CONCAT(g.`position_name`,p.`paragrap_name`,l.`location_name`) LIKE CONCAT('%',#{searchText},'%')
|
||||
</if>
|
||||
ORDER by m.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkMyList" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT m.mark_id, m.`work_time`, m.`before_imgs`, m.`after_imgs`, g.`position_name`, p.`paragrap_name`, l.`location_name`,
|
||||
m.sz_user sz_user_name,u2.`nick_name` zj_user_name,u3.`nick_name` zb_user_name,u4.`nick_name` jl_user_name,
|
||||
m.state,m.create_time
|
||||
FROM `smz_ssp_quality_mark` m
|
||||
LEFT JOIN `sur_project_work_position` g ON g.`position_id` = m.`position_id`
|
||||
LEFT JOIN `sur_project_work_paragrap` p ON p.`paragrap_id` = m.`paragrap_id`
|
||||
LEFT JOIN `sur_project_work_location` l ON l.`location_id` = m.`location_id`
|
||||
LEFT JOIN `sys_user` u2 ON u2.`user_id` = m.`zj_user_id`
|
||||
LEFT JOIN `sys_user` u3 ON u3.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `sys_user` u4 ON u4.`user_id` = m.`jl_user_id`
|
||||
WHERE m.`del_flag` = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND m.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND m.create_time between CONCAT(#{startTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
<if test="state != null and state != ''">
|
||||
AND m.state = #{state}
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
AND m.`create_user` = #{loginName}
|
||||
</if>
|
||||
<if test="searchText != null and searchText != ''">
|
||||
AND CONCAT(m.`location`,g.`gh_name`,p.`place_name`) LIKE CONCAT('%',#{searchText},'%')
|
||||
</if>
|
||||
ORDER by m.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkInfo" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT m.`mark_id`,m.`project_id`,p.`projectName`,m.`work_time`,m.`before_imgs`,m.`after_imgs`,
|
||||
g.`position_name`,pa.`paragrap_name`,l.`location_name`,m.`conclusion`,
|
||||
m.sz_user sz_user_name,u2.`nick_name` zj_user_name,
|
||||
u3.`nick_name` zb_user_name,a.`state` zb_approve_state,IFNULL(a.`explain`,'') zb_approve_explain,
|
||||
u4.`nick_name` jl_user_name,b.`state` jl_approve_state,IFNULL(b.`explain`,'') jl_approve_explain,
|
||||
m.`state`,u.`nick_name` create_user,m.`create_time`
|
||||
FROM `smz_ssp_quality_mark` m
|
||||
LEFT JOIN `sur_project` p ON p.`id` = m.`project_id`
|
||||
LEFT JOIN `sur_project_work_position` g ON g.`position_id` = m.`position_id`
|
||||
LEFT JOIN `sur_project_work_paragrap` pa ON pa.`paragrap_id` = m.`paragrap_id`
|
||||
LEFT JOIN `sur_project_work_location` l ON l.`location_id` = m.`location_id`
|
||||
LEFT JOIN `sys_user` u2 ON u2.`user_id` = m.`zj_user_id`
|
||||
LEFT JOIN `sys_user` u3 ON u3.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `sys_user` u4 ON u4.`user_id` = m.`jl_user_id`
|
||||
LEFT JOIN `sys_user` u ON u.`phonenumber` = m.`create_user`
|
||||
LEFT JOIN `smz_ssp_quality_mark_approve` a ON a.`mark_id` = m.`mark_id` AND a.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `smz_ssp_quality_mark_approve` b ON b.`mark_id` = m.`mark_id` AND b.`user_id` = m.`jl_user_id`
|
||||
WHERE m.`mark_id` = ${mark_id}
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkApproveNextLoginName" parameterType="java.util.Map" resultType="java.lang.String">
|
||||
SELECT login_name FROM `smz_ssp_quality_mark_approve`
|
||||
WHERE mark_id = ${mark_id} AND state = '0' ORDER BY sort LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkToBeApprovedNum" parameterType="java.util.Map" resultType="java.lang.Integer">
|
||||
SELECT count(1) FROM `smz_ssp_quality_mark_approve` WHERE mark_id = ${mark_id} AND state = '0'
|
||||
</select>
|
||||
|
||||
<update id="updateSspQualityMarkApproveState" parameterType="java.util.Map">
|
||||
UPDATE `smz_ssp_quality_mark_approve` SET
|
||||
<if test="state != null and state != ''">
|
||||
state = ${state},
|
||||
</if>
|
||||
<if test="explain != null and explain != ''">
|
||||
`explain` = #{explain},
|
||||
</if>
|
||||
update_time = NOW()
|
||||
WHERE mark_id = ${mark_id} AND login_name = #{loginName}
|
||||
</update>
|
||||
|
||||
<update id="updateSspQualityMarkState" parameterType="java.util.Map">
|
||||
UPDATE `smz_ssp_quality_mark` SET
|
||||
state = ${state},
|
||||
update_user = #{loginName},
|
||||
update_time = NOW()
|
||||
WHERE mark_id = ${mark_id}
|
||||
</update>
|
||||
|
||||
<select id="selectProjectTypeList" parameterType="map" resultType="map">
|
||||
select dict_value as id, dict_label as project_type, remark, status as is_del from sys_dict_data where dict_type='ssp_aqyhlx' and status='0' order by dict_sort
|
||||
</select>
|
||||
|
||||
<select id="selectProcessName" parameterType="String" resultType="com.ruoyi.web.sspMarks.domain.ProcessName">
|
||||
select id,name,parentCode,projectId,
|
||||
createDate,is_del as "isDel", processLevel,type
|
||||
from smz_process_name where 1=1 and is_del = #{isDel}
|
||||
</select>
|
||||
|
||||
<!--获取工程编码-->
|
||||
<select id="selectCodeFromSmark" parameterType="String" resultType="map">
|
||||
select code,name from smz_work_area where 1=1 and projectId = #{proId}
|
||||
</select>
|
||||
|
||||
<!-- 查询项目用户信息 -->
|
||||
<select id="queryProjectUserinfo" parameterType="map" resultType="map">
|
||||
select spu.id,spu.project_id,spu.dept_id,spu.dept_name,spu.dept_type,spu.job_type,spu.user_id,spu.is_del from sur_project_userinfo spu
|
||||
left join sys_user su on su.user_id=spu.user_id
|
||||
where su.del_flag=0 and spu.is_del=0 and spu.dept_type=11 and spu.project_id=#{projectId} and su.phonenumber=#{createUser}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,419 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.pshMarks.mapper.PshMarksMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.web.sspMarks.domain.SspMarks" id="SspMarksResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="marksLocation" column="marks_location" />
|
||||
<result property="marksTime" column="marksTime" />
|
||||
<result property="marksPicture" column="marks_picture" />
|
||||
<result property="marksVideo" column="marks_video" />
|
||||
<result property="projectType" column="project_type" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="positionPart" column="position_part" />
|
||||
<result property="marksRemark" column="marks_remark" />
|
||||
<result property="auditorPerson" column="auditor_person" />
|
||||
<result property="auditorPhone" column="auditorPhone" />
|
||||
<result property="checkState" column="checkState" />
|
||||
<result property="createDate" column="createDate" />
|
||||
<result property="createUser" column="create_user" />
|
||||
<result property="projectId" column="projectId" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="idcardnum" column="idcardnum" />
|
||||
<result property="infoType" column="infoType" />
|
||||
<result property="smarkUrl" column="smark_url" />
|
||||
<result property="engineeringName" column="engineeringName" />
|
||||
<result property="procedure" column="procedure" />
|
||||
<result property="synchronization" column="synchronization" />
|
||||
<result property="typeOfProject" column="projectType" />
|
||||
<result property="name" column="pointName" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSspMarksVo">
|
||||
select id, marks_location, marks_time, marks_picture, marks_video,
|
||||
project_type, process_name, position_part, marks_remark,
|
||||
auditor_person, create_date, create_user, auditorPhone,checkState, projectId,project_name from smz_ssp_marks
|
||||
</sql>
|
||||
|
||||
<!--查询留痕上报列表-->
|
||||
<select id="selectSspMarksList" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks" resultMap="SspMarksResult">
|
||||
SELECT
|
||||
s.id,
|
||||
s.marks_location ,
|
||||
DATE_FORMAT(s.marks_time,'%Y-%m-%d %H:%i:%s') as "marksTime",
|
||||
s.marks_picture ,
|
||||
s.marks_video ,
|
||||
s.project_type,
|
||||
s.process_name ,
|
||||
s.position_part ,
|
||||
s.marks_remark ,
|
||||
s.auditor_person ,
|
||||
s.auditorPhone ,
|
||||
s.checkState,
|
||||
s.projectId,
|
||||
s.project_name ,
|
||||
t.project_type projectType ,
|
||||
p.name as "procedure",
|
||||
w.name as "engineeringName",
|
||||
s.idcardnum,
|
||||
s.infoType,
|
||||
s.smark_url,
|
||||
DATE_FORMAT(s.create_date,'%Y-%m-%d %H:%i:%s') as "createDate",
|
||||
f.id as "mainId",
|
||||
s.synchronization,
|
||||
IFNULL(w.NAME, '') pointName
|
||||
FROM
|
||||
smz_ssp_marks s LEFT JOIN smz_project_type t on s.project_type = t.id
|
||||
LEFT JOIN smz_process_name p on p.id = s.process_name
|
||||
LEFT JOIN smz_work_area w ON w.CODE = s.project_name
|
||||
left join smz_ssp_marksflow f on f.mainId = s.id
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and s.id = #{id}</if>
|
||||
<if test="marksLocation != null and marksLocation != ''"> and s.marks_location = #{marksLocation}</if>
|
||||
<if test="marksTime != null and marksTime != ''"> and s.marks_time = #{marksTime}</if>
|
||||
<if test="marksPicture != null and marksPicture != ''"> and s.marks_picture = #{marksPicture}</if>
|
||||
<if test="marksVideo != null and marksVideo != ''"> and s.marks_video = #{marksVideo}</if>
|
||||
<if test="projectType != null and projectType != ''"> and s.project_type = #{projectType}</if>
|
||||
<if test="processName != null and processName != ''"> and s.process_name = #{processName}</if>
|
||||
<if test="positionPart != null and positionPart != ''"> and s.position_part = #{positionPart}</if>
|
||||
<if test="marksRemark != null and marksRemark != ''"> and s.marks_remark = #{marksRemark}</if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''"> and s.auditor_person = #{auditorPerson}</if>
|
||||
<if test="createUser != null and createUser != ''"> and s.create_user = #{createUser}</if>
|
||||
<if test="projectId != null and projectId != ''"> and s.projectId = #{projectId}</if>
|
||||
<if test="startTime != null and startTime != ''"> AND Date(s.create_date) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(s.create_date) </if>
|
||||
<if test="beginDate != null and beginDate != ''"> AND Date(s.marks_time) >= #{beginDate} </if>
|
||||
<if test="endDate != null and endDate != ''"> AND #{endDate} >= Date(s.marks_time) </if>
|
||||
<if test="checkState != null and checkState != ''"> AND s.checkState = #{checkState} </if>
|
||||
and s.infoType = 0
|
||||
and s.is_del = 0
|
||||
</where>
|
||||
order by s.create_date desc
|
||||
<if test="size != null and size != ''">
|
||||
limit #{nowPage},#{size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!--查询留痕上报列表-->
|
||||
<select id="queryByCheckState" parameterType="map" resultMap="SspMarksResult">
|
||||
SELECT
|
||||
s.id,
|
||||
s.marks_location ,
|
||||
s. marks_time ,
|
||||
s.marks_picture ,
|
||||
s.marks_video ,
|
||||
s.project_type,
|
||||
s.process_name ,
|
||||
s.position_part ,
|
||||
s.marks_remark ,
|
||||
s.auditor_person ,
|
||||
s.auditorPhone ,
|
||||
s.checkState,
|
||||
s.projectId,
|
||||
s.project_name ,
|
||||
t.project_type ,
|
||||
p.name,
|
||||
i.name,
|
||||
s.idcardnum,
|
||||
s.infoType,
|
||||
s.smark_url,
|
||||
DATE_FORMAT(s.create_date,'%Y-%m-%d %H:%i:%s') as "createDate",
|
||||
f.id as "mainId",
|
||||
IFNULL(w.NAME, '') pointName
|
||||
FROM
|
||||
smz_ssp_marks s LEFT JOIN smz_project_type t on s.project_type = t.id
|
||||
LEFT JOIN smz_process_name p on p.id = s.process_name
|
||||
LEFT JOIN smz_progress_info i on i.code = s.project_name
|
||||
left join smz_ssp_marksflow f on f.mainId = s.id
|
||||
LEFT JOIN smz_work_area w ON s.project_name = w.CODE
|
||||
<where>
|
||||
1 = 1
|
||||
and s.infoType = 0
|
||||
<!-- <if test="startTime != null and startTime != ''"> AND Date(s.create_date) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(s.create_date) </if>-->
|
||||
<if test="positionPart != null and positionPart != ''"> and s.position_part = #{positionPart}</if>
|
||||
<if test="checkState != null and checkState != ''"> and s.checkState = #{checkState}</if>
|
||||
<if test="projectId != null and projectId != ''"> and s.projectId = #{projectId}</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSspMarksById" parameterType="Integer" resultMap="SspMarksResult">
|
||||
<include refid="selectSspMarksVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSspMarks" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks">
|
||||
insert into smz_ssp_marks
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != '' ">id, </if>
|
||||
<if test="marksLocation != null and marksLocation != '' ">marks_location, </if>
|
||||
<if test="marksTime != null and marksTime != '' ">marks_time, </if>
|
||||
<if test="marksPicture != null and marksPicture != '' ">marks_picture, </if>
|
||||
<if test="marksVideo != null and marksVideo != '' ">marks_video, </if>
|
||||
<if test="projectType != null and projectType != '' ">project_type, </if>
|
||||
<if test="processName != null and processName != '' ">process_name, </if>
|
||||
<if test="positionPart != null and positionPart != '' ">position_part, </if>
|
||||
<if test="marksRemark != null and marksRemark != '' ">marks_remark, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != '' ">auditor_person, </if>
|
||||
<if test="createDate != null and createDate != '' ">create_date, </if>
|
||||
<if test="createUser != null and createUser != '' ">create_user, </if>
|
||||
<if test="projectId != null and projectId != '' ">projectId,</if>
|
||||
project_name,
|
||||
checkState,
|
||||
auditorPhone,
|
||||
infoType,
|
||||
is_del
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id}, </if>
|
||||
<if test="marksLocation != null and marksLocation != ''">#{marksLocation}, </if>
|
||||
<if test="marksTime != null and marksTime != ''">#{marksTime}, </if>
|
||||
<if test="marksPicture != null and marksPicture != ''">#{marksPicture}, </if>
|
||||
<if test="marksVideo != null and marksVideo != ''">#{marksVideo}, </if>
|
||||
<if test="projectType != null and projectType != ''">#{projectType}, </if>
|
||||
<if test="processName != null and processName != ''">#{processName}, </if>
|
||||
<if test="positionPart != null and positionPart != ''">#{positionPart}, </if>
|
||||
<if test="marksRemark != null and marksRemark != ''">#{marksRemark}, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''">#{auditorPerson}, </if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate}, </if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser}, </if>
|
||||
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
||||
#{projectName},
|
||||
#{checkState},
|
||||
#{auditorPhone},
|
||||
0,
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSspMarks" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="marksLocation != null and marksLocation != ''">marks_location = #{marksLocation}, </if>
|
||||
<if test="marksTime != null and marksTime != ''">marks_time = #{marksTime}, </if>
|
||||
<if test="marksPicture != null and marksPicture != ''">marks_picture = #{marksPicture}, </if>
|
||||
<if test="marksVideo != null and marksVideo != ''">marks_video = #{marksVideo}, </if>
|
||||
<if test="projectType != null and projectType != ''">project_type = #{projectType}, </if>
|
||||
<if test="processName != null and processName != ''">process_name = #{processName}, </if>
|
||||
<if test="positionPart != null and positionPart != ''">position_part = #{positionPart}, </if>
|
||||
<if test="marksRemark != null and marksRemark != ''">marks_remark = #{marksRemark}, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''">auditor_person = #{auditorPerson}, </if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate}, </if>
|
||||
<if test="createUser != null and createUser != ''">create_user = #{createUser}, </if>
|
||||
<if test="projectId != null and projectId != ''">projectId = #{projectId},</if>
|
||||
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
|
||||
<if test="auditorPhone != null and auditorPhone != ''">auditorPhone = #{auditorPhone},</if>
|
||||
<if test="checkState != null and checkState != ''">checkState = #{checkState},</if>
|
||||
<if test="smarkUrl != null and smarkUrl != ''">smark_url = #{smarkUrl},</if>
|
||||
<if test="surveyorName != null and surveyorName != ''">surveyorName = #{surveyorName},</if>
|
||||
<if test="surveyorId != null and surveyorId != ''">surveyorId = #{surveyorId},</if>
|
||||
<if test="surveyorTime != null and surveyorTime != ''">surveyorTime = #{surveyorTime},</if>
|
||||
<if test="surveyorContent != null and surveyorContent != ''">surveyorContent = #{surveyorContent}</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate}</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSspMarksById" parameterType="Integer">
|
||||
delete from smz_ssp_marks where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSspMarksByIds" parameterType="String">
|
||||
delete from smz_ssp_marks where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!--新增留痕上报-->
|
||||
<insert id="addSspMarks" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks" >
|
||||
insert into smz_ssp_marks
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != '' ">id, </if>
|
||||
<if test="marksLocation != null and marksLocation != '' ">marks_location, </if>
|
||||
<if test="marksTime != null and marksTime != '' ">marks_time, </if>
|
||||
<if test="projectType != null and projectType != '' ">project_type, </if>
|
||||
<if test="processName != null and processName != '' ">process_name, </if>
|
||||
<if test="positionPart != null and positionPart != '' ">position_part, </if>
|
||||
<if test="marksRemark != null and marksRemark != '' ">marks_remark, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != '' ">auditor_person, </if>
|
||||
create_date,
|
||||
<if test="createUser != null and createUser != '' ">create_user, </if>
|
||||
<if test="projectId != null and projectId != '' ">projectId,</if>
|
||||
<if test="projectName != null and projectName != '' ">project_name,</if>
|
||||
checkState,
|
||||
<if test="auditorPhone != null and auditorPhone != '' ">auditorPhone,</if>
|
||||
<if test="idcardnum != null and idcardnum != '' ">idcardnum,</if>
|
||||
infoType,
|
||||
is_del
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id}, </if>
|
||||
<if test="marksLocation != null and marksLocation != ''">#{marksLocation}, </if>
|
||||
<if test="marksTime != null and marksTime != ''">#{marksTime}, </if>
|
||||
<if test="projectType != null and projectType != ''">#{projectType}, </if>
|
||||
<if test="processName != null and processName != ''">#{processName}, </if>
|
||||
<if test="positionPart != null and positionPart != ''">#{positionPart}, </if>
|
||||
<if test="marksRemark != null and marksRemark != ''">#{marksRemark}, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''">#{auditorPerson}, </if>
|
||||
NOW(),
|
||||
<if test="createUser != null and createUser != ''">#{createUser}, </if>
|
||||
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
||||
<if test="projectName != null and projectName != ''">#{projectName},</if>
|
||||
0,
|
||||
<if test="auditorPhone != null and auditorPhone != ''">#{auditorPhone},</if>
|
||||
<if test="idcardnum != null and idcardnum != ''">#{idcardnum},</if>
|
||||
0,
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryPicture" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{mainId}
|
||||
AND fileType = 0
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryVideo" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{mainId}
|
||||
AND fileType = 1
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryPictureUrl" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{externalId}
|
||||
AND fileType = 0
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryVideoUrl" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{externalId}
|
||||
AND fileType = 1
|
||||
</select>
|
||||
|
||||
<update id="updatePicture" parameterType="map">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
marks_picture = #{picture}
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateVideo" parameterType="map">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
marks_video = #{video}
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateSmarkUrl" parameterType="map">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
smark_url = #{smarkUrl}
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--根据id查询-->
|
||||
<select id="queryById" parameterType="String" resultMap="SspMarksResult">
|
||||
SELECT
|
||||
s.id,
|
||||
s.marks_location ,
|
||||
s. marks_time ,
|
||||
s.marks_picture ,
|
||||
s.marks_video ,
|
||||
s.project_type,
|
||||
s.process_name ,
|
||||
s.position_part ,
|
||||
s.marks_remark ,
|
||||
s.auditor_person ,
|
||||
s.auditorPhone ,
|
||||
s.checkState,
|
||||
s.projectId,
|
||||
s.project_name ,
|
||||
t.project_type ,
|
||||
p.name,
|
||||
i.name,
|
||||
s.idcardnum,
|
||||
s.infoType,
|
||||
s.smark_url,
|
||||
DATE_FORMAT(s.create_date,'%Y-%m-%d %H:%i:%s') as "createDate",
|
||||
f.id as "mainId"
|
||||
FROM
|
||||
smz_ssp_marks s LEFT JOIN smz_project_type t on s.project_type = t.id
|
||||
LEFT JOIN smz_process_name p on p.id = s.process_name
|
||||
LEFT JOIN smz_progress_info i on i.code = s.project_name
|
||||
left join smz_ssp_marksflow f on f.mainId = s.id
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSspQualityMark" parameterType="java.util.Map" useGeneratedKeys ="true" keyProperty="markId" keyColumn="mark_id">
|
||||
INSERT INTO `smz_ssp_quality_mark`(
|
||||
<if test="projectId != null and projectId != ''">project_id,</if>
|
||||
<if test="workTime != null and workTime != ''">work_time,</if>
|
||||
<if test="beforeImgs != null and beforeImgs != ''">before_imgs,</if>
|
||||
<if test="afterImgs != null and afterImgs != ''">after_imgs,</if>
|
||||
<if test="positionId != null and positionId != ''">position_id,</if>
|
||||
<if test="paragrapId != null and paragrapId != ''">paragrap_id,</if>
|
||||
<if test="locationId != null and locationId != ''">location_id,</if>
|
||||
<if test="conclusion != null and conclusion != ''">conclusion,</if>
|
||||
<if test="szUser != null and szUser != ''">sz_user,</if>
|
||||
<if test="zjUserId != null and zjUserId != ''">zj_user_id,</if>
|
||||
<if test="zbUserId != null and zbUserId != ''">zb_user_id,</if>
|
||||
<if test="jlUserId != null and jlUserId != ''">jl_user_id,</if>
|
||||
<if test="createUser != null and createUser != ''">create_user,</if>
|
||||
create_time
|
||||
)
|
||||
VALUES(
|
||||
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
||||
<if test="workTime != null and workTime != ''">#{workTime},</if>
|
||||
<if test="beforeImgs != null and beforeImgs != ''">#{beforeImgs},</if>
|
||||
<if test="afterImgs != null and afterImgs != ''">#{afterImgs},</if>
|
||||
<if test="positionId != null and positionId != ''">#{positionId},</if>
|
||||
<if test="paragrapId != null and paragrapId != ''">#{paragrapId},</if>
|
||||
<if test="locationId != null and locationId != ''">#{locationId},</if>
|
||||
<if test="conclusion != null and conclusion != ''">#{conclusion},</if>
|
||||
<if test="szUser != null and szUser != ''">#{szUser},</if>
|
||||
<if test="zjUserId != null and zjUserId != ''">#{zjUserId},</if>
|
||||
<if test="zbUserId != null and zbUserId != ''">#{zbUserId},</if>
|
||||
<if test="jlUserId != null and jlUserId != ''">#{jlUserId},</if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser},</if>
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertSspQualityMarkApprove" parameterType="java.util.Map">
|
||||
INSERT INTO `smz_ssp_quality_mark_approve`(mark_id,user_id,user_name,login_name,sort,state,create_time)
|
||||
VALUES(#{markId},#{userId},#{userName},#{loginName},#{sort},0,NOW())
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -1,692 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.sspManage.mapper.SspMapper">
|
||||
|
||||
<!-- 查询随手拍信息的列表(问题整改) -->
|
||||
<select id="listSspInfoChanges" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssp.id,
|
||||
ssp.projectId,
|
||||
spi.projectName,
|
||||
ssp.problemArea,
|
||||
ssp.workParts,
|
||||
ssp.changeInfo,
|
||||
ssp.checkState,
|
||||
date_format(ssp.createTime,'%Y-%m-%d %H:%i') AS createTime,
|
||||
ssf.fileUrl,
|
||||
ssp.lordSent,
|
||||
ssp.lordSentUser,
|
||||
ssp.copySend,
|
||||
ssp.copySendUser,
|
||||
ssp.marks_picture as marksPicture,
|
||||
ssp.marks_video as marksVideo,
|
||||
ssp.smark_url as smarkUrl,
|
||||
(case when ssp.lordSentUser = #{loginName} then 1 else 0 end) sort,
|
||||
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp
|
||||
LEFT JOIN smz_ssp_auditinfo ssa ON ssp.id = ssa.mainId and (ssa.processState='0' or ssa.processState ='1')
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||
left join sys_dept sd on sd.dept_id = spi.deptId
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
and ssp.isDel=0
|
||||
AND ssp.infoType = 1
|
||||
<if test="searchText != null and searchText != ''"> AND ssp.workParts LIKE CONCAT('%',#{searchText},'%')</if>
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(ssp.createTime) </if>
|
||||
<if test="infoType != null and infoType != ''"> AND ssp.infoType = #{infoType}</if>
|
||||
<if test="checkState != null and checkState != ''"> AND ssp.checkState = #{checkState} </if>
|
||||
AND (FIND_IN_SET(#{loginName}, ssp.copySendUser) OR FIND_IN_SET(#{loginName}, ssp.lordSentUser) OR FIND_IN_SET(#{loginName}, ssp.recheckSendUser))
|
||||
GROUP BY ssp.id
|
||||
ORDER BY sort DESC,createTime DESC
|
||||
</select>
|
||||
|
||||
<!-- 查询随手拍信息的列表(问题整改,留痕上报) -->
|
||||
<select id="listSspInfoMyNicked" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssp.id,
|
||||
ssp.projectId,
|
||||
spi.projectName,
|
||||
ssp.workParts,
|
||||
ssp.checkState,
|
||||
ssp.nickedArea,
|
||||
ssp.nickedTime,
|
||||
ssp.projectType,
|
||||
ssp.processName,
|
||||
ssp.projectName,
|
||||
ssp.nickedInfo,
|
||||
ssp.checkUser,
|
||||
ssp.checkUserPhone,
|
||||
date_format(ssp.createTime,'%Y-%m-%d %H:%i') AS createTime,
|
||||
ssf.fileUrl,
|
||||
ssp.changeInfo,
|
||||
ssp.lordSent,
|
||||
ssp.lordSentUser,
|
||||
ssp.copySend,
|
||||
ssp.marks_picture as marksPicture,
|
||||
ssp.marks_video as marksVideo,
|
||||
ssp.smark_url as smarkUrl,
|
||||
ssp.copySendUser,
|
||||
case when ud.type_flag in (1,11) then sd.dept_name else ud.dept_name end as deptName
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp
|
||||
LEFT JOIN smz_ssp_auditinfo ssa ON ssp.id = ssa.mainId and (ssa.processState='0' or ssa.processState ='1')
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||
left join sys_dept sd on sd.dept_id = spi.deptId
|
||||
WHERE
|
||||
ssp.projectId = #{projectId}
|
||||
and ssp.isDel=0
|
||||
AND ssp.infoType = 1
|
||||
AND ssp.createUser = #{loginName}
|
||||
<if test="startTime != null and startTime != ''"> AND Date(ssp.createTime) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(ssp.createTime) </if>
|
||||
<if test="checkState != null and checkState != ''"> AND ssp.checkState = #{checkState} </if>
|
||||
<if test="searchText != null and searchText != ''"> AND ssp.workParts LIKE CONCAT('%',#{searchText},'%')</if>
|
||||
GROUP BY ssp.id
|
||||
</select>
|
||||
|
||||
<!-- 根据id查询相关的基本信息 -->
|
||||
<select id="queryChangeNickedInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssp.*,
|
||||
case when ud.type_flag in (1,11) then CONCAT(sd.dept_name,' ', '[责任主体]') else concat(ud.dept_name, ' ', '[', sdd.dict_label ,']') end as projectUnit,
|
||||
su.`nick_name` `name`,
|
||||
sd2.dict_label as danger_typeName,
|
||||
ssa.id checkId
|
||||
FROM
|
||||
smz_ssp_problemmodify ssp
|
||||
LEFT JOIN smz_ssp_auditinfo ssa ON ssp.id = ssa.mainId
|
||||
LEFT JOIN sur_project spi ON ssp.projectId = spi.id
|
||||
LEFT JOIN sys_user su ON ssp.createUser = su.phonenumber
|
||||
left join sys_dept ud on ud.dept_id = su.dept_id
|
||||
left join sys_dept sd on sd.dept_id = spi.deptId
|
||||
left join sur_project_unit_info spui on spui.projectId = spi.id and spui.unitId = su.dept_id
|
||||
left join sys_dict_data sdd on sdd.dict_type = 'sys_dept_type' and sdd.dict_value = spui.unitType
|
||||
left join sys_dict_data sd2 on sd2.dict_type = 'ssp_zlyhlx' and sd2.dict_value = ssp.danger_type
|
||||
WHERE
|
||||
ssp.id = #{id}
|
||||
GROUP BY ssp.id
|
||||
</select>
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="listChangeNickedFile" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_fileinfo
|
||||
WHERE
|
||||
auditId = #{auditId}
|
||||
AND fileType = #{fileType}
|
||||
</select>
|
||||
|
||||
<!-- 新增问题整改主表信息 -->
|
||||
<insert id="saveSspInfoChanges" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO
|
||||
smz_ssp_problemmodify
|
||||
( projectId,
|
||||
infoType,
|
||||
problemArea,
|
||||
workParts,
|
||||
changeInfo,
|
||||
lordSent,
|
||||
lordSentUser,
|
||||
copySend,
|
||||
copySendUser,
|
||||
checkState,
|
||||
nickedTime,
|
||||
danger_type,
|
||||
recheckSend,
|
||||
recheckSendUser,
|
||||
roleType,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime )
|
||||
VALUES
|
||||
(
|
||||
#{projectId},
|
||||
1,
|
||||
#{problemArea},
|
||||
#{workParts},
|
||||
#{changeInfo},
|
||||
#{lordSent},
|
||||
#{lordSentUser},
|
||||
#{copySend},
|
||||
#{copySendUser},
|
||||
0,
|
||||
#{nickedTime},
|
||||
#{dangerType},
|
||||
#{recheckSend},
|
||||
#{recheckSendUser},
|
||||
#{roleType},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
);
|
||||
</insert>
|
||||
|
||||
<insert id="saveSspInfoNicked" parameterType="map" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO
|
||||
smz_ssp_problemmodify
|
||||
( projectId,
|
||||
infoType,
|
||||
workParts,
|
||||
nickedArea,
|
||||
nickedTime,
|
||||
projectType,
|
||||
processName,
|
||||
projectName,
|
||||
nickedInfo,
|
||||
checkUser,
|
||||
checkUserPhone,
|
||||
checkState,
|
||||
danger_type,
|
||||
recheckSend,
|
||||
recheckSendUser,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime )
|
||||
VALUES
|
||||
(
|
||||
#{projectId},
|
||||
1,
|
||||
#{workParts},
|
||||
#{nickedArea},
|
||||
#{nickedTime},
|
||||
#{projectType},
|
||||
#{processName},
|
||||
#{projectName},
|
||||
#{nickedInfo},
|
||||
#{checkUser},
|
||||
#{checkUserPhone},
|
||||
0,
|
||||
#{dangerType},
|
||||
#{recheckSend},
|
||||
#{recheckSendUser},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="updateSmzSspProblemmodify" parameterType="map" keyProperty="id" keyColumn="id">
|
||||
update smz_ssp_problemmodify
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="marksPicture != null">marks_picture = #{marksPicture},</if>
|
||||
<if test="marksVideo != null">marks_video = #{marksVideo},</if>
|
||||
<if test="smarkUrl != null">smark_url = #{smarkUrl},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 新增流程信息 -->
|
||||
<insert id="saveSspAuditInfo" parameterType="map" useGeneratedKeys="true" keyProperty="auditId" keyColumn="auditId">
|
||||
INSERT INTO
|
||||
smz_ssp_auditinfo
|
||||
( mainId,
|
||||
<if test="processState != null and processState != '' ">processState, </if>
|
||||
opinion,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{mainId},
|
||||
<if test="processState != null and processState != '' ">#{processState}, </if>
|
||||
#{opinion},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 新增留痕流程信息 -->
|
||||
<insert id="saveSspMarkFlow" parameterType="com.ruoyi.web.sspMarks.domain.SspMarksflow" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
INSERT INTO
|
||||
smz_ssp_marksflow
|
||||
(
|
||||
<if test="id != null and id != '' ">id, </if>
|
||||
mainId,
|
||||
checkState,
|
||||
marksRemark,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
<if test="id != null and id != '' ">#{id}, </if>
|
||||
#{mainId},
|
||||
#{checkState},
|
||||
#{marksRemark},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 新增文件信息 -->
|
||||
<insert id="saveSspFileInfo" parameterType="map">
|
||||
INSERT INTO
|
||||
smz_ssp_fileinfo
|
||||
( auditId,
|
||||
fileType,
|
||||
fileUrl,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{auditId},
|
||||
#{fileType},
|
||||
#{fileUrl},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 新增留痕上报文件 -->
|
||||
<insert id="saveMarkFileInfo" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
INSERT INTO
|
||||
smz_ssp_markfileinfo
|
||||
(
|
||||
externalId,
|
||||
fileType,
|
||||
fileUrl,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{externalId},
|
||||
#{fileType},
|
||||
#{fileUrl},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 修改状态 -->
|
||||
<update id="updateState" parameterType="map">
|
||||
UPDATE ${tableName} SET ${fieldName} = #{checkState} WHERE ${keySet} = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateStateOk" parameterType="map">
|
||||
UPDATE ${tableName} SET ${fieldName} = #{checkState},updateTime = NOW() WHERE ${keySet} = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 查询项目用户信息 -->
|
||||
<select id="queryProjectUserinfo" parameterType="map" resultType="map">
|
||||
select spu.id,spu.project_id,spu.dept_id,spu.dept_name,spu.dept_type,spu.job_type,spu.user_id,spu.is_del from sur_project_userinfo spu
|
||||
left join sys_user su on su.user_id=spu.user_id
|
||||
where su.del_flag=0 and spu.is_del=0 and spu.dept_type=11 and spu.project_id=#{projectId} and su.phonenumber=#{createUser}
|
||||
</select>
|
||||
|
||||
<!-- 查询已整改的基本信息 -->
|
||||
<select id="queryOpinion" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
mainId,
|
||||
opinion,
|
||||
createTime
|
||||
FROM
|
||||
smz_ssp_auditinfo
|
||||
WHERE
|
||||
mainId = #{id}
|
||||
AND isDel = 0
|
||||
AND processState = 1
|
||||
</select>
|
||||
|
||||
<!-- 查询已整改的基本信息 -->
|
||||
<select id="queryOpinionChange" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
mainId,
|
||||
opinion,
|
||||
createTime
|
||||
FROM
|
||||
smz_ssp_auditinfo ssa
|
||||
WHERE
|
||||
ssa.mainId = #{id}
|
||||
AND ssa.isDel = 0
|
||||
AND processState = 0
|
||||
ORDER BY createTime DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询已整改的文件信息 -->
|
||||
<select id="listOpinionFile" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssf.fileType,
|
||||
ssf.fileUrl
|
||||
FROM
|
||||
smz_ssp_auditinfo ssa
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
WHERE
|
||||
ssa.mainId = #{id}
|
||||
AND ssa.isDel = 0
|
||||
AND ssa.processState = 0
|
||||
</select>
|
||||
|
||||
<!-- 查询人员的信息 -->
|
||||
<select id="listUserInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
nick_name `name`,
|
||||
phonenumber `phone`
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sur_project_userinfo spu ON su.user_id = spu.user_id
|
||||
WHERE
|
||||
spu.project_id = #{projectId}
|
||||
AND su.phonenumber != #{loginName}
|
||||
<if test="name != null and name != ''"> AND `nick_name` LIKE concat('%',#{name},'%')</if>
|
||||
AND su.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="queryUserInfo" parameterType="java.lang.String" resultType="java.util.Map">
|
||||
SELECT user_id,IFNULL(phonenumber,'') login_name,IFNULL(nick_name,'') user_name
|
||||
FROM `sys_user` WHERE phonenumber = #{loginName}
|
||||
</select>
|
||||
|
||||
<select id="queryUserList" parameterType="map" resultType="map">
|
||||
SELECT u.`user_id` id,u.`phonenumber` `phone`,u.`nick_name` `name`
|
||||
FROM `sur_project_userinfo` pu
|
||||
LEFT JOIN `sys_user` u ON u.`user_id` = pu.`user_id`
|
||||
LEFT JOIN `sys_user_role` ur ON ur.`user_id` = u.`user_id`
|
||||
WHERE u.`del_flag` = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND pu.`project_id` = #{projectId}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND CONCAT(u.`phonenumber`,u.`nick_name`) LIKE CONCAT('%',#{name},'%')
|
||||
</if>
|
||||
<if test="roleId != null and roleId != ''">
|
||||
AND ur.`role_id` = #{roleId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 查询负责人的项目归属 -->
|
||||
<select id="queryUserProjectInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
projectName `dep`
|
||||
FROM
|
||||
sur_project
|
||||
WHERE
|
||||
id = #{projectId}
|
||||
AND isDel = '0'
|
||||
</select>
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryFileInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
m.fileUrl,
|
||||
m.fileType
|
||||
FROM
|
||||
smz_ssp_markfileinfo m
|
||||
LEFT JOIN smz_ssp_marksflow f ON m.externalId = f.id
|
||||
WHERE
|
||||
fileType = #{fileType}
|
||||
AND m.externalId = #{externalId}
|
||||
</select>
|
||||
|
||||
<!-- 查询当前审核流程的信息 -->
|
||||
<select id="queryAuditInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
id,
|
||||
opinion,
|
||||
processState
|
||||
FROM
|
||||
smz_ssp_auditinfo
|
||||
WHERE
|
||||
mainId = #{id}
|
||||
AND isDel = 0
|
||||
ORDER BY createTime DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询驳回信息 -->
|
||||
<select id="queryRejectInfo" parameterType="map" resultType="String">
|
||||
SELECT
|
||||
opinion
|
||||
FROM
|
||||
smz_ssp_auditinfo
|
||||
WHERE
|
||||
mainId = #{id}
|
||||
AND isDel = 0
|
||||
AND processState = '2'
|
||||
ORDER BY createTime DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询N次提交的图片信息 -->
|
||||
<select id="listRejectFile" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ssf.fileType,
|
||||
ssf.fileUrl
|
||||
FROM
|
||||
smz_ssp_auditinfo ssa
|
||||
LEFT JOIN smz_ssp_fileinfo ssf ON ssa.id = ssf.auditId
|
||||
WHERE
|
||||
ssf.auditId = #{id}
|
||||
AND ssa.isDel = 0
|
||||
AND ssa.processState = 0
|
||||
</select>
|
||||
|
||||
<!-- 添加驳回的审核意见 -->
|
||||
<insert id="saveSspAuditInfoReject" parameterType="map">
|
||||
INSERT INTO
|
||||
smz_ssp_auditinfo
|
||||
( mainId,
|
||||
processState,
|
||||
opinion,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{mainId},
|
||||
2,
|
||||
#{opinion},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 添加通过的审核意见 -->
|
||||
<insert id="saveSspAuditInfoPass" parameterType="map">
|
||||
INSERT INTO
|
||||
smz_ssp_auditinfo
|
||||
( mainId,
|
||||
processState,
|
||||
opinion,
|
||||
isDel,
|
||||
createUser,
|
||||
createTime)
|
||||
VALUES (
|
||||
#{mainId},
|
||||
4,
|
||||
#{opinion},
|
||||
0,
|
||||
#{createUser},
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="querySspQualityMarkList" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT m.mark_id, m.`work_time`, m.`before_imgs`, m.`after_imgs`, g.`position_name`, p.`paragrap_name`,l.`location_name`,
|
||||
m.sz_user sz_user_name,u2.`nick_name` zj_user_name,u3.`nick_name` zb_user_name,u4.`nick_name` jl_user_name,
|
||||
m.state,m.create_time
|
||||
FROM `smz_ssp_quality_mark` m
|
||||
LEFT JOIN `sur_project_work_position` g ON g.`position_id` = m.`position_id`
|
||||
LEFT JOIN `sur_project_work_paragrap` p ON p.`paragrap_id` = m.`paragrap_id`
|
||||
LEFT JOIN `sur_project_work_location` l ON l.`location_id` = m.`location_id`
|
||||
LEFT JOIN `sys_user` u2 ON u2.`user_id` = m.`zj_user_id`
|
||||
LEFT JOIN `sys_user` u3 ON u3.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `sys_user` u4 ON u4.`user_id` = m.`jl_user_id`
|
||||
WHERE m.`del_flag` = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND m.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND m.create_time between CONCAT(#{startTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
<if test="state != null and state != ''">
|
||||
AND m.state = #{state}
|
||||
</if>
|
||||
<if test="searchText != null and searchText != ''">
|
||||
AND CONCAT(g.`position_name`,p.`paragrap_name`,l.`location_name`) LIKE CONCAT('%',#{searchText},'%')
|
||||
</if>
|
||||
ORDER by m.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkMyList" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT m.mark_id, m.`work_time`, m.`before_imgs`, m.`after_imgs`, g.`position_name`, p.`paragrap_name`, l.`location_name`,
|
||||
m.sz_user sz_user_name,u2.`nick_name` zj_user_name,u3.`nick_name` zb_user_name,u4.`nick_name` jl_user_name,
|
||||
m.state,m.create_time
|
||||
FROM `smz_ssp_quality_mark` m
|
||||
LEFT JOIN `sur_project_work_position` g ON g.`position_id` = m.`position_id`
|
||||
LEFT JOIN `sur_project_work_paragrap` p ON p.`paragrap_id` = m.`paragrap_id`
|
||||
LEFT JOIN `sur_project_work_location` l ON l.`location_id` = m.`location_id`
|
||||
LEFT JOIN `sys_user` u2 ON u2.`user_id` = m.`zj_user_id`
|
||||
LEFT JOIN `sys_user` u3 ON u3.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `sys_user` u4 ON u4.`user_id` = m.`jl_user_id`
|
||||
WHERE m.`del_flag` = '0'
|
||||
<if test="projectId != null and projectId != ''">
|
||||
AND m.project_id = #{projectId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND m.create_time between CONCAT(#{startTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
<if test="state != null and state != ''">
|
||||
AND m.state = #{state}
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
AND m.`create_user` = #{loginName}
|
||||
</if>
|
||||
<if test="searchText != null and searchText != ''">
|
||||
AND CONCAT(m.`location`,g.`gh_name`,p.`place_name`) LIKE CONCAT('%',#{searchText},'%')
|
||||
</if>
|
||||
ORDER by m.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkInfo" parameterType="java.util.Map" resultType="java.util.Map">
|
||||
SELECT m.`mark_id`,m.`project_id`,p.`projectName`,m.`work_time`,m.`before_imgs`,m.`after_imgs`,
|
||||
g.`position_name`,pa.`paragrap_name`,l.`location_name`,m.`conclusion`,
|
||||
m.sz_user sz_user_name,u2.`nick_name` zj_user_name,
|
||||
u3.`nick_name` zb_user_name,a.`state` zb_approve_state,IFNULL(a.`explain`,'') zb_approve_explain,
|
||||
u4.`nick_name` jl_user_name,b.`state` jl_approve_state,IFNULL(b.`explain`,'') jl_approve_explain,
|
||||
m.`state`,u.`nick_name` create_user,m.`create_time`
|
||||
FROM `smz_ssp_quality_mark` m
|
||||
LEFT JOIN `sur_project` p ON p.`id` = m.`project_id`
|
||||
LEFT JOIN `sur_project_work_position` g ON g.`position_id` = m.`position_id`
|
||||
LEFT JOIN `sur_project_work_paragrap` pa ON pa.`paragrap_id` = m.`paragrap_id`
|
||||
LEFT JOIN `sur_project_work_location` l ON l.`location_id` = m.`location_id`
|
||||
LEFT JOIN `sys_user` u2 ON u2.`user_id` = m.`zj_user_id`
|
||||
LEFT JOIN `sys_user` u3 ON u3.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `sys_user` u4 ON u4.`user_id` = m.`jl_user_id`
|
||||
LEFT JOIN `sys_user` u ON u.`phonenumber` = m.`create_user`
|
||||
LEFT JOIN `smz_ssp_quality_mark_approve` a ON a.`mark_id` = m.`mark_id` AND a.`user_id` = m.`zb_user_id`
|
||||
LEFT JOIN `smz_ssp_quality_mark_approve` b ON b.`mark_id` = m.`mark_id` AND b.`user_id` = m.`jl_user_id`
|
||||
WHERE m.`mark_id` = ${mark_id}
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkApproveNextLoginName" parameterType="java.util.Map" resultType="java.lang.String">
|
||||
SELECT login_name FROM `smz_ssp_quality_mark_approve`
|
||||
WHERE mark_id = ${mark_id} AND state = '0' ORDER BY sort LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="querySspQualityMarkToBeApprovedNum" parameterType="java.util.Map" resultType="java.lang.Integer">
|
||||
SELECT count(1) FROM `smz_ssp_quality_mark_approve` WHERE mark_id = ${mark_id} AND state = '0'
|
||||
</select>
|
||||
|
||||
<update id="updateSspQualityMarkApproveState" parameterType="java.util.Map">
|
||||
UPDATE `smz_ssp_quality_mark_approve` SET
|
||||
<if test="state != null and state != ''">
|
||||
state = ${state},
|
||||
</if>
|
||||
<if test="explain != null and explain != ''">
|
||||
`explain` = #{explain},
|
||||
</if>
|
||||
update_time = NOW()
|
||||
WHERE mark_id = ${mark_id} AND login_name = #{loginName}
|
||||
</update>
|
||||
|
||||
<update id="updateSspQualityMarkState" parameterType="java.util.Map">
|
||||
UPDATE `smz_ssp_quality_mark` SET
|
||||
state = ${state},
|
||||
update_user = #{loginName},
|
||||
update_time = NOW()
|
||||
WHERE mark_id = ${mark_id}
|
||||
</update>
|
||||
|
||||
<select id="selectProjectTypeList" parameterType="map" resultType="map">
|
||||
select dict_value as id, dict_label as project_type, remark, status as is_del from sys_dict_data where dict_type='ssp_zlyhlx' and status='0' order by dict_sort
|
||||
</select>
|
||||
|
||||
<select id="selectProcessName" parameterType="String" resultType="com.ruoyi.web.sspMarks.domain.ProcessName">
|
||||
select id,name,parentCode,projectId,
|
||||
createDate,is_del as "isDel", processLevel,type
|
||||
from smz_process_name where 1=1 and is_del = #{isDel}
|
||||
</select>
|
||||
|
||||
<!--获取工程编码-->
|
||||
<select id="selectCodeFromSmark" parameterType="String" resultType="map">
|
||||
select code,name from smz_work_area where 1=1 and projectId = #{proId}
|
||||
</select>
|
||||
|
||||
<!--查询项目单位-->
|
||||
<select id="selectComByProjectId" parameterType="String" resultType="map">
|
||||
select spui.unitId as id, concat(spui.unitName, ' ', '[', sdd.dict_label ,']') as dep, spui.unitType as unitType from sur_project_unit_info spui
|
||||
left join sys_dict_data sdd on sdd.dict_type = 'sys_dept_type' and sdd.dict_value = spui.unitType
|
||||
where spui.projectId = #{projectId}
|
||||
and spui.del_flag=0
|
||||
order by sdd.dict_sort
|
||||
</select>
|
||||
|
||||
<!--查询项目人员-->
|
||||
<select id="selectAllProjectUser" parameterType="map" resultType="map">
|
||||
select u.user_id as id, u.dept_id as deptId, u.nick_name as `name`, u.phonenumber as `phone`, ur.role_id as role_id, d.type_flag as dept_type_flag from sys_user u
|
||||
left join sys_user_role ur on ur.user_id=u.user_id
|
||||
left join sys_dept d on d.dept_id = u.dept_id
|
||||
where u.del_flag = '0'
|
||||
and u.user_id not in (select spuuu.user_id from sur_project_userinfo spuuu where spuuu.project_id = #{projectId} and spuuu.dept_type='1')
|
||||
and ur.role_id=#{roleId}
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and (u.nick_name like concat('%', #{name}, '%') or u.phonenumber like concat('%', #{name}, '%'))
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
and u.user_name != #{loginName}
|
||||
</if>
|
||||
group by u.user_id, u.dept_id, u.nick_name, u.phonenumber
|
||||
union
|
||||
select u.user_id as id, u.dept_id as deptId, concat(u.nick_name, ' ', '[', sdd.dict_label ,']') as `name`, u.phonenumber as `phone`, '' as role_id, d.type_flag as dept_type_flag from sur_project_userinfo spu
|
||||
left join sys_user u on u.user_id = spu.user_id
|
||||
left join sys_dept d on d.dept_id = u.dept_id
|
||||
left join sys_dict_data sdd on sdd.dict_type = 'sys_job_type' and sdd.dict_value = spu.job_type
|
||||
where spu.project_id = #{projectId} and spu.is_del=0
|
||||
<if test="name != null and name != ''">
|
||||
and (u.nick_name like concat('%', #{name}, '%') or u.phonenumber like concat('%', #{name}, '%'))
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
and u.user_name != #{loginName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--查询项目人员-->
|
||||
<select id="selectProjectUser" parameterType="map" resultType="map">
|
||||
select u.user_id as id, u.dept_id as deptId, concat(u.nick_name, ' ', '[', sdd.dict_label ,']') as `name`, u.phonenumber as `phone`,'' as role_id, d.type_flag as dept_type_flag from sur_project_userinfo spu
|
||||
left join sys_user u on u.user_id = spu.user_id
|
||||
left join sys_dept d on d.dept_id = u.dept_id
|
||||
left join sys_dict_data sdd on sdd.dict_type = 'sys_job_type' and sdd.dict_value = spu.job_type
|
||||
where spu.project_id = #{projectId} and spu.is_del=0
|
||||
<if test="name != null and name != ''">
|
||||
and (u.nick_name like concat('%', #{name}, '%') or u.phonenumber like concat('%', #{name}, '%'))
|
||||
</if>
|
||||
<if test="loginName != null and loginName != ''">
|
||||
and u.user_name != #{loginName}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,419 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.sspMarks.mapper.SspMarksMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.web.sspMarks.domain.SspMarks" id="SspMarksResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="marksLocation" column="marks_location" />
|
||||
<result property="marksTime" column="marksTime" />
|
||||
<result property="marksPicture" column="marks_picture" />
|
||||
<result property="marksVideo" column="marks_video" />
|
||||
<result property="projectType" column="project_type" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="positionPart" column="position_part" />
|
||||
<result property="marksRemark" column="marks_remark" />
|
||||
<result property="auditorPerson" column="auditor_person" />
|
||||
<result property="auditorPhone" column="auditorPhone" />
|
||||
<result property="checkState" column="checkState" />
|
||||
<result property="createDate" column="createDate" />
|
||||
<result property="createUser" column="create_user" />
|
||||
<result property="projectId" column="projectId" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="idcardnum" column="idcardnum" />
|
||||
<result property="infoType" column="infoType" />
|
||||
<result property="smarkUrl" column="smark_url" />
|
||||
<result property="engineeringName" column="engineeringName" />
|
||||
<result property="procedure" column="procedure" />
|
||||
<result property="synchronization" column="synchronization" />
|
||||
<result property="typeOfProject" column="projectType" />
|
||||
<result property="name" column="pointName" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSspMarksVo">
|
||||
select id, marks_location, marks_time, marks_picture, marks_video,
|
||||
project_type, process_name, position_part, marks_remark,
|
||||
auditor_person, create_date, create_user, auditorPhone,checkState, projectId,project_name from smz_ssp_marks
|
||||
</sql>
|
||||
|
||||
<!--查询留痕上报列表-->
|
||||
<select id="selectSspMarksList" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks" resultMap="SspMarksResult">
|
||||
SELECT
|
||||
s.id,
|
||||
s.marks_location ,
|
||||
DATE_FORMAT(s.marks_time,'%Y-%m-%d %H:%i:%s') as "marksTime",
|
||||
s.marks_picture ,
|
||||
s.marks_video ,
|
||||
s.project_type,
|
||||
s.process_name ,
|
||||
s.position_part ,
|
||||
s.marks_remark ,
|
||||
s.auditor_person ,
|
||||
s.auditorPhone ,
|
||||
s.checkState,
|
||||
s.projectId,
|
||||
s.project_name ,
|
||||
t.project_type projectType ,
|
||||
p.name as "procedure",
|
||||
w.name as "engineeringName",
|
||||
s.idcardnum,
|
||||
s.infoType,
|
||||
s.smark_url,
|
||||
DATE_FORMAT(s.create_date,'%Y-%m-%d %H:%i:%s') as "createDate",
|
||||
f.id as "mainId",
|
||||
s.synchronization,
|
||||
IFNULL(w.NAME, '') pointName
|
||||
FROM
|
||||
smz_ssp_marks s LEFT JOIN smz_project_type t on s.project_type = t.id
|
||||
LEFT JOIN smz_process_name p on p.id = s.process_name
|
||||
LEFT JOIN smz_work_area w ON w.CODE = s.project_name
|
||||
left join smz_ssp_marksflow f on f.mainId = s.id
|
||||
<where>
|
||||
<if test="id != null and id != ''"> and s.id = #{id}</if>
|
||||
<if test="marksLocation != null and marksLocation != ''"> and s.marks_location = #{marksLocation}</if>
|
||||
<if test="marksTime != null and marksTime != ''"> and s.marks_time = #{marksTime}</if>
|
||||
<if test="marksPicture != null and marksPicture != ''"> and s.marks_picture = #{marksPicture}</if>
|
||||
<if test="marksVideo != null and marksVideo != ''"> and s.marks_video = #{marksVideo}</if>
|
||||
<if test="projectType != null and projectType != ''"> and s.project_type = #{projectType}</if>
|
||||
<if test="processName != null and processName != ''"> and s.process_name = #{processName}</if>
|
||||
<if test="positionPart != null and positionPart != ''"> and s.position_part = #{positionPart}</if>
|
||||
<if test="marksRemark != null and marksRemark != ''"> and s.marks_remark = #{marksRemark}</if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''"> and s.auditor_person = #{auditorPerson}</if>
|
||||
<if test="createUser != null and createUser != ''"> and s.create_user = #{createUser}</if>
|
||||
<if test="projectId != null and projectId != ''"> and s.projectId = #{projectId}</if>
|
||||
<if test="startTime != null and startTime != ''"> AND Date(s.create_date) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(s.create_date) </if>
|
||||
<if test="beginDate != null and beginDate != ''"> AND Date(s.marks_time) >= #{beginDate} </if>
|
||||
<if test="endDate != null and endDate != ''"> AND #{endDate} >= Date(s.marks_time) </if>
|
||||
<if test="checkState != null and checkState != ''"> AND s.checkState = #{checkState} </if>
|
||||
and s.is_del = 0
|
||||
and s.infoType = 1
|
||||
</where>
|
||||
order by s.create_date desc
|
||||
<if test="size != null and size != ''">
|
||||
limit #{nowPage},#{size}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<!--查询留痕上报列表-->
|
||||
<select id="queryByCheckState" parameterType="map" resultMap="SspMarksResult">
|
||||
SELECT
|
||||
s.id,
|
||||
s.marks_location ,
|
||||
s. marks_time ,
|
||||
s.marks_picture ,
|
||||
s.marks_video ,
|
||||
s.project_type,
|
||||
s.process_name ,
|
||||
s.position_part ,
|
||||
s.marks_remark ,
|
||||
s.auditor_person ,
|
||||
s.auditorPhone ,
|
||||
s.checkState,
|
||||
s.projectId,
|
||||
s.project_name ,
|
||||
t.project_type ,
|
||||
p.name,
|
||||
i.name,
|
||||
s.idcardnum,
|
||||
s.infoType,
|
||||
s.smark_url,
|
||||
DATE_FORMAT(s.create_date,'%Y-%m-%d %H:%i:%s') as "createDate",
|
||||
f.id as "mainId",
|
||||
IFNULL(w.NAME, '') pointName
|
||||
FROM
|
||||
smz_ssp_marks s LEFT JOIN smz_project_type t on s.project_type = t.id
|
||||
LEFT JOIN smz_process_name p on p.id = s.process_name
|
||||
LEFT JOIN smz_progress_info i on i.code = s.project_name
|
||||
left join smz_ssp_marksflow f on f.mainId = s.id
|
||||
LEFT JOIN smz_work_area w ON s.project_name = w.CODE
|
||||
<where>
|
||||
1 = 1
|
||||
and s.infoType = 1
|
||||
<!-- <if test="startTime != null and startTime != ''"> AND Date(s.create_date) >= #{startTime} </if>
|
||||
<if test="endTime != null and endTime != ''"> AND #{endTime} >= Date(s.create_date) </if>-->
|
||||
<if test="positionPart != null and positionPart != ''"> and s.position_part = #{positionPart}</if>
|
||||
<if test="checkState != null and checkState != ''"> and s.checkState = #{checkState}</if>
|
||||
<if test="projectId != null and projectId != ''"> and s.projectId = #{projectId}</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSspMarksById" parameterType="Integer" resultMap="SspMarksResult">
|
||||
<include refid="selectSspMarksVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSspMarks" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks">
|
||||
insert into smz_ssp_marks
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != '' ">id, </if>
|
||||
<if test="marksLocation != null and marksLocation != '' ">marks_location, </if>
|
||||
<if test="marksTime != null and marksTime != '' ">marks_time, </if>
|
||||
<if test="marksPicture != null and marksPicture != '' ">marks_picture, </if>
|
||||
<if test="marksVideo != null and marksVideo != '' ">marks_video, </if>
|
||||
<if test="projectType != null and projectType != '' ">project_type, </if>
|
||||
<if test="processName != null and processName != '' ">process_name, </if>
|
||||
<if test="positionPart != null and positionPart != '' ">position_part, </if>
|
||||
<if test="marksRemark != null and marksRemark != '' ">marks_remark, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != '' ">auditor_person, </if>
|
||||
<if test="createDate != null and createDate != '' ">create_date, </if>
|
||||
<if test="createUser != null and createUser != '' ">create_user, </if>
|
||||
<if test="projectId != null and projectId != '' ">projectId,</if>
|
||||
project_name,
|
||||
checkState,
|
||||
auditorPhone,
|
||||
infoType,
|
||||
is_del
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id}, </if>
|
||||
<if test="marksLocation != null and marksLocation != ''">#{marksLocation}, </if>
|
||||
<if test="marksTime != null and marksTime != ''">#{marksTime}, </if>
|
||||
<if test="marksPicture != null and marksPicture != ''">#{marksPicture}, </if>
|
||||
<if test="marksVideo != null and marksVideo != ''">#{marksVideo}, </if>
|
||||
<if test="projectType != null and projectType != ''">#{projectType}, </if>
|
||||
<if test="processName != null and processName != ''">#{processName}, </if>
|
||||
<if test="positionPart != null and positionPart != ''">#{positionPart}, </if>
|
||||
<if test="marksRemark != null and marksRemark != ''">#{marksRemark}, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''">#{auditorPerson}, </if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate}, </if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser}, </if>
|
||||
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
||||
#{projectName},
|
||||
#{checkState},
|
||||
#{auditorPhone},
|
||||
1,
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSspMarks" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="marksLocation != null and marksLocation != ''">marks_location = #{marksLocation}, </if>
|
||||
<if test="marksTime != null and marksTime != ''">marks_time = #{marksTime}, </if>
|
||||
<if test="marksPicture != null and marksPicture != ''">marks_picture = #{marksPicture}, </if>
|
||||
<if test="marksVideo != null and marksVideo != ''">marks_video = #{marksVideo}, </if>
|
||||
<if test="projectType != null and projectType != ''">project_type = #{projectType}, </if>
|
||||
<if test="processName != null and processName != ''">process_name = #{processName}, </if>
|
||||
<if test="positionPart != null and positionPart != ''">position_part = #{positionPart}, </if>
|
||||
<if test="marksRemark != null and marksRemark != ''">marks_remark = #{marksRemark}, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''">auditor_person = #{auditorPerson}, </if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate}, </if>
|
||||
<if test="createUser != null and createUser != ''">create_user = #{createUser}, </if>
|
||||
<if test="projectId != null and projectId != ''">projectId = #{projectId},</if>
|
||||
<if test="projectName != null and projectName != ''">project_name = #{projectName},</if>
|
||||
<if test="auditorPhone != null and auditorPhone != ''">auditorPhone = #{auditorPhone},</if>
|
||||
<if test="checkState != null and checkState != ''">checkState = #{checkState},</if>
|
||||
<if test="smarkUrl != null and smarkUrl != ''">smark_url = #{smarkUrl},</if>
|
||||
<if test="surveyorName != null and surveyorName != ''">surveyorName = #{surveyorName},</if>
|
||||
<if test="surveyorId != null and surveyorId != ''">surveyorId = #{surveyorId},</if>
|
||||
<if test="surveyorTime != null and surveyorTime != ''">surveyorTime = #{surveyorTime},</if>
|
||||
<if test="surveyorContent != null and surveyorContent != ''">surveyorContent = #{surveyorContent}</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate}</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSspMarksById" parameterType="Integer">
|
||||
delete from smz_ssp_marks where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSspMarksByIds" parameterType="String">
|
||||
delete from smz_ssp_marks where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!--新增留痕上报-->
|
||||
<insert id="addSspMarks" parameterType="com.ruoyi.web.sspMarks.domain.SspMarks" >
|
||||
insert into smz_ssp_marks
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != '' ">id, </if>
|
||||
<if test="marksLocation != null and marksLocation != '' ">marks_location, </if>
|
||||
<if test="marksTime != null and marksTime != '' ">marks_time, </if>
|
||||
<if test="projectType != null and projectType != '' ">project_type, </if>
|
||||
<if test="processName != null and processName != '' ">process_name, </if>
|
||||
<if test="positionPart != null and positionPart != '' ">position_part, </if>
|
||||
<if test="marksRemark != null and marksRemark != '' ">marks_remark, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != '' ">auditor_person, </if>
|
||||
create_date,
|
||||
<if test="createUser != null and createUser != '' ">create_user, </if>
|
||||
<if test="projectId != null and projectId != '' ">projectId,</if>
|
||||
<if test="projectName != null and projectName != '' ">project_name,</if>
|
||||
checkState,
|
||||
<if test="auditorPhone != null and auditorPhone != '' ">auditorPhone,</if>
|
||||
<if test="idcardnum != null and idcardnum != '' ">idcardnum,</if>
|
||||
infoType,
|
||||
is_del
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id}, </if>
|
||||
<if test="marksLocation != null and marksLocation != ''">#{marksLocation}, </if>
|
||||
<if test="marksTime != null and marksTime != ''">#{marksTime}, </if>
|
||||
<if test="projectType != null and projectType != ''">#{projectType}, </if>
|
||||
<if test="processName != null and processName != ''">#{processName}, </if>
|
||||
<if test="positionPart != null and positionPart != ''">#{positionPart}, </if>
|
||||
<if test="marksRemark != null and marksRemark != ''">#{marksRemark}, </if>
|
||||
<if test="auditorPerson != null and auditorPerson != ''">#{auditorPerson}, </if>
|
||||
NOW(),
|
||||
<if test="createUser != null and createUser != ''">#{createUser}, </if>
|
||||
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
||||
<if test="projectName != null and projectName != ''">#{projectName},</if>
|
||||
0,
|
||||
<if test="auditorPhone != null and auditorPhone != ''">#{auditorPhone},</if>
|
||||
<if test="idcardnum != null and idcardnum != ''">#{idcardnum},</if>
|
||||
1,
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryPicture" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{mainId}
|
||||
AND fileType = 0
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryVideo" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{mainId}
|
||||
AND fileType = 1
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryPictureUrl" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{externalId}
|
||||
AND fileType = 0
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据id查询相关的文件 -->
|
||||
<select id="queryVideoUrl" parameterType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo" resultType="com.ruoyi.web.sspMarks.domain.SspMarkfileinfo">
|
||||
SELECT
|
||||
fileUrl
|
||||
FROM
|
||||
smz_ssp_markfileinfo
|
||||
WHERE
|
||||
externalId = #{externalId}
|
||||
AND fileType = 1
|
||||
</select>
|
||||
|
||||
<update id="updatePicture" parameterType="map">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
marks_picture = #{picture}
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateVideo" parameterType="map">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
marks_video = #{video}
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateSmarkUrl" parameterType="map">
|
||||
update smz_ssp_marks
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
smark_url = #{smarkUrl}
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!--根据id查询-->
|
||||
<select id="queryById" parameterType="String" resultMap="SspMarksResult">
|
||||
SELECT
|
||||
s.id,
|
||||
s.marks_location ,
|
||||
s. marks_time ,
|
||||
s.marks_picture ,
|
||||
s.marks_video ,
|
||||
s.project_type,
|
||||
s.process_name ,
|
||||
s.position_part ,
|
||||
s.marks_remark ,
|
||||
s.auditor_person ,
|
||||
s.auditorPhone ,
|
||||
s.checkState,
|
||||
s.projectId,
|
||||
s.project_name ,
|
||||
t.project_type ,
|
||||
p.name,
|
||||
i.name,
|
||||
s.idcardnum,
|
||||
s.infoType,
|
||||
s.smark_url,
|
||||
DATE_FORMAT(s.create_date,'%Y-%m-%d %H:%i:%s') as "createDate",
|
||||
f.id as "mainId"
|
||||
FROM
|
||||
smz_ssp_marks s LEFT JOIN smz_project_type t on s.project_type = t.id
|
||||
LEFT JOIN smz_process_name p on p.id = s.process_name
|
||||
LEFT JOIN smz_progress_info i on i.code = s.project_name
|
||||
left join smz_ssp_marksflow f on f.mainId = s.id
|
||||
where s.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSspQualityMark" parameterType="java.util.Map" useGeneratedKeys ="true" keyProperty="markId" keyColumn="mark_id">
|
||||
INSERT INTO `smz_ssp_quality_mark`(
|
||||
<if test="projectId != null and projectId != ''">project_id,</if>
|
||||
<if test="workTime != null and workTime != ''">work_time,</if>
|
||||
<if test="beforeImgs != null and beforeImgs != ''">before_imgs,</if>
|
||||
<if test="afterImgs != null and afterImgs != ''">after_imgs,</if>
|
||||
<if test="positionId != null and positionId != ''">position_id,</if>
|
||||
<if test="paragrapId != null and paragrapId != ''">paragrap_id,</if>
|
||||
<if test="locationId != null and locationId != ''">location_id,</if>
|
||||
<if test="conclusion != null and conclusion != ''">conclusion,</if>
|
||||
<if test="szUser != null and szUser != ''">sz_user,</if>
|
||||
<if test="zjUserId != null and zjUserId != ''">zj_user_id,</if>
|
||||
<if test="zbUserId != null and zbUserId != ''">zb_user_id,</if>
|
||||
<if test="jlUserId != null and jlUserId != ''">jl_user_id,</if>
|
||||
<if test="createUser != null and createUser != ''">create_user,</if>
|
||||
create_time
|
||||
)
|
||||
VALUES(
|
||||
<if test="projectId != null and projectId != ''">#{projectId},</if>
|
||||
<if test="workTime != null and workTime != ''">#{workTime},</if>
|
||||
<if test="beforeImgs != null and beforeImgs != ''">#{beforeImgs},</if>
|
||||
<if test="afterImgs != null and afterImgs != ''">#{afterImgs},</if>
|
||||
<if test="positionId != null and positionId != ''">#{positionId},</if>
|
||||
<if test="paragrapId != null and paragrapId != ''">#{paragrapId},</if>
|
||||
<if test="locationId != null and locationId != ''">#{locationId},</if>
|
||||
<if test="conclusion != null and conclusion != ''">#{conclusion},</if>
|
||||
<if test="szUser != null and szUser != ''">#{szUser},</if>
|
||||
<if test="zjUserId != null and zjUserId != ''">#{zjUserId},</if>
|
||||
<if test="zbUserId != null and zbUserId != ''">#{zbUserId},</if>
|
||||
<if test="jlUserId != null and jlUserId != ''">#{jlUserId},</if>
|
||||
<if test="createUser != null and createUser != ''">#{createUser},</if>
|
||||
NOW()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertSspQualityMarkApprove" parameterType="java.util.Map">
|
||||
INSERT INTO `smz_ssp_quality_mark_approve`(mark_id,user_id,user_name,login_name,sort,state,create_time)
|
||||
VALUES(#{markId},#{userId},#{userName},#{loginName},#{sort},0,NOW())
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
@ -1,113 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.userLogin.mapper.WxUserLoginMapper">
|
||||
|
||||
<!--验证登录用户信息-->
|
||||
<select id="checkLoginNameAndPsw" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
su.*,
|
||||
IFNULL(GROUP_CONCAT( sur.role_id ),'') AS roleId,
|
||||
IFNULL(GROUP_CONCAT( sr.role_name ),'') AS roleName,
|
||||
d.dept_name,
|
||||
IFNULL( spu.project_id, '' ) AS projectId
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
|
||||
LEFT JOIN sys_role sr ON sur.role_id = sr.role_id
|
||||
LEFT JOIN sur_project_userinfo spu ON su.user_id = spu.user_id
|
||||
left join sys_dept d on d.dept_id = su.dept_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND su.phonenumber=#{loginName}
|
||||
AND su.del_flag=0
|
||||
AND su.status=0
|
||||
<if test="password != null and password != ''">and password=#{password}</if>
|
||||
GROUP BY su.user_id
|
||||
</select>
|
||||
|
||||
<!--修改账号密码-->
|
||||
<update id="updataUser" parameterType="map">
|
||||
update sys_user set password =#{password} where phonenumber = #{loginName}
|
||||
</update>
|
||||
|
||||
<!--添加用户openid信息-->
|
||||
<insert id="addUserOpenId" parameterType="map">
|
||||
insert into sys_user_openid
|
||||
(
|
||||
<if test="openId != null and openId != ''">openId,</if>
|
||||
<if test="userId != null and userId != ''">userId,</if>
|
||||
<if test="loginName != null and loginName != ''">loginName,</if>
|
||||
<if test="nickname != null and nickname != ''">nickname,</if>
|
||||
creatTime
|
||||
) values
|
||||
(
|
||||
<if test="openId != null and openId != ''">#{openId},</if>
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="loginName != null and loginName != ''">#{loginName},</if>
|
||||
<if test="nickname != null and nickname != ''">#{nickname},</if>
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!--更新用户openid-->
|
||||
<update id="updateUserOpenId" parameterType="String">
|
||||
update sys_user_openid set userId=#{userId},loginName=#{loginName},nickname=#{nickname} where openId =#{openId} and isDel = 0
|
||||
</update>
|
||||
|
||||
<!--根据电话查询用户id-->
|
||||
<select id="getUserIdByPhone" parameterType="String" resultType="String">
|
||||
select user_id from sys_user where 1=1 and del_flag=0 and phonenumber=#{phone} and status=0
|
||||
</select>
|
||||
|
||||
<!--根据用户openid查询用户信息-->
|
||||
<select id="getUserInfoByOpenId" parameterType="String" resultType="map">
|
||||
SELECT
|
||||
IFNULL(su.user_id,'') AS userId,
|
||||
IFNULL(su.phonenumber,'') AS loginName,
|
||||
IFNULL(su.user_name,'') AS userName,
|
||||
IFNULL(su.nick_name,'') AS nickName,
|
||||
IFNULL(su.nick_name,'') AS nickName,
|
||||
IFNULL(su.dept_id,'') AS deptId,
|
||||
IFNULL(d.dept_name,'') AS deptName,
|
||||
IFNULL(su.remark,'') AS remark,
|
||||
IFNULL(GROUP_CONCAT( sur.role_id ),'') AS roleId,
|
||||
IFNULL(GROUP_CONCAT( sr.role_name ),'') AS roleName,
|
||||
'' AS projectId
|
||||
FROM
|
||||
sys_user_openid suo
|
||||
LEFT JOIN sys_user su ON suo.userId = su.user_id
|
||||
LEFT JOIN sys_user_role sur ON su.user_id = sur.user_id
|
||||
LEFT JOIN sys_role sr ON sur.role_id = sr.role_id
|
||||
left join sys_dept d on d.dept_id = su.dept_id
|
||||
WHERE
|
||||
1 = 1
|
||||
AND suo.isDel = 0
|
||||
AND su.del_flag = 0
|
||||
AND su.STATUS = 0
|
||||
AND suo.openId =#{openId}
|
||||
GROUP BY suo.openId
|
||||
</select>
|
||||
|
||||
<!--验证手机号码是否已经绑定-->
|
||||
<select id="checkBindByPhone" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user_openid where 1=1 and loginName=#{phone} and isDel=0
|
||||
</select>
|
||||
|
||||
<!--验证当前openId是否已绑定-->
|
||||
<select id="checkBindByOpenId" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user_openid where openId=#{openId} and isDel=0
|
||||
</select>
|
||||
|
||||
<!--查询出系统菜单信息-->
|
||||
<select id="selectMenuList" resultType="map">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`sur_menu_config`
|
||||
WHERE
|
||||
del_flag !=1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.web.system.mapper.WechatUserLoginMapper">
|
||||
<mapper namespace="com.ruoyi.web.userLogin.mapper.WechatUserLoginMapper">
|
||||
|
||||
<!--验证登录用户信息-->
|
||||
<select id="findUserInfo" parameterType="String" resultType="map">
|
||||
|
|
@ -131,4 +131,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by smc.menu_sort asc
|
||||
</select>
|
||||
|
||||
<!--修改账号密码-->
|
||||
<update id="updataUser" parameterType="map">
|
||||
update sys_user set password =#{password} where phonenumber = #{loginName}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
@charset "utf-8";
|
||||
/* CSS Document */
|
||||
html,body,div,span,h1,h2,h3,h4,h5,h6,p,pre,a,code,em,img,small,strong,sub,sup,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label{margin:0; padding:0; border:0; outline:0; vertical-align:baseline; background:transparent}
|
||||
a{color:#007bc4; text-decoration:none; cursor:pointer;}
|
||||
.table_parameters a:hover{text-decoration: none}
|
||||
a:hover{text-decoration:underline}
|
||||
ol,ul{list-style:none}
|
||||
table{border-collapse:collapse; border-spacing:0}
|
||||
/*html{background:url(../images/demo_bg.png)}*/
|
||||
body{height:100%;}
|
||||
|
||||
.clearfix:after{visibility:hidden; display:block; font-size:0; content:" "; clear:both; height:0}
|
||||
|
||||
.container{width:100%; float:left; height:auto; border-bottom: solid 1px #eeeeee; padding-bottom:10px;padding-top:10px}
|
||||
.header{width:60px; height:60px; float:left; margin-left:15px}
|
||||
.header img{ width:100%; height:100%}
|
||||
.right_con{ margin-left:85px; display:block; margin-right:15px}
|
||||
.use{width:100%; float:left; height:30px; line-height:30px;}
|
||||
.usename{}
|
||||
.usename span{color:#ed4947; font-size:1.3em}
|
||||
.usename em{ float:right; font-style:normal; font-size:1em; color:#b8b8b8}
|
||||
.demo{width:700px; margin:0 auto}
|
||||
.demo p.fx_content{ float:left; height:auto; margin:0 ; padding:0; font-size:1.1em; line-height:22px; margin-top:5px}
|
||||
|
||||
.demo{width:100%; float:right;height:auto}
|
||||
.my-gallery {width: 100%; margin-top:15px}
|
||||
.my-gallery img { display:block; float:left}
|
||||
.my-gallery figure {width: 90px; height: 90px;display: block;float: left;margin: 5px; overflow: hidden;}
|
||||
.my-gallery figcaption { display: none; }
|
||||
|
||||
.fx_address{ float:left;width:100%; margin-top:25px;height:25px; line-height:25px; font-size:1em; color:#b8b8b8; background:url(../images/dingwei.png) no-repeat left center; background-size:18px 20px; text-indent:20px}
|
||||
|
|
@ -1,129 +0,0 @@
|
|||
body{
|
||||
font-family:PingFangSC-Regular;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
ol,li {
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
li {
|
||||
list-style-type: none
|
||||
}
|
||||
|
||||
#date-wrapper {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
width: 100%;
|
||||
margin: -139px 0 0 -50%;
|
||||
z-index: 56;
|
||||
text-align: center;
|
||||
background: #263466;
|
||||
border-radius: 3px;
|
||||
padding-bottom: 10px;
|
||||
display: none;
|
||||
|
||||
}
|
||||
|
||||
#d-mask {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #000;
|
||||
filter: alpha(Opacity=50);
|
||||
-moz-opacity: .5;
|
||||
opacity: .5;
|
||||
z-index: 55;
|
||||
display: none
|
||||
}
|
||||
|
||||
#date-wrapper h3 {
|
||||
font-family:PingFangSC-Regular;
|
||||
line-height: 50px;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
border-radius: 3px 3px 0 0
|
||||
}
|
||||
|
||||
#date-wrapper ol,#d-tit>div {
|
||||
width: 20%;
|
||||
float: left;
|
||||
position: relative
|
||||
}
|
||||
|
||||
#d-content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#d-content #d-bg {
|
||||
height: 120px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
border: 1px solid #5567a9;
|
||||
}
|
||||
|
||||
#d-cancel,#d-confirm {
|
||||
border-radius: 3px;
|
||||
float: left;
|
||||
width: 40%;
|
||||
line-height: 30px;
|
||||
font-size: 15px;
|
||||
margin: 0 5%;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#d-confirm {
|
||||
color:#8466fe
|
||||
}
|
||||
|
||||
#date-wrapper li {
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
position: relative
|
||||
}
|
||||
|
||||
#d-tit {
|
||||
overflow: hidden;
|
||||
line-height: 30px;
|
||||
margin-bottom: -1px
|
||||
}
|
||||
|
||||
#date-wrapper ol {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0
|
||||
}
|
||||
#date-wrapper ol:nth-child(2) {
|
||||
left: 20%;
|
||||
}
|
||||
#date-wrapper ol:nth-child(3) {
|
||||
left: 40%;
|
||||
}
|
||||
#date-wrapper ol:nth-child(4) {
|
||||
left: 60%;
|
||||
}
|
||||
#date-wrapper ol:nth-child(5) {
|
||||
left: 80%;
|
||||
}
|
||||
#date-wrapper ol:nth-child(6) {
|
||||
left: 100%;
|
||||
}
|
||||
#d-content #d-bg:after{
|
||||
content: '';
|
||||
height: 40px;
|
||||
background: #0d1d55;
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
|
|
@ -1,483 +0,0 @@
|
|||
/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */
|
||||
/*
|
||||
|
||||
Contents:
|
||||
|
||||
1. Buttons
|
||||
2. Share modal and links
|
||||
3. Index indicator ("1 of X" counter)
|
||||
4. Caption
|
||||
5. Loading indicator
|
||||
6. Additional styles (root element, top bar, idle state, hidden state, etc.)
|
||||
|
||||
*/
|
||||
/*
|
||||
|
||||
1. Buttons
|
||||
|
||||
*/
|
||||
/* <button> css reset */
|
||||
.pswp__button {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
position: relative;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
overflow: visible;
|
||||
-webkit-appearance: none;
|
||||
display: block;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
float: right;
|
||||
opacity: 0.75;
|
||||
-webkit-transition: opacity 0.2s;
|
||||
transition: opacity 0.2s;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none; }
|
||||
.pswp__button:focus,
|
||||
.pswp__button:hover {
|
||||
opacity: 1; }
|
||||
.pswp__button:active {
|
||||
outline: none;
|
||||
opacity: 0.9; }
|
||||
.pswp__button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
/* pswp__ui--over-close class it added when mouse is over element that should close gallery */
|
||||
.pswp__ui--over-close .pswp__button--close {
|
||||
opacity: 1; }
|
||||
|
||||
.pswp__button,
|
||||
.pswp__button--arrow--left:before,
|
||||
.pswp__button--arrow--right:before {
|
||||
background: url(default-skin.png) 0 0 no-repeat;
|
||||
background-size: 264px 88px;
|
||||
width: 44px;
|
||||
height: 44px; }
|
||||
|
||||
@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {
|
||||
/* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */
|
||||
.pswp--svg .pswp__button,
|
||||
.pswp--svg .pswp__button--arrow--left:before,
|
||||
.pswp--svg .pswp__button--arrow--right:before {
|
||||
background-image: url(default-skin.svg); }
|
||||
.pswp--svg .pswp__button--arrow--left,
|
||||
.pswp--svg .pswp__button--arrow--right {
|
||||
background: none; } }
|
||||
|
||||
.pswp__button--close {
|
||||
background-position: 0 -44px; }
|
||||
|
||||
.pswp__button--share {
|
||||
background-position: -44px -44px; }
|
||||
|
||||
.pswp__button--fs {
|
||||
display: none; }
|
||||
|
||||
.pswp--supports-fs .pswp__button--fs {
|
||||
display: block; }
|
||||
|
||||
.pswp--fs .pswp__button--fs {
|
||||
background-position: -44px 0; }
|
||||
|
||||
.pswp__button--zoom {
|
||||
display: none;
|
||||
background-position: -88px 0; }
|
||||
|
||||
.pswp--zoom-allowed .pswp__button--zoom {
|
||||
display: block; }
|
||||
|
||||
.pswp--zoomed-in .pswp__button--zoom {
|
||||
background-position: -132px 0; }
|
||||
|
||||
/* no arrows on touch screens */
|
||||
.pswp--touch .pswp__button--arrow--left,
|
||||
.pswp--touch .pswp__button--arrow--right {
|
||||
visibility: hidden; }
|
||||
|
||||
/*
|
||||
Arrow buttons hit area
|
||||
(icon is added to :before pseudo-element)
|
||||
*/
|
||||
.pswp__button--arrow--left,
|
||||
.pswp__button--arrow--right {
|
||||
background: none;
|
||||
top: 50%;
|
||||
margin-top: -50px;
|
||||
width: 70px;
|
||||
height: 100px;
|
||||
position: absolute; }
|
||||
|
||||
.pswp__button--arrow--left {
|
||||
left: 0; }
|
||||
|
||||
.pswp__button--arrow--right {
|
||||
right: 0; }
|
||||
|
||||
.pswp__button--arrow--left:before,
|
||||
.pswp__button--arrow--right:before {
|
||||
content: '';
|
||||
top: 35px;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
height: 30px;
|
||||
width: 32px;
|
||||
position: absolute; }
|
||||
|
||||
.pswp__button--arrow--left:before {
|
||||
left: 6px;
|
||||
background-position: -138px -44px; }
|
||||
|
||||
.pswp__button--arrow--right:before {
|
||||
right: 6px;
|
||||
background-position: -94px -44px; }
|
||||
|
||||
/*
|
||||
|
||||
2. Share modal/popup and links
|
||||
|
||||
*/
|
||||
.pswp__counter,
|
||||
.pswp__share-modal {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.pswp__share-modal {
|
||||
display: block;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding: 10px;
|
||||
position: absolute;
|
||||
z-index: 1600;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.25s ease-out;
|
||||
transition: opacity 0.25s ease-out;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity; }
|
||||
|
||||
.pswp__share-modal--hidden {
|
||||
display: none; }
|
||||
|
||||
.pswp__share-tooltip {
|
||||
z-index: 1620;
|
||||
position: absolute;
|
||||
background: #FFF;
|
||||
top: 56px;
|
||||
border-radius: 2px;
|
||||
display: block;
|
||||
width: auto;
|
||||
right: 44px;
|
||||
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
|
||||
-webkit-transform: translateY(6px);
|
||||
-ms-transform: translateY(6px);
|
||||
transform: translateY(6px);
|
||||
-webkit-transition: -webkit-transform 0.25s;
|
||||
transition: transform 0.25s;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: transform; }
|
||||
.pswp__share-tooltip a {
|
||||
display: block;
|
||||
padding: 8px 12px;
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
line-height: 18px; }
|
||||
.pswp__share-tooltip a:hover {
|
||||
text-decoration: none;
|
||||
color: #000; }
|
||||
.pswp__share-tooltip a:first-child {
|
||||
/* round corners on the first/last list item */
|
||||
border-radius: 2px 2px 0 0; }
|
||||
.pswp__share-tooltip a:last-child {
|
||||
border-radius: 0 0 2px 2px; }
|
||||
|
||||
.pswp__share-modal--fade-in {
|
||||
opacity: 1; }
|
||||
.pswp__share-modal--fade-in .pswp__share-tooltip {
|
||||
-webkit-transform: translateY(0);
|
||||
-ms-transform: translateY(0);
|
||||
transform: translateY(0); }
|
||||
|
||||
/* increase size of share links on touch devices */
|
||||
.pswp--touch .pswp__share-tooltip a {
|
||||
padding: 16px 12px; }
|
||||
|
||||
a.pswp__share--facebook:before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: 15px;
|
||||
border: 6px solid transparent;
|
||||
border-bottom-color: #FFF;
|
||||
-webkit-pointer-events: none;
|
||||
-moz-pointer-events: none;
|
||||
pointer-events: none; }
|
||||
|
||||
a.pswp__share--facebook:hover {
|
||||
background: #3E5C9A;
|
||||
color: #FFF; }
|
||||
a.pswp__share--facebook:hover:before {
|
||||
border-bottom-color: #3E5C9A; }
|
||||
|
||||
a.pswp__share--twitter:hover {
|
||||
background: #55ACEE;
|
||||
color: #FFF; }
|
||||
|
||||
a.pswp__share--pinterest:hover {
|
||||
background: #CCC;
|
||||
color: #CE272D; }
|
||||
|
||||
a.pswp__share--download:hover {
|
||||
background: #DDD; }
|
||||
|
||||
/*
|
||||
|
||||
3. Index indicator ("1 of X" counter)
|
||||
|
||||
*/
|
||||
.pswp__counter {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 44px;
|
||||
font-size: 13px;
|
||||
line-height: 44px;
|
||||
color: #FFF;
|
||||
opacity: 0.75;
|
||||
padding: 0 10px; }
|
||||
|
||||
/*
|
||||
|
||||
4. Caption
|
||||
|
||||
*/
|
||||
.pswp__caption {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
min-height: 44px; }
|
||||
.pswp__caption small {
|
||||
font-size: 11px;
|
||||
color: #BBB; }
|
||||
|
||||
.pswp__caption__center {
|
||||
text-align: center;
|
||||
max-width: 420px;
|
||||
margin: 0 auto;
|
||||
font-size: 13px;
|
||||
padding: 10px;
|
||||
line-height: 20px;
|
||||
color: #CCC; }
|
||||
|
||||
.pswp__caption--empty {
|
||||
display: none; }
|
||||
|
||||
/* Fake caption element, used to calculate height of next/prev image */
|
||||
.pswp__caption--fake {
|
||||
visibility: hidden; }
|
||||
|
||||
/*
|
||||
|
||||
5. Loading indicator (preloader)
|
||||
|
||||
You can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR
|
||||
|
||||
*/
|
||||
.pswp__preloader {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -22px;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.25s ease-out;
|
||||
transition: opacity 0.25s ease-out;
|
||||
will-change: opacity;
|
||||
direction: ltr; }
|
||||
|
||||
.pswp__preloader__icn {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 12px; }
|
||||
|
||||
.pswp__preloader--active {
|
||||
opacity: 1; }
|
||||
.pswp__preloader--active .pswp__preloader__icn {
|
||||
/* We use .gif in browsers that don't support CSS animation */
|
||||
background: url(preloader.gif) 0 0 no-repeat; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader--active {
|
||||
opacity: 1; }
|
||||
.pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {
|
||||
-webkit-animation: clockwise 500ms linear infinite;
|
||||
animation: clockwise 500ms linear infinite; }
|
||||
.pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {
|
||||
-webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;
|
||||
animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__icn {
|
||||
background: none;
|
||||
opacity: 0.75;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 15px;
|
||||
margin: 0; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__cut {
|
||||
/*
|
||||
The idea of animating inner circle is based on Polymer ("material") loading indicator
|
||||
by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html
|
||||
*/
|
||||
position: relative;
|
||||
width: 7px;
|
||||
height: 14px;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp--css_animation .pswp__preloader__donut {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border: 2px solid #FFF;
|
||||
border-radius: 50%;
|
||||
border-left-color: transparent;
|
||||
border-bottom-color: transparent;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: none;
|
||||
margin: 0; }
|
||||
|
||||
@media screen and (max-width: 1024px) {
|
||||
.pswp__preloader {
|
||||
position: relative;
|
||||
left: auto;
|
||||
top: auto;
|
||||
margin: 0;
|
||||
float: right; } }
|
||||
|
||||
@-webkit-keyframes clockwise {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes clockwise {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@-webkit-keyframes donut-rotate {
|
||||
0% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
-webkit-transform: rotate(-140deg);
|
||||
transform: rotate(-140deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); } }
|
||||
|
||||
@keyframes donut-rotate {
|
||||
0% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
-webkit-transform: rotate(-140deg);
|
||||
transform: rotate(-140deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(0);
|
||||
transform: rotate(0); } }
|
||||
|
||||
/*
|
||||
|
||||
6. Additional styles
|
||||
|
||||
*/
|
||||
/* root element of UI */
|
||||
.pswp__ui {
|
||||
-webkit-font-smoothing: auto;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
z-index: 1550; }
|
||||
|
||||
/* top black bar with buttons and "1 of X" indicator */
|
||||
.pswp__top-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 44px;
|
||||
width: 100%; }
|
||||
|
||||
.pswp__caption,
|
||||
.pswp__top-bar,
|
||||
.pswp--has_mouse .pswp__button--arrow--left,
|
||||
.pswp--has_mouse .pswp__button--arrow--right {
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity;
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
/* pswp--has_mouse class is added only when two subsequent mousemove events occur */
|
||||
.pswp--has_mouse .pswp__button--arrow--left,
|
||||
.pswp--has_mouse .pswp__button--arrow--right {
|
||||
visibility: visible; }
|
||||
|
||||
.pswp__top-bar,
|
||||
.pswp__caption {
|
||||
background-color: rgba(0, 0, 0, 0.5); }
|
||||
|
||||
/* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */
|
||||
.pswp__ui--fit .pswp__top-bar,
|
||||
.pswp__ui--fit .pswp__caption {
|
||||
background-color: rgba(0, 0, 0, 0.3); }
|
||||
|
||||
/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */
|
||||
.pswp__ui--idle .pswp__top-bar {
|
||||
opacity: 0; }
|
||||
|
||||
.pswp__ui--idle .pswp__button--arrow--left,
|
||||
.pswp__ui--idle .pswp__button--arrow--right {
|
||||
opacity: 0; }
|
||||
|
||||
/*
|
||||
pswp__ui--hidden class is added when controls are hidden
|
||||
e.g. when user taps to toggle visibility of controls
|
||||
*/
|
||||
.pswp__ui--hidden .pswp__top-bar,
|
||||
.pswp__ui--hidden .pswp__caption,
|
||||
.pswp__ui--hidden .pswp__button--arrow--left,
|
||||
.pswp__ui--hidden .pswp__button--arrow--right {
|
||||
/* Force paint & create composition layer for controls. */
|
||||
opacity: 0.001; }
|
||||
|
||||
/* pswp__ui--one-slide class is added when there is just one item in gallery */
|
||||
.pswp__ui--one-slide .pswp__button--arrow--left,
|
||||
.pswp__ui--one-slide .pswp__button--arrow--right,
|
||||
.pswp__ui--one-slide .pswp__counter {
|
||||
display: none; }
|
||||
|
||||
.pswp__element--disabled {
|
||||
display: none !important; }
|
||||
|
||||
.pswp--minimal--dark .pswp__top-bar {
|
||||
background: none; }
|
||||
|
Before Width: | Height: | Size: 547 B |
|
|
@ -1 +0,0 @@
|
|||
<svg width="264" height="88" viewBox="0 0 264 88" xmlns="http://www.w3.org/2000/svg"><title>default-skin 2</title><g fill="none" fill-rule="evenodd"><g><path d="M67.002 59.5v3.768c-6.307.84-9.184 5.75-10.002 9.732 2.22-2.83 5.564-5.098 10.002-5.098V71.5L73 65.585 67.002 59.5z" id="Shape" fill="#fff"/><g fill="#fff"><path d="M13 29v-5h2v3h3v2h-5zM13 15h5v2h-3v3h-2v-5zM31 15v5h-2v-3h-3v-2h5zM31 29h-5v-2h3v-3h2v5z" id="Shape"/></g><g fill="#fff"><path d="M62 24v5h-2v-3h-3v-2h5zM62 20h-5v-2h3v-3h2v5zM70 20v-5h2v3h3v2h-5zM70 24h5v2h-3v3h-2v-5z"/></g><path d="M20.586 66l-5.656-5.656 1.414-1.414L22 64.586l5.656-5.656 1.414 1.414L23.414 66l5.656 5.656-1.414 1.414L22 67.414l-5.656 5.656-1.414-1.414L20.586 66z" fill="#fff"/><path d="M111.785 65.03L110 63.5l3-3.5h-10v-2h10l-3-3.5 1.785-1.468L117 59l-5.215 6.03z" fill="#fff"/><path d="M152.215 65.03L154 63.5l-3-3.5h10v-2h-10l3-3.5-1.785-1.468L147 59l5.215 6.03z" fill="#fff"/><g><path id="Rectangle-11" fill="#fff" d="M160.957 28.543l-3.25-3.25-1.413 1.414 3.25 3.25z"/><path d="M152.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" id="Oval-1" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M150 21h5v1h-5z"/></g><g><path d="M116.957 28.543l-1.414 1.414-3.25-3.25 1.414-1.414 3.25 3.25z" fill="#fff"/><path d="M108.5 27c3.038 0 5.5-2.462 5.5-5.5s-2.462-5.5-5.5-5.5-5.5 2.462-5.5 5.5 2.462 5.5 5.5 5.5z" stroke="#fff" stroke-width="1.5"/><path fill="#fff" d="M106 21h5v1h-5z"/><path fill="#fff" d="M109.043 19.008l-.085 5-1-.017.085-5z"/></g></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 866 B |
|
|
@ -1,88 +0,0 @@
|
|||
/*提示框*/
|
||||
|
||||
@keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@-webkit-keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@-moz-keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@-o-keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@-ms-keyframes fadeIn {
|
||||
0% {opacity: 0}
|
||||
100% {opacity: 1}
|
||||
}
|
||||
@keyframes fadeOut {
|
||||
0% {opacity: 1}
|
||||
100% {opacity: 0}
|
||||
}
|
||||
@-webkit-keyframes fadeOut {
|
||||
0% {opacity: 1}
|
||||
100% {opacity: 0}
|
||||
}
|
||||
@-moz-keyframes fadeOut {
|
||||
0% {opacity: 1}
|
||||
100% {opacity: 0}
|
||||
}
|
||||
@-o-keyframes fadeOut {
|
||||
0% {opacity: 1}
|
||||
100% {opacity: 0}
|
||||
}
|
||||
@-ms-keyframes fadeOut {
|
||||
0% {opacity: 1}
|
||||
100% {opacity: 0}
|
||||
}
|
||||
#toast{
|
||||
background: rgba(55,55,55,0.7);
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
border-radius: 5px;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 40%;
|
||||
max-width: 400px;
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
padding:30px 20px ;
|
||||
transform: translate(-50%,-50%);
|
||||
-webkit-transform: translate(-50%,-50%);
|
||||
-moz-transform: translate(-50%,-50%);
|
||||
-o-transform: translate(-50%,-50%);
|
||||
-ms-transform: translate(-50%,-50%);
|
||||
z-index: 9999;
|
||||
}
|
||||
.hide{
|
||||
display: none;
|
||||
}
|
||||
.fadeOut{
|
||||
animation: fadeOut .5s;
|
||||
}
|
||||
.fadeIn{
|
||||
animation:fadeIn .5s;
|
||||
}
|
||||
.loading_p{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
position: fixed;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
text-align: center;
|
||||
padding-top: 80%;
|
||||
display: none;
|
||||
}
|
||||
.loading_p div{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.loading_p img{
|
||||
width:32px;
|
||||
height:32px;
|
||||
}
|
||||
|
|
@ -1,178 +0,0 @@
|
|||
/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */
|
||||
/*
|
||||
Styles for basic PhotoSwipe functionality (sliding area, open/close transitions)
|
||||
*/
|
||||
/* pswp = photoswipe */
|
||||
.pswp {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
overflow: hidden;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
z-index: 1500;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* create separate layer, to avoid paint on window.onscroll in webkit/blink */
|
||||
-webkit-backface-visibility: hidden;
|
||||
outline: none; }
|
||||
.pswp * {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.pswp img {
|
||||
max-width: none; }
|
||||
|
||||
/* style is added when JS option showHideOpacity is set to true */
|
||||
.pswp--animate_opacity {
|
||||
/* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */
|
||||
opacity: 0.001;
|
||||
will-change: opacity;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp--open {
|
||||
display: block; }
|
||||
|
||||
.pswp--zoom-allowed .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-zoom-in;
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: zoom-in; }
|
||||
|
||||
.pswp--zoomed-in .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-grab;
|
||||
cursor: -moz-grab;
|
||||
cursor: grab; }
|
||||
|
||||
.pswp--dragging .pswp__img {
|
||||
/* autoprefixer: off */
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: -moz-grabbing;
|
||||
cursor: grabbing; }
|
||||
|
||||
/*
|
||||
Background is added as a separate element.
|
||||
As animating opacity is much faster than animating rgba() background-color.
|
||||
*/
|
||||
.pswp__bg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #000;
|
||||
opacity: 0;
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: opacity; }
|
||||
|
||||
.pswp__scroll-wrap {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp__container,
|
||||
.pswp__zoom-wrap {
|
||||
-ms-touch-action: none;
|
||||
touch-action: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0; }
|
||||
|
||||
/* Prevent selection and tap highlights */
|
||||
.pswp__container,
|
||||
.pswp__img {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none; }
|
||||
|
||||
.pswp__zoom-wrap {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
-webkit-transform-origin: left top;
|
||||
-ms-transform-origin: left top;
|
||||
transform-origin: left top;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp__bg {
|
||||
will-change: opacity;
|
||||
/* for open/close transition */
|
||||
-webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);
|
||||
transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }
|
||||
|
||||
.pswp--animated-in .pswp__bg,
|
||||
.pswp--animated-in .pswp__zoom-wrap {
|
||||
-webkit-transition: none;
|
||||
transition: none; }
|
||||
|
||||
.pswp__container,
|
||||
.pswp__zoom-wrap {
|
||||
-webkit-backface-visibility: hidden;
|
||||
will-change: transform; }
|
||||
|
||||
.pswp__item {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden; }
|
||||
|
||||
.pswp__img {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
height: auto;
|
||||
top: 0;
|
||||
left: 0; }
|
||||
|
||||
/*
|
||||
stretched thumbnail or div placeholder element (see below)
|
||||
style is added to avoid flickering in webkit/blink when layers overlap
|
||||
*/
|
||||
.pswp__img--placeholder {
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
/*
|
||||
div element that matches size of large image
|
||||
large image loads on top of it
|
||||
*/
|
||||
.pswp__img--placeholder--blank {
|
||||
background: #222; }
|
||||
|
||||
.pswp--ie .pswp__img {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
left: 0;
|
||||
top: 0; }
|
||||
|
||||
/*
|
||||
Error message appears when image is not loaded
|
||||
(JS option errorMsg controls markup)
|
||||
*/
|
||||
.pswp__error-msg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
margin-top: -8px;
|
||||
color: #CCC; }
|
||||
|
||||
.pswp__error-msg a {
|
||||
color: #CCC;
|
||||
text-decoration: underline; }
|
||||
|
|
@ -1,782 +0,0 @@
|
|||
*{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
html {
|
||||
font-size: 20px;
|
||||
height: 100%;
|
||||
}
|
||||
@media screen and (min-width: 500px) {
|
||||
html {
|
||||
font-size:28px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 330px) {
|
||||
html {
|
||||
font-size:15px;
|
||||
}
|
||||
}
|
||||
body{
|
||||
max-width:500px;
|
||||
margin: auto;
|
||||
font-size: 0.7rem;
|
||||
background: #191d28;
|
||||
color: #ffffff;
|
||||
}
|
||||
p{
|
||||
margin: 0;
|
||||
}
|
||||
table{
|
||||
width: 100%;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
label{
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
}
|
||||
.row{
|
||||
margin: 0;
|
||||
}
|
||||
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12{
|
||||
padding: 0;
|
||||
}
|
||||
.spp-mask{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 7;
|
||||
display: none;
|
||||
}
|
||||
.ssp-all{
|
||||
padding-top: 0.6rem;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
/*随手拍*/
|
||||
.ssp-search{
|
||||
padding:1rem 0.5rem;
|
||||
}
|
||||
.ssp-search-input{
|
||||
border-radius: 1.5rem 0 0 1.5rem;
|
||||
height: 1.5rem;
|
||||
width: 100%;
|
||||
background:#30343f url("../../img/ssp/search.png") no-repeat left/1.5rem;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
padding-left: 1.5rem;
|
||||
}
|
||||
.ssp-search-button{
|
||||
height: 1.5rem;
|
||||
width: 100%;
|
||||
border: 0;
|
||||
background: #454952;
|
||||
border-radius: 0 1.5rem 1.5rem 0;
|
||||
color: #8aa7f3;
|
||||
}
|
||||
.ssp-search-screen {
|
||||
text-align: center;
|
||||
padding-top: 0.25rem;
|
||||
}
|
||||
.ssp-search-screen img{
|
||||
width:1.2rem;
|
||||
}
|
||||
.ssp-project{
|
||||
padding: 0.75rem 0 0.75rem 1.25rem;
|
||||
background: url("../../img/ssp/position.png") no-repeat left/1rem;
|
||||
}
|
||||
.ssp-tab{
|
||||
text-align: center;
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
.ssp-tab .ssp-active{
|
||||
font-weight: bold;
|
||||
color: #85a2e8;
|
||||
background: url("../../img/ssp/border_bottom.png") no-repeat bottom/100% 0.25rem;
|
||||
}
|
||||
.spp-record-max{
|
||||
padding:1rem 0.5rem;
|
||||
}
|
||||
.ssp-record{
|
||||
background: #222943;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
.ssp-record-img img{
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.ssp-record-name{
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
.ssp-record-table{
|
||||
color:#85a2e8;
|
||||
font-size: 0.6rem;
|
||||
}
|
||||
.ssp-record-table td{
|
||||
padding: 0.1rem 0;
|
||||
}
|
||||
.ssp-record-table td:first-child{
|
||||
width:3rem;
|
||||
vertical-align: top;
|
||||
}
|
||||
.spp-state{
|
||||
font-size: 0.6rem;
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
padding: 0.1rem;
|
||||
border-radius: 0.5rem 0 0.5rem 0;
|
||||
}
|
||||
|
||||
.spp-state-dzg{
|
||||
background: #f8612a; /*待整改 未整改*/
|
||||
}
|
||||
.spp-state-dsp{
|
||||
background: #fa7d00; /*待整改 待审批*/
|
||||
}
|
||||
.spp-state-yzg{
|
||||
background: #11A983; /*已审批 已整改*/
|
||||
font-weight:700;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
/*浮窗图标*/
|
||||
.spp-buoy{
|
||||
position: fixed;
|
||||
bottom: 1rem;
|
||||
right: 0rem;
|
||||
z-index: 4;
|
||||
}
|
||||
.spp-buoy-img{
|
||||
|
||||
}
|
||||
.spp-buoy-img img{
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
}
|
||||
.spp-buoy-menu{
|
||||
height: 2.5rem;
|
||||
width: 240px;
|
||||
text-align: center;
|
||||
background: #353e5f;
|
||||
border-radius: 3rem;
|
||||
padding-top: 0.5rem;
|
||||
position: fixed;
|
||||
bottom: 1rem;
|
||||
right: -240px;
|
||||
z-index: 4;
|
||||
}
|
||||
.spp-buoy-menu-option{
|
||||
height: 1.5rem;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
.spp-buoy-menu .col-xs-5:first-child .spp-buoy-menu-option{
|
||||
border-right: 2px solid #191d28;
|
||||
}
|
||||
.spp-put-away{
|
||||
height: 2.5rem;
|
||||
}
|
||||
.spp-put-away img{
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
/*悬浮筛选*/
|
||||
.spp-window{
|
||||
position: fixed;
|
||||
width:300px;
|
||||
right:-300px;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
background:#1d212d;
|
||||
z-index: 7;
|
||||
}
|
||||
.spp-window-title{
|
||||
color: #85a2e8;
|
||||
padding:0.75rem;
|
||||
font-size: 0.8rem;
|
||||
background: #252c3d;
|
||||
}
|
||||
.spp-window-title span{
|
||||
padding: 0 0.35rem;
|
||||
font-size: 1rem;
|
||||
float: right;
|
||||
position: relative;
|
||||
top: -0.25rem;
|
||||
}
|
||||
.spp-window-block{
|
||||
padding: 0.75rem;
|
||||
border-bottom: 1px solid #252c3d;
|
||||
}
|
||||
.spp-wb-title{
|
||||
padding: 0.5rem 0;
|
||||
color:#85a2e8;
|
||||
}
|
||||
.spp-wb-content{
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
.spp-type-nav{
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
line-height: 1.75rem;
|
||||
height: 1.75rem;
|
||||
background:#252c3d;
|
||||
border-radius: 0.2rem;
|
||||
color: #6a7faa;
|
||||
}
|
||||
.spp-type-nav.spp-active{
|
||||
background: #3b455e;
|
||||
color: #ffffff;
|
||||
}
|
||||
.spp-wb-date{
|
||||
width: 100%;
|
||||
background:#252c3d;
|
||||
height: 1.75rem;
|
||||
padding: 0 0.1rem;
|
||||
border: 0;
|
||||
border-radius: 1rem;
|
||||
outline: 0;
|
||||
color: #6a7faa;
|
||||
}
|
||||
.spp-wb-reach{
|
||||
text-align: center;
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
.spp-state-nav{
|
||||
width: 90%;
|
||||
margin:0.25rem auto;
|
||||
text-align: center;
|
||||
line-height: 1.75rem;
|
||||
height: 1.75rem;
|
||||
background:#252c3d;
|
||||
border-radius: 0.2rem;
|
||||
color: #6a7faa;
|
||||
}
|
||||
.spp-state-nav.spp-active{
|
||||
background: #3b455e;
|
||||
color: #ffffff;
|
||||
}
|
||||
.spp-window-btn{
|
||||
padding: 0.5rem ;
|
||||
text-align: right;
|
||||
position: absolute;
|
||||
bottom: 0.5rem;
|
||||
right: 0.5rem;
|
||||
}
|
||||
.spp-window-btn button{
|
||||
background: #30384b;
|
||||
color: #6a7faa;
|
||||
height: 1.75rem;
|
||||
width: 3rem;
|
||||
margin-left: 0.5rem;
|
||||
border: 0;
|
||||
border-radius: 0.25rem;
|
||||
outline: 0;
|
||||
}
|
||||
.spp-window-btn button:active{
|
||||
background: #485578;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/*整改*/
|
||||
.ssp-rectification-opinions{
|
||||
background: #212737;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
.ssp-ro-title span{
|
||||
border-left: 0.25rem solid #7a53fa;
|
||||
padding-left: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.ssp-block{
|
||||
padding:0 0.75rem;
|
||||
}
|
||||
.spp-block-title{
|
||||
color: #88a2ed;
|
||||
}
|
||||
.ssp-block-position{
|
||||
background: url("../../img/ssp/position.png") no-repeat left/1rem;
|
||||
height: 1.5rem;
|
||||
line-height: 1.3rem;
|
||||
padding-left: 1.25rem;
|
||||
white-space: nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.spp-block-title{
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
.ssp-block-img{
|
||||
padding: 0.4rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
.ssp-block-img img{
|
||||
width:4.5rem;
|
||||
height: 4.5rem;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.ssp-block-video{
|
||||
width:10rem;
|
||||
height: 7rem;
|
||||
border-radius: 0.25rem;
|
||||
background:#2a3249 url("../../img/ssp/upload_video.png") no-repeat center/4rem;
|
||||
}
|
||||
.ssp-block-video video{
|
||||
border-radius: 0.25rem;
|
||||
width:10rem;
|
||||
height: 7rem;
|
||||
display: none;
|
||||
}
|
||||
.rq-file-video{
|
||||
width:10rem;
|
||||
height: 7rem;
|
||||
border: 1px solid #fff;
|
||||
opacity:0;
|
||||
margin-top: -7rem;
|
||||
}
|
||||
.ssp-rectification-illustrate{
|
||||
padding:0 0.25rem;
|
||||
}
|
||||
.ssp-ri-textarea{
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
.ssp-ri-textarea textarea{
|
||||
width: 100%;
|
||||
min-height: 5rem;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.5rem;
|
||||
background:#212737 ;
|
||||
outline: 0;
|
||||
border: 1px solid #212737;
|
||||
resize: none;
|
||||
}
|
||||
.ssp-ri-textarea textarea::-webkit-input-placeholder{
|
||||
color: #6676a4;
|
||||
}
|
||||
.eq-scene-max .col-xs-4{
|
||||
padding: 0.35rem 0;
|
||||
}
|
||||
.rq-add-to{
|
||||
width: 4.5rem;
|
||||
height: 4.5rem;
|
||||
margin: auto;
|
||||
border-radius: 0.25rem;
|
||||
background:url("../../img/ssp/upload_img.png") no-repeat center/100% 100%;
|
||||
}
|
||||
.rq-file{
|
||||
width: 4.5rem;
|
||||
height: 4.5rem;
|
||||
border: 1px solid #000000;
|
||||
margin:-4.5rem auto 0;
|
||||
opacity: 0;
|
||||
}
|
||||
.eq-scene-img{
|
||||
width: 4.5rem;
|
||||
height: 4.5rem;
|
||||
margin:auto;
|
||||
background: #2a3249;
|
||||
}
|
||||
.eq-scene-img img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.rq-delete{
|
||||
float: right;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
text-align: center;
|
||||
line-height: 1rem;
|
||||
font-size:1rem;
|
||||
border-radius: 50%;
|
||||
background: #394c81;
|
||||
color: #ffffff;
|
||||
margin-top: -5rem;
|
||||
position: relative;
|
||||
right: -0.5rem;
|
||||
}
|
||||
.rq-delete-video{
|
||||
float: right;
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
text-align: center;
|
||||
line-height: 1rem;
|
||||
font-size:1rem;
|
||||
border-radius: 50%;
|
||||
background: #394c81;
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
right: -0.5rem;
|
||||
margin-top: -8rem;
|
||||
display: none;
|
||||
}
|
||||
.video-tips{
|
||||
font-size: 0.6rem;
|
||||
height: 1rem;
|
||||
line-height: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
color: #6676a4;
|
||||
}
|
||||
.video-tips div{
|
||||
display: none;
|
||||
}
|
||||
.ssp-btn{
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
.ssp-btn button{
|
||||
width: 80%;
|
||||
height: 2rem;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.ssp-btn-cancel{
|
||||
background: #3f424a;
|
||||
}
|
||||
.ssp-btn-confirm{
|
||||
background: #7a53fa;
|
||||
}
|
||||
.ssp-btn-cancel:active{
|
||||
background: #35373e;
|
||||
}
|
||||
.ssp-btn-confirm:active{
|
||||
background: #6344c9;
|
||||
}
|
||||
|
||||
/*驳回弹窗*/
|
||||
.ssp-popup{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
padding-top:8rem;
|
||||
display: none;
|
||||
}
|
||||
.ssp-popup-content{
|
||||
width: 15rem;
|
||||
margin: auto;
|
||||
background: #1d212d;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.ssp-popup-title{
|
||||
border-radius: 0.5rem 0.5rem 0 0 ;
|
||||
}
|
||||
.ssp-popup-textarea{
|
||||
padding:0.5rem;
|
||||
}
|
||||
.ssp-popup-textarea textarea{
|
||||
width: 100%;
|
||||
height:5rem;
|
||||
background: none;
|
||||
border: none;
|
||||
outline: 0;
|
||||
resize: none;
|
||||
}
|
||||
.spp-popup-btn{
|
||||
text-align: right;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
.spp-popup-btn button{
|
||||
background: #30384b;
|
||||
color: #6a7faa;
|
||||
height: 1.5rem;
|
||||
width: 3rem;
|
||||
margin-left: 0.5rem;
|
||||
border: 0;
|
||||
border-radius: 0.25rem;
|
||||
outline: 0;
|
||||
}
|
||||
.spp-popup-btn button:active{
|
||||
background: #485578;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/*问题整改*/
|
||||
.ssp-problem-rectification{
|
||||
padding: 0.75rem 0;
|
||||
}
|
||||
.ssp-block-input{
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
.ssp-block-input input{
|
||||
width: 100%;
|
||||
height:2rem;
|
||||
background:#212737 ;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
border-radius: 0.25rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
.ssp-block-input input::-webkit-input-placeholder{
|
||||
color: #6676a4;
|
||||
}
|
||||
.rq-add-video{
|
||||
background:url("../../img/ssp/upload_video.png") no-repeat center/100% 100%;
|
||||
}
|
||||
|
||||
|
||||
/*施工部门下拉框*/
|
||||
.ssp-select-fixed{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
display: none;
|
||||
}
|
||||
.ssp-select-content{
|
||||
max-height: 25rem;
|
||||
overflow: auto;
|
||||
width: 15rem;
|
||||
background: #30384b;
|
||||
margin: auto;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.spp-select-ul{
|
||||
list-style: none;
|
||||
}
|
||||
.spp-select-ul li{
|
||||
padding: 0.75rem 2rem;
|
||||
border-bottom: 1px solid #445577;
|
||||
background:url("../../img/ssp/radio.png") no-repeat left/0.8rem;
|
||||
background-position: 5%;
|
||||
}
|
||||
.spp-select-ul li.li{
|
||||
background:url("../../img/ssp/radio_i.png") no-repeat left/0.8rem;
|
||||
background-position: 5%;
|
||||
}
|
||||
.spp-select-ul li:last-child{
|
||||
border: none;
|
||||
}
|
||||
/*.spp-select-ul li:active{
|
||||
background: #445577;
|
||||
}*/
|
||||
|
||||
/*组织架构*/
|
||||
.ssp-framework{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.5);
|
||||
display: none;
|
||||
z-index:9999;
|
||||
}
|
||||
.ssp-framework-content{
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
background: #30384b;
|
||||
margin: auto;
|
||||
max-width: 500px;
|
||||
}
|
||||
.ssp-framework-title{
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
color: #88a2ed;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.ssp-framework-img{
|
||||
text-align: left;
|
||||
width: 2rem;
|
||||
}
|
||||
.ssp-framework-img img{
|
||||
width:1.25rem;
|
||||
}
|
||||
.ssp-framework-search{
|
||||
padding:0.5rem 1rem;
|
||||
}
|
||||
.ssp-framework-search input{
|
||||
width: 80%;
|
||||
background: #3f4b67 url("../../img/ssp/search.png") no-repeat left/1.75rem;
|
||||
height: 2rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 0;
|
||||
padding-left:1.75rem;
|
||||
outline: 0;
|
||||
}
|
||||
.ssp-framework-search input::-webkit-input-placeholder{
|
||||
color: #6676a4;
|
||||
}
|
||||
.ssp-framework-search button{
|
||||
background: #3f4b67;
|
||||
height: 2rem;
|
||||
width: 16%;
|
||||
border: 0;
|
||||
border-radius: 0.25rem;
|
||||
outline: 0;
|
||||
color: #88a2ed;
|
||||
float: right;
|
||||
}
|
||||
.ssp-framework-search button:active{
|
||||
background: #6676a4;
|
||||
}
|
||||
.ssp-framework-top{
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
.app-fold{
|
||||
overflow: auto;
|
||||
}
|
||||
.app-fold-block{
|
||||
background: #3f4b67;
|
||||
}
|
||||
.app-fold-title{
|
||||
padding:0.6rem 1.5rem;
|
||||
background:#455376 url("../../img/ssp/right.png") no-repeat right/1rem;
|
||||
background-position: 95%;
|
||||
border-bottom:1px solid #30384b;
|
||||
color:#88a2ed;
|
||||
}
|
||||
.app-fold-ul{
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
/*display: none;*/
|
||||
}
|
||||
.app-fold-ul li span{
|
||||
padding-right: 1rem;
|
||||
}
|
||||
.app-fold-ul li{
|
||||
padding: 0.5rem 3.5rem;
|
||||
background:url("../../img/ssp/checkbox.png") no-repeat left/0.8rem;
|
||||
background-position: 10%;
|
||||
}
|
||||
.app-fold-ul li.ssp-active{
|
||||
background:url("../../img/ssp/checkbox_i.png") no-repeat left/0.8rem;
|
||||
background-position: 10%;
|
||||
}
|
||||
.app-fold-ul li:active{
|
||||
background: #3b4660;
|
||||
}
|
||||
.ssp-framework-btn{
|
||||
height:3rem;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
bottom: 0;
|
||||
background: #53699d;
|
||||
z-index: 55;
|
||||
}
|
||||
.ssp-btn-right{
|
||||
text-align: right;
|
||||
padding-right: 0.5rem
|
||||
}
|
||||
.ssp-btn-right button{
|
||||
width: 3rem;
|
||||
height: 1.75rem;
|
||||
margin: 0.6rem 0.25rem;
|
||||
background: #88a2ed;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.ssp-btn-right button:active{
|
||||
background: #7085c3;
|
||||
}
|
||||
.spp-choice-number{
|
||||
height: 1.5rem;
|
||||
font-size: 0.8rem;
|
||||
padding-left: 1rem;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
.spp-choice-por{
|
||||
height: 1.5rem;
|
||||
padding-left:1rem;
|
||||
color: #b6c0df;
|
||||
white-space: nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
/*已选人员*/
|
||||
.ssp-selected{
|
||||
position: fixed;
|
||||
bottom: -20rem;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 20rem;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 11;
|
||||
}
|
||||
.ssp-selected-con{
|
||||
height: 20rem;
|
||||
width: 100%;
|
||||
background: #53699d;
|
||||
margin: auto;
|
||||
max-width: 500px;
|
||||
}
|
||||
.spp-selected-number{
|
||||
padding: 0.75rem 1rem;
|
||||
border-bottom: 1px solid #415fa6;
|
||||
}
|
||||
.spp-selected-number label{
|
||||
float: right;
|
||||
color: #a7b9ee;
|
||||
}
|
||||
.spp-ry-list{
|
||||
height: 17rem;
|
||||
padding: 0 1rem;
|
||||
overflow: auto;
|
||||
}
|
||||
.spp-ry-list td{
|
||||
padding:0.4rem 0.5rem;
|
||||
border-bottom: 1px solid #415fa6;
|
||||
color: #afc4ee;
|
||||
}
|
||||
.spp-ry-list td:last-child{
|
||||
text-align: right;
|
||||
width: 30%;
|
||||
}
|
||||
.spp-ry-list td:last-child button{
|
||||
padding: 0.15rem 0.5rem;
|
||||
background: none;
|
||||
border: 1px solid #a7b9ee;
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
.spp-p{
|
||||
color: #6676a4;
|
||||
font-size: 0.6rem;
|
||||
padding: 0.25rem 0;
|
||||
}
|
||||
.ssp-hidden{
|
||||
display: none;
|
||||
}
|
||||
.ssp-display{
|
||||
display: block;
|
||||
}
|
||||
#ccto{
|
||||
white-space: nowrap;
|
||||
overflow:hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
header{
|
||||
position: fixed;
|
||||
max-width: 500px;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
height: 2.5rem;
|
||||
line-height: 2.5rem;
|
||||
border-bottom: 1px solid #485270;
|
||||
background: #191d28;
|
||||
z-index: 99;
|
||||
}
|
||||
header p{
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
color: #8466fe;
|
||||
}
|
||||
header img{
|
||||
width: 2.5rem;
|
||||
}
|
||||
.ssp-popup-div{
|
||||
padding: 0.75rem;
|
||||
text-align: center
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 945 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
|
@ -1,214 +0,0 @@
|
|||
|
||||
$(function () {
|
||||
var img = $(".img-border")
|
||||
for (var i = 0; i<img.length; i++){
|
||||
var imgW= $(img[i]).width()
|
||||
var imgH= $(img[i]).height()
|
||||
if(imgW >= imgH){
|
||||
$(img[i]).css("height","100%")
|
||||
$(img[i]).css("width","auto")
|
||||
}else{
|
||||
$(img[i]).css("width","100%")
|
||||
$(img[i]).css("height","auto")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var initPhotoSwipeFromDOM = function(gallerySelector) {
|
||||
var parseThumbnailElements = function(el) {
|
||||
var thumbElements = el.childNodes,
|
||||
numNodes = thumbElements.length,
|
||||
items = [],
|
||||
figureEl,
|
||||
linkEl,
|
||||
size,
|
||||
item;
|
||||
var screenW = window.screen.width
|
||||
var screenH = window.screen.height
|
||||
for (var i = 0; i < numNodes; i++) {
|
||||
figureEl = thumbElements[i];
|
||||
if (figureEl.nodeType !== 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var Iwidth = $(figureEl).children().children().width()
|
||||
var Iheight = $(figureEl).children().children().height()
|
||||
|
||||
var ww , hh
|
||||
if(Iwidth >= Iheight){
|
||||
ww = screenW;
|
||||
hh = Iheight * ww / Iwidth
|
||||
}else{
|
||||
hh = screenH * 0.8;
|
||||
ww = Iwidth * hh / Iheight
|
||||
}
|
||||
|
||||
linkEl = figureEl.children[0];
|
||||
|
||||
item = {
|
||||
src: linkEl.getAttribute('href'),
|
||||
w: parseInt(ww, 10),
|
||||
h: parseInt(hh, 10)
|
||||
};
|
||||
|
||||
if (figureEl.children.length > 1) {
|
||||
item.title = figureEl.children[1].innerHTML;
|
||||
}
|
||||
if (linkEl.children.length > 0) {
|
||||
item.msrc = linkEl.children[0].getAttribute('src');
|
||||
}
|
||||
item.el = figureEl; // save link to element for getThumbBoundsFn
|
||||
items.push(item);
|
||||
}
|
||||
return items;
|
||||
};
|
||||
// find nearest parent element
|
||||
var closest = function closest(el, fn) {
|
||||
return el && (fn(el) ? el : closest(el.parentNode, fn));
|
||||
};
|
||||
|
||||
// triggers when user clicks on thumbnail
|
||||
var onThumbnailsClick = function(e) {
|
||||
e = e || window.event;
|
||||
e.preventDefault ? e.preventDefault() : e.returnValue = false;
|
||||
|
||||
var eTarget = e.target || e.srcElement;
|
||||
|
||||
// find root element of slide
|
||||
var clickedListItem = closest(eTarget, function(el) {
|
||||
return (el.tagName && el.tagName.toUpperCase() === 'FIGURE');
|
||||
});
|
||||
|
||||
if (!clickedListItem) {
|
||||
return;
|
||||
}
|
||||
// find index of clicked item by looping through all child nodes
|
||||
// alternatively, you may define index via data- attribute
|
||||
var clickedGallery = clickedListItem.parentNode,
|
||||
childNodes = clickedListItem.parentNode.childNodes,
|
||||
numChildNodes = childNodes.length,
|
||||
nodeIndex = 0,
|
||||
index;
|
||||
|
||||
for (var i = 0; i < numChildNodes; i++) {
|
||||
if (childNodes[i].nodeType !== 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (childNodes[i] === clickedListItem) {
|
||||
index = nodeIndex;
|
||||
break;
|
||||
}
|
||||
nodeIndex++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (index >= 0) {
|
||||
// open PhotoSwipe if valid index found
|
||||
openPhotoSwipe(index, clickedGallery);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
// parse picture index and gallery index from URL (#&pid=1&gid=2)
|
||||
var photoswipeParseHash = function() {
|
||||
var hash = window.location.hash.substring(1),
|
||||
params = {};
|
||||
|
||||
if (hash.length < 5) {
|
||||
return params;
|
||||
}
|
||||
|
||||
var vars = hash.split('&');
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
if (!vars[i]) {
|
||||
continue;
|
||||
}
|
||||
var pair = vars[i].split('=');
|
||||
if (pair.length < 2) {
|
||||
continue;
|
||||
}
|
||||
params[pair[0]] = pair[1];
|
||||
}
|
||||
|
||||
if (params.gid) {
|
||||
params.gid = parseInt(params.gid, 10);
|
||||
}
|
||||
|
||||
return params;
|
||||
};
|
||||
|
||||
var openPhotoSwipe = function(index, galleryElement, disableAnimation, fromURL) {
|
||||
var pswpElement = document.querySelectorAll('.pswp')[0],
|
||||
gallery,
|
||||
options,
|
||||
items;
|
||||
|
||||
items = parseThumbnailElements(galleryElement);
|
||||
|
||||
// define options (if needed)
|
||||
options = {
|
||||
// define gallery index (for URL)
|
||||
galleryUID: galleryElement.getAttribute('data-pswp-uid'),
|
||||
getThumbBoundsFn: function(index) {
|
||||
// See Options -> getThumbBoundsFn section of documentation for more info
|
||||
var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
|
||||
pageYScroll = window.pageYOffset || document.documentElement.scrollTop,
|
||||
rect = thumbnail.getBoundingClientRect();
|
||||
|
||||
return {x: rect.left, y: rect.top + pageYScroll, w: rect.width};
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// PhotoSwipe opened from URL
|
||||
if (fromURL) {
|
||||
if (options.galleryPIDs) {
|
||||
// parse real index when custom PIDs are used
|
||||
// http://photoswipe.com/documentation/faq.html#custom-pid-in-url
|
||||
for (var j = 0; j < items.length; j++) {
|
||||
if (items[j].pid == index) {
|
||||
options.index = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// in URL indexes start from 1
|
||||
options.index = parseInt(index, 10) - 1;
|
||||
}
|
||||
} else {
|
||||
options.index = parseInt(index, 10);
|
||||
}
|
||||
|
||||
// exit if index not found
|
||||
if (isNaN(options.index)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (disableAnimation) {
|
||||
options.showAnimationDuration = 0;
|
||||
}
|
||||
|
||||
// Pass data to PhotoSwipe and initialize it
|
||||
gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options);
|
||||
gallery.init();
|
||||
};
|
||||
|
||||
// loop through all gallery elements and bind events
|
||||
var galleryElements = document.querySelectorAll(gallerySelector);
|
||||
|
||||
for (var i = 0, l = galleryElements.length; i < l; i++) {
|
||||
galleryElements[i].setAttribute('data-pswp-uid', i + 1);
|
||||
galleryElements[i].onclick = onThumbnailsClick;
|
||||
}
|
||||
|
||||
// Parse URL and open gallery if it contains #&pid=3&gid=1
|
||||
var hashData = photoswipeParseHash();
|
||||
if (hashData.pid && hashData.gid) {
|
||||
openPhotoSwipe(hashData.pid, galleryElements[ hashData.gid - 1 ], true, true);
|
||||
}
|
||||
};
|
||||
|
||||
// execute above function
|
||||
initPhotoSwipeFromDOM('.my-gallery');
|
||||
|
|
@ -1,482 +0,0 @@
|
|||
/*!
|
||||
* jquery.date.js v1.4.3
|
||||
* By 雾空 https://github.com/weijhfly/jqueryDatePlugin
|
||||
* Date:2017/1/24
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
'use strict';
|
||||
|
||||
var d = new Date(),
|
||||
doc = window.document,
|
||||
nowYear = d.getFullYear(),
|
||||
nowMonth = d.getMonth() + 1,
|
||||
domDate,
|
||||
createDate,
|
||||
time,
|
||||
body = $('body'),
|
||||
emptyStr = "<li></li>",
|
||||
isTouch = "ontouchend" in doc,
|
||||
tstart = isTouch ? "touchstart" : "mousedown",
|
||||
tmove = isTouch ? "touchmove" : "mousemove",
|
||||
tend = isTouch ? "touchend" : "mouseup",
|
||||
tcancel = isTouch ? "touchcancel" : "mouseleave",
|
||||
isEnglish = (navigator.language || navigator.browserLanguage).toLowerCase().indexOf('zh') == -1,
|
||||
//基于40px的高度滑动,如需改动要改这,不能用样式覆盖 如 document.documentElement.clientWidth <= 320? 30:40
|
||||
h = 40,
|
||||
dpr = $('html').attr('data-dpr') || 1,
|
||||
resH = h*dpr,
|
||||
//支持的时间格式展示
|
||||
dateFormat = [
|
||||
//年月日 时分秒
|
||||
['YYYY-MM-DD hh:mm:ss','YY-MM-DD hh:mm:ss','YYYY/MM/DD hh:mm:ss','YY/MM/DD hh:mm:ss'],
|
||||
//年月日 时分
|
||||
['YYYY-MM-DD hh:mm','YY-MM-DD hh:mm','YYYY/MM/DD hh:mm','YY/MM/DD hh:mm'],
|
||||
//年月日
|
||||
['YYYY-MM-DD','YY-MM-DD','YYYY/MM/DD','YY/MM/DD'],
|
||||
//年月
|
||||
['YYYY-MM','YY-MM','YYYY/MM','YY/MM'],
|
||||
//时分秒 时分
|
||||
['hh:mm:ss','hh:mm']
|
||||
],
|
||||
|
||||
opts = {
|
||||
beginYear: 2010,
|
||||
endYear: 2088, //可不填,结束年份不会小于当前年份
|
||||
type:'YYYY-MM-DD',
|
||||
limitTime:false,//限制选择时间 today 今天之前的时间不可选 tomorrow 明天之前的不可选
|
||||
location:null, //before 跳转至之前选择的时间,如果为空则跳转至当前时间
|
||||
callback:null//回调函数
|
||||
};
|
||||
//dom渲染
|
||||
domDate = '<div id="date-wrapper"><h3>选择时间</h3><div id="d-content"><div id="d-tit"><div class="t1">年</div><div class="t2">月</div><div class="t3">日</div><div class="t4">时</div><div class="t5">分</div><div class="t6">秒</div></div><div id="d-bg"><ol id="d-year"></ol><ol id="d-month"></ol><ol id="d-day"></ol><ol id="d-hours"></ol><ol id="d-minutes"></ol><ol id="d-seconds"></ol></div></div><a id="d-cancel" href="javascript:">取消</a><a id="d-confirm" href="javascript:">确定</a></div><div id="d-mask"></div>';
|
||||
|
||||
if(isEnglish){
|
||||
domDate = domDate.replace('选择时间','DatePicker').replace('取消','cancel').replace('确定','confirm');
|
||||
css = css.replace('</style>','#date-wrapper #d-tit{display:none;}</style>');
|
||||
}
|
||||
if(h != 40){
|
||||
css = css.replace(/40px/g,h+'px').replace(/120px/g,h*3+'px');
|
||||
}
|
||||
if(dpr != 1){
|
||||
css = css.replace(/(\d+)px/g,function(i){
|
||||
return i.replace(/\D/g,'')*dpr + 'px';
|
||||
});
|
||||
}
|
||||
body.append(domDate);
|
||||
|
||||
createDate = {
|
||||
y:function(begin,end){
|
||||
var domYear = '',
|
||||
end = end <= nowYear ? (end + 10) :end;
|
||||
|
||||
for (var i = begin; i <= end; i++){
|
||||
domYear += '<li><span>' + i +'</span></li>';
|
||||
}
|
||||
$('#d-year').html(emptyStr + domYear + emptyStr);
|
||||
},
|
||||
m:function(){
|
||||
var domMonth = '';
|
||||
for (var j = 1; j <= 12; j++) {
|
||||
j = j<10?'0'+j:j;
|
||||
domMonth += '<li><span>' + j + '</span></li>';
|
||||
}
|
||||
$('#d-month').html(emptyStr + domMonth+ emptyStr);
|
||||
},
|
||||
d:function(end,active){
|
||||
var end = end || createDate.bissextile(nowYear,nowMonth),
|
||||
domDay = '';
|
||||
for (var k = 1; k <= end; k++) {
|
||||
k = k<10?'0'+k:k;
|
||||
if(active && active == k){
|
||||
domDay += '<li class="active"><span>' + k + '</span></li>';
|
||||
}else{
|
||||
domDay += '<li><span>' + k + '</span></li>';
|
||||
}
|
||||
}
|
||||
$('#d-day').html(emptyStr + domDay + emptyStr);
|
||||
},
|
||||
hm:function(){
|
||||
var domHours = '',domMinutes = '';
|
||||
|
||||
for (var i = 0; i <= 23; i++) {i = i<10?'0'+i:i;domHours += '<li><span>' + i + '</span></li>';}
|
||||
$('#d-hours').html(emptyStr + domHours + emptyStr);
|
||||
|
||||
for (var j = 0; j <= 59; j++) {j = j<10?'0'+j:j;domMinutes += '<li><span>' + j + '</span></li>';}
|
||||
$('#d-minutes').html(emptyStr + domMinutes + emptyStr);
|
||||
|
||||
},
|
||||
s:function(){
|
||||
var domSeconds = '';
|
||||
|
||||
for (var i = 0; i <= 59; i++) {i = i<10?'0'+i:i;domSeconds += '<li><span>' + i + '</span></li>';}
|
||||
$('#d-seconds').html(emptyStr + domSeconds + emptyStr);
|
||||
},
|
||||
bissextile:function(year,month){
|
||||
var day;
|
||||
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
|
||||
day = 31
|
||||
} else if (month == 4 || month == 6 || month == 11 || month == 9) {
|
||||
day = 30
|
||||
} else if (month == 2) {
|
||||
if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) { //闰年
|
||||
day = 29
|
||||
} else {
|
||||
day = 28
|
||||
}
|
||||
|
||||
}
|
||||
return day;
|
||||
},
|
||||
slide:function(el){
|
||||
//滑动
|
||||
var T,mT,isPress = false,el = $('#date-wrapper ol');
|
||||
el.bind(tstart, function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var e = e.originalEvent;
|
||||
T = e.pageY || e.touches[0].pageY;
|
||||
if(!isTouch){isPress = true;}
|
||||
})
|
||||
el.bind(tmove, function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var e = e.originalEvent,that = $(this);
|
||||
if(!isTouch && !isPress){return false};
|
||||
mT = e.pageY || e.touches[0].pageY;
|
||||
that.css('top', that.position().top + (mT - T) + 'px');
|
||||
T = mT;
|
||||
if (that.position().top > 0) that.css('top', '0');
|
||||
if (that.position().top < -(that.height() - (3*resH))) that.css('top', '-' + (that.height() - (3*resH)) + 'px');
|
||||
})
|
||||
el.bind(tend, function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var e = e.originalEvent,that = $(this);
|
||||
isPress = false;
|
||||
dragEnd(that);
|
||||
})
|
||||
el.bind(tcancel, function(e){
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var e = e.originalEvent,that = $(this);
|
||||
isPress = false;
|
||||
// 解决一个pc端莫名触发问题
|
||||
if(!isTouch && + new Date() > time + 600){
|
||||
dragEnd(that);
|
||||
}
|
||||
})
|
||||
function dragEnd(that){
|
||||
//滚动调整
|
||||
var t = that.position().top;
|
||||
that.css('top',Math.round(t/resH)*resH+'px');
|
||||
//定位active
|
||||
t = Math.round(Math.abs($(that).position().top));
|
||||
var li = that.children('li').get(t/resH+1);
|
||||
$(li).addClass('active').siblings().removeClass('active');
|
||||
//修正日期
|
||||
var id = that.attr('id');
|
||||
if(id == 'd-month' || id == 'd-year'){
|
||||
var elDay = $('#d-day');
|
||||
if(elDay.length == 0){return false;}
|
||||
var end = createDate.bissextile($('#d-year .active').text(),$('#d-month .active').text());
|
||||
if(end != (elDay.children().length-2)){
|
||||
var active = elDay.children('.active').text();
|
||||
|
||||
active > end && (active = end);
|
||||
createDate.d(end,active);
|
||||
if(Math.abs(elDay.position().top) > elDay.height()-3*resH)elDay.css('top','-'+(elDay.height()-3*resH)+'px');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
show:function(isShow){
|
||||
var domMain = $('#date-wrapper'),
|
||||
domMask = $('#d-mask');
|
||||
if (isShow) {
|
||||
domMain.show();
|
||||
domMask.show();
|
||||
time = + new Date();
|
||||
body.css('overflow','hidden');
|
||||
} else {
|
||||
domMain.hide();
|
||||
domMask.hide();
|
||||
body.css('overflow','auto');
|
||||
}
|
||||
},
|
||||
resetActive:function(el){
|
||||
var d = new Date(),
|
||||
date = el.data('fullDate');
|
||||
|
||||
if(opt.location == 'before' && date){
|
||||
d = new Date(date);
|
||||
//if(d == 'Invalid Date'){d = new Date();}
|
||||
var end = createDate.bissextile(d.getFullYear(),d.getMonth() + 1);
|
||||
if($('#d-day>li').length != end + 2){
|
||||
createDate.d(end);
|
||||
}
|
||||
}
|
||||
if(opt.limitTime == 'tomorrow' && !opt.location){
|
||||
d.setDate(d.getDate()+1);
|
||||
}
|
||||
$('#date-wrapper ol').each(function() {
|
||||
var e = $(this),
|
||||
eId = e.attr('id');
|
||||
e.children('li').each(function() {
|
||||
var li = $(this),liText = Number(li.text() == ''? 'false':li.text());
|
||||
if (eId == 'd-year' && liText === d.getFullYear()) {
|
||||
li.addClass('active').siblings().removeClass('active');
|
||||
return false;
|
||||
} else if (eId == 'd-month' && liText === (d.getMonth() + 1)) {
|
||||
li.addClass('active').siblings().removeClass('active');
|
||||
return false;
|
||||
} else if (eId == 'd-day' && liText === d.getDate()) {
|
||||
li.addClass('active').siblings().removeClass('active');
|
||||
return false;
|
||||
} else if (eId == 'd-hours' && liText === d.getHours()) {
|
||||
li.addClass('active').siblings().removeClass('active');
|
||||
return false;
|
||||
} else if (eId == 'd-minutes' && liText === d.getMinutes()) {
|
||||
li.addClass('active').siblings().removeClass('active');
|
||||
return false;
|
||||
} else if (eId == 'd-seconds' && liText === d.getSeconds()) {
|
||||
li.addClass('active').siblings().removeClass('active');
|
||||
return false;
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
toNow:function(refresh){
|
||||
if (!refresh) {
|
||||
$('#date-wrapper ol').each(function(){
|
||||
var that = $(this);
|
||||
var liTop = -(that.children('.active').position().top -resH);
|
||||
that.animate({
|
||||
top: liTop
|
||||
},
|
||||
600);
|
||||
})
|
||||
} else {
|
||||
$('#date-wrapper ol').each(function() {
|
||||
$(this).animate({
|
||||
top: 0
|
||||
},
|
||||
0);
|
||||
})
|
||||
}
|
||||
},
|
||||
clear:function(){
|
||||
createDate.toNow(true);
|
||||
createDate.show(false);
|
||||
}
|
||||
}
|
||||
createDate.m();
|
||||
createDate.d();
|
||||
createDate.hm();
|
||||
createDate.s();
|
||||
createDate.slide();
|
||||
|
||||
var opt,
|
||||
userOption,
|
||||
el = $('#date-wrapper'),
|
||||
elTit = $('#d-tit'),
|
||||
elBg = $('#d-bg'),
|
||||
prevY = '';
|
||||
|
||||
function DateTool(obj){
|
||||
var that = $(obj);
|
||||
that.bind('click',function() {
|
||||
if(that.get(0).tagName == 'INPUT'){that.blur();}
|
||||
userOption = that.data('options');
|
||||
if(typeof(userOption) == 'string'){userOption = JSON.parse(userOption.replace(/'/g,'"'));}
|
||||
if (!el.is(':visible')) {
|
||||
opt = null;
|
||||
opt = $.extend({},opts,userOption || {});
|
||||
var y = '' + opt.beginYear + opt.endYear;
|
||||
if(prevY != y){
|
||||
createDate.y(opt.beginYear,opt.endYear);
|
||||
prevY = y;
|
||||
}
|
||||
if(dateFormat[0].indexOf(opt.type) != -1){//年月日 时分秒
|
||||
elTit.children().show();
|
||||
elBg.children().show();
|
||||
el.attr('class','');
|
||||
}else if(dateFormat[1].indexOf(opt.type) != -1){//年月日 时分
|
||||
elTit.children().show().end().children(':gt(4)').hide();
|
||||
elBg.children().show().end().children(':gt(4)').hide();
|
||||
el.attr('class','five');
|
||||
}else if(dateFormat[2].indexOf(opt.type) != -1){//年月日
|
||||
elTit.children().show().end().children(':gt(2)').hide();
|
||||
elBg.children().show().end().children(':gt(2)').hide();
|
||||
el.attr('class','three');
|
||||
}else if(dateFormat[3].indexOf(opt.type) != -1){//年月
|
||||
elTit.children().show().end().children(':gt(1)').hide();
|
||||
elBg.children().show().end().children(':gt(1)').hide();
|
||||
el.attr('class','two');
|
||||
}else if(dateFormat[4].indexOf(opt.type) == 0){//时分秒
|
||||
elTit.children().show().end().children(':lt(3)').hide();
|
||||
elBg.children().show().end().children(':lt(3)').hide();
|
||||
el.attr('class','three hms');
|
||||
}else if(dateFormat[4].indexOf(opt.type) == 1){//时分
|
||||
elTit.children().show().end().children(':lt(3)').hide().parent().children().eq(5).hide();
|
||||
elBg.children().show().end().children(':lt(3)').hide().parent().children().eq(5).hide();
|
||||
el.attr('class','two hm');
|
||||
}
|
||||
createDate.resetActive(that);
|
||||
createDate.show(true);
|
||||
createDate.toNow(false);
|
||||
$('#d-confirm').attr('d-id', obj);
|
||||
}
|
||||
});
|
||||
}
|
||||
$.date = function(obj){
|
||||
DateTool(obj);
|
||||
}
|
||||
//取消
|
||||
$('#d-cancel,#d-mask').bind('click',function(){
|
||||
createDate.clear();
|
||||
})
|
||||
//确定
|
||||
$('#d-confirm').bind('click',function(){
|
||||
var y = $('#d-year .active').text(),
|
||||
m = $('#d-month .active').text(),
|
||||
d = $('#d-day .active').text(),
|
||||
h = $('#d-hours .active').text(),
|
||||
min = $('#d-minutes .active').text(),
|
||||
s = $('#d-seconds .active').text(),
|
||||
str,
|
||||
that = $($(this).attr('d-id')),
|
||||
index = dateFormat[0].indexOf(opt.type),
|
||||
index1 = dateFormat[1].indexOf(opt.type),
|
||||
index2 = dateFormat[2].indexOf(opt.type),
|
||||
index3 = dateFormat[3].indexOf(opt.type),
|
||||
index4 = dateFormat[4].indexOf(opt.type);
|
||||
|
||||
if( index != -1){//年月日 时分秒
|
||||
switch(index){
|
||||
case 0:
|
||||
str = y+'-'+m+'-'+d+' '+h+':'+min+':'+s;
|
||||
break;
|
||||
case 1:
|
||||
str = y.substring(2)+'-'+m+'-'+d+' '+h+':'+min+':'+s;
|
||||
break;
|
||||
case 2:
|
||||
str = y+'/'+m+'/'+d+' '+h+':'+min+':'+s;
|
||||
break;
|
||||
case 3:
|
||||
str = y.substring(2)+'/'+m+'/'+d+' '+h+':'+min+':'+s;
|
||||
break;
|
||||
}
|
||||
}else if(index1 != -1){//年月日 时分
|
||||
switch(index1){
|
||||
case 0:
|
||||
str = y+'-'+m+'-'+d+' '+h+':'+min;
|
||||
break;
|
||||
case 1:
|
||||
str = y.substring(2)+'-'+m+'-'+d+' '+h+':'+min;
|
||||
break;
|
||||
case 2:
|
||||
str = y+'/'+m+'/'+d+' '+h+':'+min;
|
||||
break;
|
||||
case 3:
|
||||
str = y.substring(2)+'/'+m+'/'+d+' '+h+':'+min;
|
||||
break;
|
||||
}
|
||||
}else if(index2 != -1){//年月日
|
||||
switch(index2){
|
||||
case 0:
|
||||
str = y+'-'+m+'-'+d;
|
||||
break;
|
||||
case 1:
|
||||
str = y.substring(2)+'-'+m+'-'+d;
|
||||
break;
|
||||
case 2:
|
||||
str = y+'/'+m+'/'+d;
|
||||
break;
|
||||
case 3:
|
||||
str = y.substring(2)+'/'+m+'/'+d;
|
||||
break;
|
||||
}
|
||||
}else if(index3 != -1){//年月
|
||||
switch(index3){
|
||||
case 0:
|
||||
str = y+'-'+m;
|
||||
break;
|
||||
case 1:
|
||||
str = y.substring(2)+'-'+m;
|
||||
break;
|
||||
case 2:
|
||||
str = y+'/'+m;
|
||||
break;
|
||||
case 3:
|
||||
str = y.substring(2)+'/'+m;
|
||||
break;
|
||||
}
|
||||
}else if(index4 == 0){//时分秒
|
||||
str = h+':'+min+':'+s;
|
||||
}else if(index4 == 1){//时分
|
||||
str = h+':'+ min;
|
||||
}
|
||||
|
||||
if(opt.limitTime == 'today'){
|
||||
var d = new Date(),
|
||||
error = !isEnglish ? '不能选择过去的时间':'You can\'t choose the past time';
|
||||
//当前日期
|
||||
var day = String(d.getFullYear())+'-'+String(d.getMonth() + 1)+'-'+String(d.getDate());
|
||||
var d1 = new Date(str.replace(/\-/g, "\/"));
|
||||
var d2 = new Date(day.replace(/\-/g, "\/"));
|
||||
if(d1 < d2){
|
||||
alert(error);
|
||||
return false;
|
||||
}
|
||||
}else if(opt.limitTime == 'tomorrow'){
|
||||
var d = new Date(),
|
||||
error = !isEnglish ? '时间最少选择明天':'Choose tomorrow at least';
|
||||
//当前日期+1
|
||||
var day = String(d.getFullYear())+'-'+String(d.getMonth() + 1)+'-'+String(d.getDate()+1);
|
||||
var d1 = new Date(str.replace(/\-/g, "\/"));
|
||||
var d2 = new Date(day.replace(/\-/g, "\/"));
|
||||
if(d1 < d2){
|
||||
alert(error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 回调函数
|
||||
var fun = opt.callback;
|
||||
if(fun){
|
||||
if(fun.indexOf('.') == -1){
|
||||
var flag = window[fun](str);
|
||||
}else{
|
||||
var arr = fun.split('.'),
|
||||
flag = window[arr[0]][arr[1]](str);
|
||||
}
|
||||
if(flag == false){
|
||||
return false;
|
||||
}else if(flag){
|
||||
str = flag;
|
||||
}
|
||||
}
|
||||
//赋值
|
||||
if(that.get(0).tagName == 'INPUT'){
|
||||
that.val(str);
|
||||
}else{
|
||||
that.text(str);
|
||||
}
|
||||
|
||||
if(opt.location){
|
||||
that.data('fullDate',y+'-'+m+'-'+d+' '+h+':'+min+':'+s);
|
||||
}
|
||||
createDate.show(false);
|
||||
createDate.toNow(true);
|
||||
})
|
||||
}))
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
var toast = function(params){
|
||||
var el = document.createElement("div");
|
||||
el.setAttribute("id","toast");
|
||||
el.innerHTML = params.message;
|
||||
document.body.appendChild(el);
|
||||
el.classList.add("fadeIn");
|
||||
setTimeout(function(){
|
||||
el.classList.remove("fadeIn");
|
||||
el.classList.add("fadeOut");
|
||||
el.addEventListener("animationend", function(){
|
||||
el.classList.add("hide");
|
||||
});
|
||||
},params.time);
|
||||
};
|
||||
|
||||
function showLoading(){
|
||||
$(".loading_p").show();
|
||||
}
|
||||
|
||||
function hideLoading(){
|
||||
$(".loading_p").hide();
|
||||
}
|
||||
|
|
@ -1,184 +0,0 @@
|
|||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
//大于 4M 时可分块上传,小于 4M 时直传,设置分块大小(分块上传时,支持断点续传)
|
||||
var BLOCK_SIZE = 4 * 1024 * 1024;
|
||||
|
||||
|
||||
//token
|
||||
var token;
|
||||
var bucket = "makalu-img";
|
||||
var domain = "http://fileimg.makalu.cc";
|
||||
//获取token的授权
|
||||
$.get("/mkl/sspManage/getToken", function(data){
|
||||
console.log("token" +"====================" +data);
|
||||
token = data;
|
||||
});
|
||||
|
||||
|
||||
//上传的文件信息
|
||||
var file;
|
||||
//上传对象
|
||||
var observable;
|
||||
//上传对象
|
||||
var subscription;
|
||||
|
||||
|
||||
//上传文件的名称
|
||||
var key;
|
||||
//配置信息
|
||||
var config = {
|
||||
//是否使用 cdn 加速域名:true 表示使用,默认为 false
|
||||
useCdnDomain: true,
|
||||
//是否禁用日志报告,为布尔值,默认为false
|
||||
disableStatisticsReport: false,
|
||||
//选择上传域名区域
|
||||
/*
|
||||
qiniu.region.z0: 代表华东区域
|
||||
qiniu.region.z1: 代表华北区域
|
||||
qiniu.region.z2: 代表华南区域
|
||||
qiniu.region.na0: 代表北美区域
|
||||
qiniu.region.as0: 代表东南亚区域
|
||||
*/
|
||||
region: qiniu.region.z0
|
||||
};
|
||||
|
||||
|
||||
|
||||
var observer = {
|
||||
next(res){
|
||||
console.log(res);
|
||||
// 接收上传进度信息
|
||||
/*
|
||||
total.loaded: number,已上传大小,单位为字节。
|
||||
total.total: number,本次上传的总量控制信息,单位为字节,注意这里的 total 跟文件大小并不一致。
|
||||
total.percent: number,当前上传进度,范围:0~100。
|
||||
*/
|
||||
$("#loaded").html(res.total.loaded);
|
||||
$("#percent").html(res.total.percent.toFixed(2));
|
||||
|
||||
console.log("当前已上传文件大小:" + res.total.loaded +"Byte");
|
||||
console.log("已上传文件百分比:" +res.total.percent.toFixed(2) + "%");
|
||||
|
||||
},
|
||||
error(err){
|
||||
console.log(err);
|
||||
alert("上传出错,请修改文件名称后重试")
|
||||
},
|
||||
complete(res){
|
||||
console.log("文件上传成功");
|
||||
console.log(res);
|
||||
$("#videoSrc").show();
|
||||
$(".rq-delete-video").show();
|
||||
$("#selectFile").hide()
|
||||
$("#selectFile").val("");
|
||||
getFileQiniu(res);
|
||||
if (res.key && res.key.match(/\.(jpg|jpeg|png|gif)$/)) {
|
||||
catImg(domain,res.key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var putExtra ={
|
||||
//文件原文件名
|
||||
fname: "",
|
||||
//用来放置自定义变量
|
||||
params: {},
|
||||
//用来限定上传文件类型,指定null时自动判断文件类型 ["image/png", "image/jpeg", "image/gif"]
|
||||
mimeType: null
|
||||
};
|
||||
|
||||
|
||||
|
||||
$("#selectFile").change(function(){
|
||||
$("#tipsHide").show();
|
||||
console.log("../")
|
||||
//获取当前选择的文件
|
||||
file = this.files[0];
|
||||
console.log(file)
|
||||
//当选择文件不为空时
|
||||
if (file) {
|
||||
//获取上传文件的名称
|
||||
key = file.name;
|
||||
//校验文件大小
|
||||
checkFileSize(file);
|
||||
var data = new FormData();
|
||||
data.append("file", file);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/weixin/sspManage/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == 200) {
|
||||
$("#bigFile").val(result.url);
|
||||
$("#videoSrc").attr("src",result.url);
|
||||
$("#percent").html("100%");
|
||||
$("#bigFileName").val(result.originalFilename);
|
||||
$(".rq-delete-video").show();
|
||||
$("#videoSrc").show();
|
||||
$("#selectFile").hide();
|
||||
|
||||
} else {
|
||||
toast({
|
||||
message:"视频上传失败",
|
||||
time:1000
|
||||
});
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
toast({
|
||||
message:"视频上传失败",
|
||||
time:1000
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
alert("选择文件不能为空!")
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 文件大小校验
|
||||
* @param file
|
||||
*/
|
||||
function checkFileSize(file) {
|
||||
//计算分块大小
|
||||
let count = Math.ceil(file.size / BLOCK_SIZE);
|
||||
//文件大于限制禁止上传
|
||||
if (file.size > 500 * 1024 * 1024 ) {
|
||||
console.log("不支持上传大于500MB");
|
||||
return;
|
||||
}
|
||||
if(count > 1){
|
||||
console.log("大文件, 执行分块上传,支持断点续传!")
|
||||
} else {
|
||||
console.log("小文件上传!")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function catImg(domain,key){
|
||||
$("#catImg").attr("src",domain+"/"+key)
|
||||
}
|
||||
|
||||
|
||||
//上传发起
|
||||
$("#sub").click(function (){
|
||||
subscription = observable.subscribe(observer)
|
||||
});
|
||||
|
||||
// 上传取消
|
||||
$("#cancel").click(function(){
|
||||
subscription.unsubscribe()
|
||||
})
|
||||
|
||||
})
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
|
||||
$(document).ready(function () {
|
||||
|
||||
//大于 4M 时可分块上传,小于 4M 时直传,设置分块大小(分块上传时,支持断点续传)
|
||||
var BLOCK_SIZE = 4 * 1024 * 1024;
|
||||
|
||||
//token
|
||||
var token;
|
||||
var bucket = "makalu-img";
|
||||
var domain = "http://fileimg.makalu.cc";
|
||||
//获取token的授权
|
||||
$.get("/mkl/sspManage/getToken", function(data){
|
||||
console.log("token" +"====================" +data);
|
||||
token = data;
|
||||
});
|
||||
|
||||
|
||||
//上传的文件信息
|
||||
var file;
|
||||
//上传对象
|
||||
var observable;
|
||||
//上传对象
|
||||
var subscription;
|
||||
|
||||
|
||||
//上传文件的名称
|
||||
var key;
|
||||
//配置信息
|
||||
var config = {
|
||||
//是否使用 cdn 加速域名:true 表示使用,默认为 false
|
||||
useCdnDomain: true,
|
||||
//是否禁用日志报告,为布尔值,默认为false
|
||||
disableStatisticsReport: false,
|
||||
//选择上传域名区域
|
||||
/*
|
||||
qiniu.region.z0: 代表华东区域
|
||||
qiniu.region.z1: 代表华北区域
|
||||
qiniu.region.z2: 代表华南区域
|
||||
qiniu.region.na0: 代表北美区域
|
||||
qiniu.region.as0: 代表东南亚区域
|
||||
*/
|
||||
region: qiniu.region.z0
|
||||
};
|
||||
|
||||
|
||||
var putExtra ={
|
||||
//文件原文件名
|
||||
fname: "",
|
||||
//用来放置自定义变量
|
||||
params: {},
|
||||
//用来限定上传文件类型,指定null时自动判断文件类型 ["image/png", "image/jpeg", "image/gif"]
|
||||
mimeType: null
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* selectFile1 上传
|
||||
* @type {{next(*=): void, error(*=): void, complete(*=): void}}
|
||||
*/
|
||||
var observer1 = {
|
||||
next(res){
|
||||
console.log("当前已上传文件大小:" + res.total.loaded +"Byte");
|
||||
console.log("已上传文件百分比:" +res.total.percent.toFixed(2) + "%");
|
||||
},
|
||||
error(err){
|
||||
console.log(err);
|
||||
alert("上传出错,请修改文件名称后重试");
|
||||
},
|
||||
complete(res){
|
||||
console.log("文件上传成功");
|
||||
console.log(res);
|
||||
getFileQiniu1(res);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* selectFile2 上传
|
||||
* @type {{next(*=): void, error(*=): void, complete(*=): void}}
|
||||
*/
|
||||
var observer2 = {
|
||||
next(res){
|
||||
console.log("当前已上传文件大小:" + res.total.loaded +"Byte");
|
||||
console.log("已上传文件百分比:" +res.total.percent.toFixed(2) + "%");
|
||||
},
|
||||
error(err){
|
||||
console.log(err);
|
||||
alert("上传出错,请修改文件名称后重试!");
|
||||
},
|
||||
complete(res){
|
||||
console.log("文件上传成功!");
|
||||
getFileQiniu2(res);
|
||||
}
|
||||
}
|
||||
|
||||
$("#selectFile1").change(function(){
|
||||
//获取当前选择的文件
|
||||
file = this.files[0];
|
||||
//当选择文件不为空时
|
||||
if (file) {
|
||||
//校验文件大小
|
||||
checkFileSize(file);
|
||||
//获取上传文件的名称
|
||||
let filename = file.name;
|
||||
let uuid = getuuid().replace(/-/g,"");
|
||||
// putExtra.fname = key.split(".")[0];
|
||||
putExtra.fname = uuid;
|
||||
// key = file.name;
|
||||
key = uuid + "." + filename.split(".")[1];
|
||||
//执行文件上传
|
||||
observable = qiniu.upload(file, key, token, putExtra, config);
|
||||
subscription = observable.subscribe(observer1);
|
||||
} else {
|
||||
alert("选择文件不能为空!")
|
||||
}
|
||||
})
|
||||
|
||||
$("#selectFile2").change(function(){
|
||||
//获取当前选择的文件
|
||||
file = this.files[0];
|
||||
//当选择文件不为空时
|
||||
if (file) {
|
||||
//校验文件大小
|
||||
checkFileSize(file);
|
||||
//获取上传文件的名称
|
||||
let filename = file.name;
|
||||
let uuid = getuuid().replace(/-/g,"");
|
||||
// putExtra.fname = filename.split(".")[0];
|
||||
putExtra.fname = uuid;
|
||||
// key = filename;
|
||||
key = uuid + "." + filename.split(".")[1];
|
||||
//执行文件上传
|
||||
observable = qiniu.upload(file, key, token, putExtra, config);
|
||||
subscription = observable.subscribe(observer2);
|
||||
} else {
|
||||
alert("选择文件不能为空!")
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* 文件大小校验
|
||||
* @param file
|
||||
*/
|
||||
function checkFileSize(file) {
|
||||
//计算分块大小
|
||||
let count = Math.ceil(file.size / BLOCK_SIZE);
|
||||
//文件大于限制禁止上传
|
||||
if (file.size > 10 * 1024 * 1024 * 1024) {
|
||||
console.log("不支持上传大于10G");
|
||||
return;
|
||||
}
|
||||
if(count > 1){
|
||||
console.log("大文件, 执行分块上传,支持断点续传!")
|
||||
} else {
|
||||
console.log("小文件上传!")
|
||||
}
|
||||
}
|
||||
|
||||
function getuuid() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||
var r = Math.random() * 16 | 0,
|
||||
v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
|
@ -1,454 +0,0 @@
|
|||
/**
|
||||
* 通用方法封装处理
|
||||
* Copyright (c) 2018 Mkl
|
||||
*/
|
||||
(function ($) {
|
||||
$.extend({
|
||||
// 表格封装处理
|
||||
table: {
|
||||
_option: {},
|
||||
_params: {},
|
||||
// 初始化表格
|
||||
init: function(options) {
|
||||
$.table._option = options;
|
||||
$.table._params = $.common.isEmpty(options.queryParams) ? $.table.queryParams : options.queryParams;
|
||||
_sortOrder = $.common.isEmpty(options.sortOrder) ? "asc" : options.sortOrder;
|
||||
_sortName = $.common.isEmpty(options.sortName) ? "" : options.sortName;
|
||||
$('#bootstrap-table').bootstrapTable({
|
||||
url: options.url, // 请求后台的URL(*)
|
||||
contentType: "application/x-www-form-urlencoded", // 编码类型
|
||||
method: 'post', // 请求方式(*)
|
||||
cache: false, // 是否使用缓存
|
||||
sortable: true, // 是否启用排序
|
||||
sortStable: true, // 设置为 true 将获得稳定的排序
|
||||
sortName: _sortName, // 排序列名称
|
||||
sortOrder: _sortOrder, // 排序方式 asc 或者 desc
|
||||
pagination: true, // 是否显示分页(*)
|
||||
pageNumber: 1, // 初始化加载第一页,默认第一页
|
||||
pageSize: 10, // 每页的记录行数(*)
|
||||
pageList: [10, 25, 50], // 可供选择的每页的行数(*)
|
||||
iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
|
||||
toolbar: '#toolbar', // 指定工作栏
|
||||
sidePagination: "server", // 启用服务端分页
|
||||
search: $.common.visible(options.search), // 是否显示搜索框功能
|
||||
showRefresh: $.common.visible(options.showRefresh), // 是否显示刷新按钮
|
||||
showColumns: $.common.visible(options.showColumns), // 是否显示隐藏某列下拉框
|
||||
showToggle: $.common.visible(options.showToggle), // 是否显示详细视图和列表视图的切换按钮
|
||||
showExport: $.common.visible(options.showExport), // 是否支持导出文件
|
||||
queryParams: $.table._params, // 传递参数(*)
|
||||
columns: options.columns // 显示列信息(*)
|
||||
});
|
||||
},
|
||||
// 查询条件
|
||||
queryParams: function(params) {
|
||||
return {
|
||||
// 传递参数查询参数
|
||||
pageSize: params.limit,
|
||||
pageNum: params.offset / params.limit + 1,
|
||||
searchValue: params.search,
|
||||
orderByColumn: params.sort,
|
||||
isAsc: params.order
|
||||
};
|
||||
},
|
||||
// 搜索
|
||||
search: function(form) {
|
||||
var params = $("#bootstrap-table").bootstrapTable('getOptions');
|
||||
params.queryParams = function(params) {
|
||||
var search = {};
|
||||
$.each($("#" + form).serializeArray(), function(i, field) {
|
||||
search[field.name] = field.value;
|
||||
});
|
||||
search.pageSize = params.limit;
|
||||
search.pageNum = params.offset / params.limit + 1;
|
||||
search.searchValue = params.search;
|
||||
search.orderByColumn = params.sort;
|
||||
search.isAsc = params.order;
|
||||
return search;
|
||||
}
|
||||
$("#bootstrap-table").bootstrapTable('refresh', params);
|
||||
},
|
||||
// 下载
|
||||
exportExcel: function(form) {
|
||||
$.post($.table._option.exportUrl, $("#" + form).serializeArray(), function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
window.location.href = ctx + "common/download?fileName=" + result.msg + "&delete=" + true;
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 刷新
|
||||
refresh: function() {
|
||||
$("#bootstrap-table").bootstrapTable('refresh', {
|
||||
url: $.table._option.url,
|
||||
silent: true
|
||||
});
|
||||
},
|
||||
// 查询选中列值
|
||||
selectColumns: function(column) {
|
||||
return $.map($('#bootstrap-table').bootstrapTable('getSelections'), function (row) {
|
||||
return row[column];
|
||||
});
|
||||
},
|
||||
// 查询选中首列值
|
||||
selectFirstColumns: function() {
|
||||
return $.map($('#bootstrap-table').bootstrapTable('getSelections'), function (row) {
|
||||
return row[$.table._option.columns[1].field];
|
||||
});
|
||||
}
|
||||
},
|
||||
// 表格树封装处理
|
||||
treeTable: {
|
||||
_option: {},
|
||||
_treeTable: {},
|
||||
// 初始化表格
|
||||
init: function(options) {
|
||||
$.table._option = options;
|
||||
var treeTable = $('#bootstrap-table').bootstrapTreeTable({
|
||||
code : options.id, // 用于设置父子关系
|
||||
parentCode : options.parentId, // 用于设置父子关系
|
||||
type: 'get', // 请求方式(*)
|
||||
url: options.url, // 请求后台的URL(*)
|
||||
ajaxParams : {}, // 请求数据的ajax的data属性
|
||||
expandColumn : '0', // 在哪一列上面显示展开按钮
|
||||
striped : false, // 是否各行渐变色
|
||||
bordered : true, // 是否显示边框
|
||||
expandAll : $.common.visible(options.expandAll), // 是否全部展开
|
||||
columns: options.columns
|
||||
});
|
||||
$.treeTable._treeTable = treeTable;
|
||||
},
|
||||
// 条件查询
|
||||
search: function(form) {
|
||||
var params = {};
|
||||
$.each($("#" + form).serializeArray(), function(i, field) {
|
||||
params[field.name] = field.value;
|
||||
});
|
||||
$.treeTable._treeTable.bootstrapTreeTable('refresh', params);
|
||||
},
|
||||
// 刷新
|
||||
refresh: function() {
|
||||
$.treeTable._treeTable.bootstrapTreeTable('refresh');
|
||||
},
|
||||
},
|
||||
// 表单封装处理
|
||||
form: {
|
||||
// 获取选中复选框项
|
||||
selectCheckeds: function(name) {
|
||||
var checkeds = "";
|
||||
$('input:checkbox[name="' + name + '"]:checked').each(function(i) {
|
||||
if (0 == i) {
|
||||
checkeds = $(this).val();
|
||||
} else {
|
||||
checkeds += ("," + $(this).val());
|
||||
}
|
||||
});
|
||||
return checkeds;
|
||||
},
|
||||
// 获取选中下拉框项
|
||||
selectSelects: function(name) {
|
||||
var selects = "";
|
||||
$('#' + name + ' option:selected').each(function (i) {
|
||||
if (0 == i) {
|
||||
selects = $(this).val();
|
||||
} else {
|
||||
selects += ("," + $(this).val());
|
||||
}
|
||||
});
|
||||
return selects;
|
||||
}
|
||||
},
|
||||
// 弹出层封装处理
|
||||
modal: {
|
||||
// 显示图标
|
||||
icon: function(type) {
|
||||
var icon = "";
|
||||
if (type == modal_status.WARNING) {
|
||||
icon = 0;
|
||||
} else if (type == modal_status.SUCCESS) {
|
||||
icon = 1;
|
||||
} else if (type == modal_status.FAIL) {
|
||||
icon = 2;
|
||||
} else {
|
||||
icon = 3;
|
||||
}
|
||||
return icon;
|
||||
},
|
||||
// 消息提示
|
||||
msg: function(content, type) {
|
||||
if (type != undefined) {
|
||||
layer.msg(content, { icon: $.modal.icon(type), time: 1000, shift: 5 });
|
||||
} else {
|
||||
layer.msg(content);
|
||||
}
|
||||
},
|
||||
// 错误消息
|
||||
msgError: function(content) {
|
||||
$.modal.msg(content, modal_status.FAIL);
|
||||
},
|
||||
// 成功消息
|
||||
msgSuccess: function(content) {
|
||||
$.modal.msg(content, modal_status.SUCCESS);
|
||||
},
|
||||
// 警告消息
|
||||
msgWarning: function(content) {
|
||||
$.modal.msg(content, modal_status.WARNING);
|
||||
},
|
||||
// 弹出提示
|
||||
alert: function(content, type) {
|
||||
layer.alert(content, {
|
||||
icon: $.modal.icon(type),
|
||||
title: "系统提示",
|
||||
btn: ['确认'],
|
||||
btnclass: ['btn btn-primary'],
|
||||
});
|
||||
},
|
||||
// 消息提示并刷新父窗体
|
||||
msgReload: function(msg, type) {
|
||||
layer.msg(msg, {
|
||||
icon: $.modal.icon(type),
|
||||
time: 500,
|
||||
shade: [0.1, '#8F8F8F']
|
||||
},
|
||||
function() {
|
||||
$.modal.reload();
|
||||
});
|
||||
},
|
||||
// 错误提示
|
||||
alertError: function(content) {
|
||||
$.modal.alert(content, modal_status.FAIL);
|
||||
},
|
||||
// 成功提示
|
||||
alertSuccess: function(content) {
|
||||
$.modal.alert(content, modal_status.SUCCESS);
|
||||
},
|
||||
// 警告提示
|
||||
alertWarning: function(content) {
|
||||
$.modal.alert(content, modal_status.WARNING);
|
||||
},
|
||||
// 关闭窗体
|
||||
close: function () {
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
},
|
||||
// 确认窗体
|
||||
confirm: function (content, callBack) {
|
||||
layer.confirm(content, {
|
||||
icon: 3,
|
||||
title: "系统提示",
|
||||
btn: ['确认', '取消'],
|
||||
btnclass: ['btn btn-primary', 'btn btn-danger'],
|
||||
}, function (index) {
|
||||
layer.close(index);
|
||||
callBack(true);
|
||||
});
|
||||
},
|
||||
// 弹出层指定宽度
|
||||
open: function (title, url, width, height) {
|
||||
if ($.common.isEmpty(title)) {
|
||||
title = false;
|
||||
};
|
||||
if ($.common.isEmpty(url)) {
|
||||
url = "404.html";
|
||||
};
|
||||
if ($.common.isEmpty(width)) {
|
||||
width = 800;
|
||||
};
|
||||
if ($.common.isEmpty(height)) {
|
||||
height = ($(window).height() - 50);
|
||||
};
|
||||
layer.open({
|
||||
type: 2,
|
||||
area: [width + 'px', height + 'px'],
|
||||
fix: false,
|
||||
//不固定
|
||||
maxmin: true,
|
||||
shade: 0.3,
|
||||
title: title,
|
||||
content: url
|
||||
});
|
||||
},
|
||||
// 弹出层全屏
|
||||
openFull: function (title, url, width, height) {
|
||||
if ($.common.isEmpty(title)) {
|
||||
title = false;
|
||||
};
|
||||
if ($.common.isEmpty(url)) {
|
||||
url = "404.html";
|
||||
};
|
||||
if ($.common.isEmpty(width)) {
|
||||
width = 800;
|
||||
};
|
||||
if ($.common.isEmpty(height)) {
|
||||
height = ($(window).height() - 50);
|
||||
};
|
||||
var index = layer.open({
|
||||
type: 2,
|
||||
area: [width + 'px', height + 'px'],
|
||||
fix: false,
|
||||
//不固定
|
||||
maxmin: true,
|
||||
shade: 0.3,
|
||||
title: title,
|
||||
content: url
|
||||
});
|
||||
layer.full(index);
|
||||
},
|
||||
// 打开遮罩层
|
||||
loading: function (message) {
|
||||
$.blockUI({ message: '<div class="loaderbox"><div class="loading-activity"></div> ' + message + '</div>' });
|
||||
},
|
||||
// 关闭遮罩层
|
||||
closeLoading: function () {
|
||||
setTimeout(function(){
|
||||
$.unblockUI();
|
||||
}, 50);
|
||||
},
|
||||
// 重新加载
|
||||
reload: function () {
|
||||
parent.location.reload();
|
||||
}
|
||||
},
|
||||
// 操作封装处理
|
||||
operate: {
|
||||
// 提交数据
|
||||
submit: function(url, type, dataType, data) {
|
||||
$.modal.loading("正在处理中,请稍后...");
|
||||
var config = {
|
||||
url: url,
|
||||
type: type,
|
||||
dataType: dataType,
|
||||
data: data,
|
||||
success: function(result) {
|
||||
$.operate.ajaxSuccess(result);
|
||||
}
|
||||
};
|
||||
$.ajax(config)
|
||||
},
|
||||
// post请求传输
|
||||
post: function(url, data) {
|
||||
$.operate.submit(url, "post", "json", data);
|
||||
},
|
||||
// 删除信息
|
||||
remove: function(id) {
|
||||
$.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() {
|
||||
var url = $.common.isEmpty(id) ? $.table._option.removeUrl : $.table._option.removeUrl.replace("{id}", id);
|
||||
var data = { "ids": id };
|
||||
$.operate.submit(url, "post", "json", data);
|
||||
});
|
||||
},
|
||||
// 批量删除信息
|
||||
batRemove: function() {
|
||||
var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id);
|
||||
if (rows.length == 0) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
return;
|
||||
}
|
||||
$.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() {
|
||||
var url = $.table._option.removeUrl;
|
||||
var data = { "ids": rows.join() };
|
||||
$.operate.submit(url, "post", "json", data);
|
||||
});
|
||||
},
|
||||
// 添加信息
|
||||
add: function(id) {
|
||||
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
|
||||
$.modal.open("添加", url);
|
||||
},
|
||||
// 修改信息
|
||||
edit: function(id) {
|
||||
var url = $.table._option.updateUrl.replace("{id}", id);
|
||||
$.modal.open("修改" + $.table._option.modalName, url);
|
||||
},
|
||||
// 查看信息
|
||||
view: function(id) {
|
||||
var url = $.table._option.updateUrl.replace("{id}", id);
|
||||
$.modal.open("查看" , url);
|
||||
},
|
||||
// 添加信息 全屏
|
||||
addFull: function(id) {
|
||||
var url = $.common.isEmpty(id) ? $.table._option.createUrl : $.table._option.createUrl.replace("{id}", id);
|
||||
$.modal.openFull("添加" + $.table._option.modalName, url);
|
||||
},
|
||||
// 修改信息 全屏
|
||||
editFull: function(id) {
|
||||
var url = $.table._option.updateUrl.replace("{id}", id);
|
||||
$.modal.openFull("修改" + $.table._option.modalName, url);
|
||||
},
|
||||
// 保存信息
|
||||
save: function(url, data) {
|
||||
$.modal.loading("正在处理中,请稍后...");
|
||||
var config = {
|
||||
url: url,
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: data,
|
||||
success: function(result) {
|
||||
$.operate.saveSuccess(result);
|
||||
}
|
||||
};
|
||||
$.ajax(config)
|
||||
},
|
||||
// 保存结果弹出msg刷新table表格
|
||||
ajaxSuccess: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$.modal.msgSuccess(result.msg);
|
||||
$.table.refresh();
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
$.modal.closeLoading();
|
||||
},
|
||||
// 保存结果提示msg
|
||||
saveSuccess: function (result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$.modal.msgReload("保存成功,正在刷新数据请稍后……", modal_status.SUCCESS);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
$.modal.closeLoading();
|
||||
}
|
||||
},
|
||||
// 通用方法封装处理
|
||||
common: {
|
||||
// 判断字符串是否为空
|
||||
isEmpty: function (value) {
|
||||
if (value == null || this.trim(value) == "") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
// 是否显示数据 为空默认为显示
|
||||
visible: function (value) {
|
||||
if ($.common.isEmpty(value) || value == true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
// 空格截取
|
||||
trim: function (value) {
|
||||
if (value == null) {
|
||||
return "";
|
||||
}
|
||||
return value.toString().replace(/(^\s*)|(\s*$)|\r|\n/g, "");
|
||||
},
|
||||
// 指定随机数返回
|
||||
random: function (min, max) {
|
||||
return Math.floor((Math.random() * max) + min);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
/** 消息状态码 */
|
||||
web_status = {
|
||||
SUCCESS: 0,
|
||||
FAIL: 500
|
||||
};
|
||||
|
||||
/** 弹窗状态码 */
|
||||
modal_status = {
|
||||
SUCCESS: "success",
|
||||
FAIL: "error",
|
||||
WARNING: "warning"
|
||||
};
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
var strs = "";
|
||||
var num = 0;
|
||||
var forTree = function(data){
|
||||
for(var i=0;i<data.length;i++){
|
||||
if(num == 0){
|
||||
strs= "";
|
||||
}
|
||||
num++;
|
||||
var urlstr = '';
|
||||
try{
|
||||
urlstr = '<div><span onclick="getData(this,\''+data[i].id+'\',\''+data[i].type+'\')"><label>'+data[i].name+'</label><button class="arrow"></button></span><ul class="ul">';
|
||||
strs += urlstr;
|
||||
if(data[i].list != null){
|
||||
forTree(data[i].list);
|
||||
}
|
||||
strs += "</ul></div>";
|
||||
}catch(e){}
|
||||
}
|
||||
return strs;
|
||||
}
|
||||
|
||||
|
||||
function menuTree(id){
|
||||
|
||||
//给有子对象的元素加
|
||||
$("#"+id+" ul").each(function(index, element) {
|
||||
var ulContent = $(element).html();
|
||||
var spanContent = $(element).siblings("span").html();
|
||||
if(ulContent){
|
||||
$(element).siblings("span").html(spanContent)
|
||||
}
|
||||
});
|
||||
$("#"+id).find("div span").click(function(){
|
||||
var ul = $(this).siblings("ul");
|
||||
if(ul.find("div").html() != null){
|
||||
if(ul.css("display") == "none"){
|
||||
ul.show(300);
|
||||
}else{
|
||||
ul.hide(300);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||